@redocly/reference-docs 2.7.3 → 2.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/bin/cli/commands/redocly-docs-cli.min.js +3042 -331
  2. package/bin/cli/commands/redocly-docs-cli.min.js.LICENSE.txt +367 -0
  3. package/dist/console.redocly-reference-docs.min.js +484 -21
  4. package/dist/oauth2-redirect.js +5 -3
  5. package/dist/redocly-reference-docs.min.js +3426 -109
  6. package/lib/components/index.d.ts +3 -2
  7. package/lib/components/styled.elements.js +1 -1
  8. package/lib/index.d.ts +1 -1
  9. package/lib/index.js +1 -1
  10. package/lib/redoc-lib/src/components/ContentItems/ContentItems.js +1 -1
  11. package/lib/redoc-lib/src/components/JsonViewer/style.js +1 -1
  12. package/lib/redoc-lib/src/components/Markdown/SanitizedMdBlock.js +1 -1
  13. package/lib/redoc-lib/src/components/RequestSamples/useCodeSamples.js +1 -1
  14. package/lib/redoc-lib/src/components/SearchBox/SearchBox.d.ts +1 -1
  15. package/lib/redoc-lib/src/index.d.ts +2 -1
  16. package/lib/redoc-lib/src/index.js +1 -1
  17. package/lib/redoc-lib/src/services/OpenAPIParser.js +1 -1
  18. package/lib/redoc-lib/src/services/SearchStore.d.ts +1 -1
  19. package/lib/redoc-lib/src/services/SearchStore.js +2 -51
  20. package/lib/redoc-lib/src/services/SearchWorker.worker.js +1 -1
  21. package/lib/redoc-lib/src/styled-components.d.ts +1 -1
  22. package/lib/redoc-lib/src/theme.d.ts +2 -0
  23. package/lib/redoc-lib/src/theme.js +1 -1
  24. package/lib/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
  25. package/lib/redoc-lib/src/utils/openapi.js +1 -1
  26. package/lib/services/ProMenu.js +1 -1
  27. package/lib/services/ProStore.d.ts +1 -1
  28. package/lib/services/ProStore.js +1 -1
  29. package/lib/services/code-samples/httpsnippet/helpers/code-helpers.js +1 -1
  30. package/lib-esm/components/index.d.ts +3 -2
  31. package/lib-esm/components/styled.elements.js +1 -1
  32. package/lib-esm/index.d.ts +1 -1
  33. package/lib-esm/index.js +1 -1
  34. package/lib-esm/redoc-lib/src/components/ContentItems/ContentItems.js +1 -1
  35. package/lib-esm/redoc-lib/src/components/JsonViewer/style.js +1 -1
  36. package/lib-esm/redoc-lib/src/components/Markdown/SanitizedMdBlock.js +1 -1
  37. package/lib-esm/redoc-lib/src/components/RequestSamples/useCodeSamples.js +1 -1
  38. package/lib-esm/redoc-lib/src/components/SearchBox/SearchBox.d.ts +1 -1
  39. package/lib-esm/redoc-lib/src/index.d.ts +2 -1
  40. package/lib-esm/redoc-lib/src/index.js +1 -1
  41. package/lib-esm/redoc-lib/src/services/OpenAPIParser.js +1 -1
  42. package/lib-esm/redoc-lib/src/services/SearchStore.d.ts +1 -1
  43. package/lib-esm/redoc-lib/src/services/SearchStore.js +2 -51
  44. package/lib-esm/redoc-lib/src/services/SearchWorker.worker.js +1 -1
  45. package/lib-esm/redoc-lib/src/styled-components.d.ts +1 -1
  46. package/lib-esm/redoc-lib/src/theme.d.ts +2 -0
  47. package/lib-esm/redoc-lib/src/theme.js +1 -1
  48. package/lib-esm/redoc-lib/src/utils/loadAndBundleSpec.d.ts +1 -1
  49. package/lib-esm/redoc-lib/src/utils/openapi.js +1 -1
  50. package/lib-esm/services/ProMenu.js +1 -1
  51. package/lib-esm/services/ProStore.d.ts +1 -1
  52. package/lib-esm/services/ProStore.js +1 -1
  53. package/lib-esm/services/code-samples/httpsnippet/helpers/code-helpers.js +1 -1
  54. package/package.json +19 -32
@@ -1,19 +1,53 @@
1
- /*!
1
+ var mr=Math.pow;/*!
2
2
  * Redocly Reference Docs
3
3
  * (c) Copyright 2018 Redocly LLC, all rights reserved.
4
4
  * -------------------------------------------------------------
5
- * Version: "2.7.3"
6
- */
7
- (this.webpackJsonpRedoclyReferenceDocs=this.webpackJsonpRedoclyReferenceDocs||[]).push([[0],Array(571).concat([function(e,t,n){"use strict";n.r(t),n.d(t,"Console",(function(){return Ul}));var r={};n.r(r),n.d(r,"JsonPatchError",(function(){return ma})),n.d(r,"deepClone",(function(){return ya})),n.d(r,"getValueByPointer",(function(){return wa})),n.d(r,"applyOperation",(function(){return Ca})),n.d(r,"applyPatch",(function(){return Aa})),n.d(r,"applyReducer",(function(){return ka})),n.d(r,"validator",(function(){return Oa})),n.d(r,"validate",(function(){return Sa})),n.d(r,"_areEquals",(function(){return Ea}));var o={};n.r(o),n.d(o,"unobserve",(function(){return Pa})),n.d(o,"observe",(function(){return Ia})),n.d(o,"generate",(function(){return Fa})),n.d(o,"compare",(function(){return Na}));var i={};n.r(i),n.d(i,"path",(function(){return xl})),n.d(i,"query",(function(){return wl})),n.d(i,"header",(function(){return Al})),n.d(i,"cookie",(function(){return kl}));var a=n(1),s=n(0),l=n.n(s),c=n(599),u=n(9),f=n(18),p=n(180),d=n(4),h=n(149),v=n(3),g=Object(v.d)(A||(A=Object(a.f)(["\n border: none;\n outline: none;\n padding: 8px;\n border-radius: ",";\n background-color: ",";\n ","\n\n &::placeholder {\n opacity: 0.6;\n color: ",";\n }\n\n &:-webkit-autofill {\n background-color: ",";\n }\n"],["\n border: none;\n outline: none;\n padding: 8px;\n border-radius: ",";\n background-color: ",";\n ","\n\n &::placeholder {\n opacity: 0.6;\n color: ",";\n }\n\n &:-webkit-autofill {\n background-color: ",";\n }\n"])),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.rightPanel.panelControlsBackgroundColor}),(function(e){var t=e.theme;return Object(v.h)({color:t.colors.text.light,fontFamily:t.typography.code.fontFamily,fontSize:t.typography.fontSize})}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.rightPanel.panelBackgroundColor})),m=v.e.div(k||(k=Object(a.f)(["\n display: ",";\n ","\n"],["\n display: ",";\n ","\n"])),(function(e){return"hidden"===e.type?"none":"inline-block"}),(function(e){return e.fullWidth?"width: 100%;":""})),y=v.e.div(O||(O=Object(a.f)(["\n position: relative;\n"],["\n position: relative;\n"]))),b=v.e.input(S||(S=Object(a.f)(["\n ","\n ",";\n ","\n"],["\n ","\n ",";\n ","\n"])),g,(function(e){var t=e.inputType,n=e.inputActionButton;return"password"===t||n?"padding-right: 40px;":""}),(function(e){return e.fullWidth?"width: 100%;":""})),x=v.e.span(E||(E=Object(a.f)(["\n position: absolute;\n right: 0;\n line-height: normal;\n\n font-size: 0.8em;\n padding: calc(8px / 0.8);\n cursor: pointer;\n text-align: center;\n ","\n"],["\n position: absolute;\n right: 0;\n line-height: normal;\n\n font-size: 0.8em;\n padding: calc(8px / 0.8);\n cursor: pointer;\n text-align: center;\n ","\n"])),(function(e){var t=e.theme;return Object(v.h)({color:t.rightPanel.textColor})}));var w=l.a.forwardRef((function(e,t){var n=e.fullWidth,r=e.errorMessage,o=e.type,i=l.a.useState("password"===o),s=i[0],c=i[1],u=l.a.useCallback((function(){c(!s)}),[s]);return l.a.createElement(m,{fullWidth:n,type:o},l.a.createElement(y,null,l.a.createElement(b,Object(a.a)({},e,{type:s?"password":"text",inputType:o,ref:t})),e.inputActionButton?l.a.createElement(x,{onClick:e.inputActionButton.onClick},e.inputActionButton.label):"password"===o?l.a.createElement(x,{onClick:u},s?"show":"hide"):null),r?l.a.createElement(h.b,null,r):null)}));function C(e){var t=Object(c.c)(Object(a.a)({fieldType:"text"},e)),n=t.userProps,r=t.render,o=t.fieldState,i=t.informed;return r(l.a.createElement(w,Object(a.a)({},n,i,{errorMessage:o.error})))}var A,k,O,S,E,j=Object(c.b)((function(e){var t=e.initValue,n=e.options,r=e.fieldApi,o=e.fieldState,i=n.map((function(e,t){return{value:e.title||e.value,idx:t,origValue:e.value}})),a=i.find((function(e){return e.origValue===t})),s=l.a.useState(null==a?void 0:a.value),c=s[0],u=s[1];l.a.useEffect((function(){t&&r.setValue(t)}),[]);var f=l.a.useCallback((function(e){r.setValue(i[e.idx].origValue),u(i[e.idx].value)}),[i]);return l.a.createElement(m,{fullWidth:!0},l.a.createElement(d.f,{fullWidth:!0,variant:"dark",value:c,options:i,onChange:f}),o.error?l.a.createElement(h.b,null,o.error):null)}));function T(e){var t=e.name,n=e.value,r=e.description,o=e.variableEnum,i=e.onChange,a=e.defaultValue,l=o?o.map((function(e,t){return{value:e,idx:t}})):[];return s.createElement(h.a,null,s.createElement(h.d,null,t,":"),l&&l.length?s.createElement(d.f,{fullWidth:!0,variant:"dark",openUp:!0,value:n,options:l,onChange:function(e){return i(e.value)}}):s.createElement(w,{fullWidth:!0,value:n,onChange:function(e){return i(e.target.value)},placeholder:a}),r&&s.createElement(F,null,r))}var M,P,I,F=d.nb.small(M||(M=Object(a.f)(["\n display: inline-block;\n margin-top: 5px;\n color: #d0d0d0;\n"],["\n display: inline-block;\n margin-top: 5px;\n color: #d0d0d0;\n"]))),L=n(224),N=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{activeIdx:0,variables:{}}}),Object.defineProperty(t,"handleServerChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var n=t.props.operation.servers.find((function(t){return t.url===e.serverUrl})),r=Object(L.c)(n);t.props.onChange({url:e.serverUrl,variables:r}),Object(f.p)("serverUrl",e.serverUrl),t.setState({variables:r})}}),Object.defineProperty(t,"handleVariableChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){var r,o=t.props.operation.servers[t.state.activeIdx],i=Object(a.a)(Object(a.a)({},t.state.variables),((r={})[e]=n||Object(L.c)(o)[e],r));t.setState({variables:i}),Object(L.i)(e,n),t.props.onChange(Object(a.a)(Object(a.a)({},o),{variables:i}))}}),t}return Object(a.d)(t,e),Object.defineProperty(t,"getDerivedStateFromProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.operation,n=Object(f.e)("serverUrl"),r=t.servers.findIndex((function(e){return e.url===n}));return{activeIdx:r<0?0:r}}}),Object.defineProperty(t.prototype,"componentDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=Object(L.f)(this.props.operation.servers,this.state.activeIdx);this.props.onChange(e),this.setState({variables:e.variables})}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.state.activeIdx,n=this.props.operation.servers.map((function(t){return{serverUrl:t.url,value:"\n "+Object(L.a)(Object(L.b)(t.url,e.state.variables),t.variables)+"\n - "+(t.description||"Default")+"\n "}})),r=Object.keys(this.state.variables);return s.createElement(_,null,s.createElement(h.d,{htmlFor:"server"},"Target server: "),s.createElement(h.a,null,s.createElement(d.f,{openUp:!0,variant:"dark",value:n[t].value,options:n,onChange:this.handleServerChange})),r.length?r.map((function(t){var n=e.props.operation.servers[e.state.activeIdx].variables[t];return s.createElement(T,{key:t,name:t,value:e.state.variables[t],defaultValue:n.default,onChange:function(n){return e.handleVariableChange(t,n)},variableEnum:n.enum,description:n.description})})):null)}}),t=Object(a.c)([u.a],t)}(s.Component),_=d.nb.div(P||(P=Object(a.f)(["\n margin-top: 20px;\n"],["\n margin-top: 20px;\n"]))),D=Object(c.b)((function(e){var t=e.initValue,n=e.paramEnum,r=e.fieldApi,o=s.useState(t),i=o[0],a=o[1],l=n.map((function(e,t){return{id:String(t),value:e}}));return s.useEffect((function(){t&&r.setValue(t)}),[]),s.createElement(d.f,{fullWidth:!0,variant:"dark",value:i,options:l,onChange:function(e){r.setValue(e.value),a(e.value)}})}));!function(e){e.ARRAY="array",e.OBJECT="object"}(I||(I={}));var R=function(e){return"("+e.schema.type+")"+(e.example?" "+e.example:"")};var V=["path","query","cookie","header"];function B(e){var t=e.values,n=e.operation;function r(e,n){var r=s.useMemo((function(){return function(e){return function(t){if(e.required&&!t)return"Field is required";if(e.required&&e.schema.type===I.ARRAY&&Array.isArray(t)){if(t.length>(e.schema.rawSchema&&e.schema.rawSchema.maxItems||1/0))return"Too many items selected, maximum "+e.schema.rawSchema.maxItems;if(t.length<(e.schema.rawSchema&&e.schema.rawSchema.minItems||0)){var n=e.schema.rawSchema.minItems;return"You should select at least "+(1===n?n+" item":n+" items")}}}}(n)}),[n]),o=Array.isArray(n.schema.enum)&&n.schema.enum.length?n.schema.enum:void 0,i=function(e){if(e.schema.type===I.ARRAY){var t=e.schema.default||e.schema.example;if(!t&&e.schema.rawSchema.items){if(e.schema.rawSchema.items.default)return[e.schema.rawSchema.items.default];if(e.schema.rawSchema.items.example)return[e.schema.rawSchema.items.example]}return t||[]}return e.schema.default||e.schema.example}(n);return o?s.createElement(h.a,null,s.createElement(D,{initValue:i,paramEnum:o,field:e})):s.createElement(C,{fullWidth:!0,"data-cy":"parameter-input",id:e,field:e,placeholder:R(n),validate:r,initialValue:i||Object(f.f)(t,e),validateOnBlur:!0,validateOnChange:!0})}function o(e,t,n){var i,l=n?Object(f.b)(n,e.name):e.name,c=function(e){var t=e.oneOfType,n=e.type,r=e.items;return t||n===I.ARRAY&&(null==r?void 0:r.type)===I.OBJECT&&"Array of objects"}(e.schema);if(c&&console.warn('Unsupported parameter definition: "'+c+'"'),e.schema.type===I.OBJECT)return null===(i=e.schema.fields)||void 0===i?void 0:i.map((function(e){return o(e,t,l)}));var u=n?[t,n]:[e.in],p=f.b.apply(void 0,Object(a.h)(Object(a.h)([],u,!1),[e.name],!1));return s.createElement(h.a,{key:p},s.createElement(h.d,{required:e.required},l,":"),c?s.createElement(h.e,null,"Unsupported field schema definition"):r(p,e))}var i,l,c=(i=n.parameters||[],l={},i.forEach((function(e){var t,n,r;t=l,n=e.in,r=e,t[n]||(t[n]=[]),t[n].push(r)})),l);return s.createElement(h.h,null,V.map((function(e){return function(e,t){return t&&t.length?s.createElement(s.Fragment,{key:e},s.createElement(h.a,null,s.createElement(h.g,null," # ",e," parameters "),s.createElement("span",null," ")),t.map((function(t){return o(t,e)}))):null}(e,c[e])})))}var U=n(16),W=n(217),z=n(29);function H(e,t,n){var r=t.path||{},o=t.query||{},i=Object.keys(o),a=Object(L.b)(e,r);return i.length&&(a+="?"+i.map((function(e){if(!o[e])return"";var t=function(e){return n.find((function(t){return t.name===e&&"query"===t.in}))}(e);return t?Object(d.mb)(t,o[e]):e+"="+encodeURIComponent(o[e])})).filter(Boolean).join("&")),a}var q,G,$,K,J,Y,X,Q,Z,ee,te,ne=function(e){var t=e.loading,n=e.operation,r=e.hasResponse,o=e.execute,i=e.params,a=void 0===i?{}:i;return s.createElement(oe,null,s.createElement(W.b,null,s.createElement(z.b,{type:n.httpVerb},n.httpVerb),s.createElement(W.a,{wrap:"true"},H(n.path,a,n.parameters))),s.createElement(re,{"data-cy":"send-button",color:"primary",blinking:t,onClick:function(){t||o()}},t?"Sending...":r?"Resend":"Send"))},re=Object(d.nb)(z.a)(q||(q=Object(a.f)(["\n width: ",";\n"],["\n width: ",";\n"])),(function(e){return e.theme.components.tryItSendButton.fullWidth?"100%":"auto"})),oe=Object(d.nb)(U.c)(G||(G=Object(a.f)(["\n ",";\n"],["\n ",";\n"])),(function(e){return e.theme.components.tryItSendButton.fullWidth?"\n flex-direction: column;\n align-items: flex-start;":""})),ie=n(8),ae=d.nb.div($||($=Object(a.f)(["\n margin-bottom: 10px;\n"],["\n margin-bottom: 10px;\n"]))),se=d.nb.div(K||(K=Object(a.f)(["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n color: ",";\n"],["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n color: ",";\n"])),(function(e){return e.theme.colors.text.light})),le=Object(d.nb)(se)(J||(J=Object(a.f)(["\n color: ",";\n"],["\n color: ",";\n"])),(function(e){var t=e.theme,n=e.code;return n>=200&&n<300?t.colors.responses.success.tabTextColor:n>=300&&n<400?t.colors.responses.redirect.tabTextColor:n>400?t.colors.responses.error.tabTextColor:t.colors.responses.info.tabTextColor})),ce=d.nb.strong(Y||(Y=Object(a.f)(["\n text-transform: capitalize;\n display: inline-block;\n padding-right: 5px;\n"],["\n text-transform: capitalize;\n display: inline-block;\n padding-right: 5px;\n"]))),ue=d.nb.header(X||(X=Object(a.f)(["\n font-weight: bold;\n margin-bottom: 10px;\n"],["\n font-weight: bold;\n margin-bottom: 10px;\n"]))),fe=d.nb.code(Q||(Q=Object(a.f)(["\n border-left: 3px solid #ff4040;\n padding-left: 5px;\n"],["\n border-left: 3px solid #ff4040;\n padding-left: 5px;\n"]))),pe=d.nb.div(Z||(Z=Object(a.f)(["\n margin-bottom: 10px;\n\n &:not(:first-child) {\n margin-top: 10px;\n }\n"],["\n margin-bottom: 10px;\n\n &:not(:first-child) {\n margin-top: 10px;\n }\n"]))),de=Object(d.nb)(ie.t)(ee||(ee=Object(a.f)(["\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n"],["\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n"]))),he=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t=this.props,n=t.error,r=t.response,o=t.time,i=r||n&&n.response,a=i&&i.data&&i.data.length||0;if(e=a>1e6?(a/1e6).toFixed(2)+" MB":a>1e3?(a/1e3).toFixed(2)+" KB":a+" B",n&&!n.response||!i)return s.createElement(s.Fragment,null,s.createElement(ue,null," Could not get any response "),s.createElement(fe,null,n&&n.message||"Unknown error"),s.createElement("br",null),s.createElement(ue,null," Why this might have happened:"),s.createElement("div",null," - CORS is misconfigured on the server"),s.createElement("div",null," - ","The server couldn't sent a response"),s.createElement("div",null," - No internet access"),s.createElement("div",null," - Documentation issue - contact API owner"),s.createElement("div",null," - Misconfigured security definition"));if(!i)return"Something went wrong";var l=Object.keys(i.headers);return s.createElement(s.Fragment,null,s.createElement(ae,null,s.createElement(le,{code:i.status},s.createElement("span",null," Status: "),i.status," ",i.statusText),s.createElement(se,null,s.createElement("span",null," Time: "),o,"ms"),s.createElement(se,null,s.createElement("span",null," Size: "),e)),s.createElement("div",null,s.createElement(pe,null," Headers: "),s.createElement(de,null,l.map((function(e){return s.createElement("div",{key:e},s.createElement(ce,null,e,":"),s.createElement("code",null," ",i.headers[e]))}))),s.createElement(pe,null," Body: "),i.body&&s.createElement(d.o,{data:i.body})||null,!i.body&&null!=i.data&&(i.data?s.createElement(d.U,{lang:Object(d.hb)(i.headers["Content-Type"]||"text/plain"),source:i.data}):s.createElement(de,null,s.createElement("i",null,"(no content)")))||null))}}),t}(s.PureComponent),ve=n(81),ge=n.n(ve),me=n(794),ye=n(597);function be(e,t){void 0===t&&(t=!1);var n=e.length,r=0,o="",i=0,a=16,s=0,l=0,c=0,u=0,f=0;function p(t,n){for(var o=0,i=0;o<t||!n;){var a=e.charCodeAt(r);if(a>=48&&a<=57)i=16*i+a-48;else if(a>=65&&a<=70)i=16*i+a-65+10;else{if(!(a>=97&&a<=102))break;i=16*i+a-97+10}r++,o++}return o<t&&(i=-1),i}function d(){if(o="",f=0,i=r,l=s,u=c,r>=n)return i=n,a=17;var t=e.charCodeAt(r);if(xe(t)){do{r++,o+=String.fromCharCode(t),t=e.charCodeAt(r)}while(xe(t));return a=15}if(we(t))return r++,o+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,o+="\n"),s++,c=r,a=14;switch(t){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,o=function(){for(var t="",o=r;;){if(r>=n){t+=e.substring(o,r),f=2;break}var i=e.charCodeAt(r);if(34===i){t+=e.substring(o,r),r++;break}if(92!==i){if(i>=0&&i<=31){if(we(i)){t+=e.substring(o,r),f=2;break}f=6}r++}else{if(t+=e.substring(o,r),++r>=n){f=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+="\n";break;case 114:t+="\r";break;case 116:t+="\t";break;case 117:var a=p(4,!0);a>=0?t+=String.fromCharCode(a):f=4;break;default:f=5}o=r}}return t}(),a=10;case 47:var d=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<n&&!we(e.charCodeAt(r));)r++;return o=e.substring(d,r),a=12}if(42===e.charCodeAt(r+1)){r+=2;for(var v=n-1,g=!1;r<v;){var m=e.charCodeAt(r);if(42===m&&47===e.charCodeAt(r+1)){r+=2,g=!0;break}r++,we(m)&&(13===m&&10===e.charCodeAt(r)&&r++,s++,c=r)}return g||(r++,f=1),o=e.substring(d,r),a=13}return o+=String.fromCharCode(t),r++,a=16;case 45:if(o+=String.fromCharCode(t),++r===n||!Ce(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=function(){var t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&Ce(e.charCodeAt(r))))return f=3,e.substring(t,r);for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++}var n=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&Ce(e.charCodeAt(r))){for(r++;r<e.length&&Ce(e.charCodeAt(r));)r++;n=r}else f=3;return e.substring(t,n)}(),a=11;default:for(;r<n&&h(t);)r++,t=e.charCodeAt(r);if(i!==r){switch(o=e.substring(i,r)){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return o+=String.fromCharCode(t),r++,a=16}}function h(e){if(xe(e)||we(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}return{setPosition:function(e){r=e,o="",i=0,a=16,f=0},getPosition:function(){return r},scan:t?function(){var e;do{e=d()}while(e>=12&&e<=15);return e}:d,getToken:function(){return a},getTokenValue:function(){return o},getTokenOffset:function(){return i},getTokenLength:function(){return r-i},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return i-u},getTokenError:function(){return f}}}function xe(e){return 32===e||9===e||11===e||12===e||160===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function we(e){return 10===e||13===e||8232===e||8233===e}function Ce(e){return e>=48&&e<=57}function Ae(e,t,n){var r,o,i,a,s;if(t){for(a=t.offset,s=a+t.length,i=a;i>0&&!Oe(e,i-1);)i--;for(var l=s;l<e.length&&!Oe(e,l);)l++;o=e.substring(i,l),r=function(e,t){var n=0,r=0,o=t.tabSize||4;for(;n<e.length;){var i=e.charAt(n);if(" "===i)r++;else{if("\t"!==i)break;r+=o}n++}return Math.floor(r/o)}(o,n)}else o=e,r=0,i=0,a=0,s=e.length;var c,u=function(e,t){for(var n=0;n<t.length;n++){var r=t.charAt(n);if("\r"===r)return n+1<t.length&&"\n"===t.charAt(n+1)?"\r\n":"\r";if("\n"===r)return"\n"}return e&&e.eol||"\n"}(n,e),f=!1,p=0;c=n.insertSpaces?ke(" ",n.tabSize||4):"\t";var d=be(o,!1),h=!1;function v(){return u+ke(c,r+p)}function g(){var e=d.scan();for(f=!1;15===e||14===e;)f=f||14===e,e=d.scan();return h=16===e||0!==d.getTokenError(),e}var m=[];function y(t,n,r){!h&&n<s&&r>a&&e.substring(n,r)!==t&&m.push({offset:n,length:r-n,content:t})}var b=g();if(17!==b){var x=d.getTokenOffset()+i;y(ke(c,r),i,x)}for(;17!==b;){for(var w=d.getTokenOffset()+d.getTokenLength()+i,C=g(),A="";!f&&(12===C||13===C);){y(" ",w,d.getTokenOffset()+i),w=d.getTokenOffset()+d.getTokenLength()+i,A=12===C?v():"",C=g()}if(2===C)1!==b&&(p--,A=v());else if(4===C)3!==b&&(p--,A=v());else{switch(b){case 3:case 1:p++,A=v();break;case 5:case 12:A=v();break;case 13:A=f?v():" ";break;case 6:A=" ";break;case 10:if(6===C){A="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===C||13===C?A=" ":5!==C&&17!==C&&(h=!0);break;case 16:h=!0}!f||12!==C&&13!==C||(A=v())}y(A,w,d.getTokenOffset()+i),b=C}return m}function ke(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function Oe(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function Se(e,t,n){void 0===n&&(n=te.DEFAULT);var r=be(e,!1);function o(e){return e?function(){return e(r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}function i(e){return e?function(t){return e(t,r.getTokenOffset(),r.getTokenLength(),r.getTokenStartLine(),r.getTokenStartCharacter())}:function(){return!0}}var a=o(t.onObjectBegin),s=i(t.onObjectProperty),l=o(t.onObjectEnd),c=o(t.onArrayBegin),u=o(t.onArrayEnd),f=i(t.onLiteralValue),p=i(t.onSeparator),d=o(t.onComment),h=i(t.onError),v=n&&n.disallowComments,g=n&&n.allowTrailingComma;function m(){for(;;){var e=r.scan();switch(r.getTokenError()){case 4:y(14);break;case 5:y(15);break;case 3:y(13);break;case 1:v||y(11);break;case 2:y(12);break;case 6:y(16)}switch(e){case 12:case 13:v?y(10):d();break;case 16:y(1);break;case 15:case 14:break;default:return e}}}function y(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=[]),h(e),t.length+n.length>0)for(var o=r.getToken();17!==o;){if(-1!==t.indexOf(o)){m();break}if(-1!==n.indexOf(o))break;o=m()}}function b(e){var t=r.getTokenValue();return e?f(t):s(t),m(),!0}function x(){switch(r.getToken()){case 3:return function(){c(),m();for(var e=!1;4!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||y(4,[],[]),p(","),m(),4===r.getToken()&&g)break}else e&&y(6,[],[]);x()||y(4,[],[4,5]),e=!0}return u(),4!==r.getToken()?y(8,[4],[]):m(),!0}();case 1:return function(){a(),m();for(var e=!1;2!==r.getToken()&&17!==r.getToken();){if(5===r.getToken()){if(e||y(4,[],[]),p(","),m(),2===r.getToken()&&g)break}else e&&y(6,[],[]);(10!==r.getToken()?(y(3,[],[2,5]),0):(b(!1),6===r.getToken()?(p(":"),m(),x()||y(4,[],[2,5])):y(5,[],[2,5]),1))||y(4,[],[2,5]),e=!0}return l(),2!==r.getToken()?y(7,[2],[]):m(),!0}();case 10:return b(!0);default:return function(){switch(r.getToken()){case 11:var e=r.getTokenValue(),t=Number(e);isNaN(t)&&(y(2),t=0),f(t);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return m(),!0}()}}return m(),17===r.getToken()?!!n.allowEmptyContent||(y(4,[],[]),!1):x()?(17!==r.getToken()&&y(9,[],[]),!0):(y(4,[],[]),!1)}!function(e){e.DEFAULT={allowTrailingComma:!1}}(te||(te={}));var Ee,je,Te,Me,Pe,Ie,Fe,Le,Ne,_e,De,Re,Ve,Be,Ue,We,ze,He,qe,Ge,$e,Ke,Je,Ye,Xe,Qe,Ze=be,et=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=te.DEFAULT);var r=null,o=[],i=[];function a(e){Array.isArray(o)?o.push(e):null!==r&&(o[r]=e)}return Se(e,{onObjectBegin:function(){var e={};a(e),i.push(o),o=e,r=null},onObjectProperty:function(e){r=e},onObjectEnd:function(){o=i.pop()},onArrayBegin:function(){var e=[];a(e),i.push(o),o=e,r=null},onArrayEnd:function(){o=i.pop()},onLiteralValue:a,onError:function(e,n,r){t.push({error:e,offset:n,length:r})}},n),o[0]},tt=function e(t,n,r){if(void 0===r&&(r=!1),function(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}(t,n,r)){var o=t.children;if(Array.isArray(o))for(var i=0;i<o.length&&o[i].offset<=n;i++){var a=e(o[i],n,r);if(a)return a}return t}},nt=function e(t){if(!t.parent||!t.parent.children)return[];var n=e(t.parent);if("property"===t.parent.type){var r=t.parent.children[0].value;n.push(r)}else if("array"===t.parent.type){var o=t.parent.children.indexOf(t);-1!==o&&n.push(o)}return n},rt=function e(t){switch(t.type){case"array":return t.children.map(e);case"object":for(var n=Object.create(null),r=0,o=t.children;r<o.length;r++){var i=o[r],a=i.children[1];a&&(n[i.children[0].value]=e(a))}return n;case"null":case"string":case"number":case"boolean":return t.value;default:return}};function ot(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(typeof e!=typeof t)return!1;if("object"!=typeof e)return!1;if(Array.isArray(e)!==Array.isArray(t))return!1;var n,r;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(n=0;n<e.length;n++)if(!ot(e[n],t[n]))return!1}else{var o=[];for(r in e)o.push(r);o.sort();var i=[];for(r in t)i.push(r);if(i.sort(),!ot(o,i))return!1;for(n=0;n<o.length;n++)if(!ot(e[o[n]],t[o[n]]))return!1}return!0}function it(e){return"number"==typeof e}function at(e){return void 0!==e}function st(e){return"boolean"==typeof e}!function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(Ee||(Ee={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(je||(je={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=je.MAX_VALUE),t===Number.MAX_VALUE&&(t=je.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return Ut.objectLiteral(t)&&Ut.uinteger(t.line)&&Ut.uinteger(t.character)}}(Te||(Te={})),function(e){e.create=function(e,t,n,r){if(Ut.uinteger(e)&&Ut.uinteger(t)&&Ut.uinteger(n)&&Ut.uinteger(r))return{start:Te.create(e,t),end:Te.create(n,r)};if(Te.is(e)&&Te.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+r+"]")},e.is=function(e){var t=e;return Ut.objectLiteral(t)&&Te.is(t.start)&&Te.is(t.end)}}(Me||(Me={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.range)&&(Ut.string(t.uri)||Ut.undefined(t.uri))}}(Pe||(Pe={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.targetRange)&&Ut.string(t.targetUri)&&(Me.is(t.targetSelectionRange)||Ut.undefined(t.targetSelectionRange))&&(Me.is(t.originSelectionRange)||Ut.undefined(t.originSelectionRange))}}(Ie||(Ie={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return Ut.numberRange(t.red,0,1)&&Ut.numberRange(t.green,0,1)&&Ut.numberRange(t.blue,0,1)&&Ut.numberRange(t.alpha,0,1)}}(Fe||(Fe={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return Me.is(t.range)&&Fe.is(t.color)}}(Le||(Le={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Ut.string(t.label)&&(Ut.undefined(t.textEdit)||He.is(t))&&(Ut.undefined(t.additionalTextEdits)||Ut.typedArray(t.additionalTextEdits,He.is))}}(Ne||(Ne={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(_e||(_e={})),function(e){e.create=function(e,t,n,r,o){var i={startLine:e,endLine:t};return Ut.defined(n)&&(i.startCharacter=n),Ut.defined(r)&&(i.endCharacter=r),Ut.defined(o)&&(i.kind=o),i},e.is=function(e){var t=e;return Ut.uinteger(t.startLine)&&Ut.uinteger(t.startLine)&&(Ut.undefined(t.startCharacter)||Ut.uinteger(t.startCharacter))&&(Ut.undefined(t.endCharacter)||Ut.uinteger(t.endCharacter))&&(Ut.undefined(t.kind)||Ut.string(t.kind))}}(De||(De={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Pe.is(t.location)&&Ut.string(t.message)}}(Re||(Re={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(Ve||(Ve={})),function(e){e.Unnecessary=1,e.Deprecated=2}(Be||(Be={})),function(e){e.is=function(e){var t=e;return null!=t&&Ut.string(t.href)}}(Ue||(Ue={})),function(e){e.create=function(e,t,n,r,o,i){var a={range:e,message:t};return Ut.defined(n)&&(a.severity=n),Ut.defined(r)&&(a.code=r),Ut.defined(o)&&(a.source=o),Ut.defined(i)&&(a.relatedInformation=i),a},e.is=function(e){var t,n=e;return Ut.defined(n)&&Me.is(n.range)&&Ut.string(n.message)&&(Ut.number(n.severity)||Ut.undefined(n.severity))&&(Ut.integer(n.code)||Ut.string(n.code)||Ut.undefined(n.code))&&(Ut.undefined(n.codeDescription)||Ut.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(Ut.string(n.source)||Ut.undefined(n.source))&&(Ut.undefined(n.relatedInformation)||Ut.typedArray(n.relatedInformation,Re.is))}}(We||(We={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={title:e,command:t};return Ut.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.title)&&Ut.string(t.command)}}(ze||(ze={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return Ut.objectLiteral(t)&&Ut.string(t.newText)&&Me.is(t.range)}}(He||(He={})),function(e){e.create=function(e,t,n){var r={label:e};return void 0!==t&&(r.needsConfirmation=t),void 0!==n&&(r.description=n),r},e.is=function(e){var t=e;return void 0!==t&&Ut.objectLiteral(t)&&Ut.string(t.label)&&(Ut.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(Ut.string(t.description)||void 0===t.description)}}(qe||(qe={})),function(e){e.is=function(e){return"string"==typeof e}}(Ge||(Ge={})),function(e){e.replace=function(e,t,n){return{range:e,newText:t,annotationId:n}},e.insert=function(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}},e.del=function(e,t){return{range:e,newText:"",annotationId:t}},e.is=function(e){var t=e;return He.is(t)&&(qe.is(t.annotationId)||Ge.is(t.annotationId))}}($e||($e={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Ut.defined(t)&&ut.is(t.textDocument)&&Array.isArray(t.edits)}}(Ke||(Ke={})),function(e){e.create=function(e,t,n){var r={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"create"===t.kind&&Ut.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Ut.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ut.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ge.is(t.annotationId))}}(Je||(Je={})),function(e){e.create=function(e,t,n,r){var o={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(o.options=n),void 0!==r&&(o.annotationId=r),o},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Ut.string(t.oldUri)&&Ut.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Ut.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Ut.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||Ge.is(t.annotationId))}}(Ye||(Ye={})),function(e){e.create=function(e,t,n){var r={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(r.options=t),void 0!==n&&(r.annotationId=n),r},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Ut.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Ut.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Ut.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||Ge.is(t.annotationId))}}(Xe||(Xe={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Ut.string(e.kind)?Je.is(e)||Ye.is(e)||Xe.is(e):Ke.is(e)})))}}(Qe||(Qe={}));var lt,ct,ut,ft,pt,dt,ht,vt,gt,mt,yt,bt,xt,wt,Ct,At,kt,Ot,St,Et,jt,Tt,Mt,Pt,It,Ft,Lt,Nt,_t,Dt,Rt=function(){function e(e,t){this.edits=e,this.changeAnnotations=t}return e.prototype.insert=function(e,t,n){var r,o;if(void 0===n?r=He.insert(e,t):Ge.is(n)?(o=n,r=$e.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=$e.insert(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.replace=function(e,t,n){var r,o;if(void 0===n?r=He.replace(e,t):Ge.is(n)?(o=n,r=$e.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=$e.replace(e,t,o)),this.edits.push(r),void 0!==o)return o},e.prototype.delete=function(e,t){var n,r;if(void 0===t?n=He.del(e):Ge.is(t)?(r=t,n=$e.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=$e.del(e,r)),this.edits.push(n),void 0!==r)return r},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(e){if(void 0===e)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Vt=function(){function e(e){this._annotations=void 0===e?Object.create(null):e,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(e,t){var n;if(Ge.is(e)?n=e:(n=this.nextId(),t=e),void 0!==this._annotations[n])throw new Error("Id "+n+" is already in use.");if(void 0===t)throw new Error("No annotation provided for id "+n);return this._annotations[n]=t,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();!function(){function e(e){var t=this;this._textEditChanges=Object.create(null),void 0!==e?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Vt(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Ke.is(e)){var n=new Rt(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new Rt(e.changes[n]);t._textEditChanges[n]=r}))):this._workspaceEdit={}}Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),void 0!==this._changeAnnotations&&(0===this._changeAnnotations.size?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(e){if(ut.is(e)){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version};if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:o=[]};this._workspaceEdit.documentChanges.push(n),r=new Rt(o,this._changeAnnotations),this._textEditChanges[t.uri]=r}return r}if(this.initChanges(),void 0===this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var o=[];this._workspaceEdit.changes[e]=o,r=new Rt(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new Vt,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,i;if(qe.is(t)||Ge.is(t)?r=t:n=t,void 0===r?o=Je.create(e,n):(i=Ge.is(r)?r:this._changeAnnotations.manage(r),o=Je.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i},e.prototype.renameFile=function(e,t,n,r){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var o,i,a;if(qe.is(n)||Ge.is(n)?o=n:r=n,void 0===o?i=Ye.create(e,t,r):(a=Ge.is(o)?o:this._changeAnnotations.manage(o),i=Ye.create(e,t,r,a)),this._workspaceEdit.documentChanges.push(i),void 0!==a)return a},e.prototype.deleteFile=function(e,t,n){if(this.initDocumentChanges(),void 0===this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var r,o,i;if(qe.is(t)||Ge.is(t)?r=t:n=t,void 0===r?o=Xe.create(e,n):(i=Ge.is(r)?r:this._changeAnnotations.manage(r),o=Xe.create(e,n,i)),this._workspaceEdit.documentChanges.push(o),void 0!==i)return i}}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)}}(lt||(lt={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)&&Ut.integer(t.version)}}(ct||(ct={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)&&(null===t.version||Ut.integer(t.version))}}(ut||(ut={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.string(t.uri)&&Ut.string(t.languageId)&&Ut.integer(t.version)&&Ut.string(t.text)}}(ft||(ft={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(pt||(pt={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(pt||(pt={})),function(e){e.is=function(e){var t=e;return Ut.objectLiteral(e)&&pt.is(t.kind)&&Ut.string(t.value)}}(dt||(dt={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(ht||(ht={})),function(e){e.PlainText=1,e.Snippet=2}(vt||(vt={})),function(e){e.Deprecated=1}(gt||(gt={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&Ut.string(t.newText)&&Me.is(t.insert)&&Me.is(t.replace)}}(mt||(mt={})),function(e){e.asIs=1,e.adjustIndentation=2}(yt||(yt={})),function(e){e.create=function(e){return{label:e}}}(bt||(bt={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(xt||(xt={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Ut.string(t)||Ut.objectLiteral(t)&&Ut.string(t.language)&&Ut.string(t.value)}}(wt||(wt={})),function(e){e.is=function(e){var t=e;return!!t&&Ut.objectLiteral(t)&&(dt.is(t.contents)||wt.is(t.contents)||Ut.typedArray(t.contents,wt.is))&&(void 0===e.range||Me.is(e.range))}}(Ct||(Ct={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(At||(At={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var o={label:e};return Ut.defined(t)&&(o.documentation=t),Ut.defined(n)?o.parameters=n:o.parameters=[],o}}(kt||(kt={})),function(e){e.Text=1,e.Read=2,e.Write=3}(Ot||(Ot={})),function(e){e.create=function(e,t){var n={range:e};return Ut.number(t)&&(n.kind=t),n}}(St||(St={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(Et||(Et={})),function(e){e.Deprecated=1}(jt||(jt={})),function(e){e.create=function(e,t,n,r,o){var i={name:e,kind:t,location:{uri:r,range:n}};return o&&(i.containerName=o),i}}(Tt||(Tt={})),function(e){e.create=function(e,t,n,r,o,i){var a={name:e,detail:t,kind:n,range:r,selectionRange:o};return void 0!==i&&(a.children=i),a},e.is=function(e){var t=e;return t&&Ut.string(t.name)&&Ut.number(t.kind)&&Me.is(t.range)&&Me.is(t.selectionRange)&&(void 0===t.detail||Ut.string(t.detail))&&(void 0===t.deprecated||Ut.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(Mt||(Mt={})),function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"}(Pt||(Pt={})),function(e){e.create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.typedArray(t.diagnostics,We.is)&&(void 0===t.only||Ut.typedArray(t.only,Ut.string))}}(It||(It={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):ze.is(t)?r.command=t:r.edit=t,o&&void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&Ut.string(t.title)&&(void 0===t.diagnostics||Ut.typedArray(t.diagnostics,We.is))&&(void 0===t.kind||Ut.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||ze.is(t.command))&&(void 0===t.isPreferred||Ut.boolean(t.isPreferred))&&(void 0===t.edit||Qe.is(t.edit))}}(Ft||(Ft={})),function(e){e.create=function(e,t){var n={range:e};return Ut.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.range)&&(Ut.undefined(t.command)||ze.is(t.command))}}(Lt||(Lt={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Ut.defined(t)&&Ut.uinteger(t.tabSize)&&Ut.boolean(t.insertSpaces)}}(Nt||(Nt={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return Ut.defined(t)&&Me.is(t.range)&&(Ut.undefined(t.target)||Ut.string(t.target))}}(_t||(_t={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&Me.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(Dt||(Dt={}));var Bt;!function(e){e.create=function(e,t,n,r){return new Wt(e,t,n,r)},e.is=function(e){var t=e;return!!(Ut.defined(t)&&Ut.string(t.uri)&&(Ut.undefined(t.languageId)||Ut.string(t.languageId))&&Ut.uinteger(t.lineCount)&&Ut.func(t.getText)&&Ut.func(t.positionAt)&&Ut.func(t.offsetAt))},e.applyEdits=function(e,t){for(var n=e.getText(),r=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,o=t.slice(0,r),i=t.slice(r);e(o,n),e(i,n);var a=0,s=0,l=0;for(;a<o.length&&s<i.length;){var c=n(o[a],i[s]);t[l++]=c<=0?o[a++]:i[s++]}for(;a<o.length;)t[l++]=o[a++];for(;s<i.length;)t[l++]=i[s++];return t}(t,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=n.length,i=r.length-1;i>=0;i--){var a=r[i],s=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=o))throw new Error("Overlapping edit");n=n.substring(0,s)+a.newText+n.substring(l,n.length),o=s}return n}}(Bt||(Bt={}));var Ut,Wt=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(void 0===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var o=t.charAt(r);n="\r"===o||"\n"===o,"\r"===o&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return Te.create(0,e);for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return Te.create(i,e-t[i])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.numberRange=function(e,n,r){return"[object Number]"===t.call(e)&&n<=e&&e<=r},e.integer=function(e){return"[object Number]"===t.call(e)&&-2147483648<=e&&e<=2147483647},e.uinteger=function(e){return"[object Number]"===t.call(e)&&0<=e&&e<=2147483647},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Ut||(Ut={}));var zt,Ht,qt,Gt=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(t,n){for(var r=0,o=t;r<o.length;r++){var i=o[r];if(e.isIncremental(i)){var a=Kt(i.range),s=this.offsetAt(a.start),l=this.offsetAt(a.end);this._content=this._content.substring(0,s)+i.text+this._content.substring(l,this._content.length);var c=Math.max(a.start.line,0),u=Math.max(a.end.line,0),f=this._lineOffsets,p=$t(i.text,!1,s);if(u-c===p.length)for(var d=0,h=p.length;d<h;d++)f[d+c+1]=p[d];else p.length<1e4?f.splice.apply(f,[c+1,u-c].concat(p)):this._lineOffsets=f=f.slice(0,c+1).concat(p,f.slice(u+1));var v=i.text.length-(l-s);if(0!==v)for(d=c+1+p.length,h=f.length;d<h;d++)f[d]=f[d]+v}else{if(!e.isFull(i))throw new Error("Unknown change event received");this._content=i.text,this._lineOffsets=void 0}}this._version=n},e.prototype.getLineOffsets=function(){return void 0===this._lineOffsets&&(this._lineOffsets=$t(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,r=t.length;if(0===r)return{line:0,character:e};for(;n<r;){var o=Math.floor((n+r)/2);t[o]>e?r=o:n=o+1}var i=n-1;return{line:i,character:e-t[i]}},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0!==t.range&&(void 0===t.rangeLength||"number"==typeof t.rangeLength)},e.isFull=function(e){var t=e;return null!=t&&"string"==typeof t.text&&void 0===t.range&&void 0===t.rangeLength},e}();function $t(e,t,n){void 0===n&&(n=0);for(var r=t?[n]:[],o=0;o<e.length;o++){var i=e.charCodeAt(o);13!==i&&10!==i||(13===i&&o+1<e.length&&10===e.charCodeAt(o+1)&&o++,r.push(n+o+1))}return r}function Kt(e){var t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Jt(e){var t=Kt(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new Gt(e,t,n,r)},e.update=function(e,t,n){if(e instanceof Gt)return e.update(t,n),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")},e.applyEdits=function(e,t){for(var n=e.getText(),r=0,o=[],i=0,a=function e(t,n){if(t.length<=1)return t;var r=t.length/2|0,o=t.slice(0,r),i=t.slice(r);e(o,n),e(i,n);var a=0,s=0,l=0;for(;a<o.length&&s<i.length;){var c=n(o[a],i[s]);t[l++]=c<=0?o[a++]:i[s++]}for(;a<o.length;)t[l++]=o[a++];for(;s<i.length;)t[l++]=i[s++];return t}(t.map(Jt),(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n}));i<a.length;i++){var s=a[i],l=e.offsetAt(s.range.start);if(l<r)throw new Error("Overlapping edit");l>r&&o.push(n.substring(r,l)),s.newText.length&&o.push(s.newText),r=e.offsetAt(s.range.end)}return o.push(n.substr(r)),o.join("")}}(zt||(zt={})),function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"}(Ht||(Ht={})),(qt||(qt={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[pt.Markdown,pt.PlainText],commitCharactersSupport:!0}}}};var Yt,Xt,Qt=(Yt=function(e,t){return(Yt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}Yt(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Zt={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},en=function(){function e(e,t,n){this.offset=t,this.length=n,this.parent=e}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),tn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r.value=null,r}return Qt(t,e),t}(en),nn=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.type="boolean",o.value=n,o}return Qt(t,e),t}(en),rn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return Qt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(en),on=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="number",r.isInteger=!0,r.value=Number.NaN,r}return Qt(t,e),t}(en),an=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.type="string",o.value="",o}return Qt(t,e),t}(en),sn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="property",r.colonOffset=-1,r}return Qt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(en),ln=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return Qt(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(en);function cn(e){return st(e)?e?{}:{not:{}}:e}!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(Xt||(Xt={}));var un=function(){function e(e,t){void 0===e&&(e=-1),void 0===t&&(t=null),this.focusOffset=e,this.exclude=t,this.schemas=[]}return e.prototype.add=function(e){this.schemas.push(e)},e.prototype.merge=function(e){var t;(t=this.schemas).push.apply(t,e.schemas)},e.prototype.include=function(e){return(-1===this.focusOffset||vn(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),fn=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.add=function(e){},e.prototype.merge=function(e){},e.prototype.include=function(e){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),pn=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this.merge(r)}},e.prototype.merge=function(e){this.problems=this.problems.concat(e.problems)},e.prototype.mergeEnumValues=function(e){if(!this.enumValueMatch&&!e.enumValueMatch&&this.enumValues&&e.enumValues){this.enumValues=this.enumValues.concat(e.enumValues);for(var t=0,n=this.problems;t<n.length;t++){var r=n[t];r.code===Ht.EnumValueMismatch&&(r.message="Value is not accepted. Valid values: "+this.enumValues.map((function(e){return JSON.stringify(e)})).join(", ")+".")}}},e.prototype.mergePropertyMatch=function(e){this.merge(e),this.propertiesMatches++,(e.enumValueMatch||!e.hasProblems()&&e.propertiesMatches)&&this.propertiesValueMatches++,e.enumValueMatch&&e.enumValues&&1===e.enumValues.length&&this.primaryValueMatches++},e.prototype.compare=function(e){var t=this.hasProblems();return t!==e.hasProblems()?t?-1:1:this.enumValueMatch!==e.enumValueMatch?e.enumValueMatch?-1:1:this.primaryValueMatches!==e.primaryValueMatches?this.primaryValueMatches-e.primaryValueMatches:this.propertiesValueMatches!==e.propertiesValueMatches?this.propertiesValueMatches-e.propertiesValueMatches:this.propertiesMatches-e.propertiesMatches},e}();function dn(e){return rt(e)}function hn(e){return nt(e)}function vn(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var gn=function(){function e(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=[]),this.root=e,this.syntaxErrors=t,this.comments=n}return e.prototype.getNodeFromOffset=function(e,t){if(void 0===t&&(t=!1),this.root)return tt(this.root,e,t)},e.prototype.visit=function(e){if(this.root){var t=function(n){var r=e(n),o=n.children;if(Array.isArray(o))for(var i=0;i<o.length&&r;i++)r=t(o[i]);return r};t(this.root)}},e.prototype.validate=function(e,t){if(this.root&&t){var n=new pn;return mn(this.root,t,n,fn.instance),n.problems.map((function(t){var n=Me.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return We.create(n,t.message,t.severity,t.code)}))}return null},e.prototype.getMatchingSchemas=function(e,t,n){void 0===t&&(t=-1),void 0===n&&(n=null);var r=new un(t,n);return this.root&&e&&mn(this.root,e,new pn,r),r.schemas},e}();function mn(e,t,n,r){if(e&&r.include(e)){switch(e.type){case"object":!function(e,t,n,r){for(var o=Object.create(null),i=[],a=0,s=e.properties;a<s.length;a++){var l=(y=s[a]).keyNode.value;o[l]=y.valueNode,i.push(l)}if(Array.isArray(t.required))for(var c=0,u=t.required;c<u.length;c++){var f=u[c];if(!o[f]){var p=e.parent&&"property"===e.parent.type&&e.parent.keyNode,d=p?{offset:p.offset,length:p.length}:{offset:e.offset,length:1};n.problems.push({location:d,severity:Ve.Warning,message:'Missing property "'+f+'".'})}}var h=function(e){for(var t=i.indexOf(e);t>=0;)i.splice(t,1),t=i.indexOf(e)};if(t.properties)for(var v=0,g=Object.keys(t.properties);v<g.length;v++){f=g[v];h(f);var m=t.properties[f];if(M=o[f])if(st(m))if(m)n.propertiesMatches++,n.propertiesValueMatches++;else{var y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:Ve.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{var b=new pn;mn(M,m,b,r),n.mergePropertyMatch(b)}}if(t.patternProperties)for(var x=0,w=Object.keys(t.patternProperties);x<w.length;x++)for(var C=w[x],A=new RegExp(C),k=0,O=i.slice(0);k<O.length;k++){f=O[k];if(A.test(f))if(h(f),M=o[f])if(st(m=t.patternProperties[C]))if(m)n.propertiesMatches++,n.propertiesValueMatches++;else{y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:Ve.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{b=new pn;mn(M,m,b,r),n.mergePropertyMatch(b)}}if("object"==typeof t.additionalProperties)for(var S=0,E=i;S<E.length;S++){f=E[S];if(M=o[f]){b=new pn;mn(M,t.additionalProperties,b,r),n.mergePropertyMatch(b)}}else if(!1===t.additionalProperties&&i.length>0)for(var j=0,T=i;j<T.length;j++){var M;f=T[j];if(M=o[f]){y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:Ve.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}}it(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Object has more properties than limit of "+t.maxProperties+"."});it(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Object has fewer properties than the required number of "+t.minProperties});if(t.dependencies)for(var P=0,I=Object.keys(t.dependencies);P<I.length;P++){l=I[P];if(o[l]){var F=t.dependencies[l];if(Array.isArray(F))for(var L=0,N=F;L<N.length;L++){var _=N[L];o[_]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Object is missing property "+_+" required by property {$key}."})}else if(m=cn(F)){b=new pn;mn(e,m,b,r),n.mergePropertyMatch(b)}}}var D=cn(t.propertyNames);if(D)for(var R=0,V=e.properties;R<V.length;R++){var B=V[R];(l=B.keyNode)&&mn(l,D,n,fn.instance)}}(e,t,n,r);break;case"array":!function(e,t,n,r){if(Array.isArray(t.items)){for(var o=t.items,i=0;i<o.length;i++){var a=cn(o[i]),s=new pn;(p=e.items[i])?(mn(p,a,s,r),n.mergePropertyMatch(s)):e.items.length>=o.length&&n.propertiesValueMatches++}if(e.items.length>o.length)if("object"==typeof t.additionalItems)for(var l=o.length;l<e.items.length;l++){s=new pn;mn(e.items[l],t.additionalItems,s,r),n.mergePropertyMatch(s)}else!1===t.additionalItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has too many items according to schema. Expected "+o.length+" or fewer."})}else{var c=cn(t.items);if(c)for(var u=0,f=e.items;u<f.length;u++){var p=f[u];s=new pn;mn(p,c,s,r),n.mergePropertyMatch(s)}}var d=cn(t.contains);if(d){e.items.some((function(e){var t=new pn;return mn(e,d,t,fn.instance),!t.hasProblems()}))||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.errorMessage||"Array does not contain required item."})}it(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has too few items. Expected "+t.minItems+" or more."});it(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has too many items. Expected "+t.maxItems+" or fewer."});if(!0===t.uniqueItems){var h=dn(e);h.some((function(e,t){return t!==h.lastIndexOf(e)}))&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Array has duplicate items."})}}(e,t,n,r);break;case"string":!function(e,t,n,r){it(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"String is shorter than the minimum length of "+t.minLength+"."});it(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"String is longer than the maximum length of "+t.maxLength+"."});if(o=t.pattern,"string"==typeof o){new RegExp(t.pattern).test(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.patternErrorMessage||t.errorMessage||'String does not match the pattern of "'+t.pattern+'".'})}var o;if(t.format)switch(t.format){case"uri":case"uri-reference":var i=void 0;if(e.value){var a=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(e.value);a?a[2]||"uri"!==t.format||(i="URI with a scheme is expected."):i="URI is expected."}else i="URI expected.";i&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.patternErrorMessage||t.errorMessage||"String is not a URI: "+i});break;case"color-hex":case"date-time":case"date":case"time":case"email":var s=Zt[t.format];e.value&&s.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.patternErrorMessage||t.errorMessage||s.errorMessage})}}(e,t,n);break;case"number":!function(e,t,n,r){var o=e.value;it(t.multipleOf)&&o%t.multipleOf!=0&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is not divisible by "+t.multipleOf+"."});function i(e,t){return it(t)?t:st(t)&&t?e:void 0}function a(e,t){if(!st(t)||!t)return e}var s=i(t.minimum,t.exclusiveMinimum);it(s)&&o<=s&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is below the exclusive minimum of "+s+"."});var l=i(t.maximum,t.exclusiveMaximum);it(l)&&o>=l&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is above the exclusive maximum of "+l+"."});var c=a(t.minimum,t.exclusiveMinimum);it(c)&&o<c&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is below the minimum of "+c+"."});var u=a(t.maximum,t.exclusiveMaximum);it(u)&&o>u&&n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Value is above the maximum of "+u+"."})}(e,t,n);break;case"property":return mn(e.valueNode,t,n,r)}!function(){function o(n){return e.type===n||"integer"===n&&"number"===e.type&&e.isInteger||t.nullable&&null===e.value}Array.isArray(t.type)?t.type.some(o)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.errorMessage||"Incorrect type. Expected one of "+t.type.join(", ")+"."}):t.type&&(o(t.type)||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:t.errorMessage||'Incorrect type. Expected "'+t.type+'".'}));if(Array.isArray(t.allOf))for(var i=0,a=t.allOf;i<a.length;i++){var s=a[i];mn(e,cn(s),n,r)}var l=cn(t.not);if(l){var c=new pn,u=r.newSub();mn(e,l,c,u),c.hasProblems()||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,message:"Matches a schema that is not allowed."});for(var f=0,p=u.schemas;f<p.length;f++){var d=p[f];d.inverted=!d.inverted,r.add(d)}}var h=function(t,o){for(var i=[],a=null,s=0,l=t;s<l.length;s++){var c=cn(l[s]),u=new pn,f=r.newSub();if(mn(e,c,u,f),u.hasProblems()||i.push(c),a)if(o||u.hasProblems()||a.validationResult.hasProblems()){var p=u.compare(a.validationResult);p>0?a={schema:c,validationResult:u,matchingSchemas:f}:0===p&&(a.matchingSchemas.merge(f),a.validationResult.mergeEnumValues(u))}else a.matchingSchemas.merge(f),a.validationResult.propertiesMatches+=u.propertiesMatches,a.validationResult.propertiesValueMatches+=u.propertiesValueMatches;else a={schema:c,validationResult:u,matchingSchemas:f}}return i.length>1&&o&&n.problems.push({location:{offset:e.offset,length:1},severity:Ve.Warning,message:"Matches multiple schemas when only one must validate."}),null!==a&&(n.merge(a.validationResult),n.propertiesMatches+=a.validationResult.propertiesMatches,n.propertiesValueMatches+=a.validationResult.propertiesValueMatches,r.merge(a.matchingSchemas)),i.length};Array.isArray(t.anyOf)&&h(t.anyOf,!1);Array.isArray(t.oneOf)&&h(t.oneOf,!0);var v=function(t){var o=new pn,i=r.newSub();mn(e,cn(t),o,i),n.merge(o),n.propertiesMatches+=o.propertiesMatches,n.propertiesValueMatches+=o.propertiesValueMatches,r.merge(i)},g=cn(t.if);g&&function(t,n,o){var i=cn(t),a=new pn,s=r.newSub();mn(e,i,a,s),r.merge(s),a.hasProblems()?o&&v(o):n&&v(n)}(g,cn(t.then),cn(t.else));if(Array.isArray(t.enum)){for(var m=dn(e),y=!1,b=0,x=t.enum;b<x.length;b++){var w=x[b];if(ot(m,w)){y=!0;break}}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,code:Ht.EnumValueMismatch,message:t.errorMessage||"Value is not accepted. Valid values: "+t.enum.map((function(e){return JSON.stringify(e)})).join(", ")+"."})}if(at(t.const)){ot(m=dn(e),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:e.offset,length:e.length},severity:Ve.Warning,code:Ht.EnumValueMismatch,message:t.errorMessage||"Value must be "+JSON.stringify(t.const)+"."}),n.enumValueMatch=!1),n.enumValues=[t.const]}t.deprecationMessage&&e.parent&&n.problems.push({location:{offset:e.parent.offset,length:e.parent.length},severity:Ve.Warning,message:t.deprecationMessage})}(),r.add({node:e,schema:t})}}function yn(e,t){var n=[],r=-1,o=e.getText(),i=Ze(o,!1),a=t&&t.collectComments?[]:void 0;function s(){for(;;){var t=i.scan();switch(u(),t){case 12:case 13:Array.isArray(a)&&a.push(Me.create(e.positionAt(i.getTokenOffset()),e.positionAt(i.getTokenOffset()+i.getTokenLength())));break;case 15:case 14:break;default:return t}}}function l(t,o,i,a,s){if(void 0===s&&(s=Ve.Error),0===n.length||i!==r){var l=Me.create(e.positionAt(i),e.positionAt(a));n.push(We.create(l,t,s,o,e.languageId)),r=i}}function c(e,t,n,r,a){void 0===n&&(n=null),void 0===r&&(r=[]),void 0===a&&(a=[]);var c=i.getTokenOffset(),u=i.getTokenOffset()+i.getTokenLength();if(c===u&&c>0){for(c--;c>0&&/\s/.test(o.charAt(c));)c--;u=c+1}if(l(e,t,c,u),n&&f(n,!1),r.length+a.length>0)for(var p=i.getToken();17!==p;){if(-1!==r.indexOf(p)){s();break}if(-1!==a.indexOf(p))break;p=s()}return n}function u(){switch(i.getTokenError()){case 4:return c("Invalid unicode sequence in string.",Ht.InvalidUnicode),!0;case 5:return c("Invalid escape character in string.",Ht.InvalidEscapeCharacter),!0;case 3:return c("Unexpected end of number.",Ht.UnexpectedEndOfNumber),!0;case 1:return c("Unexpected end of comment.",Ht.UnexpectedEndOfComment),!0;case 2:return c("Unexpected end of string.",Ht.UnexpectedEndOfString),!0;case 6:return c("Invalid characters in string. Control characters must be escaped.",Ht.InvalidCharacter),!0}return!1}function f(e,t){return e.length=i.getTokenOffset()+i.getTokenLength()-e.offset,t&&s(),e}function p(t,n){var r=new sn(t,i.getTokenOffset()),o=d(r);if(!o){if(16!==i.getToken())return null;c("Property keys must be doublequoted",Ht.Undefined);var a=new an(r,i.getTokenOffset(),i.getTokenLength());a.value=i.getTokenValue(),o=a,s()}r.keyNode=o;var u=n[o.value];if(u?(l("Duplicate object key",Ht.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,Ve.Warning),"object"==typeof u&&l("DuplicateKeyWarning",Ht.DuplicateKey,u.keyNode.offset,u.keyNode.offset+u.keyNode.length,Ve.Warning),n[o.value]=!0):n[o.value]=r,6===i.getToken())r.colonOffset=i.getTokenOffset(),s();else if(c("Colon expected",Ht.ColonExpected),10===i.getToken()&&e.positionAt(o.offset+o.length).line<e.positionAt(i.getTokenOffset()).line)return r.length=o.length,r;var f=h(r,o.value);return f?(r.valueNode=f,r.length=f.offset+f.length-r.offset,r):c("Value expected",Ht.ValueExpected,r,[],[2,5])}function d(e){if(10!==i.getToken())return null;var t=new an(e,i.getTokenOffset());return t.value=i.getTokenValue(),f(t,!0)}function h(e,t){return function(e){if(3!==i.getToken())return null;var t=new rn(e,i.getTokenOffset());s();for(var n=0,r=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||c("Value expected",Ht.ValueExpected);var o=i.getTokenOffset();if(s(),4===i.getToken()){r&&l("Trailing comma",Ht.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",Ht.CommaExpected);var a=h(t,n++);a?t.items.push(a):c("Value expected",Ht.ValueExpected,null,[],[4,5]),r=!0}return 4!==i.getToken()?c("Expected comma or closing bracket",Ht.CommaOrCloseBacketExpected,t):f(t,!0)}(e)||function(e){if(1!==i.getToken())return null;var t=new ln(e,i.getTokenOffset()),n=Object.create(null);s();for(var r=!1;2!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||c("Property expected",Ht.PropertyExpected);var o=i.getTokenOffset();if(s(),2===i.getToken()){r&&l("Trailing comma",Ht.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",Ht.CommaExpected);var a=p(t,n);a?t.properties.push(a):c("Property expected",Ht.PropertyExpected,null,[],[2,5]),r=!0}return 2!==i.getToken()?c("Expected comma or closing brace",Ht.CommaOrCloseBraceExpected,t):f(t,!0)}(e)||d(e)||function(e){if(11!==i.getToken())return null;var t=new on(e,i.getTokenOffset());if(0===i.getTokenError()){var n=i.getTokenValue();try{var r=JSON.parse(n);if(!it(r))return c("Invalid number format.",Ht.Undefined,t);t.value=r}catch(e){return c("Invalid number format.",Ht.Undefined,t)}t.isInteger=-1===n.indexOf(".")}return f(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return f(new tn(e,i.getTokenOffset()),!0);case 8:return f(new nn(e,!0,i.getTokenOffset()),!0);case 9:return f(new nn(e,!1,i.getTokenOffset()),!0);default:return null}}(e)}var v=null;return 17!==s()&&((v=h(null))?17!==i.getToken()&&c("End of file expected.",Ht.Undefined):c("Expected a JSON object, array or literal.",Ht.Undefined)),new gn(v,n,a)}function bn(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}var xn=[",","}","]"],wn=[":"],Cn=function(){function e(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=Promise),void 0===r&&(r={}),this.schemaService=e,this.contributions=t,this.promiseConstructor=n,this.clientCapabilities=r,this.templateVarIdCounter=0}return e.prototype.doResolve=function(e){for(var t=this.contributions.length-1;t>=0;t--)if(this.contributions[t].resolveCompletion){var n=this.contributions[t].resolveCompletion(e);if(n)return n}return this.promiseConstructor.resolve(e)},e.prototype.doComplete=function(e,t,n){var r=this,o={items:[],isIncomplete:!1},i=e.getText(),a=e.offsetAt(t),s=n.getNodeFromOffset(a,!0);if(this.isInComment(e,s?s.offset:0,a))return Promise.resolve(o);if(s&&a===s.offset+s.length&&a>0){var l=i[a-1];("object"===s.type&&"}"===l||"array"===s.type&&"]"===l)&&(s=s.parent)}var c=this.getCurrentWord(e,a),u=null;if(!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type){var f=a-c.length;f>0&&'"'===i[f-1]&&f--,u=Me.create(e.positionAt(f),t)}else u=Me.create(e.positionAt(s.offset),e.positionAt(s.offset+s.length));var p=this.doesSupportsCommitCharacters(),d={},h={add:function(e){var t=d[e.label];t?t.documentation||(t.documentation=e.documentation):(d[e.label]=e,u&&(e.textEdit=He.replace(u,e.insertText)),p&&(e.commitCharacters=e.kind===ht.Property?wn:xn),o.items.push(e))},setAsIncomplete:function(){o.isIncomplete=!0},error:function(e){console.error(e)},log:function(e){console.log(e)},getNumberOfProposals:function(){return o.items.length}};return this.schemaService.getSchemaForResource(e.uri,n).then((function(t){var l=[],f=!0,p="",v=null;if(s&&"string"===s.type){var g=s.parent;g&&"property"===g.type&&g.keyNode===s&&(f=!g.valueNode,v=g,p=i.substr(s.offset+1,s.length-2),g&&(s=g.parent))}if(s&&"object"===s.type){if(s.offset===a)return o;s.properties.forEach((function(e){v&&v===e||(d[e.keyNode.value]=bt.create("__"))}));var m="";f&&(m=r.evaluateSeparatorAfter(e,e.offsetAt(u.end))),t?r.getPropertyCompletions(t,n,s,f,m,h):r.getSchemaLessPropertyCompletions(n,s,p,h);var y=hn(s);r.contributions.forEach((function(t){var n=t.collectPropertyCompletions(e.uri,y,c,f,""===m,h);n&&l.push(n)})),!t&&c.length>0&&'"'!==i.charAt(a-c.length-1)&&(h.add({kind:ht.Property,label:r.getLabelForValue(c),insertText:r.getInsertTextForProperty(c,null,!1,m),insertTextFormat:vt.Snippet,documentation:""}),h.setAsIncomplete())}var b={};return t?r.getValueCompletions(t,n,s,a,e,h,b):r.getSchemaLessValueCompletions(n,s,a,e,h),r.contributions.length>0&&r.getContributedValueCompletions(n,s,a,e,h,l),r.promiseConstructor.all(l).then((function(){if(0===h.getNumberOfProposals()){var t=a;!s||"string"!==s.type&&"number"!==s.type&&"boolean"!==s.type&&"null"!==s.type||(t=s.offset+s.length);var n=r.evaluateSeparatorAfter(e,t);r.addFillerValueCompletions(b,n,h)}return o}))}))},e.prototype.getPropertyCompletions=function(e,t,n,r,o,i){var a=this;t.getMatchingSchemas(e.schema,n.offset).forEach((function(e){if(e.node===n&&!e.inverted){var t=e.schema.properties;t&&Object.keys(t).forEach((function(e){var n=t[e],s=!1;if("object"==typeof n&&n.allOf)for(var l=0,c=n.allOf;l<c.length;l++){if(c[l].readOnly){s=!0;break}}if("object"==typeof n&&!n.deprecationMessage&&!n.doNotSuggest&&!s){var u={kind:ht.Property,label:a.sanitizeLabel(e),insertText:a.getInsertTextForProperty(e,n,r,o),insertTextFormat:vt.Snippet,filterText:a.getFilterTextForValue(e),documentation:a.fromMarkup(n.markdownDescription)||n.description||""};bn(u.insertText,"$1"+o)&&(u.command={title:"Suggest",command:"editor.action.triggerSuggest"}),i.add(u)}}))}}))},e.prototype.getSchemaLessPropertyCompletions=function(e,t,n,r){var o=this,i=function(e){e.properties.forEach((function(e){var t=e.keyNode.value;r.add({kind:ht.Property,label:o.sanitizeLabel(t),insertText:o.getInsertTextForValue(t,""),insertTextFormat:vt.Snippet,filterText:o.getFilterTextForValue(t),documentation:""})}))};if(t.parent)if("property"===t.parent.type){var a=t.parent.keyNode.value;e.visit((function(e){return"property"===e.type&&e!==t.parent&&e.keyNode.value===a&&e.valueNode&&"object"===e.valueNode.type&&i(e.valueNode),!0}))}else"array"===t.parent.type&&t.parent.items.forEach((function(e){"object"===e.type&&e!==t&&i(e)}));else"object"===t.type&&r.add({kind:ht.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:vt.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(e,t,n,r,o){var i=this,a=n;if(!t||"string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(a=t.offset+t.length,t=t.parent),!t)return o.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:vt.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:vt.Snippet,documentation:""});var s=this.evaluateSeparatorAfter(r,a),l=function(e){vn(e.parent,n,!0)||o.add({kind:i.getSuggestionKind(e.type),label:i.getLabelTextForMatchingNode(e,r),insertText:i.getInsertTextForMatchingNode(e,r,s),insertTextFormat:vt.Snippet,documentation:""}),"boolean"===e.type&&i.addBooleanValueCompletion(!e.value,s,o)};if("property"===t.type&&n>t.colonOffset){var c=t.valueNode;if(c&&(n>c.offset+c.length||"object"===c.type||"array"===c.type))return;var u=t.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===u&&e.valueNode&&l(e.valueNode),!0})),"$schema"===u&&t.parent&&!t.parent.parent&&this.addDollarSchemaCompletions(s,o)}if("array"===t.type)if(t.parent&&"property"===t.parent.type){var f=t.parent.keyNode.value;e.visit((function(e){return"property"===e.type&&e.keyNode.value===f&&e.valueNode&&"array"===e.valueNode.type&&e.valueNode.items.forEach(l),!0}))}else t.items.forEach(l)},e.prototype.getValueCompletions=function(e,t,n,r,o,i,a){var s=this,l=r,c=null,u=null;if(!n||"string"!==n.type&&"number"!==n.type&&"boolean"!==n.type&&"null"!==n.type||(l=n.offset+n.length,u=n,n=n.parent),n){if("property"===n.type&&r>n.colonOffset){var f=n.valueNode;if(f&&r>f.offset+f.length)return;c=n.keyNode.value,n=n.parent}if(n&&(null!==c||"array"===n.type)){var p=this.evaluateSeparatorAfter(o,l);t.getMatchingSchemas(e.schema,n.offset,u).forEach((function(e){if(e.node===n&&!e.inverted&&e.schema){if("array"===n.type&&e.schema.items)if(Array.isArray(e.schema.items)){var t=s.findItemAtOffset(n,o,r);t<e.schema.items.length&&s.addSchemaValueCompletions(e.schema.items[t],p,i,a)}else s.addSchemaValueCompletions(e.schema.items,p,i,a);if(e.schema.properties){var l=e.schema.properties[c];l&&s.addSchemaValueCompletions(l,p,i,a)}}})),"$schema"!==c||n.parent||this.addDollarSchemaCompletions(p,i),a.boolean&&(this.addBooleanValueCompletion(!0,p,i),this.addBooleanValueCompletion(!1,p,i)),a.null&&this.addNullValueCompletion(p,i)}}else this.addSchemaValueCompletions(e.schema,"",i,a)},e.prototype.getContributedValueCompletions=function(e,t,n,r,o,i){if(t){if("string"!==t.type&&"number"!==t.type&&"boolean"!==t.type&&"null"!==t.type||(t=t.parent),"property"===t.type&&n>t.colonOffset){var a=t.keyNode.value,s=t.valueNode;if(!s||n<=s.offset+s.length){var l=hn(t.parent);this.contributions.forEach((function(e){var t=e.collectValueCompletions(r.uri,l,a,o);t&&i.push(t)}))}}}else this.contributions.forEach((function(e){var t=e.collectDefaultCompletions(r.uri,o);t&&i.push(t)}))},e.prototype.addSchemaValueCompletions=function(e,t,n,r){var o=this;"object"==typeof e&&(this.addEnumValueCompletions(e,t,n),this.addDefaultValueCompletions(e,t,n),this.collectTypes(e,r),Array.isArray(e.allOf)&&e.allOf.forEach((function(e){return o.addSchemaValueCompletions(e,t,n,r)})),Array.isArray(e.anyOf)&&e.anyOf.forEach((function(e){return o.addSchemaValueCompletions(e,t,n,r)})),Array.isArray(e.oneOf)&&e.oneOf.forEach((function(e){return o.addSchemaValueCompletions(e,t,n,r)})))},e.prototype.addDefaultValueCompletions=function(e,t,n,r){var o=this;void 0===r&&(r=0);var i=!1;if(at(e.default)){for(var a=e.type,s=e.default,l=r;l>0;l--)s=[s],a="array";n.add({kind:this.getSuggestionKind(a),label:this.getLabelForValue(s),insertText:this.getInsertTextForValue(s,t),insertTextFormat:vt.Snippet}),i=!0}Array.isArray(e.examples)&&e.examples.forEach((function(a){for(var s=e.type,l=a,c=r;c>0;c--)l=[l],s="array";n.add({kind:o.getSuggestionKind(s),label:o.getLabelForValue(l),insertText:o.getInsertTextForValue(l,t),insertTextFormat:vt.Snippet}),i=!0})),Array.isArray(e.defaultSnippets)&&e.defaultSnippets.forEach((function(a){var s,l,c=e.type,u=a.body,f=a.label;if(at(u)){e.type;for(var p=r;p>0;p--)u=[u],"array";s=o.getInsertTextForSnippetValue(u,t),l=o.getFilterTextForSnippetValue(u),f=f||o.getLabelForSnippetValue(u)}else if("string"==typeof a.bodyText){var d="",h="",v="";for(p=r;p>0;p--)d=d+v+"[\n",h=h+"\n"+v+"]",v+="\t",c="array";s=d+v+a.bodyText.split("\n").join("\n"+v)+h+t,f=f||o.sanitizeLabel(s),l=s.replace(/[\n]/g,"")}n.add({kind:o.getSuggestionKind(c),label:f,documentation:o.fromMarkup(a.markdownDescription)||a.description,insertText:s,insertTextFormat:vt.Snippet,filterText:l}),i=!0})),i||"object"!=typeof e.items||Array.isArray(e.items)||this.addDefaultValueCompletions(e.items,t,n,r+1)},e.prototype.addEnumValueCompletions=function(e,t,n){if(at(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:vt.Snippet,documentation:this.fromMarkup(e.markdownDescription)||e.description}),Array.isArray(e.enum))for(var r=0,o=e.enum.length;r<o;r++){var i=e.enum[r],a=this.fromMarkup(e.markdownDescription)||e.description;e.markdownEnumDescriptions&&r<e.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?a=this.fromMarkup(e.markdownEnumDescriptions[r]):e.enumDescriptions&&r<e.enumDescriptions.length&&(a=e.enumDescriptions[r]),n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(i),insertText:this.getInsertTextForValue(i,t),insertTextFormat:vt.Snippet,documentation:a})}},e.prototype.collectTypes=function(e,t){if(!Array.isArray(e.enum)&&!at(e.const)){var n=e.type;Array.isArray(n)?n.forEach((function(e){return t[e]=!0})):t[n]=!0}},e.prototype.addFillerValueCompletions=function(e,t,n){e.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},t),insertTextFormat:vt.Snippet,detail:"New object",documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:vt.Snippet,detail:"New array",documentation:""})},e.prototype.addBooleanValueCompletion=function(e,t,n){n.add({kind:this.getSuggestionKind("boolean"),label:e?"true":"false",insertText:this.getInsertTextForValue(e,t),insertTextFormat:vt.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:vt.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(e,t){var n=this;this.schemaService.getRegisteredSchemaIds((function(e){return"http"===e||"https"===e})).forEach((function(r){return t.add({kind:ht.Module,label:n.getLabelForValue(r),filterText:n.getFilterTextForValue(r),insertText:n.getInsertTextForValue(r,e),insertTextFormat:vt.Snippet,documentation:""})}))},e.prototype.sanitizeLabel=function(e){return(e=e.replace(/[\n]/g,"↵")).length>57&&(e=e.substr(0,57).trim()+"..."),e},e.prototype.getLabelForValue=function(e){return this.sanitizeLabel(JSON.stringify(e))},e.prototype.getFilterTextForValue=function(e){return JSON.stringify(e)},e.prototype.getFilterTextForSnippetValue=function(e){return JSON.stringify(e).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(e){var t=JSON.stringify(e);return t=t.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(t)},e.prototype.getInsertTextForPlainText=function(e){return e.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(e,t){var n=JSON.stringify(e,null,"\t");return"{}"===n?"{$1}"+t:"[]"===n?"[$1]"+t:this.getInsertTextForPlainText(n+t)},e.prototype.getInsertTextForSnippetValue=function(e,t){return function e(t,n,r){if(null!==t&&"object"==typeof t){var o=n+"\t";if(Array.isArray(t)){if(0===t.length)return"[]";for(var i="[\n",a=0;a<t.length;a++)i+=o+e(t[a],o,r),a<t.length-1&&(i+=","),i+="\n";return i+=n+"]"}var s=Object.keys(t);if(0===s.length)return"{}";for(i="{\n",a=0;a<s.length;a++){var l=s[a];i+=o+JSON.stringify(l)+": "+e(t[l],o,r),a<s.length-1&&(i+=","),i+="\n"}return i+=n+"}"}return r(t)}(e,"",(function(e){return"string"==typeof e&&"^"===e[0]?e.substr(1):JSON.stringify(e)}))+t},e.prototype.getInsertTextForGuessedValue=function(e,t){switch(typeof e){case"object":return null===e?"${1:null}"+t:this.getInsertTextForValue(e,t);case"string":var n=JSON.stringify(e);return n=n.substr(1,n.length-2),'"${1:'+(n=this.getInsertTextForPlainText(n))+'}"'+t;case"number":case"boolean":return"${1:"+JSON.stringify(e)+"}"+t}return this.getInsertTextForValue(e,t)},e.prototype.getSuggestionKind=function(e){if(Array.isArray(e)){var t=e;e=t.length>0?t[0]:null}if(!e)return ht.Value;switch(e){case"string":return ht.Value;case"object":return ht.Module;case"property":return ht.Property;default:return ht.Value}},e.prototype.getLabelTextForMatchingNode=function(e,t){switch(e.type){case"array":return"[]";case"object":return"{}";default:return t.getText().substr(e.offset,e.length)}},e.prototype.getInsertTextForMatchingNode=function(e,t,n){switch(e.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var r=t.getText().substr(e.offset,e.length)+n;return this.getInsertTextForPlainText(r)}},e.prototype.getInsertTextForProperty=function(e,t,n,r){var o=this.getInsertTextForValue(e,"");if(!n)return o;var i,a=o+": ",s=0;if(t){if(Array.isArray(t.defaultSnippets)){if(1===t.defaultSnippets.length){var l=t.defaultSnippets[0].body;at(l)&&(i=this.getInsertTextForSnippetValue(l,""))}s+=t.defaultSnippets.length}if(t.enum&&(i||1!==t.enum.length||(i=this.getInsertTextForGuessedValue(t.enum[0],"")),s+=t.enum.length),at(t.default)&&(i||(i=this.getInsertTextForGuessedValue(t.default,"")),s++),0===s){var c=Array.isArray(t.type)?t.type[0]:t.type;switch(c||(t.properties?c="object":t.items&&(c="array")),c){case"boolean":i="$1";break;case"string":i='"$1"';break;case"object":i="{$1}";break;case"array":i="[$1]";break;case"number":case"integer":i="${1:0}";break;case"null":i="${1:null}";break;default:return o}}}return(!i||s>1)&&(i="$1"),a+i+r},e.prototype.getCurrentWord=function(e,t){for(var n=t-1,r=e.getText();n>=0&&-1===' \t\n\r\v":{[,]}'.indexOf(r.charAt(n));)n--;return r.substring(n+1,t)},e.prototype.evaluateSeparatorAfter=function(e,t){var n=Ze(e.getText(),!0);switch(n.setPosition(t),n.scan()){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(e,t,n){for(var r=Ze(t.getText(),!0),o=e.items,i=o.length-1;i>=0;i--){var a=o[i];if(n>a.offset+a.length)return r.setPosition(a.offset+a.length),5===r.scan()&&n>=r.getTokenOffset()+r.getTokenLength()?i+1:i;if(n>=a.offset)return i}return 0},e.prototype.isInComment=function(e,t,n){var r=Ze(e.getText(),!1);r.setPosition(t);for(var o=r.scan();17!==o&&r.getTokenOffset()+r.getTokenLength()<n;)o=r.scan();return(12===o||13===o)&&r.getTokenOffset()<=n},e.prototype.fromMarkup=function(e){if(e&&this.doesSupportMarkdown())return{kind:pt.Markdown,value:e}},e.prototype.doesSupportMarkdown=function(){if(!at(this.supportsMarkdown)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=e&&e.completionItem&&Array.isArray(e.completionItem.documentationFormat)&&-1!==e.completionItem.documentationFormat.indexOf(pt.Markdown)}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!at(this.supportsCommitCharacters)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),An=function(){function e(e,t,n){void 0===t&&(t=[]),this.schemaService=e,this.contributions=t,this.promise=n||Promise}return e.prototype.doHover=function(e,t,n){var r=e.offsetAt(t),o=n.getNodeFromOffset(r);if(!o||("object"===o.type||"array"===o.type)&&r>o.offset+1&&r<o.offset+o.length-1)return this.promise.resolve(null);var i=o;if("string"===o.type){var a=o.parent;if(a&&"property"===a.type&&a.keyNode===o&&!(o=a.valueNode))return this.promise.resolve(null)}for(var s=Me.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),l=function(e){return{contents:e,range:s}},c=hn(o),u=this.contributions.length-1;u>=0;u--){var f=this.contributions[u].getInfoContribution(e.uri,c);if(f)return f.then((function(e){return l(e)}))}return this.schemaService.getSchemaForResource(e.uri,n).then((function(e){if(e){var t=n.getMatchingSchemas(e.schema,o.offset),r=null,i=null,a=null,s=null;t.every((function(e){if(e.node===o&&!e.inverted&&e.schema&&(r=r||e.schema.title,i=i||e.schema.markdownDescription||kn(e.schema.description),e.schema.enum)){var t=e.schema.enum.indexOf(dn(o));e.schema.markdownEnumDescriptions?a=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(a=kn(e.schema.enumDescriptions[t])),a&&"string"!=typeof(s=e.schema.enum[t])&&(s=JSON.stringify(s))}return!0}));var c="";return r&&(c=kn(r)),i&&(c.length>0&&(c+="\n\n"),c+=i),a&&(c.length>0&&(c+="\n\n"),c+="`"+function(e){if(-1!==e.indexOf("`"))return"`` "+e+" ``";return e}(s)+"`: "+a),l([c])}return null}))},e}();function kn(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var On=n(795),Sn=function(){function e(e){try{this.patternRegExp=new RegExp(function(e){return e.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}(e)+"$")}catch(e){this.patternRegExp=null}this.schemas=[]}return e.prototype.addSchema=function(e){this.schemas.push(e)},e.prototype.matchesPattern=function(e){return this.patternRegExp&&this.patternRegExp.test(e)},e.prototype.getSchemas=function(){return this.schemas},e}(),En=function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new jn(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then((function(t){return e.service.resolveSchemaContent(t,e.url,e.dependencies)}))),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},e}(),jn=function(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t},Tn=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){return cn(this.getSectionRecursive(e,this.schema))},e.prototype.getSectionRecursive=function(e,t){if(!t||"boolean"==typeof t||0===e.length)return t;var n=e.shift();if(t.properties&&(t.properties[n],1))return this.getSectionRecursive(e,t.properties[n]);if(t.patternProperties)for(var r=0,o=Object.keys(t.patternProperties);r<o.length;r++){var i=o[r];if(new RegExp(i).test(n))return this.getSectionRecursive(e,t.patternProperties[i])}else{if("object"==typeof t.additionalProperties)return this.getSectionRecursive(e,t.additionalProperties);if(n.match("[0-9]+"))if(Array.isArray(t.items)){var a=parseInt(n,10);if(!isNaN(a)&&t.items[a])return this.getSectionRecursive(e,t.items[a])}else if(t.items)return this.getSectionRecursive(e,t.items)}return null},e}(),Mn=function(){function e(e,t,n){this.contextService=t,this.requestService=e,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter((function(t){var n=On.a.parse(t).scheme;return"schemaservice"!==n&&(!e||e(n))}))},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(e){for(var t=this,n=!1,r=[e=this.normalizeId(e)],o=Object.keys(this.schemasById).map((function(e){return t.schemasById[e]}));r.length;)for(var i=r.pop(),a=0;a<o.length;a++){var s=o[a];s&&(s.url===i||s.dependencies[i])&&(s.url!==i&&r.push(s.url),s.clearSchema(),o[a]=void 0,n=!0)}return n},e.prototype.normalizeId=function(e){try{return On.a.parse(e).toString()}catch(t){return e}},e.prototype.setSchemaContributions=function(e){if(e.schemas){var t=e.schemas;for(var n in t){var r=this.normalizeId(n);this.contributionSchemas[r]=this.addSchemaHandle(r,t[n])}}if(e.schemaAssociations){var o=e.schemaAssociations;for(var i in o){var a=o[i];this.contributionAssociations[i]=a;for(var s=this.getOrAddFilePatternAssociation(i),l=0,c=a;l<c.length;l++){var u=c[l];n=this.normalizeId(u);s.addSchema(n)}}}},e.prototype.addSchemaHandle=function(e,t){var n=new En(this,e,t);return this.schemasById[e]=n,n},e.prototype.getOrAddSchemaHandle=function(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)},e.prototype.getOrAddFilePatternAssociation=function(e){var t=this.filePatternAssociationById[e];return t||(t=new Sn(e),this.filePatternAssociationById[e]=t,this.filePatternAssociations.push(t)),t},e.prototype.registerExternalSchema=function(e,t,n){void 0===t&&(t=null);var r=this.normalizeId(e);if(this.registeredSchemasIds[r]=!0,t)for(var o=0,i=t;o<i.length;o++){var a=i[o];this.getOrAddFilePatternAssociation(a).addSchema(r)}return n?this.addSchemaHandle(r,n):this.getOrAddSchemaHandle(r)},e.prototype.clearExternalSchemas=function(){for(var e in this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={},this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var t in this.contributionAssociations)for(var n=this.getOrAddFilePatternAssociation(t),r=0,o=this.contributionAssociations[t];r<o.length;r++){var i=o[r];e=this.normalizeId(i);n.addSchema(e)}},e.prototype.getResolvedSchema=function(e){var t=this.normalizeId(e),n=this.schemasById[t];return n?n.getResolvedSchema():this.promise.resolve(null)},e.prototype.loadSchema=function(e){if(!this.requestService){var t="Unable to load schema from '"+Pn(e)+"'. No schema request service available";return this.promise.resolve(new jn({},[t]))}return this.requestService(e).then((function(t){if(!t){var n="Unable to load schema from '"+Pn(e)+"': No content.";return new jn({},[n])}var r,o=[];r=et(t,o);var i=o.length?["Unable to parse content from '"+Pn(e)+"': Parse error at offset "+o[0].offset]:[];return new jn(r,i)}),(function(t){var n="Unable to load schema from '"+Pn(e)+"': "+t.toString();return new jn({},[n])}))},e.prototype.resolveSchemaContent=function(e,t,n){var r=this,o=e.errors.slice(0),i=e.schema;if(i.$schema){var a=this.normalizeId(i.$schema);if("http://json-schema.org/draft-03/schema"===a)return this.promise.resolve(new Tn({},["Draft-03 schemas are not supported."]));"https://json-schema.org/draft/2019-09/schema"===a&&e.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var s=this.contextService,l=function(e,t,n,r){var i=function(e,t){if(!t)return e;var n=e;return"/"===t[0]&&(t=t.substr(1)),t.split("/").some((function(e){return!(n=n[e])})),n}(t,r);if(i)for(var a in i)i.hasOwnProperty(a)&&!e.hasOwnProperty(a)&&(e[a]=i[a]);else o.push("$ref '"+r+"' in '"+n+"' can not be resolved.")},c=function(e,t,n,i,a){s&&!/^\w+:\/\/.*/.test(t)&&(t=s.resolveRelativePath(t,i)),t=r.normalizeId(t);var c=r.getOrAddSchemaHandle(t);return c.getUnresolvedSchema().then((function(r){if(a[t]=!0,r.errors.length){var i=n?t+"#"+n:t;o.push("Problems loading reference '"+i+"': "+r.errors[0]+".")}return l(e,r.schema,t,n),u(e,r.schema,t,c.dependencies)}))},u=function(e,t,n,o){if(!e||"object"!=typeof e)return Promise.resolve(null);for(var i=[e],a=[],s=[],u=function(e){for(var r=[];e.$ref;){var a=e.$ref,u=a.split("#",2);if(delete e.$ref,u[0].length>0)return void s.push(c(e,u[0],u[1],n,o));-1===r.indexOf(a)&&(l(e,t,n,u[1]),r.push(a))}!function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];"object"==typeof o&&i.push(o)}}(e.items,e.additionalProperties,e.not,e.contains,e.propertyNames,e.if,e.then,e.else),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];if("object"==typeof o)for(var a in o){var s=o[a];"object"==typeof s&&i.push(s)}}}(e.definitions,e.properties,e.patternProperties,e.dependencies),function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];if(Array.isArray(o))for(var a=0,s=o;a<s.length;a++){var l=s[a];"object"==typeof l&&i.push(l)}}}(e.anyOf,e.allOf,e.oneOf,e.items)};i.length;){var f=i.pop();a.indexOf(f)>=0||(a.push(f),u(f))}return r.promise.all(s)};return u(i,i,t,n).then((function(e){return new Tn(i,o)}))},e.prototype.getSchemaForResource=function(e,t){if(t&&t.root&&"object"===t.root.type){var n=t.root.properties.filter((function(e){return"$schema"===e.keyNode.value&&e.valueNode&&"string"===e.valueNode.type}));if(n.length>0){var r=dn(n[0].valueNode);if(r&&function(e,t){if(e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}(r,".")&&this.contextService&&(r=this.contextService.resolveRelativePath(r,e)),r){var o=this.normalizeId(r);return this.getOrAddSchemaHandle(o).getResolvedSchema()}}}for(var i=Object.create(null),a=[],s=0,l=this.filePatternAssociations;s<l.length;s++){var c=l[s];if(c.matchesPattern(e))for(var u=0,f=c.getSchemas();u<f.length;u++){var p=f[u];i[p]||(a.push(p),i[p]=!0)}}return a.length>0?this.createCombinedSchema(e,a).getResolvedSchema():this.promise.resolve(null)},e.prototype.createCombinedSchema=function(e,t){if(1===t.length)return this.getOrAddSchemaHandle(t[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(e),r={allOf:t.map((function(e){return{$ref:e}}))};return this.addSchemaHandle(n,r)},e}();function Pn(e){return e}var In=function(){function e(e,t){this.jsonSchemaService=e,this.promise=t,this.validationEnabled=!0}return e.prototype.configure=function(e){e&&(this.validationEnabled=e.validate,this.commentSeverity=e.allowComments?void 0:Ve.Error)},e.prototype.doValidation=function(e,t,n,r){var o=this;if(!this.validationEnabled)return this.promise.resolve([]);var i=[],a={},s=function(e){var t=e.range.start.line+" "+e.range.start.character+" "+e.message;a[t]||(a[t]=!0,i.push(e))},l=function(r){var a=n?Ln(n.trailingCommas):Ve.Error,l=n?Ln(n.comments):o.commentSeverity;if(r){if(r.errors.length&&t.root){var c=t.root,u="object"===c.type?c.properties[0]:null;if(u&&"$schema"===u.keyNode.value){var f=u.valueNode||u,p=Me.create(e.positionAt(f.offset),e.positionAt(f.offset+f.length));s(We.create(p,r.errors[0],Ve.Warning,Ht.SchemaResolveError))}else{p=Me.create(e.positionAt(c.offset),e.positionAt(c.offset+1));s(We.create(p,r.errors[0],Ve.Warning,Ht.SchemaResolveError))}}else{var d=t.validate(e,r.schema);d&&d.forEach(s)}(function e(t){if(t&&"object"==typeof t){if(st(t.allowComments))return t.allowComments;if(t.allOf)for(var n=0,r=t.allOf;n<r.length;n++){var o=r[n],i=e(o);if(st(i))return i}}return})(r.schema)&&(l=void 0),function e(t){if(t&&"object"==typeof t){if(st(t.allowTrailingCommas))return t.allowTrailingCommas;if(st(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(t.allOf)for(var n=0,r=t.allOf;n<r.length;n++){var o=r[n],i=e(o);if(st(i))return i}}return}(r.schema)&&(a=void 0)}for(var h=0,v=t.syntaxErrors;h<v.length;h++){var g=v[h];if(g.code===Ht.TrailingComma){if("number"!=typeof a)continue;g.severity=a}s(g)}if("number"==typeof l){t.comments.forEach((function(e){s(We.create(e,"Comments are not permitted in JSON.",l,Ht.CommentNotPermitted))}))}return i};if(r){var c=r.id||"schemaservice://untitled/"+Fn++;return this.jsonSchemaService.resolveSchemaContent(new jn(r),c,{}).then((function(e){return l(e)}))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((function(e){return l(e)}))},e}(),Fn=0;function Ln(e){switch(e){case"error":return Ve.Error;case"warning":return Ve.Warning;case"ignore":return}}function Nn(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function _n(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*Nn(e.charCodeAt(1))/255,green:17*Nn(e.charCodeAt(2))/255,blue:17*Nn(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*Nn(e.charCodeAt(1))/255,green:17*Nn(e.charCodeAt(2))/255,blue:17*Nn(e.charCodeAt(3))/255,alpha:17*Nn(e.charCodeAt(4))/255};case 7:return{red:(16*Nn(e.charCodeAt(1))+Nn(e.charCodeAt(2)))/255,green:(16*Nn(e.charCodeAt(3))+Nn(e.charCodeAt(4)))/255,blue:(16*Nn(e.charCodeAt(5))+Nn(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*Nn(e.charCodeAt(1))+Nn(e.charCodeAt(2)))/255,green:(16*Nn(e.charCodeAt(3))+Nn(e.charCodeAt(4)))/255,blue:(16*Nn(e.charCodeAt(5))+Nn(e.charCodeAt(6)))/255,alpha:(16*Nn(e.charCodeAt(7))+Nn(e.charCodeAt(8)))/255}}return null}var Dn=function(){function e(e){this.schemaService=e}return e.prototype.findDocumentSymbols=function(e,t,n){var r=this;void 0===n&&(n={resultLimit:Number.MAX_VALUE});var o=t.root;if(!o)return null;var i=n.resultLimit,a=e.uri;if(("vscode://defaultsettings/keybindings.json"===a||bn(a.toLowerCase(),"/user/keybindings.json"))&&"array"===o.type){for(var s=[],l=0,c=o.items;l<c.length;l++){var u=c[l];if("object"===u.type)for(var f=0,p=u.properties;f<p.length;f++){var d=p[f];if("key"===d.keyNode.value&&d.valueNode){var h=Pe.create(e.uri,Rn(e,u));if(s.push({name:dn(d.valueNode),kind:Et.Function,location:h}),--i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),s}}}return s}var v=function(t,n,o){return i>=0&&("array"===n.type?n.items.forEach((function(e){return v(t,e,o)})):"object"===n.type&&n.properties.forEach((function(n){if(i>=0){var a=n.valueNode;if(a){i--;var s=Pe.create(e.uri,Rn(e,n)),l=o?o+"."+n.keyNode.value:n.keyNode.value;t.push({name:r.getKeyLabel(n),kind:r.getSymbolKind(a.type),location:s,containerName:o}),v(t,a,l)}}}))),t},g=v([],o,void 0);return i<0&&(g.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a)),g},e.prototype.findDocumentSymbols2=function(e,t,n){var r=this;void 0===n&&(n={resultLimit:Number.MAX_VALUE});var o=t.root;if(!o)return null;var i=n.resultLimit,a=e.uri;if(("vscode://defaultsettings/keybindings.json"===a||bn(a.toLowerCase(),"/user/keybindings.json"))&&"array"===o.type){for(var s=[],l=0,c=o.items;l<c.length;l++){var u=c[l];if("object"===u.type)for(var f=0,p=u.properties;f<p.length;f++){var d=p[f];if("key"===d.keyNode.value&&d.valueNode){var h=Rn(e,u),v=Rn(e,d.keyNode);if(s.push({name:dn(d.valueNode),kind:Et.Function,range:h,selectionRange:v}),--i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a),s}}}return s}var g=function(t,n){return i>=0&&("array"===n.type?n.items.forEach((function(n,o){if(n&&i>=0){i--;var a=Rn(e,n),s=a,l=String(o),c=g([],n);t.push({name:l,kind:r.getSymbolKind(n.type),range:a,selectionRange:s,children:c})}})):"object"===n.type&&n.properties.forEach((function(n){var o=n.valueNode;if(o&&i>=0){i--;var a=Rn(e,n),s=Rn(e,n.keyNode),l=g([],o);t.push({name:r.getKeyLabel(n),kind:r.getSymbolKind(o.type),range:a,selectionRange:s,children:l})}}))),t},m=g([],o);return i<0&&(m.pop(),n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(a)),m},e.prototype.getSymbolKind=function(e){switch(e){case"object":return Et.Module;case"string":return Et.String;case"number":return Et.Number;case"array":return Et.Array;case"boolean":return Et.Boolean;default:return Et.Variable}},e.prototype.getKeyLabel=function(e){var t=e.keyNode.value;return t&&(t=t.replace(/[\n]/g,"↵")),t&&t.trim()?t:'"'+t+'"'},e.prototype.findDocumentColors=function(e,t,n){return this.schemaService.getSchemaForResource(e.uri,t).then((function(r){var o=[];if(r)for(var i=n&&"number"==typeof n.resultLimit?n.resultLimit:Number.MAX_VALUE,a={},s=0,l=t.getMatchingSchemas(r.schema);s<l.length;s++){var c=l[s];if(!c.inverted&&c.schema&&("color"===c.schema.format||"color-hex"===c.schema.format)&&c.node&&"string"===c.node.type){var u=String(c.node.offset);if(!a[u]){var f=_n(dn(c.node));if(f){var p=Rn(e,c.node);o.push({color:f,range:p})}if(a[u]=!0,--i<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(e.uri),o}}}return o}))},e.prototype.getColorPresentations=function(e,t,n,r){var o,i=[],a=Math.round(255*n.red),s=Math.round(255*n.green),l=Math.round(255*n.blue);function c(e){var t=e.toString(16);return 2!==t.length?"0"+t:t}return o=1===n.alpha?"#"+c(a)+c(s)+c(l):"#"+c(a)+c(s)+c(l)+c(Math.round(255*n.alpha)),i.push({label:o,textEdit:He.replace(r,JSON.stringify(o))}),i},e}();function Rn(e,t){return Me.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var Vn={schemaAssociations:{},schemas:{}};function Bn(e,t){var n=[],r=[],o=[],i=-1,a=Ze(e.getText(),!1),s=a.scan();function l(e){n.push(e),r.push(o.length)}for(;17!==s;){switch(s){case 1:case 3:var c={startLine:p=e.positionAt(a.getTokenOffset()).line,endLine:p,kind:1===s?"object":"array"};o.push(c);break;case 2:case 4:var u=2===s?"object":"array";if(o.length>0&&o[o.length-1].kind===u){c=o.pop();var f=e.positionAt(a.getTokenOffset()).line;c&&f>c.startLine+1&&i!==c.startLine&&(c.endLine=f-1,l(c),i=c.startLine)}break;case 13:var p=e.positionAt(a.getTokenOffset()).line,d=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;1===a.getTokenError()&&p+1<e.lineCount?a.setPosition(e.offsetAt(Te.create(p+1,0))):p<d&&(l({startLine:p,endLine:d,kind:_e.Comment}),i=p);break;case 12:var h=e.getText().substr(a.getTokenOffset(),a.getTokenLength()).match(/^\/\/\s*#(region\b)|(endregion\b)/);if(h){f=e.positionAt(a.getTokenOffset()).line;if(h[1]){c={startLine:f,endLine:f,kind:_e.Region};o.push(c)}else{for(var v=o.length-1;v>=0&&o[v].kind!==_e.Region;)v--;if(v>=0){c=o[v];o.length=v,f>c.startLine&&i!==c.startLine&&(c.endLine=f,l(c),i=c.startLine)}}}}s=a.scan()}var g=t&&t.rangeLimit;if("number"!=typeof g||n.length<=g)return n;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var m=[],y=0,b=r;y<b.length;y++){(k=b[y])<30&&(m[k]=(m[k]||0)+1)}var x=0,w=0;for(v=0;v<m.length;v++){var C=m[v];if(C){if(C+x>g){w=v;break}x+=C}}var A=[];for(v=0;v<n.length;v++){var k;"number"==typeof(k=r[v])&&(k<w||k===w&&x++<g)&&A.push(n[v])}return A}function Un(e,t,n){function r(t,n){return Me.create(e.positionAt(t),e.positionAt(n))}var o=Ze(e.getText(),!0);function i(e,t){return o.setPosition(e),o.scan()===t?o.getTokenOffset()+o.getTokenLength():-1}return t.map((function(t){for(var o=e.offsetAt(t),a=n.getNodeFromOffset(o,!0),s=[];a;){switch(a.type){case"string":case"object":case"array":var l=a.offset+1,c=a.offset+a.length-1;l<c&&o>=l&&o<=c&&s.push(r(l,c)),s.push(r(a.offset,a.offset+a.length));break;case"number":case"boolean":case"null":case"property":s.push(r(a.offset,a.offset+a.length))}if("property"===a.type||a.parent&&"array"===a.parent.type){var u=i(a.offset+a.length,5);-1!==u&&s.push(r(a.offset,u))}a=a.parent}for(var f=void 0,p=s.length-1;p>=0;p--)f=Dt.create(s[p],f);return f||(f=Dt.create(Me.create(t,t))),f}))}n(796),n(797),n(798),n(799),n(800),n(801),n(802),n(804),n(806),n(808);var Wn=function(e){var t=e.promiseConstructor||Promise,n=new Mn(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(Vn);var r=new Cn(n,e.contributions,t,e.clientCapabilities),o=new An(n,e.contributions,t),i=new Dn(n),a=new In(n,t);return{configure:function(e){n.clearExternalSchemas(),e.schemas&&e.schemas.forEach((function(e){n.registerExternalSchema(e.uri,e.fileMatch,e.schema)})),a.configure(e)},resetSchema:function(e){return n.onResourceChange(e)},doValidation:a.doValidation.bind(a),parseJSONDocument:function(e){return yn(e,{collectComments:!0})},newJSONDocument:function(e,t){return function(e,t){return void 0===t&&(t=[]),new gn(e,t,[])}(e,t)},doComplete:r.doComplete.bind(r),findDocumentSymbols:i.findDocumentSymbols.bind(i),findDocumentSymbols2:i.findDocumentSymbols2.bind(i),findColorSymbols:function(e,t){return i.findDocumentColors(e,t).then((function(e){return e.map((function(e){return e.range}))}))},findDocumentColors:i.findDocumentColors.bind(i),getColorPresentations:i.getColorPresentations.bind(i),doHover:o.doHover.bind(o),getFoldingRanges:Bn,getSelectionRanges:Un,format:function(e,t,n){var r=void 0;if(t){var o=e.offsetAt(t.start);r={offset:o,length:e.offsetAt(t.end)-o}}var i={tabSize:n?n.tabSize:4,insertSpaces:!n||n.insertSpaces,eol:"\n"};return function(e,t,n){return Ae(e,t,n)}(e.getText(),r,i).map((function(t){return He.replace(Me.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)}))}}}({});ye.registerHelper("lint","json",(function(e,t){return Object(a.b)(this,void 0,void 0,(function(){var n,r,o,i,s;return Object(a.e)(this,(function(a){switch(a.label){case 0:return n=t.schema,r=t.setError,Wn.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),o=zt.create(t.id+".json","json",0,e),i=Wn.parseJSONDocument(o),[4,Wn.doValidation(o,i)];case 1:return(s=a.sent()).length?r&&r(s[0].message):r&&r(void 0),[2,s.map((function(e){return{from:ye.Pos(e.range.start.line,e.range.start.character),to:ye.Pos(e.range.end.line,e.range.end.character),message:e.message}}))]}}))}))})),ye.registerHelper("hint","json",(function(e,t){return Object(a.b)(void 0,void 0,void 0,(function(){var n,r,o,i,s,l,c,u;return Object(a.e)(this,(function(a){switch(a.label){case 0:return(n=t.schema)?(Wn.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),r=e.getDoc().getCursor(),o=e.getTokenAt(r),i=zt.create(t.id+".json","json",0,e.getValue()),s=Wn.parseJSONDocument(i),[4,Wn.doComplete(i,{line:r.line,character:r.ch},s)]):[2];case 1:return l=a.sent(),c=function(e){for(var t="";e--;)t+=" ";return t},u=l?l.items.map((function(e){return{text:e.insertText,displayText:e.label,filter:e.filterText||e.label,from:{line:e.textEdit.range.start.line,ch:e.textEdit.range.start.character},to:{line:e.textEdit.range.end.line,ch:e.textEdit.range.end.character},hint:function(e,t,n){var r=n.text.replace(/(\$1|\${1:[^}]+})/,"_$__REDOC_CURSOR_HERE")||"";if(r=r.replace(/(\$\d+|\${[^}]+})/g,"")||"",e.setSelection(n.from,n.to),r.indexOf("\n")>-1){var o=e.getLine(e.getCursor().line).search(/(\S|$)/);r=r.replace(/\n/g,"\n"+c(o))}e.replaceSelection(r);var i=e.getSearchCursor("_$__REDOC_CURSOR_HERE",n.from);i.findNext()&&(e.setCursor(i.from()),i.replace(""))}}})):[],/(property|string)/.test(o.type||"")&&(u=u.filter((function(e){return e.filter.replace(/(^"|"$)/g,"").startsWith(o.string.replace(/(^"|"$)/g,""))}))),[2,{from:ye.Pos(r.line,o.start),to:ye.Pos(r.line,r.ch),list:u}]}}))}))}));var zn,Hn,qn,Gn,$n,Kn=Object(d.db)(zn||(zn=Object(a.f)(["\n .cm-s-material.CodeMirror {\n background-color: ","!important;\n color: ","!important;\n font-family: ",";\n line-height: 18px;\n padding: 10px;\n }\n\n .CodeMirror-lint-mark-error {\n background-size: 4px;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAVUlEQVR42mNgQAL/GRjigPg/EP8FYntkCX4gtoVKgvE/BoabcEVAhj6S5DUgfgFl/wFJ2gPxL6iuT1DF+kD2R5AYA5KRj6CS/FAMYvszIBltz4AFAAD9fz0YtLg13wAAAABJRU5ErkJggg==') !important;\n }\n\n .cm-s-material.CodeMirror-focused div.CodeMirror-selected {\n background: rgba(255, 255, 255, 0.3) !important;\n }\n\n .cm-s-material .CodeMirror-code .cm-string.cm-property {\n color: #9EFAA7;\n }\n\n .cm-s-material .CodeMirror-code .cm-string {\n color: #FEE39E;\n }\n\n .cm-s-material .CodeMirror-code .cm-atom {\n color: ",";\n }\n\n div .cm-s-material .CodeMirror-matchingbracket {\n outline: 1px solid grey;\n text-decoration: none;\n }\n\n .react-codemirror2 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: ",";\n border-bottom-left-radius: ",";\n overflow: hidden;\n\n flex: 1;\n }\n\n .CodeMirror {\n flex: 1;\n max-height: 65vh !important; /* it fixes performance bug if we pass big data to CodeMirror */\n border-radius: ",";\n }\n"],["\n .cm-s-material.CodeMirror {\n background-color: ","!important;\n color: ","!important;\n font-family: ",";\n line-height: 18px;\n padding: 10px;\n }\n\n .CodeMirror-lint-mark-error {\n background-size: 4px;\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAVUlEQVR42mNgQAL/GRjigPg/EP8FYntkCX4gtoVKgvE/BoabcEVAhj6S5DUgfgFl/wFJ2gPxL6iuT1DF+kD2R5AYA5KRj6CS/FAMYvszIBltz4AFAAD9fz0YtLg13wAAAABJRU5ErkJggg==') !important;\n }\n\n .cm-s-material.CodeMirror-focused div.CodeMirror-selected {\n background: rgba(255, 255, 255, 0.3) !important;\n }\n\n .cm-s-material .CodeMirror-code .cm-string.cm-property {\n color: #9EFAA7;\n }\n\n .cm-s-material .CodeMirror-code .cm-string {\n color: #FEE39E;\n }\n\n .cm-s-material .CodeMirror-code .cm-atom {\n color: ",";\n }\n\n div .cm-s-material .CodeMirror-matchingbracket {\n outline: 1px solid grey;\n text-decoration: none;\n }\n\n .react-codemirror2 {\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom-right-radius: ",";\n border-bottom-left-radius: ",";\n overflow: hidden;\n\n flex: 1;\n }\n\n .CodeMirror {\n flex: 1;\n max-height: 65vh !important; /* it fixes performance bug if we pass big data to CodeMirror */\n border-radius: ",";\n }\n"])),(function(e){return e.theme.rightPanel.panelControlsBackgroundColor}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.typography.code.fontFamily}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.components.panels.borderRadius}),(function(e){return e.theme.components.panels.borderRadius}),(function(e){return e.theme.components.panels.borderRadius})),Jn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"editor",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(t,"_onKeyUp",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){/^[a-zA-Z0-9_":]$/.test(n.key)&&t.editor.execCommand("autocomplete")}}),Object.defineProperty(t,"initEditor",{enumerable:!0,configurable:!0,writable:!0,value:function(e){t.editor=e,e.on("keyup",t._onKeyUp)}}),Object.defineProperty(t,"refreshEditor",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.editor.refresh()}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"componentDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;setTimeout((function(){e.editor.refresh()}),0),document.addEventListener("click",this.refreshEditor)}}),Object.defineProperty(t.prototype,"componentWillUnmount",{enumerable:!1,configurable:!0,writable:!0,value:function(){document.removeEventListener("click",this.refreshEditor)}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.props.fieldState.value,n=this.props.fieldApi,r=n.setValue,o=n.setTouched,i=n.setError,a=this.props,l=a.onChange,c=a.onBlur,u=a.forwardedRef;return s.createElement(s.Fragment,null,s.createElement(Kn,null),s.createElement(me.Controlled,{editorDidMount:this.initEditor,value:t||"",ref:u||void 0,onBeforeChange:function(e,t,n){r(n),l&&l(n)},onBlur:function(e){o(),c&&c(e)},options:{mode:this.props.mode||"application/json",theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":function(){return e.editor.showHint({completeSingle:!0})},"Ctrl-Space":function(){return e.editor.showHint({completeSingle:!0})}},hintOptions:{id:this.props.id,completeSingle:!1,schema:this.props.schema},lint:{id:this.props.id,schema:this.props.schema,setError:i}}}))}}),t}(s.Component),Yn=Object(c.b)(Jn),Xn=Object(v.e)(z.c)(Hn||(Hn=Object(a.f)(["\n border-radius: ",";\n margin-bottom: 10px;\n"],["\n border-radius: ",";\n margin-bottom: 10px;\n"])),(function(e){return e.theme.components.panels.borderRadius})),Qn=n(94),Zn=n(11);!function(e){e.STRING="string",e.ARRAY="array",e.OBJECT="object"}(qn||(qn={})),function(e){e.BYTE="byte",e.BASE64="base64",e.BINARY="binary"}(Gn||(Gn={})),function(e){e.OCTET_STREAM="application/octet-stream",e.MULTIPART="multipart/form-data",e.URL_ENCODED="application/x-www-form-urlencoded"}($n||($n={}));var er=Object.values(Gn),tr=["application/octet-stream","application/pdf","application/gzip","application/zip"],nr=["image/","audio/","video/"];function rr(e){if(nr.some((function(t){return e.startsWith(t)})))return e}function or(e){return!!tr.includes(e)||nr.some((function(t){return e.startsWith(t)}))}function ir(e,t){if(!e||!e.type)return or(t);var n=e.format||e.contentEncoding||"";return e.type===qn.STRING&&er.includes(n)}function ar(e){return new Promise((function(t,n){var r=new FileReader;r.onload=function(){var e=r.result.replace(/data:.*\/.*;base64,/g,"");t(e)},r.onerror=function(){return n(r.error)},r.readAsDataURL(e)}))}function sr(e){return[e.format,e.contentEncoding,e.contentMediaType].includes(Gn.BASE64)}function lr(e,t,n){return Object(a.b)(this,void 0,void 0,(function(){var r,o,i,s=this;return Object(a.e)(this,(function(l){switch(l.label){case 0:return r=Object.values(e),o=1===r.length?r[0]:r,i=t.properties?t.properties[n]:t,i.type===qn.STRING&&sr(i)?[4,ar(r[0])]:[3,2];case 1:return o=l.sent(),[3,5];case 2:return i.type===qn.ARRAY&&i.items?sr(i.items)?[4,Promise.all(r.map((function(e){return Object(a.b)(s,void 0,void 0,(function(){return Object(a.e)(this,(function(t){switch(t.label){case 0:return[4,ar(e)];case 1:return[2,t.sent()]}}))}))})))]:[3,4]:[3,5];case 3:return o=l.sent(),[3,5];case 4:o=r,l.label=5;case 5:return[2,o]}}))}))}var cr=s.forwardRef((function(e,t){var n=Object(a.g)(e,[]),r=n.schema,o=n.contentName,i=n.onChange,l=n.name;return(0,Object(c.c)(Object(a.a)({field:l},n)).render)(s.createElement("input",{"data-cy":"file-upload-input",type:"file",id:n.id,className:n.className,name:n.name,onChange:function(e){return Object(a.b)(void 0,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){switch(n.label){case 0:return[4,lr(e.target.files,r,o)];case 1:return t=n.sent(),i(o,t),[2]}}))}))},multiple:n.multiple,accept:n.accept,ref:t}))}));function ur(e){var t=e.schema,n=void 0===t?{}:t,r=e.mediaType,o=e.onChange,i=n.properties||{};return ir(n,r.name)?s.createElement(vr,null,s.createElement(h.a,null,s.createElement(gr,{fullWidth:!0,id:"body."+r.name,name:"body."+r.name,accept:rr(r.name),schema:n,contentName:r.name,onChange:o}))):n.type===qn.OBJECT&&i?s.createElement(vr,null,Object.entries(i).map((function(e){var t=e[0],i=e[1],a=r.name===$n.MULTIPART&&function(e){var t="array"===e.type?e.items:e;if(!t||!t.type)return!0;var n=t.contentMediaType||"",r=t.format||t.contentEncoding||(or(n)?"binary":"");return t.type===qn.STRING&&er.includes(r)}(i),l=i.contentMediaType||"",c=a?s.createElement(gr,{fullWidth:!0,id:"body."+t,name:"body."+t,accept:rr(l),multiple:"array"===i.type,schema:n,contentName:t,onChange:o}):s.createElement(C,{fullWidth:!0,id:"body."+t,field:"body."+t,placeholder:i.description||t});return s.createElement(h.a,{key:t},s.createElement(h.d,null,t,":"),c)}))):(console.warn('Invalid schema for request body and mime type: "'+r.name+'"',n),null)}var fr,pr,dr,hr,vr=d.nb.div(fr||(fr=Object(a.f)(["\n > div {\n margin-top: 10px;\n }\n"],["\n > div {\n margin-top: 10px;\n }\n"]))),gr=Object(d.nb)(cr)(pr||(pr=Object(a.f)(["\n ","\n ",";\n ","\n"],["\n ","\n ",";\n ","\n"])),g,(function(e){return"password"===e.inputType?"padding-right: 40px;":""}),(function(e){return e.fullWidth?"width: 100%;":""})),mr=Object(u.a)((function(e){var t,n,r=e.properties,o=void 0===r?{}:r,i=Object(a.g)(e,["properties"]),l=function(e){var t,n=i.body.content;if(!n||!n.hasSample)return"";var r=null===(t=n.active)||void 0===t?void 0:t.examples;if(null==r||!r[e])return"";var a=ge()(null==r?void 0:r[e].value,o,{arrayMerge:Zn.a});return JSON.stringify(a,null,2)},c=null===(t=i.body.content)||void 0===t||null===(n=t.operation)||void 0===n?void 0:n.activeExampleName,u=function(e){var t,n;null===(t=i.body.content)||void 0===t||null===(n=t.operation)||void 0===n||n.activateExampleName(e),i.console.formApi.setValue("body",l(e))},f=function(e){if(!e)return"";if("application/x-www-form-urlencoded"===e.mime)return e.value;var t=ge()(e.value,o,{arrayMerge:Zn.a});return JSON.stringify(t,null,2)},p=function(e,t){return Object(a.b)(void 0,void 0,void 0,(function(){var n;return Object(a.e)(this,(function(r){return n=i.console.formApi,(0,n.setValue)("body."+e,t),[2]}))}))};Object(s.useEffect)((function(){!1!==c?c&&i.console.formApi.setValue("body",l(c)):i.console.formApi.setValue("body",JSON.stringify(o,null,2))}),[c]);var h=i.validate,v=i.body;return s.createElement(s.Fragment,null,s.createElement(d.t,{content:v.content,renderDropdown:function(e){return s.createElement(d.g,Object(a.a)({},e,{variant:"dark",fullWidth:!0,Label:Xn,Dropdown:d.f}))}},(function(e){var t,n=e.examples||{},r=Object.keys(n);i.resolvedBody&&(t=(i.resolvedBody.content[e.name]||{}).schema);var o=ir(t,e.name)||e.name===$n.MULTIPART||e.name===$n.URL_ENCODED,a=Object(Qn.c)(e.operation,n).exampleKey,l=n[a];return s.createElement(s.Fragment,null,r.length&&1!==r.length&&s.createElement(Qn.a,{examples:n,onChange:u,exampleKey:a})||null,o?s.createElement(ur,{schema:t,mediaType:e,onChange:p.bind(void 0)}):s.createElement(Yn,{id:"body"+i.id,field:"body",initialValue:f(l),schema:t,mode:e.name,validate:h}))})))})),yr=n(10),br=d.nb.div(dr||(dr=Object(a.f)(["\n display: flex;\n font-size: 12px;\n button {\n margin: 0;\n }\n"],["\n display: flex;\n font-size: 12px;\n button {\n margin: 0;\n }\n"]))),xr=d.nb.button(hr||(hr=Object(a.f)(["\n outline: none;\n border: none;\n background-color: ",";\n text-align: center;\n cursor: pointer;\n color: ",";\n min-width: 80px;\n min-height: 30px;\n border-radius: ",";\n font-size: 12px;\n\n padding: 0 10px;\n\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n\n &:first-child {\n border-top-left-radius: ",";\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: ",";\n }\n\n &:last-child {\n border-top-left-radius: 0;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n border-bottom-left-radius: 0;\n }\n\n ","\n\n ","\n"],["\n outline: none;\n border: none;\n background-color: ",";\n text-align: center;\n cursor: pointer;\n color: ",";\n min-width: 80px;\n min-height: 30px;\n border-radius: ",";\n font-size: 12px;\n\n padding: 0 10px;\n\n border-top: 4px solid transparent;\n border-bottom: 4px solid transparent;\n\n &:first-child {\n border-top-left-radius: ",";\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n border-bottom-left-radius: ",";\n }\n\n &:last-child {\n border-top-left-radius: 0;\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n border-bottom-left-radius: 0;\n }\n\n ","\n\n ","\n"])),(function(e){return e.theme.rightPanel.panelBackgroundColor}),(function(e){return e.theme.colors.text.light}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.shape.borderRadius}),(function(e){var t=e.active,n=e.theme;return t&&"\n border-bottom: 4px solid "+n.colors.accent.main+";\n background-color: "+Object(yr.a)(.05,n.rightPanel.panelBackgroundColor)+";\n "||""}),(function(e){var t=e.disabled,n=e.theme;return t&&"\n cursor: default;\n color: "+Object(yr.f)(.3,n.colors.text.light)+";\n "||""})),wr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.props,t=e.onChange,n=e.active,r=e.hasResponse;return s.createElement(br,null,s.createElement(xr,{onClick:function(){return t(0)},active:0===n},r?"Edit Request":"Request"),s.createElement(xr,{onClick:function(){return r&&t(1)},active:1===n,disabled:!r}," ","Response"," "))}}),t}(s.Component),Cr=v.e.input(Or||(Or=Object(a.f)(["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n height: 20px;\n"],["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n height: 20px;\n"]))),Ar=v.e.label(Sr||(Sr=Object(a.f)(["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n\n overflow-wrap: break-word;\n line-height: 20px;\n"],["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n\n overflow-wrap: break-word;\n line-height: 20px;\n"]))),kr=v.e.div(Er||(Er=Object(a.f)(["\n width: ",";\n display: inline-flex;\n align-items: center;\n\n & > label {\n white-space: ",";\n }\n"],["\n width: ",";\n display: inline-flex;\n align-items: center;\n\n & > label {\n white-space: ",";\n }\n"])),(function(e){return e.fullWidth?"100%":"50%"}),(function(e){return e.nowrap?"nowrap":"normal"}));var Or,Sr,Er,jr,Tr,Mr=s.forwardRef((function(e,t){var n=e.fullWidth,r=e.id,o=e.label,i=e.nowrap;return s.createElement(kr,{fullWidth:n,nowrap:i},s.createElement(Cr,Object(a.a)({},e,{type:"checkbox",ref:t})),s.createElement(Ar,{htmlFor:r},o))})),Pr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{collapsed:!0}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"onCheckBoxClick",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.target.value,n=e.target.checked;this.props.fieldApi.setTouched(!0);var r,o=this.props.fieldApi.getValue()||[];if(n)r=Object(a.h)(Object(a.h)([],o,!0),[t],!1);else{var i=o.indexOf(t);r=Object(a.h)(Object(a.h)([],o.slice(0,i),!0),o.slice(i+1),!0)}this.props.fieldApi.setValue(r)}}),Object.defineProperty(t.prototype,"isFieldChecked",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return this.props.fieldApi.getValue().includes(e)}}),Object.defineProperty(t.prototype,"toggle",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.setState({collapsed:!this.state.collapsed})}}),Object.defineProperty(t.prototype,"selectAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.props.fieldApi.setValue(this.props.items)}}),Object.defineProperty(t.prototype,"clearAll",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.props.fieldApi.setValue([])}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.props,n=t.items,r=t.fieldApi,o=t.validateOnChange,i=t.maxDisplayedItems,a=t.showControls,l=t.trimItemsLength,c=this.state.collapsed,u=r.getError(),f=i||11,p=l&&this.state.collapsed?n.slice(0,f):n;return s.createElement("div",null,a?s.createElement(Fr,null,s.createElement(ie.p,{onClick:function(){e.selectAll()}},"Select all"),s.createElement(ie.p,{onClick:function(){e.clearAll()}},"Clear")):null,s.createElement("div",null,p.map((function(t){return s.createElement(Mr,{nowrap:!0,id:t,value:t,checked:e.isFieldChecked(t),label:t,key:t,onChange:function(t){e.onCheckBoxClick(t),o&&r.validate()}})})),n.length>f&&l?s.createElement(Lr,{onClick:function(){e.toggle()}},c?"Show all":"Collapse"):null),u?s.createElement(h.b,null,u):"")}}),t}(s.Component),Ir=Object(c.b)(Pr),Fr=Object(d.nb)(ie.n)(jr||(jr=Object(a.f)(["\n opacity: 1;\n text-align: left;\n"],["\n opacity: 1;\n text-align: left;\n"]))),Lr=Object(d.nb)(ie.p)(Tr||(Tr=Object(a.f)(["\n float: right;\n"],["\n float: right;\n"])));function Nr(e){var t=e.scopes,n=e.id,r=[];try{r=JSON.parse(Object(f.e)("auth."+n+".scopes"))}catch(e){}return t&&t.length?s.createElement(h.a,null,s.createElement(h.d,null," Scopes: "),s.createElement(Ir,{field:"auth."+n+".scopes",initialValue:r,items:t,showControls:!0,trimItemsLength:!0})):s.createElement(s.Fragment,null)}var _r=n(174),Dr=n(312),Rr=function(){function e(){}return Object.defineProperty(e,"authorizeImplicit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=t.authorizationUrl,r=t.clientId,o=t.scopes,i=t.extraParams,a=void 0===i?{}:i,s=t.routingBasePath,l=t.redirectUri,c=t.successCallback,u=t.errorCallback,f=Ur({date:(new Date).toString()}),p=new URL(n),d="/"===s?"":s,h=""+window.location.origin+d+"/oauth2-redirect.html";for(var v in p.searchParams.set("client_id",r),p.searchParams.set("redirect_uri",l||h),p.searchParams.set("response_type","token"),p.searchParams.set("state",f),Array.isArray(o)&&p.searchParams.set("scope",o.join(" ")),a)p.searchParams.set(v,a[v]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:n,clientId:r,scopes:o},state:f,successCallback:function(t){c(t),e.clearRedirectData("implicit")},errorCallback:function(t){u(t),e.clearRedirectData("implicit")}},window.open(p.toString())}}),Object.defineProperty(e,"authorizeAuthorizationCode",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n=this,r=t.authorizationUrl,o=t.tokenUrl,i=t.clientId,s=t.clientSecret,l=t.codeVerifier,c=t.codeChallenge,u=t.scopes,f=t.extraParams,p=void 0===f?{}:f,d=t.routingBasePath,h=t.redirectUri,v=t.successCallback,g=t.errorCallback,m=new URL(r),y="/"===d?"":d,b=""+window.location.origin+y+"/oauth2-redirect.html",x=Ur({date:(new Date).toString()});for(var w in m.searchParams.set("client_id",i),m.searchParams.set("redirect_uri",h||b),m.searchParams.set("response_type","code"),m.searchParams.set("state",x),Array.isArray(u)&&m.searchParams.set("scope",u.join(" ")),c&&(m.searchParams.set("code_challenge",c),m.searchParams.set("code_challenge_method","S256")),p)m.searchParams.set(w,p[w]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:r,clientId:i,scopes:u},state:x,successCallback:function(t){var r=t.auth_code;return Object(a.b)(n,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,3,,4]),[4,fetch(o,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:_r.stringify(Object(a.a)(Object(a.a)(Object(a.a)({client_id:i,client_secret:s},l&&{code_verifier:l}),{code:r,grant_type:"authorization_code",redirect_uri:h||b}),p))})];case 1:return[4,Vr(n.sent(),v,g)];case 2:return n.sent(),[3,4];case 3:return t=n.sent(),g(t),[3,4];case 4:return e.clearRedirectData("authorizationCode"),[2]}}))}))},errorCallback:function(t){g(t),e.clearRedirectData("authorizationCode")}},window.open(m.toString())}}),Object.defineProperty(e,"clearRedirectData",{enumerable:!1,configurable:!0,writable:!0,value:function(e){window.redirectOAuth2={flow:e,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:function(){},errorCallback:function(){}}}}),Object.defineProperty(e,"authorizeClientCredentials",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.tokenUrl,n=e.clientId,r=e.clientSecret,o=e.scopes,i=void 0===o?[]:o,s=e.extraParams,l=void 0===s?{}:s,c=e.successCallback,u=e.errorCallback;return Object(a.b)(this,void 0,void 0,(function(){var e;return Object(a.e)(this,(function(o){switch(o.label){case 0:return o.trys.push([0,3,,4]),[4,fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:_r.stringify(Object(a.a)({client_id:n,client_secret:r,grant_type:"client_credentials",scope:Array.isArray(i)?i.join(" "):void 0},l))})];case 1:return[4,Vr(o.sent(),c,u)];case 2:return o.sent(),[3,4];case 3:return e=o.sent(),u(e),[3,4];case 4:return[2]}}))}))}}),e}();new Rr;function Vr(e,t,n){return Object(a.b)(this,void 0,void 0,(function(){var r,o,i,s,l,c;return Object(a.e)(this,(function(a){switch(a.label){case 0:return e.ok?[4,e.json()]:[3,2];case 1:return r=a.sent(),t(r),[3,7];case 2:return o=n,i=Error.bind,(e.headers.get("Content-Type")||"").indexOf("json")>-1?(c=(l=JSON).stringify,[4,e.json()]):[3,4];case 3:return s=c.apply(l,[a.sent()]),[3,6];case 4:return[4,e.text()];case 5:s=a.sent(),a.label=6;case 6:o.apply(void 0,[new(i.apply(Error,[void 0,s]))]),a.label=7;case 7:return[2]}}))}))}function Br(e){void 0===e&&(e=32);for(var t="";t.length<e;)t+=Math.random().toString(32).substring(2);return t.substring(0,e)}function Ur(e){var t=Object(a.a)({randomStr:Br()},e);return btoa(JSON.stringify(t))}function Wr(e){return Object(a.b)(this,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){return t=(new TextEncoder).encode(e),[2,null===Dr.a||void 0===Dr.a?void 0:Dr.a.subtle.digest("SHA-256",t)]}))}))}function zr(e){if(e)return btoa(String.fromCharCode.apply(null,new Uint8Array(e))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Hr(e){return Object(a.b)(this,void 0,void 0,(function(){var t;return Object(a.e)(this,(function(n){switch(n.label){case 0:return t=zr,[4,Wr(e)];case 1:return[2,t.apply(void 0,[n.sent()])]}}))}))}function qr(e){if(!e)return"Token is required"}var Gr,$r=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{error:"",loading:!1,tokenMasked:!0}}),Object.defineProperty(t,"clearToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.formApi.setValue("auth."+t.props.id+".token",""),Object(f.p)("auth."+t.props.id+".token","")}}),Object.defineProperty(t,"toggleTokenMask",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState({tokenMasked:!t.state.tokenMasked})}}),Object.defineProperty(t,"requestToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){return Object(a.b)(t,void 0,void 0,(function(){var e,t,n,r,o,i,s,l=this;return Object(a.e)(this,(function(a){switch(a.label){case 0:return this.state.loading?[2]:(e=this.props,t=e.server,n=e.flow,r=e.authCorsProxyUrl,o=r&&n.tokenUrl?r+Object(L.g)(n.tokenUrl):n.tokenUrl,this.errors.client_id||this.errors.client_secret?(console.log("Provide client_id and client_secret"),[2]):(i=this.values.client_id,s=this.values.client_secret,i&&s?(this.setState({loading:!0}),[4,Rr.authorizeClientCredentials({tokenUrl:o.startsWith("http")?o:t+o,clientId:i,clientSecret:s,scopes:this.values.scopes,successCallback:function(e){l.props.formApi.setValue("auth."+l.props.id+".token",e),l.setState({loading:!1})},errorCallback:function(e){l.clearToken(),l.setState({error:e.message,loading:!1})}})]):(console.log("Provide client_id and client_secret"),[2])));case 1:return a.sent(),[2]}}))}))}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"values",{get:function(){return this.props.form.values&&this.props.form.values.auth&&this.props.form.values.auth[this.props.id]||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this.props.form.errors&&this.props.form.errors.auth&&this.props.form.errors.auth[this.props.id]||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.state,t=e.loading,n=e.error,r=e.tokenMasked,o=this.props,i=o.id,l=o.defaultValues,c=Object.keys(this.props.flow.scopes),u=Object(f.e)("auth."+i+".token")||JSON.stringify(null==l?void 0:l.token);u=u?JSON.parse(u):"";var p=Object(f.j)(i,"client_id"),d={field:"auth."+i+".client_id",fullWidth:!0,initialValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==l?void 0:l.client_id),initValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==l?void 0:l.client_id),placeholder:"Your OAuth2 app Client ID"};return s.createElement(s.Fragment,null,s.createElement(h.f,null,s.createElement(h.a,null,s.createElement(h.d,null,"Client ID:"),p?s.createElement(j,Object(a.a)({},d,{options:p})):s.createElement(C,Object(a.a)({},d,{type:"password"}))),s.createElement(h.a,null,s.createElement(h.d,null,"Client Secret:"),s.createElement(C,{type:"password",fullWidth:!0,field:"auth."+i+".client_secret",initialValue:Object(f.e)("auth."+i+".client_secret")||(null==l?void 0:l.client_secret)})),s.createElement(C,{fullWidth:!0,field:"auth."+i+".token",type:"hidden",initialValue:u,validate:qr}),s.createElement(Nr,{id:i,scopes:c})),s.createElement(z.a,{color:"primary",onClick:this.requestToken,blinking:t},t?"Loading...":"Request Token"),s.createElement(h.c,null," Access Token "),n?s.createElement(h.b,{style:{marginBottom:"1em"}},"Failed to request token: ",s.createElement("pre",null,n)," "):this.values.token&&this.values.token.access_token?s.createElement(h.j,null,s.createElement(h.l,{length:this.values.token.access_token.length,masked:r},this.values.token.access_token),s.createElement(h.k,{onClick:this.toggleTokenMask},r?"Show":"Hide"," "),s.createElement(h.i,{onClick:this.clearToken}," Clear ")):s.createElement(h.b,{style:{marginBottom:"1em"}},"No token"))}}),t}(s.Component),Kr=d.nb.div(Gr||(Gr=Object(a.f)(["\n position: relative;\n height: 4px;\n display: block;\n width: 100%;\n background-color: ",";\n border-radius: ",";\n background-clip: padding-box;\n margin: 0.5rem 0 1rem 0;\n overflow: hidden;\n\n .determinate {\n position: absolute;\n background-color: inherit;\n top: 0;\n bottom: 0;\n background-color: ",";\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: ",";\n }\n .indeterminate:before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n }\n .indeterminate:after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n }\n\n @-webkit-keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @-webkit-keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n @keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n"],["\n position: relative;\n height: 4px;\n display: block;\n width: 100%;\n background-color: ",";\n border-radius: ",";\n background-clip: padding-box;\n margin: 0.5rem 0 1rem 0;\n overflow: hidden;\n\n .determinate {\n position: absolute;\n background-color: inherit;\n top: 0;\n bottom: 0;\n background-color: ",";\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: ",";\n }\n .indeterminate:before {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n }\n .indeterminate:after {\n content: '';\n position: absolute;\n background-color: inherit;\n top: 0;\n left: 0;\n bottom: 0;\n will-change: left, right;\n -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;\n -webkit-animation-delay: 1.15s;\n animation-delay: 1.15s;\n }\n\n @-webkit-keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @keyframes indeterminate {\n 0% {\n left: -35%;\n right: 100%;\n }\n 60% {\n left: 100%;\n right: -90%;\n }\n 100% {\n left: 100%;\n right: -90%;\n }\n }\n @-webkit-keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n @keyframes indeterminate-short {\n 0% {\n left: -200%;\n right: 100%;\n }\n 60% {\n left: 107%;\n right: -8%;\n }\n 100% {\n left: 107%;\n right: -8%;\n }\n }\n"])),(function(e){return e.theme.colors.accent.light}),(function(e){return e.theme.shape.borderRadius}),(function(e){return e.theme.colors.accent.main}),(function(e){return e.theme.colors.accent.main})),Jr=function(){return s.createElement(Kr,null,s.createElement("div",{className:"indeterminate"}))};function Yr(e){if(!e)return"Field is required"}var Xr,Qr,Zr,eo,to=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{error:null,loading:!1,showPkceOptions:!1}}),Object.defineProperty(t,"clearToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.formApi.setValue("auth."+t.props.id+".token","")}}),Object.defineProperty(t,"togglePkceOptions",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState((function(e){return{showPkceOptions:!e.showPkceOptions}}))}}),Object.defineProperty(t,"handleCodeVerifierChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var n=e.target.value;return Object(a.b)(t,void 0,void 0,(function(){var e;return Object(a.e)(this,(function(t){switch(t.label){case 0:return[4,Hr(n)];case 1:return e=t.sent(),this.setState({codeVerifier:n,validCodeChallenge:e}),[2]}}))}))}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"values",{get:function(){var e,t;return(null===(e=this.props.form.values)||void 0===e||null===(t=e.auth)||void 0===t?void 0:t[this.props.id])||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){var e,t;return(null===(e=this.props.form.errors)||void 0===e||null===(t=e.auth)||void 0===t?void 0:t[this.props.id])||{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pkceInputActionButtonProps",{get:function(){var e=this;return void 0!==this.state.codeVerifier&&this.state.codeChallenge!==this.state.validCodeChallenge?{label:"sync",onClick:function(){e.state.codeVerifier&&e.setState({codeChallenge:e.state.validCodeChallenge})}}:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"componentDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this;if(this.props.usePkce){var t=Br(43);Hr(t).then((function(n){e.setState({codeVerifier:t,codeChallenge:n,validCodeChallenge:n})}))}}}),Object.defineProperty(t.prototype,"handleAuthorize",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if(e){this.props.formApi.validate();var n=this.props,r=n.flow,o=n.usePkce,i=n.id,s=n.tokenUrl,l=n.authCorsProxyUrl;if(Object(Zn.b)(this.errors)){this.setState({loading:!0,error:null});var c=l?l+Object(L.g)(e):e,u=l&&s?l+Object(L.g)(s):s,f=this.props.formApi.getValue("auth."+i+".scopes"),p={authorizationUrl:c.startsWith("http")?c:this.props.server+c,clientId:this.values.client_id,scopes:f,redirectUri:this.context.oAuth2RedirectURI,routingBasePath:this.context.routingBasePath,successCallback:function(e){t.props.formApi.setValue("auth."+t.props.id+".token",e),t.setState({loading:!1,error:null})},errorCallback:function(e){t.setState({loading:!1,error:(null==e?void 0:e.message)||"Failed to retrieve the access token"})}};"implicit"===r&&Rr.authorizeImplicit(p),"authorizationCode"===r&&Rr.authorizeAuthorizationCode(Object(a.a)(Object(a.a)(Object(a.a)({},p),{tokenUrl:null!=u&&u.startsWith("http")?u:this.props.server+u,clientSecret:this.values.client_secret}),o&&{codeVerifier:this.state.codeVerifier,codeChallenge:this.state.codeChallenge}))}}}}),Object.defineProperty(t.prototype,"handleLogout",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.clearToken(),this.setState({error:null})}}),Object.defineProperty(t.prototype,"handleCancel",{enumerable:!1,configurable:!0,writable:!0,value:function(){this.setState({loading:!1,error:null}),Rr.clearRedirectData(this.props.flow)}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.state,n=t.error,r=t.loading,o=this.props,i=o.id,l=o.scopes,c=o.authorizationUrl,u=o.flow,p=o.usePkce,d=o.defaultValues;if(!c)return s.createElement(h.b,null,"No flow info");var v=Object(f.e)("auth."+i+".token")||JSON.stringify(null==d?void 0:d.token);v=v?JSON.parse(v):"";var g=Object(f.j)(i,"client_id"),m={field:"auth."+i+".client_id",fullWidth:!0,initialValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==d?void 0:d.client_id),initValue:Object(f.e)("auth."+i+".client_id")||this.props.clientId||(null==d?void 0:d.client_id),placeholder:"Your OAuth2 app Client ID",validate:Yr,validateOnBlur:!0,validateOnChange:!0};return s.createElement("div",null,s.createElement(h.f,null,s.createElement(h.a,null,s.createElement(h.d,null," Client ID: "),g?s.createElement(j,Object(a.a)({},m,{options:g})):s.createElement(C,Object(a.a)({},m,{"data-cy":"client-id-input"}))),"authorizationCode"===u&&s.createElement(s.Fragment,null,s.createElement(h.a,null,s.createElement(h.d,null,"Client Secret:"),s.createElement(C,{type:"password",fullWidth:!0,field:"auth."+i+".client_secret",initialValue:Object(f.e)("auth."+i+".client_secret")||(null==d?void 0:d.client_secret),validate:Yr,validateOnBlur:!0,validateOnChange:!0,"data-cy":"client-secret-input"})),p&&s.createElement(oo,null,s.createElement(Mr,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:this.state.showPkceOptions,onChange:this.togglePkceOptions,"data-cy":"pkce-options-toggle"}),this.state.showPkceOptions&&s.createElement(io,null,s.createElement(h.a,null,s.createElement(h.d,null,"Code Verifier"),s.createElement(w,{fullWidth:!0,value:this.state.codeVerifier,onChange:this.handleCodeVerifierChange,"data-cy":"code-verifier-input"})),s.createElement(h.a,null,s.createElement(h.d,null,"Code Challenge"),s.createElement(w,{fullWidth:!0,value:this.state.codeChallenge,onChange:function(t){var n=t.target.value;e.setState({codeChallenge:n})},inputActionButton:this.pkceInputActionButtonProps,"data-cy":"code-challenge-input"}))))),s.createElement(C,{fullWidth:!0,field:"auth."+i+".token",type:"hidden",initialValue:v}),s.createElement(Nr,{id:i,scopes:l}),this.values.token&&this.values.token.access_token?s.createElement(h.a,null,s.createElement(h.d,null," Access Token: "),s.createElement(w,{disabled:!0,type:"password",fullWidth:!0,value:this.values.token.access_token})):null),s.createElement(ro,null,this.values.token&&this.values.token.access_token?s.createElement(z.a,{fullWidth:!0,onClick:function(){e.handleLogout()}},"Log out"):r?s.createElement(s.Fragment,null,s.createElement(z.a,{fullWidth:!0,onClick:function(){e.handleCancel()}},"Cancel"),s.createElement(Jr,null)):s.createElement(z.a,{fullWidth:!0,disabled:!Object(Zn.b)(this.errors),onClick:function(){e.handleAuthorize(c)}},"Authorize")),r||n||!this.values.token||!this.values.token.access_token&&s.createElement(h.f,null,s.createElement(h.a,null,r?s.createElement(h.e,null,"Please, finish your authorization flow or cancel authorization."):n?s.createElement(s.Fragment,null,s.createElement(no,null,s.createElement(h.b,null,n))):this.values.token&&this.values.token.access_token?null:s.createElement(h.e,null," No Access Token. Please, Authorize. "))))}}),Object.defineProperty(t,"contextType",{enumerable:!0,configurable:!0,writable:!0,value:d.z}),t}(s.Component),no=d.nb.div(Xr||(Xr=Object(a.f)(["\n font-family: monospace;\n margin-top: 10px;\n line-height: 1;\n padding-left: 10px;\n border-left: 1px solid gray;\n"],["\n font-family: monospace;\n margin-top: 10px;\n line-height: 1;\n padding-left: 10px;\n border-left: 1px solid gray;\n"]))),ro=d.nb.div(Qr||(Qr=Object(a.f)(["\n margin-bottom: 15px;\n"],["\n margin-bottom: 15px;\n"]))),oo=d.nb.div(Zr||(Zr=Object(a.f)(["\n padding: 8px 0 20px;\n"],["\n padding: 8px 0 20px;\n"]))),io=d.nb.div(eo||(eo=Object(a.f)(["\n padding: 4px 0;\n"],["\n padding: 4px 0;\n"])));function ao(e){return Object(a.b)(this,void 0,void 0,(function(){return Object(a.e)(this,(function(t){switch(t.label){case 0:return[4,fetch(e)];case 1:return[2,t.sent().json()]}}))}))}function so(e){var t,n=this,r=e.scheme,o=e.defaultValues,i=s.useState({}),l=i[0],c=i[1],u=s.useState(),f=u[0],p=u[1],d=s.useState(!1),v=d[0],g=d[1];s.useEffect((function(){m(r.openIdConnectUrl)}),[r.openIdConnectUrl]);var m=function(e){return Object(a.b)(n,void 0,void 0,(function(){var t,n;return Object(a.e)(this,(function(r){switch(r.label){case 0:g(!0),p(""),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,ao(e)];case 2:return t=r.sent(),c(t),[3,4];case 3:return n=r.sent(),p(n.message),[3,4];case 4:return g(!1),[2]}}))}))};return s.createElement("div",null,v?s.createElement("div",null,s.createElement("div",null,"Fetching OpenID Connect metadata..."),s.createElement(Jr,null)):s.createElement("div",null,f?s.createElement(h.b,null,f):null!=l&&null!==(t=l.response_types_supported)&&void 0!==t&&t.includes("token")?s.createElement(s.Fragment,null,s.createElement(co,null,"OAuth2 Implicit Flow"),s.createElement(to,{key:e.id,authorizationUrl:l.authorization_endpoint,authCorsProxyUrl:e.authCorsProxyUrl,scopes:l.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId,flow:"implicit",defaultValues:o})):s.createElement("div",null,"Unsupported flow")))}var lo,co=d.nb.div(lo||(lo=Object(a.f)(["\n margin-top: 5px;\n margin-bottom: 10px;\n"],["\n margin-top: 5px;\n margin-bottom: 10px;\n"]))),uo=n(12);function fo(e){if(!e)return"Field is required"}function po(e){var t,n;if("cookie"===e.in)return t=e.name,(n=document.cookie.match("\\b"+t+"=([^;]*)\\b"))?n[1]:void 0}var ho=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"state",{enumerable:!0,configurable:!0,writable:!0,value:{activeScheme:0}}),Object.defineProperty(t,"handleSchemeChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){t.setState({activeScheme:e.idx}),Object(f.p)("securityRequirementName",e.value)}}),t}return Object(a.d)(t,e),Object.defineProperty(t,"getDerivedStateFromProps",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=e.operation.security.map((function(e){return e.schemes.map((function(e){return e.id})).join(" and ")})),n=Object(f.e)("securityRequirementName"),r=t.findIndex((function(e){return e===n}));return{activeScheme:r<0?0:r}}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.props.securityDefaults,n=this.state.activeScheme,r=this.props.operation.security,o=r.map((function(e){return e.schemes.map((function(e){return e.id})).join(" and ")})).map((function(e,t){return{value:e,idx:t}}));return 0===o.length?null:s.createElement(s.Fragment,null,s.createElement(h.f,null,o.length>1&&s.createElement(h.a,null,s.createElement(d.f,{variant:"dark",fullWidth:!0,prefix:"Security scheme: ",options:o,value:o[n].value,onChange:this.handleSchemeChange}))||null,r[n].schemes.map((function(n){var r=Object(f.c)(n.id);if("apiKey"===n.type){var o=Object(f.j)(r,""),i={field:"auth."+r,fullWidth:!0,initialValue:po(n)||Object(f.e)("auth."+r)||(null==t?void 0:t[r]),initValue:po(n)||Object(f.e)("auth."+r)||(null==t?void 0:t[r]),validate:fo,validateOnBlur:!0,validateOnChange:!0};return s.createElement(h.a,{key:r},s.createElement(h.d,null," ",n.name,": "),o?s.createElement(j,Object(a.a)({},i,{options:o})):s.createElement(C,Object(a.a)({},i,{type:"password","data-cy":"apiKey-auth-password"})))}if("http"===n.type){if("basic"===n.scheme){var l,c,u,p=Object(f.j)(r,"username");i={field:"auth."+r+".username",fullWidth:!0,initialValue:Object(f.e)("auth."+r+".username")||(null==t||null===(l=t[r])||void 0===l?void 0:l.username),initValue:Object(f.e)("auth."+r+".username")||(null==t||null===(c=t[r])||void 0===c?void 0:c.username),validate:fo,validateOnBlur:!0,validateOnChange:!0};return s.createElement(s.Fragment,{key:r},s.createElement(h.a,null,s.createElement(h.d,null," ",Object(uo.a)("tryItAuthBasicUsername"),": "),p?s.createElement(j,Object(a.a)({},i,{options:p})):s.createElement(C,Object(a.a)({},i))),s.createElement(h.a,null,s.createElement(h.d,null," ",Object(uo.a)("tryItAuthBasicPassword"),": "),s.createElement(C,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:"auth."+r+".password",validate:fo,initialValue:Object(f.e)("auth."+r+".password")||(null==t||null===(u=t[r])||void 0===u?void 0:u.password),validateOnBlur:!0,validateOnChange:!0})))}if("bearer"===n.scheme){var d=Object(f.j)(r,"");i={field:"auth."+r,fullWidth:!0,initialValue:Object(f.e)("auth."+r)||(null==t?void 0:t[r]),initValue:Object(f.e)("auth."+r)||(null==t?void 0:t[r]),validate:fo,validateOnBlur:!0,validateOnChange:!0};return s.createElement(s.Fragment,{key:r},s.createElement(h.a,null,s.createElement(h.d,null," Bearer Token: "),d?s.createElement(j,Object(a.a)({},i,{options:d})):s.createElement(C,Object(a.a)({},i,{type:"password",placeholder:"(without 'Bearer')"}))))}}else{if("oauth2"===n.type&&n.flows&&n.flows.clientCredentials)return s.createElement($r,{key:r,flow:n.flows.clientCredentials,server:e.props.activeServer,authCorsProxyUrl:e.props.authCorsProxyUrl,id:r,form:e.props.form,formApi:e.props.formApi,clientId:n.flows.clientCredentials["x-defaultClientId"]||n["x-defaultClientId"],defaultValues:null==t?void 0:t[r]});var v,g,m;if("oauth2"===n.type&&n.flows&&n.flows.implicit)return s.createElement(to,{key:r,authorizationUrl:n.flows.implicit.authorizationUrl,authCorsProxyUrl:e.props.authCorsProxyUrl,scopes:Object.keys((null==n||null===(v=n.flows)||void 0===v||null===(g=v.implicit)||void 0===g?void 0:g.scopes)||{}),server:e.props.activeServer,id:r,form:e.props.form,formApi:e.props.formApi,clientId:n.flows.implicit["x-defaultClientId"]||n["x-defaultClientId"],flow:"implicit",defaultValues:null==t?void 0:t[r]});if("oauth2"===n.type&&n.flows&&n.flows.authorizationCode)return s.createElement(to,{key:r,authorizationUrl:n.flows.authorizationCode.authorizationUrl,tokenUrl:n.flows.authorizationCode.tokenUrl,authCorsProxyUrl:e.props.authCorsProxyUrl,scopes:Object.keys((null===(m=n.flows.authorizationCode)||void 0===m?void 0:m.scopes)||{}),server:e.props.activeServer,id:r,form:e.props.form,formApi:e.props.formApi,clientId:n.flows.authorizationCode["x-defaultClientId"]||n["x-defaultClientId"],flow:"authorizationCode",usePkce:n.flows.authorizationCode["x-usePkce"],defaultValues:null==t?void 0:t[r]});if("oauth2"===n.type){var y,b=Object(f.e)("auth."+r+".token")||JSON.stringify(null==t||null===(y=t[r])||void 0===y?void 0:y.token);return b=b?JSON.parse(b):{},s.createElement(s.Fragment,{key:r},s.createElement(h.a,null,s.createElement(h.d,null," Access Token Type: "),s.createElement(C,{fullWidth:!0,field:"auth."+r+".token.token_type",initialValue:b.token_type||"Bearer"})),s.createElement(h.a,null,s.createElement(h.d,null," Access Token: "),s.createElement(C,{type:"password",fullWidth:!0,field:"auth."+r+".token.access_token",validate:fo,initialValue:b.access_token,validateOnBlur:!0,validateOnChange:!0})))}if("openIdConnect"===n.type)return s.createElement(so,{key:r,server:e.props.activeServer,authCorsProxyUrl:e.props.authCorsProxyUrl,id:r,form:e.props.form,formApi:e.props.formApi,scheme:n,clientId:n["x-defaultClientId"],defaultValues:null==t?void 0:t[r]})}}))),s.createElement("small",null,s.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))}}),t}(s.Component),vo=n(95),go=n(587),mo=n.n(go),yo=n(683),bo=n.n(yo),xo=n(749),wo=n.n(xo),Co=n(37),Ao=n.n(Co),ko=n(689),Oo=n.n(ko),So=n(596),Eo=n.n(So),jo=n(633),To=n.n(jo),Mo=n(695),Po=n.n(Mo),Io=n(658),Fo=n.n(Io),Lo=n(699),No=n.n(Lo),_o=n(937),Do=n.n(_o),Ro=n(941),Vo=n.n(Ro),Bo=n(700),Uo=n.n(Bo),Wo=n(605),zo=n.n(Wo),Ho=n(594),qo=n.n(Ho),Go=n(584),$o=n.n(Go),Ko=n(771),Jo=n.n(Ko),Yo=n(606),Xo=n.n(Yo),Qo=(n(959),n(960)),Zo=n.n(Qo),ei=n(773),ti=n.n(ei),ni=n(705),ri=n.n(ni),oi=n(649),ii=n.n(oi),ai=n(83),si=n(711),li=n.n(si),ci=n(712),ui=n.n(ci),fi=n(1021),pi=n.n(fi),di=n(713),hi=n.n(di),vi=n(1034),gi=n.n(vi),mi=n(1040),yi=n.n(mi),bi=n(1048),xi=n.n(bi),wi=n(1053),Ci=function(e){var t=function(e,t){return{name:e,value:t}};return ii()(e.prototype.set)||ii()(e.prototype.get)||ii()(e.prototype.getAll)||ii()(e.prototype.has)?e:function(e){gi()(r,e);var n=yi()(r);function r(e){var t;return li()(this,r),(t=n.call(this,e)).entryList=[],t}return ui()(r,[{key:"append",value:function(e,n,o){return this.entryList.push(t(e,n)),pi()(hi()(r.prototype),"append",this).call(this,e,n,o)}},{key:"set",value:function(e,n){var r,o=t(e,n);this.entryList=Xo()(r=this.entryList).call(r,(function(t){return t.name!==e})),this.entryList.push(o)}},{key:"get",value:function(e){var t,n=xi()(t=this.entryList).call(t,(function(t){return t.name===e}));return void 0===n?null:n}},{key:"getAll",value:function(e){var t,n;return zo()(t=Xo()(n=this.entryList).call(n,(function(t){return t.name===e}))).call(t,(function(e){return e.value}))}},{key:"has",value:function(e){return this.entryList.some((function(t){return t.name===e}))}}]),r}(e)}(n.n(wi).a),Ai=n(665),ki=n.n(Ai),Oi=n(607),Si=n.n(Oi),Ei=n(83).Buffer,ji=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},Ti=function(e){return/^[a-z0-9\-._~]+$/i.test(e)};function Mi(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.escape,o=arguments.length>2?arguments[2]:void 0;return"number"==typeof e&&(e=e.toString()),"string"==typeof e&&e.length&&r?o?JSON.parse(e):zo()(t=ki()(e)).call(t,(function(e){var t,n;return Ti(e)||ji(e)&&"unsafe"===r?e:zo()(t=zo()(n=Ei.from(e).toJSON().data||[]).call(n,(function(e){var t;return Si()(t="0".concat(e.toString(16).toUpperCase())).call(t,-2)}))).call(t,(function(e){return"%".concat(e)})).join("")})).join(""):e}function Pi(e){var t=e.value;return Array.isArray(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Mi(e,{escape:i})};if("simple"===r)return zo()(n).call(n,(function(e){return a(e)})).join(",");if("label"===r)return".".concat(zo()(n).call(n,(function(e){return a(e)})).join("."));if("matrix"===r)return zo()(n).call(n,(function(e){return a(e)})).reduce((function(e,n){var r,i,a;return!e||o?$o()(i=$o()(a="".concat(e||"",";")).call(a,t,"=")).call(i,n):$o()(r="".concat(e,",")).call(r,n)}),"");if("form"===r){var s=o?"&".concat(t,"="):",";return zo()(n).call(n,(function(e){return a(e)})).join(s)}if("spaceDelimited"===r){var l=o?"".concat(t,"="):"";return zo()(n).call(n,(function(e){return a(e)})).join(" ".concat(l))}if("pipeDelimited"===r){var c=o?"".concat(t,"="):"";return zo()(n).call(n,(function(e){return a(e)})).join("|".concat(c))}return}(e):"object"===Eo()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Mi(e,{escape:i})},s=qo()(n);if("simple"===r)return s.reduce((function(e,t){var r,i,s,l=a(n[t]),c=o?"=":",",u=e?"".concat(e,","):"";return $o()(r=$o()(i=$o()(s="".concat(u)).call(s,t)).call(i,c)).call(r,l)}),"");if("label"===r)return s.reduce((function(e,t){var r,i,s,l=a(n[t]),c=o?"=":".",u=e?"".concat(e,"."):".";return $o()(r=$o()(i=$o()(s="".concat(u)).call(s,t)).call(i,c)).call(r,l)}),"");if("matrix"===r&&o)return s.reduce((function(e,t){var r,o,i=a(n[t]),s=e?"".concat(e,";"):";";return $o()(r=$o()(o="".concat(s)).call(o,t,"=")).call(r,i)}),"");if("matrix"===r)return s.reduce((function(e,r){var o,i,s=a(n[r]),l=e?"".concat(e,","):";".concat(t,"=");return $o()(o=$o()(i="".concat(l)).call(i,r,",")).call(o,s)}),"");if("form"===r)return s.reduce((function(e,t){var r,i,s,l,c=a(n[t]),u=e?$o()(r="".concat(e)).call(r,o?"&":","):"",f=o?"=":",";return $o()(i=$o()(s=$o()(l="".concat(u)).call(l,t)).call(s,f)).call(i,c)}),"");return}(e):function(e){var t,n=e.key,r=e.value,o=e.style,i=e.escape,a=function(e){return Mi(e,{escape:i})};if("simple"===o)return a(r);if("label"===o)return".".concat(a(r));if("matrix"===o)return $o()(t=";".concat(n,"=")).call(t,a(r));if("form"===o)return a(r);if("deepObject"===o)return a(r);return}(e)}var Ii={serializeRes:Di,mergeInQueryOrForm:Ki};function Fi(e){return Li.apply(this,arguments)}function Li(){return(Li=Po()(Fo.a.mark((function e(t){var n,r,o,i,a,s=arguments;return Fo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},"object"===Eo()(t)&&(t=(n=t).url),n.headers=n.headers||{},Ii.mergeInQueryOrForm(n),n.headers&&qo()(n.headers).forEach((function(e){var t=n.headers[e];"string"==typeof t&&(n.headers[e]=t.replace(/\n+/g," "))})),!n.requestInterceptor){e.next=12;break}return e.next=8,n.requestInterceptor(n);case 8:if(e.t0=e.sent,e.t0){e.next=11;break}e.t0=n;case 11:n=e.t0;case 12:return r=n.headers["content-type"]||n.headers["Content-Type"],/multipart\/form-data/i.test(r)&&(delete n.headers["content-type"],delete n.headers["Content-Type"]),e.prev=14,e.next=17,(n.userFetch||fetch)(n.url,n);case 17:return o=e.sent,e.next=20,Ii.serializeRes(o,t,n);case 20:if(o=e.sent,!n.responseInterceptor){e.next=28;break}return e.next=24,n.responseInterceptor(o);case 24:if(e.t1=e.sent,e.t1){e.next=27;break}e.t1=o;case 27:o=e.t1;case 28:e.next=39;break;case 30:if(e.prev=30,e.t2=e.catch(14),o){e.next=34;break}throw e.t2;case 34:throw(i=new Error(o.statusText)).status=o.status,i.statusCode=o.status,i.responseError=e.t2,i;case 39:if(o.ok){e.next=45;break}throw(a=new Error(o.statusText)).status=o.status,a.statusCode=o.status,a.response=o,a;case 45:return e.abrupt("return",o);case 46:case"end":return e.stop()}}),e,null,[[14,30]])})))).apply(this,arguments)}var Ni=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function _i(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):ti.a.safeLoad(e)}function Di(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.loadSpec,o=void 0!==r&&r,i={ok:e.ok,url:e.url||t,status:e.status,statusText:e.statusText,headers:Vi(e.headers)},a=i.headers["content-type"],s=o||Ni(a),l=s?e.text:e.blob||e.buffer;return l.call(e).then((function(e){if(i.text=e,i.data=e,s)try{var t=_i(e,a);i.body=t,i.obj=t}catch(e){i.parseError=e}return i}))}function Ri(e){return No()(e).call(e,", ")?e.split(", "):e}function Vi(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ii()(Do()(e))?Vo()(Do()(e).call(e)).reduce((function(e,t){var n=To()(t,2),r=n[0],o=n[1];return e[r]=Ri(o),e}),{}):{}}function Bi(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==Eo()(e)||"string"!=typeof e.uri):"undefined"!=typeof File&&e instanceof File||("undefined"!=typeof Blob&&e instanceof Blob||(void 0!==ai.Buffer&&e instanceof ai.Buffer||null!==e&&"object"===Eo()(e)&&"function"==typeof e.pipe))}function Ui(e,t){return Array.isArray(e)&&e.some((function(e){return Bi(e,t)}))}var Wi={form:",",spaceDelimited:"%20",pipeDelimited:"|"},zi={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function Hi(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t.collectionFormat,o=t.allowEmptyValue,i=t.serializationOption,a=t.encoding,s="object"!==Eo()(t)||Array.isArray(t)?t:t.value,l=n?function(e){return e.toString()}:function(e){return encodeURIComponent(e)},c=l(e);if(void 0===s&&o)return[[c,""]];if(Bi(s)||Ui(s))return[[c,s]];if(i)return qi(e,s,n,i);if(a){if([Eo()(a.style),Eo()(a.explode),Eo()(a.allowReserved)].some((function(e){return"undefined"!==e})))return qi(e,s,n,ri()(a,["style","explode","allowReserved"]));if(a.contentType){if("application/json"===a.contentType){var u="string"==typeof s?s:Uo()(s);return[[c,l(u)]]}return[[c,l(s.toString())]]}return"object"!==Eo()(s)?[[c,l(s)]]:Array.isArray(s)&&s.every((function(e){return"object"!==Eo()(e)}))?[[c,zo()(s).call(s,l).join(",")]]:[[c,l(Uo()(s))]]}return"object"!==Eo()(s)?[[c,l(s)]]:Array.isArray(s)?"multi"===r?[[c,zo()(s).call(s,l)]]:[[c,zo()(s).call(s,l).join(zi[r||"csv"])]]:[[c,""]]}function qi(e,t,n,r){var o,i,a,s=r.style||"form",l=void 0===r.explode?"form"===s:r.explode,c=!n&&(r&&r.allowReserved?"unsafe":"reserved"),u=function(e){return Mi(e,{escape:c})},f=n?function(e){return e}:function(e){return Mi(e,{escape:c})};return"object"!==Eo()(t)?[[f(e),u(t)]]:Array.isArray(t)?l?[[f(e),zo()(t).call(t,u)]]:[[f(e),zo()(t).call(t,u).join(Wi[s])]]:"deepObject"===s?zo()(i=qo()(t)).call(i,(function(n){var r;return[f($o()(r="".concat(e,"[")).call(r,n,"]")),u(t[n])]})):l?zo()(a=qo()(t)).call(a,(function(e){return[f(e),u(t[e])]})):[[f(e),zo()(o=qo()(t)).call(o,(function(e){var n;return[$o()(n="".concat(f(e),",")).call(n,u(t[e]))]})).join(",")]]}function Gi(e){return Jo()(e).reduce((function(e,t){var n,r=To()(t,2),o=r[0],i=r[1],a=Oo()(Hi(o,i,!0));try{for(a.s();!(n=a.n()).done;){var s=To()(n.value,2),l=s[0],c=s[1];if(Array.isArray(c)){var u,f=Oo()(c);try{for(f.s();!(u=f.n()).done;){var p=u.value;e.append(l,p)}}catch(e){f.e(e)}finally{f.f()}}else e.append(l,c)}}catch(e){a.e(e)}finally{a.f()}return e}),new Ci)}function $i(e){var t=qo()(e).reduce((function(t,n){var r,o=Oo()(Hi(n,e[n]));try{for(o.s();!(r=o.n()).done;){var i=To()(r.value,2),a=i[0],s=i[1];t[a]=s}}catch(e){o.e(e)}finally{o.f()}return t}),{});return Zo.a.stringify(t,{encode:!1,indices:!1})||""}function Ki(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=void 0===t?"":t,r=e.query,o=e.form,i=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Xo()(t).call(t,(function(e){return e})).join("&");return r?"?".concat(r):""};if(o){var a=qo()(o).some((function(e){var t=o[e].value;return Bi(t)||Ui(t)})),s=e.headers["content-type"]||e.headers["Content-Type"];a||/multipart\/form-data/i.test(s)?e.body=Gi(e.form):e.body=$i(o),delete e.form}if(r){var l=n.split("?"),c=To()(l,2),u=c[0],f=c[1],p="";if(f){var d=Zo.a.parse(f),h=qo()(r);h.forEach((function(e){return delete d[e]})),p=Zo.a.stringify(d,{encode:!0})}var v=i(p,$i(r));e.url=u+v,delete e.query}return e}var Ji=n(638),Yi=n.n(Ji),Xi=n(779),Qi=n.n(Xi),Zi=n(1063),ea=n.n(Zi),ta=n(1068),na=n.n(ta),ra=n(1099),oa=n.n(ra),ia=n(739),aa=n.n(ia),sa=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)}}(),la=Object.prototype.hasOwnProperty;function ca(e,t){return la.call(e,t)}function ua(e){if(Array.isArray(e)){for(var t=new Array(e.length),n=0;n<t.length;n++)t[n]=""+n;return t}if(Object.keys)return Object.keys(e);t=[];for(var r in e)ca(e,r)&&t.push(r);return t}function fa(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function pa(e){for(var t,n=0,r=e.length;n<r;){if(!((t=e.charCodeAt(n))>=48&&t<=57))return!1;n++}return!0}function da(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function ha(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function va(e,t){var n=[e];for(var r in t){var o="object"==typeof t[r]?JSON.stringify(t[r],null,2):t[r];void 0!==o&&n.push(r+": "+o)}return n.join("\n")}var ga=function(e){function t(t,n,r,o,i){var a=this.constructor,s=e.call(this,va(t,{name:n,index:r,operation:o,tree:i}))||this;return s.name=n,s.index=r,s.operation=o,s.tree=i,Object.setPrototypeOf(s,a.prototype),s.message=va(t,{name:n,index:r,operation:o,tree:i}),s}return sa(t,e),t}(Error),ma=ga,ya=fa,ba={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=wa(n,this.path);r&&(r=fa(r));var o=Ca(n,{op:"remove",path:this.from}).removed;return Ca(n,{op:"add",path:this.path,value:o}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=wa(n,this.from);return Ca(n,{op:"add",path:this.path,value:fa(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:Ea(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},xa={add:function(e,t,n){return pa(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:ba.move,copy:ba.copy,test:ba.test,_get:ba._get};function wa(e,t){if(""==t)return e;var n={op:"_get",path:t};return Ca(e,n),n.value}function Ca(e,t,n,r,o,i){if(void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===o&&(o=!0),void 0===i&&(i=0),n&&("function"==typeof n?n(t,0,e,t.path):Oa(t,0)),""===t.path){var a={newDocument:e};if("add"===t.op)return a.newDocument=t.value,a;if("replace"===t.op)return a.newDocument=t.value,a.removed=e,a;if("move"===t.op||"copy"===t.op)return a.newDocument=wa(e,t.from),"move"===t.op&&(a.removed=e),a;if("test"===t.op){if(a.test=Ea(e,t.value),!1===a.test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a.newDocument=e,a}if("remove"===t.op)return a.removed=e,a.newDocument=null,a;if("_get"===t.op)return t.value=e,a;if(n)throw new ma("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",i,t,e);return a}r||(e=fa(e));var s=(t.path||"").split("/"),l=e,c=1,u=s.length,f=void 0,p=void 0,d=void 0;for(d="function"==typeof n?n:Oa;;){if(p=s[c],o&&"__proto__"==p)throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&void 0===f&&(void 0===l[p]?f=s.slice(0,c).join("/"):c==u-1&&(f=t.path),void 0!==f&&d(t,0,e,f)),c++,Array.isArray(l)){if("-"===p)p=l.length;else{if(n&&!pa(p))throw new ma("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);pa(p)&&(p=~~p)}if(c>=u){if(n&&"add"===t.op&&p>l.length)throw new ma("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);if(!1===(a=xa[t.op].call(t,l,p,e)).test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(p&&-1!=p.indexOf("~")&&(p=ha(p)),c>=u){if(!1===(a=ba[t.op].call(t,l,p,e)).test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}l=l[p]}}function Aa(e,t,n,r,o){if(void 0===r&&(r=!0),void 0===o&&(o=!0),n&&!Array.isArray(t))throw new ma("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=fa(e));for(var i=new Array(t.length),a=0,s=t.length;a<s;a++)i[a]=Ca(e,t[a],n,!0,o,a),e=i[a].newDocument;return i.newDocument=e,i}function ka(e,t,n){var r=Ca(e,t);if(!1===r.test)throw new ma("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function Oa(e,t,n,r){if("object"!=typeof e||null===e||Array.isArray(e))throw new ma("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(!ba[e.op])throw new ma("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,n);if("string"!=typeof e.path)throw new ma("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new ma('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,n);if(("move"===e.op||"copy"===e.op)&&"string"!=typeof e.from)throw new ma("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&void 0===e.value)throw new ma("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,n);if(("add"===e.op||"replace"===e.op||"test"===e.op)&&function e(t){if(void 0===t)return!0;if(t)if(Array.isArray(t)){for(var n=0,r=t.length;n<r;n++)if(e(t[n]))return!0}else if("object"==typeof t){var o=ua(t),i=o.length;for(n=0;n<i;n++)if(e(t[o[n]]))return!0}return!1}(e.value))throw new ma("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,n);if(n)if("add"==e.op){var o=e.path.split("/").length,i=r.split("/").length;if(o!==i+1&&o!==i)throw new ma("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,n)}else if("replace"===e.op||"remove"===e.op||"_get"===e.op){if(e.path!==r)throw new ma("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,n)}else if("move"===e.op||"copy"===e.op){var a=Sa([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new ma("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function Sa(e,t,n){try{if(!Array.isArray(e))throw new ma("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Aa(fa(t),fa(e),n||!0);else{n=n||Oa;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(e){if(e instanceof ma)return e;throw e}}function Ea(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){var n,r,o,i=Array.isArray(e),a=Array.isArray(t);if(i&&a){if((r=e.length)!=t.length)return!1;for(n=r;0!=n--;)if(!Ea(e[n],t[n]))return!1;return!0}if(i!=a)return!1;var s=Object.keys(e);if((r=s.length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!t.hasOwnProperty(s[n]))return!1;for(n=r;0!=n--;)if(!Ea(e[o=s[n]],t[o]))return!1;return!0}return e!=e&&t!=t}
8
- /*!
9
- * https://github.com/Starcounter-Jack/JSON-Patch
10
- * (c) 2017 Joachim Wester
11
- * MIT license
12
- */
13
- var ja=new WeakMap,Ta=function(e){this.observers=new Map,this.obj=e},Ma=function(e,t){this.callback=e,this.observer=t};function Pa(e,t){t.unobserve()}function Ia(e,t){var n,r=function(e){return ja.get(e)}(e);if(r){var o=function(e,t){return e.observers.get(t)}(r,t);n=o&&o.observer}else r=new Ta(e),ja.set(e,r);if(n)return n;if(n={},r.value=fa(e),t){n.callback=t,n.next=null;var i=function(){Fa(n)},a=function(){clearTimeout(n.next),n.next=setTimeout(i)};"undefined"!=typeof window&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return n.patches=[],n.object=e,n.unobserve=function(){Fa(n),clearTimeout(n.next),function(e,t){e.observers.delete(t.callback)}(r,n),"undefined"!=typeof window&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},r.observers.set(t,new Ma(t,n)),n}function Fa(e,t){void 0===t&&(t=!1);var n=ja.get(e.object);La(n.value,e.object,e.patches,"",t),e.patches.length&&Aa(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function La(e,t,n,r,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=ua(t),a=ua(e),s=!1,l=a.length-1;l>=0;l--){var c=e[f=a[l]];if(!ca(t,f)||void 0===t[f]&&void 0!==c&&!1===Array.isArray(t))Array.isArray(e)===Array.isArray(t)?(o&&n.push({op:"test",path:r+"/"+da(f),value:fa(c)}),n.push({op:"remove",path:r+"/"+da(f)}),s=!0):(o&&n.push({op:"test",path:r,value:e}),n.push({op:"replace",path:r,value:t}),!0);else{var u=t[f];"object"==typeof c&&null!=c&&"object"==typeof u&&null!=u?La(c,u,n,r+"/"+da(f),o):c!==u&&(!0,o&&n.push({op:"test",path:r+"/"+da(f),value:fa(c)}),n.push({op:"replace",path:r+"/"+da(f),value:fa(u)}))}}if(s||i.length!=a.length)for(l=0;l<i.length;l++){var f;ca(e,f=i[l])||void 0===t[f]||n.push({op:"add",path:r+"/"+da(f),value:fa(t[f])})}}}function Na(e,t,n){void 0===n&&(n=!1);var r=[];return La(e,t,r,"",n),r}Object.assign({},r,o,{JsonPatchError:ga,deepClone:fa,escapePathComponent:da,unescapePathComponent:ha});var _a=n(1100),Da=n.n(_a),Ra=n(1101),Va=n.n(Ra),Ba={add:function(e,t){return{op:"add",path:e,value:t}},replace:Wa,remove:function(e){return{op:"remove",path:e}},merge:function(e,t){return{type:"mutation",op:"merge",path:e,value:t}},mergeDeep:function(e,t){return{type:"mutation",op:"mergeDeep",path:e,value:t}},context:function(e,t){return{type:"context",path:e,value:t}},getIn:function(e,t){return t.reduce((function(e,t){return void 0!==t&&e?e[t]:e}),e)},applyPatch:function(e,t,n){if(n=n||{},"merge"===(t=mo()(mo()({},t),{},{path:t.path&&Ua(t.path)})).op){var r=ts(e,t.path);Yi()(r,t.value),Aa(e,[Wa(t.path,r)])}else if("mergeDeep"===t.op){var o=ts(e,t.path);for(var i in t.value){var a=t.value[i],s=Array.isArray(a);if(s){var l=o[i]||[];o[i]=$o()(l).call(l,a)}else if(Ja(a)&&!s){var c=mo()({},o[i]);for(var u in a){if(Object.prototype.hasOwnProperty.call(c,u)){c=Da()(Va()(c),a);break}Yi()(c,aa()({},u,a[u]))}o[i]=c}else o[i]=a}}else if("add"===t.op&&""===t.path&&Ja(t.value)){var f=qo()(t.value).reduce((function(e,n){return e.push({op:"add",path:"/".concat(Ua(n)),value:t.value[n]}),e}),[]);Aa(e,f)}else if("replace"===t.op&&""===t.path){var p=t.value;n.allowMetaPatches&&t.meta&&Za(t)&&(Array.isArray(t.value)||Ja(t.value))&&(p=mo()(mo()({},p),t.meta)),e=p}else if(Aa(e,[t]),n.allowMetaPatches&&t.meta&&Za(t)&&(Array.isArray(t.value)||Ja(t.value))){var d=ts(e,t.path),h=mo()(mo()({},d),t.meta);Aa(e,[Wa(t.path,h)])}return e},parentPathMatch:function(e,t){if(!Array.isArray(t))return!1;for(var n=0,r=t.length;n<r;n+=1)if(t[n]!==e[n])return!1;return!0},flatten:$a,fullyNormalizeArray:function(e){return Ka($a(Ga(e)))},normalizeArray:Ga,isPromise:function(e){return Ja(e)&&Ya(e.then)},forEachNew:function(e,t){try{return za(e,qa,t)}catch(e){return e}},forEachNewPrimitive:function(e,t){try{return za(e,Ha,t)}catch(e){return e}},isJsonPatch:Xa,isContextPatch:function(e){return es(e)&&"context"===e.type},isPatch:es,isMutation:Qa,isAdditiveMutation:Za,isGenerator:function(e){return"[object GeneratorFunction]"===Object.prototype.toString.call(e)},isFunction:Ya,isObject:Ja,isError:function(e){return e instanceof Error}};function Ua(e){return Array.isArray(e)?e.length<1?"":"/".concat(zo()(e).call(e,(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")})).join("/")):e}function Wa(e,t,n){return{op:"replace",path:e,value:t,meta:n}}function za(e,t,n){var r;return Ka($a(zo()(r=Xo()(e).call(e,Za)).call(r,(function(e){return t(e.value,n,e.path)}))||[]))}function Ha(e,t,n){return n=n||[],Array.isArray(e)?zo()(e).call(e,(function(e,r){return Ha(e,t,$o()(n).call(n,r))})):Ja(e)?zo()(r=qo()(e)).call(r,(function(r){return Ha(e[r],t,$o()(n).call(n,r))})):t(e,n[n.length-1],n);var r}function qa(e,t,n){var r=[];if((n=n||[]).length>0){var o=t(e,n[n.length-1],n);o&&(r=$o()(r).call(r,o))}if(Array.isArray(e)){var i=zo()(e).call(e,(function(e,r){return qa(e,t,$o()(n).call(n,r))}));i&&(r=$o()(r).call(r,i))}else if(Ja(e)){var a,s=zo()(a=qo()(e)).call(a,(function(r){return qa(e[r],t,$o()(n).call(n,r))}));s&&(r=$o()(r).call(r,s))}return r=$a(r)}function Ga(e){return Array.isArray(e)?e:[e]}function $a(e){var t;return $o()(t=[]).apply(t,ki()(zo()(e).call(e,(function(e){return Array.isArray(e)?$a(e):e}))))}function Ka(e){return Xo()(e).call(e,(function(e){return void 0!==e}))}function Ja(e){return e&&"object"===Eo()(e)}function Ya(e){return e&&"function"==typeof e}function Xa(e){if(es(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function Qa(e){return Xa(e)||es(e)&&"mutation"===e.type}function Za(e){return Qa(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function es(e){return e&&"object"===Eo()(e)}function ts(e,t){try{return wa(e,t)}catch(e){return console.error(e),{}}}var ns=n(1125),rs=n.n(ns),os=n(790),is=n(1132),as=n.n(is);function ss(e,t){function n(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack;for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];this.message=n[0],t&&t.apply(this,n)}return n.prototype=new Error,n.prototype.name=e,n.prototype.constructor=n,n}var ls=n(1133),cs=n.n(ls),us=n(1134),fs=n.n(us),ps=["properties"],ds=["properties"],hs=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],vs=["schema/example","items/example"];function gs(e){var t=e[e.length-1],n=e[e.length-2],r=e.join("/");return ps.indexOf(t)>-1&&-1===ds.indexOf(n)||hs.indexOf(r)>-1||vs.some((function(e){return r.indexOf(e)>-1}))}function ms(e,t){var n,r=e.split("#"),o=To()(r,2),i=o[0],a=o[1],s=Ao.a.resolve(i||"",t||"");return a?$o()(n="".concat(s,"#")).call(n,a):s}var ys=new RegExp("^([a-z]+://|//)","i"),bs=ss("JSONRefError",(function(e,t,n){this.originalError=n,Yi()(this,t||{})})),xs={},ws=new rs.a,Cs=[function(e){return"paths"===e[0]&&"responses"===e[3]&&"examples"===e[5]},function(e){return"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"example"===e[7]},function(e){return"paths"===e[0]&&"responses"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9]},function(e){return"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"example"===e[6]},function(e){return"paths"===e[0]&&"requestBody"===e[3]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8]},function(e){return"paths"===e[0]&&"parameters"===e[2]&&"example"===e[4]},function(e){return"paths"===e[0]&&"parameters"===e[3]&&"example"===e[5]},function(e){return"paths"===e[0]&&"parameters"===e[2]&&"examples"===e[4]&&"value"===e[6]},function(e){return"paths"===e[0]&&"parameters"===e[3]&&"examples"===e[5]&&"value"===e[7]},function(e){return"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"example"===e[6]},function(e){return"paths"===e[0]&&"parameters"===e[2]&&"content"===e[4]&&"examples"===e[6]&&"value"===e[8]},function(e){return"paths"===e[0]&&"parameters"===e[3]&&"content"===e[4]&&"example"===e[7]},function(e){return"paths"===e[0]&&"parameters"===e[3]&&"content"===e[5]&&"examples"===e[7]&&"value"===e[9]}],As={key:"$ref",plugin:function(e,t,n,r){var o=r.getInstance(),i=Si()(n).call(n,0,-1);if(!gs(i)&&(a=i,!Cs.some((function(e){return e(a)})))){var a,s=r.getContext(n).baseDoc;if("string"!=typeof e)return new bs("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:s,fullPath:n});var l,c,u,f=js(e),p=f[0],d=f[1]||"";try{l=s||p?Ss(p,s):null}catch(t){return Es(t,{pointer:d,$ref:e,basePath:l,fullPath:n})}if(function(e,t,n,r){var o,i,a=ws.get(r);a||(a={},ws.set(r,a));var s=function(e){if(0===e.length)return"";return"/".concat(zo()(e).call(e,Ls).join("/"))}(n),l=$o()(o="".concat(t||"<specmap-base>","#")).call(o,e),c=s.replace(/allOf\/\d+\/?/g,""),u=r.contextTree.get([]).baseDoc;if(t==u&&Ns(c,e))return!0;var f="";if(n.some((function(e){var t;return f=$o()(t="".concat(f,"/")).call(t,Ls(e)),a[f]&&a[f].some((function(e){return Ns(e,l)||Ns(l,e)}))})))return!0;return void(a[c]=$o()(i=a[c]||[]).call(i,l))}(d,l,i,r)&&!o.useCircularStructures){var h=ms(e,l);return e===h?null:Ba.replace(n,h)}if(null==l?(u=Is(d),void 0===(c=r.get(u))&&(c=new bs("Could not resolve reference: ".concat(e),{pointer:d,$ref:e,baseDoc:s,fullPath:n}))):c=null!=(c=Ts(l,d)).__value?c.__value:c.catch((function(t){throw Es(t,{pointer:d,$ref:e,baseDoc:s,fullPath:n})})),c instanceof Error)return[Ba.remove(n),c];var v=ms(e,l),g=Ba.replace(i,c,{$$ref:v});if(l&&l!==s)return[g,Ba.context(i,{baseDoc:l})];try{if(!function(e,t){var n=[e];return t.path.reduce((function(e,t){return n.push(e[t]),e[t]}),e),function e(t){return Ba.isObject(t)&&(n.indexOf(t)>=0||qo()(t).some((function(n){return e(t[n])})))}(t.value)}(r.state,g)||o.useCircularStructures)return g}catch(e){return null}}}},ks=Yi()(As,{docCache:xs,absoluteify:Ss,clearCache:function(e){void 0!==e?delete xs[e]:qo()(xs).forEach((function(e){delete xs[e]}))},JSONRefError:bs,wrapError:Es,getDoc:Ms,split:js,extractFromDoc:Ts,fetchJSON:function(e){return Object(os.fetch)(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((function(e){return e.text()})).then((function(e){return ti.a.safeLoad(e)}))},extract:Ps,jsonPointerToArray:Is,unescapeJsonPointerToken:Fs}),Os=ks;function Ss(e,t){if(!ys.test(e)){var n;if(!t)throw new bs($o()(n="Tried to resolve a relative URL, without having a basePath. path: '".concat(e,"' basePath: '")).call(n,t,"'"));return Ao.a.resolve(t,e)}return e}function Es(e,t){var n,r;e&&e.response&&e.response.body?n=$o()(r="".concat(e.response.body.code," ")).call(r,e.response.body.message):n=e.message;return new bs("Could not resolve reference: ".concat(n),t,e)}function js(e){return(e+"").split("#")}function Ts(e,t){var n=xs[e];if(n&&!Ba.isPromise(n))try{var r=Ps(t,n);return Yi()(Qi.a.resolve(r),{__value:r})}catch(e){return Qi.a.reject(e)}return Ms(e).then((function(e){return Ps(t,e)}))}function Ms(e){var t=xs[e];return t?Ba.isPromise(t)?t:Qi.a.resolve(t):(xs[e]=ks.fetchJSON(e).then((function(t){return xs[e]=t,t})),xs[e])}function Ps(e,t){var n=Is(e);if(n.length<1)return t;var r=Ba.getIn(t,n);if(void 0===r)throw new bs("Could not resolve pointer: ".concat(e," does not exist in document"),{pointer:e});return r}function Is(e){var t;if("string"!=typeof e)throw new TypeError("Expected a string, got a ".concat(Eo()(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:zo()(t=e.split("/")).call(t,Fs)}function Fs(e){return"string"!=typeof e?e:as.a.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function Ls(e){return as.a.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}function Ns(e,t){if(!(n=t)||"/"===n||"#"===n)return!0;var n,r=e.charAt(t.length),o=Si()(t).call(t,-1);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)&&"#"!==o}var _s=n(1135),Ds=n.n(_s),Rs={key:"allOf",plugin:function(e,t,n,r,o){if(!o.meta||!o.meta.$$ref){var i=Si()(n).call(n,0,-1);if(!gs(i)){if(!Array.isArray(e)){var a=new TypeError("allOf must be an array");return a.fullPath=n,a}var s=!1,l=o.value;if(i.forEach((function(e){l&&(l=l[e])})),l=mo()({},l),!Ds()(l)){delete l.allOf;var c,u=[];if(u.push(r.replace(i,{})),e.forEach((function(e,t){if(!r.isObject(e)){if(s)return null;s=!0;var o=new TypeError("Elements in allOf must be objects");return o.fullPath=n,u.push(o)}u.push(r.mergeDeep(i,e));var a=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.specmap,o=n.getBaseUrlForNodePath,i=void 0===o?function(e){var n;return r.getContext($o()(n=[]).call(n,ki()(t),ki()(e))).baseDoc}:o,a=n.targetKeys,s=void 0===a?["$ref","$$ref"]:a,l=[];return cs()(e).forEach((function(){if(No()(s).call(s,this.key)&&fs()(this.node)){var e=this.path,n=$o()(t).call(t,this.path),o=ms(this.node,i(e));l.push(r.replace(n,o))}})),l}(e,Si()(n).call(n,0,-1),{getBaseUrlForNodePath:function(e){var o;return r.getContext($o()(o=[]).call(o,ki()(n),[t],ki()(e))).baseDoc},specmap:r});u.push.apply(u,ki()(a))})),u.push(r.mergeDeep(i,l)),!l.$$ref)u.push(r.remove($o()(c=[]).call(c,i,"$$ref")));return u}}}}},Vs={key:"parameters",plugin:function(e,t,n,r){if(Array.isArray(e)&&e.length){var o=Yi()([],e),i=Si()(n).call(n,0,-1),a=mo()({},Ba.getIn(r.spec,i));return e.forEach((function(e,t){try{o[t].default=r.parameterMacro(a,e)}catch(e){var i=new Error(e);return i.fullPath=n,i}})),Ba.replace(n,o)}return Ba.replace(n,e)}},Bs={key:"properties",plugin:function(e,t,n,r){var o=mo()({},e);for(var i in e)try{o[i].default=r.modelPropertyMacro(o[i])}catch(e){var a=new Error(e);return a.fullPath=n,a}return Ba.replace(n,o)}},Us=function(){function e(t){li()(this,e),this.root=Ws(t||{})}return ui()(e,[{key:"set",value:function(e,t){var n=this.getParent(e,!0);if(n){var r=e[e.length-1],o=n.children;o[r]?zs(o[r],t,n):o[r]=Ws(t,n)}else zs(this.root,t,null)}},{key:"get",value:function(e){if((e=e||[]).length<1)return this.root.value;for(var t,n,r=this.root,o=0;o<e.length&&(n=e[o],(t=r.children)[n]);o+=1)r=t[n];return r&&r.protoValue}},{key:"getParent",value:function(e,t){return!e||e.length<1?null:e.length<2?this.root:Si()(e).call(e,0,-1).reduce((function(e,n){if(!e)return e;var r=e.children;return!r[n]&&t&&(r[n]=Ws(null,e)),r[n]}),this.root)}}]),e}();function Ws(e,t){return zs({children:{}},e,t)}function zs(e,t,n){return e.value=t||{},e.protoValue=n?mo()(mo()({},n.protoValue),e.value):e.value,qo()(e.children).forEach((function(t){var n=e.children[t];e.children[t]=zs(n,n.value,e)})),e}var Hs=function(){function e(t){var n,r,o=this;li()(this,e),Yi()(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new Us,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:Yi()(Object.create(this),Ba,{getInstance:function(){return o}}),allowMetaPatches:!1},t),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=Xo()(n=zo()(r=this.plugins).call(r,this.wrapPlugin.bind(this))).call(n,Ba.isFunction),this.patches.push(Ba.add([],this.spec)),this.patches.push(Ba.context([],this.context)),this.updatePatches(this.patches)}return ui()(e,[{key:"debug",value:function(e){if(this.debugLevel===e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=console).log.apply(t,r)}}},{key:"verbose",value:function(e){if("verbose"===this.debugLevel){for(var t,n,r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];(t=console).log.apply(t,$o()(n=["[".concat(e,"] ")]).call(n,o))}}},{key:"wrapPlugin",value:function(e,t){var n,r,o,i=this.pathDiscriminator,a=null;return e[this.pluginProp]?(a=e,n=e[this.pluginProp]):Ba.isFunction(e)?n=e:Ba.isObject(e)&&(r=e,o=function(e,t){return!Array.isArray(e)||e.every((function(e,n){return e===t[n]}))},n=Fo.a.mark((function e(t,n){var a,s,l,c,u,f;return Fo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:f=function(e,t,l){var c,u,p,d,h,v,g,m,y,b,x,w,C;return Fo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(Ba.isObject(e)){a.next=6;break}if(r.key!==t[t.length-1]){a.next=4;break}return a.next=4,r.plugin(e,r.key,t,n);case 4:a.next=30;break;case 6:c=t.length-1,u=t[c],p=t.indexOf("properties"),d="properties"===u&&c===p,h=n.allowMetaPatches&&s[e.$$ref],v=0,g=qo()(e);case 12:if(!(v<g.length)){a.next=30;break}if(m=g[v],y=e[m],b=$o()(t).call(t,m),x=Ba.isObject(y),w=e.$$ref,h){a.next=22;break}if(!x){a.next=22;break}return n.allowMetaPatches&&w&&(s[w]=!0),a.delegateYield(f(y,b,l),"t0",22);case 22:if(d||m!==r.key){a.next=27;break}if(C=o(i,t),i&&!C){a.next=27;break}return a.next=27,r.plugin(y,m,b,n,l);case 27:v++,a.next=12;break;case 30:case"end":return a.stop()}}),a)},a=Fo.a.mark(f),s={},l=Oo()(Xo()(t).call(t,Ba.isAdditiveMutation)),e.prev=4,l.s();case 6:if((c=l.n()).done){e.next=11;break}return u=c.value,e.delegateYield(f(u.value,u.path,u),"t0",9);case 9:e.next=6;break;case 11:e.next=16;break;case 13:e.prev=13,e.t1=e.catch(4),l.e(e.t1);case 16:return e.prev=16,l.f(),e.finish(16);case 19:case"end":return e.stop()}}),e,null,[[4,13,16,19]])}))),Yi()(n.bind(a),{pluginName:e.name||t,isGenerator:Ba.isGenerator(n)})}},{key:"nextPlugin",value:function(){var e=this;return na()(this.wrappedPlugins,(function(t){return e.getMutationsForPlugin(t).length>0}))}},{key:"nextPromisedPatch",value:function(){var e;if(this.promisedPatches.length>0)return Qi.a.race(zo()(e=this.promisedPatches).call(e,(function(e){return e.value})))}},{key:"getPluginHistory",value:function(e){var t=this.constructor.getPluginName(e);return this.pluginHistory[t]||[]}},{key:"getPluginRunCount",value:function(e){return this.getPluginHistory(e).length}},{key:"getPluginHistoryTip",value:function(e){var t=this.getPluginHistory(e);return t&&t[t.length-1]||{}}},{key:"getPluginMutationIndex",value:function(e){var t=this.getPluginHistoryTip(e).mutationIndex;return"number"!=typeof t?-1:t}},{key:"updatePluginHistory",value:function(e,t){var n=this.constructor.getPluginName(e);this.pluginHistory[n]=this.pluginHistory[n]||[],this.pluginHistory[n].push(t)}},{key:"updatePatches",value:function(e){var t=this;Ba.normalizeArray(e).forEach((function(e){if(e instanceof Error)t.errors.push(e);else try{if(!Ba.isObject(e))return void t.debug("updatePatches","Got a non-object patch",e);if(t.showDebug&&t.allPatches.push(e),Ba.isPromise(e.value))return t.promisedPatches.push(e),void t.promisedPatchThen(e);if(Ba.isContextPatch(e))return void t.setContext(e.path,e.value);if(Ba.isMutation(e))return void t.updateMutations(e)}catch(e){console.error(e),t.errors.push(e)}}))}},{key:"updateMutations",value:function(e){"object"===Eo()(e.value)&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value=mo()({},e.value));var t=Ba.applyPatch(this.state,e,{allowMetaPatches:this.allowMetaPatches});t&&(this.mutations.push(e),this.state=t)}},{key:"removePromisedPatch",value:function(e){var t,n=this.promisedPatches.indexOf(e);n<0?this.debug("Tried to remove a promisedPatch that isn't there!"):ea()(t=this.promisedPatches).call(t,n,1)}},{key:"promisedPatchThen",value:function(e){var t=this;return e.value=e.value.then((function(n){var r=mo()(mo()({},e),{},{value:n});t.removePromisedPatch(e),t.updatePatches(r)})).catch((function(n){t.removePromisedPatch(e),t.updatePatches(n)})),e.value}},{key:"getMutations",value:function(e,t){var n;return e=e||0,"number"!=typeof t&&(t=this.mutations.length),Si()(n=this.mutations).call(n,e,t)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(e){var t=this.getPluginMutationIndex(e);return this.getMutations(t+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(e){return Ba.getIn(this.state,e)}},{key:"_getContext",value:function(e){return this.contextTree.get(e)}},{key:"setContext",value:function(e,t){return this.contextTree.set(e,t)}},{key:"_hasRun",value:function(e){return this.getPluginRunCount(this.getCurrentPlugin())>(e||0)}},{key:"dispatch",value:function(){var e,t=this,n=this,r=this.nextPlugin();if(!r){var o=this.nextPromisedPatch();if(o)return o.then((function(){return t.dispatch()})).catch((function(){return t.dispatch()}));var i={spec:this.state,errors:this.errors};return this.showDebug&&(i.patches=this.allPatches),Qi.a.resolve(i)}if(n.pluginCount=n.pluginCount||{},n.pluginCount[r]=(n.pluginCount[r]||0)+1,n.pluginCount[r]>100)return Qi.a.resolve({spec:n.state,errors:$o()(e=n.errors).call(e,new Error("We've reached a hard limit of ".concat(100," plugin runs")))});if(r!==this.currentPlugin&&this.promisedPatches.length){var a,s=zo()(a=this.promisedPatches).call(a,(function(e){return e.value}));return Qi.a.all(zo()(s).call(s,(function(e){return e.then(oa.a,oa.a)}))).then((function(){return t.dispatch()}))}return function(){n.currentPlugin=r;var e=n.getCurrentMutations(),t=n.mutations.length-1;try{if(r.isGenerator){var o,i=Oo()(r(e,n.getLib()));try{for(i.s();!(o=i.n()).done;){l(o.value)}}catch(e){i.e(e)}finally{i.f()}}else{l(r(e,n.getLib()))}}catch(e){console.error(e),l([Yi()(Object.create(e),{plugin:r})])}finally{n.updatePluginHistory(r,{mutationIndex:t})}return n.dispatch()}();function l(e){e&&(e=Ba.fullyNormalizeArray(e),n.updatePatches(e,r))}}}],[{key:"getPluginName",value:function(e){return e.pluginName}},{key:"getPatchesOfType",value:function(e,t){return Xo()(e).call(e,t)}}]),e}();var qs={refs:Os,allOf:Rs,parameters:Vs,properties:Bs},Gs=n(593),$s=n.n(Gs),Ks=function(e){return String.prototype.toLowerCase.call(e)},Js=function(e){return e.replace(/[^\w]/gi,"_")};function Ys(e){var t=e.openapi;return!!t&&wo()(t,"3")}function Xs(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.v2OperationIdCompatibilityMode;if(!e||"object"!==Eo()(e))return null;var i=(e.operationId||"").replace(/\s/g,"");return i.length?Js(e.operationId):Qs(t,n,{v2OperationIdCompatibilityMode:o})}function Qs(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var i,a,s=$o()(i="".concat(t.toLowerCase(),"_")).call(i,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(s=s||$o()(a="".concat(e.substring(1),"_")).call(a,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return $o()(n="".concat(Ks(t))).call(n,Js(e))}function Zs(e,t){var n;return $o()(n="".concat(Ks(t),"-")).call(n,e)}function el(e,t){return e&&e.paths?function(e,t){return tl(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==Eo()(o))return!1;var i=o.operationId;return[Xs(o,n,r),Zs(n,r),i].some((function(e){return e&&e===t}))})):null}function tl(e,t,n){if(!e||"object"!==Eo()(e)||!e.paths||"object"!==Eo()(e.paths))return null;var r=e.paths;for(var o in r)for(var i in r[o])if("PARAMETERS"!==i.toUpperCase()){var a=r[o][i];if(a&&"object"===Eo()(a)){var s={spec:e,pathName:o,method:i.toUpperCase(),operation:a},l=t(s);if(n&&l)return s}}}function nl(e){var t=e.spec,n=t.paths,r={};if(!n||t.$$normalized)return e;for(var o in n){var i=n[o];if($s()(i)){var a=i.parameters,s=function(e){var n=i[e];if(!$s()(n))return"continue";var s=Xs(n,o,e);if(s){r[s]?r[s].push(n):r[s]=[n];var l=r[s];if(l.length>1)l.forEach((function(e,t){var n;e.__originalOperationId=e.__originalOperationId||e.operationId,e.operationId=$o()(n="".concat(s)).call(n,t+1)}));else if(void 0!==n.operationId){var c=l[0];c.__originalOperationId=c.__originalOperationId||n.operationId,c.operationId=s}}if("parameters"!==e){var u=[],f={};for(var p in t)"produces"!==p&&"consumes"!==p&&"security"!==p||(f[p]=t[p],u.push(f));if(a&&(f.parameters=a,u.push(f)),u.length){var d,h=Oo()(u);try{for(h.s();!(d=h.n()).done;){var v=d.value;for(var g in v)if(n[g]){if("parameters"===g){var m,y=Oo()(v[g]);try{var b=function(){var e=m.value;n[g].some((function(t){return t.name&&t.name===e.name||t.$ref&&t.$ref===e.$ref||t.$$ref&&t.$$ref===e.$$ref||t===e}))||n[g].push(e)};for(y.s();!(m=y.n()).done;)b()}catch(e){y.e(e)}finally{y.f()}}}else n[g]=v[g]}}catch(e){h.e(e)}finally{h.f()}}}};for(var l in i)s(l)}}return t.$$normalized=!0,e}function rl(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.requestInterceptor,r=t.responseInterceptor,o=e.withCredentials?"include":"same-origin";return function(t){return e({url:t,loadSpec:!0,requestInterceptor:n,responseInterceptor:r,headers:{Accept:"application/json, application/yaml"},credentials:o}).then((function(e){return e.body}))}}function ol(e){var t=e.fetch,n=e.spec,r=e.url,o=e.mode,i=e.allowMetaPatches,a=void 0===i||i,s=e.pathDiscriminator,l=e.modelPropertyMacro,c=e.parameterMacro,u=e.requestInterceptor,f=e.responseInterceptor,p=e.skipNormalization,d=e.useCircularStructures,h=e.http,v=e.baseDoc;return v=v||r,h=t||h||Fi,n?g(n):rl(h,{requestInterceptor:u,responseInterceptor:f})(v).then(g);function g(e){v&&(qs.refs.docCache[v]=e),qs.refs.fetchJSON=rl(h,{requestInterceptor:u,responseInterceptor:f});var t,n=[qs.refs];return"function"==typeof c&&n.push(qs.parameters),"function"==typeof l&&n.push(qs.properties),"strict"!==o&&n.push(qs.allOf),(t={spec:e,context:{baseDoc:v},plugins:n,allowMetaPatches:a,pathDiscriminator:s,parameterMacro:c,modelPropertyMacro:l,useCircularStructures:d},new Hs(t).dispatch()).then(p?function(){var e=Po()(Fo.a.mark((function e(t){return Fo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}():nl)}}var il=n(666),al=n.n(il);function sl(){return(sl=Po()(Fo.a.mark((function e(t,n){var r,o,i,a,s,l,c,u,f,p,d,h,v=arguments;return Fo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>2&&void 0!==v[2]?v[2]:{},o=r.returnEntireTree,i=r.baseDoc,a=r.requestInterceptor,s=r.responseInterceptor,l=r.parameterMacro,c=r.modelPropertyMacro,u=r.useCircularStructures,f={pathDiscriminator:n,baseDoc:i,requestInterceptor:a,responseInterceptor:s,parameterMacro:l,modelPropertyMacro:c,useCircularStructures:u},p=nl({spec:t}),d=p.spec,e.next=6,ol(mo()(mo()({},f),{},{spec:d,allowMetaPatches:!0,skipNormalization:!0}));case 6:return h=e.sent,!o&&Array.isArray(n)&&n.length&&(h.spec=al()(h.spec,n)||null),e.abrupt("return",h);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ll=function(){return null},cl={mapTagOperations:function(e){var t=e.spec,n=e.cb,r=void 0===n?ll:n,o=e.defaultTag,i=void 0===o?"default":o,a=e.v2OperationIdCompatibilityMode,s={},l={};return tl(t,(function(e){var n,o=e.pathName,c=e.method,u=e.operation;(u.tags?(n=u.tags,Array.isArray(n)?n:[n]):[i]).forEach((function(e){if("string"==typeof e){l[e]=l[e]||{};var n,i=l[e],f=Xs(u,o,c,{v2OperationIdCompatibilityMode:a}),p=r({spec:t,pathName:o,method:c,operation:u,operationId:f});if(s[f])s[f]+=1,i[$o()(n="".concat(f)).call(n,s[f])]=p;else if(void 0!==i[f]){var d,h,v=s[f]||1;s[f]=v+1,i[$o()(d="".concat(f)).call(d,s[f])]=p;var g=i[f];delete i[f],i[$o()(h="".concat(f)).call(h,v)]=g}else i[f]=p}}))})),l},makeExecute:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t){var n=t.pathName,r=t.method,o=t.operationId;return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.execute(mo()(mo()({spec:e.spec},ri()(e,"requestInterceptor","responseInterceptor","userFetch")),{},{pathName:n,method:r,parameters:t,operationId:o},i))}}}};var ul=n(1136),fl=n.n(ul),pl=n(792),dl=n.n(pl),hl=n(583),vl=n.n(hl),gl=n(1142),ml=n.n(gl),yl={body:function(e){var t=e.req,n=e.value;t.body=n},header:function(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{},void 0!==r&&(t.headers[n.name]=r)},query:function(e){var t=e.req,n=e.value,r=e.parameter;t.query=t.query||{},!1===n&&"boolean"===r.type&&(n="false");0===n&&["number","integer"].indexOf(r.type)>-1&&(n="0");if(n)t.query[r.name]={collectionFormat:r.collectionFormat,value:n};else if(r.allowEmptyValue&&void 0!==n){var o=r.name;t.query[o]=t.query[o]||{},t.query[o].allowEmptyValue=!0}},path:function(e){var t=e.req,n=e.value,r=e.parameter;t.url=t.url.split("{".concat(r.name,"}")).join(encodeURIComponent(n))},formData:function(e){var t=e.req,n=e.value,r=e.parameter;(n||r.allowEmptyValue)&&(t.form=t.form||{},t.form[r.name]={value:n,allowEmptyValue:r.allowEmptyValue,collectionFormat:r.collectionFormat})}};function bl(e,t){return No()(t).call(t,"application/json")?"string"==typeof e?e:Uo()(e):e.toString()}function xl(e){var t=e.req,n=e.value,r=e.parameter,o=r.name,i=r.style,a=r.explode,s=r.content;if(s){var l=qo()(s)[0];t.url=t.url.split("{".concat(o,"}")).join(Mi(bl(n,l),{escape:!0}))}else{var c=Pi({key:r.name,value:n,style:i||"simple",explode:a||!1,escape:!0});t.url=t.url.split("{".concat(o,"}")).join(c)}}function wl(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},r.content){var o=qo()(r.content)[0];t.query[r.name]=bl(n,o)}else if(!1===n&&(n="false"),0===n&&(n="0"),n)t.query[r.name]={value:n,serializationOption:ri()(r,["style","explode","allowReserved"])};else if(r.allowEmptyValue&&void 0!==n){var i=r.name;t.query[i]=t.query[i]||{},t.query[i].allowEmptyValue=!0}}var Cl=["accept","authorization","content-type"];function Al(e){var t=e.req,n=e.parameter,r=e.value;if(t.headers=t.headers||{},!(Cl.indexOf(n.name.toLowerCase())>-1))if(n.content){var o=qo()(n.content)[0];t.headers[n.name]=bl(r,o)}else void 0!==r&&(t.headers[n.name]=Pi({key:n.name,value:r,style:n.style||"simple",explode:void 0!==n.explode&&n.explode,escape:!1}))}function kl(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{};var o=Eo()(r);if(n.content){var i,a=qo()(n.content)[0];t.headers.Cookie=$o()(i="".concat(n.name,"=")).call(i,bl(r,a))}else if("undefined"!==o){var s="object"===o&&!Array.isArray(r)&&n.explode?"":"".concat(n.name,"=");t.headers.Cookie=s+Pi({key:n.name,value:r,escape:!1,style:n.style||"form",explode:void 0!==n.explode&&n.explode})}}var Ol=n(793),Sl=n.n(Ol);function El(e,t){var n=e.operation,r=e.requestBody,o=e.securities,i=e.spec,a=e.attachContentTypeForEmptyPayload,s=e.requestContentType;t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,s=bo()({},t),l=r.authorized,c=void 0===l?{}:l,u=i.security||a.security||[],f=c&&!!qo()(c).length,p=al()(a,["components","securitySchemes"])||{};if(s.headers=s.headers||{},s.query=s.query||{},!qo()(r).length||!f||!u||Array.isArray(i.security)&&!i.security.length)return t;return u.forEach((function(e){qo()(e).forEach((function(e){var t=c[e],n=p[e];if(t){var r=t.value||t,o=n.type;if(t)if("apiKey"===o)"query"===n.in&&(s.query[n.name]=r),"header"===n.in&&(s.headers[n.name]=r),"cookie"===n.in&&(s.cookies[n.name]=r);else if("http"===o){if(/^basic$/i.test(n.scheme)){var i,a=r.username||"",l=r.password||"",u=Sl()($o()(i="".concat(a,":")).call(i,l));s.headers.Authorization="Basic ".concat(u)}/^bearer$/i.test(n.scheme)&&(s.headers.Authorization="Bearer ".concat(r))}else if("oauth2"===o||"openIdConnect"===o){var f,d=t.token||{},h=d[n["x-tokenName"]||"access_token"],v=d.token_type;v&&"bearer"!==v.toLowerCase()||(v="Bearer"),s.headers.Authorization=$o()(f="".concat(v," ")).call(f,h)}}}))})),s}({request:t,securities:o,operation:n,spec:i});var l=n.requestBody||{},c=qo()(l.content||{}),u=s&&c.indexOf(s)>-1;if(r||a){if(s&&u)t.headers["Content-Type"]=s;else if(!s){var f=c[0];f&&(t.headers["Content-Type"]=f,s=f)}}else s&&u&&(t.headers["Content-Type"]=s);if(!e.responseContentType&&n.responses){var p,d=Xo()(p=Jo()(n.responses)).call(p,(function(e){var t=To()(e,2),n=t[0],r=t[1],o=parseInt(n,10);return o>=200&&o<300&&dl()(r.content)})).reduce((function(e,t){var n=To()(t,2)[1];return $o()(e).call(e,qo()(n.content))}),[]);d.length>0&&(t.headers.accept=d.join(", "))}if(r)if(s){if(c.indexOf(s)>-1)if("application/x-www-form-urlencoded"===s||"multipart/form-data"===s)if("object"===Eo()(r)){var h=(l.content[s]||{}).encoding||{};t.form={},qo()(r).forEach((function(e){t.form[e]={value:r[e],encoding:h[e]||{}}}))}else t.form=r;else t.body=r}else t.body=r;return t}function jl(e,t){var n,r,o=e.spec,i=e.operation,a=e.securities,s=e.requestContentType,l=e.responseContentType,c=e.attachContentTypeForEmptyPayload;if((t=function(e){var t=e.request,n=e.securities,r=void 0===n?{}:n,o=e.operation,i=void 0===o?{}:o,a=e.spec,s=bo()({},t),l=r.authorized,c=void 0===l?{}:l,u=r.specSecurity,f=void 0===u?[]:u,p=i.security||f,d=c&&!!qo()(c).length,h=a.securityDefinitions;if(s.headers=s.headers||{},s.query=s.query||{},!qo()(r).length||!d||!p||Array.isArray(i.security)&&!i.security.length)return t;return p.forEach((function(e){qo()(e).forEach((function(e){var t=c[e];if(t){var n=t.token,r=t.value||t,o=h[e],i=o.type,a=o["x-tokenName"]||"access_token",l=n&&n[a],u=n&&n.token_type;if(t)if("apiKey"===i){var f="query"===o.in?"query":"headers";s[f]=s[f]||{},s[f][o.name]=r}else if("basic"===i)if(r.header)s.headers.authorization=r.header;else{var p,d=r.username||"",v=r.password||"";r.base64=Sl()($o()(p="".concat(d,":")).call(p,v)),s.headers.authorization="Basic ".concat(r.base64)}else if("oauth2"===i&&l){var g;u=u&&"bearer"!==u.toLowerCase()?u:"Bearer",s.headers.authorization=$o()(g="".concat(u," ")).call(g,l)}}}))})),s}({request:t,securities:a,operation:i,spec:o})).body||t.form||c)if(s)t.headers["Content-Type"]=s;else if(Array.isArray(i.consumes)){var u=To()(i.consumes,1);t.headers["Content-Type"]=u[0]}else if(Array.isArray(o.consumes)){var f=To()(o.consumes,1);t.headers["Content-Type"]=f[0]}else i.parameters&&Xo()(n=i.parameters).call(n,(function(e){return"file"===e.type})).length?t.headers["Content-Type"]="multipart/form-data":i.parameters&&Xo()(r=i.parameters).call(r,(function(e){return"formData"===e.in})).length&&(t.headers["Content-Type"]="application/x-www-form-urlencoded");else if(s){var p,d,h=i.parameters&&Xo()(p=i.parameters).call(p,(function(e){return"body"===e.in})).length>0,v=i.parameters&&Xo()(d=i.parameters).call(d,(function(e){return"formData"===e.in})).length>0;(h||v)&&(t.headers["Content-Type"]=s)}return!l&&Array.isArray(i.produces)&&i.produces.length>0&&(t.headers.accept=i.produces.join(", ")),t}var Tl=function(e){return Array.isArray(e)?e:[]},Ml=ss("OperationNotFoundError",(function(e,t,n){this.originalError=n,Yi()(this,t||{})})),Pl={buildRequest:Il};function Il(e){var t,n,r=e.spec,o=e.operationId,a=e.responseContentType,s=e.scheme,l=e.requestInterceptor,c=e.responseInterceptor,u=e.contextUrl,f=e.userFetch,p=e.server,d=e.serverVariables,h=e.http,v=e.parameters,g=e.parameterBuilders,m=Ys(r);g||(g=m?i:yl);var y={url:"",credentials:h&&h.withCredentials?"include":"same-origin",headers:{},cookies:{}};l&&(y.requestInterceptor=l),c&&(y.responseInterceptor=c),f&&(y.userFetch=f);var b=el(r,o);if(!b)throw new Ml("Operation ".concat(o," not found"));var x=b.operation,w=void 0===x?{}:x,C=b.method,A=b.pathName;if(y.url+=Ll({spec:r,scheme:s,contextUrl:u,server:p,serverVariables:d,pathName:A,method:C}),!o)return delete y.cookies,y;y.url+=A,y.method="".concat(C).toUpperCase(),v=v||{};var k=r.paths[A]||{};a&&(y.headers.accept=a);var O=function(e){var t={};e.forEach((function(e){t[e.in]||(t[e.in]={}),t[e.in][e.name]=e}));var n=[];return qo()(t).forEach((function(e){qo()(t[e]).forEach((function(r){n.push(t[e][r])}))})),n}($o()(t=$o()(n=[]).call(n,Tl(w.parameters))).call(t,Tl(k.parameters)));O.forEach((function(e){var t,n,o=g[e.in];if("body"===e.in&&e.schema&&e.schema.properties&&(t=v),void 0===(t=e&&e.name&&v[e.name]))t=e&&e.name&&v[$o()(n="".concat(e.in,".")).call(n,e.name)];else if(function(e,t){return Xo()(t).call(t,(function(t){return t.name===e}))}(e.name,O).length>1){var i;console.warn($o()(i="Parameter '".concat(e.name,"' is ambiguous because the defined spec has more than one parameter with the name: '")).call(i,e.name,"' and the passed-in parameter values did not define an 'in' value."))}if(null!==t){if(void 0!==e.default&&void 0===t&&(t=e.default),void 0===t&&e.required&&!e.allowEmptyValue)throw new Error("Required parameter ".concat(e.name," is not provided"));if(m&&e.schema&&"object"===e.schema.type&&"string"==typeof t)try{t=JSON.parse(t)}catch(e){throw new Error("Could not parse object parameter value string as JSON")}o&&o({req:y,parameter:e,value:t,operation:w,spec:r})}}));var S=mo()(mo()({},e),{},{operation:w});if((y=m?El(S,y):jl(S,y)).cookies&&qo()(y.cookies).length){var E=qo()(y.cookies).reduce((function(e,t){var n=y.cookies[t];return e+(e?"&":"")+ml.a.serialize(t,n)}),"");y.headers.Cookie=E}return y.cookies&&delete y.cookies,Ki(y),y}var Fl=function(e){return e?e.replace(/\W/g,""):null};function Ll(e){return Ys(e.spec)?function(e){var t=e.spec,n=e.pathName,r=e.method,o=e.server,i=e.contextUrl,a=e.serverVariables,s=void 0===a?{}:a,l=al()(t,["paths",n,(r||"").toLowerCase(),"servers"])||al()(t,["paths",n,"servers"])||al()(t,["servers"]),c="",u=null;if(o&&l&&l.length){var f=zo()(l).call(l,(function(e){return e.url}));f.indexOf(o)>-1&&(c=o,u=l[f.indexOf(o)])}if(!c&&l&&l.length){c=l[0].url;var p=To()(l,1);u=p[0]}if(c.indexOf("{")>-1){(function(e){var t,n=[],r=/{([^}]+)}/g;for(;t=r.exec(e);)n.push(t[1]);return n})(c).forEach((function(e){if(u.variables&&u.variables[e]){var t=u.variables[e],n=s[e]||t.default,r=new RegExp("{".concat(e,"}"),"g");c=c.replace(r,n)}}))}return function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=n&&r?Ao.a.parse(Ao.a.resolve(r,n)):Ao.a.parse(n),i=Ao.a.parse(r),a=Fl(o.protocol)||Fl(i.protocol)||"",s=o.host||i.host,l=o.pathname||"";e=a&&s?$o()(t="".concat(a,"://")).call(t,s+l):l;return"/"===e[e.length-1]?Si()(e).call(e,0,-1):e}(c,i)}(e):function(e){var t,n,r=e.spec,o=e.scheme,i=e.contextUrl,a=void 0===i?"":i,s=Ao.a.parse(a),l=Array.isArray(r.schemes)?r.schemes[0]:null,c=o||l||Fl(s.protocol)||"http",u=r.host||s.host||"",f=r.basePath||"";t=c&&u?$o()(n="".concat(c,"://")).call(n,u+f):f;return"/"===t[t.length-1]?Si()(t).call(t,0,-1):t}(e)}function Nl(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e?n.url=e:n=e,!(this instanceof Nl))return new Nl(n);bo()(this,n);var r=this.resolve().then((function(){return t.disableInterfaces||bo()(t,Nl.makeApisTagOperation(t)),t}));return r.client=this,r}Nl.http=Fi,Nl.makeHttp=function(e,t,n){return n=n||function(e){return e},t=t||function(e){return e},function(r){return"string"==typeof r&&(r={url:r}),Ii.mergeInQueryOrForm(r),r=t(r),n(e(r))}}.bind(null,Nl.http),Nl.resolve=ol,Nl.resolveSubtree=function(e,t){return sl.apply(this,arguments)},Nl.execute=function(e){var t=e.http,n=e.fetch,r=e.spec,o=e.operationId,i=e.pathName,a=e.method,s=e.parameters,l=e.securities,c=fl()(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),u=t||n||Fi;i&&a&&!o&&(o=Zs(i,a));var f=Pl.buildRequest(mo()({spec:r,operationId:o,parameters:s,securities:l,http:u},c));return f.body&&(dl()(f.body)||vl()(f.body))&&(f.body=Uo()(f.body)),u(f)},Nl.serializeRes=Di,Nl.serializeHeaders=Vi,Nl.clearCache=function(){qs.refs.clearCache()},Nl.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=cl.makeExecute(e);return{apis:cl.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},Nl.buildRequest=Il,Nl.helpers={opId:Xs},Nl.getBaseUrl=Ll,Nl.prototype={http:Fi,execute:function(e){return this.applyDefaults(),Nl.execute(mo()({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:"string"==typeof this.url?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},e))},resolve:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Nl.resolve(mo()({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},t)).then((function(t){return e.originalSpec=e.spec,e.spec=t.spec,e.errors=t.errors,e}))}},Nl.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&wo()(t,"http")){var n=Ao.a.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}};Nl.helpers;var _l=Nl,Dl=n(147),Rl=n(60);function Vl(e){return e.startsWith("//")?"https:"+e:e}var Bl={flex:1,display:"flex",flexDirection:"column"},Ul=function(e){function t(t){var r=e.call(this,t)||this;return Object.defineProperty(r,"formApi",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(r,"setFormApi",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.formApi=e,setTimeout((function(){r.setState({form:r.formApi.getState()})}),0)}}),Object.defineProperty(r,"handleChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.setState({form:e}),Object(L.h)(e)}}),Object.defineProperty(r,"handleTabChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.setState({activeTab:e})}}),Object.defineProperty(r,"handleServerChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.setState({server:e}),r.props.operation.setActiveServer(e)}}),Object.defineProperty(r,"handleExecute",{enumerable:!0,configurable:!0,writable:!0,value:function(){return Object(a.b)(r,void 0,void 0,(function(){var e,t,r,o,i,s,l,c,u,p,d,h,v,g,m,y,b,x,w,C,A,k,O,S,E,j,T,M,P,I,F,L,N,_,D,R,V=this;return Object(a.e)(this,(function(B){switch(B.label){case 0:if(o=this.props,i=o.store,s=o.operation,l=o.onResponse,this.formApi.submitForm(),c=this.formApi.getState(),u=c.values,c.invalid)return this.setState({shaking:!0}),setTimeout((function(){return V.setState({shaking:!1})}),1e3),null==i||null===(p=i.options.events)||void 0===p||null===(d=p.tryItSent)||void 0===d||d.call(p,{eventType:vo.a.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:s.operationId,operationPath:s.path,operationHttpVerb:s.httpVerb,operationSummary:s.description}),[2];if(h=this.props.operation.requestBody,v=h&&h.content&&h.content.active&&h.content.active.name||"",g=u.body,/json/.test(v))try{g=JSON.parse(g)}catch(e){console.error(e)}if(this.setState({loading:!0}),m=this.state.resolvedRawSpec,!(y=Object(f.f)(m,["paths",s.path,(s.httpVerb||"").toLowerCase(),"servers"])||Object(f.f)(m,["paths",s.path,"servers"])||Object(f.f)(m,["servers"])))throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");b=y.find((function(e){return V.state.server.url.endsWith(e.url.endsWith("/")?e.url.substring(0,e.url.length-1):e.url)})),x=Date.now(),w=!!window.document.documentMode,A=u.auth,u.auth?(k=Object.keys(u.auth)[0],O=Object(f.q)(k),C=Object(a.a)(Object(a.a)({},m),{components:Object(a.a)(Object(a.a)({},m.components),{securitySchemes:Object(a.a)(Object(a.a)({},m.components.securitySchemes),(D={},D[O]=Object(a.a)(Object(a.a)({},m.components.securitySchemes[O]),{type:"openIdConnect"===m.components.securitySchemes[O].type?"oauth2":m.components.securitySchemes[O].type}),D))})}),A=Object(a.a)(Object(a.a)({},A),((R={})[O]=A[k],R))):C=Object(a.a)({},m),(S=i.options.corsProxyUrl)&&m.servers&&m.servers.length&&(C.servers=m.servers.map((function(e){return Object(a.a)(Object(a.a)({},e),{url:S+Vl(e.url)})}))),(E=(null==h||null===(e=h.content)||void 0===e||null===(t=e.active)||void 0===t?void 0:t.name)||null)&&g&&or(E)&&(j=Object.values(g),g=j.length>1?j:j[0]),T=function(e,t){return function(n){return V.props.store.options.sendXUserAgentInTryIt&&(n.headers["X-User-Agent"]="Redocly Try it API console"),e?e(n,t):n}},M={userFetch:w&&n(790).fetch,server:S?S+Vl(b.url):b.url,serverVariables:this.state.server.variables,spec:C,pathName:s.path,method:s.httpVerb,parameters:Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},u.path),u.query),u.header),u.cookie),securities:{authorized:A},requestBody:g,requestContentType:E,responseContentType:(null===(r=u.header)||void 0===r?void 0:r.Accept)||null,requestInterceptor:T(i.options.requestInterceptor,s)},B.label=1;case 1:return B.trys.push([1,5,8,9]),[4,_l.execute(M)];case 2:return(P=B.sent())&&P.data instanceof Blob?(I=P,[4,P.data.text()]):[3,4];case 3:I.data=B.sent(),B.label=4;case 4:return null==l||l({request:M,response:P}),this.setState({response:P,error:void 0}),[3,9];case 5:return(F=B.sent())&&F.response&&F.response.data instanceof Blob?(L=F.response,[4,F.response.data.text()]):[3,7];case 6:L.data=B.sent(),null==l||l({request:M,response:F.response}),B.label=7;case 7:return this.setState({response:void 0,error:F}),[3,9];case 8:return this.setState({loading:!1,activeTab:1,time:Date.now()-x}),null==i||null===(N=i.options.events)||void 0===N||null===(_=N.tryItSent)||void 0===_||_.call(N,{eventType:vo.a.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:s.operationId,operationPath:s.path,operationHttpVerb:s.httpVerb,operationSummary:s.description}),[7];case 9:return[2]}}))}))}}),r.state={form:{values:{path:Object(L.e)(t.operation.parameters,"path"),cookie:Object(L.e)(t.operation.parameters,"cookie"),header:Object(L.e)(t.operation.parameters,"header"),query:Object(L.e)(t.operation.parameters,"query")}},shaking:!1,loading:!1,activeTab:0,server:{}},r}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"componentDidMount",{enumerable:!1,configurable:!0,writable:!0,value:function(){return Object(a.b)(this,void 0,void 0,(function(){var e,t,n,r,o;return Object(a.e)(this,(function(i){switch(i.label){case 0:return e=this.props,t=e.store,n=e.specIdx,r=e.operation,[4,t.dereferenceSpecForTryIt(n||0,r)];case 1:return o=i.sent(),this.setState({resolvedRawSpec:o}),this.formApi.setValues({}),[2]}}))}))}}),Object.defineProperty(t.prototype,"componentDidUpdate",{enumerable:!1,configurable:!0,writable:!0,value:function(e){e.operation!==this.props.operation&&this.setState({response:void 0,error:void 0,activeTab:0})}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.props,t=e.operation,n=e.className,r=e.rootElement,o=this.state,i=o.shaking,l=o.activeTab,c=o.form,u=o.response,f=o.loading,d=o.error,h=!(!u&&!d);return s.createElement(zl,{shaking:i,className:n,rootElement:r},s.createElement(U.c,null,s.createElement(wr,{active:l,hasResponse:h,onChange:this.handleTabChange}),this.props.onClose&&s.createElement(p.a,{onClick:this.props.onClose}," ✕ ")),s.createElement(p.b,{hidden:0!==l},this.renderRequest()),s.createElement(p.b,{hidden:1!==l},this.renderResponse()),s.createElement(ne,{hasResponse:h,params:c.values&&Object(a.a)({},c.values),operation:t,loading:f,execute:this.handleExecute}))}}),Object.defineProperty(t.prototype,"renderRequest",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t=this.props,n=t.operation,r=t.store,o=t.properties,i=t.securityDefaults,l=this.state,u=l.form,f=l.resolvedRawSpec,p=l.server,h=u.errors||{},v=h.path||h.cookie||h.header||h.query,g=f&&d.n.get(f,n.pointer),m=u.values&&u.values.auth&&Object.keys(u.values.auth)[0];m&&u.values.auth[m]||(m=void 0),!m||void 0===u.values.auth[m].token&&void 0===u.values.auth[m].client_id&&void 0===u.values.auth[m].client_secret||u.values.auth[m].token&&u.values.auth[m].token.access_token||(m=void 0),m&&null!=u.values.auth[m].username&&(u.values.auth[m].username&&u.values.auth[m].password||(m=void 0));var y=n.parameters||[],b=null==r||null===(e=r.options.hooks)||void 0===e?void 0:e.ReplaceTryItSecurityPanel;return f?s.createElement(s.Fragment,null,s.createElement(c.a,{onChange:this.handleChange,getApi:this.setFormApi,style:Object(a.a)(Object(a.a)({},Bl),{margin:0})},s.createElement(U.a,{initialActiveIdx:n.security.length&&m?1:0},n.security.length&&s.createElement(ql,{header:Object(uo.a)("tryItAuth"),"data-cy":"security-trigger",renderChildrenHidden:!0,error:!m&&!!h.auth,success:!!m},b?s.createElement(Hl,{field:"auth",validate:fo},(function(e){return s.createElement(Dl.a,{Hook:b,props:{server:p,operation:n,onChange:e,OAuth2:Rr}})})):s.createElement(ho,{formApi:this.formApi,form:u,operation:n,activeServer:p.url,authCorsProxyUrl:r.options.authCorsProxyUrl,securityDefaults:i}))||null,n.requestBody&&s.createElement(ql,{header:Object(uo.a)("tryItBody"),"data-cy":"body-trigger",renderChildrenHidden:!0,error:!!h.body},s.createElement(mr,{validate:Wl,console:this,body:n.requestBody,id:n.id,resolvedBody:g.requestBody,properties:o}))||null,y.length&&s.createElement(ql,{header:Object(uo.a)("tryItParameters"),"data-cy":"parameters-trigger",error:v,renderChildrenHidden:!0},s.createElement(B,{operation:n,values:u.values,errors:u.errors||{}}))||null)),s.createElement(N,{operation:n,onChange:this.handleServerChange})):"Loading..."}}),Object.defineProperty(t.prototype,"renderResponse",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.state,t=e.response,n=e.error,r=e.time;return s.createElement(he,{response:t,error:n,time:r})}}),t=Object(a.c)([u.a],t)}(s.Component);function Wl(){}function zl(e){var t=e.shaking,n=e.className,r=e.children,o=e.rootElement,i=Object(f.r)(o)[0];return s.createElement(p.c,{shaking:t,className:n,"data-cy":"console",fullWidth:null==i?void 0:i.width},r)}function Hl(e){var t=Object(c.c)(Object(a.a)({},e)),n=t.fieldApi,r=t.render,o=t.userProps,i=n.setValue,l=o.children;return r(s.createElement(s.Fragment,null,l(i)))}function ql(e){return s.createElement($l,Object(a.a)({},e,{header:function(t){var n=t.toggle,r=t.expanded;return s.createElement(U.f,{onClick:n,isExpanded:r,"data-cy":e["data-cy"]},s.createElement(U.k,null,s.createElement(U.j,null,e.header),s.createElement(d.S,{direction:r?"down":"right"})),e.error&&s.createElement(d.e,{size:"14px",color:"#ff908b"})||null,e.success&&s.createElement(d.q,{size:"14px",color:"#56ff26"})||null)}}))}var Gl,$l=Object(v.e)(U.g)(Gl||(Gl=Object(a.f)(["\n "," {\n color: white;\n border: 1px solid ",";\n padding: 10px;\n }\n\n "," path {\n fill: white;\n }\n\n "," {\n padding: 15px 10px;\n background-color: #3e4c59;\n border: 1px solid ",";\n border-top: 0;\n }\n"],["\n "," {\n color: white;\n border: 1px solid ",";\n padding: 10px;\n }\n\n "," path {\n fill: white;\n }\n\n "," {\n padding: 15px 10px;\n background-color: #3e4c59;\n border: 1px solid ",";\n border-top: 0;\n }\n"])),U.f,(function(e){return e.error?"#ff908b":"#89949f"}),d.S,Rl.a,(function(e){return e.error?"#ff908b":"#89949f"}))},function(e,t,n){"use strict";var r=n(576),o=n(608).f,i=n(723),a=n(573),s=n(621),l=n(585),c=n(582),u=function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,f,p,d,h,v,g,m,y=e.target,b=e.global,x=e.stat,w=e.proto,C=b?r:x?r[y]:(r[y]||{}).prototype,A=b?a:a[y]||(a[y]={}),k=A.prototype;for(p in t)n=!i(b?p:y+(x?".":"#")+p,e.forced)&&C&&c(C,p),h=A[p],n&&(v=e.noTargetGet?(m=o(C,p))&&m.value:C[p]),d=n&&v?v:t[p],n&&typeof h==typeof d||(g=e.bind&&n?s(d,r):e.wrap&&n?u(d):w&&"function"==typeof d?s(Function.call,d):d,(e.sham||d&&d.sham||h&&h.sham)&&l(g,"sham",!0),A[p]=g,w&&(c(a,f=y+"Prototype")||l(a,f,{}),a[f][p]=d,e.real&&k&&!k[p]&&l(k,p,d)))}},function(e,t){e.exports={}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(573),o=n(582),i=n(678),a=n(590).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});o(t,e)||a(t,e,{value:i.f(e)})}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(27))},function(e,t,n){var r=n(576),o=n(674),i=n(582),a=n(646),s=n(672),l=n(727),c=o("wks"),u=r.Symbol,f=l?u:u&&u.withoutSetter||a;e.exports=function(e){return i(c,e)&&(s||"string"==typeof c[e])||(s&&i(u,e)?c[e]=u[e]:c[e]=f("Symbol."+e)),c[e]}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){"use strict";var r=n(635),o=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===o.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=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===i.indexOf(this.kind))throw new r('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){var r=n(574);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(578);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(589),o={}.hasOwnProperty;e.exports=Object.hasOwn||function(e,t){return o.call(r(e),t)}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){e.exports=n(951)},function(e,t,n){var r=n(580),o=n(590),i=n(609);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(573);e.exports=function(e){return r[e+"Prototype"]}},function(e,t,n){var r=n(720),o=n(725),i=n(817),a=n(733),s=n(824),l=n(834),c=n(839),u=n(682),f=n(739);function p(e,t){var n=r(e);if(o){var s=o(e);t&&(s=i(s).call(s,(function(t){return a(e,t).enumerable}))),n.push.apply(n,s)}return n}e.exports=function(e){for(var t=1;t<arguments.length;t++){var n,r=null!=arguments[t]?arguments[t]:{};if(t%2)s(n=p(Object(r),!0)).call(n,(function(t){f(e,t,r[t])}));else if(l)c(e,l(r));else{var o;s(o=p(Object(r))).call(o,(function(t){u(e,t,a(r,t))}))}}return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(667),o=n(641);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(641);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(580),o=n(722),i=n(581),a=n(642),s=Object.defineProperty;t.f=r?s:function(e,t,n){if(i(e),t=a(t,!0),i(n),o)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r=n(573),o=n(576),i=function(e){return"function"==typeof e?e:void 0};e.exports=function(e,t){return arguments.length<2?i(r[e])||i(o[e]):r[e]&&r[e][t]||o[e]&&o[e][t]}},function(e,t,n){var r=n(742),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){e.exports=n(950)},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(655),o=n(908);function i(t){return"function"==typeof r&&"symbol"==typeof o?(e.exports=i=function(e){return typeof e},e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=i=function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.default=e.exports,e.exports.__esModule=!0),i(t)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},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),o=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),i=/Edge\/(\d+)/.exec(e),a=r||o||i,s=a&&(r?document.documentMode||6:+(i||o)[1]),l=!i&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!i&&/Chrome\//.test(e),f=/Opera\//.test(e),p=/Apple Computer/.test(navigator.vendor),d=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),h=/PhantomJS/.test(e),v=p&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),g=/Android/.test(e),m=v||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=v||/Mac/.test(t),b=/\bCrOS\b/.test(e),x=/win/i.test(t),w=f&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(f=!1,l=!0);var C=y&&(c||f&&(null==w||w<12.11)),A=n||a&&s>=9;function k(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var O,S=function(e,t){var n=e.className,r=k(t).exec(n);if(r){var o=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(o?r[1]+o:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function j(e,t){return E(e).appendChild(t)}function T(e,t,n,r){var o=document.createElement(e);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof t)o.appendChild(document.createTextNode(t));else if(t)for(var i=0;i<t.length;++i)o.appendChild(t[i]);return o}function M(e,t,n,r){var o=T(e,t,n,r);return o.setAttribute("role","presentation"),o}function P(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function I(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function F(e,t){var n=e.className;k(t).test(n)||(e.className+=(n?" ":"")+t)}function L(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!k(n[r]).test(t)&&(t+=" "+n[r]);return t}O=document.createRange?function(e,t,n,r){var o=document.createRange();return o.setEnd(r||e,n),o.setStart(e,t),o}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var N=function(e){e.select()};function _(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function D(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function R(e,t,n,r,o){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var i=r||0,a=o||0;;){var s=e.indexOf("\t",i);if(s<0||s>=t)return a+(t-i);a+=s-i,a+=n-a%n,i=s+1}}v?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=_(this.onTimeout,this)};function B(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}V.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},V.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var U={toString:function(){return"CodeMirror.Pass"}},W={scroll:!1},z={origin:"*mouse"},H={origin:"+move"};function q(e,t,n){for(var r=0,o=0;;){var i=e.indexOf("\t",r);-1==i&&(i=e.length);var a=i-r;if(i==e.length||o+a>=t)return r+Math.min(a,t-o);if(o+=i-r,r=i+1,(o+=n-o%n)>=t)return r}}var G=[""];function $(e){for(;G.length<=e;)G.push(K(G)+" ");return G[e]}function K(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function Y(){}function X(e,t){var n;return Object.create?n=Object.create(e):(Y.prototype=e,n=new Y),t&&D(t,n),n}var Q=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Z(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Q.test(e))}function ee(e,t){return t?!!(t.source.indexOf("\\w")>-1&&Z(e))||t.test(e):Z(e)}function te(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var ne=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function re(e){return e.charCodeAt(0)>=768&&ne.test(e)}function oe(e,t,n){for(;(n<0?t>0:t<e.length)&&re(e.charAt(t));)t+=n;return t}function ie(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var o=(t+n)/2,i=r<0?Math.ceil(o):Math.floor(o);if(i==t)return e(i)?t:n;e(i)?n=i:t=i+r}}var ae=null;function se(e,t,n){var r;ae=null;for(var o=0;o<e.length;++o){var i=e[o];if(i.from<t&&i.to>t)return o;i.to==t&&(i.from!=i.to&&"before"==n?r=o:ae=o),i.from==t&&(i.from!=i.to&&"before"!=n?r=o:ae=o)}return null!=r?r:ae}var le=function(){var e=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,t=/[stwN]/,n=/[LRr]/,r=/[Lb1n]/,o=/[1n]/;function i(e,t,n){this.level=e,this.from=t,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!e.test(a))return!1;for(var c,u=a.length,f=[],p=0;p<u;++p)f.push((c=a.charCodeAt(p))<=247?"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(c):1424<=c&&c<=1524?"R":1536<=c&&c<=1785?"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(c-1536):1774<=c&&c<=2220?"r":8192<=c&&c<=8203?"w":8204==c?"b":"L");for(var d=0,h=l;d<u;++d){var v=f[d];"m"==v?f[d]=h:h=v}for(var g=0,m=l;g<u;++g){var y=f[g];"1"==y&&"r"==m?f[g]="n":n.test(y)&&(m=y,"r"==y&&(f[g]="R"))}for(var b=1,x=f[0];b<u-1;++b){var w=f[b];"+"==w&&"1"==x&&"1"==f[b+1]?f[b]="1":","!=w||x!=f[b+1]||"1"!=x&&"n"!=x||(f[b]=x),x=w}for(var C=0;C<u;++C){var A=f[C];if(","==A)f[C]="N";else if("%"==A){var k=void 0;for(k=C+1;k<u&&"%"==f[k];++k);for(var O=C&&"!"==f[C-1]||k<u&&"1"==f[k]?"1":"N",S=C;S<k;++S)f[S]=O;C=k-1}}for(var E=0,j=l;E<u;++E){var T=f[E];"L"==j&&"1"==T?f[E]="L":n.test(T)&&(j=T)}for(var M=0;M<u;++M)if(t.test(f[M])){var P=void 0;for(P=M+1;P<u&&t.test(f[P]);++P);for(var I="L"==(M?f[M-1]:l),F=I==("L"==(P<u?f[P]:l))?I?"L":"R":l,L=M;L<P;++L)f[L]=F;M=P-1}for(var N,_=[],D=0;D<u;)if(r.test(f[D])){var R=D;for(++D;D<u&&r.test(f[D]);++D);_.push(new i(0,R,D))}else{var V=D,B=_.length,U="rtl"==s?1:0;for(++D;D<u&&"L"!=f[D];++D);for(var W=V;W<D;)if(o.test(f[W])){V<W&&(_.splice(B,0,new i(1,V,W)),B+=U);var z=W;for(++W;W<D&&o.test(f[W]);++W);_.splice(B,0,new i(2,z,W)),B+=U,V=W}else++W;V<D&&_.splice(B,0,new i(1,V,D))}return"ltr"==s&&(1==_[0].level&&(N=a.match(/^\s+/))&&(_[0].from=N[0].length,_.unshift(new i(0,0,N[0].length))),1==K(_).level&&(N=a.match(/\s+$/))&&(K(_).to-=N[0].length,_.push(new i(0,u-N[0].length,u)))),"rtl"==s?_.reverse():_}}();function ce(e,t){var n=e.order;return null==n&&(n=e.order=le(e.text,t)),n}var ue=[],fe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||ue).concat(n)}};function pe(e,t){return e._handlers&&e._handlers[t]||ue}function de(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,o=r&&r[t];if(o){var i=B(o,n);i>-1&&(r[t]=o.slice(0,i).concat(o.slice(i+1)))}}}function he(e,t){var n=pe(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o<n.length;++o)n[o].apply(null,r)}function ve(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),he(e,n||t.type,e,t),we(t)||t.codemirrorIgnore}function ge(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==B(n,t[r])&&n.push(t[r])}function me(e,t){return pe(e,t).length>0}function ye(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){de(this,e,t)}}function be(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function xe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function we(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function Ce(e){be(e),xe(e)}function Ae(e){return e.target||e.srcElement}function ke(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 Oe,Se,Ee=function(){if(a&&s<9)return!1;var e=T("div");return"draggable"in e||"dragDrop"in e}();function je(e){if(null==Oe){var t=T("span","​");j(e,T("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Oe=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=Oe?T("span","​"):T("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Te(e){if(null!=Se)return Se;var t=j(e,document.createTextNode("AخA")),n=O(t,0,1).getBoundingClientRect(),r=O(t,1,2).getBoundingClientRect();return E(e),!(!n||n.left==n.right)&&(Se=r.right-n.right<3)}var Me,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var o=e.indexOf("\n",t);-1==o&&(o=e.length);var i=e.slice(t,"\r"==e.charAt(o-1)?o-1:o),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),t+=a+1):(n.push(i),t=o+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Ie=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Fe="oncopy"in(Me=T("div"))||(Me.setAttribute("oncopy","return;"),"function"==typeof Me.oncopy),Le=null,Ne={},_e={};function De(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Ne[e]=t}function Re(e){if("string"==typeof e&&_e.hasOwnProperty(e))e=_e[e];else if(e&&"string"==typeof e.name&&_e.hasOwnProperty(e.name)){var t=_e[e.name];"string"==typeof t&&(t={name:t}),(e=X(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return 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 Ve(e,t){t=Re(t);var n=Ne[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(Be.hasOwnProperty(t.name)){var o=Be[t.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Be={};function Ue(e,t){D(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function We(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function ze(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 qe=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 o=n.children[r],i=o.chunkSize();if(t<i){n=o;break}t-=i}return n.lines[t]}function $e(e,t,n){var r=[],o=t.line;return e.iter(t.line,n.line+1,(function(e){var i=e.text;o==n.line&&(i=i.slice(0,n.ch)),o==t.line&&(i=i.slice(t.ch)),r.push(i),++o})),r}function Ke(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Je(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Ye(e){if(null==e.parent)return null;for(var t=e.parent,n=B(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var o=0;r.children[o]!=t;++o)n+=r.children[o].chunkSize();return n+t.first}function Xe(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var o=e.children[r],i=o.height;if(t<i){e=o;continue e}t-=i,n+=o.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function Qe(e,t){return t>=e.first&&t<e.first+e.size}function Ze(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function et(e,t,n){if(void 0===n&&(n=null),!(this instanceof et))return new et(e,t,n);this.line=e,this.ch=t,this.sticky=n}function tt(e,t){return e.line-t.line||e.ch-t.ch}function nt(e,t){return e.sticky==t.sticky&&0==tt(e,t)}function rt(e){return et(e.line,e.ch)}function ot(e,t){return tt(e,t)<0?t:e}function it(e,t){return tt(e,t)<0?e:t}function at(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function st(e,t){if(t.line<e.first)return et(e.first,0);var n=e.first+e.size-1;return t.line>n?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 lt(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=st(e,t[r]);return n}qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=R(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},qe.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},qe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var o=function(e){return n?e.toLowerCase():e};if(o(this.string.substr(this.pos,e.length))==o(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ct=function(e,t){this.state=e,this.lookAhead=t},ut=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 ft(e,t,n,r){var o=[e.state.modeGen],i={};xt(e,t.text,e.doc.mode,n,(function(e,t){return o.push(e,t)}),i,r);for(var a=n.state,s=function(r){n.baseTokens=o;var s=e.state.overlays[r],l=1,c=0;n.state=!0,xt(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=o[l];r>e&&o.splice(l,1,e,o[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)o.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var i=o[n+1];o[n+1]=(i?i+" ":"")+"overlay "+t}}),i),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:o,classes:i.bgClass||i.textClass?i:null}}function pt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=dt(e,Ye(t)),o=t.text.length>e.options.maxHighlightLength&&We(e.doc.mode,r.state),i=ft(e,t,r);o&&(r.state=o),t.stateAfter=r.save(!o),t.styles=i.styles,i.classes?t.styleClasses=i.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,o=e.display;if(!r.mode.startState)return new ut(r,!0,t);var i=function(e,t,n){for(var r,o,i=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=i.first)return i.first;var l=Ge(i,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ct?c.lookAhead:0)<=i.modeFrontier))return s;var u=R(l.text,null,e.options.tabSize);(null==o||r>u)&&(o=s-1,r=u)}return o}(e,t,n),a=i>r.first&&Ge(r,i-1).stateAfter,s=a?ut.fromSaved(r,a,i):new ut(r,He(r.mode),i);return r.iter(i,t,(function(n){ht(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=o.viewFrom&&r<o.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function ht(e,t,n,r){var o=e.doc.mode,i=new qe(t,e.options.tabSize,n);for(i.start=i.pos=r||0,""==t&&vt(o,n.state);!i.eol();)gt(o,i,n.state),i.start=i.pos}function vt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=ze(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function gt(e,t,n,r){for(var o=0;o<10;o++){r&&(r[0]=ze(e,n).mode);var i=e.token(t,n);if(t.pos>t.start)return i}throw new Error("Mode "+e.name+" failed to advance stream.")}ut.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ut.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}},ut.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ut.fromSaved=function(e,t,n){return t instanceof ct?new ut(e,We(e.mode,t.state),n,t.lookAhead):new ut(e,We(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?We(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ct(t,this.maxLookAhead):t};var mt=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 o,i,a=e.doc,s=a.mode,l=Ge(a,(t=st(a,t)).line),c=dt(e,t.line,n),u=new qe(l.text,e.options.tabSize,c);for(r&&(i=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,o=gt(s,u,c.state),r&&i.push(new mt(u,o,We(a.mode,c.state)));return r?i:new mt(u,o,c.state)}function bt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function xt(e,t,n,r,o,i,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,f=new qe(t,e.options.tabSize,r),p=e.options.addModeClass&&[null];for(""==t&&bt(vt(n,r.state),i);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,a&&ht(e,t,r,f.pos),f.pos=t.length,l=null):l=bt(gt(n,f,r.state,p),i),p){var d=p[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||u!=l){for(;c<f.start;)o(c=Math.min(f.start,c+5e3),u);u=l}f.start=f.pos}for(;c<f.pos;){var h=Math.min(f.pos,c+5e3);o(h,u),c=h}}var wt=!1,Ct=!1;function At(e,t,n){this.marker=e,this.from=t,this.to=n}function kt(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function Ot(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function St(e,t){if(t.full)return null;var n=Qe(e,t.from.line)&&Ge(e,t.from.line).markedSpans,r=Qe(e,t.to.line)&&Ge(e,t.to.line).markedSpans;if(!n&&!r)return null;var o=t.from.ch,i=t.to.ch,a=0==tt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t)||i.from==t&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var s=null==i.to||(a.inclusiveRight?i.to>=t:i.to>t);(r||(r=[])).push(new At(a,i.from,s?null:i.to))}}return r}(n,o,a),l=function(e,t,n){var r;if(e)for(var o=0;o<e.length;++o){var i=e[o],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=t:i.to>t)||i.from==t&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=t:i.from<t);(r||(r=[])).push(new At(a,s?null:i.from-t,null==i.to?null:i.to-t))}}return r}(r,i,a),c=1==t.text.length,u=K(t.text).length+(c?o:0);if(s)for(var f=0;f<s.length;++f){var p=s[f];if(null==p.to){var d=kt(l,p.marker);d?c&&(p.to=null==d.to?null:d.to+u):p.to=o}}if(l)for(var h=0;h<l.length;++h){var v=l[h];null!=v.to&&(v.to+=u),null==v.from?kt(s,v.marker)||(v.from=u,c&&(s||(s=[])).push(v)):(v.from+=u,c&&(s||(s=[])).push(v))}s&&(s=Et(s)),l&&l!=s&&(l=Et(l));var g=[s];if(!c){var m,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(m||(m=[])).push(new At(s[b].marker,null,null));for(var x=0;x<y;++x)g.push(m);g.push(l)}return g}function Et(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function jt(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Tt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Mt(e){return e.inclusiveLeft?-1:0}function Pt(e){return e.inclusiveRight?1:0}function It(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),o=t.find(),i=tt(r.from,o.from)||Mt(e)-Mt(t);if(i)return-i;var a=tt(r.to,o.to)||Pt(e)-Pt(t);return a||t.id-e.id}function Ft(e,t){var n,r=Ct&&e.markedSpans;if(r)for(var o=void 0,i=0;i<r.length;++i)(o=r[i]).marker.collapsed&&null==(t?o.from:o.to)&&(!n||It(n,o.marker)<0)&&(n=o.marker);return n}function Lt(e){return Ft(e,!0)}function Nt(e){return Ft(e,!1)}function _t(e,t){var n,r=Ct&&e.markedSpans;if(r)for(var o=0;o<r.length;++o){var i=r[o];i.marker.collapsed&&(null==i.from||i.from<t)&&(null==i.to||i.to>t)&&(!n||It(n,i.marker)<0)&&(n=i.marker)}return n}function Dt(e,t,n,r,o){var i=Ge(e,t),a=Ct&&i.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=tt(c.from,n)||Mt(l.marker)-Mt(o),f=tt(c.to,r)||Pt(l.marker)-Pt(o);if(!(u>=0&&f<=0||u<=0&&f>=0)&&(u<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tt(c.to,n)>=0:tt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?tt(c.from,r)<=0:tt(c.from,r)<0)))return!0}}}function Rt(e){for(var t;t=Lt(e);)e=t.find(-1,!0).line;return e}function Vt(e,t){var n=Ge(e,t),r=Rt(n);return n==r?t:Ye(r)}function Bt(e,t){if(t>e.lastLine())return t;var n,r=Ge(e,t);if(!Ut(e,r))return t;for(;n=Nt(r);)r=n.find(1,!0).line;return Ye(r)+1}function Ut(e,t){var n=Ct&&t.markedSpans;if(n)for(var r=void 0,o=0;o<n.length;++o)if((r=n[o]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Wt(e,t,r))return!0}}function Wt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Wt(e,r.line,kt(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var o=void 0,i=0;i<t.markedSpans.length;++i)if((o=t.markedSpans[i]).marker.collapsed&&!o.marker.widgetNode&&o.from==n.to&&(null==o.to||o.to!=n.from)&&(o.marker.inclusiveLeft||n.marker.inclusiveRight)&&Wt(e,t,o))return!0}function zt(e){for(var t=0,n=(e=Rt(e)).parent,r=0;r<n.lines.length;++r){var o=n.lines[r];if(o==e)break;t+=o.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var s=i.children[a];if(s==n)break;t+=s.height}return t}function Ht(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Lt(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=Nt(r);){var i=t.find(0,!0);n-=r.text.length-i.from.ch,n+=(r=i.to.line).text.length-i.to.ch}return n}function qt(e){var t=e.display,n=e.doc;t.maxLine=Ge(n,n.first),t.maxLineLength=Ht(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=Ht(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Gt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function $t(e){e.parent=null,jt(e)}Gt.prototype.lineNo=function(){return Ye(this)},ye(Gt);var Kt={},Jt={};function Yt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Kt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Xt(e,t){var n=M("span",null,null,l?"padding-right: .1px":null),r={pre:M("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var o=0;o<=(t.rest?t.rest.length:0);o++){var i=o?t.rest[o-1]:t.line,a=void 0;r.pos=0,r.addToken=Zt,Te(e.display.measure)&&(a=ce(i,e.doc.direction))&&(r.addToken=en(r.addToken,a)),r.map=[],nn(i,r,pt(e,i,t!=e.display.externalMeasured&&Ye(i))),i.styleClasses&&(i.styleClasses.bgClass&&(r.bgClass=L(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=L(i.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(je(e.display.measure))),0==o?(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(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return he(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=L(r.pre.className,r.textClass||"")),r}function Qt(e){var t=T("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function Zt(e,t,n,r,o,i,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,r="",o=0;o<e.length;o++){var i=e.charAt(o);" "!=i||!n||o!=e.length-1&&32!=e.charCodeAt(o+1)||(i=" "),r+=i,n=" "==i}return r}(t,e.trailingSpace):t,f=e.cm.state.specialChars,p=!1;if(f.test(t)){c=document.createDocumentFragment();for(var d=0;;){f.lastIndex=d;var h=f.exec(t),v=h?h.index-d:t.length-d;if(v){var g=document.createTextNode(u.slice(d,d+v));a&&s<9?c.appendChild(T("span",[g])):c.appendChild(g),e.map.push(e.pos,e.pos+v,g),e.col+=v,e.pos+=v}if(!h)break;d+=v+1;var m=void 0;if("\t"==h[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=c.appendChild(T("span",$(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==h[0]||"\n"==h[0]?((m=c.appendChild(T("span","\r"==h[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",h[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(h[0])).setAttribute("cm-text",h[0]),a&&s<9?c.appendChild(T("span",[m])):c.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(p=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||o||p||i||l){var x=n||"";r&&(x+=r),o&&(x+=o);var w=T("span",[c],x,i);if(l)for(var C in l)l.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,l[C]);return e.content.appendChild(w)}e.content.appendChild(c)}}function en(e,t){return function(n,r,o,i,a,s,l){o=o?o+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var f=void 0,p=0;p<t.length&&!((f=t[p]).to>c&&f.from<=c);p++);if(f.to>=u)return e(n,r,o,i,a,s,l);e(n,r.slice(0,f.to-c),o,i,null,s,l),i=null,r=r.slice(f.to-c),c=f.to}}}function tn(e,t,n,r){var o=!r&&n.widgetNode;o&&e.map.push(e.pos,e.pos+t,o),!r&&e.cm.display.input.needsContentAttribute&&(o||(o=e.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(e.cm.display.input.setUneditable(o),e.content.appendChild(o)),e.pos+=t,e.trailingSpace=!1}function nn(e,t,n){var r=e.markedSpans,o=e.text,i=0;if(r)for(var a,s,l,c,u,f,p,d=o.length,h=0,v=1,g="",m=0;;){if(m==h){l=c=u=s="",p=null,f=null,m=1/0;for(var y=[],b=void 0,x=0;x<r.length;++x){var w=r[x],C=w.marker;if("bookmark"==C.type&&w.from==h&&C.widgetNode)y.push(C);else if(w.from<=h&&(null==w.to||w.to>h||C.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&m>w.to&&(m=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==h&&(u+=" "+C.startStyle),C.endStyle&&w.to==m&&(b||(b=[])).push(C.endStyle,w.to),C.title&&((p||(p={})).title=C.title),C.attributes)for(var A in C.attributes)(p||(p={}))[A]=C.attributes[A];C.collapsed&&(!f||It(f.marker,C)<0)&&(f=w)}else w.from>h&&m>w.from&&(m=w.from)}if(b)for(var k=0;k<b.length;k+=2)b[k+1]==m&&(c+=" "+b[k]);if(!f||f.from==h)for(var O=0;O<y.length;++O)tn(t,0,y[O]);if(f&&(f.from||0)==h){if(tn(t,(null==f.to?d+1:f.to)-h,f.marker,null==f.from),null==f.to)return;f.to==h&&(f=!1)}}if(h>=d)break;for(var S=Math.min(d,m);;){if(g){var E=h+g.length;if(!f){var j=E>S?g.slice(0,S-h):g;t.addToken(t,j,a?a+l:l,u,h+j.length==m?c:"",s,p)}if(E>=S){g=g.slice(S-h),h=S;break}h=E,u=""}g=o.slice(i,i=n[v++]),a=Yt(n[v++],t.cm.options)}}else for(var T=1;T<n.length;T+=2)t.addToken(t,o.slice(i,i=n[T]),Yt(n[T+1],t.cm.options))}function rn(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Nt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Ye(K(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ut(e,t)}function on(e,t,n){for(var r,o=[],i=t;i<n;i=r){var a=new rn(e.doc,Ge(e.doc,i),i);r=i+a.size,o.push(a)}return o}var an=null,sn=null;function ln(e,t){var n=pe(e,t);if(n.length){var r,o=Array.prototype.slice.call(arguments,2);an?r=an.delayedCallbacks:sn?r=sn:(r=sn=[],setTimeout(cn,0));for(var i=function(e){r.push((function(){return n[e].apply(null,o)}))},a=0;a<n.length;++a)i(a)}}function cn(){var e=sn;sn=null;for(var t=0;t<e.length;++t)e[t]()}function un(e,t,n,r){for(var o=0;o<t.changes.length;o++){var i=t.changes[o];"text"==i?dn(e,t):"gutter"==i?vn(e,t,n,r):"class"==i?hn(e,t):"widget"==i&&gn(e,t,r)}t.changes=null}function fn(e){return e.node==e.text&&(e.node=T("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function pn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Xt(e,t)}function dn(e,t){var n=t.text.className,r=pn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,hn(e,t)):n&&(t.text.className=n)}function hn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=fn(t);t.background=r.insertBefore(T("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?fn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function vn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var o=fn(t);t.gutterBackground=T("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),o.insertBefore(t.gutterBackground,t.text)}var i=t.line.gutterMarkers;if(e.options.lineNumbers||i){var a=fn(t),s=t.gutter=T("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(T("div",Ze(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=i.hasOwnProperty(c)&&i[c];u&&s.appendChild(T("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function gn(e,t,n){t.alignable&&(t.alignable=null);for(var r=k("CodeMirror-linewidget"),o=t.node.firstChild,i=void 0;o;o=i)i=o.nextSibling,r.test(o.className)&&t.node.removeChild(o);yn(e,t,n)}function mn(e,t,n,r){var o=pn(e,t);return t.text=t.node=o.pre,o.bgClass&&(t.bgClass=o.bgClass),o.textClass&&(t.textClass=o.textClass),hn(e,t),vn(e,t,n,r),yn(e,t,r),t.node}function yn(e,t,n){if(bn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)bn(e,t.rest[r],t,n,!1)}function bn(e,t,n,r,o){if(t.widgets)for(var i=fn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=T("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),xn(l,c,n,r),e.display.input.setUneditable(c),o&&l.above?i.insertBefore(c,n.gutter||n.text):i.appendChild(c),ln(l,"redraw")}}function xn(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var o=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(o-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=o+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function wn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!P(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),j(t.display.measure,T("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Cn(e,t){for(var n=Ae(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function An(e){return e.lineSpace.offsetTop}function kn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function On(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=j(e.measure,T("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function Sn(e){return 50-e.display.nativeBarWidth}function En(e){return e.display.scroller.clientWidth-Sn(e)-e.display.barWidth}function jn(e){return e.display.scroller.clientHeight-Sn(e)-e.display.barHeight}function Tn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var o=0;o<e.rest.length;o++)if(Ye(e.rest[o])>n)return{map:e.measure.maps[o],cache:e.measure.caches[o],before:!0}}function Mn(e,t,n,r){return Fn(e,In(e,t),n,r)}function Pn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[ur(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function In(e,t){var n=Ye(t),r=Pn(e,n);r&&!r.text?r=null:r&&r.changes&&(un(e,r,n,ir(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Ye(t=Rt(t)),r=e.display.externalMeasured=new rn(e.doc,t,n);r.lineN=n;var o=r.built=Xt(e,r);return r.text=o.pre,j(e.display.lineMeasure,o.pre),r}(e,t));var o=Tn(r,t,n);return{line:t,view:r,rect:null,map:o.map,cache:o.cache,before:o.before,hasHeights:!1}}function Fn(e,t,n,r,o){t.before&&(n=-1);var i,l=n+(r||"");return t.cache.hasOwnProperty(l)?i=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,o=r&&En(e);if(!t.measure.heights||r&&t.measure.width!=o){var i=t.measure.heights=[];if(r){t.measure.width=o;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(i=function(e,t,n,r){var o,i=_n(t.map,n,r),l=i.node,c=i.start,u=i.end,f=i.collapse;if(3==l.nodeType){for(var p=0;p<4;p++){for(;c&&re(t.line.text.charAt(i.coverStart+c));)--c;for(;i.coverStart+u<i.coverEnd&&re(t.line.text.charAt(i.coverStart+u));)++u;if((o=a&&s<9&&0==c&&u==i.coverEnd-i.coverStart?l.parentNode.getBoundingClientRect():Dn(O(l,c,u).getClientRects(),r)).left||o.right||0==c)break;u=c,c-=1,f="right"}a&&s<11&&(o=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Le)return Le;var t=j(e,T("span","x")),n=t.getBoundingClientRect(),r=O(t,0,1).getBoundingClientRect();return Le=Math.abs(n.left-r.left)>1}(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,o))}else{var d;c>0&&(f=r="right"),o=e.options.lineWrapping&&(d=l.getClientRects()).length>1?d["right"==r?d.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!o||!o.left&&!o.right)){var h=l.parentNode.getClientRects()[0];o=h?{left:h.left,right:h.left+or(e.display),top:h.top,bottom:h.bottom}:Nn}for(var v=o.top-t.rect.top,g=o.bottom-t.rect.top,m=(v+g)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var x=b?y[b-1]:0,w=y[b],C={left:("right"==f?o.right:o.left)-t.rect.left,right:("left"==f?o.left:o.right)-t.rect.left,top:x,bottom:w};return o.left||o.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=v,C.rbottom=g),C}(e,t,n,r)).bogus||(t.cache[l]=i)),{left:i.left,right:i.right,top:o?i.rtop:i.top,bottom:o?i.rbottom:i.bottom}}var Ln,Nn={left:0,right:0,top:0,bottom:0};function _n(e,t,n){for(var r,o,i,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(o=0,i=1,a="left"):t<l?i=1+(o=t-s):(c==e.length-3||t==l&&e[c+3]>t)&&(o=(i=l-s)-1,t>=l&&(a="right")),null!=o){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==o)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[2+(c-=3)],a="left";if("right"==n&&o==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:o,end:i,collapse:a,coverStart:s,coverEnd:l}}function Dn(e,t){var n=Nn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var o=e.length-1;o>=0&&(n=e[o]).left==n.right;o--);return n}function Rn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Vn(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)Rn(e.display.view[t])}function Bn(e){Vn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Un(){return u&&g?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Wn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function zn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=wn(e.widgets[n]));return t}function Hn(e,t,n,r,o){if(!o){var i=zn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=zt(t);if("local"==r?a+=An(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:Wn());var l=s.left+("window"==r?0:Un());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function qn(e,t,n){if("div"==n)return t;var r=t.left,o=t.top;if("page"==n)r-=Un(),o-=Wn();else if("local"==n||!n){var i=e.display.sizer.getBoundingClientRect();r+=i.left,o+=i.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:o-a.top}}function Gn(e,t,n,r,o){return r||(r=Ge(e.doc,t.line)),Hn(e,r,Mn(e,r,t.ch,o),n)}function $n(e,t,n,r,o,i){function a(t,a){var s=Fn(e,o,t,a?"right":"left",i);return a?s.left=s.right:s.right=s.left,Hn(e,r,s,n)}r=r||Ge(e.doc,t.line),o||(o=In(e,r));var s=ce(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var f=se(s,l,c),p=ae,d=u(l,f,"before"==c);return null!=p&&(d.other=u(l,p,"before"!=c)),d}function Kn(e,t){var n=0;t=st(e.doc,t),e.options.lineWrapping||(n=or(e.display)*t.ch);var r=Ge(e.doc,t.line),o=zt(r)+An(e.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Jn(e,t,n,r,o){var i=et(e,t,n);return i.xRel=o,r&&(i.outside=r),i}function Yn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var o=Xe(r,n),i=r.first+r.size-1;if(o>i)return Jn(r.first+r.size-1,Ge(r,i).text.length,null,1,1);t<0&&(t=0);for(var a=Ge(r,o);;){var s=er(e,a,o,t,n),l=_t(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==o)return c;a=Ge(r,o=c.line)}}function Xn(e,t,n,r){r-=zn(t);var o=t.text.length,i=ie((function(t){return Fn(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ie((function(t){return Fn(e,n,t).top>r}),i,o)}}function Qn(e,t,n,r){return n||(n=In(e,t)),Xn(e,t,n,Hn(e,t,Fn(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,o){o-=zt(t);var i=In(e,t),a=zn(t),s=0,l=t.text.length,c=!0,u=ce(t,e.doc.direction);if(u){var f=(e.options.lineWrapping?nr:tr)(e,t,n,i,u,r,o);s=(c=1!=f.level)?f.from:f.to-1,l=c?f.to:f.from-1}var p,d,h=null,v=null,g=ie((function(t){var n=Fn(e,i,t);return n.top+=a,n.bottom+=a,!!Zn(n,r,o,!1)&&(n.top<=o&&n.left<=r&&(h=t,v=n),!0)}),s,l),m=!1;if(v){var y=r-v.left<v.right-r,b=y==c;g=h+(b?0:1),d=b?"after":"before",p=y?v.left:v.right}else{c||g!=l&&g!=s||g++,d=0==g?"after":g==t.text.length?"before":Fn(e,i,g-(c?1:0)).bottom+a<=o==c?"after":"before";var x=$n(e,et(n,g,d),"line",t,i);p=x.left,m=o<x.top?-1:o>=x.bottom?1:0}return Jn(n,g=oe(t.text,g,1),d,m,r-p)}function tr(e,t,n,r,o,i,a){var s=ie((function(s){var l=o[s],c=1!=l.level;return Zn($n(e,et(n,c?l.to:l.from,c?"before":"after"),"line",t,r),i,a,!0)}),0,o.length-1),l=o[s];if(s>0){var c=1!=l.level,u=$n(e,et(n,c?l.from:l.to,c?"after":"before"),"line",t,r);Zn(u,i,a,!0)&&u.top>a&&(l=o[s-1])}return l}function nr(e,t,n,r,o,i,a){var s=Xn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,f=null,p=0;p<o.length;p++){var d=o[p];if(!(d.from>=c||d.to<=l)){var h=Fn(e,r,1!=d.level?Math.min(c,d.to)-1:Math.max(l,d.from)).right,v=h<i?i-h+1e9:h-i;(!u||f>v)&&(u=d,f=v)}}return u||(u=o[o.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function rr(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Ln){Ln=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Ln.appendChild(document.createTextNode("x")),Ln.appendChild(T("br"));Ln.appendChild(document.createTextNode("x"))}j(e.measure,Ln);var n=Ln.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),E(e.measure),n||1}function or(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=T("span","xxxxxxxxxx"),n=T("pre",[t],"CodeMirror-line-like");j(e.measure,n);var r=t.getBoundingClientRect(),o=(r.right-r.left)/10;return o>2&&(e.cachedCharWidth=o),o||10}function ir(e){for(var t=e.display,n={},r={},o=t.gutters.clientLeft,i=t.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=i.offsetLeft+i.clientLeft+o,r[s]=i.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/or(e.display)-3);return function(o){if(Ut(e.doc,o))return 0;var i=0;if(o.widgets)for(var a=0;a<o.widgets.length;a++)o.widgets[a].height&&(i+=o.widgets[a].height);return n?i+(Math.ceil(o.text.length/r)||1)*t:i+t}}function lr(e){var t=e.doc,n=sr(e);t.iter((function(e){var t=n(e);t!=e.height&&Je(e,t)}))}function cr(e,t,n,r){var o=e.display;if(!n&&"true"==Ae(t).getAttribute("cm-not-content"))return null;var i,a,s=o.lineSpace.getBoundingClientRect();try{i=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Yn(e,i,a);if(r&&c.xRel>0&&(l=Ge(e.doc,c.line).text).length==c.ch){var u=R(l,l.length,e.options.tabSize)-l.length;c=et(c.line,Math.max(0,Math.round((i-On(e.display).left)/or(e.display))-u))}return c}function ur(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function fr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var o=e.display;if(r&&n<o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>t)&&(o.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=o.viewTo)Ct&&Vt(e.doc,t)<o.viewTo&&dr(e);else if(n<=o.viewFrom)Ct&&Bt(e.doc,n+r)>o.viewFrom?dr(e):(o.viewFrom+=r,o.viewTo+=r);else if(t<=o.viewFrom&&n>=o.viewTo)dr(e);else if(t<=o.viewFrom){var i=hr(e,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):dr(e)}else if(n>=o.viewTo){var a=hr(e,t,t,-1);a?(o.view=o.view.slice(0,a.index),o.viewTo=a.lineN):dr(e)}else{var s=hr(e,t,t,-1),l=hr(e,n,n+r,1);s&&l?(o.view=o.view.slice(0,s.index).concat(on(e,s.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):dr(e)}var c=o.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(o.externalMeasured=null))}function pr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,o=e.display.externalMeasured;if(o&&t>=o.lineN&&t<o.lineN+o.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var i=r.view[ur(e,t)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==B(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 o,i=ur(e,t),a=e.display.view;if(!Ct||n==e.doc.first+e.doc.size)return{index:i,lineN:n};for(var s=e.display.viewFrom,l=0;l<i;l++)s+=a[l].size;if(s!=t){if(r>0){if(i==a.length-1)return null;o=s+a[i].size-t,i++}else o=s-t;t+=o,n+=o}for(;Vt(e.doc,n)!=n;){if(i==(r<0?0:a.length-1))return null;n+=r*a[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function vr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var o=t[r];o.hidden||o.node&&!o.changes||++n}return n}function gr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function mr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},o=r.cursors=document.createDocumentFragment(),i=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&yr(e,s.head,o),l||xr(e,s,i)}}return r}function yr(e,t,n){var r=$n(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),o=n.appendChild(T("div"," ","CodeMirror-cursor"));if(o.style.left=r.left+"px",o.style.top=r.top+"px",o.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",r.other){var i=n.appendChild(T("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));i.style.display="",i.style.left=r.other.left+"px",i.style.top=r.other.top+"px",i.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function br(e,t){return e.top-t.top||e.left-t.left}function xr(e,t,n){var r=e.display,o=e.doc,i=document.createDocumentFragment(),a=On(e.display),s=a.left,l=Math.max(r.sizerWidth,En(e)-r.sizer.offsetLeft)-a.right,c="ltr"==o.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),i.appendChild(T("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n height: "+(r-t)+"px"))}function f(t,n,r){var i,a,f=Ge(o,t),p=f.text.length;function d(n,r){return Gn(e,et(t,n),"div",f,r)}function h(t,n,r){var o=Qn(e,f,null,t),i="ltr"==n==("after"==r)?"left":"right";return d("after"==r?o.begin:o.end-(/\s/.test(f.text.charAt(o.end-1))?2:1),i)[i]}var v=ce(f,o.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var o=!1,i=0;i<e.length;++i){var a=e[i];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),o=!0)}o||r(t,n,"ltr")}(v,n||0,null==r?p:r,(function(e,t,o,f){var g="ltr"==o,m=d(e,g?"left":"right"),y=d(t-1,g?"right":"left"),b=null==n&&0==e,x=null==r&&t==p,w=0==f,C=!v||f==v.length-1;if(y.top-m.top<=3){var A=(c?x:b)&&C,k=(c?b:x)&&w?s:(g?m:y).left,O=A?l:(g?y:m).right;u(k,m.top,O-k,m.bottom)}else{var S,E,j,T;g?(S=c&&b&&w?s:m.left,E=c?l:h(e,o,"before"),j=c?s:h(t,o,"after"),T=c&&x&&C?l:y.right):(S=c?h(e,o,"before"):s,E=!c&&b&&w?l:m.right,j=!c&&x&&C?s:y.left,T=c?h(t,o,"after"):l),u(S,m.top,E-S,m.bottom),m.bottom<y.top&&u(s,m.bottom,null,y.top),u(j,y.top,T-j,y.bottom)}(!i||br(m,i)<0)&&(i=m),br(y,i)<0&&(i=y),(!a||br(m,a)<0)&&(a=m),br(y,a)<0&&(a=y)})),{start:i,end:a}}var p=t.from(),d=t.to();if(p.line==d.line)f(p.line,p.ch,d.ch);else{var h=Ge(o,p.line),v=Ge(o,d.line),g=Rt(h)==Rt(v),m=f(p.line,p.ch,g?h.text.length+1:null).end,y=f(d.line,g?0:null,d.ch).start;g&&(m.top<y.top-2?(u(m.right,m.top,null,m.bottom),u(s,y.top,y.left,y.bottom)):u(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&u(s,m.bottom,null,y.top)}n.appendChild(i)}function wr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Or(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Cr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||kr(e))}function Ar(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Or(e))}),100)}function kr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(he(e,"focus",e,t),e.state.focused=!0,F(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),wr(e))}function Or(e,t){e.state.delayingBlurEvent||(e.state.focused&&(he(e,"blur",e,t),e.state.focused=!1,S(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Sr(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=0;r<t.view.length;r++){var o=t.view[r],i=e.options.lineWrapping,l=void 0,c=0;if(!o.hidden){if(a&&s<8){var u=o.node.offsetTop+o.node.offsetHeight;l=u-n,n=u}else{var f=o.node.getBoundingClientRect();l=f.bottom-f.top,!i&&o.text.firstChild&&(c=o.text.firstChild.getBoundingClientRect().right-f.left-1)}var p=o.line.height-l;if((p>.005||p<-.005)&&(Je(o.line,l),Er(o.line),o.rest))for(var d=0;d<o.rest.length;d++)Er(o.rest[d]);if(c>e.display.sizerWidth){var h=Math.ceil(c/or(e.display));h>e.display.maxLineLength&&(e.display.maxLineLength=h,e.display.maxLine=o.line,e.display.maxLineChanged=!0)}}}}function Er(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function jr(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-An(e));var o=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,i=Xe(t,r),a=Xe(t,o);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<i?(i=s,a=Xe(t,zt(Ge(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(i=Xe(t,zt(Ge(t,l))-e.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function Tr(e,t){var n=e.display,r=rr(e.display);t.top<0&&(t.top=0);var o=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,i=jn(e),a={};t.bottom-t.top>i&&(t.bottom=t.top+i);var s=e.doc.height+kn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<o)a.scrollTop=l?0:t.top;else if(t.bottom>o+i){var u=Math.min(t.top,(c?s:t.bottom)-i);u!=o&&(a.scrollTop=u)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,p=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,d=En(e)-n.gutters.offsetWidth,h=t.right-t.left>d;return h&&(t.right=t.left+d),t.left<10?a.scrollLeft=0:t.left<p?a.scrollLeft=Math.max(0,t.left+f-(h?0:10)):t.right>d+p-3&&(a.scrollLeft=t.right+(h?0:10)-d),a}function Mr(e,t){null!=t&&(Fr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pr(e){Fr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Ir(e,t,n){null==t&&null==n||Fr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Fr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Lr(e,Kn(e,t.from),Kn(e,t.to),t.margin))}function Lr(e,t,n,r){var o=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Ir(e,o.scrollLeft,o.scrollTop)}function Nr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||lo(e,{top:t}),_r(e,t,!0),n&&lo(e),ro(e,100))}function _r(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Dr(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,fo(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+kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+Sn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Vr=function(e,t,n){this.cm=n;var r=this.vert=T("div",[T("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),o=this.horiz=T("div",[T("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=o.tabIndex=-1,e(r),e(o),fe(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),fe(o,"scroll",(function(){o.clientWidth&&t(o.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Vr.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 o=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+o)+"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 i=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+i)+"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}},Vr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Vr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Vr.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 V,this.disableVert=new V},Vr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var o=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(o.right-1,(o.top+o.bottom)/2):document.elementFromPoint((o.right+o.left)/2,o.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Vr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Br=function(){};function Ur(e,t){t||(t=Rr(e));var n=e.display.barWidth,r=e.display.barHeight;Wr(e,t);for(var o=0;o<4&&n!=e.display.barWidth||r!=e.display.barHeight;o++)n!=e.display.barWidth&&e.options.lineWrapping&&Sr(e),Wr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function Wr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var zr={native:Vr,null:Br};function Hr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&S(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new zr[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?Dr(e,t):Nr(e,t)}),e),e.display.scrollbars.addClass&&F(e.display.wrapper,e.display.scrollbars.addClass)}var qr=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:++qr,markArrays:null},t=e.curOp,an?an.ops.push(t):t.ownsGroup=an={ops:[t],delayedCallbacks:[]}}function $r(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<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var o=e.ops[r];if(o.cursorActivityHandlers)for(;o.cursorActivityCalled<o.cursorActivityHandlers.length;)o.cursorActivityHandlers[o.cursorActivityCalled++].call(null,o.cm)}}while(n<t.length)}(n)}finally{an=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Kr(t[n]);for(var r=0;r<t.length;r++)Jr(t[r]);for(var o=0;o<t.length;o++)Yr(t[o]);for(var i=0;i<t.length;i++)Xr(t[i]);for(var a=0;a<t.length;a++)Qr(t[a])}(e)}))}function Kr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=Sn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=Sn(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&qt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new io(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&ao(e.cm,e.update)}function Yr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Sr(t),e.barMeasure=Rr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=Mn(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+Sn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-En(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<t.doc.scrollLeft&&Dr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==I();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&uo(t,e.barMeasure),e.selectionChanged&&wr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Cr(e.cm)}function Qr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&so(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&_r(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Dr(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),o=null;if(t.top+r.top<0?o=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(o=!1),null!=o&&!h){var i=T("div","​",null,"position: absolute;\n top: "+(t.top-n.viewOffset-An(e.display))+"px;\n height: "+(t.bottom-t.top+Sn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(i),i.scrollIntoView(o),e.display.lineSpace.removeChild(i)}}}(t,function(e,t,n,r){var o;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?et(t.line,t.ch+1,"before"):t,t=t.ch?et(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var i=0;i<5;i++){var a=!1,s=$n(e,t),l=n&&n!=t?$n(e,n):s,c=Tr(e,o={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&(Nr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Dr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return o}(t,st(r,e.scrollToPos.from),st(r,e.scrollToPos.to),e.scrollToPos.margin));var o=e.maybeHiddenMarkers,i=e.maybeUnhiddenMarkers;if(o)for(var a=0;a<o.length;++a)o[a].lines.length||he(o[a],"hide");if(i)for(var s=0;s<i.length;++s)i[s].lines.length&&he(i[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&he(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Zr(e,t){if(e.curOp)return t();Gr(e);try{return t()}finally{$r(e)}}function eo(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Gr(e);try{return t.apply(e,arguments)}finally{$r(e)}}}function to(e){return function(){if(this.curOp)return e.apply(this,arguments);Gr(this);try{return e.apply(this,arguments)}finally{$r(this)}}}function no(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Gr(t);try{return e.apply(this,arguments)}finally{$r(t)}}}function ro(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,_(oo,e))}function oo(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=dt(e,t.highlightFrontier),o=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(i){if(r.line>=e.display.viewFrom){var a=i.styles,s=i.text.length>e.options.maxHighlightLength?We(t.mode,r.state):null,l=ft(e,i,r,!0);s&&(r.state=s),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var f=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),p=0;!f&&p<a.length;++p)f=a[p]!=i.styles[p];f&&o.push(r.line),i.stateAfter=r.save(),r.nextLine()}else i.text.length<=e.options.maxHighlightLength&&ht(e,i.text,r),i.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ro(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),o.length&&Zr(e,(function(){for(var t=0;t<o.length;t++)pr(e,o[t],"text")}))}}var io=function(e,t,n){var r=e.display;this.viewport=t,this.visible=jr(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=En(e),this.force=n,this.dims=ir(e),this.events=[]};function ao(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return dr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==vr(e))return!1;po(e)&&(dr(e),t.dims=ir(e));var o=r.first+r.size,i=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(o,t.visible.to+e.options.viewportMargin);n.viewFrom<i&&i-n.viewFrom<20&&(i=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(o,n.viewTo)),Ct&&(i=Vt(e.doc,i),a=Bt(e.doc,a));var s=i!=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.viewFrom<t&&(r.view=r.view.slice(ur(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(on(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,ur(e,n)))),r.viewTo=n}(e,i,a),n.viewOffset=zt(Ge(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=vr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=I();if(!t||!P(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&P(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,o=e.options.lineNumbers,i=r.lineDiv,a=i.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,f=0;f<c.length;f++){var p=c[f];if(p.hidden);else if(p.node&&p.node.parentNode==i){for(;a!=p.node;)a=s(a);var d=o&&null!=t&&t<=u&&p.lineNumber;p.changes&&(B(p.changes,"gutter")>-1&&(d=!1),un(e,p,u,n)),d&&(E(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(Ze(e.options,u)))),a=p.node.nextSibling}else{var h=mn(e,p,u,n);i.insertBefore(h,a)}u+=p.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!=I()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&P(document.body,e.anchorNode)&&P(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)}}(u),E(n.cursorDiv),E(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ro(e,400)),n.updateLineNumbers=null,!0}function so(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=En(e))r&&(t.visible=jr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+kn(e.display)-jn(e),n.top)}),t.visible=jr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!ao(e,t))break;Sr(e);var o=Rr(e);gr(e),Ur(e,o),uo(e,o),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 lo(e,t){var n=new io(e,t);if(ao(e,n)){Sr(e),so(e,n);var r=Rr(e);gr(e),Ur(e,r),uo(e,r),n.finish()}}function co(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",ln(e,"gutterChanged",e)}function uo(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+Sn(e)+"px"}function fo(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,o=t.gutters.offsetWidth,i=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}e.options.fixedGutter&&(t.gutters.style.left=r+o+"px")}}function po(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=Ze(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var o=r.measure.appendChild(T("div",[T("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=o.firstChild.offsetWidth,a=o.offsetWidth-i;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(i,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",co(e.display),!0}return!1}function ho(e,t){for(var n=[],r=!1,o=0;o<e.length;o++){var i=e[o],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i){if(!t)continue;r=!0}n.push({className:i,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function vo(e){var t=e.gutters,n=e.gutterSpecs;E(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var o=n[r],i=o.className,a=o.style,s=t.appendChild(T("div",null,"CodeMirror-gutter "+i));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==i&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",co(e)}function go(e){vo(e.display),fr(e),fo(e)}function mo(e,t,r,o){var i=this;this.input=r,i.scrollbarFiller=T("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=T("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=M("div",null,"CodeMirror-code"),i.selectionDiv=T("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=T("div",null,"CodeMirror-cursors"),i.measure=T("div",null,"CodeMirror-measure"),i.lineMeasure=T("div",null,"CodeMirror-measure"),i.lineSpace=M("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none");var c=M("div",[i.lineSpace],"CodeMirror-lines");i.mover=T("div",[c],null,"position: relative"),i.sizer=T("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=T("div",null,null,"position: absolute; height: 50px; width: 1px;"),i.gutters=T("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=T("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=T("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),a&&s<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),l||n&&m||(i.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(i.wrapper):e(i.wrapper)),i.viewFrom=i.viewTo=t.first,i.reportedViewFrom=i.reportedViewTo=t.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,i.gutterSpecs=ho(o.gutters,o.lineNumbers),vo(i),r.init(i)}io.prototype.signal=function(e,t){me(e,t)&&this.events.push(arguments)},io.prototype.finish=function(){for(var e=0;e<this.events.length;e++)he.apply(null,this.events[e])};var yo=0,bo=null;function xo(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function wo(e){var t=xo(e);return t.x*=bo,t.y*=bo,t}function Co(e,t){var r=xo(t),o=r.x,i=r.y,a=e.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(o&&c||i&&u){if(i&&y&&l)e:for(var p=t.target,d=a.view;p!=s;p=p.parentNode)for(var h=0;h<d.length;h++)if(d[h].node==p){e.display.currentWheelTarget=p;break e}if(o&&!n&&!f&&null!=bo)return i&&u&&Nr(e,Math.max(0,s.scrollTop+i*bo)),Dr(e,Math.max(0,s.scrollLeft+o*bo)),(!i||i&&u)&&be(t),void(a.wheelStartX=null);if(i&&null!=bo){var v=i*bo,g=e.doc.scrollTop,m=g+a.wrapper.clientHeight;v<0?g=Math.max(0,g+v-50):m=Math.min(e.doc.height,m+v+50),lo(e,{top:g,bottom:m})}yo<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=o,a.wheelDY=i,setTimeout((function(){if(null!=a.wheelStartX){var e=s.scrollLeft-a.wheelStartX,t=s.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(bo=(bo*yo+n)/(yo+1),++yo)}}),200)):(a.wheelDX+=o,a.wheelDY+=i))}}a?bo=-.53:n?bo=15:u?bo=-.7:p&&(bo=-1/3);var Ao=function(e,t){this.ranges=e,this.primIndex=t};Ao.prototype.primary=function(){return this.ranges[this.primIndex]},Ao.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!nt(n.anchor,r.anchor)||!nt(n.head,r.head))return!1}return!0},Ao.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new ko(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new Ao(e,this.primIndex)},Ao.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Ao.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(tt(t,r.from())>=0&&tt(e,r.to())<=0)return n}return-1};var ko=function(e,t){this.anchor=e,this.head=t};function Oo(e,t,n){var r=e&&e.options.selectionsMayTouch,o=t[n];t.sort((function(e,t){return tt(e.from(),t.from())})),n=B(t,o);for(var i=1;i<t.length;i++){var a=t[i],s=t[i-1],l=tt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=it(s.from(),a.from()),u=ot(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;i<=n&&--n,t.splice(--i,2,new ko(f?u:c,f?c:u))}}return new Ao(t,n)}function So(e,t){return new Ao([new ko(e,t||e)],0)}function Eo(e){return e.text?et(e.from.line+e.text.length-1,K(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function jo(e,t){if(tt(e,t.from)<0)return e;if(tt(e,t.to)<=0)return Eo(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+=Eo(t).ch-t.to.ch),et(n,r)}function To(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var o=e.sel.ranges[r];n.push(new ko(jo(o.anchor,t),jo(o.head,t)))}return Oo(e.cm,n,e.sel.primIndex)}function Mo(e,t,n){return e.line==t.line?et(n.line,e.ch-t.ch+n.ch):et(n.line+(e.line-t.line),e.ch)}function Po(e){e.doc.mode=Ve(e.options,e.doc.modeOption),Io(e)}function Io(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ro(e,100),e.state.modeGen++,e.curOp&&fr(e)}function Fo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==K(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Lo(e,t,n,r){function o(e){return n?n[e]:null}function i(e,n,o){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),jt(e),Tt(e,n);var o=r?r(e):1;o!=e.height&&Je(e,o)}(e,n,o,r),ln(e,"change",e,t)}function a(e,t){for(var n=[],i=e;i<t;++i)n.push(new Gt(c[i],o(i),r));return n}var s=t.from,l=t.to,c=t.text,u=Ge(e,s.line),f=Ge(e,l.line),p=K(c),d=o(c.length-1),h=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Fo(e,t)){var v=a(0,c.length-1);i(f,f.text,d),h&&e.remove(s.line,h),v.length&&e.insert(s.line,v)}else if(u==f)if(1==c.length)i(u,u.text.slice(0,s.ch)+p+u.text.slice(l.ch),d);else{var g=a(1,c.length-1);g.push(new Gt(p+u.text.slice(l.ch),d,r)),i(u,u.text.slice(0,s.ch)+c[0],o(0)),e.insert(s.line+1,g)}else if(1==c.length)i(u,u.text.slice(0,s.ch)+c[0]+f.text.slice(l.ch),o(0)),e.remove(s.line+1,h);else{i(u,u.text.slice(0,s.ch)+c[0],o(0)),i(f,p+f.text.slice(l.ch),d);var m=a(1,c.length-1);h>1&&e.remove(s.line+1,h-1),e.insert(s.line+1,m)}ln(e,"change",e,t)}function No(e,t,n){!function e(r,o,i){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=o){var l=i&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function _o(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Po(e),Do(e),e.options.direction=t.direction,e.options.lineWrapping||qt(e),e.options.mode=t.modeOption,fr(e)}function Do(e){("rtl"==e.doc.direction?F:S)(e.display.lineDiv,"CodeMirror-rtl")}function Ro(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Vo(e,t){var n={from:rt(t.from),to:Eo(t),text:$e(e,t.from,t.to)};return Ho(e,n,t.from.line,t.to.line+1),No(e,(function(e){return Ho(e,n,t.from.line,t.to.line+1)}),!0),n}function Bo(e){for(;e.length&&K(e).ranges;)e.pop()}function Uo(e,t,n,r){var o=e.history;o.undone.length=0;var i,a,s=+new Date;if((o.lastOp==r||o.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&o.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(i=function(e,t){return t?(Bo(e.done),K(e.done)):e.done.length&&!K(e.done).ranges?K(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),K(e.done)):void 0}(o,o.lastOp==r)))a=K(i.changes),0==tt(t.from,t.to)&&0==tt(t.from,a.to)?a.to=Eo(t):i.changes.push(Vo(e,t));else{var l=K(o.done);for(l&&l.ranges||zo(e.sel,o.done),i={changes:[Vo(e,t)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=s,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=t.origin,a||he(e,"historyAdded")}function Wo(e,t,n,r){var o=e.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||function(e,t,n,r){var o=t.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,i,K(o.done),t))?o.done[o.done.length-1]=t:zo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Bo(o.undone)}function zo(e,t){var n=K(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Ho(e,t,n,r){var o=t["spans_"+e.id],i=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((o||(o=t["spans_"+e.id]={}))[i]=n.markedSpans),++i}))}function qo(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Go(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],o=0;o<t.text.length;++o)r.push(qo(n[o]));return r}(e,t),r=St(e,t);if(!n)return r;if(!r)return n;for(var o=0;o<n.length;++o){var i=n[o],a=r[o];if(i&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<i.length;++c)if(i[c].marker==l.marker)continue e;i.push(l)}else a&&(n[o]=a)}return n}function $o(e,t,n){for(var r=[],o=0;o<e.length;++o){var i=e[o];if(i.ranges)r.push(n?Ao.prototype.deepCopy.call(i):i);else{var a=i.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&B(t,Number(u[1]))>-1&&(K(s)[f]=c[f],delete c[f])}}}return r}function Ko(e,t,n,r){if(r){var o=e.anchor;if(n){var i=tt(t,o)<0;i!=tt(n,o)<0?(o=t,t=n):i!=tt(t,n)<0&&(t=n)}return new ko(o,t)}return new ko(n||t,t)}function Jo(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new Ao([Ko(e.sel.primary(),t,n,o)],0),r)}function Yo(e,t,n){for(var r=[],o=e.cm&&(e.cm.display.shift||e.extend),i=0;i<e.sel.ranges.length;i++)r[i]=Ko(e.sel.ranges[i],t[i],null,o);ei(e,Oo(e.cm,r,e.sel.primIndex),n)}function Xo(e,t,n,r){var o=e.sel.ranges.slice(0);o[t]=n,ei(e,Oo(e.cm,o,e.sel.primIndex),r)}function Qo(e,t,n,r){ei(e,So(t,n),r)}function Zo(e,t,n){var r=e.history.done,o=K(r);o&&o.ranges?(r[r.length-1]=t,ti(e,t,n)):ei(e,t,n)}function ei(e,t,n){ti(e,t,n),Wo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function ti(e,t,n){(me(e,"beforeSelectionChange")||e.cm&&me(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new ko(st(e,t[n].anchor),st(e,t[n].head))},origin:n&&n.origin};return he(e,"beforeSelectionChange",e,r),e.cm&&he(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Oo(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(tt(t.primary().head,e.sel.primary().head)<0?-1:1);ni(e,oi(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Pr(e.cm)}function ni(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,ge(e.cm)),ln(e,"cursorActivity",e))}function ri(e){ni(e,oi(e,e.sel,null,!1))}function oi(e,t,n,r){for(var o,i=0;i<t.ranges.length;i++){var a=t.ranges[i],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[i],l=ai(e,a.anchor,s&&s.anchor,n,r),c=ai(e,a.head,s&&s.head,n,r);(o||l!=a.anchor||c!=a.head)&&(o||(o=t.ranges.slice(0,i)),o[i]=new ko(l,c))}return o?Oo(e.cm,o,t.primIndex):t}function ii(e,t,n,r,o){var i=Ge(e,t.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var s=i.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(o&&(he(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),p=void 0;if((r<0?u:c)&&(f=si(e,f,-r,f&&f.line==t.line?i:null)),f&&f.line==t.line&&(p=tt(f,n))&&(r<0?p<0:p>0))return ii(e,f,t,r,o)}var d=l.find(r<0?-1:1);return(r<0?c:u)&&(d=si(e,d,r,d.line==t.line?i:null)),d?ii(e,d,t,r,o):null}}return t}function ai(e,t,n,r,o){var i=r||1,a=ii(e,t,n,i,o)||!o&&ii(e,t,n,i,!0)||ii(e,t,n,-i,o)||!o&&ii(e,t,n,-i,!0);return a||(e.cantEdit=!0,et(e.first,0))}function si(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.line<e.first+e.size-1?et(t.line+1,0):null:new et(t.line,t.ch+n)}function li(e){e.setSelection(et(e.firstLine(),0),et(e.lastLine()),W)}function ci(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,o,i){t&&(r.from=st(e,t)),n&&(r.to=st(e,n)),o&&(r.text=o),void 0!==i&&(r.origin=i)}),he(e,"beforeChange",e,r),e.cm&&he(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function ui(e,t,n){if(e.cm){if(!e.cm.curOp)return eo(e.cm,ui)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(me(e,"beforeChange")||e.cm&&me(e.cm,"beforeChange"))||(t=ci(e,t,!0))){var r=wt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=B(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var o=[{from:t,to:n}],i=0;i<r.length;++i)for(var a=r[i],s=a.find(0),l=0;l<o.length;++l){var c=o[l];if(!(tt(c.to,s.from)<0||tt(c.from,s.to)>0)){var u=[l,1],f=tt(c.from,s.from),p=tt(c.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:s.from}),(p>0||!a.inclusiveRight&&!p)&&u.push({from:s.to,to:c.to}),o.splice.apply(o,u),l+=u.length-3}}return o}(e,t.from,t.to);if(r)for(var o=r.length-1;o>=0;--o)fi(e,{from:r[o].from,to:r[o].to,text:o?[""]:t.text,origin:t.origin});else fi(e,t)}}function fi(e,t){if(1!=t.text.length||""!=t.text[0]||0!=tt(t.from,t.to)){var n=To(e,t);Uo(e,t,n,e.cm?e.cm.curOp.id:NaN),hi(e,t,n,St(e,t));var r=[];No(e,(function(e,n){n||-1!=B(r,e.history)||(yi(e.history,t),r.push(e.history)),hi(e,t,null,St(e,t))}))}}function pi(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var o,i=e.history,a=e.sel,s="undo"==t?i.done:i.undone,l="undo"==t?i.undone:i.done,c=0;c<s.length&&(o=s[c],n?!o.ranges||o.equals(e.sel):o.ranges);c++);if(c!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;){if(!(o=s.pop()).ranges){if(r)return void s.push(o);break}if(zo(o,l),n&&!o.equals(e.sel))return void ei(e,o,{clearRedo:!1});a=o}var u=[];zo(a,l),l.push({changes:u,generation:i.generation}),i.generation=o.generation||++i.maxGeneration;for(var f=me(e,"beforeChange")||e.cm&&me(e.cm,"beforeChange"),p=function(n){var r=o.changes[n];if(r.origin=t,f&&!ci(e,r,!1))return s.length=0,{};u.push(Vo(e,r));var i=n?To(e,r):K(s);hi(e,r,i,Go(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Eo(r)});var a=[];No(e,(function(e,t){t||-1!=B(a,e.history)||(yi(e.history,r),a.push(e.history)),hi(e,r,null,Go(e,r))}))},d=o.changes.length-1;d>=0;--d){var h=p(d);if(h)return h.v}}}}function di(e,t){if(0!=t&&(e.first+=t,e.sel=new Ao(J(e.sel.ranges,(function(e){return new ko(et(e.anchor.line+t,e.anchor.ch),et(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){fr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)pr(e.cm,r,"gutter")}}function hi(e,t,n,r){if(e.cm&&!e.cm.curOp)return eo(e.cm,hi)(e,t,n,r);if(t.to.line<e.first)di(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var o=t.text.length-1-(e.first-t.from.line);di(e,o),t={from:et(e.first,0),to:et(t.to.line+o,t.to.ch),text:[K(t.text)],origin:t.origin}}var i=e.lastLine();t.to.line>i&&(t={from:t.from,to:et(i,Ge(e,i).text.length),text:[t.text[0]],origin:t.origin}),t.removed=$e(e,t.from,t.to),n||(n=To(e,t)),e.cm?function(e,t,n){var r=e.doc,o=e.display,i=t.from,a=t.to,s=!1,l=i.line;e.options.lineWrapping||(l=Ye(Rt(Ge(r,i.line))),r.iter(l,a.line+1,(function(e){if(e==o.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&ge(e),Lo(r,t,n,sr(e)),e.options.lineWrapping||(r.iter(l,i.line+t.text.length,(function(e){var t=Ht(e);t>o.maxLineLength&&(o.maxLine=e,o.maxLineLength=t,o.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var o=Ge(e,r).stateAfter;if(o&&(!(o instanceof ct)||r+o.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,i.line),ro(e,400);var c=t.text.length-(a.line-i.line)-1;t.full?fr(e):i.line!=a.line||1!=t.text.length||Fo(e.doc,t)?fr(e,i.line,a.line+1,c):pr(e,i.line,"text");var u=me(e,"changes"),f=me(e,"change");if(f||u){var p={from:i,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&ln(e,"change",e,p),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(p)}e.display.selForContextMenu=null}(e.cm,t,r):Lo(e,t,r),ti(e,n,W),e.cantEdit&&ai(e,et(e.firstLine(),0))&&(e.cantEdit=!1)}}function vi(e,t,n,r,o){var i;r||(r=n),tt(r,n)<0&&(n=(i=[r,n])[0],r=i[1]),"string"==typeof t&&(t=e.splitLines(t)),ui(e,{from:n,to:r,text:t,origin:o})}function gi(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function mi(e,t,n,r){for(var o=0;o<e.length;++o){var i=e[o],a=!0;if(i.ranges){i.copied||((i=e[o]=i.deepCopy()).copied=!0);for(var s=0;s<i.ranges.length;s++)gi(i.ranges[s].anchor,t,n,r),gi(i.ranges[s].head,t,n,r)}else{for(var l=0;l<i.changes.length;++l){var c=i.changes[l];if(n<c.from.line)c.from=et(c.from.line+r,c.from.ch),c.to=et(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,o+1),o=0)}}}function yi(e,t){var n=t.from.line,r=t.to.line,o=t.text.length-(r-n)-1;mi(e.done,n,r,o),mi(e.undone,n,r,o)}function bi(e,t,n,r){var o=t,i=t;return"number"==typeof t?i=Ge(e,at(e,t)):o=Ye(t),null==o?null:(r(i,o)&&e.cm&&pr(e.cm,o,n),i)}function xi(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function wi(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var o=e[r];t+=o.chunkSize(),n+=o.height,o.parent=this}this.size=t,this.height=n,this.parent=null}ko.prototype.from=function(){return it(this.anchor,this.head)},ko.prototype.to=function(){return ot(this.anchor,this.head)},ko.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},xi.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var o=this.lines[n];this.height-=o.height,$t(o),ln(o,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},wi.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],o=r.chunkSize();if(e<o){var i=Math.min(t,o-e),a=r.height;if(r.removeInner(e,i),this.height-=a-r.height,o==i&&(this.children.splice(n--,1),r.parent=null),0==(t-=i))break;e=0}else e-=o}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof xi))){var s=[];this.collapse(s),this.children=[new xi(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<=i){if(o.insertInner(e,t,n),o.lines&&o.lines.length>50){for(var a=o.lines.length%25+25,s=a;s<o.lines.length;){var l=new xi(o.lines.slice(s,s+=25));o.height-=l.height,this.children.splice(++r,0,l),l.parent=this}o.lines=o.lines.slice(0,a),this.maybeSpill()}break}e-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new wi(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=B(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new wi(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var o=this.children[r],i=o.chunkSize();if(e<i){var a=Math.min(t,i-e);if(o.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=i}}};var Ci=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function Ai(e,t,n){zt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Mr(e,n)}Ci.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Ye(n);if(null!=r&&t){for(var o=0;o<t.length;++o)t[o]==this&&t.splice(o--,1);t.length||(n.widgets=null);var i=wn(this);Je(n,Math.max(0,n.height-i)),e&&(Zr(e,(function(){Ai(e,n,-i),pr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},Ci.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var o=wn(this)-t;o&&(Ut(this.doc,r)||Je(r,r.height+o),n&&Zr(n,(function(){n.curOp.forceUpdate=!0,Ai(n,r,o),ln(n,"lineWidgetChanged",n,e,Ye(r))})))},ye(Ci);var ki=0,Oi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++ki};function Si(e,t,n,r,o){if(r&&r.shared)return function(e,t,n,r,o){(r=D(r)).shared=!1;var i=[Si(e,t,n,r,o)],a=i[0],s=r.widgetNode;return No(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),i.push(Si(e,st(e,t),st(e,n),r,o));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=K(i)})),new Ei(i,a)}(e,t,n,r,o);if(e.cm&&!e.cm.curOp)return eo(e.cm,Si)(e,t,n,r,o);var i=new Oi(e,o),a=tt(t,n);if(r&&D(r,i,!1),a>0||0==a&&!1!==i.clearWhenEmpty)return i;if(i.replacedWith&&(i.collapsed=!0,i.widgetNode=M("span",[i.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||i.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(i.widgetNode.insertLeft=!0)),i.collapsed){if(Dt(e,t.line,t,n,i)||t.line!=n.line&&Dt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ct=!0}i.addToHistory&&Uo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&i.collapsed&&!c.options.lineWrapping&&Rt(r)==c.display.maxLine&&(s=!0),i.collapsed&&l!=t.line&&Je(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new At(i,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),i.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Je(t,0)})),i.clearOnEnter&&fe(i,"beforeCursorEnter",(function(){return i.clear()})),i.readOnly&&(wt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),i.collapsed&&(i.id=++ki,i.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),i.collapsed)fr(c,t.line,n.line+1);else if(i.className||i.startStyle||i.endStyle||i.css||i.attributes||i.title)for(var u=t.line;u<=n.line;u++)pr(c,u,"text");i.atomic&&ri(c.doc),ln(c,"markerAdded",c,i)}return i}Oi.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Gr(e),me(this,"clear")){var n=this.find();n&&ln(this,"clear",n.from,n.to)}for(var r=null,o=null,i=0;i<this.lines.length;++i){var a=this.lines[i],s=kt(a.markedSpans,this);e&&!this.collapsed?pr(e,Ye(a),"text"):e&&(null!=s.to&&(o=Ye(a)),null!=s.from&&(r=Ye(a))),a.markedSpans=Ot(a.markedSpans,s),null==s.from&&this.collapsed&&!Ut(this.doc,a)&&e&&Je(a,rr(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=Rt(this.lines[l]),u=Ht(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&fr(e,r,o+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ri(e.doc)),e&&ln(e,"markerCleared",e,this,r,o),t&&$r(e),this.parent&&this.parent.clear()}},Oi.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var o=0;o<this.lines.length;++o){var i=this.lines[o],a=kt(i.markedSpans,this);if(null!=a.from&&(n=et(t?i:Ye(i),a.from),-1==e))return n;if(null!=a.to&&(r=et(t?i:Ye(i),a.to),1==e))return r}return n&&{from:n,to:r}},Oi.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&Zr(r,(function(){var o=t.line,i=Ye(t.line),a=Pn(r,i);if(a&&(Rn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ut(n.doc,o)&&null!=n.height){var s=n.height;n.height=null;var l=wn(n)-s;l&&Je(o,o.height+l)}ln(r,"markerChanged",r,e)}))},Oi.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=B(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Oi.prototype.detachLine=function(e){if(this.lines.splice(B(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},ye(Oi);var Ei=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ji(e){return e.findMarks(et(e.first,0),e.clipPos(et(e.lastLine())),(function(e){return e.parent}))}function Ti(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];No(n.primary.doc,(function(e){return r.push(e)}));for(var o=0;o<n.markers.length;o++){var i=n.markers[o];-1==B(r,i.doc)&&(i.parent=null,n.markers.splice(o--,1))}},n=0;n<e.length;n++)t(n)}Ei.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();ln(this,"clear")}},Ei.prototype.find=function(e,t){return this.primary.find(e,t)},ye(Ei);var Mi=0,Pi=function(e,t,n,r,o){if(!(this instanceof Pi))return new Pi(e,t,n,r,o);null==n&&(n=0),wi.call(this,[new xi([new Gt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=et(n,0);this.sel=So(i),this.history=new Ro(null),this.id=++Mi,this.modeOption=t,this.lineSep=r,this.direction="rtl"==o?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Lo(this,{from:i,to:i,text:e}),ei(this,So(i),W)};Pi.prototype=X(wi.prototype,{constructor:Pi,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ke(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:no((function(e){var t=et(this.first,0),n=this.first+this.size-1;ui(this,{from:t,to:et(n,Ge(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Ir(this.cm,0,0),ei(this,So(t),W)})),replaceRange:function(e,t,n,r){vi(this,e,t=st(this,t),n=n?st(this,n):t,r)},getRange:function(e,t,n){var r=$e(this,st(this,e),st(this,t));return!1===n?r:r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Qe(this,e))return Ge(this,e)},getLineNumber:function(e){return Ye(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ge(this,e)),Rt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:no((function(e,t,n){Qo(this,st(this,"number"==typeof e?et(e,t||0):e),null,n)})),setSelection:no((function(e,t,n){Qo(this,st(this,e),st(this,t||e),n)})),extendSelection:no((function(e,t,n){Jo(this,st(this,e),t&&st(this,t),n)})),extendSelections:no((function(e,t){Yo(this,lt(this,e),t)})),extendSelectionsBy:no((function(e,t){Yo(this,lt(this,J(this.sel.ranges,e)),t)})),setSelections:no((function(e,t,n){if(e.length){for(var r=[],o=0;o<e.length;o++)r[o]=new ko(st(this,e[o].anchor),st(this,e[o].head||e[o].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),ei(this,Oo(this.cm,r,t),n)}})),addSelection:no((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new ko(st(this,e),st(this,t||e))),ei(this,Oo(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var o=$e(this,n[r].from(),n[r].to());t=t?t.concat(o):o}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var o=$e(this,n[r].from(),n[r].to());!1!==e&&(o=o.join(e||this.lineSeparator())),t[r]=o}return t},replaceSelection:function(e,t,n){for(var r=[],o=0;o<this.sel.ranges.length;o++)r[o]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:no((function(e,t,n){for(var r=[],o=this.sel,i=0;i<o.ranges.length;i++){var a=o.ranges[i];r[i]={from:a.from(),to:a.to(),text:this.splitLines(e[i]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],o=et(e.first,0),i=o,a=0;a<t.length;a++){var s=t[a],l=Mo(s.from,o,i),c=Mo(Eo(s),o,i);if(o=s.to,i=c,"around"==n){var u=e.sel.ranges[a],f=tt(u.head,u.anchor)<0;r[a]=new ko(f?c:l,f?l:c)}else r[a]=new ko(l,l)}return new Ao(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)ui(this,r[l]);s?Zo(this,s):this.cm&&Pr(this.cm)})),undo:no((function(){pi(this,"undo")})),redo:no((function(){pi(this,"redo")})),undoSelection:no((function(){pi(this,"undo",!0)})),redoSelection:no((function(){pi(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.done.length;r++)e.done[r].ranges||++t;for(var o=0;o<e.undone.length;o++)e.undone[o].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Ro(this.history),No(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:$o(this.history.done),undone:$o(this.history.undone)}},setHistory:function(e){var t=this.history=new Ro(this.history);t.done=$o(e.done.slice(0),null,!0),t.undone=$o(e.undone.slice(0),null,!0)},setGutterMarker:no((function(e,t,n){return bi(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&te(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:no((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&bi(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,te(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Qe(this,e))return null;if(t=e,!(e=Ge(this,e)))return null}else if(null==(t=Ye(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:no((function(e,t,n){return bi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(k(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:no((function(e,t,n){return bi(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",o=e[r];if(!o)return!1;if(null==n)e[r]=null;else{var i=o.match(k(n));if(!i)return!1;var a=i.index+i[0].length;e[r]=o.slice(0,i.index)+(i.index&&a!=o.length?" ":"")+o.slice(a)||null}return!0}))})),addLineWidget:no((function(e,t,n){return function(e,t,n,r){var o=new Ci(e,n,r),i=e.cm;return i&&o.noHScroll&&(i.display.alignWidgets=!0),bi(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==o.insertAt?n.push(o):n.splice(Math.min(n.length,Math.max(0,o.insertAt)),0,o),o.line=t,i&&!Ut(e,t)){var r=zt(t)<e.scrollTop;Je(t,t.height+wn(o)),r&&Mr(i,o.height),i.curOp.forceUpdate=!0}return!0})),i&&ln(i,"lineWidgetAdded",i,o,"number"==typeof t?t:Ye(t)),o}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Si(this,st(this,e),st(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Si(this,e=st(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ge(this,(e=st(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var o=n[r];(null==o.from||o.from<=e.ch)&&(null==o.to||o.to>=e.ch)&&t.push(o.marker.parent||o.marker)}return t},findMarks:function(e,t,n){e=st(this,e),t=st(this,t);var r=[],o=e.line;return this.iter(e.line,t.line+1,(function(i){var a=i.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&o==e.line&&e.ch>=l.to||null==l.from&&o!=e.line||null!=l.from&&o==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(o){var i=o.text.length+r;if(i>e)return t=e,!0;e-=i,++n})),st(this,et(n,t))},indexFromPos:function(e){var t=(e=st(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Pi(Ke(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Pi(Ke(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],o=r.find(),i=e.clipPos(o.from),a=e.clipPos(o.to);if(tt(i,a)){var s=Si(e,i,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,ji(this)),r},unlinkDoc:function(e){if(e instanceof Ea&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),Ti(ji(this));break}if(e.history==this.history){var n=[e.id];No(e,(function(e){return n.push(e.id)}),!0),e.history=new Ro(null),e.history.done=$o(this.history.done,n),e.history.undone=$o(this.history.undone,n)}},iterLinkedDocs:function(e){No(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:no((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&Zr(t=this.cm,(function(){Do(t),fr(t)})))}))}),Pi.prototype.eachLine=Pi.prototype.iter;var Ii=0;function Fi(e){var t=this;if(Li(t),!ve(t,e)&&!Cn(t.display,e)){be(e),a&&(Ii=+new Date);var n=cr(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var o=r.length,i=Array(o),s=0,l=function(){++s==o&&eo(t,(function(){var e={from:n=st(t.doc,n),to:n,text:t.doc.splitLines(i.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};ui(t.doc,e),Zo(t.doc,So(st(t.doc,n),st(t.doc,Eo(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==B(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(i[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var p;if(t.state.draggingText&&!t.state.draggingText.copy&&(p=t.listSelections()),ti(t.doc,So(n,n)),p)for(var d=0;d<p.length;++d)vi(t.doc,"",p[d].anchor,p[d].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function Li(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ni(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var o=t[r].CodeMirror;o&&n.push(o)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var _i=!1;function Di(){var e;_i||(fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ni(Ri)}),100))})),fe(window,"blur",(function(){return Ni(Or)})),_i=!0)}function Ri(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Vi={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Bi=0;Bi<10;Bi++)Vi[Bi+48]=Vi[Bi+96]=String(Bi);for(var Ui=65;Ui<=90;Ui++)Vi[Ui]=String.fromCharCode(Ui);for(var Wi=1;Wi<=12;Wi++)Vi[Wi+111]=Vi[Wi+63235]="F"+Wi;var zi={};function Hi(e){var t,n,r,o,i=e.split(/-(?!$)/);e=i[i.length-1];for(var a=0;a<i.length-1;a++){var s=i[a];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),o&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function qi(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var o=J(n.split(" "),Hi),i=0;i<o.length;i++){var a=void 0,s=void 0;i==o.length-1?(s=o.join(" "),a=r):(s=o.slice(0,i+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Gi(e,t,n,r){var o=(t=Yi(t)).call?t.call(e,r):t[e];if(!1===o)return"nothing";if("..."===o)return"multi";if(null!=o&&n(o))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Gi(e,t.fallthrough,n,r);for(var i=0;i<t.fallthrough.length;i++){var a=Gi(e,t.fallthrough[i],n,r);if(a)return a}}}function $i(e){var t="string"==typeof e?e:Vi[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Ki(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Ji(e,t){if(f&&34==e.keyCode&&e.char)return!1;var n=Vi[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Ki(n,e,t))}function Yi(e){return"string"==typeof e?zi[e]:e}function Xi(e,t){for(var n=e.doc.sel.ranges,r=[],o=0;o<n.length;o++){for(var i=t(n[o]);r.length&&tt(i.from,K(r).to)<=0;){var a=r.pop();if(tt(a.from,i.from)<0){i.from=a.from;break}}r.push(i)}Zr(e,(function(){for(var t=r.length-1;t>=0;t--)vi(e.doc,"",r[t].from,r[t].to,"+delete");Pr(e)}))}function Qi(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function Zi(e,t,n){var r=Qi(e,t.ch,n);return null==r?null:new et(t.line,r,n<0?"after":"before")}function ea(e,t,n,r,o){if(e){"rtl"==t.doc.direction&&(o=-o);var i=ce(n,t.doc.direction);if(i){var a,s=o<0?K(i):i[0],l=o<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=In(t,n);a=o<0?n.text.length-1:0;var u=Fn(t,c,a).top;a=ie((function(e){return Fn(t,c,e).top==u}),o<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Qi(n,a,1))}else a=o<0?s.to:s.from;return new et(r,a,l)}}return new et(r,o<0?n.text.length:0,o<0?"before":"after")}zi.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"},zi.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"},zi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},zi.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"]},zi.default=y?zi.macDefault:zi.pcDefault;var ta={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),W)},killLine:function(e){return Xi(e,(function(t){if(t.empty()){var n=Ge(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:et(t.head.line+1,0)}:{from:t.head,to:et(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Xi(e,(function(t){return{from:et(t.from().line,0),to:st(e.doc,et(t.to().line+1,0))}}))},delLineLeft:function(e){return Xi(e,(function(e){return{from:et(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Xi(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Xi(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(et(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(et(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return na(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ge(e.doc,t),r=function(e){for(var t;t=Nt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Ye(r)),ea(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),H)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),H)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ra(e,t.head):r}),H)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,o=0;o<n.length;o++){var i=n[o].from(),a=R(e.getLine(i.line),i.ch,r);t.push($(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Zr(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var o=t[r].head,i=Ge(e.doc,o.line).text;if(i)if(o.ch==i.length&&(o=new et(o.line,o.ch-1)),o.ch>0)o=new et(o.line,o.ch+1),e.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),et(o.line,o.ch-2),o,"+transpose");else if(o.line>e.doc.first){var a=Ge(e.doc,o.line-1).text;a&&(o=new et(o.line,1),e.replaceRange(i.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),et(o.line-1,a.length-1),o,"+transpose"))}n.push(new ko(o,o))}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<t.length;r++)e.indentLine(t[r].from().line,null,!0);Pr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function na(e,t){var n=Ge(e.doc,t),r=Rt(n);return r!=n&&(t=Ye(r)),ea(!0,e,r,t,1)}function ra(e,t){var n=na(e,t.line),r=Ge(e.doc,n.line),o=ce(r,e.doc.direction);if(!o||0==o[0].level){var i=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=i&&t.ch;return et(n.line,a?0:i,n.sticky)}return n}function oa(e,t,n){if("string"==typeof t&&!(t=ta[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,o=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),o=t(e)!=U}finally{e.display.shift=r,e.state.suppressEdits=!1}return o}var ia=new V;function aa(e,t,n,r){var o=e.state.keySeq;if(o){if($i(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:ia.set(50,(function(){e.state.keySeq==o&&(e.state.keySeq=null,e.display.input.reset())})),sa(e,o+" "+t,n,r))return!0}return sa(e,t,n,r)}function sa(e,t,n,r){var o=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var o=Gi(t,e.state.keyMaps[r],n,e);if(o)return o}return e.options.extraKeys&&Gi(t,e.options.extraKeys,n,e)||Gi(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==o&&(e.state.keySeq=t),"handled"==o&&ln(e,"keyHandled",e,t,n),"handled"!=o&&"multi"!=o||(be(n),wr(e)),!!o}function la(e,t){var n=Ji(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?aa(e,"Shift-"+n,t,(function(t){return oa(e,t,!0)}))||aa(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return oa(e,t)})):aa(e,n,t,(function(t){return oa(e,t)})))}var ca=null;function ua(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=I(),ve(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var o=la(t,e);f&&(ca=o?r:null,o||88!=r||Fe||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!o&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(S(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n))}F(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n)}(t)}}function fa(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function pa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Cn(t.display,e)||ve(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ca)return ca=null,void be(e);if(!f||e.which&&!(e.which<10)||!la(t,e)){var o=String.fromCharCode(null==r?n:r);"\b"!=o&&(function(e,t,n){return aa(e,"'"+n+"'",t,(function(t){return oa(e,t,!0)}))}(t,e,o)||t.display.input.onKeyPress(e))}}}var da,ha,va=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ga(e){var t=this,n=t.display;if(!(ve(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Cn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!ba(t,e)){var r=cr(t,e),o=ke(e),i=r?function(e,t){var n=+new Date;return ha&&ha.compare(n,e,t)?(da=ha=null,"triple"):da&&da.compare(n,e,t)?(ha=new va(n,e,t),da=null,"double"):(da=new va(n,e,t),ha=null,"single")}(r,o):"single";window.focus(),1==o&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,o){var i="Click";return"double"==r?i="Double"+i:"triple"==r&&(i="Triple"+i),aa(e,Ki(i=(1==t?"Left":2==t?"Middle":"Right")+i,o),o,(function(t){if("string"==typeof t&&(t=ta[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=U}finally{e.state.suppressEdits=!1}return r}))}(t,o,r,i,e)||(1==o?r?function(e,t,n,r){a?setTimeout(_(Cr,e),0):e.curOp.focus=I();var o,i=function(e,t,n){var r=e.getOption("configureMouse"),o=r?r(e,t,n):{};if(null==o.unit){var i=b?n.shiftKey&&n.metaKey:n.altKey;o.unit=i?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==o.extend||e.doc.extend)&&(o.extend=e.doc.extend||n.shiftKey),null==o.addNew&&(o.addNew=y?n.metaKey:n.ctrlKey),null==o.moveOnDrag&&(o.moveOnDrag=!(y?n.altKey:n.ctrlKey)),o}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Ee&&!e.isReadOnly()&&"single"==n&&(o=c.contains(t))>-1&&(tt((o=c.ranges[o]).from(),t)<0||t.xRel>0)&&(tt(o.to(),t)>0||t.xRel<0)?function(e,t,n,r){var o=e.display,i=!1,c=eo(e,(function(t){l&&(o.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Ar(e)),de(o.wrapper.ownerDocument,"mouseup",c),de(o.wrapper.ownerDocument,"mousemove",u),de(o.scroller,"dragstart",f),de(o.scroller,"drop",c),i||(be(t),r.addNew||Jo(e.doc,n,null,null,r.extend),l&&!p||a&&9==s?setTimeout((function(){o.wrapper.ownerDocument.body.focus({preventScroll:!0}),o.input.focus()}),20):o.input.focus())})),u=function(e){i=i||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return i=!0};l&&(o.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,fe(o.wrapper.ownerDocument,"mouseup",c),fe(o.wrapper.ownerDocument,"mousemove",u),fe(o.scroller,"dragstart",f),fe(o.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return o.input.focus()}),20),o.scroller.dragDrop&&o.scroller.dragDrop()}(e,r,t,i):function(e,t,n,r){a&&Ar(e);var o=e.display,i=e.doc;be(t);var s,l,c=i.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=i.sel.contains(n),s=l>-1?u[l]:new ko(n,n)):(s=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new ko(n,n)),n=cr(e,t,!0,!0),l=-1;else{var f=ma(e,n,r.unit);s=r.extend?Ko(s,f.anchor,f.head,r.extend):f}r.addNew?-1==l?(l=u.length,ei(i,Oo(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(ei(i,Oo(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=i.sel):Xo(i,l,s,z):(l=0,ei(i,new Ao([s],0),z),c=i.sel);var p=n;function d(t){if(0!=tt(p,t))if(p=t,"rectangle"==r.unit){for(var o=[],a=e.options.tabSize,u=R(Ge(i,n.line).text,n.ch,a),f=R(Ge(i,t.line).text,t.ch,a),d=Math.min(u,f),h=Math.max(u,f),v=Math.min(n.line,t.line),g=Math.min(e.lastLine(),Math.max(n.line,t.line));v<=g;v++){var m=Ge(i,v).text,y=q(m,d,a);d==h?o.push(new ko(et(v,y),et(v,y))):m.length>y&&o.push(new ko(et(v,y),et(v,q(m,h,a))))}o.length||o.push(new ko(n,n)),ei(i,Oo(e,c.ranges.slice(0,l).concat(o),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,x=s,w=ma(e,t,r.unit),C=x.anchor;tt(w.anchor,C)>0?(b=w.head,C=it(x.from(),w.anchor)):(b=w.anchor,C=ot(x.to(),w.head));var A=c.ranges.slice(0);A[l]=function(e,t){var n=t.anchor,r=t.head,o=Ge(e.doc,n.line);if(0==tt(n,r)&&n.sticky==r.sticky)return t;var i=ce(o);if(!i)return t;var a=se(i,n.ch,n.sticky),s=i[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==i.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=se(i,r.ch,r.sticky),f=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?f<0:f>0}var p=i[c+(l?-1:0)],d=l==(1==p.level),h=d?p.from:p.to,v=d?"after":"before";return n.ch==h&&n.sticky==v?t:new ko(new et(n.line,h,v),r)}(e,new ko(st(i,C),b)),ei(i,Oo(e,A,l),z)}}var h=o.wrapper.getBoundingClientRect(),v=0;function g(t){e.state.selectingText=!1,v=1/0,t&&(be(t),o.input.focus()),de(o.wrapper.ownerDocument,"mousemove",m),de(o.wrapper.ownerDocument,"mouseup",y),i.history.lastSelOrigin=null}var m=eo(e,(function(t){0!==t.buttons&&ke(t)?function t(n){var a=++v,s=cr(e,n,!0,"rectangle"==r.unit);if(s)if(0!=tt(s,p)){e.curOp.focus=I(),d(s);var l=jr(o,i);(s.line>=l.to||s.line<l.from)&&setTimeout(eo(e,(function(){v==a&&t(n)})),150)}else{var c=n.clientY<h.top?-20:n.clientY>h.bottom?20:0;c&&setTimeout(eo(e,(function(){v==a&&(o.scroller.scrollTop+=c,t(n))})),50)}}(t):g(t)})),y=eo(e,g);e.state.selectingText=y,fe(o.wrapper.ownerDocument,"mousemove",m),fe(o.wrapper.ownerDocument,"mouseup",y)}(e,r,t,i)}(t,r,i,e):Ae(e)==n.scroller&&be(e):2==o?(r&&Jo(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(A?t.display.input.onContextMenu(e):Ar(t)))}}function ma(e,t,n){if("char"==n)return new ko(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new ko(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new ko(r.from,r.to)}function ya(e,t,n,r){var o,i;if(t.touches)o=t.touches[0].clientX,i=t.touches[0].clientY;else try{o=t.clientX,i=t.clientY}catch(e){return!1}if(o>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&be(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!me(e,n))return we(t);i-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=o)return he(e,n,e,Xe(e.doc,i),e.display.gutterSpecs[l].className,t),we(t)}}function ba(e,t){return ya(e,t,"gutterClick",!0)}function xa(e,t){Cn(e.display,t)||function(e,t){return!!me(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||A||e.display.input.onContextMenu(t)}function wa(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Bn(e)}va.prototype.compare=function(e,t,n){return this.time+400>e&&0==tt(t,this.pos)&&n==this.button};var Ca={toString:function(){return"CodeMirror.Init"}},Aa={},ka={};function Oa(e,t,n){if(!t!=!(n&&n!=Ca)){var r=e.display.dragFunctions,o=t?fe:de;o(e.display.scroller,"dragstart",r.start),o(e.display.scroller,"dragenter",r.enter),o(e.display.scroller,"dragover",r.over),o(e.display.scroller,"dragleave",r.leave),o(e.display.scroller,"drop",r.drop)}}function Sa(e){e.options.lineWrapping?(F(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(S(e.display.wrapper,"CodeMirror-wrap"),qt(e)),lr(e),fr(e),Bn(e),setTimeout((function(){return Ur(e)}),100)}function Ea(e,t){var n=this;if(!(this instanceof Ea))return new Ea(e,t);this.options=t=t?D(t):{},D(Aa,t,!1);var r=t.value;"string"==typeof r?r=new Pi(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var o=new Ea.inputStyles[t.inputStyle](this),i=this.display=new mo(e,r,o,t);for(var c in i.wrapper.CodeMirror=this,wa(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 V,keySeq:null,specialChars:null},t.autofocus&&!m&&i.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;fe(t.scroller,"mousedown",eo(e,ga)),fe(t.scroller,"dblclick",a&&s<11?eo(e,(function(t){if(!ve(e,t)){var n=cr(e,t);if(n&&!ba(e,t)&&!Cn(e.display,t)){be(t);var r=e.findWordAt(n);Jo(e.doc,r.anchor,r.head)}}})):function(t){return ve(e,t)||be(t)}),fe(t.scroller,"contextmenu",(function(t){return xa(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xa(e,n)}));var n,r={end:0};function o(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function i(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(o){if(!ve(e,o)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(o)&&!ba(e,o)){t.input.ensurePolled(),clearTimeout(n);var i=+new Date;t.activeTouch={start:i,moved:!1,prev:i-r.end<=300?r:null},1==o.touches.length&&(t.activeTouch.left=o.touches[0].pageX,t.activeTouch.top=o.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&&!Cn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||i(r,r.prev)?new ko(s,s):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(s):new ko(et(s.line,0),st(e.doc,et(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),be(n)}o()})),fe(t.scroller,"touchcancel",o),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Nr(e,t.scroller.scrollTop),Dr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return Co(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return Co(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||Ce(t)},over:function(t){ve(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=T("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),j(e.display.dragCursor,r)}}(e,t),Ce(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Ii<100))Ce(t);else if(!ve(e,t)&&!Cn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!p)){var n=T("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:eo(e,Fi),leave:function(t){ve(e,t)||Li(e)}};var l=t.input.getField();fe(l,"keyup",(function(t){return fa.call(e,t)})),fe(l,"keydown",eo(e,ua)),fe(l,"keypress",eo(e,pa)),fe(l,"focus",(function(t){return kr(e,t)})),fe(l,"blur",(function(t){return Or(e,t)}))}(this),Di(),Gr(this),this.curOp.forceUpdate=!0,_o(this,r),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&kr(n)}),20):Or(this),ka)ka.hasOwnProperty(c)&&ka[c](this,t[c],Ca);po(this),t.finishInit&&t.finishInit(this);for(var u=0;u<ja.length;++u)ja[u](this);$r(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(i.lineDiv).textRendering&&(i.lineDiv.style.textRendering="auto")}Ea.defaults=Aa,Ea.optionHandlers=ka;var ja=[];function Ta(e,t,n,r){var o,i=e.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=dt(e,t).state:n="prev");var a=e.options.tabSize,s=Ge(i,t),l=R(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=i.mode.indent(o,s.text.slice(u.length),s.text))==U||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>i.first?R(Ge(i,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var f="",p=0;if(e.options.indentWithTabs)for(var d=Math.floor(c/a);d;--d)p+=a,f+="\t";if(p<c&&(f+=$(c-p)),f!=u)return vi(i,f,et(t,0),et(t,u.length),"+input"),s.stateAfter=null,!0;for(var h=0;h<i.sel.ranges.length;h++){var v=i.sel.ranges[h];if(v.head.line==t&&v.head.ch<u.length){var g=et(t,u.length);Xo(i,h,new ko(g,g));break}}}Ea.defineInitHook=function(e){return ja.push(e)};var Ma=null;function Pa(e){Ma=e}function Ia(e,t,n,r,o){var i=e.doc;e.display.shift=!1,r||(r=i.sel);var a=+new Date-200,s="paste"==o||e.state.pasteIncoming>a,l=Pe(t),c=null;if(s&&r.ranges.length>1)if(Ma&&Ma.text.join("\n")==t){if(r.ranges.length%Ma.text.length==0){c=[];for(var u=0;u<Ma.text.length;u++)c.push(i.splitLines(Ma.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=J(l,(function(e){return[e]})));for(var f=e.curOp.updateInput,p=r.ranges.length-1;p>=0;p--){var d=r.ranges[p],h=d.from(),v=d.to();d.empty()&&(n&&n>0?h=et(h.line,h.ch-n):e.state.overwrite&&!s?v=et(v.line,Math.min(Ge(i,v.line).text.length,v.ch+K(l).length)):s&&Ma&&Ma.lineWise&&Ma.text.join("\n")==l.join("\n")&&(h=v=et(h.line,0)));var g={from:h,to:v,text:c?c[p%c.length]:l,origin:o||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};ui(e.doc,g),ln(e,"inputRead",e,g)}t&&!s&&La(e,t),Pr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Fa(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return Ia(t,n,0,null,"paste")})),!0}function La(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=e.getModeAt(o.head),a=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(t.indexOf(i.electricChars.charAt(s))>-1){a=Ta(e,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(Ge(e.doc,o.head.line).text.slice(0,o.head.ch))&&(a=Ta(e,o.head.line,"smart"));a&&ln(e,"electricInput",e,o.head.line)}}}function Na(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var o=e.doc.sel.ranges[r].head.line,i={anchor:et(o,0),head:et(o+1,0)};n.push(i),t.push(e.getRange(i.anchor,i.head))}return{text:t,ranges:n}}function _a(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Da(){var e=T("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=T("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),v&&(e.style.border="1px solid black"),_a(e),t}function Ra(e,t,n,r,o){var i=t,a=n,s=Ge(e,t.line),l=o&&"rtl"==e.direction?-n:n;function c(i){var a,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var f=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new et(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(f?2:1))),-n)}}else a=o?function(e,t,n,r){var o=ce(t,e.doc.direction);if(!o)return Zi(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var i=se(o,n.ch,n.sticky),a=o[i];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return Zi(t,n,r);var s,l=function(e,n){return Qi(t,e instanceof et?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||In(e,t),Qn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var f=1==a.level==r<0,p=l(n,f?1:-1);if(null!=p&&(f?p<=a.to&&p<=u.end:p>=a.from&&p>=u.begin)){var d=f?"before":"after";return new et(n.line,p,d)}}var h=function(e,t,r){for(var i=function(e,t){return t?new et(n.line,l(e,1),"before"):new et(n.line,e,"after")};e>=0&&e<o.length;e+=t){var a=o[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return i(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return i(c,s)}},v=h(i+r,r,u);if(v)return v;var g=r>0?u.end:l(u.begin,-1);return null==g||r>0&&g==t.text.length||!(v=h(r>0?0:o.length-1,r,c(g)))?null:v}(e.cm,s,t,n):Zi(s,t,n);if(null==a){if(i||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new et(c,t.ch,t.sticky),!(s=Ge(e,c))))return!1;t=ea(o,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,f="group"==r,p=e.cm&&e.cm.getHelper(t,"wordChars"),d=!0;!(n<0)||c(!d);d=!1){var h=s.text.charAt(t.ch)||"\n",v=ee(h,p)?"w":f&&"\n"==h?"n":!f||/\s/.test(h)?null:"p";if(!f||d||v||(v="s"),u&&u!=v){n<0&&(n=1,c(),t.sticky="after");break}if(v&&(u=v),n>0&&!c(!d))break}var g=ai(e,t,i,a,!0);return nt(i,g)&&(g.hitSide=!0),g}function Va(e,t,n,r){var o,i,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*rr(e.display),3);o=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(o=n>0?t.bottom+3:t.top-3);for(;(i=Yn(e,s,o)).outside;){if(n<0?o<=0:o>=a.height){i.hitSide=!0;break}o+=5*n}return i}var Ba=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new V,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ua(e,t){var n=Pn(e,t.line);if(!n||n.hidden)return null;var r=Ge(e.doc,t.line),o=Tn(n,r,t.line),i=ce(r,e.doc.direction),a="left";i&&(a=se(i,t.ch)%2?"right":"left");var s=_n(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Wa(e,t){return t&&(e.bad=!0),e}function za(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Wa(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 o=0;o<e.display.view.length;o++){var i=e.display.view[o];if(i.node==r)return Ha(i,t,n)}}function Ha(e,t,n){var r=e.text.firstChild,o=!1;if(!t||!P(r,t))return Wa(et(Ye(e.line),0),!0);if(t==r&&(o=!0,t=r.childNodes[n],n=0,!t)){var i=e.rest?K(e.rest):e.line;return Wa(et(Ye(i),i.text.length),o)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var o=-1;o<(c?c.length:0);o++)for(var i=o<0?l.map:c[o],a=0;a<i.length;a+=3){var s=i[a+2];if(s==t||s==n){var u=Ye(o<0?e.line:e.rest[o]),f=i[a]+r;return(r<0||s!=t)&&(f=i[a+(r?1:0)]),et(u,f)}}}var f=u(a,s,n);if(f)return Wa(f,o);for(var p=s.nextSibling,d=a?a.nodeValue.length-n:0;p;p=p.nextSibling){if(f=u(p,p.firstChild,0))return Wa(et(f.line,f.ch-d),o);d+=p.textContent.length}for(var h=s.previousSibling,v=n;h;h=h.previousSibling){if(f=u(h,h.firstChild,-1))return Wa(et(f.line,f.ch+v),o);v+=h.textContent.length}}Ba.prototype.init=function(e){var t=this,n=this,r=n.cm,o=n.div=e.lineDiv;function i(e){for(var t=e.target;t;t=t.parentNode){if(t==o)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(i(e)&&!ve(r,e)){if(r.somethingSelected())Pa({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Na(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,W),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Ma.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=Da(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Ma.text.join("\n");var c=I();N(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,_a(o,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),fe(o,"paste",(function(e){!i(e)||ve(r,e)||Fa(e,r)||s<=11&&setTimeout(eo(r,(function(){return t.updateFromDOM()})),20)})),fe(o,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(o,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(o,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(o,"touchstart",(function(){return n.forceCompositionEnd()})),fe(o,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(o,"copy",a),fe(o,"cut",a)},Ba.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ba.prototype.prepareSelection=function(){var e=mr(this.cm,!1);return e.focus=I()==this.div,e},Ba.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ba.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ba.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),o=r.from(),i=r.to();if(t.display.viewTo==t.display.viewFrom||o.line>=t.display.viewTo||i.line<t.display.viewFrom)e.removeAllRanges();else{var a=za(t,e.anchorNode,e.anchorOffset),s=za(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=tt(it(a,s),o)||0!=tt(ot(a,s),i)){var l=t.display.view,c=o.line>=t.display.viewFrom&&Ua(t,o)||{node:l[0].measure.map[2],offset:0},u=i.line<t.display.viewTo&&Ua(t,i);if(!u){var f=l[l.length-1].measure,p=f.maps?f.maps[f.maps.length-1]:f.map;u={node:p[p.length-1],offset:p[p.length-2]-p[p.length-3]}}if(c&&u){var d,h=e.rangeCount&&e.getRangeAt(0);try{d=O(c.node,c.offset,u.offset,u.node)}catch(e){}d&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),d.collapsed||(e.removeAllRanges(),e.addRange(d))):(e.removeAllRanges(),e.addRange(d)),h&&null==e.anchorNode?e.addRange(h):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ba.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ba.prototype.showMultipleSelections=function(e){j(this.cm.display.cursorDiv,e.cursors),j(this.cm.display.selectionDiv,e.selection)},Ba.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ba.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return P(this.div,t)},Ba.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&I()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ba.prototype.blur=function(){this.div.blur()},Ba.prototype.getField=function(){return this.div},Ba.prototype.supportsTouch=function(){return!0},Ba.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():Zr(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}))},Ba.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ba.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(g&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=za(t,e.anchorNode,e.anchorOffset),r=za(t,e.focusNode,e.focusOffset);n&&r&&Zr(t,(function(){ei(t.doc,So(n,r),W),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ba.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,o=r.display,i=r.doc.sel.primary(),a=i.from(),s=i.to();if(0==a.ch&&a.line>r.firstLine()&&(a=et(a.line-1,Ge(r.doc,a.line-1).length)),s.ch==Ge(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=et(s.line+1,0)),a.line<o.viewFrom||s.line>o.viewTo-1)return!1;a.line==o.viewFrom||0==(e=ur(r,a.line))?(t=Ye(o.view[0].line),n=o.view[0].node):(t=Ye(o.view[e].line),n=o.view[e-1].node.nextSibling);var l,c,u=ur(r,s.line);if(u==o.view.length-1?(l=o.viewTo-1,c=o.lineDiv.lastChild):(l=Ye(o.view[u+1].line)-1,c=o.view[u+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,o){var i="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(i+=s,l&&(i+=s),a=l=!1)}function u(e){e&&(c(),i+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var i,p=t.getAttribute("cm-marker");if(p){var d=e.findMarks(et(r,0),et(o+1,0),(g=+p,function(e){return e.id==g}));return void(d.length&&(i=d[0].find(0))&&u($e(e.doc,i.from,i.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 v=0;v<t.childNodes.length;v++)f(t.childNodes[v]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),h&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var g}for(;f(t),t!=n;)t=t.nextSibling,l=!1;return i}(r,n,c,t,l)),p=$e(r.doc,et(t,0),et(l,Ge(r.doc,l).text.length));f.length>1&&p.length>1;)if(K(f)==K(p))f.pop(),p.pop(),l--;else{if(f[0]!=p[0])break;f.shift(),p.shift(),t++}for(var d=0,h=0,v=f[0],g=p[0],m=Math.min(v.length,g.length);d<m&&v.charCodeAt(d)==g.charCodeAt(d);)++d;for(var y=K(f),b=K(p),x=Math.min(y.length-(1==f.length?d:0),b.length-(1==p.length?d:0));h<x&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==f.length&&1==p.length&&t==a.line)for(;d&&d>a.ch&&y.charCodeAt(y.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;f[f.length-1]=y.slice(0,y.length-h).replace(/^\u200b+/,""),f[0]=f[0].slice(d).replace(/\u200b+$/,"");var w=et(t,d),C=et(l,p.length?K(p).length-h:0);return f.length>1||f[0]||tt(w,C)?(vi(r.doc,f,w,C,"+input"),!0):void 0},Ba.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ba.prototype.reset=function(){this.forceCompositionEnd()},Ba.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ba.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ba.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Zr(this.cm,(function(){return fr(e.cm)}))},Ba.prototype.setUneditable=function(e){e.contentEditable="false"},Ba.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||eo(this.cm,Ia)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ba.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ba.prototype.onContextMenu=function(){},Ba.prototype.resetPosition=function(){},Ba.prototype.needsContentAttribute=!0;var qa=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new V,this.hasSelection=!1,this.composing=null};qa.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var o=this.textarea;function i(e){if(!ve(r,e)){if(r.somethingSelected())Pa({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Na(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,W):(n.prevInput="",o.value=t.text.join("\n"),N(o))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),v&&(o.style.width="0px"),fe(o,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(o,"paste",(function(e){ve(r,e)||Fa(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(o,"cut",i),fe(o,"copy",i),fe(e.scroller,"paste",(function(t){if(!Cn(e,t)&&!ve(r,t)){if(!o.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var i=new Event("paste");i.clipboardData=t.clipboardData,o.dispatchEvent(i)}})),fe(e.lineSpace,"selectstart",(function(t){Cn(e,t)||be(t)})),fe(o,"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(o,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},qa.prototype.createField=function(e){this.wrapper=Da(),this.textarea=this.wrapper.firstChild},qa.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},qa.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=mr(e);if(e.options.moveInputWithCursor){var o=$n(e,n.sel.primary().head,"div"),i=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,o.top+a.top-i.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,o.left+a.left-i.left))}return r},qa.prototype.showSelection=function(e){var t=this.cm.display;j(t.cursorDiv,e.cursors),j(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},qa.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&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},qa.prototype.getField=function(){return this.textarea},qa.prototype.supportsTouch=function(){return!1},qa.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||I()!=this.textarea))try{this.textarea.focus()}catch(e){}},qa.prototype.blur=function(){this.textarea.blur()},qa.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},qa.prototype.receivedFocus=function(){this.slowPoll()},qa.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},qa.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))}))},qa.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||Ie(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var o=n.value;if(o==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===o||y&&/[\uf700-\uf7ff]/.test(o))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,o.length);l<c&&r.charCodeAt(l)==o.charCodeAt(l);)++l;return Zr(t,(function(){Ia(t,o.slice(l),r.length-l,null,e.composing?"*compose":null),o.length>1e3||o.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=o,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},qa.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},qa.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},qa.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,o=t.textarea;t.contextMenuPending&&t.contextMenuPending();var i=cr(n,e),c=r.scroller.scrollTop;if(i&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(i)&&eo(n,ei)(n.doc,So(i),W);var u,p=o.style.cssText,d=t.wrapper.style.cssText,h=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",o.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);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(o.value=t.prevInput=" "),t.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&g(),A){Ce(e);var v=function(){de(window,"mouseup",v),setTimeout(m,20)};fe(window,"mouseup",v)}else setTimeout(m,50)}function g(){if(null!=o.selectionStart){var e=n.somethingSelected(),i="​"+(e?o.value:"");o.value="⇚",o.value=i,t.prevInput=e?"":"​",o.selectionStart=1,o.selectionEnd=i.length,r.selForContextMenu=n.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=d,o.style.cssText=p,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=o.selectionStart)){(!a||a&&s<9)&&g();var e=0,i=function(){r.selForContextMenu==n.doc.sel&&0==o.selectionStart&&o.selectionEnd>0&&"​"==t.prevInput?eo(n,li)(n):e++<10?r.detectingSelectAll=setTimeout(i,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(i,200)}}},qa.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},qa.prototype.setUneditable=function(){},qa.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,o,i){e.defaults[n]=r,o&&(t[n]=i?function(e,t,n){n!=Ca&&o(e,t,n)}:o)}e.defineOption=n,e.Init=Ca,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Po(e)}),!0),n("indentUnit",2,Po,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Io(e),Bn(e),fr(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 o=0;;){var i=e.text.indexOf(t,o);if(-1==i)break;o=i+t.length,n.push(et(r,i))}r++}));for(var o=n.length-1;o>=0;o--)vi(e.doc,t,n[o],et(n[o].line,n[o].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ca&&e.refresh()})),n("specialCharPlaceholder",Qt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"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",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){wa(e),go(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Yi(t),o=n!=Ca&&Yi(n);o&&o.detach&&o.detach(e,r),r.attach&&r.attach(e,o||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Sa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=ho(t,e.options.lineNumbers),go(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 Ur(e)}),!0),n("scrollbarStyle","native",(function(e){Hr(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=ho(e.options.gutters,t),go(e)}),!0),n("firstLineNumber",1,go,!0),n("lineNumberFormatter",(function(e){return e}),go,!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&&(Or(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Oa),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,Io,!0),n("addModeClass",!1,Io,!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,Io,!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)}(Ea),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,o=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&eo(this,t[e])(this,n,o),he(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Yi(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:to((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,o=n(t);r<e.length&&n(e[r])<=o;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,fr(this)})),removeOverlay:to((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void fr(this)}})),indentLine:to((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Qe(this.doc,e)&&Ta(this,e,t,n)})),indentSelection:to((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var o=t[r];if(o.empty())o.head.line>n&&(Ta(this,o.head.line,e,!0),n=o.head.line,r==this.doc.sel.primIndex&&Pr(this));else{var i=o.from(),a=o.to(),s=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Ta(this,l,e);var c=this.doc.sel.ranges;0==i.ch&&t.length==c.length&&c[r].from().ch>0&&Xo(this.doc,r,new ko(i,c[r].to()),W)}}})),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=pt(this,Ge(this.doc,e.line)),r=0,o=(n.length-1)/2,i=e.ch;if(0==i)t=n[2];else for(;;){var a=r+o>>1;if((a?n[2*a-1]:0)>=i)o=a;else{if(!(n[2*a+1]<i)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var o=n[t],i=this.getModeAt(e);if("string"==typeof i[t])o[i[t]]&&r.push(o[i[t]]);else if(i[t])for(var a=0;a<i[t].length;a++){var s=o[i[t][a]];s&&r.push(s)}else i.helperType&&o[i.helperType]?r.push(o[i.helperType]):o[i.name]&&r.push(o[i.name]);for(var l=0;l<o._global.length;l++){var c=o._global[l];c.pred(i,this)&&-1==B(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return dt(this,(e=at(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return $n(this,null==e?n.head:"object"==typeof e?st(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Gn(this,st(this.doc,e),t||"page")},coordsChar:function(e,t){return Yn(this,(e=qn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=qn(this,{top:e,left:0},t||"page").top,Xe(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,o=!1;if("number"==typeof e){var i=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>i&&(e=i,o=!0),r=Ge(this.doc,e)}else r=e;return Hn(this,r,{top:0,left:0},t||"page",n||o).top+(o?this.doc.height-zt(r):0)},defaultTextHeight:function(){return rr(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,o){var i,a,s,l=this.display,c=(e=$n(this,st(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var f=Math.max(l.wrapper.clientHeight,this.doc.height),p=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);("above"==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(c=e.bottom),u+t.offsetWidth>p&&(u=p-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==o?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==o?u=0:"middle"==o&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(i=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Tr(i,a)).scrollTop&&Nr(i,s.scrollTop),null!=s.scrollLeft&&Dr(i,s.scrollLeft))},triggerOnKeyDown:to(ua),triggerOnKeyPress:to(pa),triggerOnKeyUp:fa,triggerOnMouseDown:to(ga),execCommand:function(e){if(ta.hasOwnProperty(e))return ta[e].call(null,this)},triggerElectric:to((function(e){La(this,e)})),findPosH:function(e,t,n,r){var o=1;t<0&&(o=-1,t=-t);for(var i=st(this.doc,e),a=0;a<t&&!(i=Ra(this.doc,i,o,n,r)).hitSide;++a);return i},moveH:to((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Ra(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),H)})),deleteH:to((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Xi(this,(function(n){var o=Ra(r,n.head,e,t,!1);return e<0?{from:o,to:n.head}:{from:n.head,to:o}}))})),findPosV:function(e,t,n,r){var o=1,i=r;t<0&&(o=-1,t=-t);for(var a=st(this.doc,e),s=0;s<t;++s){var l=$n(this,a,"div");if(null==i?i=l.left:l.left=i,(a=Va(this,l,o,n)).hitSide)break}return a},moveV:to((function(e,t){var n=this,r=this.doc,o=[],i=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(i)return e<0?a.from():a.to();var s=$n(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),o.push(s.left);var l=Va(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Mr(n,Gn(n,l,"div").top-s.top),l}),H),o.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=o[a]})),findWordAt:function(e){var t=Ge(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var o=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var i=t.charAt(n),a=ee(i,o)?function(e){return ee(e,o)}:/\s/.test(i)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ee(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new ko(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?F(this.display.cursorDiv,"CodeMirror-overwrite"):S(this.display.cursorDiv,"CodeMirror-overwrite"),he(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==I()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:to((function(e,t){Ir(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-Sn(this)-this.display.barHeight,width:e.scrollWidth-Sn(this)-this.display.barWidth,clientHeight:jn(this),clientWidth:En(this)}},scrollIntoView:to((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:et(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Fr(e),e.curOp.scrollToPos=t}(this,e):Lr(this,e.from,e.to,e.margin)})),setSize:to((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Vn(this);var o=this.display.viewFrom;this.doc.iter(o,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){pr(n,o,"widget");break}++o})),this.curOp.forceUpdate=!0,he(this,"refresh",this)})),operation:function(e){return Zr(this,e)},startOperation:function(){return Gr(this)},endOperation:function(){return $r(this)},refresh:to((function(){var e=this.display.cachedTextHeight;fr(this),this.curOp.forceUpdate=!0,Bn(this),Ir(this,this.doc.scrollLeft,this.doc.scrollTop),co(this.display),(null==e||Math.abs(e-rr(this.display))>.5||this.options.lineWrapping)&&lr(this),he(this,"refresh",this)})),swapDoc:to((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),_o(this,e),Bn(this),this.display.input.reset(),Ir(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,ln(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},ye(e),e.registerHelper=function(t,r,o){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=o},e.registerGlobalHelper=function(t,r,o,i){e.registerHelper(t,r,i),n[t]._global.push({pred:o,val:i})}}(Ea);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var $a in Pi.prototype)Pi.prototype.hasOwnProperty($a)&&B(Ga,$a)<0&&(Ea.prototype[$a]=function(e){return function(){return e.apply(this.doc,arguments)}}(Pi.prototype[$a]));return ye(Pi),Ea.inputStyles={textarea:qa,contenteditable:Ba},Ea.defineMode=function(e){Ea.defaults.mode||"null"==e||(Ea.defaults.mode=e),De.apply(this,arguments)},Ea.defineMIME=function(e,t){_e[e]=t},Ea.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Ea.defineMIME("text/plain","null"),Ea.defineExtension=function(e,t){Ea.prototype[e]=t},Ea.defineDocExtension=function(e,t){Pi.prototype[e]=t},Ea.fromTextArea=function(e,t){if((t=t?D(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=I();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var o;if(e.form&&(fe(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var i=e.form;o=i.submit;try{var a=i.submit=function(){r(),i.submit=o,i.submit(),i.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(de(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=o))}},e.style.display="none";var s=Ea((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=de,e.on=fe,e.wheelEventPixels=wo,e.Doc=Pi,e.splitLines=Pe,e.countColumn=R,e.findColumn=q,e.isWordChar=Z,e.Pass=U,e.signal=he,e.Line=Gt,e.changeEnd=Eo,e.scrollbarModel=zr,e.Pos=et,e.cmpPos=tt,e.modes=Ne,e.mimeModes=_e,e.resolveMode=Re,e.getMode=Ve,e.modeExtensions=Be,e.extendMode=Ue,e.copyState=We,e.startState=He,e.innerMode=ze,e.commands=ta,e.keyMap=zi,e.keyName=Ji,e.isModifierKey=$i,e.lookupKey=Gi,e.normalizeKeyMap=qi,e.StringStream=qe,e.SharedTextMarker=Ei,e.TextMarker=Oi,e.LineWidget=Ci,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=Ce,e.addClass=F,e.contains=P,e.rmClass=S,e.keyNames=Vi}(Ea),Ea.version="5.61.1",Ea}()},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return He})),n.d(t,"b",(function(){return de})),n.d(t,"c",(function(){return fe}));var r=n(0),o=n.n(r);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(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 f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var w=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(t){function n(e,t){for(var n=0,r=0;r<e.length;r++)n=(n<<5)-n+e.charCodeAt(r),n|=0;return t[Math.abs(n)%t.length]}function r(e,t){var n=t.namespace;if(t.useColors){var r=t.color,o=" ".concat("[3"+(r<8?r:"8;5;"+r),";1m").concat(n," ");e[0]=o+e[0].split("\n").join("\n"+o)}else e[0]=n+" "+e[0]}function o(e,t){if(e[0]=(t.useColors?"%c":"")+t.namespace,t.useColors){var n="color: "+t.color,r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))})),e.splice(o,0,n)}}var i=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function a(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0;return function(){for(var r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];e&&o.unshift(e);var a=t.namespaces.split(",").map((function(e){return"*"===e[e.length-1]?new RegExp("^"+e.slice(0,e.length-1)+".*$"):new RegExp("^"+e+"$")}));a.some((function(t){return t.test(e)})),n(e,t.colors),t.useColors}}void 0===e||"renderer"===e.type||!0===e.browser||e.__nwjs?t.exports=function(t){return a(t,function(){var t;try{t=localStorage.getItem("debug")}catch(e){}return!t&&void 0!==e&&"env"in e&&(t=e.env.DEBUG),{namespaces:t||"",colors:i,useColors:!0,formatArgs:o}}())}:t.exports=function(t){return a(t,{namespaces:e.env.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:r})}})),C=w("informed:ObjMap\t"),A=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String.prototype.replace.call(e,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,t){return null!=e?e[t]:e}),e);return void 0===r||r===e?n:r},O=function(e){return".".concat(e).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},S=function(e,t){var n=O(t),r=function(e){return e.replace(O(e),"").replace(/\./,"")}(t),o=n?k(e,n):e;return!(!o||!Object.hasOwnProperty.call(o,r.replace(/\[(.*)\]/,"$1")))},E=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,t,r,o){return r===o.length-1?(e[t]=n,e[t]):void 0===e[t]?(Number.isInteger(+o[r+1])?e[t]=[]:e[t]={},e[t]):(Number.isInteger(+o[r+1])&&!Array.isArray(e[t])&&(e[t]=[]),e[t])}),e)},j=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=!1;return String.prototype.replace.call(t,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,t,r,o){return void 0===e?e:r===o.length-1?(delete e[t],n=!0,e[t]):e[t]}),e),n},T=function(e){var t=A(e);return Number.isInteger(+t[t.length-1])},M=function(){function e(){i(this,e)}return s(e,null,[{key:"empty",value:function(e){return 0===function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object.keys(e);return t.map((function(t){return e[t]}))}(e).length}},{key:"get",value:function(e,t){return k(e,t)}},{key:"has",value:function(e,t){return S(e,t)}},{key:"set",value:function(t,n,r){if(void 0!==r)C("SETTING",n,r),E(t,n,r);else if(T(n)&&void 0!==e.get(t,n)){C("Special case SETTING",n,"to undefined"),E(t,n,void 0);var o=A(n);P(t,o=o.slice(0,o.length-1))}else T(n)||void 0===e.get(t,n)||(C("Special case REMOVING",n,"from object completley"),e.delete(t,n))}},{key:"delete",value:function(e,t){C("DELETE",t),T(t)?(C("ARRAY",t),this.pullOut(e,t)):j(e,t);var n=A(t);P(e,n=n.slice(0,n.length-1))}},{key:"pullOut",value:function(e,t){var n=A(t),r=n[n.length-1];n=n.slice(0,n.length-1),C("Pulling out:",n,"index",r);var o=k(e,n);C("Array",o),Array.isArray(o)&&function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";String.prototype.replace.call(n,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce((function(e,n,r,o){return void 0===e?e:r===o.length-1&&Array.isArray(e)?(t=e.splice(n,1),e[n]):e[n]}),e)}(o,r),P(e,n)}}]),e}();function P(e,t){if(0!==t.length){var n=k(e,t);(Array.isArray(n)?n.every((function(e){return null==e})):"{}"===JSON.stringify(n))&&j(e,t),P(e,t.slice(0,t.length-1))}}var I=o.a.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),F=o.a.createContext({}),L=o.a.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),N=o.a.createContext(),_=o.a.createContext(),D=o.a.createContext(),R=o.a.createContext(),V=o.a.createContext(),B=o.a.createContext();function U(){return Object(r.useContext)(L)}function W(e){var t=Object(r.useRef)(),n=Object(r.useRef)(!0),o=m(Object(r.useState)(e),2),i=o[0],a=o[1];t.current=i;return Object(r.useEffect)((function(){return function(){n.current=!1}}),[]),[i,function(e){t.current=e,n.current&&a(e)},function(){return t.current}]}var z=function(e){return e.type&&e.type.name?e.type.name:e.displayName||e.name||"Component"},H=function(e){var t={};if(e.inner){if(0===e.inner.length)return void M.set(t,e.path,e.message);var n,r=function(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=b(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}(e.inner);try{for(r.s();!(n=r.n()).done;){var o=n.value;M.get(t,o.path)||M.set(t,o.path,o.message)}}catch(o){r.e(o)}finally{r.f()}}return t},q=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(e){return H(e)}},G=function(e){if(e.inner){if(0===e.inner.length)return;return e.inner[0].message}},$=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(e){return G(e)}},K=function(e,t){e(t);var n={};return e.errors&&e.errors.forEach((function(e){var t=e.message,r=e.dataPath,o=e.keyword,i=e.params,a=r;"required"===o&&(a="".concat(a,".").concat(i.missingProperty)),a=a.replace(".",""),M.set(n,a,t)})),n},J=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)}))},Y=function(e,t,n){var r=t["ui:control"],o=t["informed:props"],i=t["input:props"],a=t["ui:before"],s=t["ui:after"],l=t.oneOf,c=t.items,u=t.enum,p=t.title,d=t.minimum,h=t.maximum,v=t.minLength,g=t.maxLength,m=t.pattern,y=t.type,b=t.properties,x=J();i&&i.id&&(x=i.id);var w={componentType:r,field:n?"".concat(n,".").concat(e):e,type:y,uiBefore:a,uiAfter:s,properties:"object"===y?b:void 0,items:"array"===y?c:void 0,props:f(f({label:p,id:x,min:d,max:h,minLength:v,maxLength:g,pattern:m},o),i)};if(l){var C=t.oneOf.map((function(e){var t=e["input:props"],n=void 0===t?{}:t;return f({value:e.const,label:e.title},n)}));w.props.options=C}if(u){var A=t.enum.map((function(e){return{value:e,label:e}}));w.props.options=A}if(c&&c.oneOf){var k=c.oneOf.map((function(e){var t=e["input:props"],n=void 0===t?{}:t;return f({value:e.const,label:e.title},n)}));w.props.options=k}return w},X=function(e,t,n){if(!e||t)return[];var r=e.properties,o=void 0===r?{}:r,i=e.allOf,a=e.propertyOrder,s=void 0===a?[]:a;if(Object.keys(o).length>0){var l=Object.keys(o).sort((function(e,t){var n=s.indexOf(e),r=s.indexOf(t);return(n>-1?n:s.length+1)-(r>-1?r:s.length+1)})).map((function(e){var t=o[e];return Y(e,t,n)}));return i&&l.push({componentType:"conditionals",allOf:i}),l}return[]},Q=function(e,t){if(!e)return{val:e,offset:0};var n="".concat(e),r=function(e,t){if("string"==typeof e)return e.split("").map((function(e){return"#"===e?/\d/:"*"===e?/[\w]/:e}));if("function"==typeof e)return e(t);if(Array.isArray(e))return e;throw new Error("Formatter must be string, array, or function")}(t,n),o=r.findIndex((function(e){return"string"!=typeof e})),i=r.length-y(r).reverse().findIndex((function(e){return"string"!=typeof e})),a=[],s=n.split(""),l=0,c=0,u=function(e,t){for(var n=0,r=-1,o=!0;o&&n<e.length;)e[n]==t[n]?r=n:o=!1,n+=1;return r}(r.slice(0,o),s.slice(0,o));u>-1&&(l=u+1,a=a.concat(r.slice(0,u+1)),c=u+1),u<0&&(a=a.concat(r.slice(0,o)),c=o);for(var f=c;f<r.length;f++){var p=r[f];if(l!=s.length){var d=s[l];if("function"==typeof p)a.push(p(d)),l+=1;else{var h="string"==typeof p?p===d:p.test(d);h&&"string"==typeof p?(a.push(p),l+=1):h||"string"!=typeof p?h&&"string"!=typeof p?(a.push(d),l+=1):h||"string"==typeof p||(l+=1,f-=1):l!=s.length&&a.push(p)}}else{if(!("string"==typeof p&&f>=i))break;a.push(p)}}return{value:a.join(""),offset:n?a.length-n.length:0}},Z="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,ee=function(e){var t=e.value,n=e.inputRef,r=e.maintainCursor,o=void 0===r||r,i=m(W(0),3),a=i[0],s=i[1],l=i[2],c=m(W(0),3),u=c[0],f=c[1],p=c[2];return Z((function(){if(null!=n.current&&l()){var e=l()+p();0!=p()&&o?n.current.setSelectionRange(e+1,e+1):o&&n.current.setSelectionRange(e,e)}}),[t]),{setCursorOffset:f,setCursor:s,cursor:a,getCursor:l,cursorOffset:u}},te=function(e,t){var n=Object(r.useRef)(!0),o=n.current;Object(r.useEffect)((function(){if(!o)return e();n.current=!1}),t)},ne=w("informed:useField\t"),re=function(e,t,n,r,o){if(null!=e)return o?o(e):t?t(e):n&&!r?Q(e,n).value:e},oe=function(e,t,n,r){return t&&n?t(e):r?Q(e,r).value:e},ie=function(e,t,n){var r=n.required;return e||t?function(n,r){return t?$(t,n):e?e(n,r):void 0}:r?function(e){return ue(e,r)}:void 0},ae=function(e){var t=e.fieldType,n=e.setValue,r=e.onChange,o=e.multiple,i=e.ref,a=function(e){return n(e)};return"text"!==t&&"textArea"!==t&&"number"!==t||(a=function(e){return n(e.target.value,e)}),"select"===t&&(a=function(){var e=Array.from(i.current).filter((function(e){return e.selected})).map((function(e){return e.value}));n(o?e:e[0]||"")}),"checkbox"===t&&(a=function(e){n(e.target.checked),r&&r(e)}),function(e){a(e)}},se=function(e){var t=e.setTouched,n=e.onBlur;return function(e){t(!0),n&&n(e)}},le=function(e){var t=e.fieldType,n=e.maskedValue,r=e.multiple,o=e.value;switch(t){case"text":case"number":return n||0===n?n:"";case"textArea":return n||"";case"select":return o||(r?[]:"");case"checkbox":return!!o;default:return o}},ce=function(e){switch(e){case"text":case"number":case"checkbox":return e;default:return}},ue=function(e,t){if(t&&(null==e||""===e))return"string"==typeof t?t:"This field is required"};function fe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=e.field,i=e.validate,a=e.asyncValidate,s=e.validationSchema,l=e.mask,c=e.maskWithCursorOffset,u=e.format,p=e.parse,d=e.formatter,v=e.parser,g=e.initialValue,b=e.validateOnChange,x=e.validateOnBlur,w=e.validateOnMount,C=e.asyncValidateOnBlur,A=e.maskOnBlur,k=e.allowEmptyString,O=e.onValueChange,S=e.notify,E=e.keepState,j=e.maintainCursor,T=e.debug,P=e.shadow,F=e.step,L=e.fieldType,N=e.multiple,_=e.onChange,D=e.onBlur,R=e.formController,V=e.relevant,z=e.required,H=e.keepStateIfRelevant,q=e.initialize,G=e.formatterDependencies,$=void 0===G?[]:G,K=h(e,["field","validate","asyncValidate","validationSchema","mask","maskWithCursorOffset","format","parse","formatter","parser","initialValue","validateOnChange","validateOnBlur","validateOnMount","asyncValidateOnBlur","maskOnBlur","allowEmptyString","onValueChange","notify","keepState","maintainCursor","debug","shadow","step","fieldType","multiple","onChange","onBlur","formController","relevant","required","keepStateIfRelevant","initialize","formatterDependencies"]),Y=Object(r.useState)(J()),X=m(Y,1),ue=X[0],fe=Object(r.useContext)(I),pe=Object(r.useContext)(B),de=pe||H,he=U(),ve=Object(r.useRef)(),ge=Object(r.useRef)(!0),me=Object(r.useRef)(),ye=Object(r.useRef)(!1),be=function(){return!ye.current},xe=function(){return ye.current};R&&(fe=R.updater,he=R.getFormApi());var we,Ce,Ae=ie(i,s,{required:z}),ke=Object(r.useState)((function(){return fe.getInitialValue(n)})),Oe=m(ke,1),Se=Oe[0],Ee=fe.getSavedValue(n);(E||de)&&Ee?(ne("Setting field ".concat(At,"'s kept state"),Ee),we=Ee.value,Ce=Ee.touched,he.removeSavedState(At)):we=null!=g?g:Se;var je=W(re(we,l,d,v,q)),Te=m(je,3),Me=Te[0],Pe=Te[1],Ie=Te[2],Fe=W(w?Ae(Me):void 0),Le=m(Fe,3),Ne=Le[0],_e=Le[1],De=Le[2],Re=W(Ce),Ve=m(Re,3),Be=Ve[0],Ue=Ve[1],We=Ve[2],ze=Object(r.useState)((function(){return oe(Me,u,p,d)})),He=m(ze,2),qe=He[0],Ge=He[1],$e=Object(r.useRef)();$e.current=qe;var Ke=Object(r.useRef)(g),Je=Object(r.useRef)(n),Ye=Object(r.useRef)();Ke.current=g,Je.current=n;var Xe=Object(r.useRef)(null),Qe=o.a.useMemo((function(){return t||Xe}),[]),Ze=ee({value:Me,inputRef:Qe,maintainCursor:!!j}),et=Ze.getCursor,tt=Ze.setCursor,nt=Ze.setCursorOffset,rt=function(){return!0},ot=function(e){var t=V||rt,n=he.getFullField(Je.current)||Je.current,r={path:n,parentPath:n.replace(/(.*)[.[].*/,"$1"),get:function(e,t){return M.get(e,t)}};return pe&&pe.relevant?t(e,r)&&pe.relevant(e,r):t(e,r)},it=W(ot(he.getValues())),at=m(it,3),st=at[0],lt=at[1],ct=at[2],ut=function(e){return!pe||!pe.relevant||pe.relevant(e)},ft=function(){var e=ot(he.getValues());return e!=ct()&&lt(e),e};Object(r.useEffect)((function(){st||E||ve.current.reset()}),[st]);var pt=function(){return P?he.getDerrivedValue(n):Ie()},dt=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.preventUpdate;F&&he.getStep()<F?(ne("Setting ".concat(n,"'s error to undefined as we are not at that step")),_e(void 0),fe.setError(ue,void 0,!r)):(ne("Setting ".concat(n,"'s error to ").concat(e)),_e(e),fe.setError(ue,e,!r))},ht=function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t;ye.current=!0,ne("Setting ".concat(n," to ").concat(i)),q&&(i=q(i));var a=he.getOptions(),s=i;if(""!==i||k||o.allowEmptyString||a.allowEmptyStrings||(i=void 0),"number"!==e.type&&"number"!==L||void 0===i||(i=+i),r&&r.target&&r.target.selectionStart&&tt(r.target.selectionStart),l&&!A&&(s=l(i,et()),i=l(i,et())),c&&!A){var f=c(i,et());s=f.value,i=f.value,nt(f.offset)}if(u&&p&&(i=p(i),s=u(i)),d){var h=Q(i,d);nt(h.offset),i=s=h.value}v&&(i=null!=i?v(i):i),Ae&&b&&!o.initial&&(ne("Validating after change ".concat(n," ").concat(i)),dt(Ae(i,he.getValues()))),Pe(i),Ge(s),O&&O(i),fe.setValue(ue,i,!o.preventUpdate)};te((function(){ve.current.setValue($e.current)}),y($));var vt=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.preventUpdate;if(ne("Field ".concat(n," has been touched")),Ae&&x&&!t&&e&&(ne("Validating after blur ".concat(n," ").concat(pt())),dt(Ae(pt(),he.getValues()))),a&&C&&!t&&e&&(ne("Validating async after blur ".concat(n," ").concat(pt())),a(pt(),he.getValues())),l&&A){var i=l(pt());Pe(i),Ge(i),O&&O(i),fe.setValue(ue,i,!o)}if(c&&A){var s=c(pt());nt(s.offset),Pe(s.value),Ge(s.value),O&&O(s.value),fe.setValue(ue,s.value,!o)}Ue(e),fe.setTouched(ue,e,!o)},gt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.preventUpdate,n=re(Ke.current||fe.getInitialValue(Je.current),l,d,v,q);ht(n,null,{initial:!0,preventUpdate:t}),dt(w?Ae(n):void 0,{preventUpdate:t}),vt(void 0,!0,{preventUpdate:t}),ye.current=!1},mt=function(e){Ae&&(ne("Field validating ".concat(n," ").concat(pt())),dt(Ae(pt(),e||he.getValues())))},yt=function(e){a&&(ne("Field async validating ".concat(n," ").concat(pt())),a(pt(),e||he.getValues()))},bt={setValue:ht,setTouched:vt,setError:dt,reset:gt,validate:mt,asyncValidate:yt,getValue:pt,getTouched:We,getError:De,getIsRelevant:ct,getDirty:xe,getPristine:be,getFieldState:function(){return{value:pt(),touched:We(),dirty:xe(),pristine:be()}},relevant:ot,multistepRelevant:ut,checkRelevant:ft};ve.current=bt;var xt={value:Me,error:Ne,touched:Be,maskedValue:qe,isRelevant:st,dirty:ye.current,pristine:!ye.current};P&&(xt={error:Ne,touched:Be}),ne("Render",he.getFullField(n),xt),Z((function(){var e=he.getFullField(Je.current);return ne("Register",ue,Je.current),me.current={field:e,fieldId:ue,fieldApi:bt,fieldState:xt,notify:S,keepState:E,inMultistep:de,shadow:P},fe.register(ue,me.current),function(){var e=he.getFullField(Je.current);ne("Deregister",ue,e),fe.deregister(ue)}}),[]),Object(r.useEffect)((function(){var e=he.getFullField(n);return ge.current?ge.current=!1:(ne("Update",n,de),me.current.field=e,fe.update(ue,me.current,Ye.current)),function(){Ye.current=e}}),[n]),Z((function(){T&&Qe&&(Qe.current.style.border="5px solid orange",setTimeout((function(){Qe.current.style.borderWidth="2px",Qe.current.style.borderStyle="inset",Qe.current.style.borderColor="initial",Qe.current.style.borderImage="initial"}),500))}));var wt=[].concat(y(Object.values(xt)),y(Object.values(e)),y(Object.values(K))),Ct=function(e){return Object(r.useMemo)((function(){return st?e:null}),y(wt))},At=n,kt=ae({fieldType:L,setValue:ht,onChange:_,multiple:N,ref:Qe}),Ot=se({setTouched:vt,onBlur:D}),St=le({fieldType:L,maskedValue:qe,multiple:N,value:Me}),Et=ce(L);return{fieldState:xt,fieldApi:bt,render:Ct,ref:Qe,userProps:f(f({},K),{},{multiple:N,onChange:_,onBlur:D,id:K.id||ue}),informed:f({name:At,multiple:N,onChange:kt,onBlur:Ot,value:St,ref:Qe,type:Et,id:K.id||ue},K)}}var pe,de=function(e){var t=o.a.forwardRef((function(t,n){var r=fe(t,n),i=r.fieldState,a=r.fieldApi,s=r.render,l=r.ref,u=r.userProps;return s(o.a.createElement(e,c({fieldApi:a,fieldState:i,field:t.field,forwardedRef:l,debug:t.debug,type:t.type},u)))}));return t.displayName="asField(".concat(z(e),")"),t},he=w("informed:Text\t"),ve=de((function(e){var t=e.fieldApi,n=e.fieldState,r=h(e,["fieldApi","fieldState"]),i=n.maskedValue,a=t.setValue,s=t.setTouched,l=r.onChange,u=r.onBlur,f=r.field,p=(r.initialValue,r.forwardedRef),d=r.debug,v=r.label,g=(r.title,r.id),m=h(r,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return he("Render",f),Z((function(){d&&p&&(p.current.style.background="red",setTimeout((function(){p.current.style.background="white"}),500))})),o.a.createElement(o.a.Fragment,null,v?o.a.createElement("label",{htmlFor:g}," ",v," "):null,o.a.createElement("input",c({},m,{id:g,name:f,ref:p,value:i||0===i?i:"",onChange:function(e){a(e.target.value,e),l&&l(e)},onBlur:function(e){s(!0),u&&u(e)}})))})),ge=de((function(e){var t=e.fieldApi,n=e.fieldState,r=h(e,["fieldApi","fieldState"]),i=n.maskedValue,a=t.setValue,s=t.setTouched,l=r.onChange,u=r.onBlur,f=r.field,p=(r.initialValue,r.forwardedRef),d=r.debug,v=r.label,g=r.id,m=h(r,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return Z((function(){d&&p&&(p.current.style.background="red",setTimeout((function(){p.current.style.background="white"}),500))})),o.a.createElement(o.a.Fragment,null,v?o.a.createElement("label",{htmlFor:g}," ",v," "):null,o.a.createElement("textarea",c({},m,{id:g,name:f,ref:p,value:i||"",onChange:function(e){a(e.target.value,e),l&&l(e)},onBlur:function(e){s(!0),u&&u(e)}})))})),me=w("informed:Select\t"),ye=de((function(e){var t=e.fieldApi,n=e.fieldState,i=h(e,["fieldApi","fieldState"]),a=n.value,s=t.setTouched,l=i.onChange,u=i.onBlur,f=i.field,p=(i.initialValue,i.options),d=i.children,v=i.forwardedRef,g=i.debug,m=i.multiple,y=i.label,b=i.id,x=h(i,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),w=Object(r.useRef)();return Z((function(){g&&v&&(v.current.style.background="red",setTimeout((function(){v.current.style.background="white"}),500))})),me("Render",f,a),o.a.createElement(o.a.Fragment,null,y?o.a.createElement("label",{htmlFor:b}," ",y," "):null,o.a.createElement("select",c({},x,{id:b,multiple:m,name:f,ref:v||w,value:a||(m?[]:""),onChange:function(e){var n=Array.from((v||w).current).filter((function(e){return e.selected})).map((function(e){return e.value}));t.setValue(m?n:n[0]||""),l&&e&&l(e)},onBlur:function(e){s(!0),u&&u(e)}}),p?p.map((function(e){return o.a.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label)})):d))})),be=de((function(e){var t=e.fieldApi,n=e.fieldState,r=h(e,["fieldApi","fieldState"]),i=n.value,a=t.setValue,s=t.setTouched,l=r.onChange,u=r.onBlur,f=r.field,p=(r.initialValue,r.debug,r.forwardedRef),d=r.id,v=r.label,g=h(r,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return o.a.createElement(o.a.Fragment,null,v?o.a.createElement("label",{htmlFor:d}," ",v," "):null,o.a.createElement("input",c({},g,{id:d,name:f,ref:p,checked:!!i,onChange:function(e){a(e.target.checked),l&&l(e)},onBlur:function(e){s(!0),u&&u(e)},type:"checkbox"})))})),xe=(pe=function(e){var t=e.radioGroupApi,n=e.radioGroupState,r=h(e,["radioGroupApi","radioGroupState"]),i=n.value,a=t.setValue,s=t.setTouched,l=t.onChange,u=t.onBlur,f=r.value,p=r.onChange,d=r.onBlur,v=r.field,g=(r.initialValue,r.forwardedRef),m=h(r,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return o.a.createElement("input",c({},m,{name:v,ref:g,value:f,checked:i===f,onChange:function(e){e.target.checked&&(a(f),p&&p(e),l&&l(e))},onBlur:function(e){s(!0),d&&d(e),u&&u(e)},type:"radio"}))},o.a.forwardRef((function(e,t){return o.a.createElement(N.Consumer,null,(function(n){var r=n.radioGroupApi,i=n.radioGroupState;return o.a.createElement(pe,c({radioGroupApi:r,radioGroupState:i,ref:t},e))}))}))),we=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(n,e);var t=g(n);function n(){return i(this,n),t.apply(this,arguments)}return s(n,[{key:"render",value:function(){var e=this.props,t=e.options,n=e.children;return o.a.createElement(N.Provider,{value:this.groupContext},t?t.map((function(e){return o.a.createElement("label",{key:e.value},e.label," ",o.a.createElement(xe,{value:e.value}))})):n)}},{key:"groupContext",get:function(){return{radioGroupApi:f(f({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),n}(r.Component),Ce=de(we);var Ae=w("informed:useArrayField\t"),ke=function(e){var t=e.field,n=e.initialValue,i=e.validate,a=e.arrayFieldApiRef,s=h(e,["field","initialValue","validate","arrayFieldApiRef"]),l=U(),c=m(Object(r.useState)(new Map),1)[0],u=Object(r.useContext)(I),p=l.getFullField(t),d=u.getInitialValue(t)||n||[],v=m(W(l.getSavedValue(p)&&l.getSavedValue(p).value||d),3),g=v[0],b=v[1],x=v[2],w=m(W(g?g.map((function(){return J()})):[]),3),C=w[0],A=w[1],k=w[2],O=Object(r.useMemo)((function(){return function(e,t){var n=null==k()?0:k().length;return i?i(e,n,t):void 0}})),S=fe(f({field:t,validate:i?O:void 0,shadow:!0},s)).fieldApi;Z((function(){var e=function(e){e!==p&&(Ae("".concat(p," changed")),RegExp("".concat(p,"\\[[0-9]+\\]")).test(e)&&S.validate())};return l.emitter.on("value",e),function(){l.emitter.removeListener("value",e)}}),[t]);var E=function(e,n){Ae("Swapping","".concat(t,"[").concat(e,"] and ").concat(t,"[").concat(n,"]"));var r=y(C);C[e]&&C[n]?(r[e]=C[n],r[n]=C[e]):console.warn("Attempted to swap ".concat(e," with ").concat(n," but one of them does not exist :(")),A(r)},j=function(){C.push(J()),A(y(C))},T=function(e){C.push(J()),A(y(C));var t=y(x());t[C.length-1]=e,b(t)},P=C.map((function(e,n){var r={remove:function(){return function(e){Ae("EXPECTING REMOVAL OF","".concat(t,"[").concat(e,"] and ").concat(t,"[").concat(C.length-1,"]")),u.expectRemoval("".concat(t,"[").concat(e,"]")),u.expectRemoval("".concat(t,"[").concat(C.length-1,"]"));var n=C.slice(0,e).concat(C.slice(e+1,C.length));A(n);var r=x(),o=r.slice(0,e).concat(r.slice(e+1,r.length));b(o)}(n)}},o={initialValue:g&&g[n],key:e,field:"".concat(t,"[").concat(n,"]"),index:n};return f(f({arrayFieldItemApi:r,arrayFieldItemState:o},r),o)})),F={add:j,swap:E,addWithInitialValue:T,reset:function(){var e=u.getInitialValue(t)||n||[];b(e);var r=e?e.map((function(){return J()})):[];A(r)}};a&&(a.current=F);var L={fields:P,field:t},N=f(f({},u),{},{register:function(e,t){c.set(e,t);for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];u.register.apply(u,[e,t].concat(r))},deregister:function(e){c.delete(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];u.deregister.apply(u,[e].concat(n))},getInitialValue:function(e){if(RegExp("".concat(p,"\\[[0-9]+\\]")).test(e)){var n=e.replace(t,""),r=M.get(x(),n);return Ae("Resetting ".concat(n," to ").concat(r)),r}return u.getInitialValue(e)}});return{render:function(e){return o.a.createElement(I.Provider,{value:N},o.a.createElement(D.Provider,{value:F},o.a.createElement(_.Provider,{value:L},e)))},add:j,swap:E,addWithInitialValue:T,fields:P,arrayFieldState:L,arrayFieldApi:F,field:t}};function Oe(e){var t=U();return Object(r.useMemo)((function(){return function(e,t){return f(f({},t),{},{getValue:function(n){return t.getValue("".concat(e,".").concat(n))},getTouched:function(n){return t.getTouched("".concat(e,".").concat(n))},getError:function(n){return t.getError("".concat(e,".").concat(n))},setValue:function(n,r){return t.setValue("".concat(e,".").concat(n),r)},setTouched:function(n,r){return t.setTouched("".concat(e,".").concat(n),r)},setError:function(n,r){return t.setError("".concat(e,".").concat(n),r)},getInitialValue:function(n){return t.getInitialValue("".concat(e,".").concat(n))},getSavedValue:function(n){return t.getSavedValue("".concat(e,".").concat(n))},getFullField:function(n){return"".concat(t.getFullField(e),".").concat(n)}})}(e,t)}),[e])}function Se(){return Object(r.useContext)(F)}var Ee=function(e){var t=e.when,n=e.children;return t(Se())?n:null},je=function(e){var t=e.relevant,n=e.field,r=h(e,["relevant","field"]),i=U();if(t){var a=i.getFullField(n),s={path:a,parentPath:a.replace(/(.*)[.[].*/,"$1"),get:function(e,t){return M.get(e,t)}};return o.a.createElement(Ee,{when:function(e){var n=e.values;return t(n,s)}},o.a.createElement(Te,c({field:n},r)))}return o.a.createElement(Te,c({field:n},r))},Te=function(e){var t=e.children,n=h(e,["children"]),r=ke(n),o=r.render,i=r.arrayFieldState,a=r.arrayFieldApi,s=r.field;return o("function"==typeof t?t(f(f({field:s,arrayFieldApi:a,arrayFieldState:i},a),i)):t)},Me=function(e){var t=e.arrayFieldItemState,n=e.arrayFieldItemApi,i=e.children,a=Object(r.useContext)(I),s=U(),l=m(Object(r.useState)(0),2),c=(l[0],l[1]),u=m(Object(r.useState)(new Map),1)[0],p=t.field,d=Oe(p);Object(r.useEffect)((function(){var e=function(e){e.slice(0,-1!=e.lastIndexOf("[")?e.lastIndexOf("]")+1:e.length)===p&&c(Math.random())};return s.emitter.on("value",e),function(){s.emitter.removeListener("value",e)}}),[p]);var h,v,g,y,b=(h=s.getState(),v=h.values,g=h.errors,y=h.touched,{values:M.get(v,p),errors:M.get(g,p),touched:M.get(y,p)}),x=f(f({},a),{},{register:function(e,t,n){u.set(e,t),a.register(e,t,n)},deregister:function(e){u.delete(e);for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];a.deregister.apply(a,[e].concat(n))}}),w=f(f(f({},n),d),{},{reset:function(){u.forEach((function(e){e.fieldApi.reset()}))}}),C=f(f({},t),b);return"function"==typeof i?o.a.createElement(I.Provider,{value:x},o.a.createElement(R.Provider,{value:w},o.a.createElement(V.Provider,{value:C},i(f(f({arrayFieldItemApi:w,arrayFieldItemState:C},w),C))))):o.a.createElement(I.Provider,{value:x},o.a.createElement(R.Provider,{value:w},o.a.createElement(V.Provider,{value:C},i)))};je.Items=function(e){var t=e.children;return Object(r.useContext)(_).fields.map((function(e){var n=e.arrayFieldItemState,r=e.arrayFieldItemApi,i=n.key;return o.a.createElement(Me,{key:i,arrayFieldItemApi:r,arrayFieldItemState:n},t)}))};var Pe=function(e){var t=e.components,n=Object(r.useContext)(I).fieldMap;return t?t.map((function(e,t){var r=e["ui:control"],i=n[r];return o.a.createElement(i,{key:"ui-comp-".concat(t)})})):null},Ie=w("informed:FormFields\t"),Fe=function e(t){var n=t.schema,i=t.prefix,a=t.onlyValidateSchema,s=Object(r.useContext)(I).fieldMap;return Object(r.useMemo)((function(){return X(n,a,i).map((function(t,n){var r=t.field,i=t.props,a=t.type,l=t.properties,u=t.items,f=t.componentType,p=t.uiBefore,d=t.uiAfter,h=t.allOf,v=s[f];return Ie("Rendering Field",r,t),!v&&"object"===a&&l?o.a.createElement(e,{schema:t,prefix:r,key:"ScheamField-".concat(n)}):!v&&"array"===a&&u?o.a.createElement(Le,c({key:"ScheamField-".concat(n),field:r,items:u,uiBefore:p,uiAfter:d},i)):v&&"array"===f&&u&&"array"===a?o.a.createElement(v,c({key:"ScheamField-".concat(n),field:r,items:u,uiBefore:p,uiAfter:d},i)):"conditionals"===f?h.map((function(t){var r=t.then,i=t.if.properties;return o.a.createElement(Ee,{key:"ScheamField-".concat(n),when:function(e){var t=e.values;return Object.keys(i).every((function(e){var n=i[e];return t[e]===n.const}))}},o.a.createElement(e,{schema:r}))})):v?o.a.createElement(v,c({key:"ScheamField-".concat(n),field:r},i)):null}))}),[n,i])},Le=function(e){var t=e.field,n=e.items,r=e.uiBefore,i=e.uiAfter,a=h(e,["field","items","uiBefore","uiAfter"]);return o.a.createElement(je,c({field:t},a),o.a.createElement(Pe,{components:r}),o.a.createElement(je.Items,null,(function(e){var t=e.field;return o.a.createElement(o.a.Fragment,null,o.a.createElement(Pe,{components:n["ui:before"]}),o.a.createElement(Fe,{schema:n,prefix:t}),o.a.createElement(Pe,{components:n["ui:after"]}))})),o.a.createElement(Pe,{components:i}))},Ne={select:ye,input:ve,textarea:ge,checkbox:be,radio:Ce,add:function(){var e=Object(r.useContext)(D).add;return o.a.createElement("button",{onClick:function(){e()},type:"button"},"Add")},remove:function(){var e=Object(r.useContext)(R).remove;return o.a.createElement("button",{onClick:function(){e()},type:"button"},"Remove")},array:Le},_e=w("informed:Controller\t"),De=function(){},Re=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this.options=n,this.subscriptions=new Map;var r=n.ajv,o=n.schema,a=n.fieldMap;this.ajv=r?new r({allErrors:!0}):null,this.ajvValidate=r?this.ajv.compile(o):null,this.fieldMap=a||Ne,this.fieldsById=new Map,this.fieldsByName={get:function(e){var n;return t.fieldsById.forEach((function(t){t&&t.field===e&&(n=t)})),n}},this.onScreen={},this.expectedRemovals={},this.pulledOut={},this.savedValues={},this.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},this.dummyField={fieldApi:{setValue:De,setTouched:De,setError:De,reset:De,validate:De,getValue:De,getTouched:De,getError:De,getFieldState:De,checkRelevant:De,getPristine:De,getDirty:De}},this.deregister=this.deregister.bind(this),this.register=this.register.bind(this),this.getValue=this.getValue.bind(this),this.getTouched=this.getTouched.bind(this),this.getError=this.getError.bind(this),this.getErrors=this.getErrors.bind(this),this.setValue=this.setValue.bind(this),this.getValues=this.getValues.bind(this),this.getStep=this.getStep.bind(this),this.setStep=this.setStep.bind(this),this.back=this.back.bind(this),this.next=this.next.bind(this),this.setCurrent=this.setCurrent.bind(this),this.setTouched=this.setTouched.bind(this),this.setError=this.setError.bind(this),this.setFormError=this.setFormError.bind(this),this.submitForm=this.submitForm.bind(this),this.reset=this.reset.bind(this),this.update=this.update.bind(this),this.validate=this.validate.bind(this),this.screenValid=this.screenValid.bind(this),this.keyDown=this.keyDown.bind(this),this.getField=this.getField.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.setInitialValue=this.setInitialValue.bind(this),this.getOptions=this.getOptions.bind(this),this.getFormState=this.getFormState.bind(this),this.expectRemoval=this.expectRemoval.bind(this),this.getSavedValue=this.getSavedValue.bind(this),this.removeSavedState=this.removeSavedState.bind(this),this.getDerrivedValue=this.getDerrivedValue.bind(this),this.setValues=this.setValues.bind(this),this.resetField=this.resetField.bind(this),this.fieldExists=this.fieldExists.bind(this),this.validateField=this.validateField.bind(this),this.notify=this.notify.bind(this),this.validating=this.validating.bind(this),this.validated=this.validated.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.updater={register:this.register,deregister:this.deregister,getField:this.getField,update:this.update,fieldMap:this.fieldMap,setValue:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=t.fieldsById.get(e);o.shadow||M.set(t.state.values,o.field,o.fieldApi.getValue()),o.fieldApi.relevant(t.state.values)||M.delete(t.state.values,o.field),t.fieldsById.forEach((function(e){var n=e.fieldApi.checkRelevant();e.fieldApi.multistepRelevant(t.state.values)&&(n||e.keepState)||(M.delete(t.state.values,e.field),M.delete(t.state.touched,e.field),M.delete(t.state.errors,e.field))})),r&&(t.emit("change"),t.emit("field",o.field),t.emit("value",o.field,n))},setTouched:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=t.fieldsById.get(e);!o.shadow&&o.fieldApi.getIsRelevant()&&M.set(t.state.touched,o.field,o.fieldApi.getTouched()),o.shadow&&null!=o.fieldApi.getError()&&o.fieldApi.relevant(t.state.values)&&M.set(t.state.touched,o.field,o.fieldApi.getTouched()),r&&(t.emit("change"),t.emit("field",o.field))},setError:function(e,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=t.fieldsById.get(e);!o.shadow&&o.fieldApi.getIsRelevant()&&M.set(t.state.errors,o.field,o.fieldApi.getError());var i=M.get(t.state.errors,o.field);(o.shadow&&null!=o.fieldApi.getError()&&o.fieldApi.relevant(t.state.values)||o.shadow&&void 0===o.fieldApi.getError()&&o.fieldApi.relevant(t.state.values)&&"string"==typeof i)&&M.set(t.state.errors,o.field,o.fieldApi.getError()),r&&(t.emit("change"),t.emit("field",o.field))},expectRemoval:this.expectRemoval,getInitialValue:this.getInitialValue,getSavedValue:this.getSavedValue},this.formApi={setValue:this.setValue,setTouched:this.setTouched,setError:this.setError,setFormError:this.setFormError,setValues:this.setValues,setInitialValue:this.setInitialValue,getValue:this.getValue,getTouched:this.getTouched,getError:this.getError,reset:this.reset,submitForm:this.submitForm,getState:this.getFormState,getValues:this.getValues,getFullField:this.getFullField,fieldExists:this.fieldExists,getInitialValue:this.getInitialValue,validate:this.validate,validateField:this.validateField,screenValid:this.screenValid,resetField:this.resetField,getOptions:this.getOptions,emitter:this,getSavedValue:this.getSavedValue,removeSavedState:this.removeSavedState,getDerrivedValue:this.getDerrivedValue,getStep:this.getStep,setStep:this.setStep,next:this.next,back:this.back,setCurrent:this.setCurrent,validated:this.validated,validating:this.validating,getDirty:this.getDirty,getPristine:this.getPristine,getField:this.getField},this.on("value",(function(e){delete t.state.error,t.notify(e)}))}return s(e,[{key:"emit",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=this.subscriptions.get(e);o&&o.forEach((function(e){return e.apply(void 0,n)}))}},{key:"on",value:function(e,t){this.subscriptions.get(e)||this.subscriptions.set(e,new Set),this.subscriptions.get(e).add(t)}},{key:"removeListener",value:function(e,t){this.subscriptions.get(e).delete(t)}},{key:"setOptions",value:function(e){this.options=e}},{key:"setValue",value:function(e,t,n){this.getField(e).fieldApi.setValue(t,null,f({allowEmptyString:this.options.allowEmptyStrings},n))}},{key:"setTouched",value:function(e,t){this.getField(e).fieldApi.setTouched(t)}},{key:"setError",value:function(e,t){this.getField(e).fieldApi.setError(t)}},{key:"setFormError",value:function(e){this.state.error=e,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(e,t){this.state.validating=this.state.validating-1,this.getError(e)||this.setError(e,t),this.state.validating>0||this.state.submitting&&(this.valid()?(_e("Submit",this.state),this.emit("submit")):(_e("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(e){this.state.step=e,this.emit("change")}},{key:"setCurrent",value:function(e){this.state.Current=e,this.emit("change")}},{key:"back",value:function(e){this.state.step=this.state.step-1,this.state.Current=e,this.emit("change")}},{key:"next",value:function(e){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=e),this.emit("change")}},{key:"setInitialValue",value:function(e,t){M.set(this.options.initialValues,e,t)}},{key:"getFormState",value:function(){return _e("Returning form state"),f(f({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(e){var t=this.getValues();return M.get(t,e)}},{key:"getValue",value:function(e){var t=this.getField(e).fieldApi.getValue();return _e("Getting value for",e,t),t}},{key:"getTouched",value:function(e){var t=this.getField(e).fieldApi.getTouched();return _e("Getting touched for",e,t),t}},{key:"getError",value:function(e){var t=this.getField(e).fieldApi.getError();return _e("Getting error for",e,t),t}},{key:"getDirty",value:function(e){var t=this.getField(e).fieldApi.getDirty();return _e("Getting dirty for",e,t),t}},{key:"getPristine",value:function(e){var t=this.getField(e).fieldApi.getPristine();return _e("Getting pristine for",e,t),t}},{key:"getValues",value:function(){return _e("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return _e("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return _e("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(e){var t=this.fieldsByName.get(e);return t&&t.shadow?M.get(this.savedValues,"shadow-".concat(e)):M.get(this.savedValues,e)}},{key:"removeSavedState",value:function(e){var t=this.fieldsByName.get(e);return t&&t.shadow?M.delete(this.savedValues,"shadow-".concat(e)):M.delete(this.savedValues,e)}},{key:"getFullField",value:function(e){return e}},{key:"getInitialValue",value:function(e){return M.get(this.options.initialValues,e)}},{key:"getField",value:function(e){_e("Getting Field",e);var t=this.fieldsByName.get(e);return t||(console.warn("Attempting to get field ".concat(e," but it does not exist")),this.dummyField)}},{key:"notify",value:function(e){var t=this,n=this.getField(e);n&&n.notify&&n.notify.forEach((function(n){var r=".".concat(e),o="".concat(r.replace(/(.*)[.[].*/,"$1"),".").concat(n).slice(1),i=t.getField(o);i&&(_e("Notifying",i.field),i.fieldApi.validate(),i.fieldApi.checkRelevant())}))}},{key:"validateField",value:function(e){this.getField(e).fieldApi.validate()}},{key:"resetField",value:function(e){this.getField(e).fieldApi.reset()}},{key:"fieldExists",value:function(e){return null!=this.fieldsByName.get(e)}},{key:"valid",value:function(){var e=this.getErrors();return!(!M.empty(e)||this.state.error)}},{key:"screenValid",value:function(){return!Object.entries(this.onScreen).some((function(e){return m(e,2)[1].fieldApi.getError()}))}},{key:"invalid",value:function(){var e=this.getErrors();return!(M.empty(e)&&!this.state.error)}},{key:"pristine",value:function(){var e=!0;return this.fieldsById.forEach((function(t){t.fieldApi.getPristine()||(e=!1)})),e}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){_e("Resetting"),this.fieldsById.forEach((function(e){e.fieldApi.reset({preventUpdate:!0})})),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(e){_e("Setting values"),this.fieldsById.forEach((function(t){var n=M.get(e,t.field);void 0!==n&&t.fieldApi.setValue(n,null,{preventUpdate:!0})})),this.emit("change")}},{key:"validate",value:function(){var e=this;_e("Validating all fields");var t=this.getValues();if(this.options.validationSchema){var n=q(this.options.validationSchema,t);this.fieldsById.forEach((function(t){if(M.has(n,t.field)){var r=M.get(n,t.field);e.setError(t.field,r)}else e.setError(t.field,void 0)}))}if(this.options.schema&&this.options.ajv){var r=K(this.ajvValidate,t);this.fieldsById.forEach((function(t){if(M.has(r,t.field)){var n=M.get(r,t.field);e.setError(t.field,n)}else e.setError(t.field,void 0)}))}if(this.fieldsById.forEach((function(e){e.fieldApi.validate(t),e.fieldApi.setTouched(!0,!0)})),this.options.validate){var o=this.options.validate(t);this.setFormError(o)}if(this.options.validateFields){var i=this.options.validateFields(t);this.fieldsById.forEach((function(t){if(M.has(i,t.field)){var n=M.get(i,t.field);e.setError(t.field,n)}}))}}},{key:"asyncValidate",value:function(){_e("Async Validating all fields");var e=this.getValues();this.fieldsById.forEach((function(t){t.fieldApi.asyncValidate(e)}))}},{key:"keyDown",value:function(e){if(13==e.keyCode&&this.options.preventEnter)return e.preventDefault(e),!1}},{key:"submitForm",value:function(e){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&e&&e.preventDefault(e),this.validate(),this.emit("change"),this.asyncValidate(),this.state.validating>0||(this.valid()?(_e("Submit",this.state),this.emit("submit")):(_e("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var e=this;this.fieldsById.forEach((function(t){e.emit("field",t.field)}))}},{key:"register",value:function(e,t,n){var r=t.field,o=t.state;_e("Register ID:",e,"Name:",r,o,"Initial",n);var i,a=r.slice(0,-1!=r.lastIndexOf("[")?r.lastIndexOf("]")+1:r.length);this.fieldsById.forEach((function(e,t){e&&e.field===r&&(i=t)})),//!this.expectedRemovals[magicValue] &&
14
- i&&(t.keepState||t.inMultistep)?(_e("Already Registered",r),this.fieldsById.delete(i))://!this.expectedRemovals[magicValue] &&
15
- !i||t.keepState&&t.inMultistep||console.warn("Check to make sure you have not registered two fields with the fieldName",r),_e("Fields Registered",this.fieldsById.size),this.onScreen[e]=t,this.fieldsById.set(e,t),_e("clearing expected removal",a),delete this.expectedRemovals[a],delete this.pulledOut[a],t.shadow||(this.updater.setValue(e,t.fieldApi.getValue(),!1),this.updater.setError(e,t.fieldApi.getError(),!1),this.updater.setTouched(e,t.fieldApi.getTouched(),!1),n||this.emit("change"),this.emit("field",r))}},{key:"deregister",value:function(e){var t=this.fieldsById.get(e),n=t.field;_e("Deregister",e,n),delete this.onScreen[e];var r=function(e,t){var n=Object.keys(t).find((function(t){return e.includes(t)}));if(n)return e.slice(0,n.length)===n}(n,this.expectedRemovals),o=n.slice(0,-1!=n.lastIndexOf("[")?n.lastIndexOf("]")+1:n.length);!t.keepState&&!t.inMultistep||r||(_e("Saving field ".concat(n,"'s value"),t.fieldApi.getFieldState()),t.shadow?M.set(this.savedValues,"shadow-".concat(n),t.fieldApi.getFieldState()):M.set(this.savedValues,n,t.fieldApi.getFieldState())),(r||!t.keepState&&!t.inMultistep||!t.fieldApi.getIsRelevant()&&!t.keepState)&&(_e("Removing field",n),this.fieldsById.delete(e),r||(M.delete(this.state.values,n),M.delete(this.state.touched,n),M.delete(this.state.errors,n),t.shadow?M.delete(this.savedValues,"shadow-".concat(n)):M.delete(this.savedValues,n)),r&&this.pulledOut[o]&&(_e("Pulling out",n,"with magic value",o),M.pullOut(this.state.values,o),M.pullOut(this.state.touched,o),M.pullOut(this.state.errors,o),M.pullOut(this.savedValues,o),delete this.pulledOut[o])),this.emit("change")}},{key:"expectRemoval",value:function(e){_e("Expecting removal of",e),this.expectedRemovals[e]=!0,this.pulledOut[e]=!0}},{key:"update",value:function(e,t,n){_e("Update",e,t.field,n,t.fieldState.value);var r=t.fieldApi.getValue(),o=t.fieldApi.getError(),i=t.fieldApi.getTouched(),a=this.fieldsByName.get(n);n&&!a&&(M.set(this.state.values,n),M.set(this.state.errors,n),M.set(this.state.touched,n)),M.set(this.state.values,t.field,r),M.set(this.state.errors,t.field,o),M.set(this.state.touched,t.field,i),this.emit("change")}}]),e}(),Ve=w("informed:FormProvider\t\t"),Be=function(e){var t=e.children,n=e.formApi,r=e.formController,i=e.formState,a=h(e,["children","formApi","formController","formState"]);if(Ve("Render FormProvider"),n)return Ve("Render FormProvider with given values"),o.a.createElement(I.Provider,{value:r.updater},o.a.createElement(L.Provider,{value:n},o.a.createElement(F.Provider,{value:i},t)));Ve("Render FormProvider with generated values");var s=We(a);return o.a.createElement(I.Provider,{value:s.formController.updater},o.a.createElement(L.Provider,{value:s.formApi},o.a.createElement(F.Provider,{value:s.formState},t)))},Ue=w("informed:useForm\t\t"),We=function(e){var t=e.dontPreventDefault,n=e.initialValues,i=e.validate,a=e.validateFields,s=e.allowEmptyStrings,l=e.preventEnter,c=e.getApi,u=e.apiRef,f=e.onChange,p=e.onReset,d=e.onSubmit,v=e.onValueChange,g=e.onSubmitFailure,y=e.validationSchema,b=e.schema,x=e.ajv,w=e.fieldMap,C=e.onlyValidateSchema,A=h(e,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);Ue("Render useForm");var k=Object(r.useMemo)((function(){return{dontPreventDefault:t,initialValues:n,validate:i,validateFields:a,allowEmptyStrings:s,preventEnter:l,validationSchema:y,schema:b,ajv:x,fieldMap:w}}),[t,n,i,a,s,l,y,b,x,w]),O=m(Object(r.useState)((function(){return new Re(k)})),1)[0];Object(r.useEffect)((function(){O.setOptions(k)}),[k]),Z((function(){O.mount()}),[]);var S=m(Object(r.useState)((function(){return O.getFormState()})),2),E=S[0],j=S[1];Z((function(){var e=function(){return f&&f(O.getFormState())},t=function(){return p&&p()},n=function(){return d&&d(O.getFormState().values)},r=function(){return v&&v(O.getFormState().values)},o=function(){return g&&g(O.getFormState().errors)};return O.on("change",e),O.on("reset",t),O.on("submit",n),O.on("value",r),O.on("failure",o),function(){O.removeListener("change",e),O.removeListener("reset",t),O.removeListener("submit",n),O.removeListener("value",r),O.removeListener("failure",o)}}),[f,p,d,v,g]),Object(r.useState)((function(){O.on("change",(function(){Ue("Setting form state"),j(O.getFormState())})),c&&c(O.getFormApi()),u&&(u.current=O.getFormApi())}));var T=m(Object(r.useState)((function(){return O.getFormApi()})),1)[0];return{formApi:T,formState:E,formController:O,render:function(e){return o.a.createElement(Be,{formApi:T,formState:E,formController:O},o.a.createElement(o.a.Fragment,null,e||o.a.createElement(Fe,{schema:b,onlyValidateSchema:C})))},userProps:A}},ze=w("informed:Form\t\t"),He=function(e){var t=e.children,n=e.render,r=e.component,i=h(e,["children","render","component"]);ze("Render FORM");var a,s=We(i),l=s.formApi,u=s.formController,f=s.formState,p=s.render,d=s.userProps;return p(o.a.createElement("form",c({},d,{onReset:u.reset,onSubmit:u.submitForm,onKeyDown:u.keyDown}),(a={formState:f,formApi:l},r?o.a.createElement(r,a,t):n?n(a):"function"==typeof t?t(a):t)))}}).call(this,n(26))},function(e,t,n){var r=n(643),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r,o,i,a=n(730),s=n(576),l=n(578),c=n(585),u=n(582),f=n(675),p=n(645),d=n(623),h=s.WeakMap;if(a||f.state){var v=f.state||(f.state=new h),g=v.get,m=v.has,y=v.set;r=function(e,t){if(m.call(v,e))throw new TypeError("Object already initialized");return t.facade=e,y.call(v,e,t),t},o=function(e){return g.call(v,e)||{}},i=function(e){return m.call(v,e)}}else{var b=p("state");d[b]=!0,r=function(e,t){if(u(e,b))throw new TypeError("Object already initialized");return t.facade=e,c(e,b,t),t},o=function(e){return u(e,b)?e[b]:{}},i=function(e){return u(e,b)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){var r=n(621),o=n(667),i=n(589),a=n(600),s=n(680),l=[].push,c=function(e){var t=1==e,n=2==e,c=3==e,u=4==e,f=6==e,p=7==e,d=5==e||f;return function(h,v,g,m){for(var y,b,x=i(h),w=o(x),C=r(v,g,3),A=a(w.length),k=0,O=m||s,S=t?O(h,A):n||p?O(h,0):void 0;A>k;k++)if((d||k in w)&&(b=C(y=w[k],k,x),e))if(t)S[k]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return k;case 2:l.call(S,y)}else switch(e){case 4:return!1;case 7:l.call(S,y)}return f?-1:c||u?u:S}};e.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterOut:c(7)}},function(e,t,n){var r=n(846),o=n(851);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(614),o=n(847),i=n(848),a=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?o(e):i(e)}},function(e,t,n){e.exports=n(946)},function(e,t,n){e.exports=n(958)},function(e,t,n){e.exports=n(1057)},function(e,t,n){var r=n(580),o=n(640),i=n(609),a=n(588),s=n(642),l=n(582),c=n(722),u=Object.getOwnPropertyDescriptor;t.f=r?u:function(e,t){if(e=a(e),t=s(t,!0),c)try{return u(e,t)}catch(e){}if(l(e,t))return i(!o.f.call(e,t),e[t])}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t){e.exports=!0},function(e,t,n){var r=n(679),o=n(590).f,i=n(585),a=n(582),s=n(816),l=n(577)("toStringTag");e.exports=function(e,t,n,c){if(e){var u=n?e:e.prototype;a(u,l)||o(u,l,{configurable:!0,value:t}),c&&!r&&i(u,"toString",s)}}},function(e,t,n){n(734);var r=n(829),o=n(576),i=n(627),a=n(585),s=n(613),l=n(577)("toStringTag");for(var c in r){var u=o[c],f=u&&u.prototype;f&&i(f)!==l&&a(f,l,c),s[c]=s.Array}},function(e,t){e.exports={}},function(e,t,n){var r=n(592).Symbol;e.exports=r},function(e,t,n){var r=n(649),o=n(685);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(746),o=n(747),i=n(615);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(581),o=n(759),i=n(600),a=n(621),s=n(692),l=n(758),c=function(e,t){this.stopped=e,this.result=t};e.exports=function(e,t,n){var u,f,p,d,h,v,g,m=n&&n.that,y=!(!n||!n.AS_ENTRIES),b=!(!n||!n.IS_ITERATOR),x=!(!n||!n.INTERRUPTED),w=a(t,m,1+y+x),C=function(e){return u&&l(u),new c(!0,e)},A=function(e){return y?(r(e),x?w(e[0],e[1],C):w(e[0],e[1])):x?w(e,C):w(e)};if(b)u=e;else{if("function"!=typeof(f=s(e)))throw TypeError("Target is not iterable");if(o(f)){for(p=0,d=i(e.length);d>p;p++)if((h=A(e[p]))&&h instanceof c)return h;return new c(!1)}u=f.call(e)}for(v=u.next;!(g=v.call(u)).done;){try{h=A(g.value)}catch(e){throw l(u),e}if("object"==typeof h&&h&&h instanceof c)return h}return new c(!1)}},function(e,t,n){"use strict";function r(e){return null==e}e.exports.isNothing=r,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:r(e)?[]:[e]},e.exports.repeat=function(e,t){var n,r="";for(n=0;n<t;n+=1)r+=e;return r},e.exports.isNegativeZero=function(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e},e.exports.extend=function(e,t){var n,r,o,i;if(t)for(n=0,r=(i=Object.keys(t)).length;n<r;n+=1)e[o=i[n]]=t[o];return e}},function(e,t,n){"use strict";var r=n(618),o=n(635),i=n(579);function a(e,t,n){var r=[];return e.include.forEach((function(e){n=a(e,t,n)})),e[t].forEach((function(e){n.forEach((function(t,n){t.tag===e.tag&&t.kind===e.kind&&r.push(n)})),n.push(e)})),n.filter((function(e,t){return-1===r.indexOf(t)}))}function s(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach((function(e){if(e.loadKind&&"scalar"!==e.loadKind)throw new o("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")})),this.compiledImplicit=a(this,"implicit",[]),this.compiledExplicit=a(this,"explicit",[]),this.compiledTypeMap=function(){var e,t,n={scalar:{},sequence:{},mapping:{},fallback:{}};function r(e){n[e.kind][e.tag]=n.fallback[e.tag]=e}for(e=0,t=arguments.length;e<t;e+=1)arguments[e].forEach(r);return n}(this.compiledImplicit,this.compiledExplicit)}s.DEFAULT=null,s.create=function(){var e,t;switch(arguments.length){case 1:e=s.DEFAULT,t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw new o("Wrong number of arguments for Schema.create function")}if(e=r.toArray(e),t=r.toArray(t),!e.every((function(e){return e instanceof s})))throw new o("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!t.every((function(e){return e instanceof i})))throw new o("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new s({include:e,explicit:t})},e.exports=s},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(598);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){var r=n(724),o=n(671);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){e.exports={}},function(e,t,n){var r=n(620);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r,o=n(581),i=n(728),a=n(671),s=n(623),l=n(729),c=n(668),u=n(645),f=u("IE_PROTO"),p=function(){},d=function(e){return"<script>"+e+"<\/script>"},h=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t;h=r?function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t}(r):((t=c("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};s[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=o(e),n=new p,p.prototype=null,n[f]=e):n=h(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(585);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},function(e,t,n){var r=n(679),o=n(620),i=n(577)("toStringTag"),a="Arguments"==o(function(){return arguments}());e.exports=r?o:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:a?o(t):"Object"==(r=o(t))&&"function"==typeof t.callee?"Arguments":r}},function(e,t,n){var r=n(574),o=n(577),i=n(644),a=o("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){var r=n(582),o=n(589),i=n(645),a=n(737),s=i("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=o(e),r(e,s)?e[s]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";var r=n(642),o=n(590),i=n(609);e.exports=function(e,t,n){var a=r(t);a in e?o.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){var r=n(648),o=n(740);e.exports=function(e,t,n,i){var a=!n;n||(n={});for(var s=-1,l=t.length;++s<l;){var c=t[s],u=i?i(n[c],e[c],c,n,e):void 0;void 0===u&&(u=e[c]),a?o(n,c,u):r(n,c,u)}return n}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(911),o=n(912),i=n(694),a=n(913);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";var r=n(598),o=function(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)};e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";function r(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}r.prototype=Object.create(Error.prototype),r.prototype.constructor=r,r.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=r},function(e,t,n){"use strict";var r=n(619);e.exports=new r({include:[n(774)],implicit:[n(982),n(983)],explicit:[n(984),n(985),n(986),n(987)]})},function(e,t,n){var r=n(654);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){e.exports=n(1058)},function(e,t,n){var r=n(1088),o=n(709),i=n(1089),a=n(1090),s=n(1091),l=n(604),c=n(743),u=c(r),f=c(o),p=c(i),d=c(a),h=c(s),v=l;(r&&"[object DataView]"!=v(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=v(new o)||i&&"[object Promise]"!=v(i.resolve())||a&&"[object Set]"!=v(new a)||s&&"[object WeakMap]"!=v(new s))&&(v=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=v},function(e,t,n){"use strict";var r={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,i=o&&!r.call({1:2},1);t.f=i?function(e){var t=o(this,e);return!!t&&t.enumerable}:r},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(578);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r,o,i=n(576),a=n(673),s=i.process,l=s&&s.versions,c=l&&l.v8;c?o=(r=c.split("."))[0]<4?1:r[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(o=r[1]),e.exports=o&&+o},function(e,t,n){var r=n(674),o=n(646),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++n+r).toString(36)}},function(e,t,n){var r=n(581),o=n(828);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,i){return r(n),o(i),t?e.call(n,i):n.__proto__=i,n}}():void 0)},function(e,t,n){var r=n(740),o=n(650),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(604),o=n(593);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t,n){var r=n(860),o=n(595),i=Object.prototype,a=i.hasOwnProperty,s=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&a.call(e,"callee")&&!s.call(e,"callee")};e.exports=l},function(e,t,n){(function(e){var r=n(592),o=n(861),i=t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=a&&a.exports===i?r.Buffer:void 0,l=(s?s.isBuffer:void 0)||o;e.exports=l}).call(this,n(188)(e))},function(e,t,n){var r=n(604),o=n(595);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){e.exports=n(870)},function(e,t,n){"use strict";var r=n(896).charAt,o=n(601),i=n(735),a=o.set,s=o.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=s(this),n=t.string,o=t.index;return o>=n.length?{value:void 0,done:!0}:(e=r(n,o),t.index+=e.length,{value:e,done:!1})}))},function(e,t){e.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},function(e,t,n){e.exports=n(927)},function(e,t,n){"use strict";var r=n(619);e.exports=r.DEFAULT=new r({include:[n(636)],explicit:[n(988),n(989),n(990)]})},function(e,t,n){var r=n(583),o=n(707),i=n(994),a=n(752);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(603)(Object,"create");e.exports=r},function(e,t,n){var r=n(1004),o=n(1005),i=n(1006),a=n(1007),s=n(1008);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(650);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(1010);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(1054),o=n(1055),i=n(694),a=n(1056);e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(706);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},function(e,t,n){var r=n(574),o=n(620),i="".split;e.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==o(e)?i.call(e,""):Object(e)}:Object},function(e,t,n){var r=n(576),o=n(578),i=r.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){var r=n(588),o=n(600),i=n(670),a=function(e){return function(t,n,a){var s,l=r(t),c=o(l.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){var r=n(643),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},function(e,t){e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){var r=n(644),o=n(574);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},function(e,t,n){var r=n(591);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(610),o=n(675);(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.14.0",mode:r?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var r=n(576),o=n(814),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(724),o=n(671).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var r=n(577);t.f=r},function(e,t,n){var r={};r[n(577)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(578),o=n(624),i=n(577)("species");e.exports=function(e,t){var n;return o(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!o(n.prototype)?r(n)&&null===(n=n[i])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===t?0:t)}},function(e,t){e.exports=function(){}},function(e,t,n){e.exports=n(843)},function(e,t,n){var r=n(648),o=n(631),i=n(852),a=n(615),s=n(632),l=n(616),c=Object.prototype.hasOwnProperty,u=i((function(e,t){if(s(t)||a(t))o(t,l(t),e);else for(var n in t)c.call(t,n)&&r(e,n,t[n])}));e.exports=u},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t,n){var r=n(862),o=n(687),i=n(688),a=i&&i.isTypedArray,s=a?o(a):r;e.exports=s},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(742),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o&&r.process,s=function(){try{var e=i&&i.require&&i.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=s}).call(this,n(188)(e))},function(e,t,n){var r=n(655),o=n(691),i=n(693),a=n(694);e.exports=function(e,t){var n=void 0!==r&&o(e)||e["@@iterator"];if(!n){if(i(e)||(n=a(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var s=0,l=function(){};return{s:l,n:function(){return s>=e.length?{done:!0}:{done:!1,value:e[s++]}},e:function(e){throw e},f:l}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c,u=!0,f=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){f=!0,c=e},f:function(){try{u||null==n.return||n.return()}finally{if(f)throw c}}}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){},function(e,t,n){e.exports=n(895)},function(e,t,n){var r=n(627),o=n(613),i=n(577)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){e.exports=n(897)},function(e,t,n){var r=n(900),o=n(756),i=n(761);e.exports=function(e,t){var n;if(e){if("string"==typeof e)return i(e,t);var a=r(n=Object.prototype.toString.call(e)).call(n,8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?o(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?i(e,t):void 0}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(914);function o(e,t,n,o,i,a,s){try{var l=e[a](s),c=l.value}catch(e){return void n(e)}l.done?t(c):r.resolve(c).then(o,i)}e.exports=function(e){return function(){var t=this,n=arguments;return new r((function(r,i){var a=e.apply(t,n);function s(e){o(a,r,i,s,l,"next",e)}function l(e){o(a,r,i,s,l,"throw",e)}s(void 0)}))}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(626);e.exports=function(e,t,n){for(var o in t)n&&n.unsafe&&e[o]?e[o]=t[o]:r(e,o,t[o],n);return e}},function(e,t){e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){var r=n(620),o=n(576);e.exports="process"==r(o.process)},function(e,t,n){e.exports=n(928)},function(e,t,n){e.exports=n(943)},function(e,t,n){"use strict";var r=SyntaxError,o=Function,i=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch(e){s=null}var l=function(){throw new i},c=s?function(){try{return l}catch(e){try{return s(arguments,"callee").get}catch(e){return l}}}():l,u=n(963)(),f=Object.getPrototypeOf||function(e){return e.__proto__},p={},d="undefined"==typeof Uint8Array?void 0:f(Uint8Array),h={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":u?f([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u?f(f([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&u?f((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&u?f((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u?f(""[Symbol.iterator]()):void 0,"%Symbol%":u?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":d,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},g=n(702),m=n(966),y=g.call(Function.call,Array.prototype.concat),b=g.call(Function.apply,Array.prototype.splice),x=g.call(Function.call,String.prototype.replace),w=g.call(Function.call,String.prototype.slice),C=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,k=function(e){var t=w(e,0,1),n=w(e,-1);if("%"===t&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new r("invalid intrinsic syntax, expected opening `%`");var o=[];return x(e,C,(function(e,t,n,r){o[o.length]=n?x(r,A,"$1"):t||e})),o},O=function(e,t){var n,o=e;if(m(v,o)&&(o="%"+(n=v[o])[0]+"%"),m(h,o)){var s=h[o];if(s===p&&(s=function e(t){var n;if("%AsyncFunction%"===t)n=a("async function () {}");else if("%GeneratorFunction%"===t)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=a("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&(n=f(o.prototype))}return h[t]=n,n}(o)),void 0===s&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:o,value:s}}throw new r("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');var n=k(e),o=n.length>0?n[0]:"",a=O("%"+o+"%",t),l=a.name,c=a.value,u=!1,f=a.alias;f&&(o=f[0],b(n,y([0,1],f)));for(var p=1,d=!0;p<n.length;p+=1){var v=n[p],g=w(v,0,1),x=w(v,-1);if(('"'===g||"'"===g||"`"===g||'"'===x||"'"===x||"`"===x)&&g!==x)throw new r("property names with quotes must have matching quotes");if("constructor"!==v&&d||(u=!0),m(h,l="%"+(o+="."+v)+"%"))c=h[l];else if(null!=c){if(!(v in c)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}if(s&&p+1>=n.length){var C=s(c,v);c=(d=!!C)&&"get"in C&&!("originalValue"in C.get)?C.get:c[v]}else d=m(c,v),c=c[v];d&&!u&&(h[l]=c)}}return c}},function(e,t,n){"use strict";var r=n(965);e.exports=Function.prototype.bind||r},function(e,t,n){"use strict";var r=String.prototype.replace,o=/%20/g,i="RFC1738",a="RFC3986";e.exports={default:a,formatters:{RFC1738:function(e){return r.call(e,o,"+")},RFC3986:function(e){return String(e)}},RFC1738:i,RFC3986:a}},function(e,t,n){"use strict";var r=n(619);e.exports=new r({explicit:[n(975),n(976),n(977)]})},function(e,t,n){var r=n(992),o=n(1017)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},function(e,t,n){var r=n(660),o=n(637);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n<i;)e=e[o(t[n++])];return n&&n==i?e:void 0}},function(e,t,n){var r=n(583),o=n(654),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(a.test(e)||!i.test(e)||null!=t&&e in Object(t))}},function(e,t,n){var r=n(997),o=n(1009),i=n(1011),a=n(1012),s=n(1013);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(603)(n(592),"Map");e.exports=r},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(682);function o(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),r(e,o.key,o)}}e.exports=function(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(777),o=n(1030);function i(t){return e.exports=i=r?o:function(e){return e.__proto__||o(e)},e.exports.default=e.exports,e.exports.__esModule=!0,i(t)}e.exports=i,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(662),o=n(1072),i=n(1073),a=n(1074),s=n(1075),l=n(1076);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=s,c.prototype.set=l,e.exports=c},function(e,t,n){var r=n(1087),o=n(786),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,s=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=s},function(e,t,n){var r=n(746),o=n(1106),i=n(615);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(748)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(783);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},function(e,t,n){var r=n(623),o=n(578),i=n(582),a=n(590).f,s=n(646),l=n(1129),c=s("meta"),u=0,f=Object.isExtensible||function(){return!0},p=function(e){a(e,c,{value:{objectID:"O"+ ++u,weakData:{}}})},d=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!o(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,c)){if(!f(e))return"F";if(!t)return"E";p(e)}return e[c].objectID},getWeakData:function(e,t){if(!i(e,c)){if(!f(e))return!0;if(!t)return!1;p(e)}return e[c].weakData},onFreeze:function(e){return l&&d.REQUIRED&&f(e)&&!i(e,c)&&p(e),e}};r[c]=!0},function(e,t,n){e.exports=n(810)},function(e,t,n){n(811);var r=n(573);e.exports=r.Object.keys},function(e,t,n){var r=n(580),o=n(574),i=n(668);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(574),o=/#|\.prototype\./,i=function(e,t){var n=s[a(e)];return n==c||n!=l&&("function"==typeof t?r(t):!!t)},a=i.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=i.data={},l=i.NATIVE="N",c=i.POLYFILL="P";e.exports=i},function(e,t,n){var r=n(582),o=n(588),i=n(669).indexOf,a=n(623);e.exports=function(e,t){var n,s=o(e),l=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){e.exports=n(812)},function(e,t,n){"use strict";var r=n(572),o=n(576),i=n(591),a=n(610),s=n(580),l=n(672),c=n(727),u=n(574),f=n(582),p=n(624),d=n(578),h=n(581),v=n(589),g=n(588),m=n(642),y=n(609),b=n(625),x=n(622),w=n(676),C=n(815),A=n(677),k=n(608),O=n(590),S=n(640),E=n(585),j=n(626),T=n(674),M=n(645),P=n(623),I=n(646),F=n(577),L=n(678),N=n(575),_=n(611),D=n(601),R=n(602).forEach,V=M("hidden"),B=F("toPrimitive"),U=D.set,W=D.getterFor("Symbol"),z=Object.prototype,H=o.Symbol,q=i("JSON","stringify"),G=k.f,$=O.f,K=C.f,J=S.f,Y=T("symbols"),X=T("op-symbols"),Q=T("string-to-symbol-registry"),Z=T("symbol-to-string-registry"),ee=T("wks"),te=o.QObject,ne=!te||!te.prototype||!te.prototype.findChild,re=s&&u((function(){return 7!=b($({},"a",{get:function(){return $(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=G(z,t);r&&delete z[t],$(e,t,n),r&&e!==z&&$(z,t,r)}:$,oe=function(e,t){var n=Y[e]=b(H.prototype);return U(n,{type:"Symbol",tag:e,description:t}),s||(n.description=t),n},ie=c?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof H},ae=function(e,t,n){e===z&&ae(X,t,n),h(e);var r=m(t,!0);return h(n),f(Y,r)?(n.enumerable?(f(e,V)&&e[V][r]&&(e[V][r]=!1),n=b(n,{enumerable:y(0,!1)})):(f(e,V)||$(e,V,y(1,{})),e[V][r]=!0),re(e,r,n)):$(e,r,n)},se=function(e,t){h(e);var n=g(t),r=x(n).concat(fe(n));return R(r,(function(t){s&&!le.call(n,t)||ae(e,t,n[t])})),e},le=function(e){var t=m(e,!0),n=J.call(this,t);return!(this===z&&f(Y,t)&&!f(X,t))&&(!(n||!f(this,t)||!f(Y,t)||f(this,V)&&this[V][t])||n)},ce=function(e,t){var n=g(e),r=m(t,!0);if(n!==z||!f(Y,r)||f(X,r)){var o=G(n,r);return!o||!f(Y,r)||f(n,V)&&n[V][r]||(o.enumerable=!0),o}},ue=function(e){var t=K(g(e)),n=[];return R(t,(function(e){f(Y,e)||f(P,e)||n.push(e)})),n},fe=function(e){var t=e===z,n=K(t?X:g(e)),r=[];return R(n,(function(e){!f(Y,e)||t&&!f(z,e)||r.push(Y[e])})),r};(l||(j((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=I(e),n=function(e){this===z&&n.call(X,e),f(this,V)&&f(this[V],t)&&(this[V][t]=!1),re(this,t,y(1,e))};return s&&ne&&re(z,t,{configurable:!0,set:n}),oe(t,e)}).prototype,"toString",(function(){return W(this).tag})),j(H,"withoutSetter",(function(e){return oe(I(e),e)})),S.f=le,O.f=ae,k.f=ce,w.f=C.f=ue,A.f=fe,L.f=function(e){return oe(F(e),e)},s&&($(H.prototype,"description",{configurable:!0,get:function(){return W(this).description}}),a||j(z,"propertyIsEnumerable",le,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:H}),R(x(ee),(function(e){N(e)})),r({target:"Symbol",stat:!0,forced:!l},{for:function(e){var t=String(e);if(f(Q,t))return Q[t];var n=H(t);return Q[t]=n,Z[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(f(Z,e))return Z[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(e,t){return void 0===t?b(e):se(b(e),t)},defineProperty:ae,defineProperties:se,getOwnPropertyDescriptor:ce}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ue,getOwnPropertySymbols:fe}),r({target:"Object",stat:!0,forced:u((function(){A.f(1)}))},{getOwnPropertySymbols:function(e){return A.f(v(e))}}),q)&&r({target:"JSON",stat:!0,forced:!l||u((function(){var e=H();return"[null]"!=q([e])||"{}"!=q({a:e})||"{}"!=q(Object(e))}))},{stringify:function(e,t,n){for(var r,o=[e],i=1;arguments.length>i;)o.push(arguments[i++]);if(r=t,(d(t)||void 0!==e)&&!ie(e))return p(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ie(t))return t}),o[1]=t,q.apply(null,o)}});H.prototype[B]||E(H.prototype,B,H.prototype.valueOf),_(H,"Symbol"),P[V]=!0},function(e,t,n){var r=n(672);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(580),o=n(590),i=n(581),a=n(622);e.exports=r?Object.defineProperties:function(e,t){i(e);for(var n,r=a(t),s=r.length,l=0;s>l;)o.f(e,n=r[l++],t[n]);return e}},function(e,t,n){var r=n(591);e.exports=r("document","documentElement")},function(e,t,n){var r=n(576),o=n(731),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(675),o=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(e){return o.call(e)}),e.exports=r.inspectSource},function(e,t,n){var r=n(819),o=Array.prototype;e.exports=function(e){var t=e.filter;return e===o||e instanceof Array&&t===o.filter?r:t}},function(e,t,n){e.exports=n(821)},function(e,t,n){"use strict";var r=n(588),o=n(681),i=n(613),a=n(601),s=n(735),l=a.set,c=a.getterFor("Array Iterator");e.exports=s(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=c(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var r=n(572),o=n(827),i=n(629),a=n(647),s=n(611),l=n(585),c=n(626),u=n(577),f=n(610),p=n(613),d=n(736),h=d.IteratorPrototype,v=d.BUGGY_SAFARI_ITERATORS,g=u("iterator"),m=function(){return this};e.exports=function(e,t,n,u,d,y,b){o(n,t,u);var x,w,C,A=function(e){if(e===d&&j)return j;if(!v&&e in S)return S[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},k=t+" Iterator",O=!1,S=e.prototype,E=S[g]||S["@@iterator"]||d&&S[d],j=!v&&E||A(d),T="Array"==t&&S.entries||E;if(T&&(x=i(T.call(new e)),h!==Object.prototype&&x.next&&(f||i(x)===h||(a?a(x,h):"function"!=typeof x[g]&&l(x,g,m)),s(x,k,!0,!0),f&&(p[k]=m))),"values"==d&&E&&"values"!==E.name&&(O=!0,j=function(){return E.call(this)}),f&&!b||S[g]===j||l(S,g,j),p[t]=j,d)if(w={values:A("values"),keys:y?j:A("keys"),entries:A("entries")},b)for(C in w)(v||O||!(C in S))&&c(S,C,w[C]);else r({target:t,proto:!0,forced:v||O},w);return w}},function(e,t,n){"use strict";var r,o,i,a=n(574),s=n(629),l=n(585),c=n(582),u=n(577),f=n(610),p=u("iterator"),d=!1;[].keys&&("next"in(i=[].keys())?(o=s(s(i)))!==Object.prototype&&(r=o):d=!0);var h=null==r||a((function(){var e={};return r[p].call(e)!==e}));h&&(r={}),f&&!h||c(r,p)||l(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(e,t,n){var r=n(574);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";var r=n(574);e.exports=function(e,t){var n=[][e];return!!n&&r((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){var r=n(682);e.exports=function(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(741);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(603),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(27))},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(854),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,s=o(i.length-t,0),l=Array(s);++a<s;)l[a]=i[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=i[a];return c[t]=n(l),r(e,this,c)}}},function(e,t,n){var r=n(855),o=n(857)(r);e.exports=o},function(e,t,n){var r=n(859),o=n(652),i=n(583),a=n(653),s=n(651),l=n(686),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),f=!n&&!u&&a(e),p=!n&&!u&&!f&&l(e),d=n||u||f||p,h=d?r(e.length,String):[],v=h.length;for(var g in e)!t&&!c.call(e,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||p&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||s(g,v))||h.push(g);return h}},function(e,t,n){var r=n(632),o=n(863),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(864),o=n(750),i=n(751),a=n(752);e.exports=function(e,t,n){return e=a(e),n=null==n?0:r(i(n),0,e.length),t=o(t),e.slice(n,n+t.length)==t}},function(e,t,n){var r=n(614),o=n(865),i=n(583),a=n(654),s=r?r.prototype:void 0,l=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(a(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(866);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t,n){var r=n(750);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){"use strict";var r=n(572),o=n(574),i=n(624),a=n(578),s=n(589),l=n(600),c=n(630),u=n(680),f=n(628),p=n(577),d=n(644),h=p("isConcatSpreadable"),v=d>=51||!o((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),g=f("concat"),m=function(e){if(!a(e))return!1;var t=e[h];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,forced:!v||!g},{concat:function(e){var t,n,r,o,i,a=s(this),f=u(a,0),p=0;for(t=-1,r=arguments.length;t<r;t++)if(m(i=-1===t?a:arguments[t])){if(p+(o=l(i.length))>9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n<o;n++,p++)n in i&&c(f,p,i[n])}else{if(p>=9007199254740991)throw TypeError("Maximum allowed index exceeded");c(f,p++,i)}return f.length=p,f}})},function(e,t,n){n(575)("iterator")},function(e,t,n){var r=n(902),o=Array.prototype;e.exports=function(e){var t=e.slice;return e===o||e instanceof Array&&t===o.slice?r:t}},function(e,t,n){e.exports=n(904)},function(e,t,n){n(656),n(905);var r=n(573);e.exports=r.Array.from},function(e,t,n){var r=n(581);e.exports=function(e){var t=e.return;if(void 0!==t)return r(t.call(e)).value}},function(e,t,n){var r=n(577),o=n(613),i=r("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||a[i]===e)}},function(e,t,n){var r=n(577)("iterator"),o=!1;try{var i=0,a={next:function(){return{done:!!i++}},return:function(){o=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i={};i[r]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(e){}return n}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){n(763),n(690),n(916),n(769),n(770),n(922),n(656),n(612);var r=n(573);e.exports=r.Promise},function(e,t,n){"use strict";var r=n(572),o=n(629),i=n(647),a=n(625),s=n(585),l=n(609),c=n(617),u=function(e,t){var n=this;if(!(n instanceof u))return new u(e,t);i&&(n=i(new Error(void 0),o(n))),void 0!==t&&s(n,"message",String(t));var r=[];return c(e,r.push,{that:r}),s(n,"errors",r),n};u.prototype=a(Error.prototype,{constructor:l(5,u),message:l(5,""),name:l(5,"AggregateError")}),r({global:!0},{AggregateError:u})},function(e,t,n){var r=n(576);e.exports=r.Promise},function(e,t,n){var r=n(581),o=n(598),i=n(577)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r,o,i,a=n(576),s=n(574),l=n(621),c=n(729),u=n(668),f=n(767),p=n(698),d=a.location,h=a.setImmediate,v=a.clearImmediate,g=a.process,m=a.MessageChannel,y=a.Dispatch,b=0,x={},w=function(e){if(x.hasOwnProperty(e)){var t=x[e];delete x[e],t()}},C=function(e){return function(){w(e)}},A=function(e){w(e.data)},k=function(e){a.postMessage(e+"",d.protocol+"//"+d.host)};h&&v||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return x[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},r(b),b},v=function(e){delete x[e]},p?r=function(e){g.nextTick(C(e))}:y&&y.now?r=function(e){y.now(C(e))}:m&&!f?(i=(o=new m).port2,o.port1.onmessage=A,r=l(i.postMessage,i,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&d&&"file:"!==d.protocol&&!s(k)?(r=k,a.addEventListener("message",A,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(C(e),0)}),e.exports={set:h,clear:v}},function(e,t,n){var r=n(673);e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r=n(581),o=n(578),i=n(634);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(572),o=n(598),i=n(634),a=n(657),s=n(617);r({target:"Promise",stat:!0},{allSettled:function(e){var t=this,n=i.f(t),r=n.resolve,l=n.reject,c=a((function(){var n=o(t.resolve),i=[],a=0,l=1;s(e,(function(e){var o=a++,s=!1;i.push(void 0),l++,n.call(t,e).then((function(e){s||(s=!0,i[o]={status:"fulfilled",value:e},--l||r(i))}),(function(e){s||(s=!0,i[o]={status:"rejected",reason:e},--l||r(i))}))})),--l||r(i)}));return c.error&&l(c.value),n.promise}})},function(e,t,n){"use strict";var r=n(572),o=n(598),i=n(591),a=n(634),s=n(657),l=n(617);r({target:"Promise",stat:!0},{any:function(e){var t=this,n=a.f(t),r=n.resolve,c=n.reject,u=s((function(){var n=o(t.resolve),a=[],s=0,u=1,f=!1;l(e,(function(e){var o=s++,l=!1;a.push(void 0),u++,n.call(t,e).then((function(e){l||f||(f=!0,r(e))}),(function(e){l||f||(l=!0,a[o]=e,--u||c(new(i("AggregateError"))(a,"No one promise resolved")))}))})),--u||c(new(i("AggregateError"))(a,"No one promise resolved"))}));return u.error&&c(u.value),n.promise}})},function(e,t,n){e.exports=n(954)},function(e,t,n){"use strict";var r=n(703),o=Object.prototype.hasOwnProperty,i=Array.isArray,a=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),s=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n};e.exports={arrayToObject:s,assign:function(e,t){return Object.keys(t).reduce((function(e,n){return e[n]=t[n],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],n=[],r=0;r<t.length;++r)for(var o=t[r],a=o.obj[o.prop],s=Object.keys(a),l=0;l<s.length;++l){var c=s[l],u=a[c];"object"==typeof u&&null!==u&&-1===n.indexOf(u)&&(t.push({obj:a,prop:c}),n.push(u))}return function(e){for(;e.length>1;){var t=e.pop(),n=t.obj[t.prop];if(i(n)){for(var r=[],o=0;o<n.length;++o)void 0!==n[o]&&r.push(n[o]);t.obj[t.prop]=r}}}(t),e},decode:function(e,t,n){var r=e.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(e){return r}},encode:function(e,t,n,o,i){if(0===e.length)return e;var s=e;if("symbol"==typeof e?s=Symbol.prototype.toString.call(e):"string"!=typeof e&&(s=String(e)),"iso-8859-1"===n)return escape(s).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var l="",c=0;c<s.length;++c){var u=s.charCodeAt(c);45===u||46===u||95===u||126===u||u>=48&&u<=57||u>=65&&u<=90||u>=97&&u<=122||i===r.RFC1738&&(40===u||41===u)?l+=s.charAt(c):u<128?l+=a[u]:u<2048?l+=a[192|u>>6]+a[128|63&u]:u<55296||u>=57344?l+=a[224|u>>12]+a[128|u>>6&63]+a[128|63&u]:(c+=1,u=65536+((1023&u)<<10|1023&s.charCodeAt(c)),l+=a[240|u>>18]+a[128|u>>12&63]+a[128|u>>6&63]+a[128|63&u])}return l},isBuffer:function(e){return!(!e||"object"!=typeof e)&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var n=[],r=0;r<e.length;r+=1)n.push(t(e[r]));return n}return t(e)},merge:function e(t,n,r){if(!n)return t;if("object"!=typeof n){if(i(t))t.push(n);else{if(!t||"object"!=typeof t)return[t,n];(r&&(r.plainObjects||r.allowPrototypes)||!o.call(Object.prototype,n))&&(t[n]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(n);var a=t;return i(t)&&!i(n)&&(a=s(t,r)),i(t)&&i(n)?(n.forEach((function(n,i){if(o.call(t,i)){var a=t[i];a&&"object"==typeof a&&n&&"object"==typeof n?t[i]=e(a,n,r):t.push(n)}else t[i]=n})),t):Object.keys(n).reduce((function(t,i){var a=n[i];return o.call(t,i)?t[i]=e(t[i],a,r):t[i]=a,t}),a)}}},function(e,t,n){"use strict";var r=n(972);e.exports=r},function(e,t,n){"use strict";var r=n(619);e.exports=new r({include:[n(775)]})},function(e,t,n){"use strict";var r=n(619);e.exports=new r({include:[n(704)],implicit:[n(978),n(979),n(980),n(981)]})},function(e,t,n){var r=n(1015),o=n(1016);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t,n){e.exports=n(1027)},function(e,t,n){e.exports=n(1041)},function(e,t,n){e.exports=n(1062)},function(e,t,n){var r=n(1070),o=n(1093),i=n(684),a=n(583),s=n(1094);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?a(e)?o(e[0],e[1]):r(e):s(e)}},function(e,t,n){var r=n(1077),o=n(595);e.exports=function e(t,n,i,a,s){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,s))}},function(e,t,n){var r=n(1078),o=n(1081),i=n(1082);e.exports=function(e,t,n,a,s,l){var c=1&n,u=e.length,f=t.length;if(u!=f&&!(c&&f>u))return!1;var p=l.get(e),d=l.get(t);if(p&&d)return p==t&&d==e;var h=-1,v=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++h<u;){var m=e[h],y=t[h];if(a)var b=c?a(y,m,h,t,e,l):a(m,y,h,e,t,l);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!o(t,(function(e,t){if(!i(g,t)&&(m===e||s(m,e,n,a,l)))return g.push(t)}))){v=!1;break}}else if(m!==y&&!s(m,y,n,a,l)){v=!1;break}}return l.delete(e),l.delete(t),v}},function(e,t,n){var r=n(592).Uint8Array;e.exports=r},function(e,t,n){var r=n(785),o=n(715),i=n(616);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(710),o=n(583);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(593);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(710),o=n(717),i=n(715),a=n(786),s=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=s},function(e,t){var n="undefined"!=typeof self?self:this,r=function(){function e(){this.fetch=!1,this.DOMException=n.DOMException}return e.prototype=n,new e}();!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=h(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=c(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[c(e)]},p.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},p.prototype.set=function(e,t){this.map[c(e)]=u(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,o=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),y.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];w.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new w(o,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=p,e.Request=b,e.Response=w),t.Headers=p,t.Request=b,t.Response=w,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=r;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t},function(e,t,n){e.exports=n(1137)},function(e,t,n){var r=n(604),o=n(717),i=n(595),a=Function.prototype,s=Object.prototype,l=a.toString,c=s.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},function(e,t,n){(function(t){!function(){"use strict";e.exports=function(e){return(e instanceof t?e:t.from(e.toString(),"binary")).toString("base64")}}()}).call(this,n(83).Buffer)},function(e,t,n){"use strict";(function(e){function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,a=(i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UnControlled=t.Controlled=void 0;var s,l=n(0),c="undefined"==typeof navigator||!0===e.PREVENT_CODEMIRROR_RENDER;c||(s=n(597));var u=function(){function e(){}return e.equals=function(e,t){var n=this,r=Object.keys,i=o(e),a=o(t);return e&&t&&"object"===i&&i===a?r(e).length===r(t).length&&r(e).every((function(r){return n.equals(e[r],t[r])})):e===t},e}(),f=function(){function e(e,t){this.editor=e,this.props=t}return e.prototype.delegateCursor=function(e,t,n){var r=this.editor.getDoc();n&&this.editor.focus(),t?r.setCursor(e):r.setCursor(e,null,{scroll:!1})},e.prototype.delegateScroll=function(e){this.editor.scrollTo(e.x,e.y)},e.prototype.delegateSelection=function(e,t){this.editor.getDoc().setSelections(e),t&&this.editor.focus()},e.prototype.apply=function(e){e&&e.selection&&e.selection.ranges&&this.delegateSelection(e.selection.ranges,e.selection.focus||!1),e&&e.cursor&&this.delegateCursor(e.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1),e&&e.scroll&&this.delegateScroll(e.scroll)},e.prototype.applyNext=function(e,t,n){e&&e.selection&&e.selection.ranges&&t&&t.selection&&t.selection.ranges&&!u.equals(e.selection.ranges,t.selection.ranges)&&this.delegateSelection(t.selection.ranges,t.selection.focus||!1),e&&e.cursor&&t&&t.cursor&&!u.equals(e.cursor,t.cursor)&&this.delegateCursor(n.cursor||t.cursor,t.autoScroll||!1,t.autoCursor||!1),e&&e.scroll&&t&&t.scroll&&!u.equals(e.scroll,t.scroll)&&this.delegateScroll(t.scroll)},e.prototype.applyUserDefined=function(e,t){t&&t.cursor&&this.delegateCursor(t.cursor,e.autoScroll||!1,this.editor.getOption("autofocus")||!1)},e.prototype.wire=function(e){var t=this;Object.keys(e||{}).filter((function(e){return/^on/.test(e)})).forEach((function(e){switch(e){case"onBlur":t.editor.on("blur",(function(e,n){t.props.onBlur(t.editor,n)}));break;case"onContextMenu":t.editor.on("contextmenu",(function(e,n){t.props.onContextMenu(t.editor,n)}));break;case"onCopy":t.editor.on("copy",(function(e,n){t.props.onCopy(t.editor,n)}));break;case"onCursor":t.editor.on("cursorActivity",(function(e){t.props.onCursor(t.editor,t.editor.getDoc().getCursor())}));break;case"onCursorActivity":t.editor.on("cursorActivity",(function(e){t.props.onCursorActivity(t.editor)}));break;case"onCut":t.editor.on("cut",(function(e,n){t.props.onCut(t.editor,n)}));break;case"onDblClick":t.editor.on("dblclick",(function(e,n){t.props.onDblClick(t.editor,n)}));break;case"onDragEnter":t.editor.on("dragenter",(function(e,n){t.props.onDragEnter(t.editor,n)}));break;case"onDragLeave":t.editor.on("dragleave",(function(e,n){t.props.onDragLeave(t.editor,n)}));break;case"onDragOver":t.editor.on("dragover",(function(e,n){t.props.onDragOver(t.editor,n)}));break;case"onDragStart":t.editor.on("dragstart",(function(e,n){t.props.onDragStart(t.editor,n)}));break;case"onDrop":t.editor.on("drop",(function(e,n){t.props.onDrop(t.editor,n)}));break;case"onFocus":t.editor.on("focus",(function(e,n){t.props.onFocus(t.editor,n)}));break;case"onGutterClick":t.editor.on("gutterClick",(function(e,n,r,o){t.props.onGutterClick(t.editor,n,r,o)}));break;case"onInputRead":t.editor.on("inputRead",(function(e,n){t.props.onInputRead(t.editor,n)}));break;case"onKeyDown":t.editor.on("keydown",(function(e,n){t.props.onKeyDown(t.editor,n)}));break;case"onKeyHandled":t.editor.on("keyHandled",(function(e,n,r){t.props.onKeyHandled(t.editor,n,r)}));break;case"onKeyPress":t.editor.on("keypress",(function(e,n){t.props.onKeyPress(t.editor,n)}));break;case"onKeyUp":t.editor.on("keyup",(function(e,n){t.props.onKeyUp(t.editor,n)}));break;case"onMouseDown":t.editor.on("mousedown",(function(e,n){t.props.onMouseDown(t.editor,n)}));break;case"onPaste":t.editor.on("paste",(function(e,n){t.props.onPaste(t.editor,n)}));break;case"onRenderLine":t.editor.on("renderLine",(function(e,n,r){t.props.onRenderLine(t.editor,n,r)}));break;case"onScroll":t.editor.on("scroll",(function(e){t.props.onScroll(t.editor,t.editor.getScrollInfo())}));break;case"onSelection":t.editor.on("beforeSelectionChange",(function(e,n){t.props.onSelection(t.editor,n)}));break;case"onTouchStart":t.editor.on("touchstart",(function(e,n){t.props.onTouchStart(t.editor,n)}));break;case"onUpdate":t.editor.on("update",(function(e){t.props.onUpdate(t.editor)}));break;case"onViewportChange":t.editor.on("viewportChange",(function(e,n,r){t.props.onViewportChange(t.editor,n,r)}))}}))},e}(),p=function(e){function t(t){var n=e.call(this,t)||this;return c||(n.applied=!1,n.appliedNext=!1,n.appliedUserDefined=!1,n.deferred=null,n.emulating=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1),n}return a(t,e),t.prototype.hydrate=function(e){var t=this,n=e&&e.options?e.options:{},o=r({},s.defaults,this.editor.options,n);Object.keys(o).some((function(e){return t.editor.getOption(e)!==o[e]}))&&Object.keys(o).forEach((function(e){n.hasOwnProperty(e)&&t.editor.getOption(e)!==o[e]&&(t.editor.setOption(e,o[e]),t.mirror.setOption(e,o[e]))})),this.hydrated||(this.deferred?this.resolveChange(e.value):this.initChange(e.value||"")),this.hydrated=!0},t.prototype.initChange=function(e){this.emulating=!0;var t=this.editor.getDoc(),n=t.lastLine(),r=t.getLine(t.lastLine()).length;t.replaceRange(e||"",{line:0,ch:0},{line:n,ch:r}),this.mirror.setValue(e),t.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},t.prototype.resolveChange=function(e){this.emulating=!0;var t=this.editor.getDoc();if("undo"===this.deferred.origin?t.undo():"redo"===this.deferred.origin?t.redo():t.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),e&&e!==t.getValue()){var n=t.getCursor();t.setValue(e),t.setCursor(n)}this.emulating=!1,this.deferred=null},t.prototype.mirrorChange=function(e){var t=this.editor.getDoc();return"undo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.undo()):"redo"===e.origin?(t.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(e.text,e.from,e.to,e.origin),this.mirror.getValue()},t.prototype.componentDidMount=function(){var e=this;c||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&s.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=s(this.ref,this.props.options),this.shared=new f(this.editor,this.props),this.mirror=s((function(){}),this.props.options),this.editor.on("electricInput",(function(){e.mirror.setHistory(e.editor.getDoc().getHistory())})),this.editor.on("cursorActivity",(function(){e.mirror.setCursor(e.editor.getDoc().getCursor())})),this.editor.on("beforeChange",(function(t,n){if(!e.emulating){n.cancel(),e.deferred=n;var r=e.mirrorChange(e.deferred);e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,e.deferred,r)}})),this.editor.on("change",(function(t,n){e.mounted&&e.props.onChange&&e.props.onChange(e.editor,n,e.editor.getValue())})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(!c){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1),this.props.autoCursor||void 0===this.props.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(e,this.props,t),this.appliedNext=!0),this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0}},t.prototype.componentWillUnmount=function(){c||this.props.editorWillUnmount&&this.props.editorWillUnmount(s)},t.prototype.shouldComponentUpdate=function(e,t){return!c},t.prototype.render=function(){var e=this;if(c)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return l.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(l.Component);t.Controlled=p;var d=function(e){function t(t){var n=e.call(this,t)||this;return c||(n.applied=!1,n.appliedUserDefined=!1,n.continueChange=!1,n.detached=!1,n.hydrated=!1,n.initCb=function(){n.props.editorDidConfigure&&n.props.editorDidConfigure(n.editor)},n.mounted=!1,n.onBeforeChangeCb=function(){n.continueChange=!0}),n}return a(t,e),t.prototype.hydrate=function(e){var t=this,n=e&&e.options?e.options:{},o=r({},s.defaults,this.editor.options,n);if(Object.keys(o).some((function(e){return t.editor.getOption(e)!==o[e]}))&&Object.keys(o).forEach((function(e){n.hasOwnProperty(e)&&t.editor.getOption(e)!==o[e]&&t.editor.setOption(e,o[e])})),!this.hydrated){var i=this.editor.getDoc(),a=i.lastLine(),l=i.getLine(i.lastLine()).length;i.replaceRange(e.value||"",{line:0,ch:0},{line:a,ch:l})}this.hydrated=!0},t.prototype.componentDidMount=function(){var e=this;c||(this.detached=!0===this.props.detach,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&s.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=s(this.ref,this.props.options),this.shared=new f(this.editor,this.props),this.editor.on("beforeChange",(function(t,n){e.props.onBeforeChange&&e.props.onBeforeChange(e.editor,n,e.editor.getValue(),e.onBeforeChangeCb)})),this.editor.on("change",(function(t,n){e.mounted&&e.props.onChange&&(e.props.onBeforeChange?e.continueChange&&e.props.onChange(e.editor,n,e.editor.getValue()):e.props.onChange(e.editor,n,e.editor.getValue()))})),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},t.prototype.componentDidUpdate=function(e){if(this.detached&&!1===this.props.detach&&(this.detached=!1,e.editorDidAttach&&e.editorDidAttach(this.editor)),this.detached||!0!==this.props.detach||(this.detached=!0,e.editorDidDetach&&e.editorDidDetach(this.editor)),!c&&!this.detached){var t={cursor:null};this.props.value!==e.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),e.autoCursor||void 0===e.autoCursor||(t.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(e),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(e,t),this.appliedUserDefined=!0)}},t.prototype.componentWillUnmount=function(){c||this.props.editorWillUnmount&&this.props.editorWillUnmount(s)},t.prototype.shouldComponentUpdate=function(e,t){var n=!0;return c&&(n=!1),this.detached&&e.detach&&(n=!1),n},t.prototype.render=function(){var e=this;if(c)return null;var t=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return l.createElement("div",{className:t,ref:function(t){return e.ref=t}})},t}(l.Component);t.UnControlled=d}).call(this,n(27))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r,o,i,a=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});if("object"==typeof e)i="win32"===e.platform;else if("object"==typeof navigator){var s=navigator.userAgent;i=s.indexOf("Windows")>=0}var l=/^\w[\w\d+.-]*$/,c=/^\//,u=/^\/\//;var f="/",p=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,d=function(){function e(e,t,n,r,o,i){void 0===i&&(i=!1),"object"==typeof e?(this.scheme=e.scheme||"",this.authority=e.authority||"",this.path=e.path||"",this.query=e.query||"",this.fragment=e.fragment||""):(this.scheme=function(e,t){return e||t?e:"file"}(e,i),this.authority=t||"",this.path=function(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==f&&(t=f+t):t=f}return t}(this.scheme,n||""),this.query=r||"",this.fragment=o||"",function(e,t){if(!e.scheme&&t)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+e.authority+'", path: "'+e.path+'", query: "'+e.query+'", fragment: "'+e.fragment+'"}');if(e.scheme&&!l.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path)if(e.authority){if(!c.test(e.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(u.test(e.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}(this,i))}return e.isUri=function(t){return t instanceof e||!!t&&("string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"function"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString)},Object.defineProperty(e.prototype,"fsPath",{get:function(){return b(this,!1)},enumerable:!0,configurable:!0}),e.prototype.with=function(e){if(!e)return this;var t=e.scheme,n=e.authority,r=e.path,o=e.query,i=e.fragment;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===n?n=this.authority:null===n&&(n=""),void 0===r?r=this.path:null===r&&(r=""),void 0===o?o=this.query:null===o&&(o=""),void 0===i?i=this.fragment:null===i&&(i=""),t===this.scheme&&n===this.authority&&r===this.path&&o===this.query&&i===this.fragment?this:new v(t,n,r,o,i)},e.parse=function(e,t){void 0===t&&(t=!1);var n=p.exec(e);return n?new v(n[2]||"",C(n[4]||""),C(n[5]||""),C(n[7]||""),C(n[9]||""),t):new v("","","","","")},e.file=function(e){var t="";if(i&&(e=e.replace(/\\/g,f)),e[0]===f&&e[1]===f){var n=e.indexOf(f,2);-1===n?(t=e.substring(2),e=f):(t=e.substring(2,n),e=e.substring(n)||f)}return new v("file",t,e,"","")},e.from=function(e){return new v(e.scheme,e.authority,e.path,e.query,e.fragment)},e.prototype.toString=function(e){return void 0===e&&(e=!1),x(this,e)},e.prototype.toJSON=function(){return this},e.revive=function(t){if(t){if(t instanceof e)return t;var n=new v(t);return n._formatted=t.external,n._fsPath=t._sep===h?t.fsPath:null,n}return t},e}(),h=i?1:void 0,v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._formatted=null,t._fsPath=null,t}return a(t,e),Object.defineProperty(t.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=b(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),t.prototype.toString=function(e){return void 0===e&&(e=!1),e?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)},t.prototype.toJSON=function(){var e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=h),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e},t}(d),g=((o={})[58]="%3A",o[47]="%2F",o[63]="%3F",o[35]="%23",o[91]="%5B",o[93]="%5D",o[64]="%40",o[33]="%21",o[36]="%24",o[38]="%26",o[39]="%27",o[40]="%28",o[41]="%29",o[42]="%2A",o[43]="%2B",o[44]="%2C",o[59]="%3B",o[61]="%3D",o[32]="%20",o);function m(e,t){for(var n=void 0,r=-1,o=0;o<e.length;o++){var i=e.charCodeAt(o);if(i>=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||45===i||46===i||95===i||126===i||t&&47===i)-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),void 0!==n&&(n+=e.charAt(o));else{void 0===n&&(n=e.substr(0,o));var a=g[i];void 0!==a?(-1!==r&&(n+=encodeURIComponent(e.substring(r,o)),r=-1),n+=a):-1===r&&(r=o)}}return-1!==r&&(n+=encodeURIComponent(e.substring(r))),void 0!==n?n:e}function y(e){for(var t=void 0,n=0;n<e.length;n++){var r=e.charCodeAt(n);35===r||63===r?(void 0===t&&(t=e.substr(0,n)),t+=g[r]):void 0!==t&&(t+=e[n])}return void 0!==t?t:e}function b(e,t){var n;return n=e.authority&&e.path.length>1&&"file"===e.scheme?"//"+e.authority+e.path:47===e.path.charCodeAt(0)&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&58===e.path.charCodeAt(2)?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,"\\")),n}function x(e,t){var n=t?y:m,r="",o=e.scheme,i=e.authority,a=e.path,s=e.query,l=e.fragment;if(o&&(r+=o,r+=":"),(i||"file"===o)&&(r+=f,r+=f),i){var c=i.indexOf("@");if(-1!==c){var u=i.substr(0,c);i=i.substr(c+1),-1===(c=u.indexOf(":"))?r+=n(u,!1):(r+=n(u.substr(0,c),!1),r+=":",r+=n(u.substr(c+1),!1)),r+="@"}-1===(c=(i=i.toLowerCase()).indexOf(":"))?r+=n(i,!1):(r+=n(i.substr(0,c),!1),r+=i.substr(c))}if(a){if(a.length>=3&&47===a.charCodeAt(0)&&58===a.charCodeAt(2))(p=a.charCodeAt(1))>=65&&p<=90&&(a="/"+String.fromCharCode(p+32)+":"+a.substr(3));else if(a.length>=2&&58===a.charCodeAt(1)){var p;(p=a.charCodeAt(0))>=65&&p<=90&&(a=String.fromCharCode(p+32)+":"+a.substr(2))}r+=n(a,!0)}return s&&(r+="?",r+=n(s,!1)),l&&(r+="#",r+=t?l:m(l,!1)),r}var w=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function C(e){return e.match(w)?e.replace(w,(function(e){return function e(t){try{return decodeURIComponent(t)}catch(n){return t.length>3?t.substr(0,3)+e(t.substr(3)):t}}(e)})):e}}).call(this,n(26))},function(e,t,n){!function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,o,i=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=!1!==n.trackScope,u=n.typescript,f=n.wordCharacters||/[\w$\xa1-\uffff]/,p=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),o=e("keyword d"),i=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:o,break:o,continue:o,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),d=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function v(e,t,n){return r=e,o=n,t}function g(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,o=!1;if(s&&"@"==e.peek()&&e.match(h))return t.tokenize=g,v("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||o);)o=!o&&"\\"==r;return o||(t.tokenize=g),v("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return v("number","number");if("."==r&&e.match(".."))return v("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return v(r);if("="==r&&e.eat(">"))return v("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return v("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),v("number","number");if("/"==r)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),v("comment","comment")):Qe(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),v("regexp","string-2")):(e.eat("="),v("operator","operator",e.current()));if("`"==r)return t.tokenize=y,y(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),v("meta","meta");if("#"==r&&e.eatWhile(f))return v("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),v("comment","comment");if(d.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?v("."):v("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var o=e.current();if("."!=t.lastType){if(p.propertyIsEnumerable(o)){var i=p[o];return v(i.type,i.style,o)}if("async"==o&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return v("async","keyword",o)}return v("variable","variable",o)}}function m(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=g;break}r="*"==n}return v("comment","comment")}function y(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=g;break}r=!r&&"\\"==n}return v("quasi","string-2",e.current())}function b(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var o=0,i=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!o){++a;break}if(0==--o){"("==s&&(i=!0);break}}else if(l>=3&&l<6)++o;else if(f.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(i&&!o){++a;break}}i&&!o&&(t.fatArrowAt=a)}}var x={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function w(e,t,n,r,o,i){this.indented=e,this.column=t,this.type=n,this.prev=o,this.info=i,null!=r&&(this.align=r)}function C(e,t){if(!c)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function A(e,t,n,r,o){var i=e.cc;for(k.state=e,k.stream=o,k.marked=null,k.cc=i,k.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);;)if((i.length?i.pop():l?U:V)(n,r)){for(;i.length&&i[i.length-1].lex;)i.pop()();return k.marked?k.marked:"variable"==n&&C(e,r)?"variable-2":t}}var k={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)k.cc.push(arguments[e])}function S(){return O.apply(null,arguments),!0}function E(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function j(e){var t=k.state;if(k.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,n){if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new M(r,n.vars,!0):null}return E(t,n.vars)?n:new M(n.prev,new P(t,n.vars),!1)}return null}(e,t.context);if(null!=r)return void(t.context=r)}else if(!E(e,t.localVars))return void(t.localVars=new P(e,t.localVars));n.globalVars&&!E(e,t.globalVars)&&(t.globalVars=new P(e,t.globalVars))}}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function M(e,t,n){this.prev=e,this.vars=t,this.block=n}function P(e,t){this.name=e,this.next=t}var I=new P("this",new P("arguments",null));function F(){k.state.context=new M(k.state.context,k.state.localVars,!1),k.state.localVars=I}function L(){k.state.context=new M(k.state.context,k.state.localVars,!0),k.state.localVars=null}function N(){k.state.localVars=k.state.context.vars,k.state.context=k.state.context.prev}function _(e,t){var n=function(){var n=k.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var o=n.lexical;o&&")"==o.type&&o.align;o=o.prev)r=o.indented;n.lexical=new w(r,k.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function D(){var e=k.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function R(e){return function t(n){return n==e?S():";"==e||"}"==n||")"==n||"]"==n?O():S(t)}}function V(e,t){return"var"==e?S(_("vardef",t),Ae,R(";"),D):"keyword a"==e?S(_("form"),z,V,D):"keyword b"==e?S(_("form"),V,D):"keyword d"==e?k.stream.match(/^\s*$/,!1)?S():S(_("stat"),q,R(";"),D):"debugger"==e?S(R(";")):"{"==e?S(_("}"),L,se,D,N):";"==e?S():"if"==e?("else"==k.state.lexical.info&&k.state.cc[k.state.cc.length-1]==D&&k.state.cc.pop()(),S(_("form"),z,V,D,Te)):"function"==e?S(Fe):"for"==e?S(_("form"),L,Me,V,N,D):"class"==e||u&&"interface"==t?(k.marked="keyword",S(_("form","class"==e?e:t),Re,D)):"variable"==e?u&&"declare"==t?(k.marked="keyword",S(V)):u&&("module"==t||"enum"==t||"type"==t)&&k.stream.match(/^\s*\w/,!1)?(k.marked="keyword","enum"==t?S(Ye):"type"==t?S(Ne,R("operator"),pe,R(";")):S(_("form"),ke,R("{"),_("}"),se,D,D)):u&&"namespace"==t?(k.marked="keyword",S(_("form"),U,V,D)):u&&"abstract"==t?(k.marked="keyword",S(V)):S(_("stat"),ee):"switch"==e?S(_("form"),z,R("{"),_("}","switch"),L,se,D,D,N):"case"==e?S(U,R(":")):"default"==e?S(R(":")):"catch"==e?S(_("form"),F,B,V,D,N):"export"==e?S(_("stat"),We,D):"import"==e?S(_("stat"),He,D):"async"==e?S(V):"@"==t?S(U,V):O(_("stat"),U,R(";"),D)}function B(e){if("("==e)return S(_e,R(")"))}function U(e,t){return H(e,t,!1)}function W(e,t){return H(e,t,!0)}function z(e){return"("!=e?O():S(_(")"),q,R(")"),D)}function H(e,t,n){if(k.state.fatArrowAt==k.stream.start){var r=n?X:Y;if("("==e)return S(F,_(")"),ie(_e,")"),D,R("=>"),r,N);if("variable"==e)return O(F,ke,R("=>"),r,N)}var o=n?$:G;return x.hasOwnProperty(e)?S(o):"function"==e?S(Fe,o):"class"==e||u&&"interface"==t?(k.marked="keyword",S(_("form"),De,D)):"keyword c"==e||"async"==e?S(n?W:U):"("==e?S(_(")"),q,R(")"),D,o):"operator"==e||"spread"==e?S(n?W:U):"["==e?S(_("]"),Je,D,o):"{"==e?ae(ne,"}",null,o):"quasi"==e?O(K,o):"new"==e?S(function(e){return function(t){return"."==t?S(e?Z:Q):"variable"==t&&u?S(xe,e?$:G):O(e?W:U)}}(n)):S()}function q(e){return e.match(/[;\}\)\],]/)?O():O(U)}function G(e,t){return","==e?S(q):$(e,t,!1)}function $(e,t,n){var r=0==n?G:$,o=0==n?U:W;return"=>"==e?S(F,n?X:Y,N):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?S(r):u&&"<"==t&&k.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?S(_(">"),ie(pe,">"),D,r):"?"==t?S(U,R(":"),o):S(o):"quasi"==e?O(K,r):";"!=e?"("==e?ae(W,")","call",r):"."==e?S(te,r):"["==e?S(_("]"),q,R("]"),D,r):u&&"as"==t?(k.marked="keyword",S(pe,r)):"regexp"==e?(k.state.lastType=k.marked="operator",k.stream.backUp(k.stream.pos-k.stream.start-1),S(o)):void 0:void 0}function K(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?S(K):S(U,J)}function J(e){if("}"==e)return k.marked="string-2",k.state.tokenize=y,S(K)}function Y(e){return b(k.stream,k.state),O("{"==e?V:U)}function X(e){return b(k.stream,k.state),O("{"==e?V:W)}function Q(e,t){if("target"==t)return k.marked="keyword",S(G)}function Z(e,t){if("target"==t)return k.marked="keyword",S($)}function ee(e){return":"==e?S(D,V):O(G,R(";"),D)}function te(e){if("variable"==e)return k.marked="property",S()}function ne(e,t){return"async"==e?(k.marked="property",S(ne)):"variable"==e||"keyword"==k.style?(k.marked="property","get"==t||"set"==t?S(re):(u&&k.state.fatArrowAt==k.stream.start&&(n=k.stream.match(/^\s*:\s*/,!1))&&(k.state.fatArrowAt=k.stream.pos+n[0].length),S(oe))):"number"==e||"string"==e?(k.marked=s?"property":k.style+" property",S(oe)):"jsonld-keyword"==e?S(oe):u&&T(t)?(k.marked="keyword",S(ne)):"["==e?S(U,le,R("]"),oe):"spread"==e?S(W,oe):"*"==t?(k.marked="keyword",S(ne)):":"==e?O(oe):void 0;var n}function re(e){return"variable"!=e?O(oe):(k.marked="property",S(Fe))}function oe(e){return":"==e?S(W):"("==e?O(Fe):void 0}function ie(e,t,n){function r(o,i){if(n?n.indexOf(o)>-1:","==o){var a=k.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),S((function(n,r){return n==t||r==t?O():O(e)}),r)}return o==t||i==t?S():n&&n.indexOf(";")>-1?O(e):S(R(t))}return function(n,o){return n==t||o==t?S():O(e,r)}}function ae(e,t,n){for(var r=3;r<arguments.length;r++)k.cc.push(arguments[r]);return S(_(t,n),ie(e,t),D)}function se(e){return"}"==e?S():O(V,se)}function le(e,t){if(u){if(":"==e)return S(pe);if("?"==t)return S(le)}}function ce(e,t){if(u&&(":"==e||"in"==t))return S(pe)}function ue(e){if(u&&":"==e)return k.stream.match(/^\s*\w+\s+is\b/,!1)?S(U,fe,pe):S(pe)}function fe(e,t){if("is"==t)return k.marked="keyword",S()}function pe(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(k.marked="keyword",S("typeof"==t?W:pe)):"variable"==e||"void"==t?(k.marked="type",S(be)):"|"==t||"&"==t?S(pe):"string"==e||"number"==e||"atom"==e?S(be):"["==e?S(_("]"),ie(pe,"]",","),D,be):"{"==e?S(_("}"),he,D,be):"("==e?S(ie(ye,")"),de,be):"<"==e?S(ie(pe,">"),pe):"quasi"==e?O(ge,be):void 0}function de(e){if("=>"==e)return S(pe)}function he(e){return e.match(/[\}\)\]]/)?S():","==e||";"==e?S(he):O(ve,he)}function ve(e,t){return"variable"==e||"keyword"==k.style?(k.marked="property",S(ve)):"?"==t||"number"==e||"string"==e?S(ve):":"==e?S(pe):"["==e?S(R("variable"),ce,R("]"),ve):"("==e?O(Le,ve):e.match(/[;\}\)\],]/)?void 0:S()}function ge(e,t){return"quasi"!=e?O():"${"!=t.slice(t.length-2)?S(ge):S(pe,me)}function me(e){if("}"==e)return k.marked="string-2",k.state.tokenize=y,S(ge)}function ye(e,t){return"variable"==e&&k.stream.match(/^\s*[?:]/,!1)||"?"==t?S(ye):":"==e?S(pe):"spread"==e?S(ye):O(pe)}function be(e,t){return"<"==t?S(_(">"),ie(pe,">"),D,be):"|"==t||"."==e||"&"==t?S(pe):"["==e?S(pe,R("]"),be):"extends"==t||"implements"==t?(k.marked="keyword",S(pe)):"?"==t?S(pe,R(":"),pe):void 0}function xe(e,t){if("<"==t)return S(_(">"),ie(pe,">"),D,be)}function we(){return O(pe,Ce)}function Ce(e,t){if("="==t)return S(pe)}function Ae(e,t){return"enum"==t?(k.marked="keyword",S(Ye)):O(ke,le,Ee,je)}function ke(e,t){return u&&T(t)?(k.marked="keyword",S(ke)):"variable"==e?(j(t),S()):"spread"==e?S(ke):"["==e?ae(Se,"]"):"{"==e?ae(Oe,"}"):void 0}function Oe(e,t){return"variable"!=e||k.stream.match(/^\s*:/,!1)?("variable"==e&&(k.marked="property"),"spread"==e?S(ke):"}"==e?O():"["==e?S(U,R("]"),R(":"),Oe):S(R(":"),ke,Ee)):(j(t),S(Ee))}function Se(){return O(ke,Ee)}function Ee(e,t){if("="==t)return S(W)}function je(e){if(","==e)return S(Ae)}function Te(e,t){if("keyword b"==e&&"else"==t)return S(_("form","else"),V,D)}function Me(e,t){return"await"==t?S(Me):"("==e?S(_(")"),Pe,D):void 0}function Pe(e){return"var"==e?S(Ae,Ie):"variable"==e?S(Ie):O(Ie)}function Ie(e,t){return")"==e?S():";"==e?S(Ie):"in"==t||"of"==t?(k.marked="keyword",S(U,Ie)):O(U,Ie)}function Fe(e,t){return"*"==t?(k.marked="keyword",S(Fe)):"variable"==e?(j(t),S(Fe)):"("==e?S(F,_(")"),ie(_e,")"),D,ue,V,N):u&&"<"==t?S(_(">"),ie(we,">"),D,Fe):void 0}function Le(e,t){return"*"==t?(k.marked="keyword",S(Le)):"variable"==e?(j(t),S(Le)):"("==e?S(F,_(")"),ie(_e,")"),D,ue,N):u&&"<"==t?S(_(">"),ie(we,">"),D,Le):void 0}function Ne(e,t){return"keyword"==e||"variable"==e?(k.marked="type",S(Ne)):"<"==t?S(_(">"),ie(we,">"),D):void 0}function _e(e,t){return"@"==t&&S(U,_e),"spread"==e?S(_e):u&&T(t)?(k.marked="keyword",S(_e)):u&&"this"==e?S(le,Ee):O(ke,le,Ee)}function De(e,t){return"variable"==e?Re(e,t):Ve(e,t)}function Re(e,t){if("variable"==e)return j(t),S(Ve)}function Ve(e,t){return"<"==t?S(_(">"),ie(we,">"),D,Ve):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(k.marked="keyword"),S(u?pe:U,Ve)):"{"==e?S(_("}"),Be,D):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&T(t))&&k.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(k.marked="keyword",S(Be)):"variable"==e||"keyword"==k.style?(k.marked="property",S(Ue,Be)):"number"==e||"string"==e?S(Ue,Be):"["==e?S(U,le,R("]"),Ue,Be):"*"==t?(k.marked="keyword",S(Be)):u&&"("==e?O(Le,Be):";"==e||","==e?S(Be):"}"==e?S():"@"==t?S(U,Be):void 0}function Ue(e,t){if("!"==t)return S(Ue);if("?"==t)return S(Ue);if(":"==e)return S(pe,Ee);if("="==t)return S(W);var n=k.state.lexical.prev;return O(n&&"interface"==n.info?Le:Fe)}function We(e,t){return"*"==t?(k.marked="keyword",S(Ke,R(";"))):"default"==t?(k.marked="keyword",S(U,R(";"))):"{"==e?S(ie(ze,"}"),Ke,R(";")):O(V)}function ze(e,t){return"as"==t?(k.marked="keyword",S(R("variable"))):"variable"==e?O(W,ze):void 0}function He(e){return"string"==e?S():"("==e?O(U):"."==e?O(G):O(qe,Ge,Ke)}function qe(e,t){return"{"==e?ae(qe,"}"):("variable"==e&&j(t),"*"==t&&(k.marked="keyword"),S($e))}function Ge(e){if(","==e)return S(qe,Ge)}function $e(e,t){if("as"==t)return k.marked="keyword",S(qe)}function Ke(e,t){if("from"==t)return k.marked="keyword",S(U)}function Je(e){return"]"==e?S():O(ie(W,"]"))}function Ye(){return O(_("form"),ke,R("{"),_("}"),ie(Xe,"}"),D,D)}function Xe(){return O(ke,Ee)}function Qe(e,t,n){return t.tokenize==g&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return N.lex=!0,D.lex=!0,{startState:function(e){var t={tokenize:g,lastType:"sof",cc:[],lexical:new w((e||0)-i,0,"block",!1),localVars:n.localVars,context:n.localVars&&new M(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),b(e,t)),t.tokenize!=m&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=o&&"--"!=o?r:"incdec",A(t,n,r,o,e))},indent:function(t,r){if(t.tokenize==m||t.tokenize==y)return e.Pass;if(t.tokenize!=g)return 0;var o,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==D)l=l.prev;else if(u!=Te&&u!=N)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(o=t.cc[t.cc.length-1])&&(o==G||o==$)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var f=l.type,p=s==f;return"vardef"==f?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==f&&"{"==s?l.indented:"form"==f?l.indented+i:"stat"==f?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||d.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?a||i:0):"switch"!=l.info||p||0==n.doubleIndentSwitch?l.align?l.column+(p?0:1):l.indented+(p?0:i):l.indented+(/^(?:case|default)\b/.test(r)?i:2*i)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Qe,skipExpression:function(t){A(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(597))},function(e,t,n){!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),n=e.Pos,r={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function o(e){return e&&e.bracketRegex||/[(){}[\]]/}function i(e,t,i){var s=e.getLineHandle(t.line),l=t.ch-1,c=i&&i.afterCursor;null==c&&(c=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var u=o(i),f=!c&&l>=0&&u.test(s.text.charAt(l))&&r[s.text.charAt(l)]||u.test(s.text.charAt(l+1))&&r[s.text.charAt(++l)];if(!f)return null;var p=">"==f.charAt(1)?1:-1;if(i&&i.strict&&p>0!=(l==t.ch))return null;var d=e.getTokenTypeAt(n(t.line,l+1)),h=a(e,n(t.line,l+(p>0?1:0)),p,d,i);return null==h?null:{from:n(t.line,l),to:h&&h.pos,match:h&&h.ch==f.charAt(0),forward:p>0}}function a(e,t,i,a,s){for(var l=s&&s.maxScanLineLength||1e4,c=s&&s.maxScanLines||1e3,u=[],f=o(s),p=i>0?Math.min(t.line+c,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-c),d=t.line;d!=p;d+=i){var h=e.getLine(d);if(h){var v=i>0?0:h.length-1,g=i>0?h.length:-1;if(!(h.length>l))for(d==t.line&&(v=t.ch-(i<0?1:0));v!=g;v+=i){var m=h.charAt(v);if(f.test(m)&&(void 0===a||(e.getTokenTypeAt(n(d,v+1))||"")==(a||""))){var y=r[m];if(y&&">"==y.charAt(1)==i>0)u.push(m);else{if(!u.length)return{pos:n(d,v),ch:m};u.pop()}}}}}return d-i!=(i>0?e.lastLine():e.firstLine())&&null}function s(e,r,o){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=o&&o.highlightNonMatching,l=[],c=e.listSelections(),u=0;u<c.length;u++){var f=c[u].empty()&&i(e,c[u].head,o);if(f&&(f.match||!1!==s)&&e.getLine(f.from.line).length<=a){var p=f.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";l.push(e.markText(f.from,n(f.from.line,f.from.ch+1),{className:p})),f.to&&e.getLine(f.to.line).length<=a&&l.push(e.markText(f.to,n(f.to.line,f.to.ch+1),{className:p}))}}if(l.length){t&&e.state.focused&&e.focus();var d=function(){e.operation((function(){for(var e=0;e<l.length;e++)l[e].clear()}))};if(!r)return d;setTimeout(d,800)}}function l(e){e.operation((function(){e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null),e.state.matchBrackets.currentlyHighlighted=s(e,!1,e.state.matchBrackets)}))}function c(e){e.state.matchBrackets&&e.state.matchBrackets.currentlyHighlighted&&(e.state.matchBrackets.currentlyHighlighted(),e.state.matchBrackets.currentlyHighlighted=null)}e.defineOption("matchBrackets",!1,(function(t,n,r){r&&r!=e.Init&&(t.off("cursorActivity",l),t.off("focus",l),t.off("blur",c),c(t)),n&&(t.state.matchBrackets="object"==typeof n?n:{},t.on("cursorActivity",l),t.on("focus",l),t.on("blur",c))})),e.defineExtension("matchBrackets",(function(){s(this,!0)})),e.defineExtension("findMatchingBracket",(function(e,t,n){return(n||"boolean"==typeof t)&&(n?(n.strict=t,t=n):t=t?{strict:!0}:null),i(this,e,t)})),e.defineExtension("scanForBracket",(function(e,t,n,r){return a(this,e,t,n,r)}))}(n(597))},function(e,t,n){!function(e){"use strict";var t="CodeMirror-lint-markers";function n(e){e.parentNode&&e.parentNode.removeChild(e)}function r(t,r,o,i){var a=function(t,n,r){var o=document.createElement("div");function i(t){if(!o.parentNode)return e.off(document,"mousemove",i);o.style.top=Math.max(0,t.clientY-o.offsetHeight-5)+"px",o.style.left=t.clientX+5+"px"}return o.className="CodeMirror-lint-tooltip cm-s-"+t.options.theme,o.appendChild(r.cloneNode(!0)),t.state.lint.options.selfContain?t.getWrapperElement().appendChild(o):document.body.appendChild(o),e.on(document,"mousemove",i),i(n),null!=o.style.opacity&&(o.style.opacity=1),o}(t,r,o);function s(){var t;e.off(i,"mouseout",s),a&&((t=a).parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout((function(){n(t)}),600)),a=null)}var l=setInterval((function(){if(a)for(var e=i;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){s();break}}if(!a)return clearInterval(l)}),400);e.on(i,"mouseout",s)}function o(e,t,n){this.marked=[],this.options=t,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(t){!function(e,t){var n=t.target||t.srcElement;if(/\bCodeMirror-lint-mark-/.test(n.className)){for(var o=n.getBoundingClientRect(),i=(o.left+o.right)/2,a=(o.top+o.bottom)/2,l=e.findMarksAt(e.coordsChar({left:i,top:a},"client")),c=[],u=0;u<l.length;++u){var f=l[u].__annotation;f&&c.push(f)}c.length&&function(e,t,n){for(var o=n.target||n.srcElement,i=document.createDocumentFragment(),a=0;a<t.length;a++){var l=t[a];i.appendChild(s(l))}r(e,n,i,o)}(e,c,t)}}(e,t)},this.waitingFor=0}function i(e){var n=e.state.lint;n.hasGutter&&e.clearGutter(t);for(var r=0;r<n.marked.length;++r)n.marked[r].clear();n.marked.length=0}function a(t,n,o,i,a){var s=document.createElement("div"),l=s;return s.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+o,i&&((l=s.appendChild(document.createElement("div"))).className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),0!=a&&e.on(l,"mouseover",(function(e){r(t,e,n,l)})),s}function s(e){var t=e.severity;t||(t="error");var n=document.createElement("div");return n.className="CodeMirror-lint-message CodeMirror-lint-message-"+t,void 0!==e.messageHTML?n.innerHTML=e.messageHTML:n.appendChild(document.createTextNode(e.message)),n}function l(t){var n=t.state.lint.options,r=n.options||n,o=n.getAnnotations||t.getHelper(e.Pos(0,0),"lint");if(o)if(n.async||o.async)!function(t,n,r){var o=t.state.lint,i=++o.waitingFor;function a(){i=-1,t.off("change",a)}t.on("change",a),n(t.getValue(),(function(n,r){t.off("change",a),o.waitingFor==i&&(r&&n instanceof e&&(n=r),t.operation((function(){c(t,n)})))}),r,t)}(t,o,r);else{var i=o(t.getValue(),r,t);if(!i)return;i.then?i.then((function(e){t.operation((function(){c(t,e)}))})):t.operation((function(){c(t,i)}))}}function c(e,n){i(e);for(var r,o,l=e.state.lint,c=l.options,u=function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n],o=r.from.line;(t[o]||(t[o]=[])).push(r)}return t}(n),f=0;f<u.length;++f){var p=u[f];if(p){var d=[];p=p.filter((function(e){return!(d.indexOf(e.message)>-1)&&d.push(e.message)}));for(var h=null,v=l.hasGutter&&document.createDocumentFragment(),g=0;g<p.length;++g){var m=p[g],y=m.severity;y||(y="error"),o=y,h="error"==(r=h)?r:o,c.formatAnnotation&&(m=c.formatAnnotation(m)),l.hasGutter&&v.appendChild(s(m)),m.to&&l.marked.push(e.markText(m.from,m.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+y,__annotation:m}))}l.hasGutter&&e.setGutterMarker(f,t,a(e,v,h,u[f].length>1,l.options.tooltips))}}c.onUpdateLinting&&c.onUpdateLinting(n,u,e)}function u(e){var t=e.state.lint;t&&(clearTimeout(t.timeout),t.timeout=setTimeout((function(){l(e)}),t.options.delay||500))}e.defineOption("lint",!1,(function(n,r,a){if(a&&a!=e.Init&&(i(n),!1!==n.state.lint.options.lintOnChange&&n.off("change",u),e.off(n.getWrapperElement(),"mouseover",n.state.lint.onMouseOver),clearTimeout(n.state.lint.timeout),delete n.state.lint),r){for(var s=n.getOption("gutters"),c=!1,f=0;f<s.length;++f)s[f]==t&&(c=!0);var p=n.state.lint=new o(n,(d=r)instanceof Function?{getAnnotations:d}:(d&&!0!==d||(d={}),d),c);!1!==p.options.lintOnChange&&n.on("change",u),0!=p.options.tooltips&&"gutter"!=p.options.tooltips&&e.on(n.getWrapperElement(),"mouseover",p.onMouseOver),l(n)}var d})),e.defineExtension("performLint",(function(){this.state.lint&&l(this)}))}(n(597))},function(e,t,n){!function(e){"use strict";function t(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var n=this;e.on("cursorActivity",this.activityFunc=function(){n.cursorActivity()})}}e.showHint=function(e,t,n){if(!t)return e.showHint(n);n&&n.async&&(t.async=!0);var r={hint:t};if(n)for(var o in n)r[o]=n[o];return e.showHint(r)},e.defineExtension("showHint",(function(n){n=function(e,t,n){var r=e.options.hintOptions,o={};for(var i in l)o[i]=l[i];if(r)for(var i in r)void 0!==r[i]&&(o[i]=r[i]);if(n)for(var i in n)void 0!==n[i]&&(o[i]=n[i]);return o.hint.resolve&&(o.hint=o.hint.resolve(e,t)),o}(this,this.getCursor("start"),n);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var o=0;o<r.length;o++)if(r[o].head.line!=r[o].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var i=this.state.completionActive=new t(this,n);i.options.hint&&(e.signal(this,"startCompletion",this),i.update(!0))}})),e.defineExtension("closeHint",(function(){this.state.completionActive&&this.state.completionActive.close()}));var n=window.requestAnimationFrame||function(e){return setTimeout(e,1e3/60)},r=window.cancelAnimationFrame||clearTimeout;function o(e){return"string"==typeof e?e:e.text}function i(e,t){for(;t&&t!=e;){if("LI"===t.nodeName.toUpperCase()&&t.parentNode==e)return t;t=t.parentNode}}function a(t,n){this.completion=t,this.data=n,this.picked=!1;var r=this,a=t.cm,s=a.getInputField().ownerDocument,l=s.defaultView||s.parentWindow,c=this.hints=s.createElement("ul"),u=t.cm.options.theme;c.className="CodeMirror-hints "+u,this.selectedHint=n.selectedHint||0;for(var f=n.list,p=0;p<f.length;++p){var d=c.appendChild(s.createElement("li")),h=f[p],v="CodeMirror-hint"+(p!=this.selectedHint?"":" CodeMirror-hint-active");null!=h.className&&(v=h.className+" "+v),d.className=v,h.render?h.render(d,n,h):d.appendChild(s.createTextNode(h.displayText||o(h))),d.hintId=p}var g=t.options.container||s.body,m=a.cursorCoords(t.options.alignWithWord?n.from:null),y=m.left,b=m.bottom,x=!0,w=0,C=0;if(g!==s.body){var A=-1!==["absolute","relative","fixed"].indexOf(l.getComputedStyle(g).position)?g:g.offsetParent,k=A.getBoundingClientRect(),O=s.body.getBoundingClientRect();w=k.left-O.left-A.scrollLeft,C=k.top-O.top-A.scrollTop}c.style.left=y-w+"px",c.style.top=b-C+"px";var S=l.innerWidth||Math.max(s.body.offsetWidth,s.documentElement.offsetWidth),E=l.innerHeight||Math.max(s.body.offsetHeight,s.documentElement.offsetHeight);g.appendChild(c);var j,T=t.options.moveOnOverlap?c.getBoundingClientRect():new DOMRect,M=!!t.options.paddingForScrollbar&&c.scrollHeight>c.clientHeight+1;if(setTimeout((function(){j=a.getScrollInfo()})),T.bottom-E>0){var P=T.bottom-T.top;if(m.top-(m.bottom-T.top)-P>0)c.style.top=(b=m.top-P-C)+"px",x=!1;else if(P>E){c.style.height=E-5+"px",c.style.top=(b=m.bottom-T.top-C)+"px";var I=a.getCursor();n.from.ch!=I.ch&&(m=a.cursorCoords(I),c.style.left=(y=m.left-w)+"px",T=c.getBoundingClientRect())}}var F,L=T.right-S;if(M&&(L+=a.display.nativeBarWidth),L>0&&(T.right-T.left>S&&(c.style.width=S-5+"px",L-=T.right-T.left-S),c.style.left=(y=m.left-L-w)+"px"),M)for(var N=c.firstChild;N;N=N.nextSibling)N.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=function(e,t){var n={Up:function(){t.moveFocus(-1)},Down:function(){t.moveFocus(1)},PageUp:function(){t.moveFocus(1-t.menuSize(),!0)},PageDown:function(){t.moveFocus(t.menuSize()-1,!0)},Home:function(){t.setFocus(0)},End:function(){t.setFocus(t.length-1)},Enter:t.pick,Tab:t.pick,Esc:t.close};/Mac/.test(navigator.platform)&&(n["Ctrl-P"]=function(){t.moveFocus(-1)},n["Ctrl-N"]=function(){t.moveFocus(1)});var r=e.options.customKeys,o=r?{}:n;function i(e,r){var i;i="string"!=typeof r?function(e){return r(e,t)}:n.hasOwnProperty(r)?n[r]:r,o[e]=i}if(r)for(var a in r)r.hasOwnProperty(a)&&i(a,r[a]);var s=e.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&i(a,s[a]);return o}(t,{moveFocus:function(e,t){r.changeActive(r.selectedHint+e,t)},setFocus:function(e){r.changeActive(e)},menuSize:function(){return r.screenAmount()},length:f.length,close:function(){t.close()},pick:function(){r.pick()},data:n})),t.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){F=setTimeout((function(){t.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(F)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),n=a.getWrapperElement().getBoundingClientRect();j||(j=a.getScrollInfo());var r=b+j.top-e.top,o=r-(l.pageYOffset||(s.documentElement||s.body).scrollTop);if(x||(o+=c.offsetHeight),o<=n.top||o>=n.bottom)return t.close();c.style.top=r+"px",c.style.left=y+j.left-e.left+"px"}),e.on(c,"dblclick",(function(e){var t=i(c,e.target||e.srcElement);t&&null!=t.hintId&&(r.changeActive(t.hintId),r.pick())})),e.on(c,"click",(function(e){var n=i(c,e.target||e.srcElement);n&&null!=n.hintId&&(r.changeActive(n.hintId),t.options.completeOnSingleClick&&r.pick())})),e.on(c,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var _=this.getSelectedHintRange();return 0===_.from&&0===_.to||this.scrollToActive(),e.signal(n,"select",f[this.selectedHint],c.childNodes[this.selectedHint]),!0}function s(e,t,n,r){if(e.async)e(t,r,n);else{var o=e(t,n);o&&o.then?o.then(r):r(o)}}t.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,n){var r=t.list[n],i=this;this.cm.operation((function(){r.hint?r.hint(i.cm,t,r):i.cm.replaceRange(o(r),r.from||t.from,r.to||t.to,"complete"),e.signal(t,"pick",r),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(r(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),o=this.cm.getLine(t.line);if(t.line!=this.startPos.line||o.length-t.ch!=this.startLen-this.startPos.ch||t.ch<e.ch||this.cm.somethingSelected()||!t.ch||this.options.closeCharacters.test(o.charAt(t.ch-1)))this.close();else{var i=this;this.debounce=n((function(){i.update()})),this.widget&&this.widget.disable()}},update:function(e){if(null!=this.tick){var t=this,n=++this.tick;s(this.options.hint,this.cm,this.options,(function(r){t.tick==n&&t.finishUpdate(r,e)}))}},finishUpdate:function(t,n){this.data&&e.signal(this.data,"update");var r=this.widget&&this.widget.picked||n&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=t,t&&t.list.length&&(r&&1==t.list.length?this.pick(t,0):(this.widget=new a(this,t),e.signal(t,"shown")))}},a.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var e=this.completion.cm;this.completion.options.closeOnUnfocus&&(e.off("blur",this.onBlur),e.off("focus",this.onFocus)),e.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var e=this;this.keyMap={Enter:function(){e.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(t,n){if(t>=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var r=this.hints.childNodes[this.selectedHint];r&&(r.className=r.className.replace(" CodeMirror-hint-active","")),(r=this.hints.childNodes[this.selectedHint=t]).className+=" CodeMirror-hint-active",this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],r)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],n=this.hints.childNodes[e.to],r=this.hints.firstChild;t.offsetTop<this.hints.scrollTop?this.hints.scrollTop=t.offsetTop-r.offsetTop:n.offsetTop+n.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=n.offsetTop+n.offsetHeight-this.hints.clientHeight+r.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:function(t,n){var r,o=t.getHelpers(n,"hint");if(o.length){var i=function(e,t,n){var r=function(e,t){if(!e.somethingSelected())return t;for(var n=[],r=0;r<t.length;r++)t[r].supportsSelection&&n.push(t[r]);return n}(e,o);!function o(i){if(i==r.length)return t(null);s(r[i],e,n,(function(e){e&&e.list.length>0?t(e):o(i+1)}))}(0)};return i.async=!0,i.supportsSelection=!0,i}return(r=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:r})}:e.hint.anyword?function(t,n){return e.hint.anyword(t,n)}:function(){}}}),e.registerHelper("hint","fromList",(function(t,n){var r,o=t.getCursor(),i=t.getTokenAt(o),a=e.Pos(o.line,i.start),s=o;i.start<o.ch&&/\w/.test(i.string.charAt(o.ch-i.start-1))?r=i.string.substr(0,o.ch-i.start):(r="",a=o);for(var l=[],c=0;c<n.words.length;c++){var u=n.words[c];u.slice(0,r.length)==r&&l.push(u)}if(l.length)return{list:l,from:a,to:s}})),e.commands.autocomplete=e.showHint;var l={hint:e.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};e.defineOption("hintOptions",null)}(n(597))},function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function r(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(o),t.state.closeBrackets=null),n&&(i(r(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(o))}));var o={Backspace:function(t){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;for(var i=r(o,"pairs"),a=t.listSelections(),l=0;l<a.length;l++){if(!a[l].empty())return e.Pass;var u=c(t,a[l].head);if(!u||i.indexOf(u)%2!=0)return e.Pass}for(l=a.length-1;l>=0;l--){var f=a[l].head;t.replaceRange("",n(f.line,f.ch-1),n(f.line,f.ch+1),"+delete")}},Enter:function(t){var n=s(t),o=n&&r(n,"explode");if(!o||t.getOption("disableInput"))return e.Pass;for(var i=t.listSelections(),a=0;a<i.length;a++){if(!i[a].empty())return e.Pass;var u=c(t,i[a].head);if(!u||o.indexOf(u)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),l(t,-1),i=t.listSelections();for(var n=0;n<i.length;n++){var r=i[n].head.line;t.indentLine(r,null,!0),t.indentLine(r+1,null,!0)}}))}};function i(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),r="'"+n+"'";o[r]||(o[r]=a(n))}}function a(t){return function(o){return function(t,o){var i=s(t);if(!i||t.getOption("disableInput"))return e.Pass;var a=r(i,"pairs"),c=a.indexOf(o);if(-1==c)return e.Pass;for(var f,p=r(i,"closeBefore"),d=r(i,"triples"),h=a.charAt(c+1)==o,v=t.listSelections(),g=c%2==0,m=0;m<v.length;m++){var y,b=v[m],x=b.head,w=t.getRange(x,n(x.line,x.ch+1));if(g&&!b.empty())y="surround";else if(!h&&g||w!=o)if(h&&x.ch>1&&d.indexOf(o)>=0&&t.getRange(n(x.line,x.ch-2),x)==o+o){if(x.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(x.line,x.ch-2))))return e.Pass;y="addFour"}else if(h){var C=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(w)||C==o||e.isWordChar(C))return e.Pass;y="both"}else{if(!g||!(0===w.length||/\s/.test(w)||p.indexOf(w)>-1))return e.Pass;y="both"}else y=h&&u(t,x)?"both":d.indexOf(o)>=0&&t.getRange(x,n(x.line,x.ch+3))==o+o+o?"skipThree":"skip";if(f){if(f!=y)return e.Pass}else f=y}var A=c%2?a.charAt(c-1):o,k=c%2?o:a.charAt(c+1);t.operation((function(){if("skip"==f)l(t,1);else if("skipThree"==f)l(t,3);else if("surround"==f){for(var r=t.getSelections(),o=0;o<r.length;o++)r[o]=A+r[o]+k;for(t.replaceSelections(r,"around"),r=t.listSelections().slice(),o=0;o<r.length;o++)r[o]=(i=r[o],a=void 0,a=e.cmpPos(i.anchor,i.head)>0,{anchor:new n(i.anchor.line,i.anchor.ch+(a?-1:1)),head:new n(i.head.line,i.head.ch+(a?1:-1))});t.setSelections(r)}else"both"==f?(t.replaceSelection(A+k,null),t.triggerElectric(A+k),l(t,-1)):"addFour"==f&&(t.replaceSelection(A+A+A+A,"before"),l(t,1));var i,a}))}(o,t)}}function s(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function l(e,t){for(var n=[],r=e.listSelections(),o=0,i=0;i<r.length;i++){var a=r[i];a.head==e.getCursor()&&(o=i);var s=a.head.ch||t>0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};n.push({anchor:s,head:s})}e.setSelections(n,o)}function c(e,t){var r=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==r.length?r:null}function u(e,t){var r=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(r.type)&&r.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}i(t.pairs+"`")}(n(597))},function(e,t,n){!function(e){"use strict";var t,n,r=e.Pos;function o(e,t){for(var n=function(e){var t=e.flags;return null!=t?t:(e.ignoreCase?"i":"")+(e.global?"g":"")+(e.multiline?"m":"")}(e),r=n,o=0;o<t.length;o++)-1==r.indexOf(t.charAt(o))&&(r+=t.charAt(o));return n==r?e:new RegExp(e.source,r)}function i(e){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(e.source)}function a(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.lastLine();i<=s;i++,a=0){t.lastIndex=a;var l=e.getLine(i),c=t.exec(l);if(c)return{from:r(i,c.index),to:r(i,c.index+c[0].length),match:c}}}function s(e,t,n){if(!i(t))return a(e,t,n);t=o(t,"gm");for(var s,l=1,c=n.line,u=e.lastLine();c<=u;){for(var f=0;f<l&&!(c>u);f++){var p=e.getLine(c++);s=null==s?p:s+"\n"+p}l*=2,t.lastIndex=n.ch;var d=t.exec(s);if(d){var h=s.slice(0,d.index).split("\n"),v=d[0].split("\n"),g=n.line+h.length-1,m=h[h.length-1].length;return{from:r(g,m),to:r(g+v.length-1,1==v.length?m+v[0].length:v[v.length-1].length),match:d}}}}function l(e,t,n){for(var r,o=0;o<=e.length;){t.lastIndex=o;var i=t.exec(e);if(!i)break;var a=i.index+i[0].length;if(a>e.length-n)break;(!r||a>r.index+r[0].length)&&(r=i),o=i.index+1}return r}function c(e,t,n){t=o(t,"g");for(var i=n.line,a=n.ch,s=e.firstLine();i>=s;i--,a=-1){var c=e.getLine(i),u=l(c,t,a<0?0:c.length-a);if(u)return{from:r(i,u.index),to:r(i,u.index+u[0].length),match:u}}}function u(e,t,n){if(!i(t))return c(e,t,n);t=o(t,"gm");for(var a,s=1,u=e.getLine(n.line).length-n.ch,f=n.line,p=e.firstLine();f>=p;){for(var d=0;d<s&&f>=p;d++){var h=e.getLine(f--);a=null==a?h:h+"\n"+a}s*=2;var v=l(a,t,u);if(v){var g=a.slice(0,v.index).split("\n"),m=v[0].split("\n"),y=f+g.length,b=g[g.length-1].length;return{from:r(y,b),to:r(y+m.length-1,1==m.length?b+m[0].length:m[m.length-1].length),match:v}}}}function f(e,t,n,r){if(e.length==t.length)return n;for(var o=0,i=n+Math.max(0,e.length-t.length);;){if(o==i)return o;var a=o+i>>1,s=r(e.slice(0,a)).length;if(s==n)return a;s>n?i=a:o=a+1}}function p(e,o,i,a){if(!o.length)return null;var s=a?t:n,l=s(o).split(/\r|\n\r?/);e:for(var c=i.line,u=i.ch,p=e.lastLine()+1-l.length;c<=p;c++,u=0){var d=e.getLine(c).slice(u),h=s(d);if(1==l.length){var v=h.indexOf(l[0]);if(-1==v)continue e;return i=f(d,h,v,s)+u,{from:r(c,f(d,h,v,s)+u),to:r(c,f(d,h,v+l[0].length,s)+u)}}var g=h.length-l[0].length;if(h.slice(g)==l[0]){for(var m=1;m<l.length-1;m++)if(s(e.getLine(c+m))!=l[m])continue e;var y=e.getLine(c+l.length-1),b=s(y),x=l[l.length-1];if(b.slice(0,x.length)==x)return{from:r(c,f(d,h,g,s)+u),to:r(c+l.length-1,f(y,b,x.length,s))}}}}function d(e,o,i,a){if(!o.length)return null;var s=a?t:n,l=s(o).split(/\r|\n\r?/);e:for(var c=i.line,u=i.ch,p=e.firstLine()-1+l.length;c>=p;c--,u=-1){var d=e.getLine(c);u>-1&&(d=d.slice(0,u));var h=s(d);if(1==l.length){var v=h.lastIndexOf(l[0]);if(-1==v)continue e;return{from:r(c,f(d,h,v,s)),to:r(c,f(d,h,v+l[0].length,s))}}var g=l[l.length-1];if(h.slice(0,g.length)==g){var m=1;for(i=c-l.length+1;m<l.length-1;m++)if(s(e.getLine(i+m))!=l[m])continue e;var y=e.getLine(c+1-l.length),b=s(y);if(b.slice(b.length-l[0].length)==l[0])return{from:r(c+1-l.length,f(y,b,y.length-l[0].length,s)),to:r(c,f(d,h,g.length,s))}}}}function h(e,t,n,i){var l;this.atOccurrence=!1,this.doc=e,n=n?e.clipPos(n):r(0,0),this.pos={from:n,to:n},"object"==typeof i?l=i.caseFold:(l=i,i=null),"string"==typeof t?(null==l&&(l=!1),this.matches=function(n,r){return(n?d:p)(e,t,r,l)}):(t=o(t,"gm"),i&&!1===i.multiline?this.matches=function(n,r){return(n?c:a)(e,t,r)}:this.matches=function(n,r){return(n?u:s)(e,t,r)})}String.prototype.normalize?(t=function(e){return e.normalize("NFD").toLowerCase()},n=function(e){return e.normalize("NFD")}):(t=function(e){return e.toLowerCase()},n=function(e){return e}),h.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(t){for(var n=this.matches(t,this.doc.clipPos(t?this.pos.from:this.pos.to));n&&0==e.cmpPos(n.from,n.to);)t?n.from.ch?n.from=r(n.from.line,n.from.ch-1):n=n.from.line==this.doc.firstLine()?null:this.matches(t,this.doc.clipPos(r(n.from.line-1))):n.to.ch<this.doc.getLine(n.to.line).length?n.to=r(n.to.line,n.to.ch+1):n=n.to.line==this.doc.lastLine()?null:this.matches(t,r(n.to.line+1,0));if(n)return this.pos=n,this.atOccurrence=!0,this.pos.match||!0;var o=r(t?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:o,to:o},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(t,n){if(this.atOccurrence){var o=e.splitLines(t);this.doc.replaceRange(o,this.pos.from,this.pos.to,n),this.pos.to=r(this.pos.from.line+o.length-1,o[o.length-1].length+(1==o.length?this.pos.from.ch:0))}}},e.defineExtension("getSearchCursor",(function(e,t,n){return new h(this.doc,e,t,n)})),e.defineDocExtension("getSearchCursor",(function(e,t,n){return new h(this,e,t,n)})),e.defineExtension("selectMatches",(function(t,n){for(var r=[],o=this.getSearchCursor(t,this.getCursor("from"),n);o.findNext()&&!(e.cmpPos(o.to(),this.getCursor("to"))>0);)r.push({anchor:o.from(),head:o.to()});r.length&&this.setSelections(r,0)}))}(n(597))},function(e,t,n){var r=n(322),o=n(803);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){(t=n(323)(!1)).push([e.i,"/* BASICS */\n\n.CodeMirror {\n /* Set height, width, borders, and global font properties here */\n font-family: monospace;\n height: 300px;\n color: black;\n direction: ltr;\n}\n\n/* PADDING */\n\n.CodeMirror-lines {\n padding: 4px 0; /* Vertical padding around content */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n padding: 0 4px; /* Horizontal padding of content */\n}\n\n.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n background-color: white; /* The little square between H and V scrollbars */\n}\n\n/* GUTTER */\n\n.CodeMirror-gutters {\n border-right: 1px solid #ddd;\n background-color: #f7f7f7;\n white-space: nowrap;\n}\n.CodeMirror-linenumbers {}\n.CodeMirror-linenumber {\n padding: 0 3px 0 5px;\n min-width: 20px;\n text-align: right;\n color: #999;\n white-space: nowrap;\n}\n\n.CodeMirror-guttermarker { color: black; }\n.CodeMirror-guttermarker-subtle { color: #999; }\n\n/* CURSOR */\n\n.CodeMirror-cursor {\n border-left: 1px solid black;\n border-right: none;\n width: 0;\n}\n/* Shown when moving in bi-directional text */\n.CodeMirror div.CodeMirror-secondarycursor {\n border-left: 1px solid silver;\n}\n.cm-fat-cursor .CodeMirror-cursor {\n width: auto;\n border: 0 !important;\n background: #7e7;\n}\n.cm-fat-cursor div.CodeMirror-cursors {\n z-index: 1;\n}\n.cm-fat-cursor-mark {\n background-color: rgba(20, 255, 20, 0.5);\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n}\n.cm-animate-fat-cursor {\n width: auto;\n border: 0;\n -webkit-animation: blink 1.06s steps(1) infinite;\n -moz-animation: blink 1.06s steps(1) infinite;\n animation: blink 1.06s steps(1) infinite;\n background-color: #7e7;\n}\n@-moz-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@-webkit-keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n@keyframes blink {\n 0% {}\n 50% { background-color: transparent; }\n 100% {}\n}\n\n/* Can style cursor different in overwrite (non-insert) mode */\n.CodeMirror-overwrite .CodeMirror-cursor {}\n\n.cm-tab { display: inline-block; text-decoration: inherit; }\n\n.CodeMirror-rulers {\n position: absolute;\n left: 0; right: 0; top: -50px; bottom: 0;\n overflow: hidden;\n}\n.CodeMirror-ruler {\n border-left: 1px solid #ccc;\n top: 0; bottom: 0;\n position: absolute;\n}\n\n/* DEFAULT THEME */\n\n.cm-s-default .cm-header {color: blue;}\n.cm-s-default .cm-quote {color: #090;}\n.cm-negative {color: #d44;}\n.cm-positive {color: #292;}\n.cm-header, .cm-strong {font-weight: bold;}\n.cm-em {font-style: italic;}\n.cm-link {text-decoration: underline;}\n.cm-strikethrough {text-decoration: line-through;}\n\n.cm-s-default .cm-keyword {color: #708;}\n.cm-s-default .cm-atom {color: #219;}\n.cm-s-default .cm-number {color: #164;}\n.cm-s-default .cm-def {color: #00f;}\n.cm-s-default .cm-variable,\n.cm-s-default .cm-punctuation,\n.cm-s-default .cm-property,\n.cm-s-default .cm-operator {}\n.cm-s-default .cm-variable-2 {color: #05a;}\n.cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;}\n.cm-s-default .cm-comment {color: #a50;}\n.cm-s-default .cm-string {color: #a11;}\n.cm-s-default .cm-string-2 {color: #f50;}\n.cm-s-default .cm-meta {color: #555;}\n.cm-s-default .cm-qualifier {color: #555;}\n.cm-s-default .cm-builtin {color: #30a;}\n.cm-s-default .cm-bracket {color: #997;}\n.cm-s-default .cm-tag {color: #170;}\n.cm-s-default .cm-attribute {color: #00c;}\n.cm-s-default .cm-hr {color: #999;}\n.cm-s-default .cm-link {color: #00c;}\n\n.cm-s-default .cm-error {color: #f00;}\n.cm-invalidchar {color: #f00;}\n\n.CodeMirror-composing { border-bottom: 2px solid; }\n\n/* Default styles for common addons */\n\ndiv.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;}\ndiv.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;}\n.CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); }\n.CodeMirror-activeline-background {background: #e8f2ff;}\n\n/* STOP */\n\n/* The rest of this file contains styles related to the mechanics of\n the editor. You probably shouldn't touch them. */\n\n.CodeMirror {\n position: relative;\n overflow: hidden;\n background: white;\n}\n\n.CodeMirror-scroll {\n overflow: scroll !important; /* Things will break if this is overridden */\n /* 50px is the magic margin used to hide the element's real scrollbars */\n /* See overflow: hidden in .CodeMirror */\n margin-bottom: -50px; margin-right: -50px;\n padding-bottom: 50px;\n height: 100%;\n outline: none; /* Prevent dragging from highlighting the element */\n position: relative;\n}\n.CodeMirror-sizer {\n position: relative;\n border-right: 50px solid transparent;\n}\n\n/* The fake, visible scrollbars. Used to force redraw during scrolling\n before actual scrolling happens, thus preventing shaking and\n flickering artifacts. */\n.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {\n position: absolute;\n z-index: 6;\n display: none;\n outline: none;\n}\n.CodeMirror-vscrollbar {\n right: 0; top: 0;\n overflow-x: hidden;\n overflow-y: scroll;\n}\n.CodeMirror-hscrollbar {\n bottom: 0; left: 0;\n overflow-y: hidden;\n overflow-x: scroll;\n}\n.CodeMirror-scrollbar-filler {\n right: 0; bottom: 0;\n}\n.CodeMirror-gutter-filler {\n left: 0; bottom: 0;\n}\n\n.CodeMirror-gutters {\n position: absolute; left: 0; top: 0;\n min-height: 100%;\n z-index: 3;\n}\n.CodeMirror-gutter {\n white-space: normal;\n height: 100%;\n display: inline-block;\n vertical-align: top;\n margin-bottom: -50px;\n}\n.CodeMirror-gutter-wrapper {\n position: absolute;\n z-index: 4;\n background: none !important;\n border: none !important;\n}\n.CodeMirror-gutter-background {\n position: absolute;\n top: 0; bottom: 0;\n z-index: 4;\n}\n.CodeMirror-gutter-elt {\n position: absolute;\n cursor: default;\n z-index: 4;\n}\n.CodeMirror-gutter-wrapper ::selection { background-color: transparent }\n.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }\n\n.CodeMirror-lines {\n cursor: text;\n min-height: 1px; /* prevents collapsing before first draw */\n}\n.CodeMirror pre.CodeMirror-line,\n.CodeMirror pre.CodeMirror-line-like {\n /* Reset some styles that the rest of the page might have set */\n -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;\n border-width: 0;\n background: transparent;\n font-family: inherit;\n font-size: inherit;\n margin: 0;\n white-space: pre;\n word-wrap: normal;\n line-height: inherit;\n color: inherit;\n z-index: 2;\n position: relative;\n overflow: visible;\n -webkit-tap-highlight-color: transparent;\n -webkit-font-variant-ligatures: contextual;\n font-variant-ligatures: contextual;\n}\n.CodeMirror-wrap pre.CodeMirror-line,\n.CodeMirror-wrap pre.CodeMirror-line-like {\n word-wrap: break-word;\n white-space: pre-wrap;\n word-break: normal;\n}\n\n.CodeMirror-linebackground {\n position: absolute;\n left: 0; right: 0; top: 0; bottom: 0;\n z-index: 0;\n}\n\n.CodeMirror-linewidget {\n position: relative;\n z-index: 2;\n padding: 0.1px; /* Force widget margins to stay inside of the container */\n}\n\n.CodeMirror-widget {}\n\n.CodeMirror-rtl pre { direction: rtl; }\n\n.CodeMirror-code {\n outline: none;\n}\n\n/* Force content-box sizing for the elements where we expect it */\n.CodeMirror-scroll,\n.CodeMirror-sizer,\n.CodeMirror-gutter,\n.CodeMirror-gutters,\n.CodeMirror-linenumber {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n}\n\n.CodeMirror-measure {\n position: absolute;\n width: 100%;\n height: 0;\n overflow: hidden;\n visibility: hidden;\n}\n\n.CodeMirror-cursor {\n position: absolute;\n pointer-events: none;\n}\n.CodeMirror-measure pre { position: static; }\n\ndiv.CodeMirror-cursors {\n visibility: hidden;\n position: relative;\n z-index: 3;\n}\ndiv.CodeMirror-dragcursors {\n visibility: visible;\n}\n\n.CodeMirror-focused div.CodeMirror-cursors {\n visibility: visible;\n}\n\n.CodeMirror-selected { background: #d9d9d9; }\n.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }\n.CodeMirror-crosshair { cursor: crosshair; }\n.CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; }\n.CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; }\n\n.cm-searching {\n background-color: #ffa;\n background-color: rgba(255, 255, 0, .4);\n}\n\n/* Used to force a border model for a node */\n.cm-force-border { padding-right: .1px; }\n\n@media print {\n /* Hide the cursor when printing */\n .CodeMirror div.CodeMirror-cursors {\n visibility: hidden;\n }\n}\n\n/* See issue #2901 */\n.cm-tab-wrap-hack:after { content: ''; }\n\n/* Help users use markselection to safely style text background */\nspan.CodeMirror-selectedtext { background: none; }\n",""]),e.exports=t},function(e,t,n){var r=n(322),o=n(805);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){(t=n(323)(!1)).push([e.i,"/*\n Name: material\n Author: Mattia Astorino (http://github.com/equinusocio)\n Website: https://material-theme.site/\n*/\n\n.cm-s-material.CodeMirror {\n background-color: #263238;\n color: #EEFFFF;\n}\n\n.cm-s-material .CodeMirror-gutters {\n background: #263238;\n color: #546E7A;\n border: none;\n}\n\n.cm-s-material .CodeMirror-guttermarker,\n.cm-s-material .CodeMirror-guttermarker-subtle,\n.cm-s-material .CodeMirror-linenumber {\n color: #546E7A;\n}\n\n.cm-s-material .CodeMirror-cursor {\n border-left: 1px solid #FFCC00;\n}\n\n.cm-s-material div.CodeMirror-selected {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material.CodeMirror-focused div.CodeMirror-selected {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material .CodeMirror-line::selection,\n.cm-s-material .CodeMirror-line>span::selection,\n.cm-s-material .CodeMirror-line>span>span::selection {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material .CodeMirror-line::-moz-selection,\n.cm-s-material .CodeMirror-line>span::-moz-selection,\n.cm-s-material .CodeMirror-line>span>span::-moz-selection {\n background: rgba(128, 203, 196, 0.2);\n}\n\n.cm-s-material .CodeMirror-activeline-background {\n background: rgba(0, 0, 0, 0.5);\n}\n\n.cm-s-material .cm-keyword {\n color: #C792EA;\n}\n\n.cm-s-material .cm-operator {\n color: #89DDFF;\n}\n\n.cm-s-material .cm-variable-2 {\n color: #EEFFFF;\n}\n\n.cm-s-material .cm-variable-3,\n.cm-s-material .cm-type {\n color: #f07178;\n}\n\n.cm-s-material .cm-builtin {\n color: #FFCB6B;\n}\n\n.cm-s-material .cm-atom {\n color: #F78C6C;\n}\n\n.cm-s-material .cm-number {\n color: #FF5370;\n}\n\n.cm-s-material .cm-def {\n color: #82AAFF;\n}\n\n.cm-s-material .cm-string {\n color: #C3E88D;\n}\n\n.cm-s-material .cm-string-2 {\n color: #f07178;\n}\n\n.cm-s-material .cm-comment {\n color: #546E7A;\n}\n\n.cm-s-material .cm-variable {\n color: #f07178;\n}\n\n.cm-s-material .cm-tag {\n color: #FF5370;\n}\n\n.cm-s-material .cm-meta {\n color: #FFCB6B;\n}\n\n.cm-s-material .cm-attribute {\n color: #C792EA;\n}\n\n.cm-s-material .cm-property {\n color: #C792EA;\n}\n\n.cm-s-material .cm-qualifier {\n color: #DECB6B;\n}\n\n.cm-s-material .cm-variable-3,\n.cm-s-material .cm-type {\n color: #DECB6B;\n}\n\n\n.cm-s-material .cm-error {\n color: rgba(255, 255, 255, 1.0);\n background-color: #FF5370;\n}\n\n.cm-s-material .CodeMirror-matchingbracket {\n text-decoration: underline;\n color: white !important;\n}",""]),e.exports=t},function(e,t,n){var r=n(322),o=n(807);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){(t=n(323)(!1)).push([e.i,'/* The lint marker gutter */\n.CodeMirror-lint-markers {\n width: 16px;\n}\n\n.CodeMirror-lint-tooltip {\n background-color: #ffd;\n border: 1px solid black;\n border-radius: 4px 4px 4px 4px;\n color: black;\n font-family: monospace;\n font-size: 10pt;\n overflow: hidden;\n padding: 2px 5px;\n position: fixed;\n white-space: pre;\n white-space: pre-wrap;\n z-index: 100;\n max-width: 600px;\n opacity: 0;\n transition: opacity .4s;\n -moz-transition: opacity .4s;\n -webkit-transition: opacity .4s;\n -o-transition: opacity .4s;\n -ms-transition: opacity .4s;\n}\n\n.CodeMirror-lint-mark {\n background-position: left bottom;\n background-repeat: repeat-x;\n}\n\n.CodeMirror-lint-mark-warning {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");\n}\n\n.CodeMirror-lint-mark-error {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");\n}\n\n.CodeMirror-lint-marker {\n background-position: center center;\n background-repeat: no-repeat;\n cursor: pointer;\n display: inline-block;\n height: 16px;\n width: 16px;\n vertical-align: middle;\n position: relative;\n}\n\n.CodeMirror-lint-message {\n padding-left: 18px;\n background-position: top left;\n background-repeat: no-repeat;\n}\n\n.CodeMirror-lint-marker-warning, .CodeMirror-lint-message-warning {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=");\n}\n\n.CodeMirror-lint-marker-error, .CodeMirror-lint-message-error {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=");\n}\n\n.CodeMirror-lint-marker-multiple {\n background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");\n background-repeat: no-repeat;\n background-position: right bottom;\n width: 100%; height: 100%;\n}\n',""]),e.exports=t},function(e,t,n){var r=n(322),o=n(809);"string"==typeof(o=o.__esModule?o.default:o)&&(o=[[e.i,o,""]]);var i={insert:"head",singleton:!1};r(o,i);e.exports=o.locals||{}},function(e,t,n){(t=n(323)(!1)).push([e.i,".CodeMirror-hints {\n position: absolute;\n z-index: 10;\n overflow: hidden;\n list-style: none;\n\n margin: 0;\n padding: 2px;\n\n -webkit-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n -moz-box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n box-shadow: 2px 3px 5px rgba(0,0,0,.2);\n border-radius: 3px;\n border: 1px solid silver;\n\n background: white;\n font-size: 90%;\n font-family: monospace;\n\n max-height: 20em;\n overflow-y: auto;\n}\n\n.CodeMirror-hint {\n margin: 0;\n padding: 0 4px;\n border-radius: 2px;\n white-space: pre;\n color: black;\n cursor: pointer;\n}\n\nli.CodeMirror-hint-active {\n background: #08f;\n color: white;\n}\n",""]),e.exports=t},function(e,t,n){var r=n(721);e.exports=r},function(e,t,n){var r=n(572),o=n(589),i=n(622);r({target:"Object",stat:!0,forced:n(574)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){var r=n(813);e.exports=r},function(e,t,n){n(726);var r=n(573);e.exports=r.Object.getOwnPropertySymbols},function(e,t,n){var r=n(576),o=n(585);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(588),o=n(676).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return o(e)}catch(e){return a.slice()}}(e):o(r(e))}},function(e,t,n){"use strict";var r=n(679),o=n(627);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){e.exports=n(818)},function(e,t,n){var r=n(732);e.exports=r},function(e,t,n){n(820);var r=n(586);e.exports=r("Array").filter},function(e,t,n){"use strict";var r=n(572),o=n(602).filter;r({target:"Array",proto:!0,forced:!n(628)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(822);e.exports=r},function(e,t,n){n(823);var r=n(573).Object,o=e.exports=function(e,t){return r.getOwnPropertyDescriptor(e,t)};r.getOwnPropertyDescriptor.sham&&(o.sham=!0)},function(e,t,n){var r=n(572),o=n(574),i=n(588),a=n(608).f,s=n(580),l=o((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){e.exports=n(825)},function(e,t,n){var r=n(826);e.exports=r},function(e,t,n){n(612);var r=n(830),o=n(627),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.forEach;return e===i||e instanceof Array&&t===i.forEach||a.hasOwnProperty(o(e))?r:t}},function(e,t,n){"use strict";var r=n(736).IteratorPrototype,o=n(625),i=n(609),a=n(611),s=n(613),l=function(){return this};e.exports=function(e,t,n){var c=t+" Iterator";return e.prototype=o(r,{next:i(1,n)}),a(e,c,!1,!0),s[c]=l,e}},function(e,t,n){var r=n(578);e.exports=function(e){if(!r(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t){e.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},function(e,t,n){var r=n(831);e.exports=r},function(e,t,n){n(832);var r=n(586);e.exports=r("Array").forEach},function(e,t,n){"use strict";var r=n(572),o=n(833);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){"use strict";var r=n(602).forEach,o=n(738)("forEach");e.exports=o?[].forEach:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}},function(e,t,n){e.exports=n(835)},function(e,t,n){var r=n(836);e.exports=r},function(e,t,n){n(837);var r=n(573);e.exports=r.Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(572),o=n(580),i=n(838),a=n(588),s=n(608),l=n(630);r({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(e){for(var t,n,r=a(e),o=s.f,c=i(r),u={},f=0;c.length>f;)void 0!==(n=o(r,t=c[f++]))&&l(u,t,n);return u}})},function(e,t,n){var r=n(591),o=n(676),i=n(677),a=n(581);e.exports=r("Reflect","ownKeys")||function(e){var t=o.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){e.exports=n(840)},function(e,t,n){var r=n(841);e.exports=r},function(e,t,n){n(842);var r=n(573).Object,o=e.exports=function(e,t){return r.defineProperties(e,t)};r.defineProperties.sham&&(o.sham=!0)},function(e,t,n){var r=n(572),o=n(580);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(728)})},function(e,t,n){var r=n(844);e.exports=r},function(e,t,n){n(845);var r=n(573).Object,o=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(o.sham=!0)},function(e,t,n){var r=n(572),o=n(580);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(590).f})},function(e,t,n){var r=n(649),o=n(849),i=n(593),a=n(743),s=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,f=c.hasOwnProperty,p=RegExp("^"+u.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?p:s).test(a(e))}},function(e,t,n){var r=n(614),o=Object.prototype,i=o.hasOwnProperty,a=o.toString,s=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,s),n=e[s];try{e[s]=void 0;var r=!0}catch(e){}var o=a.call(e);return r&&(t?e[s]=n:delete e[s]),o}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r,o=n(850),i=(r=/[^.]+$/.exec(o&&o.keys&&o.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},function(e,t,n){var r=n(592)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(853),o=n(858);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(a=e.length>3&&"function"==typeof a?(i--,a):void 0,s&&o(n[0],n[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var l=n[r];l&&e(t,l,r,a)}return t}))}},function(e,t,n){var r=n(684),o=n(744),i=n(745);e.exports=function(e,t){return i(o(e,t,r),e+"")}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t,n){var r=n(856),o=n(741),i=n(684),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(650),o=n(615),i=n(651),a=n(593);e.exports=function(e,t,n){if(!a(n))return!1;var s=typeof t;return!!("number"==s?o(n)&&i(t,n.length):"string"==s&&t in n)&&r(n[t],e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(604),o=n(595);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(604),o=n(685),i=n(595),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!a[r(e)]}},function(e,t,n){var r=n(748)(Object.keys,Object);e.exports=r},function(e,t){e.exports=function(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}},function(e,t,n){var r=n(867);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){var r=n(868),o=n(593),i=n(654),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=s.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):a.test(e)?NaN:+e}},function(e,t,n){var r=n(869),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},function(e,t){var n=/\s/;e.exports=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}},function(e,t,n){var r=n(871);n(888),n(889),n(890),n(891),n(892),n(893),n(894),e.exports=r},function(e,t,n){n(753),n(690),n(726),n(872),n(873),n(874),n(875),n(754),n(876),n(877),n(878),n(879),n(880),n(881),n(882),n(883),n(884),n(885),n(886),n(887);var r=n(573);e.exports=r.Symbol},function(e,t,n){n(575)("asyncIterator")},function(e,t){},function(e,t,n){n(575)("hasInstance")},function(e,t,n){n(575)("isConcatSpreadable")},function(e,t,n){n(575)("match")},function(e,t,n){n(575)("matchAll")},function(e,t,n){n(575)("replace")},function(e,t,n){n(575)("search")},function(e,t,n){n(575)("species")},function(e,t,n){n(575)("split")},function(e,t,n){n(575)("toPrimitive")},function(e,t,n){n(575)("toStringTag")},function(e,t,n){n(575)("unscopables")},function(e,t,n){var r=n(576);n(611)(r.JSON,"JSON",!0)},function(e,t){},function(e,t){},function(e,t,n){n(575)("asyncDispose")},function(e,t,n){n(575)("dispose")},function(e,t,n){n(575)("matcher")},function(e,t,n){n(575)("metadata")},function(e,t,n){n(575)("observable")},function(e,t,n){n(575)("patternMatch")},function(e,t,n){n(575)("replaceAll")},function(e,t,n){n(612),n(656);var r=n(692);e.exports=r},function(e,t,n){var r=n(643),o=n(641),i=function(e){return function(t,n){var i,a,s=String(o(t)),l=r(n),c=s.length;return l<0||l>=c?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){var r=n(898);e.exports=r},function(e,t,n){n(899);var r=n(573);e.exports=r.Array.isArray},function(e,t,n){n(572)({target:"Array",stat:!0},{isArray:n(624)})},function(e,t,n){e.exports=n(901)},function(e,t,n){var r=n(755);e.exports=r},function(e,t,n){n(903);var r=n(586);e.exports=r("Array").slice},function(e,t,n){"use strict";var r=n(572),o=n(578),i=n(624),a=n(670),s=n(600),l=n(588),c=n(630),u=n(577),f=n(628)("slice"),p=u("species"),d=[].slice,h=Math.max;r({target:"Array",proto:!0,forced:!f},{slice:function(e,t){var n,r,u,f=l(this),v=s(f.length),g=a(e,v),m=a(void 0===t?v:t,v);if(i(f)&&("function"!=typeof(n=f.constructor)||n!==Array&&!i(n.prototype)?o(n)&&null===(n=n[p])&&(n=void 0):n=void 0,n===Array||void 0===n))return d.call(f,g,m);for(r=new(void 0===n?Array:n)(h(m-g,0)),u=0;g<m;g++,u++)g in f&&c(r,u,f[g]);return r.length=u,r}})},function(e,t,n){var r=n(757);e.exports=r},function(e,t,n){var r=n(572),o=n(906);r({target:"Array",stat:!0,forced:!n(760)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(621),o=n(589),i=n(907),a=n(759),s=n(600),l=n(630),c=n(692);e.exports=function(e){var t,n,u,f,p,d,h=o(e),v="function"==typeof this?this:Array,g=arguments.length,m=g>1?arguments[1]:void 0,y=void 0!==m,b=c(h),x=0;if(y&&(m=r(m,g>2?arguments[2]:void 0,2)),null==b||v==Array&&a(b))for(n=new v(t=s(h.length));t>x;x++)d=y?m(h[x],x):h[x],l(n,x,d);else for(p=(f=b.call(h)).next,n=new v;!(u=p.call(f)).done;x++)d=y?i(f,m,[u.value,x],!0):u.value,l(n,x,d);return n.length=x,n}},function(e,t,n){var r=n(581),o=n(758);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){throw o(e),t}}},function(e,t,n){e.exports=n(909)},function(e,t,n){var r=n(910);e.exports=r},function(e,t,n){n(754),n(656),n(612);var r=n(678);e.exports=r.f("iterator")},function(e,t,n){var r=n(693);e.exports=function(e){if(r(e))return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(655),o=n(691);e.exports=function(e,t){var n=e&&(void 0!==r&&o(e)||e["@@iterator"]);if(null!=n){var i,a,s=[],l=!0,c=!1;try{for(n=n.call(e);!(l=(i=n.next()).done)&&(s.push(i.value),!t||s.length!==t);l=!0);}catch(e){c=!0,a=e}finally{try{l||null==n.return||n.return()}finally{if(c)throw a}}return s}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(915)},function(e,t,n){var r=n(762);n(923),n(924),n(925),n(926),e.exports=r},function(e,t,n){"use strict";var r,o,i,a,s=n(572),l=n(610),c=n(576),u=n(591),f=n(764),p=n(626),d=n(696),h=n(647),v=n(611),g=n(917),m=n(578),y=n(598),b=n(697),x=n(731),w=n(617),C=n(760),A=n(765),k=n(766).set,O=n(918),S=n(768),E=n(920),j=n(634),T=n(657),M=n(601),P=n(723),I=n(577),F=n(921),L=n(698),N=n(644),_=I("species"),D="Promise",R=M.get,V=M.set,B=M.getterFor(D),U=f&&f.prototype,W=f,z=U,H=c.TypeError,q=c.document,G=c.process,$=j.f,K=$,J=!!(q&&q.createEvent&&c.dispatchEvent),Y="function"==typeof PromiseRejectionEvent,X=!1,Q=P(D,(function(){var e=x(W)!==String(W);if(!e&&66===N)return!0;if(l&&!z.finally)return!0;if(N>=51&&/native code/.test(W))return!1;var t=new W((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(t.constructor={})[_]=n,!(X=t.then((function(){}))instanceof n)||!e&&F&&!Y})),Z=Q||!C((function(e){W.all(e).catch((function(){}))})),ee=function(e){var t;return!(!m(e)||"function"!=typeof(t=e.then))&&t},te=function(e,t){if(!e.notified){e.notified=!0;var n=e.reactions;O((function(){for(var r=e.value,o=1==e.state,i=0;n.length>i;){var a,s,l,c=n[i++],u=o?c.ok:c.fail,f=c.resolve,p=c.reject,d=c.domain;try{u?(o||(2===e.rejection&&ie(e),e.rejection=1),!0===u?a=r:(d&&d.enter(),a=u(r),d&&(d.exit(),l=!0)),a===c.promise?p(H("Promise-chain cycle")):(s=ee(a))?s.call(a,f,p):f(a)):p(r)}catch(e){d&&!l&&d.exit(),p(e)}}e.reactions=[],e.notified=!1,t&&!e.rejection&&re(e)}))}},ne=function(e,t,n){var r,o;J?((r=q.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},!Y&&(o=c["on"+e])?o(r):"unhandledrejection"===e&&E("Unhandled promise rejection",n)},re=function(e){k.call(c,(function(){var t,n=e.facade,r=e.value;if(oe(e)&&(t=T((function(){L?G.emit("unhandledRejection",r,n):ne("unhandledrejection",n,r)})),e.rejection=L||oe(e)?2:1,t.error))throw t.value}))},oe=function(e){return 1!==e.rejection&&!e.parent},ie=function(e){k.call(c,(function(){var t=e.facade;L?G.emit("rejectionHandled",t):ne("rejectionhandled",t,e.value)}))},ae=function(e,t,n){return function(r){e(t,r,n)}},se=function(e,t,n){e.done||(e.done=!0,n&&(e=n),e.value=t,e.state=2,te(e,!0))},le=function(e,t,n){if(!e.done){e.done=!0,n&&(e=n);try{if(e.facade===t)throw H("Promise can't be resolved itself");var r=ee(t);r?O((function(){var n={done:!1};try{r.call(t,ae(le,n,e),ae(se,n,e))}catch(t){se(n,t,e)}})):(e.value=t,e.state=1,te(e,!1))}catch(t){se({done:!1},t,e)}}};if(Q&&(z=(W=function(e){b(this,W,D),y(e),r.call(this);var t=R(this);try{e(ae(le,t),ae(se,t))}catch(e){se(t,e)}}).prototype,(r=function(e){V(this,{type:D,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(z,{then:function(e,t){var n=B(this),r=$(A(this,W));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=L?G.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&te(n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r,t=R(e);this.promise=e,this.resolve=ae(le,t),this.reject=ae(se,t)},j.f=$=function(e){return e===W||e===i?new o(e):K(e)},!l&&"function"==typeof f&&U!==Object.prototype)){a=U.then,X||(p(U,"then",(function(e,t){var n=this;return new W((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),p(U,"catch",z.catch,{unsafe:!0}));try{delete U.constructor}catch(e){}h&&h(U,z)}s({global:!0,wrap:!0,forced:Q},{Promise:W}),v(W,D,!1,!0),g(D),i=u(D),s({target:D,stat:!0,forced:Q},{reject:function(e){var t=$(this);return t.reject.call(void 0,e),t.promise}}),s({target:D,stat:!0,forced:l||Q},{resolve:function(e){return S(l&&this===i?W:this,e)}}),s({target:D,stat:!0,forced:Z},{all:function(e){var t=this,n=$(t),r=n.resolve,o=n.reject,i=T((function(){var n=y(t.resolve),i=[],a=0,s=1;w(e,(function(e){var l=a++,c=!1;i.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,i[l]=e,--s||r(i))}),o)})),--s||r(i)}));return i.error&&o(i.value),n.promise},race:function(e){var t=this,n=$(t),r=n.reject,o=T((function(){var o=y(t.resolve);w(e,(function(e){o.call(t,e).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}})},function(e,t,n){"use strict";var r=n(591),o=n(590),i=n(577),a=n(580),s=i("species");e.exports=function(e){var t=r(e),n=o.f;a&&t&&!t[s]&&n(t,s,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r,o,i,a,s,l,c,u,f=n(576),p=n(608).f,d=n(766).set,h=n(767),v=n(919),g=n(698),m=f.MutationObserver||f.WebKitMutationObserver,y=f.document,b=f.process,x=f.Promise,w=p(f,"queueMicrotask"),C=w&&w.value;C||(r=function(){var e,t;for(g&&(e=b.domain)&&e.exit();o;){t=o.fn,o=o.next;try{t()}catch(e){throw o?a():i=void 0,e}}i=void 0,e&&e.enter()},h||g||v||!m||!y?x&&x.resolve?((c=x.resolve(void 0)).constructor=x,u=c.then,a=function(){u.call(c,r)}):a=g?function(){b.nextTick(r)}:function(){d.call(f,r)}:(s=!0,l=y.createTextNode(""),new m(r).observe(l,{characterData:!0}),a=function(){l.data=s=!s})),e.exports=C||function(e){var t={fn:e,next:void 0};i&&(i.next=t),o||(o=t,a()),i=t}},function(e,t,n){var r=n(673);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(576);e.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t){e.exports="object"==typeof window},function(e,t,n){"use strict";var r=n(572),o=n(610),i=n(764),a=n(574),s=n(591),l=n(765),c=n(768),u=n(626);if(r({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=l(this,s("Promise")),n="function"==typeof e;return this.then(n?function(n){return c(t,e()).then((function(){return n}))}:e,n?function(n){return c(t,e()).then((function(){throw n}))}:e)}}),!o&&"function"==typeof i){var f=s("Promise").prototype.finally;i.prototype.finally!==f&&u(i.prototype,"finally",f,{unsafe:!0})}},function(e,t,n){n(763)},function(e,t,n){n(769)},function(e,t,n){"use strict";var r=n(572),o=n(634),i=n(657);r({target:"Promise",stat:!0},{try:function(e){var t=o.f(this),n=i(e);return(n.error?t.reject:t.resolve)(n.value),t.promise}})},function(e,t,n){n(770)},function(e,t,n){var r=function(e){"use strict";var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof f?t:f,i=Object.create(o.prototype),a=new A(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var u={};function f(){}function p(){}function d(){}var h={};h[o]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(k([])));g&&g!==t&&n.call(g,o)&&(h=g);var m=d.prototype=f.prototype=Object.create(h);function y(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){var r;this._invoke=function(o,i){function a(){return new t((function(r,a){!function r(o,i,a,s){var l=c(e[o],e,i);if("throw"!==l.type){var u=l.arg,f=u.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return r("throw",e,a,s)}))}s(l.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:O}}function O(){return{value:void 0,done:!0}}return p.prototype=m.constructor=d,d.constructor=p,p.displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},y(b.prototype),b.prototype[i]=function(){return this},e.AsyncIterator=b,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new b(l(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},y(m),s(m,a,"Generator"),m[o]=function(){return this},m.toString=function(){return"[object Generator]"},e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=k,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},e}(e.exports);try{regeneratorRuntime=r}catch(e){Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){var r=n(929);e.exports=r},function(e,t,n){var r=n(930),o=n(932),i=Array.prototype,a=String.prototype;e.exports=function(e){var t=e.includes;return e===i||e instanceof Array&&t===i.includes?r:"string"==typeof e||e===a||e instanceof String&&t===a.includes?o:t}},function(e,t,n){n(931);var r=n(586);e.exports=r("Array").includes},function(e,t,n){"use strict";var r=n(572),o=n(669).includes,i=n(681);r({target:"Array",proto:!0},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("includes")},function(e,t,n){n(933);var r=n(586);e.exports=r("String").includes},function(e,t,n){"use strict";var r=n(572),o=n(934),i=n(641);r({target:"String",proto:!0,forced:!n(936)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(o(e),arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(935);e.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){var r=n(578),o=n(620),i=n(577)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(577)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},function(e,t,n){e.exports=n(938)},function(e,t,n){n(612);var r=n(939),o=n(627),i=Array.prototype,a={DOMTokenList:!0,NodeList:!0};e.exports=function(e){var t=e.entries;return e===i||e instanceof Array&&t===i.entries||a.hasOwnProperty(o(e))?r:t}},function(e,t,n){var r=n(940);e.exports=r},function(e,t,n){n(734);var r=n(586);e.exports=r("Array").entries},function(e,t,n){e.exports=n(942)},function(e,t,n){var r=n(757);e.exports=r},function(e,t,n){var r=n(944);e.exports=r},function(e,t,n){n(945);var r=n(573);r.JSON||(r.JSON={stringify:JSON.stringify}),e.exports=function(e,t,n){return r.JSON.stringify.apply(null,arguments)}},function(e,t,n){var r=n(572),o=n(591),i=n(574),a=o("JSON","stringify"),s=/[\uD800-\uDFFF]/g,l=/^[\uD800-\uDBFF]$/,c=/^[\uDC00-\uDFFF]$/,u=function(e,t,n){var r=n.charAt(t-1),o=n.charAt(t+1);return l.test(e)&&!c.test(o)||c.test(e)&&!l.test(r)?"\\u"+e.charCodeAt(0).toString(16):e},f=i((function(){return'"\\udf06\\ud834"'!==a("\udf06\ud834")||'"\\udead"'!==a("\udead")}));a&&r({target:"JSON",stat:!0,forced:f},{stringify:function(e,t,n){var r=a.apply(null,arguments);return"string"==typeof r?r.replace(s,u):r}})},function(e,t,n){var r=n(947);e.exports=r},function(e,t,n){var r=n(948),o=Array.prototype;e.exports=function(e){var t=e.map;return e===o||e instanceof Array&&t===o.map?r:t}},function(e,t,n){n(949);var r=n(586);e.exports=r("Array").map},function(e,t,n){"use strict";var r=n(572),o=n(602).map;r({target:"Array",proto:!0,forced:!n(628)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(721);e.exports=r},function(e,t,n){var r=n(952);e.exports=r},function(e,t,n){var r=n(953),o=Array.prototype;e.exports=function(e){var t=e.concat;return e===o||e instanceof Array&&t===o.concat?r:t}},function(e,t,n){n(753);var r=n(586);e.exports=r("Array").concat},function(e,t,n){var r=n(955);e.exports=r},function(e,t,n){n(956);var r=n(573);e.exports=r.Object.entries},function(e,t,n){var r=n(572),o=n(957).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},function(e,t,n){var r=n(580),o=n(622),i=n(588),a=n(640).f,s=function(e){return function(t){for(var n,s=i(t),l=o(s),c=l.length,u=0,f=[];c>u;)n=l[u++],r&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}};e.exports={entries:s(!0),values:s(!1)}},function(e,t,n){var r=n(732);e.exports=r},function(e,t){!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),i="FormData"in e,a="ArrayBuffer"in e;if(a)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],l=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function c(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function u(e){return"string"!=typeof e&&(e=String(e)),e}function f(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function p(e){this.map={},e instanceof p?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function d(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function h(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function v(e){var t=new FileReader,n=h(t);return t.readAsArrayBuffer(e),n}function g(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function m(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:i&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():a&&o&&((t=e)&&DataView.prototype.isPrototypeOf(t))?(this._bodyArrayBuffer=g(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):a&&(ArrayBuffer.prototype.isPrototypeOf(e)||l(e))?this._bodyArrayBuffer=g(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=d(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(v)}),this.text=function(){var e,t,n,r=d(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=h(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),r=0;r<t.length;r++)n[r]=String.fromCharCode(t[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},i&&(this.formData=function(){return this.text().then(x)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(e,t){e=c(e),t=u(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},p.prototype.delete=function(e){delete this.map[c(e)]},p.prototype.get=function(e){return e=c(e),this.has(e)?this.map[e]:null},p.prototype.has=function(e){return this.map.hasOwnProperty(c(e))},p.prototype.set=function(e,t){this.map[c(e)]=u(t)},p.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},p.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),f(e)},p.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),f(e)},p.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),f(e)},r&&(p.prototype[Symbol.iterator]=p.prototype.entries);var y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function b(e,t){var n,r,o=(t=t||{}).body;if(e instanceof b){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new p(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new p(t.headers)),this.method=(n=t.method||this.method||"GET",r=n.toUpperCase(),y.indexOf(r)>-1?r:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function x(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}})),t}function w(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new p(t.headers),this.url=t.url||"",this._initBody(e)}b.prototype.clone=function(){return new b(this,{body:this._bodyInit})},m.call(b.prototype),m.call(w.prototype),w.prototype.clone=function(){return new w(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},w.error=function(){var e=new w(null,{status:0,statusText:""});return e.type="error",e};var C=[301,302,303,307,308];w.redirect=function(e,t){if(-1===C.indexOf(t))throw new RangeError("Invalid status code");return new w(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function A(e,n){return new Promise((function(r,i){var a=new b(e,n);if(a.signal&&a.signal.aborted)return i(new t.DOMException("Aborted","AbortError"));var s=new XMLHttpRequest;function l(){s.abort()}s.onload=function(){var e,t,n={status:s.status,statusText:s.statusText,headers:(e=s.getAllResponseHeaders()||"",t=new p,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}})),t)};n.url="responseURL"in s?s.responseURL:n.headers.get("X-Request-URL");var o="response"in s?s.response:s.responseText;r(new w(o,n))},s.onerror=function(){i(new TypeError("Network request failed"))},s.ontimeout=function(){i(new TypeError("Network request failed"))},s.onabort=function(){i(new t.DOMException("Aborted","AbortError"))},s.open(a.method,a.url,!0),"include"===a.credentials?s.withCredentials=!0:"omit"===a.credentials&&(s.withCredentials=!1),"responseType"in s&&o&&(s.responseType="blob"),a.headers.forEach((function(e,t){s.setRequestHeader(t,e)})),a.signal&&(a.signal.addEventListener("abort",l),s.onreadystatechange=function(){4===s.readyState&&a.signal.removeEventListener("abort",l)}),s.send(void 0===a._bodyInit?null:a._bodyInit)}))}A.polyfill=!0,e.fetch||(e.fetch=A,e.Headers=p,e.Request=b,e.Response=w),t.Headers=p,t.Request=b,t.Response=w,t.fetch=A,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";var r=n(961),o=n(971),i=n(703);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";var r=n(962),o=n(772),i=n(703),a=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},l=Array.isArray,c=Array.prototype.push,u=function(e,t){c.apply(e,l(t)?t:[t])},f=Date.prototype.toISOString,p=i.default,d={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:p,formatter:i.formatters[p],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1},h=function e(t,n,i,a,s,c,f,p,h,v,g,m,y,b,x){var w,C=t;if(x.has(t))throw new RangeError("Cyclic object value");if("function"==typeof f?C=f(n,C):C instanceof Date?C=v(C):"comma"===i&&l(C)&&(C=o.maybeMap(C,(function(e){return e instanceof Date?v(e):e}))),null===C){if(a)return c&&!y?c(n,d.encoder,b,"key",g):n;C=""}if("string"==typeof(w=C)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||o.isBuffer(C))return c?[m(y?n:c(n,d.encoder,b,"key",g))+"="+m(c(C,d.encoder,b,"value",g))]:[m(n)+"="+m(String(C))];var A,k=[];if(void 0===C)return k;if("comma"===i&&l(C))A=[{value:C.length>0?C.join(",")||null:void 0}];else if(l(f))A=f;else{var O=Object.keys(C);A=p?O.sort(p):O}for(var S=0;S<A.length;++S){var E=A[S],j="object"==typeof E&&void 0!==E.value?E.value:C[E];if(!s||null!==j){var T=l(C)?"function"==typeof i?i(n,E):n:n+(h?"."+E:"["+E+"]");x.set(t,!0);var M=r();u(k,e(j,T,i,a,s,c,f,p,h,v,g,m,y,b,M))}}return k};e.exports=function(e,t){var n,o=e,c=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=i.default;if(void 0!==e.format){if(!a.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");n=e.format}var r=i.formatters[n],o=d.filter;return("function"==typeof e.filter||l(e.filter))&&(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:d.addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:d.charsetSentinel,delimiter:void 0===e.delimiter?d.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:d.encode,encoder:"function"==typeof e.encoder?e.encoder:d.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:d.encodeValuesOnly,filter:o,format:n,formatter:r,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:d.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:d.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:d.strictNullHandling}}(t);"function"==typeof c.filter?o=(0,c.filter)("",o):l(c.filter)&&(n=c.filter);var f,p=[];if("object"!=typeof o||null===o)return"";f=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t?t.indices?"indices":"repeat":"indices";var v=s[f];n||(n=Object.keys(o)),c.sort&&n.sort(c.sort);for(var g=r(),m=0;m<n.length;++m){var y=n[m];c.skipNulls&&null===o[y]||u(p,h(o[y],y,v,c.strictNullHandling,c.skipNulls,c.encode?c.encoder:null,c.filter,c.sort,c.allowDots,c.serializeDate,c.format,c.formatter,c.encodeValuesOnly,c.charset,g))}var b=p.join(c.delimiter),x=!0===c.addQueryPrefix?"?":"";return c.charsetSentinel&&("iso-8859-1"===c.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),b.length>0?x+b:""}},function(e,t,n){"use strict";var r=n(701),o=n(967),i=n(969),a=r("%TypeError%"),s=r("%WeakMap%",!0),l=r("%Map%",!0),c=o("WeakMap.prototype.get",!0),u=o("WeakMap.prototype.set",!0),f=o("WeakMap.prototype.has",!0),p=o("Map.prototype.get",!0),d=o("Map.prototype.set",!0),h=o("Map.prototype.has",!0),v=function(e,t){for(var n,r=e;null!==(n=r.next);r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n};e.exports=function(){var e,t,n,r={assert:function(e){if(!r.has(e))throw new a("Side channel does not contain "+i(e))},get:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return c(e,r)}else if(l){if(t)return p(t,r)}else if(n)return function(e,t){var n=v(e,t);return n&&n.value}(n,r)},has:function(r){if(s&&r&&("object"==typeof r||"function"==typeof r)){if(e)return f(e,r)}else if(l){if(t)return h(t,r)}else if(n)return function(e,t){return!!v(e,t)}(n,r);return!1},set:function(r,o){s&&r&&("object"==typeof r||"function"==typeof r)?(e||(e=new s),u(e,r,o)):l?(t||(t=new l),d(t,r,o)):(n||(n={key:{},next:null}),function(e,t,n){var r=v(e,t);r?r.value=n:e.next={key:t,next:e.next,value:n}}(n,r,o))}};return r}},function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,o=n(964);e.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},function(e,t,n){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var r=Object.getOwnPropertySymbols(e);if(1!==r.length||r[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},function(e,t,n){"use strict";var r="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,i=Object.prototype.toString;e.exports=function(e){var t=this;if("function"!=typeof t||"[object Function]"!==i.call(t))throw new TypeError(r+t);for(var n,a=o.call(arguments,1),s=function(){if(this instanceof n){var r=t.apply(this,a.concat(o.call(arguments)));return Object(r)===r?r:this}return t.apply(e,a.concat(o.call(arguments)))},l=Math.max(0,t.length-a.length),c=[],u=0;u<l;u++)c.push("$"+u);if(n=Function("binder","return function ("+c.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var f=function(){};f.prototype=t.prototype,n.prototype=new f,f.prototype=null}return n}},function(e,t,n){"use strict";var r=n(702);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r=n(701),o=n(968),i=o(r("String.prototype.indexOf"));e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?o(n):n}},function(e,t,n){"use strict";var r=n(702),o=n(701),i=o("%Function.prototype.apply%"),a=o("%Function.prototype.call%"),s=o("%Reflect.apply%",!0)||r.call(a,i),l=o("%Object.getOwnPropertyDescriptor%",!0),c=o("%Object.defineProperty%",!0),u=o("%Math.max%");if(c)try{c({},"a",{value:1})}catch(e){c=null}e.exports=function(e){var t=s(r,a,arguments);if(l&&c){var n=l(t,"length");n.configurable&&c(t,"length",{value:1+u(0,e.length-(arguments.length-1))})}return t};var f=function(){return s(r,i,arguments)};c?c(e.exports,"apply",{value:f}):e.exports.apply=f},function(e,t,n){var r="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=r&&o&&"function"==typeof o.get?o.get:null,a=r&&Map.prototype.forEach,s="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&s?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=s&&l&&"function"==typeof l.get?l.get:null,u=s&&Set.prototype.forEach,f="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,p="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,d="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,h=Boolean.prototype.valueOf,v=Object.prototype.toString,g=Function.prototype.toString,m=String.prototype.match,y="function"==typeof BigInt?BigInt.prototype.valueOf:null,b=Object.getOwnPropertySymbols,x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,w="function"==typeof Symbol&&"object"==typeof Symbol.iterator,C=Object.prototype.propertyIsEnumerable,A=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),k=n(970).custom,O=k&&M(k)?k:null,S="function"==typeof Symbol&&void 0!==Symbol.toStringTag?Symbol.toStringTag:null;function E(e,t,n){var r="double"===(n.quoteStyle||t)?'"':"'";return r+e+r}function j(e){return String(e).replace(/"/g,"&quot;")}function T(e){return!("[object Array]"!==F(e)||S&&"object"==typeof e&&S in e)}function M(e){if(w)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return!0;if(!e||"object"!=typeof e||!x)return!1;try{return x.call(e),!0}catch(e){}return!1}e.exports=function e(t,n,r,o){var s=n||{};if(I(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(I(s,"maxStringLength")&&("number"==typeof s.maxStringLength?s.maxStringLength<0&&s.maxStringLength!==1/0:null!==s.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var l=!I(s,"customInspect")||s.customInspect;if("boolean"!=typeof l)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(I(s,"indent")&&null!==s.indent&&"\t"!==s.indent&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,n){if(t.length>n.maxStringLength){var r=t.length-n.maxStringLength,o="... "+r+" more character"+(r>1?"s":"");return e(t.slice(0,n.maxStringLength),n)+o}return E(t.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,N),"single",n)}(t,s);if("number"==typeof t)return 0===t?1/0/t>0?"0":"-0":String(t);if("bigint"==typeof t)return String(t)+"n";var v=void 0===s.depth?5:s.depth;if(void 0===r&&(r=0),r>=v&&v>0&&"object"==typeof t)return T(t)?"[Array]":"[Object]";var b=function(e,t){var n;if("\t"===e.indent)n="\t";else{if(!("number"==typeof e.indent&&e.indent>0))return null;n=Array(e.indent+1).join(" ")}return{base:n,prev:Array(t+1).join(n)}}(s,r);if(void 0===o)o=[];else if(L(o,t)>=0)return"[Circular]";function C(t,n,i){if(n&&(o=o.slice()).push(n),i){var a={depth:s.depth};return I(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if("function"==typeof t){var k=function(e){if(e.name)return e.name;var t=m.call(g.call(e),/^function\s*([\w$]+)/);if(t)return t[1];return null}(t),P=B(t,C);return"[Function"+(k?": "+k:" (anonymous)")+"]"+(P.length>0?" { "+P.join(", ")+" }":"")}if(M(t)){var U=w?String(t).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):x.call(t);return"object"!=typeof t||w?U:_(U)}if(function(e){if(!e||"object"!=typeof e)return!1;if("undefined"!=typeof HTMLElement&&e instanceof HTMLElement)return!0;return"string"==typeof e.nodeName&&"function"==typeof e.getAttribute}(t)){for(var W="<"+String(t.nodeName).toLowerCase(),z=t.attributes||[],H=0;H<z.length;H++)W+=" "+z[H].name+"="+E(j(z[H].value),"double",s);return W+=">",t.childNodes&&t.childNodes.length&&(W+="..."),W+="</"+String(t.nodeName).toLowerCase()+">"}if(T(t)){if(0===t.length)return"[]";var q=B(t,C);return b&&!function(e){for(var t=0;t<e.length;t++)if(L(e[t],"\n")>=0)return!1;return!0}(q)?"["+V(q,b)+"]":"[ "+q.join(", ")+" ]"}if(function(e){return!("[object Error]"!==F(e)||S&&"object"==typeof e&&S in e)}(t)){var G=B(t,C);return 0===G.length?"["+String(t)+"]":"{ ["+String(t)+"] "+G.join(", ")+" }"}if("object"==typeof t&&l){if(O&&"function"==typeof t[O])return t[O]();if("function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var $=[];return a.call(t,(function(e,n){$.push(C(n,t,!0)+" => "+C(e,t))})),R("Map",i.call(t),$,b)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var K=[];return u.call(t,(function(e){K.push(C(e,t))})),R("Set",c.call(t),K,b)}if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{p.call(e,p)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return D("WeakMap");if(function(e){if(!p||!e||"object"!=typeof e)return!1;try{p.call(e,p);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return D("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return D("WeakRef");if(function(e){return!("[object Number]"!==F(e)||S&&"object"==typeof e&&S in e)}(t))return _(C(Number(t)));if(function(e){if(!e||"object"!=typeof e||!y)return!1;try{return y.call(e),!0}catch(e){}return!1}(t))return _(C(y.call(t)));if(function(e){return!("[object Boolean]"!==F(e)||S&&"object"==typeof e&&S in e)}(t))return _(h.call(t));if(function(e){return!("[object String]"!==F(e)||S&&"object"==typeof e&&S in e)}(t))return _(C(String(t)));if(!function(e){return!("[object Date]"!==F(e)||S&&"object"==typeof e&&S in e)}(t)&&!function(e){return!("[object RegExp]"!==F(e)||S&&"object"==typeof e&&S in e)}(t)){var J=B(t,C),Y=A?A(t)===Object.prototype:t instanceof Object||t.constructor===Object,X=t instanceof Object?"":"null prototype",Q=!Y&&S&&Object(t)===t&&S in t?F(t).slice(8,-1):X?"Object":"",Z=(Y||"function"!=typeof t.constructor?"":t.constructor.name?t.constructor.name+" ":"")+(Q||X?"["+[].concat(Q||[],X||[]).join(": ")+"] ":"");return 0===J.length?Z+"{}":b?Z+"{"+V(J,b)+"}":Z+"{ "+J.join(", ")+" }"}return String(t)};var P=Object.prototype.hasOwnProperty||function(e){return e in this};function I(e,t){return P.call(e,t)}function F(e){return v.call(e)}function L(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function N(e){var t=e.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return n?"\\"+n:"\\x"+(t<16?"0":"")+t.toString(16).toUpperCase()}function _(e){return"Object("+e+")"}function D(e){return e+" { ? }"}function R(e,t,n,r){return e+" ("+t+") {"+(r?V(n,r):n.join(", "))+"}"}function V(e,t){if(0===e.length)return"";var n="\n"+t.prev+t.base;return n+e.join(","+n)+"\n"+t.prev}function B(e,t){var n=T(e),r=[];if(n){r.length=e.length;for(var o=0;o<e.length;o++)r[o]=I(e,o)?t(e[o],e):""}var i,a="function"==typeof b?b(e):[];if(w){i={};for(var s=0;s<a.length;s++)i["$"+a[s]]=a[s]}for(var l in e)I(e,l)&&(n&&String(Number(l))===l&&l<e.length||w&&i["$"+l]instanceof Symbol||(/[^\w$]/.test(l)?r.push(t(l,e)+": "+t(e[l],e)):r.push(l+": "+t(e[l],e))));if("function"==typeof b)for(var c=0;c<a.length;c++)C.call(e,a[c])&&r.push("["+t(a[c])+"]: "+t(e[a[c]],e));return r}},function(e,t){},function(e,t,n){"use strict";var r=n(772),o=Object.prototype.hasOwnProperty,i=Array.isArray,a={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},s=function(e){return e.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))},l=function(e,t){return e&&"string"==typeof e&&t.comma&&e.indexOf(",")>-1?e.split(","):e},c=function(e,t,n,r){if(e){var i=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,s=n.depth>0&&/(\[[^[\]]*])/.exec(i),c=s?i.slice(0,s.index):i,u=[];if(c){if(!n.plainObjects&&o.call(Object.prototype,c)&&!n.allowPrototypes)return;u.push(c)}for(var f=0;n.depth>0&&null!==(s=a.exec(i))&&f<n.depth;){if(f+=1,!n.plainObjects&&o.call(Object.prototype,s[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(s[1])}return s&&u.push("["+i.slice(s.index)+"]"),function(e,t,n,r){for(var o=r?t:l(t,n),i=e.length-1;i>=0;--i){var a,s=e[i];if("[]"===s&&n.parseArrays)a=[].concat(o);else{a=n.plainObjects?Object.create(null):{};var c="["===s.charAt(0)&&"]"===s.charAt(s.length-1)?s.slice(1,-1):s,u=parseInt(c,10);n.parseArrays||""!==c?!isNaN(u)&&s!==c&&String(u)===c&&u>=0&&n.parseArrays&&u<=n.arrayLimit?(a=[])[u]=o:a[c]=o:a={0:o}}o=a}return o}(u,t,n,r)}};e.exports=function(e,t){var n=function(e){if(!e)return a;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?a.charset:e.charset;return{allowDots:void 0===e.allowDots?a.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:a.allowPrototypes,allowSparse:"boolean"==typeof e.allowSparse?e.allowSparse:a.allowSparse,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:a.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:a.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:a.comma,decoder:"function"==typeof e.decoder?e.decoder:a.decoder,delimiter:"string"==typeof e.delimiter||r.isRegExp(e.delimiter)?e.delimiter:a.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:a.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:a.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:a.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:a.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:a.strictNullHandling}}(t);if(""===e||null==e)return n.plainObjects?Object.create(null):{};for(var u="string"==typeof e?function(e,t){var n,c={},u=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,f=t.parameterLimit===1/0?void 0:t.parameterLimit,p=u.split(t.delimiter,f),d=-1,h=t.charset;if(t.charsetSentinel)for(n=0;n<p.length;++n)0===p[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===p[n]?h="utf-8":"utf8=%26%2310003%3B"===p[n]&&(h="iso-8859-1"),d=n,n=p.length);for(n=0;n<p.length;++n)if(n!==d){var v,g,m=p[n],y=m.indexOf("]="),b=-1===y?m.indexOf("="):y+1;-1===b?(v=t.decoder(m,a.decoder,h,"key"),g=t.strictNullHandling?null:""):(v=t.decoder(m.slice(0,b),a.decoder,h,"key"),g=r.maybeMap(l(m.slice(b+1),t),(function(e){return t.decoder(e,a.decoder,h,"value")}))),g&&t.interpretNumericEntities&&"iso-8859-1"===h&&(g=s(g)),m.indexOf("[]=")>-1&&(g=i(g)?[g]:g),o.call(c,v)?c[v]=r.combine(c[v],g):c[v]=g}return c}(e,n):e,f=n.plainObjects?Object.create(null):{},p=Object.keys(u),d=0;d<p.length;++d){var h=p[d],v=c(h,u[h],n,"string"==typeof e);f=r.merge(f,v,n)}return!0===n.allowSparse?f:r.compact(f)}},function(e,t,n){"use strict";var r=n(973),o=n(991);function i(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}e.exports.Type=n(579),e.exports.Schema=n(619),e.exports.FAILSAFE_SCHEMA=n(704),e.exports.JSON_SCHEMA=n(775),e.exports.CORE_SCHEMA=n(774),e.exports.DEFAULT_SAFE_SCHEMA=n(636),e.exports.DEFAULT_FULL_SCHEMA=n(659),e.exports.load=r.load,e.exports.loadAll=r.loadAll,e.exports.safeLoad=r.safeLoad,e.exports.safeLoadAll=r.safeLoadAll,e.exports.dump=o.dump,e.exports.safeDump=o.safeDump,e.exports.YAMLException=n(635),e.exports.MINIMAL_SCHEMA=n(704),e.exports.SAFE_SCHEMA=n(636),e.exports.DEFAULT_SCHEMA=n(659),e.exports.scan=i("scan"),e.exports.parse=i("parse"),e.exports.compose=i("compose"),e.exports.addConstructor=i("addConstructor")},function(e,t,n){"use strict";var r=n(618),o=n(635),i=n(974),a=n(636),s=n(659),l=Object.prototype.hasOwnProperty,c=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,u=/[\x85\u2028\u2029]/,f=/[,\[\]\{\}]/,p=/^(?:!|!!|![a-z\-]+!)$/i,d=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function h(e){return Object.prototype.toString.call(e)}function v(e){return 10===e||13===e}function g(e){return 9===e||32===e}function m(e){return 9===e||32===e||10===e||13===e}function y(e){return 44===e||91===e||93===e||123===e||125===e}function b(e){var t;return 48<=e&&e<=57?e-48:97<=(t=32|e)&&t<=102?t-97+10:-1}function x(e){return 48===e?"\0":97===e?"":98===e?"\b":116===e||9===e?"\t":110===e?"\n":118===e?"\v":102===e?"\f":114===e?"\r":101===e?"":32===e?" ":34===e?'"':47===e?"/":92===e?"\\":78===e?"…":95===e?" ":76===e?"\u2028":80===e?"\u2029":""}function w(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}for(var C=new Array(256),A=new Array(256),k=0;k<256;k++)C[k]=x(k)?1:0,A[k]=x(k);function O(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||s,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function S(e,t){return new o(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function E(e,t){throw S(e,t)}function j(e,t){e.onWarning&&e.onWarning.call(null,S(e,t))}var T={YAML:function(e,t,n){var r,o,i;null!==e.version&&E(e,"duplication of %YAML directive"),1!==n.length&&E(e,"YAML directive accepts exactly one argument"),null===(r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&E(e,"ill-formed argument of the YAML directive"),o=parseInt(r[1],10),i=parseInt(r[2],10),1!==o&&E(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&j(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var r,o;2!==n.length&&E(e,"TAG directive accepts exactly two arguments"),r=n[0],o=n[1],p.test(r)||E(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,r)&&E(e,'there is a previously declared suffix for "'+r+'" tag handle'),d.test(o)||E(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[r]=o}};function M(e,t,n,r){var o,i,a,s;if(t<n){if(s=e.input.slice(t,n),r)for(o=0,i=s.length;o<i;o+=1)9===(a=s.charCodeAt(o))||32<=a&&a<=1114111||E(e,"expected valid JSON character");else c.test(s)&&E(e,"the stream contains non-printable characters");e.result+=s}}function P(e,t,n,o){var i,a,s,c;for(r.isObject(n)||E(e,"cannot merge mappings; the provided source object is unacceptable"),s=0,c=(i=Object.keys(n)).length;s<c;s+=1)a=i[s],l.call(t,a)||(t[a]=n[a],o[a]=!0)}function I(e,t,n,r,o,i,a,s){var c,u;if(Array.isArray(o))for(c=0,u=(o=Array.prototype.slice.call(o)).length;c<u;c+=1)Array.isArray(o[c])&&E(e,"nested arrays are not supported inside keys"),"object"==typeof o&&"[object Object]"===h(o[c])&&(o[c]="[object Object]");if("object"==typeof o&&"[object Object]"===h(o)&&(o="[object Object]"),o=String(o),null===t&&(t={}),"tag:yaml.org,2002:merge"===r)if(Array.isArray(i))for(c=0,u=i.length;c<u;c+=1)P(e,t,i[c],n);else P(e,t,i,n);else e.json||l.call(n,o)||!l.call(t,o)||(e.line=a||e.line,e.position=s||e.position,E(e,"duplicated mapping key")),t[o]=i,delete n[o];return t}function F(e){var t;10===(t=e.input.charCodeAt(e.position))?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):E(e,"a line break is expected"),e.line+=1,e.lineStart=e.position}function L(e,t,n){for(var r=0,o=e.input.charCodeAt(e.position);0!==o;){for(;g(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!v(o))break;for(F(e),o=e.input.charCodeAt(e.position),r++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==r&&e.lineIndent<n&&j(e,"deficient indentation"),r}function N(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||t!==e.input.charCodeAt(n+1)||t!==e.input.charCodeAt(n+2)||(n+=3,0!==(t=e.input.charCodeAt(n))&&!m(t)))}function _(e,t){1===t?e.result+=" ":t>1&&(e.result+=r.repeat("\n",t-1))}function D(e,t){var n,r,o=e.tag,i=e.anchor,a=[],s=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),r=e.input.charCodeAt(e.position);0!==r&&45===r&&m(e.input.charCodeAt(e.position+1));)if(s=!0,e.position++,L(e,!0,-1)&&e.lineIndent<=t)a.push(null),r=e.input.charCodeAt(e.position);else if(n=e.line,B(e,t,3,!1,!0),a.push(e.result),L(e,!0,-1),r=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==r)E(e,"bad indentation of a sequence entry");else if(e.lineIndent<t)break;return!!s&&(e.tag=o,e.anchor=i,e.kind="sequence",e.result=a,!0)}function R(e){var t,n,r,o,i=!1,a=!1;if(33!==(o=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&E(e,"duplication of a tag property"),60===(o=e.input.charCodeAt(++e.position))?(i=!0,o=e.input.charCodeAt(++e.position)):33===o?(a=!0,n="!!",o=e.input.charCodeAt(++e.position)):n="!",t=e.position,i){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&62!==o);e.position<e.length?(r=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):E(e,"unexpected end of the stream within a verbatim tag")}else{for(;0!==o&&!m(o);)33===o&&(a?E(e,"tag suffix cannot contain exclamation marks"):(n=e.input.slice(t-1,e.position+1),p.test(n)||E(e,"named tag handle cannot contain such characters"),a=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),f.test(r)&&E(e,"tag suffix cannot contain flow indicator characters")}return r&&!d.test(r)&&E(e,"tag name cannot contain such characters: "+r),i?e.tag=r:l.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:"!"===n?e.tag="!"+r:"!!"===n?e.tag="tag:yaml.org,2002:"+r:E(e,'undeclared tag handle "'+n+'"'),!0}function V(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&E(e,"duplication of an anchor property"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!m(n)&&!y(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&E(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(t,e.position),!0}function B(e,t,n,o,i){var a,s,c,u,f,p,d,h,x=1,k=!1,O=!1;if(null!==e.listener&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=s=c=4===n||3===n,o&&L(e,!0,-1)&&(k=!0,e.lineIndent>t?x=1:e.lineIndent===t?x=0:e.lineIndent<t&&(x=-1)),1===x)for(;R(e)||V(e);)L(e,!0,-1)?(k=!0,c=a,e.lineIndent>t?x=1:e.lineIndent===t?x=0:e.lineIndent<t&&(x=-1)):c=!1;if(c&&(c=k||i),1!==x&&4!==n||(d=1===n||2===n?t:t+1,h=e.position-e.lineStart,1===x?c&&(D(e,h)||function(e,t,n){var r,o,i,a,s,l=e.tag,c=e.anchor,u={},f={},p=null,d=null,h=null,v=!1,y=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=u),s=e.input.charCodeAt(e.position);0!==s;){if(r=e.input.charCodeAt(e.position+1),i=e.line,a=e.position,63!==s&&58!==s||!m(r)){if(!B(e,n,2,!1,!0))break;if(e.line===i){for(s=e.input.charCodeAt(e.position);g(s);)s=e.input.charCodeAt(++e.position);if(58===s)m(s=e.input.charCodeAt(++e.position))||E(e,"a whitespace character is expected after the key-value separator within a block mapping"),v&&(I(e,u,f,p,d,null),p=d=h=null),y=!0,v=!1,o=!1,p=e.tag,d=e.result;else{if(!y)return e.tag=l,e.anchor=c,!0;E(e,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return e.tag=l,e.anchor=c,!0;E(e,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===s?(v&&(I(e,u,f,p,d,null),p=d=h=null),y=!0,v=!0,o=!0):v?(v=!1,o=!0):E(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,s=r;if((e.line===i||e.lineIndent>t)&&(B(e,t,4,!0,o)&&(v?d=e.result:h=e.result),v||(I(e,u,f,p,d,h,i,a),p=d=h=null),L(e,!0,-1),s=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==s)E(e,"bad indentation of a mapping entry");else if(e.lineIndent<t)break}return v&&I(e,u,f,p,d,null),y&&(e.tag=l,e.anchor=c,e.kind="mapping",e.result=u),y}(e,h,d))||function(e,t){var n,r,o,i,a,s,l,c,u,f,p=!0,d=e.tag,h=e.anchor,v={};if(91===(f=e.input.charCodeAt(e.position)))o=93,s=!1,r=[];else{if(123!==f)return!1;o=125,s=!0,r={}}for(null!==e.anchor&&(e.anchorMap[e.anchor]=r),f=e.input.charCodeAt(++e.position);0!==f;){if(L(e,!0,t),(f=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=d,e.anchor=h,e.kind=s?"mapping":"sequence",e.result=r,!0;p||E(e,"missed comma between flow collection entries"),u=null,i=a=!1,63===f&&m(e.input.charCodeAt(e.position+1))&&(i=a=!0,e.position++,L(e,!0,t)),n=e.line,B(e,t,1,!1,!0),c=e.tag,l=e.result,L(e,!0,t),f=e.input.charCodeAt(e.position),!a&&e.line!==n||58!==f||(i=!0,f=e.input.charCodeAt(++e.position),L(e,!0,t),B(e,t,1,!1,!0),u=e.result),s?I(e,r,v,c,l,u):i?r.push(I(e,null,v,c,l,u)):r.push(l),L(e,!0,t),44===(f=e.input.charCodeAt(e.position))?(p=!0,f=e.input.charCodeAt(++e.position)):p=!1}E(e,"unexpected end of the stream within a flow collection")}(e,d)?O=!0:(s&&function(e,t){var n,o,i,a,s,l=1,c=!1,u=!1,f=t,p=0,d=!1;if(124===(a=e.input.charCodeAt(e.position)))o=!1;else{if(62!==a)return!1;o=!0}for(e.kind="scalar",e.result="";0!==a;)if(43===(a=e.input.charCodeAt(++e.position))||45===a)1===l?l=43===a?3:2:E(e,"repeat of a chomping mode identifier");else{if(!((i=48<=(s=a)&&s<=57?s-48:-1)>=0))break;0===i?E(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?E(e,"repeat of an indentation width identifier"):(f=t+i-1,u=!0)}if(g(a)){do{a=e.input.charCodeAt(++e.position)}while(g(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!v(a)&&0!==a)}for(;0!==a;){for(F(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!u||e.lineIndent<f)&&32===a;)e.lineIndent++,a=e.input.charCodeAt(++e.position);if(!u&&e.lineIndent>f&&(f=e.lineIndent),v(a))p++;else{if(e.lineIndent<f){3===l?e.result+=r.repeat("\n",c?1+p:p):1===l&&c&&(e.result+="\n");break}for(o?g(a)?(d=!0,e.result+=r.repeat("\n",c?1+p:p)):d?(d=!1,e.result+=r.repeat("\n",p+1)):0===p?c&&(e.result+=" "):e.result+=r.repeat("\n",p):e.result+=r.repeat("\n",c?1+p:p),c=!0,u=!0,p=0,n=e.position;!v(a)&&0!==a;)a=e.input.charCodeAt(++e.position);M(e,n,e.position,!1)}}return!0}(e,d)||function(e,t){var n,r,o;if(39!==(n=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,r=o=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(M(e,r,e.position,!0),39!==(n=e.input.charCodeAt(++e.position)))return!0;r=e.position,e.position++,o=e.position}else v(n)?(M(e,r,o,!0),_(e,L(e,!1,t)),r=o=e.position):e.position===e.lineStart&&N(e)?E(e,"unexpected end of the document within a single quoted scalar"):(e.position++,o=e.position);E(e,"unexpected end of the stream within a single quoted scalar")}(e,d)||function(e,t){var n,r,o,i,a,s,l;if(34!==(s=e.input.charCodeAt(e.position)))return!1;for(e.kind="scalar",e.result="",e.position++,n=r=e.position;0!==(s=e.input.charCodeAt(e.position));){if(34===s)return M(e,n,e.position,!0),e.position++,!0;if(92===s){if(M(e,n,e.position,!0),v(s=e.input.charCodeAt(++e.position)))L(e,!1,t);else if(s<256&&C[s])e.result+=A[s],e.position++;else if((a=120===(l=s)?2:117===l?4:85===l?8:0)>0){for(o=a,i=0;o>0;o--)(a=b(s=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:E(e,"expected hexadecimal character");e.result+=w(i),e.position++}else E(e,"unknown escape sequence");n=r=e.position}else v(s)?(M(e,n,r,!0),_(e,L(e,!1,t)),n=r=e.position):e.position===e.lineStart&&N(e)?E(e,"unexpected end of the document within a double quoted scalar"):(e.position++,r=e.position)}E(e,"unexpected end of the stream within a double quoted scalar")}(e,d)?O=!0:!function(e){var t,n,r;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!m(r)&&!y(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&E(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),l.call(e.anchorMap,n)||E(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],L(e,!0,-1),!0}(e)?function(e,t,n){var r,o,i,a,s,l,c,u,f=e.kind,p=e.result;if(m(u=e.input.charCodeAt(e.position))||y(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(m(r=e.input.charCodeAt(e.position+1))||n&&y(r)))return!1;for(e.kind="scalar",e.result="",o=i=e.position,a=!1;0!==u;){if(58===u){if(m(r=e.input.charCodeAt(e.position+1))||n&&y(r))break}else if(35===u){if(m(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&N(e)||n&&y(u))break;if(v(u)){if(s=e.line,l=e.lineStart,c=e.lineIndent,L(e,!1,-1),e.lineIndent>=t){a=!0,u=e.input.charCodeAt(e.position);continue}e.position=i,e.line=s,e.lineStart=l,e.lineIndent=c;break}}a&&(M(e,o,i,!1),_(e,e.line-s),o=i=e.position,a=!1),g(u)||(i=e.position+1),u=e.input.charCodeAt(++e.position)}return M(e,o,i,!1),!!e.result||(e.kind=f,e.result=p,!1)}(e,d,1===n)&&(O=!0,null===e.tag&&(e.tag="?")):(O=!0,null===e.tag&&null===e.anchor||E(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===x&&(O=c&&D(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(null!==e.result&&"scalar"!==e.kind&&E(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),u=0,f=e.implicitTypes.length;u<f;u+=1)if((p=e.implicitTypes[u]).resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,null!==e.anchor&&(e.anchorMap[e.anchor]=e.result);break}}else l.call(e.typeMap[e.kind||"fallback"],e.tag)?(p=e.typeMap[e.kind||"fallback"][e.tag],null!==e.result&&p.kind!==e.kind&&E(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):E(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):E(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||O}function U(e){var t,n,r,o,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(o=e.input.charCodeAt(e.position))&&(L(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==o));){for(a=!0,o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!m(o);)o=e.input.charCodeAt(++e.position);for(r=[],(n=e.input.slice(t,e.position)).length<1&&E(e,"directive name must not be less than one character in length");0!==o;){for(;g(o);)o=e.input.charCodeAt(++e.position);if(35===o){do{o=e.input.charCodeAt(++e.position)}while(0!==o&&!v(o));break}if(v(o))break;for(t=e.position;0!==o&&!m(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(t,e.position))}0!==o&&F(e),l.call(T,n)?T[n](e,n,r):j(e,'unknown document directive "'+n+'"')}L(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,L(e,!0,-1)):a&&E(e,"directives end mark is expected"),B(e,e.lineIndent-1,4,!1,!0),L(e,!0,-1),e.checkLineBreaks&&u.test(e.input.slice(i,e.position))&&j(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&N(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,L(e,!0,-1)):e.position<e.length-1&&E(e,"end of the stream or a document separator is expected")}function W(e,t){t=t||{},0!==(e=String(e)).length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+="\n"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new O(e,t),r=e.indexOf("\0");for(-1!==r&&(n.position=r,E(n,"null byte is not allowed in input")),n.input+="\0";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)U(n);return n.documents}function z(e,t,n){null!==t&&"object"==typeof t&&void 0===n&&(n=t,t=null);var r=W(e,n);if("function"!=typeof t)return r;for(var o=0,i=r.length;o<i;o+=1)t(r[o])}function H(e,t){var n=W(e,t);if(0!==n.length){if(1===n.length)return n[0];throw new o("expected a single document in the stream, but found more")}}e.exports.loadAll=z,e.exports.load=H,e.exports.safeLoadAll=function(e,t,n){return"object"==typeof t&&null!==t&&void 0===n&&(n=t,t=null),z(e,t,r.extend({schema:a},n))},e.exports.safeLoad=function(e,t){return H(e,r.extend({schema:a},t))}},function(e,t,n){"use strict";var r=n(618);function o(e,t,n,r,o){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=o}o.prototype.getSnippet=function(e,t){var n,o,i,a,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n="",o=this.position;o>0&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(o-1));)if(o-=1,this.position-o>t/2-1){n=" ... ",o+=5;break}for(i="",a=this.position;a<this.buffer.length&&-1==="\0\r\n…\u2028\u2029".indexOf(this.buffer.charAt(a));)if((a+=1)-this.position>t/2-1){i=" ... ",a-=5;break}return s=this.buffer.slice(o,a),r.repeat(" ",e)+n+s+i+"\n"+r.repeat(" ",e+this.position-o+n.length)+"^"},o.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=o},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(618),o=n(579);function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new o("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=e.length,o=0,s=!1;if(!r)return!1;if("-"!==(t=e[o])&&"+"!==t||(t=e[++o]),"0"===t){if(o+1===r)return!0;if("b"===(t=e[++o])){for(o++;o<r;o++)if("_"!==(t=e[o])){if("0"!==t&&"1"!==t)return!1;s=!0}return s&&"_"!==t}if("x"===t){for(o++;o<r;o++)if("_"!==(t=e[o])){if(!(48<=(n=e.charCodeAt(o))&&n<=57||65<=n&&n<=70||97<=n&&n<=102))return!1;s=!0}return s&&"_"!==t}for(;o<r;o++)if("_"!==(t=e[o])){if(!i(e.charCodeAt(o)))return!1;s=!0}return s&&"_"!==t}if("_"===t)return!1;for(;o<r;o++)if("_"!==(t=e[o])){if(":"===t)break;if(!a(e.charCodeAt(o)))return!1;s=!0}return!(!s||"_"===t)&&(":"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(o)))},construct:function(e){var t,n,r=e,o=1,i=[];return-1!==r.indexOf("_")&&(r=r.replace(/_/g,"")),"-"!==(t=r[0])&&"+"!==t||("-"===t&&(o=-1),t=(r=r.slice(1))[0]),"0"===r?0:"0"===t?"b"===r[1]?o*parseInt(r.slice(2),2):"x"===r[1]?o*parseInt(r,16):o*parseInt(r,8):-1!==r.indexOf(":")?(r.split(":").forEach((function(e){i.unshift(parseInt(e,10))})),r=0,n=1,i.forEach((function(e){r+=e*n,n*=60})),o*r):o*parseInt(r,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!r.isNegativeZero(e)},represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var r=n(618),o=n(579),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new o("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,r,o;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,o=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){o.unshift(parseFloat(e,10))})),t=0,r=1,o.forEach((function(e){t+=e*r,r*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||r.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(r.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var r=n(579),o=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new r("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==o.exec(e)||null!==i.exec(e))},construct:function(e){var t,n,r,a,s,l,c,u,f=0,p=null;if(null===(t=o.exec(e))&&(t=i.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],r=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,r,a));if(s=+t[4],l=+t[5],c=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+="0";f=+f}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),u=new Date(Date.UTC(n,r,a,s,l,c,f)),p&&u.setTime(u.getTime()-p),u},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var r;try{r=n(83).Buffer}catch(e){}var o=n(579),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new o("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,r=0,o=e.length,a=i;for(n=0;n<o;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0},construct:function(e){var t,n,o=e.replace(/[\r\n=]/g,""),a=o.length,s=i,l=0,c=[];for(t=0;t<a;t++)t%4==0&&t&&(c.push(l>>16&255),c.push(l>>8&255),c.push(255&l)),l=l<<6|s.indexOf(o.charAt(t));return 0===(n=a%4*6)?(c.push(l>>16&255),c.push(l>>8&255),c.push(255&l)):18===n?(c.push(l>>10&255),c.push(l>>2&255)):12===n&&c.push(l>>4&255),r?r.from?r.from(c):new r(c):c},predicate:function(e){return r&&r.isBuffer(e)},represent:function(e){var t,n,r="",o=0,a=e.length,s=i;for(t=0;t<a;t++)t%3==0&&t&&(r+=s[o>>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]),o=(o<<8)+e[t];return 0===(n=a%3)?(r+=s[o>>18&63],r+=s[o>>12&63],r+=s[o>>6&63],r+=s[63&o]):2===n?(r+=s[o>>10&63],r+=s[o>>4&63],r+=s[o<<2&63],r+=s[64]):1===n&&(r+=s[o>>2&63],r+=s[o<<4&63],r+=s[64],r+=s[64]),r}})},function(e,t,n){"use strict";var r=n(579),o=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,a,s,l=[],c=e;for(t=0,n=c.length;t<n;t+=1){if(r=c[t],s=!1,"[object Object]"!==i.call(r))return!1;for(a in r)if(o.call(r,a)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==l.indexOf(a))return!1;l.push(a)}return!0},construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var r=n(579),o=Object.prototype.toString;e.exports=new r("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,r,i,a,s=e;for(a=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],"[object Object]"!==o.call(r))return!1;if(1!==(i=Object.keys(r)).length)return!1;a[t]=[i[0],r[i[0]]]}return!0},construct:function(e){if(null===e)return[];var t,n,r,o,i,a=e;for(i=new Array(a.length),t=0,n=a.length;t<n;t+=1)r=a[t],o=Object.keys(r),i[t]=[o[0],r[o[0]]];return i}})},function(e,t,n){"use strict";var r=n(579),o=Object.prototype.hasOwnProperty;e.exports=new r("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0},construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(e){return void 0===e},represent:function(){return""}})},function(e,t,n){"use strict";var r=n(579);e.exports=new r("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\/([gim]*)$/.exec(e),r="";if("/"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if("/"!==t[t.length-r.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),r="";return"/"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var r;try{r=n(570)}catch(e){"undefined"!=typeof window&&(r=window.esprima)}var o=n(579);e.exports=new o("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=r.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(e){return!1}},construct:function(e){var t,n="("+e+")",o=r.parse(n,{range:!0}),i=[];if("Program"!==o.type||1!==o.body.length||"ExpressionStatement"!==o.body[0].type||"ArrowFunctionExpression"!==o.body[0].expression.type&&"FunctionExpression"!==o.body[0].expression.type)throw new Error("Failed to resolve function");return o.body[0].expression.params.forEach((function(e){i.push(e.name)})),t=o.body[0].expression.body.range,"BlockStatement"===o.body[0].expression.body.type?new Function(i,n.slice(t[0]+1,t[1]-1)):new Function(i,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){"use strict";var r=n(618),o=n(635),i=n(659),a=n(636),s=Object.prototype.toString,l=Object.prototype.hasOwnProperty,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function f(e){var t,n,i;if(t=e.toString(16).toUpperCase(),e<=255)n="x",i=2;else if(e<=65535)n="u",i=4;else{if(!(e<=4294967295))throw new o("code point within a string may not be greater than 0xFFFFFFFF");n="U",i=8}return"\\"+n+r.repeat("0",i-t.length)+t}function p(e){this.schema=e.schema||i,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=r.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=function(e,t){var n,r,o,i,a,s,c;if(null===t)return{};for(n={},o=0,i=(r=Object.keys(t)).length;o<i;o+=1)a=r[o],s=String(t[a]),"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2)),(c=e.compiledTypeMap.fallback[a])&&l.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[a]=s;return n}(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function d(e,t){for(var n,o=r.repeat(" ",t),i=0,a=-1,s="",l=e.length;i<l;)-1===(a=e.indexOf("\n",i))?(n=e.slice(i),i=l):(n=e.slice(i,a+1),i=a+1),n.length&&"\n"!==n&&(s+=o),s+=n;return s}function h(e,t){return"\n"+r.repeat(" ",e.indent*t)}function v(e){return 32===e||9===e}function g(e){return 32<=e&&e<=126||161<=e&&e<=55295&&8232!==e&&8233!==e||57344<=e&&e<=65533&&65279!==e||65536<=e&&e<=1114111}function m(e,t){return g(e)&&65279!==e&&44!==e&&91!==e&&93!==e&&123!==e&&125!==e&&58!==e&&(35!==e||t&&function(e){return g(e)&&!v(e)&&65279!==e&&13!==e&&10!==e}(t))}function y(e){return/^\n* /.test(e)}function b(e,t,n,r,o){var i,a,s,l,c=!1,u=!1,f=-1!==r,p=-1,d=g(l=e.charCodeAt(0))&&65279!==l&&!v(l)&&45!==l&&63!==l&&58!==l&&44!==l&&91!==l&&93!==l&&123!==l&&125!==l&&35!==l&&38!==l&&42!==l&&33!==l&&124!==l&&61!==l&&62!==l&&39!==l&&34!==l&&37!==l&&64!==l&&96!==l&&!v(e.charCodeAt(e.length-1));if(t)for(i=0;i<e.length;i++){if(!g(a=e.charCodeAt(i)))return 5;s=i>0?e.charCodeAt(i-1):null,d=d&&m(a,s)}else{for(i=0;i<e.length;i++){if(10===(a=e.charCodeAt(i)))c=!0,f&&(u=u||i-p-1>r&&" "!==e[p+1],p=i);else if(!g(a))return 5;s=i>0?e.charCodeAt(i-1):null,d=d&&m(a,s)}u=u||f&&i-p-1>r&&" "!==e[p+1]}return c||u?n>9&&y(e)?5:u?4:3:d&&!o(e)?1:2}function x(e,t,n,r){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==u.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),s=r||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,s,e.indent,a,(function(t){return function(e,t){var n,r;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}(e,t)}))){case 1:return t;case 2:return"'"+t.replace(/'/g,"''")+"'";case 3:return"|"+w(t,e.indent)+C(d(t,i));case 4:return">"+w(t,e.indent)+C(d(function(e,t){var n,r,o=/(\n+)([^\n]*)/g,i=(s=e.indexOf("\n"),s=-1!==s?s:e.length,o.lastIndex=s,A(e.slice(0,s),t)),a="\n"===e[0]||" "===e[0];var s;for(;r=o.exec(e);){var l=r[1],c=r[2];n=" "===c[0],i+=l+(a||n||""===c?"":"\n")+A(c,t),a=n}return i}(t,a),i));case 5:return'"'+function(e){for(var t,n,r,o="",i=0;i<e.length;i++)(t=e.charCodeAt(i))>=55296&&t<=56319&&(n=e.charCodeAt(i+1))>=56320&&n<=57343?(o+=f(1024*(t-55296)+n-56320+65536),i++):(r=c[t],o+=!r&&g(t)?e[i]:r||f(t));return o}(t)+'"';default:throw new o("impossible error: invalid scalar style")}}()}function w(e,t){var n=y(e)?String(t):"",r="\n"===e[e.length-1];return n+(r&&("\n"===e[e.length-2]||"\n"===e)?"+":r?"":"-")+"\n"}function C(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function A(e,t){if(""===e||" "===e[0])return e;for(var n,r,o=/ [^ ]/g,i=0,a=0,s=0,l="";n=o.exec(e);)(s=n.index)-i>t&&(r=a>i?a:s,l+="\n"+e.slice(i,r),i=r+1),a=s;return l+="\n",e.length-i>t&&a>i?l+=e.slice(i,a)+"\n"+e.slice(a+1):l+=e.slice(i),l.slice(1)}function k(e,t,n){var r,i,a,c,u,f;for(a=0,c=(i=n?e.explicitTypes:e.implicitTypes).length;a<c;a+=1)if(((u=i[a]).instanceOf||u.predicate)&&(!u.instanceOf||"object"==typeof t&&t instanceof u.instanceOf)&&(!u.predicate||u.predicate(t))){if(e.tag=n?u.tag:"?",u.represent){if(f=e.styleMap[u.tag]||u.defaultStyle,"[object Function]"===s.call(u.represent))r=u.represent(t,f);else{if(!l.call(u.represent,f))throw new o("!<"+u.tag+'> tag resolver accepts not "'+f+'" style');r=u.represent[f](t,f)}e.dump=r}return!0}return!1}function O(e,t,n,r,i,a){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var l=s.call(e.dump);r&&(r=e.flowLevel<0||e.flowLevel>t);var c,u,f="[object Object]"===l||"[object Array]"===l;if(f&&(u=-1!==(c=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||u||2!==e.indent&&t>0)&&(i=!1),u&&e.usedDuplicates[c])e.dump="*ref_"+c;else{if(f&&u&&!e.usedDuplicates[c]&&(e.usedDuplicates[c]=!0),"[object Object]"===l)r&&0!==Object.keys(e.dump).length?(!function(e,t,n,r){var i,a,s,l,c,u,f="",p=e.tag,d=Object.keys(n);if(!0===e.sortKeys)d.sort();else if("function"==typeof e.sortKeys)d.sort(e.sortKeys);else if(e.sortKeys)throw new o("sortKeys must be a boolean or a function");for(i=0,a=d.length;i<a;i+=1)u="",r&&0===i||(u+=h(e,t)),l=n[s=d[i]],O(e,t+1,s,!0,!0,!0)&&((c=null!==e.tag&&"?"!==e.tag||e.dump&&e.dump.length>1024)&&(e.dump&&10===e.dump.charCodeAt(0)?u+="?":u+="? "),u+=e.dump,c&&(u+=h(e,t)),O(e,t+1,l,!0,c)&&(e.dump&&10===e.dump.charCodeAt(0)?u+=":":u+=": ",f+=u+=e.dump));e.tag=p,e.dump=f||"{}"}(e,t,e.dump,i),u&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,n){var r,o,i,a,s,l="",c=e.tag,u=Object.keys(n);for(r=0,o=u.length;r<o;r+=1)s="",0!==r&&(s+=", "),e.condenseFlow&&(s+='"'),a=n[i=u[r]],O(e,t,i,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),O(e,t,a,!1,!1)&&(l+=s+=e.dump));e.tag=c,e.dump="{"+l+"}"}(e,t,e.dump),u&&(e.dump="&ref_"+c+" "+e.dump));else if("[object Array]"===l){var p=e.noArrayIndent&&t>0?t-1:t;r&&0!==e.dump.length?(!function(e,t,n,r){var o,i,a="",s=e.tag;for(o=0,i=n.length;o<i;o+=1)O(e,t+1,n[o],!0,!0)&&(r&&0===o||(a+=h(e,t)),e.dump&&10===e.dump.charCodeAt(0)?a+="-":a+="- ",a+=e.dump);e.tag=s,e.dump=a||"[]"}(e,p,e.dump,i),u&&(e.dump="&ref_"+c+e.dump)):(!function(e,t,n){var r,o,i="",a=e.tag;for(r=0,o=n.length;r<o;r+=1)O(e,t,n[r],!1,!1)&&(0!==r&&(i+=","+(e.condenseFlow?"":" ")),i+=e.dump);e.tag=a,e.dump="["+i+"]"}(e,p,e.dump),u&&(e.dump="&ref_"+c+" "+e.dump))}else{if("[object String]"!==l){if(e.skipInvalid)return!1;throw new o("unacceptable kind of an object to dump "+l)}"?"!==e.tag&&x(e,e.dump,t,a)}null!==e.tag&&"?"!==e.tag&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function S(e,t){var n,r,o=[],i=[];for(function e(t,n,r){var o,i,a;if(null!==t&&"object"==typeof t)if(-1!==(i=n.indexOf(t)))-1===r.indexOf(i)&&r.push(i);else if(n.push(t),Array.isArray(t))for(i=0,a=t.length;i<a;i+=1)e(t[i],n,r);else for(o=Object.keys(t),i=0,a=o.length;i<a;i+=1)e(t[o[i]],n,r)}(e,o,i),n=0,r=i.length;n<r;n+=1)t.duplicates.push(o[i[n]]);t.usedDuplicates=new Array(r)}function E(e,t){var n=new p(t=t||{});return n.noRefs||S(e,n),O(n,0,e,!0,!0)?n.dump+"\n":""}e.exports.dump=E,e.exports.safeDump=function(e,t){return E(e,r.extend({schema:a},t))}},function(e,t,n){var r=n(993),o=n(776);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},function(e,t,n){var r=n(706),o=n(1014),i=n(660);e.exports=function(e,t,n){for(var a=-1,s=t.length,l={};++a<s;){var c=t[a],u=r(e,c);n(u,c)&&o(l,i(c,e),u)}return l}},function(e,t,n){var r=n(995),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,a=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=a},function(e,t,n){var r=n(996);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(708);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},function(e,t,n){var r=n(998),o=n(662),i=n(709);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},function(e,t,n){var r=n(999),o=n(1e3),i=n(1001),a=n(1002),s=n(1003);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=o,l.prototype.get=i,l.prototype.has=a,l.prototype.set=s,e.exports=l},function(e,t,n){var r=n(661);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(661),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(661),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},function(e,t,n){var r=n(661);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(663),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(663);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(663);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(663);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},function(e,t,n){var r=n(664);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(664);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(664);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(664);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},function(e,t,n){var r=n(648),o=n(660),i=n(651),a=n(593),s=n(637);e.exports=function(e,t,n,l){if(!a(e))return e;for(var c=-1,u=(t=o(t,e)).length,f=u-1,p=e;null!=p&&++c<u;){var d=s(t[c]),h=n;if("__proto__"===d||"constructor"===d||"prototype"===d)return e;if(c!=f){var v=p[d];void 0===(h=l?l(v,d,p):void 0)&&(h=a(v)?v:i(t[c+1])?[]:{})}r(p,d,h),p=p[d]}return e}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(660),o=n(652),i=n(583),a=n(651),s=n(685),l=n(637);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,f=!1;++c<u;){var p=l(t[c]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++c!=u?f:!!(u=null==e?0:e.length)&&s(u)&&a(p,u)&&(i(e)||o(e))}},function(e,t,n){var r=n(1018),o=n(744),i=n(745);e.exports=function(e){return i(o(e,void 0,r),e+"")}},function(e,t,n){var r=n(1019);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(710),o=n(1020);e.exports=function e(t,n,i,a,s){var l=-1,c=t.length;for(i||(i=o),s||(s=[]);++l<c;){var u=t[l];n>0&&i(u)?n>1?e(u,n-1,i,a,s):r(s,u):a||(s[s.length]=u)}return s}},function(e,t,n){var r=n(614),o=n(652),i=n(583),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},function(e,t,n){var r=n(1022),o=n(733),i=n(1026);function a(t,n,s){return"undefined"!=typeof Reflect&&r?(e.exports=a=r,e.exports.default=e.exports,e.exports.__esModule=!0):(e.exports=a=function(e,t,n){var r=i(e,t);if(r){var a=o(r,t);return a.get?a.get.call(n):a.value}},e.exports.default=e.exports,e.exports.__esModule=!0),a(t,n,s||t)}e.exports=a,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(1023)},function(e,t,n){var r=n(1024);e.exports=r},function(e,t,n){n(1025);var r=n(573);e.exports=r.Reflect.get},function(e,t,n){var r=n(572),o=n(578),i=n(581),a=n(582),s=n(608),l=n(629);r({target:"Reflect",stat:!0},{get:function e(t,n){var r,c,u=arguments.length<3?t:arguments[2];return i(t)===u?t[n]:(r=s.f(t,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(u):o(c=l(t))?e(c,n,u):void 0}})},function(e,t,n){var r=n(713);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=r(e)););return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(1028);e.exports=r},function(e,t,n){n(1029);var r=n(573);e.exports=r.Object.setPrototypeOf},function(e,t,n){n(572)({target:"Object",stat:!0},{setPrototypeOf:n(647)})},function(e,t,n){e.exports=n(1031)},function(e,t,n){var r=n(1032);e.exports=r},function(e,t,n){n(1033);var r=n(573);e.exports=r.Object.getPrototypeOf},function(e,t,n){var r=n(572),o=n(574),i=n(589),a=n(629),s=n(737);r({target:"Object",stat:!0,forced:o((function(){a(1)})),sham:!s},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){var r=n(1035),o=n(1039);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=r(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(1036)},function(e,t,n){var r=n(1037);e.exports=r},function(e,t,n){n(1038);var r=n(573).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){n(572)({target:"Object",stat:!0,sham:!n(580)},{create:n(625)})},function(e,t,n){var r=n(777);function o(t,n){return e.exports=o=r||function(e,t){return e.__proto__=t,e},e.exports.default=e.exports,e.exports.__esModule=!0,o(t,n)}e.exports=o,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(778),o=n(713),i=n(1045),a=n(1046);e.exports=function(e){var t=i();return function(){var n,i=o(e);if(t){var s=o(this).constructor;n=r(i,arguments,s)}else n=i.apply(this,arguments);return a(this,n)}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(1042);e.exports=r},function(e,t,n){n(1043);var r=n(573);e.exports=r.Reflect.construct},function(e,t,n){var r=n(572),o=n(591),i=n(598),a=n(581),s=n(578),l=n(625),c=n(1044),u=n(574),f=o("Reflect","construct"),p=u((function(){function e(){}return!(f((function(){}),[],e)instanceof e)})),d=!u((function(){f((function(){}))})),h=p||d;r({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(d&&!p)return f(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var r=[null];return r.push.apply(r,t),new(c.apply(e,r))}var o=n.prototype,u=l(s(o)?o:Object.prototype),h=Function.apply.call(e,u,t);return s(h)?h:u}})},function(e,t,n){"use strict";var r=n(598),o=n(578),i=[].slice,a={},s=function(e,t,n){if(!(t in a)){for(var r=[],o=0;o<t;o++)r[o]="a["+o+"]";a[t]=Function("C,a","return new C("+r.join(",")+")")}return a[t](e,n)};e.exports=Function.bind||function(e){var t=r(this),n=i.call(arguments,1),a=function(){var r=n.concat(i.call(arguments));return this instanceof a?s(t,r.length,r):t.apply(e,r)};return o(t.prototype)&&(a.prototype=t.prototype),a}},function(e,t,n){var r=n(778);e.exports=function(){if("undefined"==typeof Reflect||!r)return!1;if(r.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(r(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(596).default,o=n(1047);e.exports=function(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?o(e):t},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){e.exports=n(1049)},function(e,t,n){var r=n(1050);e.exports=r},function(e,t,n){var r=n(1051),o=Array.prototype;e.exports=function(e){var t=e.find;return e===o||e instanceof Array&&t===o.find?r:t}},function(e,t,n){n(1052);var r=n(586);e.exports=r("Array").find},function(e,t,n){"use strict";var r=n(572),o=n(602).find,i=n(681),a=!0;"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a},{find:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),i("find")},function(e,t){e.exports=window.FormData},function(e,t,n){var r=n(693),o=n(761);e.exports=function(e){if(r(e))return o(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(655),o=n(691),i=n(756);e.exports=function(e){if(void 0!==r&&null!=o(e)||null!=e["@@iterator"])return i(e)},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(755);e.exports=r},function(e,t,n){var r=n(1059);e.exports=r},function(e,t,n){n(1060);var r=n(573);e.exports=r.Object.assign},function(e,t,n){var r=n(572),o=n(1061);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){"use strict";var r=n(580),o=n(574),i=n(622),a=n(677),s=n(640),l=n(589),c=n(667),u=Object.assign,f=Object.defineProperty;e.exports=!u||o((function(){if(r&&1!==u({b:1},u(f({},"a",{enumerable:!0,get:function(){f(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=u({},e)[n]||"abcdefghijklmnopqrst"!=i(u({},t)).join("")}))?function(e,t){for(var n=l(e),o=arguments.length,u=1,f=a.f,p=s.f;o>u;)for(var d,h=c(arguments[u++]),v=f?i(h).concat(f(h)):i(h),g=v.length,m=0;g>m;)d=v[m++],r&&!p.call(h,d)||(n[d]=h[d]);return n}:u},function(e,t,n){var r=n(762);e.exports=r},function(e,t,n){e.exports=n(1064)},function(e,t,n){var r=n(1065);e.exports=r},function(e,t,n){var r=n(1066),o=Array.prototype;e.exports=function(e){var t=e.splice;return e===o||e instanceof Array&&t===o.splice?r:t}},function(e,t,n){n(1067);var r=n(586);e.exports=r("Array").splice},function(e,t,n){"use strict";var r=n(572),o=n(670),i=n(643),a=n(600),s=n(589),l=n(680),c=n(630),u=n(628)("splice"),f=Math.max,p=Math.min;r({target:"Array",proto:!0,forced:!u},{splice:function(e,t){var n,r,u,d,h,v,g=s(this),m=a(g.length),y=o(e,m),b=arguments.length;if(0===b?n=r=0:1===b?(n=0,r=m-y):(n=b-2,r=p(f(i(t),0),m-y)),m+n-r>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(u=l(g,r),d=0;d<r;d++)(h=y+d)in g&&c(u,d,g[h]);if(u.length=r,n<r){for(d=y;d<m-r;d++)v=d+n,(h=d+r)in g?g[v]=g[h]:delete g[v];for(d=m;d>m-r+n;d--)delete g[d-1]}else if(n>r)for(d=m-r;d>y;d--)v=d+n-1,(h=d+r-1)in g?g[v]=g[h]:delete g[v];for(d=0;d<n;d++)g[d+y]=arguments[d+2];return g.length=m-r+n,u}})},function(e,t,n){var r=n(1069)(n(1097));e.exports=r},function(e,t,n){var r=n(780),o=n(615),i=n(616);e.exports=function(e){return function(t,n,a){var s=Object(t);if(!o(t)){var l=r(n,3);t=i(t),n=function(e){return l(s[e],e,s)}}var c=e(t,n,a);return c>-1?s[l?t[c]:c]:void 0}}},function(e,t,n){var r=n(1071),o=n(1092),i=n(788);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(714),o=n(781);e.exports=function(e,t,n,i){var a=n.length,s=a,l=!i;if(null==e)return!s;for(e=Object(e);a--;){var c=n[a];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++a<s;){var u=(c=n[a])[0],f=e[u],p=c[1];if(l&&c[2]){if(void 0===f&&!(u in e))return!1}else{var d=new r;if(i)var h=i(f,p,u,e,t,d);if(!(void 0===h?o(p,f,3,i,d):h))return!1}}return!0}},function(e,t,n){var r=n(662);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(662),o=n(709),i=n(708);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(714),o=n(782),i=n(1083),a=n(1086),s=n(639),l=n(583),c=n(653),u=n(686),f="[object Object]",p=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,d,h,v){var g=l(e),m=l(t),y=g?"[object Array]":s(e),b=m?"[object Array]":s(t),x=(y="[object Arguments]"==y?f:y)==f,w=(b="[object Arguments]"==b?f:b)==f,C=y==b;if(C&&c(e)){if(!c(t))return!1;g=!0,x=!1}if(C&&!x)return v||(v=new r),g||u(e)?o(e,t,n,d,h,v):i(e,t,y,n,d,h,v);if(!(1&n)){var A=x&&p.call(e,"__wrapped__"),k=w&&p.call(t,"__wrapped__");if(A||k){var O=A?e.value():e,S=k?t.value():t;return v||(v=new r),h(O,S,n,d,v)}}return!!C&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t,n){var r=n(708),o=n(1079),i=n(1080);function a(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}a.prototype.add=a.prototype.push=o,a.prototype.has=i,e.exports=a},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(614),o=n(783),i=n(650),a=n(782),s=n(1084),l=n(1085),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,f,p){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var d=s;case"[object Set]":var h=1&r;if(d||(d=l),e.size!=t.size&&!h)return!1;var v=p.get(e);if(v)return v==t;r|=2,p.set(e,t);var g=a(d(e),d(t),r,c,f,p);return p.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(784),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,s){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var f=u;f--;){var p=c[f];if(!(l?p in t:o.call(t,p)))return!1}var d=s.get(e),h=s.get(t);if(d&&h)return d==t&&h==e;var v=!0;s.set(e,t),s.set(t,e);for(var g=l;++f<u;){var m=e[p=c[f]],y=t[p];if(i)var b=l?i(y,m,p,t,e,s):i(m,y,p,e,t,s);if(!(void 0===b?m===y||a(m,y,n,i,s):b)){v=!1;break}g||(g="constructor"==p)}if(v&&!g){var x=e.constructor,w=t.constructor;x==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof x&&x instanceof x&&"function"==typeof w&&w instanceof w||(v=!1)}return s.delete(e),s.delete(t),v}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}},function(e,t,n){var r=n(603)(n(592),"DataView");e.exports=r},function(e,t,n){var r=n(603)(n(592),"Promise");e.exports=r},function(e,t,n){var r=n(603)(n(592),"Set");e.exports=r},function(e,t,n){var r=n(603)(n(592),"WeakMap");e.exports=r},function(e,t,n){var r=n(787),o=n(616);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],a=e[i];t[n]=[i,a,r(a)]}return t}},function(e,t,n){var r=n(781),o=n(666),i=n(776),a=n(707),s=n(787),l=n(788),c=n(637);e.exports=function(e,t){return a(e)&&s(t)?l(c(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},function(e,t,n){var r=n(1095),o=n(1096),i=n(707),a=n(637);e.exports=function(e){return i(e)?r(a(e)):o(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){var r=n(706);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(1098),o=n(780),i=n(751),a=Math.max;e.exports=function(e,t,n){var s=null==e?0:e.length;if(!s)return-1;var l=null==n?0:i(n);return l<0&&(l=a(s+l,0)),r(e,o(t,3),l)}},function(e,t){e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}},function(e,t){e.exports=function(){}},function(e,t,n){"use strict";(function(t){
16
- /*!
5
+ * Version: "2.7.7"
6
+ */(this.webpackChunkRedoclyReferenceDocs=this.webpackChunkRedoclyReferenceDocs||[]).push([[290],{66419:(h,F,o)=>{h.exports=o(27698)},77766:(h,F,o)=>{h.exports=o(8065)},72119:(h,F,o)=>{h.exports=o(57448)},20116:(h,F,o)=>{h.exports=o(11955)},94473:(h,F,o)=>{h.exports=o(61577)},78580:(h,F,o)=>{h.exports=o(33778)},2991:(h,F,o)=>{h.exports=o(61798)},3649:(h,F,o)=>{h.exports=o(82073)},92762:(h,F,o)=>{h.exports=o(2348)},59340:(h,F,o)=>{h.exports=o(8933)},51942:(h,F,o)=>{h.exports=o(63383)},26295:(h,F,o)=>{h.exports=o(86209)},86902:(h,F,o)=>{h.exports=o(23059)},93476:(h,F,o)=>{h.exports=o(27460)},52424:(h,F,o)=>{h.exports=o(72010)},53592:(h,F,o)=>{h.exports=o(27385)},78363:(h,F,o)=>{h.exports=o(81522)},19996:(h,F,o)=>{h.exports=o(32209)},30699:(h,F,o)=>{h.exports=o(44442)},28834:(h,F,o)=>{h.exports=o(57152)},95683:(h,F,o)=>{h.exports=o(69447)},95238:(h,F,o)=>{h.exports=o(81493)},189:(h,F,o)=>{h.exports=o(76094)},32752:(h,F,o)=>{h.exports=o(70573)},44341:(h,F,o)=>{h.exports=o(73685)},58377:(h,F,o)=>{h.exports=o(27533)},13038:(h,F,o)=>{h.exports=o(39057)},63263:(h,F,o)=>{h.exports=o(84710)},24889:(h,F,o)=>{h.exports=o(74303)},89356:(h,F,o)=>{h.exports=o(93799)},79542:(h,F,o)=>{h.exports=o(55122)},69798:(h,F,o)=>{h.exports=o(29531)},13535:(h,F,o)=>{h.exports=o(10856)},83863:(h,F,o)=>{h.exports=o(31524)},51446:(h,F,o)=>{h.exports=o(86600)},23882:(h,F,o)=>{h.exports=o(9759)},63109:(h,F,o)=>{h.exports=o(35666)},79742:(h,F)=>{"use strict";F.byteLength=w,F.toByteArray=D,F.fromByteArray=ee;for(var o=[],c=[],v=typeof Uint8Array!="undefined"?Uint8Array:Array,m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,x=m.length;d<x;++d)o[d]=m[d],c[m.charCodeAt(d)]=d;c["-".charCodeAt(0)]=62,c["_".charCodeAt(0)]=63;function A(K){var R=K.length;if(R%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var Q=K.indexOf("=");Q===-1&&(Q=R);var L=Q===R?0:4-Q%4;return[Q,L]}function w(K){var R=A(K),Q=R[0],L=R[1];return(Q+L)*3/4-L}function T(K,R,Q){return(R+Q)*3/4-Q}function D(K){var R,Q=A(K),L=Q[0],P=Q[1],V=new v(T(K,L,P)),X=0,z=P>0?L-4:L,G;for(G=0;G<z;G+=4)R=c[K.charCodeAt(G)]<<18|c[K.charCodeAt(G+1)]<<12|c[K.charCodeAt(G+2)]<<6|c[K.charCodeAt(G+3)],V[X++]=R>>16&255,V[X++]=R>>8&255,V[X++]=R&255;return P===2&&(R=c[K.charCodeAt(G)]<<2|c[K.charCodeAt(G+1)]>>4,V[X++]=R&255),P===1&&(R=c[K.charCodeAt(G)]<<10|c[K.charCodeAt(G+1)]<<4|c[K.charCodeAt(G+2)]>>2,V[X++]=R>>8&255,V[X++]=R&255),V}function B(K){return o[K>>18&63]+o[K>>12&63]+o[K>>6&63]+o[K&63]}function U(K,R,Q){for(var L,P=[],V=R;V<Q;V+=3)L=(K[V]<<16&16711680)+(K[V+1]<<8&65280)+(K[V+2]&255),P.push(B(L));return P.join("")}function ee(K){for(var R,Q=K.length,L=Q%3,P=[],V=16383,X=0,z=Q-L;X<z;X+=V)P.push(U(K,X,X+V>z?z:X+V));return L===1?(R=K[Q-1],P.push(o[R>>2]+o[R<<4&63]+"==")):L===2&&(R=(K[Q-2]<<8)+K[Q-1],P.push(o[R>>10]+o[R>>4&63]+o[R<<2&63]+"=")),P.join("")}},50706:h=>{(function(){"use strict";function F(o){var c;return o instanceof Buffer?c=o:c=Buffer.from(o.toString(),"binary"),c.toString("base64")}h.exports=F})()},48764:(h,F,o)=>{"use strict";var c;/*!
7
+ * The buffer module from node.js, for the browser.
8
+ *
9
+ * @author Feross Aboukhadijeh <http://feross.org>
10
+ * @license MIT
11
+ */var v=o(79742),m=o(80645),d=o(5826);F.lW=T,c=V,F.h2=50,T.TYPED_ARRAY_SUPPORT=o.g.TYPED_ARRAY_SUPPORT!==void 0?o.g.TYPED_ARRAY_SUPPORT:x(),c=A();function x(){try{var ve=new Uint8Array(1);return ve.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},ve.foo()===42&&typeof ve.subarray=="function"&&ve.subarray(1,1).byteLength===0}catch($){return!1}}function A(){return T.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function w(ve,$){if(A()<$)throw new RangeError("Invalid typed array length");return T.TYPED_ARRAY_SUPPORT?(ve=new Uint8Array($),ve.__proto__=T.prototype):(ve===null&&(ve=new T($)),ve.length=$),ve}function T(ve,$,Y){if(!T.TYPED_ARRAY_SUPPORT&&!(this instanceof T))return new T(ve,$,Y);if(typeof ve=="number"){if(typeof $=="string")throw new Error("If encoding is specified then the first argument must be a string");return ee(this,ve)}return D(this,ve,$,Y)}T.poolSize=8192,T._augment=function(ve){return ve.__proto__=T.prototype,ve};function D(ve,$,Y,ye){if(typeof $=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&$ instanceof ArrayBuffer?Q(ve,$,Y,ye):typeof $=="string"?K(ve,$,Y):L(ve,$)}T.from=function(ve,$,Y){return D(null,ve,$,Y)},T.TYPED_ARRAY_SUPPORT&&(T.prototype.__proto__=Uint8Array.prototype,T.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&T[Symbol.species]===T&&Object.defineProperty(T,Symbol.species,{value:null,configurable:!0}));function B(ve){if(typeof ve!="number")throw new TypeError('"size" argument must be a number');if(ve<0)throw new RangeError('"size" argument must not be negative')}function U(ve,$,Y,ye){return B($),$<=0?w(ve,$):Y!==void 0?typeof ye=="string"?w(ve,$).fill(Y,ye):w(ve,$).fill(Y):w(ve,$)}T.alloc=function(ve,$,Y){return U(null,ve,$,Y)};function ee(ve,$){if(B($),ve=w(ve,$<0?0:P($)|0),!T.TYPED_ARRAY_SUPPORT)for(var Y=0;Y<$;++Y)ve[Y]=0;return ve}T.allocUnsafe=function(ve){return ee(null,ve)},T.allocUnsafeSlow=function(ve){return ee(null,ve)};function K(ve,$,Y){if((typeof Y!="string"||Y==="")&&(Y="utf8"),!T.isEncoding(Y))throw new TypeError('"encoding" must be a valid string encoding');var ye=X($,Y)|0;ve=w(ve,ye);var de=ve.write($,Y);return de!==ye&&(ve=ve.slice(0,de)),ve}function R(ve,$){var Y=$.length<0?0:P($.length)|0;ve=w(ve,Y);for(var ye=0;ye<Y;ye+=1)ve[ye]=$[ye]&255;return ve}function Q(ve,$,Y,ye){if($.byteLength,Y<0||$.byteLength<Y)throw new RangeError("'offset' is out of bounds");if($.byteLength<Y+(ye||0))throw new RangeError("'length' is out of bounds");return Y===void 0&&ye===void 0?$=new Uint8Array($):ye===void 0?$=new Uint8Array($,Y):$=new Uint8Array($,Y,ye),T.TYPED_ARRAY_SUPPORT?(ve=$,ve.__proto__=T.prototype):ve=R(ve,$),ve}function L(ve,$){if(T.isBuffer($)){var Y=P($.length)|0;return ve=w(ve,Y),ve.length===0||$.copy(ve,0,0,Y),ve}if($){if(typeof ArrayBuffer!="undefined"&&$.buffer instanceof ArrayBuffer||"length"in $)return typeof $.length!="number"||bt($.length)?w(ve,0):R(ve,$);if($.type==="Buffer"&&d($.data))return R(ve,$.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function P(ve){if(ve>=A())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+A().toString(16)+" bytes");return ve|0}function V(ve){return+ve!=ve&&(ve=0),T.alloc(+ve)}T.isBuffer=function($){return!!($!=null&&$._isBuffer)},T.compare=function($,Y){if(!T.isBuffer($)||!T.isBuffer(Y))throw new TypeError("Arguments must be Buffers");if($===Y)return 0;for(var ye=$.length,de=Y.length,Ae=0,S=Math.min(ye,de);Ae<S;++Ae)if($[Ae]!==Y[Ae]){ye=$[Ae],de=Y[Ae];break}return ye<de?-1:de<ye?1:0},T.isEncoding=function($){switch(String($).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},T.concat=function($,Y){if(!d($))throw new TypeError('"list" argument must be an Array of Buffers');if($.length===0)return T.alloc(0);var ye;if(Y===void 0)for(Y=0,ye=0;ye<$.length;++ye)Y+=$[ye].length;var de=T.allocUnsafe(Y),Ae=0;for(ye=0;ye<$.length;++ye){var S=$[ye];if(!T.isBuffer(S))throw new TypeError('"list" argument must be an Array of Buffers');S.copy(de,Ae),Ae+=S.length}return de};function X(ve,$){if(T.isBuffer(ve))return ve.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(ve)||ve instanceof ArrayBuffer))return ve.byteLength;typeof ve!="string"&&(ve=""+ve);var Y=ve.length;if(Y===0)return 0;for(var ye=!1;;)switch($){case"ascii":case"latin1":case"binary":return Y;case"utf8":case"utf-8":case void 0:return Ut(ve).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y*2;case"hex":return Y>>>1;case"base64":return wt(ve).length;default:if(ye)return Ut(ve).length;$=(""+$).toLowerCase(),ye=!0}}T.byteLength=X;function z(ve,$,Y){var ye=!1;if(($===void 0||$<0)&&($=0),$>this.length||((Y===void 0||Y>this.length)&&(Y=this.length),Y<=0)||(Y>>>=0,$>>>=0,Y<=$))return"";for(ve||(ve="utf8");;)switch(ve){case"hex":return Je(this,$,Y);case"utf8":case"utf-8":return Re(this,$,Y);case"ascii":return ke(this,$,Y);case"latin1":case"binary":return tt(this,$,Y);case"base64":return oe(this,$,Y);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return qe(this,$,Y);default:if(ye)throw new TypeError("Unknown encoding: "+ve);ve=(ve+"").toLowerCase(),ye=!0}}T.prototype._isBuffer=!0;function G(ve,$,Y){var ye=ve[$];ve[$]=ve[Y],ve[Y]=ye}T.prototype.swap16=function(){var $=this.length;if($%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Y=0;Y<$;Y+=2)G(this,Y,Y+1);return this},T.prototype.swap32=function(){var $=this.length;if($%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Y=0;Y<$;Y+=4)G(this,Y,Y+3),G(this,Y+1,Y+2);return this},T.prototype.swap64=function(){var $=this.length;if($%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Y=0;Y<$;Y+=8)G(this,Y,Y+7),G(this,Y+1,Y+6),G(this,Y+2,Y+5),G(this,Y+3,Y+4);return this},T.prototype.toString=function(){var $=this.length|0;return $===0?"":arguments.length===0?Re(this,0,$):z.apply(this,arguments)},T.prototype.equals=function($){if(!T.isBuffer($))throw new TypeError("Argument must be a Buffer");return this===$?!0:T.compare(this,$)===0},T.prototype.inspect=function(){var $="",Y=F.h2;return this.length>0&&($=this.toString("hex",0,Y).match(/.{2}/g).join(" "),this.length>Y&&($+=" ... ")),"<Buffer "+$+">"},T.prototype.compare=function($,Y,ye,de,Ae){if(!T.isBuffer($))throw new TypeError("Argument must be a Buffer");if(Y===void 0&&(Y=0),ye===void 0&&(ye=$?$.length:0),de===void 0&&(de=0),Ae===void 0&&(Ae=this.length),Y<0||ye>$.length||de<0||Ae>this.length)throw new RangeError("out of range index");if(de>=Ae&&Y>=ye)return 0;if(de>=Ae)return-1;if(Y>=ye)return 1;if(Y>>>=0,ye>>>=0,de>>>=0,Ae>>>=0,this===$)return 0;for(var S=Ae-de,Pe=ye-Y,H=Math.min(S,Pe),O=this.slice(de,Ae),I=$.slice(Y,ye),re=0;re<H;++re)if(O[re]!==I[re]){S=O[re],Pe=I[re];break}return S<Pe?-1:Pe<S?1:0};function Z(ve,$,Y,ye,de){if(ve.length===0)return-1;if(typeof Y=="string"?(ye=Y,Y=0):Y>2147483647?Y=2147483647:Y<-2147483648&&(Y=-2147483648),Y=+Y,isNaN(Y)&&(Y=de?0:ve.length-1),Y<0&&(Y=ve.length+Y),Y>=ve.length){if(de)return-1;Y=ve.length-1}else if(Y<0)if(de)Y=0;else return-1;if(typeof $=="string"&&($=T.from($,ye)),T.isBuffer($))return $.length===0?-1:ce(ve,$,Y,ye,de);if(typeof $=="number")return $=$&255,T.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?de?Uint8Array.prototype.indexOf.call(ve,$,Y):Uint8Array.prototype.lastIndexOf.call(ve,$,Y):ce(ve,[$],Y,ye,de);throw new TypeError("val must be string, number or Buffer")}function ce(ve,$,Y,ye,de){var Ae=1,S=ve.length,Pe=$.length;if(ye!==void 0&&(ye=String(ye).toLowerCase(),ye==="ucs2"||ye==="ucs-2"||ye==="utf16le"||ye==="utf-16le")){if(ve.length<2||$.length<2)return-1;Ae=2,S/=2,Pe/=2,Y/=2}function H(_,ue){return Ae===1?_[ue]:_.readUInt16BE(ue*Ae)}var O;if(de){var I=-1;for(O=Y;O<S;O++)if(H(ve,O)===H($,I===-1?0:O-I)){if(I===-1&&(I=O),O-I+1===Pe)return I*Ae}else I!==-1&&(O-=O-I),I=-1}else for(Y+Pe>S&&(Y=S-Pe),O=Y;O>=0;O--){for(var re=!0,N=0;N<Pe;N++)if(H(ve,O+N)!==H($,N)){re=!1;break}if(re)return O}return-1}T.prototype.includes=function($,Y,ye){return this.indexOf($,Y,ye)!==-1},T.prototype.indexOf=function($,Y,ye){return Z(this,$,Y,ye,!0)},T.prototype.lastIndexOf=function($,Y,ye){return Z(this,$,Y,ye,!1)};function te(ve,$,Y,ye){Y=Number(Y)||0;var de=ve.length-Y;ye?(ye=Number(ye),ye>de&&(ye=de)):ye=de;var Ae=$.length;if(Ae%2!=0)throw new TypeError("Invalid hex string");ye>Ae/2&&(ye=Ae/2);for(var S=0;S<ye;++S){var Pe=parseInt($.substr(S*2,2),16);if(isNaN(Pe))return S;ve[Y+S]=Pe}return S}function se(ve,$,Y,ye){return Mt(Ut($,ve.length-Y),ve,Y,ye)}function be(ve,$,Y,ye){return Mt(jt($),ve,Y,ye)}function me(ve,$,Y,ye){return be(ve,$,Y,ye)}function he(ve,$,Y,ye){return Mt(wt($),ve,Y,ye)}function fe(ve,$,Y,ye){return Mt(Gt($,ve.length-Y),ve,Y,ye)}T.prototype.write=function($,Y,ye,de){if(Y===void 0)de="utf8",ye=this.length,Y=0;else if(ye===void 0&&typeof Y=="string")de=Y,ye=this.length,Y=0;else if(isFinite(Y))Y=Y|0,isFinite(ye)?(ye=ye|0,de===void 0&&(de="utf8")):(de=ye,ye=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-Y;if((ye===void 0||ye>Ae)&&(ye=Ae),$.length>0&&(ye<0||Y<0)||Y>this.length)throw new RangeError("Attempt to write outside buffer bounds");de||(de="utf8");for(var S=!1;;)switch(de){case"hex":return te(this,$,Y,ye);case"utf8":case"utf-8":return se(this,$,Y,ye);case"ascii":return be(this,$,Y,ye);case"latin1":case"binary":return me(this,$,Y,ye);case"base64":return he(this,$,Y,ye);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,$,Y,ye);default:if(S)throw new TypeError("Unknown encoding: "+de);de=(""+de).toLowerCase(),S=!0}},T.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(ve,$,Y){return $===0&&Y===ve.length?v.fromByteArray(ve):v.fromByteArray(ve.slice($,Y))}function Re(ve,$,Y){Y=Math.min(ve.length,Y);for(var ye=[],de=$;de<Y;){var Ae=ve[de],S=null,Pe=Ae>239?4:Ae>223?3:Ae>191?2:1;if(de+Pe<=Y){var H,O,I,re;switch(Pe){case 1:Ae<128&&(S=Ae);break;case 2:H=ve[de+1],(H&192)==128&&(re=(Ae&31)<<6|H&63,re>127&&(S=re));break;case 3:H=ve[de+1],O=ve[de+2],(H&192)==128&&(O&192)==128&&(re=(Ae&15)<<12|(H&63)<<6|O&63,re>2047&&(re<55296||re>57343)&&(S=re));break;case 4:H=ve[de+1],O=ve[de+2],I=ve[de+3],(H&192)==128&&(O&192)==128&&(I&192)==128&&(re=(Ae&15)<<18|(H&63)<<12|(O&63)<<6|I&63,re>65535&&re<1114112&&(S=re))}}S===null?(S=65533,Pe=1):S>65535&&(S-=65536,ye.push(S>>>10&1023|55296),S=56320|S&1023),ye.push(S),de+=Pe}return Le(ye)}var Ue=4096;function Le(ve){var $=ve.length;if($<=Ue)return String.fromCharCode.apply(String,ve);for(var Y="",ye=0;ye<$;)Y+=String.fromCharCode.apply(String,ve.slice(ye,ye+=Ue));return Y}function ke(ve,$,Y){var ye="";Y=Math.min(ve.length,Y);for(var de=$;de<Y;++de)ye+=String.fromCharCode(ve[de]&127);return ye}function tt(ve,$,Y){var ye="";Y=Math.min(ve.length,Y);for(var de=$;de<Y;++de)ye+=String.fromCharCode(ve[de]);return ye}function Je(ve,$,Y){var ye=ve.length;(!$||$<0)&&($=0),(!Y||Y<0||Y>ye)&&(Y=ye);for(var de="",Ae=$;Ae<Y;++Ae)de+=Et(ve[Ae]);return de}function qe(ve,$,Y){for(var ye=ve.slice($,Y),de="",Ae=0;Ae<ye.length;Ae+=2)de+=String.fromCharCode(ye[Ae]+ye[Ae+1]*256);return de}T.prototype.slice=function($,Y){var ye=this.length;$=~~$,Y=Y===void 0?ye:~~Y,$<0?($+=ye,$<0&&($=0)):$>ye&&($=ye),Y<0?(Y+=ye,Y<0&&(Y=0)):Y>ye&&(Y=ye),Y<$&&(Y=$);var de;if(T.TYPED_ARRAY_SUPPORT)de=this.subarray($,Y),de.__proto__=T.prototype;else{var Ae=Y-$;de=new T(Ae,void 0);for(var S=0;S<Ae;++S)de[S]=this[S+$]}return de};function at(ve,$,Y){if(ve%1!=0||ve<0)throw new RangeError("offset is not uint");if(ve+$>Y)throw new RangeError("Trying to access beyond buffer length")}T.prototype.readUIntLE=function($,Y,ye){$=$|0,Y=Y|0,ye||at($,Y,this.length);for(var de=this[$],Ae=1,S=0;++S<Y&&(Ae*=256);)de+=this[$+S]*Ae;return de},T.prototype.readUIntBE=function($,Y,ye){$=$|0,Y=Y|0,ye||at($,Y,this.length);for(var de=this[$+--Y],Ae=1;Y>0&&(Ae*=256);)de+=this[$+--Y]*Ae;return de},T.prototype.readUInt8=function($,Y){return Y||at($,1,this.length),this[$]},T.prototype.readUInt16LE=function($,Y){return Y||at($,2,this.length),this[$]|this[$+1]<<8},T.prototype.readUInt16BE=function($,Y){return Y||at($,2,this.length),this[$]<<8|this[$+1]},T.prototype.readUInt32LE=function($,Y){return Y||at($,4,this.length),(this[$]|this[$+1]<<8|this[$+2]<<16)+this[$+3]*16777216},T.prototype.readUInt32BE=function($,Y){return Y||at($,4,this.length),this[$]*16777216+(this[$+1]<<16|this[$+2]<<8|this[$+3])},T.prototype.readIntLE=function($,Y,ye){$=$|0,Y=Y|0,ye||at($,Y,this.length);for(var de=this[$],Ae=1,S=0;++S<Y&&(Ae*=256);)de+=this[$+S]*Ae;return Ae*=128,de>=Ae&&(de-=Math.pow(2,8*Y)),de},T.prototype.readIntBE=function($,Y,ye){$=$|0,Y=Y|0,ye||at($,Y,this.length);for(var de=Y,Ae=1,S=this[$+--de];de>0&&(Ae*=256);)S+=this[$+--de]*Ae;return Ae*=128,S>=Ae&&(S-=Math.pow(2,8*Y)),S},T.prototype.readInt8=function($,Y){return Y||at($,1,this.length),this[$]&128?(255-this[$]+1)*-1:this[$]},T.prototype.readInt16LE=function($,Y){Y||at($,2,this.length);var ye=this[$]|this[$+1]<<8;return ye&32768?ye|4294901760:ye},T.prototype.readInt16BE=function($,Y){Y||at($,2,this.length);var ye=this[$+1]|this[$]<<8;return ye&32768?ye|4294901760:ye},T.prototype.readInt32LE=function($,Y){return Y||at($,4,this.length),this[$]|this[$+1]<<8|this[$+2]<<16|this[$+3]<<24},T.prototype.readInt32BE=function($,Y){return Y||at($,4,this.length),this[$]<<24|this[$+1]<<16|this[$+2]<<8|this[$+3]},T.prototype.readFloatLE=function($,Y){return Y||at($,4,this.length),m.read(this,$,!0,23,4)},T.prototype.readFloatBE=function($,Y){return Y||at($,4,this.length),m.read(this,$,!1,23,4)},T.prototype.readDoubleLE=function($,Y){return Y||at($,8,this.length),m.read(this,$,!0,52,8)},T.prototype.readDoubleBE=function($,Y){return Y||at($,8,this.length),m.read(this,$,!1,52,8)};function ut(ve,$,Y,ye,de,Ae){if(!T.isBuffer(ve))throw new TypeError('"buffer" argument must be a Buffer instance');if($>de||$<Ae)throw new RangeError('"value" argument is out of bounds');if(Y+ye>ve.length)throw new RangeError("Index out of range")}T.prototype.writeUIntLE=function($,Y,ye,de){if($=+$,Y=Y|0,ye=ye|0,!de){var Ae=Math.pow(2,8*ye)-1;ut(this,$,Y,ye,Ae,0)}var S=1,Pe=0;for(this[Y]=$&255;++Pe<ye&&(S*=256);)this[Y+Pe]=$/S&255;return Y+ye},T.prototype.writeUIntBE=function($,Y,ye,de){if($=+$,Y=Y|0,ye=ye|0,!de){var Ae=Math.pow(2,8*ye)-1;ut(this,$,Y,ye,Ae,0)}var S=ye-1,Pe=1;for(this[Y+S]=$&255;--S>=0&&(Pe*=256);)this[Y+S]=$/Pe&255;return Y+ye},T.prototype.writeUInt8=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,1,255,0),T.TYPED_ARRAY_SUPPORT||($=Math.floor($)),this[Y]=$&255,Y+1};function gt(ve,$,Y,ye){$<0&&($=65535+$+1);for(var de=0,Ae=Math.min(ve.length-Y,2);de<Ae;++de)ve[Y+de]=($&255<<8*(ye?de:1-de))>>>(ye?de:1-de)*8}T.prototype.writeUInt16LE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[Y]=$&255,this[Y+1]=$>>>8):gt(this,$,Y,!0),Y+2},T.prototype.writeUInt16BE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,2,65535,0),T.TYPED_ARRAY_SUPPORT?(this[Y]=$>>>8,this[Y+1]=$&255):gt(this,$,Y,!1),Y+2};function Ze(ve,$,Y,ye){$<0&&($=4294967295+$+1);for(var de=0,Ae=Math.min(ve.length-Y,4);de<Ae;++de)ve[Y+de]=$>>>(ye?de:3-de)*8&255}T.prototype.writeUInt32LE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[Y+3]=$>>>24,this[Y+2]=$>>>16,this[Y+1]=$>>>8,this[Y]=$&255):Ze(this,$,Y,!0),Y+4},T.prototype.writeUInt32BE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,4,4294967295,0),T.TYPED_ARRAY_SUPPORT?(this[Y]=$>>>24,this[Y+1]=$>>>16,this[Y+2]=$>>>8,this[Y+3]=$&255):Ze(this,$,Y,!1),Y+4},T.prototype.writeIntLE=function($,Y,ye,de){if($=+$,Y=Y|0,!de){var Ae=Math.pow(2,8*ye-1);ut(this,$,Y,ye,Ae-1,-Ae)}var S=0,Pe=1,H=0;for(this[Y]=$&255;++S<ye&&(Pe*=256);)$<0&&H===0&&this[Y+S-1]!==0&&(H=1),this[Y+S]=($/Pe>>0)-H&255;return Y+ye},T.prototype.writeIntBE=function($,Y,ye,de){if($=+$,Y=Y|0,!de){var Ae=Math.pow(2,8*ye-1);ut(this,$,Y,ye,Ae-1,-Ae)}var S=ye-1,Pe=1,H=0;for(this[Y+S]=$&255;--S>=0&&(Pe*=256);)$<0&&H===0&&this[Y+S+1]!==0&&(H=1),this[Y+S]=($/Pe>>0)-H&255;return Y+ye},T.prototype.writeInt8=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,1,127,-128),T.TYPED_ARRAY_SUPPORT||($=Math.floor($)),$<0&&($=255+$+1),this[Y]=$&255,Y+1},T.prototype.writeInt16LE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[Y]=$&255,this[Y+1]=$>>>8):gt(this,$,Y,!0),Y+2},T.prototype.writeInt16BE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,2,32767,-32768),T.TYPED_ARRAY_SUPPORT?(this[Y]=$>>>8,this[Y+1]=$&255):gt(this,$,Y,!1),Y+2},T.prototype.writeInt32LE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,4,2147483647,-2147483648),T.TYPED_ARRAY_SUPPORT?(this[Y]=$&255,this[Y+1]=$>>>8,this[Y+2]=$>>>16,this[Y+3]=$>>>24):Ze(this,$,Y,!0),Y+4},T.prototype.writeInt32BE=function($,Y,ye){return $=+$,Y=Y|0,ye||ut(this,$,Y,4,2147483647,-2147483648),$<0&&($=4294967295+$+1),T.TYPED_ARRAY_SUPPORT?(this[Y]=$>>>24,this[Y+1]=$>>>16,this[Y+2]=$>>>8,this[Y+3]=$&255):Ze(this,$,Y,!1),Y+4};function lt(ve,$,Y,ye,de,Ae){if(Y+ye>ve.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("Index out of range")}function pt(ve,$,Y,ye,de){return de||lt(ve,$,Y,4,34028234663852886e22,-34028234663852886e22),m.write(ve,$,Y,ye,23,4),Y+4}T.prototype.writeFloatLE=function($,Y,ye){return pt(this,$,Y,!0,ye)},T.prototype.writeFloatBE=function($,Y,ye){return pt(this,$,Y,!1,ye)};function vt(ve,$,Y,ye,de){return de||lt(ve,$,Y,8,17976931348623157e292,-17976931348623157e292),m.write(ve,$,Y,ye,52,8),Y+8}T.prototype.writeDoubleLE=function($,Y,ye){return vt(this,$,Y,!0,ye)},T.prototype.writeDoubleBE=function($,Y,ye){return vt(this,$,Y,!1,ye)},T.prototype.copy=function($,Y,ye,de){if(ye||(ye=0),!de&&de!==0&&(de=this.length),Y>=$.length&&(Y=$.length),Y||(Y=0),de>0&&de<ye&&(de=ye),de===ye||$.length===0||this.length===0)return 0;if(Y<0)throw new RangeError("targetStart out of bounds");if(ye<0||ye>=this.length)throw new RangeError("sourceStart out of bounds");if(de<0)throw new RangeError("sourceEnd out of bounds");de>this.length&&(de=this.length),$.length-Y<de-ye&&(de=$.length-Y+ye);var Ae=de-ye,S;if(this===$&&ye<Y&&Y<de)for(S=Ae-1;S>=0;--S)$[S+Y]=this[S+ye];else if(Ae<1e3||!T.TYPED_ARRAY_SUPPORT)for(S=0;S<Ae;++S)$[S+Y]=this[S+ye];else Uint8Array.prototype.set.call($,this.subarray(ye,ye+Ae),Y);return Ae},T.prototype.fill=function($,Y,ye,de){if(typeof $=="string"){if(typeof Y=="string"?(de=Y,Y=0,ye=this.length):typeof ye=="string"&&(de=ye,ye=this.length),$.length===1){var Ae=$.charCodeAt(0);Ae<256&&($=Ae)}if(de!==void 0&&typeof de!="string")throw new TypeError("encoding must be a string");if(typeof de=="string"&&!T.isEncoding(de))throw new TypeError("Unknown encoding: "+de)}else typeof $=="number"&&($=$&255);if(Y<0||this.length<Y||this.length<ye)throw new RangeError("Out of range index");if(ye<=Y)return this;Y=Y>>>0,ye=ye===void 0?this.length:ye>>>0,$||($=0);var S;if(typeof $=="number")for(S=Y;S<ye;++S)this[S]=$;else{var Pe=T.isBuffer($)?$:Ut(new T($,de).toString()),H=Pe.length;for(S=0;S<ye-Y;++S)this[S+Y]=Pe[S%H]}return this};var dt=/[^+\/0-9A-Za-z-_]/g;function It(ve){if(ve=Ft(ve).replace(dt,""),ve.length<2)return"";for(;ve.length%4!=0;)ve=ve+"=";return ve}function Ft(ve){return ve.trim?ve.trim():ve.replace(/^\s+|\s+$/g,"")}function Et(ve){return ve<16?"0"+ve.toString(16):ve.toString(16)}function Ut(ve,$){$=$||1/0;for(var Y,ye=ve.length,de=null,Ae=[],S=0;S<ye;++S){if(Y=ve.charCodeAt(S),Y>55295&&Y<57344){if(!de){if(Y>56319){($-=3)>-1&&Ae.push(239,191,189);continue}else if(S+1===ye){($-=3)>-1&&Ae.push(239,191,189);continue}de=Y;continue}if(Y<56320){($-=3)>-1&&Ae.push(239,191,189),de=Y;continue}Y=(de-55296<<10|Y-56320)+65536}else de&&($-=3)>-1&&Ae.push(239,191,189);if(de=null,Y<128){if(($-=1)<0)break;Ae.push(Y)}else if(Y<2048){if(($-=2)<0)break;Ae.push(Y>>6|192,Y&63|128)}else if(Y<65536){if(($-=3)<0)break;Ae.push(Y>>12|224,Y>>6&63|128,Y&63|128)}else if(Y<1114112){if(($-=4)<0)break;Ae.push(Y>>18|240,Y>>12&63|128,Y>>6&63|128,Y&63|128)}else throw new Error("Invalid code point")}return Ae}function jt(ve){for(var $=[],Y=0;Y<ve.length;++Y)$.push(ve.charCodeAt(Y)&255);return $}function Gt(ve,$){for(var Y,ye,de,Ae=[],S=0;S<ve.length&&!(($-=2)<0);++S)Y=ve.charCodeAt(S),ye=Y>>8,de=Y%256,Ae.push(de),Ae.push(ye);return Ae}function wt(ve){return v.toByteArray(It(ve))}function Mt(ve,$,Y,ye){for(var de=0;de<ye&&!(de+Y>=$.length||de>=ve.length);++de)$[de+Y]=ve[de];return de}function bt(ve){return ve!==ve}},21924:(h,F,o)=>{"use strict";var c=o(40210),v=o(55559),m=v(c("String.prototype.indexOf"));h.exports=function(x,A){var w=c(x,!!A);return typeof w=="function"&&m(x,".prototype.")>-1?v(w):w}},55559:(h,F,o)=>{"use strict";var c=o(58612),v=o(40210),m=v("%Function.prototype.apply%"),d=v("%Function.prototype.call%"),x=v("%Reflect.apply%",!0)||c.call(d,m),A=v("%Object.getOwnPropertyDescriptor%",!0),w=v("%Object.defineProperty%",!0),T=v("%Math.max%");if(w)try{w({},"a",{value:1})}catch(B){w=null}h.exports=function(U){var ee=x(c,d,arguments);if(A&&w){var K=A(ee,"length");K.configurable&&w(ee,"length",{value:1+T(0,U.length-(arguments.length-1))})}return ee};var D=function(){return x(c,m,arguments)};w?w(h.exports,"apply",{value:D}):h.exports.apply=D},82801:(h,F,o)=>{(function(c){c(o(4631))})(function(c){var v={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},m=c.Pos;c.defineOption("autoCloseBrackets",!1,function(L,P,V){V&&V!=c.Init&&(L.removeKeyMap(x),L.state.closeBrackets=null),P&&(A(d(P,"pairs")),L.state.closeBrackets=P,L.addKeyMap(x))});function d(L,P){return P=="pairs"&&typeof L=="string"?L:typeof L=="object"&&L[P]!=null?L[P]:v[P]}var x={Backspace:D,Enter:B};function A(L){for(var P=0;P<L.length;P++){var V=L.charAt(P),X="'"+V+"'";x[X]||(x[X]=w(V))}}A(v.pairs+"`");function w(L){return function(P){return K(P,L)}}function T(L){var P=L.state.closeBrackets;if(!P||P.override)return P;var V=L.getModeAt(L.getCursor());return V.closeBrackets||P}function D(L){var P=T(L);if(!P||L.getOption("disableInput"))return c.Pass;for(var V=d(P,"pairs"),X=L.listSelections(),z=0;z<X.length;z++){if(!X[z].empty())return c.Pass;var G=R(L,X[z].head);if(!G||V.indexOf(G)%2!=0)return c.Pass}for(var z=X.length-1;z>=0;z--){var Z=X[z].head;L.replaceRange("",m(Z.line,Z.ch-1),m(Z.line,Z.ch+1),"+delete")}}function B(L){var P=T(L),V=P&&d(P,"explode");if(!V||L.getOption("disableInput"))return c.Pass;for(var X=L.listSelections(),z=0;z<X.length;z++){if(!X[z].empty())return c.Pass;var G=R(L,X[z].head);if(!G||V.indexOf(G)%2!=0)return c.Pass}L.operation(function(){var Z=L.lineSeparator()||`
12
+ `;L.replaceSelection(Z+Z,null),U(L,-1),X=L.listSelections();for(var ce=0;ce<X.length;ce++){var te=X[ce].head.line;L.indentLine(te,null,!0),L.indentLine(te+1,null,!0)}})}function U(L,P){for(var V=[],X=L.listSelections(),z=0,G=0;G<X.length;G++){var Z=X[G];Z.head==L.getCursor()&&(z=G);var ce=Z.head.ch||P>0?{line:Z.head.line,ch:Z.head.ch+P}:{line:Z.head.line-1};V.push({anchor:ce,head:ce})}L.setSelections(V,z)}function ee(L){var P=c.cmpPos(L.anchor,L.head)>0;return{anchor:new m(L.anchor.line,L.anchor.ch+(P?-1:1)),head:new m(L.head.line,L.head.ch+(P?1:-1))}}function K(L,P){var V=T(L);if(!V||L.getOption("disableInput"))return c.Pass;var X=d(V,"pairs"),z=X.indexOf(P);if(z==-1)return c.Pass;for(var G=d(V,"closeBefore"),Z=d(V,"triples"),ce=X.charAt(z+1)==P,te=L.listSelections(),se=z%2==0,be,me=0;me<te.length;me++){var he=te[me],fe=he.head,oe,Re=L.getRange(fe,m(fe.line,fe.ch+1));if(se&&!he.empty())oe="surround";else if((ce||!se)&&Re==P)ce&&Q(L,fe)?oe="both":Z.indexOf(P)>=0&&L.getRange(fe,m(fe.line,fe.ch+3))==P+P+P?oe="skipThree":oe="skip";else if(ce&&fe.ch>1&&Z.indexOf(P)>=0&&L.getRange(m(fe.line,fe.ch-2),fe)==P+P){if(fe.ch>2&&/\bstring/.test(L.getTokenTypeAt(m(fe.line,fe.ch-2))))return c.Pass;oe="addFour"}else if(ce){var Ue=fe.ch==0?" ":L.getRange(m(fe.line,fe.ch-1),fe);if(!c.isWordChar(Re)&&Ue!=P&&!c.isWordChar(Ue))oe="both";else return c.Pass}else if(se&&(Re.length===0||/\s/.test(Re)||G.indexOf(Re)>-1))oe="both";else return c.Pass;if(!be)be=oe;else if(be!=oe)return c.Pass}var Le=z%2?X.charAt(z-1):P,ke=z%2?P:X.charAt(z+1);L.operation(function(){if(be=="skip")U(L,1);else if(be=="skipThree")U(L,3);else if(be=="surround"){for(var tt=L.getSelections(),Je=0;Je<tt.length;Je++)tt[Je]=Le+tt[Je]+ke;L.replaceSelections(tt,"around"),tt=L.listSelections().slice();for(var Je=0;Je<tt.length;Je++)tt[Je]=ee(tt[Je]);L.setSelections(tt)}else be=="both"?(L.replaceSelection(Le+ke,null),L.triggerElectric(Le+ke),U(L,-1)):be=="addFour"&&(L.replaceSelection(Le+Le+Le+Le,"before"),U(L,1))})}function R(L,P){var V=L.getRange(m(P.line,P.ch-1),m(P.line,P.ch+1));return V.length==2?V:null}function Q(L,P){var V=L.getTokenAt(m(P.line,P.ch+1));return/\bstring/.test(V.type)&&V.start==P.ch&&(P.ch==0||!/\bstring/.test(L.getTokenTypeAt(P)))}})},4328:(h,F,o)=>{(function(c){c(o(4631))})(function(c){var v=/MSIE \d/.test(navigator.userAgent)&&(document.documentMode==null||document.documentMode<8),m=c.Pos,d={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function x(U){return U&&U.bracketRegex||/[(){}[\]]/}function A(U,ee,K){var R=U.getLineHandle(ee.line),Q=ee.ch-1,L=K&&K.afterCursor;L==null&&(L=/(^| )cm-fat-cursor($| )/.test(U.getWrapperElement().className));var P=x(K),V=!L&&Q>=0&&P.test(R.text.charAt(Q))&&d[R.text.charAt(Q)]||P.test(R.text.charAt(Q+1))&&d[R.text.charAt(++Q)];if(!V)return null;var X=V.charAt(1)==">"?1:-1;if(K&&K.strict&&X>0!=(Q==ee.ch))return null;var z=U.getTokenTypeAt(m(ee.line,Q+1)),G=w(U,m(ee.line,Q+(X>0?1:0)),X,z,K);return G==null?null:{from:m(ee.line,Q),to:G&&G.pos,match:G&&G.ch==V.charAt(0),forward:X>0}}function w(U,ee,K,R,Q){for(var L=Q&&Q.maxScanLineLength||1e4,P=Q&&Q.maxScanLines||1e3,V=[],X=x(Q),z=K>0?Math.min(ee.line+P,U.lastLine()+1):Math.max(U.firstLine()-1,ee.line-P),G=ee.line;G!=z;G+=K){var Z=U.getLine(G);if(!!Z){var ce=K>0?0:Z.length-1,te=K>0?Z.length:-1;if(!(Z.length>L))for(G==ee.line&&(ce=ee.ch-(K<0?1:0));ce!=te;ce+=K){var se=Z.charAt(ce);if(X.test(se)&&(R===void 0||(U.getTokenTypeAt(m(G,ce+1))||"")==(R||""))){var be=d[se];if(be&&be.charAt(1)==">"==K>0)V.push(se);else if(V.length)V.pop();else return{pos:m(G,ce),ch:se}}}}}return G-K==(K>0?U.lastLine():U.firstLine())?!1:null}function T(U,ee,K){for(var R=U.state.matchBrackets.maxHighlightLineLength||1e3,Q=K&&K.highlightNonMatching,L=[],P=U.listSelections(),V=0;V<P.length;V++){var X=P[V].empty()&&A(U,P[V].head,K);if(X&&(X.match||Q!==!1)&&U.getLine(X.from.line).length<=R){var z=X.match?"CodeMirror-matchingbracket":"CodeMirror-nonmatchingbracket";L.push(U.markText(X.from,m(X.from.line,X.from.ch+1),{className:z})),X.to&&U.getLine(X.to.line).length<=R&&L.push(U.markText(X.to,m(X.to.line,X.to.ch+1),{className:z}))}}if(L.length){v&&U.state.focused&&U.focus();var G=function(){U.operation(function(){for(var Z=0;Z<L.length;Z++)L[Z].clear()})};if(ee)setTimeout(G,800);else return G}}function D(U){U.operation(function(){U.state.matchBrackets.currentlyHighlighted&&(U.state.matchBrackets.currentlyHighlighted(),U.state.matchBrackets.currentlyHighlighted=null),U.state.matchBrackets.currentlyHighlighted=T(U,!1,U.state.matchBrackets)})}function B(U){U.state.matchBrackets&&U.state.matchBrackets.currentlyHighlighted&&(U.state.matchBrackets.currentlyHighlighted(),U.state.matchBrackets.currentlyHighlighted=null)}c.defineOption("matchBrackets",!1,function(U,ee,K){K&&K!=c.Init&&(U.off("cursorActivity",D),U.off("focus",D),U.off("blur",B),B(U)),ee&&(U.state.matchBrackets=typeof ee=="object"?ee:{},U.on("cursorActivity",D),U.on("focus",D),U.on("blur",B))}),c.defineExtension("matchBrackets",function(){T(this,!0)}),c.defineExtension("findMatchingBracket",function(U,ee,K){return(K||typeof ee=="boolean")&&(K?(K.strict=ee,ee=K):ee=ee?{strict:!0}:null),A(this,U,ee)}),c.defineExtension("scanForBracket",function(U,ee,K,R){return w(this,U,ee,K,R)})})},71707:(h,F,o)=>{(function(c){c(o(4631))})(function(c){"use strict";var v="CodeMirror-hint",m="CodeMirror-hint-active";c.showHint=function(L,P,V){if(!P)return L.showHint(V);V&&V.async&&(P.async=!0);var X={hint:P};if(V)for(var z in V)X[z]=V[z];return L.showHint(X)},c.defineExtension("showHint",function(L){L=w(this,this.getCursor("start"),L);var P=this.listSelections();if(!(P.length>1)){if(this.somethingSelected()){if(!L.hint.supportsSelection)return;for(var V=0;V<P.length;V++)if(P[V].head.line!=P[V].anchor.line)return}this.state.completionActive&&this.state.completionActive.close();var X=this.state.completionActive=new d(this,L);!X.options.hint||(c.signal(this,"startCompletion",this),X.update(!0))}}),c.defineExtension("closeHint",function(){this.state.completionActive&&this.state.completionActive.close()});function d(L,P){if(this.cm=L,this.options=P,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var V=this;L.on("cursorActivity",this.activityFunc=function(){V.cursorActivity()})}}var x=window.requestAnimationFrame||function(L){return setTimeout(L,1e3/60)},A=window.cancelAnimationFrame||clearTimeout;d.prototype={close:function(){!this.active()||(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&c.signal(this.data,"close"),this.widget&&this.widget.close(),c.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(L,P){var V=L.list[P],X=this;this.cm.operation(function(){V.hint?V.hint(X.cm,L,V):X.cm.replaceRange(T(V),V.from||L.from,V.to||L.to,"complete"),c.signal(L,"pick",V),X.cm.scrollIntoView()}),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(A(this.debounce),this.debounce=0);var L=this.startPos;this.data&&(L=this.data.from);var P=this.cm.getCursor(),V=this.cm.getLine(P.line);if(P.line!=this.startPos.line||V.length-P.ch!=this.startLen-this.startPos.ch||P.ch<L.ch||this.cm.somethingSelected()||!P.ch||this.options.closeCharacters.test(V.charAt(P.ch-1)))this.close();else{var X=this;this.debounce=x(function(){X.update()}),this.widget&&this.widget.disable()}},update:function(L){if(this.tick!=null){var P=this,V=++this.tick;K(this.options.hint,this.cm,this.options,function(X){P.tick==V&&P.finishUpdate(X,L)})}},finishUpdate:function(L,P){this.data&&c.signal(this.data,"update");var V=this.widget&&this.widget.picked||P&&this.options.completeSingle;this.widget&&this.widget.close(),this.data=L,L&&L.list.length&&(V&&L.list.length==1?this.pick(L,0):(this.widget=new U(this,L),c.signal(L,"shown")))}};function w(L,P,V){var X=L.options.hintOptions,z={};for(var G in Q)z[G]=Q[G];if(X)for(var G in X)X[G]!==void 0&&(z[G]=X[G]);if(V)for(var G in V)V[G]!==void 0&&(z[G]=V[G]);return z.hint.resolve&&(z.hint=z.hint.resolve(L,P)),z}function T(L){return typeof L=="string"?L:L.text}function D(L,P){var V={Up:function(){P.moveFocus(-1)},Down:function(){P.moveFocus(1)},PageUp:function(){P.moveFocus(-P.menuSize()+1,!0)},PageDown:function(){P.moveFocus(P.menuSize()-1,!0)},Home:function(){P.setFocus(0)},End:function(){P.setFocus(P.length-1)},Enter:P.pick,Tab:P.pick,Esc:P.close},X=/Mac/.test(navigator.platform);X&&(V["Ctrl-P"]=function(){P.moveFocus(-1)},V["Ctrl-N"]=function(){P.moveFocus(1)});var z=L.options.customKeys,G=z?{}:V;function Z(se,be){var me;typeof be!="string"?me=function(he){return be(he,P)}:V.hasOwnProperty(be)?me=V[be]:me=be,G[se]=me}if(z)for(var ce in z)z.hasOwnProperty(ce)&&Z(ce,z[ce]);var te=L.options.extraKeys;if(te)for(var ce in te)te.hasOwnProperty(ce)&&Z(ce,te[ce]);return G}function B(L,P){for(;P&&P!=L;){if(P.nodeName.toUpperCase()==="LI"&&P.parentNode==L)return P;P=P.parentNode}}function U(L,P){this.completion=L,this.data=P,this.picked=!1;var V=this,X=L.cm,z=X.getInputField().ownerDocument,G=z.defaultView||z.parentWindow,Z=this.hints=z.createElement("ul"),ce=L.cm.options.theme;Z.className="CodeMirror-hints "+ce,this.selectedHint=P.selectedHint||0;for(var te=P.list,se=0;se<te.length;++se){var be=Z.appendChild(z.createElement("li")),me=te[se],he=v+(se!=this.selectedHint?"":" "+m);me.className!=null&&(he=me.className+" "+he),be.className=he,me.render?me.render(be,P,me):be.appendChild(z.createTextNode(me.displayText||T(me))),be.hintId=se}var fe=L.options.container||z.body,oe=X.cursorCoords(L.options.alignWithWord?P.from:null),Re=oe.left,Ue=oe.bottom,Le=!0,ke=0,tt=0;if(fe!==z.body){var Je=["absolute","relative","fixed"].indexOf(G.getComputedStyle(fe).position)!==-1,qe=Je?fe:fe.offsetParent,at=qe.getBoundingClientRect(),ut=z.body.getBoundingClientRect();ke=at.left-ut.left-qe.scrollLeft,tt=at.top-ut.top-qe.scrollTop}Z.style.left=Re-ke+"px",Z.style.top=Ue-tt+"px";var gt=G.innerWidth||Math.max(z.body.offsetWidth,z.documentElement.offsetWidth),Ze=G.innerHeight||Math.max(z.body.offsetHeight,z.documentElement.offsetHeight);fe.appendChild(Z);var lt=L.options.moveOnOverlap?Z.getBoundingClientRect():new DOMRect,pt=L.options.paddingForScrollbar?Z.scrollHeight>Z.clientHeight+1:!1,vt;setTimeout(function(){vt=X.getScrollInfo()});var dt=lt.bottom-Ze;if(dt>0){var It=lt.bottom-lt.top,Ft=oe.top-(oe.bottom-lt.top);if(Ft-It>0)Z.style.top=(Ue=oe.top-It-tt)+"px",Le=!1;else if(It>Ze){Z.style.height=Ze-5+"px",Z.style.top=(Ue=oe.bottom-lt.top-tt)+"px";var Et=X.getCursor();P.from.ch!=Et.ch&&(oe=X.cursorCoords(Et),Z.style.left=(Re=oe.left-ke)+"px",lt=Z.getBoundingClientRect())}}var Ut=lt.right-gt;if(pt&&(Ut+=X.display.nativeBarWidth),Ut>0&&(lt.right-lt.left>gt&&(Z.style.width=gt-5+"px",Ut-=lt.right-lt.left-gt),Z.style.left=(Re=oe.left-Ut-ke)+"px"),pt)for(var jt=Z.firstChild;jt;jt=jt.nextSibling)jt.style.paddingRight=X.display.nativeBarWidth+"px";if(X.addKeyMap(this.keyMap=D(L,{moveFocus:function(Mt,bt){V.changeActive(V.selectedHint+Mt,bt)},setFocus:function(Mt){V.changeActive(Mt)},menuSize:function(){return V.screenAmount()},length:te.length,close:function(){L.close()},pick:function(){V.pick()},data:P})),L.options.closeOnUnfocus){var Gt;X.on("blur",this.onBlur=function(){Gt=setTimeout(function(){L.close()},100)}),X.on("focus",this.onFocus=function(){clearTimeout(Gt)})}X.on("scroll",this.onScroll=function(){var Mt=X.getScrollInfo(),bt=X.getWrapperElement().getBoundingClientRect();vt||(vt=X.getScrollInfo());var ve=Ue+vt.top-Mt.top,$=ve-(G.pageYOffset||(z.documentElement||z.body).scrollTop);if(Le||($+=Z.offsetHeight),$<=bt.top||$>=bt.bottom)return L.close();Z.style.top=ve+"px",Z.style.left=Re+vt.left-Mt.left+"px"}),c.on(Z,"dblclick",function(Mt){var bt=B(Z,Mt.target||Mt.srcElement);bt&&bt.hintId!=null&&(V.changeActive(bt.hintId),V.pick())}),c.on(Z,"click",function(Mt){var bt=B(Z,Mt.target||Mt.srcElement);bt&&bt.hintId!=null&&(V.changeActive(bt.hintId),L.options.completeOnSingleClick&&V.pick())}),c.on(Z,"mousedown",function(){setTimeout(function(){X.focus()},20)});var wt=this.getSelectedHintRange();return(wt.from!==0||wt.to!==0)&&this.scrollToActive(),c.signal(P,"select",te[this.selectedHint],Z.childNodes[this.selectedHint]),!0}U.prototype={close:function(){if(this.completion.widget==this){this.completion.widget=null,this.hints.parentNode&&this.hints.parentNode.removeChild(this.hints),this.completion.cm.removeKeyMap(this.keyMap);var L=this.completion.cm;this.completion.options.closeOnUnfocus&&(L.off("blur",this.onBlur),L.off("focus",this.onFocus)),L.off("scroll",this.onScroll)}},disable:function(){this.completion.cm.removeKeyMap(this.keyMap);var L=this;this.keyMap={Enter:function(){L.picked=!0}},this.completion.cm.addKeyMap(this.keyMap)},pick:function(){this.completion.pick(this.data,this.selectedHint)},changeActive:function(L,P){if(L>=this.data.list.length?L=P?this.data.list.length-1:0:L<0&&(L=P?0:this.data.list.length-1),this.selectedHint!=L){var V=this.hints.childNodes[this.selectedHint];V&&(V.className=V.className.replace(" "+m,"")),V=this.hints.childNodes[this.selectedHint=L],V.className+=" "+m,this.scrollToActive(),c.signal(this.data,"select",this.data.list[this.selectedHint],V)}},scrollToActive:function(){var L=this.getSelectedHintRange(),P=this.hints.childNodes[L.from],V=this.hints.childNodes[L.to],X=this.hints.firstChild;P.offsetTop<this.hints.scrollTop?this.hints.scrollTop=P.offsetTop-X.offsetTop:V.offsetTop+V.offsetHeight>this.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=V.offsetTop+V.offsetHeight-this.hints.clientHeight+X.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var L=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-L),to:Math.min(this.data.list.length-1,this.selectedHint+L)}}};function ee(L,P){if(!L.somethingSelected())return P;for(var V=[],X=0;X<P.length;X++)P[X].supportsSelection&&V.push(P[X]);return V}function K(L,P,V,X){if(L.async)L(P,X,V);else{var z=L(P,V);z&&z.then?z.then(X):X(z)}}function R(L,P){var V=L.getHelpers(P,"hint"),X;if(V.length){var z=function(G,Z,ce){var te=ee(G,V);function se(be){if(be==te.length)return Z(null);K(te[be],G,ce,function(me){me&&me.list.length>0?Z(me):se(be+1)})}se(0)};return z.async=!0,z.supportsSelection=!0,z}else return(X=L.getHelper(L.getCursor(),"hintWords"))?function(G){return c.hint.fromList(G,{words:X})}:c.hint.anyword?function(G,Z){return c.hint.anyword(G,Z)}:function(){}}c.registerHelper("hint","auto",{resolve:R}),c.registerHelper("hint","fromList",function(L,P){var V=L.getCursor(),X=L.getTokenAt(V),z,G=c.Pos(V.line,X.start),Z=V;X.start<V.ch&&/\w/.test(X.string.charAt(V.ch-X.start-1))?z=X.string.substr(0,V.ch-X.start):(z="",G=V);for(var ce=[],te=0;te<P.words.length;te++){var se=P.words[te];se.slice(0,z.length)==z&&ce.push(se)}if(ce.length)return{list:ce,from:G,to:Z}}),c.commands.autocomplete=c.showHint;var Q={hint:c.hint.auto,completeSingle:!0,alignWithWord:!0,closeCharacters:/[\s()\[\]{};:>,]/,closeOnPick:!0,closeOnUnfocus:!0,updateOnCursorActivity:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null,paddingForScrollbar:!0,moveOnOverlap:!0};c.defineOption("hintOptions",null)})},3256:(h,F,o)=>{(function(c){c(o(4631))})(function(c){"use strict";var v="CodeMirror-lint-markers";function m(z,G,Z){var ce=document.createElement("div");ce.className="CodeMirror-lint-tooltip cm-s-"+z.options.theme,ce.appendChild(Z.cloneNode(!0)),z.state.lint.options.selfContain?z.getWrapperElement().appendChild(ce):document.body.appendChild(ce);function te(se){if(!ce.parentNode)return c.off(document,"mousemove",te);ce.style.top=Math.max(0,se.clientY-ce.offsetHeight-5)+"px",ce.style.left=se.clientX+5+"px"}return c.on(document,"mousemove",te),te(G),ce.style.opacity!=null&&(ce.style.opacity=1),ce}function d(z){z.parentNode&&z.parentNode.removeChild(z)}function x(z){!z.parentNode||(z.style.opacity==null&&d(z),z.style.opacity=0,setTimeout(function(){d(z)},600))}function A(z,G,Z,ce){var te=m(z,G,Z);function se(){c.off(ce,"mouseout",se),te&&(x(te),te=null)}var be=setInterval(function(){if(te)for(var me=ce;;me=me.parentNode){if(me&&me.nodeType==11&&(me=me.host),me==document.body)return;if(!me){se();break}}if(!te)return clearInterval(be)},400);c.on(ce,"mouseout",se)}function w(z,G,Z){this.marked=[],this.options=G,this.timeout=null,this.hasGutter=Z,this.onMouseOver=function(ce){X(z,ce)},this.waitingFor=0}function T(z,G){return G instanceof Function?{getAnnotations:G}:((!G||G===!0)&&(G={}),G)}function D(z){var G=z.state.lint;G.hasGutter&&z.clearGutter(v);for(var Z=0;Z<G.marked.length;++Z)G.marked[Z].clear();G.marked.length=0}function B(z,G,Z,ce,te){var se=document.createElement("div"),be=se;return se.className="CodeMirror-lint-marker CodeMirror-lint-marker-"+Z,ce&&(be=se.appendChild(document.createElement("div")),be.className="CodeMirror-lint-marker CodeMirror-lint-marker-multiple"),te!=!1&&c.on(be,"mouseover",function(me){A(z,me,G,be)}),se}function U(z,G){return z=="error"?z:G}function ee(z){for(var G=[],Z=0;Z<z.length;++Z){var ce=z[Z],te=ce.from.line;(G[te]||(G[te]=[])).push(ce)}return G}function K(z){var G=z.severity;G||(G="error");var Z=document.createElement("div");return Z.className="CodeMirror-lint-message CodeMirror-lint-message-"+G,typeof z.messageHTML!="undefined"?Z.innerHTML=z.messageHTML:Z.appendChild(document.createTextNode(z.message)),Z}function R(z,G,Z){var ce=z.state.lint,te=++ce.waitingFor;function se(){te=-1,z.off("change",se)}z.on("change",se),G(z.getValue(),function(be,me){z.off("change",se),ce.waitingFor==te&&(me&&be instanceof c&&(be=me),z.operation(function(){L(z,be)}))},Z,z)}function Q(z){var G=z.state.lint,Z=G.options,ce=Z.options||Z,te=Z.getAnnotations||z.getHelper(c.Pos(0,0),"lint");if(!!te)if(Z.async||te.async)R(z,te,ce);else{var se=te(z.getValue(),ce,z);if(!se)return;se.then?se.then(function(be){z.operation(function(){L(z,be)})}):z.operation(function(){L(z,se)})}}function L(z,G){D(z);for(var Z=z.state.lint,ce=Z.options,te=ee(G),se=0;se<te.length;++se){var be=te[se];if(!!be){var me=[];be=be.filter(function(Le){return me.indexOf(Le.message)>-1?!1:me.push(Le.message)});for(var he=null,fe=Z.hasGutter&&document.createDocumentFragment(),oe=0;oe<be.length;++oe){var Re=be[oe],Ue=Re.severity;Ue||(Ue="error"),he=U(he,Ue),ce.formatAnnotation&&(Re=ce.formatAnnotation(Re)),Z.hasGutter&&fe.appendChild(K(Re)),Re.to&&Z.marked.push(z.markText(Re.from,Re.to,{className:"CodeMirror-lint-mark CodeMirror-lint-mark-"+Ue,__annotation:Re}))}Z.hasGutter&&z.setGutterMarker(se,v,B(z,fe,he,te[se].length>1,Z.options.tooltips))}}ce.onUpdateLinting&&ce.onUpdateLinting(G,te,z)}function P(z){var G=z.state.lint;!G||(clearTimeout(G.timeout),G.timeout=setTimeout(function(){Q(z)},G.options.delay||500))}function V(z,G,Z){for(var ce=Z.target||Z.srcElement,te=document.createDocumentFragment(),se=0;se<G.length;se++){var be=G[se];te.appendChild(K(be))}A(z,Z,te,ce)}function X(z,G){var Z=G.target||G.srcElement;if(!!/\bCodeMirror-lint-mark-/.test(Z.className)){for(var ce=Z.getBoundingClientRect(),te=(ce.left+ce.right)/2,se=(ce.top+ce.bottom)/2,be=z.findMarksAt(z.coordsChar({left:te,top:se},"client")),me=[],he=0;he<be.length;++he){var fe=be[he].__annotation;fe&&me.push(fe)}me.length&&V(z,me,G)}}c.defineOption("lint",!1,function(z,G,Z){if(Z&&Z!=c.Init&&(D(z),z.state.lint.options.lintOnChange!==!1&&z.off("change",P),c.off(z.getWrapperElement(),"mouseover",z.state.lint.onMouseOver),clearTimeout(z.state.lint.timeout),delete z.state.lint),G){for(var ce=z.getOption("gutters"),te=!1,se=0;se<ce.length;++se)ce[se]==v&&(te=!0);var be=z.state.lint=new w(z,T(z,G),te);be.options.lintOnChange!==!1&&z.on("change",P),be.options.tooltips!=!1&&be.options.tooltips!="gutter"&&c.on(z.getWrapperElement(),"mouseover",be.onMouseOver),Q(z)}}),c.defineExtension("performLint",function(){this.state.lint&&Q(this)})})},32095:(h,F,o)=>{(function(c){c(o(4631))})(function(c){"use strict";var v=c.Pos;function m(P){var V=P.flags;return V!=null?V:(P.ignoreCase?"i":"")+(P.global?"g":"")+(P.multiline?"m":"")}function d(P,V){for(var X=m(P),z=X,G=0;G<V.length;G++)z.indexOf(V.charAt(G))==-1&&(z+=V.charAt(G));return X==z?P:new RegExp(P.source,z)}function x(P){return/\\s|\\n|\n|\\W|\\D|\[\^/.test(P.source)}function A(P,V,X){V=d(V,"g");for(var z=X.line,G=X.ch,Z=P.lastLine();z<=Z;z++,G=0){V.lastIndex=G;var ce=P.getLine(z),te=V.exec(ce);if(te)return{from:v(z,te.index),to:v(z,te.index+te[0].length),match:te}}}function w(P,V,X){if(!x(V))return A(P,V,X);V=d(V,"gm");for(var z,G=1,Z=X.line,ce=P.lastLine();Z<=ce;){for(var te=0;te<G&&!(Z>ce);te++){var se=P.getLine(Z++);z=z==null?se:z+`
13
+ `+se}G=G*2,V.lastIndex=X.ch;var be=V.exec(z);if(be){var me=z.slice(0,be.index).split(`
14
+ `),he=be[0].split(`
15
+ `),fe=X.line+me.length-1,oe=me[me.length-1].length;return{from:v(fe,oe),to:v(fe+he.length-1,he.length==1?oe+he[0].length:he[he.length-1].length),match:be}}}}function T(P,V,X){for(var z,G=0;G<=P.length;){V.lastIndex=G;var Z=V.exec(P);if(!Z)break;var ce=Z.index+Z[0].length;if(ce>P.length-X)break;(!z||ce>z.index+z[0].length)&&(z=Z),G=Z.index+1}return z}function D(P,V,X){V=d(V,"g");for(var z=X.line,G=X.ch,Z=P.firstLine();z>=Z;z--,G=-1){var ce=P.getLine(z),te=T(ce,V,G<0?0:ce.length-G);if(te)return{from:v(z,te.index),to:v(z,te.index+te[0].length),match:te}}}function B(P,V,X){if(!x(V))return D(P,V,X);V=d(V,"gm");for(var z,G=1,Z=P.getLine(X.line).length-X.ch,ce=X.line,te=P.firstLine();ce>=te;){for(var se=0;se<G&&ce>=te;se++){var be=P.getLine(ce--);z=z==null?be:be+`
16
+ `+z}G*=2;var me=T(z,V,Z);if(me){var he=z.slice(0,me.index).split(`
17
+ `),fe=me[0].split(`
18
+ `),oe=ce+he.length,Re=he[he.length-1].length;return{from:v(oe,Re),to:v(oe+fe.length-1,fe.length==1?Re+fe[0].length:fe[fe.length-1].length),match:me}}}}var U,ee;String.prototype.normalize?(U=function(P){return P.normalize("NFD").toLowerCase()},ee=function(P){return P.normalize("NFD")}):(U=function(P){return P.toLowerCase()},ee=function(P){return P});function K(P,V,X,z){if(P.length==V.length)return X;for(var G=0,Z=X+Math.max(0,P.length-V.length);;){if(G==Z)return G;var ce=G+Z>>1,te=z(P.slice(0,ce)).length;if(te==X)return ce;te>X?Z=ce:G=ce+1}}function R(P,V,X,z){if(!V.length)return null;var G=z?U:ee,Z=G(V).split(/\r|\n\r?/);e:for(var ce=X.line,te=X.ch,se=P.lastLine()+1-Z.length;ce<=se;ce++,te=0){var be=P.getLine(ce).slice(te),me=G(be);if(Z.length==1){var he=me.indexOf(Z[0]);if(he==-1)continue e;var X=K(be,me,he,G)+te;return{from:v(ce,K(be,me,he,G)+te),to:v(ce,K(be,me,he+Z[0].length,G)+te)}}else{var fe=me.length-Z[0].length;if(me.slice(fe)!=Z[0])continue e;for(var oe=1;oe<Z.length-1;oe++)if(G(P.getLine(ce+oe))!=Z[oe])continue e;var Re=P.getLine(ce+Z.length-1),Ue=G(Re),Le=Z[Z.length-1];if(Ue.slice(0,Le.length)!=Le)continue e;return{from:v(ce,K(be,me,fe,G)+te),to:v(ce+Z.length-1,K(Re,Ue,Le.length,G))}}}}function Q(P,V,X,z){if(!V.length)return null;var G=z?U:ee,Z=G(V).split(/\r|\n\r?/);e:for(var ce=X.line,te=X.ch,se=P.firstLine()-1+Z.length;ce>=se;ce--,te=-1){var be=P.getLine(ce);te>-1&&(be=be.slice(0,te));var me=G(be);if(Z.length==1){var he=me.lastIndexOf(Z[0]);if(he==-1)continue e;return{from:v(ce,K(be,me,he,G)),to:v(ce,K(be,me,he+Z[0].length,G))}}else{var fe=Z[Z.length-1];if(me.slice(0,fe.length)!=fe)continue e;for(var oe=1,X=ce-Z.length+1;oe<Z.length-1;oe++)if(G(P.getLine(X+oe))!=Z[oe])continue e;var Re=P.getLine(ce+1-Z.length),Ue=G(Re);if(Ue.slice(Ue.length-Z[0].length)!=Z[0])continue e;return{from:v(ce+1-Z.length,K(Re,Ue,Re.length-Z[0].length,G)),to:v(ce,K(be,me,fe.length,G))}}}}function L(P,V,X,z){this.atOccurrence=!1,this.doc=P,X=X?P.clipPos(X):v(0,0),this.pos={from:X,to:X};var G;typeof z=="object"?G=z.caseFold:(G=z,z=null),typeof V=="string"?(G==null&&(G=!1),this.matches=function(Z,ce){return(Z?Q:R)(P,V,ce,G)}):(V=d(V,"gm"),!z||z.multiline!==!1?this.matches=function(Z,ce){return(Z?B:w)(P,V,ce)}:this.matches=function(Z,ce){return(Z?D:A)(P,V,ce)})}L.prototype={findNext:function(){return this.find(!1)},findPrevious:function(){return this.find(!0)},find:function(P){for(var V=this.matches(P,this.doc.clipPos(P?this.pos.from:this.pos.to));V&&c.cmpPos(V.from,V.to)==0;)P?V.from.ch?V.from=v(V.from.line,V.from.ch-1):V.from.line==this.doc.firstLine()?V=null:V=this.matches(P,this.doc.clipPos(v(V.from.line-1))):V.to.ch<this.doc.getLine(V.to.line).length?V.to=v(V.to.line,V.to.ch+1):V.to.line==this.doc.lastLine()?V=null:V=this.matches(P,v(V.to.line+1,0));if(V)return this.pos=V,this.atOccurrence=!0,this.pos.match||!0;var X=v(P?this.doc.firstLine():this.doc.lastLine()+1,0);return this.pos={from:X,to:X},this.atOccurrence=!1},from:function(){if(this.atOccurrence)return this.pos.from},to:function(){if(this.atOccurrence)return this.pos.to},replace:function(P,V){if(!!this.atOccurrence){var X=c.splitLines(P);this.doc.replaceRange(X,this.pos.from,this.pos.to,V),this.pos.to=v(this.pos.from.line+X.length-1,X[X.length-1].length+(X.length==1?this.pos.from.ch:0))}}},c.defineExtension("getSearchCursor",function(P,V,X){return new L(this.doc,P,V,X)}),c.defineDocExtension("getSearchCursor",function(P,V,X){return new L(this,P,V,X)}),c.defineExtension("selectMatches",function(P,V){for(var X=[],z=this.getSearchCursor(P,this.getCursor("from"),V);z.findNext()&&!(c.cmpPos(z.to(),this.getCursor("to"))>0);)X.push({anchor:z.from(),head:z.to()});X.length&&this.setSelections(X,0)})})},4631:function(h){(function(F,o){h.exports=o()})(this,function(){"use strict";var F=navigator.userAgent,o=navigator.platform,c=/gecko\/\d/i.test(F),v=/MSIE \d/.test(F),m=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(F),d=/Edge\/(\d+)/.exec(F),x=v||m||d,A=x&&(v?document.documentMode||6:+(d||m)[1]),w=!d&&/WebKit\//.test(F),T=w&&/Qt\/\d+\.\d+/.test(F),D=!d&&/Chrome\//.test(F),B=/Opera\//.test(F),U=/Apple Computer/.test(navigator.vendor),ee=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(F),K=/PhantomJS/.test(F),R=U&&(/Mobile\/\w+/.test(F)||navigator.maxTouchPoints>2),Q=/Android/.test(F),L=R||Q||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(F),P=R||/Mac/.test(o),V=/\bCrOS\b/.test(F),X=/win/i.test(o),z=B&&F.match(/Version\/(\d*\.\d*)/);z&&(z=Number(z[1])),z&&z>=15&&(B=!1,w=!0);var G=P&&(T||B&&(z==null||z<12.11)),Z=c||x&&A>=9;function ce(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var te=function(e,n){var u=e.className,l=ce(n).exec(u);if(l){var f=u.slice(l.index+l[0].length);e.className=u.slice(0,l.index)+(f?l[1]+f:"")}};function se(e){for(var n=e.childNodes.length;n>0;--n)e.removeChild(e.firstChild);return e}function be(e,n){return se(e).appendChild(n)}function me(e,n,u,l){var f=document.createElement(e);if(u&&(f.className=u),l&&(f.style.cssText=l),typeof n=="string")f.appendChild(document.createTextNode(n));else if(n)for(var g=0;g<n.length;++g)f.appendChild(n[g]);return f}function he(e,n,u,l){var f=me(e,n,u,l);return f.setAttribute("role","presentation"),f}var fe;document.createRange?fe=function(e,n,u,l){var f=document.createRange();return f.setEnd(l||e,u),f.setStart(e,n),f}:fe=function(e,n,u){var l=document.body.createTextRange();try{l.moveToElementText(e.parentNode)}catch(f){return l}return l.collapse(!0),l.moveEnd("character",u),l.moveStart("character",n),l};function oe(e,n){if(n.nodeType==3&&(n=n.parentNode),e.contains)return e.contains(n);do if(n.nodeType==11&&(n=n.host),n==e)return!0;while(n=n.parentNode)}function Re(){var e;try{e=document.activeElement}catch(n){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function Ue(e,n){var u=e.className;ce(n).test(u)||(e.className+=(u?" ":"")+n)}function Le(e,n){for(var u=e.split(" "),l=0;l<u.length;l++)u[l]&&!ce(u[l]).test(n)&&(n+=" "+u[l]);return n}var ke=function(e){e.select()};R?ke=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:x&&(ke=function(e){try{e.select()}catch(n){}});function tt(e){var n=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,n)}}function Je(e,n,u){n||(n={});for(var l in e)e.hasOwnProperty(l)&&(u!==!1||!n.hasOwnProperty(l))&&(n[l]=e[l]);return n}function qe(e,n,u,l,f){n==null&&(n=e.search(/[^\s\u00a0]/),n==-1&&(n=e.length));for(var g=l||0,k=f||0;;){var j=e.indexOf(" ",g);if(j<0||j>=n)return k+(n-g);k+=j-g,k+=u-k%u,g=j+1}}var at=function(){this.id=null,this.f=null,this.time=0,this.handler=tt(this.onTimeout,this)};at.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},at.prototype.set=function(e,n){this.f=n;var u=+new Date+e;(!this.id||u<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=u)};function ut(e,n){for(var u=0;u<e.length;++u)if(e[u]==n)return u;return-1}var gt=50,Ze={toString:function(){return"CodeMirror.Pass"}},lt={scroll:!1},pt={origin:"*mouse"},vt={origin:"+move"};function dt(e,n,u){for(var l=0,f=0;;){var g=e.indexOf(" ",l);g==-1&&(g=e.length);var k=g-l;if(g==e.length||f+k>=n)return l+Math.min(k,n-f);if(f+=g-l,f+=u-f%u,l=g+1,f>=n)return l}}var It=[""];function Ft(e){for(;It.length<=e;)It.push(Et(It)+" ");return It[e]}function Et(e){return e[e.length-1]}function Ut(e,n){for(var u=[],l=0;l<e.length;l++)u[l]=n(e[l],l);return u}function jt(e,n,u){for(var l=0,f=u(n);l<e.length&&u(e[l])<=f;)l++;e.splice(l,0,n)}function Gt(){}function wt(e,n){var u;return Object.create?u=Object.create(e):(Gt.prototype=e,u=new Gt),n&&Je(n,u),u}var Mt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function bt(e){return/\w/.test(e)||e>"\x80"&&(e.toUpperCase()!=e.toLowerCase()||Mt.test(e))}function ve(e,n){return n?n.source.indexOf("\\w")>-1&&bt(e)?!0:n.test(e):bt(e)}function $(e){for(var n in e)if(e.hasOwnProperty(n)&&e[n])return!1;return!0}var Y=/[\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 ye(e){return e.charCodeAt(0)>=768&&Y.test(e)}function de(e,n,u){for(;(u<0?n>0:n<e.length)&&ye(e.charAt(n));)n+=u;return n}function Ae(e,n,u){for(var l=n>u?-1:1;;){if(n==u)return n;var f=(n+u)/2,g=l<0?Math.ceil(f):Math.floor(f);if(g==n)return e(g)?n:u;e(g)?u=g:n=g+l}}function S(e,n,u,l){if(!e)return l(n,u,"ltr",0);for(var f=!1,g=0;g<e.length;++g){var k=e[g];(k.from<u&&k.to>n||n==u&&k.to==n)&&(l(Math.max(k.from,n),Math.min(k.to,u),k.level==1?"rtl":"ltr",g),f=!0)}f||l(n,u,"ltr")}var Pe=null;function H(e,n,u){var l;Pe=null;for(var f=0;f<e.length;++f){var g=e[f];if(g.from<n&&g.to>n)return f;g.to==n&&(g.from!=g.to&&u=="before"?l=f:Pe=f),g.from==n&&(g.from!=g.to&&u!="before"?l=f:Pe=f)}return l!=null?l:Pe}var O=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",n="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function u(q){return q<=247?e.charAt(q):1424<=q&&q<=1524?"R":1536<=q&&q<=1785?n.charAt(q-1536):1774<=q&&q<=2220?"r":8192<=q&&q<=8203?"w":q==8204?"b":"L"}var l=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,f=/[stwN]/,g=/[LRr]/,k=/[Lb1n]/,j=/[1n]/;function W(q,we,Ee){this.level=q,this.from=we,this.to=Ee}return function(q,we){var Ee=we=="ltr"?"L":"R";if(q.length==0||we=="ltr"&&!l.test(q))return!1;for(var Ne=q.length,Me=[],Ye=0;Ye<Ne;++Ye)Me.push(u(q.charCodeAt(Ye)));for(var et=0,ot=Ee;et<Ne;++et){var ft=Me[et];ft=="m"?Me[et]=ot:ot=ft}for(var yt=0,ct=Ee;yt<Ne;++yt){var mt=Me[yt];mt=="1"&&ct=="r"?Me[yt]="n":g.test(mt)&&(ct=mt,mt=="r"&&(Me[yt]="R"))}for(var Pt=1,Ot=Me[0];Pt<Ne-1;++Pt){var Ht=Me[Pt];Ht=="+"&&Ot=="1"&&Me[Pt+1]=="1"?Me[Pt]="1":Ht==","&&Ot==Me[Pt+1]&&(Ot=="1"||Ot=="n")&&(Me[Pt]=Ot),Ot=Ht}for(var ar=0;ar<Ne;++ar){var Lr=Me[ar];if(Lr==",")Me[ar]="N";else if(Lr=="%"){var gr=void 0;for(gr=ar+1;gr<Ne&&Me[gr]=="%";++gr);for(var vn=ar&&Me[ar-1]=="!"||gr<Ne&&Me[gr]=="1"?"1":"N",an=ar;an<gr;++an)Me[an]=vn;ar=gr-1}}for(var kr=0,en=Ee;kr<Ne;++kr){var zr=Me[kr];en=="L"&&zr=="1"?Me[kr]="L":g.test(zr)&&(en=zr)}for(var Nr=0;Nr<Ne;++Nr)if(f.test(Me[Nr])){var Er=void 0;for(Er=Nr+1;Er<Ne&&f.test(Me[Er]);++Er);for(var dr=(Nr?Me[Nr-1]:Ee)=="L",sn=(Er<Ne?Me[Er]:Ee)=="L",ni=dr==sn?dr?"L":"R":Ee,vi=Nr;vi<Er;++vi)Me[vi]=ni;Nr=Er-1}for(var cr=[],gi,Dr=0;Dr<Ne;)if(k.test(Me[Dr])){var us=Dr;for(++Dr;Dr<Ne&&k.test(Me[Dr]);++Dr);cr.push(new W(0,us,Dr))}else{var ii=Dr,io=cr.length,oo=we=="rtl"?1:0;for(++Dr;Dr<Ne&&Me[Dr]!="L";++Dr);for(var Yr=ii;Yr<Dr;)if(j.test(Me[Yr])){ii<Yr&&(cr.splice(io,0,new W(1,ii,Yr)),io+=oo);var Bo=Yr;for(++Yr;Yr<Dr&&j.test(Me[Yr]);++Yr);cr.splice(io,0,new W(2,Bo,Yr)),io+=oo,ii=Yr}else++Yr;ii<Dr&&cr.splice(io,0,new W(1,ii,Dr))}return we=="ltr"&&(cr[0].level==1&&(gi=q.match(/^\s+/))&&(cr[0].from=gi[0].length,cr.unshift(new W(0,0,gi[0].length))),Et(cr).level==1&&(gi=q.match(/\s+$/))&&(Et(cr).to-=gi[0].length,cr.push(new W(0,Ne-gi[0].length,Ne)))),we=="rtl"?cr.reverse():cr}}();function I(e,n){var u=e.order;return u==null&&(u=e.order=O(e.text,n)),u}var re=[],N=function(e,n,u){if(e.addEventListener)e.addEventListener(n,u,!1);else if(e.attachEvent)e.attachEvent("on"+n,u);else{var l=e._handlers||(e._handlers={});l[n]=(l[n]||re).concat(u)}};function _(e,n){return e._handlers&&e._handlers[n]||re}function ue(e,n,u){if(e.removeEventListener)e.removeEventListener(n,u,!1);else if(e.detachEvent)e.detachEvent("on"+n,u);else{var l=e._handlers,f=l&&l[n];if(f){var g=ut(f,u);g>-1&&(l[n]=f.slice(0,g).concat(f.slice(g+1)))}}}function Oe(e,n){var u=_(e,n);if(!!u.length)for(var l=Array.prototype.slice.call(arguments,2),f=0;f<u.length;++f)u[f].apply(null,l)}function Ie(e,n,u){return typeof n=="string"&&(n={type:n,preventDefault:function(){this.defaultPrevented=!0}}),Oe(e,u||n.type,e,n),Ct(n)||n.codemirrorIgnore}function Te(e){var n=e._handlers&&e._handlers.cursorActivity;if(!!n)for(var u=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),l=0;l<n.length;++l)ut(u,n[l])==-1&&u.push(n[l])}function We(e,n){return _(e,n).length>0}function He(e){e.prototype.on=function(n,u){N(this,n,u)},e.prototype.off=function(n,u){ue(this,n,u)}}function nt(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ht(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Ct(e){return e.defaultPrevented!=null?e.defaultPrevented:e.returnValue==!1}function Yt(e){nt(e),ht(e)}function kt(e){return e.target||e.srcElement}function yn(e){var n=e.which;return n==null&&(e.button&1?n=1:e.button&2?n=3:e.button&4&&(n=2)),P&&e.ctrlKey&&n==1&&(n=3),n}var Xr=function(){if(x&&A<9)return!1;var e=me("div");return"draggable"in e||"dragDrop"in e}(),Tn;function Ui(e){if(Tn==null){var n=me("span","\u200B");be(e,me("span",[n,document.createTextNode("x")])),e.firstChild.offsetHeight!=0&&(Tn=n.offsetWidth<=1&&n.offsetHeight>2&&!(x&&A<8))}var u=Tn?me("span","\u200B"):me("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return u.setAttribute("cm-text",""),u}var jr;function jn(e){if(jr!=null)return jr;var n=be(e,document.createTextNode("A\u062EA")),u=fe(n,0,1).getBoundingClientRect(),l=fe(n,1,2).getBoundingClientRect();return se(e),!u||u.left==u.right?!1:jr=l.right-u.right<3}var $n=`
19
+
20
+ b`.split(/\n/).length!=3?function(e){for(var n=0,u=[],l=e.length;n<=l;){var f=e.indexOf(`
21
+ `,n);f==-1&&(f=e.length);var g=e.slice(n,e.charAt(f-1)=="\r"?f-1:f),k=g.indexOf("\r");k!=-1?(u.push(g.slice(0,k)),n+=k+1):(u.push(g),n=f+1)}return u}:function(e){return e.split(/\r\n?|\n/)},Pn=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(n){return!1}}:function(e){var n;try{n=e.ownerDocument.selection.createRange()}catch(u){}return!n||n.parentElement()!=e?!1:n.compareEndPoints("StartToEnd",n)!=0},Kn=function(){var e=me("div");return"oncopy"in e?!0:(e.setAttribute("oncopy","return;"),typeof e.oncopy=="function")}(),ln=null;function Ca(e){if(ln!=null)return ln;var n=be(e,me("span","x")),u=n.getBoundingClientRect(),l=fe(n,0,1).getBoundingClientRect();return ln=Math.abs(u.left-l.left)>1}var Ho={},mn={};function Yn(e,n){arguments.length>2&&(n.dependencies=Array.prototype.slice.call(arguments,2)),Ho[e]=n}function bi(e,n){mn[e]=n}function ji(e){if(typeof e=="string"&&mn.hasOwnProperty(e))e=mn[e];else if(e&&typeof e.name=="string"&&mn.hasOwnProperty(e.name)){var n=mn[e.name];typeof n=="string"&&(n={name:n}),e=wt(n,e),e.name=n.name}else{if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ji("application/xml");if(typeof e=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ji("application/json")}return typeof e=="string"?{name:e}:e||{name:"null"}}function Vn(e,n){n=ji(n);var u=Ho[n.name];if(!u)return Vn(e,"text/plain");var l=u(e,n);if(wi.hasOwnProperty(n.name)){var f=wi[n.name];for(var g in f)!f.hasOwnProperty(g)||(l.hasOwnProperty(g)&&(l["_"+g]=l[g]),l[g]=f[g])}if(l.name=n.name,n.helperType&&(l.helperType=n.helperType),n.modeProps)for(var k in n.modeProps)l[k]=n.modeProps[k];return l}var wi={};function Oa(e,n){var u=wi.hasOwnProperty(e)?wi[e]:wi[e]={};Je(n,u)}function In(e,n){if(n===!0)return n;if(e.copyState)return e.copyState(n);var u={};for(var l in n){var f=n[l];f instanceof Array&&(f=f.concat([])),u[l]=f}return u}function xn(e,n){for(var u;e.innerMode&&(u=e.innerMode(n),!(!u||u.mode==e));)n=u.state,e=u.mode;return u||{mode:e,state:n}}function Si(e,n,u){return e.startState?e.startState(n,u):!0}var xr=function(e,n,u){this.pos=this.start=0,this.string=e,this.tabSize=n||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=u};xr.prototype.eol=function(){return this.pos>=this.string.length},xr.prototype.sol=function(){return this.pos==this.lineStart},xr.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},xr.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},xr.prototype.eat=function(e){var n=this.string.charAt(this.pos),u;if(typeof e=="string"?u=n==e:u=n&&(e.test?e.test(n):e(n)),u)return++this.pos,n},xr.prototype.eatWhile=function(e){for(var n=this.pos;this.eat(e););return this.pos>n},xr.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},xr.prototype.skipToEnd=function(){this.pos=this.string.length},xr.prototype.skipTo=function(e){var n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0},xr.prototype.backUp=function(e){this.pos-=e},xr.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},xr.prototype.indentation=function(){return qe(this.string,null,this.tabSize)-(this.lineStart?qe(this.string,this.lineStart,this.tabSize):0)},xr.prototype.match=function(e,n,u){if(typeof e=="string"){var l=function(k){return u?k.toLowerCase():k},f=this.string.substr(this.pos,e.length);if(l(f)==l(e))return n!==!1&&(this.pos+=e.length),!0}else{var g=this.string.slice(this.pos).match(e);return g&&g.index>0?null:(g&&n!==!1&&(this.pos+=g[0].length),g)}},xr.prototype.current=function(){return this.string.slice(this.start,this.pos)},xr.prototype.hideFirstChars=function(e,n){this.lineStart+=e;try{return n()}finally{this.lineStart-=e}},xr.prototype.lookAhead=function(e){var n=this.lineOracle;return n&&n.lookAhead(e)},xr.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};function St(e,n){if(n-=e.first,n<0||n>=e.size)throw new Error("There is no line "+(n+e.first)+" in the document.");for(var u=e;!u.lines;)for(var l=0;;++l){var f=u.children[l],g=f.chunkSize();if(n<g){u=f;break}n-=g}return u.lines[n]}function ai(e,n,u){var l=[],f=n.line;return e.iter(n.line,u.line+1,function(g){var k=g.text;f==u.line&&(k=k.slice(0,u.ch)),f==n.line&&(k=k.slice(n.ch)),l.push(k),++f}),l}function Ai(e,n,u){var l=[];return e.iter(n,u,function(f){l.push(f.text)}),l}function bn(e,n){var u=n-e.height;if(u)for(var l=e;l;l=l.parent)l.height+=u}function er(e){if(e.parent==null)return null;for(var n=e.parent,u=ut(n.lines,e),l=n.parent;l;n=l,l=l.parent)for(var f=0;l.children[f]!=n;++f)u+=l.children[f].chunkSize();return u+n.first}function Hn(e,n){var u=e.first;e:do{for(var l=0;l<e.children.length;++l){var f=e.children[l],g=f.height;if(n<g){e=f;continue e}n-=g,u+=f.chunkSize()}return u}while(!e.lines);for(var k=0;k<e.lines.length;++k){var j=e.lines[k],W=j.height;if(n<W)break;n-=W}return u+k}function Jn(e,n){return n>=e.first&&n<e.first+e.size}function lo(e,n){return String(e.lineNumberFormatter(n+e.firstLineNumber))}function rt(e,n,u){if(u===void 0&&(u=null),!(this instanceof rt))return new rt(e,n,u);this.line=e,this.ch=n,this.sticky=u}function Lt(e,n){return e.line-n.line||e.ch-n.ch}function si(e,n){return e.sticky==n.sticky&&Lt(e,n)==0}function ae(e){return rt(e.line,e.ch)}function Ce(e,n){return Lt(e,n)<0?n:e}function Qe(e,n){return Lt(e,n)<0?e:n}function it(e,n){return Math.max(e.first,Math.min(n,e.first+e.size-1))}function st(e,n){if(n.line<e.first)return rt(e.first,0);var u=e.first+e.size-1;return n.line>u?rt(u,St(e,u).text.length):$t(n,St(e,n.line).text.length)}function $t(e,n){var u=e.ch;return u==null||u>n?rt(e.line,n):u<0?rt(e.line,0):e}function Zt(e,n){for(var u=[],l=0;l<n.length;l++)u[l]=st(e,n[l]);return u}var Tr=function(e,n){this.state=e,this.lookAhead=n},Pr=function(e,n,u,l){this.state=n,this.doc=e,this.line=u,this.maxLookAhead=l||0,this.baseTokens=null,this.baseTokenPos=1};Pr.prototype.lookAhead=function(e){var n=this.doc.getLine(this.line+e);return n!=null&&e>this.maxLookAhead&&(this.maxLookAhead=e),n},Pr.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var n=this.baseTokens[this.baseTokenPos+1];return{type:n&&n.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},Pr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Pr.fromSaved=function(e,n,u){return n instanceof Tr?new Pr(e,In(e.mode,n.state),u,n.lookAhead):new Pr(e,In(e.mode,n),u)},Pr.prototype.save=function(e){var n=e!==!1?In(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new Tr(n,this.maxLookAhead):n};function tr(e,n,u,l){var f=[e.state.modeGen],g={};Ll(e,n.text,e.doc.mode,u,function(q,we){return f.push(q,we)},g,l);for(var k=u.state,j=function(q){u.baseTokens=f;var we=e.state.overlays[q],Ee=1,Ne=0;u.state=!0,Ll(e,n.text,we.mode,u,function(Me,Ye){for(var et=Ee;Ne<Me;){var ot=f[Ee];ot>Me&&f.splice(Ee,1,Me,f[Ee+1],ot),Ee+=2,Ne=Math.min(Me,ot)}if(!!Ye)if(we.opaque)f.splice(et,Ee-et,Me,"overlay "+Ye),Ee=et+2;else for(;et<Ee;et+=2){var ft=f[et+1];f[et+1]=(ft?ft+" ":"")+"overlay "+Ye}},g),u.state=k,u.baseTokens=null,u.baseTokenPos=1},W=0;W<e.state.overlays.length;++W)j(W);return{styles:f,classes:g.bgClass||g.textClass?g:null}}function Rl(e,n,u){if(!n.styles||n.styles[0]!=e.state.modeGen){var l=Qr(e,er(n)),f=n.text.length>e.options.maxHighlightLength&&In(e.doc.mode,l.state),g=tr(e,n,l);f&&(l.state=f),n.stateAfter=l.save(!f),n.styles=g.styles,g.classes?n.styleClasses=g.classes:n.styleClasses&&(n.styleClasses=null),u===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return n.styles}function Qr(e,n,u){var l=e.doc,f=e.display;if(!l.mode.startState)return new Pr(l,!0,n);var g=bf(e,n,u),k=g>l.first&&St(l,g-1).stateAfter,j=k?Pr.fromSaved(l,k,g):new Pr(l,Si(l.mode),g);return l.iter(g,n,function(W){ms(e,W.text,j);var q=j.line;W.stateAfter=q==n-1||q%5==0||q>=f.viewFrom&&q<f.viewTo?j.save():null,j.nextLine()}),u&&(l.modeFrontier=j.line),j}function ms(e,n,u,l){var f=e.doc.mode,g=new xr(n,e.options.tabSize,u);for(g.start=g.pos=l||0,n==""&&Ta(f,u.state);!g.eol();)xs(f,g,u.state),g.start=g.pos}function Ta(e,n){if(e.blankLine)return e.blankLine(n);if(!!e.innerMode){var u=xn(e,n);if(u.mode.blankLine)return u.mode.blankLine(u.state)}}function xs(e,n,u,l){for(var f=0;f<10;f++){l&&(l[0]=xn(e,u).mode);var g=e.token(n,u);if(n.pos>n.start)return g}throw new Error("Mode "+e.name+" failed to advance stream.")}var bs=function(e,n,u){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=n||null,this.state=u};function ws(e,n,u,l){var f=e.doc,g=f.mode,k;n=st(f,n);var j=St(f,n.line),W=Qr(e,n.line,u),q=new xr(j.text,e.options.tabSize,W),we;for(l&&(we=[]);(l||q.pos<n.ch)&&!q.eol();)q.start=q.pos,k=xs(g,q,W.state),l&&we.push(new bs(q,k,In(f.mode,W.state)));return l?we:new bs(q,k,W.state)}function Ml(e,n){if(e)for(;;){var u=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!u)break;e=e.slice(0,u.index)+e.slice(u.index+u[0].length);var l=u[1]?"bgClass":"textClass";n[l]==null?n[l]=u[2]:new RegExp("(?:^|\\s)"+u[2]+"(?:$|\\s)").test(n[l])||(n[l]+=" "+u[2])}return e}function Ll(e,n,u,l,f,g,k){var j=u.flattenSpans;j==null&&(j=e.options.flattenSpans);var W=0,q=null,we=new xr(n,e.options.tabSize,l),Ee,Ne=e.options.addModeClass&&[null];for(n==""&&Ml(Ta(u,l.state),g);!we.eol();){if(we.pos>e.options.maxHighlightLength?(j=!1,k&&ms(e,n,l,we.pos),we.pos=n.length,Ee=null):Ee=Ml(xs(u,we,l.state,Ne),g),Ne){var Me=Ne[0].name;Me&&(Ee="m-"+(Ee?Me+" "+Ee:Me))}if(!j||q!=Ee){for(;W<we.start;)W=Math.min(we.start,W+5e3),f(W,q);q=Ee}we.start=we.pos}for(;W<we.pos;){var Ye=Math.min(we.pos,W+5e3);f(Ye,q),W=Ye}}function bf(e,n,u){for(var l,f,g=e.doc,k=u?-1:n-(e.doc.mode.innerMode?1e3:100),j=n;j>k;--j){if(j<=g.first)return g.first;var W=St(g,j-1),q=W.stateAfter;if(q&&(!u||j+(q instanceof Tr?q.lookAhead:0)<=g.modeFrontier))return j;var we=qe(W.text,null,e.options.tabSize);(f==null||l>we)&&(f=j-1,l=we)}return f}function wf(e,n){if(e.modeFrontier=Math.min(e.modeFrontier,n),!(e.highlightFrontier<n-10)){for(var u=e.first,l=n-1;l>u;l--){var f=St(e,l).stateAfter;if(f&&(!(f instanceof Tr)||l+f.lookAhead<n)){u=l+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,u)}}var Sf=!1,Ei=!1;function Af(){Sf=!0}function Ef(){Ei=!0}function Pa(e,n,u){this.marker=e,this.from=n,this.to=u}function Wo(e,n){if(e)for(var u=0;u<e.length;++u){var l=e[u];if(l.marker==n)return l}}function Cf(e,n){for(var u,l=0;l<e.length;++l)e[l]!=n&&(u||(u=[])).push(e[l]);return u}function wd(e,n,u){var l=u&&window.WeakSet&&(u.markedSpans||(u.markedSpans=new WeakSet));l&&l.has(e.markedSpans)?e.markedSpans.push(n):(e.markedSpans=e.markedSpans?e.markedSpans.concat([n]):[n],l&&l.add(e.markedSpans)),n.marker.attachLine(e)}function Sd(e,n,u){var l;if(e)for(var f=0;f<e.length;++f){var g=e[f],k=g.marker,j=g.from==null||(k.inclusiveLeft?g.from<=n:g.from<n);if(j||g.from==n&&k.type=="bookmark"&&(!u||!g.marker.insertLeft)){var W=g.to==null||(k.inclusiveRight?g.to>=n:g.to>n);(l||(l=[])).push(new Pa(k,g.from,W?null:g.to))}}return l}function Ad(e,n,u){var l;if(e)for(var f=0;f<e.length;++f){var g=e[f],k=g.marker,j=g.to==null||(k.inclusiveRight?g.to>=n:g.to>n);if(j||g.from==n&&k.type=="bookmark"&&(!u||g.marker.insertLeft)){var W=g.from==null||(k.inclusiveLeft?g.from<=n:g.from<n);(l||(l=[])).push(new Pa(k,W?null:g.from-n,g.to==null?null:g.to-n))}}return l}function Nl(e,n){if(n.full)return null;var u=Jn(e,n.from.line)&&St(e,n.from.line).markedSpans,l=Jn(e,n.to.line)&&St(e,n.to.line).markedSpans;if(!u&&!l)return null;var f=n.from.ch,g=n.to.ch,k=Lt(n.from,n.to)==0,j=Sd(u,f,k),W=Ad(l,g,k),q=n.text.length==1,we=Et(n.text).length+(q?f:0);if(j)for(var Ee=0;Ee<j.length;++Ee){var Ne=j[Ee];if(Ne.to==null){var Me=Wo(W,Ne.marker);Me?q&&(Ne.to=Me.to==null?null:Me.to+we):Ne.to=f}}if(W)for(var Ye=0;Ye<W.length;++Ye){var et=W[Ye];if(et.to!=null&&(et.to+=we),et.from==null){var ot=Wo(j,et.marker);ot||(et.from=we,q&&(j||(j=[])).push(et))}else et.from+=we,q&&(j||(j=[])).push(et)}j&&(j=Dl(j)),W&&W!=j&&(W=Dl(W));var ft=[j];if(!q){var yt=n.text.length-2,ct;if(yt>0&&j)for(var mt=0;mt<j.length;++mt)j[mt].to==null&&(ct||(ct=[])).push(new Pa(j[mt].marker,null,null));for(var Pt=0;Pt<yt;++Pt)ft.push(ct);ft.push(W)}return ft}function Dl(e){for(var n=0;n<e.length;++n){var u=e[n];u.from!=null&&u.from==u.to&&u.marker.clearWhenEmpty!==!1&&e.splice(n--,1)}return e.length?e:null}function Bl(e,n,u){var l=null;if(e.iter(n.line,u.line+1,function(Me){if(Me.markedSpans)for(var Ye=0;Ye<Me.markedSpans.length;++Ye){var et=Me.markedSpans[Ye].marker;et.readOnly&&(!l||ut(l,et)==-1)&&(l||(l=[])).push(et)}}),!l)return null;for(var f=[{from:n,to:u}],g=0;g<l.length;++g)for(var k=l[g],j=k.find(0),W=0;W<f.length;++W){var q=f[W];if(!(Lt(q.to,j.from)<0||Lt(q.from,j.to)>0)){var we=[W,1],Ee=Lt(q.from,j.from),Ne=Lt(q.to,j.to);(Ee<0||!k.inclusiveLeft&&!Ee)&&we.push({from:q.from,to:j.from}),(Ne>0||!k.inclusiveRight&&!Ne)&&we.push({from:j.to,to:q.to}),f.splice.apply(f,we),W+=we.length-3}}return f}function Ul(e){var n=e.markedSpans;if(!!n){for(var u=0;u<n.length;++u)n[u].marker.detachLine(e);e.markedSpans=null}}function Of(e,n){if(!!n){for(var u=0;u<n.length;++u)n[u].marker.attachLine(e);e.markedSpans=n}}function Ss(e){return e.inclusiveLeft?-1:0}function As(e){return e.inclusiveRight?1:0}function jl(e,n){var u=e.lines.length-n.lines.length;if(u!=0)return u;var l=e.find(),f=n.find(),g=Lt(l.from,f.from)||Ss(e)-Ss(n);if(g)return-g;var k=Lt(l.to,f.to)||As(e)-As(n);return k||n.id-e.id}function Ia(e,n){var u=Ei&&e.markedSpans,l;if(u)for(var f=void 0,g=0;g<u.length;++g)f=u[g],f.marker.collapsed&&(n?f.from:f.to)==null&&(!l||jl(l,f.marker)<0)&&(l=f.marker);return l}function zt(e){return Ia(e,!0)}function Vi(e){return Ia(e,!1)}function Vt(e,n){var u=Ei&&e.markedSpans,l;if(u)for(var f=0;f<u.length;++f){var g=u[f];g.marker.collapsed&&(g.from==null||g.from<n)&&(g.to==null||g.to>n)&&(!l||jl(l,g.marker)<0)&&(l=g.marker)}return l}function At(e,n,u,l,f){var g=St(e,n),k=Ei&&g.markedSpans;if(k)for(var j=0;j<k.length;++j){var W=k[j];if(!!W.marker.collapsed){var q=W.marker.find(0),we=Lt(q.from,u)||Ss(W.marker)-Ss(f),Ee=Lt(q.to,l)||As(W.marker)-As(f);if(!(we>=0&&Ee<=0||we<=0&&Ee>=0)&&(we<=0&&(W.marker.inclusiveRight&&f.inclusiveLeft?Lt(q.to,u)>=0:Lt(q.to,u)>0)||we>=0&&(W.marker.inclusiveRight&&f.inclusiveLeft?Lt(q.from,l)<=0:Lt(q.from,l)<0)))return!0}}}function Ir(e){for(var n;n=zt(e);)e=n.find(-1,!0).line;return e}function Tf(e){for(var n;n=Vi(e);)e=n.find(1,!0).line;return e}function Pf(e){for(var n,u;n=Vi(e);)e=n.find(1,!0).line,(u||(u=[])).push(e);return u}function Es(e,n){var u=St(e,n),l=Ir(u);return u==l?n:er(l)}function Cs(e,n){if(n>e.lastLine())return n;var u=St(e,n),l;if(!Ci(e,u))return n;for(;l=Vi(u);)u=l.find(1,!0).line;return er(u)+1}function Ci(e,n){var u=Ei&&n.markedSpans;if(u){for(var l=void 0,f=0;f<u.length;++f)if(l=u[f],!!l.marker.collapsed){if(l.from==null)return!0;if(!l.marker.widgetNode&&l.from==0&&l.marker.inclusiveLeft&&Os(e,n,l))return!0}}}function Os(e,n,u){if(u.to==null){var l=u.marker.find(1,!0);return Os(e,l.line,Wo(l.line.markedSpans,u.marker))}if(u.marker.inclusiveRight&&u.to==n.text.length)return!0;for(var f=void 0,g=0;g<n.markedSpans.length;++g)if(f=n.markedSpans[g],f.marker.collapsed&&!f.marker.widgetNode&&f.from==u.to&&(f.to==null||f.to!=u.from)&&(f.marker.inclusiveLeft||u.marker.inclusiveRight)&&Os(e,n,f))return!0}function Xn(e){e=Ir(e);for(var n=0,u=e.parent,l=0;l<u.lines.length;++l){var f=u.lines[l];if(f==e)break;n+=f.height}for(var g=u.parent;g;u=g,g=u.parent)for(var k=0;k<g.children.length;++k){var j=g.children[k];if(j==u)break;n+=j.height}return n}function Hi(e){if(e.height==0)return 0;for(var n=e.text.length,u,l=e;u=zt(l);){var f=u.find(0,!0);l=f.from.line,n+=f.from.ch-f.to.ch}for(l=e;u=Vi(l);){var g=u.find(0,!0);n-=l.text.length-g.from.ch,l=g.to.line,n+=l.text.length-g.to.ch}return n}function Fa(e){var n=e.display,u=e.doc;n.maxLine=St(u,u.first),n.maxLineLength=Hi(n.maxLine),n.maxLineChanged=!0,u.iter(function(l){var f=Hi(l);f>n.maxLineLength&&(n.maxLineLength=f,n.maxLine=l)})}var Wi=function(e,n,u){this.text=e,Of(this,n),this.height=u?u(this):1};Wi.prototype.lineNo=function(){return er(this)},He(Wi);function Vl(e,n,u,l){e.text=n,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),e.order!=null&&(e.order=null),Ul(e),Of(e,u);var f=l?l(e):1;f!=e.height&&bn(e,f)}function If(e){e.parent=null,Ul(e)}var Ff={},Hl={};function Wl(e,n){if(!e||/^\s*$/.test(e))return null;var u=n.addModeClass?Hl:Ff;return u[e]||(u[e]=e.replace(/\S+/g,"cm-$&"))}function uo(e,n){var u=he("span",null,null,w?"padding-right: .1px":null),l={pre:he("pre",[u],"CodeMirror-line"),content:u,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};n.measure={};for(var f=0;f<=(n.rest?n.rest.length:0);f++){var g=f?n.rest[f-1]:n.line,k=void 0;l.pos=0,l.addToken=Ed,jn(e.display.measure)&&(k=I(g,e.doc.direction))&&(l.addToken=kf(l.addToken,k)),l.map=[];var j=n!=e.display.externalMeasured&&er(g);nn(g,l,Rl(e,g,j)),g.styleClasses&&(g.styleClasses.bgClass&&(l.bgClass=Le(g.styleClasses.bgClass,l.bgClass||"")),g.styleClasses.textClass&&(l.textClass=Le(g.styleClasses.textClass,l.textClass||""))),l.map.length==0&&l.map.push(0,0,l.content.appendChild(Ui(e.display.measure))),f==0?(n.measure.map=l.map,n.measure.cache={}):((n.measure.maps||(n.measure.maps=[])).push(l.map),(n.measure.caches||(n.measure.caches=[])).push({}))}if(w){var W=l.content.lastChild;(/\bcm-tab\b/.test(W.className)||W.querySelector&&W.querySelector(".cm-tab"))&&(l.content.className="cm-tab-wrap-hack")}return Oe(e,"renderLine",e,n.line,l.pre),l.pre.className&&(l.textClass=Le(l.pre.className,l.textClass||"")),l}function un(e){var n=me("span","\u2022","cm-invalidchar");return n.title="\\u"+e.charCodeAt(0).toString(16),n.setAttribute("aria-label",n.title),n}function Ed(e,n,u,l,f,g,k){if(!!n){var j=e.splitSpaces?zo(n,e.trailingSpace):n,W=e.cm.state.specialChars,q=!1,we;if(!W.test(n))e.col+=n.length,we=document.createTextNode(j),e.map.push(e.pos,e.pos+n.length,we),x&&A<9&&(q=!0),e.pos+=n.length;else{we=document.createDocumentFragment();for(var Ee=0;;){W.lastIndex=Ee;var Ne=W.exec(n),Me=Ne?Ne.index-Ee:n.length-Ee;if(Me){var Ye=document.createTextNode(j.slice(Ee,Ee+Me));x&&A<9?we.appendChild(me("span",[Ye])):we.appendChild(Ye),e.map.push(e.pos,e.pos+Me,Ye),e.col+=Me,e.pos+=Me}if(!Ne)break;Ee+=Me+1;var et=void 0;if(Ne[0]==" "){var ot=e.cm.options.tabSize,ft=ot-e.col%ot;et=we.appendChild(me("span",Ft(ft),"cm-tab")),et.setAttribute("role","presentation"),et.setAttribute("cm-text"," "),e.col+=ft}else Ne[0]=="\r"||Ne[0]==`
22
+ `?(et=we.appendChild(me("span",Ne[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),et.setAttribute("cm-text",Ne[0]),e.col+=1):(et=e.cm.options.specialCharPlaceholder(Ne[0]),et.setAttribute("cm-text",Ne[0]),x&&A<9?we.appendChild(me("span",[et])):we.appendChild(et),e.col+=1);e.map.push(e.pos,e.pos+1,et),e.pos++}}if(e.trailingSpace=j.charCodeAt(n.length-1)==32,u||l||f||q||g||k){var yt=u||"";l&&(yt+=l),f&&(yt+=f);var ct=me("span",[we],yt,g);if(k)for(var mt in k)k.hasOwnProperty(mt)&&mt!="style"&&mt!="class"&&ct.setAttribute(mt,k[mt]);return e.content.appendChild(ct)}e.content.appendChild(we)}}function zo(e,n){if(e.length>1&&!/ /.test(e))return e;for(var u=n,l="",f=0;f<e.length;f++){var g=e.charAt(f);g==" "&&u&&(f==e.length-1||e.charCodeAt(f+1)==32)&&(g="\xA0"),l+=g,u=g==" "}return l}function kf(e,n){return function(u,l,f,g,k,j,W){f=f?f+" cm-force-border":"cm-force-border";for(var q=u.pos,we=q+l.length;;){for(var Ee=void 0,Ne=0;Ne<n.length&&(Ee=n[Ne],!(Ee.to>q&&Ee.from<=q));Ne++);if(Ee.to>=we)return e(u,l,f,g,k,j,W);e(u,l.slice(0,Ee.to-q),f,g,null,j,W),g=null,l=l.slice(Ee.to-q),q=Ee.to}}}function zl(e,n,u,l){var f=!l&&u.widgetNode;f&&e.map.push(e.pos,e.pos+n,f),!l&&e.cm.display.input.needsContentAttribute&&(f||(f=e.content.appendChild(document.createElement("span"))),f.setAttribute("cm-marker",u.id)),f&&(e.cm.display.input.setUneditable(f),e.content.appendChild(f)),e.pos+=n,e.trailingSpace=!1}function nn(e,n,u){var l=e.markedSpans,f=e.text,g=0;if(!l){for(var k=1;k<u.length;k+=2)n.addToken(n,f.slice(g,g=u[k]),Wl(u[k+1],n.cm.options));return}for(var j=f.length,W=0,q=1,we="",Ee,Ne,Me=0,Ye,et,ot,ft,yt;;){if(Me==W){Ye=et=ot=Ne="",yt=null,ft=null,Me=1/0;for(var ct=[],mt=void 0,Pt=0;Pt<l.length;++Pt){var Ot=l[Pt],Ht=Ot.marker;if(Ht.type=="bookmark"&&Ot.from==W&&Ht.widgetNode)ct.push(Ht);else if(Ot.from<=W&&(Ot.to==null||Ot.to>W||Ht.collapsed&&Ot.to==W&&Ot.from==W)){if(Ot.to!=null&&Ot.to!=W&&Me>Ot.to&&(Me=Ot.to,et=""),Ht.className&&(Ye+=" "+Ht.className),Ht.css&&(Ne=(Ne?Ne+";":"")+Ht.css),Ht.startStyle&&Ot.from==W&&(ot+=" "+Ht.startStyle),Ht.endStyle&&Ot.to==Me&&(mt||(mt=[])).push(Ht.endStyle,Ot.to),Ht.title&&((yt||(yt={})).title=Ht.title),Ht.attributes)for(var ar in Ht.attributes)(yt||(yt={}))[ar]=Ht.attributes[ar];Ht.collapsed&&(!ft||jl(ft.marker,Ht)<0)&&(ft=Ot)}else Ot.from>W&&Me>Ot.from&&(Me=Ot.from)}if(mt)for(var Lr=0;Lr<mt.length;Lr+=2)mt[Lr+1]==Me&&(et+=" "+mt[Lr]);if(!ft||ft.from==W)for(var gr=0;gr<ct.length;++gr)zl(n,0,ct[gr]);if(ft&&(ft.from||0)==W){if(zl(n,(ft.to==null?j+1:ft.to)-W,ft.marker,ft.from==null),ft.to==null)return;ft.to==W&&(ft=!1)}}if(W>=j)break;for(var vn=Math.min(j,Me);;){if(we){var an=W+we.length;if(!ft){var kr=an>vn?we.slice(0,vn-W):we;n.addToken(n,kr,Ee?Ee+Ye:Ye,ot,W+kr.length==Me?et:"",Ne,yt)}if(an>=vn){we=we.slice(vn-W),W=vn;break}W=an,ot=""}we=f.slice(g,g=u[q++]),Ee=Wl(u[q++],n.cm.options)}}}function Ts(e,n,u){this.line=n,this.rest=Pf(n),this.size=this.rest?er(Et(this.rest))-u+1:1,this.node=this.text=null,this.hidden=Ci(e,n)}function ka(e,n,u){for(var l=[],f,g=n;g<u;g=f){var k=new Ts(e.doc,St(e.doc,g),g);f=g+k.size,l.push(k)}return l}var fo=null;function Rf(e){fo?fo.ops.push(e):e.ownsGroup=fo={ops:[e],delayedCallbacks:[]}}function Gl(e){var n=e.delayedCallbacks,u=0;do{for(;u<n.length;u++)n[u].call(null);for(var l=0;l<e.ops.length;l++){var f=e.ops[l];if(f.cursorActivityHandlers)for(;f.cursorActivityCalled<f.cursorActivityHandlers.length;)f.cursorActivityHandlers[f.cursorActivityCalled++].call(null,f.cm)}}while(u<n.length)}function Mf(e,n){var u=e.ownsGroup;if(!!u)try{Gl(u)}finally{fo=null,n(u)}}var Go=null;function Fr(e,n){var u=_(e,n);if(!!u.length){var l=Array.prototype.slice.call(arguments,2),f;fo?f=fo.delayedCallbacks:Go?f=Go:(f=Go=[],setTimeout($l,0));for(var g=function(j){f.push(function(){return u[j].apply(null,l)})},k=0;k<u.length;++k)g(k)}}function $l(){var e=Go;Go=null;for(var n=0;n<e.length;++n)e[n]()}function Ps(e,n,u,l){for(var f=0;f<n.changes.length;f++){var g=n.changes[f];g=="text"?Lf(e,n):g=="gutter"?Yl(e,n,u,l):g=="class"?Kl(e,n):g=="widget"&&zi(e,n,l)}n.changes=null}function $o(e){return e.node==e.text&&(e.node=me("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),x&&A<8&&(e.node.style.zIndex=2)),e.node}function Is(e,n){var u=n.bgClass?n.bgClass+" "+(n.line.bgClass||""):n.line.bgClass;if(u&&(u+=" CodeMirror-linebackground"),n.background)u?n.background.className=u:(n.background.parentNode.removeChild(n.background),n.background=null);else if(u){var l=$o(n);n.background=l.insertBefore(me("div",null,u),l.firstChild),e.display.input.setUneditable(n.background)}}function Ra(e,n){var u=e.display.externalMeasured;return u&&u.line==n.line?(e.display.externalMeasured=null,n.measure=u.measure,u.built):uo(e,n)}function Lf(e,n){var u=n.text.className,l=Ra(e,n);n.text==n.node&&(n.node=l.pre),n.text.parentNode.replaceChild(l.pre,n.text),n.text=l.pre,l.bgClass!=n.bgClass||l.textClass!=n.textClass?(n.bgClass=l.bgClass,n.textClass=l.textClass,Kl(e,n)):u&&(n.text.className=u)}function Kl(e,n){Is(e,n),n.line.wrapClass?$o(n).className=n.line.wrapClass:n.node!=n.text&&(n.node.className="");var u=n.textClass?n.textClass+" "+(n.line.textClass||""):n.line.textClass;n.text.className=u||""}function Yl(e,n,u,l){if(n.gutter&&(n.node.removeChild(n.gutter),n.gutter=null),n.gutterBackground&&(n.node.removeChild(n.gutterBackground),n.gutterBackground=null),n.line.gutterClass){var f=$o(n);n.gutterBackground=me("div",null,"CodeMirror-gutter-background "+n.line.gutterClass,"left: "+(e.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px; width: "+l.gutterTotalWidth+"px"),e.display.input.setUneditable(n.gutterBackground),f.insertBefore(n.gutterBackground,n.text)}var g=n.line.gutterMarkers;if(e.options.lineNumbers||g){var k=$o(n),j=n.gutter=me("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?l.fixedPos:-l.gutterTotalWidth)+"px");if(j.setAttribute("aria-hidden","true"),e.display.input.setUneditable(j),k.insertBefore(j,n.text),n.line.gutterClass&&(j.className+=" "+n.line.gutterClass),e.options.lineNumbers&&(!g||!g["CodeMirror-linenumbers"])&&(n.lineNumber=j.appendChild(me("div",lo(e.options,u),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+l.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),g)for(var W=0;W<e.display.gutterSpecs.length;++W){var q=e.display.gutterSpecs[W].className,we=g.hasOwnProperty(q)&&g[q];we&&j.appendChild(me("div",[we],"CodeMirror-gutter-elt","left: "+l.gutterLeft[q]+"px; width: "+l.gutterWidth[q]+"px"))}}}function zi(e,n,u){n.alignable&&(n.alignable=null);for(var l=ce("CodeMirror-linewidget"),f=n.node.firstChild,g=void 0;f;f=g)g=f.nextSibling,l.test(f.className)&&n.node.removeChild(f);Jl(e,n,u)}function Nf(e,n,u,l){var f=Ra(e,n);return n.text=n.node=f.pre,f.bgClass&&(n.bgClass=f.bgClass),f.textClass&&(n.textClass=f.textClass),Kl(e,n),Yl(e,n,u,l),Jl(e,n,l),n.node}function Jl(e,n,u){if(Xl(e,n.line,n,u,!0),n.rest)for(var l=0;l<n.rest.length;l++)Xl(e,n.rest[l],n,u,!1)}function Xl(e,n,u,l,f){if(!!n.widgets)for(var g=$o(u),k=0,j=n.widgets;k<j.length;++k){var W=j[k],q=me("div",[W.node],"CodeMirror-linewidget"+(W.className?" "+W.className:""));W.handleMouseEvents||q.setAttribute("cm-ignore-events","true"),Df(W,q,u,l),e.display.input.setUneditable(q),f&&W.above?g.insertBefore(q,u.gutter||u.text):g.appendChild(q),Fr(W,"redraw")}}function Df(e,n,u,l){if(e.noHScroll){(u.alignable||(u.alignable=[])).push(n);var f=l.wrapperWidth;n.style.left=l.fixedPos+"px",e.coverGutter||(f-=l.gutterTotalWidth,n.style.paddingLeft=l.gutterTotalWidth+"px"),n.style.width=f+"px"}e.coverGutter&&(n.style.zIndex=5,n.style.position="relative",e.noHScroll||(n.style.marginLeft=-l.gutterTotalWidth+"px"))}function Ko(e){if(e.height!=null)return e.height;var n=e.doc.cm;if(!n)return 0;if(!oe(document.body,e.node)){var u="position: relative;";e.coverGutter&&(u+="margin-left: -"+n.display.gutters.offsetWidth+"px;"),e.noHScroll&&(u+="width: "+n.display.wrapper.clientWidth+"px;"),be(n.display.measure,me("div",[e.node],null,u))}return e.height=e.node.parentNode.offsetHeight}function li(e,n){for(var u=kt(n);u!=e.wrapper;u=u.parentNode)if(!u||u.nodeType==1&&u.getAttribute("cm-ignore-events")=="true"||u.parentNode==e.sizer&&u!=e.mover)return!0}function Ma(e){return e.lineSpace.offsetTop}function Qn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Fs(e){if(e.cachedPaddingH)return e.cachedPaddingH;var n=be(e.measure,me("pre","x","CodeMirror-line-like")),u=window.getComputedStyle?window.getComputedStyle(n):n.currentStyle,l={left:parseInt(u.paddingLeft),right:parseInt(u.paddingRight)};return!isNaN(l.left)&&!isNaN(l.right)&&(e.cachedPaddingH=l),l}function Zr(e){return gt-e.display.nativeBarWidth}function Gi(e){return e.display.scroller.clientWidth-Zr(e)-e.display.barWidth}function ks(e){return e.display.scroller.clientHeight-Zr(e)-e.display.barHeight}function Bf(e,n,u){var l=e.options.lineWrapping,f=l&&Gi(e);if(!n.measure.heights||l&&n.measure.width!=f){var g=n.measure.heights=[];if(l){n.measure.width=f;for(var k=n.text.firstChild.getClientRects(),j=0;j<k.length-1;j++){var W=k[j],q=k[j+1];Math.abs(W.bottom-q.bottom)>2&&g.push((W.bottom+q.top)/2-u.top)}}g.push(u.bottom-u.top)}}function Ql(e,n,u){if(e.line==n)return{map:e.measure.map,cache:e.measure.cache};for(var l=0;l<e.rest.length;l++)if(e.rest[l]==n)return{map:e.measure.maps[l],cache:e.measure.caches[l]};for(var f=0;f<e.rest.length;f++)if(er(e.rest[f])>u)return{map:e.measure.maps[f],cache:e.measure.caches[f],before:!0}}function Yo(e,n){n=Ir(n);var u=er(n),l=e.display.externalMeasured=new Ts(e.doc,n,u);l.lineN=u;var f=l.built=uo(e,l);return l.text=f.pre,be(e.display.lineMeasure,f.pre),l}function Zl(e,n,u,l){return Zn(e,co(e,n),u,l)}function Jo(e,n){if(n>=e.display.viewFrom&&n<e.display.viewTo)return e.display.view[Sn(e,n)];var u=e.display.externalMeasured;if(u&&n>=u.lineN&&n<u.lineN+u.size)return u}function co(e,n){var u=er(n),l=Jo(e,u);l&&!l.text?l=null:l&&l.changes&&(Ps(e,l,u,vo(e)),e.curOp.forceUpdate=!0),l||(l=Yo(e,n));var f=Ql(l,n,u);return{line:n,view:l,rect:null,map:f.map,cache:f.cache,before:f.before,hasHeights:!1}}function Zn(e,n,u,l,f){n.before&&(u=-1);var g=u+(l||""),k;return n.cache.hasOwnProperty(g)?k=n.cache[g]:(n.rect||(n.rect=n.view.text.getBoundingClientRect()),n.hasHeights||(Bf(e,n.view,n.rect),n.hasHeights=!0),k=eu(e,n,u,l),k.bogus||(n.cache[g]=k)),{left:k.left,right:k.right,top:f?k.rtop:k.top,bottom:f?k.rbottom:k.bottom}}var Rs={left:0,right:0,top:0,bottom:0};function ql(e,n,u){for(var l,f,g,k,j,W,q=0;q<e.length;q+=3)if(j=e[q],W=e[q+1],n<j?(f=0,g=1,k="left"):n<W?(f=n-j,g=f+1):(q==e.length-3||n==W&&e[q+3]>n)&&(g=W-j,f=g-1,n>=W&&(k="right")),f!=null){if(l=e[q+2],j==W&&u==(l.insertLeft?"left":"right")&&(k=u),u=="left"&&f==0)for(;q&&e[q-2]==e[q-3]&&e[q-1].insertLeft;)l=e[(q-=3)+2],k="left";if(u=="right"&&f==W-j)for(;q<e.length-3&&e[q+3]==e[q+4]&&!e[q+5].insertLeft;)l=e[(q+=3)+2],k="right";break}return{node:l,start:f,end:g,collapse:k,coverStart:j,coverEnd:W}}function _l(e,n){var u=Rs;if(n=="left")for(var l=0;l<e.length&&(u=e[l]).left==u.right;l++);else for(var f=e.length-1;f>=0&&(u=e[f]).left==u.right;f--);return u}function eu(e,n,u,l){var f=ql(n.map,u,l),g=f.node,k=f.start,j=f.end,W=f.collapse,q;if(g.nodeType==3){for(var we=0;we<4;we++){for(;k&&ye(n.line.text.charAt(f.coverStart+k));)--k;for(;f.coverStart+j<f.coverEnd&&ye(n.line.text.charAt(f.coverStart+j));)++j;if(x&&A<9&&k==0&&j==f.coverEnd-f.coverStart?q=g.parentNode.getBoundingClientRect():q=_l(fe(g,k,j).getClientRects(),l),q.left||q.right||k==0)break;j=k,k=k-1,W="right"}x&&A<11&&(q=Uf(e.display.measure,q))}else{k>0&&(W=l="right");var Ee;e.options.lineWrapping&&(Ee=g.getClientRects()).length>1?q=Ee[l=="right"?Ee.length-1:0]:q=g.getBoundingClientRect()}if(x&&A<9&&!k&&(!q||!q.left&&!q.right)){var Ne=g.parentNode.getClientRects()[0];Ne?q={left:Ne.left,right:Ne.left+Yi(e.display),top:Ne.top,bottom:Ne.bottom}:q=Rs}for(var Me=q.top-n.rect.top,Ye=q.bottom-n.rect.top,et=(Me+Ye)/2,ot=n.view.measure.heights,ft=0;ft<ot.length-1&&!(et<ot[ft]);ft++);var yt=ft?ot[ft-1]:0,ct=ot[ft],mt={left:(W=="right"?q.right:q.left)-n.rect.left,right:(W=="left"?q.left:q.right)-n.rect.left,top:yt,bottom:ct};return!q.left&&!q.right&&(mt.bogus=!0),e.options.singleCursorHeightPerLine||(mt.rtop=Me,mt.rbottom=Ye),mt}function Uf(e,n){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Ca(e))return n;var u=screen.logicalXDPI/screen.deviceXDPI,l=screen.logicalYDPI/screen.deviceYDPI;return{left:n.left*u,right:n.right*u,top:n.top*l,bottom:n.bottom*l}}function tu(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var n=0;n<e.rest.length;n++)e.measure.caches[n]={}}function Ms(e){e.display.externalMeasure=null,se(e.display.lineMeasure);for(var n=0;n<e.display.view.length;n++)tu(e.display.view[n])}function Xo(e){Ms(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function $i(){return D&&Q?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Qo(){return D&&Q?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Zo(e){var n=0;if(e.widgets)for(var u=0;u<e.widgets.length;++u)e.widgets[u].above&&(n+=Ko(e.widgets[u]));return n}function Oi(e,n,u,l,f){if(!f){var g=Zo(n);u.top+=g,u.bottom+=g}if(l=="line")return u;l||(l="local");var k=Xn(n);if(l=="local"?k+=Ma(e.display):k-=e.display.viewOffset,l=="page"||l=="window"){var j=e.display.lineSpace.getBoundingClientRect();k+=j.top+(l=="window"?0:Qo());var W=j.left+(l=="window"?0:$i());u.left+=W,u.right+=W}return u.top+=k,u.bottom+=k,u}function Ki(e,n,u){if(u=="div")return n;var l=n.left,f=n.top;if(u=="page")l-=$i(),f-=Qo();else if(u=="local"||!u){var g=e.display.sizer.getBoundingClientRect();l+=g.left,f+=g.top}var k=e.display.lineSpace.getBoundingClientRect();return{left:l-k.left,top:f-k.top}}function Ls(e,n,u,l,f){return l||(l=St(e.doc,n.line)),Oi(e,l,Zl(e,l,n.ch,f),u)}function wn(e,n,u,l,f,g){l=l||St(e.doc,n.line),f||(f=co(e,l));function k(Ye,et){var ot=Zn(e,f,Ye,et?"right":"left",g);return et?ot.left=ot.right:ot.right=ot.left,Oi(e,l,ot,u)}var j=I(l,e.doc.direction),W=n.ch,q=n.sticky;if(W>=l.text.length?(W=l.text.length,q="before"):W<=0&&(W=0,q="after"),!j)return k(q=="before"?W-1:W,q=="before");function we(Ye,et,ot){var ft=j[et],yt=ft.level==1;return k(ot?Ye-1:Ye,yt!=ot)}var Ee=H(j,W,q),Ne=Pe,Me=we(W,Ee,q=="before");return Ne!=null&&(Me.other=we(W,Ne,q!="before")),Me}function ru(e,n){var u=0;n=st(e.doc,n),e.options.lineWrapping||(u=Yi(e.display)*n.ch);var l=St(e.doc,n.line),f=Xn(l)+Ma(e.display);return{left:u,right:u,top:f,bottom:f+l.height}}function Ns(e,n,u,l,f){var g=rt(e,n,u);return g.xRel=f,l&&(g.outside=l),g}function La(e,n,u){var l=e.doc;if(u+=e.display.viewOffset,u<0)return Ns(l.first,0,null,-1,-1);var f=Hn(l,u),g=l.first+l.size-1;if(f>g)return Ns(l.first+l.size-1,St(l,g).text.length,null,1,1);n<0&&(n=0);for(var k=St(l,f);;){var j=jf(e,k,f,n,u),W=Vt(k,j.ch+(j.xRel>0||j.outside>0?1:0));if(!W)return j;var q=W.find(1);if(q.line==f)return q;k=St(l,f=q.line)}}function po(e,n,u,l){l-=Zo(n);var f=n.text.length,g=Ae(function(k){return Zn(e,u,k-1).bottom<=l},f,0);return f=Ae(function(k){return Zn(e,u,k).top>l},g,f),{begin:g,end:f}}function nu(e,n,u,l){u||(u=co(e,n));var f=Oi(e,n,Zn(e,u,l),"line").top;return po(e,n,u,f)}function Ds(e,n,u,l){return e.bottom<=u?!1:e.top>u?!0:(l?e.left:e.right)>n}function jf(e,n,u,l,f){f-=Xn(n);var g=co(e,n),k=Zo(n),j=0,W=n.text.length,q=!0,we=I(n,e.doc.direction);if(we){var Ee=(e.options.lineWrapping?iu:Vf)(e,n,u,g,we,l,f);q=Ee.level!=1,j=q?Ee.from:Ee.to-1,W=q?Ee.to:Ee.from-1}var Ne=null,Me=null,Ye=Ae(function(Pt){var Ot=Zn(e,g,Pt);return Ot.top+=k,Ot.bottom+=k,Ds(Ot,l,f,!1)?(Ot.top<=f&&Ot.left<=l&&(Ne=Pt,Me=Ot),!0):!1},j,W),et,ot,ft=!1;if(Me){var yt=l-Me.left<Me.right-l,ct=yt==q;Ye=Ne+(ct?0:1),ot=ct?"after":"before",et=yt?Me.left:Me.right}else{!q&&(Ye==W||Ye==j)&&Ye++,ot=Ye==0?"after":Ye==n.text.length?"before":Zn(e,g,Ye-(q?1:0)).bottom+k<=f==q?"after":"before";var mt=wn(e,rt(u,Ye,ot),"line",n,g);et=mt.left,ft=f<mt.top?-1:f>=mt.bottom?1:0}return Ye=de(n.text,Ye,1),Ns(u,Ye,ot,ft,l-et)}function Vf(e,n,u,l,f,g,k){var j=Ae(function(Ee){var Ne=f[Ee],Me=Ne.level!=1;return Ds(wn(e,rt(u,Me?Ne.to:Ne.from,Me?"before":"after"),"line",n,l),g,k,!0)},0,f.length-1),W=f[j];if(j>0){var q=W.level!=1,we=wn(e,rt(u,q?W.from:W.to,q?"after":"before"),"line",n,l);Ds(we,g,k,!0)&&we.top>k&&(W=f[j-1])}return W}function iu(e,n,u,l,f,g,k){var j=po(e,n,l,k),W=j.begin,q=j.end;/\s/.test(n.text.charAt(q-1))&&q--;for(var we=null,Ee=null,Ne=0;Ne<f.length;Ne++){var Me=f[Ne];if(!(Me.from>=q||Me.to<=W)){var Ye=Me.level!=1,et=Zn(e,l,Ye?Math.min(q,Me.to)-1:Math.max(W,Me.from)).right,ot=et<g?g-et+1e9:et-g;(!we||Ee>ot)&&(we=Me,Ee=ot)}}return we||(we=f[f.length-1]),we.from<W&&(we={from:W,to:we.to,level:we.level}),we.to>q&&(we={from:we.from,to:q,level:we.level}),we}var ui;function ho(e){if(e.cachedTextHeight!=null)return e.cachedTextHeight;if(ui==null){ui=me("pre",null,"CodeMirror-line-like");for(var n=0;n<49;++n)ui.appendChild(document.createTextNode("x")),ui.appendChild(me("br"));ui.appendChild(document.createTextNode("x"))}be(e.measure,ui);var u=ui.offsetHeight/50;return u>3&&(e.cachedTextHeight=u),se(e.measure),u||1}function Yi(e){if(e.cachedCharWidth!=null)return e.cachedCharWidth;var n=me("span","xxxxxxxxxx"),u=me("pre",[n],"CodeMirror-line-like");be(e.measure,u);var l=n.getBoundingClientRect(),f=(l.right-l.left)/10;return f>2&&(e.cachedCharWidth=f),f||10}function vo(e){for(var n=e.display,u={},l={},f=n.gutters.clientLeft,g=n.gutters.firstChild,k=0;g;g=g.nextSibling,++k){var j=e.display.gutterSpecs[k].className;u[j]=g.offsetLeft+g.clientLeft+f,l[j]=g.clientWidth}return{fixedPos:Bs(n),gutterTotalWidth:n.gutters.offsetWidth,gutterLeft:u,gutterWidth:l,wrapperWidth:n.wrapper.clientWidth}}function Bs(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Us(e){var n=ho(e.display),u=e.options.lineWrapping,l=u&&Math.max(5,e.display.scroller.clientWidth/Yi(e.display)-3);return function(f){if(Ci(e.doc,f))return 0;var g=0;if(f.widgets)for(var k=0;k<f.widgets.length;k++)f.widgets[k].height&&(g+=f.widgets[k].height);return u?g+(Math.ceil(f.text.length/l)||1)*n:g+n}}function ou(e){var n=e.doc,u=Us(e);n.iter(function(l){var f=u(l);f!=l.height&&bn(l,f)})}function Ji(e,n,u,l){var f=e.display;if(!u&&kt(n).getAttribute("cm-not-content")=="true")return null;var g,k,j=f.lineSpace.getBoundingClientRect();try{g=n.clientX-j.left,k=n.clientY-j.top}catch(Ee){return null}var W=La(e,g,k),q;if(l&&W.xRel>0&&(q=St(e.doc,W.line).text).length==W.ch){var we=qe(q,q.length,e.options.tabSize)-q.length;W=rt(W.line,Math.max(0,Math.round((g-Fs(e.display).left)/Yi(e.display))-we))}return W}function Sn(e,n){if(n>=e.display.viewTo||(n-=e.display.viewFrom,n<0))return null;for(var u=e.display.view,l=0;l<u.length;l++)if(n-=u[l].size,n<0)return l}function qr(e,n,u,l){n==null&&(n=e.doc.first),u==null&&(u=e.doc.first+e.doc.size),l||(l=0);var f=e.display;if(l&&u<f.viewTo&&(f.updateLineNumbers==null||f.updateLineNumbers>n)&&(f.updateLineNumbers=n),e.curOp.viewChanged=!0,n>=f.viewTo)Ei&&Es(e.doc,n)<f.viewTo&&An(e);else if(u<=f.viewFrom)Ei&&Cs(e.doc,u+l)>f.viewFrom?An(e):(f.viewFrom+=l,f.viewTo+=l);else if(n<=f.viewFrom&&u>=f.viewTo)An(e);else if(n<=f.viewFrom){var g=js(e,u,u+l,1);g?(f.view=f.view.slice(g.index),f.viewFrom=g.lineN,f.viewTo+=l):An(e)}else if(u>=f.viewTo){var k=js(e,n,n,-1);k?(f.view=f.view.slice(0,k.index),f.viewTo=k.lineN):An(e)}else{var j=js(e,n,n,-1),W=js(e,u,u+l,1);j&&W?(f.view=f.view.slice(0,j.index).concat(ka(e,j.lineN,W.lineN)).concat(f.view.slice(W.index)),f.viewTo+=l):An(e)}var q=f.externalMeasured;q&&(u<q.lineN?q.lineN+=l:n<q.lineN+q.size&&(f.externalMeasured=null))}function Xi(e,n,u){e.curOp.viewChanged=!0;var l=e.display,f=e.display.externalMeasured;if(f&&n>=f.lineN&&n<f.lineN+f.size&&(l.externalMeasured=null),!(n<l.viewFrom||n>=l.viewTo)){var g=l.view[Sn(e,n)];if(g.node!=null){var k=g.changes||(g.changes=[]);ut(k,u)==-1&&k.push(u)}}}function An(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function js(e,n,u,l){var f=Sn(e,n),g,k=e.display.view;if(!Ei||u==e.doc.first+e.doc.size)return{index:f,lineN:u};for(var j=e.display.viewFrom,W=0;W<f;W++)j+=k[W].size;if(j!=n){if(l>0){if(f==k.length-1)return null;g=j+k[f].size-n,f++}else g=j-n;n+=g,u+=g}for(;Es(e.doc,u)!=u;){if(f==(l<0?0:k.length-1))return null;u+=l*k[f-(l<0?1:0)].size,f+=l}return{index:f,lineN:u}}function Hf(e,n,u){var l=e.display,f=l.view;f.length==0||n>=l.viewTo||u<=l.viewFrom?(l.view=ka(e,n,u),l.viewFrom=n):(l.viewFrom>n?l.view=ka(e,n,l.viewFrom).concat(l.view):l.viewFrom<n&&(l.view=l.view.slice(Sn(e,n))),l.viewFrom=n,l.viewTo<u?l.view=l.view.concat(ka(e,l.viewTo,u)):l.viewTo>u&&(l.view=l.view.slice(0,Sn(e,u)))),l.viewTo=u}function Wf(e){for(var n=e.display.view,u=0,l=0;l<n.length;l++){var f=n[l];!f.hidden&&(!f.node||f.changes)&&++u}return u}function Na(e){e.display.input.showSelection(e.display.input.prepareSelection())}function au(e,n){n===void 0&&(n=!0);for(var u=e.doc,l={},f=l.cursors=document.createDocumentFragment(),g=l.selection=document.createDocumentFragment(),k=0;k<u.sel.ranges.length;k++)if(!(!n&&k==u.sel.primIndex)){var j=u.sel.ranges[k];if(!(j.from().line>=e.display.viewTo||j.to().line<e.display.viewFrom)){var W=j.empty();(W||e.options.showCursorWhenSelecting)&&su(e,j.head,f),W||Cd(e,j,g)}}return l}function su(e,n,u){var l=wn(e,n,"div",null,null,!e.options.singleCursorHeightPerLine),f=u.appendChild(me("div","\xA0","CodeMirror-cursor"));if(f.style.left=l.left+"px",f.style.top=l.top+"px",f.style.height=Math.max(0,l.bottom-l.top)*e.options.cursorHeight+"px",l.other){var g=u.appendChild(me("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));g.style.display="",g.style.left=l.other.left+"px",g.style.top=l.other.top+"px",g.style.height=(l.other.bottom-l.other.top)*.85+"px"}}function Da(e,n){return e.top-n.top||e.left-n.left}function Cd(e,n,u){var l=e.display,f=e.doc,g=document.createDocumentFragment(),k=Fs(e.display),j=k.left,W=Math.max(l.sizerWidth,Gi(e)-l.sizer.offsetLeft)-k.right,q=f.direction=="ltr";function we(ct,mt,Pt,Ot){mt<0&&(mt=0),mt=Math.round(mt),Ot=Math.round(Ot),g.appendChild(me("div",null,"CodeMirror-selected","position: absolute; left: "+ct+`px;
23
+ top: `+mt+"px; width: "+(Pt==null?W-ct:Pt)+`px;
24
+ height: `+(Ot-mt)+"px"))}function Ee(ct,mt,Pt){var Ot=St(f,ct),Ht=Ot.text.length,ar,Lr;function gr(kr,en){return Ls(e,rt(ct,kr),"div",Ot,en)}function vn(kr,en,zr){var Nr=nu(e,Ot,null,kr),Er=en=="ltr"==(zr=="after")?"left":"right",dr=zr=="after"?Nr.begin:Nr.end-(/\s/.test(Ot.text.charAt(Nr.end-1))?2:1);return gr(dr,Er)[Er]}var an=I(Ot,f.direction);return S(an,mt||0,Pt==null?Ht:Pt,function(kr,en,zr,Nr){var Er=zr=="ltr",dr=gr(kr,Er?"left":"right"),sn=gr(en-1,Er?"right":"left"),ni=mt==null&&kr==0,vi=Pt==null&&en==Ht,cr=Nr==0,gi=!an||Nr==an.length-1;if(sn.top-dr.top<=3){var Dr=(q?ni:vi)&&cr,us=(q?vi:ni)&&gi,ii=Dr?j:(Er?dr:sn).left,io=us?W:(Er?sn:dr).right;we(ii,dr.top,io-ii,dr.bottom)}else{var oo,Yr,Bo,gl;Er?(oo=q&&ni&&cr?j:dr.left,Yr=q?W:vn(kr,zr,"before"),Bo=q?j:vn(en,zr,"after"),gl=q&&vi&&gi?W:sn.right):(oo=q?vn(kr,zr,"before"):j,Yr=!q&&ni&&cr?W:dr.right,Bo=!q&&vi&&gi?j:sn.left,gl=q?vn(en,zr,"after"):W),we(oo,dr.top,Yr-oo,dr.bottom),dr.bottom<sn.top&&we(j,dr.bottom,null,sn.top),we(Bo,sn.top,gl-Bo,sn.bottom)}(!ar||Da(dr,ar)<0)&&(ar=dr),Da(sn,ar)<0&&(ar=sn),(!Lr||Da(dr,Lr)<0)&&(Lr=dr),Da(sn,Lr)<0&&(Lr=sn)}),{start:ar,end:Lr}}var Ne=n.from(),Me=n.to();if(Ne.line==Me.line)Ee(Ne.line,Ne.ch,Me.ch);else{var Ye=St(f,Ne.line),et=St(f,Me.line),ot=Ir(Ye)==Ir(et),ft=Ee(Ne.line,Ne.ch,ot?Ye.text.length+1:null).end,yt=Ee(Me.line,ot?0:null,Me.ch).start;ot&&(ft.top<yt.top-2?(we(ft.right,ft.top,null,ft.bottom),we(j,yt.top,yt.left,yt.bottom)):we(ft.right,ft.top,yt.left-ft.right,ft.bottom)),ft.bottom<yt.top&&we(j,ft.bottom,null,yt.top)}u.appendChild(g)}function lu(e){if(!!e.state.focused){var n=e.display;clearInterval(n.blinker);var u=!0;n.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?n.blinker=setInterval(function(){e.hasFocus()||qo(e),n.cursorDiv.style.visibility=(u=!u)?"":"hidden"},e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(n.cursorDiv.style.visibility="hidden")}}function zf(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||uu(e))}function Vs(e){e.state.delayingBlurEvent=!0,setTimeout(function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&qo(e))},100)}function uu(e,n){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),e.options.readOnly!="nocursor"&&(e.state.focused||(Oe(e,"focus",e,n),e.state.focused=!0,Ue(e.display.wrapper,"CodeMirror-focused"),!e.curOp&&e.display.selForContextMenu!=e.doc.sel&&(e.display.input.reset(),w&&setTimeout(function(){return e.display.input.reset(!0)},20)),e.display.input.receivedFocus()),lu(e))}function qo(e,n){e.state.delayingBlurEvent||(e.state.focused&&(Oe(e,"blur",e,n),e.state.focused=!1,te(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout(function(){e.state.focused||(e.display.shift=!1)},150))}function Ti(e){for(var n=e.display,u=n.lineDiv.offsetTop,l=0;l<n.view.length;l++){var f=n.view[l],g=e.options.lineWrapping,k=void 0,j=0;if(!f.hidden){if(x&&A<8){var W=f.node.offsetTop+f.node.offsetHeight;k=W-u,u=W}else{var q=f.node.getBoundingClientRect();k=q.bottom-q.top,!g&&f.text.firstChild&&(j=f.text.firstChild.getBoundingClientRect().right-q.left-1)}var we=f.line.height-k;if((we>.005||we<-.005)&&(bn(f.line,k),fn(f.line),f.rest))for(var Ee=0;Ee<f.rest.length;Ee++)fn(f.rest[Ee]);if(j>e.display.sizerWidth){var Ne=Math.ceil(j/Yi(e.display));Ne>e.display.maxLineLength&&(e.display.maxLineLength=Ne,e.display.maxLine=f.line,e.display.maxLineChanged=!0)}}}}function fn(e){if(e.widgets)for(var n=0;n<e.widgets.length;++n){var u=e.widgets[n],l=u.node.parentNode;l&&(u.height=l.offsetHeight)}}function Fn(e,n,u){var l=u&&u.top!=null?Math.max(0,u.top):e.scroller.scrollTop;l=Math.floor(l-Ma(e));var f=u&&u.bottom!=null?u.bottom:l+e.wrapper.clientHeight,g=Hn(n,l),k=Hn(n,f);if(u&&u.ensure){var j=u.ensure.from.line,W=u.ensure.to.line;j<g?(g=j,k=Hn(n,Xn(St(n,j))+e.wrapper.clientHeight)):Math.min(W,n.lastLine())>=k&&(g=Hn(n,Xn(St(n,W))-e.wrapper.clientHeight),k=W)}return{from:g,to:Math.max(k,g+1)}}function qn(e,n){if(!Ie(e,"scrollCursorIntoView")){var u=e.display,l=u.sizer.getBoundingClientRect(),f=null;if(n.top+l.top<0?f=!0:n.bottom+l.top>(window.innerHeight||document.documentElement.clientHeight)&&(f=!1),f!=null&&!K){var g=me("div","\u200B",null,`position: absolute;
25
+ top: `+(n.top-u.viewOffset-Ma(e.display))+`px;
26
+ height: `+(n.bottom-n.top+Zr(e)+u.barHeight)+`px;
27
+ left: `+n.left+"px; width: "+Math.max(2,n.right-n.left)+"px;");e.display.lineSpace.appendChild(g),g.scrollIntoView(f),e.display.lineSpace.removeChild(g)}}}function Gf(e,n,u,l){l==null&&(l=0);var f;!e.options.lineWrapping&&n==u&&(u=n.sticky=="before"?rt(n.line,n.ch+1,"before"):n,n=n.ch?rt(n.line,n.sticky=="before"?n.ch-1:n.ch,"after"):n);for(var g=0;g<5;g++){var k=!1,j=wn(e,n),W=!u||u==n?j:wn(e,u);f={left:Math.min(j.left,W.left),top:Math.min(j.top,W.top)-l,right:Math.max(j.left,W.left),bottom:Math.max(j.bottom,W.bottom)+l};var q=go(e,f),we=e.doc.scrollTop,Ee=e.doc.scrollLeft;if(q.scrollTop!=null&&(mo(e,q.scrollTop),Math.abs(e.doc.scrollTop-we)>1&&(k=!0)),q.scrollLeft!=null&&(Pi(e,q.scrollLeft),Math.abs(e.doc.scrollLeft-Ee)>1&&(k=!0)),!k)break}return f}function fu(e,n){var u=go(e,n);u.scrollTop!=null&&mo(e,u.scrollTop),u.scrollLeft!=null&&Pi(e,u.scrollLeft)}function go(e,n){var u=e.display,l=ho(e.display);n.top<0&&(n.top=0);var f=e.curOp&&e.curOp.scrollTop!=null?e.curOp.scrollTop:u.scroller.scrollTop,g=ks(e),k={};n.bottom-n.top>g&&(n.bottom=n.top+g);var j=e.doc.height+Qn(u),W=n.top<l,q=n.bottom>j-l;if(n.top<f)k.scrollTop=W?0:n.top;else if(n.bottom>f+g){var we=Math.min(n.top,(q?j:n.bottom)-g);we!=f&&(k.scrollTop=we)}var Ee=e.options.fixedGutter?0:u.gutters.offsetWidth,Ne=e.curOp&&e.curOp.scrollLeft!=null?e.curOp.scrollLeft:u.scroller.scrollLeft-Ee,Me=Gi(e)-u.gutters.offsetWidth,Ye=n.right-n.left>Me;return Ye&&(n.right=n.left+Me),n.left<10?k.scrollLeft=0:n.left<Ne?k.scrollLeft=Math.max(0,n.left+Ee-(Ye?0:10)):n.right>Me+Ne-3&&(k.scrollLeft=n.right+(Ye?0:10)-Me),k}function En(e,n){n!=null&&(yo(e),e.curOp.scrollTop=(e.curOp.scrollTop==null?e.doc.scrollTop:e.curOp.scrollTop)+n)}function Jt(e){yo(e);var n=e.getCursor();e.curOp.scrollToPos={from:n,to:n,margin:e.options.cursorScrollMargin}}function fi(e,n,u){(n!=null||u!=null)&&yo(e),n!=null&&(e.curOp.scrollLeft=n),u!=null&&(e.curOp.scrollTop=u)}function cu(e,n){yo(e),e.curOp.scrollToPos=n}function yo(e){var n=e.curOp.scrollToPos;if(n){e.curOp.scrollToPos=null;var u=ru(e,n.from),l=ru(e,n.to);Hs(e,u,l,n.margin)}}function Hs(e,n,u,l){var f=go(e,{left:Math.min(n.left,u.left),top:Math.min(n.top,u.top)-l,right:Math.max(n.right,u.right),bottom:Math.max(n.bottom,u.bottom)+l});fi(e,f.scrollLeft,f.scrollTop)}function mo(e,n){Math.abs(e.doc.scrollTop-n)<2||(c||Va(e,{top:n}),xo(e,n,!0),c&&Va(e),Ii(e,100))}function xo(e,n,u){n=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,n)),!(e.display.scroller.scrollTop==n&&!u)&&(e.doc.scrollTop=n,e.display.scrollbars.setScrollTop(n),e.display.scroller.scrollTop!=n&&(e.display.scroller.scrollTop=n))}function Pi(e,n,u,l){n=Math.max(0,Math.min(n,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),!((u?n==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-n)<2)&&!l)&&(e.doc.scrollLeft=n,Ks(e),e.display.scroller.scrollLeft!=n&&(e.display.scroller.scrollLeft=n),e.display.scrollbars.setScrollLeft(n))}function Qi(e){var n=e.display,u=n.gutters.offsetWidth,l=Math.round(e.doc.height+Qn(e.display));return{clientHeight:n.scroller.clientHeight,viewHeight:n.wrapper.clientHeight,scrollWidth:n.scroller.scrollWidth,clientWidth:n.scroller.clientWidth,viewWidth:n.wrapper.clientWidth,barLeft:e.options.fixedGutter?u:0,docHeight:l,scrollHeight:l+Zr(e)+n.barHeight,nativeBarWidth:n.nativeBarWidth,gutterWidth:u}}var Dt=function(e,n,u){this.cm=u;var l=this.vert=me("div",[me("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),f=this.horiz=me("div",[me("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");l.tabIndex=f.tabIndex=-1,e(l),e(f),N(l,"scroll",function(){l.clientHeight&&n(l.scrollTop,"vertical")}),N(f,"scroll",function(){f.clientWidth&&n(f.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,x&&A<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Dt.prototype.update=function(e){var n=e.scrollWidth>e.clientWidth+1,u=e.scrollHeight>e.clientHeight+1,l=e.nativeBarWidth;if(u){this.vert.style.display="block",this.vert.style.bottom=n?l+"px":"0";var f=e.viewHeight-(n?l:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+f)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(n){this.horiz.style.display="block",this.horiz.style.right=u?l+"px":"0",this.horiz.style.left=e.barLeft+"px";var g=e.viewWidth-e.barLeft-(u?l:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+g)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(l==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:u?l:0,bottom:n?l:0}},Dt.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Dt.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Dt.prototype.zeroWidthHack=function(){var e=P&&!ee?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new at,this.disableVert=new at},Dt.prototype.enableZeroWidthBar=function(e,n,u){e.style.pointerEvents="auto";function l(){var f=e.getBoundingClientRect(),g=u=="vert"?document.elementFromPoint(f.right-1,(f.top+f.bottom)/2):document.elementFromPoint((f.right+f.left)/2,f.bottom-1);g!=e?e.style.pointerEvents="none":n.set(1e3,l)}n.set(1e3,l)},Dt.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var bo=function(){};bo.prototype.update=function(){return{bottom:0,right:0}},bo.prototype.setScrollLeft=function(){},bo.prototype.setScrollTop=function(){},bo.prototype.clear=function(){};function Zi(e,n){n||(n=Qi(e));var u=e.display.barWidth,l=e.display.barHeight;_n(e,n);for(var f=0;f<4&&u!=e.display.barWidth||l!=e.display.barHeight;f++)u!=e.display.barWidth&&e.options.lineWrapping&&Ti(e),_n(e,Qi(e)),u=e.display.barWidth,l=e.display.barHeight}function _n(e,n){var u=e.display,l=u.scrollbars.update(n);u.sizer.style.paddingRight=(u.barWidth=l.right)+"px",u.sizer.style.paddingBottom=(u.barHeight=l.bottom)+"px",u.heightForcer.style.borderBottom=l.bottom+"px solid transparent",l.right&&l.bottom?(u.scrollbarFiller.style.display="block",u.scrollbarFiller.style.height=l.bottom+"px",u.scrollbarFiller.style.width=l.right+"px"):u.scrollbarFiller.style.display="",l.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(u.gutterFiller.style.display="block",u.gutterFiller.style.height=l.bottom+"px",u.gutterFiller.style.width=n.gutterWidth+"px"):u.gutterFiller.style.display=""}var wo={native:Dt,null:bo};function kn(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&te(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new wo[e.options.scrollbarStyle](function(n){e.display.wrapper.insertBefore(n,e.display.scrollbarFiller),N(n,"mousedown",function(){e.state.focused&&setTimeout(function(){return e.display.input.focus()},0)}),n.setAttribute("cm-not-content","true")},function(n,u){u=="horizontal"?Pi(e,n):mo(e,n)},e),e.display.scrollbars.addClass&&Ue(e.display.wrapper,e.display.scrollbars.addClass)}var So=0;function Sr(e){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:++So,markArrays:null},Rf(e.curOp)}function cn(e){var n=e.curOp;n&&Mf(n,function(u){for(var l=0;l<u.ops.length;l++)u.ops[l].cm.curOp=null;Ba(u)})}function Ba(e){for(var n=e.ops,u=0;u<n.length;u++)_o(n[u]);for(var l=0;l<n.length;l++)ea(n[l]);for(var f=0;f<n.length;f++)ta(n[f]);for(var g=0;g<n.length;g++)Ws(n[g]);for(var k=0;k<n.length;k++)Ua(n[k])}function _o(e){var n=e.cm,u=n.display;zs(n),e.updateMaxLine&&Fa(n),e.mustUpdate=e.viewChanged||e.forceUpdate||e.scrollTop!=null||e.scrollToPos&&(e.scrollToPos.from.line<u.viewFrom||e.scrollToPos.to.line>=u.viewTo)||u.maxLineChanged&&n.options.lineWrapping,e.update=e.mustUpdate&&new Rn(n,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function ea(e){e.updatedDisplay=e.mustUpdate&&ja(e.cm,e.update)}function ta(e){var n=e.cm,u=n.display;e.updatedDisplay&&Ti(n),e.barMeasure=Qi(n),u.maxLineChanged&&!n.options.lineWrapping&&(e.adjustWidthTo=Zl(n,u.maxLine,u.maxLine.text.length).left+3,n.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(u.scroller.clientWidth,u.sizer.offsetLeft+e.adjustWidthTo+Zr(n)+n.display.barWidth),e.maxScrollLeft=Math.max(0,u.sizer.offsetLeft+e.adjustWidthTo-Gi(n))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=u.input.prepareSelection())}function Ws(e){var n=e.cm;e.adjustWidthTo!=null&&(n.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<n.doc.scrollLeft&&Pi(n,Math.min(n.display.scroller.scrollLeft,e.maxScrollLeft),!0),n.display.maxLineChanged=!1);var u=e.focus&&e.focus==Re();e.preparedSelection&&n.display.input.showSelection(e.preparedSelection,u),(e.updatedDisplay||e.startHeight!=n.doc.height)&&Zi(n,e.barMeasure),e.updatedDisplay&&Ao(n,e.barMeasure),e.selectionChanged&&lu(n),n.state.focused&&e.updateInput&&n.display.input.reset(e.typing),u&&zf(e.cm)}function Ua(e){var n=e.cm,u=n.display,l=n.doc;if(e.updatedDisplay&&Gs(n,e.update),u.wheelStartX!=null&&(e.scrollTop!=null||e.scrollLeft!=null||e.scrollToPos)&&(u.wheelStartX=u.wheelStartY=null),e.scrollTop!=null&&xo(n,e.scrollTop,e.forceScroll),e.scrollLeft!=null&&Pi(n,e.scrollLeft,!0,!0),e.scrollToPos){var f=Gf(n,st(l,e.scrollToPos.from),st(l,e.scrollToPos.to),e.scrollToPos.margin);qn(n,f)}var g=e.maybeHiddenMarkers,k=e.maybeUnhiddenMarkers;if(g)for(var j=0;j<g.length;++j)g[j].lines.length||Oe(g[j],"hide");if(k)for(var W=0;W<k.length;++W)k[W].lines.length&&Oe(k[W],"unhide");u.wrapper.offsetHeight&&(l.scrollTop=n.display.scroller.scrollTop),e.changeObjs&&Oe(n,"changes",n,e.changeObjs),e.update&&e.update.finish()}function on(e,n){if(e.curOp)return n();Sr(e);try{return n()}finally{cn(e)}}function Wr(e,n){return function(){if(e.curOp)return n.apply(e,arguments);Sr(e);try{return n.apply(e,arguments)}finally{cn(e)}}}function $r(e){return function(){if(this.curOp)return e.apply(this,arguments);Sr(this);try{return e.apply(this,arguments)}finally{cn(this)}}}function Mr(e){return function(){var n=this.cm;if(!n||n.curOp)return e.apply(this,arguments);Sr(n);try{return e.apply(this,arguments)}finally{cn(n)}}}function Ii(e,n){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(n,tt(du,e))}function du(e){var n=e.doc;if(!(n.highlightFrontier>=e.display.viewTo)){var u=+new Date+e.options.workTime,l=Qr(e,n.highlightFrontier),f=[];n.iter(l.line,Math.min(n.first+n.size,e.display.viewTo+500),function(g){if(l.line>=e.display.viewFrom){var k=g.styles,j=g.text.length>e.options.maxHighlightLength?In(n.mode,l.state):null,W=tr(e,g,l,!0);j&&(l.state=j),g.styles=W.styles;var q=g.styleClasses,we=W.classes;we?g.styleClasses=we:q&&(g.styleClasses=null);for(var Ee=!k||k.length!=g.styles.length||q!=we&&(!q||!we||q.bgClass!=we.bgClass||q.textClass!=we.textClass),Ne=0;!Ee&&Ne<k.length;++Ne)Ee=k[Ne]!=g.styles[Ne];Ee&&f.push(l.line),g.stateAfter=l.save(),l.nextLine()}else g.text.length<=e.options.maxHighlightLength&&ms(e,g.text,l),g.stateAfter=l.line%5==0?l.save():null,l.nextLine();if(+new Date>u)return Ii(e,e.options.workDelay),!0}),n.highlightFrontier=l.line,n.modeFrontier=Math.max(n.modeFrontier,l.line),f.length&&on(e,function(){for(var g=0;g<f.length;g++)Xi(e,f[g],"text")})}}var Rn=function(e,n,u){var l=e.display;this.viewport=n,this.visible=Fn(l,e.doc,n),this.editorIsHidden=!l.wrapper.offsetWidth,this.wrapperHeight=l.wrapper.clientHeight,this.wrapperWidth=l.wrapper.clientWidth,this.oldDisplayWidth=Gi(e),this.force=u,this.dims=vo(e),this.events=[]};Rn.prototype.signal=function(e,n){We(e,n)&&this.events.push(arguments)},Rn.prototype.finish=function(){for(var e=0;e<this.events.length;e++)Oe.apply(null,this.events[e])};function zs(e){var n=e.display;!n.scrollbarsClipped&&n.scroller.offsetWidth&&(n.nativeBarWidth=n.scroller.offsetWidth-n.scroller.clientWidth,n.heightForcer.style.height=Zr(e)+"px",n.sizer.style.marginBottom=-n.nativeBarWidth+"px",n.sizer.style.borderRightWidth=Zr(e)+"px",n.scrollbarsClipped=!0)}function Cn(e){if(e.hasFocus())return null;var n=Re();if(!n||!oe(e.display.lineDiv,n))return null;var u={activeElt:n};if(window.getSelection){var l=window.getSelection();l.anchorNode&&l.extend&&oe(e.display.lineDiv,l.anchorNode)&&(u.anchorNode=l.anchorNode,u.anchorOffset=l.anchorOffset,u.focusNode=l.focusNode,u.focusOffset=l.focusOffset)}return u}function Vr(e){if(!(!e||!e.activeElt||e.activeElt==Re())&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&oe(document.body,e.anchorNode)&&oe(document.body,e.focusNode))){var n=window.getSelection(),u=document.createRange();u.setEnd(e.anchorNode,e.anchorOffset),u.collapse(!1),n.removeAllRanges(),n.addRange(u),n.extend(e.focusNode,e.focusOffset)}}function ja(e,n){var u=e.display,l=e.doc;if(n.editorIsHidden)return An(e),!1;if(!n.force&&n.visible.from>=u.viewFrom&&n.visible.to<=u.viewTo&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo)&&u.renderedView==u.view&&Wf(e)==0)return!1;Ys(e)&&(An(e),n.dims=vo(e));var f=l.first+l.size,g=Math.max(n.visible.from-e.options.viewportMargin,l.first),k=Math.min(f,n.visible.to+e.options.viewportMargin);u.viewFrom<g&&g-u.viewFrom<20&&(g=Math.max(l.first,u.viewFrom)),u.viewTo>k&&u.viewTo-k<20&&(k=Math.min(f,u.viewTo)),Ei&&(g=Es(e.doc,g),k=Cs(e.doc,k));var j=g!=u.viewFrom||k!=u.viewTo||u.lastWrapHeight!=n.wrapperHeight||u.lastWrapWidth!=n.wrapperWidth;Hf(e,g,k),u.viewOffset=Xn(St(e.doc,u.viewFrom)),e.display.mover.style.top=u.viewOffset+"px";var W=Wf(e);if(!j&&W==0&&!n.force&&u.renderedView==u.view&&(u.updateLineNumbers==null||u.updateLineNumbers>=u.viewTo))return!1;var q=Cn(e);return W>4&&(u.lineDiv.style.display="none"),$s(e,u.updateLineNumbers,n.dims),W>4&&(u.lineDiv.style.display=""),u.renderedView=u.view,Vr(q),se(u.cursorDiv),se(u.selectionDiv),u.gutters.style.height=u.sizer.style.minHeight=0,j&&(u.lastWrapHeight=n.wrapperHeight,u.lastWrapWidth=n.wrapperWidth,Ii(e,400)),u.updateLineNumbers=null,!0}function Gs(e,n){for(var u=n.viewport,l=!0;;l=!1){if(!l||!e.options.lineWrapping||n.oldDisplayWidth==Gi(e)){if(u&&u.top!=null&&(u={top:Math.min(e.doc.height+Qn(e.display)-ks(e),u.top)}),n.visible=Fn(e.display,e.doc,u),n.visible.from>=e.display.viewFrom&&n.visible.to<=e.display.viewTo)break}else l&&(n.visible=Fn(e.display,e.doc,u));if(!ja(e,n))break;Ti(e);var f=Qi(e);Na(e),Zi(e,f),Ao(e,f),n.force=!1}n.signal(e,"update",e),(e.display.viewFrom!=e.display.reportedViewFrom||e.display.viewTo!=e.display.reportedViewTo)&&(n.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function Va(e,n){var u=new Rn(e,n);if(ja(e,u)){Ti(e),Gs(e,u);var l=Qi(e);Na(e),Zi(e,l),Ao(e,l),u.finish()}}function $s(e,n,u){var l=e.display,f=e.options.lineNumbers,g=l.lineDiv,k=g.firstChild;function j(Ye){var et=Ye.nextSibling;return w&&P&&e.display.currentWheelTarget==Ye?Ye.style.display="none":Ye.parentNode.removeChild(Ye),et}for(var W=l.view,q=l.viewFrom,we=0;we<W.length;we++){var Ee=W[we];if(!Ee.hidden)if(!Ee.node||Ee.node.parentNode!=g){var Ne=Nf(e,Ee,q,u);g.insertBefore(Ne,k)}else{for(;k!=Ee.node;)k=j(k);var Me=f&&n!=null&&n<=q&&Ee.lineNumber;Ee.changes&&(ut(Ee.changes,"gutter")>-1&&(Me=!1),Ps(e,Ee,q,u)),Me&&(se(Ee.lineNumber),Ee.lineNumber.appendChild(document.createTextNode(lo(e.options,q)))),k=Ee.node.nextSibling}q+=Ee.size}for(;k;)k=j(k)}function Ha(e){var n=e.gutters.offsetWidth;e.sizer.style.marginLeft=n+"px",Fr(e,"gutterChanged",e)}function Ao(e,n){e.display.sizer.style.minHeight=n.docHeight+"px",e.display.heightForcer.style.top=n.docHeight+"px",e.display.gutters.style.height=n.docHeight+e.display.barHeight+Zr(e)+"px"}function Ks(e){var n=e.display,u=n.view;if(!(!n.alignWidgets&&(!n.gutters.firstChild||!e.options.fixedGutter))){for(var l=Bs(n)-n.scroller.scrollLeft+e.doc.scrollLeft,f=n.gutters.offsetWidth,g=l+"px",k=0;k<u.length;k++)if(!u[k].hidden){e.options.fixedGutter&&(u[k].gutter&&(u[k].gutter.style.left=g),u[k].gutterBackground&&(u[k].gutterBackground.style.left=g));var j=u[k].alignable;if(j)for(var W=0;W<j.length;W++)j[W].style.left=g}e.options.fixedGutter&&(n.gutters.style.left=l+f+"px")}}function Ys(e){if(!e.options.lineNumbers)return!1;var n=e.doc,u=lo(e.options,n.first+n.size-1),l=e.display;if(u.length!=l.lineNumChars){var f=l.measure.appendChild(me("div",[me("div",u)],"CodeMirror-linenumber CodeMirror-gutter-elt")),g=f.firstChild.offsetWidth,k=f.offsetWidth-g;return l.lineGutter.style.width="",l.lineNumInnerWidth=Math.max(g,l.lineGutter.offsetWidth-k)+1,l.lineNumWidth=l.lineNumInnerWidth+k,l.lineNumChars=l.lineNumInnerWidth?u.length:-1,l.lineGutter.style.width=l.lineNumWidth+"px",Ha(e.display),!0}return!1}function Wa(e,n){for(var u=[],l=!1,f=0;f<e.length;f++){var g=e[f],k=null;if(typeof g!="string"&&(k=g.style,g=g.className),g=="CodeMirror-linenumbers")if(n)l=!0;else continue;u.push({className:g,style:k})}return n&&!l&&u.push({className:"CodeMirror-linenumbers",style:null}),u}function Js(e){var n=e.gutters,u=e.gutterSpecs;se(n),e.lineGutter=null;for(var l=0;l<u.length;++l){var f=u[l],g=f.className,k=f.style,j=n.appendChild(me("div",null,"CodeMirror-gutter "+g));k&&(j.style.cssText=k),g=="CodeMirror-linenumbers"&&(e.lineGutter=j,j.style.width=(e.lineNumWidth||1)+"px")}n.style.display=u.length?"":"none",Ha(e)}function Eo(e){Js(e.display),qr(e),Ks(e)}function ei(e,n,u,l){var f=this;this.input=u,f.scrollbarFiller=me("div",null,"CodeMirror-scrollbar-filler"),f.scrollbarFiller.setAttribute("cm-not-content","true"),f.gutterFiller=me("div",null,"CodeMirror-gutter-filler"),f.gutterFiller.setAttribute("cm-not-content","true"),f.lineDiv=he("div",null,"CodeMirror-code"),f.selectionDiv=me("div",null,null,"position: relative; z-index: 1"),f.cursorDiv=me("div",null,"CodeMirror-cursors"),f.measure=me("div",null,"CodeMirror-measure"),f.lineMeasure=me("div",null,"CodeMirror-measure"),f.lineSpace=he("div",[f.measure,f.lineMeasure,f.selectionDiv,f.cursorDiv,f.lineDiv],null,"position: relative; outline: none");var g=he("div",[f.lineSpace],"CodeMirror-lines");f.mover=me("div",[g],null,"position: relative"),f.sizer=me("div",[f.mover],"CodeMirror-sizer"),f.sizerWidth=null,f.heightForcer=me("div",null,null,"position: absolute; height: "+gt+"px; width: 1px;"),f.gutters=me("div",null,"CodeMirror-gutters"),f.lineGutter=null,f.scroller=me("div",[f.sizer,f.heightForcer,f.gutters],"CodeMirror-scroll"),f.scroller.setAttribute("tabIndex","-1"),f.wrapper=me("div",[f.scrollbarFiller,f.gutterFiller,f.scroller],"CodeMirror"),x&&A<8&&(f.gutters.style.zIndex=-1,f.scroller.style.paddingRight=0),!w&&!(c&&L)&&(f.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(f.wrapper):e(f.wrapper)),f.viewFrom=f.viewTo=n.first,f.reportedViewFrom=f.reportedViewTo=n.first,f.view=[],f.renderedView=null,f.externalMeasured=null,f.viewOffset=0,f.lastWrapHeight=f.lastWrapWidth=0,f.updateLineNumbers=null,f.nativeBarWidth=f.barHeight=f.barWidth=0,f.scrollbarsClipped=!1,f.lineNumWidth=f.lineNumInnerWidth=f.lineNumChars=null,f.alignWidgets=!1,f.cachedCharWidth=f.cachedTextHeight=f.cachedPaddingH=null,f.maxLine=null,f.maxLineLength=0,f.maxLineChanged=!1,f.wheelDX=f.wheelDY=f.wheelStartX=f.wheelStartY=null,f.shift=!1,f.selForContextMenu=null,f.activeTouch=null,f.gutterSpecs=Wa(l.gutters,l.lineNumbers),Js(f),u.init(f)}var ra=0,dn=null;x?dn=-.53:c?dn=15:D?dn=-.7:U&&(dn=-1/3);function Xs(e){var n=e.wheelDeltaX,u=e.wheelDeltaY;return n==null&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(n=e.detail),u==null&&e.detail&&e.axis==e.VERTICAL_AXIS?u=e.detail:u==null&&(u=e.wheelDelta),{x:n,y:u}}function pu(e){var n=Xs(e);return n.x*=dn,n.y*=dn,n}function Qs(e,n){var u=Xs(n),l=u.x,f=u.y,g=e.display,k=g.scroller,j=k.scrollWidth>k.clientWidth,W=k.scrollHeight>k.clientHeight;if(!!(l&&j||f&&W)){if(f&&P&&w){e:for(var q=n.target,we=g.view;q!=k;q=q.parentNode)for(var Ee=0;Ee<we.length;Ee++)if(we[Ee].node==q){e.display.currentWheelTarget=q;break e}}if(l&&!c&&!B&&dn!=null){f&&W&&mo(e,Math.max(0,k.scrollTop+f*dn)),Pi(e,Math.max(0,k.scrollLeft+l*dn)),(!f||f&&W)&&nt(n),g.wheelStartX=null;return}if(f&&dn!=null){var Ne=f*dn,Me=e.doc.scrollTop,Ye=Me+g.wrapper.clientHeight;Ne<0?Me=Math.max(0,Me+Ne-50):Ye=Math.min(e.doc.height,Ye+Ne+50),Va(e,{top:Me,bottom:Ye})}ra<20&&(g.wheelStartX==null?(g.wheelStartX=k.scrollLeft,g.wheelStartY=k.scrollTop,g.wheelDX=l,g.wheelDY=f,setTimeout(function(){if(g.wheelStartX!=null){var et=k.scrollLeft-g.wheelStartX,ot=k.scrollTop-g.wheelStartY,ft=ot&&g.wheelDY&&ot/g.wheelDY||et&&g.wheelDX&&et/g.wheelDX;g.wheelStartX=g.wheelStartY=null,!!ft&&(dn=(dn*ra+ft)/(ra+1),++ra)}},200)):(g.wheelDX+=l,g.wheelDY+=f))}}var pn=function(e,n){this.ranges=e,this.primIndex=n};pn.prototype.primary=function(){return this.ranges[this.primIndex]},pn.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var n=0;n<this.ranges.length;n++){var u=this.ranges[n],l=e.ranges[n];if(!si(u.anchor,l.anchor)||!si(u.head,l.head))return!1}return!0},pn.prototype.deepCopy=function(){for(var e=[],n=0;n<this.ranges.length;n++)e[n]=new qt(ae(this.ranges[n].anchor),ae(this.ranges[n].head));return new pn(e,this.primIndex)},pn.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},pn.prototype.contains=function(e,n){n||(n=e);for(var u=0;u<this.ranges.length;u++){var l=this.ranges[u];if(Lt(n,l.from())>=0&&Lt(e,l.to())<=0)return u}return-1};var qt=function(e,n){this.anchor=e,this.head=n};qt.prototype.from=function(){return Qe(this.anchor,this.head)},qt.prototype.to=function(){return Ce(this.anchor,this.head)},qt.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Mn(e,n,u){var l=e&&e.options.selectionsMayTouch,f=n[u];n.sort(function(Ne,Me){return Lt(Ne.from(),Me.from())}),u=ut(n,f);for(var g=1;g<n.length;g++){var k=n[g],j=n[g-1],W=Lt(j.to(),k.from());if(l&&!k.empty()?W>0:W>=0){var q=Qe(j.from(),k.from()),we=Ce(j.to(),k.to()),Ee=j.empty()?k.from()==k.head:j.from()==j.head;g<=u&&--u,n.splice(--g,2,new qt(Ee?we:q,Ee?q:we))}}return new pn(n,u)}function ci(e,n){return new pn([new qt(e,n||e)],0)}function Wn(e){return e.text?rt(e.from.line+e.text.length-1,Et(e.text).length+(e.text.length==1?e.from.ch:0)):e.to}function $f(e,n){if(Lt(e,n.from)<0)return e;if(Lt(e,n.to)<=0)return Wn(n);var u=e.line+n.text.length-(n.to.line-n.from.line)-1,l=e.ch;return e.line==n.to.line&&(l+=Wn(n).ch-n.to.ch),rt(u,l)}function za(e,n){for(var u=[],l=0;l<e.sel.ranges.length;l++){var f=e.sel.ranges[l];u.push(new qt($f(f.anchor,n),$f(f.head,n)))}return Mn(e.cm,u,e.sel.primIndex)}function hu(e,n,u){return e.line==n.line?rt(u.line,e.ch-n.ch+u.ch):rt(u.line+(e.line-n.line),e.ch)}function Xe(e,n,u){for(var l=[],f=rt(e.first,0),g=f,k=0;k<n.length;k++){var j=n[k],W=hu(j.from,f,g),q=hu(Wn(j),f,g);if(f=j.to,g=q,u=="around"){var we=e.sel.ranges[k],Ee=Lt(we.head,we.anchor)<0;l[k]=new qt(Ee?q:W,Ee?W:q)}else l[k]=new qt(W,W)}return new pn(l,e.sel.primIndex)}function Ga(e){e.doc.mode=Vn(e.options,e.doc.modeOption),Fi(e)}function Fi(e){e.doc.iter(function(n){n.stateAfter&&(n.stateAfter=null),n.styles&&(n.styles=null)}),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Ii(e,100),e.state.modeGen++,e.curOp&&qr(e)}function $a(e,n){return n.from.ch==0&&n.to.ch==0&&Et(n.text)==""&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Ka(e,n,u,l){function f(yt){return u?u[yt]:null}function g(yt,ct,mt){Vl(yt,ct,mt,l),Fr(yt,"change",yt,n)}function k(yt,ct){for(var mt=[],Pt=yt;Pt<ct;++Pt)mt.push(new Wi(q[Pt],f(Pt),l));return mt}var j=n.from,W=n.to,q=n.text,we=St(e,j.line),Ee=St(e,W.line),Ne=Et(q),Me=f(q.length-1),Ye=W.line-j.line;if(n.full)e.insert(0,k(0,q.length)),e.remove(q.length,e.size-q.length);else if($a(e,n)){var et=k(0,q.length-1);g(Ee,Ee.text,Me),Ye&&e.remove(j.line,Ye),et.length&&e.insert(j.line,et)}else if(we==Ee)if(q.length==1)g(we,we.text.slice(0,j.ch)+Ne+we.text.slice(W.ch),Me);else{var ot=k(1,q.length-1);ot.push(new Wi(Ne+we.text.slice(W.ch),Me,l)),g(we,we.text.slice(0,j.ch)+q[0],f(0)),e.insert(j.line+1,ot)}else if(q.length==1)g(we,we.text.slice(0,j.ch)+q[0]+Ee.text.slice(W.ch),f(0)),e.remove(j.line+1,Ye);else{g(we,we.text.slice(0,j.ch)+q[0],f(0)),g(Ee,Ne+Ee.text.slice(W.ch),Me);var ft=k(1,q.length-1);Ye>1&&e.remove(j.line+1,Ye-1),e.insert(j.line+1,ft)}Fr(e,"change",e,n)}function di(e,n,u){function l(f,g,k){if(f.linked)for(var j=0;j<f.linked.length;++j){var W=f.linked[j];if(W.doc!=g){var q=k&&W.sharedHist;u&&!q||(n(W.doc,q),l(W.doc,f,q))}}}l(e,null,!0)}function vu(e,n){if(n.cm)throw new Error("This document is already in use.");e.doc=n,n.cm=e,ou(e),Ga(e),Kt(e),e.options.direction=n.direction,e.options.lineWrapping||Fa(e),e.options.mode=n.modeOption,qr(e)}function Kt(e){(e.doc.direction=="rtl"?Ue:te)(e.display.lineDiv,"CodeMirror-rtl")}function gu(e){on(e,function(){Kt(e),qr(e)})}function ti(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function Zs(e,n){var u={from:ae(n.from),to:Wn(n),text:ai(e,n.from,n.to)};return yu(e,u,n.from.line,n.to.line+1),di(e,function(l){return yu(l,u,n.from.line,n.to.line+1)},!0),u}function ki(e){for(;e.length;){var n=Et(e);if(n.ranges)e.pop();else break}}function Kf(e,n){if(n)return ki(e.done),Et(e.done);if(e.done.length&&!Et(e.done).ranges)return Et(e.done);if(e.done.length>1&&!e.done[e.done.length-2].ranges)return e.done.pop(),Et(e.done)}function qs(e,n,u,l){var f=e.history;f.undone.length=0;var g=+new Date,k,j;if((f.lastOp==l||f.lastOrigin==n.origin&&n.origin&&(n.origin.charAt(0)=="+"&&f.lastModTime>g-(e.cm?e.cm.options.historyEventDelay:500)||n.origin.charAt(0)=="*"))&&(k=Kf(f,f.lastOp==l)))j=Et(k.changes),Lt(n.from,n.to)==0&&Lt(n.from,j.to)==0?j.to=Wn(n):k.changes.push(Zs(e,n));else{var W=Et(f.done);for((!W||!W.ranges)&&na(e.sel,f.done),k={changes:[Zs(e,n)],generation:f.generation},f.done.push(k);f.done.length>f.undoDepth;)f.done.shift(),f.done[0].ranges||f.done.shift()}f.done.push(u),f.generation=++f.maxGeneration,f.lastModTime=f.lastSelTime=g,f.lastOp=f.lastSelOp=l,f.lastOrigin=f.lastSelOrigin=n.origin,j||Oe(e,"historyAdded")}function Yf(e,n,u,l){var f=n.charAt(0);return f=="*"||f=="+"&&u.ranges.length==l.ranges.length&&u.somethingSelected()==l.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Jf(e,n,u,l){var f=e.history,g=l&&l.origin;u==f.lastSelOp||g&&f.lastSelOrigin==g&&(f.lastModTime==f.lastSelTime&&f.lastOrigin==g||Yf(e,g,Et(f.done),n))?f.done[f.done.length-1]=n:na(n,f.done),f.lastSelTime=+new Date,f.lastSelOrigin=g,f.lastSelOp=u,l&&l.clearRedo!==!1&&ki(f.undone)}function na(e,n){var u=Et(n);u&&u.ranges&&u.equals(e)||n.push(e)}function yu(e,n,u,l){var f=n["spans_"+e.id],g=0;e.iter(Math.max(e.first,u),Math.min(e.first+e.size,l),function(k){k.markedSpans&&((f||(f=n["spans_"+e.id]={}))[g]=k.markedSpans),++g})}function Xf(e){if(!e)return null;for(var n,u=0;u<e.length;++u)e[u].marker.explicitlyCleared?n||(n=e.slice(0,u)):n&&n.push(e[u]);return n?n.length?n:null:e}function hn(e,n){var u=n["spans_"+e.id];if(!u)return null;for(var l=[],f=0;f<n.text.length;++f)l.push(Xf(u[f]));return l}function _s(e,n){var u=hn(e,n),l=Nl(e,n);if(!u)return l;if(!l)return u;for(var f=0;f<u.length;++f){var g=u[f],k=l[f];if(g&&k){e:for(var j=0;j<k.length;++j){for(var W=k[j],q=0;q<g.length;++q)if(g[q].marker==W.marker)continue e;g.push(W)}}else k&&(u[f]=k)}return u}function Co(e,n,u){for(var l=[],f=0;f<e.length;++f){var g=e[f];if(g.ranges){l.push(u?pn.prototype.deepCopy.call(g):g);continue}var k=g.changes,j=[];l.push({changes:j});for(var W=0;W<k.length;++W){var q=k[W],we=void 0;if(j.push({from:q.from,to:q.to,text:q.text}),n)for(var Ee in q)(we=Ee.match(/^spans_(\d+)$/))&&ut(n,Number(we[1]))>-1&&(Et(j)[Ee]=q[Ee],delete q[Ee])}}return l}function ia(e,n,u,l){if(l){var f=e.anchor;if(u){var g=Lt(n,f)<0;g!=Lt(u,f)<0?(f=n,n=u):g!=Lt(n,u)<0&&(n=u)}return new qt(f,n)}else return new qt(u||n,n)}function Kr(e,n,u,l,f){f==null&&(f=e.cm&&(e.cm.display.shift||e.extend)),_t(e,new pn([ia(e.sel.primary(),n,u,f)],0),l)}function mu(e,n,u){for(var l=[],f=e.cm&&(e.cm.display.shift||e.extend),g=0;g<e.sel.ranges.length;g++)l[g]=ia(e.sel.ranges[g],n[g],null,f);var k=Mn(e.cm,l,e.sel.primIndex);_t(e,k,u)}function ri(e,n,u,l){var f=e.sel.ranges.slice(0);f[n]=u,_t(e,Mn(e.cm,f,e.sel.primIndex),l)}function Ya(e,n,u,l){_t(e,ci(n,u),l)}function xu(e,n,u){var l={ranges:n.ranges,update:function(f){this.ranges=[];for(var g=0;g<f.length;g++)this.ranges[g]=new qt(st(e,f[g].anchor),st(e,f[g].head))},origin:u&&u.origin};return Oe(e,"beforeSelectionChange",e,l),e.cm&&Oe(e.cm,"beforeSelectionChange",e.cm,l),l.ranges!=n.ranges?Mn(e.cm,l.ranges,l.ranges.length-1):n}function el(e,n,u){var l=e.history.done,f=Et(l);f&&f.ranges?(l[l.length-1]=n,Ja(e,n,u)):_t(e,n,u)}function _t(e,n,u){Ja(e,n,u),Jf(e,e.sel,e.cm?e.cm.curOp.id:NaN,u)}function Ja(e,n,u){(We(e,"beforeSelectionChange")||e.cm&&We(e.cm,"beforeSelectionChange"))&&(n=xu(e,n,u));var l=u&&u.bias||(Lt(n.primary().head,e.sel.primary().head)<0?-1:1);Xa(e,Qa(e,n,l,!0)),!(u&&u.scroll===!1)&&e.cm&&e.cm.getOption("readOnly")!="nocursor"&&Jt(e.cm)}function Xa(e,n){n.equals(e.sel)||(e.sel=n,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,Te(e.cm)),Fr(e,"cursorActivity",e))}function bu(e){Xa(e,Qa(e,e.sel,null,!1))}function Qa(e,n,u,l){for(var f,g=0;g<n.ranges.length;g++){var k=n.ranges[g],j=n.ranges.length==e.sel.ranges.length&&e.sel.ranges[g],W=tl(e,k.anchor,j&&j.anchor,u,l),q=tl(e,k.head,j&&j.head,u,l);(f||W!=k.anchor||q!=k.head)&&(f||(f=n.ranges.slice(0,g)),f[g]=new qt(W,q))}return f?Mn(e.cm,f,n.primIndex):n}function Oo(e,n,u,l,f){var g=St(e,n.line);if(g.markedSpans)for(var k=0;k<g.markedSpans.length;++k){var j=g.markedSpans[k],W=j.marker,q="selectLeft"in W?!W.selectLeft:W.inclusiveLeft,we="selectRight"in W?!W.selectRight:W.inclusiveRight;if((j.from==null||(q?j.from<=n.ch:j.from<n.ch))&&(j.to==null||(we?j.to>=n.ch:j.to>n.ch))){if(f&&(Oe(W,"beforeCursorEnter"),W.explicitlyCleared))if(g.markedSpans){--k;continue}else break;if(!W.atomic)continue;if(u){var Ee=W.find(l<0?1:-1),Ne=void 0;if((l<0?we:q)&&(Ee=wu(e,Ee,-l,Ee&&Ee.line==n.line?g:null)),Ee&&Ee.line==n.line&&(Ne=Lt(Ee,u))&&(l<0?Ne<0:Ne>0))return Oo(e,Ee,n,l,f)}var Me=W.find(l<0?-1:1);return(l<0?q:we)&&(Me=wu(e,Me,l,Me.line==n.line?g:null)),Me?Oo(e,Me,n,l,f):null}}return n}function tl(e,n,u,l,f){var g=l||1,k=Oo(e,n,u,g,f)||!f&&Oo(e,n,u,g,!0)||Oo(e,n,u,-g,f)||!f&&Oo(e,n,u,-g,!0);return k||(e.cantEdit=!0,rt(e.first,0))}function wu(e,n,u,l){return u<0&&n.ch==0?n.line>e.first?st(e,rt(n.line-1)):null:u>0&&n.ch==(l||St(e,n.line)).text.length?n.line<e.first+e.size-1?rt(n.line+1,0):null:new rt(n.line,n.ch+u)}function Su(e){e.setSelection(rt(e.firstLine(),0),rt(e.lastLine()),lt)}function Au(e,n,u){var l={canceled:!1,from:n.from,to:n.to,text:n.text,origin:n.origin,cancel:function(){return l.canceled=!0}};return u&&(l.update=function(f,g,k,j){f&&(l.from=st(e,f)),g&&(l.to=st(e,g)),k&&(l.text=k),j!==void 0&&(l.origin=j)}),Oe(e,"beforeChange",e,l),e.cm&&Oe(e.cm,"beforeChange",e.cm,l),l.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:l.from,to:l.to,text:l.text,origin:l.origin}}function To(e,n,u){if(e.cm){if(!e.cm.curOp)return Wr(e.cm,To)(e,n,u);if(e.cm.state.suppressEdits)return}if(!((We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"))&&(n=Au(e,n,!0),!n))){var l=Sf&&!u&&Bl(e,n.from,n.to);if(l)for(var f=l.length-1;f>=0;--f)Za(e,{from:l[f].from,to:l[f].to,text:f?[""]:n.text,origin:n.origin});else Za(e,n)}}function Za(e,n){if(!(n.text.length==1&&n.text[0]==""&&Lt(n.from,n.to)==0)){var u=za(e,n);qs(e,n,u,e.cm?e.cm.curOp.id:NaN),pr(e,n,u,Nl(e,n));var l=[];di(e,function(f,g){!g&&ut(l,f.history)==-1&&(qf(f.history,n),l.push(f.history)),pr(f,n,null,Nl(f,n))})}}function qa(e,n,u){var l=e.cm&&e.cm.state.suppressEdits;if(!(l&&!u)){for(var f=e.history,g,k=e.sel,j=n=="undo"?f.done:f.undone,W=n=="undo"?f.undone:f.done,q=0;q<j.length&&(g=j[q],!(u?g.ranges&&!g.equals(e.sel):!g.ranges));q++);if(q!=j.length){for(f.lastOrigin=f.lastSelOrigin=null;;)if(g=j.pop(),g.ranges){if(na(g,W),u&&!g.equals(e.sel)){_t(e,g,{clearRedo:!1});return}k=g}else if(l){j.push(g);return}else break;var we=[];na(k,W),W.push({changes:we,generation:f.generation}),f.generation=g.generation||++f.maxGeneration;for(var Ee=We(e,"beforeChange")||e.cm&&We(e.cm,"beforeChange"),Ne=function(et){var ot=g.changes[et];if(ot.origin=n,Ee&&!Au(e,ot,!1))return j.length=0,{};we.push(Zs(e,ot));var ft=et?za(e,ot):Et(j);pr(e,ot,ft,_s(e,ot)),!et&&e.cm&&e.cm.scrollIntoView({from:ot.from,to:Wn(ot)});var yt=[];di(e,function(ct,mt){!mt&&ut(yt,ct.history)==-1&&(qf(ct.history,ot),yt.push(ct.history)),pr(ct,ot,null,_s(ct,ot))})},Me=g.changes.length-1;Me>=0;--Me){var Ye=Ne(Me);if(Ye)return Ye.v}}}}function Eu(e,n){if(n!=0&&(e.first+=n,e.sel=new pn(Ut(e.sel.ranges,function(f){return new qt(rt(f.anchor.line+n,f.anchor.ch),rt(f.head.line+n,f.head.ch))}),e.sel.primIndex),e.cm)){qr(e.cm,e.first,e.first-n,n);for(var u=e.cm.display,l=u.viewFrom;l<u.viewTo;l++)Xi(e.cm,l,"gutter")}}function pr(e,n,u,l){if(e.cm&&!e.cm.curOp)return Wr(e.cm,pr)(e,n,u,l);if(n.to.line<e.first){Eu(e,n.text.length-1-(n.to.line-n.from.line));return}if(!(n.from.line>e.lastLine())){if(n.from.line<e.first){var f=n.text.length-1-(e.first-n.from.line);Eu(e,f),n={from:rt(e.first,0),to:rt(n.to.line+f,n.to.ch),text:[Et(n.text)],origin:n.origin}}var g=e.lastLine();n.to.line>g&&(n={from:n.from,to:rt(g,St(e,g).text.length),text:[n.text[0]],origin:n.origin}),n.removed=ai(e,n.from,n.to),u||(u=za(e,n)),e.cm?oa(e.cm,n,l):Ka(e,n,l),Ja(e,u,lt),e.cantEdit&&tl(e,rt(e.firstLine(),0))&&(e.cantEdit=!1)}}function oa(e,n,u){var l=e.doc,f=e.display,g=n.from,k=n.to,j=!1,W=g.line;e.options.lineWrapping||(W=er(Ir(St(l,g.line))),l.iter(W,k.line+1,function(Me){if(Me==f.maxLine)return j=!0,!0})),l.sel.contains(n.from,n.to)>-1&&Te(e),Ka(l,n,u,Us(e)),e.options.lineWrapping||(l.iter(W,g.line+n.text.length,function(Me){var Ye=Hi(Me);Ye>f.maxLineLength&&(f.maxLine=Me,f.maxLineLength=Ye,f.maxLineChanged=!0,j=!1)}),j&&(e.curOp.updateMaxLine=!0)),wf(l,g.line),Ii(e,400);var q=n.text.length-(k.line-g.line)-1;n.full?qr(e):g.line==k.line&&n.text.length==1&&!$a(e.doc,n)?Xi(e,g.line,"text"):qr(e,g.line,k.line+1,q);var we=We(e,"changes"),Ee=We(e,"change");if(Ee||we){var Ne={from:g,to:k,text:n.text,removed:n.removed,origin:n.origin};Ee&&Fr(e,"change",e,Ne),we&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(Ne)}e.display.selForContextMenu=null}function Po(e,n,u,l,f){var g;l||(l=u),Lt(l,u)<0&&(g=[l,u],u=g[0],l=g[1]),typeof n=="string"&&(n=e.splitLines(n)),To(e,{from:u,to:l,text:n,origin:f})}function Qf(e,n,u,l){u<e.line?e.line+=l:n<e.line&&(e.line=n,e.ch=0)}function Zf(e,n,u,l){for(var f=0;f<e.length;++f){var g=e[f],k=!0;if(g.ranges){g.copied||(g=e[f]=g.deepCopy(),g.copied=!0);for(var j=0;j<g.ranges.length;j++)Qf(g.ranges[j].anchor,n,u,l),Qf(g.ranges[j].head,n,u,l);continue}for(var W=0;W<g.changes.length;++W){var q=g.changes[W];if(u<q.from.line)q.from=rt(q.from.line+l,q.from.ch),q.to=rt(q.to.line+l,q.to.ch);else if(n<=q.to.line){k=!1;break}}k||(e.splice(0,f+1),f=0)}}function qf(e,n){var u=n.from.line,l=n.to.line,f=n.text.length-(l-u)-1;Zf(e.done,u,l,f),Zf(e.undone,u,l,f)}function aa(e,n,u,l){var f=n,g=n;return typeof n=="number"?g=St(e,it(e,n)):f=er(n),f==null?null:(l(g,f)&&e.cm&&Xi(e.cm,f,u),g)}function sa(e){this.lines=e,this.parent=null;for(var n=0,u=0;u<e.length;++u)e[u].parent=this,n+=e[u].height;this.height=n}sa.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,n){for(var u=e,l=e+n;u<l;++u){var f=this.lines[u];this.height-=f.height,If(f),Fr(f,"delete")}this.lines.splice(e,n)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,n,u){this.height+=u,this.lines=this.lines.slice(0,e).concat(n).concat(this.lines.slice(e));for(var l=0;l<n.length;++l)n[l].parent=this},iterN:function(e,n,u){for(var l=e+n;e<l;++e)if(u(this.lines[e]))return!0}};function _a(e){this.children=e;for(var n=0,u=0,l=0;l<e.length;++l){var f=e[l];n+=f.chunkSize(),u+=f.height,f.parent=this}this.size=n,this.height=u,this.parent=null}_a.prototype={chunkSize:function(){return this.size},removeInner:function(e,n){this.size-=n;for(var u=0;u<this.children.length;++u){var l=this.children[u],f=l.chunkSize();if(e<f){var g=Math.min(n,f-e),k=l.height;if(l.removeInner(e,g),this.height-=k-l.height,f==g&&(this.children.splice(u--,1),l.parent=null),(n-=g)==0)break;e=0}else e-=f}if(this.size-n<25&&(this.children.length>1||!(this.children[0]instanceof sa))){var j=[];this.collapse(j),this.children=[new sa(j)],this.children[0].parent=this}},collapse:function(e){for(var n=0;n<this.children.length;++n)this.children[n].collapse(e)},insertInner:function(e,n,u){this.size+=n.length,this.height+=u;for(var l=0;l<this.children.length;++l){var f=this.children[l],g=f.chunkSize();if(e<=g){if(f.insertInner(e,n,u),f.lines&&f.lines.length>50){for(var k=f.lines.length%25+25,j=k;j<f.lines.length;){var W=new sa(f.lines.slice(j,j+=25));f.height-=W.height,this.children.splice(++l,0,W),W.parent=this}f.lines=f.lines.slice(0,k),this.maybeSpill()}break}e-=g}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var n=e.children.splice(e.children.length-5,5),u=new _a(n);if(e.parent){e.size-=u.size,e.height-=u.height;var f=ut(e.parent.children,e);e.parent.children.splice(f+1,0,u)}else{var l=new _a(e.children);l.parent=e,e.children=[l,u],e=l}u.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,n,u){for(var l=0;l<this.children.length;++l){var f=this.children[l],g=f.chunkSize();if(e<g){var k=Math.min(n,g-e);if(f.iterN(e,k,u))return!0;if((n-=k)==0)break;e=0}else e-=g}}};var la=function(e,n,u){if(u)for(var l in u)u.hasOwnProperty(l)&&(this[l]=u[l]);this.doc=e,this.node=n};la.prototype.clear=function(){var e=this.doc.cm,n=this.line.widgets,u=this.line,l=er(u);if(!(l==null||!n)){for(var f=0;f<n.length;++f)n[f]==this&&n.splice(f--,1);n.length||(u.widgets=null);var g=Ko(this);bn(u,Math.max(0,u.height-g)),e&&(on(e,function(){Cu(e,u,-g),Xi(e,l,"widget")}),Fr(e,"lineWidgetCleared",e,this,l))}},la.prototype.changed=function(){var e=this,n=this.height,u=this.doc.cm,l=this.line;this.height=null;var f=Ko(this)-n;!f||(Ci(this.doc,l)||bn(l,l.height+f),u&&on(u,function(){u.curOp.forceUpdate=!0,Cu(u,l,f),Fr(u,"lineWidgetChanged",u,e,er(l))}))},He(la);function Cu(e,n,u){Xn(n)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&En(e,u)}function _f(e,n,u,l){var f=new la(e,u,l),g=e.cm;return g&&f.noHScroll&&(g.display.alignWidgets=!0),aa(e,n,"widget",function(k){var j=k.widgets||(k.widgets=[]);if(f.insertAt==null?j.push(f):j.splice(Math.min(j.length,Math.max(0,f.insertAt)),0,f),f.line=k,g&&!Ci(e,k)){var W=Xn(k)<e.scrollTop;bn(k,k.height+Ko(f)),W&&En(g,f.height),g.curOp.forceUpdate=!0}return!0}),g&&Fr(g,"lineWidgetAdded",g,f,typeof n=="number"?n:er(n)),f}var Ou=0,Ri=function(e,n){this.lines=[],this.type=n,this.doc=e,this.id=++Ou};Ri.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,n=e&&!e.curOp;if(n&&Sr(e),We(this,"clear")){var u=this.find();u&&Fr(this,"clear",u.from,u.to)}for(var l=null,f=null,g=0;g<this.lines.length;++g){var k=this.lines[g],j=Wo(k.markedSpans,this);e&&!this.collapsed?Xi(e,er(k),"text"):e&&(j.to!=null&&(f=er(k)),j.from!=null&&(l=er(k))),k.markedSpans=Cf(k.markedSpans,j),j.from==null&&this.collapsed&&!Ci(this.doc,k)&&e&&bn(k,ho(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var W=0;W<this.lines.length;++W){var q=Ir(this.lines[W]),we=Hi(q);we>e.display.maxLineLength&&(e.display.maxLine=q,e.display.maxLineLength=we,e.display.maxLineChanged=!0)}l!=null&&e&&this.collapsed&&qr(e,l,f+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&bu(e.doc)),e&&Fr(e,"markerCleared",e,this,l,f),n&&cn(e),this.parent&&this.parent.clear()}},Ri.prototype.find=function(e,n){e==null&&this.type=="bookmark"&&(e=1);for(var u,l,f=0;f<this.lines.length;++f){var g=this.lines[f],k=Wo(g.markedSpans,this);if(k.from!=null&&(u=rt(n?g:er(g),k.from),e==-1))return u;if(k.to!=null&&(l=rt(n?g:er(g),k.to),e==1))return l}return u&&{from:u,to:l}},Ri.prototype.changed=function(){var e=this,n=this.find(-1,!0),u=this,l=this.doc.cm;!n||!l||on(l,function(){var f=n.line,g=er(n.line),k=Jo(l,g);if(k&&(tu(k),l.curOp.selectionChanged=l.curOp.forceUpdate=!0),l.curOp.updateMaxLine=!0,!Ci(u.doc,f)&&u.height!=null){var j=u.height;u.height=null;var W=Ko(u)-j;W&&bn(f,f.height+W)}Fr(l,"markerChanged",l,e)})},Ri.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(!n.maybeHiddenMarkers||ut(n.maybeHiddenMarkers,this)==-1)&&(n.maybeUnhiddenMarkers||(n.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},Ri.prototype.detachLine=function(e){if(this.lines.splice(ut(this.lines,e),1),!this.lines.length&&this.doc.cm){var n=this.doc.cm.curOp;(n.maybeHiddenMarkers||(n.maybeHiddenMarkers=[])).push(this)}},He(Ri);function Io(e,n,u,l,f){if(l&&l.shared)return zn(e,n,u,l,f);if(e.cm&&!e.cm.curOp)return Wr(e.cm,Io)(e,n,u,l,f);var g=new Ri(e,f),k=Lt(n,u);if(l&&Je(l,g,!1),k>0||k==0&&g.clearWhenEmpty!==!1)return g;if(g.replacedWith&&(g.collapsed=!0,g.widgetNode=he("span",[g.replacedWith],"CodeMirror-widget"),l.handleMouseEvents||g.widgetNode.setAttribute("cm-ignore-events","true"),l.insertLeft&&(g.widgetNode.insertLeft=!0)),g.collapsed){if(At(e,n.line,n,u,g)||n.line!=u.line&&At(e,u.line,n,u,g))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ef()}g.addToHistory&&qs(e,{from:n,to:u,origin:"markText"},e.sel,NaN);var j=n.line,W=e.cm,q;if(e.iter(j,u.line+1,function(Ee){W&&g.collapsed&&!W.options.lineWrapping&&Ir(Ee)==W.display.maxLine&&(q=!0),g.collapsed&&j!=n.line&&bn(Ee,0),wd(Ee,new Pa(g,j==n.line?n.ch:null,j==u.line?u.ch:null),e.cm&&e.cm.curOp),++j}),g.collapsed&&e.iter(n.line,u.line+1,function(Ee){Ci(e,Ee)&&bn(Ee,0)}),g.clearOnEnter&&N(g,"beforeCursorEnter",function(){return g.clear()}),g.readOnly&&(Af(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),g.collapsed&&(g.id=++Ou,g.atomic=!0),W){if(q&&(W.curOp.updateMaxLine=!0),g.collapsed)qr(W,n.line,u.line+1);else if(g.className||g.startStyle||g.endStyle||g.css||g.attributes||g.title)for(var we=n.line;we<=u.line;we++)Xi(W,we,"text");g.atomic&&bu(W.doc),Fr(W,"markerAdded",W,g)}return g}var rr=function(e,n){this.markers=e,this.primary=n;for(var u=0;u<e.length;++u)e[u].parent=this};rr.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();Fr(this,"clear")}},rr.prototype.find=function(e,n){return this.primary.find(e,n)},He(rr);function zn(e,n,u,l,f){l=Je(l),l.shared=!1;var g=[Io(e,n,u,l,f)],k=g[0],j=l.widgetNode;return di(e,function(W){j&&(l.widgetNode=j.cloneNode(!0)),g.push(Io(W,st(W,n),st(W,u),l,f));for(var q=0;q<W.linked.length;++q)if(W.linked[q].isParent)return;k=Et(g)}),new rr(g,k)}function Tu(e){return e.findMarks(rt(e.first,0),e.clipPos(rt(e.lastLine())),function(n){return n.parent})}function rl(e,n){for(var u=0;u<n.length;u++){var l=n[u],f=l.find(),g=e.clipPos(f.from),k=e.clipPos(f.to);if(Lt(g,k)){var j=Io(e,g,k,l.primary,l.primary.type);l.markers.push(j),j.parent=l}}}function Pu(e){for(var n=function(l){var f=e[l],g=[f.primary.doc];di(f.primary.doc,function(W){return g.push(W)});for(var k=0;k<f.markers.length;k++){var j=f.markers[k];ut(g,j.doc)==-1&&(j.parent=null,f.markers.splice(k--,1))}},u=0;u<e.length;u++)n(u)}var Fo=0,_r=function(e,n,u,l,f){if(!(this instanceof _r))return new _r(e,n,u,l,f);u==null&&(u=0),_a.call(this,[new sa([new Wi("",null)])]),this.first=u,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=u;var g=rt(u,0);this.sel=ci(g),this.history=new ti(null),this.id=++Fo,this.modeOption=n,this.lineSep=l,this.direction=f=="rtl"?"rtl":"ltr",this.extend=!1,typeof e=="string"&&(e=this.splitLines(e)),Ka(this,{from:g,to:g,text:e}),_t(this,ci(g),lt)};_r.prototype=wt(_a.prototype,{constructor:_r,iter:function(e,n,u){u?this.iterN(e-this.first,n-e,u):this.iterN(this.first,this.first+this.size,e)},insert:function(e,n){for(var u=0,l=0;l<n.length;++l)u+=n[l].height;this.insertInner(e-this.first,n,u)},remove:function(e,n){this.removeInner(e-this.first,n)},getValue:function(e){var n=Ai(this,this.first,this.first+this.size);return e===!1?n:n.join(e||this.lineSeparator())},setValue:Mr(function(e){var n=rt(this.first,0),u=this.first+this.size-1;To(this,{from:n,to:rt(u,St(this,u).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&fi(this.cm,0,0),_t(this,ci(n),lt)}),replaceRange:function(e,n,u,l){n=st(this,n),u=u?st(this,u):n,Po(this,e,n,u,l)},getRange:function(e,n,u){var l=ai(this,st(this,e),st(this,n));return u===!1?l:l.join(u||this.lineSeparator())},getLine:function(e){var n=this.getLineHandle(e);return n&&n.text},getLineHandle:function(e){if(Jn(this,e))return St(this,e)},getLineNumber:function(e){return er(e)},getLineHandleVisualStart:function(e){return typeof e=="number"&&(e=St(this,e)),Ir(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return st(this,e)},getCursor:function(e){var n=this.sel.primary(),u;return e==null||e=="head"?u=n.head:e=="anchor"?u=n.anchor:e=="end"||e=="to"||e===!1?u=n.to():u=n.from(),u},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Mr(function(e,n,u){Ya(this,st(this,typeof e=="number"?rt(e,n||0):e),null,u)}),setSelection:Mr(function(e,n,u){Ya(this,st(this,e),st(this,n||e),u)}),extendSelection:Mr(function(e,n,u){Kr(this,st(this,e),n&&st(this,n),u)}),extendSelections:Mr(function(e,n){mu(this,Zt(this,e),n)}),extendSelectionsBy:Mr(function(e,n){var u=Ut(this.sel.ranges,e);mu(this,Zt(this,u),n)}),setSelections:Mr(function(e,n,u){if(!!e.length){for(var l=[],f=0;f<e.length;f++)l[f]=new qt(st(this,e[f].anchor),st(this,e[f].head||e[f].anchor));n==null&&(n=Math.min(e.length-1,this.sel.primIndex)),_t(this,Mn(this.cm,l,n),u)}}),addSelection:Mr(function(e,n,u){var l=this.sel.ranges.slice(0);l.push(new qt(st(this,e),st(this,n||e))),_t(this,Mn(this.cm,l,l.length-1),u)}),getSelection:function(e){for(var n=this.sel.ranges,u,l=0;l<n.length;l++){var f=ai(this,n[l].from(),n[l].to());u=u?u.concat(f):f}return e===!1?u:u.join(e||this.lineSeparator())},getSelections:function(e){for(var n=[],u=this.sel.ranges,l=0;l<u.length;l++){var f=ai(this,u[l].from(),u[l].to());e!==!1&&(f=f.join(e||this.lineSeparator())),n[l]=f}return n},replaceSelection:function(e,n,u){for(var l=[],f=0;f<this.sel.ranges.length;f++)l[f]=e;this.replaceSelections(l,n,u||"+input")},replaceSelections:Mr(function(e,n,u){for(var l=[],f=this.sel,g=0;g<f.ranges.length;g++){var k=f.ranges[g];l[g]={from:k.from(),to:k.to(),text:this.splitLines(e[g]),origin:u}}for(var j=n&&n!="end"&&Xe(this,l,n),W=l.length-1;W>=0;W--)To(this,l[W]);j?el(this,j):this.cm&&Jt(this.cm)}),undo:Mr(function(){qa(this,"undo")}),redo:Mr(function(){qa(this,"redo")}),undoSelection:Mr(function(){qa(this,"undo",!0)}),redoSelection:Mr(function(){qa(this,"redo",!0)}),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,n=0,u=0,l=0;l<e.done.length;l++)e.done[l].ranges||++n;for(var f=0;f<e.undone.length;f++)e.undone[f].ranges||++u;return{undo:n,redo:u}},clearHistory:function(){var e=this;this.history=new ti(this.history),di(this,function(n){return n.history=e.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Co(this.history.done),undone:Co(this.history.undone)}},setHistory:function(e){var n=this.history=new ti(this.history);n.done=Co(e.done.slice(0),null,!0),n.undone=Co(e.undone.slice(0),null,!0)},setGutterMarker:Mr(function(e,n,u){return aa(this,e,"gutter",function(l){var f=l.gutterMarkers||(l.gutterMarkers={});return f[n]=u,!u&&$(f)&&(l.gutterMarkers=null),!0})}),clearGutter:Mr(function(e){var n=this;this.iter(function(u){u.gutterMarkers&&u.gutterMarkers[e]&&aa(n,u,"gutter",function(){return u.gutterMarkers[e]=null,$(u.gutterMarkers)&&(u.gutterMarkers=null),!0})})}),lineInfo:function(e){var n;if(typeof e=="number"){if(!Jn(this,e)||(n=e,e=St(this,e),!e))return null}else if(n=er(e),n==null)return null;return{line:n,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Mr(function(e,n,u){return aa(this,e,n=="gutter"?"gutter":"class",function(l){var f=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass";if(!l[f])l[f]=u;else{if(ce(u).test(l[f]))return!1;l[f]+=" "+u}return!0})}),removeLineClass:Mr(function(e,n,u){return aa(this,e,n=="gutter"?"gutter":"class",function(l){var f=n=="text"?"textClass":n=="background"?"bgClass":n=="gutter"?"gutterClass":"wrapClass",g=l[f];if(g)if(u==null)l[f]=null;else{var k=g.match(ce(u));if(!k)return!1;var j=k.index+k[0].length;l[f]=g.slice(0,k.index)+(!k.index||j==g.length?"":" ")+g.slice(j)||null}else return!1;return!0})}),addLineWidget:Mr(function(e,n,u){return _f(this,e,n,u)}),removeLineWidget:function(e){e.clear()},markText:function(e,n,u){return Io(this,st(this,e),st(this,n),u,u&&u.type||"range")},setBookmark:function(e,n){var u={replacedWith:n&&(n.nodeType==null?n.widget:n),insertLeft:n&&n.insertLeft,clearWhenEmpty:!1,shared:n&&n.shared,handleMouseEvents:n&&n.handleMouseEvents};return e=st(this,e),Io(this,e,e,u,"bookmark")},findMarksAt:function(e){e=st(this,e);var n=[],u=St(this,e.line).markedSpans;if(u)for(var l=0;l<u.length;++l){var f=u[l];(f.from==null||f.from<=e.ch)&&(f.to==null||f.to>=e.ch)&&n.push(f.marker.parent||f.marker)}return n},findMarks:function(e,n,u){e=st(this,e),n=st(this,n);var l=[],f=e.line;return this.iter(e.line,n.line+1,function(g){var k=g.markedSpans;if(k)for(var j=0;j<k.length;j++){var W=k[j];!(W.to!=null&&f==e.line&&e.ch>=W.to||W.from==null&&f!=e.line||W.from!=null&&f==n.line&&W.from>=n.ch)&&(!u||u(W.marker))&&l.push(W.marker.parent||W.marker)}++f}),l},getAllMarks:function(){var e=[];return this.iter(function(n){var u=n.markedSpans;if(u)for(var l=0;l<u.length;++l)u[l].from!=null&&e.push(u[l].marker)}),e},posFromIndex:function(e){var n,u=this.first,l=this.lineSeparator().length;return this.iter(function(f){var g=f.text.length+l;if(g>e)return n=e,!0;e-=g,++u}),st(this,rt(u,n))},indexFromPos:function(e){e=st(this,e);var n=e.ch;if(e.line<this.first||e.ch<0)return 0;var u=this.lineSeparator().length;return this.iter(this.first,e.line,function(l){n+=l.text.length+u}),n},copy:function(e){var n=new _r(Ai(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return n.scrollTop=this.scrollTop,n.scrollLeft=this.scrollLeft,n.sel=this.sel,n.extend=!1,e&&(n.history.undoDepth=this.history.undoDepth,n.setHistory(this.getHistory())),n},linkedDoc:function(e){e||(e={});var n=this.first,u=this.first+this.size;e.from!=null&&e.from>n&&(n=e.from),e.to!=null&&e.to<u&&(u=e.to);var l=new _r(Ai(this,n,u),e.mode||this.modeOption,n,this.lineSep,this.direction);return e.sharedHist&&(l.history=this.history),(this.linked||(this.linked=[])).push({doc:l,sharedHist:e.sharedHist}),l.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],rl(l,Tu(this)),l},unlinkDoc:function(e){if(e instanceof hr&&(e=e.doc),this.linked)for(var n=0;n<this.linked.length;++n){var u=this.linked[n];if(u.doc==e){this.linked.splice(n,1),e.unlinkDoc(this),Pu(Tu(this));break}}if(e.history==this.history){var l=[e.id];di(e,function(f){return l.push(f.id)},!0),e.history=new ti(null),e.history.done=Co(this.history.done,l),e.history.undone=Co(this.history.undone,l)}},iterLinkedDocs:function(e){di(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):$n(e)},lineSeparator:function(){return this.lineSep||`
28
+ `},setDirection:Mr(function(e){e!="rtl"&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter(function(n){return n.order=null}),this.cm&&gu(this.cm))})}),_r.prototype.eachLine=_r.prototype.iter;var nl=0;function ec(e){var n=this;if(ol(n),!(Ie(n,e)||li(n.display,e))){nt(e),x&&(nl=+new Date);var u=Ji(n,e,!0),l=e.dataTransfer.files;if(!(!u||n.isReadOnly()))if(l&&l.length&&window.FileReader&&window.File)for(var f=l.length,g=Array(f),k=0,j=function(){++k==f&&Wr(n,function(){u=st(n.doc,u);var Me={from:u,to:u,text:n.doc.splitLines(g.filter(function(Ye){return Ye!=null}).join(n.doc.lineSeparator())),origin:"paste"};To(n.doc,Me),el(n.doc,ci(st(n.doc,u),st(n.doc,Wn(Me))))})()},W=function(Me,Ye){if(n.options.allowDropFileTypes&&ut(n.options.allowDropFileTypes,Me.type)==-1){j();return}var et=new FileReader;et.onerror=function(){return j()},et.onload=function(){var ot=et.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(ot)){j();return}g[Ye]=ot,j()},et.readAsText(Me)},q=0;q<l.length;q++)W(l[q],q);else{if(n.state.draggingText&&n.doc.sel.contains(u)>-1){n.state.draggingText(e),setTimeout(function(){return n.display.input.focus()},20);return}try{var we=e.dataTransfer.getData("Text");if(we){var Ee;if(n.state.draggingText&&!n.state.draggingText.copy&&(Ee=n.listSelections()),Ja(n.doc,ci(u,u)),Ee)for(var Ne=0;Ne<Ee.length;++Ne)Po(n.doc,"",Ee[Ne].anchor,Ee[Ne].head,"drag");n.replaceSelection(we,"around","paste"),n.display.input.focus()}}catch(Me){}}}}function Iu(e,n){if(x&&(!e.state.draggingText||+new Date-nl<100)){Yt(n);return}if(!(Ie(e,n)||li(e.display,n))&&(n.dataTransfer.setData("Text",e.getSelection()),n.dataTransfer.effectAllowed="copyMove",n.dataTransfer.setDragImage&&!U)){var u=me("img",null,null,"position: fixed; left: 0; top: 0;");u.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",B&&(u.width=u.height=1,e.display.wrapper.appendChild(u),u._top=u.offsetTop),n.dataTransfer.setDragImage(u,0,0),B&&u.parentNode.removeChild(u)}}function il(e,n){var u=Ji(e,n);if(!!u){var l=document.createDocumentFragment();su(e,u,l),e.display.dragCursor||(e.display.dragCursor=me("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),be(e.display.dragCursor,l)}}function ol(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function al(e){if(!!document.getElementsByClassName){for(var n=document.getElementsByClassName("CodeMirror"),u=[],l=0;l<n.length;l++){var f=n[l].CodeMirror;f&&u.push(f)}u.length&&u[0].operation(function(){for(var g=0;g<u.length;g++)e(u[g])})}}var ua=!1;function tc(){ua||(rc(),ua=!0)}function rc(){var e;N(window,"resize",function(){e==null&&(e=setTimeout(function(){e=null,al(ko)},100))}),N(window,"blur",function(){return al(qo)})}function ko(e){var n=e.display;n.cachedCharWidth=n.cachedTextHeight=n.cachedPaddingH=null,n.scrollbarsClipped=!1,e.setSize()}for(var pi={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},fa=0;fa<10;fa++)pi[fa+48]=pi[fa+96]=String(fa);for(var qi=65;qi<=90;qi++)pi[qi]=String.fromCharCode(qi);for(var ca=1;ca<=12;ca++)pi[ca+111]=pi[ca+63235]="F"+ca;var hi={};hi.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"},hi.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"},hi.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},hi.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"]},hi.default=P?hi.macDefault:hi.pcDefault;function Fu(e){var n=e.split(/-(?!$)/);e=n[n.length-1];for(var u,l,f,g,k=0;k<n.length-1;k++){var j=n[k];if(/^(cmd|meta|m)$/i.test(j))g=!0;else if(/^a(lt)?$/i.test(j))u=!0;else if(/^(c|ctrl|control)$/i.test(j))l=!0;else if(/^s(hift)?$/i.test(j))f=!0;else throw new Error("Unrecognized modifier name: "+j)}return u&&(e="Alt-"+e),l&&(e="Ctrl-"+e),g&&(e="Cmd-"+e),f&&(e="Shift-"+e),e}function ku(e){var n={};for(var u in e)if(e.hasOwnProperty(u)){var l=e[u];if(/^(name|fallthrough|(de|at)tach)$/.test(u))continue;if(l=="..."){delete e[u];continue}for(var f=Ut(u.split(" "),Fu),g=0;g<f.length;g++){var k=void 0,j=void 0;g==f.length-1?(j=f.join(" "),k=l):(j=f.slice(0,g+1).join(" "),k="...");var W=n[j];if(!W)n[j]=k;else if(W!=k)throw new Error("Inconsistent bindings for "+j)}delete e[u]}for(var q in n)e[q]=n[q];return e}function _i(e,n,u,l){n=eo(n);var f=n.call?n.call(e,l):n[e];if(f===!1)return"nothing";if(f==="...")return"multi";if(f!=null&&u(f))return"handled";if(n.fallthrough){if(Object.prototype.toString.call(n.fallthrough)!="[object Array]")return _i(e,n.fallthrough,u,l);for(var g=0;g<n.fallthrough.length;g++){var k=_i(e,n.fallthrough[g],u,l);if(k)return k}}}function sl(e){var n=typeof e=="string"?e:pi[e.keyCode];return n=="Ctrl"||n=="Alt"||n=="Shift"||n=="Mod"}function Ru(e,n,u){var l=e;return n.altKey&&l!="Alt"&&(e="Alt-"+e),(G?n.metaKey:n.ctrlKey)&&l!="Ctrl"&&(e="Ctrl-"+e),(G?n.ctrlKey:n.metaKey)&&l!="Mod"&&(e="Cmd-"+e),!u&&n.shiftKey&&l!="Shift"&&(e="Shift-"+e),e}function Mu(e,n){if(B&&e.keyCode==34&&e.char)return!1;var u=pi[e.keyCode];return u==null||e.altGraphKey?!1:(e.keyCode==3&&e.code&&(u=e.code),Ru(u,e,n))}function eo(e){return typeof e=="string"?hi[e]:e}function Ro(e,n){for(var u=e.doc.sel.ranges,l=[],f=0;f<u.length;f++){for(var g=n(u[f]);l.length&&Lt(g.from,Et(l).to)<=0;){var k=l.pop();if(Lt(k.from,g.from)<0){g.from=k.from;break}}l.push(g)}on(e,function(){for(var j=l.length-1;j>=0;j--)Po(e.doc,"",l[j].from,l[j].to,"+delete");Jt(e)})}function br(e,n,u){var l=de(e.text,n+u,u);return l<0||l>e.text.length?null:l}function ll(e,n,u){var l=br(e,n.ch,u);return l==null?null:new rt(n.line,l,u<0?"after":"before")}function Lu(e,n,u,l,f){if(e){n.doc.direction=="rtl"&&(f=-f);var g=I(u,n.doc.direction);if(g){var k=f<0?Et(g):g[0],j=f<0==(k.level==1),W=j?"after":"before",q;if(k.level>0||n.doc.direction=="rtl"){var we=co(n,u);q=f<0?u.text.length-1:0;var Ee=Zn(n,we,q).top;q=Ae(function(Ne){return Zn(n,we,Ne).top==Ee},f<0==(k.level==1)?k.from:k.to-1,q),W=="before"&&(q=br(u,q,1))}else q=f<0?k.to:k.from;return new rt(l,q,W)}}return new rt(l,f<0?u.text.length:0,f<0?"before":"after")}function nc(e,n,u,l){var f=I(n,e.doc.direction);if(!f)return ll(n,u,l);u.ch>=n.text.length?(u.ch=n.text.length,u.sticky="before"):u.ch<=0&&(u.ch=0,u.sticky="after");var g=H(f,u.ch,u.sticky),k=f[g];if(e.doc.direction=="ltr"&&k.level%2==0&&(l>0?k.to>u.ch:k.from<u.ch))return ll(n,u,l);var j=function(ft,yt){return br(n,ft instanceof rt?ft.ch:ft,yt)},W,q=function(ft){return e.options.lineWrapping?(W=W||co(e,n),nu(e,n,W,ft)):{begin:0,end:n.text.length}},we=q(u.sticky=="before"?j(u,-1):u.ch);if(e.doc.direction=="rtl"||k.level==1){var Ee=k.level==1==l<0,Ne=j(u,Ee?1:-1);if(Ne!=null&&(Ee?Ne<=k.to&&Ne<=we.end:Ne>=k.from&&Ne>=we.begin)){var Me=Ee?"before":"after";return new rt(u.line,Ne,Me)}}var Ye=function(ft,yt,ct){for(var mt=function(ar,Lr){return Lr?new rt(u.line,j(ar,1),"before"):new rt(u.line,ar,"after")};ft>=0&&ft<f.length;ft+=yt){var Pt=f[ft],Ot=yt>0==(Pt.level!=1),Ht=Ot?ct.begin:j(ct.end,-1);if(Pt.from<=Ht&&Ht<Pt.to||(Ht=Ot?Pt.from:j(Pt.to,-1),ct.begin<=Ht&&Ht<ct.end))return mt(Ht,Ot)}},et=Ye(g+l,l,we);if(et)return et;var ot=l>0?we.end:j(we.begin,-1);return ot!=null&&!(l>0&&ot==n.text.length)&&(et=Ye(l>0?0:f.length-1,l,q(ot)),et)?et:null}var Ln={selectAll:Su,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),lt)},killLine:function(e){return Ro(e,function(n){if(n.empty()){var u=St(e.doc,n.head.line).text.length;return n.head.ch==u&&n.head.line<e.lastLine()?{from:n.head,to:rt(n.head.line+1,0)}:{from:n.head,to:rt(n.head.line,u)}}else return{from:n.from(),to:n.to()}})},deleteLine:function(e){return Ro(e,function(n){return{from:rt(n.from().line,0),to:st(e.doc,rt(n.to().line+1,0))}})},delLineLeft:function(e){return Ro(e,function(n){return{from:rt(n.from().line,0),to:n.from()}})},delWrappedLineLeft:function(e){return Ro(e,function(n){var u=e.charCoords(n.head,"div").top+5,l=e.coordsChar({left:0,top:u},"div");return{from:l,to:n.from()}})},delWrappedLineRight:function(e){return Ro(e,function(n){var u=e.charCoords(n.head,"div").top+5,l=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:u},"div");return{from:n.from(),to:l}})},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(rt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(rt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy(function(n){return Nu(e,n.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy(function(n){return Du(e,n.head)},{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy(function(n){return ic(e,n.head.line)},{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy(function(n){var u=e.cursorCoords(n.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:u},"div")},vt)},goLineLeft:function(e){return e.extendSelectionsBy(function(n){var u=e.cursorCoords(n.head,"div").top+5;return e.coordsChar({left:0,top:u},"div")},vt)},goLineLeftSmart:function(e){return e.extendSelectionsBy(function(n){var u=e.cursorCoords(n.head,"div").top+5,l=e.coordsChar({left:0,top:u},"div");return l.ch<e.getLine(l.line).search(/\S/)?Du(e,n.head):l},vt)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection(" ")},insertSoftTab:function(e){for(var n=[],u=e.listSelections(),l=e.options.tabSize,f=0;f<u.length;f++){var g=u[f].from(),k=qe(e.getLine(g.line),g.ch,l);n.push(Ft(l-k%l))}e.replaceSelections(n)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return on(e,function(){for(var n=e.listSelections(),u=[],l=0;l<n.length;l++)if(!!n[l].empty()){var f=n[l].head,g=St(e.doc,f.line).text;if(g){if(f.ch==g.length&&(f=new rt(f.line,f.ch-1)),f.ch>0)f=new rt(f.line,f.ch+1),e.replaceRange(g.charAt(f.ch-1)+g.charAt(f.ch-2),rt(f.line,f.ch-2),f,"+transpose");else if(f.line>e.doc.first){var k=St(e.doc,f.line-1).text;k&&(f=new rt(f.line,1),e.replaceRange(g.charAt(0)+e.doc.lineSeparator()+k.charAt(k.length-1),rt(f.line-1,k.length-1),f,"+transpose"))}}u.push(new qt(f,f))}e.setSelections(u)})},newlineAndIndent:function(e){return on(e,function(){for(var n=e.listSelections(),u=n.length-1;u>=0;u--)e.replaceRange(e.doc.lineSeparator(),n[u].anchor,n[u].head,"+input");n=e.listSelections();for(var l=0;l<n.length;l++)e.indentLine(n[l].from().line,null,!0);Jt(e)})},openLine:function(e){return e.replaceSelection(`
29
+ `,"start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Nu(e,n){var u=St(e.doc,n),l=Ir(u);return l!=u&&(n=er(l)),Lu(!0,e,l,n,1)}function ic(e,n){var u=St(e.doc,n),l=Tf(u);return l!=u&&(n=er(l)),Lu(!0,e,u,n,-1)}function Du(e,n){var u=Nu(e,n.line),l=St(e.doc,u.line),f=I(l,e.doc.direction);if(!f||f[0].level==0){var g=Math.max(u.ch,l.text.search(/\S/)),k=n.line==u.line&&n.ch<=g&&n.ch;return rt(u.line,k?0:g,u.sticky)}return u}function es(e,n,u){if(typeof n=="string"&&(n=Ln[n],!n))return!1;e.display.input.ensurePolled();var l=e.display.shift,f=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),u&&(e.display.shift=!1),f=n(e)!=Ze}finally{e.display.shift=l,e.state.suppressEdits=!1}return f}function Od(e,n,u){for(var l=0;l<e.state.keyMaps.length;l++){var f=_i(n,e.state.keyMaps[l],u,e);if(f)return f}return e.options.extraKeys&&_i(n,e.options.extraKeys,u,e)||_i(n,e.options.keyMap,u,e)}var Td=new at;function ts(e,n,u,l){var f=e.state.keySeq;if(f){if(sl(n))return"handled";if(/\'$/.test(n)?e.state.keySeq=null:Td.set(50,function(){e.state.keySeq==f&&(e.state.keySeq=null,e.display.input.reset())}),oc(e,f+" "+n,u,l))return!0}return oc(e,n,u,l)}function oc(e,n,u,l){var f=Od(e,n,l);return f=="multi"&&(e.state.keySeq=n),f=="handled"&&Fr(e,"keyHandled",e,n,u),(f=="handled"||f=="multi")&&(nt(u),lu(e)),!!f}function ac(e,n){var u=Mu(n,!0);return u?n.shiftKey&&!e.state.keySeq?ts(e,"Shift-"+u,n,function(l){return es(e,l,!0)})||ts(e,u,n,function(l){if(typeof l=="string"?/^go[A-Z]/.test(l):l.motion)return es(e,l)}):ts(e,u,n,function(l){return es(e,l)}):!1}function Pd(e,n,u){return ts(e,"'"+u+"'",n,function(l){return es(e,l,!0)})}var Bu=null;function sc(e){var n=this;if(!(e.target&&e.target!=n.display.input.getField())&&(n.curOp.focus=Re(),!Ie(n,e))){x&&A<11&&e.keyCode==27&&(e.returnValue=!1);var u=e.keyCode;n.display.shift=u==16||e.shiftKey;var l=ac(n,e);B&&(Bu=l?u:null,!l&&u==88&&!Kn&&(P?e.metaKey:e.ctrlKey)&&n.replaceSelection("",null,"cut")),c&&!P&&!l&&u==46&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),u==18&&!/\bCodeMirror-crosshair\b/.test(n.display.lineDiv.className)&&Id(n)}}function Id(e){var n=e.display.lineDiv;Ue(n,"CodeMirror-crosshair");function u(l){(l.keyCode==18||!l.altKey)&&(te(n,"CodeMirror-crosshair"),ue(document,"keyup",u),ue(document,"mouseover",u))}N(document,"keyup",u),N(document,"mouseover",u)}function lc(e){e.keyCode==16&&(this.doc.sel.shift=!1),Ie(this,e)}function ul(e){var n=this;if(!(e.target&&e.target!=n.display.input.getField())&&!(li(n.display,e)||Ie(n,e)||e.ctrlKey&&!e.altKey||P&&e.metaKey)){var u=e.keyCode,l=e.charCode;if(B&&u==Bu){Bu=null,nt(e);return}if(!(B&&(!e.which||e.which<10)&&ac(n,e))){var f=String.fromCharCode(l==null?u:l);f!="\b"&&(Pd(n,e,f)||n.display.input.onKeyPress(e))}}}var Mo=400,fl=function(e,n,u){this.time=e,this.pos=n,this.button=u};fl.prototype.compare=function(e,n,u){return this.time+Mo>e&&Lt(n,this.pos)==0&&u==this.button};var da,Mi;function uc(e,n){var u=+new Date;return Mi&&Mi.compare(u,e,n)?(da=Mi=null,"triple"):da&&da.compare(u,e,n)?(Mi=new fl(u,e,n),da=null,"double"):(da=new fl(u,e,n),Mi=null,"single")}function Uu(e){var n=this,u=n.display;if(!(Ie(n,e)||u.activeTouch&&u.input.supportsTouch())){if(u.input.ensurePolled(),u.shift=e.shiftKey,li(u,e)){w||(u.scroller.draggable=!1,setTimeout(function(){return u.scroller.draggable=!0},100));return}if(!is(n,e)){var l=Ji(n,e),f=yn(e),g=l?uc(l,f):"single";window.focus(),f==1&&n.state.selectingText&&n.state.selectingText(e),!(l&&fc(n,f,l,g,e))&&(f==1?l?ju(n,l,g,e):kt(e)==u.scroller&&nt(e):f==2?(l&&Kr(n.doc,l),setTimeout(function(){return u.input.focus()},20)):f==3&&(Z?n.display.input.onContextMenu(e):Vs(n)))}}}function fc(e,n,u,l,f){var g="Click";return l=="double"?g="Double"+g:l=="triple"&&(g="Triple"+g),g=(n==1?"Left":n==2?"Middle":"Right")+g,ts(e,Ru(g,f),f,function(k){if(typeof k=="string"&&(k=Ln[k]),!k)return!1;var j=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),j=k(e,u)!=Ze}finally{e.state.suppressEdits=!1}return j})}function cc(e,n,u){var l=e.getOption("configureMouse"),f=l?l(e,n,u):{};if(f.unit==null){var g=V?u.shiftKey&&u.metaKey:u.altKey;f.unit=g?"rectangle":n=="single"?"char":n=="double"?"word":"line"}return(f.extend==null||e.doc.extend)&&(f.extend=e.doc.extend||u.shiftKey),f.addNew==null&&(f.addNew=P?u.metaKey:u.ctrlKey),f.moveOnDrag==null&&(f.moveOnDrag=!(P?u.altKey:u.ctrlKey)),f}function ju(e,n,u,l){x?setTimeout(tt(zf,e),0):e.curOp.focus=Re();var f=cc(e,u,l),g=e.doc.sel,k;e.options.dragDrop&&Xr&&!e.isReadOnly()&&u=="single"&&(k=g.contains(n))>-1&&(Lt((k=g.ranges[k]).from(),n)<0||n.xRel>0)&&(Lt(k.to(),n)>0||n.xRel<0)?rs(e,l,n,f):to(e,l,n,f)}function rs(e,n,u,l){var f=e.display,g=!1,k=Wr(e,function(q){w&&(f.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Vs(e)),ue(f.wrapper.ownerDocument,"mouseup",k),ue(f.wrapper.ownerDocument,"mousemove",j),ue(f.scroller,"dragstart",W),ue(f.scroller,"drop",k),g||(nt(q),l.addNew||Kr(e.doc,u,null,null,l.extend),w&&!U||x&&A==9?setTimeout(function(){f.wrapper.ownerDocument.body.focus({preventScroll:!0}),f.input.focus()},20):f.input.focus())}),j=function(q){g=g||Math.abs(n.clientX-q.clientX)+Math.abs(n.clientY-q.clientY)>=10},W=function(){return g=!0};w&&(f.scroller.draggable=!0),e.state.draggingText=k,k.copy=!l.moveOnDrag,N(f.wrapper.ownerDocument,"mouseup",k),N(f.wrapper.ownerDocument,"mousemove",j),N(f.scroller,"dragstart",W),N(f.scroller,"drop",k),e.state.delayingBlurEvent=!0,setTimeout(function(){return f.input.focus()},20),f.scroller.dragDrop&&f.scroller.dragDrop()}function dc(e,n,u){if(u=="char")return new qt(n,n);if(u=="word")return e.findWordAt(n);if(u=="line")return new qt(rt(n.line,0),st(e.doc,rt(n.line+1,0)));var l=u(e,n);return new qt(l.from,l.to)}function to(e,n,u,l){x&&Vs(e);var f=e.display,g=e.doc;nt(n);var k,j,W=g.sel,q=W.ranges;if(l.addNew&&!l.extend?(j=g.sel.contains(u),j>-1?k=q[j]:k=new qt(u,u)):(k=g.sel.primary(),j=g.sel.primIndex),l.unit=="rectangle")l.addNew||(k=new qt(u,u)),u=Ji(e,n,!0,!0),j=-1;else{var we=dc(e,u,l.unit);l.extend?k=ia(k,we.anchor,we.head,l.extend):k=we}l.addNew?j==-1?(j=q.length,_t(g,Mn(e,q.concat([k]),j),{scroll:!1,origin:"*mouse"})):q.length>1&&q[j].empty()&&l.unit=="char"&&!l.extend?(_t(g,Mn(e,q.slice(0,j).concat(q.slice(j+1)),0),{scroll:!1,origin:"*mouse"}),W=g.sel):ri(g,j,k,pt):(j=0,_t(g,new pn([k],0),pt),W=g.sel);var Ee=u;function Ne(ct){if(Lt(Ee,ct)!=0)if(Ee=ct,l.unit=="rectangle"){for(var mt=[],Pt=e.options.tabSize,Ot=qe(St(g,u.line).text,u.ch,Pt),Ht=qe(St(g,ct.line).text,ct.ch,Pt),ar=Math.min(Ot,Ht),Lr=Math.max(Ot,Ht),gr=Math.min(u.line,ct.line),vn=Math.min(e.lastLine(),Math.max(u.line,ct.line));gr<=vn;gr++){var an=St(g,gr).text,kr=dt(an,ar,Pt);ar==Lr?mt.push(new qt(rt(gr,kr),rt(gr,kr))):an.length>kr&&mt.push(new qt(rt(gr,kr),rt(gr,dt(an,Lr,Pt))))}mt.length||mt.push(new qt(u,u)),_t(g,Mn(e,W.ranges.slice(0,j).concat(mt),j),{origin:"*mouse",scroll:!1}),e.scrollIntoView(ct)}else{var en=k,zr=dc(e,ct,l.unit),Nr=en.anchor,Er;Lt(zr.anchor,Nr)>0?(Er=zr.head,Nr=Qe(en.from(),zr.anchor)):(Er=zr.anchor,Nr=Ce(en.to(),zr.head));var dr=W.ranges.slice(0);dr[j]=ns(e,new qt(st(g,Nr),Er)),_t(g,Mn(e,dr,j),pt)}}var Me=f.wrapper.getBoundingClientRect(),Ye=0;function et(ct){var mt=++Ye,Pt=Ji(e,ct,!0,l.unit=="rectangle");if(!!Pt)if(Lt(Pt,Ee)!=0){e.curOp.focus=Re(),Ne(Pt);var Ot=Fn(f,g);(Pt.line>=Ot.to||Pt.line<Ot.from)&&setTimeout(Wr(e,function(){Ye==mt&&et(ct)}),150)}else{var Ht=ct.clientY<Me.top?-20:ct.clientY>Me.bottom?20:0;Ht&&setTimeout(Wr(e,function(){Ye==mt&&(f.scroller.scrollTop+=Ht,et(ct))}),50)}}function ot(ct){e.state.selectingText=!1,Ye=1/0,ct&&(nt(ct),f.input.focus()),ue(f.wrapper.ownerDocument,"mousemove",ft),ue(f.wrapper.ownerDocument,"mouseup",yt),g.history.lastSelOrigin=null}var ft=Wr(e,function(ct){ct.buttons===0||!yn(ct)?ot(ct):et(ct)}),yt=Wr(e,ot);e.state.selectingText=yt,N(f.wrapper.ownerDocument,"mousemove",ft),N(f.wrapper.ownerDocument,"mouseup",yt)}function ns(e,n){var u=n.anchor,l=n.head,f=St(e.doc,u.line);if(Lt(u,l)==0&&u.sticky==l.sticky)return n;var g=I(f);if(!g)return n;var k=H(g,u.ch,u.sticky),j=g[k];if(j.from!=u.ch&&j.to!=u.ch)return n;var W=k+(j.from==u.ch==(j.level!=1)?0:1);if(W==0||W==g.length)return n;var q;if(l.line!=u.line)q=(l.line-u.line)*(e.doc.direction=="ltr"?1:-1)>0;else{var we=H(g,l.ch,l.sticky),Ee=we-k||(l.ch-u.ch)*(j.level==1?-1:1);we==W-1||we==W?q=Ee<0:q=Ee>0}var Ne=g[W+(q?-1:0)],Me=q==(Ne.level==1),Ye=Me?Ne.from:Ne.to,et=Me?"after":"before";return u.ch==Ye&&u.sticky==et?n:new qt(new rt(u.line,Ye,et),l)}function Lo(e,n,u,l){var f,g;if(n.touches)f=n.touches[0].clientX,g=n.touches[0].clientY;else try{f=n.clientX,g=n.clientY}catch(Ne){return!1}if(f>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;l&&nt(n);var k=e.display,j=k.lineDiv.getBoundingClientRect();if(g>j.bottom||!We(e,u))return Ct(n);g-=j.top-k.viewOffset;for(var W=0;W<e.display.gutterSpecs.length;++W){var q=k.gutters.childNodes[W];if(q&&q.getBoundingClientRect().right>=f){var we=Hn(e.doc,g),Ee=e.display.gutterSpecs[W];return Oe(e,u,e,we,Ee.className,n),Ct(n)}}}function is(e,n){return Lo(e,n,"gutterClick",!0)}function cl(e,n){li(e.display,n)||pc(e,n)||Ie(e,n,"contextmenu")||Z||e.display.input.onContextMenu(n)}function pc(e,n){return We(e,"gutterContextMenu")?Lo(e,n,"gutterContextMenu",!1):!1}function dl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Xo(e)}var ro={toString:function(){return"CodeMirror.Init"}},os={},as={};function Vu(e){var n=e.optionHandlers;function u(l,f,g,k){e.defaults[l]=f,g&&(n[l]=k?function(j,W,q){q!=ro&&g(j,W,q)}:g)}e.defineOption=u,e.Init=ro,u("value","",function(l,f){return l.setValue(f)},!0),u("mode",null,function(l,f){l.doc.modeOption=f,Ga(l)},!0),u("indentUnit",2,Ga,!0),u("indentWithTabs",!1),u("smartIndent",!0),u("tabSize",4,function(l){Fi(l),Xo(l),qr(l)},!0),u("lineSeparator",null,function(l,f){if(l.doc.lineSep=f,!!f){var g=[],k=l.doc.first;l.doc.iter(function(W){for(var q=0;;){var we=W.text.indexOf(f,q);if(we==-1)break;q=we+f.length,g.push(rt(k,we))}k++});for(var j=g.length-1;j>=0;j--)Po(l.doc,f,g[j],rt(g[j].line,g[j].ch+f.length))}}),u("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(l,f,g){l.state.specialChars=new RegExp(f.source+(f.test(" ")?"":"| "),"g"),g!=ro&&l.refresh()}),u("specialCharPlaceholder",un,function(l){return l.refresh()},!0),u("electricChars",!0),u("inputStyle",L?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),u("spellcheck",!1,function(l,f){return l.getInputField().spellcheck=f},!0),u("autocorrect",!1,function(l,f){return l.getInputField().autocorrect=f},!0),u("autocapitalize",!1,function(l,f){return l.getInputField().autocapitalize=f},!0),u("rtlMoveVisually",!X),u("wholeLineUpdateBefore",!0),u("theme","default",function(l){dl(l),Eo(l)},!0),u("keyMap","default",function(l,f,g){var k=eo(f),j=g!=ro&&eo(g);j&&j.detach&&j.detach(l,k),k.attach&&k.attach(l,j||null)}),u("extraKeys",null),u("configureMouse",null),u("lineWrapping",!1,Wu,!0),u("gutters",[],function(l,f){l.display.gutterSpecs=Wa(f,l.options.lineNumbers),Eo(l)},!0),u("fixedGutter",!0,function(l,f){l.display.gutters.style.left=f?Bs(l.display)+"px":"0",l.refresh()},!0),u("coverGutterNextToScrollbar",!1,function(l){return Zi(l)},!0),u("scrollbarStyle","native",function(l){kn(l),Zi(l),l.display.scrollbars.setScrollTop(l.doc.scrollTop),l.display.scrollbars.setScrollLeft(l.doc.scrollLeft)},!0),u("lineNumbers",!1,function(l,f){l.display.gutterSpecs=Wa(l.options.gutters,f),Eo(l)},!0),u("firstLineNumber",1,Eo,!0),u("lineNumberFormatter",function(l){return l},Eo,!0),u("showCursorWhenSelecting",!1,Na,!0),u("resetSelectionOnContextMenu",!0),u("lineWiseCopyCut",!0),u("pasteLinesPerSelection",!0),u("selectionsMayTouch",!1),u("readOnly",!1,function(l,f){f=="nocursor"&&(qo(l),l.display.input.blur()),l.display.input.readOnlyChanged(f)}),u("screenReaderLabel",null,function(l,f){f=f===""?null:f,l.display.input.screenReaderLabelChanged(f)}),u("disableInput",!1,function(l,f){f||l.display.input.reset()},!0),u("dragDrop",!0,Hu),u("allowDropFileTypes",null),u("cursorBlinkRate",530),u("cursorScrollMargin",0),u("cursorHeight",1,Na,!0),u("singleCursorHeightPerLine",!0,Na,!0),u("workTime",100),u("workDelay",100),u("flattenSpans",!0,Fi,!0),u("addModeClass",!1,Fi,!0),u("pollInterval",100),u("undoDepth",200,function(l,f){return l.doc.history.undoDepth=f}),u("historyEventDelay",1250),u("viewportMargin",10,function(l){return l.refresh()},!0),u("maxHighlightLength",1e4,Fi,!0),u("moveInputWithCursor",!0,function(l,f){f||l.display.input.resetPosition()}),u("tabindex",null,function(l,f){return l.display.input.getField().tabIndex=f||""}),u("autofocus",null),u("direction","ltr",function(l,f){return l.doc.setDirection(f)},!0),u("phrases",null)}function Hu(e,n,u){var l=u&&u!=ro;if(!n!=!l){var f=e.display.dragFunctions,g=n?N:ue;g(e.display.scroller,"dragstart",f.start),g(e.display.scroller,"dragenter",f.enter),g(e.display.scroller,"dragover",f.over),g(e.display.scroller,"dragleave",f.leave),g(e.display.scroller,"drop",f.drop)}}function Wu(e){e.options.lineWrapping?(Ue(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(te(e.display.wrapper,"CodeMirror-wrap"),Fa(e)),ou(e),qr(e),Xo(e),setTimeout(function(){return Zi(e)},100)}function hr(e,n){var u=this;if(!(this instanceof hr))return new hr(e,n);this.options=n=n?Je(n):{},Je(os,n,!1);var l=n.value;typeof l=="string"?l=new _r(l,n.mode,null,n.lineSeparator,n.direction):n.mode&&(l.modeOption=n.mode),this.doc=l;var f=new hr.inputStyles[n.inputStyle](this),g=this.display=new ei(e,l,f,n);g.wrapper.CodeMirror=this,dl(this),n.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),kn(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 at,keySeq:null,specialChars:null},n.autofocus&&!L&&g.input.focus(),x&&A<11&&setTimeout(function(){return u.display.input.reset(!0)},20),hc(this),tc(),Sr(this),this.curOp.forceUpdate=!0,vu(this,l),n.autofocus&&!L||this.hasFocus()?setTimeout(function(){u.hasFocus()&&!u.state.focused&&uu(u)},20):qo(this);for(var k in as)as.hasOwnProperty(k)&&as[k](this,n[k],ro);Ys(this),n.finishInit&&n.finishInit(this);for(var j=0;j<No.length;++j)No[j](this);cn(this),w&&n.lineWrapping&&getComputedStyle(g.lineDiv).textRendering=="optimizelegibility"&&(g.lineDiv.style.textRendering="auto")}hr.defaults=os,hr.optionHandlers=as;function hc(e){var n=e.display;N(n.scroller,"mousedown",Wr(e,Uu)),x&&A<11?N(n.scroller,"dblclick",Wr(e,function(W){if(!Ie(e,W)){var q=Ji(e,W);if(!(!q||is(e,W)||li(e.display,W))){nt(W);var we=e.findWordAt(q);Kr(e.doc,we.anchor,we.head)}}})):N(n.scroller,"dblclick",function(W){return Ie(e,W)||nt(W)}),N(n.scroller,"contextmenu",function(W){return cl(e,W)}),N(n.input.getField(),"contextmenu",function(W){n.scroller.contains(W.target)||cl(e,W)});var u,l={end:0};function f(){n.activeTouch&&(u=setTimeout(function(){return n.activeTouch=null},1e3),l=n.activeTouch,l.end=+new Date)}function g(W){if(W.touches.length!=1)return!1;var q=W.touches[0];return q.radiusX<=1&&q.radiusY<=1}function k(W,q){if(q.left==null)return!0;var we=q.left-W.left,Ee=q.top-W.top;return we*we+Ee*Ee>20*20}N(n.scroller,"touchstart",function(W){if(!Ie(e,W)&&!g(W)&&!is(e,W)){n.input.ensurePolled(),clearTimeout(u);var q=+new Date;n.activeTouch={start:q,moved:!1,prev:q-l.end<=300?l:null},W.touches.length==1&&(n.activeTouch.left=W.touches[0].pageX,n.activeTouch.top=W.touches[0].pageY)}}),N(n.scroller,"touchmove",function(){n.activeTouch&&(n.activeTouch.moved=!0)}),N(n.scroller,"touchend",function(W){var q=n.activeTouch;if(q&&!li(n,W)&&q.left!=null&&!q.moved&&new Date-q.start<300){var we=e.coordsChar(n.activeTouch,"page"),Ee;!q.prev||k(q,q.prev)?Ee=new qt(we,we):!q.prev.prev||k(q,q.prev.prev)?Ee=e.findWordAt(we):Ee=new qt(rt(we.line,0),st(e.doc,rt(we.line+1,0))),e.setSelection(Ee.anchor,Ee.head),e.focus(),nt(W)}f()}),N(n.scroller,"touchcancel",f),N(n.scroller,"scroll",function(){n.scroller.clientHeight&&(mo(e,n.scroller.scrollTop),Pi(e,n.scroller.scrollLeft,!0),Oe(e,"scroll",e))}),N(n.scroller,"mousewheel",function(W){return Qs(e,W)}),N(n.scroller,"DOMMouseScroll",function(W){return Qs(e,W)}),N(n.wrapper,"scroll",function(){return n.wrapper.scrollTop=n.wrapper.scrollLeft=0}),n.dragFunctions={enter:function(W){Ie(e,W)||Yt(W)},over:function(W){Ie(e,W)||(il(e,W),Yt(W))},start:function(W){return Iu(e,W)},drop:Wr(e,ec),leave:function(W){Ie(e,W)||ol(e)}};var j=n.input.getField();N(j,"keyup",function(W){return lc.call(e,W)}),N(j,"keydown",Wr(e,sc)),N(j,"keypress",Wr(e,ul)),N(j,"focus",function(W){return uu(e,W)}),N(j,"blur",function(W){return qo(e,W)})}var No=[];hr.defineInitHook=function(e){return No.push(e)};function Do(e,n,u,l){var f=e.doc,g;u==null&&(u="add"),u=="smart"&&(f.mode.indent?g=Qr(e,n).state:u="prev");var k=e.options.tabSize,j=St(f,n),W=qe(j.text,null,k);j.stateAfter&&(j.stateAfter=null);var q=j.text.match(/^\s*/)[0],we;if(!l&&!/\S/.test(j.text))we=0,u="not";else if(u=="smart"&&(we=f.mode.indent(g,j.text.slice(q.length),j.text),we==Ze||we>150)){if(!l)return;u="prev"}u=="prev"?n>f.first?we=qe(St(f,n-1).text,null,k):we=0:u=="add"?we=W+e.options.indentUnit:u=="subtract"?we=W-e.options.indentUnit:typeof u=="number"&&(we=W+u),we=Math.max(0,we);var Ee="",Ne=0;if(e.options.indentWithTabs)for(var Me=Math.floor(we/k);Me;--Me)Ne+=k,Ee+=" ";if(Ne<we&&(Ee+=Ft(we-Ne)),Ee!=q)return Po(f,Ee,rt(n,0),rt(n,q.length),"+input"),j.stateAfter=null,!0;for(var Ye=0;Ye<f.sel.ranges.length;Ye++){var et=f.sel.ranges[Ye];if(et.head.line==n&&et.head.ch<q.length){var ot=rt(n,q.length);ri(f,Ye,new qt(ot,ot));break}}}var Nn=null;function pa(e){Nn=e}function pl(e,n,u,l,f){var g=e.doc;e.display.shift=!1,l||(l=g.sel);var k=+new Date-200,j=f=="paste"||e.state.pasteIncoming>k,W=$n(n),q=null;if(j&&l.ranges.length>1)if(Nn&&Nn.text.join(`
30
+ `)==n){if(l.ranges.length%Nn.text.length==0){q=[];for(var we=0;we<Nn.text.length;we++)q.push(g.splitLines(Nn.text[we]))}}else W.length==l.ranges.length&&e.options.pasteLinesPerSelection&&(q=Ut(W,function(ft){return[ft]}));for(var Ee=e.curOp.updateInput,Ne=l.ranges.length-1;Ne>=0;Ne--){var Me=l.ranges[Ne],Ye=Me.from(),et=Me.to();Me.empty()&&(u&&u>0?Ye=rt(Ye.line,Ye.ch-u):e.state.overwrite&&!j?et=rt(et.line,Math.min(St(g,et.line).text.length,et.ch+Et(W).length)):j&&Nn&&Nn.lineWise&&Nn.text.join(`
31
+ `)==W.join(`
32
+ `)&&(Ye=et=rt(Ye.line,0)));var ot={from:Ye,to:et,text:q?q[Ne%q.length]:W,origin:f||(j?"paste":e.state.cutIncoming>k?"cut":"+input")};To(e.doc,ot),Fr(e,"inputRead",e,ot)}n&&!j&&Gu(e,n),Jt(e),e.curOp.updateInput<2&&(e.curOp.updateInput=Ee),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function zu(e,n){var u=e.clipboardData&&e.clipboardData.getData("Text");if(u)return e.preventDefault(),!n.isReadOnly()&&!n.options.disableInput&&on(n,function(){return pl(n,u,0,null,"paste")}),!0}function Gu(e,n){if(!(!e.options.electricChars||!e.options.smartIndent))for(var u=e.doc.sel,l=u.ranges.length-1;l>=0;l--){var f=u.ranges[l];if(!(f.head.ch>100||l&&u.ranges[l-1].head.line==f.head.line)){var g=e.getModeAt(f.head),k=!1;if(g.electricChars){for(var j=0;j<g.electricChars.length;j++)if(n.indexOf(g.electricChars.charAt(j))>-1){k=Do(e,f.head.line,"smart");break}}else g.electricInput&&g.electricInput.test(St(e.doc,f.head.line).text.slice(0,f.head.ch))&&(k=Do(e,f.head.line,"smart"));k&&Fr(e,"electricInput",e,f.head.line)}}}function $u(e){for(var n=[],u=[],l=0;l<e.doc.sel.ranges.length;l++){var f=e.doc.sel.ranges[l].head.line,g={anchor:rt(f,0),head:rt(f+1,0)};u.push(g),n.push(e.getRange(g.anchor,g.head))}return{text:n,ranges:u}}function Ku(e,n,u,l){e.setAttribute("autocorrect",u?"":"off"),e.setAttribute("autocapitalize",l?"":"off"),e.setAttribute("spellcheck",!!n)}function hl(){var e=me("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),n=me("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return w?e.style.width="1000px":e.setAttribute("wrap","off"),R&&(e.style.border="1px solid black"),Ku(e),n}function Yu(e){var n=e.optionHandlers,u=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(l,f){var g=this.options,k=g[l];g[l]==f&&l!="mode"||(g[l]=f,n.hasOwnProperty(l)&&Wr(this,n[l])(this,f,k),Oe(this,"optionChange",this,l))},getOption:function(l){return this.options[l]},getDoc:function(){return this.doc},addKeyMap:function(l,f){this.state.keyMaps[f?"push":"unshift"](eo(l))},removeKeyMap:function(l){for(var f=this.state.keyMaps,g=0;g<f.length;++g)if(f[g]==l||f[g].name==l)return f.splice(g,1),!0},addOverlay:$r(function(l,f){var g=l.token?l:e.getMode(this.options,l);if(g.startState)throw new Error("Overlays may not be stateful.");jt(this.state.overlays,{mode:g,modeSpec:l,opaque:f&&f.opaque,priority:f&&f.priority||0},function(k){return k.priority}),this.state.modeGen++,qr(this)}),removeOverlay:$r(function(l){for(var f=this.state.overlays,g=0;g<f.length;++g){var k=f[g].modeSpec;if(k==l||typeof l=="string"&&k.name==l){f.splice(g,1),this.state.modeGen++,qr(this);return}}}),indentLine:$r(function(l,f,g){typeof f!="string"&&typeof f!="number"&&(f==null?f=this.options.smartIndent?"smart":"prev":f=f?"add":"subtract"),Jn(this.doc,l)&&Do(this,l,f,g)}),indentSelection:$r(function(l){for(var f=this.doc.sel.ranges,g=-1,k=0;k<f.length;k++){var j=f[k];if(j.empty())j.head.line>g&&(Do(this,j.head.line,l,!0),g=j.head.line,k==this.doc.sel.primIndex&&Jt(this));else{var W=j.from(),q=j.to(),we=Math.max(g,W.line);g=Math.min(this.lastLine(),q.line-(q.ch?0:1))+1;for(var Ee=we;Ee<g;++Ee)Do(this,Ee,l);var Ne=this.doc.sel.ranges;W.ch==0&&f.length==Ne.length&&Ne[k].from().ch>0&&ri(this.doc,k,new qt(W,Ne[k].to()),lt)}}}),getTokenAt:function(l,f){return ws(this,l,f)},getLineTokens:function(l,f){return ws(this,rt(l),f,!0)},getTokenTypeAt:function(l){l=st(this.doc,l);var f=Rl(this,St(this.doc,l.line)),g=0,k=(f.length-1)/2,j=l.ch,W;if(j==0)W=f[2];else for(;;){var q=g+k>>1;if((q?f[q*2-1]:0)>=j)k=q;else if(f[q*2+1]<j)g=q+1;else{W=f[q*2+2];break}}var we=W?W.indexOf("overlay "):-1;return we<0?W:we==0?null:W.slice(0,we-1)},getModeAt:function(l){var f=this.doc.mode;return f.innerMode?e.innerMode(f,this.getTokenAt(l).state).mode:f},getHelper:function(l,f){return this.getHelpers(l,f)[0]},getHelpers:function(l,f){var g=[];if(!u.hasOwnProperty(f))return g;var k=u[f],j=this.getModeAt(l);if(typeof j[f]=="string")k[j[f]]&&g.push(k[j[f]]);else if(j[f])for(var W=0;W<j[f].length;W++){var q=k[j[f][W]];q&&g.push(q)}else j.helperType&&k[j.helperType]?g.push(k[j.helperType]):k[j.name]&&g.push(k[j.name]);for(var we=0;we<k._global.length;we++){var Ee=k._global[we];Ee.pred(j,this)&&ut(g,Ee.val)==-1&&g.push(Ee.val)}return g},getStateAfter:function(l,f){var g=this.doc;return l=it(g,l==null?g.first+g.size-1:l),Qr(this,l+1,f).state},cursorCoords:function(l,f){var g,k=this.doc.sel.primary();return l==null?g=k.head:typeof l=="object"?g=st(this.doc,l):g=l?k.from():k.to(),wn(this,g,f||"page")},charCoords:function(l,f){return Ls(this,st(this.doc,l),f||"page")},coordsChar:function(l,f){return l=Ki(this,l,f||"page"),La(this,l.left,l.top)},lineAtHeight:function(l,f){return l=Ki(this,{top:l,left:0},f||"page").top,Hn(this.doc,l+this.display.viewOffset)},heightAtLine:function(l,f,g){var k=!1,j;if(typeof l=="number"){var W=this.doc.first+this.doc.size-1;l<this.doc.first?l=this.doc.first:l>W&&(l=W,k=!0),j=St(this.doc,l)}else j=l;return Oi(this,j,{top:0,left:0},f||"page",g||k).top+(k?this.doc.height-Xn(j):0)},defaultTextHeight:function(){return ho(this.display)},defaultCharWidth:function(){return Yi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(l,f,g,k,j){var W=this.display;l=wn(this,st(this.doc,l));var q=l.bottom,we=l.left;if(f.style.position="absolute",f.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(f),W.sizer.appendChild(f),k=="over")q=l.top;else if(k=="above"||k=="near"){var Ee=Math.max(W.wrapper.clientHeight,this.doc.height),Ne=Math.max(W.sizer.clientWidth,W.lineSpace.clientWidth);(k=="above"||l.bottom+f.offsetHeight>Ee)&&l.top>f.offsetHeight?q=l.top-f.offsetHeight:l.bottom+f.offsetHeight<=Ee&&(q=l.bottom),we+f.offsetWidth>Ne&&(we=Ne-f.offsetWidth)}f.style.top=q+"px",f.style.left=f.style.right="",j=="right"?(we=W.sizer.clientWidth-f.offsetWidth,f.style.right="0px"):(j=="left"?we=0:j=="middle"&&(we=(W.sizer.clientWidth-f.offsetWidth)/2),f.style.left=we+"px"),g&&fu(this,{left:we,top:q,right:we+f.offsetWidth,bottom:q+f.offsetHeight})},triggerOnKeyDown:$r(sc),triggerOnKeyPress:$r(ul),triggerOnKeyUp:lc,triggerOnMouseDown:$r(Uu),execCommand:function(l){if(Ln.hasOwnProperty(l))return Ln[l].call(null,this)},triggerElectric:$r(function(l){Gu(this,l)}),findPosH:function(l,f,g,k){var j=1;f<0&&(j=-1,f=-f);for(var W=st(this.doc,l),q=0;q<f&&(W=vl(this.doc,W,j,g,k),!W.hitSide);++q);return W},moveH:$r(function(l,f){var g=this;this.extendSelectionsBy(function(k){return g.display.shift||g.doc.extend||k.empty()?vl(g.doc,k.head,l,f,g.options.rtlMoveVisually):l<0?k.from():k.to()},vt)}),deleteH:$r(function(l,f){var g=this.doc.sel,k=this.doc;g.somethingSelected()?k.replaceSelection("",null,"+delete"):Ro(this,function(j){var W=vl(k,j.head,l,f,!1);return l<0?{from:W,to:j.head}:{from:j.head,to:W}})}),findPosV:function(l,f,g,k){var j=1,W=k;f<0&&(j=-1,f=-f);for(var q=st(this.doc,l),we=0;we<f;++we){var Ee=wn(this,q,"div");if(W==null?W=Ee.left:Ee.left=W,q=Ju(this,Ee,j,g),q.hitSide)break}return q},moveV:$r(function(l,f){var g=this,k=this.doc,j=[],W=!this.display.shift&&!k.extend&&k.sel.somethingSelected();if(k.extendSelectionsBy(function(we){if(W)return l<0?we.from():we.to();var Ee=wn(g,we.head,"div");we.goalColumn!=null&&(Ee.left=we.goalColumn),j.push(Ee.left);var Ne=Ju(g,Ee,l,f);return f=="page"&&we==k.sel.primary()&&En(g,Ls(g,Ne,"div").top-Ee.top),Ne},vt),j.length)for(var q=0;q<k.sel.ranges.length;q++)k.sel.ranges[q].goalColumn=j[q]}),findWordAt:function(l){var f=this.doc,g=St(f,l.line).text,k=l.ch,j=l.ch;if(g){var W=this.getHelper(l,"wordChars");(l.sticky=="before"||j==g.length)&&k?--k:++j;for(var q=g.charAt(k),we=ve(q,W)?function(Ee){return ve(Ee,W)}:/\s/.test(q)?function(Ee){return/\s/.test(Ee)}:function(Ee){return!/\s/.test(Ee)&&!ve(Ee)};k>0&&we(g.charAt(k-1));)--k;for(;j<g.length&&we(g.charAt(j));)++j}return new qt(rt(l.line,k),rt(l.line,j))},toggleOverwrite:function(l){l!=null&&l==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Ue(this.display.cursorDiv,"CodeMirror-overwrite"):te(this.display.cursorDiv,"CodeMirror-overwrite"),Oe(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Re()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:$r(function(l,f){fi(this,l,f)}),getScrollInfo:function(){var l=this.display.scroller;return{left:l.scrollLeft,top:l.scrollTop,height:l.scrollHeight-Zr(this)-this.display.barHeight,width:l.scrollWidth-Zr(this)-this.display.barWidth,clientHeight:ks(this),clientWidth:Gi(this)}},scrollIntoView:$r(function(l,f){l==null?(l={from:this.doc.sel.primary().head,to:null},f==null&&(f=this.options.cursorScrollMargin)):typeof l=="number"?l={from:rt(l,0),to:null}:l.from==null&&(l={from:l,to:null}),l.to||(l.to=l.from),l.margin=f||0,l.from.line!=null?cu(this,l):Hs(this,l.from,l.to,l.margin)}),setSize:$r(function(l,f){var g=this,k=function(W){return typeof W=="number"||/^\d+$/.test(String(W))?W+"px":W};l!=null&&(this.display.wrapper.style.width=k(l)),f!=null&&(this.display.wrapper.style.height=k(f)),this.options.lineWrapping&&Ms(this);var j=this.display.viewFrom;this.doc.iter(j,this.display.viewTo,function(W){if(W.widgets){for(var q=0;q<W.widgets.length;q++)if(W.widgets[q].noHScroll){Xi(g,j,"widget");break}}++j}),this.curOp.forceUpdate=!0,Oe(this,"refresh",this)}),operation:function(l){return on(this,l)},startOperation:function(){return Sr(this)},endOperation:function(){return cn(this)},refresh:$r(function(){var l=this.display.cachedTextHeight;qr(this),this.curOp.forceUpdate=!0,Xo(this),fi(this,this.doc.scrollLeft,this.doc.scrollTop),Ha(this.display),(l==null||Math.abs(l-ho(this.display))>.5||this.options.lineWrapping)&&ou(this),Oe(this,"refresh",this)}),swapDoc:$r(function(l){var f=this.doc;return f.cm=null,this.state.selectingText&&this.state.selectingText(),vu(this,l),Xo(this),this.display.input.reset(),fi(this,l.scrollLeft,l.scrollTop),this.curOp.forceScroll=!0,Fr(this,"swapDoc",this,f),f}),phrase:function(l){var f=this.options.phrases;return f&&Object.prototype.hasOwnProperty.call(f,l)?f[l]:l},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}},He(e),e.registerHelper=function(l,f,g){u.hasOwnProperty(l)||(u[l]=e[l]={_global:[]}),u[l][f]=g},e.registerGlobalHelper=function(l,f,g,k){e.registerHelper(l,f,k),u[l]._global.push({pred:g,val:k})}}function vl(e,n,u,l,f){var g=n,k=u,j=St(e,n.line),W=f&&e.direction=="rtl"?-u:u;function q(){var yt=n.line+W;return yt<e.first||yt>=e.first+e.size?!1:(n=new rt(yt,n.ch,n.sticky),j=St(e,yt))}function we(yt){var ct;if(l=="codepoint"){var mt=j.text.charCodeAt(n.ch+(u>0?0:-1));if(isNaN(mt))ct=null;else{var Pt=u>0?mt>=55296&&mt<56320:mt>=56320&&mt<57343;ct=new rt(n.line,Math.max(0,Math.min(j.text.length,n.ch+u*(Pt?2:1))),-u)}}else f?ct=nc(e.cm,j,n,u):ct=ll(j,n,u);if(ct==null)if(!yt&&q())n=Lu(f,e.cm,j,n.line,W);else return!1;else n=ct;return!0}if(l=="char"||l=="codepoint")we();else if(l=="column")we(!0);else if(l=="word"||l=="group")for(var Ee=null,Ne=l=="group",Me=e.cm&&e.cm.getHelper(n,"wordChars"),Ye=!0;!(u<0&&!we(!Ye));Ye=!1){var et=j.text.charAt(n.ch)||`
33
+ `,ot=ve(et,Me)?"w":Ne&&et==`
34
+ `?"n":!Ne||/\s/.test(et)?null:"p";if(Ne&&!Ye&&!ot&&(ot="s"),Ee&&Ee!=ot){u<0&&(u=1,we(),n.sticky="after");break}if(ot&&(Ee=ot),u>0&&!we(!Ye))break}var ft=tl(e,n,g,k,!0);return si(g,ft)&&(ft.hitSide=!0),ft}function Ju(e,n,u,l){var f=e.doc,g=n.left,k;if(l=="page"){var j=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),W=Math.max(j-.5*ho(e.display),3);k=(u>0?n.bottom:n.top)+u*W}else l=="line"&&(k=u>0?n.bottom+3:n.top-3);for(var q;q=La(e,g,k),!!q.outside;){if(u<0?k<=0:k>=f.height){q.hitSide=!0;break}k+=u*5}return q}var nr=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new at,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};nr.prototype.init=function(e){var n=this,u=this,l=u.cm,f=u.div=e.lineDiv;f.contentEditable=!0,Ku(f,l.options.spellcheck,l.options.autocorrect,l.options.autocapitalize);function g(j){for(var W=j.target;W;W=W.parentNode){if(W==f)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(W.className))break}return!1}N(f,"paste",function(j){!g(j)||Ie(l,j)||zu(j,l)||A<=11&&setTimeout(Wr(l,function(){return n.updateFromDOM()}),20)}),N(f,"compositionstart",function(j){n.composing={data:j.data,done:!1}}),N(f,"compositionupdate",function(j){n.composing||(n.composing={data:j.data,done:!1})}),N(f,"compositionend",function(j){n.composing&&(j.data!=n.composing.data&&n.readFromDOMSoon(),n.composing.done=!0)}),N(f,"touchstart",function(){return u.forceCompositionEnd()}),N(f,"input",function(){n.composing||n.readFromDOMSoon()});function k(j){if(!(!g(j)||Ie(l,j))){if(l.somethingSelected())pa({lineWise:!1,text:l.getSelections()}),j.type=="cut"&&l.replaceSelection("",null,"cut");else if(l.options.lineWiseCopyCut){var W=$u(l);pa({lineWise:!0,text:W.text}),j.type=="cut"&&l.operation(function(){l.setSelections(W.ranges,0,lt),l.replaceSelection("",null,"cut")})}else return;if(j.clipboardData){j.clipboardData.clearData();var q=Nn.text.join(`
35
+ `);if(j.clipboardData.setData("Text",q),j.clipboardData.getData("Text")==q){j.preventDefault();return}}var we=hl(),Ee=we.firstChild;l.display.lineSpace.insertBefore(we,l.display.lineSpace.firstChild),Ee.value=Nn.text.join(`
36
+ `);var Ne=Re();ke(Ee),setTimeout(function(){l.display.lineSpace.removeChild(we),Ne.focus(),Ne==f&&u.showPrimarySelection()},50)}}N(f,"copy",k),N(f,"cut",k)},nr.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},nr.prototype.prepareSelection=function(){var e=au(this.cm,!1);return e.focus=Re()==this.div,e},nr.prototype.showSelection=function(e,n){!e||!this.cm.display.view.length||((e.focus||n)&&this.showPrimarySelection(),this.showMultipleSelections(e))},nr.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},nr.prototype.showPrimarySelection=function(){var e=this.getSelection(),n=this.cm,u=n.doc.sel.primary(),l=u.from(),f=u.to();if(n.display.viewTo==n.display.viewFrom||l.line>=n.display.viewTo||f.line<n.display.viewFrom){e.removeAllRanges();return}var g=ss(n,e.anchorNode,e.anchorOffset),k=ss(n,e.focusNode,e.focusOffset);if(!(g&&!g.bad&&k&&!k.bad&&Lt(Qe(g,k),l)==0&&Lt(Ce(g,k),f)==0)){var j=n.display.view,W=l.line>=n.display.viewFrom&&ha(n,l)||{node:j[0].measure.map[2],offset:0},q=f.line<n.display.viewTo&&ha(n,f);if(!q){var we=j[j.length-1].measure,Ee=we.maps?we.maps[we.maps.length-1]:we.map;q={node:Ee[Ee.length-1],offset:Ee[Ee.length-2]-Ee[Ee.length-3]}}if(!W||!q){e.removeAllRanges();return}var Ne=e.rangeCount&&e.getRangeAt(0),Me;try{Me=fe(W.node,W.offset,q.offset,q.node)}catch(Ye){}Me&&(!c&&n.state.focused?(e.collapse(W.node,W.offset),Me.collapsed||(e.removeAllRanges(),e.addRange(Me))):(e.removeAllRanges(),e.addRange(Me)),Ne&&e.anchorNode==null?e.addRange(Ne):c&&this.startGracePeriod()),this.rememberSelection()}},nr.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation(function(){return e.cm.curOp.selectionChanged=!0})},20)},nr.prototype.showMultipleSelections=function(e){be(this.cm.display.cursorDiv,e.cursors),be(this.cm.display.selectionDiv,e.selection)},nr.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},nr.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var n=e.getRangeAt(0).commonAncestorContainer;return oe(this.div,n)},nr.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||Re()!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},nr.prototype.blur=function(){this.div.blur()},nr.prototype.getField=function(){return this.div},nr.prototype.supportsTouch=function(){return!0},nr.prototype.receivedFocus=function(){var e=this;this.selectionInEditor()?this.pollSelection():on(this.cm,function(){return e.cm.curOp.selectionChanged=!0});function n(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,n))}this.polling.set(this.cm.options.pollInterval,n)},nr.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},nr.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var e=this.getSelection(),n=this.cm;if(Q&&D&&this.cm.display.gutterSpecs.length&&Xu(e.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var u=ss(n,e.anchorNode,e.anchorOffset),l=ss(n,e.focusNode,e.focusOffset);u&&l&&on(n,function(){_t(n.doc,ci(u,l),lt),(u.bad||l.bad)&&(n.curOp.selectionChanged=!0)})}}},nr.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e=this.cm,n=e.display,u=e.doc.sel.primary(),l=u.from(),f=u.to();if(l.ch==0&&l.line>e.firstLine()&&(l=rt(l.line-1,St(e.doc,l.line-1).length)),f.ch==St(e.doc,f.line).text.length&&f.line<e.lastLine()&&(f=rt(f.line+1,0)),l.line<n.viewFrom||f.line>n.viewTo-1)return!1;var g,k,j;l.line==n.viewFrom||(g=Sn(e,l.line))==0?(k=er(n.view[0].line),j=n.view[0].node):(k=er(n.view[g].line),j=n.view[g-1].node.nextSibling);var W=Sn(e,f.line),q,we;if(W==n.view.length-1?(q=n.viewTo-1,we=n.lineDiv.lastChild):(q=er(n.view[W+1].line)-1,we=n.view[W+1].node.previousSibling),!j)return!1;for(var Ee=e.doc.splitLines(Qu(e,j,we,k,q)),Ne=ai(e.doc,rt(k,0),rt(q,St(e.doc,q).text.length));Ee.length>1&&Ne.length>1;)if(Et(Ee)==Et(Ne))Ee.pop(),Ne.pop(),q--;else if(Ee[0]==Ne[0])Ee.shift(),Ne.shift(),k++;else break;for(var Me=0,Ye=0,et=Ee[0],ot=Ne[0],ft=Math.min(et.length,ot.length);Me<ft&&et.charCodeAt(Me)==ot.charCodeAt(Me);)++Me;for(var yt=Et(Ee),ct=Et(Ne),mt=Math.min(yt.length-(Ee.length==1?Me:0),ct.length-(Ne.length==1?Me:0));Ye<mt&&yt.charCodeAt(yt.length-Ye-1)==ct.charCodeAt(ct.length-Ye-1);)++Ye;if(Ee.length==1&&Ne.length==1&&k==l.line)for(;Me&&Me>l.ch&&yt.charCodeAt(yt.length-Ye-1)==ct.charCodeAt(ct.length-Ye-1);)Me--,Ye++;Ee[Ee.length-1]=yt.slice(0,yt.length-Ye).replace(/^\u200b+/,""),Ee[0]=Ee[0].slice(Me).replace(/\u200b+$/,"");var Pt=rt(k,Me),Ot=rt(q,Ne.length?Et(Ne).length-Ye:0);if(Ee.length>1||Ee[0]||Lt(Pt,Ot))return Po(e.doc,Ee,Pt,Ot,"+input"),!0},nr.prototype.ensurePolled=function(){this.forceCompositionEnd()},nr.prototype.reset=function(){this.forceCompositionEnd()},nr.prototype.forceCompositionEnd=function(){!this.composing||(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},nr.prototype.readFromDOMSoon=function(){var e=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(e.readDOMTimeout=null,e.composing)if(e.composing.done)e.composing=null;else return;e.updateFromDOM()},80))},nr.prototype.updateFromDOM=function(){var e=this;(this.cm.isReadOnly()||!this.pollContent())&&on(this.cm,function(){return qr(e.cm)})},nr.prototype.setUneditable=function(e){e.contentEditable="false"},nr.prototype.onKeyPress=function(e){e.charCode==0||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Wr(this.cm,pl)(this.cm,String.fromCharCode(e.charCode==null?e.keyCode:e.charCode),0))},nr.prototype.readOnlyChanged=function(e){this.div.contentEditable=String(e!="nocursor")},nr.prototype.onContextMenu=function(){},nr.prototype.resetPosition=function(){},nr.prototype.needsContentAttribute=!0;function ha(e,n){var u=Jo(e,n.line);if(!u||u.hidden)return null;var l=St(e.doc,n.line),f=Ql(u,l,n.line),g=I(l,e.doc.direction),k="left";if(g){var j=H(g,n.ch);k=j%2?"right":"left"}var W=ql(f.map,n.ch,k);return W.offset=W.collapse=="right"?W.end:W.start,W}function Xu(e){for(var n=e;n;n=n.parentNode)if(/CodeMirror-gutter-wrapper/.test(n.className))return!0;return!1}function no(e,n){return n&&(e.bad=!0),e}function Qu(e,n,u,l,f){var g="",k=!1,j=e.doc.lineSeparator(),W=!1;function q(Me){return function(Ye){return Ye.id==Me}}function we(){k&&(g+=j,W&&(g+=j),k=W=!1)}function Ee(Me){Me&&(we(),g+=Me)}function Ne(Me){if(Me.nodeType==1){var Ye=Me.getAttribute("cm-text");if(Ye){Ee(Ye);return}var et=Me.getAttribute("cm-marker"),ot;if(et){var ft=e.findMarks(rt(l,0),rt(f+1,0),q(+et));ft.length&&(ot=ft[0].find(0))&&Ee(ai(e.doc,ot.from,ot.to).join(j));return}if(Me.getAttribute("contenteditable")=="false")return;var yt=/^(pre|div|p|li|table|br)$/i.test(Me.nodeName);if(!/^br$/i.test(Me.nodeName)&&Me.textContent.length==0)return;yt&&we();for(var ct=0;ct<Me.childNodes.length;ct++)Ne(Me.childNodes[ct]);/^(pre|p)$/i.test(Me.nodeName)&&(W=!0),yt&&(k=!0)}else Me.nodeType==3&&Ee(Me.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Ne(n),n!=u;)n=n.nextSibling,W=!1;return g}function ss(e,n,u){var l;if(n==e.display.lineDiv){if(l=e.display.lineDiv.childNodes[u],!l)return no(e.clipPos(rt(e.display.viewTo-1)),!0);n=null,u=0}else for(l=n;;l=l.parentNode){if(!l||l==e.display.lineDiv)return null;if(l.parentNode&&l.parentNode==e.display.lineDiv)break}for(var f=0;f<e.display.view.length;f++){var g=e.display.view[f];if(g.node==l)return vc(g,n,u)}}function vc(e,n,u){var l=e.text.firstChild,f=!1;if(!n||!oe(l,n))return no(rt(er(e.line),0),!0);if(n==l&&(f=!0,n=l.childNodes[u],u=0,!n)){var g=e.rest?Et(e.rest):e.line;return no(rt(er(g),g.text.length),f)}var k=n.nodeType==3?n:null,j=n;for(!k&&n.childNodes.length==1&&n.firstChild.nodeType==3&&(k=n.firstChild,u&&(u=k.nodeValue.length));j.parentNode!=l;)j=j.parentNode;var W=e.measure,q=W.maps;function we(ot,ft,yt){for(var ct=-1;ct<(q?q.length:0);ct++)for(var mt=ct<0?W.map:q[ct],Pt=0;Pt<mt.length;Pt+=3){var Ot=mt[Pt+2];if(Ot==ot||Ot==ft){var Ht=er(ct<0?e.line:e.rest[ct]),ar=mt[Pt]+yt;return(yt<0||Ot!=ot)&&(ar=mt[Pt+(yt?1:0)]),rt(Ht,ar)}}}var Ee=we(k,j,u);if(Ee)return no(Ee,f);for(var Ne=j.nextSibling,Me=k?k.nodeValue.length-u:0;Ne;Ne=Ne.nextSibling){if(Ee=we(Ne,Ne.firstChild,0),Ee)return no(rt(Ee.line,Ee.ch-Me),f);Me+=Ne.textContent.length}for(var Ye=j.previousSibling,et=u;Ye;Ye=Ye.previousSibling){if(Ee=we(Ye,Ye.firstChild,-1),Ee)return no(rt(Ee.line,Ee.ch+et),f);et+=Ye.textContent.length}}var Ar=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new at,this.hasSelection=!1,this.composing=null};Ar.prototype.init=function(e){var n=this,u=this,l=this.cm;this.createField(e);var f=this.textarea;e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),R&&(f.style.width="0px"),N(f,"input",function(){x&&A>=9&&n.hasSelection&&(n.hasSelection=null),u.poll()}),N(f,"paste",function(k){Ie(l,k)||zu(k,l)||(l.state.pasteIncoming=+new Date,u.fastPoll())});function g(k){if(!Ie(l,k)){if(l.somethingSelected())pa({lineWise:!1,text:l.getSelections()});else if(l.options.lineWiseCopyCut){var j=$u(l);pa({lineWise:!0,text:j.text}),k.type=="cut"?l.setSelections(j.ranges,null,lt):(u.prevInput="",f.value=j.text.join(`
37
+ `),ke(f))}else return;k.type=="cut"&&(l.state.cutIncoming=+new Date)}}N(f,"cut",g),N(f,"copy",g),N(e.scroller,"paste",function(k){if(!(li(e,k)||Ie(l,k))){if(!f.dispatchEvent){l.state.pasteIncoming=+new Date,u.focus();return}var j=new Event("paste");j.clipboardData=k.clipboardData,f.dispatchEvent(j)}}),N(e.lineSpace,"selectstart",function(k){li(e,k)||nt(k)}),N(f,"compositionstart",function(){var k=l.getCursor("from");u.composing&&u.composing.range.clear(),u.composing={start:k,range:l.markText(k,l.getCursor("to"),{className:"CodeMirror-composing"})}}),N(f,"compositionend",function(){u.composing&&(u.poll(),u.composing.range.clear(),u.composing=null)})},Ar.prototype.createField=function(e){this.wrapper=hl(),this.textarea=this.wrapper.firstChild},Ar.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},Ar.prototype.prepareSelection=function(){var e=this.cm,n=e.display,u=e.doc,l=au(e);if(e.options.moveInputWithCursor){var f=wn(e,u.sel.primary().head,"div"),g=n.wrapper.getBoundingClientRect(),k=n.lineDiv.getBoundingClientRect();l.teTop=Math.max(0,Math.min(n.wrapper.clientHeight-10,f.top+k.top-g.top)),l.teLeft=Math.max(0,Math.min(n.wrapper.clientWidth-10,f.left+k.left-g.left))}return l},Ar.prototype.showSelection=function(e){var n=this.cm,u=n.display;be(u.cursorDiv,e.cursors),be(u.selectionDiv,e.selection),e.teTop!=null&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ar.prototype.reset=function(e){if(!(this.contextMenuPending||this.composing)){var n=this.cm;if(n.somethingSelected()){this.prevInput="";var u=n.getSelection();this.textarea.value=u,n.state.focused&&ke(this.textarea),x&&A>=9&&(this.hasSelection=u)}else e||(this.prevInput=this.textarea.value="",x&&A>=9&&(this.hasSelection=null))}},Ar.prototype.getField=function(){return this.textarea},Ar.prototype.supportsTouch=function(){return!1},Ar.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!L||Re()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ar.prototype.blur=function(){this.textarea.blur()},Ar.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ar.prototype.receivedFocus=function(){this.slowPoll()},Ar.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){e.poll(),e.cm.state.focused&&e.slowPoll()})},Ar.prototype.fastPoll=function(){var e=!1,n=this;n.pollingFast=!0;function u(){var l=n.poll();!l&&!e?(e=!0,n.polling.set(60,u)):(n.pollingFast=!1,n.slowPoll())}n.polling.set(20,u)},Ar.prototype.poll=function(){var e=this,n=this.cm,u=this.textarea,l=this.prevInput;if(this.contextMenuPending||!n.state.focused||Pn(u)&&!l&&!this.composing||n.isReadOnly()||n.options.disableInput||n.state.keySeq)return!1;var f=u.value;if(f==l&&!n.somethingSelected())return!1;if(x&&A>=9&&this.hasSelection===f||P&&/[\uf700-\uf7ff]/.test(f))return n.display.input.reset(),!1;if(n.doc.sel==n.display.selForContextMenu){var g=f.charCodeAt(0);if(g==8203&&!l&&(l="\u200B"),g==8666)return this.reset(),this.cm.execCommand("undo")}for(var k=0,j=Math.min(l.length,f.length);k<j&&l.charCodeAt(k)==f.charCodeAt(k);)++k;return on(n,function(){pl(n,f.slice(k),l.length-k,null,e.composing?"*compose":null),f.length>1e3||f.indexOf(`
38
+ `)>-1?u.value=e.prevInput="":e.prevInput=f,e.composing&&(e.composing.range.clear(),e.composing.range=n.markText(e.composing.start,n.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Ar.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ar.prototype.onKeyPress=function(){x&&A>=9&&(this.hasSelection=null),this.fastPoll()},Ar.prototype.onContextMenu=function(e){var n=this,u=n.cm,l=u.display,f=n.textarea;n.contextMenuPending&&n.contextMenuPending();var g=Ji(u,e),k=l.scroller.scrollTop;if(!g||B)return;var j=u.options.resetSelectionOnContextMenu;j&&u.doc.sel.contains(g)==-1&&Wr(u,_t)(u.doc,ci(g),lt);var W=f.style.cssText,q=n.wrapper.style.cssText,we=n.wrapper.offsetParent.getBoundingClientRect();n.wrapper.style.cssText="position: static",f.style.cssText=`position: absolute; width: 30px; height: 30px;
39
+ top: `+(e.clientY-we.top-5)+"px; left: "+(e.clientX-we.left-5)+`px;
40
+ z-index: 1000; background: `+(x?"rgba(255, 255, 255, .05)":"transparent")+`;
41
+ outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Ee;w&&(Ee=window.scrollY),l.input.focus(),w&&window.scrollTo(null,Ee),l.input.reset(),u.somethingSelected()||(f.value=n.prevInput=" "),n.contextMenuPending=Me,l.selForContextMenu=u.doc.sel,clearTimeout(l.detectingSelectAll);function Ne(){if(f.selectionStart!=null){var et=u.somethingSelected(),ot="\u200B"+(et?f.value:"");f.value="\u21DA",f.value=ot,n.prevInput=et?"":"\u200B",f.selectionStart=1,f.selectionEnd=ot.length,l.selForContextMenu=u.doc.sel}}function Me(){if(n.contextMenuPending==Me&&(n.contextMenuPending=!1,n.wrapper.style.cssText=q,f.style.cssText=W,x&&A<9&&l.scrollbars.setScrollTop(l.scroller.scrollTop=k),f.selectionStart!=null)){(!x||x&&A<9)&&Ne();var et=0,ot=function(){l.selForContextMenu==u.doc.sel&&f.selectionStart==0&&f.selectionEnd>0&&n.prevInput=="\u200B"?Wr(u,Su)(u):et++<10?l.detectingSelectAll=setTimeout(ot,500):(l.selForContextMenu=null,l.input.reset())};l.detectingSelectAll=setTimeout(ot,200)}}if(x&&A>=9&&Ne(),Z){Yt(e);var Ye=function(){ue(window,"mouseup",Ye),setTimeout(Me,20)};N(window,"mouseup",Ye)}else setTimeout(Me,50)},Ar.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled=e=="nocursor",this.textarea.readOnly=!!e},Ar.prototype.setUneditable=function(){},Ar.prototype.needsContentAttribute=!1;function gc(e,n){if(n=n?Je(n):{},n.value=e.value,!n.tabindex&&e.tabIndex&&(n.tabindex=e.tabIndex),!n.placeholder&&e.placeholder&&(n.placeholder=e.placeholder),n.autofocus==null){var u=Re();n.autofocus=u==e||e.getAttribute("autofocus")!=null&&u==document.body}function l(){e.value=j.getValue()}var f;if(e.form&&(N(e.form,"submit",l),!n.leaveSubmitMethodAlone)){var g=e.form;f=g.submit;try{var k=g.submit=function(){l(),g.submit=f,g.submit(),g.submit=k}}catch(W){}}n.finishInit=function(W){W.save=l,W.getTextArea=function(){return e},W.toTextArea=function(){W.toTextArea=isNaN,l(),e.parentNode.removeChild(W.getWrapperElement()),e.style.display="",e.form&&(ue(e.form,"submit",l),!n.leaveSubmitMethodAlone&&typeof e.form.submit=="function"&&(e.form.submit=f))}},e.style.display="none";var j=hr(function(W){return e.parentNode.insertBefore(W,e.nextSibling)},n);return j}function yc(e){e.off=ue,e.on=N,e.wheelEventPixels=pu,e.Doc=_r,e.splitLines=$n,e.countColumn=qe,e.findColumn=dt,e.isWordChar=bt,e.Pass=Ze,e.signal=Oe,e.Line=Wi,e.changeEnd=Wn,e.scrollbarModel=wo,e.Pos=rt,e.cmpPos=Lt,e.modes=Ho,e.mimeModes=mn,e.resolveMode=ji,e.getMode=Vn,e.modeExtensions=wi,e.extendMode=Oa,e.copyState=In,e.startState=Si,e.innerMode=xn,e.commands=Ln,e.keyMap=hi,e.keyName=Mu,e.isModifierKey=sl,e.lookupKey=_i,e.normalizeKeyMap=ku,e.StringStream=xr,e.SharedTextMarker=rr,e.TextMarker=Ri,e.LineWidget=la,e.e_preventDefault=nt,e.e_stopPropagation=ht,e.e_stop=Yt,e.addClass=Ue,e.contains=oe,e.rmClass=te,e.keyNames=pi}Vu(hr),Yu(hr);var Zu="iter insert remove copy getEditor constructor".split(" ");for(var ls in _r.prototype)_r.prototype.hasOwnProperty(ls)&&ut(Zu,ls)<0&&(hr.prototype[ls]=function(e){return function(){return e.apply(this.doc,arguments)}}(_r.prototype[ls]));return He(_r),hr.inputStyles={textarea:Ar,contenteditable:nr},hr.defineMode=function(e){!hr.defaults.mode&&e!="null"&&(hr.defaults.mode=e),Yn.apply(this,arguments)},hr.defineMIME=bi,hr.defineMode("null",function(){return{token:function(e){return e.skipToEnd()}}}),hr.defineMIME("text/plain","null"),hr.defineExtension=function(e,n){hr.prototype[e]=n},hr.defineDocExtension=function(e,n){_r.prototype[e]=n},hr.fromTextArea=gc,yc(hr),hr.version="5.61.1",hr})},96876:(h,F,o)=>{(function(c){c(o(4631))})(function(c){"use strict";c.defineMode("javascript",function(v,m){var d=v.indentUnit,x=m.statementIndent,A=m.jsonld,w=m.json||A,T=m.trackScope!==!1,D=m.typescript,B=m.wordCharacters||/[\w$\xa1-\uffff]/,U=function(){function ae(Tr){return{type:Tr,style:"keyword"}}var Ce=ae("keyword a"),Qe=ae("keyword b"),it=ae("keyword c"),st=ae("keyword d"),$t=ae("operator"),Zt={type:"atom",style:"atom"};return{if:ae("if"),while:Ce,with:Ce,else:Qe,do:Qe,try:Qe,finally:Qe,return:st,break:st,continue:st,new:ae("new"),delete:it,void:it,throw:it,debugger:ae("debugger"),var:ae("var"),const:ae("var"),let:ae("var"),function:ae("function"),catch:ae("catch"),for:ae("for"),switch:ae("switch"),case:ae("case"),default:ae("default"),in:$t,typeof:$t,instanceof:$t,true:Zt,false:Zt,null:Zt,undefined:Zt,NaN:Zt,Infinity:Zt,this:ae("this"),class:ae("class"),super:ae("atom"),yield:it,export:ae("export"),import:ae("import"),extends:it,await:it}}(),ee=/[+\-*&%=<>!?|~^@]/,K=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function R(ae){for(var Ce=!1,Qe,it=!1;(Qe=ae.next())!=null;){if(!Ce){if(Qe=="/"&&!it)return;Qe=="["?it=!0:it&&Qe=="]"&&(it=!1)}Ce=!Ce&&Qe=="\\"}}var Q,L;function P(ae,Ce,Qe){return Q=ae,L=Qe,Ce}function V(ae,Ce){var Qe=ae.next();if(Qe=='"'||Qe=="'")return Ce.tokenize=X(Qe),Ce.tokenize(ae,Ce);if(Qe=="."&&ae.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return P("number","number");if(Qe=="."&&ae.match(".."))return P("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(Qe))return P(Qe);if(Qe=="="&&ae.eat(">"))return P("=>","operator");if(Qe=="0"&&ae.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return P("number","number");if(/\d/.test(Qe))return ae.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),P("number","number");if(Qe=="/")return ae.eat("*")?(Ce.tokenize=z,z(ae,Ce)):ae.eat("/")?(ae.skipToEnd(),P("comment","comment")):si(ae,Ce,1)?(R(ae),ae.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),P("regexp","string-2")):(ae.eat("="),P("operator","operator",ae.current()));if(Qe=="`")return Ce.tokenize=G,G(ae,Ce);if(Qe=="#"&&ae.peek()=="!")return ae.skipToEnd(),P("meta","meta");if(Qe=="#"&&ae.eatWhile(B))return P("variable","property");if(Qe=="<"&&ae.match("!--")||Qe=="-"&&ae.match("->")&&!/\S/.test(ae.string.slice(0,ae.start)))return ae.skipToEnd(),P("comment","comment");if(ee.test(Qe))return(Qe!=">"||!Ce.lexical||Ce.lexical.type!=">")&&(ae.eat("=")?(Qe=="!"||Qe=="=")&&ae.eat("="):/[<>*+\-|&?]/.test(Qe)&&(ae.eat(Qe),Qe==">"&&ae.eat(Qe))),Qe=="?"&&ae.eat(".")?P("."):P("operator","operator",ae.current());if(B.test(Qe)){ae.eatWhile(B);var it=ae.current();if(Ce.lastType!="."){if(U.propertyIsEnumerable(it)){var st=U[it];return P(st.type,st.style,it)}if(it=="async"&&ae.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return P("async","keyword",it)}return P("variable","variable",it)}}function X(ae){return function(Ce,Qe){var it=!1,st;if(A&&Ce.peek()=="@"&&Ce.match(K))return Qe.tokenize=V,P("jsonld-keyword","meta");for(;(st=Ce.next())!=null&&!(st==ae&&!it);)it=!it&&st=="\\";return it||(Qe.tokenize=V),P("string","string")}}function z(ae,Ce){for(var Qe=!1,it;it=ae.next();){if(it=="/"&&Qe){Ce.tokenize=V;break}Qe=it=="*"}return P("comment","comment")}function G(ae,Ce){for(var Qe=!1,it;(it=ae.next())!=null;){if(!Qe&&(it=="`"||it=="$"&&ae.eat("{"))){Ce.tokenize=V;break}Qe=!Qe&&it=="\\"}return P("quasi","string-2",ae.current())}var Z="([{}])";function ce(ae,Ce){Ce.fatArrowAt&&(Ce.fatArrowAt=null);var Qe=ae.string.indexOf("=>",ae.start);if(!(Qe<0)){if(D){var it=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(ae.string.slice(ae.start,Qe));it&&(Qe=it.index)}for(var st=0,$t=!1,Zt=Qe-1;Zt>=0;--Zt){var Tr=ae.string.charAt(Zt),Pr=Z.indexOf(Tr);if(Pr>=0&&Pr<3){if(!st){++Zt;break}if(--st==0){Tr=="("&&($t=!0);break}}else if(Pr>=3&&Pr<6)++st;else if(B.test(Tr))$t=!0;else if(/["'\/`]/.test(Tr))for(;;--Zt){if(Zt==0)return;var tr=ae.string.charAt(Zt-1);if(tr==Tr&&ae.string.charAt(Zt-2)!="\\"){Zt--;break}}else if($t&&!st){++Zt;break}}$t&&!st&&(Ce.fatArrowAt=Zt)}}var te={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function se(ae,Ce,Qe,it,st,$t){this.indented=ae,this.column=Ce,this.type=Qe,this.prev=st,this.info=$t,it!=null&&(this.align=it)}function be(ae,Ce){if(!T)return!1;for(var Qe=ae.localVars;Qe;Qe=Qe.next)if(Qe.name==Ce)return!0;for(var it=ae.context;it;it=it.prev)for(var Qe=it.vars;Qe;Qe=Qe.next)if(Qe.name==Ce)return!0}function me(ae,Ce,Qe,it,st){var $t=ae.cc;for(he.state=ae,he.stream=st,he.marked=null,he.cc=$t,he.style=Ce,ae.lexical.hasOwnProperty("align")||(ae.lexical.align=!0);;){var Zt=$t.length?$t.pop():w?It:vt;if(Zt(Qe,it)){for(;$t.length&&$t[$t.length-1].lex;)$t.pop()();return he.marked?he.marked:Qe=="variable"&&be(ae,it)?"variable-2":Ce}}}var he={state:null,column:null,marked:null,cc:null};function fe(){for(var ae=arguments.length-1;ae>=0;ae--)he.cc.push(arguments[ae])}function oe(){return fe.apply(null,arguments),!0}function Re(ae,Ce){for(var Qe=Ce;Qe;Qe=Qe.next)if(Qe.name==ae)return!0;return!1}function Ue(ae){var Ce=he.state;if(he.marked="def",!!T){if(Ce.context){if(Ce.lexical.info=="var"&&Ce.context&&Ce.context.block){var Qe=Le(ae,Ce.context);if(Qe!=null){Ce.context=Qe;return}}else if(!Re(ae,Ce.localVars)){Ce.localVars=new Je(ae,Ce.localVars);return}}m.globalVars&&!Re(ae,Ce.globalVars)&&(Ce.globalVars=new Je(ae,Ce.globalVars))}}function Le(ae,Ce){if(Ce)if(Ce.block){var Qe=Le(ae,Ce.prev);return Qe?Qe==Ce.prev?Ce:new tt(Qe,Ce.vars,!0):null}else return Re(ae,Ce.vars)?Ce:new tt(Ce.prev,new Je(ae,Ce.vars),!1);else return null}function ke(ae){return ae=="public"||ae=="private"||ae=="protected"||ae=="abstract"||ae=="readonly"}function tt(ae,Ce,Qe){this.prev=ae,this.vars=Ce,this.block=Qe}function Je(ae,Ce){this.name=ae,this.next=Ce}var qe=new Je("this",new Je("arguments",null));function at(){he.state.context=new tt(he.state.context,he.state.localVars,!1),he.state.localVars=qe}function ut(){he.state.context=new tt(he.state.context,he.state.localVars,!0),he.state.localVars=null}function gt(){he.state.localVars=he.state.context.vars,he.state.context=he.state.context.prev}gt.lex=!0;function Ze(ae,Ce){var Qe=function(){var it=he.state,st=it.indented;if(it.lexical.type=="stat")st=it.lexical.indented;else for(var $t=it.lexical;$t&&$t.type==")"&&$t.align;$t=$t.prev)st=$t.indented;it.lexical=new se(st,he.stream.column(),ae,null,it.lexical,Ce)};return Qe.lex=!0,Qe}function lt(){var ae=he.state;ae.lexical.prev&&(ae.lexical.type==")"&&(ae.indented=ae.lexical.indented),ae.lexical=ae.lexical.prev)}lt.lex=!0;function pt(ae){function Ce(Qe){return Qe==ae?oe():ae==";"||Qe=="}"||Qe==")"||Qe=="]"?fe():oe(Ce)}return Ce}function vt(ae,Ce){return ae=="var"?oe(Ze("vardef",Ce),Ui,pt(";"),lt):ae=="keyword a"?oe(Ze("form"),Et,vt,lt):ae=="keyword b"?oe(Ze("form"),vt,lt):ae=="keyword d"?he.stream.match(/^\s*$/,!1)?oe():oe(Ze("stat"),jt,pt(";"),lt):ae=="debugger"?oe(pt(";")):ae=="{"?oe(Ze("}"),ut,N,lt,gt):ae==";"?oe():ae=="if"?(he.state.lexical.info=="else"&&he.state.cc[he.state.cc.length-1]==lt&&he.state.cc.pop()(),oe(Ze("form"),Et,vt,lt,ln)):ae=="function"?oe(Yn):ae=="for"?oe(Ze("form"),ut,Ca,vt,gt,lt):ae=="class"||D&&Ce=="interface"?(he.marked="keyword",oe(Ze("form",ae=="class"?ae:Ce),Oa,lt)):ae=="variable"?D&&Ce=="declare"?(he.marked="keyword",oe(vt)):D&&(Ce=="module"||Ce=="enum"||Ce=="type")&&he.stream.match(/^\s*\w/,!1)?(he.marked="keyword",Ce=="enum"?oe(lo):Ce=="type"?oe(ji,pt("operator"),Te,pt(";")):oe(Ze("form"),jr,pt("{"),Ze("}"),N,lt,lt)):D&&Ce=="namespace"?(he.marked="keyword",oe(Ze("form"),It,vt,lt)):D&&Ce=="abstract"?(he.marked="keyword",oe(vt)):oe(Ze("stat"),Ae):ae=="switch"?oe(Ze("form"),Et,pt("{"),Ze("}","switch"),ut,N,lt,lt,gt):ae=="case"?oe(It,pt(":")):ae=="default"?oe(pt(":")):ae=="catch"?oe(Ze("form"),at,dt,vt,lt,gt):ae=="export"?oe(Ze("stat"),xr,lt):ae=="import"?oe(Ze("stat"),ai,lt):ae=="async"?oe(vt):Ce=="@"?oe(It,vt):fe(Ze("stat"),It,pt(";"),lt)}function dt(ae){if(ae=="(")return oe(Vn,pt(")"))}function It(ae,Ce){return Ut(ae,Ce,!1)}function Ft(ae,Ce){return Ut(ae,Ce,!0)}function Et(ae){return ae!="("?fe():oe(Ze(")"),jt,pt(")"),lt)}function Ut(ae,Ce,Qe){if(he.state.fatArrowAt==he.stream.start){var it=Qe?$:ve;if(ae=="(")return oe(at,Ze(")"),I(Vn,")"),lt,pt("=>"),it,gt);if(ae=="variable")return fe(at,jr,pt("=>"),it,gt)}var st=Qe?wt:Gt;return te.hasOwnProperty(ae)?oe(st):ae=="function"?oe(Yn,st):ae=="class"||D&&Ce=="interface"?(he.marked="keyword",oe(Ze("form"),wi,lt)):ae=="keyword c"||ae=="async"?oe(Qe?Ft:It):ae=="("?oe(Ze(")"),jt,pt(")"),lt,st):ae=="operator"||ae=="spread"?oe(Qe?Ft:It):ae=="["?oe(Ze("]"),Jn,lt,st):ae=="{"?re(Pe,"}",null,st):ae=="quasi"?fe(Mt,st):ae=="new"?oe(Y(Qe)):oe()}function jt(ae){return ae.match(/[;\}\)\],]/)?fe():fe(It)}function Gt(ae,Ce){return ae==","?oe(jt):wt(ae,Ce,!1)}function wt(ae,Ce,Qe){var it=Qe==!1?Gt:wt,st=Qe==!1?It:Ft;if(ae=="=>")return oe(at,Qe?$:ve,gt);if(ae=="operator")return/\+\+|--/.test(Ce)||D&&Ce=="!"?oe(it):D&&Ce=="<"&&he.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?oe(Ze(">"),I(Te,">"),lt,it):Ce=="?"?oe(It,pt(":"),st):oe(st);if(ae=="quasi")return fe(Mt,it);if(ae!=";"){if(ae=="(")return re(Ft,")","call",it);if(ae==".")return oe(S,it);if(ae=="[")return oe(Ze("]"),jt,pt("]"),lt,it);if(D&&Ce=="as")return he.marked="keyword",oe(Te,it);if(ae=="regexp")return he.state.lastType=he.marked="operator",he.stream.backUp(he.stream.pos-he.stream.start-1),oe(st)}}function Mt(ae,Ce){return ae!="quasi"?fe():Ce.slice(Ce.length-2)!="${"?oe(Mt):oe(It,bt)}function bt(ae){if(ae=="}")return he.marked="string-2",he.state.tokenize=G,oe(Mt)}function ve(ae){return ce(he.stream,he.state),fe(ae=="{"?vt:It)}function $(ae){return ce(he.stream,he.state),fe(ae=="{"?vt:Ft)}function Y(ae){return function(Ce){return Ce=="."?oe(ae?de:ye):Ce=="variable"&&D?oe(yn,ae?wt:Gt):fe(ae?Ft:It)}}function ye(ae,Ce){if(Ce=="target")return he.marked="keyword",oe(Gt)}function de(ae,Ce){if(Ce=="target")return he.marked="keyword",oe(wt)}function Ae(ae){return ae==":"?oe(lt,vt):fe(Gt,pt(";"),lt)}function S(ae){if(ae=="variable")return he.marked="property",oe()}function Pe(ae,Ce){if(ae=="async")return he.marked="property",oe(Pe);if(ae=="variable"||he.style=="keyword"){if(he.marked="property",Ce=="get"||Ce=="set")return oe(H);var Qe;return D&&he.state.fatArrowAt==he.stream.start&&(Qe=he.stream.match(/^\s*:\s*/,!1))&&(he.state.fatArrowAt=he.stream.pos+Qe[0].length),oe(O)}else{if(ae=="number"||ae=="string")return he.marked=A?"property":he.style+" property",oe(O);if(ae=="jsonld-keyword")return oe(O);if(D&&ke(Ce))return he.marked="keyword",oe(Pe);if(ae=="[")return oe(It,_,pt("]"),O);if(ae=="spread")return oe(Ft,O);if(Ce=="*")return he.marked="keyword",oe(Pe);if(ae==":")return fe(O)}}function H(ae){return ae!="variable"?fe(O):(he.marked="property",oe(Yn))}function O(ae){if(ae==":")return oe(Ft);if(ae=="(")return fe(Yn)}function I(ae,Ce,Qe){function it(st,$t){if(Qe?Qe.indexOf(st)>-1:st==","){var Zt=he.state.lexical;return Zt.info=="call"&&(Zt.pos=(Zt.pos||0)+1),oe(function(Tr,Pr){return Tr==Ce||Pr==Ce?fe():fe(ae)},it)}return st==Ce||$t==Ce?oe():Qe&&Qe.indexOf(";")>-1?fe(ae):oe(pt(Ce))}return function(st,$t){return st==Ce||$t==Ce?oe():fe(ae,it)}}function re(ae,Ce,Qe){for(var it=3;it<arguments.length;it++)he.cc.push(arguments[it]);return oe(Ze(Ce,Qe),I(ae,Ce),lt)}function N(ae){return ae=="}"?oe():fe(vt,N)}function _(ae,Ce){if(D){if(ae==":")return oe(Te);if(Ce=="?")return oe(_)}}function ue(ae,Ce){if(D&&(ae==":"||Ce=="in"))return oe(Te)}function Oe(ae){if(D&&ae==":")return he.stream.match(/^\s*\w+\s+is\b/,!1)?oe(It,Ie,Te):oe(Te)}function Ie(ae,Ce){if(Ce=="is")return he.marked="keyword",oe()}function Te(ae,Ce){if(Ce=="keyof"||Ce=="typeof"||Ce=="infer"||Ce=="readonly")return he.marked="keyword",oe(Ce=="typeof"?Ft:Te);if(ae=="variable"||Ce=="void")return he.marked="type",oe(kt);if(Ce=="|"||Ce=="&")return oe(Te);if(ae=="string"||ae=="number"||ae=="atom")return oe(kt);if(ae=="[")return oe(Ze("]"),I(Te,"]",","),lt,kt);if(ae=="{")return oe(Ze("}"),He,lt,kt);if(ae=="(")return oe(I(Yt,")"),We,kt);if(ae=="<")return oe(I(Te,">"),Te);if(ae=="quasi")return fe(ht,kt)}function We(ae){if(ae=="=>")return oe(Te)}function He(ae){return ae.match(/[\}\)\]]/)?oe():ae==","||ae==";"?oe(He):fe(nt,He)}function nt(ae,Ce){if(ae=="variable"||he.style=="keyword")return he.marked="property",oe(nt);if(Ce=="?"||ae=="number"||ae=="string")return oe(nt);if(ae==":")return oe(Te);if(ae=="[")return oe(pt("variable"),ue,pt("]"),nt);if(ae=="(")return fe(bi,nt);if(!ae.match(/[;\}\)\],]/))return oe()}function ht(ae,Ce){return ae!="quasi"?fe():Ce.slice(Ce.length-2)!="${"?oe(ht):oe(Te,Ct)}function Ct(ae){if(ae=="}")return he.marked="string-2",he.state.tokenize=G,oe(ht)}function Yt(ae,Ce){return ae=="variable"&&he.stream.match(/^\s*[?:]/,!1)||Ce=="?"?oe(Yt):ae==":"?oe(Te):ae=="spread"?oe(Yt):fe(Te)}function kt(ae,Ce){if(Ce=="<")return oe(Ze(">"),I(Te,">"),lt,kt);if(Ce=="|"||ae=="."||Ce=="&")return oe(Te);if(ae=="[")return oe(Te,pt("]"),kt);if(Ce=="extends"||Ce=="implements")return he.marked="keyword",oe(Te);if(Ce=="?")return oe(Te,pt(":"),Te)}function yn(ae,Ce){if(Ce=="<")return oe(Ze(">"),I(Te,">"),lt,kt)}function Xr(){return fe(Te,Tn)}function Tn(ae,Ce){if(Ce=="=")return oe(Te)}function Ui(ae,Ce){return Ce=="enum"?(he.marked="keyword",oe(lo)):fe(jr,_,Pn,Kn)}function jr(ae,Ce){if(D&&ke(Ce))return he.marked="keyword",oe(jr);if(ae=="variable")return Ue(Ce),oe();if(ae=="spread")return oe(jr);if(ae=="[")return re($n,"]");if(ae=="{")return re(jn,"}")}function jn(ae,Ce){return ae=="variable"&&!he.stream.match(/^\s*:/,!1)?(Ue(Ce),oe(Pn)):(ae=="variable"&&(he.marked="property"),ae=="spread"?oe(jr):ae=="}"?fe():ae=="["?oe(It,pt("]"),pt(":"),jn):oe(pt(":"),jr,Pn))}function $n(){return fe(jr,Pn)}function Pn(ae,Ce){if(Ce=="=")return oe(Ft)}function Kn(ae){if(ae==",")return oe(Ui)}function ln(ae,Ce){if(ae=="keyword b"&&Ce=="else")return oe(Ze("form","else"),vt,lt)}function Ca(ae,Ce){if(Ce=="await")return oe(Ca);if(ae=="(")return oe(Ze(")"),Ho,lt)}function Ho(ae){return ae=="var"?oe(Ui,mn):ae=="variable"?oe(mn):fe(mn)}function mn(ae,Ce){return ae==")"?oe():ae==";"?oe(mn):Ce=="in"||Ce=="of"?(he.marked="keyword",oe(It,mn)):fe(It,mn)}function Yn(ae,Ce){if(Ce=="*")return he.marked="keyword",oe(Yn);if(ae=="variable")return Ue(Ce),oe(Yn);if(ae=="(")return oe(at,Ze(")"),I(Vn,")"),lt,Oe,vt,gt);if(D&&Ce=="<")return oe(Ze(">"),I(Xr,">"),lt,Yn)}function bi(ae,Ce){if(Ce=="*")return he.marked="keyword",oe(bi);if(ae=="variable")return Ue(Ce),oe(bi);if(ae=="(")return oe(at,Ze(")"),I(Vn,")"),lt,Oe,gt);if(D&&Ce=="<")return oe(Ze(">"),I(Xr,">"),lt,bi)}function ji(ae,Ce){if(ae=="keyword"||ae=="variable")return he.marked="type",oe(ji);if(Ce=="<")return oe(Ze(">"),I(Xr,">"),lt)}function Vn(ae,Ce){return Ce=="@"&&oe(It,Vn),ae=="spread"?oe(Vn):D&&ke(Ce)?(he.marked="keyword",oe(Vn)):D&&ae=="this"?oe(_,Pn):fe(jr,_,Pn)}function wi(ae,Ce){return ae=="variable"?Oa(ae,Ce):In(ae,Ce)}function Oa(ae,Ce){if(ae=="variable")return Ue(Ce),oe(In)}function In(ae,Ce){if(Ce=="<")return oe(Ze(">"),I(Xr,">"),lt,In);if(Ce=="extends"||Ce=="implements"||D&&ae==",")return Ce=="implements"&&(he.marked="keyword"),oe(D?Te:It,In);if(ae=="{")return oe(Ze("}"),xn,lt)}function xn(ae,Ce){if(ae=="async"||ae=="variable"&&(Ce=="static"||Ce=="get"||Ce=="set"||D&&ke(Ce))&&he.stream.match(/^\s+[\w$\xa1-\uffff]/,!1))return he.marked="keyword",oe(xn);if(ae=="variable"||he.style=="keyword")return he.marked="property",oe(Si,xn);if(ae=="number"||ae=="string")return oe(Si,xn);if(ae=="[")return oe(It,_,pt("]"),Si,xn);if(Ce=="*")return he.marked="keyword",oe(xn);if(D&&ae=="(")return fe(bi,xn);if(ae==";"||ae==",")return oe(xn);if(ae=="}")return oe();if(Ce=="@")return oe(It,xn)}function Si(ae,Ce){if(Ce=="!"||Ce=="?")return oe(Si);if(ae==":")return oe(Te,Pn);if(Ce=="=")return oe(Ft);var Qe=he.state.lexical.prev,it=Qe&&Qe.info=="interface";return fe(it?bi:Yn)}function xr(ae,Ce){return Ce=="*"?(he.marked="keyword",oe(Hn,pt(";"))):Ce=="default"?(he.marked="keyword",oe(It,pt(";"))):ae=="{"?oe(I(St,"}"),Hn,pt(";")):fe(vt)}function St(ae,Ce){if(Ce=="as")return he.marked="keyword",oe(pt("variable"));if(ae=="variable")return fe(Ft,St)}function ai(ae){return ae=="string"?oe():ae=="("?fe(It):ae=="."?fe(Gt):fe(Ai,bn,Hn)}function Ai(ae,Ce){return ae=="{"?re(Ai,"}"):(ae=="variable"&&Ue(Ce),Ce=="*"&&(he.marked="keyword"),oe(er))}function bn(ae){if(ae==",")return oe(Ai,bn)}function er(ae,Ce){if(Ce=="as")return he.marked="keyword",oe(Ai)}function Hn(ae,Ce){if(Ce=="from")return he.marked="keyword",oe(It)}function Jn(ae){return ae=="]"?oe():fe(I(Ft,"]"))}function lo(){return fe(Ze("form"),jr,pt("{"),Ze("}"),I(rt,"}"),lt,lt)}function rt(){return fe(jr,Pn)}function Lt(ae,Ce){return ae.lastType=="operator"||ae.lastType==","||ee.test(Ce.charAt(0))||/[,.]/.test(Ce.charAt(0))}function si(ae,Ce,Qe){return Ce.tokenize==V&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(Ce.lastType)||Ce.lastType=="quasi"&&/\{\s*$/.test(ae.string.slice(0,ae.pos-(Qe||0)))}return{startState:function(ae){var Ce={tokenize:V,lastType:"sof",cc:[],lexical:new se((ae||0)-d,0,"block",!1),localVars:m.localVars,context:m.localVars&&new tt(null,null,!1),indented:ae||0};return m.globalVars&&typeof m.globalVars=="object"&&(Ce.globalVars=m.globalVars),Ce},token:function(ae,Ce){if(ae.sol()&&(Ce.lexical.hasOwnProperty("align")||(Ce.lexical.align=!1),Ce.indented=ae.indentation(),ce(ae,Ce)),Ce.tokenize!=z&&ae.eatSpace())return null;var Qe=Ce.tokenize(ae,Ce);return Q=="comment"?Qe:(Ce.lastType=Q=="operator"&&(L=="++"||L=="--")?"incdec":Q,me(Ce,Qe,Q,L,ae))},indent:function(ae,Ce){if(ae.tokenize==z||ae.tokenize==G)return c.Pass;if(ae.tokenize!=V)return 0;var Qe=Ce&&Ce.charAt(0),it=ae.lexical,st;if(!/^\s*else\b/.test(Ce))for(var $t=ae.cc.length-1;$t>=0;--$t){var Zt=ae.cc[$t];if(Zt==lt)it=it.prev;else if(Zt!=ln&&Zt!=gt)break}for(;(it.type=="stat"||it.type=="form")&&(Qe=="}"||(st=ae.cc[ae.cc.length-1])&&(st==Gt||st==wt)&&!/^[,\.=+\-*:?[\(]/.test(Ce));)it=it.prev;x&&it.type==")"&&it.prev.type=="stat"&&(it=it.prev);var Tr=it.type,Pr=Qe==Tr;return Tr=="vardef"?it.indented+(ae.lastType=="operator"||ae.lastType==","?it.info.length+1:0):Tr=="form"&&Qe=="{"?it.indented:Tr=="form"?it.indented+d:Tr=="stat"?it.indented+(Lt(ae,Ce)?x||d:0):it.info=="switch"&&!Pr&&m.doubleIndentSwitch!=!1?it.indented+(/^(?:case|default)\b/.test(Ce)?d:2*d):it.align?it.column+(Pr?0:1):it.indented+(Pr?0:d)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:w?null:"/*",blockCommentEnd:w?null:"*/",blockCommentContinue:w?null:" * ",lineComment:w?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:w?"json":"javascript",jsonldMode:A,jsonMode:w,expressionAllowed:si,skipExpression:function(ae){me(ae,"atom","atom","true",new c.StringStream("",2,null))}}}),c.registerHelper("wordChars","javascript",/[\w$]/),c.defineMIME("text/javascript","javascript"),c.defineMIME("text/ecmascript","javascript"),c.defineMIME("application/javascript","javascript"),c.defineMIME("application/x-javascript","javascript"),c.defineMIME("application/ecmascript","javascript"),c.defineMIME("application/json",{name:"javascript",json:!0}),c.defineMIME("application/x-json",{name:"javascript",json:!0}),c.defineMIME("application/manifest+json",{name:"javascript",json:!0}),c.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),c.defineMIME("text/typescript",{name:"javascript",typescript:!0}),c.defineMIME("application/typescript",{name:"javascript",typescript:!0})})},76489:(h,F)=>{"use strict";/*!
42
+ * cookie
43
+ * Copyright(c) 2012-2014 Roman Shtylman
44
+ * Copyright(c) 2015 Douglas Christopher Wilson
45
+ * MIT Licensed
46
+ */F.parse=d,F.serialize=x;var o=decodeURIComponent,c=encodeURIComponent,v=/; */,m=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function d(w,T){if(typeof w!="string")throw new TypeError("argument str must be a string");for(var D={},B=T||{},U=w.split(v),ee=B.decode||o,K=0;K<U.length;K++){var R=U[K],Q=R.indexOf("=");if(!(Q<0)){var L=R.substr(0,Q).trim(),P=R.substr(++Q,R.length).trim();P[0]=='"'&&(P=P.slice(1,-1)),D[L]==null&&(D[L]=A(P,ee))}}return D}function x(w,T,D){var B=D||{},U=B.encode||c;if(typeof U!="function")throw new TypeError("option encode is invalid");if(!m.test(w))throw new TypeError("argument name is invalid");var ee=U(T);if(ee&&!m.test(ee))throw new TypeError("argument val is invalid");var K=w+"="+ee;if(B.maxAge!=null){var R=B.maxAge-0;if(isNaN(R)||!isFinite(R))throw new TypeError("option maxAge is invalid");K+="; Max-Age="+Math.floor(R)}if(B.domain){if(!m.test(B.domain))throw new TypeError("option domain is invalid");K+="; Domain="+B.domain}if(B.path){if(!m.test(B.path))throw new TypeError("option path is invalid");K+="; Path="+B.path}if(B.expires){if(typeof B.expires.toUTCString!="function")throw new TypeError("option expires is invalid");K+="; Expires="+B.expires.toUTCString()}if(B.httpOnly&&(K+="; HttpOnly"),B.secure&&(K+="; Secure"),B.sameSite){var Q=typeof B.sameSite=="string"?B.sameSite.toLowerCase():B.sameSite;switch(Q){case!0:K+="; SameSite=Strict";break;case"lax":K+="; SameSite=Lax";break;case"strict":K+="; SameSite=Strict";break;case"none":K+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return K}function A(w,T){try{return T(w)}catch(D){return w}}},54493:(h,F,o)=>{o(77971),o(53242);var c=o(54058);h.exports=c.Array.from},24034:(h,F,o)=>{o(92737);var c=o(54058);h.exports=c.Array.isArray},15367:(h,F,o)=>{o(85906);var c=o(35703);h.exports=c("Array").concat},12710:(h,F,o)=>{o(66274);var c=o(35703);h.exports=c("Array").entries},62383:(h,F,o)=>{o(21501);var c=o(35703);h.exports=c("Array").filter},17671:(h,F,o)=>{o(80833);var c=o(35703);h.exports=c("Array").find},99324:(h,F,o)=>{o(2437);var c=o(35703);h.exports=c("Array").forEach},80991:(h,F,o)=>{o(97690);var c=o(35703);h.exports=c("Array").includes},8700:(h,F,o)=>{o(99076);var c=o(35703);h.exports=c("Array").indexOf},23866:(h,F,o)=>{o(68787);var c=o(35703);h.exports=c("Array").map},24900:(h,F,o)=>{o(60186);var c=o(35703);h.exports=c("Array").slice},78209:(h,F,o)=>{o(98611);var c=o(35703);h.exports=c("Array").splice},56043:(h,F,o)=>{var c=o(15367),v=Array.prototype;h.exports=function(m){var d=m.concat;return m===v||m instanceof Array&&d===v.concat?c:d}},2480:(h,F,o)=>{var c=o(62383),v=Array.prototype;h.exports=function(m){var d=m.filter;return m===v||m instanceof Array&&d===v.filter?c:d}},32236:(h,F,o)=>{var c=o(17671),v=Array.prototype;h.exports=function(m){var d=m.find;return m===v||m instanceof Array&&d===v.find?c:d}},58557:(h,F,o)=>{var c=o(80991),v=o(21631),m=Array.prototype,d=String.prototype;h.exports=function(x){var A=x.includes;return x===m||x instanceof Array&&A===m.includes?c:typeof x=="string"||x===d||x instanceof String&&A===d.includes?v:A}},34570:(h,F,o)=>{var c=o(8700),v=Array.prototype;h.exports=function(m){var d=m.indexOf;return m===v||m instanceof Array&&d===v.indexOf?c:d}},88287:(h,F,o)=>{var c=o(23866),v=Array.prototype;h.exports=function(m){var d=m.map;return m===v||m instanceof Array&&d===v.map?c:d}},69601:(h,F,o)=>{var c=o(24900),v=Array.prototype;h.exports=function(m){var d=m.slice;return m===v||m instanceof Array&&d===v.slice?c:d}},18339:(h,F,o)=>{var c=o(78209),v=Array.prototype;h.exports=function(m){var d=m.splice;return m===v||m instanceof Array&&d===v.splice?c:d}},84426:(h,F,o)=>{o(32619);var c=o(54058);c.JSON||(c.JSON={stringify:JSON.stringify}),h.exports=function(m,d,x){return c.JSON.stringify.apply(null,arguments)}},45999:(h,F,o)=>{o(49221);var c=o(54058);h.exports=c.Object.assign},35254:(h,F,o)=>{o(53882);var c=o(54058),v=c.Object;h.exports=function(d,x){return v.create(d,x)}},7702:(h,F,o)=>{o(74979);var c=o(54058),v=c.Object,m=h.exports=function(x,A){return v.defineProperties(x,A)};v.defineProperties.sham&&(m.sham=!0)},48171:(h,F,o)=>{o(86450);var c=o(54058),v=c.Object,m=h.exports=function(x,A,w){return v.defineProperty(x,A,w)};v.defineProperty.sham&&(m.sham=!0)},73081:(h,F,o)=>{o(21078);var c=o(54058);h.exports=c.Object.entries},286:(h,F,o)=>{o(46924);var c=o(54058),v=c.Object,m=h.exports=function(x,A){return v.getOwnPropertyDescriptor(x,A)};v.getOwnPropertyDescriptor.sham&&(m.sham=!0)},92766:(h,F,o)=>{o(88482);var c=o(54058);h.exports=c.Object.getOwnPropertyDescriptors},30498:(h,F,o)=>{o(35824);var c=o(54058);h.exports=c.Object.getOwnPropertySymbols},13966:(h,F,o)=>{o(17405);var c=o(54058);h.exports=c.Object.getPrototypeOf},48494:(h,F,o)=>{o(21724);var c=o(54058);h.exports=c.Object.keys},3065:(h,F,o)=>{o(90108);var c=o(54058);h.exports=c.Object.setPrototypeOf},52956:(h,F,o)=>{o(47627),o(55967),o(98881),o(4560),o(91302),o(44349),o(77971),o(7634);var c=o(54058);h.exports=c.Promise},14983:(h,F,o)=>{o(7453);var c=o(54058);h.exports=c.Reflect.construct},37095:(h,F,o)=>{o(42355);var c=o(54058);h.exports=c.Reflect.get},21631:(h,F,o)=>{o(11035);var c=o(35703);h.exports=c("String").includes},57473:(h,F,o)=>{o(85906),o(55967),o(35824),o(8555),o(52615),o(21732),o(35903),o(1825),o(28394),o(45915),o(61766),o(62737),o(89911),o(74315),o(63131),o(64714),o(70659),o(69120),o(79413),o(1502);var c=o(54058);h.exports=c.Symbol},24227:(h,F,o)=>{o(1825),o(77971),o(7634);var c=o(11477);h.exports=c.f("iterator")},32304:(h,F,o)=>{o(55967),o(54334),o(7634);var c=o(54058);h.exports=c.WeakMap},27385:(h,F,o)=>{var c=o(54493);h.exports=c},81522:(h,F,o)=>{var c=o(24034);h.exports=c},32209:(h,F,o)=>{o(7634),o(77971);var c=o(22902);h.exports=c},44442:(h,F,o)=>{var c=o(2480);h.exports=c},57152:(h,F,o)=>{var c=o(46279);h.exports=c},69447:(h,F,o)=>{var c=o(34570);h.exports=c},81493:(h,F,o)=>{var c=o(69601);h.exports=c},76094:(h,F,o)=>{var c=o(35254);h.exports=c},70573:(h,F,o)=>{var c=o(7702);h.exports=c},73685:(h,F,o)=>{var c=o(48171);h.exports=c},27533:(h,F,o)=>{var c=o(286);h.exports=c},39057:(h,F,o)=>{var c=o(92766);h.exports=c},84710:(h,F,o)=>{var c=o(30498);h.exports=c},74303:(h,F,o)=>{var c=o(13966);h.exports=c},93799:(h,F,o)=>{var c=o(48494);h.exports=c},55122:(h,F,o)=>{var c=o(3065);h.exports=c},29531:(h,F,o)=>{var c=o(52956);o(89731),o(55708),o(30014),o(88731),h.exports=c},10856:(h,F,o)=>{var c=o(14983);h.exports=c},31524:(h,F,o)=>{var c=o(37095);h.exports=c},86600:(h,F,o)=>{var c=o(57473);o(28783),o(43975),o(65799),o(45414),o(46774),o(80620),o(36172),h.exports=c},9759:(h,F,o)=>{var c=o(24227);h.exports=c},33916:h=>{h.exports=function(F){if(typeof F!="function")throw TypeError(String(F)+" is not a function");return F}},42488:(h,F,o)=>{var c=o(10941);h.exports=function(v){if(!c(v)&&v!==null)throw TypeError("Can't set "+String(v)+" as a prototype");return v}},18479:h=>{h.exports=function(){}},5743:h=>{h.exports=function(F,o,c){if(!(F instanceof o))throw TypeError("Incorrect "+(c?c+" ":"")+"invocation");return F}},96059:(h,F,o)=>{var c=o(10941);h.exports=function(v){if(!c(v))throw TypeError(String(v)+" is not an object");return v}},56837:(h,F,o)=>{"use strict";var c=o(3610).forEach,v=o(34194),m=v("forEach");h.exports=m?[].forEach:function(x){return c(this,x,arguments.length>1?arguments[1]:void 0)}},11354:(h,F,o)=>{"use strict";var c=o(86843),v=o(89678),m=o(75196),d=o(6782),x=o(43057),A=o(55449),w=o(22902);h.exports=function(D){var B=v(D),U=typeof this=="function"?this:Array,ee=arguments.length,K=ee>1?arguments[1]:void 0,R=K!==void 0,Q=w(B),L=0,P,V,X,z,G,Z;if(R&&(K=c(K,ee>2?arguments[2]:void 0,2)),Q!=null&&!(U==Array&&d(Q)))for(z=Q.call(B),G=z.next,V=new U;!(X=G.call(z)).done;L++)Z=R?m(z,K,[X.value,L],!0):X.value,A(V,L,Z);else for(P=x(B.length),V=new U(P);P>L;L++)Z=R?K(B[L],L):B[L],A(V,L,Z);return V.length=L,V}},31692:(h,F,o)=>{var c=o(74529),v=o(43057),m=o(59413),d=function(x){return function(A,w,T){var D=c(A),B=v(D.length),U=m(T,B),ee;if(x&&w!=w){for(;B>U;)if(ee=D[U++],ee!=ee)return!0}else for(;B>U;U++)if((x||U in D)&&D[U]===w)return x||U||0;return!x&&-1}};h.exports={includes:d(!0),indexOf:d(!1)}},3610:(h,F,o)=>{var c=o(86843),v=o(37026),m=o(89678),d=o(43057),x=o(64692),A=[].push,w=function(T){var D=T==1,B=T==2,U=T==3,ee=T==4,K=T==6,R=T==7,Q=T==5||K;return function(L,P,V,X){for(var z=m(L),G=v(z),Z=c(P,V,3),ce=d(G.length),te=0,se=X||x,be=D?se(L,ce):B||R?se(L,0):void 0,me,he;ce>te;te++)if((Q||te in G)&&(me=G[te],he=Z(me,te,z),T))if(D)be[te]=he;else if(he)switch(T){case 3:return!0;case 5:return me;case 6:return te;case 2:A.call(be,me)}else switch(T){case 4:return!1;case 7:A.call(be,me)}return K?-1:U||ee?ee:be}};h.exports={forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findIndex:w(6),filterOut:w(7)}},50568:(h,F,o)=>{var c=o(95981),v=o(99813),m=o(53385),d=v("species");h.exports=function(x){return m>=51||!c(function(){var A=[],w=A.constructor={};return w[d]=function(){return{foo:1}},A[x](Boolean).foo!==1})}},34194:(h,F,o)=>{"use strict";var c=o(95981);h.exports=function(v,m){var d=[][v];return!!d&&c(function(){d.call(null,m||function(){throw 1},1)})}},64692:(h,F,o)=>{var c=o(10941),v=o(1052),m=o(99813),d=m("species");h.exports=function(x,A){var w;return v(x)&&(w=x.constructor,typeof w=="function"&&(w===Array||v(w.prototype))?w=void 0:c(w)&&(w=w[d],w===null&&(w=void 0))),new(w===void 0?Array:w)(A===0?0:A)}},75196:(h,F,o)=>{var c=o(96059),v=o(7609);h.exports=function(m,d,x,A){try{return A?d(c(x)[0],x[1]):d(x)}catch(w){throw v(m),w}}},21385:(h,F,o)=>{var c=o(99813),v=c("iterator"),m=!1;try{var d=0,x={next:function(){return{done:!!d++}},return:function(){m=!0}};x[v]=function(){return this},Array.from(x,function(){throw 2})}catch(A){}h.exports=function(A,w){if(!w&&!m)return!1;var T=!1;try{var D={};D[v]=function(){return{next:function(){return{done:T=!0}}}},A(D)}catch(B){}return T}},82532:h=>{var F={}.toString;h.exports=function(o){return F.call(o).slice(8,-1)}},9697:(h,F,o)=>{var c=o(22885),v=o(82532),m=o(99813),d=m("toStringTag"),x=v(function(){return arguments}())=="Arguments",A=function(w,T){try{return w[T]}catch(D){}};h.exports=c?v:function(w){var T,D,B;return w===void 0?"Undefined":w===null?"Null":typeof(D=A(T=Object(w),d))=="string"?D:x?v(T):(B=v(T))=="Object"&&typeof T.callee=="function"?"Arguments":B}},8850:(h,F,o)=>{"use strict";var c=o(87524),v=o(21647).getWeakData,m=o(96059),d=o(10941),x=o(5743),A=o(93091),w=o(3610),T=o(47457),D=o(45402),B=D.set,U=D.getterFor,ee=w.find,K=w.findIndex,R=0,Q=function(V){return V.frozen||(V.frozen=new L)},L=function(){this.entries=[]},P=function(V,X){return ee(V.entries,function(z){return z[0]===X})};L.prototype={get:function(V){var X=P(this,V);if(X)return X[1]},has:function(V){return!!P(this,V)},set:function(V,X){var z=P(this,V);z?z[1]=X:this.entries.push([V,X])},delete:function(V){var X=K(this.entries,function(z){return z[0]===V});return~X&&this.entries.splice(X,1),!!~X}},h.exports={getConstructor:function(V,X,z,G){var Z=V(function(se,be){x(se,Z,X),B(se,{type:X,id:R++,frozen:void 0}),be!=null&&A(be,se[G],{that:se,AS_ENTRIES:z})}),ce=U(X),te=function(se,be,me){var he=ce(se),fe=v(m(be),!0);return fe===!0?Q(he).set(be,me):fe[he.id]=me,se};return c(Z.prototype,{delete:function(se){var be=ce(this);if(!d(se))return!1;var me=v(se);return me===!0?Q(be).delete(se):me&&T(me,be.id)&&delete me[be.id]},has:function(be){var me=ce(this);if(!d(be))return!1;var he=v(be);return he===!0?Q(me).has(be):he&&T(he,me.id)}}),c(Z.prototype,z?{get:function(be){var me=ce(this);if(d(be)){var he=v(be);return he===!0?Q(me).get(be):he?he[me.id]:void 0}},set:function(be,me){return te(this,be,me)}}:{add:function(be){return te(this,be,!0)}}),Z}}},24683:(h,F,o)=>{"use strict";var c=o(76887),v=o(21899),m=o(21647),d=o(95981),x=o(32029),A=o(93091),w=o(5743),T=o(10941),D=o(90904),B=o(65988).f,U=o(3610).forEach,ee=o(55746),K=o(45402),R=K.set,Q=K.getterFor;h.exports=function(L,P,V){var X=L.indexOf("Map")!==-1,z=L.indexOf("Weak")!==-1,G=X?"set":"add",Z=v[L],ce=Z&&Z.prototype,te={},se;if(!ee||typeof Z!="function"||!(z||ce.forEach&&!d(function(){new Z().entries().next()})))se=V.getConstructor(P,L,X,G),m.REQUIRED=!0;else{se=P(function(me,he){R(w(me,se,L),{type:L,collection:new Z}),he!=null&&A(he,me[G],{that:me,AS_ENTRIES:X})});var be=Q(L);U(["add","clear","delete","forEach","get","has","set","keys","values","entries"],function(me){var he=me=="add"||me=="set";me in ce&&!(z&&me=="clear")&&x(se.prototype,me,function(fe,oe){var Re=be(this).collection;if(!he&&z&&!T(fe))return me=="get"?void 0:!1;var Ue=Re[me](fe===0?0:fe,oe);return he?this:Ue})}),z||B(se.prototype,"size",{configurable:!0,get:function(){return be(this).collection.size}})}return D(se,L,!1,!0),te[L]=se,c({global:!0,forced:!0},te),z||V.setStrong(se,L,X),se}},67772:(h,F,o)=>{var c=o(99813),v=c("match");h.exports=function(m){var d=/./;try{"/./"[m](d)}catch(x){try{return d[v]=!1,"/./"[m](d)}catch(A){}}return!1}},64160:(h,F,o)=>{var c=o(95981);h.exports=!c(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})},31046:(h,F,o)=>{"use strict";var c=o(35143).IteratorPrototype,v=o(29290),m=o(31887),d=o(90904),x=o(12077),A=function(){return this};h.exports=function(w,T,D){var B=T+" Iterator";return w.prototype=v(c,{next:m(1,D)}),d(w,B,!1,!0),x[B]=A,w}},32029:(h,F,o)=>{var c=o(55746),v=o(65988),m=o(31887);h.exports=c?function(d,x,A){return v.f(d,x,m(1,A))}:function(d,x,A){return d[x]=A,d}},31887:h=>{h.exports=function(F,o){return{enumerable:!(F&1),configurable:!(F&2),writable:!(F&4),value:o}}},55449:(h,F,o)=>{"use strict";var c=o(46935),v=o(65988),m=o(31887);h.exports=function(d,x,A){var w=c(x);w in d?v.f(d,w,m(0,A)):d[w]=A}},47771:(h,F,o)=>{"use strict";var c=o(76887),v=o(31046),m=o(249),d=o(88929),x=o(90904),A=o(32029),w=o(99754),T=o(99813),D=o(82529),B=o(12077),U=o(35143),ee=U.IteratorPrototype,K=U.BUGGY_SAFARI_ITERATORS,R=T("iterator"),Q="keys",L="values",P="entries",V=function(){return this};h.exports=function(X,z,G,Z,ce,te,se){v(G,z,Z);var be=function(Je){if(Je===ce&&Re)return Re;if(!K&&Je in fe)return fe[Je];switch(Je){case Q:return function(){return new G(this,Je)};case L:return function(){return new G(this,Je)};case P:return function(){return new G(this,Je)}}return function(){return new G(this)}},me=z+" Iterator",he=!1,fe=X.prototype,oe=fe[R]||fe["@@iterator"]||ce&&fe[ce],Re=!K&&oe||be(ce),Ue=z=="Array"&&fe.entries||oe,Le,ke,tt;if(Ue&&(Le=m(Ue.call(new X)),ee!==Object.prototype&&Le.next&&(!D&&m(Le)!==ee&&(d?d(Le,ee):typeof Le[R]!="function"&&A(Le,R,V)),x(Le,me,!0,!0),D&&(B[me]=V))),ce==L&&oe&&oe.name!==L&&(he=!0,Re=function(){return oe.call(this)}),(!D||se)&&fe[R]!==Re&&A(fe,R,Re),B[z]=Re,ce)if(ke={values:be(L),keys:te?Re:be(Q),entries:be(P)},se)for(tt in ke)(K||he||!(tt in fe))&&w(fe,tt,ke[tt]);else c({target:z,proto:!0,forced:K||he},ke);return ke}},66349:(h,F,o)=>{var c=o(54058),v=o(47457),m=o(11477),d=o(65988).f;h.exports=function(x){var A=c.Symbol||(c.Symbol={});v(A,x)||d(A,x,{value:m.f(x)})}},55746:(h,F,o)=>{var c=o(95981);h.exports=!c(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},61333:(h,F,o)=>{var c=o(21899),v=o(10941),m=c.document,d=v(m)&&v(m.createElement);h.exports=function(x){return d?m.createElement(x):{}}},63281:h=>{h.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},23321:h=>{h.exports=typeof window=="object"},22749:(h,F,o)=>{var c=o(2861);h.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(c)},6049:(h,F,o)=>{var c=o(82532),v=o(21899);h.exports=c(v.process)=="process"},58045:(h,F,o)=>{var c=o(2861);h.exports=/web0s(?!.*chrome)/i.test(c)},2861:(h,F,o)=>{var c=o(626);h.exports=c("navigator","userAgent")||""},53385:(h,F,o)=>{var c=o(21899),v=o(2861),m=c.process,d=m&&m.versions,x=d&&d.v8,A,w;x?(A=x.split("."),w=A[0]<4?1:A[0]+A[1]):v&&(A=v.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=v.match(/Chrome\/(\d+)/),A&&(w=A[1]))),h.exports=w&&+w},35703:(h,F,o)=>{var c=o(54058);h.exports=function(v){return c[v+"Prototype"]}},56759:h=>{h.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},76887:(h,F,o)=>{"use strict";var c=o(21899),v=o(49677).f,m=o(37252),d=o(54058),x=o(86843),A=o(32029),w=o(47457),T=function(D){var B=function(U,ee,K){if(this instanceof D){switch(arguments.length){case 0:return new D;case 1:return new D(U);case 2:return new D(U,ee)}return new D(U,ee,K)}return D.apply(this,arguments)};return B.prototype=D.prototype,B};h.exports=function(D,B){var U=D.target,ee=D.global,K=D.stat,R=D.proto,Q=ee?c:K?c[U]:(c[U]||{}).prototype,L=ee?d:d[U]||(d[U]={}),P=L.prototype,V,X,z,G,Z,ce,te,se,be;for(G in B)V=m(ee?G:U+(K?".":"#")+G,D.forced),X=!V&&Q&&w(Q,G),ce=L[G],X&&(D.noTargetGet?(be=v(Q,G),te=be&&be.value):te=Q[G]),Z=X&&te?te:B[G],!(X&&typeof ce==typeof Z)&&(D.bind&&X?se=x(Z,c):D.wrap&&X?se=T(Z):R&&typeof Z=="function"?se=x(Function.call,Z):se=Z,(D.sham||Z&&Z.sham||ce&&ce.sham)&&A(se,"sham",!0),L[G]=se,R&&(z=U+"Prototype",w(d,z)||A(d,z,{}),d[z][G]=Z,D.real&&P&&!P[G]&&A(P,G,Z)))}},95981:h=>{h.exports=function(F){try{return!!F()}catch(o){return!0}}},45602:(h,F,o)=>{var c=o(95981);h.exports=!c(function(){return Object.isExtensible(Object.preventExtensions({}))})},86843:(h,F,o)=>{var c=o(33916);h.exports=function(v,m,d){if(c(v),m===void 0)return v;switch(d){case 0:return function(){return v.call(m)};case 1:return function(x){return v.call(m,x)};case 2:return function(x,A){return v.call(m,x,A)};case 3:return function(x,A,w){return v.call(m,x,A,w)}}return function(){return v.apply(m,arguments)}}},98308:(h,F,o)=>{"use strict";var c=o(33916),v=o(10941),m=[].slice,d={},x=function(A,w,T){if(!(w in d)){for(var D=[],B=0;B<w;B++)D[B]="a["+B+"]";d[w]=Function("C,a","return new C("+D.join(",")+")")}return d[w](A,T)};h.exports=Function.bind||function(w){var T=c(this),D=m.call(arguments,1),B=function(){var ee=D.concat(m.call(arguments));return this instanceof B?x(T,ee.length,ee):T.apply(w,ee)};return v(T.prototype)&&(B.prototype=T.prototype),B}},626:(h,F,o)=>{var c=o(54058),v=o(21899),m=function(d){return typeof d=="function"?d:void 0};h.exports=function(d,x){return arguments.length<2?m(c[d])||m(v[d]):c[d]&&c[d][x]||v[d]&&v[d][x]}},22902:(h,F,o)=>{var c=o(9697),v=o(12077),m=o(99813),d=m("iterator");h.exports=function(x){if(x!=null)return x[d]||x["@@iterator"]||v[c(x)]}},21899:(h,F,o)=>{var c=function(v){return v&&v.Math==Math&&v};h.exports=c(typeof globalThis=="object"&&globalThis)||c(typeof window=="object"&&window)||c(typeof self=="object"&&self)||c(typeof o.g=="object"&&o.g)||function(){return this}()||Function("return this")()},47457:(h,F,o)=>{var c=o(89678),v={}.hasOwnProperty;h.exports=Object.hasOwn||function(d,x){return v.call(c(d),x)}},27748:h=>{h.exports={}},34845:(h,F,o)=>{var c=o(21899);h.exports=function(v,m){var d=c.console;d&&d.error&&(arguments.length===1?d.error(v):d.error(v,m))}},15463:(h,F,o)=>{var c=o(626);h.exports=c("document","documentElement")},2840:(h,F,o)=>{var c=o(55746),v=o(95981),m=o(61333);h.exports=!c&&!v(function(){return Object.defineProperty(m("div"),"a",{get:function(){return 7}}).a!=7})},37026:(h,F,o)=>{var c=o(95981),v=o(82532),m="".split;h.exports=c(function(){return!Object("z").propertyIsEnumerable(0)})?function(d){return v(d)=="String"?m.call(d,""):Object(d)}:Object},81302:(h,F,o)=>{var c=o(63030),v=Function.toString;typeof c.inspectSource!="function"&&(c.inspectSource=function(m){return v.call(m)}),h.exports=c.inspectSource},21647:(h,F,o)=>{var c=o(27748),v=o(10941),m=o(47457),d=o(65988).f,x=o(99418),A=o(45602),w=x("meta"),T=0,D=Object.isExtensible||function(){return!0},B=function(Q){d(Q,w,{value:{objectID:"O"+ ++T,weakData:{}}})},U=function(Q,L){if(!v(Q))return typeof Q=="symbol"?Q:(typeof Q=="string"?"S":"P")+Q;if(!m(Q,w)){if(!D(Q))return"F";if(!L)return"E";B(Q)}return Q[w].objectID},ee=function(Q,L){if(!m(Q,w)){if(!D(Q))return!0;if(!L)return!1;B(Q)}return Q[w].weakData},K=function(Q){return A&&R.REQUIRED&&D(Q)&&!m(Q,w)&&B(Q),Q},R=h.exports={REQUIRED:!1,fastKey:U,getWeakData:ee,onFreeze:K};c[w]=!0},45402:(h,F,o)=>{var c=o(38019),v=o(21899),m=o(10941),d=o(32029),x=o(47457),A=o(63030),w=o(44262),T=o(27748),D="Object already initialized",B=v.WeakMap,U,ee,K,R=function(G){return K(G)?ee(G):U(G,{})},Q=function(G){return function(Z){var ce;if(!m(Z)||(ce=ee(Z)).type!==G)throw TypeError("Incompatible receiver, "+G+" required");return ce}};if(c||A.state){var L=A.state||(A.state=new B),P=L.get,V=L.has,X=L.set;U=function(G,Z){if(V.call(L,G))throw new TypeError(D);return Z.facade=G,X.call(L,G,Z),Z},ee=function(G){return P.call(L,G)||{}},K=function(G){return V.call(L,G)}}else{var z=w("state");T[z]=!0,U=function(G,Z){if(x(G,z))throw new TypeError(D);return Z.facade=G,d(G,z,Z),Z},ee=function(G){return x(G,z)?G[z]:{}},K=function(G){return x(G,z)}}h.exports={set:U,get:ee,has:K,enforce:R,getterFor:Q}},6782:(h,F,o)=>{var c=o(99813),v=o(12077),m=c("iterator"),d=Array.prototype;h.exports=function(x){return x!==void 0&&(v.Array===x||d[m]===x)}},1052:(h,F,o)=>{var c=o(82532);h.exports=Array.isArray||function(m){return c(m)=="Array"}},37252:(h,F,o)=>{var c=o(95981),v=/#|\.prototype\./,m=function(T,D){var B=x[d(T)];return B==w?!0:B==A?!1:typeof D=="function"?c(D):!!D},d=m.normalize=function(T){return String(T).replace(v,".").toLowerCase()},x=m.data={},A=m.NATIVE="N",w=m.POLYFILL="P";h.exports=m},10941:h=>{h.exports=function(F){return typeof F=="object"?F!==null:typeof F=="function"}},82529:h=>{h.exports=!0},60685:(h,F,o)=>{var c=o(10941),v=o(82532),m=o(99813),d=m("match");h.exports=function(x){var A;return c(x)&&((A=x[d])!==void 0?!!A:v(x)=="RegExp")}},93091:(h,F,o)=>{var c=o(96059),v=o(6782),m=o(43057),d=o(86843),x=o(22902),A=o(7609),w=function(T,D){this.stopped=T,this.result=D};h.exports=function(T,D,B){var U=B&&B.that,ee=!!(B&&B.AS_ENTRIES),K=!!(B&&B.IS_ITERATOR),R=!!(B&&B.INTERRUPTED),Q=d(D,U,1+ee+R),L,P,V,X,z,G,Z,ce=function(se){return L&&A(L),new w(!0,se)},te=function(se){return ee?(c(se),R?Q(se[0],se[1],ce):Q(se[0],se[1])):R?Q(se,ce):Q(se)};if(K)L=T;else{if(P=x(T),typeof P!="function")throw TypeError("Target is not iterable");if(v(P)){for(V=0,X=m(T.length);X>V;V++)if(z=te(T[V]),z&&z instanceof w)return z;return new w(!1)}L=P.call(T)}for(G=L.next;!(Z=G.call(L)).done;){try{z=te(Z.value)}catch(se){throw A(L),se}if(typeof z=="object"&&z&&z instanceof w)return z}return new w(!1)}},7609:(h,F,o)=>{var c=o(96059);h.exports=function(v){var m=v.return;if(m!==void 0)return c(m.call(v)).value}},35143:(h,F,o)=>{"use strict";var c=o(95981),v=o(249),m=o(32029),d=o(47457),x=o(99813),A=o(82529),w=x("iterator"),T=!1,D=function(){return this},B,U,ee;[].keys&&(ee=[].keys(),"next"in ee?(U=v(v(ee)),U!==Object.prototype&&(B=U)):T=!0);var K=B==null||c(function(){var R={};return B[w].call(R)!==R});K&&(B={}),(!A||K)&&!d(B,w)&&m(B,w,D),h.exports={IteratorPrototype:B,BUGGY_SAFARI_ITERATORS:T}},12077:h=>{h.exports={}},66132:(h,F,o)=>{var c=o(21899),v=o(49677).f,m=o(42941).set,d=o(22749),x=o(58045),A=o(6049),w=c.MutationObserver||c.WebKitMutationObserver,T=c.document,D=c.process,B=c.Promise,U=v(c,"queueMicrotask"),ee=U&&U.value,K,R,Q,L,P,V,X,z;ee||(K=function(){var G,Z;for(A&&(G=D.domain)&&G.exit();R;){Z=R.fn,R=R.next;try{Z()}catch(ce){throw R?L():Q=void 0,ce}}Q=void 0,G&&G.enter()},!d&&!A&&!x&&w&&T?(P=!0,V=T.createTextNode(""),new w(K).observe(V,{characterData:!0}),L=function(){V.data=P=!P}):B&&B.resolve?(X=B.resolve(void 0),X.constructor=B,z=X.then,L=function(){z.call(X,K)}):A?L=function(){D.nextTick(K)}:L=function(){m.call(c,K)}),h.exports=ee||function(G){var Z={fn:G,next:void 0};Q&&(Q.next=Z),R||(R=Z,L()),Q=Z}},19297:(h,F,o)=>{var c=o(21899);h.exports=c.Promise},72497:(h,F,o)=>{var c=o(53385),v=o(95981);h.exports=!!Object.getOwnPropertySymbols&&!v(function(){var m=Symbol();return!String(m)||!(Object(m)instanceof Symbol)||!Symbol.sham&&c&&c<41})},38019:(h,F,o)=>{var c=o(21899),v=o(81302),m=c.WeakMap;h.exports=typeof m=="function"&&/native code/.test(v(m))},69520:(h,F,o)=>{"use strict";var c=o(33916),v=function(m){var d,x;this.promise=new m(function(A,w){if(d!==void 0||x!==void 0)throw TypeError("Bad Promise constructor");d=A,x=w}),this.resolve=c(d),this.reject=c(x)};h.exports.f=function(m){return new v(m)}},70344:(h,F,o)=>{var c=o(60685);h.exports=function(v){if(c(v))throw TypeError("The method doesn't accept regular expressions");return v}},24420:(h,F,o)=>{"use strict";var c=o(55746),v=o(95981),m=o(14771),d=o(87857),x=o(36760),A=o(89678),w=o(37026),T=Object.assign,D=Object.defineProperty;h.exports=!T||v(function(){if(c&&T({b:1},T(D({},"a",{enumerable:!0,get:function(){D(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var B={},U={},ee=Symbol(),K="abcdefghijklmnopqrst";return B[ee]=7,K.split("").forEach(function(R){U[R]=R}),T({},B)[ee]!=7||m(T({},U)).join("")!=K})?function(U,ee){for(var K=A(U),R=arguments.length,Q=1,L=d.f,P=x.f;R>Q;)for(var V=w(arguments[Q++]),X=L?m(V).concat(L(V)):m(V),z=X.length,G=0,Z;z>G;)Z=X[G++],(!c||P.call(V,Z))&&(K[Z]=V[Z]);return K}:T},29290:(h,F,o)=>{var c=o(96059),v=o(59938),m=o(56759),d=o(27748),x=o(15463),A=o(61333),w=o(44262),T=">",D="<",B="prototype",U="script",ee=w("IE_PROTO"),K=function(){},R=function(X){return D+U+T+X+D+"/"+U+T},Q=function(X){X.write(R("")),X.close();var z=X.parentWindow.Object;return X=null,z},L=function(){var X=A("iframe"),z="java"+U+":",G;return X.style.display="none",x.appendChild(X),X.src=String(z),G=X.contentWindow.document,G.open(),G.write(R("document.F=Object")),G.close(),G.F},P,V=function(){try{P=document.domain&&new ActiveXObject("htmlfile")}catch(z){}V=P?Q(P):L();for(var X=m.length;X--;)delete V[B][m[X]];return V()};d[ee]=!0,h.exports=Object.create||function(z,G){var Z;return z!==null?(K[B]=c(z),Z=new K,K[B]=null,Z[ee]=z):Z=V(),G===void 0?Z:v(Z,G)}},59938:(h,F,o)=>{var c=o(55746),v=o(65988),m=o(96059),d=o(14771);h.exports=c?Object.defineProperties:function(A,w){m(A);for(var T=d(w),D=T.length,B=0,U;D>B;)v.f(A,U=T[B++],w[U]);return A}},65988:(h,F,o)=>{var c=o(55746),v=o(2840),m=o(96059),d=o(46935),x=Object.defineProperty;F.f=c?x:function(w,T,D){if(m(w),T=d(T,!0),m(D),v)try{return x(w,T,D)}catch(B){}if("get"in D||"set"in D)throw TypeError("Accessors not supported");return"value"in D&&(w[T]=D.value),w}},49677:(h,F,o)=>{var c=o(55746),v=o(36760),m=o(31887),d=o(74529),x=o(46935),A=o(47457),w=o(2840),T=Object.getOwnPropertyDescriptor;F.f=c?T:function(B,U){if(B=d(B),U=x(U,!0),w)try{return T(B,U)}catch(ee){}if(A(B,U))return m(!v.f.call(B,U),B[U])}},684:(h,F,o)=>{var c=o(74529),v=o(10946).f,m={}.toString,d=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],x=function(A){try{return v(A)}catch(w){return d.slice()}};h.exports.f=function(w){return d&&m.call(w)=="[object Window]"?x(w):v(c(w))}},10946:(h,F,o)=>{var c=o(55629),v=o(56759),m=v.concat("length","prototype");F.f=Object.getOwnPropertyNames||function(x){return c(x,m)}},87857:(h,F)=>{F.f=Object.getOwnPropertySymbols},249:(h,F,o)=>{var c=o(47457),v=o(89678),m=o(44262),d=o(64160),x=m("IE_PROTO"),A=Object.prototype;h.exports=d?Object.getPrototypeOf:function(w){return w=v(w),c(w,x)?w[x]:typeof w.constructor=="function"&&w instanceof w.constructor?w.constructor.prototype:w instanceof Object?A:null}},55629:(h,F,o)=>{var c=o(47457),v=o(74529),m=o(31692).indexOf,d=o(27748);h.exports=function(x,A){var w=v(x),T=0,D=[],B;for(B in w)!c(d,B)&&c(w,B)&&D.push(B);for(;A.length>T;)c(w,B=A[T++])&&(~m(D,B)||D.push(B));return D}},14771:(h,F,o)=>{var c=o(55629),v=o(56759);h.exports=Object.keys||function(d){return c(d,v)}},36760:(h,F)=>{"use strict";var o={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,v=c&&!o.call({1:2},1);F.f=v?function(d){var x=c(this,d);return!!x&&x.enumerable}:o},88929:(h,F,o)=>{var c=o(96059),v=o(42488);h.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var m=!1,d={},x;try{x=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,x.call(d,[]),m=d instanceof Array}catch(A){}return function(w,T){return c(w),v(T),m?x.call(w,T):w.__proto__=T,w}}():void 0)},88810:(h,F,o)=>{var c=o(55746),v=o(14771),m=o(74529),d=o(36760).f,x=function(A){return function(w){for(var T=m(w),D=v(T),B=D.length,U=0,ee=[],K;B>U;)K=D[U++],(!c||d.call(T,K))&&ee.push(A?[K,T[K]]:T[K]);return ee}};h.exports={entries:x(!0),values:x(!1)}},95623:(h,F,o)=>{"use strict";var c=o(22885),v=o(9697);h.exports=c?{}.toString:function(){return"[object "+v(this)+"]"}},31136:(h,F,o)=>{var c=o(626),v=o(10946),m=o(87857),d=o(96059);h.exports=c("Reflect","ownKeys")||function(A){var w=v.f(d(A)),T=m.f;return T?w.concat(T(A)):w}},54058:h=>{h.exports={}},40002:h=>{h.exports=function(F){try{return{error:!1,value:F()}}catch(o){return{error:!0,value:o}}}},56584:(h,F,o)=>{var c=o(96059),v=o(10941),m=o(69520);h.exports=function(d,x){if(c(d),v(x)&&x.constructor===d)return x;var A=m.f(d),w=A.resolve;return w(x),A.promise}},87524:(h,F,o)=>{var c=o(99754);h.exports=function(v,m,d){for(var x in m)d&&d.unsafe&&v[x]?v[x]=m[x]:c(v,x,m[x],d);return v}},99754:(h,F,o)=>{var c=o(32029);h.exports=function(v,m,d,x){x&&x.enumerable?v[m]=d:c(v,m,d)}},48219:h=>{h.exports=function(F){if(F==null)throw TypeError("Can't call method on "+F);return F}},4911:(h,F,o)=>{var c=o(21899),v=o(32029);h.exports=function(m,d){try{v(c,m,d)}catch(x){c[m]=d}return d}},94431:(h,F,o)=>{"use strict";var c=o(626),v=o(65988),m=o(99813),d=o(55746),x=m("species");h.exports=function(A){var w=c(A),T=v.f;d&&w&&!w[x]&&T(w,x,{configurable:!0,get:function(){return this}})}},90904:(h,F,o)=>{var c=o(22885),v=o(65988).f,m=o(32029),d=o(47457),x=o(95623),A=o(99813),w=A("toStringTag");h.exports=function(T,D,B,U){if(T){var ee=B?T:T.prototype;d(ee,w)||v(ee,w,{configurable:!0,value:D}),U&&!c&&m(ee,"toString",x)}}},44262:(h,F,o)=>{var c=o(68726),v=o(99418),m=c("keys");h.exports=function(d){return m[d]||(m[d]=v(d))}},63030:(h,F,o)=>{var c=o(21899),v=o(4911),m="__core-js_shared__",d=c[m]||v(m,{});h.exports=d},68726:(h,F,o)=>{var c=o(82529),v=o(63030);(h.exports=function(m,d){return v[m]||(v[m]=d!==void 0?d:{})})("versions",[]).push({version:"3.14.0",mode:c?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})},70487:(h,F,o)=>{var c=o(96059),v=o(33916),m=o(99813),d=m("species");h.exports=function(x,A){var w=c(x).constructor,T;return w===void 0||(T=c(w)[d])==null?A:v(T)}},64620:(h,F,o)=>{var c=o(68459),v=o(48219),m=function(d){return function(x,A){var w=String(v(x)),T=c(A),D=w.length,B,U;return T<0||T>=D?d?"":void 0:(B=w.charCodeAt(T),B<55296||B>56319||T+1===D||(U=w.charCodeAt(T+1))<56320||U>57343?d?w.charAt(T):B:d?w.slice(T,T+2):(B-55296<<10)+(U-56320)+65536)}};h.exports={codeAt:m(!1),charAt:m(!0)}},42941:(h,F,o)=>{var c=o(21899),v=o(95981),m=o(86843),d=o(15463),x=o(61333),A=o(22749),w=o(6049),T=c.location,D=c.setImmediate,B=c.clearImmediate,U=c.process,ee=c.MessageChannel,K=c.Dispatch,R=0,Q={},L="onreadystatechange",P,V,X,z=function(te){if(Q.hasOwnProperty(te)){var se=Q[te];delete Q[te],se()}},G=function(te){return function(){z(te)}},Z=function(te){z(te.data)},ce=function(te){c.postMessage(te+"",T.protocol+"//"+T.host)};(!D||!B)&&(D=function(se){for(var be=[],me=1;arguments.length>me;)be.push(arguments[me++]);return Q[++R]=function(){(typeof se=="function"?se:Function(se)).apply(void 0,be)},P(R),R},B=function(se){delete Q[se]},w?P=function(te){U.nextTick(G(te))}:K&&K.now?P=function(te){K.now(G(te))}:ee&&!A?(V=new ee,X=V.port2,V.port1.onmessage=Z,P=m(X.postMessage,X,1)):c.addEventListener&&typeof postMessage=="function"&&!c.importScripts&&T&&T.protocol!=="file:"&&!v(ce)?(P=ce,c.addEventListener("message",Z,!1)):L in x("script")?P=function(te){d.appendChild(x("script"))[L]=function(){d.removeChild(this),z(te)}}:P=function(te){setTimeout(G(te),0)}),h.exports={set:D,clear:B}},59413:(h,F,o)=>{var c=o(68459),v=Math.max,m=Math.min;h.exports=function(d,x){var A=c(d);return A<0?v(A+x,0):m(A,x)}},74529:(h,F,o)=>{var c=o(37026),v=o(48219);h.exports=function(m){return c(v(m))}},68459:h=>{var F=Math.ceil,o=Math.floor;h.exports=function(c){return isNaN(c=+c)?0:(c>0?o:F)(c)}},43057:(h,F,o)=>{var c=o(68459),v=Math.min;h.exports=function(m){return m>0?v(c(m),9007199254740991):0}},89678:(h,F,o)=>{var c=o(48219);h.exports=function(v){return Object(c(v))}},46935:(h,F,o)=>{var c=o(10941);h.exports=function(v,m){if(!c(v))return v;var d,x;if(m&&typeof(d=v.toString)=="function"&&!c(x=d.call(v))||typeof(d=v.valueOf)=="function"&&!c(x=d.call(v))||!m&&typeof(d=v.toString)=="function"&&!c(x=d.call(v)))return x;throw TypeError("Can't convert object to primitive value")}},22885:(h,F,o)=>{var c=o(99813),v=c("toStringTag"),m={};m[v]="z",h.exports=String(m)==="[object z]"},99418:h=>{var F=0,o=Math.random();h.exports=function(c){return"Symbol("+String(c===void 0?"":c)+")_"+(++F+o).toString(36)}},32302:(h,F,o)=>{var c=o(72497);h.exports=c&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},11477:(h,F,o)=>{var c=o(99813);F.f=c},99813:(h,F,o)=>{var c=o(21899),v=o(68726),m=o(47457),d=o(99418),x=o(72497),A=o(32302),w=v("wks"),T=c.Symbol,D=A?T:T&&T.withoutSetter||d;h.exports=function(B){return(!m(w,B)||!(x||typeof w[B]=="string"))&&(x&&m(T,B)?w[B]=T[B]:w[B]=D("Symbol."+B)),w[B]}},47627:(h,F,o)=>{"use strict";var c=o(76887),v=o(249),m=o(88929),d=o(29290),x=o(32029),A=o(31887),w=o(93091),T=function(B,U){var ee=this;if(!(ee instanceof T))return new T(B,U);m&&(ee=m(new Error(void 0),v(ee))),U!==void 0&&x(ee,"message",String(U));var K=[];return w(B,K.push,{that:K}),x(ee,"errors",K),ee};T.prototype=d(Error.prototype,{constructor:A(5,T),message:A(5,""),name:A(5,"AggregateError")}),c({global:!0},{AggregateError:T})},85906:(h,F,o)=>{"use strict";var c=o(76887),v=o(95981),m=o(1052),d=o(10941),x=o(89678),A=o(43057),w=o(55449),T=o(64692),D=o(50568),B=o(99813),U=o(53385),ee=B("isConcatSpreadable"),K=9007199254740991,R="Maximum allowed index exceeded",Q=U>=51||!v(function(){var X=[];return X[ee]=!1,X.concat()[0]!==X}),L=D("concat"),P=function(X){if(!d(X))return!1;var z=X[ee];return z!==void 0?!!z:m(X)},V=!Q||!L;c({target:"Array",proto:!0,forced:V},{concat:function(z){var G=x(this),Z=T(G,0),ce=0,te,se,be,me,he;for(te=-1,be=arguments.length;te<be;te++)if(he=te===-1?G:arguments[te],P(he)){if(me=A(he.length),ce+me>K)throw TypeError(R);for(se=0;se<me;se++,ce++)se in he&&w(Z,ce,he[se])}else{if(ce>=K)throw TypeError(R);w(Z,ce++,he)}return Z.length=ce,Z}})},21501:(h,F,o)=>{"use strict";var c=o(76887),v=o(3610).filter,m=o(50568),d=m("filter");c({target:"Array",proto:!0,forced:!d},{filter:function(A){return v(this,A,arguments.length>1?arguments[1]:void 0)}})},80833:(h,F,o)=>{"use strict";var c=o(76887),v=o(3610).find,m=o(18479),d="find",x=!0;d in[]&&Array(1)[d](function(){x=!1}),c({target:"Array",proto:!0,forced:x},{find:function(w){return v(this,w,arguments.length>1?arguments[1]:void 0)}}),m(d)},2437:(h,F,o)=>{"use strict";var c=o(76887),v=o(56837);c({target:"Array",proto:!0,forced:[].forEach!=v},{forEach:v})},53242:(h,F,o)=>{var c=o(76887),v=o(11354),m=o(21385),d=!m(function(x){Array.from(x)});c({target:"Array",stat:!0,forced:d},{from:v})},97690:(h,F,o)=>{"use strict";var c=o(76887),v=o(31692).includes,m=o(18479);c({target:"Array",proto:!0},{includes:function(x){return v(this,x,arguments.length>1?arguments[1]:void 0)}}),m("includes")},99076:(h,F,o)=>{"use strict";var c=o(76887),v=o(31692).indexOf,m=o(34194),d=[].indexOf,x=!!d&&1/[1].indexOf(1,-0)<0,A=m("indexOf");c({target:"Array",proto:!0,forced:x||!A},{indexOf:function(T){return x?d.apply(this,arguments)||0:v(this,T,arguments.length>1?arguments[1]:void 0)}})},92737:(h,F,o)=>{var c=o(76887),v=o(1052);c({target:"Array",stat:!0},{isArray:v})},66274:(h,F,o)=>{"use strict";var c=o(74529),v=o(18479),m=o(12077),d=o(45402),x=o(47771),A="Array Iterator",w=d.set,T=d.getterFor(A);h.exports=x(Array,"Array",function(D,B){w(this,{type:A,target:c(D),index:0,kind:B})},function(){var D=T(this),B=D.target,U=D.kind,ee=D.index++;return!B||ee>=B.length?(D.target=void 0,{value:void 0,done:!0}):U=="keys"?{value:ee,done:!1}:U=="values"?{value:B[ee],done:!1}:{value:[ee,B[ee]],done:!1}},"values"),m.Arguments=m.Array,v("keys"),v("values"),v("entries")},68787:(h,F,o)=>{"use strict";var c=o(76887),v=o(3610).map,m=o(50568),d=m("map");c({target:"Array",proto:!0,forced:!d},{map:function(A){return v(this,A,arguments.length>1?arguments[1]:void 0)}})},60186:(h,F,o)=>{"use strict";var c=o(76887),v=o(10941),m=o(1052),d=o(59413),x=o(43057),A=o(74529),w=o(55449),T=o(99813),D=o(50568),B=D("slice"),U=T("species"),ee=[].slice,K=Math.max;c({target:"Array",proto:!0,forced:!B},{slice:function(Q,L){var P=A(this),V=x(P.length),X=d(Q,V),z=d(L===void 0?V:L,V),G,Z,ce;if(m(P)&&(G=P.constructor,typeof G=="function"&&(G===Array||m(G.prototype))?G=void 0:v(G)&&(G=G[U],G===null&&(G=void 0)),G===Array||G===void 0))return ee.call(P,X,z);for(Z=new(G===void 0?Array:G)(K(z-X,0)),ce=0;X<z;X++,ce++)X in P&&w(Z,ce,P[X]);return Z.length=ce,Z}})},98611:(h,F,o)=>{"use strict";var c=o(76887),v=o(59413),m=o(68459),d=o(43057),x=o(89678),A=o(64692),w=o(55449),T=o(50568),D=T("splice"),B=Math.max,U=Math.min,ee=9007199254740991,K="Maximum allowed length exceeded";c({target:"Array",proto:!0,forced:!D},{splice:function(Q,L){var P=x(this),V=d(P.length),X=v(Q,V),z=arguments.length,G,Z,ce,te,se,be;if(z===0?G=Z=0:z===1?(G=0,Z=V-X):(G=z-2,Z=U(B(m(L),0),V-X)),V+G-Z>ee)throw TypeError(K);for(ce=A(P,Z),te=0;te<Z;te++)se=X+te,se in P&&w(ce,te,P[se]);if(ce.length=Z,G<Z){for(te=X;te<V-Z;te++)se=te+Z,be=te+G,se in P?P[be]=P[se]:delete P[be];for(te=V;te>V-Z+G;te--)delete P[te-1]}else if(G>Z)for(te=V-Z;te>X;te--)se=te+Z-1,be=te+G-1,se in P?P[be]=P[se]:delete P[be];for(te=0;te<G;te++)P[te+X]=arguments[te+2];return P.length=V-Z+G,ce}})},32619:(h,F,o)=>{var c=o(76887),v=o(626),m=o(95981),d=v("JSON","stringify"),x=/[\uD800-\uDFFF]/g,A=/^[\uD800-\uDBFF]$/,w=/^[\uDC00-\uDFFF]$/,T=function(B,U,ee){var K=ee.charAt(U-1),R=ee.charAt(U+1);return A.test(B)&&!w.test(R)||w.test(B)&&!A.test(K)?"\\u"+B.charCodeAt(0).toString(16):B},D=m(function(){return d("\uDF06\uD834")!=='"\\udf06\\ud834"'||d("\uDEAD")!=='"\\udead"'});d&&c({target:"JSON",stat:!0,forced:D},{stringify:function(U,ee,K){var R=d.apply(null,arguments);return typeof R=="string"?R.replace(x,T):R}})},69120:(h,F,o)=>{var c=o(21899),v=o(90904);v(c.JSON,"JSON",!0)},79413:()=>{},49221:(h,F,o)=>{var c=o(76887),v=o(24420);c({target:"Object",stat:!0,forced:Object.assign!==v},{assign:v})},53882:(h,F,o)=>{var c=o(76887),v=o(55746),m=o(29290);c({target:"Object",stat:!0,sham:!v},{create:m})},74979:(h,F,o)=>{var c=o(76887),v=o(55746),m=o(59938);c({target:"Object",stat:!0,forced:!v,sham:!v},{defineProperties:m})},86450:(h,F,o)=>{var c=o(76887),v=o(55746),m=o(65988);c({target:"Object",stat:!0,forced:!v,sham:!v},{defineProperty:m.f})},21078:(h,F,o)=>{var c=o(76887),v=o(88810).entries;c({target:"Object",stat:!0},{entries:function(d){return v(d)}})},46924:(h,F,o)=>{var c=o(76887),v=o(95981),m=o(74529),d=o(49677).f,x=o(55746),A=v(function(){d(1)}),w=!x||A;c({target:"Object",stat:!0,forced:w,sham:!x},{getOwnPropertyDescriptor:function(D,B){return d(m(D),B)}})},88482:(h,F,o)=>{var c=o(76887),v=o(55746),m=o(31136),d=o(74529),x=o(49677),A=o(55449);c({target:"Object",stat:!0,sham:!v},{getOwnPropertyDescriptors:function(T){for(var D=d(T),B=x.f,U=m(D),ee={},K=0,R,Q;U.length>K;)Q=B(D,R=U[K++]),Q!==void 0&&A(ee,R,Q);return ee}})},17405:(h,F,o)=>{var c=o(76887),v=o(95981),m=o(89678),d=o(249),x=o(64160),A=v(function(){d(1)});c({target:"Object",stat:!0,forced:A,sham:!x},{getPrototypeOf:function(T){return d(m(T))}})},21724:(h,F,o)=>{var c=o(76887),v=o(89678),m=o(14771),d=o(95981),x=d(function(){m(1)});c({target:"Object",stat:!0,forced:x},{keys:function(w){return m(v(w))}})},90108:(h,F,o)=>{var c=o(76887),v=o(88929);c({target:"Object",stat:!0},{setPrototypeOf:v})},55967:()=>{},4560:(h,F,o)=>{"use strict";var c=o(76887),v=o(33916),m=o(69520),d=o(40002),x=o(93091);c({target:"Promise",stat:!0},{allSettled:function(w){var T=this,D=m.f(T),B=D.resolve,U=D.reject,ee=d(function(){var K=v(T.resolve),R=[],Q=0,L=1;x(w,function(P){var V=Q++,X=!1;R.push(void 0),L++,K.call(T,P).then(function(z){X||(X=!0,R[V]={status:"fulfilled",value:z},--L||B(R))},function(z){X||(X=!0,R[V]={status:"rejected",reason:z},--L||B(R))})}),--L||B(R)});return ee.error&&U(ee.value),D.promise}})},91302:(h,F,o)=>{"use strict";var c=o(76887),v=o(33916),m=o(626),d=o(69520),x=o(40002),A=o(93091),w="No one promise resolved";c({target:"Promise",stat:!0},{any:function(D){var B=this,U=d.f(B),ee=U.resolve,K=U.reject,R=x(function(){var Q=v(B.resolve),L=[],P=0,V=1,X=!1;A(D,function(z){var G=P++,Z=!1;L.push(void 0),V++,Q.call(B,z).then(function(ce){Z||X||(X=!0,ee(ce))},function(ce){Z||X||(Z=!0,L[G]=ce,--V||K(new(m("AggregateError"))(L,w)))})}),--V||K(new(m("AggregateError"))(L,w))});return R.error&&K(R.value),U.promise}})},44349:(h,F,o)=>{"use strict";var c=o(76887),v=o(82529),m=o(19297),d=o(95981),x=o(626),A=o(70487),w=o(56584),T=o(99754),D=!!m&&d(function(){m.prototype.finally.call({then:function(){}},function(){})});if(c({target:"Promise",proto:!0,real:!0,forced:D},{finally:function(U){var ee=A(this,x("Promise")),K=typeof U=="function";return this.then(K?function(R){return w(ee,U()).then(function(){return R})}:U,K?function(R){return w(ee,U()).then(function(){throw R})}:U)}}),!v&&typeof m=="function"){var B=x("Promise").prototype.finally;m.prototype.finally!==B&&T(m.prototype,"finally",B,{unsafe:!0})}},98881:(h,F,o)=>{"use strict";var c=o(76887),v=o(82529),m=o(21899),d=o(626),x=o(19297),A=o(99754),w=o(87524),T=o(88929),D=o(90904),B=o(94431),U=o(10941),ee=o(33916),K=o(5743),R=o(81302),Q=o(93091),L=o(21385),P=o(70487),V=o(42941).set,X=o(66132),z=o(56584),G=o(34845),Z=o(69520),ce=o(40002),te=o(45402),se=o(37252),be=o(99813),me=o(23321),he=o(6049),fe=o(53385),oe=be("species"),Re="Promise",Ue=te.get,Le=te.set,ke=te.getterFor(Re),tt=x&&x.prototype,Je=x,qe=tt,at=m.TypeError,ut=m.document,gt=m.process,Ze=Z.f,lt=Ze,pt=!!(ut&&ut.createEvent&&m.dispatchEvent),vt=typeof PromiseRejectionEvent=="function",dt="unhandledrejection",It="rejectionhandled",Ft=0,Et=1,Ut=2,jt=1,Gt=2,wt=!1,Mt,bt,ve,$,Y=se(Re,function(){var _=R(Je)!==String(Je);if(!_&&fe===66||v&&!qe.finally)return!0;if(fe>=51&&/native code/.test(Je))return!1;var ue=new Je(function(Te){Te(1)}),Oe=function(Te){Te(function(){},function(){})},Ie=ue.constructor={};return Ie[oe]=Oe,wt=ue.then(function(){})instanceof Oe,wt?!_&&me&&!vt:!0}),ye=Y||!L(function(_){Je.all(_).catch(function(){})}),de=function(_){var ue;return U(_)&&typeof(ue=_.then)=="function"?ue:!1},Ae=function(_,ue){if(!_.notified){_.notified=!0;var Oe=_.reactions;X(function(){for(var Ie=_.value,Te=_.state==Et,We=0;Oe.length>We;){var He=Oe[We++],nt=Te?He.ok:He.fail,ht=He.resolve,Ct=He.reject,Yt=He.domain,kt,yn,Xr;try{nt?(Te||(_.rejection===Gt&&O(_),_.rejection=jt),nt===!0?kt=Ie:(Yt&&Yt.enter(),kt=nt(Ie),Yt&&(Yt.exit(),Xr=!0)),kt===He.promise?Ct(at("Promise-chain cycle")):(yn=de(kt))?yn.call(kt,ht,Ct):ht(kt)):Ct(Ie)}catch(Tn){Yt&&!Xr&&Yt.exit(),Ct(Tn)}}_.reactions=[],_.notified=!1,ue&&!_.rejection&&Pe(_)})}},S=function(_,ue,Oe){var Ie,Te;pt?(Ie=ut.createEvent("Event"),Ie.promise=ue,Ie.reason=Oe,Ie.initEvent(_,!1,!0),m.dispatchEvent(Ie)):Ie={promise:ue,reason:Oe},!vt&&(Te=m["on"+_])?Te(Ie):_===dt&&G("Unhandled promise rejection",Oe)},Pe=function(_){V.call(m,function(){var ue=_.facade,Oe=_.value,Ie=H(_),Te;if(Ie&&(Te=ce(function(){he?gt.emit("unhandledRejection",Oe,ue):S(dt,ue,Oe)}),_.rejection=he||H(_)?Gt:jt,Te.error))throw Te.value})},H=function(_){return _.rejection!==jt&&!_.parent},O=function(_){V.call(m,function(){var ue=_.facade;he?gt.emit("rejectionHandled",ue):S(It,ue,_.value)})},I=function(_,ue,Oe){return function(Ie){_(ue,Ie,Oe)}},re=function(_,ue,Oe){_.done||(_.done=!0,Oe&&(_=Oe),_.value=ue,_.state=Ut,Ae(_,!0))},N=function(_,ue,Oe){if(!_.done){_.done=!0,Oe&&(_=Oe);try{if(_.facade===ue)throw at("Promise can't be resolved itself");var Ie=de(ue);Ie?X(function(){var Te={done:!1};try{Ie.call(ue,I(N,Te,_),I(re,Te,_))}catch(We){re(Te,We,_)}}):(_.value=ue,_.state=Et,Ae(_,!1))}catch(Te){re({done:!1},Te,_)}}};if(Y&&(Je=function(ue){K(this,Je,Re),ee(ue),Mt.call(this);var Oe=Ue(this);try{ue(I(N,Oe),I(re,Oe))}catch(Ie){re(Oe,Ie)}},qe=Je.prototype,Mt=function(ue){Le(this,{type:Re,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:Ft,value:void 0})},Mt.prototype=w(qe,{then:function(ue,Oe){var Ie=ke(this),Te=Ze(P(this,Je));return Te.ok=typeof ue=="function"?ue:!0,Te.fail=typeof Oe=="function"&&Oe,Te.domain=he?gt.domain:void 0,Ie.parent=!0,Ie.reactions.push(Te),Ie.state!=Ft&&Ae(Ie,!1),Te.promise},catch:function(_){return this.then(void 0,_)}}),bt=function(){var _=new Mt,ue=Ue(_);this.promise=_,this.resolve=I(N,ue),this.reject=I(re,ue)},Z.f=Ze=function(_){return _===Je||_===ve?new bt(_):lt(_)},!v&&typeof x=="function"&&tt!==Object.prototype)){$=tt.then,wt||(A(tt,"then",function(ue,Oe){var Ie=this;return new Je(function(Te,We){$.call(Ie,Te,We)}).then(ue,Oe)},{unsafe:!0}),A(tt,"catch",qe.catch,{unsafe:!0}));try{delete tt.constructor}catch(_){}T&&T(tt,qe)}c({global:!0,wrap:!0,forced:Y},{Promise:Je}),D(Je,Re,!1,!0),B(Re),ve=d(Re),c({target:Re,stat:!0,forced:Y},{reject:function(ue){var Oe=Ze(this);return Oe.reject.call(void 0,ue),Oe.promise}}),c({target:Re,stat:!0,forced:v||Y},{resolve:function(ue){return z(v&&this===ve?Je:this,ue)}}),c({target:Re,stat:!0,forced:ye},{all:function(ue){var Oe=this,Ie=Ze(Oe),Te=Ie.resolve,We=Ie.reject,He=ce(function(){var nt=ee(Oe.resolve),ht=[],Ct=0,Yt=1;Q(ue,function(kt){var yn=Ct++,Xr=!1;ht.push(void 0),Yt++,nt.call(Oe,kt).then(function(Tn){Xr||(Xr=!0,ht[yn]=Tn,--Yt||Te(ht))},We)}),--Yt||Te(ht)});return He.error&&We(He.value),Ie.promise},race:function(ue){var Oe=this,Ie=Ze(Oe),Te=Ie.reject,We=ce(function(){var He=ee(Oe.resolve);Q(ue,function(nt){He.call(Oe,nt).then(Ie.resolve,Te)})});return We.error&&Te(We.value),Ie.promise}})},7453:(h,F,o)=>{var c=o(76887),v=o(626),m=o(33916),d=o(96059),x=o(10941),A=o(29290),w=o(98308),T=o(95981),D=v("Reflect","construct"),B=T(function(){function K(){}return!(D(function(){},[],K)instanceof K)}),U=!T(function(){D(function(){})}),ee=B||U;c({target:"Reflect",stat:!0,forced:ee,sham:ee},{construct:function(R,Q){m(R),d(Q);var L=arguments.length<3?R:m(arguments[2]);if(U&&!B)return D(R,Q,L);if(R==L){switch(Q.length){case 0:return new R;case 1:return new R(Q[0]);case 2:return new R(Q[0],Q[1]);case 3:return new R(Q[0],Q[1],Q[2]);case 4:return new R(Q[0],Q[1],Q[2],Q[3])}var P=[null];return P.push.apply(P,Q),new(w.apply(R,P))}var V=L.prototype,X=A(x(V)?V:Object.prototype),z=Function.apply.call(R,X,Q);return x(z)?z:X}})},42355:(h,F,o)=>{var c=o(76887),v=o(10941),m=o(96059),d=o(47457),x=o(49677),A=o(249);function w(T,D){var B=arguments.length<3?T:arguments[2],U,ee;if(m(T)===B)return T[D];if(U=x.f(T,D))return d(U,"value")?U.value:U.get===void 0?void 0:U.get.call(B);if(v(ee=A(T)))return w(ee,D,B)}c({target:"Reflect",stat:!0},{get:w})},1502:()=>{},11035:(h,F,o)=>{"use strict";var c=o(76887),v=o(70344),m=o(48219),d=o(67772);c({target:"String",proto:!0,forced:!d("includes")},{includes:function(A){return!!~String(m(this)).indexOf(v(A),arguments.length>1?arguments[1]:void 0)}})},77971:(h,F,o)=>{"use strict";var c=o(64620).charAt,v=o(45402),m=o(47771),d="String Iterator",x=v.set,A=v.getterFor(d);m(String,"String",function(w){x(this,{type:d,string:String(w),index:0})},function(){var T=A(this),D=T.string,B=T.index,U;return B>=D.length?{value:void 0,done:!0}:(U=c(D,B),T.index+=U.length,{value:U,done:!1})})},8555:(h,F,o)=>{var c=o(66349);c("asyncIterator")},52615:()=>{},21732:(h,F,o)=>{var c=o(66349);c("hasInstance")},35903:(h,F,o)=>{var c=o(66349);c("isConcatSpreadable")},1825:(h,F,o)=>{var c=o(66349);c("iterator")},35824:(h,F,o)=>{"use strict";var c=o(76887),v=o(21899),m=o(626),d=o(82529),x=o(55746),A=o(72497),w=o(32302),T=o(95981),D=o(47457),B=o(1052),U=o(10941),ee=o(96059),K=o(89678),R=o(74529),Q=o(46935),L=o(31887),P=o(29290),V=o(14771),X=o(10946),z=o(684),G=o(87857),Z=o(49677),ce=o(65988),te=o(36760),se=o(32029),be=o(99754),me=o(68726),he=o(44262),fe=o(27748),oe=o(99418),Re=o(99813),Ue=o(11477),Le=o(66349),ke=o(90904),tt=o(45402),Je=o(3610).forEach,qe=he("hidden"),at="Symbol",ut="prototype",gt=Re("toPrimitive"),Ze=tt.set,lt=tt.getterFor(at),pt=Object[ut],vt=v.Symbol,dt=m("JSON","stringify"),It=Z.f,Ft=ce.f,Et=z.f,Ut=te.f,jt=me("symbols"),Gt=me("op-symbols"),wt=me("string-to-symbol-registry"),Mt=me("symbol-to-string-registry"),bt=me("wks"),ve=v.QObject,$=!ve||!ve[ut]||!ve[ut].findChild,Y=x&&T(function(){return P(Ft({},"a",{get:function(){return Ft(this,"a",{value:7}).a}})).a!=7})?function(_,ue,Oe){var Ie=It(pt,ue);Ie&&delete pt[ue],Ft(_,ue,Oe),Ie&&_!==pt&&Ft(pt,ue,Ie)}:Ft,ye=function(_,ue){var Oe=jt[_]=P(vt[ut]);return Ze(Oe,{type:at,tag:_,description:ue}),x||(Oe.description=ue),Oe},de=w?function(_){return typeof _=="symbol"}:function(_){return Object(_)instanceof vt},Ae=function(ue,Oe,Ie){ue===pt&&Ae(Gt,Oe,Ie),ee(ue);var Te=Q(Oe,!0);return ee(Ie),D(jt,Te)?(Ie.enumerable?(D(ue,qe)&&ue[qe][Te]&&(ue[qe][Te]=!1),Ie=P(Ie,{enumerable:L(0,!1)})):(D(ue,qe)||Ft(ue,qe,L(1,{})),ue[qe][Te]=!0),Y(ue,Te,Ie)):Ft(ue,Te,Ie)},S=function(ue,Oe){ee(ue);var Ie=R(Oe),Te=V(Ie).concat(re(Ie));return Je(Te,function(We){(!x||H.call(Ie,We))&&Ae(ue,We,Ie[We])}),ue},Pe=function(ue,Oe){return Oe===void 0?P(ue):S(P(ue),Oe)},H=function(ue){var Oe=Q(ue,!0),Ie=Ut.call(this,Oe);return this===pt&&D(jt,Oe)&&!D(Gt,Oe)?!1:Ie||!D(this,Oe)||!D(jt,Oe)||D(this,qe)&&this[qe][Oe]?Ie:!0},O=function(ue,Oe){var Ie=R(ue),Te=Q(Oe,!0);if(!(Ie===pt&&D(jt,Te)&&!D(Gt,Te))){var We=It(Ie,Te);return We&&D(jt,Te)&&!(D(Ie,qe)&&Ie[qe][Te])&&(We.enumerable=!0),We}},I=function(ue){var Oe=Et(R(ue)),Ie=[];return Je(Oe,function(Te){!D(jt,Te)&&!D(fe,Te)&&Ie.push(Te)}),Ie},re=function(ue){var Oe=ue===pt,Ie=Et(Oe?Gt:R(ue)),Te=[];return Je(Ie,function(We){D(jt,We)&&(!Oe||D(pt,We))&&Te.push(jt[We])}),Te};if(A||(vt=function(){if(this instanceof vt)throw TypeError("Symbol is not a constructor");var ue=!arguments.length||arguments[0]===void 0?void 0:String(arguments[0]),Oe=oe(ue),Ie=function(Te){this===pt&&Ie.call(Gt,Te),D(this,qe)&&D(this[qe],Oe)&&(this[qe][Oe]=!1),Y(this,Oe,L(1,Te))};return x&&$&&Y(pt,Oe,{configurable:!0,set:Ie}),ye(Oe,ue)},be(vt[ut],"toString",function(){return lt(this).tag}),be(vt,"withoutSetter",function(_){return ye(oe(_),_)}),te.f=H,ce.f=Ae,Z.f=O,X.f=z.f=I,G.f=re,Ue.f=function(_){return ye(Re(_),_)},x&&(Ft(vt[ut],"description",{configurable:!0,get:function(){return lt(this).description}}),d||be(pt,"propertyIsEnumerable",H,{unsafe:!0}))),c({global:!0,wrap:!0,forced:!A,sham:!A},{Symbol:vt}),Je(V(bt),function(_){Le(_)}),c({target:at,stat:!0,forced:!A},{for:function(_){var ue=String(_);if(D(wt,ue))return wt[ue];var Oe=vt(ue);return wt[ue]=Oe,Mt[Oe]=ue,Oe},keyFor:function(ue){if(!de(ue))throw TypeError(ue+" is not a symbol");if(D(Mt,ue))return Mt[ue]},useSetter:function(){$=!0},useSimple:function(){$=!1}}),c({target:"Object",stat:!0,forced:!A,sham:!x},{create:Pe,defineProperty:Ae,defineProperties:S,getOwnPropertyDescriptor:O}),c({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:I,getOwnPropertySymbols:re}),c({target:"Object",stat:!0,forced:T(function(){G.f(1)})},{getOwnPropertySymbols:function(ue){return G.f(K(ue))}}),dt){var N=!A||T(function(){var _=vt();return dt([_])!="[null]"||dt({a:_})!="{}"||dt(Object(_))!="{}"});c({target:"JSON",stat:!0,forced:N},{stringify:function(ue,Oe,Ie){for(var Te=[ue],We=1,He;arguments.length>We;)Te.push(arguments[We++]);if(He=Oe,!(!U(Oe)&&ue===void 0||de(ue)))return B(Oe)||(Oe=function(nt,ht){if(typeof He=="function"&&(ht=He.call(this,nt,ht)),!de(ht))return ht}),Te[1]=Oe,dt.apply(null,Te)}})}vt[ut][gt]||se(vt[ut],gt,vt[ut].valueOf),ke(vt,at),fe[qe]=!0},45915:(h,F,o)=>{var c=o(66349);c("matchAll")},28394:(h,F,o)=>{var c=o(66349);c("match")},61766:(h,F,o)=>{var c=o(66349);c("replace")},62737:(h,F,o)=>{var c=o(66349);c("search")},89911:(h,F,o)=>{var c=o(66349);c("species")},74315:(h,F,o)=>{var c=o(66349);c("split")},63131:(h,F,o)=>{var c=o(66349);c("toPrimitive")},64714:(h,F,o)=>{var c=o(66349);c("toStringTag")},70659:(h,F,o)=>{var c=o(66349);c("unscopables")},54334:(h,F,o)=>{"use strict";var c=o(21899),v=o(87524),m=o(21647),d=o(24683),x=o(8850),A=o(10941),w=o(45402).enforce,T=o(38019),D=!c.ActiveXObject&&"ActiveXObject"in c,B=Object.isExtensible,U,ee=function(X){return function(){return X(this,arguments.length?arguments[0]:void 0)}},K=h.exports=d("WeakMap",ee,x);if(T&&D){U=x.getConstructor(ee,"WeakMap",!0),m.REQUIRED=!0;var R=K.prototype,Q=R.delete,L=R.has,P=R.get,V=R.set;v(R,{delete:function(X){if(A(X)&&!B(X)){var z=w(this);return z.frozen||(z.frozen=new U),Q.call(this,X)||z.frozen.delete(X)}return Q.call(this,X)},has:function(z){if(A(z)&&!B(z)){var G=w(this);return G.frozen||(G.frozen=new U),L.call(this,z)||G.frozen.has(z)}return L.call(this,z)},get:function(z){if(A(z)&&!B(z)){var G=w(this);return G.frozen||(G.frozen=new U),L.call(this,z)?P.call(this,z):G.frozen.get(z)}return P.call(this,z)},set:function(z,G){if(A(z)&&!B(z)){var Z=w(this);Z.frozen||(Z.frozen=new U),L.call(this,z)?V.call(this,z,G):Z.frozen.set(z,G)}else V.call(this,z,G);return this}})}},89731:(h,F,o)=>{o(47627)},55708:(h,F,o)=>{o(4560)},88731:(h,F,o)=>{o(91302)},30014:(h,F,o)=>{"use strict";var c=o(76887),v=o(69520),m=o(40002);c({target:"Promise",stat:!0},{try:function(d){var x=v.f(this),A=m(d);return(A.error?x.reject:x.resolve)(A.value),x.promise}})},28783:(h,F,o)=>{var c=o(66349);c("asyncDispose")},43975:(h,F,o)=>{var c=o(66349);c("dispose")},65799:(h,F,o)=>{var c=o(66349);c("matcher")},45414:(h,F,o)=>{var c=o(66349);c("metadata")},46774:(h,F,o)=>{var c=o(66349);c("observable")},80620:(h,F,o)=>{var c=o(66349);c("patternMatch")},36172:(h,F,o)=>{var c=o(66349);c("replaceAll")},7634:(h,F,o)=>{o(66274);var c=o(63281),v=o(21899),m=o(9697),d=o(32029),x=o(12077),A=o(99813),w=A("toStringTag");for(var T in c){var D=v[T],B=D&&D.prototype;B&&m(B)!==w&&d(B,w,T),x[T]=x.Array}},27698:(h,F,o)=>{var c=o(54493);h.exports=c},62908:(h,F,o)=>{var c=o(12710);h.exports=c},49216:(h,F,o)=>{var c=o(99324);h.exports=c},8065:(h,F,o)=>{var c=o(56043);h.exports=c},57448:(h,F,o)=>{o(7634);var c=o(62908),v=o(9697),m=Array.prototype,d={DOMTokenList:!0,NodeList:!0};h.exports=function(x){var A=x.entries;return x===m||x instanceof Array&&A===m.entries||d.hasOwnProperty(v(x))?c:A}},11955:(h,F,o)=>{var c=o(2480);h.exports=c},61577:(h,F,o)=>{var c=o(32236);h.exports=c},46279:(h,F,o)=>{o(7634);var c=o(49216),v=o(9697),m=Array.prototype,d={DOMTokenList:!0,NodeList:!0};h.exports=function(x){var A=x.forEach;return x===m||x instanceof Array&&A===m.forEach||d.hasOwnProperty(v(x))?c:A}},33778:(h,F,o)=>{var c=o(58557);h.exports=c},61798:(h,F,o)=>{var c=o(88287);h.exports=c},82073:(h,F,o)=>{var c=o(69601);h.exports=c},2348:(h,F,o)=>{var c=o(18339);h.exports=c},8933:(h,F,o)=>{var c=o(84426);h.exports=c},63383:(h,F,o)=>{var c=o(45999);h.exports=c},86209:(h,F,o)=>{var c=o(73081);h.exports=c},23059:(h,F,o)=>{var c=o(48494);h.exports=c},27460:(h,F,o)=>{var c=o(52956);h.exports=c},72010:(h,F,o)=>{var c=o(32304);h.exports=c},31905:function(){(function(h){var F=function(o){var c={searchParams:"URLSearchParams"in h,iterable:"Symbol"in h&&"iterator"in Symbol,blob:"FileReader"in h&&"Blob"in h&&function(){try{return new Blob,!0}catch(te){return!1}}(),formData:"FormData"in h,arrayBuffer:"ArrayBuffer"in h};function v(te){return te&&DataView.prototype.isPrototypeOf(te)}if(c.arrayBuffer)var m=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],d=ArrayBuffer.isView||function(te){return te&&m.indexOf(Object.prototype.toString.call(te))>-1};function x(te){if(typeof te!="string"&&(te=String(te)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(te))throw new TypeError("Invalid character in header field name");return te.toLowerCase()}function A(te){return typeof te!="string"&&(te=String(te)),te}function w(te){var se={next:function(){var be=te.shift();return{done:be===void 0,value:be}}};return c.iterable&&(se[Symbol.iterator]=function(){return se}),se}function T(te){this.map={},te instanceof T?te.forEach(function(se,be){this.append(be,se)},this):Array.isArray(te)?te.forEach(function(se){this.append(se[0],se[1])},this):te&&Object.getOwnPropertyNames(te).forEach(function(se){this.append(se,te[se])},this)}T.prototype.append=function(te,se){te=x(te),se=A(se);var be=this.map[te];this.map[te]=be?be+", "+se:se},T.prototype.delete=function(te){delete this.map[x(te)]},T.prototype.get=function(te){return te=x(te),this.has(te)?this.map[te]:null},T.prototype.has=function(te){return this.map.hasOwnProperty(x(te))},T.prototype.set=function(te,se){this.map[x(te)]=A(se)},T.prototype.forEach=function(te,se){for(var be in this.map)this.map.hasOwnProperty(be)&&te.call(se,this.map[be],be,this)},T.prototype.keys=function(){var te=[];return this.forEach(function(se,be){te.push(be)}),w(te)},T.prototype.values=function(){var te=[];return this.forEach(function(se){te.push(se)}),w(te)},T.prototype.entries=function(){var te=[];return this.forEach(function(se,be){te.push([be,se])}),w(te)},c.iterable&&(T.prototype[Symbol.iterator]=T.prototype.entries);function D(te){if(te.bodyUsed)return Promise.reject(new TypeError("Already read"));te.bodyUsed=!0}function B(te){return new Promise(function(se,be){te.onload=function(){se(te.result)},te.onerror=function(){be(te.error)}})}function U(te){var se=new FileReader,be=B(se);return se.readAsArrayBuffer(te),be}function ee(te){var se=new FileReader,be=B(se);return se.readAsText(te),be}function K(te){for(var se=new Uint8Array(te),be=new Array(se.length),me=0;me<se.length;me++)be[me]=String.fromCharCode(se[me]);return be.join("")}function R(te){if(te.slice)return te.slice(0);var se=new Uint8Array(te.byteLength);return se.set(new Uint8Array(te)),se.buffer}function Q(){return this.bodyUsed=!1,this._initBody=function(te){this._bodyInit=te,te?typeof te=="string"?this._bodyText=te:c.blob&&Blob.prototype.isPrototypeOf(te)?this._bodyBlob=te:c.formData&&FormData.prototype.isPrototypeOf(te)?this._bodyFormData=te:c.searchParams&&URLSearchParams.prototype.isPrototypeOf(te)?this._bodyText=te.toString():c.arrayBuffer&&c.blob&&v(te)?(this._bodyArrayBuffer=R(te.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):c.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(te)||d(te))?this._bodyArrayBuffer=R(te):this._bodyText=te=Object.prototype.toString.call(te):this._bodyText="",this.headers.get("content-type")||(typeof te=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):c.searchParams&&URLSearchParams.prototype.isPrototypeOf(te)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},c.blob&&(this.blob=function(){var te=D(this);if(te)return te;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?D(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(U)}),this.text=function(){var te=D(this);if(te)return te;if(this._bodyBlob)return ee(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(K(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c.formData&&(this.formData=function(){return this.text().then(X)}),this.json=function(){return this.text().then(JSON.parse)},this}var L=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function P(te){var se=te.toUpperCase();return L.indexOf(se)>-1?se:te}function V(te,se){se=se||{};var be=se.body;if(te instanceof V){if(te.bodyUsed)throw new TypeError("Already read");this.url=te.url,this.credentials=te.credentials,se.headers||(this.headers=new T(te.headers)),this.method=te.method,this.mode=te.mode,this.signal=te.signal,!be&&te._bodyInit!=null&&(be=te._bodyInit,te.bodyUsed=!0)}else this.url=String(te);if(this.credentials=se.credentials||this.credentials||"same-origin",(se.headers||!this.headers)&&(this.headers=new T(se.headers)),this.method=P(se.method||this.method||"GET"),this.mode=se.mode||this.mode||null,this.signal=se.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&be)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(be)}V.prototype.clone=function(){return new V(this,{body:this._bodyInit})};function X(te){var se=new FormData;return te.trim().split("&").forEach(function(be){if(be){var me=be.split("="),he=me.shift().replace(/\+/g," "),fe=me.join("=").replace(/\+/g," ");se.append(decodeURIComponent(he),decodeURIComponent(fe))}}),se}function z(te){var se=new T,be=te.replace(/\r?\n[\t ]+/g," ");return be.split(/\r?\n/).forEach(function(me){var he=me.split(":"),fe=he.shift().trim();if(fe){var oe=he.join(":").trim();se.append(fe,oe)}}),se}Q.call(V.prototype);function G(te,se){se||(se={}),this.type="default",this.status=se.status===void 0?200:se.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in se?se.statusText:"OK",this.headers=new T(se.headers),this.url=se.url||"",this._initBody(te)}Q.call(G.prototype),G.prototype.clone=function(){return new G(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new T(this.headers),url:this.url})},G.error=function(){var te=new G(null,{status:0,statusText:""});return te.type="error",te};var Z=[301,302,303,307,308];G.redirect=function(te,se){if(Z.indexOf(se)===-1)throw new RangeError("Invalid status code");return new G(null,{status:se,headers:{location:te}})},o.DOMException=h.DOMException;try{new o.DOMException}catch(te){o.DOMException=function(se,be){this.message=se,this.name=be;var me=Error(se);this.stack=me.stack},o.DOMException.prototype=Object.create(Error.prototype),o.DOMException.prototype.constructor=o.DOMException}function ce(te,se){return new Promise(function(be,me){var he=new V(te,se);if(he.signal&&he.signal.aborted)return me(new o.DOMException("Aborted","AbortError"));var fe=new XMLHttpRequest;function oe(){fe.abort()}fe.onload=function(){var Re={status:fe.status,statusText:fe.statusText,headers:z(fe.getAllResponseHeaders()||"")};Re.url="responseURL"in fe?fe.responseURL:Re.headers.get("X-Request-URL");var Ue="response"in fe?fe.response:fe.responseText;be(new G(Ue,Re))},fe.onerror=function(){me(new TypeError("Network request failed"))},fe.ontimeout=function(){me(new TypeError("Network request failed"))},fe.onabort=function(){me(new o.DOMException("Aborted","AbortError"))},fe.open(he.method,he.url,!0),he.credentials==="include"?fe.withCredentials=!0:he.credentials==="omit"&&(fe.withCredentials=!1),"responseType"in fe&&c.blob&&(fe.responseType="blob"),he.headers.forEach(function(Re,Ue){fe.setRequestHeader(Ue,Re)}),he.signal&&(he.signal.addEventListener("abort",oe),fe.onreadystatechange=function(){fe.readyState===4&&he.signal.removeEventListener("abort",oe)}),fe.send(typeof he._bodyInit=="undefined"?null:he._bodyInit)})}return ce.polyfill=!0,h.fetch||(h.fetch=ce,h.Headers=T,h.Request=V,h.Response=G),o.Headers=T,o.Request=V,o.Response=G,o.fetch=ce,Object.defineProperty(o,"__esModule",{value:!0}),o}({})})(typeof self!="undefined"?self:this)},54098:function(h,F){var o=typeof self!="undefined"?self:this,c=function(){function m(){this.fetch=!1,this.DOMException=o.DOMException}return m.prototype=o,new m}();(function(m){var d=function(x){var A={searchParams:"URLSearchParams"in m,iterable:"Symbol"in m&&"iterator"in Symbol,blob:"FileReader"in m&&"Blob"in m&&function(){try{return new Blob,!0}catch(fe){return!1}}(),formData:"FormData"in m,arrayBuffer:"ArrayBuffer"in m};function w(fe){return fe&&DataView.prototype.isPrototypeOf(fe)}if(A.arrayBuffer)var T=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],D=ArrayBuffer.isView||function(fe){return fe&&T.indexOf(Object.prototype.toString.call(fe))>-1};function B(fe){if(typeof fe!="string"&&(fe=String(fe)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(fe))throw new TypeError("Invalid character in header field name");return fe.toLowerCase()}function U(fe){return typeof fe!="string"&&(fe=String(fe)),fe}function ee(fe){var oe={next:function(){var Re=fe.shift();return{done:Re===void 0,value:Re}}};return A.iterable&&(oe[Symbol.iterator]=function(){return oe}),oe}function K(fe){this.map={},fe instanceof K?fe.forEach(function(oe,Re){this.append(Re,oe)},this):Array.isArray(fe)?fe.forEach(function(oe){this.append(oe[0],oe[1])},this):fe&&Object.getOwnPropertyNames(fe).forEach(function(oe){this.append(oe,fe[oe])},this)}K.prototype.append=function(fe,oe){fe=B(fe),oe=U(oe);var Re=this.map[fe];this.map[fe]=Re?Re+", "+oe:oe},K.prototype.delete=function(fe){delete this.map[B(fe)]},K.prototype.get=function(fe){return fe=B(fe),this.has(fe)?this.map[fe]:null},K.prototype.has=function(fe){return this.map.hasOwnProperty(B(fe))},K.prototype.set=function(fe,oe){this.map[B(fe)]=U(oe)},K.prototype.forEach=function(fe,oe){for(var Re in this.map)this.map.hasOwnProperty(Re)&&fe.call(oe,this.map[Re],Re,this)},K.prototype.keys=function(){var fe=[];return this.forEach(function(oe,Re){fe.push(Re)}),ee(fe)},K.prototype.values=function(){var fe=[];return this.forEach(function(oe){fe.push(oe)}),ee(fe)},K.prototype.entries=function(){var fe=[];return this.forEach(function(oe,Re){fe.push([Re,oe])}),ee(fe)},A.iterable&&(K.prototype[Symbol.iterator]=K.prototype.entries);function R(fe){if(fe.bodyUsed)return Promise.reject(new TypeError("Already read"));fe.bodyUsed=!0}function Q(fe){return new Promise(function(oe,Re){fe.onload=function(){oe(fe.result)},fe.onerror=function(){Re(fe.error)}})}function L(fe){var oe=new FileReader,Re=Q(oe);return oe.readAsArrayBuffer(fe),Re}function P(fe){var oe=new FileReader,Re=Q(oe);return oe.readAsText(fe),Re}function V(fe){for(var oe=new Uint8Array(fe),Re=new Array(oe.length),Ue=0;Ue<oe.length;Ue++)Re[Ue]=String.fromCharCode(oe[Ue]);return Re.join("")}function X(fe){if(fe.slice)return fe.slice(0);var oe=new Uint8Array(fe.byteLength);return oe.set(new Uint8Array(fe)),oe.buffer}function z(){return this.bodyUsed=!1,this._initBody=function(fe){this._bodyInit=fe,fe?typeof fe=="string"?this._bodyText=fe:A.blob&&Blob.prototype.isPrototypeOf(fe)?this._bodyBlob=fe:A.formData&&FormData.prototype.isPrototypeOf(fe)?this._bodyFormData=fe:A.searchParams&&URLSearchParams.prototype.isPrototypeOf(fe)?this._bodyText=fe.toString():A.arrayBuffer&&A.blob&&w(fe)?(this._bodyArrayBuffer=X(fe.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):A.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(fe)||D(fe))?this._bodyArrayBuffer=X(fe):this._bodyText=fe=Object.prototype.toString.call(fe):this._bodyText="",this.headers.get("content-type")||(typeof fe=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):A.searchParams&&URLSearchParams.prototype.isPrototypeOf(fe)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},A.blob&&(this.blob=function(){var fe=R(this);if(fe)return fe;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?R(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(L)}),this.text=function(){var fe=R(this);if(fe)return fe;if(this._bodyBlob)return P(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(V(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},A.formData&&(this.formData=function(){return this.text().then(te)}),this.json=function(){return this.text().then(JSON.parse)},this}var G=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function Z(fe){var oe=fe.toUpperCase();return G.indexOf(oe)>-1?oe:fe}function ce(fe,oe){oe=oe||{};var Re=oe.body;if(fe instanceof ce){if(fe.bodyUsed)throw new TypeError("Already read");this.url=fe.url,this.credentials=fe.credentials,oe.headers||(this.headers=new K(fe.headers)),this.method=fe.method,this.mode=fe.mode,this.signal=fe.signal,!Re&&fe._bodyInit!=null&&(Re=fe._bodyInit,fe.bodyUsed=!0)}else this.url=String(fe);if(this.credentials=oe.credentials||this.credentials||"same-origin",(oe.headers||!this.headers)&&(this.headers=new K(oe.headers)),this.method=Z(oe.method||this.method||"GET"),this.mode=oe.mode||this.mode||null,this.signal=oe.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&Re)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(Re)}ce.prototype.clone=function(){return new ce(this,{body:this._bodyInit})};function te(fe){var oe=new FormData;return fe.trim().split("&").forEach(function(Re){if(Re){var Ue=Re.split("="),Le=Ue.shift().replace(/\+/g," "),ke=Ue.join("=").replace(/\+/g," ");oe.append(decodeURIComponent(Le),decodeURIComponent(ke))}}),oe}function se(fe){var oe=new K,Re=fe.replace(/\r?\n[\t ]+/g," ");return Re.split(/\r?\n/).forEach(function(Ue){var Le=Ue.split(":"),ke=Le.shift().trim();if(ke){var tt=Le.join(":").trim();oe.append(ke,tt)}}),oe}z.call(ce.prototype);function be(fe,oe){oe||(oe={}),this.type="default",this.status=oe.status===void 0?200:oe.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in oe?oe.statusText:"OK",this.headers=new K(oe.headers),this.url=oe.url||"",this._initBody(fe)}z.call(be.prototype),be.prototype.clone=function(){return new be(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new K(this.headers),url:this.url})},be.error=function(){var fe=new be(null,{status:0,statusText:""});return fe.type="error",fe};var me=[301,302,303,307,308];be.redirect=function(fe,oe){if(me.indexOf(oe)===-1)throw new RangeError("Invalid status code");return new be(null,{status:oe,headers:{location:fe}})},x.DOMException=m.DOMException;try{new x.DOMException}catch(fe){x.DOMException=function(oe,Re){this.message=oe,this.name=Re;var Ue=Error(oe);this.stack=Ue.stack},x.DOMException.prototype=Object.create(Error.prototype),x.DOMException.prototype.constructor=x.DOMException}function he(fe,oe){return new Promise(function(Re,Ue){var Le=new ce(fe,oe);if(Le.signal&&Le.signal.aborted)return Ue(new x.DOMException("Aborted","AbortError"));var ke=new XMLHttpRequest;function tt(){ke.abort()}ke.onload=function(){var Je={status:ke.status,statusText:ke.statusText,headers:se(ke.getAllResponseHeaders()||"")};Je.url="responseURL"in ke?ke.responseURL:Je.headers.get("X-Request-URL");var qe="response"in ke?ke.response:ke.responseText;Re(new be(qe,Je))},ke.onerror=function(){Ue(new TypeError("Network request failed"))},ke.ontimeout=function(){Ue(new TypeError("Network request failed"))},ke.onabort=function(){Ue(new x.DOMException("Aborted","AbortError"))},ke.open(Le.method,Le.url,!0),Le.credentials==="include"?ke.withCredentials=!0:Le.credentials==="omit"&&(ke.withCredentials=!1),"responseType"in ke&&A.blob&&(ke.responseType="blob"),Le.headers.forEach(function(Je,qe){ke.setRequestHeader(qe,Je)}),Le.signal&&(Le.signal.addEventListener("abort",tt),ke.onreadystatechange=function(){ke.readyState===4&&Le.signal.removeEventListener("abort",tt)}),ke.send(typeof Le._bodyInit=="undefined"?null:Le._bodyInit)})}return he.polyfill=!0,m.fetch||(m.fetch=he,m.Headers=K,m.Request=ce,m.Response=be),x.Headers=K,x.Request=ce,x.Response=be,x.fetch=he,Object.defineProperty(x,"__esModule",{value:!0}),x}({})})(c),c.fetch.ponyfill=!0,delete c.fetch.polyfill;var v=c;F=v.fetch,F.default=v.fetch,F.fetch=v.fetch,F.Headers=v.Headers,F.Request=v.Request,F.Response=v.Response,h.exports=F},17438:(h,F,o)=>{var c=o(23645);F=c(!1),F.push([h.id,`.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,.2);box-shadow:2px 3px 5px #0003;border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}
47
+ `,""]),h.exports=F},58635:(h,F,o)=>{var c=o(23645);F=c(!1),F.push([h.id,`.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid black;border-radius:4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark{background-position:left bottom;background-repeat:repeat-x}.CodeMirror-lint-mark-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=)}.CodeMirror-lint-mark-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==)}.CodeMirror-lint-marker{background-position:center center;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message{padding-left:18px;background-position:top left;background-repeat:no-repeat}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=)}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=)}.CodeMirror-lint-marker-multiple{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC);background-repeat:no-repeat;background-position:right bottom;width:100%;height:100%}
48
+ `,""]),h.exports=F},45272:(h,F,o)=>{var c=o(23645);F=c(!1),F.push([h.id,`.CodeMirror{font-family:monospace;height:300px;color:#000;direction:ltr}.CodeMirror-lines{padding:4px 0}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{padding:0 4px}.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{background-color:#fff}.CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.CodeMirror-guttermarker{color:#000}.CodeMirror-guttermarker-subtle{color:#999}.CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.cm-fat-cursor .CodeMirror-cursor{width:auto;border:0!important;background:#7e7}.cm-fat-cursor div.CodeMirror-cursors{z-index:1}.cm-fat-cursor-mark{background-color:#14ff1480;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite}.cm-animate-fat-cursor{width:auto;border:0;-webkit-animation:blink 1.06s steps(1) infinite;-moz-animation:blink 1.06s steps(1) infinite;animation:blink 1.06s steps(1) infinite;background-color:#7e7}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.cm-tab{display:inline-block;text-decoration:inherit}.CodeMirror-rulers{position:absolute;inset:-50px 0 0;overflow:hidden}.CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.cm-s-default .cm-header{color:#00f}.cm-s-default .cm-quote{color:#090}.cm-negative{color:#d44}.cm-positive{color:#292}.cm-header,.cm-strong{font-weight:700}.cm-em{font-style:italic}.cm-link{text-decoration:underline}.cm-strikethrough{text-decoration:line-through}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3,.cm-s-default .cm-type{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}.cm-s-default .cm-error,.cm-invalidchar{color:red}.CodeMirror-composing{border-bottom:2px solid}div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.CodeMirror-matchingtag{background:rgba(255,150,0,.3)}.CodeMirror-activeline-background{background:#e8f2ff}.CodeMirror{position:relative;overflow:hidden;background:white}.CodeMirror-scroll{overflow:scroll!important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative}.CodeMirror-sizer{position:relative;border-right:50px solid transparent}.CodeMirror-vscrollbar,.CodeMirror-hscrollbar,.CodeMirror-scrollbar-filler,.CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.CodeMirror-scrollbar-filler{right:0;bottom:0}.CodeMirror-gutter-filler{left:0;bottom:0}.CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none!important;border:none!important}.CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.CodeMirror-gutter-wrapper ::selection{background-color:transparent}.CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.CodeMirror-lines{cursor:text;min-height:1px}.CodeMirror pre.CodeMirror-line,.CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.CodeMirror-wrap pre.CodeMirror-line,.CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.CodeMirror-linebackground{position:absolute;inset:0;z-index:0}.CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.CodeMirror-rtl pre{direction:rtl}.CodeMirror-code{outline:none}.CodeMirror-scroll,.CodeMirror-sizer,.CodeMirror-gutter,.CodeMirror-gutters,.CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.CodeMirror-cursor{position:absolute;pointer-events:none}.CodeMirror-measure pre{position:static}div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}div.CodeMirror-dragcursors,.CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.CodeMirror-selected{background:#d9d9d9}.CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.CodeMirror-crosshair{cursor:crosshair}.CodeMirror-line::selection,.CodeMirror-line>span::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background-color:#ffa;background-color:#ff06}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:""}span.CodeMirror-selectedtext{background:none}
49
+ `,""]),h.exports=F},40961:(h,F,o)=>{var c=o(23645);F=c(!1),F.push([h.id,`.cm-s-material.CodeMirror{background-color:#263238;color:#eff}.cm-s-material .CodeMirror-gutters{background:#263238;color:#546e7a;border:none}.cm-s-material .CodeMirror-guttermarker,.cm-s-material .CodeMirror-guttermarker-subtle,.cm-s-material .CodeMirror-linenumber{color:#546e7a}.cm-s-material .CodeMirror-cursor{border-left:1px solid #FFCC00}.cm-s-material div.CodeMirror-selected,.cm-s-material.CodeMirror-focused div.CodeMirror-selected{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::selection,.cm-s-material .CodeMirror-line>span::selection,.cm-s-material .CodeMirror-line>span>span::selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-line::-moz-selection,.cm-s-material .CodeMirror-line>span::-moz-selection,.cm-s-material .CodeMirror-line>span>span::-moz-selection{background:rgba(128,203,196,.2)}.cm-s-material .CodeMirror-activeline-background{background:rgba(0,0,0,.5)}.cm-s-material .cm-keyword{color:#c792ea}.cm-s-material .cm-operator{color:#89ddff}.cm-s-material .cm-variable-2{color:#eff}.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#f07178}.cm-s-material .cm-builtin{color:#ffcb6b}.cm-s-material .cm-atom{color:#f78c6c}.cm-s-material .cm-number{color:#ff5370}.cm-s-material .cm-def{color:#82aaff}.cm-s-material .cm-string{color:#c3e88d}.cm-s-material .cm-string-2{color:#f07178}.cm-s-material .cm-comment{color:#546e7a}.cm-s-material .cm-variable{color:#f07178}.cm-s-material .cm-tag{color:#ff5370}.cm-s-material .cm-meta{color:#ffcb6b}.cm-s-material .cm-attribute,.cm-s-material .cm-property{color:#c792ea}.cm-s-material .cm-qualifier,.cm-s-material .cm-variable-3,.cm-s-material .cm-type{color:#decb6b}.cm-s-material .cm-error{color:#fff;background-color:#ff5370}.cm-s-material .CodeMirror-matchingbracket{text-decoration:underline;color:#fff!important}
50
+ `,""]),h.exports=F},31312:h=>{"use strict";/*!
17
51
  * @description Recursive object extending
18
52
  * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
19
53
  * @license MIT
@@ -38,11 +72,440 @@ i&&(t.keepState||t.inMultistep)?(_e("Already Registered",r),this.fieldsById.dele
38
72
  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
39
73
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
40
74
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
41
- */
42
- function n(e){return e instanceof t||e instanceof Date||e instanceof RegExp}function r(e){if(e instanceof t){var n=t.alloc?t.alloc(e.length):new t(e.length);return e.copy(n),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e);throw new Error("Unexpected situation")}function o(e){var t=[];return e.forEach((function(e,i){"object"==typeof e&&null!==e?Array.isArray(e)?t[i]=o(e):n(e)?t[i]=r(e):t[i]=a({},e):t[i]=e})),t}function i(e,t){return"__proto__"===t?void 0:e[t]}var a=e.exports=function(){if(arguments.length<1||"object"!=typeof arguments[0])return!1;if(arguments.length<2)return arguments[0];var e,t,s=arguments[0],l=Array.prototype.slice.call(arguments,1);return l.forEach((function(l){"object"!=typeof l||null===l||Array.isArray(l)||Object.keys(l).forEach((function(c){return t=i(s,c),(e=i(l,c))===s?void 0:"object"!=typeof e||null===e?void(s[c]=e):Array.isArray(e)?void(s[c]=o(e)):n(e)?void(s[c]=r(e)):"object"!=typeof t||null===t||Array.isArray(t)?void(s[c]=a({},e)):void(s[c]=a(t,e))}))})),s}}).call(this,n(83).Buffer)},function(e,t,n){var r=n(1102);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(714),o=n(1103),i=n(648),a=n(1104),s=n(1105),l=n(1108),c=n(1109),u=n(1110),f=n(1111),p=n(784),d=n(1112),h=n(639),v=n(1113),g=n(1114),m=n(1119),y=n(583),b=n(653),x=n(1121),w=n(593),C=n(1123),A=n(616),k=n(716),O={};O["[object Arguments]"]=O["[object Array]"]=O["[object ArrayBuffer]"]=O["[object DataView]"]=O["[object Boolean]"]=O["[object Date]"]=O["[object Float32Array]"]=O["[object Float64Array]"]=O["[object Int8Array]"]=O["[object Int16Array]"]=O["[object Int32Array]"]=O["[object Map]"]=O["[object Number]"]=O["[object Object]"]=O["[object RegExp]"]=O["[object Set]"]=O["[object String]"]=O["[object Symbol]"]=O["[object Uint8Array]"]=O["[object Uint8ClampedArray]"]=O["[object Uint16Array]"]=O["[object Uint32Array]"]=!0,O["[object Error]"]=O["[object Function]"]=O["[object WeakMap]"]=!1,e.exports=function e(t,n,S,E,j,T){var M,P=1&n,I=2&n,F=4&n;if(S&&(M=j?S(t,E,j,T):S(t)),void 0!==M)return M;if(!w(t))return t;var L=y(t);if(L){if(M=v(t),!P)return c(t,M)}else{var N=h(t),_="[object Function]"==N||"[object GeneratorFunction]"==N;if(b(t))return l(t,P);if("[object Object]"==N||"[object Arguments]"==N||_&&!j){if(M=I||_?{}:m(t),!P)return I?f(t,s(M,t)):u(t,a(M,t))}else{if(!O[N])return j?t:{};M=g(t,N,P)}}T||(T=new r);var D=T.get(t);if(D)return D;T.set(t,M),C(t)?t.forEach((function(r){M.add(e(r,n,S,r,t,T))})):x(t)&&t.forEach((function(r,o){M.set(o,e(r,n,S,o,t,T))}));var R=L?void 0:(F?I?d:p:I?k:A)(t);return o(R||t,(function(r,o){R&&(r=t[o=r]),i(M,o,e(r,n,S,o,t,T))})),M}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(631),o=n(616);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(631),o=n(716);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(593),o=n(632),i=n(1107),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var s in e)("constructor"!=s||!t&&a.call(e,s))&&n.push(s);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t,n){(function(e){var r=n(592),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=s?s(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(188)(e))},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(631),o=n(715);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(631),o=n(789);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(785),o=n(789),i=n(716);e.exports=function(e){return r(e,i,o)}},function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},function(e,t,n){var r=n(718),o=n(1115),i=n(1116),a=n(1117),s=n(1118);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(e,n);case"[object Map]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Set]":return new l;case"[object Symbol]":return a(e)}}},function(e,t,n){var r=n(718);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},function(e,t,n){var r=n(614),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},function(e,t,n){var r=n(718);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},function(e,t,n){var r=n(1120),o=n(717),i=n(632);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(593),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},function(e,t,n){var r=n(1122),o=n(687),i=n(688),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(639),o=n(595);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(1124),o=n(687),i=n(688),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(639),o=n(595);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){e.exports=n(1126)},function(e,t,n){var r=n(1127);e.exports=r},function(e,t,n){n(690),n(1128),n(612);var r=n(573);e.exports=r.WeakMap},function(e,t,n){"use strict";var r,o=n(576),i=n(696),a=n(719),s=n(1130),l=n(1131),c=n(578),u=n(601).enforce,f=n(730),p=!o.ActiveXObject&&"ActiveXObject"in o,d=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},v=e.exports=s("WeakMap",h,l);if(f&&p){r=l.getConstructor(h,"WeakMap",!0),a.REQUIRED=!0;var g=v.prototype,m=g.delete,y=g.has,b=g.get,x=g.set;i(g,{delete:function(e){if(c(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new r),m.call(this,e)||t.frozen.delete(e)}return m.call(this,e)},has:function(e){if(c(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new r),y.call(this,e)||t.frozen.has(e)}return y.call(this,e)},get:function(e){if(c(e)&&!d(e)){var t=u(this);return t.frozen||(t.frozen=new r),y.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(c(e)&&!d(e)){var n=u(this);n.frozen||(n.frozen=new r),y.call(this,e)?x.call(this,e,t):n.frozen.set(e,t)}else x.call(this,e,t);return this}})}},function(e,t,n){var r=n(574);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(572),o=n(576),i=n(719),a=n(574),s=n(585),l=n(617),c=n(697),u=n(578),f=n(611),p=n(590).f,d=n(602).forEach,h=n(580),v=n(601),g=v.set,m=v.getterFor;e.exports=function(e,t,n){var v,y=-1!==e.indexOf("Map"),b=-1!==e.indexOf("Weak"),x=y?"set":"add",w=o[e],C=w&&w.prototype,A={};if(h&&"function"==typeof w&&(b||C.forEach&&!a((function(){(new w).entries().next()})))){v=t((function(t,n){g(c(t,v,e),{type:e,collection:new w}),null!=n&&l(n,t[x],{that:t,AS_ENTRIES:y})}));var k=m(e);d(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in C)||b&&"clear"==e||s(v.prototype,e,(function(n,r){var o=k(this).collection;if(!t&&b&&!u(n))return"get"==e&&void 0;var i=o[e](0===n?0:n,r);return t?this:i}))})),b||p(v.prototype,"size",{configurable:!0,get:function(){return k(this).collection.size}})}else v=n.getConstructor(t,e,y,x),i.REQUIRED=!0;return f(v,e,!1,!0),A[e]=v,r({global:!0,forced:!0},A),b||n.setStrong(v,e,y),v}},function(e,t,n){"use strict";var r=n(696),o=n(719).getWeakData,i=n(581),a=n(578),s=n(697),l=n(617),c=n(602),u=n(582),f=n(601),p=f.set,d=f.getterFor,h=c.find,v=c.findIndex,g=0,m=function(e){return e.frozen||(e.frozen=new y)},y=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},delete:function(e){var t=v(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,c){var f=e((function(e,r){s(e,f,t),p(e,{type:t,id:g++,frozen:void 0}),null!=r&&l(r,e[c],{that:e,AS_ENTRIES:n})})),h=d(t),v=function(e,t,n){var r=h(e),a=o(i(t),!0);return!0===a?m(r).set(t,n):a[r.id]=n,e};return r(f.prototype,{delete:function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t).delete(e):n&&u(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!a(e))return!1;var n=o(e);return!0===n?m(t).has(e):n&&u(n,t.id)}}),r(f.prototype,n?{get:function(e){var t=h(this);if(a(e)){var n=o(e);return!0===n?m(t).get(e):n?n[t.id]:void 0}},set:function(e,t){return v(this,e,t)}}:{add:function(e){return v(this,e,!0)}}),f}}},function(e,t,n){"use strict";var r=t,o=n(83).Buffer;function i(e,t){try{return decodeURIComponent(e)}catch(n){return r.unescapeBuffer(e,t).toString()}}r.unescapeBuffer=function(e,t){for(var n,r,i,a=new o(e.length),s=0,l=0,c=0;l<=e.length;l++){var u=l<e.length?e.charCodeAt(l):NaN;switch(s){case 0:switch(u){case 37:n=0,r=0,s=1;break;case 43:t&&(u=32);default:a[c++]=u}break;case 1:if(i=u,u>=48&&u<=57)n=u-48;else if(u>=65&&u<=70)n=u-65+10;else{if(!(u>=97&&u<=102)){a[c++]=37,a[c++]=u,s=0;break}n=u-97+10}s=2;break;case 2:if(s=0,u>=48&&u<=57)r=u-48;else if(u>=65&&u<=70)r=u-65+10;else{if(!(u>=97&&u<=102)){a[c++]=37,a[c++]=i,a[c++]=u;break}r=u-97+10}a[c++]=16*n+r}}return a.slice(0,c-1)},r.unescape=i;for(var a=new Array(256),s=0;s<256;++s)a[s]="%"+((s<16?"0":"")+s.toString(16)).toUpperCase();r.escape=function(e){"string"!=typeof e&&(e+="");for(var t="",n=0,r=0;r<e.length;++r){var o=e.charCodeAt(r);if(!(33===o||45===o||46===o||95===o||126===o||o>=39&&o<=42||o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122))if(r-n>0&&(t+=e.slice(n,r)),o<128)n=r+1,t+=a[o];else if(o<2048)n=r+1,t+=a[192|o>>6]+a[128|63&o];else if(o<55296||o>=57344)n=r+1,t+=a[224|o>>12]+a[128|o>>6&63]+a[128|63&o];else{var i;if(!(++r<e.length))throw new URIError("URI malformed");i=1023&e.charCodeAt(r),n=r+1,t+=a[240|(o=65536+((1023&o)<<10|i))>>18]+a[128|o>>12&63]+a[128|o>>6&63]+a[128|63&o]}}return 0===n?e:n<e.length?t+e.slice(n):t};var l=function(e){return"string"==typeof e?e:"number"==typeof e&&isFinite(e)?""+e:"boolean"==typeof e?e?"true":"false":""};function c(e,t){try{return t(e)}catch(t){return r.unescape(e,!0)}}r.stringify=r.encode=function(e,t,n,o){t=t||"&",n=n||"=";var i=r.escape;if(o&&"function"==typeof o.encodeURIComponent&&(i=o.encodeURIComponent),null!==e&&"object"==typeof e){for(var a=Object.keys(e),s=a.length,c=s-1,u="",f=0;f<s;++f){var p=a[f],d=e[p],h=i(l(p))+n;if(Array.isArray(d)){for(var v=d.length,g=v-1,m=0;m<v;++m)u+=h+i(l(d[m])),m<g&&(u+=t);v&&f<c&&(u+=t)}else u+=h+i(l(d)),f<c&&(u+=t)}return u}return""},r.parse=r.decode=function(e,t,n,o){t=t||"&",n=n||"=";var a={};if("string"!=typeof e||0===e.length)return a;"string"!=typeof t&&(t+="");var s=n.length,l=t.length,u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var f=1/0;u>0&&(f=u);var p=r.unescape;o&&"function"==typeof o.decodeURIComponent&&(p=o.decodeURIComponent);for(var d=p!==i,h=[],v=0,g=0,m=0,y="",b="",x=d,w=d,C=0,A=0;A<e.length;++A){var k=e.charCodeAt(A);if(k!==t.charCodeAt(g)){if(g=0,w||(37===k?C=1:C>0&&(k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102)?3==++C&&(w=!0):C=0),m<s){if(k===n.charCodeAt(m)){if(++m===s)v<(S=A-m+1)&&(y+=e.slice(v,S)),C=0,v=A+1;continue}m=0,x||(37===k?C=1:C>0&&(k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102)?3==++C&&(x=!0):C=0)}43===k&&(m<s?(A-v>0&&(y+=e.slice(v,A)),y+="%20",x=!0):(A-v>0&&(b+=e.slice(v,A)),b+="%20",w=!0),v=A+1)}else if(++g===l){var O,S=A-g+1;if(m<s?v<S&&(y+=e.slice(v,S)):v<S&&(b+=e.slice(v,S)),x&&(y=c(y,p)),w&&(b=c(b,p)),-1===h.indexOf(y))a[y]=b,h[h.length]=y;else(O=a[y])instanceof Array?O[O.length]=b:a[y]=[O,b];if(0==--f)break;x=w=d,C=0,y=b="",v=A+1,g=m=0}}f>0&&(v<e.length||m>0)&&(v<e.length&&(m<s?y+=e.slice(v):g<l&&(b+=e.slice(v))),x&&(y=c(y,p)),w&&(b=c(b,p)),-1===h.indexOf(y)?(a[y]=b,h[h.length]=y):(O=a[y])instanceof Array?O[O.length]=b:a[y]=[O,b]);return a}},function(e,t){var n=e.exports=function(e){return new r(e)};function r(e){this.value=e}function o(e,t,n){var r=[],o=[],s=!0;return function e(f){var p=n?i(f):f,d={},h=!0,v={node:p,node_:f,path:[].concat(r),parent:o[o.length-1],parents:o,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(e,t){v.isRoot||(v.parent.node[v.key]=e),v.node=e,t&&(h=!1)},delete:function(e){delete v.parent.node[v.key],e&&(h=!1)},remove:function(e){l(v.parent.node)?v.parent.node.splice(v.key,1):delete v.parent.node[v.key],e&&(h=!1)},keys:null,before:function(e){d.before=e},after:function(e){d.after=e},pre:function(e){d.pre=e},post:function(e){d.post=e},stop:function(){s=!1},block:function(){h=!1}};if(!s)return v;function g(){if("object"==typeof v.node&&null!==v.node){v.keys&&v.node_===v.node||(v.keys=a(v.node)),v.isLeaf=0==v.keys.length;for(var e=0;e<o.length;e++)if(o[e].node_===f){v.circular=o[e];break}}else v.isLeaf=!0,v.keys=null;v.notLeaf=!v.isLeaf,v.notRoot=!v.isRoot}g();var m=t.call(v,v.node);return void 0!==m&&v.update&&v.update(m),d.before&&d.before.call(v,v.node),h?("object"!=typeof v.node||null===v.node||v.circular||(o.push(v),g(),c(v.keys,(function(t,o){r.push(t),d.pre&&d.pre.call(v,v.node[t],t);var i=e(v.node[t]);n&&u.call(v.node,t)&&(v.node[t]=i.node),i.isLast=o==v.keys.length-1,i.isFirst=0==o,d.post&&d.post.call(v,i),r.pop()})),o.pop()),d.after&&d.after.call(v,v.node),v):v}(e).node}function i(e){if("object"==typeof e&&null!==e){var t;if(l(e))t=[];else if("[object Date]"===s(e))t=new Date(e.getTime?e.getTime():e);else if(function(e){return"[object RegExp]"===s(e)}(e))t=new RegExp(e);else if(function(e){return"[object Error]"===s(e)}(e))t={message:e.message};else if(function(e){return"[object Boolean]"===s(e)}(e))t=new Boolean(e);else if(function(e){return"[object Number]"===s(e)}(e))t=new Number(e);else if(function(e){return"[object String]"===s(e)}(e))t=new String(e);else if(Object.create&&Object.getPrototypeOf)t=Object.create(Object.getPrototypeOf(e));else if(e.constructor===Object)t={};else{var n=e.constructor&&e.constructor.prototype||e.__proto__||{},r=function(){};r.prototype=n,t=new r}return c(a(e),(function(n){t[n]=e[n]})),t}return e}r.prototype.get=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r)){t=void 0;break}t=t[r]}return t},r.prototype.has=function(e){for(var t=this.value,n=0;n<e.length;n++){var r=e[n];if(!t||!u.call(t,r))return!1;t=t[r]}return!0},r.prototype.set=function(e,t){for(var n=this.value,r=0;r<e.length-1;r++){var o=e[r];u.call(n,o)||(n[o]={}),n=n[o]}return n[e[r]]=t,t},r.prototype.map=function(e){return o(this.value,e,!0)},r.prototype.forEach=function(e){return this.value=o(this.value,e,!1),this.value},r.prototype.reduce=function(e,t){var n=1===arguments.length,r=n?this.value:t;return this.forEach((function(t){this.isRoot&&n||(r=e.call(this,r,t))})),r},r.prototype.paths=function(){var e=[];return this.forEach((function(t){e.push(this.path)})),e},r.prototype.nodes=function(){var e=[];return this.forEach((function(t){e.push(this.node)})),e},r.prototype.clone=function(){var e=[],t=[];return function n(r){for(var o=0;o<e.length;o++)if(e[o]===r)return t[o];if("object"==typeof r&&null!==r){var s=i(r);return e.push(r),t.push(s),c(a(r),(function(e){s[e]=n(r[e])})),e.pop(),t.pop(),s}return r}(this.value)};var a=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};function s(e){return Object.prototype.toString.call(e)}var l=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},c=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)};c(a(r.prototype),(function(e){n[e]=function(t){var n=[].slice.call(arguments,1),o=new r(t);return o[e].apply(o,n)}}));var u=Object.hasOwnProperty||function(e,t){return t in e}},function(e,t,n){var r=n(604),o=n(583),i=n(595);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(747),o=n(639),i=n(652),a=n(583),s=n(615),l=n(653),c=n(632),u=n(686),f=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(s(e)&&(a(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(f.call(e,n))return!1;return!0}},function(e,t,n){var r=n(725),o=n(791),i=n(1141);e.exports=function(e,t){if(null==e)return{};var n,a,s=i(e,t);if(r){var l=r(e);for(a=0;a<l.length;a++)n=l[a],o(t).call(t,n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(s[n]=e[n])}return s},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){var r=n(1138);e.exports=r},function(e,t,n){var r=n(1139),o=Array.prototype;e.exports=function(e){var t=e.indexOf;return e===o||e instanceof Array&&t===o.indexOf?r:t}},function(e,t,n){n(1140);var r=n(586);e.exports=r("Array").indexOf},function(e,t,n){"use strict";var r=n(572),o=n(669).indexOf,i=n(738),a=[].indexOf,s=!!a&&1/[1].indexOf(1,-0)<0,l=i("indexOf");r({target:"Array",proto:!0,forced:s||!l},{indexOf:function(e){return s?a.apply(this,arguments)||0:o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(720),o=n(791);e.exports=function(e,t){if(null==e)return{};var n,i,a={},s=r(e);for(i=0;i<s.length;i++)n=s[i],o(t).call(t,n)>=0||(a[n]=e[n]);return a},e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";
43
- /*!
44
- * cookie
45
- * Copyright(c) 2012-2014 Roman Shtylman
46
- * Copyright(c) 2015 Douglas Christopher Wilson
47
- * MIT Licensed
48
- */t.parse=function(e,t){if("string"!=typeof e)throw new TypeError("argument str must be a string");for(var n={},o=t||{},a=e.split(i),l=o.decode||r,c=0;c<a.length;c++){var u=a[c],f=u.indexOf("=");if(!(f<0)){var p=u.substr(0,f).trim(),d=u.substr(++f,u.length).trim();'"'==d[0]&&(d=d.slice(1,-1)),null==n[p]&&(n[p]=s(d,l))}}return n},t.serialize=function(e,t,n){var r=n||{},i=r.encode||o;if("function"!=typeof i)throw new TypeError("option encode is invalid");if(!a.test(e))throw new TypeError("argument name is invalid");var s=i(t);if(s&&!a.test(s))throw new TypeError("argument val is invalid");var l=e+"="+s;if(null!=r.maxAge){var c=r.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");l+="; Max-Age="+Math.floor(c)}if(r.domain){if(!a.test(r.domain))throw new TypeError("option domain is invalid");l+="; Domain="+r.domain}if(r.path){if(!a.test(r.path))throw new TypeError("option path is invalid");l+="; Path="+r.path}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");l+="; Expires="+r.expires.toUTCString()}r.httpOnly&&(l+="; HttpOnly");r.secure&&(l+="; Secure");if(r.sameSite){switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return l};var r=decodeURIComponent,o=encodeURIComponent,i=/; */,a=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function s(e,t){try{return t(e)}catch(t){return e}}}])]);
75
+ */function F(d){return d instanceof Buffer||d instanceof Date||d instanceof RegExp}function o(d){if(d instanceof Buffer){var x=Buffer.alloc?Buffer.alloc(d.length):new Buffer(d.length);return d.copy(x),x}else{if(d instanceof Date)return new Date(d.getTime());if(d instanceof RegExp)return new RegExp(d);throw new Error("Unexpected situation")}}function c(d){var x=[];return d.forEach(function(A,w){typeof A=="object"&&A!==null?Array.isArray(A)?x[w]=c(A):F(A)?x[w]=o(A):x[w]=m({},A):x[w]=A}),x}function v(d,x){return x==="__proto__"?void 0:d[x]}var m=h.exports=function(){if(arguments.length<1||typeof arguments[0]!="object")return!1;if(arguments.length<2)return arguments[0];var d=arguments[0],x=Array.prototype.slice.call(arguments,1),A,w,T;return x.forEach(function(D){typeof D!="object"||D===null||Array.isArray(D)||Object.keys(D).forEach(function(B){if(w=v(d,B),A=v(D,B),A!==d)if(typeof A!="object"||A===null){d[B]=A;return}else if(Array.isArray(A)){d[B]=c(A);return}else if(F(A)){d[B]=o(A);return}else if(typeof w!="object"||w===null||Array.isArray(w)){d[B]=m({},A);return}else{d[B]=m(w,A);return}})}),d}},30063:(h,F,o)=>{"use strict";o.r(F),o.d(F,{Console:()=>id});var c={};o.r(c),o.d(c,{JsonPatchError:()=>Hr,_areEquals:()=>Sl,applyOperation:()=>xa,applyPatch:()=>ba,applyReducer:()=>eg,deepClone:()=>qv,getValueByPointer:()=>wl,validate:()=>vp,validator:()=>uf});var v={};o.r(v),o.d(v,{compare:()=>lg,generate:()=>zc,observe:()=>sg,unobserve:()=>ag});var m={};o.r(m),o.d(m,{cookie:()=>Ly,header:()=>My,path:()=>Fy,query:()=>ky});var d=o(67294);function x(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function A(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function w(t,r,i){return r&&A(t.prototype,r),i&&A(t,i),t}function T(t,r,i){return r in t?Object.defineProperty(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function D(){return D=Object.assign||function(t){for(var r=1;r<arguments.length;r++){var i=arguments[r];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(t[a]=i[a])}return t},D.apply(this,arguments)}function B(t,r){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);r&&(a=a.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),i.push.apply(i,a)}return i}function U(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};r%2?B(Object(i),!0).forEach(function(a){T(t,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):B(Object(i)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(i,a))})}return t}function ee(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&R(t,r)}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf:function(i){return i.__proto__||Object.getPrototypeOf(i)},K(t)}function R(t,r){return R=Object.setPrototypeOf||function(a,s){return a.__proto__=s,a},R(t,r)}function Q(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function L(t,r){if(t==null)return{};var i={},a=Object.keys(t),s,p;for(p=0;p<a.length;p++)s=a[p],!(r.indexOf(s)>=0)&&(i[s]=t[s]);return i}function P(t,r){if(t==null)return{};var i=L(t,r),a,s;if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(t);for(s=0;s<p.length;s++)a=p[s],!(r.indexOf(a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,a)||(i[a]=t[a]))}return i}function V(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function X(t,r){return r&&(typeof r=="object"||typeof r=="function")?r:V(t)}function z(t){var r=Q();return function(){var a=K(t),s;if(r){var p=K(this).constructor;s=Reflect.construct(a,arguments,p)}else s=a.apply(this,arguments);return X(this,s)}}function G(t,r){return te(t)||be(t,r)||me(t,r)||oe()}function Z(t){return ce(t)||se(t)||me(t)||fe()}function ce(t){if(Array.isArray(t))return he(t)}function te(t){if(Array.isArray(t))return t}function se(t){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(t))return Array.from(t)}function be(t,r){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(t)))){var i=[],a=!0,s=!1,p=void 0;try{for(var y=t[Symbol.iterator](),E;!(a=(E=y.next()).done)&&(i.push(E.value),!(r&&i.length===r));a=!0);}catch(b){s=!0,p=b}finally{try{!a&&y.return!=null&&y.return()}finally{if(s)throw p}}return i}}function me(t,r){if(!!t){if(typeof t=="string")return he(t,r);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return he(t,r)}}function he(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function fe(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
76
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
77
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Re(t,r){var i;if(typeof Symbol=="undefined"||t[Symbol.iterator]==null){if(Array.isArray(t)||(i=me(t))||r&&t&&typeof t.length=="number"){i&&(t=i);var a=0,s=function(){};return{s,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(b){throw b},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
78
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,y=!1,E;return{s:function(){i=t[Symbol.iterator]()},n:function(){var b=i.next();return p=b.done,b},e:function(b){y=!0,E=b},f:function(){try{!p&&i.return!=null&&i.return()}finally{if(y)throw E}}}}function Ue(t,r){return r={exports:{}},t(r,r.exports),r.exports}var Le=Ue(function(t){function r(M,J){for(var ie=0,ne=0;ne<M.length;ne++)ie=(ie<<5)-ie+M.charCodeAt(ne),ie|=0;return J[Math.abs(ie)%J.length]}function i(M,J){var ie=J.namespace;if(J.useColors){var ne=J.color,le="[3"+(ne<8?ne:"8;5;"+ne),ge=" ".concat(le,";1m").concat(ie," ");M[0]=ge+M[0].split(`
79
+ `).join(`
80
+ `+ge)}else M[0]=ie+" "+M[0]}function a(M,J){if(M[0]=(J.useColors?"%c":"")+J.namespace,!!J.useColors){var ie="color: "+J.color,ne=0,le=0;M[0].replace(/%[a-zA-Z%]/g,function(ge){ge!=="%%"&&(ne++,ge==="%c"&&(le=ne))}),M.splice(le,0,ie)}}var s=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function p(){var M;try{M=localStorage.getItem("debug")}catch(J){}return!M&&typeof process!="undefined"&&"env"in process&&(M={}.DEBUG),{namespaces:M||"",colors:s,useColors:!0,formatArgs:a}}function y(){return{namespaces:{}.DEBUG||"",colors:[6,2,3,4,5,1],useColors:!0,formatArgs:i}}function E(){var M=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,J=arguments.length>1?arguments[1]:void 0;return function(){for(var ie=arguments.length,ne=new Array(ie),le=0;le<ie;le++)ne[le]=arguments[le];M&&ne.unshift(M);var ge=J.namespaces.split(",").map(function(Fe){return Fe[Fe.length-1]==="*"?new RegExp("^"+Fe.slice(0,Fe.length-1)+".*$"):new RegExp("^"+Fe+"$")}),pe=ge.some(function(Fe){return Fe.test(M)}),Se={color:r(M,J.colors),namespace:M,useColors:J.useColors};if(!1)var xe}}function b(M){return E(M,y())}function C(M){return E(M,p())}typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?t.exports=C:t.exports=b}),ke=Le("informed:ObjMap "),tt=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return String.prototype.replace.call(r,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},Je=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0,s=String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(p,y){return p!=null?p[y]:p},r);return s===void 0||s===r?a:s},qe=function(r){return".".concat(r).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},at=function(r){return r.replace(qe(r),"").replace(/\./,"")},ut=function(r,i){var a=qe(i),s=at(i),p=a?Je(r,a):r;return!!(p&&Object.hasOwnProperty.call(p,s.replace(/\[(.*)\]/,"$1")))},gt=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=arguments.length>2?arguments[2]:void 0;String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,E){return y===E.length-1?(s[p]=a,s[p]):s[p]===void 0?(Number.isInteger(+E[y+1])?s[p]=[]:s[p]={},s[p]):(Number.isInteger(+E[y+1])&&!Array.isArray(s[p])&&(s[p]=[]),s[p])},r)},Ze=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a=!1;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,E){return s===void 0?s:(y===E.length-1&&(delete s[p],a=!0),s[p])},r),a},lt=function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",a;return String.prototype.replace.call(i,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean).reduce(function(s,p,y,E){return s===void 0?s:(y===E.length-1&&Array.isArray(s)&&(a=s.splice(p,1)),s[p])},r),a},pt=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=Object.keys(r);return i.map(function(a){return r[a]})},vt=function(r){var i=tt(r);return Number.isInteger(+i[i.length-1])},dt=function(){function t(){x(this,t)}return w(t,null,[{key:"empty",value:function(i){return pt(i).length===0}},{key:"get",value:function(i,a){var s=Je(i,a);return s}},{key:"has",value:function(i,a){return ut(i,a)}},{key:"set",value:function(i,a,s){if(s!==void 0)ke("SETTING",a,s),gt(i,a,s);else if(vt(a)&&t.get(i,a)!==void 0){ke("Special case SETTING",a,"to undefined"),gt(i,a,void 0);var p=tt(a);p=p.slice(0,p.length-1),It(i,p)}else!vt(a)&&t.get(i,a)!==void 0&&(ke("Special case REMOVING",a,"from object completley"),t.delete(i,a))}},{key:"delete",value:function(i,a){ke("DELETE",a),vt(a)?(ke("ARRAY",a),this.pullOut(i,a)):Ze(i,a);var s=tt(a);s=s.slice(0,s.length-1),It(i,s)}},{key:"pullOut",value:function(i,a){var s=tt(a),p=s[s.length-1];s=s.slice(0,s.length-1),ke("Pulling out:",s,"index",p);var y=Je(i,s);ke("Array",y),Array.isArray(y)&&lt(y,p),It(i,s)}}]),t}();function It(t,r){if(r.length!==0){var i=Je(t,r);(Array.isArray(i)?i.every(function(a){return a==null}):JSON.stringify(i)==="{}")&&Ze(t,r),It(t,r.slice(0,r.length-1))}}var Ft=d.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),Et=d.createContext({}),Ut=d.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),jt=d.createContext(),Gt=d.createContext(),wt=d.createContext(),Mt=d.createContext(),bt=d.createContext(),ve=d.createContext(),$=d.createContext(),Y=d.createContext();function ye(){var t=(0,d.useContext)(Ut);return t}function de(t){var r=(0,d.useRef)(),i=(0,d.useRef)(!0),a=(0,d.useState)(t),s=G(a,2),p=s[0],y=s[1];r.current=p;var E=function(M){r.current=M,i.current&&y(M)},b=function(){return r.current};return(0,d.useEffect)(function(){return function(){i.current=!1}},[]),[p,E,b]}var Ae=function(r){return r.type&&r.type.name?r.type.name:r.displayName||r.name||"Component"},S=function(r){var i={};if(r.inner){if(r.inner.length===0){dt.set(i,r.path,r.message);return}var a=Re(r.inner),s;try{for(a.s();!(s=a.n()).done;){var p=s.value;dt.get(i,p.path)||dt.set(i,p.path,p.message)}}catch(y){a.e(y)}finally{a.f()}}return i},Pe=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(s){var a=S(s);return a}},H=function(r){if(r.inner){if(r.inner.length===0)return;var i=r.inner[0];return i.message}},O=function(r,i){try{r.validateSync(i,{abortEarly:!1})}catch(a){return H(a)}},I=function(r,i){r(i);var a={};return r.errors&&r.errors.forEach(function(s){var p=s.message,y=s.dataPath,E=s.keyword,b=s.params,C=y;E==="required"&&(C="".concat(C,".").concat(b.missingProperty)),C=C.replace(".",""),dt.set(a,C,p)}),a},re=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(r){var i=Math.random()*16|0,a=r=="x"?i:i&3|8;return a.toString(16)})},N=function(r,i){var a;return function(){for(var p=arguments.length,y=new Array(p),E=0;E<p;E++)y[E]=arguments[E];var b=function(){clearTimeout(a),r.apply(void 0,y)};clearTimeout(a),a=setTimeout(b,i)}},_=function(r,i,a){var s=i["ui:control"],p=i["informed:props"],y=i["input:props"],E=i["ui:before"],b=i["ui:after"],C=i.oneOf,M=i.items,J=i.enum,ie=i.title,ne=i.minimum,le=i.maximum,ge=i.minLength,pe=i.maxLength,Se=i.pattern,xe=i.type,Fe=i.properties,$e=re();y&&y.id&&($e=y.id);var Be={componentType:s,field:a?"".concat(a,".").concat(r):r,type:xe,uiBefore:E,uiAfter:b,properties:xe==="object"?Fe:void 0,items:xe==="array"?M:void 0,props:U(U({label:ie,id:$e,min:ne,max:le,minLength:ge,maxLength:pe,pattern:Se},p),y)};if(C){var Ge=i.oneOf.map(function(Ve){var Ke=Ve["input:props"],ze=Ke===void 0?{}:Ke;return U({value:Ve.const,label:Ve.title},ze)});Be.props.options=Ge}if(J){var De=i.enum.map(function(Ve){return{value:Ve,label:Ve}});Be.props.options=De}if(M&&M.oneOf){var je=M.oneOf.map(function(Ve){var Ke=Ve["input:props"],ze=Ke===void 0?{}:Ke;return U({value:Ve.const,label:Ve.title},ze)});Be.props.options=je}return Be},ue=function(r,i,a){if(!r||i)return[];var s=r.properties,p=s===void 0?{}:s,y=r.allOf,E=r.propertyOrder,b=E===void 0?[]:E;if(Object.keys(p).length>0){var C=Object.keys(p).sort(function(M,J){var ie=b.indexOf(M),ne=b.indexOf(J);return(ie>-1?ie:b.length+1)-(ne>-1?ne:b.length+1)}).map(function(M){var J=p[M],ie=_(M,J,a);return ie});return y&&C.push({componentType:"conditionals",allOf:y}),C}return[]},Oe=function(r){var i=r.replace(/\./g,".properties.").replace(/\[/g,".itmes[");return i="properties.".concat(i),i},Ie=function(r,i){if(typeof r=="string")return r.split("").map(function(a){return a==="#"?/\d/:a==="*"?/[\w]/:a});if(typeof r=="function")return r(i);if(Array.isArray(r))return r;throw new Error("Formatter must be string, array, or function")},Te=function(r,i){for(var a=0,s=-1,p=!0;p&&a<r.length;)r[a]==i[a]?s=a:p=!1,a=a+1;return s},We=function(r,i){if(!r)return{val:r,offset:0};var a="".concat(r),s=Ie(i,a),p=s.findIndex(function(pe){return typeof pe!="string"}),y=s.length-Z(s).reverse().findIndex(function(pe){return typeof pe!="string"}),E=[],b=a.split(""),C=0,M=0,J=Te(s.slice(0,p),b.slice(0,p));J>-1&&(C=J+1,E=E.concat(s.slice(0,J+1)),M=J+1),J<0&&(E=E.concat(s.slice(0,p)),M=p);for(var ie=M;ie<s.length;ie++){var ne=s[ie];if(C!=b.length){var le=b[C];if(typeof ne=="function")E.push(ne(le)),C=C+1;else{var ge=typeof ne=="string"?ne===le:ne.test(le);ge&&typeof ne=="string"?(E.push(ne),C=C+1):!ge&&typeof ne=="string"?C!=b.length&&E.push(ne):ge&&typeof ne!="string"?(E.push(le),C=C+1):!ge&&typeof ne!="string"&&(C=C+1,ie=ie-1)}}else if(typeof ne=="string"&&ie>=y)E.push(ne);else break}return{value:E.join(""),offset:a?E.length-a.length:0}},He=function(r,i){var a,s,p=new Intl.NumberFormat(r,i),y=new Intl.NumberFormat(r),E=(a=(s=y.formatToParts(.1).find(function(pe){var Se=pe.type;return Se==="decimal"}))===null||s===void 0?void 0:s.value)!==null&&a!==void 0?a:".";function b(pe,Se){return pe instanceof RegExp&&Se instanceof RegExp&&pe.source===Se.source&&pe.global===Se.global&&pe.ignoreCase===Se.ignoreCase&&pe.multiline===Se.multiline}function C(pe,Se){for(var xe=pe.length;xe--;)if(Se(pe[xe]))return xe;return-1}function M(pe,Se,xe){var Fe=Z(pe);return Array.isArray(xe)?Fe.splice.apply(Fe,[Se,0].concat(Z(xe))):Fe.splice(Se,0,xe),Fe}function J(pe){return"".concat(pe).replace(/\D/g,"")}function ie(pe){return"".concat(pe).split(E).map(function(Se){return J(Se)}).join(".")}function ne(pe){if(typeof pe=="number")return pe;var Se=parseFloat(ie(pe));return Number.isNaN(Se)?void 0:Se}function le(pe){var Se=ie(pe),xe="".concat(Se).split(".")[1],Fe=p.formatToParts(Number(Se));xe==="0"&&Fe.push({type:"decimal",value:E},{type:"fraction",value:xe});var $e=Fe.reduce(function(De,je){var Ve=je.type,Ke=je.value;return["decimal","fraction"].includes(Ve)&&xe==null?De:["integer","fraction"].includes(Ve)?[].concat(Z(De),Z(Ke.split("").filter(function(ze,_e){return Ve==="fraction"?_e<xe.length:!0}).map(function(){return/\d/}))):Ve==="currency"?[].concat(Z(De),Z(Ke.split(""))):[].concat(Z(De),[Ke])},[]),Be=C($e,function(De){return b(De,/\d/)});$e.indexOf(E)===-1&&"".concat(pe).indexOf(E)!==-1&&($e=M($e,Be+1,[E,"[]"]),Be+=2);var Ge=$e.slice(Be+1).join("");return $e=[].concat(Z($e.slice(0,Be+1)),[Ge]),$e}var ge=function(Se){if(Se!=null)return ne(Se)};return{formatter:le,parser:ge}},nt=Object.freeze({__proto__:null,getChildDisplayName:Ae,yupToFormErrors:S,validateYupSchema:Pe,yupToFormError:H,validateYupField:O,validateAjvSchema:I,uuidv4:re,debounce:N,computeFieldFromProperty:_,computeFieldsFromSchema:ue,getSchemaPathFromJsonPath:Oe,informedFormat:We,createIntlNumberFormatter:He}),ht=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?d.useLayoutEffect:d.useEffect,Ct=function(r){var i=r.value,a=r.inputRef,s=r.maintainCursor,p=s===void 0?!0:s,y=de(0),E=G(y,3),b=E[0],C=E[1],M=E[2],J=de(0),ie=G(J,3),ne=ie[0],le=ie[1],ge=ie[2];return ht(function(){if(a.current!=null&&M()){var pe=M()+ge();ge()!=0&&p?a.current.setSelectionRange(pe+1,pe+1):p&&a.current.setSelectionRange(pe,pe)}},[i]),{setCursorOffset:le,setCursor:C,cursor:b,getCursor:M,cursorOffset:ne}},Yt=function(r,i){var a=(0,d.useRef)(!0),s=a.current;(0,d.useEffect)(function(){if(s)a.current=!1;else return r()},i)},kt=Le("informed:useField "),yn=function(r,i,a,s,p){if(r!=null){if(p)return p(r);if(i)return i(r);if(a&&!s){var y=We(r,a);return y.value}return r}},Xr=function(r,i,a,s){if(i&&a)return i(r);if(s){var p=We(r,s);return p.value}return r},Tn=function(r,i,a){var s=a.required;if(r||i)return function(p,y){if(i)return O(i,p);if(r)return r(p,y)};if(s)return function(p){return Pn(p,s)}},Ui=function(r){var i=r.fieldType,a=r.setValue,s=r.onChange,p=r.multiple,y=r.ref,E=function(C){return a(C)};return(i==="text"||i==="textArea"||i==="number")&&(E=function(C){return a(C.target.value,C)}),i==="select"&&(E=function(){var C=Array.from(y.current).filter(function(M){return M.selected}).map(function(M){return M.value});a(p?C:C[0]||"")}),i==="checkbox"&&(E=function(C){a(C.target.checked),s&&s(C)}),function(b){E(b)}},jr=function(r){var i=r.setTouched,a=r.onBlur;return function(s){i(!0),a&&a(s)}},jn=function(r){var i=r.fieldType,a=r.maskedValue,s=r.multiple,p=r.value;switch(i){case"text":case"number":return!a&&a!==0?"":a;case"textArea":return a||"";case"select":return p||(s?[]:"");case"checkbox":return!!p;default:return p}},$n=function(r){switch(r){case"text":return r;case"number":return r;case"checkbox":return r;default:return}},Pn=function(r,i){if(i&&(r==null||r===""))return typeof i=="string"?i:"This field is required"};function Kn(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,i=t.field,a=t.validate,s=t.asyncValidate,p=t.validationSchema,y=t.mask,E=t.maskWithCursorOffset,b=t.format,C=t.parse,M=t.formatter,J=t.parser,ie=t.initialValue,ne=t.validateOnChange,le=t.validateOnBlur,ge=t.validateOnMount,pe=t.asyncValidateOnBlur,Se=t.maskOnBlur,xe=t.allowEmptyString,Fe=t.onValueChange,$e=t.notify,Be=t.keepState,Ge=t.maintainCursor,De=t.debug,je=t.shadow,Ve=t.step,Ke=t.fieldType,ze=t.multiple,_e=t.onChange,xt=t.onBlur,Nt=t.formController,Wt=t.relevant,lr=t.required,Rr=t.keepStateIfRelevant,Or=t.initialize,Gr=t.formatterDependencies,wr=Gr===void 0?[]:Gr,Ur=P(t,["field","validate","asyncValidate","validationSchema","mask","maskWithCursorOffset","format","parse","formatter","parser","initialValue","validateOnChange","validateOnBlur","validateOnMount","asyncValidateOnBlur","maskOnBlur","allowEmptyString","onValueChange","notify","keepState","maintainCursor","debug","shadow","step","fieldType","multiple","onChange","onBlur","formController","relevant","required","keepStateIfRelevant","initialize","formatterDependencies"]),gn=(0,d.useState)(re()),Xt=G(gn,1),Rt=Xt[0],Bt=(0,d.useContext)(Ft),ur=(0,d.useContext)(Y),tn=ur||Rr,yr=ye(),ys=(0,d.useRef)(),Cl=(0,d.useRef)(!0),Sa=(0,d.useRef)(),Di=(0,d.useRef)(!1),Ol=function(){return!Di.current},gf=function(){return Di.current};Nt&&(Bt=Nt.updater,yr=Nt.getFormApi());var xi=Tn(a,p,{required:lr}),Tl=(0,d.useState)(function(){return Bt.getInitialValue(i)}),um=G(Tl,1),fm=um[0],yf=Bt.getSavedValue(i),mf,th;(Be||tn)&&yf?(kt("Setting field ".concat(bd,"'s kept state"),yf),mf=yf.value,th=yf.touched,yr.removeSavedState(bd)):ie!=null?mf=ie:mf=fm;var cm=de(yn(mf,y,M,J,Or)),ad=G(cm,3),Pl=ad[0],sd=ad[1],dm=ad[2],pm=de(ge?xi(Pl):void 0),ld=G(pm,3),rh=ld[0],nh=ld[1],hm=ld[2],vm=de(th),ud=G(vm,3),ih=ud[0],gm=ud[1],oh=ud[2],ym=(0,d.useState)(function(){return Xr(Pl,b,C,M)}),ah=G(ym,2),fd=ah[0],cd=ah[1],sh=(0,d.useRef)();sh.current=fd;var lh=(0,d.useRef)(ie),Aa=(0,d.useRef)(i),uh=(0,d.useRef)();lh.current=ie,Aa.current=i;var mm=(0,d.useRef)(null),Bi=d.useMemo(function(){return r||mm},[]),dd=Ct({value:Pl,inputRef:Bi,maintainCursor:!!Ge}),pd=dd.getCursor,xm=dd.setCursor,hd=dd.setCursorOffset,bm=function(){return!0},vd=function(fr){var rn=Wt||bm,Bn=yr.getFullField(Aa.current)||Aa.current,Qt={path:Bn,parentPath:Bn.replace(/(.*)[.[].*/,"$1"),get:function(Un,kl){return dt.get(Un,kl)}};return ur&&ur.relevant?rn(fr,Qt)&&ur.relevant(fr,Qt):rn(fr,Qt)},wm=de(vd(yr.getValues())),gd=G(wm,3),xf=gd[0],Sm=gd[1],fh=gd[2],Am=function(fr){return ur&&ur.relevant?ur.relevant(fr):!0},Em=function(){var fr=vd(yr.getValues()),rn=fh();return fr!=rn&&Sm(fr),fr};(0,d.useEffect)(function(){!xf&&!Be&&ys.current.reset()},[xf]);var oi=function(){return je?yr.getDerrivedValue(i):dm()},Il=function(fr){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bn=rn.preventUpdate;Ve&&yr.getStep()<Ve?(kt("Setting ".concat(i,"'s error to undefined as we are not at that step")),nh(void 0),Bt.setError(Rt,void 0,!Bn)):(kt("Setting ".concat(i,"'s error to ").concat(fr)),nh(fr),Bt.setError(Rt,fr,!Bn))},yd=function(fr,rn){var Bn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Qt=fr;Di.current=!0,kt("Setting ".concat(i," to ").concat(Qt)),Or&&(Qt=Or(Qt));var Ea=yr.getOptions(),Un=Qt;if(Qt===""&&!xe&&!Bn.allowEmptyString&&!Ea.allowEmptyStrings&&(Qt=void 0),(t.type==="number"||Ke==="number")&&Qt!==void 0&&(Qt=+Qt),rn&&rn.target&&rn.target.selectionStart&&xm(rn.target.selectionStart),y&&!Se&&(Un=y(Qt,pd()),Qt=y(Qt,pd())),E&&!Se){var kl=E(Qt,pd());Un=kl.value,Qt=kl.value,hd(kl.offset)}if(b&&C&&(Qt=C(Qt),Un=b(Qt)),M){var ch=We(Qt,M);hd(ch.offset),Un=ch.value,Qt=Un}J&&(Qt=Qt!=null?J(Qt):Qt),xi&&ne&&!Bn.initial&&(kt("Validating after change ".concat(i," ").concat(Qt)),Il(xi(Qt,yr.getValues()))),sd(Qt),cd(Un),Fe&&Fe(Qt),Bt.setValue(Rt,Qt,!Bn.preventUpdate)};Yt(function(){ys.current.setValue(sh.current)},Z(wr));var md=function(fr,rn){var Bn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Qt=Bn.preventUpdate;if(kt("Field ".concat(i," has been touched")),xi&&le&&!rn&&fr&&(kt("Validating after blur ".concat(i," ").concat(oi())),Il(xi(oi(),yr.getValues()))),s&&pe&&!rn&&fr&&(kt("Validating async after blur ".concat(i," ").concat(oi())),s(oi(),yr.getValues())),y&&Se){var Ea=y(oi());sd(Ea),cd(Ea),Fe&&Fe(Ea),Bt.setValue(Rt,Ea,!Qt)}if(E&&Se){var Un=E(oi());hd(Un.offset),sd(Un.value),cd(Un.value),Fe&&Fe(Un.value),Bt.setValue(Rt,Un.value,!Qt)}gm(fr),Bt.setTouched(Rt,fr,!Qt)},Cm=function(){var fr=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},rn=fr.preventUpdate,Bn=yn(lh.current||Bt.getInitialValue(Aa.current),y,M,J,Or);yd(Bn,null,{initial:!0,preventUpdate:rn}),Il(ge?xi(Bn):void 0,{preventUpdate:rn}),md(void 0,!0,{preventUpdate:rn}),Di.current=!1},Om=function(fr){xi&&(kt("Field validating ".concat(i," ").concat(oi())),Il(xi(oi(),fr||yr.getValues())))},Tm=function(fr){s&&(kt("Field async validating ".concat(i," ").concat(oi())),s(oi(),fr||yr.getValues()))},xd={setValue:yd,setTouched:md,setError:Il,reset:Cm,validate:Om,asyncValidate:Tm,getValue:oi,getTouched:oh,getError:hm,getIsRelevant:fh,getDirty:gf,getPristine:Ol,getFieldState:function(){return{value:oi(),touched:oh(),dirty:gf(),pristine:Ol()}},relevant:vd,multistepRelevant:Am,checkRelevant:Em};ys.current=xd;var Fl={value:Pl,error:rh,touched:ih,maskedValue:fd,isRelevant:xf,dirty:Di.current,pristine:!Di.current};je&&(Fl={error:rh,touched:ih}),kt("Render",yr.getFullField(i),Fl),ht(function(){var Jr=yr.getFullField(Aa.current);return kt("Register",Rt,Aa.current),Sa.current={field:Jr,fieldId:Rt,fieldApi:xd,fieldState:Fl,notify:$e,keepState:Be,inMultistep:tn,shadow:je},Bt.register(Rt,Sa.current),function(){var fr=yr.getFullField(Aa.current);kt("Deregister",Rt,fr),Bt.deregister(Rt)}},[]),(0,d.useEffect)(function(){var Jr=yr.getFullField(i);return Cl.current?Cl.current=!1:(kt("Update",i,tn),Sa.current.field=Jr,Bt.update(Rt,Sa.current,uh.current)),function(){uh.current=Jr}},[i]),ht(function(){De&&Bi&&(Bi.current.style.border="5px solid orange",setTimeout(function(){Bi.current.style.borderWidth="2px",Bi.current.style.borderStyle="inset",Bi.current.style.borderColor="initial",Bi.current.style.borderImage="initial"},500))});var Pm=[].concat(Z(Object.values(Fl)),Z(Object.values(t)),Z(Object.values(Ur))),Im=function(fr){return(0,d.useMemo)(function(){return xf?fr:null},Z(Pm))},bd=i,Fm=Ui({fieldType:Ke,setValue:yd,onChange:_e,multiple:ze,ref:Bi}),km=jr({setTouched:md,onBlur:xt}),Rm=jn({fieldType:Ke,maskedValue:fd,multiple:ze,value:Pl}),Mm=$n(Ke);return{fieldState:Fl,fieldApi:xd,render:Im,ref:Bi,userProps:U(U({},Ur),{},{multiple:ze,onChange:_e,onBlur:xt,id:Ur.id||Rt}),informed:U({name:bd,multiple:ze,onChange:Fm,onBlur:km,value:Rm,ref:Bi,type:Mm,id:Ur.id||Rt},Ur)}}var ln=function(r){var i=d.forwardRef(function(a,s){var p=Kn(a,s),y=p.fieldState,E=p.fieldApi,b=p.render,C=p.ref,M=p.userProps;return b(d.createElement(r,D({fieldApi:E,fieldState:y,field:a.field,forwardedRef:C,debug:a.debug,type:a.type},M)))});return i.displayName="asField(".concat(Ae(r),")"),i},Ca=Le("informed:Text "),Ho=function(r){var i=r.fieldApi,a=r.fieldState,s=P(r,["fieldApi","fieldState"]),p=a.maskedValue,y=i.setValue,E=i.setTouched,b=s.onChange,C=s.onBlur,M=s.field,J=s.initialValue,ie=s.forwardedRef,ne=s.debug,le=s.label,ge=s.title,pe=s.id,Se=P(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return Ca("Render",M),ht(function(){ne&&ie&&(ie.current.style.background="red",setTimeout(function(){ie.current.style.background="white"},500))}),d.createElement(d.Fragment,null,le?d.createElement("label",{htmlFor:pe}," ",le," "):null,d.createElement("input",D({},Se,{id:pe,name:M,ref:ie,value:!p&&p!==0?"":p,onChange:function(Fe){y(Fe.target.value,Fe),b&&b(Fe)},onBlur:function(Fe){E(!0),C&&C(Fe)}})))},mn=ln(Ho),Yn=function(r){var i=r.fieldApi,a=r.fieldState,s=P(r,["fieldApi","fieldState"]),p=a.maskedValue,y=i.setValue,E=i.setTouched,b=s.onChange,C=s.onBlur,M=s.field,J=s.initialValue,ie=s.forwardedRef,ne=s.debug,le=s.label,ge=s.id,pe=P(s,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return ht(function(){ne&&ie&&(ie.current.style.background="red",setTimeout(function(){ie.current.style.background="white"},500))}),d.createElement(d.Fragment,null,le?d.createElement("label",{htmlFor:ge}," ",le," "):null,d.createElement("textarea",D({},pe,{id:ge,name:M,ref:ie,value:p||"",onChange:function(xe){y(xe.target.value,xe),b&&b(xe)},onBlur:function(xe){E(!0),C&&C(xe)}})))},bi=ln(Yn),ji=Le("informed:Select "),Vn=function(r){var i=r.fieldApi,a=r.fieldState,s=P(r,["fieldApi","fieldState"]),p=a.value,y=i.setTouched,E=s.onChange,b=s.onBlur,C=s.field,M=s.initialValue,J=s.options,ie=s.children,ne=s.forwardedRef,le=s.debug,ge=s.multiple,pe=s.label,Se=s.id,xe=P(s,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),Fe=(0,d.useRef)(),$e=function(Ge){var De=Array.from((ne||Fe).current).filter(function(je){return je.selected}).map(function(je){return je.value});i.setValue(ge?De:De[0]||""),E&&Ge&&E(Ge)};return ht(function(){le&&ne&&(ne.current.style.background="red",setTimeout(function(){ne.current.style.background="white"},500))}),ji("Render",C,p),d.createElement(d.Fragment,null,pe?d.createElement("label",{htmlFor:Se}," ",pe," "):null,d.createElement("select",D({},xe,{id:Se,multiple:ge,name:C,ref:ne||Fe,value:p||(ge?[]:""),onChange:$e,onBlur:function(Ge){y(!0),b&&b(Ge)}}),J?J.map(function(Be){return d.createElement("option",{key:Be.value,value:Be.value,disabled:Be.disabled},Be.label)}):ie))},wi=ln(Vn),Oa=function(r){var i=r.fieldApi,a=r.fieldState,s=P(r,["fieldApi","fieldState"]),p=a.value,y=i.setValue,E=i.setTouched,b=s.onChange,C=s.onBlur,M=s.field,J=s.initialValue,ie=s.debug,ne=s.forwardedRef,le=s.id,ge=s.label,pe=P(s,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return d.createElement(d.Fragment,null,ge?d.createElement("label",{htmlFor:le}," ",ge," "):null,d.createElement("input",D({},pe,{id:le,name:M,ref:ne,checked:!!p,onChange:function(xe){y(xe.target.checked),b&&b(xe)},onBlur:function(xe){E(!0),C&&C(xe)},type:"checkbox"})))},In=ln(Oa),xn=function(r){return d.forwardRef(function(i,a){return d.createElement(jt.Consumer,null,function(s){var p=s.radioGroupApi,y=s.radioGroupState;return d.createElement(r,D({radioGroupApi:p,radioGroupState:y,ref:a},i))})})},Si=function(r){var i=r.radioGroupApi,a=r.radioGroupState,s=P(r,["radioGroupApi","radioGroupState"]),p=a.value,y=i.setValue,E=i.setTouched,b=i.onChange,C=i.onBlur,M=s.value,J=s.onChange,ie=s.onBlur,ne=s.field,le=s.initialValue,ge=s.forwardedRef,pe=P(s,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return d.createElement("input",D({},pe,{name:ne,ref:ge,value:M,checked:p===M,onChange:function(xe){!xe.target.checked||(y(M),J&&J(xe),b&&b(xe))},onBlur:function(xe){E(!0),ie&&ie(xe),C&&C(xe)},type:"radio"}))},xr=xn(Si),St=function(t){ee(i,t);var r=z(i);function i(){return x(this,i),r.apply(this,arguments)}return w(i,[{key:"render",value:function(){var s=this.props,p=s.options,y=s.children;return d.createElement(jt.Provider,{value:this.groupContext},p?p.map(function(E){return d.createElement("label",{key:E.value},E.label," ",d.createElement(xr,{value:E.value}))}):y)}},{key:"groupContext",get:function(){return{radioGroupApi:U(U({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),i}(d.Component),ai=ln(St);function Ai(){return(0,d.useContext)(wt)}var bn=function(){var r=Ai(),i=r.add;return d.createElement("button",{onClick:function(){i()},type:"button"},"Add")};function er(){return(0,d.useContext)(Mt)}var Hn=function(){var r=er(),i=r.remove;return d.createElement("button",{onClick:function(){i()},type:"button"},"Remove")},Jn=Le("informed:useArrayField "),lo=function(r){var i=r.field,a=r.initialValue,s=r.validate,p=r.arrayFieldApiRef,y=P(r,["field","initialValue","validate","arrayFieldApiRef"]),E=ye(),b=(0,d.useState)(new Map),C=G(b,1),M=C[0],J=(0,d.useContext)(Ft),ie=E.getFullField(i),ne=J.getInitialValue(i)||a||[],le=E.getSavedValue(ie)&&E.getSavedValue(ie).value,ge=de(le||ne),pe=G(ge,3),Se=pe[0],xe=pe[1],Fe=pe[2],$e=Se?Se.map(function(){return re()}):[],Be=de($e),Ge=G(Be,3),De=Ge[0],je=Ge[1],Ve=Ge[2],Ke=(0,d.useMemo)(function(){return function(Xt,Rt){var Bt=Ve()==null?0:Ve().length;return s?s(Xt,Bt,Rt):void 0}}),ze=Kn(U({field:i,validate:s?Ke:void 0,shadow:!0},y)),_e=ze.fieldApi;ht(function(){var Xt=function(Bt){Bt!==ie&&(Jn("".concat(ie," changed")),RegExp("".concat(ie,"\\[[0-9]+\\]")).test(Bt)&&_e.validate())};return E.emitter.on("value",Xt),function(){E.emitter.removeListener("value",Xt)}},[i]);var xt=function(Rt){Jn("EXPECTING REMOVAL OF","".concat(i,"[").concat(Rt,"] and ").concat(i,"[").concat(De.length-1,"]")),J.expectRemoval("".concat(i,"[").concat(Rt,"]")),J.expectRemoval("".concat(i,"[").concat(De.length-1,"]"));var Bt=De.slice(0,Rt).concat(De.slice(Rt+1,De.length));je(Bt);var ur=Fe(),tn=ur.slice(0,Rt).concat(ur.slice(Rt+1,ur.length));xe(tn)},Nt=function(Rt,Bt){Jn("Swapping","".concat(i,"[").concat(Rt,"] and ").concat(i,"[").concat(Bt,"]"));var ur=Z(De);De[Rt]&&De[Bt]?(ur[Rt]=De[Bt],ur[Bt]=De[Rt]):console.warn("Attempted to swap ".concat(Rt," with ").concat(Bt," but one of them does not exist :(")),je(ur)},Wt=function(){De.push(re()),je(Z(De))},lr=function(Rt){De.push(re()),je(Z(De));var Bt=Z(Fe());Bt[De.length-1]=Rt,xe(Bt)},Rr=function(){var Rt=J.getInitialValue(i)||a||[];xe(Rt);var Bt=Rt?Rt.map(function(){return re()}):[];je(Bt)},Or=De.map(function(Xt,Rt){var Bt={remove:function(){return xt(Rt)}},ur={initialValue:Se&&Se[Rt],key:Xt,field:"".concat(i,"[").concat(Rt,"]"),index:Rt};return U(U({arrayFieldItemApi:Bt,arrayFieldItemState:ur},Bt),ur)}),Gr={add:Wt,swap:Nt,addWithInitialValue:lr,reset:Rr};p&&(p.current=Gr);var wr={fields:Or,field:i},Ur=U(U({},J),{},{register:function(Rt,Bt){M.set(Rt,Bt);for(var ur=arguments.length,tn=new Array(ur>2?ur-2:0),yr=2;yr<ur;yr++)tn[yr-2]=arguments[yr];J.register.apply(J,[Rt,Bt].concat(tn))},deregister:function(Rt){M.delete(Rt);for(var Bt=arguments.length,ur=new Array(Bt>1?Bt-1:0),tn=1;tn<Bt;tn++)ur[tn-1]=arguments[tn];J.deregister.apply(J,[Rt].concat(ur))},getInitialValue:function(Rt){if(RegExp("".concat(ie,"\\[[0-9]+\\]")).test(Rt)){var Bt=Rt.replace(i,""),ur=dt.get(Fe(),Bt);return Jn("Resetting ".concat(Bt," to ").concat(ur)),ur}return J.getInitialValue(Rt)}}),gn=function(Rt){return d.createElement(Ft.Provider,{value:Ur},d.createElement(wt.Provider,{value:Gr},d.createElement(Gt.Provider,{value:wr},Rt)))};return{render:gn,add:Wt,swap:Nt,addWithInitialValue:lr,fields:Or,arrayFieldState:wr,arrayFieldApi:Gr,field:i}},rt=function(r,i){return U(U({},i),{},{getValue:function(s){return i.getValue("".concat(r,".").concat(s))},getTouched:function(s){return i.getTouched("".concat(r,".").concat(s))},getError:function(s){return i.getError("".concat(r,".").concat(s))},setValue:function(s,p){return i.setValue("".concat(r,".").concat(s),p)},setTouched:function(s,p){return i.setTouched("".concat(r,".").concat(s),p)},setError:function(s,p){return i.setError("".concat(r,".").concat(s),p)},getInitialValue:function(s){return i.getInitialValue("".concat(r,".").concat(s))},getSavedValue:function(s){return i.getSavedValue("".concat(r,".").concat(s))},getFullField:function(s){return"".concat(i.getFullField(r),".").concat(s)}})};function Lt(t){var r=ye(),i=(0,d.useMemo)(function(){return rt(t,r)},[t]);return i}function si(){var t=(0,d.useContext)(Et);return t}var ae=function(r){var i=r.when,a=r.children,s=si(),p=i(s);return p?a:null},Ce=function(r){var i=r.relevant,a=r.field,s=P(r,["relevant","field"]),p=ye();if(i){var y=p.getFullField(a),E={path:y,parentPath:y.replace(/(.*)[.[].*/,"$1"),get:function(M,J){return dt.get(M,J)}},b=function(M){var J=M.values;return i(J,E)};return d.createElement(ae,{when:b},d.createElement(Qe,D({field:a},s)))}else return d.createElement(Qe,D({field:a},s))},Qe=function(r){var i=r.children,a=P(r,["children"]),s=lo(a),p=s.render,y=s.arrayFieldState,E=s.arrayFieldApi,b=s.field;return p(typeof i=="function"?i(U(U({field:b,arrayFieldApi:E,arrayFieldState:y},E),y)):i)},it=function(r){var i=r.arrayFieldItemState,a=r.arrayFieldItemApi,s=r.children,p=(0,d.useContext)(Ft),y=ye(),E=(0,d.useState)(0),b=G(E,2),C=b[0],M=b[1],J=(0,d.useState)(new Map),ie=G(J,1),ne=ie[0],le=i.field,ge=Lt(le),pe=function(){var De=y.getState(),je=De.values,Ve=De.errors,Ke=De.touched,ze={values:dt.get(je,le),errors:dt.get(Ve,le),touched:dt.get(Ke,le)};return ze};(0,d.useEffect)(function(){var Ge=function(je){var Ve=je.slice(0,je.lastIndexOf("[")!=-1?je.lastIndexOf("]")+1:je.length);Ve===le&&M(Math.random())};return y.emitter.on("value",Ge),function(){y.emitter.removeListener("value",Ge)}},[le]);var Se=function(){ne.forEach(function(De){De.fieldApi.reset()})},xe=pe(),Fe=U(U({},p),{},{register:function(De,je,Ve){ne.set(De,je),p.register(De,je,Ve)},deregister:function(De){ne.delete(De);for(var je=arguments.length,Ve=new Array(je>1?je-1:0),Ke=1;Ke<je;Ke++)Ve[Ke-1]=arguments[Ke];p.deregister.apply(p,[De].concat(Ve))}}),$e=U(U(U({},a),ge),{},{reset:Se}),Be=U(U({},i),xe);return typeof s=="function"?d.createElement(Ft.Provider,{value:Fe},d.createElement(Mt.Provider,{value:$e},d.createElement(bt.Provider,{value:Be},s(U(U({arrayFieldItemApi:$e,arrayFieldItemState:Be},$e),Be))))):d.createElement(Ft.Provider,{value:Fe},d.createElement(Mt.Provider,{value:$e},d.createElement(bt.Provider,{value:Be},s)))};Ce.Items=function(t){var r=t.children,i=(0,d.useContext)(Gt),a=i.fields;return a.map(function(s){var p=s.arrayFieldItemState,y=s.arrayFieldItemApi,E=p.key;return d.createElement(it,{key:E,arrayFieldItemApi:y,arrayFieldItemState:p},r)})};var st=function(r){var i=r.components,a=(0,d.useContext)(Ft),s=a.fieldMap;return i?i.map(function(p,y){var E=p["ui:control"],b=s[E];return d.createElement(b,{key:"ui-comp-".concat(y)})}):null},$t=Le("informed:FormFields "),Zt=function t(r){var i=r.schema,a=r.prefix,s=r.onlyValidateSchema,p=(0,d.useContext)(Ft),y=p.fieldMap,E=(0,d.useMemo)(function(){var b=ue(i,s,a),C=b.map(function(M,J){var ie=M.field,ne=M.props,le=M.type,ge=M.properties,pe=M.items,Se=M.componentType,xe=M.uiBefore,Fe=M.uiAfter,$e=M.allOf,Be=y[Se];return $t("Rendering Field",ie,M),!Be&&le==="object"&&ge?d.createElement(t,{schema:M,prefix:ie,key:"ScheamField-".concat(J)}):!Be&&le==="array"&&pe?d.createElement(Tr,D({key:"ScheamField-".concat(J),field:ie,items:pe,uiBefore:xe,uiAfter:Fe},ne)):Be&&Se==="array"&&pe&&le==="array"?d.createElement(Be,D({key:"ScheamField-".concat(J),field:ie,items:pe,uiBefore:xe,uiAfter:Fe},ne)):Se==="conditionals"?$e.map(function(Ge){var De=Ge.then,je=Ge.if.properties,Ve=function(ze){var _e=ze.values;return Object.keys(je).every(function(xt){var Nt=je[xt];return _e[xt]===Nt.const})};return d.createElement(ae,{key:"ScheamField-".concat(J),when:Ve},d.createElement(t,{schema:De}))}):Be?d.createElement(Be,D({key:"ScheamField-".concat(J),field:ie},ne)):null});return C},[i,a]);return E},Tr=function(r){var i=r.field,a=r.items,s=r.uiBefore,p=r.uiAfter,y=P(r,["field","items","uiBefore","uiAfter"]);return d.createElement(Ce,D({field:i},y),d.createElement(st,{components:s}),d.createElement(Ce.Items,null,function(E){var b=E.field;return d.createElement(d.Fragment,null,d.createElement(st,{components:a["ui:before"]}),d.createElement(Zt,{schema:a,prefix:b}),d.createElement(st,{components:a["ui:after"]}))}),d.createElement(st,{components:p}))},Pr={select:wi,input:mn,textarea:bi,checkbox:In,radio:ai,add:bn,remove:Hn,array:Tr},tr=Le("informed:Controller "),Rl=function(r,i){var a=Object.keys(i).find(function(p){return r.includes(p)});if(!!a){var s=r.slice(0,a.length);return s===a}},Qr=function(){},ms=function(){function t(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};x(this,t),this.options=i,this.subscriptions=new Map;var a=i.ajv,s=i.schema,p=i.fieldMap;this.ajv=a?new a({allErrors:!0}):null,this.ajvValidate=a?this.ajv.compile(s):null,this.fieldMap=p||Pr,this.fieldsById=new Map,this.fieldsByName={get:function(E){var b;return r.fieldsById.forEach(function(C){C&&C.field===E&&(b=C)}),b}},this.onScreen={},this.expectedRemovals={},this.pulledOut={},this.savedValues={},this.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},this.dummyField={fieldApi:{setValue:Qr,setTouched:Qr,setError:Qr,reset:Qr,validate:Qr,getValue:Qr,getTouched:Qr,getError:Qr,getFieldState:Qr,checkRelevant:Qr,getPristine:Qr,getDirty:Qr}},this.deregister=this.deregister.bind(this),this.register=this.register.bind(this),this.getValue=this.getValue.bind(this),this.getTouched=this.getTouched.bind(this),this.getError=this.getError.bind(this),this.getErrors=this.getErrors.bind(this),this.setValue=this.setValue.bind(this),this.getValues=this.getValues.bind(this),this.getStep=this.getStep.bind(this),this.setStep=this.setStep.bind(this),this.back=this.back.bind(this),this.next=this.next.bind(this),this.setCurrent=this.setCurrent.bind(this),this.setTouched=this.setTouched.bind(this),this.setError=this.setError.bind(this),this.setFormError=this.setFormError.bind(this),this.submitForm=this.submitForm.bind(this),this.reset=this.reset.bind(this),this.update=this.update.bind(this),this.validate=this.validate.bind(this),this.screenValid=this.screenValid.bind(this),this.keyDown=this.keyDown.bind(this),this.getField=this.getField.bind(this),this.getInitialValue=this.getInitialValue.bind(this),this.setInitialValue=this.setInitialValue.bind(this),this.getOptions=this.getOptions.bind(this),this.getFormState=this.getFormState.bind(this),this.expectRemoval=this.expectRemoval.bind(this),this.getSavedValue=this.getSavedValue.bind(this),this.removeSavedState=this.removeSavedState.bind(this),this.getDerrivedValue=this.getDerrivedValue.bind(this),this.setValues=this.setValues.bind(this),this.resetField=this.resetField.bind(this),this.fieldExists=this.fieldExists.bind(this),this.validateField=this.validateField.bind(this),this.notify=this.notify.bind(this),this.validating=this.validating.bind(this),this.validated=this.validated.bind(this),this.getDirty=this.getDirty.bind(this),this.getPristine=this.getPristine.bind(this),this.on=this.on.bind(this),this.emit=this.emit.bind(this),this.removeListener=this.removeListener.bind(this),this.updater={register:this.register,deregister:this.deregister,getField:this.getField,update:this.update,fieldMap:this.fieldMap,setValue:function(E,b){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,M=r.fieldsById.get(E);M.shadow||dt.set(r.state.values,M.field,M.fieldApi.getValue()),M.fieldApi.relevant(r.state.values)||dt.delete(r.state.values,M.field),r.fieldsById.forEach(function(J){var ie=J.fieldApi.checkRelevant();(!J.fieldApi.multistepRelevant(r.state.values)||!ie&&!J.keepState)&&(dt.delete(r.state.values,J.field),dt.delete(r.state.touched,J.field),dt.delete(r.state.errors,J.field))}),C&&(r.emit("change"),r.emit("field",M.field),r.emit("value",M.field,b))},setTouched:function(E,b){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,M=r.fieldsById.get(E);!M.shadow&&M.fieldApi.getIsRelevant()&&dt.set(r.state.touched,M.field,M.fieldApi.getTouched()),M.shadow&&M.fieldApi.getError()!=null&&M.fieldApi.relevant(r.state.values)&&dt.set(r.state.touched,M.field,M.fieldApi.getTouched()),C&&(r.emit("change"),r.emit("field",M.field))},setError:function(E,b){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,M=r.fieldsById.get(E);!M.shadow&&M.fieldApi.getIsRelevant()&&dt.set(r.state.errors,M.field,M.fieldApi.getError());var J=dt.get(r.state.errors,M.field);(M.shadow&&M.fieldApi.getError()!=null&&M.fieldApi.relevant(r.state.values)||M.shadow&&M.fieldApi.getError()===void 0&&M.fieldApi.relevant(r.state.values)&&typeof J=="string")&&dt.set(r.state.errors,M.field,M.fieldApi.getError()),C&&(r.emit("change"),r.emit("field",M.field))},expectRemoval:this.expectRemoval,getInitialValue:this.getInitialValue,getSavedValue:this.getSavedValue},this.formApi={setValue:this.setValue,setTouched:this.setTouched,setError:this.setError,setFormError:this.setFormError,setValues:this.setValues,setInitialValue:this.setInitialValue,getValue:this.getValue,getTouched:this.getTouched,getError:this.getError,reset:this.reset,submitForm:this.submitForm,getState:this.getFormState,getValues:this.getValues,getFullField:this.getFullField,fieldExists:this.fieldExists,getInitialValue:this.getInitialValue,validate:this.validate,validateField:this.validateField,screenValid:this.screenValid,resetField:this.resetField,getOptions:this.getOptions,emitter:this,getSavedValue:this.getSavedValue,removeSavedState:this.removeSavedState,getDerrivedValue:this.getDerrivedValue,getStep:this.getStep,setStep:this.setStep,next:this.next,back:this.back,setCurrent:this.setCurrent,validated:this.validated,validating:this.validating,getDirty:this.getDirty,getPristine:this.getPristine,getField:this.getField},this.on("value",function(y){delete r.state.error,r.notify(y)})}return w(t,[{key:"emit",value:function(i){for(var a=arguments.length,s=new Array(a>1?a-1:0),p=1;p<a;p++)s[p-1]=arguments[p];var y=this.subscriptions.get(i);y&&y.forEach(function(E){return E.apply(void 0,s)})}},{key:"on",value:function(i,a){this.subscriptions.get(i)||this.subscriptions.set(i,new Set);var s=this.subscriptions.get(i);s.add(a)}},{key:"removeListener",value:function(i,a){var s=this.subscriptions.get(i);s.delete(a)}},{key:"setOptions",value:function(i){this.options=i}},{key:"setValue",value:function(i,a,s){this.getField(i).fieldApi.setValue(a,null,U({allowEmptyString:this.options.allowEmptyStrings},s))}},{key:"setTouched",value:function(i,a){this.getField(i).fieldApi.setTouched(a)}},{key:"setError",value:function(i,a){this.getField(i).fieldApi.setError(a)}},{key:"setFormError",value:function(i){this.state.error=i,this.emit("change")}},{key:"validating",value:function(){this.state.validating=this.state.validating+1,this.emit("change")}},{key:"validated",value:function(i,a){if(this.state.validating=this.state.validating-1,this.getError(i)||this.setError(i,a),this.state.validating>0){this.emit("change");return}this.state.submitting&&(this.valid()?(tr("Submit",this.state),this.emit("submit")):(tr("Submit",this.state),this.emit("failure")),this.state.submitting=!1),this.emit("change")}},{key:"setStep",value:function(i){this.state.step=i,this.emit("change")}},{key:"setCurrent",value:function(i){this.state.Current=i,this.emit("change")}},{key:"back",value:function(i){this.state.step=this.state.step-1,this.state.Current=i,this.emit("change")}},{key:"next",value:function(i){this.validate(),this.screenValid()&&(this.state.step=this.state.step+1,this.state.Current=i),this.emit("change")}},{key:"setInitialValue",value:function(i,a){dt.set(this.options.initialValues,i,a)}},{key:"getFormState",value:function(){return tr("Returning form state"),U(U({},this.state),{},{pristine:this.pristine(),dirty:this.dirty(),invalid:this.invalid()})}},{key:"getFormApi",value:function(){return this.formApi}},{key:"getDerrivedValue",value:function(i){var a=this.getValues();return dt.get(a,i)}},{key:"getValue",value:function(i){var a=this.getField(i).fieldApi.getValue();return tr("Getting value for",i,a),a}},{key:"getTouched",value:function(i){var a=this.getField(i).fieldApi.getTouched();return tr("Getting touched for",i,a),a}},{key:"getError",value:function(i){var a=this.getField(i).fieldApi.getError();return tr("Getting error for",i,a),a}},{key:"getDirty",value:function(i){var a=this.getField(i).fieldApi.getDirty();return tr("Getting dirty for",i,a),a}},{key:"getPristine",value:function(i){var a=this.getField(i).fieldApi.getPristine();return tr("Getting pristine for",i,a),a}},{key:"getValues",value:function(){return tr("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return tr("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return tr("Gettings errors"),this.state.errors}},{key:"getOptions",value:function(){return this.options}},{key:"getStep",value:function(){return this.state.step}},{key:"getSavedValue",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?dt.get(this.savedValues,"shadow-".concat(i)):dt.get(this.savedValues,i)}},{key:"removeSavedState",value:function(i){var a=this.fieldsByName.get(i);return a&&a.shadow?dt.delete(this.savedValues,"shadow-".concat(i)):dt.delete(this.savedValues,i)}},{key:"getFullField",value:function(i){return i}},{key:"getInitialValue",value:function(i){return dt.get(this.options.initialValues,i)}},{key:"getField",value:function(i){tr("Getting Field",i);var a=this.fieldsByName.get(i);return a||(console.warn("Attempting to get field ".concat(i," but it does not exist")),this.dummyField)}},{key:"notify",value:function(i){var a=this,s=this.getField(i);s&&s.notify&&s.notify.forEach(function(p){var y=".".concat(i),E="".concat(y.replace(/(.*)[.[].*/,"$1"),".").concat(p).slice(1),b=a.getField(E);b&&(tr("Notifying",b.field),b.fieldApi.validate(),b.fieldApi.checkRelevant())})}},{key:"validateField",value:function(i){this.getField(i).fieldApi.validate()}},{key:"resetField",value:function(i){this.getField(i).fieldApi.reset()}},{key:"fieldExists",value:function(i){return this.fieldsByName.get(i)!=null}},{key:"valid",value:function(){var i=this.getErrors();return!!(dt.empty(i)&&!this.state.error)}},{key:"screenValid",value:function(){var i=Object.entries(this.onScreen).some(function(a){var s=G(a,2),p=s[1];return p.fieldApi.getError()});return!i}},{key:"invalid",value:function(){var i=this.getErrors();return!!(!dt.empty(i)||this.state.error)}},{key:"pristine",value:function(){var i=!0;return this.fieldsById.forEach(function(a){a.fieldApi.getPristine()||(i=!1)}),i}},{key:"dirty",value:function(){return!this.pristine()}},{key:"reset",value:function(){tr("Resetting"),this.fieldsById.forEach(function(i){i.fieldApi.reset({preventUpdate:!0})}),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(i){tr("Setting values"),this.fieldsById.forEach(function(a){var s=dt.get(i,a.field);s!==void 0&&a.fieldApi.setValue(s,null,{preventUpdate:!0})}),this.emit("change")}},{key:"validate",value:function(){var i=this;tr("Validating all fields");var a=this.getValues();if(this.options.validationSchema){var s=Pe(this.options.validationSchema,a);this.fieldsById.forEach(function(b){if(dt.has(s,b.field)){var C=dt.get(s,b.field);i.setError(b.field,C)}else i.setError(b.field,void 0)})}if(this.options.schema&&this.options.ajv){var p=I(this.ajvValidate,a);this.fieldsById.forEach(function(b){if(dt.has(p,b.field)){var C=dt.get(p,b.field);i.setError(b.field,C)}else i.setError(b.field,void 0)})}if(this.fieldsById.forEach(function(b){b.fieldApi.validate(a),b.fieldApi.setTouched(!0,!0)}),this.options.validate){var y=this.options.validate(a);this.setFormError(y)}if(this.options.validateFields){var E=this.options.validateFields(a);this.fieldsById.forEach(function(b){if(dt.has(E,b.field)){var C=dt.get(E,b.field);i.setError(b.field,C)}})}}},{key:"asyncValidate",value:function(){tr("Async Validating all fields");var i=this.getValues();this.fieldsById.forEach(function(a){a.fieldApi.asyncValidate(i)})}},{key:"keyDown",value:function(i){if(i.keyCode==13&&this.options.preventEnter)return i.preventDefault(i),!1}},{key:"submitForm",value:function(i){this.state.submits=this.state.submits+1,this.state.submitting=!0,!this.options.dontPreventDefault&&i&&i.preventDefault(i),this.validate(),this.emit("change"),this.asyncValidate(),!(this.state.validating>0)&&(this.valid()?(tr("Submit",this.state),this.emit("submit")):(tr("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"mount",value:function(){var i=this;this.fieldsById.forEach(function(a){i.emit("field",a.field)})}},{key:"register",value:function(i,a,s){var p=a.field,y=a.state;tr("Register ID:",i,"Name:",p,y,"Initial",s);var E=p.slice(0,p.lastIndexOf("[")!=-1?p.lastIndexOf("]")+1:p.length),b;this.fieldsById.forEach(function(C,M){C&&C.field===p&&(b=M)}),b&&(a.keepState||a.inMultistep)?(tr("Already Registered",p),this.fieldsById.delete(b)):b&&(!a.keepState||!a.inMultistep)&&console.warn("Check to make sure you have not registered two fields with the fieldName",p),tr("Fields Registered",this.fieldsById.size),this.onScreen[i]=a,this.fieldsById.set(i,a),tr("clearing expected removal",E),delete this.expectedRemovals[E],delete this.pulledOut[E],!a.shadow&&(this.updater.setValue(i,a.fieldApi.getValue(),!1),this.updater.setError(i,a.fieldApi.getError(),!1),this.updater.setTouched(i,a.fieldApi.getTouched(),!1),s||this.emit("change"),this.emit("field",p))}},{key:"deregister",value:function(i){var a=this.fieldsById.get(i),s=a.field;tr("Deregister",i,s),delete this.onScreen[i];var p=Rl(s,this.expectedRemovals),y=s.slice(0,s.lastIndexOf("[")!=-1?s.lastIndexOf("]")+1:s.length);(a.keepState||a.inMultistep)&&!p&&(tr("Saving field ".concat(s,"'s value"),a.fieldApi.getFieldState()),a.shadow?dt.set(this.savedValues,"shadow-".concat(s),a.fieldApi.getFieldState()):dt.set(this.savedValues,s,a.fieldApi.getFieldState())),(p||!a.keepState&&!a.inMultistep||!a.fieldApi.getIsRelevant()&&!a.keepState)&&(tr("Removing field",s),this.fieldsById.delete(i),p||(dt.delete(this.state.values,s),dt.delete(this.state.touched,s),dt.delete(this.state.errors,s),a.shadow?dt.delete(this.savedValues,"shadow-".concat(s)):dt.delete(this.savedValues,s)),p&&this.pulledOut[y]&&(tr("Pulling out",s,"with magic value",y),dt.pullOut(this.state.values,y),dt.pullOut(this.state.touched,y),dt.pullOut(this.state.errors,y),dt.pullOut(this.savedValues,y),delete this.pulledOut[y])),this.emit("change")}},{key:"expectRemoval",value:function(i){tr("Expecting removal of",i),this.expectedRemovals[i]=!0,this.pulledOut[i]=!0}},{key:"update",value:function(i,a,s){tr("Update",i,a.field,s,a.fieldState.value);var p=a.fieldApi.getValue(),y=a.fieldApi.getError(),E=a.fieldApi.getTouched(),b=this.fieldsByName.get(s);s&&!b&&(dt.set(this.state.values,s),dt.set(this.state.errors,s),dt.set(this.state.touched,s)),dt.set(this.state.values,a.field,p),dt.set(this.state.errors,a.field,y),dt.set(this.state.touched,a.field,E),this.emit("change")}}]),t}(),Ta=Le("informed:FormProvider "),xs=function(r){var i=r.children,a=r.formApi,s=r.formController,p=r.formState,y=P(r,["children","formApi","formController","formState"]);if(Ta("Render FormProvider"),a)return Ta("Render FormProvider with given values"),d.createElement(Ft.Provider,{value:s.updater},d.createElement(Ut.Provider,{value:a},d.createElement(Et.Provider,{value:p},i)));Ta("Render FormProvider with generated values");var E=ws(y);return d.createElement(Ft.Provider,{value:E.formController.updater},d.createElement(Ut.Provider,{value:E.formApi},d.createElement(Et.Provider,{value:E.formState},i)))},bs=Le("informed:useForm "),ws=function(r){var i=r.dontPreventDefault,a=r.initialValues,s=r.validate,p=r.validateFields,y=r.allowEmptyStrings,E=r.preventEnter,b=r.getApi,C=r.apiRef,M=r.onChange,J=r.onReset,ie=r.onSubmit,ne=r.onValueChange,le=r.onSubmitFailure,ge=r.validationSchema,pe=r.schema,Se=r.ajv,xe=r.fieldMap,Fe=r.onlyValidateSchema,$e=P(r,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);bs("Render useForm");var Be=(0,d.useMemo)(function(){return{dontPreventDefault:i,initialValues:a,validate:s,validateFields:p,allowEmptyStrings:y,preventEnter:E,validationSchema:ge,schema:pe,ajv:Se,fieldMap:xe}},[i,a,s,p,y,E,ge,pe,Se,xe]),Ge=(0,d.useState)(function(){return new ms(Be)}),De=G(Ge,1),je=De[0];(0,d.useEffect)(function(){je.setOptions(Be)},[Be]),ht(function(){je.mount()},[]);var Ve=(0,d.useState)(function(){return je.getFormState()}),Ke=G(Ve,2),ze=Ke[0],_e=Ke[1];ht(function(){var Rr=function(){return M&&M(je.getFormState())},Or=function(){return J&&J()},Gr=function(){return ie&&ie(je.getFormState().values)},wr=function(){return ne&&ne(je.getFormState().values)},Ur=function(){return le&&le(je.getFormState().errors)};return je.on("change",Rr),je.on("reset",Or),je.on("submit",Gr),je.on("value",wr),je.on("failure",Ur),function(){je.removeListener("change",Rr),je.removeListener("reset",Or),je.removeListener("submit",Gr),je.removeListener("value",wr),je.removeListener("failure",Ur)}},[M,J,ie,ne,le]),(0,d.useState)(function(){var Rr=function(){bs("Setting form state"),_e(je.getFormState())};je.on("change",Rr),b&&b(je.getFormApi()),C&&(C.current=je.getFormApi())});var xt=(0,d.useState)(function(){return je.getFormApi()}),Nt=G(xt,1),Wt=Nt[0],lr=function(Or){return d.createElement(xs,{formApi:Wt,formState:ze,formController:je},d.createElement(d.Fragment,null,Or||d.createElement(Zt,{schema:pe,onlyValidateSchema:Fe})))};return{formApi:Wt,formState:ze,formController:je,render:lr,userProps:$e}},Ml=Le("informed:Form "),Ll=function(r){var i=r.children,a=r.render,s=r.component,p=P(r,["children","render","component"]);Ml("Render FORM");var y=ws(p),E=y.formApi,b=y.formController,C=y.formState,M=y.render,J=y.userProps,ie=function(){var le={formState:C,formApi:E};return s?d.createElement(s,le,i):a?a(le):typeof i=="function"?i(le):i};return M(d.createElement("form",D({},J,{onReset:b.reset,onSubmit:b.submitForm,onKeyDown:b.keyDown}),ie()))},bf=function(r,i){return U(U({},i),{},{getValue:function(s){return i.getValue("".concat(r,".").concat(s))},getTouched:function(s){return i.getTouched("".concat(r,".").concat(s))},getError:function(s){return i.getError("".concat(r,".").concat(s))},setValue:function(s,p){return i.setValue("".concat(r,".").concat(s),p)},setTouched:function(s,p){return i.setTouched("".concat(r,".").concat(s),p)},setError:function(s,p){return i.setError("".concat(r,".").concat(s),p)},getInitialValue:function(s){return i.getInitialValue("".concat(r,".").concat(s))},getFullField:function(s){return"".concat(i.getFullField(r),".").concat(s)}})},wf=function(r,i){var a=i.register,s=i.deregister,p=i.setValue,y=i.setTouched,E=i.setError,b=i.update,C=i.getField,M=i.expectRemoval,J=i.getInitialValue,ie=i.fieldMap,ne=i.getSavedValue;return{register:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return a.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},deregister:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return s.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},update:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return b.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},setValue:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return p.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},setTouched:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return y.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},setError:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return E.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},getField:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return C.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},expectRemoval:function(ge){for(var pe=arguments.length,Se=new Array(pe>1?pe-1:0),xe=1;xe<pe;xe++)Se[xe-1]=arguments[xe];return M.apply(void 0,["".concat(r,".").concat(ge)].concat(Se))},getInitialValue:function(ge){return J("".concat(r,".").concat(ge))},getSavedValue:function(ge){return ne("".concat(r,".").concat(ge))},fieldMap:ie}},Sf=function(r){var i=r.scope,a=r.children,s=useContext(Ft),p=ye(),y=si(),E=useMemo(function(){return bf(i,p)},[i]),b=useMemo(function(){return wf(i,s)},[i]);return React.createElement(Ft.Provider,{value:b},React.createElement(Ut.Provider,{value:E},React.createElement(Et.Provider,{value:y},a)))},Ei=function(r){var i=si(),a={};Object.keys(r).length>0?Object.keys(r).forEach(function(ne){a[ne]=i[ne]}):a=i;var s=a,p=s.pristine,y=s.dirty,E=s.invalid,b=s.values,C=s.errors,M=s.touched,J=s.validating,ie=s.submitting;return React.createElement("pre",null,React.createElement("code",null,JSON.stringify({pristine:p,dirty:y,invalid:E,values:b,errors:C,touched:M,validating:J,submitting:ie},null,2)))},Af=function(r){var i=r.initialStep,a=r.multistepApiRef,s=ye(),p=s.getValues,y=s.validate,E=s.screenValid,b=(0,d.useState)(new Map),C=G(b,1),M=C[0],J=(0,d.useRef)(0),ie=de({current:i,steps:[],goal:null}),ne=G(ie,3),le=ne[0],ge=ne[1],pe=ne[2],Se=(0,d.useState)(function(){var Be=function(){var je=pe(),Ve=je.current,Ke=M.get(Ve);return Ke},Ge={getState:function(){return pe()},getCurrentStep:Be,getStep:function(je){return M.get(je)},getNumberOfSteps:function(){return M.size},next:function(){if(y(),E()){var je=Be(),Ve=je.getNext,Ke=Ve(),ze=typeof Ke=="function"?Ke(p()):Ke;ze&&ge(function(_e){return U(U({},_e),{},{current:ze})})}},back:function(){var je=Be(),Ve=je.getPrevious,Ke=Ve(),ze=typeof Ke=="function"?Ke(p()):Ke;ze&&ge(function(_e){return U(U({},_e),{},{current:ze})})},setCurrent:function(je){if(je){var Ve=M.get(je).index;Ve<Be().index?ge(function(Ke){return U(U({},Ke),{},{current:je,goal:null})}):ge(function(Ke){return U(U({},Ke),{},{goal:je})})}},register:function(je,Ve,Ke){Ke?(J.current=J.current+1,M.set(je,U(U({},Ve),{},{index:J.current}))):ge(function(ze){return U(U({},ze),{},{steps:Array.from(M.keys())})})},deregister:function(je){M.delete(je),J.current=J.current-1,ge(function(Ve){return U(U({},Ve),{},{steps:Array.from(M.keys())})})}};return a&&(a.current=Ge),Ge}),xe=G(Se,1),Fe=xe[0],$e=function(Ge){return d.createElement($.Provider,{value:Fe},d.createElement(ve.Provider,{value:le},Ge))};return U(U(U({},Fe),le),{},{render:$e})};function Ef(){return(0,d.useContext)(ve)}function Pa(){return(0,d.useContext)($)}var Wo=function(r){var i=r.step,a=r.next,s=r.previous,p=r.relevant,y=si(),E=y.values,b=Ef(),C=b.current,M=b.goal,J=Pa(),ie=J.register,ne=J.deregister,le=J.next,ge=i===C,pe=p?p(E):!0,Se=(0,d.useRef)(a),xe=(0,d.useRef)(s),Fe=(0,d.useRef)();Se.current=a,xe.current=s,Fe.current=p,(0,d.useState)(function(){ie(i,{name:i,getNext:function(){return Se.current},getPrevious:function(){return xe.current}},!0)}),(0,d.useEffect)(function(){return ie(i,{name:i,getNext:function(){return Se.current},getPrevious:function(){return xe.current}}),function(){ne(i)}},[i]),(0,d.useEffect)(function(){M&&ge&&M!==i&&le()},[M,ge]);var $e=function(Ge){return d.createElement(Y.Provider,{value:{relevant:function(je){return Fe.current?Fe.current(je):!0},multistep:!0}},ge&&pe?Ge:null)};return{isCurrent:ge,isRelevant:pe,step:i,render:$e}};function Cf(t){var r=t.children,i=P(t,["children"]),a=Af(i),s=a.render,p=P(a,["render"]);return s(typeof r=="function"?r(p):r)}Cf.Step=function(r){var i=r.children,a=P(r,["children"]),s=Wo(a),p=s.render;return p(i)};var wd=function(r){var i=r.field,a=useContext(Ft),s=a.fieldMap,p=ye(),y=p.getFullField,E=p.getOptions,b=y(i),C=E(),M=C.schema,J=Oe(b),ie=dt.get(M,J);if(!ie)return null;var ne=_(i,ie),le=ne.props,ge=ne.componentType,pe=s[ge];return React.createElement(pe,D({field:i},le))},Sd=function(){var r=ye(),i=r.getOptions,a=i(),s=a.schema;return React.createElement(Zt,{schema:s})},Ad=function(r){return React.forwardRef(function(i,a){return React.createElement(Ut.Consumer,null,function(s){return React.createElement(r,D({formApi:s,ref:a},i))})})},Nl=function(r){return React.forwardRef(function(i,a){return React.createElement(Et.Consumer,null,function(s){return React.createElement(r,D({formState:s,ref:a},i))})})},Dl=function(r,i){return{getValue:function(){return r.getValue(i)},setValue:function(s){return r.setValue(i,s)},getTouched:function(){return r.getTouched(i)},setTouched:function(s){return r.setTouched(i,s)},getError:function(){return r.getError(i)},setError:function(s){return r.setError(i,s)},reset:function(){return r.resetField(i)},validate:function(){return r.validateField(i)},exists:function(){return r.fieldExists(i)},getDirty:function(){return r.getDirty(i)},getPristine:function(){return r.getPristine(i)},getFieldState:function(){return r.getField(i).fieldApi.getFieldState()}}};function Bl(t){var r=ye(),i=useMemo(function(){return Dl(r,t)},[t]);return i}function Ul(t){var r=Bl(t),i=ye(),a=React.useState(),s=G(a,2),p=s[1],y=React.useCallback(function(){return p({})},[]);return ht(function(){var E=function(C){C===t&&y()};return i.emitter.on("field",E),function(){i.emitter.removeListener("field",E)}},[]),ht(function(){y()},[]),r.getFieldState()||{}}var Of=function(r){return function(i){return function(a){var s=Ul(r);return React.createElement(i,D({fieldState:s},a))}}},Ss=function(r){return function(i){return function(a){var s=Bl(r);return React.createElement(i,D({fieldApi:s},a))}}},As=function(r){var i=r.value,a=r.forwardedRef,s=r.children,p=P(r,["value","forwardedRef","children"]);return React.createElement("option",D({ref:a,value:i,key:i},p),s)},jl=null,Ia=o(80150),zt=o(25446),Vi=o(25805),Vt=o(76671),At=o(39713),Ir=o(23485),Tf=Object.defineProperty,Pf=Object.defineProperties,Es=Object.getOwnPropertyDescriptors,Cs=Object.getOwnPropertySymbols,Ci=Object.prototype.hasOwnProperty,Os=Object.prototype.propertyIsEnumerable,Xn=(t,r,i)=>r in t?Tf(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Hi=(t,r)=>{for(var i in r||(r={}))Ci.call(r,i)&&Xn(t,i,r[i]);if(Cs)for(var i of Cs(r))Os.call(r,i)&&Xn(t,i,r[i]);return t},Fa=(t,r)=>Pf(t,Es(r));const Wi=Ir.iv`
81
+ border: none;
82
+ outline: none;
83
+ padding: 8px;
84
+ border-radius: ${({theme:t})=>t.shape.borderRadius};
85
+ background-color: ${({theme:t})=>t.rightPanel.panelControlsBackgroundColor};
86
+ ${({theme:t})=>(0,Ir.QG)({color:t.colors.text.light,fontFamily:t.typography.code.fontFamily,fontSize:t.typography.fontSize})}
87
+
88
+ &::placeholder {
89
+ opacity: 0.6;
90
+ color: ${({theme:t})=>t.colors.text.light};
91
+ }
92
+
93
+ &:-webkit-autofill {
94
+ background-color: ${({theme:t})=>t.rightPanel.panelBackgroundColor};
95
+ }
96
+ `,Vl=Ir.ZP.div`
97
+ display: ${({type:t})=>t==="hidden"?"none":"inline-block"};
98
+ ${({fullWidth:t})=>t?"width: 100%;":""}
99
+ `,If=Ir.ZP.div`
100
+ position: relative;
101
+ `,Ff=Ir.ZP.input`
102
+ ${Wi}
103
+ ${({inputType:t,inputActionButton:r})=>t==="password"||r?"padding-right: 40px;":""};
104
+ ${({fullWidth:t})=>t?"width: 100%;":""}
105
+ `,Hl=Ir.ZP.span`
106
+ position: absolute;
107
+ right: 0;
108
+ line-height: normal;
109
+
110
+ font-size: 0.8em;
111
+ padding: calc(8px / 0.8);
112
+ cursor: pointer;
113
+ text-align: center;
114
+ ${({theme:t})=>(0,Ir.QG)({color:t.rightPanel.textColor})}
115
+ `;function Wl(t,r){const{fullWidth:i,errorMessage:a,type:s}=t,[p,y]=d.useState(s==="password"),E=d.useCallback(()=>{y(!p)},[p]);return d.createElement(Vl,{fullWidth:i,type:s},d.createElement(If,null,d.createElement(Ff,Fa(Hi({},t),{type:p?"password":"text",inputType:s,ref:r})),t.inputActionButton?d.createElement(Hl,{onClick:t.inputActionButton.onClick},t.inputActionButton.label):s==="password"?d.createElement(Hl,{onClick:E},p?"show":"hide"):null),a?d.createElement(At.Xq,null,a):null)}const uo=d.forwardRef(Wl);function un(t){const r=Kn(Hi({fieldType:"text"},t)),{userProps:i,render:a,fieldState:s}=r,p=r.informed;return a(d.createElement(uo,Fa(Hi(Hi({},i),p),{errorMessage:s.error})))}const zo=ln(({initValue:t,options:r,fieldApi:i,fieldState:a})=>{const s=r.map((C,M)=>({value:C.title||C.value,idx:M,origValue:C.value})),p=s.find(C=>C.origValue===t),[y,E]=d.useState(p==null?void 0:p.value);d.useEffect(()=>{t&&i.setValue(t)},[]);const b=d.useCallback(C=>{i.setValue(s[C.idx].origValue),E(s[C.idx].value)},[s]);return d.createElement(Vl,{fullWidth:!0},d.createElement(Vt.Dropdown,{fullWidth:!0,variant:"dark",value:y,options:s,onChange:b}),a.error?d.createElement(At.Xq,null,a.error):null)});function kf(t){const{name:r,value:i,description:a,variableEnum:s,onChange:p,defaultValue:y}=t,E=M=>p(M.target.value),b=M=>p(M.value),C=s?s.map((M,J)=>({value:M,idx:J})):[];return d.createElement(At.NI,null,d.createElement(At.lX,null,r,":"),C&&C.length?d.createElement(Vt.Dropdown,{fullWidth:!0,variant:"dark",openUp:!0,value:i,options:C,onChange:b}):d.createElement(uo,{fullWidth:!0,value:i,onChange:E,placeholder:y}),a&&d.createElement(zl,null,a))}const zl=Vt.styled.small`
116
+ display: inline-block;
117
+ margin-top: 5px;
118
+ color: #d0d0d0;
119
+ `;var nn=o(7241),Ts=Object.defineProperty,ka=Object.defineProperties,fo=Object.getOwnPropertyDescriptor,Rf=Object.getOwnPropertyDescriptors,Gl=Object.getOwnPropertySymbols,Mf=Object.prototype.hasOwnProperty,Go=Object.prototype.propertyIsEnumerable,Fr=(t,r,i)=>r in t?Ts(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,$l=(t,r)=>{for(var i in r||(r={}))Mf.call(r,i)&&Fr(t,i,r[i]);if(Gl)for(var i of Gl(r))Go.call(r,i)&&Fr(t,i,r[i]);return t},Ps=(t,r)=>ka(t,Rf(r)),$o=(t,r,i,a)=>{for(var s=a>1?void 0:a?fo(r,i):r,p=t.length-1,y;p>=0;p--)(y=t[p])&&(s=(a?y(r,i,s):y(s))||s);return a&&s&&Ts(r,i,s),s},Is=(t,r,i)=>(Fr(t,typeof r!="symbol"?r+"":r,i),i);let Ra=class extends d.Component{constructor(){super(...arguments);Is(this,"state",{activeIdx:0,variables:{}}),Is(this,"handleServerChange",t=>{const r=this.props.operation.servers.find(a=>a.url===t.serverUrl),i=(0,nn.mj)(r);this.props.onChange({url:t.serverUrl,variables:i}),(0,zt.zc)("serverUrl",t.serverUrl),this.setState({variables:i})}),Is(this,"handleVariableChange",(t,r)=>{const i=this.props.operation.servers[this.state.activeIdx],a=Ps($l({},this.state.variables),{[t]:r||(0,nn.mj)(i)[t]});this.setState({variables:a}),(0,nn.UY)(t,r),this.props.onChange(Ps($l({},i),{variables:a}))})}static getDerivedStateFromProps(t){const r=t.operation,i=(0,zt.aH)("serverUrl"),a=r.servers.findIndex(s=>s.url===i);return{activeIdx:a<0?0:a}}componentDidMount(){const t=(0,nn.fz)(this.props.operation.servers,this.state.activeIdx);this.props.onChange(t),this.setState({variables:t.variables})}render(){const{activeIdx:t}=this.state,i=this.props.operation.servers.map(s=>({serverUrl:s.url,value:`
120
+ ${(0,nn.nq)((0,nn.v5)(s.url,this.state.variables),s.variables)}
121
+ - ${s.description||"Default"}
122
+ `})),a=Object.keys(this.state.variables);return d.createElement(Lf,null,d.createElement(At.lX,{htmlFor:"server"},"Target server: "),d.createElement(At.NI,null,d.createElement(Vt.Dropdown,{openUp:!0,variant:"dark",value:i[t].value,options:i,onChange:this.handleServerChange})),a.length?a.map(s=>{const p=this.props.operation.servers[this.state.activeIdx].variables[s];return d.createElement(kf,{key:s,name:s,value:this.state.variables[s],defaultValue:p.default,onChange:y=>this.handleVariableChange(s,y),variableEnum:p.enum,description:p.description})}):null)}};Ra=$o([Ia.Pi],Ra);const Lf=Vt.styled.div`
123
+ margin-top: 20px;
124
+ `,Yl=ln(({initValue:t,paramEnum:r,fieldApi:i})=>{const[a,s]=d.useState(t),p=r.map((E,b)=>({id:String(b),value:E})),y=E=>{i.setValue(E.value),s(E.value)};return d.useEffect(()=>{t&&i.setValue(t)},[]),d.createElement(Vt.Dropdown,{fullWidth:!0,variant:"dark",value:a,options:p,onChange:y})});var zi;(function(t){t.ARRAY="array",t.OBJECT="object"})(zi||(zi={}));const Nf=t=>`(${t.schema.type})`+(t.example?` ${t.example}`:"");function Jl(t,r,i){t[r]||(t[r]=[]),t[r].push(i)}function Xl(t){const r={};return t.forEach(i=>{Jl(r,i.in,i)}),r}const Df=["path","query","cookie","header"];function Ko(t){return r=>{if(t.required&&!r)return"Field is required";if(t.required&&t.schema.type===zi.ARRAY&&Array.isArray(r)){if(r.length>(t.schema.rawSchema&&t.schema.rawSchema.maxItems||1/0))return`Too many items selected, maximum ${t.schema.rawSchema.maxItems}`;if(r.length<(t.schema.rawSchema&&t.schema.rawSchema.minItems||0)){const i=t.schema.rawSchema.minItems;return`You should select at least ${i===1?`${i} item`:`${i} items`}`}}}}function li(t){if(t.schema.type===zi.ARRAY){const r=t.schema.default||t.schema.example;if(!r&&t.schema.rawSchema.items){if(t.schema.rawSchema.items.default)return[t.schema.rawSchema.items.default];if(t.schema.rawSchema.items.example)return[t.schema.rawSchema.items.example]}return r||[]}else return t.schema.default||t.schema.example}function Ma({values:t,operation:r}){function i(E,b){const C=d.useMemo(()=>Ko(b),[b]),M=Array.isArray(b.schema.enum)&&b.schema.enum.length?b.schema.enum:void 0,J=li(b);return M?d.createElement(At.NI,null,d.createElement(Yl,{initValue:J,paramEnum:M,field:E})):d.createElement(un,{fullWidth:!0,"data-cy":"parameter-input",id:E,field:E,placeholder:Nf(b),validate:C,initialValue:J||(0,zt.U2)(t,E),validateOnBlur:!0,validateOnChange:!0})}function a({oneOfType:E,type:b,items:C}){return E||b===zi.ARRAY&&(C==null?void 0:C.type)===zi.OBJECT&&"Array of objects"}function s(E,b,C){var M;const J=C?(0,zt.s1)(C,E.name):E.name,ie=a(E.schema);if(ie&&console.warn(`Unsupported parameter definition: "${ie}"`),E.schema.type===zi.OBJECT)return(M=E.schema.fields)==null?void 0:M.map(ge=>s(ge,b,J));const ne=C?[b,C]:[E.in],le=(0,zt.s1)(...ne,E.name);return d.createElement(At.NI,{key:le},d.createElement(At.lX,{required:E.required},J,":"),ie?d.createElement(At.GE,null,"Unsupported field schema definition"):i(le,E))}function p(E,b){return!b||!b.length?null:d.createElement(d.Fragment,{key:E},d.createElement(At.NI,null,d.createElement(At.iG,null," # ",E," parameters "),d.createElement("span",null,"\xA0")),b.map(C=>s(C,E)))}const y=Xl(r.parameters||[]);return d.createElement(At.iA,null,Df.map(E=>p(E,y[E])))}var Qn=o(78722),Fs=o(55346),Zr=o(59219);function Gi(t,r,i){const a=r.path||{},s=r.query||{},p=Object.keys(s);let y=(0,nn.v5)(t,a);const E=b=>i.find(C=>C.name===b&&C.in==="query");return p.length&&(y+="?"+p.map(b=>{if(!s[b])return"";const C=E(b);return C?(0,Vt.serializeParameterValue)(C,s[b]):`${b}=${encodeURIComponent(s[b])}`}).filter(Boolean).join("&")),y}const ks=({loading:t,operation:r,hasResponse:i,execute:a,params:s={}})=>{const p=()=>{t||a()};return d.createElement(Ql,null,d.createElement(Fs._,null,d.createElement(Zr.FH,{type:r.httpVerb},r.httpVerb),d.createElement(Fs.y,{wrap:"true"},Gi(r.path,s,r.parameters))),d.createElement(Bf,{"data-cy":"send-button",color:"primary",blinking:t,onClick:p},t?"Sending...":i?"Resend":"Send"))},Bf=(0,Vt.styled)(Zr.zx)`
125
+ width: ${({theme:t})=>t.components.tryItSendButton.fullWidth?"100%":"auto"};
126
+ `,Ql=(0,Vt.styled)(Qn.k1)`
127
+ ${({theme:t})=>t.components.tryItSendButton.fullWidth?`
128
+ flex-direction: column;
129
+ align-items: flex-start;`:""};
130
+ `;var Yo=o(68069);const Zl=Vt.styled.div`
131
+ margin-bottom: 10px;
132
+ `,Jo=Vt.styled.div`
133
+ display: inline-block;
134
+ margin-right: 20px;
135
+ padding: 2px 0;
136
+ text-align: center;
137
+ color: ${({theme:t})=>t.colors.text.light};
138
+ `,co=(0,Vt.styled)(Jo)`
139
+ color: ${({theme:t,code:r})=>r>=200&&r<300?t.colors.responses.success.tabTextColor:r>=300&&r<400?t.colors.responses.redirect.tabTextColor:r>400?t.colors.responses.error.tabTextColor:t.colors.responses.info.tabTextColor};
140
+ `,Zn=Vt.styled.strong`
141
+ text-transform: capitalize;
142
+ display: inline-block;
143
+ padding-right: 5px;
144
+ `,Rs=Vt.styled.header`
145
+ font-weight: bold;
146
+ margin-bottom: 10px;
147
+ `,ql=Vt.styled.code`
148
+ border-left: 3px solid #ff4040;
149
+ padding-left: 5px;
150
+ `,_l=Vt.styled.div`
151
+ margin-bottom: 10px;
152
+
153
+ &:not(:first-child) {
154
+ margin-top: 10px;
155
+ }
156
+ `,eu=(0,Vt.styled)(Yo.nr)`
157
+ border-top-left-radius: 0;
158
+ border-top-right-radius: 0;
159
+ `;class Uf extends d.PureComponent{render(){const{error:r,response:i,time:a}=this.props,s=i||r&&r.response,p=s&&s.data&&s.data.length||0;let y;if(p>1e6?y=(p/1e6).toFixed(2)+" MB":p>1e3?y=(p/1e3).toFixed(2)+" KB":y=p+" B",r&&!r.response||!s)return d.createElement(d.Fragment,null,d.createElement(Rs,null," Could not get any response "),d.createElement(ql,null,r&&r.message||"Unknown error"),d.createElement("br",null),d.createElement(Rs,null," Why this might have happened:"),d.createElement("div",null," - CORS is misconfigured on the server"),d.createElement("div",null," - ","The server couldn't sent a response"),d.createElement("div",null," - No internet access"),d.createElement("div",null," - Documentation issue - contact API owner"),d.createElement("div",null," - Misconfigured security definition"));if(!s)return"Something went wrong";const E=Object.keys(s.headers);return d.createElement(d.Fragment,null,d.createElement(Zl,null,d.createElement(co,{code:s.status},d.createElement("span",null," Status: "),s.status," ",s.statusText),d.createElement(Jo,null,d.createElement("span",null," Time: "),a,"ms"),d.createElement(Jo,null,d.createElement("span",null," Size: "),y)),d.createElement("div",null,d.createElement(_l,null," Headers: "),d.createElement(eu,null,E.map(b=>d.createElement("div",{key:b},d.createElement(Zn,null,b,":"),d.createElement("code",null," ",s.headers[b])))),d.createElement(_l,null," Body: "),s.body&&d.createElement(Vt.JsonViewer,{data:s.body})||null,!s.body&&s.data!=null&&(s.data?d.createElement(Vt.SourceCodeWithCopy,{lang:(0,Vt.langFromMime)(s.headers["Content-Type"]||"text/plain"),source:s.data}):d.createElement(eu,null,d.createElement("i",null,"(no content)")))||null))}}var tu=o(9996),Ms=o.n(tu),Xo=o(29656),$i=o(4631);function Qo(t,r){r===void 0&&(r=!1);var i=t.length,a=0,s="",p=0,y=16,E=0,b=0,C=0,M=0,J=0;function ie(Fe,$e){for(var Be=0,Ge=0;Be<Fe||!$e;){var De=t.charCodeAt(a);if(De>=48&&De<=57)Ge=Ge*16+De-48;else if(De>=65&&De<=70)Ge=Ge*16+De-65+10;else if(De>=97&&De<=102)Ge=Ge*16+De-97+10;else break;a++,Be++}return Be<Fe&&(Ge=-1),Ge}function ne(Fe){a=Fe,s="",p=0,y=16,J=0}function le(){var Fe=a;if(t.charCodeAt(a)===48)a++;else for(a++;a<t.length&&Ki(t.charCodeAt(a));)a++;if(a<t.length&&t.charCodeAt(a)===46)if(a++,a<t.length&&Ki(t.charCodeAt(a)))for(a++;a<t.length&&Ki(t.charCodeAt(a));)a++;else return J=3,t.substring(Fe,a);var $e=a;if(a<t.length&&(t.charCodeAt(a)===69||t.charCodeAt(a)===101))if(a++,(a<t.length&&t.charCodeAt(a)===43||t.charCodeAt(a)===45)&&a++,a<t.length&&Ki(t.charCodeAt(a))){for(a++;a<t.length&&Ki(t.charCodeAt(a));)a++;$e=a}else J=3;return t.substring(Fe,$e)}function ge(){for(var Fe="",$e=a;;){if(a>=i){Fe+=t.substring($e,a),J=2;break}var Be=t.charCodeAt(a);if(Be===34){Fe+=t.substring($e,a),a++;break}if(Be===92){if(Fe+=t.substring($e,a),a++,a>=i){J=2;break}var Ge=t.charCodeAt(a++);switch(Ge){case 34:Fe+='"';break;case 92:Fe+="\\";break;case 47:Fe+="/";break;case 98:Fe+="\b";break;case 102:Fe+="\f";break;case 110:Fe+=`
160
+ `;break;case 114:Fe+="\r";break;case 116:Fe+=" ";break;case 117:var De=ie(4,!0);De>=0?Fe+=String.fromCharCode(De):J=4;break;default:J=5}$e=a;continue}if(Be>=0&&Be<=31)if(Oi(Be)){Fe+=t.substring($e,a),J=2;break}else J=6;a++}return Fe}function pe(){if(s="",J=0,p=a,b=E,M=C,a>=i)return p=i,y=17;var Fe=t.charCodeAt(a);if(Zo(Fe)){do a++,s+=String.fromCharCode(Fe),Fe=t.charCodeAt(a);while(Zo(Fe));return y=15}if(Oi(Fe))return a++,s+=String.fromCharCode(Fe),Fe===13&&t.charCodeAt(a)===10&&(a++,s+=`
161
+ `),E++,C=a,y=14;switch(Fe){case 123:return a++,y=1;case 125:return a++,y=2;case 91:return a++,y=3;case 93:return a++,y=4;case 58:return a++,y=6;case 44:return a++,y=5;case 34:return a++,s=ge(),y=10;case 47:var $e=a-1;if(t.charCodeAt(a+1)===47){for(a+=2;a<i&&!Oi(t.charCodeAt(a));)a++;return s=t.substring($e,a),y=12}if(t.charCodeAt(a+1)===42){a+=2;for(var Be=i-1,Ge=!1;a<Be;){var De=t.charCodeAt(a);if(De===42&&t.charCodeAt(a+1)===47){a+=2,Ge=!0;break}a++,Oi(De)&&(De===13&&t.charCodeAt(a)===10&&a++,E++,C=a)}return Ge||(a++,J=1),s=t.substring($e,a),y=13}return s+=String.fromCharCode(Fe),a++,y=16;case 45:if(s+=String.fromCharCode(Fe),a++,a===i||!Ki(t.charCodeAt(a)))return y=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return s+=le(),y=11;default:for(;a<i&&Se(Fe);)a++,Fe=t.charCodeAt(a);if(p!==a){switch(s=t.substring(p,a),s){case"true":return y=8;case"false":return y=9;case"null":return y=7}return y=16}return s+=String.fromCharCode(Fe),a++,y=16}}function Se(Fe){if(Zo(Fe)||Oi(Fe))return!1;switch(Fe){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function xe(){var Fe;do Fe=pe();while(Fe>=12&&Fe<=15);return Fe}return{setPosition:ne,getPosition:function(){return a},scan:r?xe:pe,getToken:function(){return y},getTokenValue:function(){return s},getTokenOffset:function(){return p},getTokenLength:function(){return a-p},getTokenStartLine:function(){return b},getTokenStartCharacter:function(){return p-M},getTokenError:function(){return J}}}function Zo(t){return t===32||t===9||t===11||t===12||t===160||t===5760||t>=8192&&t<=8203||t===8239||t===8287||t===12288||t===65279}function Oi(t){return t===10||t===13||t===8232||t===8233}function Ki(t){return t>=48&&t<=57}function Ls(t,r,i){var a,s,p,y,E;if(r){for(y=r.offset,E=y+r.length,p=y;p>0&&!La(t,p-1);)p--;for(var b=E;b<t.length&&!La(t,b);)b++;s=t.substring(p,b),a=ru(s,i)}else s=t,a=0,p=0,y=0,E=t.length;var C=Ns(i,t),M=!1,J=0,ie;i.insertSpaces?ie=wn(" ",i.tabSize||4):ie=" ";var ne=Qo(s,!1),le=!1;function ge(){return C+wn(ie,a+J)}function pe(){var ze=ne.scan();for(M=!1;ze===15||ze===14;)M=M||ze===14,ze=ne.scan();return le=ze===16||ne.getTokenError()!==0,ze}var Se=[];function xe(ze,_e,xt){!le&&_e<E&&xt>y&&t.substring(_e,xt)!==ze&&Se.push({offset:_e,length:xt-_e,content:ze})}var Fe=pe();if(Fe!==17){var $e=ne.getTokenOffset()+p,Be=wn(ie,a);xe(Be,p,$e)}for(;Fe!==17;){for(var Ge=ne.getTokenOffset()+ne.getTokenLength()+p,De=pe(),je="";!M&&(De===12||De===13);){var Ve=ne.getTokenOffset()+p;xe(" ",Ge,Ve),Ge=ne.getTokenOffset()+ne.getTokenLength()+p,je=De===12?ge():"",De=pe()}if(De===2)Fe!==1&&(J--,je=ge());else if(De===4)Fe!==3&&(J--,je=ge());else{switch(Fe){case 3:case 1:J++,je=ge();break;case 5:case 12:je=ge();break;case 13:M?je=ge():je=" ";break;case 6:je=" ";break;case 10:if(De===6){je="";break}case 7:case 8:case 9:case 11:case 2:case 4:De===12||De===13?je=" ":De!==5&&De!==17&&(le=!0);break;case 16:le=!0;break}M&&(De===12||De===13)&&(je=ge())}var Ke=ne.getTokenOffset()+p;xe(je,Ge,Ke),Fe=De}return Se}function wn(t,r){for(var i="",a=0;a<r;a++)i+=t;return i}function ru(t,r){for(var i=0,a=0,s=r.tabSize||4;i<t.length;){var p=t.charAt(i);if(p===" ")a++;else if(p===" ")a+=s;else break;i++}return Math.floor(a/s)}function Ns(t,r){for(var i=0;i<r.length;i++){var a=r.charAt(i);if(a==="\r")return i+1<r.length&&r.charAt(i+1)===`
162
+ `?`\r
163
+ `:"\r";if(a===`
164
+ `)return`
165
+ `}return t&&t.eol||`
166
+ `}function La(t,r){return`\r
167
+ `.indexOf(t.charAt(r))!==-1}var po;(function(t){t.DEFAULT={allowTrailingComma:!1}})(po||(po={}));function nu(t,r){var i=[],a=new Object,s=void 0,p={value:{},offset:0,length:0,type:"object",parent:void 0},y=!1;function E(b,C,M,J){p.value=b,p.offset=C,p.length=M,p.type=J,p.colonOffset=void 0,s=p}try{vo(t,{onObjectBegin:function(b,C){if(r<=b)throw a;s=void 0,y=r>b,i.push("")},onObjectProperty:function(b,C,M){if(r<C||(E(b,C,M,"property"),i[i.length-1]=b,r<=C+M))throw a},onObjectEnd:function(b,C){if(r<=b)throw a;s=void 0,i.pop()},onArrayBegin:function(b,C){if(r<=b)throw a;s=void 0,i.push(0)},onArrayEnd:function(b,C){if(r<=b)throw a;s=void 0,i.pop()},onLiteralValue:function(b,C,M){if(r<C||(E(b,C,M,Us(b)),r<=C+M))throw a},onSeparator:function(b,C,M){if(r<=C)throw a;if(b===":"&&s&&s.type==="property")s.colonOffset=C,y=!1,s=void 0;else if(b===","){var J=i[i.length-1];typeof J=="number"?i[i.length-1]=J+1:(y=!0,i[i.length-1]=""),s=void 0}}})}catch(b){if(b!==a)throw b}return{path:i,previousNode:s,isAtPropertyKey:y,matches:function(b){for(var C=0,M=0;C<b.length&&M<i.length;M++)if(b[C]===i[M]||b[C]==="*")C++;else if(b[C]!=="**")return!1;return C===b.length}}}function Ds(t,r,i){r===void 0&&(r=[]),i===void 0&&(i=po.DEFAULT);var a=null,s=[],p=[];function y(b){Array.isArray(s)?s.push(b):a!==null&&(s[a]=b)}var E={onObjectBegin:function(){var b={};y(b),p.push(s),s=b,a=null},onObjectProperty:function(b){a=b},onObjectEnd:function(){s=p.pop()},onArrayBegin:function(){var b=[];y(b),p.push(s),s=b,a=null},onArrayEnd:function(){s=p.pop()},onLiteralValue:y,onError:function(b,C,M){r.push({error:b,offset:C,length:M})}};return vo(t,E,i),s[0]}function jf(t,r,i){r===void 0&&(r=[]),i===void 0&&(i=po.DEFAULT);var a={type:"array",offset:-1,length:-1,children:[],parent:void 0};function s(b){a.type==="property"&&(a.length=b-a.offset,a=a.parent)}function p(b){return a.children.push(b),b}var y={onObjectBegin:function(b){a=p({type:"object",offset:b,length:-1,parent:a,children:[]})},onObjectProperty:function(b,C,M){a=p({type:"property",offset:C,length:-1,parent:a,children:[]}),a.children.push({type:"string",value:b,offset:C,length:M,parent:a})},onObjectEnd:function(b,C){s(b+C),a.length=b+C-a.offset,a=a.parent,s(b+C)},onArrayBegin:function(b,C){a=p({type:"array",offset:b,length:-1,parent:a,children:[]})},onArrayEnd:function(b,C){a.length=b+C-a.offset,a=a.parent,s(b+C)},onLiteralValue:function(b,C,M){p({type:Us(b),offset:C,length:M,parent:a,value:b}),s(C+M)},onSeparator:function(b,C,M){a.type==="property"&&(b===":"?a.colonOffset=C:b===","&&s(C))},onError:function(b,C,M){r.push({error:b,offset:C,length:M})}};vo(t,y,i);var E=a.children[0];return E&&delete E.parent,E}function Vf(t,r){if(!!t){for(var i=t,a=0,s=r;a<s.length;a++){var p=s[a];if(typeof p=="string"){if(i.type!=="object"||!Array.isArray(i.children))return;for(var y=!1,E=0,b=i.children;E<b.length;E++){var C=b[E];if(Array.isArray(C.children)&&C.children[0].value===p){i=C.children[1],y=!0;break}}if(!y)return}else{var M=p;if(i.type!=="array"||M<0||!Array.isArray(i.children)||M>=i.children.length)return;i=i.children[M]}}return i}}function iu(t){if(!t.parent||!t.parent.children)return[];var r=iu(t.parent);if(t.parent.type==="property"){var i=t.parent.children[0].value;r.push(i)}else if(t.parent.type==="array"){var a=t.parent.children.indexOf(t);a!==-1&&r.push(a)}return r}function ui(t){switch(t.type){case"array":return t.children.map(ui);case"object":for(var r=Object.create(null),i=0,a=t.children;i<a.length;i++){var s=a[i],p=s.children[1];p&&(r[s.children[0].value]=ui(p))}return r;case"null":case"string":case"number":case"boolean":return t.value;default:return}}function ho(t,r,i){return i===void 0&&(i=!1),r>=t.offset&&r<t.offset+t.length||i&&r===t.offset+t.length}function Yi(t,r,i){if(i===void 0&&(i=!1),ho(t,r,i)){var a=t.children;if(Array.isArray(a))for(var s=0;s<a.length&&a[s].offset<=r;s++){var p=Yi(a[s],r,i);if(p)return p}return t}}function vo(t,r,i){i===void 0&&(i=po.DEFAULT);var a=Qo(t,!1);function s(Ve){return Ve?function(){return Ve(a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}function p(Ve){return Ve?function(Ke){return Ve(Ke,a.getTokenOffset(),a.getTokenLength(),a.getTokenStartLine(),a.getTokenStartCharacter())}:function(){return!0}}var y=s(r.onObjectBegin),E=p(r.onObjectProperty),b=s(r.onObjectEnd),C=s(r.onArrayBegin),M=s(r.onArrayEnd),J=p(r.onLiteralValue),ie=p(r.onSeparator),ne=s(r.onComment),le=p(r.onError),ge=i&&i.disallowComments,pe=i&&i.allowTrailingComma;function Se(){for(;;){var Ve=a.scan();switch(a.getTokenError()){case 4:xe(14);break;case 5:xe(15);break;case 3:xe(13);break;case 1:ge||xe(11);break;case 2:xe(12);break;case 6:xe(16);break}switch(Ve){case 12:case 13:ge?xe(10):ne();break;case 16:xe(1);break;case 15:case 14:break;default:return Ve}}}function xe(Ve,Ke,ze){if(Ke===void 0&&(Ke=[]),ze===void 0&&(ze=[]),le(Ve),Ke.length+ze.length>0)for(var _e=a.getToken();_e!==17;){if(Ke.indexOf(_e)!==-1){Se();break}else if(ze.indexOf(_e)!==-1)break;_e=Se()}}function Fe(Ve){var Ke=a.getTokenValue();return Ve?J(Ke):E(Ke),Se(),!0}function $e(){switch(a.getToken()){case 11:var Ve=a.getTokenValue(),Ke=Number(Ve);isNaN(Ke)&&(xe(2),Ke=0),J(Ke);break;case 7:J(null);break;case 8:J(!0);break;case 9:J(!1);break;default:return!1}return Se(),!0}function Be(){return a.getToken()!==10?(xe(3,[],[2,5]),!1):(Fe(!1),a.getToken()===6?(ie(":"),Se(),je()||xe(4,[],[2,5])):xe(5,[],[2,5]),!0)}function Ge(){y(),Se();for(var Ve=!1;a.getToken()!==2&&a.getToken()!==17;){if(a.getToken()===5){if(Ve||xe(4,[],[]),ie(","),Se(),a.getToken()===2&&pe)break}else Ve&&xe(6,[],[]);Be()||xe(4,[],[2,5]),Ve=!0}return b(),a.getToken()!==2?xe(7,[2],[]):Se(),!0}function De(){C(),Se();for(var Ve=!1;a.getToken()!==4&&a.getToken()!==17;){if(a.getToken()===5){if(Ve||xe(4,[],[]),ie(","),Se(),a.getToken()===4&&pe)break}else Ve&&xe(6,[],[]);je()||xe(4,[],[4,5]),Ve=!0}return M(),a.getToken()!==4?xe(8,[4],[]):Se(),!0}function je(){switch(a.getToken()){case 3:return De();case 1:return Ge();case 10:return Fe(!0);default:return $e()}}return Se(),a.getToken()===17?i.allowEmptyContent?!0:(xe(4,[],[]),!1):je()?(a.getToken()!==17&&xe(9,[],[]),!0):(xe(4,[],[]),!1)}function Bs(t,r){var i=Qo(t),a=[],s,p=0,y;do switch(y=i.getPosition(),s=i.scan(),s){case 12:case 13:case 17:p!==y&&a.push(t.substring(p,y)),r!==void 0&&a.push(i.getTokenValue().replace(/[^\r\n]/g,r)),p=i.getPosition();break}while(s!==17);return a.join("")}function Us(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string";case"object":{if(t){if(Array.isArray(t))return"array"}else return"null";return"object"}default:return"null"}}function ou(t,r,i){return Ji(t,r,void 0,i)}function Ji(t,r,i,a){for(var s,p=r.slice(),y=[],E=parseTree(t,y),b=void 0,C=void 0;p.length>0&&(C=p.pop(),b=findNodeAtLocation(E,p),b===void 0&&i!==void 0);)typeof C=="string"?i=(s={},s[C]=i,s):i=[i];if(b)if(b.type==="object"&&typeof C=="string"&&Array.isArray(b.children)){var M=findNodeAtLocation(b,[C]);if(M!==void 0)if(i===void 0){if(!M.parent)throw new Error("Malformed AST");var J=b.children.indexOf(M.parent),ie=void 0,ne=M.parent.offset+M.parent.length;if(J>0){var le=b.children[J-1];ie=le.offset+le.length}else if(ie=b.offset+1,b.children.length>1){var ge=b.children[1];ne=ge.offset}return Sn(t,{offset:ie,length:ne-ie,content:""},a)}else return Sn(t,{offset:M.offset,length:M.length,content:JSON.stringify(i)},a);else{if(i===void 0)return[];var pe=JSON.stringify(C)+": "+JSON.stringify(i),Se=a.getInsertionIndex?a.getInsertionIndex(b.children.map(function(Ve){return Ve.children[0].value})):b.children.length,xe=void 0;if(Se>0){var le=b.children[Se-1];xe={offset:le.offset+le.length,length:0,content:","+pe}}else b.children.length===0?xe={offset:b.offset+1,length:0,content:pe}:xe={offset:b.offset+1,length:0,content:pe+","};return Sn(t,xe,a)}}else if(b.type==="array"&&typeof C=="number"&&Array.isArray(b.children)){var Fe=C;if(Fe===-1){var pe=""+JSON.stringify(i),xe=void 0;if(b.children.length===0)xe={offset:b.offset+1,length:0,content:pe};else{var le=b.children[b.children.length-1];xe={offset:le.offset+le.length,length:0,content:","+pe}}return Sn(t,xe,a)}else if(i===void 0&&b.children.length>=0){var $e=C,Be=b.children[$e],xe=void 0;if(b.children.length===1)xe={offset:b.offset+1,length:b.length-2,content:""};else if(b.children.length-1===$e){var le=b.children[$e-1],Ge=le.offset+le.length,De=b.offset+b.length;xe={offset:Ge,length:De-2-Ge,content:""}}else xe={offset:Be.offset,length:b.children[$e+1].offset-Be.offset,content:""};return Sn(t,xe,a)}else if(i!==void 0){var xe=void 0,pe=""+JSON.stringify(i);if(!a.isArrayInsertion&&b.children.length>C){var je=b.children[C];xe={offset:je.offset,length:je.length,content:pe}}else if(b.children.length===0||C===0)xe={offset:b.offset+1,length:0,content:b.children.length===0?pe:pe+","};else{var Se=C>b.children.length?b.children.length:C,le=b.children[Se-1];xe={offset:le.offset+le.length,length:0,content:","+pe}}return Sn(t,xe,a)}else throw new Error("Can not "+(i===void 0?"remove":a.isArrayInsertion?"insert":"modify")+" Array index "+Fe+" as length is not sufficient")}else throw new Error("Can not add "+(typeof C!="number"?"index":"property")+" to parent of type "+b.type);else{if(i===void 0)throw new Error("Can not delete in empty document");return Sn(t,{offset:E?E.offset:0,length:E?E.length:0,content:JSON.stringify(i)},a)}}function Sn(t,r,i){if(!i.formattingOptions)return[r];var a=qr(t,r),s=r.offset,p=r.offset+r.content.length;if(r.length===0||r.content.length===0){for(;s>0&&!isEOL(a,s-1);)s--;for(;p<a.length&&!isEOL(a,p);)p++}for(var y=format(a,{offset:s,length:p-s},i.formattingOptions),E=y.length-1;E>=0;E--){var b=y[E];a=qr(a,b),s=Math.min(s,b.offset),p=Math.max(p,b.offset+b.length),p+=b.content.length-b.length}var C=t.length-(a.length-p)-s;return[{offset:s,length:C,content:a.substring(s,p)}]}function qr(t,r){return t.substring(0,r.offset)+r.content+t.substring(r.offset+r.length)}function Xi(t,r){return`\r
168
+ `.indexOf(t.charAt(r))!==-1}var An=Qo,js=nu,Hf=Ds,Wf=jf,Na=Vf,au=Yi,su=iu,Da=ui,Cd=vo,lu=Bs;function zf(t){switch(t){case 1:return"InvalidSymbol";case 2:return"InvalidNumberFormat";case 3:return"PropertyNameExpected";case 4:return"ValueExpected";case 5:return"ColonExpected";case 6:return"CommaExpected";case 7:return"CloseBraceExpected";case 8:return"CloseBracketExpected";case 9:return"EndOfFileExpected";case 10:return"InvalidCommentToken";case 11:return"UnexpectedEndOfComment";case 12:return"UnexpectedEndOfString";case 13:return"UnexpectedEndOfNumber";case 14:return"InvalidUnicode";case 15:return"InvalidEscapeCharacter";case 16:return"InvalidCharacter"}return"<unknown ParseErrorCode>"}function Vs(t,r,i){return Ls(t,r,i)}function uu(t,r,i,a){return edit.setProperty(t,r,i,a)}function qo(t,r){for(var i=r.length-1;i>=0;i--)t=edit.applyEdit(t,r[i]);return t}function Ti(t,r){if(t===r)return!0;if(t==null||r===null||r===void 0||typeof t!=typeof r||typeof t!="object"||Array.isArray(t)!==Array.isArray(r))return!1;var i,a;if(Array.isArray(t)){if(t.length!==r.length)return!1;for(i=0;i<t.length;i++)if(!Ti(t[i],r[i]))return!1}else{var s=[];for(a in t)s.push(a);s.sort();var p=[];for(a in r)p.push(a);if(p.sort(),!Ti(s,p))return!1;for(i=0;i<s.length;i++)if(!Ti(t[s[i]],r[s[i]]))return!1}return!0}function fn(t){return typeof t=="number"}function Fn(t){return typeof t!="undefined"}function qn(t){return typeof t=="boolean"}function Gf(t){return typeof t=="string"}var fu;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647})(fu||(fu={}));var go;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647})(go||(go={}));var En;(function(t){function r(a,s){return a===Number.MAX_VALUE&&(a=go.MAX_VALUE),s===Number.MAX_VALUE&&(s=go.MAX_VALUE),{line:a,character:s}}t.create=r;function i(a){var s=a;return Xe.objectLiteral(s)&&Xe.uinteger(s.line)&&Xe.uinteger(s.character)}t.is=i})(En||(En={}));var Jt;(function(t){function r(a,s,p,y){if(Xe.uinteger(a)&&Xe.uinteger(s)&&Xe.uinteger(p)&&Xe.uinteger(y))return{start:En.create(a,s),end:En.create(p,y)};if(En.is(a)&&En.is(s))return{start:a,end:s};throw new Error("Range#create called with invalid arguments["+a+", "+s+", "+p+", "+y+"]")}t.create=r;function i(a){var s=a;return Xe.objectLiteral(s)&&En.is(s.start)&&En.is(s.end)}t.is=i})(Jt||(Jt={}));var fi;(function(t){function r(a,s){return{uri:a,range:s}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Jt.is(s.range)&&(Xe.string(s.uri)||Xe.undefined(s.uri))}t.is=i})(fi||(fi={}));var cu;(function(t){function r(a,s,p,y){return{targetUri:a,targetRange:s,targetSelectionRange:p,originSelectionRange:y}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Jt.is(s.targetRange)&&Xe.string(s.targetUri)&&(Jt.is(s.targetSelectionRange)||Xe.undefined(s.targetSelectionRange))&&(Jt.is(s.originSelectionRange)||Xe.undefined(s.originSelectionRange))}t.is=i})(cu||(cu={}));var yo;(function(t){function r(a,s,p,y){return{red:a,green:s,blue:p,alpha:y}}t.create=r;function i(a){var s=a;return Xe.numberRange(s.red,0,1)&&Xe.numberRange(s.green,0,1)&&Xe.numberRange(s.blue,0,1)&&Xe.numberRange(s.alpha,0,1)}t.is=i})(yo||(yo={}));var Hs;(function(t){function r(a,s){return{range:a,color:s}}t.create=r;function i(a){var s=a;return Jt.is(s.range)&&yo.is(s.color)}t.is=i})(Hs||(Hs={}));var mo;(function(t){function r(a,s,p){return{label:a,textEdit:s,additionalTextEdits:p}}t.create=r;function i(a){var s=a;return Xe.string(s.label)&&(Xe.undefined(s.textEdit)||kn.is(s))&&(Xe.undefined(s.additionalTextEdits)||Xe.typedArray(s.additionalTextEdits,kn.is))}t.is=i})(mo||(mo={}));var xo;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(xo||(xo={}));var Pi;(function(t){function r(a,s,p,y,E){var b={startLine:a,endLine:s};return Xe.defined(p)&&(b.startCharacter=p),Xe.defined(y)&&(b.endCharacter=y),Xe.defined(E)&&(b.kind=E),b}t.create=r;function i(a){var s=a;return Xe.uinteger(s.startLine)&&Xe.uinteger(s.startLine)&&(Xe.undefined(s.startCharacter)||Xe.uinteger(s.startCharacter))&&(Xe.undefined(s.endCharacter)||Xe.uinteger(s.endCharacter))&&(Xe.undefined(s.kind)||Xe.string(s.kind))}t.is=i})(Pi||(Pi={}));var Qi;(function(t){function r(a,s){return{location:a,message:s}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&fi.is(s.location)&&Xe.string(s.message)}t.is=i})(Qi||(Qi={}));var Dt;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(Dt||(Dt={}));var bo;(function(t){t.Unnecessary=1,t.Deprecated=2})(bo||(bo={}));var Zi;(function(t){function r(i){var a=i;return a!=null&&Xe.string(a.href)}t.is=r})(Zi||(Zi={}));var _n;(function(t){function r(a,s,p,y,E,b){var C={range:a,message:s};return Xe.defined(p)&&(C.severity=p),Xe.defined(y)&&(C.code=y),Xe.defined(E)&&(C.source=E),Xe.defined(b)&&(C.relatedInformation=b),C}t.create=r;function i(a){var s,p=a;return Xe.defined(p)&&Jt.is(p.range)&&Xe.string(p.message)&&(Xe.number(p.severity)||Xe.undefined(p.severity))&&(Xe.integer(p.code)||Xe.string(p.code)||Xe.undefined(p.code))&&(Xe.undefined(p.codeDescription)||Xe.string((s=p.codeDescription)===null||s===void 0?void 0:s.href))&&(Xe.string(p.source)||Xe.undefined(p.source))&&(Xe.undefined(p.relatedInformation)||Xe.typedArray(p.relatedInformation,Qi.is))}t.is=i})(_n||(_n={}));var wo;(function(t){function r(a,s){for(var p=[],y=2;y<arguments.length;y++)p[y-2]=arguments[y];var E={title:a,command:s};return Xe.defined(p)&&p.length>0&&(E.arguments=p),E}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Xe.string(s.title)&&Xe.string(s.command)}t.is=i})(wo||(wo={}));var kn;(function(t){function r(p,y){return{range:p,newText:y}}t.replace=r;function i(p,y){return{range:{start:p,end:p},newText:y}}t.insert=i;function a(p){return{range:p,newText:""}}t.del=a;function s(p){var y=p;return Xe.objectLiteral(y)&&Xe.string(y.newText)&&Jt.is(y.range)}t.is=s})(kn||(kn={}));var So;(function(t){function r(a,s,p){var y={label:a};return s!==void 0&&(y.needsConfirmation=s),p!==void 0&&(y.description=p),y}t.create=r;function i(a){var s=a;return s!==void 0&&Xe.objectLiteral(s)&&Xe.string(s.label)&&(Xe.boolean(s.needsConfirmation)||s.needsConfirmation===void 0)&&(Xe.string(s.description)||s.description===void 0)}t.is=i})(So||(So={}));var Sr;(function(t){function r(i){var a=i;return typeof a=="string"}t.is=r})(Sr||(Sr={}));var cn;(function(t){function r(p,y,E){return{range:p,newText:y,annotationId:E}}t.replace=r;function i(p,y,E){return{range:{start:p,end:p},newText:y,annotationId:E}}t.insert=i;function a(p,y){return{range:p,newText:"",annotationId:y}}t.del=a;function s(p){var y=p;return kn.is(y)&&(So.is(y.annotationId)||Sr.is(y.annotationId))}t.is=s})(cn||(cn={}));var Ba;(function(t){function r(a,s){return{textDocument:a,edits:s}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Ii.is(s.textDocument)&&Array.isArray(s.edits)}t.is=i})(Ba||(Ba={}));var _o;(function(t){function r(a,s,p){var y={kind:"create",uri:a};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(y.options=s),p!==void 0&&(y.annotationId=p),y}t.create=r;function i(a){var s=a;return s&&s.kind==="create"&&Xe.string(s.uri)&&(s.options===void 0||(s.options.overwrite===void 0||Xe.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||Xe.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Sr.is(s.annotationId))}t.is=i})(_o||(_o={}));var ea;(function(t){function r(a,s,p,y){var E={kind:"rename",oldUri:a,newUri:s};return p!==void 0&&(p.overwrite!==void 0||p.ignoreIfExists!==void 0)&&(E.options=p),y!==void 0&&(E.annotationId=y),E}t.create=r;function i(a){var s=a;return s&&s.kind==="rename"&&Xe.string(s.oldUri)&&Xe.string(s.newUri)&&(s.options===void 0||(s.options.overwrite===void 0||Xe.boolean(s.options.overwrite))&&(s.options.ignoreIfExists===void 0||Xe.boolean(s.options.ignoreIfExists)))&&(s.annotationId===void 0||Sr.is(s.annotationId))}t.is=i})(ea||(ea={}));var ta;(function(t){function r(a,s,p){var y={kind:"delete",uri:a};return s!==void 0&&(s.recursive!==void 0||s.ignoreIfNotExists!==void 0)&&(y.options=s),p!==void 0&&(y.annotationId=p),y}t.create=r;function i(a){var s=a;return s&&s.kind==="delete"&&Xe.string(s.uri)&&(s.options===void 0||(s.options.recursive===void 0||Xe.boolean(s.options.recursive))&&(s.options.ignoreIfNotExists===void 0||Xe.boolean(s.options.ignoreIfNotExists)))&&(s.annotationId===void 0||Sr.is(s.annotationId))}t.is=i})(ta||(ta={}));var Ws;(function(t){function r(i){var a=i;return a&&(a.changes!==void 0||a.documentChanges!==void 0)&&(a.documentChanges===void 0||a.documentChanges.every(function(s){return Xe.string(s.kind)?_o.is(s)||ea.is(s)||ta.is(s):Ba.is(s)}))}t.is=r})(Ws||(Ws={}));var Ua=function(){function t(r,i){this.edits=r,this.changeAnnotations=i}return t.prototype.insert=function(r,i,a){var s,p;if(a===void 0?s=kn.insert(r,i):Sr.is(a)?(p=a,s=cn.insert(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),p=this.changeAnnotations.manage(a),s=cn.insert(r,i,p)),this.edits.push(s),p!==void 0)return p},t.prototype.replace=function(r,i,a){var s,p;if(a===void 0?s=kn.replace(r,i):Sr.is(a)?(p=a,s=cn.replace(r,i,a)):(this.assertChangeAnnotations(this.changeAnnotations),p=this.changeAnnotations.manage(a),s=cn.replace(r,i,p)),this.edits.push(s),p!==void 0)return p},t.prototype.delete=function(r,i){var a,s;if(i===void 0?a=kn.del(r):Sr.is(i)?(s=i,a=cn.del(r,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),a=cn.del(r,s)),this.edits.push(a),s!==void 0)return s},t.prototype.add=function(r){this.edits.push(r)},t.prototype.all=function(){return this.edits},t.prototype.clear=function(){this.edits.splice(0,this.edits.length)},t.prototype.assertChangeAnnotations=function(r){if(r===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},t}(),on=function(){function t(r){this._annotations=r===void 0?Object.create(null):r,this._counter=0,this._size=0}return t.prototype.all=function(){return this._annotations},Object.defineProperty(t.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),t.prototype.manage=function(r,i){var a;if(Sr.is(r)?a=r:(a=this.nextId(),i=r),this._annotations[a]!==void 0)throw new Error("Id "+a+" is already in use.");if(i===void 0)throw new Error("No annotation provided for id "+a);return this._annotations[a]=i,this._size++,a},t.prototype.nextId=function(){return this._counter++,this._counter.toString()},t}(),Wr=function(){function t(r){var i=this;this._textEditChanges=Object.create(null),r!==void 0?(this._workspaceEdit=r,r.documentChanges?(this._changeAnnotations=new on(r.changeAnnotations),r.changeAnnotations=this._changeAnnotations.all(),r.documentChanges.forEach(function(a){if(Ba.is(a)){var s=new Ua(a.edits,i._changeAnnotations);i._textEditChanges[a.textDocument.uri]=s}})):r.changes&&Object.keys(r.changes).forEach(function(a){var s=new Ua(r.changes[a]);i._textEditChanges[a]=s})):this._workspaceEdit={}}return Object.defineProperty(t.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),t.prototype.getTextEditChange=function(r){if(Ii.is(r)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i={uri:r.uri,version:r.version},a=this._textEditChanges[i.uri];if(!a){var s=[],p={textDocument:i,edits:s};this._workspaceEdit.documentChanges.push(p),a=new Ua(s,this._changeAnnotations),this._textEditChanges[i.uri]=a}return a}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var a=this._textEditChanges[r];if(!a){var s=[];this._workspaceEdit.changes[r]=s,a=new Ua(s),this._textEditChanges[r]=a}return a}},t.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new on,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},t.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},t.prototype.createFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;So.is(i)||Sr.is(i)?s=i:a=i;var p,y;if(s===void 0?p=_o.create(r,a):(y=Sr.is(s)?s:this._changeAnnotations.manage(s),p=_o.create(r,a,y)),this._workspaceEdit.documentChanges.push(p),y!==void 0)return y},t.prototype.renameFile=function(r,i,a,s){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var p;So.is(a)||Sr.is(a)?p=a:s=a;var y,E;if(p===void 0?y=ea.create(r,i,s):(E=Sr.is(p)?p:this._changeAnnotations.manage(p),y=ea.create(r,i,s,E)),this._workspaceEdit.documentChanges.push(y),E!==void 0)return E},t.prototype.deleteFile=function(r,i,a){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;So.is(i)||Sr.is(i)?s=i:a=i;var p,y;if(s===void 0?p=ta.create(r,a):(y=Sr.is(s)?s:this._changeAnnotations.manage(s),p=ta.create(r,a,y)),this._workspaceEdit.documentChanges.push(p),y!==void 0)return y},t}(),$r;(function(t){function r(a){return{uri:a}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Xe.string(s.uri)}t.is=i})($r||($r={}));var Mr;(function(t){function r(a,s){return{uri:a,version:s}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Xe.string(s.uri)&&Xe.integer(s.version)}t.is=i})(Mr||(Mr={}));var Ii;(function(t){function r(a,s){return{uri:a,version:s}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Xe.string(s.uri)&&(s.version===null||Xe.integer(s.version))}t.is=i})(Ii||(Ii={}));var du;(function(t){function r(a,s,p,y){return{uri:a,languageId:s,version:p,text:y}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Xe.string(s.uri)&&Xe.string(s.languageId)&&Xe.integer(s.version)&&Xe.string(s.text)}t.is=i})(du||(du={}));var Rn;(function(t){t.PlainText="plaintext",t.Markdown="markdown"})(Rn||(Rn={})),function(t){function r(i){var a=i;return a===t.PlainText||a===t.Markdown}t.is=r}(Rn||(Rn={}));var zs;(function(t){function r(i){var a=i;return Xe.objectLiteral(i)&&Rn.is(a.kind)&&Xe.string(a.value)}t.is=r})(zs||(zs={}));var Cn;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(Cn||(Cn={}));var Vr;(function(t){t.PlainText=1,t.Snippet=2})(Vr||(Vr={}));var ja;(function(t){t.Deprecated=1})(ja||(ja={}));var Gs;(function(t){function r(a,s,p){return{newText:a,insert:s,replace:p}}t.create=r;function i(a){var s=a;return s&&Xe.string(s.newText)&&Jt.is(s.insert)&&Jt.is(s.replace)}t.is=i})(Gs||(Gs={}));var Va;(function(t){t.asIs=1,t.adjustIndentation=2})(Va||(Va={}));var $s;(function(t){function r(i){return{label:i}}t.create=r})($s||($s={}));var Ha;(function(t){function r(i,a){return{items:i||[],isIncomplete:!!a}}t.create=r})(Ha||(Ha={}));var Ao;(function(t){function r(a){return a.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=r;function i(a){var s=a;return Xe.string(s)||Xe.objectLiteral(s)&&Xe.string(s.language)&&Xe.string(s.value)}t.is=i})(Ao||(Ao={}));var Ks;(function(t){function r(i){var a=i;return!!a&&Xe.objectLiteral(a)&&(zs.is(a.contents)||Ao.is(a.contents)||Xe.typedArray(a.contents,Ao.is))&&(i.range===void 0||Jt.is(i.range))}t.is=r})(Ks||(Ks={}));var Ys;(function(t){function r(i,a){return a?{label:i,documentation:a}:{label:i}}t.create=r})(Ys||(Ys={}));var Wa;(function(t){function r(i,a){for(var s=[],p=2;p<arguments.length;p++)s[p-2]=arguments[p];var y={label:i};return Xe.defined(a)&&(y.documentation=a),Xe.defined(s)?y.parameters=s:y.parameters=[],y}t.create=r})(Wa||(Wa={}));var Js;(function(t){t.Text=1,t.Read=2,t.Write=3})(Js||(Js={}));var Eo;(function(t){function r(i,a){var s={range:i};return Xe.number(a)&&(s.kind=a),s}t.create=r})(Eo||(Eo={}));var ei;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(ei||(ei={}));var ra;(function(t){t.Deprecated=1})(ra||(ra={}));var dn;(function(t){function r(i,a,s,p,y){var E={name:i,kind:a,location:{uri:p,range:s}};return y&&(E.containerName=y),E}t.create=r})(dn||(dn={}));var Xs;(function(t){function r(a,s,p,y,E,b){var C={name:a,detail:s,kind:p,range:y,selectionRange:E};return b!==void 0&&(C.children=b),C}t.create=r;function i(a){var s=a;return s&&Xe.string(s.name)&&Xe.number(s.kind)&&Jt.is(s.range)&&Jt.is(s.selectionRange)&&(s.detail===void 0||Xe.string(s.detail))&&(s.deprecated===void 0||Xe.boolean(s.deprecated))&&(s.children===void 0||Array.isArray(s.children))&&(s.tags===void 0||Array.isArray(s.tags))}t.is=i})(Xs||(Xs={}));var pu;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(pu||(pu={}));var Qs;(function(t){function r(a,s){var p={diagnostics:a};return s!=null&&(p.only=s),p}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Xe.typedArray(s.diagnostics,_n.is)&&(s.only===void 0||Xe.typedArray(s.only,Xe.string))}t.is=i})(Qs||(Qs={}));var pn;(function(t){function r(a,s,p){var y={title:a},E=!0;return typeof s=="string"?(E=!1,y.kind=s):wo.is(s)?y.command=s:y.edit=s,E&&p!==void 0&&(y.kind=p),y}t.create=r;function i(a){var s=a;return s&&Xe.string(s.title)&&(s.diagnostics===void 0||Xe.typedArray(s.diagnostics,_n.is))&&(s.kind===void 0||Xe.string(s.kind))&&(s.edit!==void 0||s.command!==void 0)&&(s.command===void 0||wo.is(s.command))&&(s.isPreferred===void 0||Xe.boolean(s.isPreferred))&&(s.edit===void 0||Ws.is(s.edit))}t.is=i})(pn||(pn={}));var qt;(function(t){function r(a,s){var p={range:a};return Xe.defined(s)&&(p.data=s),p}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Jt.is(s.range)&&(Xe.undefined(s.command)||wo.is(s.command))}t.is=i})(qt||(qt={}));var Mn;(function(t){function r(a,s){return{tabSize:a,insertSpaces:s}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Xe.uinteger(s.tabSize)&&Xe.boolean(s.insertSpaces)}t.is=i})(Mn||(Mn={}));var ci;(function(t){function r(a,s,p){return{range:a,target:s,data:p}}t.create=r;function i(a){var s=a;return Xe.defined(s)&&Jt.is(s.range)&&(Xe.undefined(s.target)||Xe.string(s.target))}t.is=i})(ci||(ci={}));var Wn;(function(t){function r(a,s){return{range:a,parent:s}}t.create=r;function i(a){var s=a;return s!==void 0&&Jt.is(s.range)&&(s.parent===void 0||t.is(s.parent))}t.is=i})(Wn||(Wn={}));var $f=null,za;(function(t){function r(p,y,E,b){return new hu(p,y,E,b)}t.create=r;function i(p){var y=p;return!!(Xe.defined(y)&&Xe.string(y.uri)&&(Xe.undefined(y.languageId)||Xe.string(y.languageId))&&Xe.uinteger(y.lineCount)&&Xe.func(y.getText)&&Xe.func(y.positionAt)&&Xe.func(y.offsetAt))}t.is=i;function a(p,y){for(var E=p.getText(),b=s(y,function(le,ge){var pe=le.range.start.line-ge.range.start.line;return pe===0?le.range.start.character-ge.range.start.character:pe}),C=E.length,M=b.length-1;M>=0;M--){var J=b[M],ie=p.offsetAt(J.range.start),ne=p.offsetAt(J.range.end);if(ne<=C)E=E.substring(0,ie)+J.newText+E.substring(ne,E.length);else throw new Error("Overlapping edit");C=ie}return E}t.applyEdits=a;function s(p,y){if(p.length<=1)return p;var E=p.length/2|0,b=p.slice(0,E),C=p.slice(E);s(b,y),s(C,y);for(var M=0,J=0,ie=0;M<b.length&&J<C.length;){var ne=y(b[M],C[J]);ne<=0?p[ie++]=b[M++]:p[ie++]=C[J++]}for(;M<b.length;)p[ie++]=b[M++];for(;J<C.length;)p[ie++]=C[J++];return p}})(za||(za={}));var hu=function(){function t(r,i,a,s){this._uri=r,this._languageId=i,this._version=a,this._content=s,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),t.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},t.prototype.update=function(r,i){this._content=r.text,this._version=i,this._lineOffsets=void 0},t.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var r=[],i=this._content,a=!0,s=0;s<i.length;s++){a&&(r.push(s),a=!1);var p=i.charAt(s);a=p==="\r"||p===`
169
+ `,p==="\r"&&s+1<i.length&&i.charAt(s+1)===`
170
+ `&&s++}a&&i.length>0&&r.push(i.length),this._lineOffsets=r}return this._lineOffsets},t.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,s=i.length;if(s===0)return En.create(0,r);for(;a<s;){var p=Math.floor((a+s)/2);i[p]>r?s=p:a=p+1}var y=a-1;return En.create(y,r-i[y])},t.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],s=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,s),a)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),t}(),Xe;(function(t){var r=Object.prototype.toString;function i(ne){return typeof ne!="undefined"}t.defined=i;function a(ne){return typeof ne=="undefined"}t.undefined=a;function s(ne){return ne===!0||ne===!1}t.boolean=s;function p(ne){return r.call(ne)==="[object String]"}t.string=p;function y(ne){return r.call(ne)==="[object Number]"}t.number=y;function E(ne,le,ge){return r.call(ne)==="[object Number]"&&le<=ne&&ne<=ge}t.numberRange=E;function b(ne){return r.call(ne)==="[object Number]"&&-2147483648<=ne&&ne<=2147483647}t.integer=b;function C(ne){return r.call(ne)==="[object Number]"&&0<=ne&&ne<=2147483647}t.uinteger=C;function M(ne){return r.call(ne)==="[object Function]"}t.func=M;function J(ne){return ne!==null&&typeof ne=="object"}t.objectLiteral=J;function ie(ne,le){return Array.isArray(ne)&&ne.every(le)}t.typedArray=ie})(Xe||(Xe={}));var Ga=function(){function t(r,i,a,s){this._uri=r,this._languageId=i,this._version=a,this._content=s,this._lineOffsets=void 0}return Object.defineProperty(t.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),t.prototype.getText=function(r){if(r){var i=this.offsetAt(r.start),a=this.offsetAt(r.end);return this._content.substring(i,a)}return this._content},t.prototype.update=function(r,i){for(var a=0,s=r;a<s.length;a++){var p=s[a];if(t.isIncremental(p)){var y=di(p.range),E=this.offsetAt(y.start),b=this.offsetAt(y.end);this._content=this._content.substring(0,E)+p.text+this._content.substring(b,this._content.length);var C=Math.max(y.start.line,0),M=Math.max(y.end.line,0),J=this._lineOffsets,ie=Ka(p.text,!1,E);if(M-C===ie.length)for(var ne=0,le=ie.length;ne<le;ne++)J[ne+C+1]=ie[ne];else ie.length<1e4?J.splice.apply(J,[C+1,M-C].concat(ie)):this._lineOffsets=J=J.slice(0,C+1).concat(ie,J.slice(M+1));var ge=p.text.length-(b-E);if(ge!==0)for(var ne=C+1+ie.length,le=J.length;ne<le;ne++)J[ne]=J[ne]+ge}else if(t.isFull(p))this._content=p.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=i},t.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Ka(this._content,!0)),this._lineOffsets},t.prototype.positionAt=function(r){r=Math.max(Math.min(r,this._content.length),0);var i=this.getLineOffsets(),a=0,s=i.length;if(s===0)return{line:0,character:r};for(;a<s;){var p=Math.floor((a+s)/2);i[p]>r?s=p:a=p+1}var y=a-1;return{line:y,character:r-i[y]}},t.prototype.offsetAt=function(r){var i=this.getLineOffsets();if(r.line>=i.length)return this._content.length;if(r.line<0)return 0;var a=i[r.line],s=r.line+1<i.length?i[r.line+1]:this._content.length;return Math.max(Math.min(a+r.character,s),a)},Object.defineProperty(t.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),t.isIncremental=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range!==void 0&&(i.rangeLength===void 0||typeof i.rangeLength=="number")},t.isFull=function(r){var i=r;return i!=null&&typeof i.text=="string"&&i.range===void 0&&i.rangeLength===void 0},t}(),Fi;(function(t){function r(s,p,y,E){return new Ga(s,p,y,E)}t.create=r;function i(s,p,y){if(s instanceof Ga)return s.update(p,y),s;throw new Error("TextDocument.update: document must be created by TextDocument.create")}t.update=i;function a(s,p){for(var y=s.getText(),E=$a(p.map(vu),function(le,ge){var pe=le.range.start.line-ge.range.start.line;return pe===0?le.range.start.character-ge.range.start.character:pe}),b=0,C=[],M=0,J=E;M<J.length;M++){var ie=J[M],ne=s.offsetAt(ie.range.start);if(ne<b)throw new Error("Overlapping edit");ne>b&&C.push(y.substring(b,ne)),ie.newText.length&&C.push(ie.newText),b=s.offsetAt(ie.range.end)}return C.push(y.substr(b)),C.join("")}t.applyEdits=a})(Fi||(Fi={}));function $a(t,r){if(t.length<=1)return t;var i=t.length/2|0,a=t.slice(0,i),s=t.slice(i);$a(a,r),$a(s,r);for(var p=0,y=0,E=0;p<a.length&&y<s.length;){var b=r(a[p],s[y]);b<=0?t[E++]=a[p++]:t[E++]=s[y++]}for(;p<a.length;)t[E++]=a[p++];for(;y<s.length;)t[E++]=s[y++];return t}function Ka(t,r,i){i===void 0&&(i=0);for(var a=r?[i]:[],s=0;s<t.length;s++){var p=t.charCodeAt(s);(p===13||p===10)&&(p===13&&s+1<t.length&&t.charCodeAt(s+1)===10&&s++,a.push(i+s+1))}return a}function di(t){var r=t.start,i=t.end;return r.line>i.line||r.line===i.line&&r.character>i.character?{start:i,end:r}:t}function vu(t){var r=di(t.range);return r!==t.range?{newText:t.newText,range:r}:t}var Kt;(function(t){t[t.Undefined=0]="Undefined",t[t.EnumValueMismatch=1]="EnumValueMismatch",t[t.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",t[t.UnexpectedEndOfString=258]="UnexpectedEndOfString",t[t.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",t[t.InvalidUnicode=260]="InvalidUnicode",t[t.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",t[t.InvalidCharacter=262]="InvalidCharacter",t[t.PropertyExpected=513]="PropertyExpected",t[t.CommaExpected=514]="CommaExpected",t[t.ColonExpected=515]="ColonExpected",t[t.ValueExpected=516]="ValueExpected",t[t.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",t[t.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",t[t.TrailingComma=519]="TrailingComma",t[t.DuplicateKey=520]="DuplicateKey",t[t.CommentNotPermitted=521]="CommentNotPermitted",t[t.SchemaResolveError=768]="SchemaResolveError"})(Kt||(Kt={}));var gu;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Rn.Markdown,Rn.PlainText],commitCharactersSupport:!0}}}}})(gu||(gu={}));var ti=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var p in s)s.hasOwnProperty(p)&&(a[p]=s[p])},t(r,i)};return function(r,i){t(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),Zs={"color-hex":{errorMessage:"Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA.",pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:"String is not a RFC3339 date-time.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:"String is not a RFC3339 date.",pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:"String is not a RFC3339 time.",pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:"String is not an e-mail address.",pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},ki=function(){function t(r,i,a){this.offset=i,this.length=a,this.parent=r}return Object.defineProperty(t.prototype,"children",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},t}(),Kf=function(t){ti(r,t);function r(i,a){var s=t.call(this,i,a)||this;return s.type="null",s.value=null,s}return r}(ki),qs=function(t){ti(r,t);function r(i,a,s){var p=t.call(this,i,s)||this;return p.type="boolean",p.value=a,p}return r}(ki),Yf=function(t){ti(r,t);function r(i,a){var s=t.call(this,i,a)||this;return s.type="array",s.items=[],s}return Object.defineProperty(r.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),r}(ki),Jf=function(t){ti(r,t);function r(i,a){var s=t.call(this,i,a)||this;return s.type="number",s.isInteger=!0,s.value=Number.NaN,s}return r}(ki),na=function(t){ti(r,t);function r(i,a,s){var p=t.call(this,i,a,s)||this;return p.type="string",p.value="",p}return r}(ki),yu=function(t){ti(r,t);function r(i,a){var s=t.call(this,i,a)||this;return s.type="property",s.colonOffset=-1,s}return Object.defineProperty(r.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),r}(ki),Xf=function(t){ti(r,t);function r(i,a){var s=t.call(this,i,a)||this;return s.type="object",s.properties=[],s}return Object.defineProperty(r.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),r}(ki);function hn(t){return qn(t)?t?{}:{not:{}}:t}var _s;(function(t){t[t.Key=0]="Key",t[t.Enum=1]="Enum"})(_s||(_s={}));var Co=function(){function t(r,i){r===void 0&&(r=-1),i===void 0&&(i=null),this.focusOffset=r,this.exclude=i,this.schemas=[]}return t.prototype.add=function(r){this.schemas.push(r)},t.prototype.merge=function(r){var i;(i=this.schemas).push.apply(i,r.schemas)},t.prototype.include=function(r){return(this.focusOffset===-1||xu(r,this.focusOffset))&&r!==this.exclude},t.prototype.newSub=function(){return new t(-1,this.exclude)},t}(),ia=function(){function t(){}return Object.defineProperty(t.prototype,"schemas",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.add=function(r){},t.prototype.merge=function(r){},t.prototype.include=function(r){return!0},t.prototype.newSub=function(){return this},t.instance=new t,t}(),Kr=function(){function t(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=null}return t.prototype.hasProblems=function(){return!!this.problems.length},t.prototype.mergeAll=function(r){for(var i=0,a=r;i<a.length;i++){var s=a[i];this.merge(s)}},t.prototype.merge=function(r){this.problems=this.problems.concat(r.problems)},t.prototype.mergeEnumValues=function(r){if(!this.enumValueMatch&&!r.enumValueMatch&&this.enumValues&&r.enumValues){this.enumValues=this.enumValues.concat(r.enumValues);for(var i=0,a=this.problems;i<a.length;i++){var s=a[i];s.code===Kt.EnumValueMismatch&&(s.message="Value is not accepted. Valid values: "+this.enumValues.map(function(p){return JSON.stringify(p)}).join(", ")+".")}}},t.prototype.mergePropertyMatch=function(r){this.merge(r),this.propertiesMatches++,(r.enumValueMatch||!r.hasProblems()&&r.propertiesMatches)&&this.propertiesValueMatches++,r.enumValueMatch&&r.enumValues&&r.enumValues.length===1&&this.primaryValueMatches++},t.prototype.compare=function(r){var i=this.hasProblems();return i!==r.hasProblems()?i?-1:1:this.enumValueMatch!==r.enumValueMatch?r.enumValueMatch?-1:1:this.primaryValueMatches!==r.primaryValueMatches?this.primaryValueMatches-r.primaryValueMatches:this.propertiesValueMatches!==r.propertiesValueMatches?this.propertiesValueMatches-r.propertiesValueMatches:this.propertiesMatches-r.propertiesMatches},t}();function mu(t,r){return r===void 0&&(r=[]),new el(t,r,[])}function ri(t){return Da(t)}function Ya(t){return su(t)}function xu(t,r,i){return i===void 0&&(i=!1),r>=t.offset&&r<t.offset+t.length||i&&r===t.offset+t.length}var el=function(){function t(r,i,a){i===void 0&&(i=[]),a===void 0&&(a=[]),this.root=r,this.syntaxErrors=i,this.comments=a}return t.prototype.getNodeFromOffset=function(r,i){if(i===void 0&&(i=!1),this.root)return au(this.root,r,i)},t.prototype.visit=function(r){if(this.root){var i=function(a){var s=r(a),p=a.children;if(Array.isArray(p))for(var y=0;y<p.length&&s;y++)s=i(p[y]);return s};i(this.root)}},t.prototype.validate=function(r,i){if(this.root&&i){var a=new Kr;return _t(this.root,i,a,ia.instance),a.problems.map(function(s){var p=Jt.create(r.positionAt(s.location.offset),r.positionAt(s.location.offset+s.location.length));return _n.create(p,s.message,s.severity,s.code)})}return null},t.prototype.getMatchingSchemas=function(r,i,a){i===void 0&&(i=-1),a===void 0&&(a=null);var s=new Co(i,a);return this.root&&r&&_t(this.root,r,new Kr,s),s.schemas},t}();function _t(t,r,i,a){if(!t||!a.include(t))return;switch(t.type){case"object":b(t,r,i,a);break;case"array":E(t,r,i,a);break;case"string":y(t,r,i,a);break;case"number":p(t,r,i,a);break;case"property":return _t(t.valueNode,r,i,a)}s(),a.add({node:t,schema:r});function s(){function C(_e){return t.type===_e||_e==="integer"&&t.type==="number"&&t.isInteger||r.nullable&&t.value===null}if(Array.isArray(r.type)?r.type.some(C)||i.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:r.errorMessage||"Incorrect type. Expected one of "+r.type.join(", ")+"."}):r.type&&(C(r.type)||i.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:r.errorMessage||'Incorrect type. Expected "'+r.type+'".'})),Array.isArray(r.allOf))for(var M=0,J=r.allOf;M<J.length;M++){var ie=J[M];_t(t,hn(ie),i,a)}var ne=hn(r.not);if(ne){var le=new Kr,ge=a.newSub();_t(t,ne,le,ge),le.hasProblems()||i.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,message:"Matches a schema that is not allowed."});for(var pe=0,Se=ge.schemas;pe<Se.length;pe++){var xe=Se[pe];xe.inverted=!xe.inverted,a.add(xe)}}var Fe=function(_e,xt){for(var Nt=[],Wt=null,lr=0,Rr=_e;lr<Rr.length;lr++){var Or=Rr[lr],Gr=hn(Or),wr=new Kr,Ur=a.newSub();if(_t(t,Gr,wr,Ur),wr.hasProblems()||Nt.push(Gr),!Wt)Wt={schema:Gr,validationResult:wr,matchingSchemas:Ur};else if(!xt&&!wr.hasProblems()&&!Wt.validationResult.hasProblems())Wt.matchingSchemas.merge(Ur),Wt.validationResult.propertiesMatches+=wr.propertiesMatches,Wt.validationResult.propertiesValueMatches+=wr.propertiesValueMatches;else{var gn=wr.compare(Wt.validationResult);gn>0?Wt={schema:Gr,validationResult:wr,matchingSchemas:Ur}:gn===0&&(Wt.matchingSchemas.merge(Ur),Wt.validationResult.mergeEnumValues(wr))}}return Nt.length>1&&xt&&i.problems.push({location:{offset:t.offset,length:1},severity:Dt.Warning,message:"Matches multiple schemas when only one must validate."}),Wt!==null&&(i.merge(Wt.validationResult),i.propertiesMatches+=Wt.validationResult.propertiesMatches,i.propertiesValueMatches+=Wt.validationResult.propertiesValueMatches,a.merge(Wt.matchingSchemas)),Nt.length};Array.isArray(r.anyOf)&&Fe(r.anyOf,!1),Array.isArray(r.oneOf)&&Fe(r.oneOf,!0);var $e=function(_e){var xt=new Kr,Nt=a.newSub();_t(t,hn(_e),xt,Nt),i.merge(xt),i.propertiesMatches+=xt.propertiesMatches,i.propertiesValueMatches+=xt.propertiesValueMatches,a.merge(Nt)},Be=function(_e,xt,Nt){var Wt=hn(_e),lr=new Kr,Rr=a.newSub();_t(t,Wt,lr,Rr),a.merge(Rr),lr.hasProblems()?Nt&&$e(Nt):xt&&$e(xt)},Ge=hn(r.if);if(Ge&&Be(Ge,hn(r.then),hn(r.else)),Array.isArray(r.enum)){for(var De=ri(t),je=!1,Ve=0,Ke=r.enum;Ve<Ke.length;Ve++){var ze=Ke[Ve];if(Ti(De,ze)){je=!0;break}}i.enumValues=r.enum,i.enumValueMatch=je,je||i.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,code:Kt.EnumValueMismatch,message:r.errorMessage||"Value is not accepted. Valid values: "+r.enum.map(function(_e){return JSON.stringify(_e)}).join(", ")+"."})}if(Fn(r.const)){var De=ri(t);Ti(De,r.const)?i.enumValueMatch=!0:(i.problems.push({location:{offset:t.offset,length:t.length},severity:Dt.Warning,code:Kt.EnumValueMismatch,message:r.errorMessage||"Value must be "+JSON.stringify(r.const)+"."}),i.enumValueMatch=!1),i.enumValues=[r.const]}r.deprecationMessage&&t.parent&&i.problems.push({location:{offset:t.parent.offset,length:t.parent.length},severity:Dt.Warning,message:r.deprecationMessage})}function p(C,M,J,ie){var ne=C.value;fn(M.multipleOf)&&ne%M.multipleOf!=0&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Value is not divisible by "+M.multipleOf+"."});function le($e,Be){if(fn(Be))return Be;if(qn(Be)&&Be)return $e}function ge($e,Be){if(!qn(Be)||!Be)return $e}var pe=le(M.minimum,M.exclusiveMinimum);fn(pe)&&ne<=pe&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Value is below the exclusive minimum of "+pe+"."});var Se=le(M.maximum,M.exclusiveMaximum);fn(Se)&&ne>=Se&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Value is above the exclusive maximum of "+Se+"."});var xe=ge(M.minimum,M.exclusiveMinimum);fn(xe)&&ne<xe&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Value is below the minimum of "+xe+"."});var Fe=ge(M.maximum,M.exclusiveMaximum);fn(Fe)&&ne>Fe&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Value is above the maximum of "+Fe+"."})}function y(C,M,J,ie){if(fn(M.minLength)&&C.value.length<M.minLength&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"String is shorter than the minimum length of "+M.minLength+"."}),fn(M.maxLength)&&C.value.length>M.maxLength&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"String is longer than the maximum length of "+M.maxLength+"."}),Gf(M.pattern)){var ne=new RegExp(M.pattern);ne.test(C.value)||J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:M.patternErrorMessage||M.errorMessage||'String does not match the pattern of "'+M.pattern+'".'})}if(M.format)switch(M.format){case"uri":case"uri-reference":{var le=void 0;if(!C.value)le="URI expected.";else{var ge=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(C.value);ge?!ge[2]&&M.format==="uri"&&(le="URI with a scheme is expected."):le="URI is expected."}le&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:M.patternErrorMessage||M.errorMessage||"String is not a URI: "+le})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var pe=Zs[M.format];(!C.value||!pe.pattern.exec(C.value))&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:M.patternErrorMessage||M.errorMessage||pe.errorMessage});break;default:}}function E(C,M,J,ie){if(Array.isArray(M.items)){for(var ne=M.items,le=0;le<ne.length;le++){var ge=ne[le],pe=hn(ge),Se=new Kr,xe=C.items[le];xe?(_t(xe,pe,Se,ie),J.mergePropertyMatch(Se)):C.items.length>=ne.length&&J.propertiesValueMatches++}if(C.items.length>ne.length)if(typeof M.additionalItems=="object")for(var Fe=ne.length;Fe<C.items.length;Fe++){var Se=new Kr;_t(C.items[Fe],M.additionalItems,Se,ie),J.mergePropertyMatch(Se)}else M.additionalItems===!1&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Array has too many items according to schema. Expected "+ne.length+" or fewer."})}else{var $e=hn(M.items);if($e)for(var Be=0,Ge=C.items;Be<Ge.length;Be++){var xe=Ge[Be],Se=new Kr;_t(xe,$e,Se,ie),J.mergePropertyMatch(Se)}}var De=hn(M.contains);if(De){var je=C.items.some(function(ze){var _e=new Kr;return _t(ze,De,_e,ia.instance),!_e.hasProblems()});je||J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:M.errorMessage||"Array does not contain required item."})}if(fn(M.minItems)&&C.items.length<M.minItems&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Array has too few items. Expected "+M.minItems+" or more."}),fn(M.maxItems)&&C.items.length>M.maxItems&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Array has too many items. Expected "+M.maxItems+" or fewer."}),M.uniqueItems===!0){var Ve=ri(C),Ke=Ve.some(function(ze,_e){return _e!==Ve.lastIndexOf(ze)});Ke&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Array has duplicate items."})}}function b(C,M,J,ie){for(var ne=Object.create(null),le=[],ge=0,pe=C.properties;ge<pe.length;ge++){var Se=pe[ge],xe=Se.keyNode.value;ne[xe]=Se.valueNode,le.push(xe)}if(Array.isArray(M.required))for(var Fe=0,$e=M.required;Fe<$e.length;Fe++){var Be=$e[Fe];if(!ne[Be]){var Ge=C.parent&&C.parent.type==="property"&&C.parent.keyNode,De=Ge?{offset:Ge.offset,length:Ge.length}:{offset:C.offset,length:1};J.problems.push({location:De,severity:Dt.Warning,message:'Missing property "'+Be+'".'})}}var je=function(xi){for(var Tl=le.indexOf(xi);Tl>=0;)le.splice(Tl,1),Tl=le.indexOf(xi)};if(M.properties)for(var Ve=0,Ke=Object.keys(M.properties);Ve<Ke.length;Ve++){var Be=Ke[Ve];je(Be);var ze=M.properties[Be],_e=ne[Be];if(_e)if(qn(ze))if(ze)J.propertiesMatches++,J.propertiesValueMatches++;else{var Se=_e.parent;J.problems.push({location:{offset:Se.keyNode.offset,length:Se.keyNode.length},severity:Dt.Warning,message:M.errorMessage||"Property "+Be+" is not allowed."})}else{var xt=new Kr;_t(_e,ze,xt,ie),J.mergePropertyMatch(xt)}}if(M.patternProperties)for(var Nt=0,Wt=Object.keys(M.patternProperties);Nt<Wt.length;Nt++)for(var lr=Wt[Nt],Rr=new RegExp(lr),Or=0,Gr=le.slice(0);Or<Gr.length;Or++){var Be=Gr[Or];if(Rr.test(Be)){je(Be);var _e=ne[Be];if(_e){var ze=M.patternProperties[lr];if(qn(ze))if(ze)J.propertiesMatches++,J.propertiesValueMatches++;else{var Se=_e.parent;J.problems.push({location:{offset:Se.keyNode.offset,length:Se.keyNode.length},severity:Dt.Warning,message:M.errorMessage||"Property "+Be+" is not allowed."})}else{var xt=new Kr;_t(_e,ze,xt,ie),J.mergePropertyMatch(xt)}}}}if(typeof M.additionalProperties=="object")for(var wr=0,Ur=le;wr<Ur.length;wr++){var Be=Ur[wr],_e=ne[Be];if(_e){var xt=new Kr;_t(_e,M.additionalProperties,xt,ie),J.mergePropertyMatch(xt)}}else if(M.additionalProperties===!1&&le.length>0)for(var gn=0,Xt=le;gn<Xt.length;gn++){var Be=Xt[gn],_e=ne[Be];if(_e){var Se=_e.parent;J.problems.push({location:{offset:Se.keyNode.offset,length:Se.keyNode.length},severity:Dt.Warning,message:M.errorMessage||"Property "+Be+" is not allowed."})}}if(fn(M.maxProperties)&&C.properties.length>M.maxProperties&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Object has more properties than limit of "+M.maxProperties+"."}),fn(M.minProperties)&&C.properties.length<M.minProperties&&J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Object has fewer properties than the required number of "+M.minProperties}),M.dependencies)for(var Rt=0,Bt=Object.keys(M.dependencies);Rt<Bt.length;Rt++){var xe=Bt[Rt],ur=ne[xe];if(ur){var tn=M.dependencies[xe];if(Array.isArray(tn))for(var yr=0,ys=tn;yr<ys.length;yr++){var Cl=ys[yr];ne[Cl]?J.propertiesValueMatches++:J.problems.push({location:{offset:C.offset,length:C.length},severity:Dt.Warning,message:"Object is missing property "+Cl+" required by property {$key}."})}else{var ze=hn(tn);if(ze){var xt=new Kr;_t(C,ze,xt,ie),J.mergePropertyMatch(xt)}}}}var Sa=hn(M.propertyNames);if(Sa)for(var Di=0,Ol=C.properties;Di<Ol.length;Di++){var gf=Ol[Di],xe=gf.keyNode;xe&&_t(xe,Sa,J,ia.instance)}}}function Ja(t,r){var i=[],a=-1,s=t.getText(),p=An(s,!1),y=r&&r.collectComments?[]:void 0;function E(){for(;;){var Ge=p.scan();switch(J(),Ge){case 12:case 13:Array.isArray(y)&&y.push(Jt.create(t.positionAt(p.getTokenOffset()),t.positionAt(p.getTokenOffset()+p.getTokenLength())));break;case 15:case 14:break;default:return Ge}}}function b(Ge){return p.getToken()===Ge?(E(),!0):!1}function C(Ge,De,je,Ve,Ke){if(Ke===void 0&&(Ke=Dt.Error),i.length===0||je!==a){var ze=Jt.create(t.positionAt(je),t.positionAt(Ve));i.push(_n.create(ze,Ge,Ke,De,t.languageId)),a=je}}function M(Ge,De,je,Ve,Ke){je===void 0&&(je=null),Ve===void 0&&(Ve=[]),Ke===void 0&&(Ke=[]);var ze=p.getTokenOffset(),_e=p.getTokenOffset()+p.getTokenLength();if(ze===_e&&ze>0){for(ze--;ze>0&&/\s/.test(s.charAt(ze));)ze--;_e=ze+1}if(C(Ge,De,ze,_e),je&&ie(je,!1),Ve.length+Ke.length>0)for(var xt=p.getToken();xt!==17;){if(Ve.indexOf(xt)!==-1){E();break}else if(Ke.indexOf(xt)!==-1)break;xt=E()}return je}function J(){switch(p.getTokenError()){case 4:return M("Invalid unicode sequence in string.",Kt.InvalidUnicode),!0;case 5:return M("Invalid escape character in string.",Kt.InvalidEscapeCharacter),!0;case 3:return M("Unexpected end of number.",Kt.UnexpectedEndOfNumber),!0;case 1:return M("Unexpected end of comment.",Kt.UnexpectedEndOfComment),!0;case 2:return M("Unexpected end of string.",Kt.UnexpectedEndOfString),!0;case 6:return M("Invalid characters in string. Control characters must be escaped.",Kt.InvalidCharacter),!0}return!1}function ie(Ge,De){return Ge.length=p.getTokenOffset()+p.getTokenLength()-Ge.offset,De&&E(),Ge}function ne(Ge){if(p.getToken()!==3)return null;var De=new Yf(Ge,p.getTokenOffset());E();for(var je=0,Ve=!1;p.getToken()!==4&&p.getToken()!==17;){if(p.getToken()===5){Ve||M("Value expected",Kt.ValueExpected);var Ke=p.getTokenOffset();if(E(),p.getToken()===4){Ve&&C("Trailing comma",Kt.TrailingComma,Ke,Ke+1);continue}}else Ve&&M("Expected comma",Kt.CommaExpected);var ze=Fe(De,je++);ze?De.items.push(ze):M("Value expected",Kt.ValueExpected,null,[],[4,5]),Ve=!0}return p.getToken()!==4?M("Expected comma or closing bracket",Kt.CommaOrCloseBacketExpected,De):ie(De,!0)}function le(Ge,De){var je=new yu(Ge,p.getTokenOffset()),Ve=pe(je);if(!Ve)if(p.getToken()===16){M("Property keys must be doublequoted",Kt.Undefined);var Ke=new na(je,p.getTokenOffset(),p.getTokenLength());Ke.value=p.getTokenValue(),Ve=Ke,E()}else return null;je.keyNode=Ve;var ze=De[Ve.value];if(ze?(C("Duplicate object key",Kt.DuplicateKey,je.keyNode.offset,je.keyNode.offset+je.keyNode.length,Dt.Warning),typeof ze=="object"&&C("DuplicateKeyWarning",Kt.DuplicateKey,ze.keyNode.offset,ze.keyNode.offset+ze.keyNode.length,Dt.Warning),De[Ve.value]=!0):De[Ve.value]=je,p.getToken()===6)je.colonOffset=p.getTokenOffset(),E();else if(M("Colon expected",Kt.ColonExpected),p.getToken()===10&&t.positionAt(Ve.offset+Ve.length).line<t.positionAt(p.getTokenOffset()).line)return je.length=Ve.length,je;var _e=Fe(je,Ve.value);return _e?(je.valueNode=_e,je.length=_e.offset+_e.length-je.offset,je):M("Value expected",Kt.ValueExpected,je,[],[2,5])}function ge(Ge){if(p.getToken()!==1)return null;var De=new Xf(Ge,p.getTokenOffset()),je=Object.create(null);E();for(var Ve=!1;p.getToken()!==2&&p.getToken()!==17;){if(p.getToken()===5){Ve||M("Property expected",Kt.PropertyExpected);var Ke=p.getTokenOffset();if(E(),p.getToken()===2){Ve&&C("Trailing comma",Kt.TrailingComma,Ke,Ke+1);continue}}else Ve&&M("Expected comma",Kt.CommaExpected);var ze=le(De,je);ze?De.properties.push(ze):M("Property expected",Kt.PropertyExpected,null,[],[2,5]),Ve=!0}return p.getToken()!==2?M("Expected comma or closing brace",Kt.CommaOrCloseBraceExpected,De):ie(De,!0)}function pe(Ge){if(p.getToken()!==10)return null;var De=new na(Ge,p.getTokenOffset());return De.value=p.getTokenValue(),ie(De,!0)}function Se(Ge){if(p.getToken()!==11)return null;var De=new Jf(Ge,p.getTokenOffset());if(p.getTokenError()===0){var je=p.getTokenValue();try{var Ve=JSON.parse(je);if(!fn(Ve))return M("Invalid number format.",Kt.Undefined,De);De.value=Ve}catch(Ke){return M("Invalid number format.",Kt.Undefined,De)}De.isInteger=je.indexOf(".")===-1}return ie(De,!0)}function xe(Ge){var De;switch(p.getToken()){case 7:return ie(new Kf(Ge,p.getTokenOffset()),!0);case 8:return ie(new qs(Ge,!0,p.getTokenOffset()),!0);case 9:return ie(new qs(Ge,!1,p.getTokenOffset()),!0);default:return null}}function Fe(Ge,De){return ne(Ge)||ge(Ge)||pe(Ge)||Se(Ge)||xe(Ge)}var $e=null,Be=E();return Be!==17&&($e=Fe(null,null),$e?p.getToken()!==17&&M("End of file expected.",Kt.Undefined):M("Expected a JSON object, array or literal.",Kt.Undefined)),new el($e,i,y)}function Xa(t,r,i){if(t!==null&&typeof t=="object"){var a=r+" ";if(Array.isArray(t)){if(t.length===0)return"[]";for(var s=`[
171
+ `,p=0;p<t.length;p++)s+=a+Xa(t[p],a,i),p<t.length-1&&(s+=","),s+=`
172
+ `;return s+=r+"]",s}else{var y=Object.keys(t);if(y.length===0)return"{}";for(var s=`{
173
+ `,p=0;p<y.length;p++){var E=y[p];s+=a+JSON.stringify(E)+": "+Xa(t[E],a,i),p<y.length-1&&(s+=","),s+=`
174
+ `}return s+=r+"}",s}}return i(t)}function bu(t,r){if(t.length<r.length)return!1;for(var i=0;i<r.length;i++)if(t[i]!==r[i])return!1;return!0}function Qa(t,r){var i=t.length-r.length;return i>0?t.lastIndexOf(r)===i:i===0?t===r:!1}function Oo(t){return t.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function tl(t,r){for(var i="";r>0;)(r&1)==1&&(i+=t),t+=t,r=r>>>1;return i}var wu=[",","}","]"],Su=[":"],Au=function(){function t(r,i,a,s){i===void 0&&(i=[]),a===void 0&&(a=Promise),s===void 0&&(s={}),this.schemaService=r,this.contributions=i,this.promiseConstructor=a,this.clientCapabilities=s,this.templateVarIdCounter=0}return t.prototype.doResolve=function(r){for(var i=this.contributions.length-1;i>=0;i--)if(this.contributions[i].resolveCompletion){var a=this.contributions[i].resolveCompletion(r);if(a)return a}return this.promiseConstructor.resolve(r)},t.prototype.doComplete=function(r,i,a){var s=this,p={items:[],isIncomplete:!1},y=r.getText(),E=r.offsetAt(i),b=a.getNodeFromOffset(E,!0);if(this.isInComment(r,b?b.offset:0,E))return Promise.resolve(p);if(b&&E===b.offset+b.length&&E>0){var C=y[E-1];(b.type==="object"&&C==="}"||b.type==="array"&&C==="]")&&(b=b.parent)}var M=this.getCurrentWord(r,E),J=null;if(b&&(b.type==="string"||b.type==="number"||b.type==="boolean"||b.type==="null"))J=Jt.create(r.positionAt(b.offset),r.positionAt(b.offset+b.length));else{var ie=E-M.length;ie>0&&y[ie-1]==='"'&&ie--,J=Jt.create(r.positionAt(ie),i)}var ne=this.doesSupportsCommitCharacters(),le={},ge={add:function(pe){var Se=le[pe.label];Se?Se.documentation||(Se.documentation=pe.documentation):(le[pe.label]=pe,J&&(pe.textEdit=kn.replace(J,pe.insertText)),ne&&(pe.commitCharacters=pe.kind===Cn.Property?Su:wu),p.items.push(pe))},setAsIncomplete:function(){p.isIncomplete=!0},error:function(pe){console.error(pe)},log:function(pe){console.log(pe)},getNumberOfProposals:function(){return p.items.length}};return this.schemaService.getSchemaForResource(r.uri,a).then(function(pe){var Se=[],xe=!0,Fe="",$e=null;if(b&&b.type==="string"){var Be=b.parent;Be&&Be.type==="property"&&Be.keyNode===b&&(xe=!Be.valueNode,$e=Be,Fe=y.substr(b.offset+1,b.length-2),Be&&(b=Be.parent))}if(b&&b.type==="object"){if(b.offset===E)return p;var Ge=b.properties;Ge.forEach(function(Ke){(!$e||$e!==Ke)&&(le[Ke.keyNode.value]=$s.create("__"))});var De="";xe&&(De=s.evaluateSeparatorAfter(r,r.offsetAt(J.end))),pe?s.getPropertyCompletions(pe,a,b,xe,De,ge):s.getSchemaLessPropertyCompletions(a,b,Fe,ge);var je=Ya(b);s.contributions.forEach(function(Ke){var ze=Ke.collectPropertyCompletions(r.uri,je,M,xe,De==="",ge);ze&&Se.push(ze)}),!pe&&M.length>0&&y.charAt(E-M.length-1)!=='"'&&(ge.add({kind:Cn.Property,label:s.getLabelForValue(M),insertText:s.getInsertTextForProperty(M,null,!1,De),insertTextFormat:Vr.Snippet,documentation:""}),ge.setAsIncomplete())}var Ve={};return pe?s.getValueCompletions(pe,a,b,E,r,ge,Ve):s.getSchemaLessValueCompletions(a,b,E,r,ge),s.contributions.length>0&&s.getContributedValueCompletions(a,b,E,r,ge,Se),s.promiseConstructor.all(Se).then(function(){if(ge.getNumberOfProposals()===0){var Ke=E;b&&(b.type==="string"||b.type==="number"||b.type==="boolean"||b.type==="null")&&(Ke=b.offset+b.length);var ze=s.evaluateSeparatorAfter(r,Ke);s.addFillerValueCompletions(Ve,ze,ge)}return p})})},t.prototype.getPropertyCompletions=function(r,i,a,s,p,y){var E=this,b=i.getMatchingSchemas(r.schema,a.offset);b.forEach(function(C){if(C.node===a&&!C.inverted){var M=C.schema.properties;M&&Object.keys(M).forEach(function(J){var ie=M[J],ne=!1;if(typeof ie=="object"&&ie.allOf)for(var le=0,ge=ie.allOf;le<ge.length;le++){var pe=ge[le];if(pe.readOnly){ne=!0;break}}if(typeof ie=="object"&&!ie.deprecationMessage&&!ie.doNotSuggest&&!ne){var Se={kind:Cn.Property,label:E.sanitizeLabel(J),insertText:E.getInsertTextForProperty(J,ie,s,p),insertTextFormat:Vr.Snippet,filterText:E.getFilterTextForValue(J),documentation:E.fromMarkup(ie.markdownDescription)||ie.description||""};Qa(Se.insertText,"$1"+p)&&(Se.command={title:"Suggest",command:"editor.action.triggerSuggest"}),y.add(Se)}})}})},t.prototype.getSchemaLessPropertyCompletions=function(r,i,a,s){var p=this,y=function(b){b.properties.forEach(function(C){var M=C.keyNode.value;s.add({kind:Cn.Property,label:p.sanitizeLabel(M),insertText:p.getInsertTextForValue(M,""),insertTextFormat:Vr.Snippet,filterText:p.getFilterTextForValue(M),documentation:""})})};if(i.parent)if(i.parent.type==="property"){var E=i.parent.keyNode.value;r.visit(function(b){return b.type==="property"&&b!==i.parent&&b.keyNode.value===E&&b.valueNode&&b.valueNode.type==="object"&&y(b.valueNode),!0})}else i.parent.type==="array"&&i.parent.items.forEach(function(b){b.type==="object"&&b!==i&&y(b)});else i.type==="object"&&s.add({kind:Cn.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:Vr.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},t.prototype.getSchemaLessValueCompletions=function(r,i,a,s,p){var y=this,E=a;if(i&&(i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(E=i.offset+i.length,i=i.parent),!i){p.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:Vr.Snippet,documentation:""}),p.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Vr.Snippet,documentation:""});return}var b=this.evaluateSeparatorAfter(s,E),C=function(ne){xu(ne.parent,a,!0)||p.add({kind:y.getSuggestionKind(ne.type),label:y.getLabelTextForMatchingNode(ne,s),insertText:y.getInsertTextForMatchingNode(ne,s,b),insertTextFormat:Vr.Snippet,documentation:""}),ne.type==="boolean"&&y.addBooleanValueCompletion(!ne.value,b,p)};if(i.type==="property"&&a>i.colonOffset){var M=i.valueNode;if(M&&(a>M.offset+M.length||M.type==="object"||M.type==="array"))return;var J=i.keyNode.value;r.visit(function(ne){return ne.type==="property"&&ne.keyNode.value===J&&ne.valueNode&&C(ne.valueNode),!0}),J==="$schema"&&i.parent&&!i.parent.parent&&this.addDollarSchemaCompletions(b,p)}if(i.type==="array")if(i.parent&&i.parent.type==="property"){var ie=i.parent.keyNode.value;r.visit(function(ne){return ne.type==="property"&&ne.keyNode.value===ie&&ne.valueNode&&ne.valueNode.type==="array"&&ne.valueNode.items.forEach(C),!0})}else i.items.forEach(C)},t.prototype.getValueCompletions=function(r,i,a,s,p,y,E){var b=this,C=s,M=null,J=null;if(a&&(a.type==="string"||a.type==="number"||a.type==="boolean"||a.type==="null")&&(C=a.offset+a.length,J=a,a=a.parent),!a){this.addSchemaValueCompletions(r.schema,"",y,E);return}if(a.type==="property"&&s>a.colonOffset){var ie=a.valueNode;if(ie&&s>ie.offset+ie.length)return;M=a.keyNode.value,a=a.parent}if(a&&(M!==null||a.type==="array")){var ne=this.evaluateSeparatorAfter(p,C),le=i.getMatchingSchemas(r.schema,a.offset,J);le.forEach(function(ge){if(ge.node===a&&!ge.inverted&&ge.schema){if(a.type==="array"&&ge.schema.items)if(Array.isArray(ge.schema.items)){var pe=b.findItemAtOffset(a,p,s);pe<ge.schema.items.length&&b.addSchemaValueCompletions(ge.schema.items[pe],ne,y,E)}else b.addSchemaValueCompletions(ge.schema.items,ne,y,E);if(ge.schema.properties){var Se=ge.schema.properties[M];Se&&b.addSchemaValueCompletions(Se,ne,y,E)}}}),M==="$schema"&&!a.parent&&this.addDollarSchemaCompletions(ne,y),E.boolean&&(this.addBooleanValueCompletion(!0,ne,y),this.addBooleanValueCompletion(!1,ne,y)),E.null&&this.addNullValueCompletion(ne,y)}},t.prototype.getContributedValueCompletions=function(r,i,a,s,p,y){if(!i)this.contributions.forEach(function(M){var J=M.collectDefaultCompletions(s.uri,p);J&&y.push(J)});else if((i.type==="string"||i.type==="number"||i.type==="boolean"||i.type==="null")&&(i=i.parent),i.type==="property"&&a>i.colonOffset){var E=i.keyNode.value,b=i.valueNode;if(!b||a<=b.offset+b.length){var C=Ya(i.parent);this.contributions.forEach(function(M){var J=M.collectValueCompletions(s.uri,C,E,p);J&&y.push(J)})}}},t.prototype.addSchemaValueCompletions=function(r,i,a,s){var p=this;typeof r=="object"&&(this.addEnumValueCompletions(r,i,a),this.addDefaultValueCompletions(r,i,a),this.collectTypes(r,s),Array.isArray(r.allOf)&&r.allOf.forEach(function(y){return p.addSchemaValueCompletions(y,i,a,s)}),Array.isArray(r.anyOf)&&r.anyOf.forEach(function(y){return p.addSchemaValueCompletions(y,i,a,s)}),Array.isArray(r.oneOf)&&r.oneOf.forEach(function(y){return p.addSchemaValueCompletions(y,i,a,s)}))},t.prototype.addDefaultValueCompletions=function(r,i,a,s){var p=this;s===void 0&&(s=0);var y=!1;if(Fn(r.default)){for(var E=r.type,b=r.default,C=s;C>0;C--)b=[b],E="array";a.add({kind:this.getSuggestionKind(E),label:this.getLabelForValue(b),insertText:this.getInsertTextForValue(b,i),insertTextFormat:Vr.Snippet}),y=!0}Array.isArray(r.examples)&&r.examples.forEach(function(M){for(var J=r.type,ie=M,ne=s;ne>0;ne--)ie=[ie],J="array";a.add({kind:p.getSuggestionKind(J),label:p.getLabelForValue(ie),insertText:p.getInsertTextForValue(ie,i),insertTextFormat:Vr.Snippet}),y=!0}),Array.isArray(r.defaultSnippets)&&r.defaultSnippets.forEach(function(M){var J=r.type,ie=M.body,ne=M.label,le,ge;if(Fn(ie)){for(var pe=r.type,Se=s;Se>0;Se--)ie=[ie],pe="array";le=p.getInsertTextForSnippetValue(ie,i),ge=p.getFilterTextForSnippetValue(ie),ne=ne||p.getLabelForSnippetValue(ie)}else if(typeof M.bodyText=="string"){for(var xe="",Fe="",$e="",Se=s;Se>0;Se--)xe=xe+$e+`[
175
+ `,Fe=Fe+`
176
+ `+$e+"]",$e+=" ",J="array";le=xe+$e+M.bodyText.split(`
177
+ `).join(`
178
+ `+$e)+Fe+i,ne=ne||p.sanitizeLabel(le),ge=le.replace(/[\n]/g,"")}a.add({kind:p.getSuggestionKind(J),label:ne,documentation:p.fromMarkup(M.markdownDescription)||M.description,insertText:le,insertTextFormat:Vr.Snippet,filterText:ge}),y=!0}),!y&&typeof r.items=="object"&&!Array.isArray(r.items)&&this.addDefaultValueCompletions(r.items,i,a,s+1)},t.prototype.addEnumValueCompletions=function(r,i,a){if(Fn(r.const)&&a.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(r.const),insertText:this.getInsertTextForValue(r.const,i),insertTextFormat:Vr.Snippet,documentation:this.fromMarkup(r.markdownDescription)||r.description}),Array.isArray(r.enum))for(var s=0,p=r.enum.length;s<p;s++){var y=r.enum[s],E=this.fromMarkup(r.markdownDescription)||r.description;r.markdownEnumDescriptions&&s<r.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?E=this.fromMarkup(r.markdownEnumDescriptions[s]):r.enumDescriptions&&s<r.enumDescriptions.length&&(E=r.enumDescriptions[s]),a.add({kind:this.getSuggestionKind(r.type),label:this.getLabelForValue(y),insertText:this.getInsertTextForValue(y,i),insertTextFormat:Vr.Snippet,documentation:E})}},t.prototype.collectTypes=function(r,i){if(!(Array.isArray(r.enum)||Fn(r.const))){var a=r.type;Array.isArray(a)?a.forEach(function(s){return i[s]=!0}):i[a]=!0}},t.prototype.addFillerValueCompletions=function(r,i,a){r.object&&a.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},i),insertTextFormat:Vr.Snippet,detail:"New object",documentation:""}),r.array&&a.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],i),insertTextFormat:Vr.Snippet,detail:"New array",documentation:""})},t.prototype.addBooleanValueCompletion=function(r,i,a){a.add({kind:this.getSuggestionKind("boolean"),label:r?"true":"false",insertText:this.getInsertTextForValue(r,i),insertTextFormat:Vr.Snippet,documentation:""})},t.prototype.addNullValueCompletion=function(r,i){i.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+r,insertTextFormat:Vr.Snippet,documentation:""})},t.prototype.addDollarSchemaCompletions=function(r,i){var a=this,s=this.schemaService.getRegisteredSchemaIds(function(p){return p==="http"||p==="https"});s.forEach(function(p){return i.add({kind:Cn.Module,label:a.getLabelForValue(p),filterText:a.getFilterTextForValue(p),insertText:a.getInsertTextForValue(p,r),insertTextFormat:Vr.Snippet,documentation:""})})},t.prototype.sanitizeLabel=function(r){return r=r.replace(/[\n]/g,"\u21B5"),r.length>57&&(r=r.substr(0,57).trim()+"..."),r},t.prototype.getLabelForValue=function(r){return this.sanitizeLabel(JSON.stringify(r))},t.prototype.getFilterTextForValue=function(r){return JSON.stringify(r)},t.prototype.getFilterTextForSnippetValue=function(r){return JSON.stringify(r).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},t.prototype.getLabelForSnippetValue=function(r){var i=JSON.stringify(r);return i=i.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1"),this.sanitizeLabel(i)},t.prototype.getInsertTextForPlainText=function(r){return r.replace(/[\\\$\}]/g,"\\$&")},t.prototype.getInsertTextForValue=function(r,i){var a=JSON.stringify(r,null," ");return a==="{}"?"{$1}"+i:a==="[]"?"[$1]"+i:this.getInsertTextForPlainText(a+i)},t.prototype.getInsertTextForSnippetValue=function(r,i){var a=function(s){return typeof s=="string"&&s[0]==="^"?s.substr(1):JSON.stringify(s)};return Xa(r,"",a)+i},t.prototype.getInsertTextForGuessedValue=function(r,i){switch(typeof r){case"object":return r===null?"${1:null}"+i:this.getInsertTextForValue(r,i);case"string":var a=JSON.stringify(r);return a=a.substr(1,a.length-2),a=this.getInsertTextForPlainText(a),'"${1:'+a+'}"'+i;case"number":case"boolean":return"${1:"+JSON.stringify(r)+"}"+i}return this.getInsertTextForValue(r,i)},t.prototype.getSuggestionKind=function(r){if(Array.isArray(r)){var i=r;r=i.length>0?i[0]:null}if(!r)return Cn.Value;switch(r){case"string":return Cn.Value;case"object":return Cn.Module;case"property":return Cn.Property;default:return Cn.Value}},t.prototype.getLabelTextForMatchingNode=function(r,i){switch(r.type){case"array":return"[]";case"object":return"{}";default:var a=i.getText().substr(r.offset,r.length);return a}},t.prototype.getInsertTextForMatchingNode=function(r,i,a){switch(r.type){case"array":return this.getInsertTextForValue([],a);case"object":return this.getInsertTextForValue({},a);default:var s=i.getText().substr(r.offset,r.length)+a;return this.getInsertTextForPlainText(s)}},t.prototype.getInsertTextForProperty=function(r,i,a,s){var p=this.getInsertTextForValue(r,"");if(!a)return p;var y=p+": ",E,b=0;if(i){if(Array.isArray(i.defaultSnippets)){if(i.defaultSnippets.length===1){var C=i.defaultSnippets[0].body;Fn(C)&&(E=this.getInsertTextForSnippetValue(C,""))}b+=i.defaultSnippets.length}if(i.enum&&(!E&&i.enum.length===1&&(E=this.getInsertTextForGuessedValue(i.enum[0],"")),b+=i.enum.length),Fn(i.default)&&(E||(E=this.getInsertTextForGuessedValue(i.default,"")),b++),b===0){var M=Array.isArray(i.type)?i.type[0]:i.type;switch(M||(i.properties?M="object":i.items&&(M="array")),M){case"boolean":E="$1";break;case"string":E='"$1"';break;case"object":E="{$1}";break;case"array":E="[$1]";break;case"number":case"integer":E="${1:0}";break;case"null":E="${1:null}";break;default:return p}}}return(!E||b>1)&&(E="$1"),y+E+s},t.prototype.getCurrentWord=function(r,i){for(var a=i-1,s=r.getText();a>=0&&`
179
+ \r\v":{[,]}`.indexOf(s.charAt(a))===-1;)a--;return s.substring(a+1,i)},t.prototype.evaluateSeparatorAfter=function(r,i){var a=An(r.getText(),!0);a.setPosition(i);var s=a.scan();switch(s){case 5:case 2:case 4:case 17:return"";default:return","}},t.prototype.findItemAtOffset=function(r,i,a){for(var s=An(i.getText(),!0),p=r.items,y=p.length-1;y>=0;y--){var E=p[y];if(a>E.offset+E.length){s.setPosition(E.offset+E.length);var b=s.scan();return b===5&&a>=s.getTokenOffset()+s.getTokenLength()?y+1:y}else if(a>=E.offset)return y}return 0},t.prototype.isInComment=function(r,i,a){var s=An(r.getText(),!1);s.setPosition(i);for(var p=s.scan();p!==17&&s.getTokenOffset()+s.getTokenLength()<a;)p=s.scan();return(p===12||p===13)&&s.getTokenOffset()<=a},t.prototype.fromMarkup=function(r){if(r&&this.doesSupportMarkdown())return{kind:Rn.Markdown,value:r}},t.prototype.doesSupportMarkdown=function(){if(!Fn(this.supportsMarkdown)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=r&&r.completionItem&&Array.isArray(r.completionItem.documentationFormat)&&r.completionItem.documentationFormat.indexOf(Rn.Markdown)!==-1}return this.supportsMarkdown},t.prototype.doesSupportsCommitCharacters=function(){if(!Fn(this.supportsCommitCharacters)){var r=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=r&&r.completionItem&&!!r.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},t}(),To=function(){function t(r,i,a){i===void 0&&(i=[]),this.schemaService=r,this.contributions=i,this.promise=a||Promise}return t.prototype.doHover=function(r,i,a){var s=r.offsetAt(i),p=a.getNodeFromOffset(s);if(!p||(p.type==="object"||p.type==="array")&&s>p.offset+1&&s<p.offset+p.length-1)return this.promise.resolve(null);var y=p;if(p.type==="string"){var E=p.parent;if(E&&E.type==="property"&&E.keyNode===p&&(p=E.valueNode,!p))return this.promise.resolve(null)}for(var b=Jt.create(r.positionAt(y.offset),r.positionAt(y.offset+y.length)),C=function(le){var ge={contents:le,range:b};return ge},M=Ya(p),J=this.contributions.length-1;J>=0;J--){var ie=this.contributions[J],ne=ie.getInfoContribution(r.uri,M);if(ne)return ne.then(function(le){return C(le)})}return this.schemaService.getSchemaForResource(r.uri,a).then(function(le){if(le){var ge=a.getMatchingSchemas(le.schema,p.offset),pe=null,Se=null,xe=null,Fe=null;ge.every(function(Be){if(Be.node===p&&!Be.inverted&&Be.schema&&(pe=pe||Be.schema.title,Se=Se||Be.schema.markdownDescription||Za(Be.schema.description),Be.schema.enum)){var Ge=Be.schema.enum.indexOf(ri(p));Be.schema.markdownEnumDescriptions?xe=Be.schema.markdownEnumDescriptions[Ge]:Be.schema.enumDescriptions&&(xe=Za(Be.schema.enumDescriptions[Ge])),xe&&(Fe=Be.schema.enum[Ge],typeof Fe!="string"&&(Fe=JSON.stringify(Fe)))}return!0});var $e="";return pe&&($e=Za(pe)),Se&&($e.length>0&&($e+=`
180
+
181
+ `),$e+=Se),xe&&($e.length>0&&($e+=`
182
+
183
+ `),$e+="`"+qa(Fe)+"`: "+xe),C([$e])}return null})},t}();function Za(t){if(t){var r=t.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1
184
+
185
+ $3`);return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function qa(t){return t.indexOf("`")!==-1?"`` "+t+" ``":t}var Eu=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var p in s)s.hasOwnProperty(p)&&(a[p]=s[p])},t(r,i)};return function(r,i){t(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),pr,oa;if(typeof process=="object")oa=!1;else if(typeof navigator=="object"){var Po=navigator.userAgent;oa=Po.indexOf("Windows")>=0}function Qf(t){return 55296<=t&&t<=56319}function Zf(t){return 56320<=t&&t<=57343}function qf(t){return t>=97&&t<=102}function aa(t){return t>=97&&t<=122}function sa(t){return t>=65&&t<=90}function _a(t){return aa(t)||sa(t)}var la=/^\w[\w\d+.-]*$/,Cu=/^\//,_f=/^\/\//;function Ou(t,r){if(!t.scheme&&r)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+t.authority+'", path: "'+t.path+'", query: "'+t.query+'", fragment: "'+t.fragment+'"}');if(t.scheme&&!la.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!Cu.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(_f.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Ri(t,r){return!t&&!r?"file":t}function Io(t,r){switch(t){case"https":case"http":case"file":r?r[0]!==zn&&(r=zn+r):r=zn;break}return r}var rr="",zn="/",Tu=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,rl=function(){function t(r,i,a,s,p,y){y===void 0&&(y=!1),typeof r=="object"?(this.scheme=r.scheme||rr,this.authority=r.authority||rr,this.path=r.path||rr,this.query=r.query||rr,this.fragment=r.fragment||rr):(this.scheme=Ri(r,y),this.authority=i||rr,this.path=Io(this.scheme,a||rr),this.query=s||rr,this.fragment=p||rr,Ou(this,y))}return t.isUri=function(r){return r instanceof t?!0:r?typeof r.authority=="string"&&typeof r.fragment=="string"&&typeof r.path=="string"&&typeof r.query=="string"&&typeof r.scheme=="string"&&typeof r.fsPath=="function"&&typeof r.with=="function"&&typeof r.toString=="function":!1},Object.defineProperty(t.prototype,"fsPath",{get:function(){return Iu(this,!1)},enumerable:!0,configurable:!0}),t.prototype.with=function(r){if(!r)return this;var i=r.scheme,a=r.authority,s=r.path,p=r.query,y=r.fragment;return i===void 0?i=this.scheme:i===null&&(i=rr),a===void 0?a=this.authority:a===null&&(a=rr),s===void 0?s=this.path:s===null&&(s=rr),p===void 0?p=this.query:p===null&&(p=rr),y===void 0?y=this.fragment:y===null&&(y=rr),i===this.scheme&&a===this.authority&&s===this.path&&p===this.query&&y===this.fragment?this:new Fo(i,a,s,p,y)},t.parse=function(r,i){i===void 0&&(i=!1);var a=Tu.exec(r);return a?new Fo(a[2]||rr,ua(a[4]||rr),ua(a[5]||rr),ua(a[7]||rr),ua(a[9]||rr),i):new Fo(rr,rr,rr,rr,rr)},t.file=function(r){var i=rr;if(oa&&(r=r.replace(/\\/g,zn)),r[0]===zn&&r[1]===zn){var a=r.indexOf(zn,2);a===-1?(i=r.substring(2),r=zn):(i=r.substring(2,a),r=r.substring(a)||zn)}return new Fo("file",i,r,rr,rr)},t.from=function(r){return new Fo(r.scheme,r.authority,r.path,r.query,r.fragment)},t.prototype.toString=function(r){return r===void 0&&(r=!1),il(this,r)},t.prototype.toJSON=function(){return this},t.revive=function(r){if(r){if(r instanceof t)return r;var i=new Fo(r);return i._formatted=r.external,i._fsPath=r._sep===Pu?r.fsPath:null,i}else return r},t}(),Pu=oa?1:void 0,Fo=function(t){Eu(r,t);function r(){var i=t!==null&&t.apply(this,arguments)||this;return i._formatted=null,i._fsPath=null,i}return Object.defineProperty(r.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=Iu(this,!1)),this._fsPath},enumerable:!0,configurable:!0}),r.prototype.toString=function(i){return i===void 0&&(i=!1),i?il(this,!0):(this._formatted||(this._formatted=il(this,!1)),this._formatted)},r.prototype.toJSON=function(){var i={$mid:1};return this._fsPath&&(i.fsPath=this._fsPath,i._sep=Pu),this._formatted&&(i.external=this._formatted),this.path&&(i.path=this.path),this.scheme&&(i.scheme=this.scheme),this.authority&&(i.authority=this.authority),this.query&&(i.query=this.query),this.fragment&&(i.fragment=this.fragment),i},r}(rl),_r=(pr={},pr[58]="%3A",pr[47]="%2F",pr[63]="%3F",pr[35]="%23",pr[91]="%5B",pr[93]="%5D",pr[64]="%40",pr[33]="%21",pr[36]="%24",pr[38]="%26",pr[39]="%27",pr[40]="%28",pr[41]="%29",pr[42]="%2A",pr[43]="%2B",pr[44]="%2C",pr[59]="%3B",pr[61]="%3D",pr[32]="%20",pr);function nl(t,r){for(var i=void 0,a=-1,s=0;s<t.length;s++){var p=t.charCodeAt(s);if(p>=97&&p<=122||p>=65&&p<=90||p>=48&&p<=57||p===45||p===46||p===95||p===126||r&&p===47)a!==-1&&(i+=encodeURIComponent(t.substring(a,s)),a=-1),i!==void 0&&(i+=t.charAt(s));else{i===void 0&&(i=t.substr(0,s));var y=_r[p];y!==void 0?(a!==-1&&(i+=encodeURIComponent(t.substring(a,s)),a=-1),i+=y):a===-1&&(a=s)}}return a!==-1&&(i+=encodeURIComponent(t.substring(a))),i!==void 0?i:t}function ec(t){for(var r=void 0,i=0;i<t.length;i++){var a=t.charCodeAt(i);a===35||a===63?(r===void 0&&(r=t.substr(0,i)),r+=_r[a]):r!==void 0&&(r+=t[i])}return r!==void 0?r:t}function Iu(t,r){var i;return t.authority&&t.path.length>1&&t.scheme==="file"?i="//"+t.authority+t.path:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?r?i=t.path.substr(1):i=t.path[1].toLowerCase()+t.path.substr(2):i=t.path,oa&&(i=i.replace(/\//g,"\\")),i}function il(t,r){var i=r?ec:nl,a="",s=t.scheme,p=t.authority,y=t.path,E=t.query,b=t.fragment;if(s&&(a+=s,a+=":"),(p||s==="file")&&(a+=zn,a+=zn),p){var C=p.indexOf("@");if(C!==-1){var M=p.substr(0,C);p=p.substr(C+1),C=M.indexOf(":"),C===-1?a+=i(M,!1):(a+=i(M.substr(0,C),!1),a+=":",a+=i(M.substr(C+1),!1)),a+="@"}p=p.toLowerCase(),C=p.indexOf(":"),C===-1?a+=i(p,!1):(a+=i(p.substr(0,C),!1),a+=p.substr(C))}if(y){if(y.length>=3&&y.charCodeAt(0)===47&&y.charCodeAt(2)===58){var J=y.charCodeAt(1);J>=65&&J<=90&&(y="/"+String.fromCharCode(J+32)+":"+y.substr(3))}else if(y.length>=2&&y.charCodeAt(1)===58){var J=y.charCodeAt(0);J>=65&&J<=90&&(y=String.fromCharCode(J+32)+":"+y.substr(2))}a+=i(y,!0)}return E&&(a+="?",a+=i(E,!1)),b&&(a+="#",a+=r?b:nl(b,!1)),a}function ol(t){try{return decodeURIComponent(t)}catch(r){return t.length>3?t.substr(0,3)+ol(t.substr(3)):t}}var al=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ua(t){return t.match(al)?t.replace(al,function(r){return ol(r)}):t}var tc=function(){function t(r){try{this.patternRegExp=new RegExp(Oo(r)+"$")}catch(i){this.patternRegExp=null}this.schemas=[]}return t.prototype.addSchema=function(r){this.schemas.push(r)},t.prototype.matchesPattern=function(r){return this.patternRegExp&&this.patternRegExp.test(r)},t.prototype.getSchemas=function(){return this.schemas},t}(),rc=function(){function t(r,i,a){this.service=r,this.url=i,this.dependencies={},a&&(this.unresolvedSchema=this.service.promise.resolve(new ko(a)))}return t.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},t.prototype.getResolvedSchema=function(){var r=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(i){return r.service.resolveSchemaContent(i,r.url,r.dependencies)})),this.resolvedSchema},t.prototype.clearSchema=function(){this.resolvedSchema=null,this.unresolvedSchema=null,this.dependencies={}},t}(),ko=function(){function t(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return t}(),pi=function(){function t(r,i){i===void 0&&(i=[]),this.schema=r,this.errors=i}return t.prototype.getSection=function(r){return hn(this.getSectionRecursive(r,this.schema))},t.prototype.getSectionRecursive=function(r,i){if(!i||typeof i=="boolean"||r.length===0)return i;var a=r.shift();if(i.properties&&typeof i.properties[a])return this.getSectionRecursive(r,i.properties[a]);if(i.patternProperties)for(var s=0,p=Object.keys(i.patternProperties);s<p.length;s++){var y=p[s],E=new RegExp(y);if(E.test(a))return this.getSectionRecursive(r,i.patternProperties[y])}else{if(typeof i.additionalProperties=="object")return this.getSectionRecursive(r,i.additionalProperties);if(a.match("[0-9]+")){if(Array.isArray(i.items)){var b=parseInt(a,10);if(!isNaN(b)&&i.items[b])return this.getSectionRecursive(r,i.items[b])}else if(i.items)return this.getSectionRecursive(r,i.items)}}return null},t}(),fa=function(){function t(r,i,a){this.contextService=i,this.requestService=r,this.promiseConstructor=a||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations={},this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={}}return t.prototype.getRegisteredSchemaIds=function(r){return Object.keys(this.registeredSchemasIds).filter(function(i){var a=rl.parse(i).scheme;return a!=="schemaservice"&&(!r||r(a))})},Object.defineProperty(t.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},t.prototype.onResourceChange=function(r){var i=this,a=!1;r=this.normalizeId(r);for(var s=[r],p=Object.keys(this.schemasById).map(function(C){return i.schemasById[C]});s.length;)for(var y=s.pop(),E=0;E<p.length;E++){var b=p[E];b&&(b.url===y||b.dependencies[y])&&(b.url!==y&&s.push(b.url),b.clearSchema(),p[E]=void 0,a=!0)}return a},t.prototype.normalizeId=function(r){try{return rl.parse(r).toString()}catch(i){return r}},t.prototype.setSchemaContributions=function(r){if(r.schemas){var i=r.schemas;for(var a in i){var s=this.normalizeId(a);this.contributionSchemas[s]=this.addSchemaHandle(s,i[a])}}if(r.schemaAssociations){var p=r.schemaAssociations;for(var y in p){var E=p[y];this.contributionAssociations[y]=E;for(var b=this.getOrAddFilePatternAssociation(y),C=0,M=E;C<M.length;C++){var J=M[C],a=this.normalizeId(J);b.addSchema(a)}}}},t.prototype.addSchemaHandle=function(r,i){var a=new rc(this,r,i);return this.schemasById[r]=a,a},t.prototype.getOrAddSchemaHandle=function(r,i){return this.schemasById[r]||this.addSchemaHandle(r,i)},t.prototype.getOrAddFilePatternAssociation=function(r){var i=this.filePatternAssociationById[r];return i||(i=new tc(r),this.filePatternAssociationById[r]=i,this.filePatternAssociations.push(i)),i},t.prototype.registerExternalSchema=function(r,i,a){i===void 0&&(i=null);var s=this.normalizeId(r);if(this.registeredSchemasIds[s]=!0,i)for(var p=0,y=i;p<y.length;p++){var E=y[p];this.getOrAddFilePatternAssociation(E).addSchema(s)}return a?this.addSchemaHandle(s,a):this.getOrAddSchemaHandle(s)},t.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.filePatternAssociationById={},this.registeredSchemasIds={};for(var r in this.contributionSchemas)this.schemasById[r]=this.contributionSchemas[r],this.registeredSchemasIds[r]=!0;for(var i in this.contributionAssociations)for(var a=this.getOrAddFilePatternAssociation(i),s=0,p=this.contributionAssociations[i];s<p.length;s++){var y=p[s],r=this.normalizeId(y);a.addSchema(r)}},t.prototype.getResolvedSchema=function(r){var i=this.normalizeId(r),a=this.schemasById[i];return a?a.getResolvedSchema():this.promise.resolve(null)},t.prototype.loadSchema=function(r){if(!this.requestService){var i="Unable to load schema from '"+qi(r)+"'. No schema request service available";return this.promise.resolve(new ko({},[i]))}return this.requestService(r).then(function(a){if(!a){var s="Unable to load schema from '"+qi(r)+"': No content.";return new ko({},[s])}var p={},y=[];p=Hf(a,y);var E=y.length?["Unable to parse content from '"+qi(r)+"': Parse error at offset "+y[0].offset]:[];return new ko(p,E)},function(a){var s="Unable to load schema from '"+qi(r)+"': "+a.toString();return new ko({},[s])})},t.prototype.resolveSchemaContent=function(r,i,a){var s=this,p=r.errors.slice(0),y=r.schema;if(y.$schema){var E=this.normalizeId(y.$schema);if(E==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new pi({},["Draft-03 schemas are not supported."]));E==="https://json-schema.org/draft/2019-09/schema"&&r.errors.push("Draft 2019-09 schemas are not yet fully supported.")}var b=this.contextService,C=function(ne,le){if(!le)return ne;var ge=ne;return le[0]==="/"&&(le=le.substr(1)),le.split("/").some(function(pe){return ge=ge[pe],!ge}),ge},M=function(ne,le,ge,pe){var Se=C(le,pe);if(Se)for(var xe in Se)Se.hasOwnProperty(xe)&&!ne.hasOwnProperty(xe)&&(ne[xe]=Se[xe]);else p.push("$ref '"+pe+"' in '"+ge+"' can not be resolved.")},J=function(ne,le,ge,pe,Se){b&&!/^\w+:\/\/.*/.test(le)&&(le=b.resolveRelativePath(le,pe)),le=s.normalizeId(le);var xe=s.getOrAddSchemaHandle(le);return xe.getUnresolvedSchema().then(function(Fe){if(Se[le]=!0,Fe.errors.length){var $e=ge?le+"#"+ge:le;p.push("Problems loading reference '"+$e+"': "+Fe.errors[0]+".")}return M(ne,Fe.schema,le,ge),ie(ne,Fe.schema,le,xe.dependencies)})},ie=function(ne,le,ge,pe){if(!ne||typeof ne!="object")return Promise.resolve(null);for(var Se=[ne],xe=[],Fe=[],$e=function(){for(var Ve=[],Ke=0;Ke<arguments.length;Ke++)Ve[Ke]=arguments[Ke];for(var ze=0,_e=Ve;ze<_e.length;ze++){var xt=_e[ze];typeof xt=="object"&&Se.push(xt)}},Be=function(){for(var Ve=[],Ke=0;Ke<arguments.length;Ke++)Ve[Ke]=arguments[Ke];for(var ze=0,_e=Ve;ze<_e.length;ze++){var xt=_e[ze];if(typeof xt=="object")for(var Nt in xt){var Wt=xt[Nt];typeof Wt=="object"&&Se.push(Wt)}}},Ge=function(){for(var Ve=[],Ke=0;Ke<arguments.length;Ke++)Ve[Ke]=arguments[Ke];for(var ze=0,_e=Ve;ze<_e.length;ze++){var xt=_e[ze];if(Array.isArray(xt))for(var Nt=0,Wt=xt;Nt<Wt.length;Nt++){var lr=Wt[Nt];typeof lr=="object"&&Se.push(lr)}}},De=function(Ve){for(var Ke=[];Ve.$ref;){var ze=Ve.$ref,_e=ze.split("#",2);if(delete Ve.$ref,_e[0].length>0){Fe.push(J(Ve,_e[0],_e[1],ge,pe));return}else Ke.indexOf(ze)===-1&&(M(Ve,le,ge,_e[1]),Ke.push(ze))}$e(Ve.items,Ve.additionalProperties,Ve.not,Ve.contains,Ve.propertyNames,Ve.if,Ve.then,Ve.else),Be(Ve.definitions,Ve.properties,Ve.patternProperties,Ve.dependencies),Ge(Ve.anyOf,Ve.allOf,Ve.oneOf,Ve.items)};Se.length;){var je=Se.pop();xe.indexOf(je)>=0||(xe.push(je),De(je))}return s.promise.all(Fe)};return ie(y,y,i,a).then(function(ne){return new pi(y,p)})},t.prototype.getSchemaForResource=function(r,i){if(i&&i.root&&i.root.type==="object"){var a=i.root.properties.filter(function(le){return le.keyNode.value==="$schema"&&le.valueNode&&le.valueNode.type==="string"});if(a.length>0){var s=ri(a[0].valueNode);if(s&&bu(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,r)),s){var p=this.normalizeId(s);return this.getOrAddSchemaHandle(p).getResolvedSchema()}}}for(var y=Object.create(null),E=[],b=0,C=this.filePatternAssociations;b<C.length;b++){var M=C[b];if(M.matchesPattern(r))for(var J=0,ie=M.getSchemas();J<ie.length;J++){var ne=ie[J];y[ne]||(E.push(ne),y[ne]=!0)}}return E.length>0?this.createCombinedSchema(r,E).getResolvedSchema():this.promise.resolve(null)},t.prototype.createCombinedSchema=function(r,i){if(i.length===1)return this.getOrAddSchemaHandle(i[0]);var a="schemaservice://combinedSchema/"+encodeURIComponent(r),s={allOf:i.map(function(p){return{$ref:p}})};return this.addSchemaHandle(a,s)},t}();function qi(t){try{}catch(r){}return t}var ca=function(){function t(r,i){this.jsonSchemaService=r,this.promise=i,this.validationEnabled=!0}return t.prototype.configure=function(r){r&&(this.validationEnabled=r.validate,this.commentSeverity=r.allowComments?void 0:Dt.Error)},t.prototype.doValidation=function(r,i,a,s){var p=this;if(!this.validationEnabled)return this.promise.resolve([]);var y=[],E={},b=function(J){var ie=J.range.start.line+" "+J.range.start.character+" "+J.message;E[ie]||(E[ie]=!0,y.push(J))},C=function(J){var ie=a?_i(a.trailingCommas):Dt.Error,ne=a?_i(a.comments):p.commentSeverity;if(J){if(J.errors.length&&i.root){var le=i.root,ge=le.type==="object"?le.properties[0]:null;if(ge&&ge.keyNode.value==="$schema"){var pe=ge.valueNode||ge,Se=Jt.create(r.positionAt(pe.offset),r.positionAt(pe.offset+pe.length));b(_n.create(Se,J.errors[0],Dt.Warning,Kt.SchemaResolveError))}else{var Se=Jt.create(r.positionAt(le.offset),r.positionAt(le.offset+1));b(_n.create(Se,J.errors[0],Dt.Warning,Kt.SchemaResolveError))}}else{var xe=i.validate(r,J.schema);xe&&xe.forEach(b)}Fu(J.schema)&&(ne=void 0),ku(J.schema)&&(ie=void 0)}for(var Fe=0,$e=i.syntaxErrors;Fe<$e.length;Fe++){var Be=$e[Fe];if(Be.code===Kt.TrailingComma){if(typeof ie!="number")continue;Be.severity=ie}b(Be)}if(typeof ne=="number"){var Ge="Comments are not permitted in JSON.";i.comments.forEach(function(De){b(_n.create(De,Ge,ne,Kt.CommentNotPermitted))})}return y};if(s){var M=s.id||"schemaservice://untitled/"+hi++;return this.jsonSchemaService.resolveSchemaContent(new ko(s),M,{}).then(function(J){return C(J)})}return this.jsonSchemaService.getSchemaForResource(r.uri,i).then(function(J){return C(J)})},t}(),hi=0;function Fu(t){if(t&&typeof t=="object"){if(qn(t.allowComments))return t.allowComments;if(t.allOf)for(var r=0,i=t.allOf;r<i.length;r++){var a=i[r],s=Fu(a);if(qn(s))return s}}}function ku(t){if(t&&typeof t=="object"){if(qn(t.allowTrailingCommas))return t.allowTrailingCommas;if(qn(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(t.allOf)for(var r=0,i=t.allOf;r<i.length;r++){var a=i[r],s=ku(a);if(qn(s))return s}}}function _i(t){switch(t){case"error":return Dt.Error;case"warning":return Dt.Warning;case"ignore":return}}var sl=48,Ru=57,Mu=65,eo=97,Ro=102;function br(t){return t<sl?0:t<=Ru?t-sl:(t<eo&&(t+=eo-Mu),t>=eo&&t<=Ro?t-eo+10:0)}function ll(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:br(t.charCodeAt(1))*17/255,green:br(t.charCodeAt(2))*17/255,blue:br(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:br(t.charCodeAt(1))*17/255,green:br(t.charCodeAt(2))*17/255,blue:br(t.charCodeAt(3))*17/255,alpha:br(t.charCodeAt(4))*17/255};case 7:return{red:(br(t.charCodeAt(1))*16+br(t.charCodeAt(2)))/255,green:(br(t.charCodeAt(3))*16+br(t.charCodeAt(4)))/255,blue:(br(t.charCodeAt(5))*16+br(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(br(t.charCodeAt(1))*16+br(t.charCodeAt(2)))/255,green:(br(t.charCodeAt(3))*16+br(t.charCodeAt(4)))/255,blue:(br(t.charCodeAt(5))*16+br(t.charCodeAt(6)))/255,alpha:(br(t.charCodeAt(7))*16+br(t.charCodeAt(8)))/255}}return null}function Lu(t,r,i,a){return a===void 0&&(a=1),{red:t/255,green:r/255,blue:i/255,alpha:a}}var nc=function(){function t(r){this.schemaService=r}return t.prototype.findDocumentSymbols=function(r,i,a){var s=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var p=i.root;if(!p)return null;var y=a.resultLimit,E=r.uri;if((E==="vscode://defaultsettings/keybindings.json"||Qa(E.toLowerCase(),"/user/keybindings.json"))&&p.type==="array"){for(var b=[],C=0,M=p.items;C<M.length;C++){var J=M[C];if(J.type==="object")for(var ie=0,ne=J.properties;ie<ne.length;ie++){var le=ne[ie];if(le.keyNode.value==="key"&&le.valueNode){var ge=fi.create(r.uri,Ln(r,J));if(b.push({name:ri(le.valueNode),kind:ei.Function,location:ge}),y--,y<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(E),b}}}return b}var pe=function(xe,Fe,$e){return y>=0&&(Fe.type==="array"?Fe.items.forEach(function(Be){return pe(xe,Be,$e)}):Fe.type==="object"&&Fe.properties.forEach(function(Be){if(y>=0){var Ge=Be.valueNode;if(Ge){y--;var De=fi.create(r.uri,Ln(r,Be)),je=$e?$e+"."+Be.keyNode.value:Be.keyNode.value;xe.push({name:s.getKeyLabel(Be),kind:s.getSymbolKind(Ge.type),location:De,containerName:$e}),pe(xe,Ge,je)}}})),xe},Se=pe([],p,void 0);return y<0&&(Se.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(E)),Se},t.prototype.findDocumentSymbols2=function(r,i,a){var s=this;a===void 0&&(a={resultLimit:Number.MAX_VALUE});var p=i.root;if(!p)return null;var y=a.resultLimit,E=r.uri;if((E==="vscode://defaultsettings/keybindings.json"||Qa(E.toLowerCase(),"/user/keybindings.json"))&&p.type==="array"){for(var b=[],C=0,M=p.items;C<M.length;C++){var J=M[C];if(J.type==="object")for(var ie=0,ne=J.properties;ie<ne.length;ie++){var le=ne[ie];if(le.keyNode.value==="key"&&le.valueNode){var ge=Ln(r,J),pe=Ln(r,le.keyNode);if(b.push({name:ri(le.valueNode),kind:ei.Function,range:ge,selectionRange:pe}),y--,y<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(E),b}}}return b}var Se=function(Fe,$e){return y>=0&&($e.type==="array"?$e.items.forEach(function(Be,Ge){if(Be&&y>=0){y--;var De=Ln(r,Be),je=De,Ve=String(Ge),Ke=Se([],Be);Fe.push({name:Ve,kind:s.getSymbolKind(Be.type),range:De,selectionRange:je,children:Ke})}}):$e.type==="object"&&$e.properties.forEach(function(Be){var Ge=Be.valueNode;if(Ge&&y>=0){y--;var De=Ln(r,Be),je=Ln(r,Be.keyNode),Ve=Se([],Ge);Fe.push({name:s.getKeyLabel(Be),kind:s.getSymbolKind(Ge.type),range:De,selectionRange:je,children:Ve})}})),Fe},xe=Se([],p);return y<0&&(xe.pop(),a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(E)),xe},t.prototype.getSymbolKind=function(r){switch(r){case"object":return ei.Module;case"string":return ei.String;case"number":return ei.Number;case"array":return ei.Array;case"boolean":return ei.Boolean;default:return ei.Variable}},t.prototype.getKeyLabel=function(r){var i=r.keyNode.value;return i&&(i=i.replace(/[\n]/g,"\u21B5")),i&&i.trim()?i:'"'+i+'"'},t.prototype.findDocumentColors=function(r,i,a){return this.schemaService.getSchemaForResource(r.uri,i).then(function(s){var p=[];if(s)for(var y=a&&typeof a.resultLimit=="number"?a.resultLimit:Number.MAX_VALUE,E=i.getMatchingSchemas(s.schema),b={},C=0,M=E;C<M.length;C++){var J=M[C];if(!J.inverted&&J.schema&&(J.schema.format==="color"||J.schema.format==="color-hex")&&J.node&&J.node.type==="string"){var ie=String(J.node.offset);if(!b[ie]){var ne=ll(ri(J.node));if(ne){var le=Ln(r,J.node);p.push({color:ne,range:le})}if(b[ie]=!0,y--,y<=0)return a&&a.onResultLimitExceeded&&a.onResultLimitExceeded(r.uri),p}}}return p})},t.prototype.getColorPresentations=function(r,i,a,s){var p=[],y=Math.round(a.red*255),E=Math.round(a.green*255),b=Math.round(a.blue*255);function C(J){var ie=J.toString(16);return ie.length!==2?"0"+ie:ie}var M;return a.alpha===1?M="#"+C(y)+C(E)+C(b):M="#"+C(y)+C(E)+C(b)+C(Math.round(a.alpha*255)),p.push({label:M,textEdit:kn.replace(s,JSON.stringify(M))}),p},t}();function Ln(t,r){return Jt.create(t.positionAt(r.offset),t.positionAt(r.offset+r.length))}var Nu={schemaAssociations:{},schemas:{}};function ic(t,r){var i=[],a=[],s=[],p=-1,y=An(t.getText(),!1),E=y.scan();function b(Ke){i.push(Ke),a.push(s.length)}for(;E!==17;){switch(E){case 1:case 3:{var C=t.positionAt(y.getTokenOffset()).line,M={startLine:C,endLine:C,kind:E===1?"object":"array"};s.push(M);break}case 2:case 4:{var J=E===2?"object":"array";if(s.length>0&&s[s.length-1].kind===J){var M=s.pop(),ie=t.positionAt(y.getTokenOffset()).line;M&&ie>M.startLine+1&&p!==M.startLine&&(M.endLine=ie-1,b(M),p=M.startLine)}break}case 13:{var C=t.positionAt(y.getTokenOffset()).line,ne=t.positionAt(y.getTokenOffset()+y.getTokenLength()).line;y.getTokenError()===1&&C+1<t.lineCount?y.setPosition(t.offsetAt(En.create(C+1,0))):C<ne&&(b({startLine:C,endLine:ne,kind:xo.Comment}),p=C);break}case 12:{var le=t.getText().substr(y.getTokenOffset(),y.getTokenLength()),ge=le.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(ge){var ie=t.positionAt(y.getTokenOffset()).line;if(ge[1]){var M={startLine:ie,endLine:ie,kind:xo.Region};s.push(M)}else{for(var pe=s.length-1;pe>=0&&s[pe].kind!==xo.Region;)pe--;if(pe>=0){var M=s[pe];s.length=pe,ie>M.startLine&&p!==M.startLine&&(M.endLine=ie,b(M),p=M.startLine)}}}break}}E=y.scan()}var Se=r&&r.rangeLimit;if(typeof Se!="number"||i.length<=Se)return i;r&&r.onRangeLimitExceeded&&r.onRangeLimitExceeded(t.uri);for(var xe=[],Fe=0,$e=a;Fe<$e.length;Fe++){var Be=$e[Fe];Be<30&&(xe[Be]=(xe[Be]||0)+1)}for(var Ge=0,De=0,pe=0;pe<xe.length;pe++){var je=xe[pe];if(je){if(je+Ge>Se){De=pe;break}Ge+=je}}for(var Ve=[],pe=0;pe<i.length;pe++){var Be=a[pe];typeof Be=="number"&&(Be<De||Be===De&&Ge++<Se)&&Ve.push(i[pe])}return Ve}function Du(t,r,i){function a(E){for(var b=t.offsetAt(E),C=i.getNodeFromOffset(b,!0),M=[];C;){switch(C.type){case"string":case"object":case"array":var J=C.offset+1,ie=C.offset+C.length-1;J<ie&&b>=J&&b<=ie&&M.push(s(J,ie)),M.push(s(C.offset,C.offset+C.length));break;case"number":case"boolean":case"null":case"property":M.push(s(C.offset,C.offset+C.length));break}if(C.type==="property"||C.parent&&C.parent.type==="array"){var ne=y(C.offset+C.length,5);ne!==-1&&M.push(s(C.offset,ne))}C=C.parent}for(var le=void 0,ge=M.length-1;ge>=0;ge--)le=Wn.create(M[ge],le);return le||(le=Wn.create(Jt.create(E,E))),le}function s(E,b){return Jt.create(t.positionAt(E),t.positionAt(b))}var p=An(t.getText(),!0);function y(E,b){p.setPosition(E);var C=p.scan();return C===b?p.getTokenOffset()+p.getTokenLength():-1}return r.map(a)}function es(t){var r=t.promiseConstructor||Promise,i=new fa(t.schemaRequestService,t.workspaceContext,r);i.setSchemaContributions(Nu);var a=new Au(i,t.contributions,r,t.clientCapabilities),s=new To(i,t.contributions,r),p=new nc(i),y=new ca(i,r);return{configure:function(E){i.clearExternalSchemas(),E.schemas&&E.schemas.forEach(function(b){i.registerExternalSchema(b.uri,b.fileMatch,b.schema)}),y.configure(E)},resetSchema:function(E){return i.onResourceChange(E)},doValidation:y.doValidation.bind(y),parseJSONDocument:function(E){return Ja(E,{collectComments:!0})},newJSONDocument:function(E,b){return mu(E,b)},doComplete:a.doComplete.bind(a),findDocumentSymbols:p.findDocumentSymbols.bind(p),findDocumentSymbols2:p.findDocumentSymbols2.bind(p),findColorSymbols:function(E,b){return p.findDocumentColors(E,b).then(function(C){return C.map(function(M){return M.range})})},findDocumentColors:p.findDocumentColors.bind(p),getColorPresentations:p.getColorPresentations.bind(p),doHover:s.doHover.bind(s),getFoldingRanges:ic,getSelectionRanges:Du,format:function(E,b,C){var M=void 0;if(b){var J=E.offsetAt(b.start),ie=E.offsetAt(b.end)-J;M={offset:J,length:ie}}var ne={tabSize:C?C.tabSize:4,insertSpaces:C?C.insertSpaces:!0,eol:`
186
+ `};return Vs(E.getText(),M,ne).map(function(le){return kn.replace(Jt.create(E.positionAt(le.offset),E.positionAt(le.offset+le.length)),le.content)})}}}var Od=o(96876),Td=o(4328),ts=o(3256),oc=o(71707),ac=o(82801),Pd=o(32095),Bu=o(86081),sc=o(44254),Id=o(75019),lc=o(13837),ul=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});const Mo=es({});$i.registerHelper("lint","json",function(t,r){return ul(this,null,function*(){const{schema:i,setError:a}=r;Mo.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const s=Fi.create(r.id+".json","json",0,t),p=Mo.parseJSONDocument(s),y=yield Mo.doValidation(s,p);return y.length?a&&a(y[0].message):a&&a(void 0),y.map(E=>({from:$i.Pos(E.range.start.line,E.range.start.character),to:$i.Pos(E.range.end.line,E.range.end.character),message:E.message}))})}),$i.registerHelper("hint","json",(t,r)=>ul(void 0,null,function*(){const i=r.schema;if(!i)return;Mo.configure({validate:!0,schemas:[{uri:"stub://"+r.id,fileMatch:["*"],schema:i}]});const a=t.getDoc().getCursor(),s=t.getTokenAt(a),p=Fi.create(r.id+".json","json",0,t.getValue()),y=Mo.parseJSONDocument(p),E=yield Mo.doComplete(p,{line:a.line,character:a.ch},y),b=M=>{let J="";for(;M--;)J+=" ";return J};let C=E?E.items.map(M=>({text:M.insertText,displayText:M.label,filter:M.filterText||M.label,from:{line:M.textEdit.range.start.line,ch:M.textEdit.range.start.character},to:{line:M.textEdit.range.end.line,ch:M.textEdit.range.end.character},hint:(J,ie,ne)=>{const le="_$__REDOC_CURSOR_HERE";let ge=ne.text.replace(/(\$1|\${1:[^}]+})/,le)||"";if(ge=ge.replace(/(\$\d+|\${[^}]+})/g,"")||"",J.setSelection(ne.from,ne.to),ge.indexOf(`
187
+ `)>-1){const Se=J.getLine(J.getCursor().line).search(/(\S|$)/);ge=ge.replace(/\n/g,`
188
+ `+b(Se))}J.replaceSelection(ge);const pe=J.getSearchCursor(le,ne.from);pe.findNext()&&(J.setCursor(pe.from()),pe.replace(""))}})):[];return/(property|string)/.test(s.type||"")&&(C=C.filter(M=>M.filter.replace(/(^"|"$)/g,"").startsWith(s.string.replace(/(^"|"$)/g,"")))),{from:$i.Pos(a.line,s.start),to:$i.Pos(a.line,a.ch),list:C}}));var fl=Object.defineProperty,da=(t,r,i)=>r in t?fl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,Mi=(t,r,i)=>(da(t,typeof r!="symbol"?r+"":r,i),i);const uc=Vt.createGlobalStyle`
189
+ .cm-s-material.CodeMirror {
190
+ background-color: ${({theme:t})=>t.rightPanel.panelControlsBackgroundColor}!important;
191
+ color: ${({theme:t})=>t.colors.text.light}!important;
192
+ font-family: ${({theme:t})=>t.typography.code.fontFamily};
193
+ line-height: 18px;
194
+ padding: 10px;
195
+ }
196
+
197
+ .CodeMirror-lint-mark-error {
198
+ background-size: 4px;
199
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAGCAYAAAD+Bd/7AAAAVUlEQVR42mNgQAL/GRjigPg/EP8FYntkCX4gtoVKgvE/BoabcEVAhj6S5DUgfgFl/wFJ2gPxL6iuT1DF+kD2R5AYA5KRj6CS/FAMYvszIBltz4AFAAD9fz0YtLg13wAAAABJRU5ErkJggg==') !important;
200
+ }
201
+
202
+ .cm-s-material.CodeMirror-focused div.CodeMirror-selected {
203
+ background: rgba(255, 255, 255, 0.3) !important;
204
+ }
205
+
206
+ .cm-s-material .CodeMirror-code .cm-string.cm-property {
207
+ color: #9EFAA7;
208
+ }
209
+
210
+ .cm-s-material .CodeMirror-code .cm-string {
211
+ color: #FEE39E;
212
+ }
213
+
214
+ .cm-s-material .CodeMirror-code .cm-atom {
215
+ color: ${({theme:t})=>t.colors.text.light};
216
+ }
217
+
218
+ div .cm-s-material .CodeMirror-matchingbracket {
219
+ outline: 1px solid grey;
220
+ text-decoration: none;
221
+ }
222
+
223
+ .react-codemirror2 {
224
+ display: flex;
225
+ flex-direction: column;
226
+ justify-content: flex-start;
227
+ border-top-left-radius: 0;
228
+ border-top-right-radius: 0;
229
+ border-bottom-right-radius: ${({theme:t})=>t.components.panels.borderRadius};
230
+ border-bottom-left-radius: ${({theme:t})=>t.components.panels.borderRadius};
231
+ overflow: hidden;
232
+
233
+ flex: 1;
234
+ }
235
+
236
+ .CodeMirror {
237
+ flex: 1;
238
+ max-height: 65vh !important; /* it fixes performance bug if we pass big data to CodeMirror */
239
+ border-radius: ${({theme:t})=>t.components.panels.borderRadius};
240
+ }
241
+ `;class Uu extends d.Component{constructor(){super(...arguments);Mi(this,"editor"),Mi(this,"_onKeyUp",(r,i)=>{/^[a-zA-Z0-9_":]$/.test(i.key)&&this.editor.execCommand("autocomplete")}),Mi(this,"initEditor",r=>{this.editor=r,r.on("keyup",this._onKeyUp)}),Mi(this,"refreshEditor",()=>{this.editor.refresh()})}componentDidMount(){setTimeout(()=>{this.editor.refresh()},0),document.addEventListener("click",this.refreshEditor)}componentWillUnmount(){document.removeEventListener("click",this.refreshEditor)}render(){const{value:r}=this.props.fieldState,{setValue:i,setTouched:a,setError:s}=this.props.fieldApi,{onChange:p,onBlur:y,forwardedRef:E}=this.props;return d.createElement(d.Fragment,null,d.createElement(uc,null),d.createElement(Xo.fk,{editorDidMount:this.initEditor,value:r||"",ref:E||void 0,onBeforeChange:(b,C,M)=>{i(M),p&&p(M)},onBlur:b=>{a(),y&&y(b)},options:{mode:this.props.mode||"application/json",theme:"material",matchBrackets:!0,autoCloseBrackets:!0,tabSize:2,foldGutter:!0,extraKeys:{"Cmd-Space":()=>this.editor.showHint({completeSingle:!0}),"Ctrl-Space":()=>this.editor.showHint({completeSingle:!0})},hintOptions:{id:this.props.id,completeSingle:!1,schema:this.props.schema},lint:{id:this.props.id,schema:this.props.schema,setError:s}}}))}}const fc=ln(Uu),cc=(0,Ir.ZP)(Zr.A3)`
242
+ border-radius: ${({theme:t})=>t.components.panels.borderRadius};
243
+ margin-bottom: 10px;
244
+ `;var ju=o(67897),rs=o(64776),dc=o(68929),to;(function(t){t.STRING="string",t.ARRAY="array",t.OBJECT="object"})(to||(to={}));var ns;(function(t){t.BYTE="byte",t.BASE64="base64",t.BINARY="binary"})(ns||(ns={}));var Lo;(function(t){t.OCTET_STREAM="application/octet-stream",t.MULTIPART="multipart/form-data",t.URL_ENCODED="application/x-www-form-urlencoded"})(Lo||(Lo={}));var is=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});const cl=Object.values(ns),pc=["application/octet-stream","application/pdf","application/gzip","application/zip"],dl=["image/","audio/","video/"];function ro(t){if(dl.some(r=>t.startsWith(r)))return t}function os(t){return pc.includes(t)?!0:dl.some(r=>t.startsWith(r))}function as(t){const r=t.type==="array"?t.items:t;if(!r||!r.type)return!0;const i=r.contentMediaType||"",a=r.format||r.contentEncoding||(os(i)?"binary":"");return r.type===to.STRING&&cl.includes(a)}function Vu(t,r){if(!t||!t.type)return os(r);const i=t.format||t.contentEncoding||"";return t.type===to.STRING&&cl.includes(i)}function Hu(t){return new Promise((r,i)=>{const a=new FileReader;a.onload=()=>{const p=a.result.replace(/data:.*\/.*;base64,/g,"");r(p)},a.onerror=()=>i(a.error),a.readAsDataURL(t)})}function Wu({format:t,contentEncoding:r,contentMediaType:i}){return[t,r,i].includes(ns.BASE64)}function hr(t,r,i){return is(this,null,function*(){const a=Object.values(t);let s=a.length===1?a[0]:a;const p=r.properties?r.properties[i]:r;return p.type===to.STRING&&Wu(p)?s=yield Hu(a[0]):p.type===to.ARRAY&&p.items&&(Wu(p.items)?s=yield Promise.all(a.map(E=>is(this,null,function*(){return yield Hu(E)}))):s=a),s})}var hc=Object.defineProperty,No=Object.getOwnPropertySymbols,Do=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,pa=(t,r,i)=>r in t?hc(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,pl=(t,r)=>{for(var i in r||(r={}))Do.call(r,i)&&pa(t,i,r[i]);if(No)for(var i of No(r))Nn.call(r,i)&&pa(t,i,r[i]);return t},zu=(t,r)=>{var i={};for(var a in t)Do.call(t,a)&&r.indexOf(a)<0&&(i[a]=t[a]);if(t!=null&&No)for(var a of No(t))r.indexOf(a)<0&&Nn.call(t,a)&&(i[a]=t[a]);return i},Gu=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});const $u=d.forwardRef((t,r)=>{var i=zu(t,[]);const{schema:a,contentName:s,onChange:p,name:y}=i,{render:E}=Kn(pl({field:y},i)),b=C=>Gu(void 0,null,function*(){const M=yield hr(C.target.files,a,s);p(s,M)});return E(d.createElement("input",{"data-cy":"file-upload-input",type:"file",id:i.id,className:i.className,name:i.name,onChange:b,multiple:i.multiple,accept:i.accept,ref:r}))});function Ku(t){const{schema:r={},mediaType:i,onChange:a}=t,s=r.properties||{};return Vu(r,i.name)?d.createElement(hl,null,d.createElement(At.NI,null,d.createElement(Yu,{fullWidth:!0,id:`body.${i.name}`,name:`body.${i.name}`,accept:ro(i.name),schema:r,contentName:i.name,onChange:a}))):r.type!==to.OBJECT||!s?(console.warn(`Invalid schema for request body and mime type: "${i.name}"`,r),null):d.createElement(hl,null,Object.entries(s).map(([p,y])=>{const E=i.name===Lo.MULTIPART&&as(y),b=y.contentMediaType||"",C=E?d.createElement(Yu,{fullWidth:!0,id:"body."+p,name:"body."+p,accept:ro(b),multiple:y.type==="array",schema:r,contentName:p,onChange:a}):d.createElement(un,{fullWidth:!0,id:"body."+p,field:"body."+p,placeholder:y.description||p});return d.createElement(At.NI,{key:p},d.createElement(At.lX,null,p,":"),C)}))}const hl=Vt.styled.div`
245
+ > div {
246
+ margin-top: 10px;
247
+ }
248
+ `,Yu=(0,Vt.styled)($u)`
249
+ ${Wi}
250
+ ${({inputType:t})=>t==="password"?"padding-right: 40px;":""};
251
+ ${({fullWidth:t})=>t?"width: 100%;":""}
252
+ `;var vl=Object.defineProperty,Ju=Object.defineProperties,nr=Object.getOwnPropertyDescriptors,ha=Object.getOwnPropertySymbols,Xu=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable,Qu=(t,r,i)=>r in t?vl(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,ss=(t,r)=>{for(var i in r||(r={}))Xu.call(r,i)&&Qu(t,i,r[i]);if(ha)for(var i of ha(r))no.call(r,i)&&Qu(t,i,r[i]);return t},vc=(t,r)=>Ju(t,nr(r)),Ar=(t,r)=>{var i={};for(var a in t)Xu.call(t,a)&&r.indexOf(a)<0&&(i[a]=t[a]);if(t!=null&&ha)for(var a of ha(t))r.indexOf(a)<0&&no.call(t,a)&&(i[a]=t[a]);return i},gc=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});const yc=(0,Ia.Pi)(t=>{var r=t,{properties:i={}}=r,a=Ar(r,["properties"]),s,p;const y=le=>{var ge;const pe=a.body.content;if(!pe||!pe.hasSample)return"";const Se=(ge=pe.active)==null?void 0:ge.examples;if(!(Se==null?void 0:Se[le]))return"";const xe=Ms()(Se==null?void 0:Se[le].value,i,{arrayMerge:rs.QQ});return JSON.stringify(xe,null,2)},E=(p=(s=a.body.content)==null?void 0:s.operation)==null?void 0:p.activeExampleName,b=le=>{var ge,pe;(pe=(ge=a.body.content)==null?void 0:ge.operation)==null||pe.activateExampleName(le),a.console.formApi.setValue("body",y(le))},C=le=>{if(!le)return"";if(le.mime==="application/x-www-form-urlencoded")return le.value;const ge=Ms()(le.value,i,{arrayMerge:rs.QQ});return JSON.stringify(ge,null,2)},M=(le,ge)=>gc(void 0,null,function*(){const pe=a.console.formApi,{setValue:Se}=pe;Se(`body.${le}`,ge)});(0,d.useEffect)(()=>{E!==!1?E&&a.console.formApi.setValue("body",y(E)):a.console.formApi.setValue("body",JSON.stringify(i,null,2))},[E]);const{validate:J,body:ie}=a,ne=le=>d.createElement(Vt.DropdownOrLabel,vc(ss({},le),{variant:"dark",fullWidth:!0,Label:cc,Dropdown:Vt.Dropdown}));return d.createElement(d.Fragment,null,d.createElement(Vt.MediaTypesSwitch,{content:ie.content,renderDropdown:ne},le=>{const ge=le.examples||{},pe=Object.keys(ge);let Se;a.resolvedBody&&(Se=(a.resolvedBody.content[le.name]||{}).schema);const xe=Vu(Se,le.name)||le.name===Lo.MULTIPART||le.name===Lo.URL_ENCODED,{exampleKey:Fe}=(0,ju.C6)(le.operation,ge),$e=ge[Fe];return d.createElement(d.Fragment,null,pe.length&&pe.length!==1&&d.createElement(ju.b_,{examples:ge,onChange:b,exampleKey:Fe})||null,xe?d.createElement(Ku,{schema:Se,mediaType:le,onChange:M.bind(void 0)}):d.createElement(fc,{id:"body"+a.id,field:"body",initialValue:C($e),schema:Se,mode:le.name,validate:J}))}))});var Zu=o(39895);const ls=Vt.styled.div`
253
+ display: flex;
254
+ font-size: 12px;
255
+ button {
256
+ margin: 0;
257
+ }
258
+ `,e=Vt.styled.button`
259
+ outline: none;
260
+ border: none;
261
+ background-color: ${({theme:t})=>t.rightPanel.panelBackgroundColor};
262
+ text-align: center;
263
+ cursor: pointer;
264
+ color: ${({theme:t})=>t.colors.text.light};
265
+ min-width: 80px;
266
+ min-height: 30px;
267
+ border-radius: ${({theme:t})=>t.shape.borderRadius};
268
+ font-size: 12px;
269
+
270
+ padding: 0 10px;
271
+
272
+ border-top: 4px solid transparent;
273
+ border-bottom: 4px solid transparent;
274
+
275
+ &:first-child {
276
+ border-top-left-radius: ${({theme:t})=>t.shape.borderRadius};
277
+ border-top-right-radius: 0;
278
+ border-bottom-right-radius: 0;
279
+ border-bottom-left-radius: ${({theme:t})=>t.shape.borderRadius};
280
+ }
281
+
282
+ &:last-child {
283
+ border-top-left-radius: 0;
284
+ border-top-right-radius: ${({theme:t})=>t.shape.borderRadius};
285
+ border-bottom-right-radius: ${({theme:t})=>t.shape.borderRadius};
286
+ border-bottom-left-radius: 0;
287
+ }
288
+
289
+ ${({active:t,theme:r})=>t&&`
290
+ border-bottom: 4px solid ${r.colors.accent.main};
291
+ background-color: ${(0,Zu._j)(.05,r.rightPanel.panelBackgroundColor)};
292
+ `||""}
293
+
294
+ ${({disabled:t,theme:r})=>t&&`
295
+ cursor: default;
296
+ color: ${(0,Zu.DZ)(.3,r.colors.text.light)};
297
+ `||""}
298
+ `;class n extends d.Component{render(){const{onChange:r,active:i,hasResponse:a}=this.props;return d.createElement(ls,null,d.createElement(e,{onClick:()=>r(0),active:i===0},a?"Edit Request":"Request"),d.createElement(e,{onClick:()=>a&&r(1),active:i===1,disabled:!a}," ","Response"," "))}}var u=Object.defineProperty,l=Object.defineProperties,f=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,j=Object.prototype.propertyIsEnumerable,W=(t,r,i)=>r in t?u(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,q=(t,r)=>{for(var i in r||(r={}))k.call(r,i)&&W(t,i,r[i]);if(g)for(var i of g(r))j.call(r,i)&&W(t,i,r[i]);return t},we=(t,r)=>l(t,f(r));const Ee=Ir.ZP.input`
299
+ cursor: pointer;
300
+ vertical-align: middle;
301
+ margin-left: 0;
302
+ margin-right: 5px;
303
+ height: 20px;
304
+ `,Ne=Ir.ZP.label`
305
+ display: inline-block;
306
+ cursor: pointer;
307
+ vertical-align: middle;
308
+ position: relative;
309
+ text-overflow: ellipsis;
310
+ overflow: hidden;
311
+
312
+ overflow-wrap: break-word;
313
+ line-height: 20px;
314
+ `,Me=Ir.ZP.div`
315
+ width: ${({fullWidth:t})=>t?"100%":"50%"};
316
+ display: inline-flex;
317
+ align-items: center;
318
+
319
+ & > label {
320
+ white-space: ${({nowrap:t})=>t?"nowrap":"normal"};
321
+ }
322
+ `;function Ye(t,r){const{fullWidth:i,id:a,label:s,nowrap:p}=t;return d.createElement(Me,{fullWidth:i,nowrap:p},d.createElement(Ee,we(q({},t),{type:"checkbox",ref:r})),d.createElement(Ne,{htmlFor:a},s))}const et=d.forwardRef(Ye);var ot=Object.defineProperty,ft=(t,r,i)=>r in t?ot(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,yt=(t,r,i)=>(ft(t,typeof r!="symbol"?r+"":r,i),i);const ct=11;class mt extends d.Component{constructor(){super(...arguments);yt(this,"state",{collapsed:!0})}onCheckBoxClick(r){const i=r.target.value,a=r.target.checked;this.props.fieldApi.setTouched(!0);const s=this.props.fieldApi.getValue()||[];let p;if(a)p=[...s,i];else{const y=s.indexOf(i);p=[...s.slice(0,y),...s.slice(y+1)]}this.props.fieldApi.setValue(p)}isFieldChecked(r){return this.props.fieldApi.getValue().includes(r)}toggle(){this.setState({collapsed:!this.state.collapsed})}selectAll(){this.props.fieldApi.setValue(this.props.items)}clearAll(){this.props.fieldApi.setValue([])}render(){const{items:r,fieldApi:i,validateOnChange:a,maxDisplayedItems:s,showControls:p,trimItemsLength:y}=this.props,{collapsed:E}=this.state,b=i.getError(),C=s||ct,M=y&&this.state.collapsed?r.slice(0,C):r;return d.createElement("div",null,p?d.createElement(Ot,null,d.createElement(Yo.J4,{onClick:()=>{this.selectAll()}},"Select all"),d.createElement(Yo.J4,{onClick:()=>{this.clearAll()}},"Clear")):null,d.createElement("div",null,M.map(J=>d.createElement(et,{nowrap:!0,id:J,value:J,checked:this.isFieldChecked(J),label:J,key:J,onChange:ie=>{this.onCheckBoxClick(ie),a&&i.validate()}})),r.length>C&&y?d.createElement(Ht,{onClick:()=>{this.toggle()}},E?"Show all":"Collapse"):null),b?d.createElement(At.Xq,null,b):"")}}const Pt=ln(mt),Ot=(0,Vt.styled)(Yo.xp)`
323
+ opacity: 1;
324
+ text-align: left;
325
+ `,Ht=(0,Vt.styled)(Yo.J4)`
326
+ float: right;
327
+ `;function ar(t){const{scopes:r,id:i}=t;let a=[];try{a=JSON.parse((0,zt.aH)(`auth.${i}.scopes`))}catch(s){}return!r||!r.length?d.createElement(d.Fragment,null):d.createElement(At.NI,null,d.createElement(At.lX,null," Scopes: "),d.createElement(Pt,{field:`auth.${i}.scopes`,initialValue:a,items:r,showControls:!0,trimItemsLength:!0}))}var Lr=o(17673),gr=o(73555),vn=Object.defineProperty,an=Object.defineProperties,kr=Object.getOwnPropertyDescriptors,en=Object.getOwnPropertySymbols,zr=Object.prototype.hasOwnProperty,Nr=Object.prototype.propertyIsEnumerable,Er=(t,r,i)=>r in t?vn(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,dr=(t,r)=>{for(var i in r||(r={}))zr.call(r,i)&&Er(t,i,r[i]);if(en)for(var i of en(r))Nr.call(r,i)&&Er(t,i,r[i]);return t},sn=(t,r)=>an(t,kr(r)),ni=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});const vi="/oauth2-redirect.html";class cr{static authorizeImplicit({authorizationUrl:r,clientId:i,scopes:a,extraParams:s={},routingBasePath:p,redirectUri:y,successCallback:E,errorCallback:b}){const C=ii({date:new Date().toString()}),M=new URL(r),J=p==="/"?"":p,ie=`${window.location.origin}${J}${vi}`;M.searchParams.set("client_id",i),M.searchParams.set("redirect_uri",y||ie),M.searchParams.set("response_type","token"),M.searchParams.set("state",C),Array.isArray(a)&&M.searchParams.set("scope",a.join(" "));for(const ne in s)M.searchParams.set(ne,s[ne]);window.redirectOAuth2={flow:"implicit",data:{authorizationUrl:r,clientId:i,scopes:a},state:C,successCallback:ne=>{E(ne),cr.clearRedirectData("implicit")},errorCallback:ne=>{b(ne),cr.clearRedirectData("implicit")}},window.open(M.toString())}static authorizeAuthorizationCode({authorizationUrl:r,tokenUrl:i,clientId:a,clientSecret:s,codeVerifier:p,codeChallenge:y,scopes:E,extraParams:b={},routingBasePath:C,redirectUri:M,successCallback:J,errorCallback:ie}){const ne=new URL(r),le=C==="/"?"":C,ge=`${window.location.origin}${le}${vi}`,pe=ii({date:new Date().toString()});ne.searchParams.set("client_id",a),ne.searchParams.set("redirect_uri",M||ge),ne.searchParams.set("response_type","code"),ne.searchParams.set("state",pe),Array.isArray(E)&&ne.searchParams.set("scope",E.join(" ")),y&&(ne.searchParams.set("code_challenge",y),ne.searchParams.set("code_challenge_method","S256"));for(const Se in b)ne.searchParams.set(Se,b[Se]);window.redirectOAuth2={flow:"authorizationCode",data:{authorizationUrl:r,clientId:a,scopes:E},state:pe,successCallback:Se=>ni(this,[Se],function*({auth_code:xe}){try{const Fe=yield fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:Lr.stringify(dr(sn(dr({client_id:a,client_secret:s},p&&{code_verifier:p}),{code:xe,grant_type:"authorization_code",redirect_uri:M||ge}),b))});yield Dr(Fe,J,ie)}catch(Fe){ie(Fe)}cr.clearRedirectData("authorizationCode")}),errorCallback:Se=>{ie(Se),cr.clearRedirectData("authorizationCode")}},window.open(ne.toString())}static clearRedirectData(r){window.redirectOAuth2={flow:r,data:{authorizationUrl:"",clientId:"",scopes:[]},state:"",successCallback:()=>{},errorCallback:()=>{}}}static authorizeClientCredentials(r){return ni(this,arguments,function*({tokenUrl:i,clientId:a,clientSecret:s,scopes:p=[],extraParams:y={},successCallback:E,errorCallback:b}){try{const C=yield fetch(i,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:Lr.stringify(dr({client_id:a,client_secret:s,grant_type:"client_credentials",scope:Array.isArray(p)?p.join(" "):void 0},y))});yield Dr(C,E,b)}catch(C){b(C)}})}}const gi=new cr;function Dr(t,r,i){return ni(this,null,function*(){if(t.ok){const a=yield t.json();r(a)}else i(new Error((t.headers.get("Content-Type")||"").indexOf("json")>-1?JSON.stringify(yield t.json()):yield t.text()))})}function us(t=32){let r="";for(;r.length<t;)r+=Math.random().toString(32).substring(2);return r.substring(0,t)}function ii(t){const r=dr({randomStr:us()},t);return btoa(JSON.stringify(r))}function io(t){return ni(this,null,function*(){var r;const i=new TextEncoder().encode(t);return(r=gr.EA)==null?void 0:r.subtle.digest("SHA-256",i)})}function oo(t){if(!!t)return btoa(String.fromCharCode.apply(null,new Uint8Array(t))).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Yr(t){return ni(this,null,function*(){return oo(yield io(t))})}var Bo=Object.defineProperty,gl=Object.defineProperties,dh=Object.getOwnPropertyDescriptors,Fd=Object.getOwnPropertySymbols,ph=Object.prototype.hasOwnProperty,hh=Object.prototype.propertyIsEnumerable,mc=(t,r,i)=>r in t?Bo(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,kd=(t,r)=>{for(var i in r||(r={}))ph.call(r,i)&&mc(t,i,r[i]);if(Fd)for(var i of Fd(r))hh.call(r,i)&&mc(t,i,r[i]);return t},Rd=(t,r)=>gl(t,dh(r)),qu=(t,r,i)=>(mc(t,typeof r!="symbol"?r+"":r,i),i),vh=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});function gh(t){if(!t)return"Token is required"}class yh extends d.Component{constructor(){super(...arguments);qu(this,"state",{error:"",loading:!1,tokenMasked:!0}),qu(this,"clearToken",()=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,""),(0,zt.zc)(`auth.${this.props.id}.token`,"")}),qu(this,"toggleTokenMask",()=>{this.setState({tokenMasked:!this.state.tokenMasked})}),qu(this,"requestToken",()=>vh(this,null,function*(){if(this.state.loading)return;const{server:r,flow:i,authCorsProxyUrl:a}=this.props,s=a&&i.tokenUrl?a+(0,nn.jg)(i.tokenUrl):i.tokenUrl;if(this.errors.client_id||this.errors.client_secret){console.log("Provide client_id and client_secret");return}const p=this.values.client_id,y=this.values.client_secret;if(!p||!y){console.log("Provide client_id and client_secret");return}this.setState({loading:!0}),yield cr.authorizeClientCredentials({tokenUrl:s.startsWith("http")?s:r+s,clientId:p,clientSecret:y,scopes:this.values.scopes,successCallback:E=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,E),this.setState({loading:!1})},errorCallback:E=>{this.clearToken(),this.setState({error:E.message,loading:!1})}})}))}get values(){return this.props.form.values&&this.props.form.values.auth&&this.props.form.values.auth[this.props.id]||{}}get errors(){return this.props.form.errors&&this.props.form.errors.auth&&this.props.form.errors.auth[this.props.id]||{}}render(){const{loading:r,error:i,tokenMasked:a}=this.state,{id:s,defaultValues:p}=this.props,y=Object.keys(this.props.flow.scopes);let E=(0,zt.aH)(`auth.${s}.token`)||JSON.stringify(p==null?void 0:p.token);E=E?JSON.parse(E):"";const b=(0,zt.Al)(s,"client_id"),C={field:`auth.${s}.client_id`,fullWidth:!0,initialValue:(0,zt.aH)(`auth.${s}.client_id`)||this.props.clientId||(p==null?void 0:p.client_id),initValue:(0,zt.aH)(`auth.${s}.client_id`)||this.props.clientId||(p==null?void 0:p.client_id),placeholder:"Your OAuth2 app Client ID"};return d.createElement(d.Fragment,null,d.createElement(At.n5,null,d.createElement(At.NI,null,d.createElement(At.lX,null,"Client ID:"),b?d.createElement(zo,Rd(kd({},C),{options:b})):d.createElement(un,Rd(kd({},C),{type:"password"}))),d.createElement(At.NI,null,d.createElement(At.lX,null,"Client Secret:"),d.createElement(un,{type:"password",fullWidth:!0,field:`auth.${s}.client_secret`,initialValue:(0,zt.aH)(`auth.${s}.client_secret`)||(p==null?void 0:p.client_secret)})),d.createElement(un,{fullWidth:!0,field:`auth.${s}.token`,type:"hidden",initialValue:E,validate:gh}),d.createElement(ar,{id:s,scopes:y})),d.createElement(Zr.zx,{color:"primary",onClick:this.requestToken,blinking:r},r?"Loading...":"Request Token"),d.createElement(At.ph,null," Access Token "),i?d.createElement(At.Xq,{style:{marginBottom:"1em"}},"Failed to request token: ",d.createElement("pre",null,i)," "):this.values.token&&this.values.token.access_token?d.createElement(At.TR,null,d.createElement(At.WA,{length:this.values.token.access_token.length,masked:a},this.values.token.access_token),d.createElement(At.lf,{onClick:this.toggleTokenMask},a?"Show":"Hide"," "),d.createElement(At.h,{onClick:this.clearToken}," Clear ")):d.createElement(At.Xq,{style:{marginBottom:"1em"}},"No token"))}}const mh=yh,xh=Vt.styled.div`
328
+ position: relative;
329
+ height: 4px;
330
+ display: block;
331
+ width: 100%;
332
+ background-color: ${({theme:t})=>t.colors.accent.light};
333
+ border-radius: ${({theme:t})=>t.shape.borderRadius};
334
+ background-clip: padding-box;
335
+ margin: 0.5rem 0 1rem 0;
336
+ overflow: hidden;
337
+
338
+ .determinate {
339
+ position: absolute;
340
+ background-color: inherit;
341
+ top: 0;
342
+ bottom: 0;
343
+ background-color: ${({theme:t})=>t.colors.accent.main};
344
+ transition: width 0.3s linear;
345
+ }
346
+ .indeterminate {
347
+ background-color: ${({theme:t})=>t.colors.accent.main};
348
+ }
349
+ .indeterminate:before {
350
+ content: '';
351
+ position: absolute;
352
+ background-color: inherit;
353
+ top: 0;
354
+ left: 0;
355
+ bottom: 0;
356
+ will-change: left, right;
357
+ -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
358
+ animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
359
+ }
360
+ .indeterminate:after {
361
+ content: '';
362
+ position: absolute;
363
+ background-color: inherit;
364
+ top: 0;
365
+ left: 0;
366
+ bottom: 0;
367
+ will-change: left, right;
368
+ -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
369
+ animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
370
+ -webkit-animation-delay: 1.15s;
371
+ animation-delay: 1.15s;
372
+ }
373
+
374
+ @-webkit-keyframes indeterminate {
375
+ 0% {
376
+ left: -35%;
377
+ right: 100%;
378
+ }
379
+ 60% {
380
+ left: 100%;
381
+ right: -90%;
382
+ }
383
+ 100% {
384
+ left: 100%;
385
+ right: -90%;
386
+ }
387
+ }
388
+ @keyframes indeterminate {
389
+ 0% {
390
+ left: -35%;
391
+ right: 100%;
392
+ }
393
+ 60% {
394
+ left: 100%;
395
+ right: -90%;
396
+ }
397
+ 100% {
398
+ left: 100%;
399
+ right: -90%;
400
+ }
401
+ }
402
+ @-webkit-keyframes indeterminate-short {
403
+ 0% {
404
+ left: -200%;
405
+ right: 100%;
406
+ }
407
+ 60% {
408
+ left: 107%;
409
+ right: -8%;
410
+ }
411
+ 100% {
412
+ left: 107%;
413
+ right: -8%;
414
+ }
415
+ }
416
+ @keyframes indeterminate-short {
417
+ 0% {
418
+ left: -200%;
419
+ right: 100%;
420
+ }
421
+ 60% {
422
+ left: 107%;
423
+ right: -8%;
424
+ }
425
+ 100% {
426
+ left: 107%;
427
+ right: -8%;
428
+ }
429
+ }
430
+ `,Md=()=>d.createElement(xh,null,d.createElement("div",{className:"indeterminate"}));var bh=Object.defineProperty,wh=Object.defineProperties,Sh=Object.getOwnPropertyDescriptors,Ld=Object.getOwnPropertySymbols,Ah=Object.prototype.hasOwnProperty,Eh=Object.prototype.propertyIsEnumerable,xc=(t,r,i)=>r in t?bh(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,_u=(t,r)=>{for(var i in r||(r={}))Ah.call(r,i)&&xc(t,i,r[i]);if(Ld)for(var i of Ld(r))Eh.call(r,i)&&xc(t,i,r[i]);return t},bc=(t,r)=>wh(t,Sh(r)),yl=(t,r,i)=>(xc(t,typeof r!="symbol"?r+"":r,i),i),Ch=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});function Nd(t){if(!t)return"Field is required"}class ef extends d.Component{constructor(){super(...arguments);yl(this,"state",{error:null,loading:!1,showPkceOptions:!1}),yl(this,"clearToken",()=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,"")}),yl(this,"togglePkceOptions",()=>{this.setState(({showPkceOptions:r})=>({showPkceOptions:!r}))}),yl(this,"handleCodeVerifierChange",r=>Ch(this,[r],function*({target:{value:i}}){const a=yield Yr(i);this.setState({codeVerifier:i,validCodeChallenge:a})}))}get values(){var r,i;return((i=(r=this.props.form.values)==null?void 0:r.auth)==null?void 0:i[this.props.id])||{}}get errors(){var r,i;return((i=(r=this.props.form.errors)==null?void 0:r.auth)==null?void 0:i[this.props.id])||{}}get pkceInputActionButtonProps(){if(this.state.codeVerifier!==void 0&&this.state.codeChallenge!==this.state.validCodeChallenge)return{label:"sync",onClick:()=>{this.state.codeVerifier&&this.setState({codeChallenge:this.state.validCodeChallenge})}}}componentDidMount(){if(this.props.usePkce){const r=us(43);Yr(r).then(i=>{this.setState({codeVerifier:r,codeChallenge:i,validCodeChallenge:i})})}}handleAuthorize(r){if(!r)return;this.props.formApi.validate();const{flow:i,usePkce:a,id:s,tokenUrl:p,authCorsProxyUrl:y}=this.props;if(!(0,rs.Qr)(this.errors))return;this.setState({loading:!0,error:null});const E=y?y+(0,nn.jg)(r):r,b=y&&p?y+(0,nn.jg)(p):p,C=this.props.formApi.getValue(`auth.${s}.scopes`),M={authorizationUrl:E.startsWith("http")?E:this.props.server+E,clientId:this.values.client_id,scopes:C,redirectUri:this.context.oAuth2RedirectURI,routingBasePath:this.context.routingBasePath,successCallback:J=>{this.props.formApi.setValue(`auth.${this.props.id}.token`,J),this.setState({loading:!1,error:null})},errorCallback:J=>{this.setState({loading:!1,error:(J==null?void 0:J.message)||"Failed to retrieve the access token"})}};i==="implicit"&&cr.authorizeImplicit(M),i==="authorizationCode"&&cr.authorizeAuthorizationCode(_u(bc(_u({},M),{tokenUrl:(b==null?void 0:b.startsWith("http"))?b:this.props.server+b,clientSecret:this.values.client_secret}),a&&{codeVerifier:this.state.codeVerifier,codeChallenge:this.state.codeChallenge}))}handleLogout(){this.clearToken(),this.setState({error:null})}handleCancel(){this.setState({loading:!1,error:null}),cr.clearRedirectData(this.props.flow)}render(){const{error:r,loading:i}=this.state,{id:a,scopes:s,authorizationUrl:p,flow:y,usePkce:E,defaultValues:b}=this.props;if(!p)return d.createElement(At.Xq,null,"No flow info");let C=(0,zt.aH)(`auth.${a}.token`)||JSON.stringify(b==null?void 0:b.token);C=C?JSON.parse(C):"";const M=(0,zt.Al)(a,"client_id"),J={field:`auth.${a}.client_id`,fullWidth:!0,initialValue:(0,zt.aH)(`auth.${a}.client_id`)||this.props.clientId||(b==null?void 0:b.client_id),initValue:(0,zt.aH)(`auth.${a}.client_id`)||this.props.clientId||(b==null?void 0:b.client_id),placeholder:"Your OAuth2 app Client ID",validate:Nd,validateOnBlur:!0,validateOnChange:!0};return d.createElement("div",null,d.createElement(At.n5,null,d.createElement(At.NI,null,d.createElement(At.lX,null," Client ID: "),M?d.createElement(zo,bc(_u({},J),{options:M})):d.createElement(un,bc(_u({},J),{"data-cy":"client-id-input"}))),y==="authorizationCode"&&d.createElement(d.Fragment,null,d.createElement(At.NI,null,d.createElement(At.lX,null,"Client Secret:"),d.createElement(un,{type:"password",fullWidth:!0,field:`auth.${a}.client_secret`,initialValue:(0,zt.aH)(`auth.${a}.client_secret`)||(b==null?void 0:b.client_secret),validate:Nd,validateOnBlur:!0,validateOnChange:!0,"data-cy":"client-secret-input"})),E&&d.createElement(Ph,null,d.createElement(et,{id:"pkce-opitons-toggle",label:"Configure PKCE manually",checked:this.state.showPkceOptions,onChange:this.togglePkceOptions,"data-cy":"pkce-options-toggle"}),this.state.showPkceOptions&&d.createElement(Ih,null,d.createElement(At.NI,null,d.createElement(At.lX,null,"Code Verifier"),d.createElement(uo,{fullWidth:!0,value:this.state.codeVerifier,onChange:this.handleCodeVerifierChange,"data-cy":"code-verifier-input"})),d.createElement(At.NI,null,d.createElement(At.lX,null,"Code Challenge"),d.createElement(uo,{fullWidth:!0,value:this.state.codeChallenge,onChange:({target:{value:ie}})=>{this.setState({codeChallenge:ie})},inputActionButton:this.pkceInputActionButtonProps,"data-cy":"code-challenge-input"}))))),d.createElement(un,{fullWidth:!0,field:`auth.${a}.token`,type:"hidden",initialValue:C}),d.createElement(ar,{id:a,scopes:s}),this.values.token&&this.values.token.access_token?d.createElement(At.NI,null,d.createElement(At.lX,null," Access Token: "),d.createElement(uo,{disabled:!0,type:"password",fullWidth:!0,value:this.values.token.access_token})):null),d.createElement(Th,null,this.values.token&&this.values.token.access_token?d.createElement(Zr.zx,{fullWidth:!0,onClick:()=>{this.handleLogout()}},"Log out"):i?d.createElement(d.Fragment,null,d.createElement(Zr.zx,{fullWidth:!0,onClick:()=>{this.handleCancel()}},"Cancel"),d.createElement(Md,null)):d.createElement(Zr.zx,{fullWidth:!0,disabled:!(0,rs.Qr)(this.errors),onClick:()=>{this.handleAuthorize(p)}},"Authorize")),i||r||!this.values.token||!this.values.token.access_token&&d.createElement(At.n5,null,d.createElement(At.NI,null,i?d.createElement(At.GE,null,"Please, finish your authorization flow or cancel authorization."):r?d.createElement(d.Fragment,null,d.createElement(Oh,null,d.createElement(At.Xq,null,r))):!this.values.token||!this.values.token.access_token?d.createElement(At.GE,null," No Access Token. Please, Authorize. "):null)))}}yl(ef,"contextType",Vt.OptionsContext);const Oh=Vt.styled.div`
431
+ font-family: monospace;
432
+ margin-top: 10px;
433
+ line-height: 1;
434
+ padding-left: 10px;
435
+ border-left: 1px solid gray;
436
+ `,Th=Vt.styled.div`
437
+ margin-bottom: 15px;
438
+ `,Ph=Vt.styled.div`
439
+ padding: 8px 0 20px;
440
+ `,Ih=Vt.styled.div`
441
+ padding: 4px 0;
442
+ `;var Fh=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});function kh(t){return Fh(this,null,function*(){return(yield fetch(t)).json()})}var Rh=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});function Mh(t){var r;const{scheme:i,defaultValues:a}=t,[s,p]=d.useState({}),[y,E]=d.useState(),[b,C]=d.useState(!1);d.useEffect(()=>{M(i.openIdConnectUrl)},[i.openIdConnectUrl]);const M=J=>Rh(this,null,function*(){C(!0),E("");try{const ie=yield kh(J);p(ie)}catch(ie){E(ie.message)}C(!1)});return d.createElement("div",null,b?d.createElement("div",null,d.createElement("div",null,"Fetching OpenID Connect metadata..."),d.createElement(Md,null)):d.createElement("div",null,y?d.createElement(At.Xq,null,y):((r=s==null?void 0:s.response_types_supported)==null?void 0:r.includes("token"))?d.createElement(d.Fragment,null,d.createElement(Lh,null,"OAuth2 Implicit Flow"),d.createElement(ef,{key:t.id,authorizationUrl:s.authorization_endpoint,authCorsProxyUrl:t.authCorsProxyUrl,scopes:s.scopes_supported,server:t.server,id:t.id,form:t.form,formApi:t.formApi,clientId:t.clientId,flow:"implicit",defaultValues:a})):d.createElement("div",null,"Unsupported flow")))}const Lh=Vt.styled.div`
443
+ margin-top: 5px;
444
+ margin-bottom: 10px;
445
+ `;var ml=o(51027),Nh=Object.defineProperty,Dh=Object.defineProperties,Bh=Object.getOwnPropertyDescriptors,Dd=Object.getOwnPropertySymbols,Uh=Object.prototype.hasOwnProperty,jh=Object.prototype.propertyIsEnumerable,wc=(t,r,i)=>r in t?Nh(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,fs=(t,r)=>{for(var i in r||(r={}))Uh.call(r,i)&&wc(t,i,r[i]);if(Dd)for(var i of Dd(r))jh.call(r,i)&&wc(t,i,r[i]);return t},xl=(t,r)=>Dh(t,Bh(r)),Bd=(t,r,i)=>(wc(t,typeof r!="symbol"?r+"":r,i),i);function cs(t){if(!t)return"Field is required"}const Vh=function(t){const r=document.cookie.match("\\b"+t+"=([^;]*)\\b");return r?r[1]:void 0};function Ud(t){if(t.in==="cookie")return Vh(t.name)}class Hh extends d.Component{constructor(){super(...arguments);Bd(this,"state",{activeScheme:0}),Bd(this,"handleSchemeChange",r=>{this.setState({activeScheme:r.idx}),(0,zt.zc)("securityRequirementName",r.value)})}static getDerivedStateFromProps(r){const a=r.operation.security.map(y=>y.schemes.map(E=>E.id).join(" and ")),s=(0,zt.aH)("securityRequirementName"),p=a.findIndex(y=>y===s);return{activeScheme:p<0?0:p}}render(){const{securityDefaults:r}=this.props,{activeScheme:i}=this.state,a=this.props.operation.security,p=a.map(y=>y.schemes.map(E=>E.id).join(" and ")).map((y,E)=>({value:y,idx:E}));return p.length===0?null:d.createElement(d.Fragment,null,d.createElement(At.n5,null,p.length>1&&d.createElement(At.NI,null,d.createElement(Vt.Dropdown,{variant:"dark",fullWidth:!0,prefix:"Security scheme: ",options:p,value:p[i].value,onChange:this.handleSchemeChange}))||null,a[i].schemes.map(y=>{var E,b,C,M,J,ie,ne;const le=(0,zt.A8)(y.id);if(y.type==="apiKey"){const ge=(0,zt.Al)(le,""),pe={field:`auth.${le}`,fullWidth:!0,initialValue:Ud(y)||(0,zt.aH)(`auth.${le}`)||(r==null?void 0:r[le]),initValue:Ud(y)||(0,zt.aH)(`auth.${le}`)||(r==null?void 0:r[le]),validate:cs,validateOnBlur:!0,validateOnChange:!0};return d.createElement(At.NI,{key:le},d.createElement(At.lX,null," ",y.name,": "),ge?d.createElement(zo,xl(fs({},pe),{options:ge})):d.createElement(un,xl(fs({},pe),{type:"password","data-cy":"apiKey-auth-password"})))}else if(y.type==="http"){if(y.scheme==="basic"){const ge=(0,zt.Al)(le,"username"),pe={field:`auth.${le}.username`,fullWidth:!0,initialValue:(0,zt.aH)(`auth.${le}.username`)||((E=r==null?void 0:r[le])==null?void 0:E.username),initValue:(0,zt.aH)(`auth.${le}.username`)||((b=r==null?void 0:r[le])==null?void 0:b.username),validate:cs,validateOnBlur:!0,validateOnChange:!0};return d.createElement(d.Fragment,{key:le},d.createElement(At.NI,null,d.createElement(At.lX,null," ",(0,ml.l)("tryItAuthBasicUsername"),": "),ge?d.createElement(zo,xl(fs({},pe),{options:ge})):d.createElement(un,fs({},pe))),d.createElement(At.NI,null,d.createElement(At.lX,null," ",(0,ml.l)("tryItAuthBasicPassword"),": "),d.createElement(un,{type:"password","data-cy":"http-auth-password",fullWidth:!0,field:`auth.${le}.password`,validate:cs,initialValue:(0,zt.aH)(`auth.${le}.password`)||((C=r==null?void 0:r[le])==null?void 0:C.password),validateOnBlur:!0,validateOnChange:!0})))}else if(y.scheme==="bearer"){const ge=(0,zt.Al)(le,""),pe={field:`auth.${le}`,fullWidth:!0,initialValue:(0,zt.aH)(`auth.${le}`)||(r==null?void 0:r[le]),initValue:(0,zt.aH)(`auth.${le}`)||(r==null?void 0:r[le]),validate:cs,validateOnBlur:!0,validateOnChange:!0};return d.createElement(d.Fragment,{key:le},d.createElement(At.NI,null,d.createElement(At.lX,null," Bearer Token: "),ge?d.createElement(zo,xl(fs({},pe),{options:ge})):d.createElement(un,xl(fs({},pe),{type:"password",placeholder:"(without 'Bearer')"}))))}}else{if(y.type==="oauth2"&&y.flows&&y.flows.clientCredentials)return d.createElement(mh,{key:le,flow:y.flows.clientCredentials,server:this.props.activeServer,authCorsProxyUrl:this.props.authCorsProxyUrl,id:le,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.clientCredentials["x-defaultClientId"]||y["x-defaultClientId"],defaultValues:r==null?void 0:r[le]});if(y.type==="oauth2"&&y.flows&&y.flows.implicit)return d.createElement(ef,{key:le,authorizationUrl:y.flows.implicit.authorizationUrl,authCorsProxyUrl:this.props.authCorsProxyUrl,scopes:Object.keys(((J=(M=y==null?void 0:y.flows)==null?void 0:M.implicit)==null?void 0:J.scopes)||{}),server:this.props.activeServer,id:le,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.implicit["x-defaultClientId"]||y["x-defaultClientId"],flow:"implicit",defaultValues:r==null?void 0:r[le]});if(y.type==="oauth2"&&y.flows&&y.flows.authorizationCode)return d.createElement(ef,{key:le,authorizationUrl:y.flows.authorizationCode.authorizationUrl,tokenUrl:y.flows.authorizationCode.tokenUrl,authCorsProxyUrl:this.props.authCorsProxyUrl,scopes:Object.keys(((ie=y.flows.authorizationCode)==null?void 0:ie.scopes)||{}),server:this.props.activeServer,id:le,form:this.props.form,formApi:this.props.formApi,clientId:y.flows.authorizationCode["x-defaultClientId"]||y["x-defaultClientId"],flow:"authorizationCode",usePkce:y.flows.authorizationCode["x-usePkce"],defaultValues:r==null?void 0:r[le]});if(y.type==="oauth2"){let ge=(0,zt.aH)(`auth.${le}.token`)||JSON.stringify((ne=r==null?void 0:r[le])==null?void 0:ne.token);return ge=ge?JSON.parse(ge):{},d.createElement(d.Fragment,{key:le},d.createElement(At.NI,null,d.createElement(At.lX,null," Access Token Type: "),d.createElement(un,{fullWidth:!0,field:`auth.${le}.token.token_type`,initialValue:ge.token_type||"Bearer"})),d.createElement(At.NI,null,d.createElement(At.lX,null," Access Token: "),d.createElement(un,{type:"password",fullWidth:!0,field:`auth.${le}.token.access_token`,validate:cs,initialValue:ge.access_token,validateOnBlur:!0,validateOnChange:!0})))}else if(y.type==="openIdConnect")return d.createElement(Mh,{key:le,server:this.props.activeServer,authCorsProxyUrl:this.props.authCorsProxyUrl,id:le,form:this.props.form,formApi:this.props.formApi,scheme:y,clientId:y["x-defaultClientId"],defaultValues:r==null?void 0:r[le]})}})),d.createElement("small",null,d.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))}}var jd=o(11429),Vd=o(89356),tf=o(63263),Wh=o(30699),Sc=o(58377),Hd=o(28834),Wd=o(13038),zh=o(32752),Ac=o(44341);function zd(t,r,i){return r in t?Ac(t,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[r]=i,t}function Gd(t,r){var i=Vd(t);if(tf){var a=tf(t);r&&(a=Wh(a).call(a,function(s){return Sc(t,s).enumerable})),i.push.apply(i,a)}return i}function Cr(t){for(var r=1;r<arguments.length;r++){var i=arguments[r]!=null?arguments[r]:{};if(r%2){var a;Hd(a=Gd(Object(i),!0)).call(a,function(p){zd(t,p,i[p])})}else if(Wd)zh(t,Wd(i));else{var s;Hd(s=Gd(Object(i))).call(s,function(p){Ac(t,p,Sc(i,p))})}}return t}var Gh=o(28583),rf=o.n(Gh),$h=o(10240),$d=o.n($h),Uo=o(8575),va=o(51446),Ec=o(19996),Cc=o(78363),Kh=o(95238),Kd=o(53592);function Oc(t,r){(r==null||r>t.length)&&(r=t.length);for(var i=0,a=new Array(r);i<r;i++)a[i]=t[i];return a}function Tc(t,r){var i;if(!!t){if(typeof t=="string")return Oc(t,r);var a=Kh(i=Object.prototype.toString.call(t)).call(i,8,-1);if(a==="Object"&&t.constructor&&(a=t.constructor.name),a==="Map"||a==="Set")return Kd(t);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return Oc(t,r)}}function ga(t,r){var i=typeof va!="undefined"&&Ec(t)||t["@@iterator"];if(!i){if(Cc(t)||(i=Tc(t))||r&&t&&typeof t.length=="number"){i&&(t=i);var a=0,s=function(){};return{s,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(C){throw C},f:s}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
446
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var p=!0,y=!1,E;return{s:function(){i=i.call(t)},n:function(){var C=i.next();return p=C.done,C},e:function(C){y=!0,E=C},f:function(){try{!p&&i.return!=null&&i.return()}finally{if(y)throw E}}}}var Yh=o(23882);function vr(t){return typeof va=="function"&&typeof Yh=="symbol"?vr=function(i){return typeof i}:vr=function(i){return i&&typeof va=="function"&&i.constructor===va&&i!==va.prototype?"symbol":typeof i},vr(t)}function Jh(t){if(Cc(t))return t}function Xh(t,r){var i=t&&(typeof va!="undefined"&&Ec(t)||t["@@iterator"]);if(i!=null){var a=[],s=!0,p=!1,y,E;try{for(i=i.call(t);!(s=(y=i.next()).done)&&(a.push(y.value),!(r&&a.length===r));s=!0);}catch(b){p=!0,E=b}finally{try{!s&&i.return!=null&&i.return()}finally{if(p)throw E}}return a}}function Qh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
447
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function yi(t,r){return Jh(t)||Xh(t,r)||Tc(t,r)||Qh()}var Yd=o(69798);function Jd(t,r,i,a,s,p,y){try{var E=t[p](y),b=E.value}catch(C){i(C);return}E.done?r(b):Yd.resolve(b).then(a,s)}function Pc(t){return function(){var r=this,i=arguments;return new Yd(function(a,s){var p=t.apply(r,i);function y(b){Jd(p,a,s,y,E,"next",b)}function E(b){Jd(p,a,s,y,E,"throw",b)}y(void 0)})}}var Zh=o(63109),Li=o.n(Zh),qh=o(78580),Ic=o.n(qh),_h=o(72119),Xd=o.n(_h),ev=o(66419),tv=o.n(ev),rv=o(59340),nf=o.n(rv),nv=o(2991),ir=o.n(nv),iv=o(86902),or=o.n(iv),ov=o(77766),Tt=o.n(ov),av=o(26295),Qd=o.n(av),sv=o(20116),Dn=o.n(sv),Lm=o(31905),lv=o(92495),Fc=o.n(lv),uv=o(93320),Zd=o.n(uv),fv=o(78718),kc=o.n(fv),cv=o(23560),bl=o.n(cv),qd=o(88996);function Rc(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}function _d(t,r){for(var i=0;i<r.length;i++){var a=r[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Ac(t,a.key,a)}}function Mc(t,r,i){return r&&_d(t.prototype,r),i&&_d(t,i),t}var ep=o(83863),tp=o(79542),rp=o(24889);function ds(t){return ds=tp?rp:function(i){return i.__proto__||rp(i)},ds(t)}function dv(t,r){for(;!Object.prototype.hasOwnProperty.call(t,r)&&(t=ds(t),t!==null););return t}function of(t,r,i){return typeof Reflect!="undefined"&&ep?of=ep:of=function(s,p,y){var E=dv(s,p);if(!!E){var b=Sc(E,p);return b.get?b.get.call(y):b.value}},of(t,r,i||t)}var pv=o(189);function Lc(t,r){return Lc=tp||function(a,s){return a.__proto__=s,a},Lc(t,r)}function hv(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=pv(r&&r.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),r&&Lc(t,r)}var af=o(13535);function vv(){if(typeof Reflect=="undefined"||!af||af.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(af(Boolean,[],function(){})),!0}catch(t){return!1}}function gv(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function yv(t,r){return r&&(vr(r)==="object"||typeof r=="function")?r:gv(t)}function mv(t){var r=vv();return function(){var a=ds(t),s;if(r){var p=ds(this).constructor;s=af(a,arguments,p)}else s=a.apply(this,arguments);return yv(this,s)}}var xv=o(94473),bv=o.n(xv),wv=o(57514),Sv=o.n(wv),Av=function(r){var i=function(p,y){return{name:p,value:y}};if(bl()(r.prototype.set)||bl()(r.prototype.get)||bl()(r.prototype.getAll)||bl()(r.prototype.has))return r;var a=function(s){hv(y,s);var p=mv(y);function y(E){var b;return Rc(this,y),b=p.call(this,E),b.entryList=[],b}return Mc(y,[{key:"append",value:function(b,C,M){return this.entryList.push(i(b,C)),of(ds(y.prototype),"append",this).call(this,b,C,M)}},{key:"set",value:function(b,C){var M,J=i(b,C);this.entryList=Dn()(M=this.entryList).call(M,function(ie){return ie.name!==b}),this.entryList.push(J)}},{key:"get",value:function(b){var C,M=bv()(C=this.entryList).call(C,function(J){return J.name===b});return M===void 0?null:M}},{key:"getAll",value:function(b){var C,M;return ir()(C=Dn()(M=this.entryList).call(M,function(J){return J.name===b})).call(C,function(J){return J.value})}},{key:"has",value:function(b){return this.entryList.some(function(C){return C.name===b})}}]),y}(r);return a};const Ev=Av(Sv());function Cv(t){if(Cc(t))return Oc(t)}function Ov(t){if(typeof va!="undefined"&&Ec(t)!=null||t["@@iterator"]!=null)return Kd(t)}function Tv(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
448
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ya(t){return Cv(t)||Ov(t)||Tc(t)||Tv()}var Pv=o(3649),Ni=o.n(Pv),Iv=o(88996),Fv=Iv.Buffer,kv=function(r){return":/?#[]@!$&'()*+,;=".indexOf(r)>-1},Rv=function(r){return/^[a-z0-9\-._~]+$/i.test(r)};function ps(t){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.escape,s=arguments.length>2?arguments[2]:void 0;return typeof t=="number"&&(t=t.toString()),typeof t!="string"||!t.length||!a?t:s?JSON.parse(t):ir()(r=ya(t)).call(r,function(p){var y,E;if(Rv(p)||kv(p)&&a==="unsafe")return p;var b=ir()(y=ir()(E=Fv.from(p).toJSON().data||[]).call(E,function(C){var M;return Ni()(M="0".concat(C.toString(16).toUpperCase())).call(M,-2)})).call(y,function(C){return"%".concat(C)}).join("");return b}).join("")}function Nc(t){var r=t.value;return Array.isArray(r)?Mv(t):vr(r)==="object"?Lv(t):Nv(t)}function Mv(t){var r=t.key,i=t.value,a=t.style,s=t.explode,p=t.escape,y=function(J){return ps(J,{escape:p})};if(a==="simple")return ir()(i).call(i,function(M){return y(M)}).join(",");if(a==="label")return".".concat(ir()(i).call(i,function(M){return y(M)}).join("."));if(a==="matrix")return ir()(i).call(i,function(M){return y(M)}).reduce(function(M,J){var ie;if(!M||s){var ne,le;return Tt()(ne=Tt()(le="".concat(M||"",";")).call(le,r,"=")).call(ne,J)}return Tt()(ie="".concat(M,",")).call(ie,J)},"");if(a==="form"){var E=s?"&".concat(r,"="):",";return ir()(i).call(i,function(M){return y(M)}).join(E)}if(a==="spaceDelimited"){var b=s?"".concat(r,"="):"";return ir()(i).call(i,function(M){return y(M)}).join(" ".concat(b))}if(a==="pipeDelimited"){var C=s?"".concat(r,"="):"";return ir()(i).call(i,function(M){return y(M)}).join("|".concat(C))}}function Lv(t){var r=t.key,i=t.value,a=t.style,s=t.explode,p=t.escape,y=function(C){return ps(C,{escape:p})},E=or()(i);if(a==="simple")return E.reduce(function(b,C){var M,J,ie,ne=y(i[C]),le=s?"=":",",ge=b?"".concat(b,","):"";return Tt()(M=Tt()(J=Tt()(ie="".concat(ge)).call(ie,C)).call(J,le)).call(M,ne)},"");if(a==="label")return E.reduce(function(b,C){var M,J,ie,ne=y(i[C]),le=s?"=":".",ge=b?"".concat(b,"."):".";return Tt()(M=Tt()(J=Tt()(ie="".concat(ge)).call(ie,C)).call(J,le)).call(M,ne)},"");if(a==="matrix"&&s)return E.reduce(function(b,C){var M,J,ie=y(i[C]),ne=b?"".concat(b,";"):";";return Tt()(M=Tt()(J="".concat(ne)).call(J,C,"=")).call(M,ie)},"");if(a==="matrix")return E.reduce(function(b,C){var M,J,ie=y(i[C]),ne=b?"".concat(b,","):";".concat(r,"=");return Tt()(M=Tt()(J="".concat(ne)).call(J,C,",")).call(M,ie)},"");if(a==="form")return E.reduce(function(b,C){var M,J,ie,ne,le=y(i[C]),ge=b?Tt()(M="".concat(b)).call(M,s?"&":","):"",pe=s?"=":",";return Tt()(J=Tt()(ie=Tt()(ne="".concat(ge)).call(ne,C)).call(ie,pe)).call(J,le)},"")}function Nv(t){var r=t.key,i=t.value,a=t.style,s=t.escape,p=function(b){return ps(b,{escape:s})};if(a==="simple")return p(i);if(a==="label")return".".concat(p(i));if(a==="matrix"){var y;return Tt()(y=";".concat(r,"=")).call(y,p(i))}if(a==="form")return p(i);if(a==="deepObject")return p(i,{},!0)}var Dc={serializeRes:np,mergeInQueryOrForm:up};function sf(t){return Bc.apply(this,arguments)}function Bc(){return Bc=Pc(Li().mark(function t(r){var i,a,s,p,y,E=arguments;return Li().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(i=E.length>1&&E[1]!==void 0?E[1]:{},vr(r)==="object"&&(i=r,r=i.url),i.headers=i.headers||{},Dc.mergeInQueryOrForm(i),i.headers&&or()(i.headers).forEach(function(M){var J=i.headers[M];typeof J=="string"&&(i.headers[M]=J.replace(/\n+/g," "))}),!i.requestInterceptor){C.next=12;break}return C.next=8,i.requestInterceptor(i);case 8:if(C.t0=C.sent,C.t0){C.next=11;break}C.t0=i;case 11:i=C.t0;case 12:return a=i.headers["content-type"]||i.headers["Content-Type"],/multipart\/form-data/i.test(a)&&(delete i.headers["content-type"],delete i.headers["Content-Type"]),C.prev=14,C.next=17,(i.userFetch||fetch)(i.url,i);case 17:return s=C.sent,C.next=20,Dc.serializeRes(s,r,i);case 20:if(s=C.sent,!i.responseInterceptor){C.next=28;break}return C.next=24,i.responseInterceptor(s);case 24:if(C.t1=C.sent,C.t1){C.next=27;break}C.t1=s;case 27:s=C.t1;case 28:C.next=39;break;case 30:if(C.prev=30,C.t2=C.catch(14),s){C.next=34;break}throw C.t2;case 34:throw p=new Error(s.statusText),p.status=s.status,p.statusCode=s.status,p.responseError=C.t2,p;case 39:if(s.ok){C.next=45;break}throw y=new Error(s.statusText),y.status=s.status,y.statusCode=s.status,y.response=s,y;case 45:return C.abrupt("return",s);case 46:case"end":return C.stop()}},t,null,[[14,30]])})),Bc.apply(this,arguments)}var Dv=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(r)};function Bv(t,r){return r&&(r.indexOf("application/json")===0||r.indexOf("+json")>0)?JSON.parse(t):Zd().safeLoad(t)}function np(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.loadSpec,s=a===void 0?!1:a,p={ok:t.ok,url:t.url||r,status:t.status,statusText:t.statusText,headers:ip(t.headers)},y=p.headers["content-type"],E=s||Dv(y),b=E?t.text:t.blob||t.buffer;return b.call(t).then(function(C){if(p.text=C,p.data=C,E)try{var M=Bv(C,y);p.body=M,p.obj=M}catch(J){p.parseError=J}return p})}function Uv(t){var r=Ic()(t).call(t,", ");return r?t.split(", "):t}function ip(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return bl()(Xd()(t))?tv()(Xd()(t).call(t)).reduce(function(r,i){var a=yi(i,2),s=a[0],p=a[1];return r[s]=Uv(p),r},{}):{}}function Uc(t,r){return!r&&typeof navigator!="undefined"&&(r=navigator),r&&r.product==="ReactNative"?!!(t&&vr(t)==="object"&&typeof t.uri=="string"):typeof File!="undefined"&&t instanceof File||typeof Blob!="undefined"&&t instanceof Blob||typeof qd.Buffer!="undefined"&&t instanceof qd.Buffer?!0:t!==null&&vr(t)==="object"&&typeof t.pipe=="function"}function op(t,r){return Array.isArray(t)&&t.some(function(i){return Uc(i,r)})}var jv={form:",",spaceDelimited:"%20",pipeDelimited:"|"},Vv={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function ap(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,a=r.collectionFormat,s=r.allowEmptyValue,p=r.serializationOption,y=r.encoding,E=vr(r)==="object"&&!Array.isArray(r)?r.value:r,b=i?function(J){return J.toString()}:function(J){return encodeURIComponent(J)},C=b(t);if(typeof E=="undefined"&&s)return[[C,""]];if(Uc(E)||op(E))return[[C,E]];if(p)return sp(t,E,i,p);if(y){if([vr(y.style),vr(y.explode),vr(y.allowReserved)].some(function(J){return J!=="undefined"}))return sp(t,E,i,kc()(y,["style","explode","allowReserved"]));if(y.contentType){if(y.contentType==="application/json"){var M=typeof E=="string"?E:nf()(E);return[[C,b(M)]]}return[[C,b(E.toString())]]}return vr(E)!=="object"?[[C,b(E)]]:Array.isArray(E)&&E.every(function(J){return vr(J)!=="object"})?[[C,ir()(E).call(E,b).join(",")]]:[[C,b(nf()(E))]]}return vr(E)!=="object"?[[C,b(E)]]:Array.isArray(E)?a==="multi"?[[C,ir()(E).call(E,b)]]:[[C,ir()(E).call(E,b).join(Vv[a||"csv"])]]:[[C,""]]}function sp(t,r,i,a){var s,p=a.style||"form",y=typeof a.explode=="undefined"?p==="form":a.explode,E=i?!1:a&&a.allowReserved?"unsafe":"reserved",b=function(ne){return ps(ne,{escape:E})},C=i?function(ie){return ie}:function(ie){return ps(ie,{escape:E})};if(vr(r)!=="object")return[[C(t),b(r)]];if(Array.isArray(r))return y?[[C(t),ir()(r).call(r,b)]]:[[C(t),ir()(r).call(r,b).join(jv[p])]];if(p==="deepObject"){var M;return ir()(M=or()(r)).call(M,function(ie){var ne;return[C(Tt()(ne="".concat(t,"[")).call(ne,ie,"]")),b(r[ie])]})}if(y){var J;return ir()(J=or()(r)).call(J,function(ie){return[C(ie),b(r[ie])]})}return[[C(t),ir()(s=or()(r)).call(s,function(ie){var ne;return[Tt()(ne="".concat(C(ie),",")).call(ne,b(r[ie]))]}).join(",")]]}function Hv(t){return Qd()(t).reduce(function(r,i){var a=yi(i,2),s=a[0],p=a[1],y=ga(ap(s,p,!0)),E;try{for(y.s();!(E=y.n()).done;){var b=yi(E.value,2),C=b[0],M=b[1];if(Array.isArray(M)){var J=ga(M),ie;try{for(J.s();!(ie=J.n()).done;){var ne=ie.value;r.append(C,ne)}}catch(le){J.e(le)}finally{J.f()}}else r.append(C,M)}}catch(le){y.e(le)}finally{y.f()}return r},new Ev)}function lp(t){var r=or()(t).reduce(function(i,a){var s=ga(ap(a,t[a])),p;try{for(s.s();!(p=s.n()).done;){var y=yi(p.value,2),E=y[0],b=y[1];i[E]=b}}catch(C){s.e(C)}finally{s.f()}return i},{});return Fc().stringify(r,{encode:!1,indices:!1})||""}function up(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.url,i=r===void 0?"":r,a=t.query,s=t.form,p=function(){for(var Se=arguments.length,xe=new Array(Se),Fe=0;Fe<Se;Fe++)xe[Fe]=arguments[Fe];var $e=Dn()(xe).call(xe,function(Be){return Be}).join("&");return $e?"?".concat($e):""};if(s){var y=or()(s).some(function(pe){var Se=s[pe].value;return Uc(Se)||op(Se)}),E=t.headers["content-type"]||t.headers["Content-Type"];y||/multipart\/form-data/i.test(E)?t.body=Hv(t.form):t.body=lp(s),delete t.form}if(a){var b=i.split("?"),C=yi(b,2),M=C[0],J=C[1],ie="";if(J){var ne=Fc().parse(J),le=or()(a);le.forEach(function(pe){return delete ne[pe]}),ie=Fc().stringify(ne,{encode:!0})}var ge=p(ie,lp(a));t.url=M+ge,delete t.query}return t}function Wv(t,r,i){return i=i||function(a){return a},r=r||function(a){return a},function(a){return typeof a=="string"&&(a={url:a}),Dc.mergeInQueryOrForm(a),a=r(a),i(t(a))}}var zv=o(51942),mi=o.n(zv),Gv=o(93476),ma=o.n(Gv),$v=o(92762),Kv=o.n($v),Yv=o(13311),Jv=o.n(Yv),Xv=o(50308),fp=o.n(Xv);/*!
449
+ * https://github.com/Starcounter-Jack/JSON-Patch
450
+ * (c) 2017 Joachim Wester
451
+ * MIT license
452
+ */var Qv=function(){var t=function(r,i){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,s){a.__proto__=s}||function(a,s){for(var p in s)s.hasOwnProperty(p)&&(a[p]=s[p])},t(r,i)};return function(r,i){t(r,i);function a(){this.constructor=r}r.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}(),Zv=Object.prototype.hasOwnProperty;function lf(t,r){return Zv.call(t,r)}function jc(t){if(Array.isArray(t)){for(var i=new Array(t.length),r=0;r<i.length;r++)i[r]=""+r;return i}if(Object.keys)return Object.keys(t);var i=[];for(var a in t)lf(t,a)&&i.push(a);return i}function Gn(t){switch(typeof t){case"object":return JSON.parse(JSON.stringify(t));case"undefined":return null;default:return t}}function Vc(t){for(var r=0,i=t.length,a;r<i;){if(a=t.charCodeAt(r),a>=48&&a<=57){r++;continue}return!1}return!0}function ao(t){return t.indexOf("/")===-1&&t.indexOf("~")===-1?t:t.replace(/~/g,"~0").replace(/\//g,"~1")}function cp(t){return t.replace(/~1/g,"/").replace(/~0/g,"~")}function dp(t,r){var i;for(var a in t)if(lf(t,a)){if(t[a]===r)return ao(a)+"/";if(typeof t[a]=="object"&&(i=dp(t[a],r),i!=""))return ao(a)+"/"+i}return""}function Nm(t,r){if(t===r)return"/";var i=dp(t,r);if(i==="")throw new Error("Object not found in root");return"/"+i}function Hc(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var r=0,i=t.length;r<i;r++)if(Hc(t[r]))return!0}else if(typeof t=="object"){for(var a=jc(t),s=a.length,r=0;r<s;r++)if(Hc(t[a[r]]))return!0}}return!1}function pp(t,r){var i=[t];for(var a in r){var s=typeof r[a]=="object"?JSON.stringify(r[a],null,2):r[a];typeof s!="undefined"&&i.push(a+": "+s)}return i.join(`
453
+ `)}var hp=function(t){Qv(r,t);function r(i,a,s,p,y){var E=this.constructor,b=t.call(this,pp(i,{name:a,index:s,operation:p,tree:y}))||this;return b.name=a,b.index=s,b.operation=p,b.tree=y,Object.setPrototypeOf(b,E.prototype),b.message=pp(i,{name:a,index:s,operation:p,tree:y}),b}return r}(Error),Hr=hp,qv=Gn,hs={add:function(t,r,i){return t[r]=this.value,{newDocument:i}},remove:function(t,r,i){var a=t[r];return delete t[r],{newDocument:i,removed:a}},replace:function(t,r,i){var a=t[r];return t[r]=this.value,{newDocument:i,removed:a}},move:function(t,r,i){var a=wl(i,this.path);a&&(a=Gn(a));var s=xa(i,{op:"remove",path:this.from}).removed;return xa(i,{op:"add",path:this.path,value:s}),{newDocument:i,removed:a}},copy:function(t,r,i){var a=wl(i,this.from);return xa(i,{op:"add",path:this.path,value:Gn(a)}),{newDocument:i}},test:function(t,r,i){return{newDocument:i,test:Sl(t[r],this.value)}},_get:function(t,r,i){return this.value=t[r],{newDocument:i}}},_v={add:function(t,r,i){return Vc(r)?t.splice(r,0,this.value):t[r]=this.value,{newDocument:i,index:r}},remove:function(t,r,i){var a=t.splice(r,1);return{newDocument:i,removed:a[0]}},replace:function(t,r,i){var a=t[r];return t[r]=this.value,{newDocument:i,removed:a}},move:hs.move,copy:hs.copy,test:hs.test,_get:hs._get};function wl(t,r){if(r=="")return t;var i={op:"_get",path:r};return xa(t,i),i.value}function xa(t,r,i,a,s,p){if(i===void 0&&(i=!1),a===void 0&&(a=!0),s===void 0&&(s=!0),p===void 0&&(p=0),i&&(typeof i=="function"?i(r,0,t,r.path):uf(r,0)),r.path===""){var y={newDocument:t};if(r.op==="add")return y.newDocument=r.value,y;if(r.op==="replace")return y.newDocument=r.value,y.removed=t,y;if(r.op==="move"||r.op==="copy")return y.newDocument=wl(t,r.from),r.op==="move"&&(y.removed=t),y;if(r.op==="test"){if(y.test=Sl(t,r.value),y.test===!1)throw new Hr("Test operation failed","TEST_OPERATION_FAILED",p,r,t);return y.newDocument=t,y}else{if(r.op==="remove")return y.removed=t,y.newDocument=null,y;if(r.op==="_get")return r.value=t,y;if(i)throw new Hr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",p,r,t);return y}}else{a||(t=Gn(t));var E=r.path||"",b=E.split("/"),C=t,M=1,J=b.length,ie=void 0,ne=void 0,le=void 0;for(typeof i=="function"?le=i:le=uf;;){if(ne=b[M],s&&ne=="__proto__")throw new TypeError("JSON-Patch: modifying `__proto__` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(i&&ie===void 0&&(C[ne]===void 0?ie=b.slice(0,M).join("/"):M==J-1&&(ie=r.path),ie!==void 0&&le(r,0,t,ie)),M++,Array.isArray(C)){if(ne==="-")ne=C.length;else{if(i&&!Vc(ne))throw new Hr("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",p,r,t);Vc(ne)&&(ne=~~ne)}if(M>=J){if(i&&r.op==="add"&&ne>C.length)throw new Hr("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",p,r,t);var y=_v[r.op].call(r,C,ne,t);if(y.test===!1)throw new Hr("Test operation failed","TEST_OPERATION_FAILED",p,r,t);return y}}else if(ne&&ne.indexOf("~")!=-1&&(ne=cp(ne)),M>=J){var y=hs[r.op].call(r,C,ne,t);if(y.test===!1)throw new Hr("Test operation failed","TEST_OPERATION_FAILED",p,r,t);return y}C=C[ne]}}}function ba(t,r,i,a,s){if(a===void 0&&(a=!0),s===void 0&&(s=!0),i&&!Array.isArray(r))throw new Hr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");a||(t=Gn(t));for(var p=new Array(r.length),y=0,E=r.length;y<E;y++)p[y]=xa(t,r[y],i,!0,s,y),t=p[y].newDocument;return p.newDocument=t,p}function eg(t,r,i){var a=xa(t,r);if(a.test===!1)throw new Hr("Test operation failed","TEST_OPERATION_FAILED",i,r,t);return a.newDocument}function uf(t,r,i,a){if(typeof t!="object"||t===null||Array.isArray(t))throw new Hr("Operation is not an object","OPERATION_NOT_AN_OBJECT",r,t,i);if(hs[t.op]){if(typeof t.path!="string")throw new Hr("Operation `path` property is not a string","OPERATION_PATH_INVALID",r,t,i);if(t.path.indexOf("/")!==0&&t.path.length>0)throw new Hr('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",r,t,i);if((t.op==="move"||t.op==="copy")&&typeof t.from!="string")throw new Hr("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",r,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&t.value===void 0)throw new Hr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",r,t,i);if((t.op==="add"||t.op==="replace"||t.op==="test")&&Hc(t.value))throw new Hr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",r,t,i);if(i){if(t.op=="add"){var s=t.path.split("/").length,p=a.split("/").length;if(s!==p+1&&s!==p)throw new Hr("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",r,t,i)}else if(t.op==="replace"||t.op==="remove"||t.op==="_get"){if(t.path!==a)throw new Hr("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",r,t,i)}else if(t.op==="move"||t.op==="copy"){var y={op:"_get",path:t.from,value:void 0},E=vp([y],i);if(E&&E.name==="OPERATION_PATH_UNRESOLVABLE")throw new Hr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",r,t,i)}}}else throw new Hr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",r,t,i)}function vp(t,r,i){try{if(!Array.isArray(t))throw new Hr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(r)ba(Gn(r),Gn(t),i||!0);else{i=i||uf;for(var a=0;a<t.length;a++)i(t[a],a,r,void 0)}}catch(s){if(s instanceof Hr)return s;throw s}}function Sl(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){var i=Array.isArray(t),a=Array.isArray(r),s,p,y;if(i&&a){if(p=t.length,p!=r.length)return!1;for(s=p;s--!=0;)if(!Sl(t[s],r[s]))return!1;return!0}if(i!=a)return!1;var E=Object.keys(t);if(p=E.length,p!==Object.keys(r).length)return!1;for(s=p;s--!=0;)if(!r.hasOwnProperty(E[s]))return!1;for(s=p;s--!=0;)if(y=E[s],!Sl(t[y],r[y]))return!1;return!0}return t!==t&&r!==r}/*!
454
+ * https://github.com/Starcounter-Jack/JSON-Patch
455
+ * (c) 2017 Joachim Wester
456
+ * MIT license
457
+ */var Wc=new WeakMap,tg=function(){function t(r){this.observers=new Map,this.obj=r}return t}(),rg=function(){function t(r,i){this.callback=r,this.observer=i}return t}();function ng(t){return Wc.get(t)}function ig(t,r){return t.observers.get(r)}function og(t,r){t.observers.delete(r.callback)}function ag(t,r){r.unobserve()}function sg(t,r){var i=[],a,s=ng(t);if(!s)s=new tg(t),Wc.set(t,s);else{var p=ig(s,r);a=p&&p.observer}if(a)return a;if(a={},s.value=Gn(t),r){a.callback=r,a.next=null;var y=function(){zc(a)},E=function(){clearTimeout(a.next),a.next=setTimeout(y)};typeof window!="undefined"&&(window.addEventListener("mouseup",E),window.addEventListener("keyup",E),window.addEventListener("mousedown",E),window.addEventListener("keydown",E),window.addEventListener("change",E))}return a.patches=i,a.object=t,a.unobserve=function(){zc(a),clearTimeout(a.next),og(s,a),typeof window!="undefined"&&(window.removeEventListener("mouseup",E),window.removeEventListener("keyup",E),window.removeEventListener("mousedown",E),window.removeEventListener("keydown",E),window.removeEventListener("change",E))},s.observers.set(r,new rg(r,a)),a}function zc(t,r){r===void 0&&(r=!1);var i=Wc.get(t.object);Gc(i.value,t.object,t.patches,"",r),t.patches.length&&ba(i.value,t.patches);var a=t.patches;return a.length>0&&(t.patches=[],t.callback&&t.callback(a)),a}function Gc(t,r,i,a,s){if(r!==t){typeof r.toJSON=="function"&&(r=r.toJSON());for(var p=jc(r),y=jc(t),E=!1,b=!1,C=y.length-1;C>=0;C--){var M=y[C],J=t[M];if(lf(r,M)&&!(r[M]===void 0&&J!==void 0&&Array.isArray(r)===!1)){var ie=r[M];typeof J=="object"&&J!=null&&typeof ie=="object"&&ie!=null?Gc(J,ie,i,a+"/"+ao(M),s):J!==ie&&(E=!0,s&&i.push({op:"test",path:a+"/"+ao(M),value:Gn(J)}),i.push({op:"replace",path:a+"/"+ao(M),value:Gn(ie)}))}else Array.isArray(t)===Array.isArray(r)?(s&&i.push({op:"test",path:a+"/"+ao(M),value:Gn(J)}),i.push({op:"remove",path:a+"/"+ao(M)}),b=!0):(s&&i.push({op:"test",path:a,value:t}),i.push({op:"replace",path:a,value:r}),E=!0)}if(!(!b&&p.length==y.length))for(var C=0;C<p.length;C++){var M=p[C];!lf(t,M)&&r[M]!==void 0&&i.push({op:"add",path:a+"/"+ao(M),value:Gn(r[M])})}}}function lg(t,r,i){i===void 0&&(i=!1);var a=[];return Gc(t,r,a,"",i),a}const Dm=Object.assign({},c,v,{JsonPatchError:hp,deepClone:Gn,escapePathComponent:ao,unescapePathComponent:cp});var ug=o(31312),fg=o.n(ug),cg=o(50361),dg=o.n(cg);const sr={add:hg,replace:$c,remove:vg,merge:gg,mergeDeep:yg,context:mg,getIn:Sg,applyPatch:pg,parentPathMatch:wg,flatten:Al,fullyNormalizeArray:Ag,normalizeArray:mp,isPromise:Eg,forEachNew:xg,forEachNewPrimitive:bg,isJsonPatch:wp,isContextPatch:Tg,isPatch:cf,isMutation:Sp,isAdditiveMutation:ff,isGenerator:Og,isFunction:bp,isObject:jo,isError:Cg};function pg(t,r,i){if(i=i||{},r=Cr(Cr({},r),{},{path:r.path&&gp(r.path)}),r.op==="merge"){var a=Jc(t,r.path);mi()(a,r.value),ba(t,[$c(r.path,a)])}else if(r.op==="mergeDeep"){var s=Jc(t,r.path);for(var p in r.value){var y=r.value[p],E=Array.isArray(y);if(E){var b=s[p]||[];s[p]=Tt()(b).call(b,y)}else if(jo(y)&&!E){var C=Cr({},s[p]);for(var M in y)if(Object.prototype.hasOwnProperty.call(C,M)){C=fg()(dg()(C),y);break}else mi()(C,zd({},M,y[M]));s[p]=C}else s[p]=y}}else if(r.op==="add"&&r.path===""&&jo(r.value)){var J=or()(r.value).reduce(function(pe,Se){return pe.push({op:"add",path:"/".concat(gp(Se)),value:r.value[Se]}),pe},[]);ba(t,J)}else if(r.op==="replace"&&r.path===""){var ie=r,ne=ie.value;i.allowMetaPatches&&r.meta&&ff(r)&&(Array.isArray(r.value)||jo(r.value))&&(ne=Cr(Cr({},ne),r.meta)),t=ne}else if(ba(t,[r]),i.allowMetaPatches&&r.meta&&ff(r)&&(Array.isArray(r.value)||jo(r.value))){var le=Jc(t,r.path),ge=Cr(Cr({},le),r.meta);ba(t,[$c(r.path,ge)])}return t}function gp(t){return Array.isArray(t)?t.length<1?"":"/".concat(ir()(t).call(t,function(r){return(r+"").replace(/~/g,"~0").replace(/\//g,"~1")}).join("/")):t}function hg(t,r){return{op:"add",path:t,value:r}}function $c(t,r,i){return{op:"replace",path:t,value:r,meta:i}}function vg(t){return{op:"remove",path:t}}function gg(t,r){return{type:"mutation",op:"merge",path:t,value:r}}function yg(t,r){return{type:"mutation",op:"mergeDeep",path:t,value:r}}function mg(t,r){return{type:"context",path:t,value:r}}function xg(t,r){try{return yp(t,Yc,r)}catch(i){return i}}function bg(t,r){try{return yp(t,Kc,r)}catch(i){return i}}function yp(t,r,i){var a,s=ir()(a=Dn()(t).call(t,ff)).call(a,function(E){return r(E.value,i,E.path)})||[],p=Al(s),y=xp(p);return y}function Kc(t,r,i){if(i=i||[],Array.isArray(t))return ir()(t).call(t,function(s,p){return Kc(s,r,Tt()(i).call(i,p))});if(jo(t)){var a;return ir()(a=or()(t)).call(a,function(s){return Kc(t[s],r,Tt()(i).call(i,s))})}return r(t,i[i.length-1],i)}function Yc(t,r,i){i=i||[];var a=[];if(i.length>0){var s=r(t,i[i.length-1],i);s&&(a=Tt()(a).call(a,s))}if(Array.isArray(t)){var p=ir()(t).call(t,function(b,C){return Yc(b,r,Tt()(i).call(i,C))});p&&(a=Tt()(a).call(a,p))}else if(jo(t)){var y,E=ir()(y=or()(t)).call(y,function(b){return Yc(t[b],r,Tt()(i).call(i,b))});E&&(a=Tt()(a).call(a,E))}return a=Al(a),a}function wg(t,r){if(!Array.isArray(r))return!1;for(var i=0,a=r.length;i<a;i+=1)if(r[i]!==t[i])return!1;return!0}function Sg(t,r){return r.reduce(function(i,a){return typeof a!="undefined"&&i?i[a]:i},t)}function Ag(t){return xp(Al(mp(t)))}function mp(t){return Array.isArray(t)?t:[t]}function Al(t){var r;return Tt()(r=[]).apply(r,ya(ir()(t).call(t,function(i){return Array.isArray(i)?Al(i):i})))}function xp(t){return Dn()(t).call(t,function(r){return typeof r!="undefined"})}function jo(t){return t&&vr(t)==="object"}function Eg(t){return jo(t)&&bp(t.then)}function bp(t){return t&&typeof t=="function"}function Cg(t){return t instanceof Error}function wp(t){if(cf(t)){var r=t.op;return r==="add"||r==="remove"||r==="replace"}return!1}function Og(t){return Object.prototype.toString.call(t)==="[object GeneratorFunction]"}function Sp(t){return wp(t)||cf(t)&&t.type==="mutation"}function ff(t){return Sp(t)&&(t.op==="add"||t.op==="replace"||t.op==="merge"||t.op==="mergeDeep")}function Tg(t){return cf(t)&&t.type==="context"}function cf(t){return t&&vr(t)==="object"}function Jc(t,r){try{return wl(t,r)}catch(i){return console.error(i),{}}}var Pg=o(52424),Ig=o.n(Pg),Fg=o(54098),kg=o(9779),Ap=o.n(kg);function Ep(t,r){function i(){Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack;for(var a=arguments.length,s=new Array(a),p=0;p<a;p++)s[p]=arguments[p];this.message=s[0],r&&r.apply(this,s)}return i.prototype=new Error,i.prototype.name=t,i.prototype.constructor=i,i}var Rg=o(13692),Mg=o.n(Rg),Lg=o(47037),Ng=o.n(Lg),Dg=["properties"],Bg=["properties"],Ug=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],jg=["schema/example","items/example"];function Cp(t){var r=t[t.length-1],i=t[t.length-2],a=t.join("/");return Dg.indexOf(r)>-1&&Bg.indexOf(i)===-1||Ug.indexOf(a)>-1||jg.some(function(s){return a.indexOf(s)>-1})}function Vg(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=i.specmap,s=i.getBaseUrlForNodePath,p=s===void 0?function(C){var M;return a.getContext(Tt()(M=[]).call(M,ya(r),ya(C))).baseDoc}:s,y=i.targetKeys,E=y===void 0?["$ref","$$ref"]:y,b=[];return Mg()(t).forEach(function(){if(Ic()(E).call(E,this.key)&&Ng()(this.node)){var M=this.path,J=Tt()(r).call(r,this.path),ie=Xc(this.node,p(M));b.push(a.replace(J,ie))}}),b}function Xc(t,r){var i,a=t.split("#"),s=yi(a,2),p=s[0],y=s[1],E=Uo.resolve(p||"",r||"");return y?Tt()(i="".concat(E,"#")).call(i,y):E}var Op="application/json, application/yaml",Hg=new RegExp("^([a-z]+://|//)","i"),vs=Ep("JSONRefError",function(r,i,a){this.originalError=a,mi()(this,i||{})}),so={},Tp=new(Ig()),Wg=[function(t){return t[0]==="paths"&&t[3]==="responses"&&t[5]==="examples"},function(t){return t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="example"},function(t){return t[0]==="paths"&&t[3]==="responses"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"},function(t){return t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="example"},function(t){return t[0]==="paths"&&t[3]==="requestBody"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="example"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[5]==="example"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="examples"&&t[6]==="value"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[5]==="examples"&&t[7]==="value"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="example"},function(t){return t[0]==="paths"&&t[2]==="parameters"&&t[4]==="content"&&t[6]==="examples"&&t[8]==="value"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[4]==="content"&&t[7]==="example"},function(t){return t[0]==="paths"&&t[3]==="parameters"&&t[5]==="content"&&t[7]==="examples"&&t[9]==="value"}],zg=function(r){return Wg.some(function(i){return i(r)})},Gg={key:"$ref",plugin:function(r,i,a,s){var p=s.getInstance(),y=Ni()(a).call(a,0,-1);if(!(Cp(y)||zg(y))){var E=s.getContext(a),b=E.baseDoc;if(typeof r!="string")return new vs("$ref: must be a string (JSON-Ref)",{$ref:r,baseDoc:b,fullPath:a});var C=Fp(r),M=C[0],J=C[1]||"",ie;try{ie=b||M?Ip(M,b):null}catch(xe){return Qc(xe,{pointer:J,$ref:r,basePath:ie,fullPath:a})}var ne,le;if(Qg(J,ie,y,s)&&!p.useCircularStructures){var ge=Xc(r,ie);return r===ge?null:sr.replace(a,ge)}if(ie==null?(le=qc(J),ne=s.get(le),typeof ne=="undefined"&&(ne=new vs("Could not resolve reference: ".concat(r),{pointer:J,$ref:r,baseDoc:b,fullPath:a}))):(ne=kp(ie,J),ne.__value!=null?ne=ne.__value:ne=ne.catch(function(xe){throw Qc(xe,{pointer:J,$ref:r,baseDoc:b,fullPath:a})})),ne instanceof Error)return[sr.remove(a),ne];var pe=Xc(r,ie),Se=sr.replace(y,ne,{$$ref:pe});if(ie&&ie!==b)return[Se,sr.context(y,{baseDoc:ie})];try{if(!Zg(s.state,Se)||p.useCircularStructures)return Se}catch(xe){return null}}}},Pp=mi()(Gg,{docCache:so,absoluteify:Ip,clearCache:Kg,JSONRefError:vs,wrapError:Qc,getDoc:Rp,split:Fp,extractFromDoc:kp,fetchJSON:Yg,extract:Zc,jsonPointerToArray:qc,unescapeJsonPointerToken:Mp});const $g=Pp;function Ip(t,r){if(!Hg.test(t)){if(!r){var i;throw new vs(Tt()(i="Tried to resolve a relative URL, without having a basePath. path: '".concat(t,"' basePath: '")).call(i,r,"'"))}return Uo.resolve(r,t)}return t}function Qc(t,r){var i;if(t&&t.response&&t.response.body){var a;i=Tt()(a="".concat(t.response.body.code," ")).call(a,t.response.body.message)}else i=t.message;return new vs("Could not resolve reference: ".concat(i),r,t)}function Fp(t){return(t+"").split("#")}function kp(t,r){var i=so[t];if(i&&!sr.isPromise(i))try{var a=Zc(r,i);return mi()(ma().resolve(a),{__value:a})}catch(s){return ma().reject(s)}return Rp(t).then(function(s){return Zc(r,s)})}function Kg(t){typeof t!="undefined"?delete so[t]:or()(so).forEach(function(r){delete so[r]})}function Rp(t){var r=so[t];return r?sr.isPromise(r)?r:ma().resolve(r):(so[t]=Pp.fetchJSON(t).then(function(i){return so[t]=i,i}),so[t])}function Yg(t){return(0,Fg.fetch)(t,{headers:{Accept:Op},loadSpec:!0}).then(function(r){return r.text()}).then(function(r){return Zd().safeLoad(r)})}function Zc(t,r){var i=qc(t);if(i.length<1)return r;var a=sr.getIn(r,i);if(typeof a=="undefined")throw new vs("Could not resolve pointer: ".concat(t," does not exist in document"),{pointer:t});return a}function qc(t){var r;if(typeof t!="string")throw new TypeError("Expected a string, got a ".concat(vr(t)));return t[0]==="/"&&(t=t.substr(1)),t===""?[]:ir()(r=t.split("/")).call(r,Mp)}function Mp(t){return typeof t!="string"?t:Ap().unescape(t.replace(/~1/g,"/").replace(/~0/g,"~"))}function Lp(t){return Ap().escape(t.replace(/~/g,"~0").replace(/\//g,"~1"))}function Jg(t){return t.length===0?"":"/".concat(ir()(t).call(t,Lp).join("/"))}var Xg=function(r){return!r||r==="/"||r==="#"};function _c(t,r){if(Xg(r))return!0;var i=t.charAt(r.length),a=Ni()(r).call(r,-1);return t.indexOf(r)===0&&(!i||i==="/"||i==="#")&&a!=="#"}function Qg(t,r,i,a){var s,p,y=Tp.get(a);y||(y={},Tp.set(a,y));var E=Jg(i),b=Tt()(s="".concat(r||"<specmap-base>","#")).call(s,t),C=E.replace(/allOf\/\d+\/?/g,""),M=a.contextTree.get([]).baseDoc;if(r==M&&_c(C,t))return!0;var J="",ie=i.some(function(ne){var le;return J=Tt()(le="".concat(J,"/")).call(le,Lp(ne)),y[J]&&y[J].some(function(ge){return _c(ge,b)||_c(b,ge)})});if(ie)return!0;y[C]=Tt()(p=y[C]||[]).call(p,b)}function Zg(t,r){var i=[t];return r.path.reduce(function(s,p){return i.push(s[p]),s[p]},t),a(r.value);function a(s){return sr.isObject(s)&&(i.indexOf(s)>=0||or()(s).some(function(p){return a(s[p])}))}}var qg=o(41609),_g=o.n(qg);const ey={key:"allOf",plugin:function(r,i,a,s,p){if(!(p.meta&&p.meta.$$ref)){var y=Ni()(a).call(a,0,-1);if(!Cp(y)){if(!Array.isArray(r)){var E=new TypeError("allOf must be an array");return E.fullPath=a,E}var b=!1,C=p.value;if(y.forEach(function(ie){!C||(C=C[ie])}),C=Cr({},C),!_g()(C)){delete C.allOf;var M=[];if(M.push(s.replace(y,{})),r.forEach(function(ie,ne){if(!s.isObject(ie)){if(b)return null;b=!0;var le=new TypeError("Elements in allOf must be objects");return le.fullPath=a,M.push(le)}M.push(s.mergeDeep(y,ie));var ge=Ni()(a).call(a,0,-1),pe=Vg(ie,ge,{getBaseUrlForNodePath:function(xe){var Fe;return s.getContext(Tt()(Fe=[]).call(Fe,ya(a),[ne],ya(xe))).baseDoc},specmap:s});M.push.apply(M,ya(pe))}),M.push(s.mergeDeep(y,C)),!C.$$ref){var J;M.push(s.remove(Tt()(J=[]).call(J,y,"$$ref")))}return M}}}}},ty={key:"parameters",plugin:function(r,i,a,s){if(Array.isArray(r)&&r.length){var p=mi()([],r),y=Ni()(a).call(a,0,-1),E=Cr({},sr.getIn(s.spec,y));return r.forEach(function(b,C){try{p[C].default=s.parameterMacro(E,b)}catch(J){var M=new Error(J);return M.fullPath=a,M}}),sr.replace(a,p)}return sr.replace(a,r)}},ry={key:"properties",plugin:function(r,i,a,s){var p=Cr({},r);for(var y in r)try{p[y].default=s.modelPropertyMacro(p[y])}catch(C){var E=new Error(C);return E.fullPath=a,E}var b=sr.replace(a,p);return b}};var ny=function(){function t(r){Rc(this,t),this.root=ed(r||{})}return Mc(t,[{key:"set",value:function(i,a){var s=this.getParent(i,!0);if(!s){df(this.root,a,null);return}var p=i[i.length-1],y=s.children;if(y[p]){df(y[p],a,s);return}y[p]=ed(a,s)}},{key:"get",value:function(i){if(i=i||[],i.length<1)return this.root.value;for(var a=this.root,s,p,y=0;y<i.length&&(p=i[y],s=a.children,!!s[p]);y+=1)a=s[p];return a&&a.protoValue}},{key:"getParent",value:function(i,a){return!i||i.length<1?null:i.length<2?this.root:Ni()(i).call(i,0,-1).reduce(function(s,p){if(!s)return s;var y=s.children;return!y[p]&&a&&(y[p]=ed(null,s)),y[p]},this.root)}}]),t}();function ed(t,r){return df({children:{}},t,r)}function df(t,r,i){return t.value=r||{},t.protoValue=i?Cr(Cr({},i.protoValue),t.value):t.value,or()(t.children).forEach(function(a){var s=t.children[a];t.children[a]=df(s,s.value,t)}),t}var Np=100,iy=function(){function t(r){var i=this,a,s;Rc(this,t),mi()(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new ny,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:mi()(Object.create(this),sr,{getInstance:function(){return i}}),allowMetaPatches:!1},r),this.get=this._get.bind(this),this.getContext=this._getContext.bind(this),this.hasRun=this._hasRun.bind(this),this.wrappedPlugins=Dn()(a=ir()(s=this.plugins).call(s,this.wrapPlugin.bind(this))).call(a,sr.isFunction),this.patches.push(sr.add([],this.spec)),this.patches.push(sr.context([],this.context)),this.updatePatches(this.patches)}return Mc(t,[{key:"debug",value:function(i){if(this.debugLevel===i){for(var a,s=arguments.length,p=new Array(s>1?s-1:0),y=1;y<s;y++)p[y-1]=arguments[y];(a=console).log.apply(a,p)}}},{key:"verbose",value:function(i){if(this.debugLevel==="verbose"){for(var a,s,p=arguments.length,y=new Array(p>1?p-1:0),E=1;E<p;E++)y[E-1]=arguments[E];(a=console).log.apply(a,Tt()(s=["[".concat(i,"] ")]).call(s,y))}}},{key:"wrapPlugin",value:function(i,a){var s=this.pathDiscriminator,p=null,y;return i[this.pluginProp]?(p=i,y=i[this.pluginProp]):sr.isFunction(i)?y=i:sr.isObject(i)&&(y=E(i)),mi()(y.bind(p),{pluginName:i.name||a,isGenerator:sr.isGenerator(y)});function E(b){var C=function(J,ie){return Array.isArray(J)?J.every(function(ne,le){return ne===ie[le]}):!0};return Li().mark(function M(J,ie){var ne,le,ge,pe,Se,xe;return Li().wrap(function($e){for(;;)switch($e.prev=$e.next){case 0:xe=function(Ge,De,je){var Ve,Ke,ze,_e,xt,Nt,Wt,lr,Rr,Or,Gr,wr,Ur;return Li().wrap(function(Xt){for(;;)switch(Xt.prev=Xt.next){case 0:if(sr.isObject(Ge)){Xt.next=6;break}if(b.key!==De[De.length-1]){Xt.next=4;break}return Xt.next=4,b.plugin(Ge,b.key,De,ie);case 4:Xt.next=30;break;case 6:Ve=De.length-1,Ke=De[Ve],ze=De.indexOf("properties"),_e=Ke==="properties"&&Ve===ze,xt=ie.allowMetaPatches&&le[Ge.$$ref],Nt=0,Wt=or()(Ge);case 12:if(!(Nt<Wt.length)){Xt.next=30;break}if(lr=Wt[Nt],Rr=Ge[lr],Or=Tt()(De).call(De,lr),Gr=sr.isObject(Rr),wr=Ge.$$ref,xt){Xt.next=22;break}if(!Gr){Xt.next=22;break}return ie.allowMetaPatches&&wr&&(le[wr]=!0),Xt.delegateYield(xe(Rr,Or,je),"t0",22);case 22:if(!(!_e&&lr===b.key)){Xt.next=27;break}if(Ur=C(s,De),!(!s||Ur)){Xt.next=27;break}return Xt.next=27,b.plugin(Rr,lr,Or,ie,je);case 27:Nt++,Xt.next=12;break;case 30:case"end":return Xt.stop()}},ne)},ne=Li().mark(xe),le={},ge=ga(Dn()(J).call(J,sr.isAdditiveMutation)),$e.prev=4,ge.s();case 6:if((pe=ge.n()).done){$e.next=11;break}return Se=pe.value,$e.delegateYield(xe(Se.value,Se.path,Se),"t0",9);case 9:$e.next=6;break;case 11:$e.next=16;break;case 13:$e.prev=13,$e.t1=$e.catch(4),ge.e($e.t1);case 16:return $e.prev=16,ge.f(),$e.finish(16);case 19:case"end":return $e.stop()}},M,null,[[4,13,16,19]])})}}},{key:"nextPlugin",value:function(){var i=this;return Jv()(this.wrappedPlugins,function(a){var s=i.getMutationsForPlugin(a);return s.length>0})}},{key:"nextPromisedPatch",value:function(){if(this.promisedPatches.length>0){var i;return ma().race(ir()(i=this.promisedPatches).call(i,function(a){return a.value}))}}},{key:"getPluginHistory",value:function(i){var a=this.constructor.getPluginName(i);return this.pluginHistory[a]||[]}},{key:"getPluginRunCount",value:function(i){return this.getPluginHistory(i).length}},{key:"getPluginHistoryTip",value:function(i){var a=this.getPluginHistory(i),s=a&&a[a.length-1];return s||{}}},{key:"getPluginMutationIndex",value:function(i){var a=this.getPluginHistoryTip(i).mutationIndex;return typeof a!="number"?-1:a}},{key:"updatePluginHistory",value:function(i,a){var s=this.constructor.getPluginName(i);this.pluginHistory[s]=this.pluginHistory[s]||[],this.pluginHistory[s].push(a)}},{key:"updatePatches",value:function(i){var a=this;sr.normalizeArray(i).forEach(function(s){if(s instanceof Error){a.errors.push(s);return}try{if(!sr.isObject(s)){a.debug("updatePatches","Got a non-object patch",s);return}if(a.showDebug&&a.allPatches.push(s),sr.isPromise(s.value)){a.promisedPatches.push(s),a.promisedPatchThen(s);return}if(sr.isContextPatch(s)){a.setContext(s.path,s.value);return}if(sr.isMutation(s)){a.updateMutations(s);return}}catch(p){console.error(p),a.errors.push(p)}})}},{key:"updateMutations",value:function(i){vr(i.value)==="object"&&!Array.isArray(i.value)&&this.allowMetaPatches&&(i.value=Cr({},i.value));var a=sr.applyPatch(this.state,i,{allowMetaPatches:this.allowMetaPatches});a&&(this.mutations.push(i),this.state=a)}},{key:"removePromisedPatch",value:function(i){var a,s=this.promisedPatches.indexOf(i);if(s<0){this.debug("Tried to remove a promisedPatch that isn't there!");return}Kv()(a=this.promisedPatches).call(a,s,1)}},{key:"promisedPatchThen",value:function(i){var a=this;return i.value=i.value.then(function(s){var p=Cr(Cr({},i),{},{value:s});a.removePromisedPatch(i),a.updatePatches(p)}).catch(function(s){a.removePromisedPatch(i),a.updatePatches(s)}),i.value}},{key:"getMutations",value:function(i,a){var s;return i=i||0,typeof a!="number"&&(a=this.mutations.length),Ni()(s=this.mutations).call(s,i,a)}},{key:"getCurrentMutations",value:function(){return this.getMutationsForPlugin(this.getCurrentPlugin())}},{key:"getMutationsForPlugin",value:function(i){var a=this.getPluginMutationIndex(i);return this.getMutations(a+1)}},{key:"getCurrentPlugin",value:function(){return this.currentPlugin}},{key:"getLib",value:function(){return this.libMethods}},{key:"_get",value:function(i){return sr.getIn(this.state,i)}},{key:"_getContext",value:function(i){return this.contextTree.get(i)}},{key:"setContext",value:function(i,a){return this.contextTree.set(i,a)}},{key:"_hasRun",value:function(i){var a=this.getPluginRunCount(this.getCurrentPlugin());return a>(i||0)}},{key:"dispatch",value:function(){var i=this,a=this,s=this.nextPlugin();if(!s){var p=this.nextPromisedPatch();if(p)return p.then(function(){return i.dispatch()}).catch(function(){return i.dispatch()});var y={spec:this.state,errors:this.errors};return this.showDebug&&(y.patches=this.allPatches),ma().resolve(y)}if(a.pluginCount=a.pluginCount||{},a.pluginCount[s]=(a.pluginCount[s]||0)+1,a.pluginCount[s]>Np){var E;return ma().resolve({spec:a.state,errors:Tt()(E=a.errors).call(E,new Error("We've reached a hard limit of ".concat(Np," plugin runs")))})}if(s!==this.currentPlugin&&this.promisedPatches.length){var b,C=ir()(b=this.promisedPatches).call(b,function(ie){return ie.value});return ma().all(ir()(C).call(C,function(ie){return ie.then(fp(),fp())})).then(function(){return i.dispatch()})}return M();function M(){a.currentPlugin=s;var ie=a.getCurrentMutations(),ne=a.mutations.length-1;try{if(s.isGenerator){var le=ga(s(ie,a.getLib())),ge;try{for(le.s();!(ge=le.n()).done;){var pe=ge.value;J(pe)}}catch(xe){le.e(xe)}finally{le.f()}}else{var Se=s(ie,a.getLib());J(Se)}}catch(xe){console.error(xe),J([mi()(Object.create(xe),{plugin:s})])}finally{a.updatePluginHistory(s,{mutationIndex:ne})}return a.dispatch()}function J(ie){ie&&(ie=sr.fullyNormalizeArray(ie),a.updatePatches(ie,s))}}}],[{key:"getPluginName",value:function(i){return i.pluginName}},{key:"getPatchesOfType",value:function(i,a){return Dn()(i).call(i,a)}}]),t}();function oy(t){return new iy(t).dispatch()}var wa={refs:$g,allOf:ey,parameters:ty,properties:ry},ay=o(13218),Dp=o.n(ay),Bp=function(r){return String.prototype.toLowerCase.call(r)},Up=function(r){return r.replace(/[^\w]/gi,"_")};function jp(t){var r=t.openapi;return r?$d()(r,"3"):!1}function Bm(t){var r=t.swagger;return r?startsWith(r,"2"):!1}function pf(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},s=a.v2OperationIdCompatibilityMode;if(!t||vr(t)!=="object")return null;var p=(t.operationId||"").replace(/\s/g,"");return p.length?Up(t.operationId):sy(r,i,{v2OperationIdCompatibilityMode:s})}function sy(t,r){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=a.v2OperationIdCompatibilityMode;if(s){var p,y,E=Tt()(p="".concat(r.toLowerCase(),"_")).call(p,t).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return E=E||Tt()(y="".concat(t.substring(1),"_")).call(y,r),E.replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return Tt()(i="".concat(Bp(r))).call(i,Up(t))}function Vp(t,r){var i;return Tt()(i="".concat(Bp(r),"-")).call(i,t)}function ly(t,r){return!t||!t.paths?null:uy(t,function(i){var a=i.pathName,s=i.method,p=i.operation;if(!p||vr(p)!=="object")return!1;var y=p.operationId,E=pf(p,a,s),b=Vp(a,s);return[E,b,y].some(function(C){return C&&C===r})})}function uy(t,r){return Hp(t,r,!0)||null}function Hp(t,r,i){if(!t||vr(t)!=="object"||!t.paths||vr(t.paths)!=="object")return null;var a=t.paths;for(var s in a)for(var p in a[s])if(p.toUpperCase()!=="PARAMETERS"){var y=a[s][p];if(!(!y||vr(y)!=="object")){var E={spec:t,pathName:s,method:p.toUpperCase(),operation:y},b=r(E);if(i&&b)return E}}}function Wp(t){var r=t.spec,i=r.paths,a={};if(!i||r.$$normalized)return t;for(var s in i){var p=i[s];if(!!Dp()(p)){var y=p.parameters,E=function(J){var ie=p[J];if(!Dp()(ie))return"continue";var ne=pf(ie,s,J);if(ne){a[ne]?a[ne].push(ie):a[ne]=[ie];var le=a[ne];if(le.length>1)le.forEach(function(Ke,ze){var _e;Ke.__originalOperationId=Ke.__originalOperationId||Ke.operationId,Ke.operationId=Tt()(_e="".concat(ne)).call(_e,ze+1)});else if(typeof ie.operationId!="undefined"){var ge=le[0];ge.__originalOperationId=ge.__originalOperationId||ie.operationId,ge.operationId=ne}}if(J!=="parameters"){var pe=[],Se={};for(var xe in r)(xe==="produces"||xe==="consumes"||xe==="security")&&(Se[xe]=r[xe],pe.push(Se));if(y&&(Se.parameters=y,pe.push(Se)),pe.length){var Fe=ga(pe),$e;try{for(Fe.s();!($e=Fe.n()).done;){var Be=$e.value;for(var Ge in Be)if(!ie[Ge])ie[Ge]=Be[Ge];else if(Ge==="parameters"){var De=ga(Be[Ge]),je;try{var Ve=function(){var ze=je.value,_e=ie[Ge].some(function(xt){return xt.name&&xt.name===ze.name||xt.$ref&&xt.$ref===ze.$ref||xt.$$ref&&xt.$$ref===ze.$$ref||xt===ze});_e||ie[Ge].push(ze)};for(De.s();!(je=De.n()).done;)Ve()}catch(Ke){De.e(Ke)}finally{De.f()}}}}catch(Ke){Fe.e(Ke)}finally{Fe.f()}}}};for(var b in p)var C=E(b)}}return r.$$normalized=!0,t}function zp(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=r.requestInterceptor,a=r.responseInterceptor,s=t.withCredentials?"include":"same-origin";return function(p){return t({url:p,loadSpec:!0,requestInterceptor:i,responseInterceptor:a,headers:{Accept:Op},credentials:s}).then(function(y){return y.body})}}function fy(){wa.refs.clearCache()}function Gp(t){var r=t.fetch,i=t.spec,a=t.url,s=t.mode,p=t.allowMetaPatches,y=p===void 0?!0:p,E=t.pathDiscriminator,b=t.modelPropertyMacro,C=t.parameterMacro,M=t.requestInterceptor,J=t.responseInterceptor,ie=t.skipNormalization,ne=t.useCircularStructures,le=t.http,ge=t.baseDoc;if(ge=ge||a,le=r||le||sf,!i)return zp(le,{requestInterceptor:M,responseInterceptor:J})(ge).then(pe);return pe(i);function pe(Se){ge&&(wa.refs.docCache[ge]=Se),wa.refs.fetchJSON=zp(le,{requestInterceptor:M,responseInterceptor:J});var xe=[wa.refs];return typeof C=="function"&&xe.push(wa.parameters),typeof b=="function"&&xe.push(wa.properties),s!=="strict"&&xe.push(wa.allOf),oy({spec:Se,context:{baseDoc:ge},plugins:xe,allowMetaPatches:y,pathDiscriminator:E,parameterMacro:C,modelPropertyMacro:b,useCircularStructures:ne}).then(ie?function(){var Fe=Pc(Li().mark(function $e(Be){return Li().wrap(function(De){for(;;)switch(De.prev=De.next){case 0:return De.abrupt("return",Be);case 1:case"end":return De.stop()}},$e)}));return function($e){return Fe.apply(this,arguments)}}():Wp)}}var cy=o(27361),El=o.n(cy);function dy(t,r){return td.apply(this,arguments)}function td(){return td=Pc(Li().mark(function t(r,i){var a,s,p,y,E,b,C,M,J,ie,ne,le,ge=arguments;return Li().wrap(function(Se){for(;;)switch(Se.prev=Se.next){case 0:return a=ge.length>2&&ge[2]!==void 0?ge[2]:{},s=a.returnEntireTree,p=a.baseDoc,y=a.requestInterceptor,E=a.responseInterceptor,b=a.parameterMacro,C=a.modelPropertyMacro,M=a.useCircularStructures,J={pathDiscriminator:i,baseDoc:p,requestInterceptor:y,responseInterceptor:E,parameterMacro:b,modelPropertyMacro:C,useCircularStructures:M},ie=Wp({spec:r}),ne=ie.spec,Se.next=6,Gp(Cr(Cr({},J),{},{spec:ne,allowMetaPatches:!0,skipNormalization:!0}));case 6:return le=Se.sent,!s&&Array.isArray(i)&&i.length&&(le.spec=El()(le.spec,i)||null),Se.abrupt("return",le);case 9:case"end":return Se.stop()}},t)})),td.apply(this,arguments)}var py=function(){return null},hy=function(r){return Array.isArray(r)?r:[r]},hf={mapTagOperations:yy,makeExecute:vy};function vy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return function(r){var i=r.pathName,a=r.method,s=r.operationId;return function(p){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return t.execute(Cr(Cr({spec:t.spec},kc()(t,"requestInterceptor","responseInterceptor","userFetch")),{},{pathName:i,method:a,parameters:p,operationId:s},y))}}}function Um(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=hf.makeExecute(t),i=hf.mapTagOperations({v2OperationIdCompatibilityMode:t.v2OperationIdCompatibilityMode,spec:t.spec,cb:r}),a={};for(var s in i){a[s]={operations:{}};for(var p in i[s])a[s].operations[p]={execute:i[s][p]}}return{apis:a}}function gy(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=hf.makeExecute(t);return{apis:hf.mapTagOperations({v2OperationIdCompatibilityMode:t.v2OperationIdCompatibilityMode,spec:t.spec,cb:r})}}function yy(t){var r=t.spec,i=t.cb,a=i===void 0?py:i,s=t.defaultTag,p=s===void 0?"default":s,y=t.v2OperationIdCompatibilityMode,E={},b={};return Hp(r,function(C){var M=C.pathName,J=C.method,ie=C.operation,ne=ie.tags?hy(ie.tags):[p];ne.forEach(function(le){if(typeof le=="string"){b[le]=b[le]||{};var ge=b[le],pe=pf(ie,M,J,{v2OperationIdCompatibilityMode:y}),Se=a({spec:r,pathName:M,method:J,operation:ie,operationId:pe});if(E[pe]){var xe;E[pe]+=1,ge[Tt()(xe="".concat(pe)).call(xe,E[pe])]=Se}else if(typeof ge[pe]!="undefined"){var Fe,$e,Be=E[pe]||1;E[pe]=Be+1,ge[Tt()(Fe="".concat(pe)).call(Fe,E[pe])]=Se;var Ge=ge[pe];delete ge[pe],ge[Tt()($e="".concat(pe)).call($e,Be)]=Ge}else ge[pe]=Se}})}),b}var $p=o(95683);function my(t,r){if(t==null)return{};var i={},a=Vd(t),s,p;for(p=0;p<a.length;p++)s=a[p],!($p(r).call(r,s)>=0)&&(i[s]=t[s]);return i}function xy(t,r){if(t==null)return{};var i=my(t,r),a,s;if(tf){var p=tf(t);for(s=0;s<p.length;s++)a=p[s],!($p(r).call(r,a)>=0)&&(!Object.prototype.propertyIsEnumerable.call(t,a)||(i[a]=t[a]))}return i}var by=o(68630),Kp=o.n(by),wy=o(1469),Sy=o.n(wy),Ay=o(76489);const Ey={body:Cy,header:Ty,query:Iy,path:Py,formData:Oy};function Cy(t){var r=t.req,i=t.value;r.body=i}function Oy(t){var r=t.req,i=t.value,a=t.parameter;(i||a.allowEmptyValue)&&(r.form=r.form||{},r.form[a.name]={value:i,allowEmptyValue:a.allowEmptyValue,collectionFormat:a.collectionFormat})}function Ty(t){var r=t.req,i=t.parameter,a=t.value;r.headers=r.headers||{},typeof a!="undefined"&&(r.headers[i.name]=a)}function Py(t){var r=t.req,i=t.value,a=t.parameter;r.url=r.url.split("{".concat(a.name,"}")).join(encodeURIComponent(i))}function Iy(t){var r=t.req,i=t.value,a=t.parameter;if(r.query=r.query||{},i===!1&&a.type==="boolean"&&(i="false"),i===0&&["number","integer"].indexOf(a.type)>-1&&(i="0"),i)r.query[a.name]={collectionFormat:a.collectionFormat,value:i};else if(a.allowEmptyValue&&i!==void 0){var s=a.name;r.query[s]=r.query[s]||{},r.query[s].allowEmptyValue=!0}}function vf(t,r){return Ic()(r).call(r,"application/json")?typeof t=="string"?t:nf()(t):t.toString()}function Fy(t){var r=t.req,i=t.value,a=t.parameter,s=a.name,p=a.style,y=a.explode,E=a.content;if(E){var b=or()(E)[0];r.url=r.url.split("{".concat(s,"}")).join(ps(vf(i,b),{escape:!0}));return}var C=Nc({key:a.name,value:i,style:p||"simple",explode:y||!1,escape:!0});r.url=r.url.split("{".concat(s,"}")).join(C)}function ky(t){var r=t.req,i=t.value,a=t.parameter;if(r.query=r.query||{},a.content){var s=or()(a.content)[0];r.query[a.name]=vf(i,s);return}if(i===!1&&(i="false"),i===0&&(i="0"),i)r.query[a.name]={value:i,serializationOption:kc()(a,["style","explode","allowReserved"])};else if(a.allowEmptyValue&&i!==void 0){var p=a.name;r.query[p]=r.query[p]||{},r.query[p].allowEmptyValue=!0}}var Ry=["accept","authorization","content-type"];function My(t){var r=t.req,i=t.parameter,a=t.value;if(r.headers=r.headers||{},!(Ry.indexOf(i.name.toLowerCase())>-1)){if(i.content){var s=or()(i.content)[0];r.headers[i.name]=vf(a,s);return}typeof a!="undefined"&&(r.headers[i.name]=Nc({key:i.name,value:a,style:i.style||"simple",explode:typeof i.explode=="undefined"?!1:i.explode,escape:!1}))}}function Ly(t){var r=t.req,i=t.parameter,a=t.value;r.headers=r.headers||{};var s=vr(a);if(i.content){var p,y=or()(i.content)[0];r.headers.Cookie=Tt()(p="".concat(i.name,"=")).call(p,vf(a,y));return}if(s!=="undefined"){var E=s==="object"&&!Array.isArray(a)&&i.explode?"":"".concat(i.name,"=");r.headers.Cookie=E+Nc({key:i.name,value:a,escape:!1,style:i.style||"form",explode:typeof i.explode=="undefined"?!1:i.explode})}}var Ny=o(50706),Yp=o.n(Ny);function Dy(t,r){var i=t.operation,a=t.requestBody,s=t.securities,p=t.spec,y=t.attachContentTypeForEmptyPayload,E=t.requestContentType;r=By({request:r,securities:s,operation:i,spec:p});var b=i.requestBody||{},C=or()(b.content||{}),M=E&&C.indexOf(E)>-1;if(a||y){if(E&&M)r.headers["Content-Type"]=E;else if(!E){var J=C[0];J&&(r.headers["Content-Type"]=J,E=J)}}else E&&M&&(r.headers["Content-Type"]=E);if(!t.responseContentType&&i.responses){var ie,ne=Dn()(ie=Qd()(i.responses)).call(ie,function(ge){var pe=yi(ge,2),Se=pe[0],xe=pe[1],Fe=parseInt(Se,10);return Fe>=200&&Fe<300&&Kp()(xe.content)}).reduce(function(ge,pe){var Se=yi(pe,2),xe=Se[1];return Tt()(ge).call(ge,or()(xe.content))},[]);ne.length>0&&(r.headers.accept=ne.join(", "))}if(a)if(E){if(C.indexOf(E)>-1)if(E==="application/x-www-form-urlencoded"||E==="multipart/form-data")if(vr(a)==="object"){var le=(b.content[E]||{}).encoding||{};r.form={},or()(a).forEach(function(ge){r.form[ge]={value:a[ge],encoding:le[ge]||{}}})}else r.form=a;else r.body=a}else r.body=a;return r}function By(t){var r=t.request,i=t.securities,a=i===void 0?{}:i,s=t.operation,p=s===void 0?{}:s,y=t.spec,E=rf()({},r),b=a.authorized,C=b===void 0?{}:b,M=p.security||y.security||[],J=C&&!!or()(C).length,ie=El()(y,["components","securitySchemes"])||{};return E.headers=E.headers||{},E.query=E.query||{},!or()(a).length||!J||!M||Array.isArray(p.security)&&!p.security.length?r:(M.forEach(function(ne){or()(ne).forEach(function(le){var ge=C[le],pe=ie[le];if(!!ge){var Se=ge.value||ge,xe=pe.type;if(ge){if(xe==="apiKey")pe.in==="query"&&(E.query[pe.name]=Se),pe.in==="header"&&(E.headers[pe.name]=Se),pe.in==="cookie"&&(E.cookies[pe.name]=Se);else if(xe==="http"){if(/^basic$/i.test(pe.scheme)){var Fe,$e=Se.username||"",Be=Se.password||"",Ge=Yp()(Tt()(Fe="".concat($e,":")).call(Fe,Be));E.headers.Authorization="Basic ".concat(Ge)}/^bearer$/i.test(pe.scheme)&&(E.headers.Authorization="Bearer ".concat(Se))}else if(xe==="oauth2"||xe==="openIdConnect"){var De,je=ge.token||{},Ve=pe["x-tokenName"]||"access_token",Ke=je[Ve],ze=je.token_type;(!ze||ze.toLowerCase()==="bearer")&&(ze="Bearer"),E.headers.Authorization=Tt()(De="".concat(ze," ")).call(De,Ke)}}}})}),E)}function Uy(t,r){var i=t.spec,a=t.operation,s=t.securities,p=t.requestContentType,y=t.responseContentType,E=t.attachContentTypeForEmptyPayload;if(r=jy({request:r,securities:s,operation:a,spec:i}),r.body||r.form||E){var b,C;if(p)r.headers["Content-Type"]=p;else if(Array.isArray(a.consumes)){var M=yi(a.consumes,1);r.headers["Content-Type"]=M[0]}else if(Array.isArray(i.consumes)){var J=yi(i.consumes,1);r.headers["Content-Type"]=J[0]}else a.parameters&&Dn()(b=a.parameters).call(b,function(pe){return pe.type==="file"}).length?r.headers["Content-Type"]="multipart/form-data":a.parameters&&Dn()(C=a.parameters).call(C,function(pe){return pe.in==="formData"}).length&&(r.headers["Content-Type"]="application/x-www-form-urlencoded")}else if(p){var ie,ne,le=a.parameters&&Dn()(ie=a.parameters).call(ie,function(pe){return pe.in==="body"}).length>0,ge=a.parameters&&Dn()(ne=a.parameters).call(ne,function(pe){return pe.in==="formData"}).length>0;(le||ge)&&(r.headers["Content-Type"]=p)}return!y&&Array.isArray(a.produces)&&a.produces.length>0&&(r.headers.accept=a.produces.join(", ")),r}function jy(t){var r=t.request,i=t.securities,a=i===void 0?{}:i,s=t.operation,p=s===void 0?{}:s,y=t.spec,E=rf()({},r),b=a.authorized,C=b===void 0?{}:b,M=a.specSecurity,J=M===void 0?[]:M,ie=p.security||J,ne=C&&!!or()(C).length,le=y.securityDefinitions;return E.headers=E.headers||{},E.query=E.query||{},!or()(a).length||!ne||!ie||Array.isArray(p.security)&&!p.security.length?r:(ie.forEach(function(ge){or()(ge).forEach(function(pe){var Se=C[pe];if(!!Se){var xe=Se.token,Fe=Se.value||Se,$e=le[pe],Be=$e.type,Ge=$e["x-tokenName"]||"access_token",De=xe&&xe[Ge],je=xe&&xe.token_type;if(Se){if(Be==="apiKey"){var Ve=$e.in==="query"?"query":"headers";E[Ve]=E[Ve]||{},E[Ve][$e.name]=Fe}else if(Be==="basic")if(Fe.header)E.headers.authorization=Fe.header;else{var Ke,ze=Fe.username||"",_e=Fe.password||"";Fe.base64=Yp()(Tt()(Ke="".concat(ze,":")).call(Ke,_e)),E.headers.authorization="Basic ".concat(Fe.base64)}else if(Be==="oauth2"&&De){var xt;je=!je||je.toLowerCase()==="bearer"?"Bearer":je,E.headers.authorization=Tt()(xt="".concat(je," ")).call(xt,De)}}}})}),E)}var Jp=function(r){return Array.isArray(r)?r:[]},Vy=Ep("OperationNotFoundError",function(r,i,a){this.originalError=a,mi()(this,i||{})}),Hy=function(r,i){return Dn()(i).call(i,function(a){return a.name===r})},Wy=function(r){var i={};r.forEach(function(s){i[s.in]||(i[s.in]={}),i[s.in][s.name]=s});var a=[];return or()(i).forEach(function(s){or()(i[s]).forEach(function(p){a.push(i[s][p])})}),a},zy={buildRequest:Xp};function Gy(t){var r=t.http,i=t.fetch,a=t.spec,s=t.operationId,p=t.pathName,y=t.method,E=t.parameters,b=t.securities,C=xy(t,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),M=r||i||sf;p&&y&&!s&&(s=Vp(p,y));var J=zy.buildRequest(Cr({spec:a,operationId:s,parameters:E,securities:b,http:M},C));return J.body&&(Kp()(J.body)||Sy()(J.body))&&(J.body=nf()(J.body)),M(J)}function Xp(t){var r,i,a=t.spec,s=t.operationId,p=t.responseContentType,y=t.scheme,E=t.requestInterceptor,b=t.responseInterceptor,C=t.contextUrl,M=t.userFetch,J=t.server,ie=t.serverVariables,ne=t.http,le=t.parameters,ge=t.parameterBuilders,pe=jp(a);ge||(pe?ge=m:ge=Ey);var Se=ne&&ne.withCredentials?"include":"same-origin",xe={url:"",credentials:Se,headers:{},cookies:{}};E&&(xe.requestInterceptor=E),b&&(xe.responseInterceptor=b),M&&(xe.userFetch=M);var Fe=ly(a,s);if(!Fe)throw new Vy("Operation ".concat(s," not found"));var $e=Fe.operation,Be=$e===void 0?{}:$e,Ge=Fe.method,De=Fe.pathName;if(xe.url+=Qp({spec:a,scheme:y,contextUrl:C,server:J,serverVariables:ie,pathName:De,method:Ge}),!s)return delete xe.cookies,xe;xe.url+=De,xe.method="".concat(Ge).toUpperCase(),le=le||{};var je=a.paths[De]||{};p&&(xe.headers.accept=p);var Ve=Wy(Tt()(r=Tt()(i=[]).call(i,Jp(Be.parameters))).call(r,Jp(je.parameters)));Ve.forEach(function(_e){var xt=ge[_e.in],Nt;if(_e.in==="body"&&_e.schema&&_e.schema.properties&&(Nt=le),Nt=_e&&_e.name&&le[_e.name],typeof Nt=="undefined"){var Wt;Nt=_e&&_e.name&&le[Tt()(Wt="".concat(_e.in,".")).call(Wt,_e.name)]}else if(Hy(_e.name,Ve).length>1){var lr;console.warn(Tt()(lr="Parameter '".concat(_e.name,"' is ambiguous because the defined spec has more than one parameter with the name: '")).call(lr,_e.name,"' and the passed-in parameter values did not define an 'in' value."))}if(Nt!==null){if(typeof _e.default!="undefined"&&typeof Nt=="undefined"&&(Nt=_e.default),typeof Nt=="undefined"&&_e.required&&!_e.allowEmptyValue)throw new Error("Required parameter ".concat(_e.name," is not provided"));if(pe&&_e.schema&&_e.schema.type==="object"&&typeof Nt=="string")try{Nt=JSON.parse(Nt)}catch(Rr){throw new Error("Could not parse object parameter value string as JSON")}xt&&xt({req:xe,parameter:_e,value:Nt,operation:Be,spec:a})}});var Ke=Cr(Cr({},t),{},{operation:Be});if(pe?xe=Dy(Ke,xe):xe=Uy(Ke,xe),xe.cookies&&or()(xe.cookies).length){var ze=or()(xe.cookies).reduce(function(_e,xt){var Nt=xe.cookies[xt],Wt=_e?"&":"",lr=Ay.serialize(xt,Nt);return _e+Wt+lr},"");xe.headers.Cookie=ze}return xe.cookies&&delete xe.cookies,up(xe),xe}var rd=function(r){return r?r.replace(/\W/g,""):null};function Qp(t){var r=jp(t.spec);return r?$y(t):Jy(t)}function $y(t){var r=t.spec,i=t.pathName,a=t.method,s=t.server,p=t.contextUrl,y=t.serverVariables,E=y===void 0?{}:y,b=El()(r,["paths",i,(a||"").toLowerCase(),"servers"])||El()(r,["paths",i,"servers"])||El()(r,["servers"]),C="",M=null;if(s&&b&&b.length){var J=ir()(b).call(b,function(le){return le.url});J.indexOf(s)>-1&&(C=s,M=b[J.indexOf(s)])}if(!C&&b&&b.length){C=b[0].url;var ie=yi(b,1);M=ie[0]}if(C.indexOf("{")>-1){var ne=Yy(C);ne.forEach(function(le){if(M.variables&&M.variables[le]){var ge=M.variables[le],pe=E[le]||ge.default,Se=new RegExp("{".concat(le,"}"),"g");C=C.replace(Se,pe)}})}return Ky(C,p)}function Ky(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",i=t&&r?Uo.parse(Uo.resolve(r,t)):Uo.parse(t),a=Uo.parse(r),s=rd(i.protocol)||rd(a.protocol)||"",p=i.host||a.host,y=i.pathname||"",E;if(s&&p){var b;E=Tt()(b="".concat(s,"://")).call(b,p+y)}else E=y;return E[E.length-1]==="/"?Ni()(E).call(E,0,-1):E}function Yy(t){for(var r=[],i=/{([^}]+)}/g,a;a=i.exec(t);)r.push(a[1]);return r}function Jy(t){var r=t.spec,i=t.scheme,a=t.contextUrl,s=a===void 0?"":a,p=Uo.parse(s),y=Array.isArray(r.schemes)?r.schemes[0]:null,E=i||y||rd(p.protocol)||"http",b=r.host||p.host||"",C=r.basePath||"",M;if(E&&b){var J;M=Tt()(J="".concat(E,"://")).call(J,b+C)}else M=C;return M[M.length-1]==="/"?Ni()(M).call(M,0,-1):M}Br.http=sf,Br.makeHttp=Wv.bind(null,Br.http),Br.resolve=Gp,Br.resolveSubtree=dy,Br.execute=Gy,Br.serializeRes=np,Br.serializeHeaders=ip,Br.clearCache=fy,Br.makeApisTagOperation=gy,Br.buildRequest=Xp,Br.helpers={opId:pf},Br.getBaseUrl=Qp;function Br(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(typeof t=="string"?i.url=t:i=t,!(this instanceof Br))return new Br(i);rf()(this,i);var a=this.resolve().then(function(){return r.disableInterfaces||rf()(r,Br.makeApisTagOperation(r)),r});return a.client=this,a}Br.prototype={http:sf,execute:function(r){return this.applyDefaults(),Br.execute(Cr({spec:this.spec,http:this.http,securities:{authorized:this.authorizations},contextUrl:typeof this.url=="string"?this.url:void 0,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},r))},resolve:function(){var r=this,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Br.resolve(Cr({spec:this.spec,url:this.url,http:this.http||this.fetch,allowMetaPatches:this.allowMetaPatches,useCircularStructures:this.useCircularStructures,requestInterceptor:this.requestInterceptor||null,responseInterceptor:this.responseInterceptor||null},i)).then(function(a){return r.originalSpec=r.spec,r.spec=a.spec,r.errors=a.errors,r})}},Br.prototype.applyDefaults=function(){var r=this.spec,i=this.url;if(i&&$d()(i,"http")){var a=Uo.parse(i);r.host||(r.host=a.host),r.schemes||(r.schemes=[a.protocol.replace(":","")]),r.basePath||(r.basePath="/")}};var jm=Br.helpers;const Xy=Br;var Qy=o(71057),Zy=o(14148),Zp=Object.defineProperty,qy=Object.defineProperties,_y=Object.getOwnPropertyDescriptor,em=Object.getOwnPropertyDescriptors,qp=Object.getOwnPropertySymbols,tm=Object.prototype.hasOwnProperty,rm=Object.prototype.propertyIsEnumerable,nd=(t,r,i)=>r in t?Zp(t,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[r]=i,On=(t,r)=>{for(var i in r||(r={}))tm.call(r,i)&&nd(t,i,r[i]);if(qp)for(var i of qp(r))rm.call(r,i)&&nd(t,i,r[i]);return t},Vo=(t,r)=>qy(t,em(r)),nm=(t,r,i,a)=>{for(var s=a>1?void 0:a?_y(r,i):r,p=t.length-1,y;p>=0;p--)(y=t[p])&&(s=(a?y(r,i,s):y(s))||s);return a&&s&&Zp(r,i,s),s},gs=(t,r,i)=>(nd(t,typeof r!="symbol"?r+"":r,i),i),_p=(t,r,i)=>new Promise((a,s)=>{var p=b=>{try{E(i.next(b))}catch(C){s(C)}},y=b=>{try{E(i.throw(b))}catch(C){s(C)}},E=b=>b.done?a(b.value):Promise.resolve(b.value).then(p,y);E((i=i.apply(t,r)).next())});function eh(t){return t.startsWith("//")?"https:"+t:t}const im={flex:1,display:"flex",flexDirection:"column"};let id=class extends d.Component{constructor(t){super(t);gs(this,"formApi",null),gs(this,"setFormApi",r=>{this.formApi=r,setTimeout(()=>{this.setState({form:this.formApi.getState()})},0)}),gs(this,"handleChange",r=>{this.setState({form:r}),(0,nn.Hc)(r)}),gs(this,"handleTabChange",r=>{this.setState({activeTab:r})}),gs(this,"handleServerChange",r=>{this.setState({server:r}),this.props.operation.setActiveServer(r)}),gs(this,"handleExecute",()=>_p(this,null,function*(){var r,i,a,s,p,y,E;const{store:b,operation:C,onResponse:M}=this.props;this.formApi.submitForm();const{values:J,invalid:ie}=this.formApi.getState();if(ie){this.setState({shaking:!0}),setTimeout(()=>this.setState({shaking:!1}),1e3),(i=(r=b==null?void 0:b.options.events)==null?void 0:r.tryItSent)==null||i.call(r,{eventType:jd.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"ValidationFailed",operationId:C.operationId,operationPath:C.path,operationHttpVerb:C.httpVerb,operationSummary:C.description});return}const ne=this.props.operation.requestBody,le=ne&&ne.content&&ne.content.active&&ne.content.active.name||"";let ge=J.body;if(/json/.test(le))try{ge=JSON.parse(ge)}catch(ze){console.error(ze)}this.setState({loading:!0});const pe=this.state.resolvedRawSpec,Se=(0,zt.U2)(pe,["paths",C.path,(C.httpVerb||"").toLowerCase(),"servers"])||(0,zt.U2)(pe,["paths",C.path,"servers"])||(0,zt.U2)(pe,["servers"]);if(!Se)throw console.error("Servers are not specified in your OpenAPI file. You can't use Try It Out console without specifying servers. If you use OpenAPI 2, make sure you configured host and basepath"),new Error("Servers are not specified");const xe=Se.find(ze=>this.state.server.url.endsWith(ze.url.endsWith("/")?ze.url.substring(0,ze.url.length-1):ze.url)),Fe=Date.now(),$e=!!window.document.documentMode;let Be,Ge=J.auth;if(J.auth){const ze=Object.keys(J.auth)[0],_e=(0,zt.dw)(ze);Be=Vo(On({},pe),{components:Vo(On({},pe.components),{securitySchemes:Vo(On({},pe.components.securitySchemes),{[_e]:Vo(On({},pe.components.securitySchemes[_e]),{type:pe.components.securitySchemes[_e].type==="openIdConnect"?"oauth2":pe.components.securitySchemes[_e].type})})})}),Ge=Vo(On({},Ge),{[_e]:Ge[ze]})}else Be=On({},pe);const De=b.options.corsProxyUrl;De&&pe.servers&&pe.servers.length&&(Be.servers=pe.servers.map(ze=>Vo(On({},ze),{url:De+eh(ze.url)})));const je=((s=(a=ne==null?void 0:ne.content)==null?void 0:a.active)==null?void 0:s.name)||null;if(je&&ge&&os(je)){const ze=Object.values(ge);ge=ze.length>1?ze:ze[0]}const Ve=(ze,_e)=>xt=>(this.props.store.options.sendXUserAgentInTryIt&&(xt.headers["X-User-Agent"]="Redocly Try it API console"),ze?ze(xt,_e):xt),Ke={userFetch:$e&&o(54098).fetch,server:De?De+eh(xe.url):xe.url,serverVariables:this.state.server.variables,spec:Be,pathName:C.path,method:C.httpVerb,parameters:On(On(On(On({},J.path),J.query),J.header),J.cookie),securities:{authorized:Ge},requestBody:ge,requestContentType:je,responseContentType:((p=J.header)==null?void 0:p.Accept)||null,requestInterceptor:Ve(b.options.requestInterceptor,C)};try{const ze=yield Xy.execute(Ke);ze&&ze.data instanceof Blob&&(ze.data=yield ze.data.text()),M==null||M({request:Ke,response:ze}),this.setState({response:ze,error:void 0})}catch(ze){ze&&ze.response&&ze.response.data instanceof Blob&&(ze.response.data=yield ze.response.data.text(),M==null||M({request:Ke,response:ze.response})),this.setState({response:void 0,error:ze})}finally{this.setState({loading:!1,activeTab:1,time:Date.now()-Fe}),(E=(y=b==null?void 0:b.options.events)==null?void 0:y.tryItSent)==null||E.call(y,{eventType:jd.nQ.TryItSent,resource:"Redocly_OperationTryIt",action:"Sent",operationId:C.operationId,operationPath:C.path,operationHttpVerb:C.httpVerb,operationSummary:C.description})}})),this.state={form:{values:{path:(0,nn.ZS)(t.operation.parameters,"path"),cookie:(0,nn.ZS)(t.operation.parameters,"cookie"),header:(0,nn.ZS)(t.operation.parameters,"header"),query:(0,nn.ZS)(t.operation.parameters,"query")}},shaking:!1,loading:!1,activeTab:0,server:{}}}componentDidMount(){return _p(this,null,function*(){const{store:t,specIdx:r,operation:i}=this.props,a=yield t.dereferenceSpecForTryIt(r||0,i);this.setState({resolvedRawSpec:a}),this.formApi.setValues({})})}componentDidUpdate(t){t.operation!==this.props.operation&&this.setState({response:void 0,error:void 0,activeTab:0})}render(){const{operation:t,className:r,rootElement:i}=this.props,{shaking:a,activeTab:s,form:p,response:y,loading:E,error:b}=this.state,C=!!(y||b);return d.createElement(am,{shaking:a,className:r,rootElement:i},d.createElement(Qn.k1,null,d.createElement(n,{active:s,hasResponse:C,onChange:this.handleTabChange}),this.props.onClose&&d.createElement(Vi.PZ,{onClick:this.props.onClose}," \u2715 ")),d.createElement(Vi.RE,{hidden:s!==0},this.renderRequest()),d.createElement(Vi.RE,{hidden:s!==1},this.renderResponse()),d.createElement(ks,{hasResponse:C,params:p.values&&On({},p.values),operation:t,loading:E,execute:this.handleExecute}))}renderRequest(){var t;const{operation:r,store:i,properties:a,securityDefaults:s}=this.props,{form:p,resolvedRawSpec:y,server:E}=this.state,b=p.errors||{},C=b.path||b.cookie||b.header||b.query,M=y&&Vt.JsonPointer.get(y,r.pointer);let J=p.values&&p.values.auth&&Object.keys(p.values.auth)[0];(!J||!p.values.auth[J])&&(J=void 0),J&&(p.values.auth[J].token!==void 0||p.values.auth[J].client_id!==void 0||p.values.auth[J].client_secret!==void 0)&&(!p.values.auth[J].token||!p.values.auth[J].token.access_token)&&(J=void 0),J&&p.values.auth[J].username!=null&&(!p.values.auth[J].username||!p.values.auth[J].password)&&(J=void 0);const ie=r.parameters||[],ne=(t=i==null?void 0:i.options.hooks)==null?void 0:t.ReplaceTryItSecurityPanel;return!y&&"Loading..."||d.createElement(d.Fragment,null,d.createElement(Ll,{onChange:this.handleChange,getApi:this.setFormApi,style:Vo(On({},im),{margin:0})},d.createElement(Qn.UQ,{initialActiveIdx:r.security.length&&J?1:0},r.security.length&&d.createElement(od,{header:(0,ml.l)("tryItAuth"),"data-cy":"security-trigger",renderChildrenHidden:!0,error:!J&&!!b.auth,success:!!J},ne?d.createElement(sm,{field:"auth",validate:cs},le=>d.createElement(Qy.Q,{Hook:ne,props:{server:E,operation:r,onChange:le,OAuth2:cr}})):d.createElement(Hh,{formApi:this.formApi,form:p,operation:r,activeServer:E.url,authCorsProxyUrl:i.options.authCorsProxyUrl,securityDefaults:s}))||null,r.requestBody&&d.createElement(od,{header:(0,ml.l)("tryItBody"),"data-cy":"body-trigger",renderChildrenHidden:!0,error:!!b.body},d.createElement(yc,{validate:om,console:this,body:r.requestBody,id:r.id,resolvedBody:M.requestBody,properties:a}))||null,ie.length&&d.createElement(od,{header:(0,ml.l)("tryItParameters"),"data-cy":"parameters-trigger",error:C,renderChildrenHidden:!0},d.createElement(Ma,{operation:r,values:p.values,errors:p.errors||{}}))||null)),d.createElement(Ra,{operation:r,onChange:this.handleServerChange}))}renderResponse(){const{response:t,error:r,time:i}=this.state;return d.createElement(Uf,{response:t,error:r,time:i})}};id=nm([Ia.Pi],id);function om(){}function am(t){const{shaking:r,className:i,children:a,rootElement:s}=t,[p]=(0,zt.Bs)(s);return d.createElement(Vi.q2,{shaking:r,className:i,"data-cy":"console",fullWidth:p==null?void 0:p.width},a)}function sm(t){const{fieldApi:r,render:i,userProps:a}=Kn(On({},t)),{setValue:s}=r,{children:p}=a;return i(d.createElement(d.Fragment,null,p(s)))}function od(t){const r=({toggle:i,expanded:a})=>d.createElement(Qn.h4,{onClick:i,isExpanded:a,"data-cy":t["data-cy"]},d.createElement(Qn.xz,null,d.createElement(Qn.Dx,null,t.header),d.createElement(Vt.ShelfIcon,{direction:a?"down":"right"})),t.error&&d.createElement(Vt.CrossIcon,{size:"14px",color:"#ff908b"})||null,t.success&&d.createElement(Vt.LockIcon,{size:"14px",color:"#56ff26"})||null);return d.createElement(lm,Vo(On({},t),{header:r}))}const lm=(0,Ir.ZP)(Qn.s_)`
458
+ ${Qn.h4} {
459
+ color: white;
460
+ border: 1px solid ${({error:t})=>t?"#ff908b":"#89949f"};
461
+ padding: 10px;
462
+ }
463
+
464
+ ${Vt.ShelfIcon} path {
465
+ fill: white;
466
+ }
467
+
468
+ ${Zy.N} {
469
+ padding: 15px 10px;
470
+ background-color: #3e4c59;
471
+ border: 1px solid ${({error:t})=>t?"#ff908b":"#89949f"};
472
+ border-top: 0;
473
+ }
474
+ `},68929:()=>{},17648:h=>{"use strict";var F="Function.prototype.bind called on incompatible ",o=Array.prototype.slice,c=Object.prototype.toString,v="[object Function]";h.exports=function(d){var x=this;if(typeof x!="function"||c.call(x)!==v)throw new TypeError(F+x);for(var A=o.call(arguments,1),w,T=function(){if(this instanceof w){var K=x.apply(this,A.concat(o.call(arguments)));return Object(K)===K?K:this}else return x.apply(d,A.concat(o.call(arguments)))},D=Math.max(0,x.length-A.length),B=[],U=0;U<D;U++)B.push("$"+U);if(w=Function("binder","return function ("+B.join(",")+"){ return binder.apply(this,arguments); }")(T),x.prototype){var ee=function(){};ee.prototype=x.prototype,w.prototype=new ee,ee.prototype=null}return w}},58612:(h,F,o)=>{"use strict";var c=o(17648);h.exports=Function.prototype.bind||c},40210:(h,F,o)=>{"use strict";var c,v=SyntaxError,m=Function,d=TypeError,x=function(be){try{return m('"use strict"; return ('+be+").constructor;")()}catch(me){}},A=Object.getOwnPropertyDescriptor;if(A)try{A({},"")}catch(be){A=null}var w=function(){throw new d},T=A?function(){try{return arguments.callee,w}catch(be){try{return A(arguments,"callee").get}catch(me){return w}}}():w,D=o(41405)(),B=Object.getPrototypeOf||function(be){return be.__proto__},U={},ee=typeof Uint8Array=="undefined"?c:B(Uint8Array),K={"%AggregateError%":typeof AggregateError=="undefined"?c:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?c:ArrayBuffer,"%ArrayIteratorPrototype%":D?B([][Symbol.iterator]()):c,"%AsyncFromSyncIteratorPrototype%":c,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":typeof Atomics=="undefined"?c:Atomics,"%BigInt%":typeof BigInt=="undefined"?c:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?c:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?c:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?c:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?c:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":U,"%Int8Array%":typeof Int8Array=="undefined"?c:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?c:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?c:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D?B(B([][Symbol.iterator]())):c,"%JSON%":typeof JSON=="object"?JSON:c,"%Map%":typeof Map=="undefined"?c:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!D?c:B(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?c:Promise,"%Proxy%":typeof Proxy=="undefined"?c:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?c:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?c:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!D?c:B(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?c:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D?B(""[Symbol.iterator]()):c,"%Symbol%":D?Symbol:c,"%SyntaxError%":v,"%ThrowTypeError%":T,"%TypedArray%":ee,"%TypeError%":d,"%Uint8Array%":typeof Uint8Array=="undefined"?c:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?c:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?c:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?c:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?c:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?c:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?c:WeakSet},R=function be(me){var he;if(me==="%AsyncFunction%")he=x("async function () {}");else if(me==="%GeneratorFunction%")he=x("function* () {}");else if(me==="%AsyncGeneratorFunction%")he=x("async function* () {}");else if(me==="%AsyncGenerator%"){var fe=be("%AsyncGeneratorFunction%");fe&&(he=fe.prototype)}else if(me==="%AsyncIteratorPrototype%"){var oe=be("%AsyncGenerator%");oe&&(he=B(oe.prototype))}return K[me]=he,he},Q={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},L=o(58612),P=o(17642),V=L.call(Function.call,Array.prototype.concat),X=L.call(Function.apply,Array.prototype.splice),z=L.call(Function.call,String.prototype.replace),G=L.call(Function.call,String.prototype.slice),Z=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ce=/\\(\\)?/g,te=function(me){var he=G(me,0,1),fe=G(me,-1);if(he==="%"&&fe!=="%")throw new v("invalid intrinsic syntax, expected closing `%`");if(fe==="%"&&he!=="%")throw new v("invalid intrinsic syntax, expected opening `%`");var oe=[];return z(me,Z,function(Re,Ue,Le,ke){oe[oe.length]=Le?z(ke,ce,"$1"):Ue||Re}),oe},se=function(me,he){var fe=me,oe;if(P(Q,fe)&&(oe=Q[fe],fe="%"+oe[0]+"%"),P(K,fe)){var Re=K[fe];if(Re===U&&(Re=R(fe)),typeof Re=="undefined"&&!he)throw new d("intrinsic "+me+" exists, but is not available. Please file an issue!");return{alias:oe,name:fe,value:Re}}throw new v("intrinsic "+me+" does not exist!")};h.exports=function(me,he){if(typeof me!="string"||me.length===0)throw new d("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof he!="boolean")throw new d('"allowMissing" argument must be a boolean');var fe=te(me),oe=fe.length>0?fe[0]:"",Re=se("%"+oe+"%",he),Ue=Re.name,Le=Re.value,ke=!1,tt=Re.alias;tt&&(oe=tt[0],X(fe,V([0,1],tt)));for(var Je=1,qe=!0;Je<fe.length;Je+=1){var at=fe[Je],ut=G(at,0,1),gt=G(at,-1);if((ut==='"'||ut==="'"||ut==="`"||gt==='"'||gt==="'"||gt==="`")&&ut!==gt)throw new v("property names with quotes must have matching quotes");if((at==="constructor"||!qe)&&(ke=!0),oe+="."+at,Ue="%"+oe+"%",P(K,Ue))Le=K[Ue];else if(Le!=null){if(!(at in Le)){if(!he)throw new d("base intrinsic for "+me+" exists, but the property is not available.");return}if(A&&Je+1>=fe.length){var Ze=A(Le,at);qe=!!Ze,qe&&"get"in Ze&&!("originalValue"in Ze.get)?Le=Ze.get:Le=Le[at]}else qe=P(Le,at),Le=Le[at];qe&&!ke&&(K[Ue]=Le)}}return Le}},41405:(h,F,o)=>{"use strict";var c=typeof Symbol!="undefined"&&Symbol,v=o(55419);h.exports=function(){return typeof c!="function"||typeof Symbol!="function"||typeof c("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:v()}},55419:h=>{"use strict";h.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var o={},c=Symbol("test"),v=Object(c);if(typeof c=="string"||Object.prototype.toString.call(c)!=="[object Symbol]"||Object.prototype.toString.call(v)!=="[object Symbol]")return!1;var m=42;o[c]=m;for(c in o)return!1;if(typeof Object.keys=="function"&&Object.keys(o).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(o).length!==0)return!1;var d=Object.getOwnPropertySymbols(o);if(d.length!==1||d[0]!==c||!Object.prototype.propertyIsEnumerable.call(o,c))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var x=Object.getOwnPropertyDescriptor(o,c);if(x.value!==m||x.enumerable!==!0)return!1}return!0}},17642:(h,F,o)=>{"use strict";var c=o(58612);h.exports=c.call(Function.call,Object.prototype.hasOwnProperty)},80645:(h,F)=>{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */F.read=function(o,c,v,m,d){var x,A,w=d*8-m-1,T=(1<<w)-1,D=T>>1,B=-7,U=v?d-1:0,ee=v?-1:1,K=o[c+U];for(U+=ee,x=K&(1<<-B)-1,K>>=-B,B+=w;B>0;x=x*256+o[c+U],U+=ee,B-=8);for(A=x&(1<<-B)-1,x>>=-B,B+=m;B>0;A=A*256+o[c+U],U+=ee,B-=8);if(x===0)x=1-D;else{if(x===T)return A?NaN:(K?-1:1)*(1/0);A=A+Math.pow(2,m),x=x-D}return(K?-1:1)*A*Math.pow(2,x-m)},F.write=function(o,c,v,m,d,x){var A,w,T,D=x*8-d-1,B=(1<<D)-1,U=B>>1,ee=d===23?Math.pow(2,-24)-Math.pow(2,-77):0,K=m?0:x-1,R=m?1:-1,Q=c<0||c===0&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(w=isNaN(c)?1:0,A=B):(A=Math.floor(Math.log(c)/Math.LN2),c*(T=Math.pow(2,-A))<1&&(A--,T*=2),A+U>=1?c+=ee/T:c+=ee*Math.pow(2,1-U),c*T>=2&&(A++,T/=2),A+U>=B?(w=0,A=B):A+U>=1?(w=(c*T-1)*Math.pow(2,d),A=A+U):(w=c*Math.pow(2,U-1)*Math.pow(2,d),A=0));d>=8;o[v+K]=w&255,K+=R,w/=256,d-=8);for(A=A<<d|w,D+=d;D>0;o[v+K]=A&255,K+=R,A/=256,D-=8);o[v+K-R]|=Q*128}},5826:h=>{var F={}.toString;h.exports=Array.isArray||function(o){return F.call(o)=="[object Array]"}},57514:h=>{h.exports=window.FormData},93320:(h,F,o)=>{"use strict";var c=o(51294);h.exports=c},51294:(h,F,o)=>{"use strict";var c=o(40028),v=o(96157);function m(d){return function(){throw new Error("Function "+d+" is deprecated and cannot be used.")}}h.exports.Type=o(53899),h.exports.Schema=o(82409),h.exports.FAILSAFE_SCHEMA=o(75322),h.exports.JSON_SCHEMA=o(65796),h.exports.CORE_SCHEMA=o(17318),h.exports.DEFAULT_SAFE_SCHEMA=o(5972),h.exports.DEFAULT_FULL_SCHEMA=o(19321),h.exports.load=c.load,h.exports.loadAll=c.loadAll,h.exports.safeLoad=c.safeLoad,h.exports.safeLoadAll=c.safeLoadAll,h.exports.dump=v.dump,h.exports.safeDump=v.safeDump,h.exports.YAMLException=o(14884),h.exports.MINIMAL_SCHEMA=o(75322),h.exports.SAFE_SCHEMA=o(5972),h.exports.DEFAULT_SCHEMA=o(19321),h.exports.scan=m("scan"),h.exports.parse=m("parse"),h.exports.compose=m("compose"),h.exports.addConstructor=m("addConstructor")},25596:h=>{"use strict";function F(x){return typeof x=="undefined"||x===null}function o(x){return typeof x=="object"&&x!==null}function c(x){return Array.isArray(x)?x:F(x)?[]:[x]}function v(x,A){var w,T,D,B;if(A)for(B=Object.keys(A),w=0,T=B.length;w<T;w+=1)D=B[w],x[D]=A[D];return x}function m(x,A){var w="",T;for(T=0;T<A;T+=1)w+=x;return w}function d(x){return x===0&&Number.NEGATIVE_INFINITY===1/x}h.exports.isNothing=F,h.exports.isObject=o,h.exports.toArray=c,h.exports.repeat=m,h.exports.isNegativeZero=d,h.exports.extend=v},96157:(h,F,o)=>{"use strict";var c=o(25596),v=o(14884),m=o(19321),d=o(5972),x=Object.prototype.toString,A=Object.prototype.hasOwnProperty,w=9,T=10,D=13,B=32,U=33,ee=34,K=35,R=37,Q=38,L=39,P=42,V=44,X=45,z=58,G=61,Z=62,ce=63,te=64,se=91,be=93,me=96,he=123,fe=124,oe=125,Re={};Re[0]="\\0",Re[7]="\\a",Re[8]="\\b",Re[9]="\\t",Re[10]="\\n",Re[11]="\\v",Re[12]="\\f",Re[13]="\\r",Re[27]="\\e",Re[34]='\\"',Re[92]="\\\\",Re[133]="\\N",Re[160]="\\_",Re[8232]="\\L",Re[8233]="\\P";var Ue=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function Le(N,_){var ue,Oe,Ie,Te,We,He,nt;if(_===null)return{};for(ue={},Oe=Object.keys(_),Ie=0,Te=Oe.length;Ie<Te;Ie+=1)We=Oe[Ie],He=String(_[We]),We.slice(0,2)==="!!"&&(We="tag:yaml.org,2002:"+We.slice(2)),nt=N.compiledTypeMap.fallback[We],nt&&A.call(nt.styleAliases,He)&&(He=nt.styleAliases[He]),ue[We]=He;return ue}function ke(N){var _,ue,Oe;if(_=N.toString(16).toUpperCase(),N<=255)ue="x",Oe=2;else if(N<=65535)ue="u",Oe=4;else if(N<=4294967295)ue="U",Oe=8;else throw new v("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+ue+c.repeat("0",Oe-_.length)+_}function tt(N){this.schema=N.schema||m,this.indent=Math.max(1,N.indent||2),this.noArrayIndent=N.noArrayIndent||!1,this.skipInvalid=N.skipInvalid||!1,this.flowLevel=c.isNothing(N.flowLevel)?-1:N.flowLevel,this.styleMap=Le(this.schema,N.styles||null),this.sortKeys=N.sortKeys||!1,this.lineWidth=N.lineWidth||80,this.noRefs=N.noRefs||!1,this.noCompatMode=N.noCompatMode||!1,this.condenseFlow=N.condenseFlow||!1,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Je(N,_){for(var ue=c.repeat(" ",_),Oe=0,Ie=-1,Te="",We,He=N.length;Oe<He;)Ie=N.indexOf(`
475
+ `,Oe),Ie===-1?(We=N.slice(Oe),Oe=He):(We=N.slice(Oe,Ie+1),Oe=Ie+1),We.length&&We!==`
476
+ `&&(Te+=ue),Te+=We;return Te}function qe(N,_){return`
477
+ `+c.repeat(" ",N.indent*_)}function at(N,_){var ue,Oe,Ie;for(ue=0,Oe=N.implicitTypes.length;ue<Oe;ue+=1)if(Ie=N.implicitTypes[ue],Ie.resolve(_))return!0;return!1}function ut(N){return N===B||N===w}function gt(N){return 32<=N&&N<=126||161<=N&&N<=55295&&N!==8232&&N!==8233||57344<=N&&N<=65533&&N!==65279||65536<=N&&N<=1114111}function Ze(N){return gt(N)&&!ut(N)&&N!==65279&&N!==D&&N!==T}function lt(N,_){return gt(N)&&N!==65279&&N!==V&&N!==se&&N!==be&&N!==he&&N!==oe&&N!==z&&(N!==K||_&&Ze(_))}function pt(N){return gt(N)&&N!==65279&&!ut(N)&&N!==X&&N!==ce&&N!==z&&N!==V&&N!==se&&N!==be&&N!==he&&N!==oe&&N!==K&&N!==Q&&N!==P&&N!==U&&N!==fe&&N!==G&&N!==Z&&N!==L&&N!==ee&&N!==R&&N!==te&&N!==me}function vt(N){var _=/^\n* /;return _.test(N)}var dt=1,It=2,Ft=3,Et=4,Ut=5;function jt(N,_,ue,Oe,Ie){var Te,We,He,nt=!1,ht=!1,Ct=Oe!==-1,Yt=-1,kt=pt(N.charCodeAt(0))&&!ut(N.charCodeAt(N.length-1));if(_)for(Te=0;Te<N.length;Te++){if(We=N.charCodeAt(Te),!gt(We))return Ut;He=Te>0?N.charCodeAt(Te-1):null,kt=kt&&lt(We,He)}else{for(Te=0;Te<N.length;Te++){if(We=N.charCodeAt(Te),We===T)nt=!0,Ct&&(ht=ht||Te-Yt-1>Oe&&N[Yt+1]!==" ",Yt=Te);else if(!gt(We))return Ut;He=Te>0?N.charCodeAt(Te-1):null,kt=kt&&lt(We,He)}ht=ht||Ct&&Te-Yt-1>Oe&&N[Yt+1]!==" "}return!nt&&!ht?kt&&!Ie(N)?dt:It:ue>9&&vt(N)?Ut:ht?Et:Ft}function Gt(N,_,ue,Oe){N.dump=function(){if(_.length===0)return"''";if(!N.noCompatMode&&Ue.indexOf(_)!==-1)return"'"+_+"'";var Ie=N.indent*Math.max(1,ue),Te=N.lineWidth===-1?-1:Math.max(Math.min(N.lineWidth,40),N.lineWidth-Ie),We=Oe||N.flowLevel>-1&&ue>=N.flowLevel;function He(nt){return at(N,nt)}switch(jt(_,We,N.indent,Te,He)){case dt:return _;case It:return"'"+_.replace(/'/g,"''")+"'";case Ft:return"|"+wt(_,N.indent)+Mt(Je(_,Ie));case Et:return">"+wt(_,N.indent)+Mt(Je(bt(_,Te),Ie));case Ut:return'"'+$(_,Te)+'"';default:throw new v("impossible error: invalid scalar style")}}()}function wt(N,_){var ue=vt(N)?String(_):"",Oe=N[N.length-1]===`
478
+ `,Ie=Oe&&(N[N.length-2]===`
479
+ `||N===`
480
+ `),Te=Ie?"+":Oe?"":"-";return ue+Te+`
481
+ `}function Mt(N){return N[N.length-1]===`
482
+ `?N.slice(0,-1):N}function bt(N,_){for(var ue=/(\n+)([^\n]*)/g,Oe=function(){var ht=N.indexOf(`
483
+ `);return ht=ht!==-1?ht:N.length,ue.lastIndex=ht,ve(N.slice(0,ht),_)}(),Ie=N[0]===`
484
+ `||N[0]===" ",Te,We;We=ue.exec(N);){var He=We[1],nt=We[2];Te=nt[0]===" ",Oe+=He+(!Ie&&!Te&&nt!==""?`
485
+ `:"")+ve(nt,_),Ie=Te}return Oe}function ve(N,_){if(N===""||N[0]===" ")return N;for(var ue=/ [^ ]/g,Oe,Ie=0,Te,We=0,He=0,nt="";Oe=ue.exec(N);)He=Oe.index,He-Ie>_&&(Te=We>Ie?We:He,nt+=`
486
+ `+N.slice(Ie,Te),Ie=Te+1),We=He;return nt+=`
487
+ `,N.length-Ie>_&&We>Ie?nt+=N.slice(Ie,We)+`
488
+ `+N.slice(We+1):nt+=N.slice(Ie),nt.slice(1)}function $(N){for(var _="",ue,Oe,Ie,Te=0;Te<N.length;Te++){if(ue=N.charCodeAt(Te),ue>=55296&&ue<=56319&&(Oe=N.charCodeAt(Te+1),Oe>=56320&&Oe<=57343)){_+=ke((ue-55296)*1024+Oe-56320+65536),Te++;continue}Ie=Re[ue],_+=!Ie&&gt(ue)?N[Te]:Ie||ke(ue)}return _}function Y(N,_,ue){var Oe="",Ie=N.tag,Te,We;for(Te=0,We=ue.length;Te<We;Te+=1)Pe(N,_,ue[Te],!1,!1)&&(Te!==0&&(Oe+=","+(N.condenseFlow?"":" ")),Oe+=N.dump);N.tag=Ie,N.dump="["+Oe+"]"}function ye(N,_,ue,Oe){var Ie="",Te=N.tag,We,He;for(We=0,He=ue.length;We<He;We+=1)Pe(N,_+1,ue[We],!0,!0)&&((!Oe||We!==0)&&(Ie+=qe(N,_)),N.dump&&T===N.dump.charCodeAt(0)?Ie+="-":Ie+="- ",Ie+=N.dump);N.tag=Te,N.dump=Ie||"[]"}function de(N,_,ue){var Oe="",Ie=N.tag,Te=Object.keys(ue),We,He,nt,ht,Ct;for(We=0,He=Te.length;We<He;We+=1)Ct="",We!==0&&(Ct+=", "),N.condenseFlow&&(Ct+='"'),nt=Te[We],ht=ue[nt],!!Pe(N,_,nt,!1,!1)&&(N.dump.length>1024&&(Ct+="? "),Ct+=N.dump+(N.condenseFlow?'"':"")+":"+(N.condenseFlow?"":" "),!!Pe(N,_,ht,!1,!1)&&(Ct+=N.dump,Oe+=Ct));N.tag=Ie,N.dump="{"+Oe+"}"}function Ae(N,_,ue,Oe){var Ie="",Te=N.tag,We=Object.keys(ue),He,nt,ht,Ct,Yt,kt;if(N.sortKeys===!0)We.sort();else if(typeof N.sortKeys=="function")We.sort(N.sortKeys);else if(N.sortKeys)throw new v("sortKeys must be a boolean or a function");for(He=0,nt=We.length;He<nt;He+=1)kt="",(!Oe||He!==0)&&(kt+=qe(N,_)),ht=We[He],Ct=ue[ht],!!Pe(N,_+1,ht,!0,!0,!0)&&(Yt=N.tag!==null&&N.tag!=="?"||N.dump&&N.dump.length>1024,Yt&&(N.dump&&T===N.dump.charCodeAt(0)?kt+="?":kt+="? "),kt+=N.dump,Yt&&(kt+=qe(N,_)),!!Pe(N,_+1,Ct,!0,Yt)&&(N.dump&&T===N.dump.charCodeAt(0)?kt+=":":kt+=": ",kt+=N.dump,Ie+=kt));N.tag=Te,N.dump=Ie||"{}"}function S(N,_,ue){var Oe,Ie,Te,We,He,nt;for(Ie=ue?N.explicitTypes:N.implicitTypes,Te=0,We=Ie.length;Te<We;Te+=1)if(He=Ie[Te],(He.instanceOf||He.predicate)&&(!He.instanceOf||typeof _=="object"&&_ instanceof He.instanceOf)&&(!He.predicate||He.predicate(_))){if(N.tag=ue?He.tag:"?",He.represent){if(nt=N.styleMap[He.tag]||He.defaultStyle,x.call(He.represent)==="[object Function]")Oe=He.represent(_,nt);else if(A.call(He.represent,nt))Oe=He.represent[nt](_,nt);else throw new v("!<"+He.tag+'> tag resolver accepts not "'+nt+'" style');N.dump=Oe}return!0}return!1}function Pe(N,_,ue,Oe,Ie,Te){N.tag=null,N.dump=ue,S(N,ue,!1)||S(N,ue,!0);var We=x.call(N.dump);Oe&&(Oe=N.flowLevel<0||N.flowLevel>_);var He=We==="[object Object]"||We==="[object Array]",nt,ht;if(He&&(nt=N.duplicates.indexOf(ue),ht=nt!==-1),(N.tag!==null&&N.tag!=="?"||ht||N.indent!==2&&_>0)&&(Ie=!1),ht&&N.usedDuplicates[nt])N.dump="*ref_"+nt;else{if(He&&ht&&!N.usedDuplicates[nt]&&(N.usedDuplicates[nt]=!0),We==="[object Object]")Oe&&Object.keys(N.dump).length!==0?(Ae(N,_,N.dump,Ie),ht&&(N.dump="&ref_"+nt+N.dump)):(de(N,_,N.dump),ht&&(N.dump="&ref_"+nt+" "+N.dump));else if(We==="[object Array]"){var Ct=N.noArrayIndent&&_>0?_-1:_;Oe&&N.dump.length!==0?(ye(N,Ct,N.dump,Ie),ht&&(N.dump="&ref_"+nt+N.dump)):(Y(N,Ct,N.dump),ht&&(N.dump="&ref_"+nt+" "+N.dump))}else if(We==="[object String]")N.tag!=="?"&&Gt(N,N.dump,_,Te);else{if(N.skipInvalid)return!1;throw new v("unacceptable kind of an object to dump "+We)}N.tag!==null&&N.tag!=="?"&&(N.dump="!<"+N.tag+"> "+N.dump)}return!0}function H(N,_){var ue=[],Oe=[],Ie,Te;for(O(N,ue,Oe),Ie=0,Te=Oe.length;Ie<Te;Ie+=1)_.duplicates.push(ue[Oe[Ie]]);_.usedDuplicates=new Array(Te)}function O(N,_,ue){var Oe,Ie,Te;if(N!==null&&typeof N=="object")if(Ie=_.indexOf(N),Ie!==-1)ue.indexOf(Ie)===-1&&ue.push(Ie);else if(_.push(N),Array.isArray(N))for(Ie=0,Te=N.length;Ie<Te;Ie+=1)O(N[Ie],_,ue);else for(Oe=Object.keys(N),Ie=0,Te=Oe.length;Ie<Te;Ie+=1)O(N[Oe[Ie]],_,ue)}function I(N,_){_=_||{};var ue=new tt(_);return ue.noRefs||H(N,ue),Pe(ue,0,N,!0,!0)?ue.dump+`
489
+ `:""}function re(N,_){return I(N,c.extend({schema:d},_))}h.exports.dump=I,h.exports.safeDump=re},14884:h=>{"use strict";function F(o,c){Error.call(this),this.name="YAMLException",this.reason=o,this.mark=c,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}F.prototype=Object.create(Error.prototype),F.prototype.constructor=F,F.prototype.toString=function(c){var v=this.name+": ";return v+=this.reason||"(unknown reason)",!c&&this.mark&&(v+=" "+this.mark.toString()),v},h.exports=F},40028:(h,F,o)=>{"use strict";var c=o(25596),v=o(14884),m=o(77334),d=o(5972),x=o(19321),A=Object.prototype.hasOwnProperty,w=1,T=2,D=3,B=4,U=1,ee=2,K=3,R=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Q=/[\x85\u2028\u2029]/,L=/[,\[\]\{\}]/,P=/^(?:!|!!|![a-z\-]+!)$/i,V=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function X(S){return Object.prototype.toString.call(S)}function z(S){return S===10||S===13}function G(S){return S===9||S===32}function Z(S){return S===9||S===32||S===10||S===13}function ce(S){return S===44||S===91||S===93||S===123||S===125}function te(S){var Pe;return 48<=S&&S<=57?S-48:(Pe=S|32,97<=Pe&&Pe<=102?Pe-97+10:-1)}function se(S){return S===120?2:S===117?4:S===85?8:0}function be(S){return 48<=S&&S<=57?S-48:-1}function me(S){return S===48?"\0":S===97?"\x07":S===98?"\b":S===116||S===9?" ":S===110?`
490
+ `:S===118?"\v":S===102?"\f":S===114?"\r":S===101?"":S===32?" ":S===34?'"':S===47?"/":S===92?"\\":S===78?"\x85":S===95?"\xA0":S===76?"\u2028":S===80?"\u2029":""}function he(S){return S<=65535?String.fromCharCode(S):String.fromCharCode((S-65536>>10)+55296,(S-65536&1023)+56320)}for(var fe=new Array(256),oe=new Array(256),Re=0;Re<256;Re++)fe[Re]=me(Re)?1:0,oe[Re]=me(Re);function Ue(S,Pe){this.input=S,this.filename=Pe.filename||null,this.schema=Pe.schema||x,this.onWarning=Pe.onWarning||null,this.legacy=Pe.legacy||!1,this.json=Pe.json||!1,this.listener=Pe.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=S.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function Le(S,Pe){return new v(Pe,new m(S.filename,S.input,S.position,S.line,S.position-S.lineStart))}function ke(S,Pe){throw Le(S,Pe)}function tt(S,Pe){S.onWarning&&S.onWarning.call(null,Le(S,Pe))}var Je={YAML:function(Pe,H,O){var I,re,N;Pe.version!==null&&ke(Pe,"duplication of %YAML directive"),O.length!==1&&ke(Pe,"YAML directive accepts exactly one argument"),I=/^([0-9]+)\.([0-9]+)$/.exec(O[0]),I===null&&ke(Pe,"ill-formed argument of the YAML directive"),re=parseInt(I[1],10),N=parseInt(I[2],10),re!==1&&ke(Pe,"unacceptable YAML version of the document"),Pe.version=O[0],Pe.checkLineBreaks=N<2,N!==1&&N!==2&&tt(Pe,"unsupported YAML version of the document")},TAG:function(Pe,H,O){var I,re;O.length!==2&&ke(Pe,"TAG directive accepts exactly two arguments"),I=O[0],re=O[1],P.test(I)||ke(Pe,"ill-formed tag handle (first argument) of the TAG directive"),A.call(Pe.tagMap,I)&&ke(Pe,'there is a previously declared suffix for "'+I+'" tag handle'),V.test(re)||ke(Pe,"ill-formed tag prefix (second argument) of the TAG directive"),Pe.tagMap[I]=re}};function qe(S,Pe,H,O){var I,re,N,_;if(Pe<H){if(_=S.input.slice(Pe,H),O)for(I=0,re=_.length;I<re;I+=1)N=_.charCodeAt(I),N===9||32<=N&&N<=1114111||ke(S,"expected valid JSON character");else R.test(_)&&ke(S,"the stream contains non-printable characters");S.result+=_}}function at(S,Pe,H,O){var I,re,N,_;for(c.isObject(H)||ke(S,"cannot merge mappings; the provided source object is unacceptable"),I=Object.keys(H),N=0,_=I.length;N<_;N+=1)re=I[N],A.call(Pe,re)||(Pe[re]=H[re],O[re]=!0)}function ut(S,Pe,H,O,I,re,N,_){var ue,Oe;if(Array.isArray(I))for(I=Array.prototype.slice.call(I),ue=0,Oe=I.length;ue<Oe;ue+=1)Array.isArray(I[ue])&&ke(S,"nested arrays are not supported inside keys"),typeof I=="object"&&X(I[ue])==="[object Object]"&&(I[ue]="[object Object]");if(typeof I=="object"&&X(I)==="[object Object]"&&(I="[object Object]"),I=String(I),Pe===null&&(Pe={}),O==="tag:yaml.org,2002:merge")if(Array.isArray(re))for(ue=0,Oe=re.length;ue<Oe;ue+=1)at(S,Pe,re[ue],H);else at(S,Pe,re,H);else!S.json&&!A.call(H,I)&&A.call(Pe,I)&&(S.line=N||S.line,S.position=_||S.position,ke(S,"duplicated mapping key")),Pe[I]=re,delete H[I];return Pe}function gt(S){var Pe;Pe=S.input.charCodeAt(S.position),Pe===10?S.position++:Pe===13?(S.position++,S.input.charCodeAt(S.position)===10&&S.position++):ke(S,"a line break is expected"),S.line+=1,S.lineStart=S.position}function Ze(S,Pe,H){for(var O=0,I=S.input.charCodeAt(S.position);I!==0;){for(;G(I);)I=S.input.charCodeAt(++S.position);if(Pe&&I===35)do I=S.input.charCodeAt(++S.position);while(I!==10&&I!==13&&I!==0);if(z(I))for(gt(S),I=S.input.charCodeAt(S.position),O++,S.lineIndent=0;I===32;)S.lineIndent++,I=S.input.charCodeAt(++S.position);else break}return H!==-1&&O!==0&&S.lineIndent<H&&tt(S,"deficient indentation"),O}function lt(S){var Pe=S.position,H;return H=S.input.charCodeAt(Pe),!!((H===45||H===46)&&H===S.input.charCodeAt(Pe+1)&&H===S.input.charCodeAt(Pe+2)&&(Pe+=3,H=S.input.charCodeAt(Pe),H===0||Z(H)))}function pt(S,Pe){Pe===1?S.result+=" ":Pe>1&&(S.result+=c.repeat(`
491
+ `,Pe-1))}function vt(S,Pe,H){var O,I,re,N,_,ue,Oe,Ie,Te=S.kind,We=S.result,He;if(He=S.input.charCodeAt(S.position),Z(He)||ce(He)||He===35||He===38||He===42||He===33||He===124||He===62||He===39||He===34||He===37||He===64||He===96||(He===63||He===45)&&(I=S.input.charCodeAt(S.position+1),Z(I)||H&&ce(I)))return!1;for(S.kind="scalar",S.result="",re=N=S.position,_=!1;He!==0;){if(He===58){if(I=S.input.charCodeAt(S.position+1),Z(I)||H&&ce(I))break}else if(He===35){if(O=S.input.charCodeAt(S.position-1),Z(O))break}else{if(S.position===S.lineStart&&lt(S)||H&&ce(He))break;if(z(He))if(ue=S.line,Oe=S.lineStart,Ie=S.lineIndent,Ze(S,!1,-1),S.lineIndent>=Pe){_=!0,He=S.input.charCodeAt(S.position);continue}else{S.position=N,S.line=ue,S.lineStart=Oe,S.lineIndent=Ie;break}}_&&(qe(S,re,N,!1),pt(S,S.line-ue),re=N=S.position,_=!1),G(He)||(N=S.position+1),He=S.input.charCodeAt(++S.position)}return qe(S,re,N,!1),S.result?!0:(S.kind=Te,S.result=We,!1)}function dt(S,Pe){var H,O,I;if(H=S.input.charCodeAt(S.position),H!==39)return!1;for(S.kind="scalar",S.result="",S.position++,O=I=S.position;(H=S.input.charCodeAt(S.position))!==0;)if(H===39)if(qe(S,O,S.position,!0),H=S.input.charCodeAt(++S.position),H===39)O=S.position,S.position++,I=S.position;else return!0;else z(H)?(qe(S,O,I,!0),pt(S,Ze(S,!1,Pe)),O=I=S.position):S.position===S.lineStart&&lt(S)?ke(S,"unexpected end of the document within a single quoted scalar"):(S.position++,I=S.position);ke(S,"unexpected end of the stream within a single quoted scalar")}function It(S,Pe){var H,O,I,re,N,_;if(_=S.input.charCodeAt(S.position),_!==34)return!1;for(S.kind="scalar",S.result="",S.position++,H=O=S.position;(_=S.input.charCodeAt(S.position))!==0;){if(_===34)return qe(S,H,S.position,!0),S.position++,!0;if(_===92){if(qe(S,H,S.position,!0),_=S.input.charCodeAt(++S.position),z(_))Ze(S,!1,Pe);else if(_<256&&fe[_])S.result+=oe[_],S.position++;else if((N=se(_))>0){for(I=N,re=0;I>0;I--)_=S.input.charCodeAt(++S.position),(N=te(_))>=0?re=(re<<4)+N:ke(S,"expected hexadecimal character");S.result+=he(re),S.position++}else ke(S,"unknown escape sequence");H=O=S.position}else z(_)?(qe(S,H,O,!0),pt(S,Ze(S,!1,Pe)),H=O=S.position):S.position===S.lineStart&&lt(S)?ke(S,"unexpected end of the document within a double quoted scalar"):(S.position++,O=S.position)}ke(S,"unexpected end of the stream within a double quoted scalar")}function Ft(S,Pe){var H=!0,O,I=S.tag,re,N=S.anchor,_,ue,Oe,Ie,Te,We={},He,nt,ht,Ct;if(Ct=S.input.charCodeAt(S.position),Ct===91)ue=93,Te=!1,re=[];else if(Ct===123)ue=125,Te=!0,re={};else return!1;for(S.anchor!==null&&(S.anchorMap[S.anchor]=re),Ct=S.input.charCodeAt(++S.position);Ct!==0;){if(Ze(S,!0,Pe),Ct=S.input.charCodeAt(S.position),Ct===ue)return S.position++,S.tag=I,S.anchor=N,S.kind=Te?"mapping":"sequence",S.result=re,!0;H||ke(S,"missed comma between flow collection entries"),nt=He=ht=null,Oe=Ie=!1,Ct===63&&(_=S.input.charCodeAt(S.position+1),Z(_)&&(Oe=Ie=!0,S.position++,Ze(S,!0,Pe))),O=S.line,bt(S,Pe,w,!1,!0),nt=S.tag,He=S.result,Ze(S,!0,Pe),Ct=S.input.charCodeAt(S.position),(Ie||S.line===O)&&Ct===58&&(Oe=!0,Ct=S.input.charCodeAt(++S.position),Ze(S,!0,Pe),bt(S,Pe,w,!1,!0),ht=S.result),Te?ut(S,re,We,nt,He,ht):Oe?re.push(ut(S,null,We,nt,He,ht)):re.push(He),Ze(S,!0,Pe),Ct=S.input.charCodeAt(S.position),Ct===44?(H=!0,Ct=S.input.charCodeAt(++S.position)):H=!1}ke(S,"unexpected end of the stream within a flow collection")}function Et(S,Pe){var H,O,I=U,re=!1,N=!1,_=Pe,ue=0,Oe=!1,Ie,Te;if(Te=S.input.charCodeAt(S.position),Te===124)O=!1;else if(Te===62)O=!0;else return!1;for(S.kind="scalar",S.result="";Te!==0;)if(Te=S.input.charCodeAt(++S.position),Te===43||Te===45)U===I?I=Te===43?K:ee:ke(S,"repeat of a chomping mode identifier");else if((Ie=be(Te))>=0)Ie===0?ke(S,"bad explicit indentation width of a block scalar; it cannot be less than one"):N?ke(S,"repeat of an indentation width identifier"):(_=Pe+Ie-1,N=!0);else break;if(G(Te)){do Te=S.input.charCodeAt(++S.position);while(G(Te));if(Te===35)do Te=S.input.charCodeAt(++S.position);while(!z(Te)&&Te!==0)}for(;Te!==0;){for(gt(S),S.lineIndent=0,Te=S.input.charCodeAt(S.position);(!N||S.lineIndent<_)&&Te===32;)S.lineIndent++,Te=S.input.charCodeAt(++S.position);if(!N&&S.lineIndent>_&&(_=S.lineIndent),z(Te)){ue++;continue}if(S.lineIndent<_){I===K?S.result+=c.repeat(`
492
+ `,re?1+ue:ue):I===U&&re&&(S.result+=`
493
+ `);break}for(O?G(Te)?(Oe=!0,S.result+=c.repeat(`
494
+ `,re?1+ue:ue)):Oe?(Oe=!1,S.result+=c.repeat(`
495
+ `,ue+1)):ue===0?re&&(S.result+=" "):S.result+=c.repeat(`
496
+ `,ue):S.result+=c.repeat(`
497
+ `,re?1+ue:ue),re=!0,N=!0,ue=0,H=S.position;!z(Te)&&Te!==0;)Te=S.input.charCodeAt(++S.position);qe(S,H,S.position,!1)}return!0}function Ut(S,Pe){var H,O=S.tag,I=S.anchor,re=[],N,_=!1,ue;for(S.anchor!==null&&(S.anchorMap[S.anchor]=re),ue=S.input.charCodeAt(S.position);ue!==0&&!(ue!==45||(N=S.input.charCodeAt(S.position+1),!Z(N)));){if(_=!0,S.position++,Ze(S,!0,-1)&&S.lineIndent<=Pe){re.push(null),ue=S.input.charCodeAt(S.position);continue}if(H=S.line,bt(S,Pe,D,!1,!0),re.push(S.result),Ze(S,!0,-1),ue=S.input.charCodeAt(S.position),(S.line===H||S.lineIndent>Pe)&&ue!==0)ke(S,"bad indentation of a sequence entry");else if(S.lineIndent<Pe)break}return _?(S.tag=O,S.anchor=I,S.kind="sequence",S.result=re,!0):!1}function jt(S,Pe,H){var O,I,re,N,_=S.tag,ue=S.anchor,Oe={},Ie={},Te=null,We=null,He=null,nt=!1,ht=!1,Ct;for(S.anchor!==null&&(S.anchorMap[S.anchor]=Oe),Ct=S.input.charCodeAt(S.position);Ct!==0;){if(O=S.input.charCodeAt(S.position+1),re=S.line,N=S.position,(Ct===63||Ct===58)&&Z(O))Ct===63?(nt&&(ut(S,Oe,Ie,Te,We,null),Te=We=He=null),ht=!0,nt=!0,I=!0):nt?(nt=!1,I=!0):ke(S,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),S.position+=1,Ct=O;else if(bt(S,H,T,!1,!0))if(S.line===re){for(Ct=S.input.charCodeAt(S.position);G(Ct);)Ct=S.input.charCodeAt(++S.position);if(Ct===58)Ct=S.input.charCodeAt(++S.position),Z(Ct)||ke(S,"a whitespace character is expected after the key-value separator within a block mapping"),nt&&(ut(S,Oe,Ie,Te,We,null),Te=We=He=null),ht=!0,nt=!1,I=!1,Te=S.tag,We=S.result;else if(ht)ke(S,"can not read an implicit mapping pair; a colon is missed");else return S.tag=_,S.anchor=ue,!0}else if(ht)ke(S,"can not read a block mapping entry; a multiline key may not be an implicit key");else return S.tag=_,S.anchor=ue,!0;else break;if((S.line===re||S.lineIndent>Pe)&&(bt(S,Pe,B,!0,I)&&(nt?We=S.result:He=S.result),nt||(ut(S,Oe,Ie,Te,We,He,re,N),Te=We=He=null),Ze(S,!0,-1),Ct=S.input.charCodeAt(S.position)),S.lineIndent>Pe&&Ct!==0)ke(S,"bad indentation of a mapping entry");else if(S.lineIndent<Pe)break}return nt&&ut(S,Oe,Ie,Te,We,null),ht&&(S.tag=_,S.anchor=ue,S.kind="mapping",S.result=Oe),ht}function Gt(S){var Pe,H=!1,O=!1,I,re,N;if(N=S.input.charCodeAt(S.position),N!==33)return!1;if(S.tag!==null&&ke(S,"duplication of a tag property"),N=S.input.charCodeAt(++S.position),N===60?(H=!0,N=S.input.charCodeAt(++S.position)):N===33?(O=!0,I="!!",N=S.input.charCodeAt(++S.position)):I="!",Pe=S.position,H){do N=S.input.charCodeAt(++S.position);while(N!==0&&N!==62);S.position<S.length?(re=S.input.slice(Pe,S.position),N=S.input.charCodeAt(++S.position)):ke(S,"unexpected end of the stream within a verbatim tag")}else{for(;N!==0&&!Z(N);)N===33&&(O?ke(S,"tag suffix cannot contain exclamation marks"):(I=S.input.slice(Pe-1,S.position+1),P.test(I)||ke(S,"named tag handle cannot contain such characters"),O=!0,Pe=S.position+1)),N=S.input.charCodeAt(++S.position);re=S.input.slice(Pe,S.position),L.test(re)&&ke(S,"tag suffix cannot contain flow indicator characters")}return re&&!V.test(re)&&ke(S,"tag name cannot contain such characters: "+re),H?S.tag=re:A.call(S.tagMap,I)?S.tag=S.tagMap[I]+re:I==="!"?S.tag="!"+re:I==="!!"?S.tag="tag:yaml.org,2002:"+re:ke(S,'undeclared tag handle "'+I+'"'),!0}function wt(S){var Pe,H;if(H=S.input.charCodeAt(S.position),H!==38)return!1;for(S.anchor!==null&&ke(S,"duplication of an anchor property"),H=S.input.charCodeAt(++S.position),Pe=S.position;H!==0&&!Z(H)&&!ce(H);)H=S.input.charCodeAt(++S.position);return S.position===Pe&&ke(S,"name of an anchor node must contain at least one character"),S.anchor=S.input.slice(Pe,S.position),!0}function Mt(S){var Pe,H,O;if(O=S.input.charCodeAt(S.position),O!==42)return!1;for(O=S.input.charCodeAt(++S.position),Pe=S.position;O!==0&&!Z(O)&&!ce(O);)O=S.input.charCodeAt(++S.position);return S.position===Pe&&ke(S,"name of an alias node must contain at least one character"),H=S.input.slice(Pe,S.position),A.call(S.anchorMap,H)||ke(S,'unidentified alias "'+H+'"'),S.result=S.anchorMap[H],Ze(S,!0,-1),!0}function bt(S,Pe,H,O,I){var re,N,_,ue=1,Oe=!1,Ie=!1,Te,We,He,nt,ht;if(S.listener!==null&&S.listener("open",S),S.tag=null,S.anchor=null,S.kind=null,S.result=null,re=N=_=B===H||D===H,O&&Ze(S,!0,-1)&&(Oe=!0,S.lineIndent>Pe?ue=1:S.lineIndent===Pe?ue=0:S.lineIndent<Pe&&(ue=-1)),ue===1)for(;Gt(S)||wt(S);)Ze(S,!0,-1)?(Oe=!0,_=re,S.lineIndent>Pe?ue=1:S.lineIndent===Pe?ue=0:S.lineIndent<Pe&&(ue=-1)):_=!1;if(_&&(_=Oe||I),(ue===1||B===H)&&(w===H||T===H?nt=Pe:nt=Pe+1,ht=S.position-S.lineStart,ue===1?_&&(Ut(S,ht)||jt(S,ht,nt))||Ft(S,nt)?Ie=!0:(N&&Et(S,nt)||dt(S,nt)||It(S,nt)?Ie=!0:Mt(S)?(Ie=!0,(S.tag!==null||S.anchor!==null)&&ke(S,"alias node should not have any properties")):vt(S,nt,w===H)&&(Ie=!0,S.tag===null&&(S.tag="?")),S.anchor!==null&&(S.anchorMap[S.anchor]=S.result)):ue===0&&(Ie=_&&Ut(S,ht))),S.tag!==null&&S.tag!=="!")if(S.tag==="?"){for(S.result!==null&&S.kind!=="scalar"&&ke(S,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+S.kind+'"'),Te=0,We=S.implicitTypes.length;Te<We;Te+=1)if(He=S.implicitTypes[Te],He.resolve(S.result)){S.result=He.construct(S.result),S.tag=He.tag,S.anchor!==null&&(S.anchorMap[S.anchor]=S.result);break}}else A.call(S.typeMap[S.kind||"fallback"],S.tag)?(He=S.typeMap[S.kind||"fallback"][S.tag],S.result!==null&&He.kind!==S.kind&&ke(S,"unacceptable node kind for !<"+S.tag+'> tag; it should be "'+He.kind+'", not "'+S.kind+'"'),He.resolve(S.result)?(S.result=He.construct(S.result),S.anchor!==null&&(S.anchorMap[S.anchor]=S.result)):ke(S,"cannot resolve a node with !<"+S.tag+"> explicit tag")):ke(S,"unknown tag !<"+S.tag+">");return S.listener!==null&&S.listener("close",S),S.tag!==null||S.anchor!==null||Ie}function ve(S){var Pe=S.position,H,O,I,re=!1,N;for(S.version=null,S.checkLineBreaks=S.legacy,S.tagMap={},S.anchorMap={};(N=S.input.charCodeAt(S.position))!==0&&(Ze(S,!0,-1),N=S.input.charCodeAt(S.position),!(S.lineIndent>0||N!==37));){for(re=!0,N=S.input.charCodeAt(++S.position),H=S.position;N!==0&&!Z(N);)N=S.input.charCodeAt(++S.position);for(O=S.input.slice(H,S.position),I=[],O.length<1&&ke(S,"directive name must not be less than one character in length");N!==0;){for(;G(N);)N=S.input.charCodeAt(++S.position);if(N===35){do N=S.input.charCodeAt(++S.position);while(N!==0&&!z(N));break}if(z(N))break;for(H=S.position;N!==0&&!Z(N);)N=S.input.charCodeAt(++S.position);I.push(S.input.slice(H,S.position))}N!==0&&gt(S),A.call(Je,O)?Je[O](S,O,I):tt(S,'unknown document directive "'+O+'"')}if(Ze(S,!0,-1),S.lineIndent===0&&S.input.charCodeAt(S.position)===45&&S.input.charCodeAt(S.position+1)===45&&S.input.charCodeAt(S.position+2)===45?(S.position+=3,Ze(S,!0,-1)):re&&ke(S,"directives end mark is expected"),bt(S,S.lineIndent-1,B,!1,!0),Ze(S,!0,-1),S.checkLineBreaks&&Q.test(S.input.slice(Pe,S.position))&&tt(S,"non-ASCII line breaks are interpreted as content"),S.documents.push(S.result),S.position===S.lineStart&&lt(S)){S.input.charCodeAt(S.position)===46&&(S.position+=3,Ze(S,!0,-1));return}if(S.position<S.length-1)ke(S,"end of the stream or a document separator is expected");else return}function $(S,Pe){S=String(S),Pe=Pe||{},S.length!==0&&(S.charCodeAt(S.length-1)!==10&&S.charCodeAt(S.length-1)!==13&&(S+=`
498
+ `),S.charCodeAt(0)===65279&&(S=S.slice(1)));var H=new Ue(S,Pe),O=S.indexOf("\0");for(O!==-1&&(H.position=O,ke(H,"null byte is not allowed in input")),H.input+="\0";H.input.charCodeAt(H.position)===32;)H.lineIndent+=1,H.position+=1;for(;H.position<H.length-1;)ve(H);return H.documents}function Y(S,Pe,H){Pe!==null&&typeof Pe=="object"&&typeof H=="undefined"&&(H=Pe,Pe=null);var O=$(S,H);if(typeof Pe!="function")return O;for(var I=0,re=O.length;I<re;I+=1)Pe(O[I])}function ye(S,Pe){var H=$(S,Pe);if(H.length!==0){if(H.length===1)return H[0];throw new v("expected a single document in the stream, but found more")}}function de(S,Pe,H){return typeof Pe=="object"&&Pe!==null&&typeof H=="undefined"&&(H=Pe,Pe=null),Y(S,Pe,c.extend({schema:d},H))}function Ae(S,Pe){return ye(S,c.extend({schema:d},Pe))}h.exports.loadAll=Y,h.exports.load=ye,h.exports.safeLoadAll=de,h.exports.safeLoad=Ae},77334:(h,F,o)=>{"use strict";var c=o(25596);function v(m,d,x,A,w){this.name=m,this.buffer=d,this.position=x,this.line=A,this.column=w}v.prototype.getSnippet=function(d,x){var A,w,T,D,B;if(!this.buffer)return null;for(d=d||4,x=x||75,A="",w=this.position;w>0&&`\0\r
499
+ \x85\u2028\u2029`.indexOf(this.buffer.charAt(w-1))===-1;)if(w-=1,this.position-w>x/2-1){A=" ... ",w+=5;break}for(T="",D=this.position;D<this.buffer.length&&`\0\r
500
+ \x85\u2028\u2029`.indexOf(this.buffer.charAt(D))===-1;)if(D+=1,D-this.position>x/2-1){T=" ... ",D-=5;break}return B=this.buffer.slice(w,D),c.repeat(" ",d)+A+B+T+`
501
+ `+c.repeat(" ",d+this.position-w+A.length)+"^"},v.prototype.toString=function(d){var x,A="";return this.name&&(A+='in "'+this.name+'" '),A+="at line "+(this.line+1)+", column "+(this.column+1),d||(x=this.getSnippet(),x&&(A+=`:
502
+ `+x)),A},h.exports=v},82409:(h,F,o)=>{"use strict";var c=o(25596),v=o(14884),m=o(53899);function d(w,T,D){var B=[];return w.include.forEach(function(U){D=d(U,T,D)}),w[T].forEach(function(U){D.forEach(function(ee,K){ee.tag===U.tag&&ee.kind===U.kind&&B.push(K)}),D.push(U)}),D.filter(function(U,ee){return B.indexOf(ee)===-1})}function x(){var w={scalar:{},sequence:{},mapping:{},fallback:{}},T,D;function B(U){w[U.kind][U.tag]=w.fallback[U.tag]=U}for(T=0,D=arguments.length;T<D;T+=1)arguments[T].forEach(B);return w}function A(w){this.include=w.include||[],this.implicit=w.implicit||[],this.explicit=w.explicit||[],this.implicit.forEach(function(T){if(T.loadKind&&T.loadKind!=="scalar")throw new v("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.")}),this.compiledImplicit=d(this,"implicit",[]),this.compiledExplicit=d(this,"explicit",[]),this.compiledTypeMap=x(this.compiledImplicit,this.compiledExplicit)}A.DEFAULT=null,A.create=function(){var T,D;switch(arguments.length){case 1:T=A.DEFAULT,D=arguments[0];break;case 2:T=arguments[0],D=arguments[1];break;default:throw new v("Wrong number of arguments for Schema.create function")}if(T=c.toArray(T),D=c.toArray(D),!T.every(function(B){return B instanceof A}))throw new v("Specified list of super schemas (or a single Schema object) contains a non-Schema object.");if(!D.every(function(B){return B instanceof m}))throw new v("Specified list of YAML types (or a single Type object) contains a non-Type object.");return new A({include:T,explicit:D})},h.exports=A},17318:(h,F,o)=>{"use strict";var c=o(82409);h.exports=new c({include:[o(65796)]})},19321:(h,F,o)=>{"use strict";var c=o(82409);h.exports=c.DEFAULT=new c({include:[o(5972)],explicit:[o(70575),o(97287),o(89811)]})},5972:(h,F,o)=>{"use strict";var c=o(82409);h.exports=new c({include:[o(17318)],implicit:[o(56145),o(243)],explicit:[o(18964),o(3878),o(68244),o(67300)]})},75322:(h,F,o)=>{"use strict";var c=o(82409);h.exports=new c({explicit:[o(79483),o(43745),o(86553)]})},65796:(h,F,o)=>{"use strict";var c=o(82409);h.exports=new c({include:[o(75322)],implicit:[o(3022),o(2648),o(95979),o(53456)]})},53899:(h,F,o)=>{"use strict";var c=o(14884),v=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],m=["scalar","sequence","mapping"];function d(A){var w={};return A!==null&&Object.keys(A).forEach(function(T){A[T].forEach(function(D){w[String(D)]=T})}),w}function x(A,w){if(w=w||{},Object.keys(w).forEach(function(T){if(v.indexOf(T)===-1)throw new c('Unknown option "'+T+'" is met in definition of "'+A+'" YAML type.')}),this.tag=A,this.kind=w.kind||null,this.resolve=w.resolve||function(){return!0},this.construct=w.construct||function(T){return T},this.instanceOf=w.instanceOf||null,this.predicate=w.predicate||null,this.represent=w.represent||null,this.defaultStyle=w.defaultStyle||null,this.styleAliases=d(w.styleAliases||null),m.indexOf(this.kind)===-1)throw new c('Unknown kind "'+this.kind+'" is specified for "'+A+'" YAML type.')}h.exports=x},18964:(h,F,o)=>{"use strict";var c;try{var v=void 0;c=o(48764).lW}catch(D){}var m=o(53899),d=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
503
+ \r`;function x(D){if(D===null)return!1;var B,U,ee=0,K=D.length,R=d;for(U=0;U<K;U++)if(B=R.indexOf(D.charAt(U)),!(B>64)){if(B<0)return!1;ee+=6}return ee%8==0}function A(D){var B,U,ee=D.replace(/[\r\n=]/g,""),K=ee.length,R=d,Q=0,L=[];for(B=0;B<K;B++)B%4==0&&B&&(L.push(Q>>16&255),L.push(Q>>8&255),L.push(Q&255)),Q=Q<<6|R.indexOf(ee.charAt(B));return U=K%4*6,U===0?(L.push(Q>>16&255),L.push(Q>>8&255),L.push(Q&255)):U===18?(L.push(Q>>10&255),L.push(Q>>2&255)):U===12&&L.push(Q>>4&255),c?c.from?c.from(L):new c(L):L}function w(D){var B="",U=0,ee,K,R=D.length,Q=d;for(ee=0;ee<R;ee++)ee%3==0&&ee&&(B+=Q[U>>18&63],B+=Q[U>>12&63],B+=Q[U>>6&63],B+=Q[U&63]),U=(U<<8)+D[ee];return K=R%3,K===0?(B+=Q[U>>18&63],B+=Q[U>>12&63],B+=Q[U>>6&63],B+=Q[U&63]):K===2?(B+=Q[U>>10&63],B+=Q[U>>4&63],B+=Q[U<<2&63],B+=Q[64]):K===1&&(B+=Q[U>>2&63],B+=Q[U<<4&63],B+=Q[64],B+=Q[64]),B}function T(D){return c&&c.isBuffer(D)}h.exports=new m("tag:yaml.org,2002:binary",{kind:"scalar",resolve:x,construct:A,predicate:T,represent:w})},2648:(h,F,o)=>{"use strict";var c=o(53899);function v(x){if(x===null)return!1;var A=x.length;return A===4&&(x==="true"||x==="True"||x==="TRUE")||A===5&&(x==="false"||x==="False"||x==="FALSE")}function m(x){return x==="true"||x==="True"||x==="TRUE"}function d(x){return Object.prototype.toString.call(x)==="[object Boolean]"}h.exports=new c("tag:yaml.org,2002:bool",{kind:"scalar",resolve:v,construct:m,predicate:d,represent:{lowercase:function(x){return x?"true":"false"},uppercase:function(x){return x?"TRUE":"FALSE"},camelcase:function(x){return x?"True":"False"}},defaultStyle:"lowercase"})},53456:(h,F,o)=>{"use strict";var c=o(25596),v=o(53899),m=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function d(D){return!(D===null||!m.test(D)||D[D.length-1]==="_")}function x(D){var B,U,ee,K;return B=D.replace(/_/g,"").toLowerCase(),U=B[0]==="-"?-1:1,K=[],"+-".indexOf(B[0])>=0&&(B=B.slice(1)),B===".inf"?U===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:B===".nan"?NaN:B.indexOf(":")>=0?(B.split(":").forEach(function(R){K.unshift(parseFloat(R,10))}),B=0,ee=1,K.forEach(function(R){B+=R*ee,ee*=60}),U*B):U*parseFloat(B,10)}var A=/^[-+]?[0-9]+e/;function w(D,B){var U;if(isNaN(D))switch(B){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===D)switch(B){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===D)switch(B){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(c.isNegativeZero(D))return"-0.0";return U=D.toString(10),A.test(U)?U.replace("e",".e"):U}function T(D){return Object.prototype.toString.call(D)==="[object Number]"&&(D%1!=0||c.isNegativeZero(D))}h.exports=new v("tag:yaml.org,2002:float",{kind:"scalar",resolve:d,construct:x,predicate:T,represent:w,defaultStyle:"lowercase"})},95979:(h,F,o)=>{"use strict";var c=o(25596),v=o(53899);function m(D){return 48<=D&&D<=57||65<=D&&D<=70||97<=D&&D<=102}function d(D){return 48<=D&&D<=55}function x(D){return 48<=D&&D<=57}function A(D){if(D===null)return!1;var B=D.length,U=0,ee=!1,K;if(!B)return!1;if(K=D[U],(K==="-"||K==="+")&&(K=D[++U]),K==="0"){if(U+1===B)return!0;if(K=D[++U],K==="b"){for(U++;U<B;U++)if(K=D[U],K!=="_"){if(K!=="0"&&K!=="1")return!1;ee=!0}return ee&&K!=="_"}if(K==="x"){for(U++;U<B;U++)if(K=D[U],K!=="_"){if(!m(D.charCodeAt(U)))return!1;ee=!0}return ee&&K!=="_"}for(;U<B;U++)if(K=D[U],K!=="_"){if(!d(D.charCodeAt(U)))return!1;ee=!0}return ee&&K!=="_"}if(K==="_")return!1;for(;U<B;U++)if(K=D[U],K!=="_"){if(K===":")break;if(!x(D.charCodeAt(U)))return!1;ee=!0}return!ee||K==="_"?!1:K!==":"?!0:/^(:[0-5]?[0-9])+$/.test(D.slice(U))}function w(D){var B=D,U=1,ee,K,R=[];return B.indexOf("_")!==-1&&(B=B.replace(/_/g,"")),ee=B[0],(ee==="-"||ee==="+")&&(ee==="-"&&(U=-1),B=B.slice(1),ee=B[0]),B==="0"?0:ee==="0"?B[1]==="b"?U*parseInt(B.slice(2),2):B[1]==="x"?U*parseInt(B,16):U*parseInt(B,8):B.indexOf(":")!==-1?(B.split(":").forEach(function(Q){R.unshift(parseInt(Q,10))}),B=0,K=1,R.forEach(function(Q){B+=Q*K,K*=60}),U*B):U*parseInt(B,10)}function T(D){return Object.prototype.toString.call(D)==="[object Number]"&&D%1==0&&!c.isNegativeZero(D)}h.exports=new v("tag:yaml.org,2002:int",{kind:"scalar",resolve:A,construct:w,predicate:T,represent:{binary:function(D){return D>=0?"0b"+D.toString(2):"-0b"+D.toString(2).slice(1)},octal:function(D){return D>=0?"0"+D.toString(8):"-0"+D.toString(8).slice(1)},decimal:function(D){return D.toString(10)},hexadecimal:function(D){return D>=0?"0x"+D.toString(16).toUpperCase():"-0x"+D.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},89811:(h,F,o)=>{"use strict";var c;try{var v=void 0;c=o(88150)}catch(T){typeof window!="undefined"&&(c=window.esprima)}var m=o(53899);function d(T){if(T===null)return!1;try{var D="("+T+")",B=c.parse(D,{range:!0});return!(B.type!=="Program"||B.body.length!==1||B.body[0].type!=="ExpressionStatement"||B.body[0].expression.type!=="ArrowFunctionExpression"&&B.body[0].expression.type!=="FunctionExpression")}catch(U){return!1}}function x(T){var D="("+T+")",B=c.parse(D,{range:!0}),U=[],ee;if(B.type!=="Program"||B.body.length!==1||B.body[0].type!=="ExpressionStatement"||B.body[0].expression.type!=="ArrowFunctionExpression"&&B.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return B.body[0].expression.params.forEach(function(K){U.push(K.name)}),ee=B.body[0].expression.body.range,B.body[0].expression.body.type==="BlockStatement"?new Function(U,D.slice(ee[0]+1,ee[1]-1)):new Function(U,"return "+D.slice(ee[0],ee[1]))}function A(T){return T.toString()}function w(T){return Object.prototype.toString.call(T)==="[object Function]"}h.exports=new m("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:d,construct:x,predicate:w,represent:A})},97287:(h,F,o)=>{"use strict";var c=o(53899);function v(A){if(A===null||A.length===0)return!1;var w=A,T=/\/([gim]*)$/.exec(A),D="";return!(w[0]==="/"&&(T&&(D=T[1]),D.length>3||w[w.length-D.length-1]!=="/"))}function m(A){var w=A,T=/\/([gim]*)$/.exec(A),D="";return w[0]==="/"&&(T&&(D=T[1]),w=w.slice(1,w.length-D.length-1)),new RegExp(w,D)}function d(A){var w="/"+A.source+"/";return A.global&&(w+="g"),A.multiline&&(w+="m"),A.ignoreCase&&(w+="i"),w}function x(A){return Object.prototype.toString.call(A)==="[object RegExp]"}h.exports=new c("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:v,construct:m,predicate:x,represent:d})},70575:(h,F,o)=>{"use strict";var c=o(53899);function v(){return!0}function m(){}function d(){return""}function x(A){return typeof A=="undefined"}h.exports=new c("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:v,construct:m,predicate:x,represent:d})},86553:(h,F,o)=>{"use strict";var c=o(53899);h.exports=new c("tag:yaml.org,2002:map",{kind:"mapping",construct:function(v){return v!==null?v:{}}})},243:(h,F,o)=>{"use strict";var c=o(53899);function v(m){return m==="<<"||m===null}h.exports=new c("tag:yaml.org,2002:merge",{kind:"scalar",resolve:v})},3022:(h,F,o)=>{"use strict";var c=o(53899);function v(x){if(x===null)return!0;var A=x.length;return A===1&&x==="~"||A===4&&(x==="null"||x==="Null"||x==="NULL")}function m(){return null}function d(x){return x===null}h.exports=new c("tag:yaml.org,2002:null",{kind:"scalar",resolve:v,construct:m,predicate:d,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},3878:(h,F,o)=>{"use strict";var c=o(53899),v=Object.prototype.hasOwnProperty,m=Object.prototype.toString;function d(A){if(A===null)return!0;var w=[],T,D,B,U,ee,K=A;for(T=0,D=K.length;T<D;T+=1){if(B=K[T],ee=!1,m.call(B)!=="[object Object]")return!1;for(U in B)if(v.call(B,U))if(!ee)ee=!0;else return!1;if(!ee)return!1;if(w.indexOf(U)===-1)w.push(U);else return!1}return!0}function x(A){return A!==null?A:[]}h.exports=new c("tag:yaml.org,2002:omap",{kind:"sequence",resolve:d,construct:x})},68244:(h,F,o)=>{"use strict";var c=o(53899),v=Object.prototype.toString;function m(x){if(x===null)return!0;var A,w,T,D,B,U=x;for(B=new Array(U.length),A=0,w=U.length;A<w;A+=1){if(T=U[A],v.call(T)!=="[object Object]"||(D=Object.keys(T),D.length!==1))return!1;B[A]=[D[0],T[D[0]]]}return!0}function d(x){if(x===null)return[];var A,w,T,D,B,U=x;for(B=new Array(U.length),A=0,w=U.length;A<w;A+=1)T=U[A],D=Object.keys(T),B[A]=[D[0],T[D[0]]];return B}h.exports=new c("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:m,construct:d})},43745:(h,F,o)=>{"use strict";var c=o(53899);h.exports=new c("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(v){return v!==null?v:[]}})},67300:(h,F,o)=>{"use strict";var c=o(53899),v=Object.prototype.hasOwnProperty;function m(x){if(x===null)return!0;var A,w=x;for(A in w)if(v.call(w,A)&&w[A]!==null)return!1;return!0}function d(x){return x!==null?x:{}}h.exports=new c("tag:yaml.org,2002:set",{kind:"mapping",resolve:m,construct:d})},79483:(h,F,o)=>{"use strict";var c=o(53899);h.exports=new c("tag:yaml.org,2002:str",{kind:"scalar",construct:function(v){return v!==null?v:""}})},56145:(h,F,o)=>{"use strict";var c=o(53899),v=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),m=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function d(w){return w===null?!1:v.exec(w)!==null||m.exec(w)!==null}function x(w){var T,D,B,U,ee,K,R,Q=0,L=null,P,V,X;if(T=v.exec(w),T===null&&(T=m.exec(w)),T===null)throw new Error("Date resolve error");if(D=+T[1],B=+T[2]-1,U=+T[3],!T[4])return new Date(Date.UTC(D,B,U));if(ee=+T[4],K=+T[5],R=+T[6],T[7]){for(Q=T[7].slice(0,3);Q.length<3;)Q+="0";Q=+Q}return T[9]&&(P=+T[10],V=+(T[11]||0),L=(P*60+V)*6e4,T[9]==="-"&&(L=-L)),X=new Date(Date.UTC(D,B,U,ee,K,R,Q)),L&&X.setTime(X.getTime()-L),X}function A(w){return w.toISOString()}h.exports=new c("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:d,construct:x,instanceOf:Date,represent:A})},18552:(h,F,o)=>{var c=o(10852),v=o(55639),m=c(v,"DataView");h.exports=m},1989:(h,F,o)=>{var c=o(51789),v=o(80401),m=o(57667),d=o(21327),x=o(81866);function A(w){var T=-1,D=w==null?0:w.length;for(this.clear();++T<D;){var B=w[T];this.set(B[0],B[1])}}A.prototype.clear=c,A.prototype.delete=v,A.prototype.get=m,A.prototype.has=d,A.prototype.set=x,h.exports=A},38407:(h,F,o)=>{var c=o(27040),v=o(14125),m=o(82117),d=o(67518),x=o(13399);function A(w){var T=-1,D=w==null?0:w.length;for(this.clear();++T<D;){var B=w[T];this.set(B[0],B[1])}}A.prototype.clear=c,A.prototype.delete=v,A.prototype.get=m,A.prototype.has=d,A.prototype.set=x,h.exports=A},57071:(h,F,o)=>{var c=o(10852),v=o(55639),m=c(v,"Map");h.exports=m},83369:(h,F,o)=>{var c=o(24785),v=o(11285),m=o(96e3),d=o(49916),x=o(95265);function A(w){var T=-1,D=w==null?0:w.length;for(this.clear();++T<D;){var B=w[T];this.set(B[0],B[1])}}A.prototype.clear=c,A.prototype.delete=v,A.prototype.get=m,A.prototype.has=d,A.prototype.set=x,h.exports=A},53818:(h,F,o)=>{var c=o(10852),v=o(55639),m=c(v,"Promise");h.exports=m},58525:(h,F,o)=>{var c=o(10852),v=o(55639),m=c(v,"Set");h.exports=m},88668:(h,F,o)=>{var c=o(83369),v=o(90619),m=o(72385);function d(x){var A=-1,w=x==null?0:x.length;for(this.__data__=new c;++A<w;)this.add(x[A])}d.prototype.add=d.prototype.push=v,d.prototype.has=m,h.exports=d},46384:(h,F,o)=>{var c=o(38407),v=o(37465),m=o(63779),d=o(67599),x=o(44758),A=o(34309);function w(T){var D=this.__data__=new c(T);this.size=D.size}w.prototype.clear=v,w.prototype.delete=m,w.prototype.get=d,w.prototype.has=x,w.prototype.set=A,h.exports=w},62705:(h,F,o)=>{var c=o(55639),v=c.Symbol;h.exports=v},11149:(h,F,o)=>{var c=o(55639),v=c.Uint8Array;h.exports=v},70577:(h,F,o)=>{var c=o(10852),v=o(55639),m=c(v,"WeakMap");h.exports=m},96874:h=>{function F(o,c,v){switch(v.length){case 0:return o.call(c);case 1:return o.call(c,v[0]);case 2:return o.call(c,v[0],v[1]);case 3:return o.call(c,v[0],v[1],v[2])}return o.apply(c,v)}h.exports=F},77412:h=>{function F(o,c){for(var v=-1,m=o==null?0:o.length;++v<m&&c(o[v],v,o)!==!1;);return o}h.exports=F},34963:h=>{function F(o,c){for(var v=-1,m=o==null?0:o.length,d=0,x=[];++v<m;){var A=o[v];c(A,v,o)&&(x[d++]=A)}return x}h.exports=F},14636:(h,F,o)=>{var c=o(22545),v=o(35694),m=o(1469),d=o(44144),x=o(65776),A=o(36719),w=Object.prototype,T=w.hasOwnProperty;function D(B,U){var ee=m(B),K=!ee&&v(B),R=!ee&&!K&&d(B),Q=!ee&&!K&&!R&&A(B),L=ee||K||R||Q,P=L?c(B.length,String):[],V=P.length;for(var X in B)(U||T.call(B,X))&&!(L&&(X=="length"||R&&(X=="offset"||X=="parent")||Q&&(X=="buffer"||X=="byteLength"||X=="byteOffset")||x(X,V)))&&P.push(X);return P}h.exports=D},29932:h=>{function F(o,c){for(var v=-1,m=o==null?0:o.length,d=Array(m);++v<m;)d[v]=c(o[v],v,o);return d}h.exports=F},62488:h=>{function F(o,c){for(var v=-1,m=c.length,d=o.length;++v<m;)o[d+v]=c[v];return o}h.exports=F},82908:h=>{function F(o,c){for(var v=-1,m=o==null?0:o.length;++v<m;)if(c(o[v],v,o))return!0;return!1}h.exports=F},34865:(h,F,o)=>{var c=o(89465),v=o(77813),m=Object.prototype,d=m.hasOwnProperty;function x(A,w,T){var D=A[w];(!(d.call(A,w)&&v(D,T))||T===void 0&&!(w in A))&&c(A,w,T)}h.exports=x},18470:(h,F,o)=>{var c=o(77813);function v(m,d){for(var x=m.length;x--;)if(c(m[x][0],d))return x;return-1}h.exports=v},44037:(h,F,o)=>{var c=o(98363),v=o(3674);function m(d,x){return d&&c(x,v(x),d)}h.exports=m},63886:(h,F,o)=>{var c=o(98363),v=o(81704);function m(d,x){return d&&c(x,v(x),d)}h.exports=m},89465:(h,F,o)=>{var c=o(38777);function v(m,d,x){d=="__proto__"&&c?c(m,d,{configurable:!0,enumerable:!0,value:x,writable:!0}):m[d]=x}h.exports=v},29750:h=>{function F(o,c,v){return o===o&&(v!==void 0&&(o=o<=v?o:v),c!==void 0&&(o=o>=c?o:c)),o}h.exports=F},85990:(h,F,o)=>{var c=o(46384),v=o(77412),m=o(34865),d=o(44037),x=o(63886),A=o(64626),w=o(278),T=o(18805),D=o(1911),B=o(58234),U=o(46904),ee=o(98882),K=o(43824),R=o(29148),Q=o(38517),L=o(1469),P=o(44144),V=o(56688),X=o(13218),z=o(72928),G=o(3674),Z=o(81704),ce=1,te=2,se=4,be="[object Arguments]",me="[object Array]",he="[object Boolean]",fe="[object Date]",oe="[object Error]",Re="[object Function]",Ue="[object GeneratorFunction]",Le="[object Map]",ke="[object Number]",tt="[object Object]",Je="[object RegExp]",qe="[object Set]",at="[object String]",ut="[object Symbol]",gt="[object WeakMap]",Ze="[object ArrayBuffer]",lt="[object DataView]",pt="[object Float32Array]",vt="[object Float64Array]",dt="[object Int8Array]",It="[object Int16Array]",Ft="[object Int32Array]",Et="[object Uint8Array]",Ut="[object Uint8ClampedArray]",jt="[object Uint16Array]",Gt="[object Uint32Array]",wt={};wt[be]=wt[me]=wt[Ze]=wt[lt]=wt[he]=wt[fe]=wt[pt]=wt[vt]=wt[dt]=wt[It]=wt[Ft]=wt[Le]=wt[ke]=wt[tt]=wt[Je]=wt[qe]=wt[at]=wt[ut]=wt[Et]=wt[Ut]=wt[jt]=wt[Gt]=!0,wt[oe]=wt[Re]=wt[gt]=!1;function Mt(bt,ve,$,Y,ye,de){var Ae,S=ve&ce,Pe=ve&te,H=ve&se;if($&&(Ae=ye?$(bt,Y,ye,de):$(bt)),Ae!==void 0)return Ae;if(!X(bt))return bt;var O=L(bt);if(O){if(Ae=K(bt),!S)return w(bt,Ae)}else{var I=ee(bt),re=I==Re||I==Ue;if(P(bt))return A(bt,S);if(I==tt||I==be||re&&!ye){if(Ae=Pe||re?{}:Q(bt),!S)return Pe?D(bt,x(Ae,bt)):T(bt,d(Ae,bt))}else{if(!wt[I])return ye?bt:{};Ae=R(bt,I,S)}}de||(de=new c);var N=de.get(bt);if(N)return N;de.set(bt,Ae),z(bt)?bt.forEach(function(Oe){Ae.add(Mt(Oe,ve,$,Oe,bt,de))}):V(bt)&&bt.forEach(function(Oe,Ie){Ae.set(Ie,Mt(Oe,ve,$,Ie,bt,de))});var _=H?Pe?U:B:Pe?Z:G,ue=O?void 0:_(bt);return v(ue||bt,function(Oe,Ie){ue&&(Ie=Oe,Oe=bt[Ie]),m(Ae,Ie,Mt(Oe,ve,$,Ie,bt,de))}),Ae}h.exports=Mt},3118:(h,F,o)=>{var c=o(13218),v=Object.create,m=function(){function d(){}return function(x){if(!c(x))return{};if(v)return v(x);d.prototype=x;var A=new d;return d.prototype=void 0,A}}();h.exports=m},41848:h=>{function F(o,c,v,m){for(var d=o.length,x=v+(m?1:-1);m?x--:++x<d;)if(c(o[x],x,o))return x;return-1}h.exports=F},35764:(h,F,o)=>{var c=o(62488),v=o(37285);function m(d,x,A,w,T){var D=-1,B=d.length;for(A||(A=v),T||(T=[]);++D<B;){var U=d[D];x>0&&A(U)?x>1?m(U,x-1,A,w,T):c(T,U):w||(T[T.length]=U)}return T}h.exports=m},97786:(h,F,o)=>{var c=o(71811),v=o(40327);function m(d,x){x=c(x,d);for(var A=0,w=x.length;d!=null&&A<w;)d=d[v(x[A++])];return A&&A==w?d:void 0}h.exports=m},68866:(h,F,o)=>{var c=o(62488),v=o(1469);function m(d,x,A){var w=x(d);return v(d)?w:c(w,A(d))}h.exports=m},44239:(h,F,o)=>{var c=o(62705),v=o(89607),m=o(2333),d="[object Null]",x="[object Undefined]",A=c?c.toStringTag:void 0;function w(T){return T==null?T===void 0?x:d:A&&A in Object(T)?v(T):m(T)}h.exports=w},13:h=>{function F(o,c){return o!=null&&c in Object(o)}h.exports=F},9454:(h,F,o)=>{var c=o(44239),v=o(37005),m="[object Arguments]";function d(x){return v(x)&&c(x)==m}h.exports=d},90939:(h,F,o)=>{var c=o(2492),v=o(37005);function m(d,x,A,w,T){return d===x?!0:d==null||x==null||!v(d)&&!v(x)?d!==d&&x!==x:c(d,x,A,w,m,T)}h.exports=m},2492:(h,F,o)=>{var c=o(46384),v=o(67114),m=o(18351),d=o(16096),x=o(98882),A=o(1469),w=o(44144),T=o(36719),D=1,B="[object Arguments]",U="[object Array]",ee="[object Object]",K=Object.prototype,R=K.hasOwnProperty;function Q(L,P,V,X,z,G){var Z=A(L),ce=A(P),te=Z?U:x(L),se=ce?U:x(P);te=te==B?ee:te,se=se==B?ee:se;var be=te==ee,me=se==ee,he=te==se;if(he&&w(L)){if(!w(P))return!1;Z=!0,be=!1}if(he&&!be)return G||(G=new c),Z||T(L)?v(L,P,V,X,z,G):m(L,P,te,V,X,z,G);if(!(V&D)){var fe=be&&R.call(L,"__wrapped__"),oe=me&&R.call(P,"__wrapped__");if(fe||oe){var Re=fe?L.value():L,Ue=oe?P.value():P;return G||(G=new c),z(Re,Ue,V,X,G)}}return he?(G||(G=new c),d(L,P,V,X,z,G)):!1}h.exports=Q},25588:(h,F,o)=>{var c=o(98882),v=o(37005),m="[object Map]";function d(x){return v(x)&&c(x)==m}h.exports=d},2958:(h,F,o)=>{var c=o(46384),v=o(90939),m=1,d=2;function x(A,w,T,D){var B=T.length,U=B,ee=!D;if(A==null)return!U;for(A=Object(A);B--;){var K=T[B];if(ee&&K[2]?K[1]!==A[K[0]]:!(K[0]in A))return!1}for(;++B<U;){K=T[B];var R=K[0],Q=A[R],L=K[1];if(ee&&K[2]){if(Q===void 0&&!(R in A))return!1}else{var P=new c;if(D)var V=D(Q,L,R,A,w,P);if(!(V===void 0?v(L,Q,m|d,D,P):V))return!1}}return!0}h.exports=x},28458:(h,F,o)=>{var c=o(23560),v=o(15346),m=o(13218),d=o(80346),x=/[\\^$.*+?()[\]{}|]/g,A=/^\[object .+?Constructor\]$/,w=Function.prototype,T=Object.prototype,D=w.toString,B=T.hasOwnProperty,U=RegExp("^"+D.call(B).replace(x,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ee(K){if(!m(K)||v(K))return!1;var R=c(K)?U:A;return R.test(d(K))}h.exports=ee},29221:(h,F,o)=>{var c=o(98882),v=o(37005),m="[object Set]";function d(x){return v(x)&&c(x)==m}h.exports=d},38749:(h,F,o)=>{var c=o(44239),v=o(41780),m=o(37005),d="[object Arguments]",x="[object Array]",A="[object Boolean]",w="[object Date]",T="[object Error]",D="[object Function]",B="[object Map]",U="[object Number]",ee="[object Object]",K="[object RegExp]",R="[object Set]",Q="[object String]",L="[object WeakMap]",P="[object ArrayBuffer]",V="[object DataView]",X="[object Float32Array]",z="[object Float64Array]",G="[object Int8Array]",Z="[object Int16Array]",ce="[object Int32Array]",te="[object Uint8Array]",se="[object Uint8ClampedArray]",be="[object Uint16Array]",me="[object Uint32Array]",he={};he[X]=he[z]=he[G]=he[Z]=he[ce]=he[te]=he[se]=he[be]=he[me]=!0,he[d]=he[x]=he[P]=he[A]=he[V]=he[w]=he[T]=he[D]=he[B]=he[U]=he[ee]=he[K]=he[R]=he[Q]=he[L]=!1;function fe(oe){return m(oe)&&v(oe.length)&&!!he[c(oe)]}h.exports=fe},67206:(h,F,o)=>{var c=o(91573),v=o(16432),m=o(6557),d=o(1469),x=o(39601);function A(w){return typeof w=="function"?w:w==null?m:typeof w=="object"?d(w)?v(w[0],w[1]):c(w):x(w)}h.exports=A},280:(h,F,o)=>{var c=o(25726),v=o(86916),m=Object.prototype,d=m.hasOwnProperty;function x(A){if(!c(A))return v(A);var w=[];for(var T in Object(A))d.call(A,T)&&T!="constructor"&&w.push(T);return w}h.exports=x},10313:(h,F,o)=>{var c=o(13218),v=o(25726),m=o(33498),d=Object.prototype,x=d.hasOwnProperty;function A(w){if(!c(w))return m(w);var T=v(w),D=[];for(var B in w)B=="constructor"&&(T||!x.call(w,B))||D.push(B);return D}h.exports=A},91573:(h,F,o)=>{var c=o(2958),v=o(1499),m=o(42634);function d(x){var A=v(x);return A.length==1&&A[0][2]?m(A[0][0],A[0][1]):function(w){return w===x||c(w,x,A)}}h.exports=d},16432:(h,F,o)=>{var c=o(90939),v=o(27361),m=o(79095),d=o(15403),x=o(89162),A=o(42634),w=o(40327),T=1,D=2;function B(U,ee){return d(U)&&x(ee)?A(w(U),ee):function(K){var R=v(K,U);return R===void 0&&R===ee?m(K,U):c(ee,R,T|D)}}h.exports=B},25970:(h,F,o)=>{var c=o(63012),v=o(79095);function m(d,x){return c(d,x,function(A,w){return v(d,w)})}h.exports=m},63012:(h,F,o)=>{var c=o(97786),v=o(10611),m=o(71811);function d(x,A,w){for(var T=-1,D=A.length,B={};++T<D;){var U=A[T],ee=c(x,U);w(ee,U)&&v(B,m(U,x),ee)}return B}h.exports=d},40371:h=>{function F(o){return function(c){return c==null?void 0:c[o]}}h.exports=F},79152:(h,F,o)=>{var c=o(97786);function v(m){return function(d){return c(d,m)}}h.exports=v},5976:(h,F,o)=>{var c=o(6557),v=o(45357),m=o(30061);function d(x,A){return m(v(x,A,c),x+"")}h.exports=d},10611:(h,F,o)=>{var c=o(34865),v=o(71811),m=o(65776),d=o(13218),x=o(40327);function A(w,T,D,B){if(!d(w))return w;T=v(T,w);for(var U=-1,ee=T.length,K=ee-1,R=w;R!=null&&++U<ee;){var Q=x(T[U]),L=D;if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return w;if(U!=K){var P=R[Q];L=B?B(P,Q,R):void 0,L===void 0&&(L=d(P)?P:m(T[U+1])?[]:{})}c(R,Q,L),R=R[Q]}return w}h.exports=A},56560:(h,F,o)=>{var c=o(75703),v=o(38777),m=o(6557),d=v?function(x,A){return v(x,"toString",{configurable:!0,enumerable:!1,value:c(A),writable:!0})}:m;h.exports=d},22545:h=>{function F(o,c){for(var v=-1,m=Array(o);++v<o;)m[v]=c(v);return m}h.exports=F},80531:(h,F,o)=>{var c=o(62705),v=o(29932),m=o(1469),d=o(33448),x=1/0,A=c?c.prototype:void 0,w=A?A.toString:void 0;function T(D){if(typeof D=="string")return D;if(m(D))return v(D,T)+"";if(d(D))return w?w.call(D):"";var B=D+"";return B=="0"&&1/D==-x?"-0":B}h.exports=T},27561:(h,F,o)=>{var c=o(67990),v=/^\s+/;function m(d){return d&&d.slice(0,c(d)+1).replace(v,"")}h.exports=m},7518:h=>{function F(o){return function(c){return o(c)}}h.exports=F},74757:h=>{function F(o,c){return o.has(c)}h.exports=F},71811:(h,F,o)=>{var c=o(1469),v=o(15403),m=o(55514),d=o(79833);function x(A,w){return c(A)?A:v(A,w)?[A]:m(d(A))}h.exports=x},74318:(h,F,o)=>{var c=o(11149);function v(m){var d=new m.constructor(m.byteLength);return new c(d).set(new c(m)),d}h.exports=v},64626:(h,F,o)=>{h=o.nmd(h);var c=o(55639),v=F&&!F.nodeType&&F,m=v&&!0&&h&&!h.nodeType&&h,d=m&&m.exports===v,x=d?c.Buffer:void 0,A=x?x.allocUnsafe:void 0;function w(T,D){if(D)return T.slice();var B=T.length,U=A?A(B):new T.constructor(B);return T.copy(U),U}h.exports=w},57157:(h,F,o)=>{var c=o(74318);function v(m,d){var x=d?c(m.buffer):m.buffer;return new m.constructor(x,m.byteOffset,m.byteLength)}h.exports=v},93147:h=>{var F=/\w*$/;function o(c){var v=new c.constructor(c.source,F.exec(c));return v.lastIndex=c.lastIndex,v}h.exports=o},40419:(h,F,o)=>{var c=o(62705),v=c?c.prototype:void 0,m=v?v.valueOf:void 0;function d(x){return m?Object(m.call(x)):{}}h.exports=d},77133:(h,F,o)=>{var c=o(74318);function v(m,d){var x=d?c(m.buffer):m.buffer;return new m.constructor(x,m.byteOffset,m.length)}h.exports=v},278:h=>{function F(o,c){var v=-1,m=o.length;for(c||(c=Array(m));++v<m;)c[v]=o[v];return c}h.exports=F},98363:(h,F,o)=>{var c=o(34865),v=o(89465);function m(d,x,A,w){var T=!A;A||(A={});for(var D=-1,B=x.length;++D<B;){var U=x[D],ee=w?w(A[U],d[U],U,A,d):void 0;ee===void 0&&(ee=d[U]),T?v(A,U,ee):c(A,U,ee)}return A}h.exports=m},18805:(h,F,o)=>{var c=o(98363),v=o(99551);function m(d,x){return c(d,v(d),x)}h.exports=m},1911:(h,F,o)=>{var c=o(98363),v=o(51442);function m(d,x){return c(d,v(d),x)}h.exports=m},14429:(h,F,o)=>{var c=o(55639),v=c["__core-js_shared__"];h.exports=v},21463:(h,F,o)=>{var c=o(5976),v=o(16612);function m(d){return c(function(x,A){var w=-1,T=A.length,D=T>1?A[T-1]:void 0,B=T>2?A[2]:void 0;for(D=d.length>3&&typeof D=="function"?(T--,D):void 0,B&&v(A[0],A[1],B)&&(D=T<3?void 0:D,T=1),x=Object(x);++w<T;){var U=A[w];U&&d(x,U,w,D)}return x})}h.exports=m},67740:(h,F,o)=>{var c=o(67206),v=o(98612),m=o(3674);function d(x){return function(A,w,T){var D=Object(A);if(!v(A)){var B=c(w,3);A=m(A),w=function(ee){return B(D[ee],ee,D)}}var U=x(A,w,T);return U>-1?D[B?A[U]:U]:void 0}}h.exports=d},38777:(h,F,o)=>{var c=o(10852),v=function(){try{var m=c(Object,"defineProperty");return m({},"",{}),m}catch(d){}}();h.exports=v},67114:(h,F,o)=>{var c=o(88668),v=o(82908),m=o(74757),d=1,x=2;function A(w,T,D,B,U,ee){var K=D&d,R=w.length,Q=T.length;if(R!=Q&&!(K&&Q>R))return!1;var L=ee.get(w),P=ee.get(T);if(L&&P)return L==T&&P==w;var V=-1,X=!0,z=D&x?new c:void 0;for(ee.set(w,T),ee.set(T,w);++V<R;){var G=w[V],Z=T[V];if(B)var ce=K?B(Z,G,V,T,w,ee):B(G,Z,V,w,T,ee);if(ce!==void 0){if(ce)continue;X=!1;break}if(z){if(!v(T,function(te,se){if(!m(z,se)&&(G===te||U(G,te,D,B,ee)))return z.push(se)})){X=!1;break}}else if(!(G===Z||U(G,Z,D,B,ee))){X=!1;break}}return ee.delete(w),ee.delete(T),X}h.exports=A},18351:(h,F,o)=>{var c=o(62705),v=o(11149),m=o(77813),d=o(67114),x=o(68776),A=o(21814),w=1,T=2,D="[object Boolean]",B="[object Date]",U="[object Error]",ee="[object Map]",K="[object Number]",R="[object RegExp]",Q="[object Set]",L="[object String]",P="[object Symbol]",V="[object ArrayBuffer]",X="[object DataView]",z=c?c.prototype:void 0,G=z?z.valueOf:void 0;function Z(ce,te,se,be,me,he,fe){switch(se){case X:if(ce.byteLength!=te.byteLength||ce.byteOffset!=te.byteOffset)return!1;ce=ce.buffer,te=te.buffer;case V:return!(ce.byteLength!=te.byteLength||!he(new v(ce),new v(te)));case D:case B:case K:return m(+ce,+te);case U:return ce.name==te.name&&ce.message==te.message;case R:case L:return ce==te+"";case ee:var oe=x;case Q:var Re=be&w;if(oe||(oe=A),ce.size!=te.size&&!Re)return!1;var Ue=fe.get(ce);if(Ue)return Ue==te;be|=T,fe.set(ce,te);var Le=d(oe(ce),oe(te),be,me,he,fe);return fe.delete(ce),Le;case P:if(G)return G.call(ce)==G.call(te)}return!1}h.exports=Z},16096:(h,F,o)=>{var c=o(58234),v=1,m=Object.prototype,d=m.hasOwnProperty;function x(A,w,T,D,B,U){var ee=T&v,K=c(A),R=K.length,Q=c(w),L=Q.length;if(R!=L&&!ee)return!1;for(var P=R;P--;){var V=K[P];if(!(ee?V in w:d.call(w,V)))return!1}var X=U.get(A),z=U.get(w);if(X&&z)return X==w&&z==A;var G=!0;U.set(A,w),U.set(w,A);for(var Z=ee;++P<R;){V=K[P];var ce=A[V],te=w[V];if(D)var se=ee?D(te,ce,V,w,A,U):D(ce,te,V,A,w,U);if(!(se===void 0?ce===te||B(ce,te,T,D,U):se)){G=!1;break}Z||(Z=V=="constructor")}if(G&&!Z){var be=A.constructor,me=w.constructor;be!=me&&"constructor"in A&&"constructor"in w&&!(typeof be=="function"&&be instanceof be&&typeof me=="function"&&me instanceof me)&&(G=!1)}return U.delete(A),U.delete(w),G}h.exports=x},99021:(h,F,o)=>{var c=o(85564),v=o(45357),m=o(30061);function d(x){return m(v(x,void 0,c),x+"")}h.exports=d},31957:(h,F,o)=>{var c=typeof o.g=="object"&&o.g&&o.g.Object===Object&&o.g;h.exports=c},58234:(h,F,o)=>{var c=o(68866),v=o(99551),m=o(3674);function d(x){return c(x,m,v)}h.exports=d},46904:(h,F,o)=>{var c=o(68866),v=o(51442),m=o(81704);function d(x){return c(x,m,v)}h.exports=d},45050:(h,F,o)=>{var c=o(37019);function v(m,d){var x=m.__data__;return c(d)?x[typeof d=="string"?"string":"hash"]:x.map}h.exports=v},1499:(h,F,o)=>{var c=o(89162),v=o(3674);function m(d){for(var x=v(d),A=x.length;A--;){var w=x[A],T=d[w];x[A]=[w,T,c(T)]}return x}h.exports=m},10852:(h,F,o)=>{var c=o(28458),v=o(47801);function m(d,x){var A=v(d,x);return c(A)?A:void 0}h.exports=m},85924:(h,F,o)=>{var c=o(5569),v=c(Object.getPrototypeOf,Object);h.exports=v},89607:(h,F,o)=>{var c=o(62705),v=Object.prototype,m=v.hasOwnProperty,d=v.toString,x=c?c.toStringTag:void 0;function A(w){var T=m.call(w,x),D=w[x];try{w[x]=void 0;var B=!0}catch(ee){}var U=d.call(w);return B&&(T?w[x]=D:delete w[x]),U}h.exports=A},99551:(h,F,o)=>{var c=o(34963),v=o(70479),m=Object.prototype,d=m.propertyIsEnumerable,x=Object.getOwnPropertySymbols,A=x?function(w){return w==null?[]:(w=Object(w),c(x(w),function(T){return d.call(w,T)}))}:v;h.exports=A},51442:(h,F,o)=>{var c=o(62488),v=o(85924),m=o(99551),d=o(70479),x=Object.getOwnPropertySymbols,A=x?function(w){for(var T=[];w;)c(T,m(w)),w=v(w);return T}:d;h.exports=A},98882:(h,F,o)=>{var c=o(18552),v=o(57071),m=o(53818),d=o(58525),x=o(70577),A=o(44239),w=o(80346),T="[object Map]",D="[object Object]",B="[object Promise]",U="[object Set]",ee="[object WeakMap]",K="[object DataView]",R=w(c),Q=w(v),L=w(m),P=w(d),V=w(x),X=A;(c&&X(new c(new ArrayBuffer(1)))!=K||v&&X(new v)!=T||m&&X(m.resolve())!=B||d&&X(new d)!=U||x&&X(new x)!=ee)&&(X=function(z){var G=A(z),Z=G==D?z.constructor:void 0,ce=Z?w(Z):"";if(ce)switch(ce){case R:return K;case Q:return T;case L:return B;case P:return U;case V:return ee}return G}),h.exports=X},47801:h=>{function F(o,c){return o==null?void 0:o[c]}h.exports=F},222:(h,F,o)=>{var c=o(71811),v=o(35694),m=o(1469),d=o(65776),x=o(41780),A=o(40327);function w(T,D,B){D=c(D,T);for(var U=-1,ee=D.length,K=!1;++U<ee;){var R=A(D[U]);if(!(K=T!=null&&B(T,R)))break;T=T[R]}return K||++U!=ee?K:(ee=T==null?0:T.length,!!ee&&x(ee)&&d(R,ee)&&(m(T)||v(T)))}h.exports=w},51789:(h,F,o)=>{var c=o(94536);function v(){this.__data__=c?c(null):{},this.size=0}h.exports=v},80401:h=>{function F(o){var c=this.has(o)&&delete this.__data__[o];return this.size-=c?1:0,c}h.exports=F},57667:(h,F,o)=>{var c=o(94536),v="__lodash_hash_undefined__",m=Object.prototype,d=m.hasOwnProperty;function x(A){var w=this.__data__;if(c){var T=w[A];return T===v?void 0:T}return d.call(w,A)?w[A]:void 0}h.exports=x},21327:(h,F,o)=>{var c=o(94536),v=Object.prototype,m=v.hasOwnProperty;function d(x){var A=this.__data__;return c?A[x]!==void 0:m.call(A,x)}h.exports=d},81866:(h,F,o)=>{var c=o(94536),v="__lodash_hash_undefined__";function m(d,x){var A=this.__data__;return this.size+=this.has(d)?0:1,A[d]=c&&x===void 0?v:x,this}h.exports=m},43824:h=>{var F=Object.prototype,o=F.hasOwnProperty;function c(v){var m=v.length,d=new v.constructor(m);return m&&typeof v[0]=="string"&&o.call(v,"index")&&(d.index=v.index,d.input=v.input),d}h.exports=c},29148:(h,F,o)=>{var c=o(74318),v=o(57157),m=o(93147),d=o(40419),x=o(77133),A="[object Boolean]",w="[object Date]",T="[object Map]",D="[object Number]",B="[object RegExp]",U="[object Set]",ee="[object String]",K="[object Symbol]",R="[object ArrayBuffer]",Q="[object DataView]",L="[object Float32Array]",P="[object Float64Array]",V="[object Int8Array]",X="[object Int16Array]",z="[object Int32Array]",G="[object Uint8Array]",Z="[object Uint8ClampedArray]",ce="[object Uint16Array]",te="[object Uint32Array]";function se(be,me,he){var fe=be.constructor;switch(me){case R:return c(be);case A:case w:return new fe(+be);case Q:return v(be,he);case L:case P:case V:case X:case z:case G:case Z:case ce:case te:return x(be,he);case T:return new fe;case D:case ee:return new fe(be);case B:return m(be);case U:return new fe;case K:return d(be)}}h.exports=se},38517:(h,F,o)=>{var c=o(3118),v=o(85924),m=o(25726);function d(x){return typeof x.constructor=="function"&&!m(x)?c(v(x)):{}}h.exports=d},37285:(h,F,o)=>{var c=o(62705),v=o(35694),m=o(1469),d=c?c.isConcatSpreadable:void 0;function x(A){return m(A)||v(A)||!!(d&&A&&A[d])}h.exports=x},65776:h=>{var F=9007199254740991,o=/^(?:0|[1-9]\d*)$/;function c(v,m){var d=typeof v;return m=m==null?F:m,!!m&&(d=="number"||d!="symbol"&&o.test(v))&&v>-1&&v%1==0&&v<m}h.exports=c},16612:(h,F,o)=>{var c=o(77813),v=o(98612),m=o(65776),d=o(13218);function x(A,w,T){if(!d(T))return!1;var D=typeof w;return(D=="number"?v(T)&&m(w,T.length):D=="string"&&w in T)?c(T[w],A):!1}h.exports=x},15403:(h,F,o)=>{var c=o(1469),v=o(33448),m=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,d=/^\w*$/;function x(A,w){if(c(A))return!1;var T=typeof A;return T=="number"||T=="symbol"||T=="boolean"||A==null||v(A)?!0:d.test(A)||!m.test(A)||w!=null&&A in Object(w)}h.exports=x},37019:h=>{function F(o){var c=typeof o;return c=="string"||c=="number"||c=="symbol"||c=="boolean"?o!=="__proto__":o===null}h.exports=F},15346:(h,F,o)=>{var c=o(14429),v=function(){var d=/[^.]+$/.exec(c&&c.keys&&c.keys.IE_PROTO||"");return d?"Symbol(src)_1."+d:""}();function m(d){return!!v&&v in d}h.exports=m},25726:h=>{var F=Object.prototype;function o(c){var v=c&&c.constructor,m=typeof v=="function"&&v.prototype||F;return c===m}h.exports=o},89162:(h,F,o)=>{var c=o(13218);function v(m){return m===m&&!c(m)}h.exports=v},27040:h=>{function F(){this.__data__=[],this.size=0}h.exports=F},14125:(h,F,o)=>{var c=o(18470),v=Array.prototype,m=v.splice;function d(x){var A=this.__data__,w=c(A,x);if(w<0)return!1;var T=A.length-1;return w==T?A.pop():m.call(A,w,1),--this.size,!0}h.exports=d},82117:(h,F,o)=>{var c=o(18470);function v(m){var d=this.__data__,x=c(d,m);return x<0?void 0:d[x][1]}h.exports=v},67518:(h,F,o)=>{var c=o(18470);function v(m){return c(this.__data__,m)>-1}h.exports=v},13399:(h,F,o)=>{var c=o(18470);function v(m,d){var x=this.__data__,A=c(x,m);return A<0?(++this.size,x.push([m,d])):x[A][1]=d,this}h.exports=v},24785:(h,F,o)=>{var c=o(1989),v=o(38407),m=o(57071);function d(){this.size=0,this.__data__={hash:new c,map:new(m||v),string:new c}}h.exports=d},11285:(h,F,o)=>{var c=o(45050);function v(m){var d=c(this,m).delete(m);return this.size-=d?1:0,d}h.exports=v},96e3:(h,F,o)=>{var c=o(45050);function v(m){return c(this,m).get(m)}h.exports=v},49916:(h,F,o)=>{var c=o(45050);function v(m){return c(this,m).has(m)}h.exports=v},95265:(h,F,o)=>{var c=o(45050);function v(m,d){var x=c(this,m),A=x.size;return x.set(m,d),this.size+=x.size==A?0:1,this}h.exports=v},68776:h=>{function F(o){var c=-1,v=Array(o.size);return o.forEach(function(m,d){v[++c]=[d,m]}),v}h.exports=F},42634:h=>{function F(o,c){return function(v){return v==null?!1:v[o]===c&&(c!==void 0||o in Object(v))}}h.exports=F},24523:(h,F,o)=>{var c=o(88306),v=500;function m(d){var x=c(d,function(w){return A.size===v&&A.clear(),w}),A=x.cache;return x}h.exports=m},94536:(h,F,o)=>{var c=o(10852),v=c(Object,"create");h.exports=v},86916:(h,F,o)=>{var c=o(5569),v=c(Object.keys,Object);h.exports=v},33498:h=>{function F(o){var c=[];if(o!=null)for(var v in Object(o))c.push(v);return c}h.exports=F},31167:(h,F,o)=>{h=o.nmd(h);var c=o(31957),v=F&&!F.nodeType&&F,m=v&&!0&&h&&!h.nodeType&&h,d=m&&m.exports===v,x=d&&c.process,A=function(){try{var w=m&&m.require&&m.require("util").types;return w||x&&x.binding&&x.binding("util")}catch(T){}}();h.exports=A},2333:h=>{var F=Object.prototype,o=F.toString;function c(v){return o.call(v)}h.exports=c},5569:h=>{function F(o,c){return function(v){return o(c(v))}}h.exports=F},45357:(h,F,o)=>{var c=o(96874),v=Math.max;function m(d,x,A){return x=v(x===void 0?d.length-1:x,0),function(){for(var w=arguments,T=-1,D=v(w.length-x,0),B=Array(D);++T<D;)B[T]=w[x+T];T=-1;for(var U=Array(x+1);++T<x;)U[T]=w[T];return U[x]=A(B),c(d,this,U)}}h.exports=m},55639:(h,F,o)=>{var c=o(31957),v=typeof self=="object"&&self&&self.Object===Object&&self,m=c||v||Function("return this")();h.exports=m},90619:h=>{var F="__lodash_hash_undefined__";function o(c){return this.__data__.set(c,F),this}h.exports=o},72385:h=>{function F(o){return this.__data__.has(o)}h.exports=F},21814:h=>{function F(o){var c=-1,v=Array(o.size);return o.forEach(function(m){v[++c]=m}),v}h.exports=F},30061:(h,F,o)=>{var c=o(56560),v=o(21275),m=v(c);h.exports=m},21275:h=>{var F=800,o=16,c=Date.now;function v(m){var d=0,x=0;return function(){var A=c(),w=o-(A-x);if(x=A,w>0){if(++d>=F)return arguments[0]}else d=0;return m.apply(void 0,arguments)}}h.exports=v},37465:(h,F,o)=>{var c=o(38407);function v(){this.__data__=new c,this.size=0}h.exports=v},63779:h=>{function F(o){var c=this.__data__,v=c.delete(o);return this.size=c.size,v}h.exports=F},67599:h=>{function F(o){return this.__data__.get(o)}h.exports=F},44758:h=>{function F(o){return this.__data__.has(o)}h.exports=F},34309:(h,F,o)=>{var c=o(38407),v=o(57071),m=o(83369),d=200;function x(A,w){var T=this.__data__;if(T instanceof c){var D=T.__data__;if(!v||D.length<d-1)return D.push([A,w]),this.size=++T.size,this;T=this.__data__=new m(D)}return T.set(A,w),this.size=T.size,this}h.exports=x},55514:(h,F,o)=>{var c=o(24523),v=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,m=/\\(\\)?/g,d=c(function(x){var A=[];return x.charCodeAt(0)===46&&A.push(""),x.replace(v,function(w,T,D,B){A.push(D?B.replace(m,"$1"):T||w)}),A});h.exports=d},40327:(h,F,o)=>{var c=o(33448),v=1/0;function m(d){if(typeof d=="string"||c(d))return d;var x=d+"";return x=="0"&&1/d==-v?"-0":x}h.exports=m},80346:h=>{var F=Function.prototype,o=F.toString;function c(v){if(v!=null){try{return o.call(v)}catch(m){}try{return v+""}catch(m){}}return""}h.exports=c},67990:h=>{var F=/\s/;function o(c){for(var v=c.length;v--&&F.test(c.charAt(v)););return v}h.exports=o},28583:(h,F,o)=>{var c=o(34865),v=o(98363),m=o(21463),d=o(98612),x=o(25726),A=o(3674),w=Object.prototype,T=w.hasOwnProperty,D=m(function(B,U){if(x(U)||d(U)){v(U,A(U),B);return}for(var ee in U)T.call(U,ee)&&c(B,ee,U[ee])});h.exports=D},50361:(h,F,o)=>{var c=o(85990),v=1,m=4;function d(x){return c(x,v|m)}h.exports=d},75703:h=>{function F(o){return function(){return o}}h.exports=F},77813:h=>{function F(o,c){return o===c||o!==o&&c!==c}h.exports=F},13311:(h,F,o)=>{var c=o(67740),v=o(30998),m=c(v);h.exports=m},30998:(h,F,o)=>{var c=o(41848),v=o(67206),m=o(40554),d=Math.max;function x(A,w,T){var D=A==null?0:A.length;if(!D)return-1;var B=T==null?0:m(T);return B<0&&(B=d(D+B,0)),c(A,v(w,3),B)}h.exports=x},85564:(h,F,o)=>{var c=o(35764);function v(m){var d=m==null?0:m.length;return d?c(m,1):[]}h.exports=v},27361:(h,F,o)=>{var c=o(97786);function v(m,d,x){var A=m==null?void 0:c(m,d);return A===void 0?x:A}h.exports=v},79095:(h,F,o)=>{var c=o(13),v=o(222);function m(d,x){return d!=null&&v(d,x,c)}h.exports=m},6557:h=>{function F(o){return o}h.exports=F},35694:(h,F,o)=>{var c=o(9454),v=o(37005),m=Object.prototype,d=m.hasOwnProperty,x=m.propertyIsEnumerable,A=c(function(){return arguments}())?c:function(w){return v(w)&&d.call(w,"callee")&&!x.call(w,"callee")};h.exports=A},1469:h=>{var F=Array.isArray;h.exports=F},98612:(h,F,o)=>{var c=o(23560),v=o(41780);function m(d){return d!=null&&v(d.length)&&!c(d)}h.exports=m},44144:(h,F,o)=>{h=o.nmd(h);var c=o(55639),v=o(95062),m=F&&!F.nodeType&&F,d=m&&!0&&h&&!h.nodeType&&h,x=d&&d.exports===m,A=x?c.Buffer:void 0,w=A?A.isBuffer:void 0,T=w||v;h.exports=T},41609:(h,F,o)=>{var c=o(280),v=o(98882),m=o(35694),d=o(1469),x=o(98612),A=o(44144),w=o(25726),T=o(36719),D="[object Map]",B="[object Set]",U=Object.prototype,ee=U.hasOwnProperty;function K(R){if(R==null)return!0;if(x(R)&&(d(R)||typeof R=="string"||typeof R.splice=="function"||A(R)||T(R)||m(R)))return!R.length;var Q=v(R);if(Q==D||Q==B)return!R.size;if(w(R))return!c(R).length;for(var L in R)if(ee.call(R,L))return!1;return!0}h.exports=K},23560:(h,F,o)=>{var c=o(44239),v=o(13218),m="[object AsyncFunction]",d="[object Function]",x="[object GeneratorFunction]",A="[object Proxy]";function w(T){if(!v(T))return!1;var D=c(T);return D==d||D==x||D==m||D==A}h.exports=w},41780:h=>{var F=9007199254740991;function o(c){return typeof c=="number"&&c>-1&&c%1==0&&c<=F}h.exports=o},56688:(h,F,o)=>{var c=o(25588),v=o(7518),m=o(31167),d=m&&m.isMap,x=d?v(d):c;h.exports=x},13218:h=>{function F(o){var c=typeof o;return o!=null&&(c=="object"||c=="function")}h.exports=F},37005:h=>{function F(o){return o!=null&&typeof o=="object"}h.exports=F},68630:(h,F,o)=>{var c=o(44239),v=o(85924),m=o(37005),d="[object Object]",x=Function.prototype,A=Object.prototype,w=x.toString,T=A.hasOwnProperty,D=w.call(Object);function B(U){if(!m(U)||c(U)!=d)return!1;var ee=v(U);if(ee===null)return!0;var K=T.call(ee,"constructor")&&ee.constructor;return typeof K=="function"&&K instanceof K&&w.call(K)==D}h.exports=B},72928:(h,F,o)=>{var c=o(29221),v=o(7518),m=o(31167),d=m&&m.isSet,x=d?v(d):c;h.exports=x},47037:(h,F,o)=>{var c=o(44239),v=o(1469),m=o(37005),d="[object String]";function x(A){return typeof A=="string"||!v(A)&&m(A)&&c(A)==d}h.exports=x},33448:(h,F,o)=>{var c=o(44239),v=o(37005),m="[object Symbol]";function d(x){return typeof x=="symbol"||v(x)&&c(x)==m}h.exports=d},36719:(h,F,o)=>{var c=o(38749),v=o(7518),m=o(31167),d=m&&m.isTypedArray,x=d?v(d):c;h.exports=x},3674:(h,F,o)=>{var c=o(14636),v=o(280),m=o(98612);function d(x){return m(x)?c(x):v(x)}h.exports=d},81704:(h,F,o)=>{var c=o(14636),v=o(10313),m=o(98612);function d(x){return m(x)?c(x,!0):v(x)}h.exports=d},88306:(h,F,o)=>{var c=o(83369),v="Expected a function";function m(d,x){if(typeof d!="function"||x!=null&&typeof x!="function")throw new TypeError(v);var A=function(){var w=arguments,T=x?x.apply(this,w):w[0],D=A.cache;if(D.has(T))return D.get(T);var B=d.apply(this,w);return A.cache=D.set(T,B)||D,B};return A.cache=new(m.Cache||c),A}m.Cache=c,h.exports=m},50308:h=>{function F(){}h.exports=F},78718:(h,F,o)=>{var c=o(25970),v=o(99021),m=v(function(d,x){return d==null?{}:c(d,x)});h.exports=m},39601:(h,F,o)=>{var c=o(40371),v=o(79152),m=o(15403),d=o(40327);function x(A){return m(A)?c(d(A)):v(A)}h.exports=x},10240:(h,F,o)=>{var c=o(29750),v=o(80531),m=o(40554),d=o(79833);function x(A,w,T){return A=d(A),T=T==null?0:c(m(T),0,A.length),w=v(w),A.slice(T,T+w.length)==w}h.exports=x},70479:h=>{function F(){return[]}h.exports=F},95062:h=>{function F(){return!1}h.exports=F},18601:(h,F,o)=>{var c=o(14841),v=1/0,m=17976931348623157e292;function d(x){if(!x)return x===0?x:0;if(x=c(x),x===v||x===-v){var A=x<0?-1:1;return A*m}return x===x?x:0}h.exports=d},40554:(h,F,o)=>{var c=o(18601);function v(m){var d=c(m),x=d%1;return d===d?x?d-x:d:0}h.exports=v},14841:(h,F,o)=>{var c=o(27561),v=o(13218),m=o(33448),d=0/0,x=/^[-+]0x[0-9a-f]+$/i,A=/^0b[01]+$/i,w=/^0o[0-7]+$/i,T=parseInt;function D(B){if(typeof B=="number")return B;if(m(B))return d;if(v(B)){var U=typeof B.valueOf=="function"?B.valueOf():B;B=v(U)?U+"":U}if(typeof B!="string")return B===0?B:+B;B=c(B);var ee=A.test(B);return ee||w.test(B)?T(B.slice(2),ee?2:8):x.test(B)?d:+B}h.exports=D},79833:(h,F,o)=>{var c=o(80531);function v(m){return m==null?"":c(m)}h.exports=v},70631:(h,F,o)=>{var c=typeof Map=="function"&&Map.prototype,v=Object.getOwnPropertyDescriptor&&c?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,m=c&&v&&typeof v.get=="function"?v.get:null,d=c&&Map.prototype.forEach,x=typeof Set=="function"&&Set.prototype,A=Object.getOwnPropertyDescriptor&&x?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,w=x&&A&&typeof A.get=="function"?A.get:null,T=x&&Set.prototype.forEach,D=typeof WeakMap=="function"&&WeakMap.prototype,B=D?WeakMap.prototype.has:null,U=typeof WeakSet=="function"&&WeakSet.prototype,ee=U?WeakSet.prototype.has:null,K=typeof WeakRef=="function"&&WeakRef.prototype,R=K?WeakRef.prototype.deref:null,Q=Boolean.prototype.valueOf,L=Object.prototype.toString,P=Function.prototype.toString,V=String.prototype.match,X=typeof BigInt=="function"?BigInt.prototype.valueOf:null,z=Object.getOwnPropertySymbols,G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Z=typeof Symbol=="function"&&typeof Symbol.iterator=="object",ce=Object.prototype.propertyIsEnumerable,te=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(de){return de.__proto__}:null),se=o(24654).custom,be=se&&qe(se)?se:null,me=typeof Symbol=="function"&&typeof Symbol.toStringTag!="undefined"?Symbol.toStringTag:null;h.exports=function de(Ae,S,Pe,H){var O=S||{};if(gt(O,"quoteStyle")&&O.quoteStyle!=="single"&&O.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(gt(O,"maxStringLength")&&(typeof O.maxStringLength=="number"?O.maxStringLength<0&&O.maxStringLength!==1/0:O.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var I=gt(O,"customInspect")?O.customInspect:!0;if(typeof I!="boolean")throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(gt(O,"indent")&&O.indent!==null&&O.indent!==" "&&!(parseInt(O.indent,10)===O.indent&&O.indent>0))throw new TypeError('options "indent" must be "\\t", an integer > 0, or `null`');if(typeof Ae=="undefined")return"undefined";if(Ae===null)return"null";if(typeof Ae=="boolean")return Ae?"true":"false";if(typeof Ae=="string")return jt(Ae,O);if(typeof Ae=="number")return Ae===0?1/0/Ae>0?"0":"-0":String(Ae);if(typeof Ae=="bigint")return String(Ae)+"n";var re=typeof O.depth=="undefined"?5:O.depth;if(typeof Pe=="undefined"&&(Pe=0),Pe>=re&&re>0&&typeof Ae=="object")return oe(Ae)?"[Array]":"[Object]";var N=$(O,Pe);if(typeof H=="undefined")H=[];else if(pt(H,Ae)>=0)return"[Circular]";function _(jn,$n,Pn){if($n&&(H=H.slice(),H.push($n)),Pn){var Kn={depth:O.depth};return gt(O,"quoteStyle")&&(Kn.quoteStyle=O.quoteStyle),de(jn,Kn,Pe+1,H)}return de(jn,O,Pe+1,H)}if(typeof Ae=="function"){var ue=lt(Ae),Oe=ye(Ae,_);return"[Function"+(ue?": "+ue:" (anonymous)")+"]"+(Oe.length>0?" { "+Oe.join(", ")+" }":"")}if(qe(Ae)){var Ie=Z?String(Ae).replace(/^(Symbol\(.*\))_[^)]*$/,"$1"):G.call(Ae);return typeof Ae=="object"&&!Z?wt(Ie):Ie}if(Ut(Ae)){for(var Te="<"+String(Ae.nodeName).toLowerCase(),We=Ae.attributes||[],He=0;He<We.length;He++)Te+=" "+We[He].name+"="+he(fe(We[He].value),"double",O);return Te+=">",Ae.childNodes&&Ae.childNodes.length&&(Te+="..."),Te+="</"+String(Ae.nodeName).toLowerCase()+">",Te}if(oe(Ae)){if(Ae.length===0)return"[]";var nt=ye(Ae,_);return N&&!ve(nt)?"["+Y(nt,N)+"]":"[ "+nt.join(", ")+" ]"}if(Le(Ae)){var ht=ye(Ae,_);return ht.length===0?"["+String(Ae)+"]":"{ ["+String(Ae)+"] "+ht.join(", ")+" }"}if(typeof Ae=="object"&&I){if(be&&typeof Ae[be]=="function")return Ae[be]();if(typeof Ae.inspect=="function")return Ae.inspect()}if(vt(Ae)){var Ct=[];return d.call(Ae,function(jn,$n){Ct.push(_($n,Ae,!0)+" => "+_(jn,Ae))}),bt("Map",m.call(Ae),Ct,N)}if(Ft(Ae)){var Yt=[];return T.call(Ae,function(jn){Yt.push(_(jn,Ae))}),bt("Set",w.call(Ae),Yt,N)}if(dt(Ae))return Mt("WeakMap");if(Et(Ae))return Mt("WeakSet");if(It(Ae))return Mt("WeakRef");if(tt(Ae))return wt(_(Number(Ae)));if(at(Ae))return wt(_(X.call(Ae)));if(Je(Ae))return wt(Q.call(Ae));if(ke(Ae))return wt(_(String(Ae)));if(!Re(Ae)&&!Ue(Ae)){var kt=ye(Ae,_),yn=te?te(Ae)===Object.prototype:Ae instanceof Object||Ae.constructor===Object,Xr=Ae instanceof Object?"":"null prototype",Tn=!yn&&me&&Object(Ae)===Ae&&me in Ae?Ze(Ae).slice(8,-1):Xr?"Object":"",Ui=yn||typeof Ae.constructor!="function"?"":Ae.constructor.name?Ae.constructor.name+" ":"",jr=Ui+(Tn||Xr?"["+[].concat(Tn||[],Xr||[]).join(": ")+"] ":"");return kt.length===0?jr+"{}":N?jr+"{"+Y(kt,N)+"}":jr+"{ "+kt.join(", ")+" }"}return String(Ae)};function he(de,Ae,S){var Pe=(S.quoteStyle||Ae)==="double"?'"':"'";return Pe+de+Pe}function fe(de){return String(de).replace(/"/g,"&quot;")}function oe(de){return Ze(de)==="[object Array]"&&(!me||!(typeof de=="object"&&me in de))}function Re(de){return Ze(de)==="[object Date]"&&(!me||!(typeof de=="object"&&me in de))}function Ue(de){return Ze(de)==="[object RegExp]"&&(!me||!(typeof de=="object"&&me in de))}function Le(de){return Ze(de)==="[object Error]"&&(!me||!(typeof de=="object"&&me in de))}function ke(de){return Ze(de)==="[object String]"&&(!me||!(typeof de=="object"&&me in de))}function tt(de){return Ze(de)==="[object Number]"&&(!me||!(typeof de=="object"&&me in de))}function Je(de){return Ze(de)==="[object Boolean]"&&(!me||!(typeof de=="object"&&me in de))}function qe(de){if(Z)return de&&typeof de=="object"&&de instanceof Symbol;if(typeof de=="symbol")return!0;if(!de||typeof de!="object"||!G)return!1;try{return G.call(de),!0}catch(Ae){}return!1}function at(de){if(!de||typeof de!="object"||!X)return!1;try{return X.call(de),!0}catch(Ae){}return!1}var ut=Object.prototype.hasOwnProperty||function(de){return de in this};function gt(de,Ae){return ut.call(de,Ae)}function Ze(de){return L.call(de)}function lt(de){if(de.name)return de.name;var Ae=V.call(P.call(de),/^function\s*([\w$]+)/);return Ae?Ae[1]:null}function pt(de,Ae){if(de.indexOf)return de.indexOf(Ae);for(var S=0,Pe=de.length;S<Pe;S++)if(de[S]===Ae)return S;return-1}function vt(de){if(!m||!de||typeof de!="object")return!1;try{m.call(de);try{w.call(de)}catch(Ae){return!0}return de instanceof Map}catch(Ae){}return!1}function dt(de){if(!B||!de||typeof de!="object")return!1;try{B.call(de,B);try{ee.call(de,ee)}catch(Ae){return!0}return de instanceof WeakMap}catch(Ae){}return!1}function It(de){if(!R||!de||typeof de!="object")return!1;try{return R.call(de),!0}catch(Ae){}return!1}function Ft(de){if(!w||!de||typeof de!="object")return!1;try{w.call(de);try{m.call(de)}catch(Ae){return!0}return de instanceof Set}catch(Ae){}return!1}function Et(de){if(!ee||!de||typeof de!="object")return!1;try{ee.call(de,ee);try{B.call(de,B)}catch(Ae){return!0}return de instanceof WeakSet}catch(Ae){}return!1}function Ut(de){return!de||typeof de!="object"?!1:typeof HTMLElement!="undefined"&&de instanceof HTMLElement?!0:typeof de.nodeName=="string"&&typeof de.getAttribute=="function"}function jt(de,Ae){if(de.length>Ae.maxStringLength){var S=de.length-Ae.maxStringLength,Pe="... "+S+" more character"+(S>1?"s":"");return jt(de.slice(0,Ae.maxStringLength),Ae)+Pe}var H=de.replace(/(['\\])/g,"\\$1").replace(/[\x00-\x1f]/g,Gt);return he(H,"single",Ae)}function Gt(de){var Ae=de.charCodeAt(0),S={8:"b",9:"t",10:"n",12:"f",13:"r"}[Ae];return S?"\\"+S:"\\x"+(Ae<16?"0":"")+Ae.toString(16).toUpperCase()}function wt(de){return"Object("+de+")"}function Mt(de){return de+" { ? }"}function bt(de,Ae,S,Pe){var H=Pe?Y(S,Pe):S.join(", ");return de+" ("+Ae+") {"+H+"}"}function ve(de){for(var Ae=0;Ae<de.length;Ae++)if(pt(de[Ae],`
504
+ `)>=0)return!1;return!0}function $(de,Ae){var S;if(de.indent===" ")S=" ";else if(typeof de.indent=="number"&&de.indent>0)S=Array(de.indent+1).join(" ");else return null;return{base:S,prev:Array(Ae+1).join(S)}}function Y(de,Ae){if(de.length===0)return"";var S=`
505
+ `+Ae.prev+Ae.base;return S+de.join(","+S)+`
506
+ `+Ae.prev}function ye(de,Ae){var S=oe(de),Pe=[];if(S){Pe.length=de.length;for(var H=0;H<de.length;H++)Pe[H]=gt(de,H)?Ae(de[H],de):""}var O=typeof z=="function"?z(de):[],I;if(Z){I={};for(var re=0;re<O.length;re++)I["$"+O[re]]=O[re]}for(var N in de)!gt(de,N)||S&&String(Number(N))===N&&N<de.length||Z&&I["$"+N]instanceof Symbol||(/[^\w$]/.test(N)?Pe.push(Ae(N,de)+": "+Ae(de[N],de)):Pe.push(N+": "+Ae(de[N],de)));if(typeof z=="function")for(var _=0;_<O.length;_++)ce.call(de,O[_])&&Pe.push("["+Ae(O[_])+"]: "+Ae(de[O[_]],de));return Pe}},9779:(h,F,o)=>{"use strict";var c=F,v=o(48764).lW;c.unescapeBuffer=function(T,D){for(var B=new v(T.length),U=0,ee,K,R,Q=0,L=0;Q<=T.length;Q++){var P=Q<T.length?T.charCodeAt(Q):NaN;switch(U){case 0:switch(P){case 37:ee=0,K=0,U=1;break;case 43:D&&(P=32);default:B[L++]=P;break}break;case 1:if(R=P,P>=48&&P<=57)ee=P-48;else if(P>=65&&P<=70)ee=P-65+10;else if(P>=97&&P<=102)ee=P-97+10;else{B[L++]=37,B[L++]=P,U=0;break}U=2;break;case 2:if(U=0,P>=48&&P<=57)K=P-48;else if(P>=65&&P<=70)K=P-65+10;else if(P>=97&&P<=102)K=P-97+10;else{B[L++]=37,B[L++]=R,B[L++]=P;break}B[L++]=16*ee+K;break}}return B.slice(0,L-1)};function m(T,D){try{return decodeURIComponent(T)}catch(B){return c.unescapeBuffer(T,D).toString()}}c.unescape=m;for(var d=new Array(256),x=0;x<256;++x)d[x]="%"+((x<16?"0":"")+x.toString(16)).toUpperCase();c.escape=function(T){typeof T!="string"&&(T+="");for(var D="",B=0,U=0;U<T.length;++U){var ee=T.charCodeAt(U);if(!(ee===33||ee===45||ee===46||ee===95||ee===126||ee>=39&&ee<=42||ee>=48&&ee<=57||ee>=65&&ee<=90||ee>=97&&ee<=122)){if(U-B>0&&(D+=T.slice(B,U)),ee<128){B=U+1,D+=d[ee];continue}if(ee<2048){B=U+1,D+=d[192|ee>>6]+d[128|ee&63];continue}if(ee<55296||ee>=57344){B=U+1,D+=d[224|ee>>12]+d[128|ee>>6&63]+d[128|ee&63];continue}++U;var K;if(U<T.length)K=T.charCodeAt(U)&1023;else throw new URIError("URI malformed");B=U+1,ee=65536+((ee&1023)<<10|K),D+=d[240|ee>>18]+d[128|ee>>12&63]+d[128|ee>>6&63]+d[128|ee&63]}}return B===0?T:B<T.length?D+T.slice(B):D};var A=function(T){return typeof T=="string"?T:typeof T=="number"&&isFinite(T)?""+T:typeof T=="boolean"?T?"true":"false":""};c.stringify=c.encode=function(T,D,B,U){D=D||"&",B=B||"=";var ee=c.escape;if(U&&typeof U.encodeURIComponent=="function"&&(ee=U.encodeURIComponent),T!==null&&typeof T=="object"){for(var K=Object.keys(T),R=K.length,Q=R-1,L="",P=0;P<R;++P){var V=K[P],X=T[V],z=ee(A(V))+B;if(Array.isArray(X)){for(var G=X.length,Z=G-1,ce=0;ce<G;++ce)L+=z+ee(A(X[ce])),ce<Z&&(L+=D);G&&P<Q&&(L+=D)}else L+=z+ee(A(X)),P<Q&&(L+=D)}return L}return""},c.parse=c.decode=function(T,D,B,U){D=D||"&",B=B||"=";var ee={};if(typeof T!="string"||T.length===0)return ee;typeof D!="string"&&(D+="");var K=B.length,R=D.length,Q=1e3;U&&typeof U.maxKeys=="number"&&(Q=U.maxKeys);var L=1/0;Q>0&&(L=Q);var P=c.unescape;U&&typeof U.decodeURIComponent=="function"&&(P=U.decodeURIComponent);for(var V=P!==m,X=[],z=0,G=0,Z=0,ce="",te="",se=V,be=V,me=0,he=0;he<T.length;++he){var fe=T.charCodeAt(he);if(fe===D.charCodeAt(G)){if(++G===R){var oe=he-G+1;if(Z<K?z<oe&&(ce+=T.slice(z,oe)):z<oe&&(te+=T.slice(z,oe)),se&&(ce=w(ce,P)),be&&(te=w(te,P)),X.indexOf(ce)===-1)ee[ce]=te,X[X.length]=ce;else{var Re=ee[ce];Re instanceof Array?Re[Re.length]=te:ee[ce]=[Re,te]}if(--L==0)break;se=be=V,me=0,ce=te="",z=he+1,G=Z=0}continue}else G=0,be||(fe===37?me=1:me>0&&(fe>=48&&fe<=57||fe>=65&&fe<=70||fe>=97&&fe<=102)?++me==3&&(be=!0):me=0);if(Z<K)if(fe===B.charCodeAt(Z)){if(++Z===K){var oe=he-Z+1;z<oe&&(ce+=T.slice(z,oe)),me=0,z=he+1}continue}else Z=0,se||(fe===37?me=1:me>0&&(fe>=48&&fe<=57||fe>=65&&fe<=70||fe>=97&&fe<=102)?++me==3&&(se=!0):me=0);fe===43&&(Z<K?(he-z>0&&(ce+=T.slice(z,he)),ce+="%20",se=!0):(he-z>0&&(te+=T.slice(z,he)),te+="%20",be=!0),z=he+1)}if(L>0&&(z<T.length||Z>0))if(z<T.length&&(Z<K?ce+=T.slice(z):G<R&&(te+=T.slice(z))),se&&(ce=w(ce,P)),be&&(te=w(te,P)),X.indexOf(ce)===-1)ee[ce]=te,X[X.length]=ce;else{var Re=ee[ce];Re instanceof Array?Re[Re.length]=te:ee[ce]=[Re,te]}return ee};function w(T,D){try{return D(T)}catch(B){return c.unescape(T,!0)}}},29656:(h,F,o)=>{"use strict";var c;function v(){return v=Object.assign||function(ee){for(var K=1;K<arguments.length;K++){var R=arguments[K];for(var Q in R)Object.prototype.hasOwnProperty.call(R,Q)&&(ee[Q]=R[Q])}return ee},v.apply(this,arguments)}function m(ee){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?m=function(R){return typeof R}:m=function(R){return R&&typeof Symbol=="function"&&R.constructor===Symbol&&R!==Symbol.prototype?"symbol":typeof R},m(ee)}var d=function(){var ee=function(R,Q){return ee=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(L,P){L.__proto__=P}||function(L,P){for(var V in P)P.hasOwnProperty(V)&&(L[V]=P[V])},ee(R,Q)};return function(K,R){ee(K,R);function Q(){this.constructor=K}K.prototype=R===null?Object.create(R):(Q.prototype=R.prototype,new Q)}}();c={value:!0},c=F.fk=void 0;var x=o(67294),A=typeof navigator=="undefined"||o.g.PREVENT_CODEMIRROR_RENDER===!0,w;A||(w=o(4631));var T=function(){function ee(){}return ee.equals=function(K,R){var Q=this,L=Object.keys,P=m(K),V=m(R);return K&&R&&P==="object"&&P===V?L(K).length===L(R).length&&L(K).every(function(X){return Q.equals(K[X],R[X])}):K===R},ee}(),D=function(){function ee(K,R){this.editor=K,this.props=R}return ee.prototype.delegateCursor=function(K,R,Q){var L=this.editor.getDoc();Q&&this.editor.focus(),R?L.setCursor(K):L.setCursor(K,null,{scroll:!1})},ee.prototype.delegateScroll=function(K){this.editor.scrollTo(K.x,K.y)},ee.prototype.delegateSelection=function(K,R){var Q=this.editor.getDoc();Q.setSelections(K),R&&this.editor.focus()},ee.prototype.apply=function(K){K&&K.selection&&K.selection.ranges&&this.delegateSelection(K.selection.ranges,K.selection.focus||!1),K&&K.cursor&&this.delegateCursor(K.cursor,K.autoScroll||!1,this.editor.getOption("autofocus")||!1),K&&K.scroll&&this.delegateScroll(K.scroll)},ee.prototype.applyNext=function(K,R,Q){K&&K.selection&&K.selection.ranges&&R&&R.selection&&R.selection.ranges&&!T.equals(K.selection.ranges,R.selection.ranges)&&this.delegateSelection(R.selection.ranges,R.selection.focus||!1),K&&K.cursor&&R&&R.cursor&&!T.equals(K.cursor,R.cursor)&&this.delegateCursor(Q.cursor||R.cursor,R.autoScroll||!1,R.autoCursor||!1),K&&K.scroll&&R&&R.scroll&&!T.equals(K.scroll,R.scroll)&&this.delegateScroll(R.scroll)},ee.prototype.applyUserDefined=function(K,R){R&&R.cursor&&this.delegateCursor(R.cursor,K.autoScroll||!1,this.editor.getOption("autofocus")||!1)},ee.prototype.wire=function(K){var R=this;Object.keys(K||{}).filter(function(Q){return/^on/.test(Q)}).forEach(function(Q){switch(Q){case"onBlur":R.editor.on("blur",function(L,P){R.props.onBlur(R.editor,P)});break;case"onContextMenu":{R.editor.on("contextmenu",function(L,P){R.props.onContextMenu(R.editor,P)});break}case"onCopy":{R.editor.on("copy",function(L,P){R.props.onCopy(R.editor,P)});break}case"onCursor":R.editor.on("cursorActivity",function(L){R.props.onCursor(R.editor,R.editor.getDoc().getCursor())});break;case"onCursorActivity":R.editor.on("cursorActivity",function(L){R.props.onCursorActivity(R.editor)});break;case"onCut":{R.editor.on("cut",function(L,P){R.props.onCut(R.editor,P)});break}case"onDblClick":{R.editor.on("dblclick",function(L,P){R.props.onDblClick(R.editor,P)});break}case"onDragEnter":R.editor.on("dragenter",function(L,P){R.props.onDragEnter(R.editor,P)});break;case"onDragLeave":{R.editor.on("dragleave",function(L,P){R.props.onDragLeave(R.editor,P)});break}case"onDragOver":R.editor.on("dragover",function(L,P){R.props.onDragOver(R.editor,P)});break;case"onDragStart":{R.editor.on("dragstart",function(L,P){R.props.onDragStart(R.editor,P)});break}case"onDrop":R.editor.on("drop",function(L,P){R.props.onDrop(R.editor,P)});break;case"onFocus":R.editor.on("focus",function(L,P){R.props.onFocus(R.editor,P)});break;case"onGutterClick":R.editor.on("gutterClick",function(L,P,V,X){R.props.onGutterClick(R.editor,P,V,X)});break;case"onInputRead":R.editor.on("inputRead",function(L,P){R.props.onInputRead(R.editor,P)});break;case"onKeyDown":R.editor.on("keydown",function(L,P){R.props.onKeyDown(R.editor,P)});break;case"onKeyHandled":R.editor.on("keyHandled",function(L,P,V){R.props.onKeyHandled(R.editor,P,V)});break;case"onKeyPress":R.editor.on("keypress",function(L,P){R.props.onKeyPress(R.editor,P)});break;case"onKeyUp":R.editor.on("keyup",function(L,P){R.props.onKeyUp(R.editor,P)});break;case"onMouseDown":{R.editor.on("mousedown",function(L,P){R.props.onMouseDown(R.editor,P)});break}case"onPaste":{R.editor.on("paste",function(L,P){R.props.onPaste(R.editor,P)});break}case"onRenderLine":{R.editor.on("renderLine",function(L,P,V){R.props.onRenderLine(R.editor,P,V)});break}case"onScroll":R.editor.on("scroll",function(L){R.props.onScroll(R.editor,R.editor.getScrollInfo())});break;case"onSelection":R.editor.on("beforeSelectionChange",function(L,P){R.props.onSelection(R.editor,P)});break;case"onTouchStart":{R.editor.on("touchstart",function(L,P){R.props.onTouchStart(R.editor,P)});break}case"onUpdate":R.editor.on("update",function(L){R.props.onUpdate(R.editor)});break;case"onViewportChange":R.editor.on("viewportChange",function(L,P,V){R.props.onViewportChange(R.editor,P,V)});break}})},ee}(),B=function(ee){d(K,ee);function K(R){var Q=ee.call(this,R)||this;return A||(Q.applied=!1,Q.appliedNext=!1,Q.appliedUserDefined=!1,Q.deferred=null,Q.emulating=!1,Q.hydrated=!1,Q.initCb=function(){Q.props.editorDidConfigure&&Q.props.editorDidConfigure(Q.editor)},Q.mounted=!1),Q}return K.prototype.hydrate=function(R){var Q=this,L=R&&R.options?R.options:{},P=v({},w.defaults,this.editor.options,L),V=Object.keys(P).some(function(X){return Q.editor.getOption(X)!==P[X]});V&&Object.keys(P).forEach(function(X){L.hasOwnProperty(X)&&Q.editor.getOption(X)!==P[X]&&(Q.editor.setOption(X,P[X]),Q.mirror.setOption(X,P[X]))}),this.hydrated||(this.deferred?this.resolveChange(R.value):this.initChange(R.value||"")),this.hydrated=!0},K.prototype.initChange=function(R){this.emulating=!0;var Q=this.editor.getDoc(),L=Q.lastLine(),P=Q.getLine(Q.lastLine()).length;Q.replaceRange(R||"",{line:0,ch:0},{line:L,ch:P}),this.mirror.setValue(R),Q.clearHistory(),this.mirror.clearHistory(),this.emulating=!1},K.prototype.resolveChange=function(R){this.emulating=!0;var Q=this.editor.getDoc();if(this.deferred.origin==="undo"?Q.undo():this.deferred.origin==="redo"?Q.redo():Q.replaceRange(this.deferred.text,this.deferred.from,this.deferred.to,this.deferred.origin),R&&R!==Q.getValue()){var L=Q.getCursor();Q.setValue(R),Q.setCursor(L)}this.emulating=!1,this.deferred=null},K.prototype.mirrorChange=function(R){var Q=this.editor.getDoc();return R.origin==="undo"?(Q.setHistory(this.mirror.getHistory()),this.mirror.undo()):R.origin==="redo"?(Q.setHistory(this.mirror.getHistory()),this.mirror.redo()):this.mirror.replaceRange(R.text,R.from,R.to,R.origin),this.mirror.getValue()},K.prototype.componentDidMount=function(){var R=this;A||(this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&w.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=w(this.ref,this.props.options),this.shared=new D(this.editor,this.props),this.mirror=w(function(){},this.props.options),this.editor.on("electricInput",function(){R.mirror.setHistory(R.editor.getDoc().getHistory())}),this.editor.on("cursorActivity",function(){R.mirror.setCursor(R.editor.getDoc().getCursor())}),this.editor.on("beforeChange",function(Q,L){if(!R.emulating){L.cancel(),R.deferred=L;var P=R.mirrorChange(R.deferred);R.props.onBeforeChange&&R.props.onBeforeChange(R.editor,R.deferred,P)}}),this.editor.on("change",function(Q,L){!R.mounted||R.props.onChange&&R.props.onChange(R.editor,L,R.editor.getValue())}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getOption("autofocus")&&this.editor.focus(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},K.prototype.componentDidUpdate=function(R){if(!A){var Q={cursor:null};this.props.value!==R.value&&(this.hydrated=!1),!this.props.autoCursor&&this.props.autoCursor!==void 0&&(Q.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.appliedNext||(this.shared.applyNext(R,this.props,Q),this.appliedNext=!0),this.shared.applyUserDefined(R,Q),this.appliedUserDefined=!0}},K.prototype.componentWillUnmount=function(){A||this.props.editorWillUnmount&&this.props.editorWillUnmount(w)},K.prototype.shouldComponentUpdate=function(R,Q){return!A},K.prototype.render=function(){var R=this;if(A)return null;var Q=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return x.createElement("div",{className:Q,ref:function(P){return R.ref=P}})},K}(x.Component);F.fk=B;var U=function(ee){d(K,ee);function K(R){var Q=ee.call(this,R)||this;return A||(Q.applied=!1,Q.appliedUserDefined=!1,Q.continueChange=!1,Q.detached=!1,Q.hydrated=!1,Q.initCb=function(){Q.props.editorDidConfigure&&Q.props.editorDidConfigure(Q.editor)},Q.mounted=!1,Q.onBeforeChangeCb=function(){Q.continueChange=!0}),Q}return K.prototype.hydrate=function(R){var Q=this,L=R&&R.options?R.options:{},P=v({},w.defaults,this.editor.options,L),V=Object.keys(P).some(function(Z){return Q.editor.getOption(Z)!==P[Z]});if(V&&Object.keys(P).forEach(function(Z){L.hasOwnProperty(Z)&&Q.editor.getOption(Z)!==P[Z]&&Q.editor.setOption(Z,P[Z])}),!this.hydrated){var X=this.editor.getDoc(),z=X.lastLine(),G=X.getLine(X.lastLine()).length;X.replaceRange(R.value||"",{line:0,ch:0},{line:z,ch:G})}this.hydrated=!0},K.prototype.componentDidMount=function(){var R=this;A||(this.detached=this.props.detach===!0,this.props.defineMode&&this.props.defineMode.name&&this.props.defineMode.fn&&w.defineMode(this.props.defineMode.name,this.props.defineMode.fn),this.editor=w(this.ref,this.props.options),this.shared=new D(this.editor,this.props),this.editor.on("beforeChange",function(Q,L){R.props.onBeforeChange&&R.props.onBeforeChange(R.editor,L,R.editor.getValue(),R.onBeforeChangeCb)}),this.editor.on("change",function(Q,L){!R.mounted||!R.props.onChange||(R.props.onBeforeChange?R.continueChange&&R.props.onChange(R.editor,L,R.editor.getValue()):R.props.onChange(R.editor,L,R.editor.getValue()))}),this.hydrate(this.props),this.shared.apply(this.props),this.applied=!0,this.mounted=!0,this.shared.wire(this.props),this.editor.getDoc().clearHistory(),this.props.editorDidMount&&this.props.editorDidMount(this.editor,this.editor.getValue(),this.initCb))},K.prototype.componentDidUpdate=function(R){if(this.detached&&this.props.detach===!1&&(this.detached=!1,R.editorDidAttach&&R.editorDidAttach(this.editor)),!this.detached&&this.props.detach===!0&&(this.detached=!0,R.editorDidDetach&&R.editorDidDetach(this.editor)),!(A||this.detached)){var Q={cursor:null};this.props.value!==R.value&&(this.hydrated=!1,this.applied=!1,this.appliedUserDefined=!1),!R.autoCursor&&R.autoCursor!==void 0&&(Q.cursor=this.editor.getDoc().getCursor()),this.hydrate(this.props),this.applied||(this.shared.apply(R),this.applied=!0),this.appliedUserDefined||(this.shared.applyUserDefined(R,Q),this.appliedUserDefined=!0)}},K.prototype.componentWillUnmount=function(){A||this.props.editorWillUnmount&&this.props.editorWillUnmount(w)},K.prototype.shouldComponentUpdate=function(R,Q){var L=!0;return A&&(L=!1),this.detached&&R.detach&&(L=!1),L},K.prototype.render=function(){var R=this;if(A)return null;var Q=this.props.className?"react-codemirror2 "+this.props.className:"react-codemirror2";return x.createElement("div",{className:Q,ref:function(P){return R.ref=P}})},K}(x.Component);c=U},35666:h=>{var F=function(o){"use strict";var c=Object.prototype,v=c.hasOwnProperty,m,d=typeof Symbol=="function"?Symbol:{},x=d.iterator||"@@iterator",A=d.asyncIterator||"@@asyncIterator",w=d.toStringTag||"@@toStringTag";function T(Ue,Le,ke){return Object.defineProperty(Ue,Le,{value:ke,enumerable:!0,configurable:!0,writable:!0}),Ue[Le]}try{T({},"")}catch(Ue){T=function(Le,ke,tt){return Le[ke]=tt}}function D(Ue,Le,ke,tt){var Je=Le&&Le.prototype instanceof L?Le:L,qe=Object.create(Je.prototype),at=new fe(tt||[]);return qe._invoke=se(Ue,ke,at),qe}o.wrap=D;function B(Ue,Le,ke){try{return{type:"normal",arg:Ue.call(Le,ke)}}catch(tt){return{type:"throw",arg:tt}}}var U="suspendedStart",ee="suspendedYield",K="executing",R="completed",Q={};function L(){}function P(){}function V(){}var X={};X[x]=function(){return this};var z=Object.getPrototypeOf,G=z&&z(z(oe([])));G&&G!==c&&v.call(G,x)&&(X=G);var Z=V.prototype=L.prototype=Object.create(X);P.prototype=Z.constructor=V,V.constructor=P,P.displayName=T(V,w,"GeneratorFunction");function ce(Ue){["next","throw","return"].forEach(function(Le){T(Ue,Le,function(ke){return this._invoke(Le,ke)})})}o.isGeneratorFunction=function(Ue){var Le=typeof Ue=="function"&&Ue.constructor;return Le?Le===P||(Le.displayName||Le.name)==="GeneratorFunction":!1},o.mark=function(Ue){return Object.setPrototypeOf?Object.setPrototypeOf(Ue,V):(Ue.__proto__=V,T(Ue,w,"GeneratorFunction")),Ue.prototype=Object.create(Z),Ue},o.awrap=function(Ue){return{__await:Ue}};function te(Ue,Le){function ke(qe,at,ut,gt){var Ze=B(Ue[qe],Ue,at);if(Ze.type==="throw")gt(Ze.arg);else{var lt=Ze.arg,pt=lt.value;return pt&&typeof pt=="object"&&v.call(pt,"__await")?Le.resolve(pt.__await).then(function(vt){ke("next",vt,ut,gt)},function(vt){ke("throw",vt,ut,gt)}):Le.resolve(pt).then(function(vt){lt.value=vt,ut(lt)},function(vt){return ke("throw",vt,ut,gt)})}}var tt;function Je(qe,at){function ut(){return new Le(function(gt,Ze){ke(qe,at,gt,Ze)})}return tt=tt?tt.then(ut,ut):ut()}this._invoke=Je}ce(te.prototype),te.prototype[A]=function(){return this},o.AsyncIterator=te,o.async=function(Ue,Le,ke,tt,Je){Je===void 0&&(Je=Promise);var qe=new te(D(Ue,Le,ke,tt),Je);return o.isGeneratorFunction(Le)?qe:qe.next().then(function(at){return at.done?at.value:qe.next()})};function se(Ue,Le,ke){var tt=U;return function(qe,at){if(tt===K)throw new Error("Generator is already running");if(tt===R){if(qe==="throw")throw at;return Re()}for(ke.method=qe,ke.arg=at;;){var ut=ke.delegate;if(ut){var gt=be(ut,ke);if(gt){if(gt===Q)continue;return gt}}if(ke.method==="next")ke.sent=ke._sent=ke.arg;else if(ke.method==="throw"){if(tt===U)throw tt=R,ke.arg;ke.dispatchException(ke.arg)}else ke.method==="return"&&ke.abrupt("return",ke.arg);tt=K;var Ze=B(Ue,Le,ke);if(Ze.type==="normal"){if(tt=ke.done?R:ee,Ze.arg===Q)continue;return{value:Ze.arg,done:ke.done}}else Ze.type==="throw"&&(tt=R,ke.method="throw",ke.arg=Ze.arg)}}}function be(Ue,Le){var ke=Ue.iterator[Le.method];if(ke===m){if(Le.delegate=null,Le.method==="throw"){if(Ue.iterator.return&&(Le.method="return",Le.arg=m,be(Ue,Le),Le.method==="throw"))return Q;Le.method="throw",Le.arg=new TypeError("The iterator does not provide a 'throw' method")}return Q}var tt=B(ke,Ue.iterator,Le.arg);if(tt.type==="throw")return Le.method="throw",Le.arg=tt.arg,Le.delegate=null,Q;var Je=tt.arg;if(!Je)return Le.method="throw",Le.arg=new TypeError("iterator result is not an object"),Le.delegate=null,Q;if(Je.done)Le[Ue.resultName]=Je.value,Le.next=Ue.nextLoc,Le.method!=="return"&&(Le.method="next",Le.arg=m);else return Je;return Le.delegate=null,Q}ce(Z),T(Z,w,"Generator"),Z[x]=function(){return this},Z.toString=function(){return"[object Generator]"};function me(Ue){var Le={tryLoc:Ue[0]};1 in Ue&&(Le.catchLoc=Ue[1]),2 in Ue&&(Le.finallyLoc=Ue[2],Le.afterLoc=Ue[3]),this.tryEntries.push(Le)}function he(Ue){var Le=Ue.completion||{};Le.type="normal",delete Le.arg,Ue.completion=Le}function fe(Ue){this.tryEntries=[{tryLoc:"root"}],Ue.forEach(me,this),this.reset(!0)}o.keys=function(Ue){var Le=[];for(var ke in Ue)Le.push(ke);return Le.reverse(),function tt(){for(;Le.length;){var Je=Le.pop();if(Je in Ue)return tt.value=Je,tt.done=!1,tt}return tt.done=!0,tt}};function oe(Ue){if(Ue){var Le=Ue[x];if(Le)return Le.call(Ue);if(typeof Ue.next=="function")return Ue;if(!isNaN(Ue.length)){var ke=-1,tt=function Je(){for(;++ke<Ue.length;)if(v.call(Ue,ke))return Je.value=Ue[ke],Je.done=!1,Je;return Je.value=m,Je.done=!0,Je};return tt.next=tt}}return{next:Re}}o.values=oe;function Re(){return{value:m,done:!0}}return fe.prototype={constructor:fe,reset:function(Ue){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEach(he),!Ue)for(var Le in this)Le.charAt(0)==="t"&&v.call(this,Le)&&!isNaN(+Le.slice(1))&&(this[Le]=m)},stop:function(){this.done=!0;var Ue=this.tryEntries[0],Le=Ue.completion;if(Le.type==="throw")throw Le.arg;return this.rval},dispatchException:function(Ue){if(this.done)throw Ue;var Le=this;function ke(gt,Ze){return qe.type="throw",qe.arg=Ue,Le.next=gt,Ze&&(Le.method="next",Le.arg=m),!!Ze}for(var tt=this.tryEntries.length-1;tt>=0;--tt){var Je=this.tryEntries[tt],qe=Je.completion;if(Je.tryLoc==="root")return ke("end");if(Je.tryLoc<=this.prev){var at=v.call(Je,"catchLoc"),ut=v.call(Je,"finallyLoc");if(at&&ut){if(this.prev<Je.catchLoc)return ke(Je.catchLoc,!0);if(this.prev<Je.finallyLoc)return ke(Je.finallyLoc)}else if(at){if(this.prev<Je.catchLoc)return ke(Je.catchLoc,!0)}else if(ut){if(this.prev<Je.finallyLoc)return ke(Je.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(Ue,Le){for(var ke=this.tryEntries.length-1;ke>=0;--ke){var tt=this.tryEntries[ke];if(tt.tryLoc<=this.prev&&v.call(tt,"finallyLoc")&&this.prev<tt.finallyLoc){var Je=tt;break}}Je&&(Ue==="break"||Ue==="continue")&&Je.tryLoc<=Le&&Le<=Je.finallyLoc&&(Je=null);var qe=Je?Je.completion:{};return qe.type=Ue,qe.arg=Le,Je?(this.method="next",this.next=Je.finallyLoc,Q):this.complete(qe)},complete:function(Ue,Le){if(Ue.type==="throw")throw Ue.arg;return Ue.type==="break"||Ue.type==="continue"?this.next=Ue.arg:Ue.type==="return"?(this.rval=this.arg=Ue.arg,this.method="return",this.next="end"):Ue.type==="normal"&&Le&&(this.next=Le),Q},finish:function(Ue){for(var Le=this.tryEntries.length-1;Le>=0;--Le){var ke=this.tryEntries[Le];if(ke.finallyLoc===Ue)return this.complete(ke.completion,ke.afterLoc),he(ke),Q}},catch:function(Ue){for(var Le=this.tryEntries.length-1;Le>=0;--Le){var ke=this.tryEntries[Le];if(ke.tryLoc===Ue){var tt=ke.completion;if(tt.type==="throw"){var Je=tt.arg;he(ke)}return Je}}throw new Error("illegal catch attempt")},delegateYield:function(Ue,Le,ke){return this.delegate={iterator:oe(Ue),resultName:Le,nextLoc:ke},this.method==="next"&&(this.arg=m),Q}},o}(h.exports);try{regeneratorRuntime=F}catch(o){Function("r","regeneratorRuntime = r")(F)}},37478:(h,F,o)=>{"use strict";var c=o(40210),v=o(21924),m=o(70631),d=c("%TypeError%"),x=c("%WeakMap%",!0),A=c("%Map%",!0),w=v("WeakMap.prototype.get",!0),T=v("WeakMap.prototype.set",!0),D=v("WeakMap.prototype.has",!0),B=v("Map.prototype.get",!0),U=v("Map.prototype.set",!0),ee=v("Map.prototype.has",!0),K=function(P,V){for(var X=P,z;(z=X.next)!==null;X=z)if(z.key===V)return X.next=z.next,z.next=P.next,P.next=z,z},R=function(P,V){var X=K(P,V);return X&&X.value},Q=function(P,V,X){var z=K(P,V);z?z.value=X:P.next={key:V,next:P.next,value:X}},L=function(P,V){return!!K(P,V)};h.exports=function(){var V,X,z,G={assert:function(Z){if(!G.has(Z))throw new d("Side channel does not contain "+m(Z))},get:function(Z){if(x&&Z&&(typeof Z=="object"||typeof Z=="function")){if(V)return w(V,Z)}else if(A){if(X)return B(X,Z)}else if(z)return R(z,Z)},has:function(Z){if(x&&Z&&(typeof Z=="object"||typeof Z=="function")){if(V)return D(V,Z)}else if(A){if(X)return ee(X,Z)}else if(z)return L(z,Z);return!1},set:function(Z,ce){x&&Z&&(typeof Z=="object"||typeof Z=="function")?(V||(V=new x),T(V,Z,ce)):A?(X||(X=new A),U(X,Z,ce)):(z||(z={key:{},next:null}),Q(z,Z,ce))}};return G}},13837:(h,F,o)=>{var c=o(93379),v=o(17438);v=v.__esModule?v.default:v,typeof v=="string"&&(v=[[h.id,v,""]]);var m={};m.insert="head",m.singleton=!1;var d=c(v,m);h.exports=v.locals||{}},75019:(h,F,o)=>{var c=o(93379),v=o(58635);v=v.__esModule?v.default:v,typeof v=="string"&&(v=[[h.id,v,""]]);var m={};m.insert="head",m.singleton=!1;var d=c(v,m);h.exports=v.locals||{}},86081:(h,F,o)=>{var c=o(93379),v=o(45272);v=v.__esModule?v.default:v,typeof v=="string"&&(v=[[h.id,v,""]]);var m={};m.insert="head",m.singleton=!1;var d=c(v,m);h.exports=v.locals||{}},44254:(h,F,o)=>{var c=o(93379),v=o(40961);v=v.__esModule?v.default:v,typeof v=="string"&&(v=[[h.id,v,""]]);var m={};m.insert="head",m.singleton=!1;var d=c(v,m);h.exports=v.locals||{}},88996:(h,F,o)=>{"use strict";/*!
507
+ * The buffer module from node.js, for the browser.
508
+ *
509
+ * @author Feross Aboukhadijeh <https://feross.org>
510
+ * @license MIT
511
+ */const c=o(79742),v=o(80645),m=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;F.Buffer=w,F.SlowBuffer=V,F.INSPECT_MAX_BYTES=50;const d=2147483647;F.kMaxLength=d,w.TYPED_ARRAY_SUPPORT=x(),!w.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function x(){try{const H=new Uint8Array(1),O={foo:function(){return 42}};return Object.setPrototypeOf(O,Uint8Array.prototype),Object.setPrototypeOf(H,O),H.foo()===42}catch(H){return!1}}Object.defineProperty(w.prototype,"parent",{enumerable:!0,get:function(){if(!!w.isBuffer(this))return this.buffer}}),Object.defineProperty(w.prototype,"offset",{enumerable:!0,get:function(){if(!!w.isBuffer(this))return this.byteOffset}});function A(H){if(H>d)throw new RangeError('The value "'+H+'" is invalid for option "size"');const O=new Uint8Array(H);return Object.setPrototypeOf(O,w.prototype),O}function w(H,O,I){if(typeof H=="number"){if(typeof O=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return U(H)}return T(H,O,I)}w.poolSize=8192;function T(H,O,I){if(typeof H=="string")return ee(H,O);if(ArrayBuffer.isView(H))return R(H);if(H==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(ye(H,ArrayBuffer)||H&&ye(H.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ye(H,SharedArrayBuffer)||H&&ye(H.buffer,SharedArrayBuffer)))return Q(H,O,I);if(typeof H=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const re=H.valueOf&&H.valueOf();if(re!=null&&re!==H)return w.from(re,O,I);const N=L(H);if(N)return N;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof H[Symbol.toPrimitive]=="function")return w.from(H[Symbol.toPrimitive]("string"),O,I);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}w.from=function(H,O,I){return T(H,O,I)},Object.setPrototypeOf(w.prototype,Uint8Array.prototype),Object.setPrototypeOf(w,Uint8Array);function D(H){if(typeof H!="number")throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function B(H,O,I){return D(H),H<=0?A(H):O!==void 0?typeof I=="string"?A(H).fill(O,I):A(H).fill(O):A(H)}w.alloc=function(H,O,I){return B(H,O,I)};function U(H){return D(H),A(H<0?0:P(H)|0)}w.allocUnsafe=function(H){return U(H)},w.allocUnsafeSlow=function(H){return U(H)};function ee(H,O){if((typeof O!="string"||O==="")&&(O="utf8"),!w.isEncoding(O))throw new TypeError("Unknown encoding: "+O);const I=X(H,O)|0;let re=A(I);const N=re.write(H,O);return N!==I&&(re=re.slice(0,N)),re}function K(H){const O=H.length<0?0:P(H.length)|0,I=A(O);for(let re=0;re<O;re+=1)I[re]=H[re]&255;return I}function R(H){if(ye(H,Uint8Array)){const O=new Uint8Array(H);return Q(O.buffer,O.byteOffset,O.byteLength)}return K(H)}function Q(H,O,I){if(O<0||H.byteLength<O)throw new RangeError('"offset" is outside of buffer bounds');if(H.byteLength<O+(I||0))throw new RangeError('"length" is outside of buffer bounds');let re;return O===void 0&&I===void 0?re=new Uint8Array(H):I===void 0?re=new Uint8Array(H,O):re=new Uint8Array(H,O,I),Object.setPrototypeOf(re,w.prototype),re}function L(H){if(w.isBuffer(H)){const O=P(H.length)|0,I=A(O);return I.length===0||H.copy(I,0,0,O),I}if(H.length!==void 0)return typeof H.length!="number"||de(H.length)?A(0):K(H);if(H.type==="Buffer"&&Array.isArray(H.data))return K(H.data)}function P(H){if(H>=d)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+d.toString(16)+" bytes");return H|0}function V(H){return+H!=H&&(H=0),w.alloc(+H)}w.isBuffer=function(O){return O!=null&&O._isBuffer===!0&&O!==w.prototype},w.compare=function(O,I){if(ye(O,Uint8Array)&&(O=w.from(O,O.offset,O.byteLength)),ye(I,Uint8Array)&&(I=w.from(I,I.offset,I.byteLength)),!w.isBuffer(O)||!w.isBuffer(I))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(O===I)return 0;let re=O.length,N=I.length;for(let _=0,ue=Math.min(re,N);_<ue;++_)if(O[_]!==I[_]){re=O[_],N=I[_];break}return re<N?-1:N<re?1:0},w.isEncoding=function(O){switch(String(O).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},w.concat=function(O,I){if(!Array.isArray(O))throw new TypeError('"list" argument must be an Array of Buffers');if(O.length===0)return w.alloc(0);let re;if(I===void 0)for(I=0,re=0;re<O.length;++re)I+=O[re].length;const N=w.allocUnsafe(I);let _=0;for(re=0;re<O.length;++re){let ue=O[re];if(ye(ue,Uint8Array))_+ue.length>N.length?(w.isBuffer(ue)||(ue=w.from(ue)),ue.copy(N,_)):Uint8Array.prototype.set.call(N,ue,_);else if(w.isBuffer(ue))ue.copy(N,_);else throw new TypeError('"list" argument must be an Array of Buffers');_+=ue.length}return N};function X(H,O){if(w.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||ye(H,ArrayBuffer))return H.byteLength;if(typeof H!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);const I=H.length,re=arguments.length>2&&arguments[2]===!0;if(!re&&I===0)return 0;let N=!1;for(;;)switch(O){case"ascii":case"latin1":case"binary":return I;case"utf8":case"utf-8":return Mt(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I*2;case"hex":return I>>>1;case"base64":return $(H).length;default:if(N)return re?-1:Mt(H).length;O=(""+O).toLowerCase(),N=!0}}w.byteLength=X;function z(H,O,I){let re=!1;if((O===void 0||O<0)&&(O=0),O>this.length||((I===void 0||I>this.length)&&(I=this.length),I<=0)||(I>>>=0,O>>>=0,I<=O))return"";for(H||(H="utf8");;)switch(H){case"hex":return tt(this,O,I);case"utf8":case"utf-8":return oe(this,O,I);case"ascii":return Le(this,O,I);case"latin1":case"binary":return ke(this,O,I);case"base64":return fe(this,O,I);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Je(this,O,I);default:if(re)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),re=!0}}w.prototype._isBuffer=!0;function G(H,O,I){const re=H[O];H[O]=H[I],H[I]=re}w.prototype.swap16=function(){const O=this.length;if(O%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let I=0;I<O;I+=2)G(this,I,I+1);return this},w.prototype.swap32=function(){const O=this.length;if(O%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let I=0;I<O;I+=4)G(this,I,I+3),G(this,I+1,I+2);return this},w.prototype.swap64=function(){const O=this.length;if(O%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let I=0;I<O;I+=8)G(this,I,I+7),G(this,I+1,I+6),G(this,I+2,I+5),G(this,I+3,I+4);return this},w.prototype.toString=function(){const O=this.length;return O===0?"":arguments.length===0?oe(this,0,O):z.apply(this,arguments)},w.prototype.toLocaleString=w.prototype.toString,w.prototype.equals=function(O){if(!w.isBuffer(O))throw new TypeError("Argument must be a Buffer");return this===O?!0:w.compare(this,O)===0},w.prototype.inspect=function(){let O="";const I=F.INSPECT_MAX_BYTES;return O=this.toString("hex",0,I).replace(/(.{2})/g,"$1 ").trim(),this.length>I&&(O+=" ... "),"<Buffer "+O+">"},m&&(w.prototype[m]=w.prototype.inspect),w.prototype.compare=function(O,I,re,N,_){if(ye(O,Uint8Array)&&(O=w.from(O,O.offset,O.byteLength)),!w.isBuffer(O))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof O);if(I===void 0&&(I=0),re===void 0&&(re=O?O.length:0),N===void 0&&(N=0),_===void 0&&(_=this.length),I<0||re>O.length||N<0||_>this.length)throw new RangeError("out of range index");if(N>=_&&I>=re)return 0;if(N>=_)return-1;if(I>=re)return 1;if(I>>>=0,re>>>=0,N>>>=0,_>>>=0,this===O)return 0;let ue=_-N,Oe=re-I;const Ie=Math.min(ue,Oe),Te=this.slice(N,_),We=O.slice(I,re);for(let He=0;He<Ie;++He)if(Te[He]!==We[He]){ue=Te[He],Oe=We[He];break}return ue<Oe?-1:Oe<ue?1:0};function Z(H,O,I,re,N){if(H.length===0)return-1;if(typeof I=="string"?(re=I,I=0):I>2147483647?I=2147483647:I<-2147483648&&(I=-2147483648),I=+I,de(I)&&(I=N?0:H.length-1),I<0&&(I=H.length+I),I>=H.length){if(N)return-1;I=H.length-1}else if(I<0)if(N)I=0;else return-1;if(typeof O=="string"&&(O=w.from(O,re)),w.isBuffer(O))return O.length===0?-1:ce(H,O,I,re,N);if(typeof O=="number")return O=O&255,typeof Uint8Array.prototype.indexOf=="function"?N?Uint8Array.prototype.indexOf.call(H,O,I):Uint8Array.prototype.lastIndexOf.call(H,O,I):ce(H,[O],I,re,N);throw new TypeError("val must be string, number or Buffer")}function ce(H,O,I,re,N){let _=1,ue=H.length,Oe=O.length;if(re!==void 0&&(re=String(re).toLowerCase(),re==="ucs2"||re==="ucs-2"||re==="utf16le"||re==="utf-16le")){if(H.length<2||O.length<2)return-1;_=2,ue/=2,Oe/=2,I/=2}function Ie(We,He){return _===1?We[He]:We.readUInt16BE(He*_)}let Te;if(N){let We=-1;for(Te=I;Te<ue;Te++)if(Ie(H,Te)===Ie(O,We===-1?0:Te-We)){if(We===-1&&(We=Te),Te-We+1===Oe)return We*_}else We!==-1&&(Te-=Te-We),We=-1}else for(I+Oe>ue&&(I=ue-Oe),Te=I;Te>=0;Te--){let We=!0;for(let He=0;He<Oe;He++)if(Ie(H,Te+He)!==Ie(O,He)){We=!1;break}if(We)return Te}return-1}w.prototype.includes=function(O,I,re){return this.indexOf(O,I,re)!==-1},w.prototype.indexOf=function(O,I,re){return Z(this,O,I,re,!0)},w.prototype.lastIndexOf=function(O,I,re){return Z(this,O,I,re,!1)};function te(H,O,I,re){I=Number(I)||0;const N=H.length-I;re?(re=Number(re),re>N&&(re=N)):re=N;const _=O.length;re>_/2&&(re=_/2);let ue;for(ue=0;ue<re;++ue){const Oe=parseInt(O.substr(ue*2,2),16);if(de(Oe))return ue;H[I+ue]=Oe}return ue}function se(H,O,I,re){return Y(Mt(O,H.length-I),H,I,re)}function be(H,O,I,re){return Y(bt(O),H,I,re)}function me(H,O,I,re){return Y($(O),H,I,re)}function he(H,O,I,re){return Y(ve(O,H.length-I),H,I,re)}w.prototype.write=function(O,I,re,N){if(I===void 0)N="utf8",re=this.length,I=0;else if(re===void 0&&typeof I=="string")N=I,re=this.length,I=0;else if(isFinite(I))I=I>>>0,isFinite(re)?(re=re>>>0,N===void 0&&(N="utf8")):(N=re,re=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const _=this.length-I;if((re===void 0||re>_)&&(re=_),O.length>0&&(re<0||I<0)||I>this.length)throw new RangeError("Attempt to write outside buffer bounds");N||(N="utf8");let ue=!1;for(;;)switch(N){case"hex":return te(this,O,I,re);case"utf8":case"utf-8":return se(this,O,I,re);case"ascii":case"latin1":case"binary":return be(this,O,I,re);case"base64":return me(this,O,I,re);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return he(this,O,I,re);default:if(ue)throw new TypeError("Unknown encoding: "+N);N=(""+N).toLowerCase(),ue=!0}},w.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function fe(H,O,I){return O===0&&I===H.length?c.fromByteArray(H):c.fromByteArray(H.slice(O,I))}function oe(H,O,I){I=Math.min(H.length,I);const re=[];let N=O;for(;N<I;){const _=H[N];let ue=null,Oe=_>239?4:_>223?3:_>191?2:1;if(N+Oe<=I){let Ie,Te,We,He;switch(Oe){case 1:_<128&&(ue=_);break;case 2:Ie=H[N+1],(Ie&192)==128&&(He=(_&31)<<6|Ie&63,He>127&&(ue=He));break;case 3:Ie=H[N+1],Te=H[N+2],(Ie&192)==128&&(Te&192)==128&&(He=(_&15)<<12|(Ie&63)<<6|Te&63,He>2047&&(He<55296||He>57343)&&(ue=He));break;case 4:Ie=H[N+1],Te=H[N+2],We=H[N+3],(Ie&192)==128&&(Te&192)==128&&(We&192)==128&&(He=(_&15)<<18|(Ie&63)<<12|(Te&63)<<6|We&63,He>65535&&He<1114112&&(ue=He))}}ue===null?(ue=65533,Oe=1):ue>65535&&(ue-=65536,re.push(ue>>>10&1023|55296),ue=56320|ue&1023),re.push(ue),N+=Oe}return Ue(re)}const Re=4096;function Ue(H){const O=H.length;if(O<=Re)return String.fromCharCode.apply(String,H);let I="",re=0;for(;re<O;)I+=String.fromCharCode.apply(String,H.slice(re,re+=Re));return I}function Le(H,O,I){let re="";I=Math.min(H.length,I);for(let N=O;N<I;++N)re+=String.fromCharCode(H[N]&127);return re}function ke(H,O,I){let re="";I=Math.min(H.length,I);for(let N=O;N<I;++N)re+=String.fromCharCode(H[N]);return re}function tt(H,O,I){const re=H.length;(!O||O<0)&&(O=0),(!I||I<0||I>re)&&(I=re);let N="";for(let _=O;_<I;++_)N+=Ae[H[_]];return N}function Je(H,O,I){const re=H.slice(O,I);let N="";for(let _=0;_<re.length-1;_+=2)N+=String.fromCharCode(re[_]+re[_+1]*256);return N}w.prototype.slice=function(O,I){const re=this.length;O=~~O,I=I===void 0?re:~~I,O<0?(O+=re,O<0&&(O=0)):O>re&&(O=re),I<0?(I+=re,I<0&&(I=0)):I>re&&(I=re),I<O&&(I=O);const N=this.subarray(O,I);return Object.setPrototypeOf(N,w.prototype),N};function qe(H,O,I){if(H%1!=0||H<0)throw new RangeError("offset is not uint");if(H+O>I)throw new RangeError("Trying to access beyond buffer length")}w.prototype.readUintLE=w.prototype.readUIntLE=function(O,I,re){O=O>>>0,I=I>>>0,re||qe(O,I,this.length);let N=this[O],_=1,ue=0;for(;++ue<I&&(_*=256);)N+=this[O+ue]*_;return N},w.prototype.readUintBE=w.prototype.readUIntBE=function(O,I,re){O=O>>>0,I=I>>>0,re||qe(O,I,this.length);let N=this[O+--I],_=1;for(;I>0&&(_*=256);)N+=this[O+--I]*_;return N},w.prototype.readUint8=w.prototype.readUInt8=function(O,I){return O=O>>>0,I||qe(O,1,this.length),this[O]},w.prototype.readUint16LE=w.prototype.readUInt16LE=function(O,I){return O=O>>>0,I||qe(O,2,this.length),this[O]|this[O+1]<<8},w.prototype.readUint16BE=w.prototype.readUInt16BE=function(O,I){return O=O>>>0,I||qe(O,2,this.length),this[O]<<8|this[O+1]},w.prototype.readUint32LE=w.prototype.readUInt32LE=function(O,I){return O=O>>>0,I||qe(O,4,this.length),(this[O]|this[O+1]<<8|this[O+2]<<16)+this[O+3]*16777216},w.prototype.readUint32BE=w.prototype.readUInt32BE=function(O,I){return O=O>>>0,I||qe(O,4,this.length),this[O]*16777216+(this[O+1]<<16|this[O+2]<<8|this[O+3])},w.prototype.readBigUInt64LE=S(function(O){O=O>>>0,Ut(O,"offset");const I=this[O],re=this[O+7];(I===void 0||re===void 0)&&jt(O,this.length-8);const N=I+this[++O]*mr(2,8)+this[++O]*mr(2,16)+this[++O]*mr(2,24),_=this[++O]+this[++O]*mr(2,8)+this[++O]*mr(2,16)+re*mr(2,24);return BigInt(N)+(BigInt(_)<<BigInt(32))}),w.prototype.readBigUInt64BE=S(function(O){O=O>>>0,Ut(O,"offset");const I=this[O],re=this[O+7];(I===void 0||re===void 0)&&jt(O,this.length-8);const N=I*mr(2,24)+this[++O]*mr(2,16)+this[++O]*mr(2,8)+this[++O],_=this[++O]*mr(2,24)+this[++O]*mr(2,16)+this[++O]*mr(2,8)+re;return(BigInt(N)<<BigInt(32))+BigInt(_)}),w.prototype.readIntLE=function(O,I,re){O=O>>>0,I=I>>>0,re||qe(O,I,this.length);let N=this[O],_=1,ue=0;for(;++ue<I&&(_*=256);)N+=this[O+ue]*_;return _*=128,N>=_&&(N-=Math.pow(2,8*I)),N},w.prototype.readIntBE=function(O,I,re){O=O>>>0,I=I>>>0,re||qe(O,I,this.length);let N=I,_=1,ue=this[O+--N];for(;N>0&&(_*=256);)ue+=this[O+--N]*_;return _*=128,ue>=_&&(ue-=Math.pow(2,8*I)),ue},w.prototype.readInt8=function(O,I){return O=O>>>0,I||qe(O,1,this.length),this[O]&128?(255-this[O]+1)*-1:this[O]},w.prototype.readInt16LE=function(O,I){O=O>>>0,I||qe(O,2,this.length);const re=this[O]|this[O+1]<<8;return re&32768?re|4294901760:re},w.prototype.readInt16BE=function(O,I){O=O>>>0,I||qe(O,2,this.length);const re=this[O+1]|this[O]<<8;return re&32768?re|4294901760:re},w.prototype.readInt32LE=function(O,I){return O=O>>>0,I||qe(O,4,this.length),this[O]|this[O+1]<<8|this[O+2]<<16|this[O+3]<<24},w.prototype.readInt32BE=function(O,I){return O=O>>>0,I||qe(O,4,this.length),this[O]<<24|this[O+1]<<16|this[O+2]<<8|this[O+3]},w.prototype.readBigInt64LE=S(function(O){O=O>>>0,Ut(O,"offset");const I=this[O],re=this[O+7];(I===void 0||re===void 0)&&jt(O,this.length-8);const N=this[O+4]+this[O+5]*mr(2,8)+this[O+6]*mr(2,16)+(re<<24);return(BigInt(N)<<BigInt(32))+BigInt(I+this[++O]*mr(2,8)+this[++O]*mr(2,16)+this[++O]*mr(2,24))}),w.prototype.readBigInt64BE=S(function(O){O=O>>>0,Ut(O,"offset");const I=this[O],re=this[O+7];(I===void 0||re===void 0)&&jt(O,this.length-8);const N=(I<<24)+this[++O]*mr(2,16)+this[++O]*mr(2,8)+this[++O];return(BigInt(N)<<BigInt(32))+BigInt(this[++O]*mr(2,24)+this[++O]*mr(2,16)+this[++O]*mr(2,8)+re)}),w.prototype.readFloatLE=function(O,I){return O=O>>>0,I||qe(O,4,this.length),v.read(this,O,!0,23,4)},w.prototype.readFloatBE=function(O,I){return O=O>>>0,I||qe(O,4,this.length),v.read(this,O,!1,23,4)},w.prototype.readDoubleLE=function(O,I){return O=O>>>0,I||qe(O,8,this.length),v.read(this,O,!0,52,8)},w.prototype.readDoubleBE=function(O,I){return O=O>>>0,I||qe(O,8,this.length),v.read(this,O,!1,52,8)};function at(H,O,I,re,N,_){if(!w.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(O>N||O<_)throw new RangeError('"value" argument is out of bounds');if(I+re>H.length)throw new RangeError("Index out of range")}w.prototype.writeUintLE=w.prototype.writeUIntLE=function(O,I,re,N){if(O=+O,I=I>>>0,re=re>>>0,!N){const Oe=Math.pow(2,8*re)-1;at(this,O,I,re,Oe,0)}let _=1,ue=0;for(this[I]=O&255;++ue<re&&(_*=256);)this[I+ue]=O/_&255;return I+re},w.prototype.writeUintBE=w.prototype.writeUIntBE=function(O,I,re,N){if(O=+O,I=I>>>0,re=re>>>0,!N){const Oe=Math.pow(2,8*re)-1;at(this,O,I,re,Oe,0)}let _=re-1,ue=1;for(this[I+_]=O&255;--_>=0&&(ue*=256);)this[I+_]=O/ue&255;return I+re},w.prototype.writeUint8=w.prototype.writeUInt8=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,1,255,0),this[I]=O&255,I+1},w.prototype.writeUint16LE=w.prototype.writeUInt16LE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,2,65535,0),this[I]=O&255,this[I+1]=O>>>8,I+2},w.prototype.writeUint16BE=w.prototype.writeUInt16BE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,2,65535,0),this[I]=O>>>8,this[I+1]=O&255,I+2},w.prototype.writeUint32LE=w.prototype.writeUInt32LE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,4,4294967295,0),this[I+3]=O>>>24,this[I+2]=O>>>16,this[I+1]=O>>>8,this[I]=O&255,I+4},w.prototype.writeUint32BE=w.prototype.writeUInt32BE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,4,4294967295,0),this[I]=O>>>24,this[I+1]=O>>>16,this[I+2]=O>>>8,this[I+3]=O&255,I+4};function ut(H,O,I,re,N){Et(O,re,N,H,I,7);let _=Number(O&BigInt(4294967295));H[I++]=_,_=_>>8,H[I++]=_,_=_>>8,H[I++]=_,_=_>>8,H[I++]=_;let ue=Number(O>>BigInt(32)&BigInt(4294967295));return H[I++]=ue,ue=ue>>8,H[I++]=ue,ue=ue>>8,H[I++]=ue,ue=ue>>8,H[I++]=ue,I}function gt(H,O,I,re,N){Et(O,re,N,H,I,7);let _=Number(O&BigInt(4294967295));H[I+7]=_,_=_>>8,H[I+6]=_,_=_>>8,H[I+5]=_,_=_>>8,H[I+4]=_;let ue=Number(O>>BigInt(32)&BigInt(4294967295));return H[I+3]=ue,ue=ue>>8,H[I+2]=ue,ue=ue>>8,H[I+1]=ue,ue=ue>>8,H[I]=ue,I+8}w.prototype.writeBigUInt64LE=S(function(O,I=0){return ut(this,O,I,BigInt(0),BigInt("0xffffffffffffffff"))}),w.prototype.writeBigUInt64BE=S(function(O,I=0){return gt(this,O,I,BigInt(0),BigInt("0xffffffffffffffff"))}),w.prototype.writeIntLE=function(O,I,re,N){if(O=+O,I=I>>>0,!N){const Ie=Math.pow(2,8*re-1);at(this,O,I,re,Ie-1,-Ie)}let _=0,ue=1,Oe=0;for(this[I]=O&255;++_<re&&(ue*=256);)O<0&&Oe===0&&this[I+_-1]!==0&&(Oe=1),this[I+_]=(O/ue>>0)-Oe&255;return I+re},w.prototype.writeIntBE=function(O,I,re,N){if(O=+O,I=I>>>0,!N){const Ie=Math.pow(2,8*re-1);at(this,O,I,re,Ie-1,-Ie)}let _=re-1,ue=1,Oe=0;for(this[I+_]=O&255;--_>=0&&(ue*=256);)O<0&&Oe===0&&this[I+_+1]!==0&&(Oe=1),this[I+_]=(O/ue>>0)-Oe&255;return I+re},w.prototype.writeInt8=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,1,127,-128),O<0&&(O=255+O+1),this[I]=O&255,I+1},w.prototype.writeInt16LE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,2,32767,-32768),this[I]=O&255,this[I+1]=O>>>8,I+2},w.prototype.writeInt16BE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,2,32767,-32768),this[I]=O>>>8,this[I+1]=O&255,I+2},w.prototype.writeInt32LE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,4,2147483647,-2147483648),this[I]=O&255,this[I+1]=O>>>8,this[I+2]=O>>>16,this[I+3]=O>>>24,I+4},w.prototype.writeInt32BE=function(O,I,re){return O=+O,I=I>>>0,re||at(this,O,I,4,2147483647,-2147483648),O<0&&(O=4294967295+O+1),this[I]=O>>>24,this[I+1]=O>>>16,this[I+2]=O>>>8,this[I+3]=O&255,I+4},w.prototype.writeBigInt64LE=S(function(O,I=0){return ut(this,O,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),w.prototype.writeBigInt64BE=S(function(O,I=0){return gt(this,O,I,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ze(H,O,I,re,N,_){if(I+re>H.length)throw new RangeError("Index out of range");if(I<0)throw new RangeError("Index out of range")}function lt(H,O,I,re,N){return O=+O,I=I>>>0,N||Ze(H,O,I,4,34028234663852886e22,-34028234663852886e22),v.write(H,O,I,re,23,4),I+4}w.prototype.writeFloatLE=function(O,I,re){return lt(this,O,I,!0,re)},w.prototype.writeFloatBE=function(O,I,re){return lt(this,O,I,!1,re)};function pt(H,O,I,re,N){return O=+O,I=I>>>0,N||Ze(H,O,I,8,17976931348623157e292,-17976931348623157e292),v.write(H,O,I,re,52,8),I+8}w.prototype.writeDoubleLE=function(O,I,re){return pt(this,O,I,!0,re)},w.prototype.writeDoubleBE=function(O,I,re){return pt(this,O,I,!1,re)},w.prototype.copy=function(O,I,re,N){if(!w.isBuffer(O))throw new TypeError("argument should be a Buffer");if(re||(re=0),!N&&N!==0&&(N=this.length),I>=O.length&&(I=O.length),I||(I=0),N>0&&N<re&&(N=re),N===re||O.length===0||this.length===0)return 0;if(I<0)throw new RangeError("targetStart out of bounds");if(re<0||re>=this.length)throw new RangeError("Index out of range");if(N<0)throw new RangeError("sourceEnd out of bounds");N>this.length&&(N=this.length),O.length-I<N-re&&(N=O.length-I+re);const _=N-re;return this===O&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(I,re,N):Uint8Array.prototype.set.call(O,this.subarray(re,N),I),_},w.prototype.fill=function(O,I,re,N){if(typeof O=="string"){if(typeof I=="string"?(N=I,I=0,re=this.length):typeof re=="string"&&(N=re,re=this.length),N!==void 0&&typeof N!="string")throw new TypeError("encoding must be a string");if(typeof N=="string"&&!w.isEncoding(N))throw new TypeError("Unknown encoding: "+N);if(O.length===1){const ue=O.charCodeAt(0);(N==="utf8"&&ue<128||N==="latin1")&&(O=ue)}}else typeof O=="number"?O=O&255:typeof O=="boolean"&&(O=Number(O));if(I<0||this.length<I||this.length<re)throw new RangeError("Out of range index");if(re<=I)return this;I=I>>>0,re=re===void 0?this.length:re>>>0,O||(O=0);let _;if(typeof O=="number")for(_=I;_<re;++_)this[_]=O;else{const ue=w.isBuffer(O)?O:w.from(O,N),Oe=ue.length;if(Oe===0)throw new TypeError('The value "'+O+'" is invalid for argument "value"');for(_=0;_<re-I;++_)this[_+I]=ue[_%Oe]}return this};const vt={};function dt(H,O,I){vt[H]=class extends I{constructor(){super();Object.defineProperty(this,"message",{value:O.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${H}]`,this.stack,delete this.name}get code(){return H}set code(N){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:N,writable:!0})}toString(){return`${this.name} [${H}]: ${this.message}`}}}dt("ERR_BUFFER_OUT_OF_BOUNDS",function(H){return H?`${H} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),dt("ERR_INVALID_ARG_TYPE",function(H,O){return`The "${H}" argument must be of type number. Received type ${typeof O}`},TypeError),dt("ERR_OUT_OF_RANGE",function(H,O,I){let re=`The value of "${H}" is out of range.`,N=I;return Number.isInteger(I)&&Math.abs(I)>mr(2,32)?N=It(String(I)):typeof I=="bigint"&&(N=String(I),(I>mr(BigInt(2),BigInt(32))||I<-mr(BigInt(2),BigInt(32)))&&(N=It(N)),N+="n"),re+=` It must be ${O}. Received ${N}`,re},RangeError);function It(H){let O="",I=H.length;const re=H[0]==="-"?1:0;for(;I>=re+4;I-=3)O=`_${H.slice(I-3,I)}${O}`;return`${H.slice(0,I)}${O}`}function Ft(H,O,I){Ut(O,"offset"),(H[O]===void 0||H[O+I]===void 0)&&jt(O,H.length-(I+1))}function Et(H,O,I,re,N,_){if(H>I||H<O){const ue=typeof O=="bigint"?"n":"";let Oe;throw _>3?O===0||O===BigInt(0)?Oe=`>= 0${ue} and < 2${ue} ** ${(_+1)*8}${ue}`:Oe=`>= -(2${ue} ** ${(_+1)*8-1}${ue}) and < 2 ** ${(_+1)*8-1}${ue}`:Oe=`>= ${O}${ue} and <= ${I}${ue}`,new vt.ERR_OUT_OF_RANGE("value",Oe,H)}Ft(re,N,_)}function Ut(H,O){if(typeof H!="number")throw new vt.ERR_INVALID_ARG_TYPE(O,"number",H)}function jt(H,O,I){throw Math.floor(H)!==H?(Ut(H,I),new vt.ERR_OUT_OF_RANGE(I||"offset","an integer",H)):O<0?new vt.ERR_BUFFER_OUT_OF_BOUNDS:new vt.ERR_OUT_OF_RANGE(I||"offset",`>= ${I?1:0} and <= ${O}`,H)}const Gt=/[^+/0-9A-Za-z-_]/g;function wt(H){if(H=H.split("=")[0],H=H.trim().replace(Gt,""),H.length<2)return"";for(;H.length%4!=0;)H=H+"=";return H}function Mt(H,O){O=O||1/0;let I;const re=H.length;let N=null;const _=[];for(let ue=0;ue<re;++ue){if(I=H.charCodeAt(ue),I>55295&&I<57344){if(!N){if(I>56319){(O-=3)>-1&&_.push(239,191,189);continue}else if(ue+1===re){(O-=3)>-1&&_.push(239,191,189);continue}N=I;continue}if(I<56320){(O-=3)>-1&&_.push(239,191,189),N=I;continue}I=(N-55296<<10|I-56320)+65536}else N&&(O-=3)>-1&&_.push(239,191,189);if(N=null,I<128){if((O-=1)<0)break;_.push(I)}else if(I<2048){if((O-=2)<0)break;_.push(I>>6|192,I&63|128)}else if(I<65536){if((O-=3)<0)break;_.push(I>>12|224,I>>6&63|128,I&63|128)}else if(I<1114112){if((O-=4)<0)break;_.push(I>>18|240,I>>12&63|128,I>>6&63|128,I&63|128)}else throw new Error("Invalid code point")}return _}function bt(H){const O=[];for(let I=0;I<H.length;++I)O.push(H.charCodeAt(I)&255);return O}function ve(H,O){let I,re,N;const _=[];for(let ue=0;ue<H.length&&!((O-=2)<0);++ue)I=H.charCodeAt(ue),re=I>>8,N=I%256,_.push(N),_.push(re);return _}function $(H){return c.toByteArray(wt(H))}function Y(H,O,I,re){let N;for(N=0;N<re&&!(N+I>=O.length||N>=H.length);++N)O[N+I]=H[N];return N}function ye(H,O){return H instanceof O||H!=null&&H.constructor!=null&&H.constructor.name!=null&&H.constructor.name===O.name}function de(H){return H!==H}const Ae=function(){const H="0123456789abcdef",O=new Array(256);for(let I=0;I<16;++I){const re=I*16;for(let N=0;N<16;++N)O[re+N]=H[I]+H[N]}return O}();function S(H){return typeof BigInt=="undefined"?Pe:H}function Pe(){throw new Error("BigInt not supported")}},24269:h=>{"use strict";var F=String.prototype.replace,o=/%20/g,c={RFC1738:"RFC1738",RFC3986:"RFC3986"};h.exports={default:c.RFC3986,formatters:{RFC1738:function(v){return F.call(v,o,"+")},RFC3986:function(v){return String(v)}},RFC1738:c.RFC1738,RFC3986:c.RFC3986}},92495:(h,F,o)=>{"use strict";var c=o(57347),v=o(73777),m=o(24269);h.exports={formats:m,parse:v,stringify:c}},73777:(h,F,o)=>{"use strict";var c=o(58760),v=Object.prototype.hasOwnProperty,m=Array.isArray,d={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:c.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},x=function(K){return K.replace(/&#(\d+);/g,function(R,Q){return String.fromCharCode(parseInt(Q,10))})},A=function(K,R){return K&&typeof K=="string"&&R.comma&&K.indexOf(",")>-1?K.split(","):K},w="utf8=%26%2310003%3B",T="utf8=%E2%9C%93",D=function(R,Q){var L={},P=Q.ignoreQueryPrefix?R.replace(/^\?/,""):R,V=Q.parameterLimit===1/0?void 0:Q.parameterLimit,X=P.split(Q.delimiter,V),z=-1,G,Z=Q.charset;if(Q.charsetSentinel)for(G=0;G<X.length;++G)X[G].indexOf("utf8=")===0&&(X[G]===T?Z="utf-8":X[G]===w&&(Z="iso-8859-1"),z=G,G=X.length);for(G=0;G<X.length;++G)if(G!==z){var ce=X[G],te=ce.indexOf("]="),se=te===-1?ce.indexOf("="):te+1,be,me;se===-1?(be=Q.decoder(ce,d.decoder,Z,"key"),me=Q.strictNullHandling?null:""):(be=Q.decoder(ce.slice(0,se),d.decoder,Z,"key"),me=c.maybeMap(A(ce.slice(se+1),Q),function(he){return Q.decoder(he,d.decoder,Z,"value")})),me&&Q.interpretNumericEntities&&Z==="iso-8859-1"&&(me=x(me)),ce.indexOf("[]=")>-1&&(me=m(me)?[me]:me),v.call(L,be)?L[be]=c.combine(L[be],me):L[be]=me}return L},B=function(K,R,Q,L){for(var P=L?R:A(R,Q),V=K.length-1;V>=0;--V){var X,z=K[V];if(z==="[]"&&Q.parseArrays)X=[].concat(P);else{X=Q.plainObjects?Object.create(null):{};var G=z.charAt(0)==="["&&z.charAt(z.length-1)==="]"?z.slice(1,-1):z,Z=parseInt(G,10);!Q.parseArrays&&G===""?X={0:P}:!isNaN(Z)&&z!==G&&String(Z)===G&&Z>=0&&Q.parseArrays&&Z<=Q.arrayLimit?(X=[],X[Z]=P):X[G]=P}P=X}return P},U=function(R,Q,L,P){if(!!R){var V=L.allowDots?R.replace(/\.([^.[]+)/g,"[$1]"):R,X=/(\[[^[\]]*])/,z=/(\[[^[\]]*])/g,G=L.depth>0&&X.exec(V),Z=G?V.slice(0,G.index):V,ce=[];if(Z){if(!L.plainObjects&&v.call(Object.prototype,Z)&&!L.allowPrototypes)return;ce.push(Z)}for(var te=0;L.depth>0&&(G=z.exec(V))!==null&&te<L.depth;){if(te+=1,!L.plainObjects&&v.call(Object.prototype,G[1].slice(1,-1))&&!L.allowPrototypes)return;ce.push(G[1])}return G&&ce.push("["+V.slice(G.index)+"]"),B(ce,Q,L,P)}},ee=function(R){if(!R)return d;if(R.decoder!==null&&R.decoder!==void 0&&typeof R.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof R.charset!="undefined"&&R.charset!=="utf-8"&&R.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var Q=typeof R.charset=="undefined"?d.charset:R.charset;return{allowDots:typeof R.allowDots=="undefined"?d.allowDots:!!R.allowDots,allowPrototypes:typeof R.allowPrototypes=="boolean"?R.allowPrototypes:d.allowPrototypes,allowSparse:typeof R.allowSparse=="boolean"?R.allowSparse:d.allowSparse,arrayLimit:typeof R.arrayLimit=="number"?R.arrayLimit:d.arrayLimit,charset:Q,charsetSentinel:typeof R.charsetSentinel=="boolean"?R.charsetSentinel:d.charsetSentinel,comma:typeof R.comma=="boolean"?R.comma:d.comma,decoder:typeof R.decoder=="function"?R.decoder:d.decoder,delimiter:typeof R.delimiter=="string"||c.isRegExp(R.delimiter)?R.delimiter:d.delimiter,depth:typeof R.depth=="number"||R.depth===!1?+R.depth:d.depth,ignoreQueryPrefix:R.ignoreQueryPrefix===!0,interpretNumericEntities:typeof R.interpretNumericEntities=="boolean"?R.interpretNumericEntities:d.interpretNumericEntities,parameterLimit:typeof R.parameterLimit=="number"?R.parameterLimit:d.parameterLimit,parseArrays:R.parseArrays!==!1,plainObjects:typeof R.plainObjects=="boolean"?R.plainObjects:d.plainObjects,strictNullHandling:typeof R.strictNullHandling=="boolean"?R.strictNullHandling:d.strictNullHandling}};h.exports=function(K,R){var Q=ee(R);if(K===""||K===null||typeof K=="undefined")return Q.plainObjects?Object.create(null):{};for(var L=typeof K=="string"?D(K,Q):K,P=Q.plainObjects?Object.create(null):{},V=Object.keys(L),X=0;X<V.length;++X){var z=V[X],G=U(z,L[z],Q,typeof K=="string");P=c.merge(P,G,Q)}return Q.allowSparse===!0?P:c.compact(P)}},57347:(h,F,o)=>{"use strict";var c=o(37478),v=o(58760),m=o(24269),d=Object.prototype.hasOwnProperty,x={brackets:function(L){return L+"[]"},comma:"comma",indices:function(L,P){return L+"["+P+"]"},repeat:function(L){return L}},A=Array.isArray,w=Array.prototype.push,T=function(Q,L){w.apply(Q,A(L)?L:[L])},D=Date.prototype.toISOString,B=m.default,U={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:v.encode,encodeValuesOnly:!1,format:B,formatter:m.formatters[B],indices:!1,serializeDate:function(L){return D.call(L)},skipNulls:!1,strictNullHandling:!1},ee=function(L){return typeof L=="string"||typeof L=="number"||typeof L=="boolean"||typeof L=="symbol"||typeof L=="bigint"},K=function Q(L,P,V,X,z,G,Z,ce,te,se,be,me,he,fe,oe){var Re=L;if(oe.has(L))throw new RangeError("Cyclic object value");if(typeof Z=="function"?Re=Z(P,Re):Re instanceof Date?Re=se(Re):V==="comma"&&A(Re)&&(Re=v.maybeMap(Re,function(Ze){return Ze instanceof Date?se(Ze):Ze})),Re===null){if(X)return G&&!he?G(P,U.encoder,fe,"key",be):P;Re=""}if(ee(Re)||v.isBuffer(Re)){if(G){var Ue=he?P:G(P,U.encoder,fe,"key",be);return[me(Ue)+"="+me(G(Re,U.encoder,fe,"value",be))]}return[me(P)+"="+me(String(Re))]}var Le=[];if(typeof Re=="undefined")return Le;var ke;if(V==="comma"&&A(Re))ke=[{value:Re.length>0?Re.join(",")||null:void 0}];else if(A(Z))ke=Z;else{var tt=Object.keys(Re);ke=ce?tt.sort(ce):tt}for(var Je=0;Je<ke.length;++Je){var qe=ke[Je],at=typeof qe=="object"&&qe.value!==void 0?qe.value:Re[qe];if(!(z&&at===null)){var ut=A(Re)?typeof V=="function"?V(P,qe):P:P+(te?"."+qe:"["+qe+"]");oe.set(L,!0);var gt=c();T(Le,Q(at,ut,V,X,z,G,Z,ce,te,se,be,me,he,fe,gt))}}return Le},R=function(L){if(!L)return U;if(L.encoder!==null&&L.encoder!==void 0&&typeof L.encoder!="function")throw new TypeError("Encoder has to be a function.");var P=L.charset||U.charset;if(typeof L.charset!="undefined"&&L.charset!=="utf-8"&&L.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var V=m.default;if(typeof L.format!="undefined"){if(!d.call(m.formatters,L.format))throw new TypeError("Unknown format option provided.");V=L.format}var X=m.formatters[V],z=U.filter;return(typeof L.filter=="function"||A(L.filter))&&(z=L.filter),{addQueryPrefix:typeof L.addQueryPrefix=="boolean"?L.addQueryPrefix:U.addQueryPrefix,allowDots:typeof L.allowDots=="undefined"?U.allowDots:!!L.allowDots,charset:P,charsetSentinel:typeof L.charsetSentinel=="boolean"?L.charsetSentinel:U.charsetSentinel,delimiter:typeof L.delimiter=="undefined"?U.delimiter:L.delimiter,encode:typeof L.encode=="boolean"?L.encode:U.encode,encoder:typeof L.encoder=="function"?L.encoder:U.encoder,encodeValuesOnly:typeof L.encodeValuesOnly=="boolean"?L.encodeValuesOnly:U.encodeValuesOnly,filter:z,format:V,formatter:X,serializeDate:typeof L.serializeDate=="function"?L.serializeDate:U.serializeDate,skipNulls:typeof L.skipNulls=="boolean"?L.skipNulls:U.skipNulls,sort:typeof L.sort=="function"?L.sort:null,strictNullHandling:typeof L.strictNullHandling=="boolean"?L.strictNullHandling:U.strictNullHandling}};h.exports=function(Q,L){var P=Q,V=R(L),X,z;typeof V.filter=="function"?(z=V.filter,P=z("",P)):A(V.filter)&&(z=V.filter,X=z);var G=[];if(typeof P!="object"||P===null)return"";var Z;L&&L.arrayFormat in x?Z=L.arrayFormat:L&&"indices"in L?Z=L.indices?"indices":"repeat":Z="indices";var ce=x[Z];X||(X=Object.keys(P)),V.sort&&X.sort(V.sort);for(var te=c(),se=0;se<X.length;++se){var be=X[se];V.skipNulls&&P[be]===null||T(G,K(P[be],be,ce,V.strictNullHandling,V.skipNulls,V.encode?V.encoder:null,V.filter,V.sort,V.allowDots,V.serializeDate,V.format,V.formatter,V.encodeValuesOnly,V.charset,te))}var me=G.join(V.delimiter),he=V.addQueryPrefix===!0?"?":"";return V.charsetSentinel&&(V.charset==="iso-8859-1"?he+="utf8=%26%2310003%3B&":he+="utf8=%E2%9C%93&"),me.length>0?he+me:""}},58760:(h,F,o)=>{"use strict";var c=o(24269),v=Object.prototype.hasOwnProperty,m=Array.isArray,d=function(){for(var L=[],P=0;P<256;++P)L.push("%"+((P<16?"0":"")+P.toString(16)).toUpperCase());return L}(),x=function(P){for(;P.length>1;){var V=P.pop(),X=V.obj[V.prop];if(m(X)){for(var z=[],G=0;G<X.length;++G)typeof X[G]!="undefined"&&z.push(X[G]);V.obj[V.prop]=z}}},A=function(P,V){for(var X=V&&V.plainObjects?Object.create(null):{},z=0;z<P.length;++z)typeof P[z]!="undefined"&&(X[z]=P[z]);return X},w=function L(P,V,X){if(!V)return P;if(typeof V!="object"){if(m(P))P.push(V);else if(P&&typeof P=="object")(X&&(X.plainObjects||X.allowPrototypes)||!v.call(Object.prototype,V))&&(P[V]=!0);else return[P,V];return P}if(!P||typeof P!="object")return[P].concat(V);var z=P;return m(P)&&!m(V)&&(z=A(P,X)),m(P)&&m(V)?(V.forEach(function(G,Z){if(v.call(P,Z)){var ce=P[Z];ce&&typeof ce=="object"&&G&&typeof G=="object"?P[Z]=L(ce,G,X):P.push(G)}else P[Z]=G}),P):Object.keys(V).reduce(function(G,Z){var ce=V[Z];return v.call(G,Z)?G[Z]=L(G[Z],ce,X):G[Z]=ce,G},z)},T=function(P,V){return Object.keys(V).reduce(function(X,z){return X[z]=V[z],X},P)},D=function(L,P,V){var X=L.replace(/\+/g," ");if(V==="iso-8859-1")return X.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(X)}catch(z){return X}},B=function(P,V,X,z,G){if(P.length===0)return P;var Z=P;if(typeof P=="symbol"?Z=Symbol.prototype.toString.call(P):typeof P!="string"&&(Z=String(P)),X==="iso-8859-1")return escape(Z).replace(/%u[0-9a-f]{4}/gi,function(be){return"%26%23"+parseInt(be.slice(2),16)+"%3B"});for(var ce="",te=0;te<Z.length;++te){var se=Z.charCodeAt(te);if(se===45||se===46||se===95||se===126||se>=48&&se<=57||se>=65&&se<=90||se>=97&&se<=122||G===c.RFC1738&&(se===40||se===41)){ce+=Z.charAt(te);continue}if(se<128){ce=ce+d[se];continue}if(se<2048){ce=ce+(d[192|se>>6]+d[128|se&63]);continue}if(se<55296||se>=57344){ce=ce+(d[224|se>>12]+d[128|se>>6&63]+d[128|se&63]);continue}te+=1,se=65536+((se&1023)<<10|Z.charCodeAt(te)&1023),ce+=d[240|se>>18]+d[128|se>>12&63]+d[128|se>>6&63]+d[128|se&63]}return ce},U=function(P){for(var V=[{obj:{o:P},prop:"o"}],X=[],z=0;z<V.length;++z)for(var G=V[z],Z=G.obj[G.prop],ce=Object.keys(Z),te=0;te<ce.length;++te){var se=ce[te],be=Z[se];typeof be=="object"&&be!==null&&X.indexOf(be)===-1&&(V.push({obj:Z,prop:se}),X.push(be))}return x(V),P},ee=function(P){return Object.prototype.toString.call(P)==="[object RegExp]"},K=function(P){return!P||typeof P!="object"?!1:!!(P.constructor&&P.constructor.isBuffer&&P.constructor.isBuffer(P))},R=function(P,V){return[].concat(P,V)},Q=function(P,V){if(m(P)){for(var X=[],z=0;z<P.length;z+=1)X.push(V(P[z]));return X}return V(P)};h.exports={arrayToObject:A,assign:T,combine:R,compact:U,decode:D,encode:B,isBuffer:K,isRegExp:ee,maybeMap:Q,merge:w}},13692:h=>{var F=h.exports=function(R){return new o(R)};function o(R){this.value=R}o.prototype.get=function(R){for(var Q=this.value,L=0;L<R.length;L++){var P=R[L];if(!Q||!K.call(Q,P)){Q=void 0;break}Q=Q[P]}return Q},o.prototype.has=function(R){for(var Q=this.value,L=0;L<R.length;L++){var P=R[L];if(!Q||!K.call(Q,P))return!1;Q=Q[P]}return!0},o.prototype.set=function(R,Q){for(var L=this.value,P=0;P<R.length-1;P++){var V=R[P];K.call(L,V)||(L[V]={}),L=L[V]}return L[R[P]]=Q,Q},o.prototype.map=function(R){return c(this.value,R,!0)},o.prototype.forEach=function(R){return this.value=c(this.value,R,!1),this.value},o.prototype.reduce=function(R,Q){var L=arguments.length===1,P=L?this.value:Q;return this.forEach(function(V){(!this.isRoot||!L)&&(P=R.call(this,P,V))}),P},o.prototype.paths=function(){var R=[];return this.forEach(function(Q){R.push(this.path)}),R},o.prototype.nodes=function(){var R=[];return this.forEach(function(Q){R.push(this.node)}),R},o.prototype.clone=function(){var R=[],Q=[];return function L(P){for(var V=0;V<R.length;V++)if(R[V]===P)return Q[V];if(typeof P=="object"&&P!==null){var X=v(P);return R.push(P),Q.push(X),ee(m(P),function(z){X[z]=L(P[z])}),R.pop(),Q.pop(),X}else return P}(this.value)};function c(R,Q,L){var P=[],V=[],X=!0;return function z(G){var Z=L?v(G):G,ce={},te=!0,se={node:Z,node_:G,path:[].concat(P),parent:V[V.length-1],parents:V,key:P.slice(-1)[0],isRoot:P.length===0,level:P.length,circular:null,update:function(he,fe){se.isRoot||(se.parent.node[se.key]=he),se.node=he,fe&&(te=!1)},delete:function(he){delete se.parent.node[se.key],he&&(te=!1)},remove:function(he){U(se.parent.node)?se.parent.node.splice(se.key,1):delete se.parent.node[se.key],he&&(te=!1)},keys:null,before:function(he){ce.before=he},after:function(he){ce.after=he},pre:function(he){ce.pre=he},post:function(he){ce.post=he},stop:function(){X=!1},block:function(){te=!1}};if(!X)return se;function be(){if(typeof se.node=="object"&&se.node!==null){(!se.keys||se.node_!==se.node)&&(se.keys=m(se.node)),se.isLeaf=se.keys.length==0;for(var he=0;he<V.length;he++)if(V[he].node_===G){se.circular=V[he];break}}else se.isLeaf=!0,se.keys=null;se.notLeaf=!se.isLeaf,se.notRoot=!se.isRoot}be();var me=Q.call(se,se.node);return me!==void 0&&se.update&&se.update(me),ce.before&&ce.before.call(se,se.node),te&&(typeof se.node=="object"&&se.node!==null&&!se.circular&&(V.push(se),be(),ee(se.keys,function(he,fe){P.push(he),ce.pre&&ce.pre.call(se,se.node[he],he);var oe=z(se.node[he]);L&&K.call(se.node,he)&&(se.node[he]=oe.node),oe.isLast=fe==se.keys.length-1,oe.isFirst=fe==0,ce.post&&ce.post.call(se,oe),P.pop()}),V.pop()),ce.after&&ce.after.call(se,se.node)),se}(R).node}function v(R){if(typeof R=="object"&&R!==null){var Q;if(U(R))Q=[];else if(x(R))Q=new Date(R.getTime?R.getTime():R);else if(A(R))Q=new RegExp(R);else if(w(R))Q={message:R.message};else if(T(R))Q=new Boolean(R);else if(D(R))Q=new Number(R);else if(B(R))Q=new String(R);else if(Object.create&&Object.getPrototypeOf)Q=Object.create(Object.getPrototypeOf(R));else if(R.constructor===Object)Q={};else{var L=R.constructor&&R.constructor.prototype||R.__proto__||{},P=function(){};P.prototype=L,Q=new P}return ee(m(R),function(V){Q[V]=R[V]}),Q}else return R}var m=Object.keys||function(Q){var L=[];for(var P in Q)L.push(P);return L};function d(R){return Object.prototype.toString.call(R)}function x(R){return d(R)==="[object Date]"}function A(R){return d(R)==="[object RegExp]"}function w(R){return d(R)==="[object Error]"}function T(R){return d(R)==="[object Boolean]"}function D(R){return d(R)==="[object Number]"}function B(R){return d(R)==="[object String]"}var U=Array.isArray||function(Q){return Object.prototype.toString.call(Q)==="[object Array]"},ee=function(R,Q){if(R.forEach)return R.forEach(Q);for(var L=0;L<R.length;L++)Q(R[L],L,R)};ee(m(o.prototype),function(R){F[R]=function(Q){var L=[].slice.call(arguments,1),P=new o(Q);return P[R].apply(P,L)}});var K=Object.hasOwnProperty||function(R,Q){return Q in R}},24654:()=>{}}]);