@redocly/reference-docs 1.5.12 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/bin/cli/commands/redocly-docs-cli.min.js +27 -27
  2. package/dist/console.redocly-reference-docs.min.js +7 -7
  3. package/dist/oauth2-redirect.js +1 -1
  4. package/dist/redocly-reference-docs.min.js +6 -6
  5. package/lib/components/console/AuthPanel.js +1 -1
  6. package/lib/components/console/Console.js +1 -1
  7. package/lib/components/console/OAuth2Implicit.d.ts +1 -0
  8. package/lib/components/console/OAuth2Implicit.js +1 -1
  9. package/lib/components/console/OAuth2TokenInput.d.ts +1 -0
  10. package/lib/components/console/OAuth2TokenInput.js +1 -1
  11. package/lib/components/console/OpenIDConnect.d.ts +1 -0
  12. package/lib/components/console/OpenIDConnect.js +1 -1
  13. package/lib/components/console/OperationParameters.js +1 -1
  14. package/lib/redoc-lib/src/services/RedocNormalizedOptions.d.ts +2 -0
  15. package/lib/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
  16. package/lib/redoc-lib/src/services/models/MediaType.d.ts +1 -0
  17. package/lib/redoc-lib/src/services/models/MediaType.js +1 -1
  18. package/lib/redoc-lib/src/services/models/SecurityRequirement.d.ts +1 -0
  19. package/lib/redoc-lib/src/types/open-api.d.ts +5 -0
  20. package/lib/redoc-lib/src/utils/openapi.js +1 -1
  21. package/lib/services/ProStore.js +1 -1
  22. package/lib/services/check.d.ts +1 -0
  23. package/lib/services/check.js +1 -1
  24. package/lib/services/code-samples/generator.js +1 -1
  25. package/lib/utils.d.ts +1 -1
  26. package/lib/utils.js +1 -1
  27. package/lib-esm/components/console/AuthPanel.js +1 -1
  28. package/lib-esm/components/console/Console.js +1 -1
  29. package/lib-esm/components/console/OAuth2Implicit.d.ts +1 -0
  30. package/lib-esm/components/console/OAuth2Implicit.js +1 -1
  31. package/lib-esm/components/console/OAuth2TokenInput.d.ts +1 -0
  32. package/lib-esm/components/console/OAuth2TokenInput.js +1 -1
  33. package/lib-esm/components/console/OpenIDConnect.d.ts +1 -0
  34. package/lib-esm/components/console/OpenIDConnect.js +1 -1
  35. package/lib-esm/components/console/OperationParameters.js +1 -1
  36. package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.d.ts +2 -0
  37. package/lib-esm/redoc-lib/src/services/RedocNormalizedOptions.js +1 -1
  38. package/lib-esm/redoc-lib/src/services/models/MediaType.d.ts +1 -0
  39. package/lib-esm/redoc-lib/src/services/models/MediaType.js +1 -1
  40. package/lib-esm/redoc-lib/src/services/models/SecurityRequirement.d.ts +1 -0
  41. package/lib-esm/redoc-lib/src/types/open-api.d.ts +5 -0
  42. package/lib-esm/redoc-lib/src/utils/openapi.js +1 -1
  43. package/lib-esm/services/ProStore.js +1 -1
  44. package/lib-esm/services/check.d.ts +1 -0
  45. package/lib-esm/services/check.js +1 -1
  46. package/lib-esm/services/code-samples/generator.js +1 -1
  47. package/lib-esm/utils.d.ts +1 -1
  48. package/lib-esm/utils.js +1 -1
  49. package/package.json +1 -1
@@ -2,11 +2,11 @@
2
2
  * Redocly Reference Docs
3
3
  * (c) Copyright 2018 Redocly LLC, all rights reserved.
4
4
  * -------------------------------------------------------------
5
- * Version: "1.5.12"
5
+ * Version: "1.6.0"
6
6
  */
7
- (this.webpackJsonpRedoclyReferenceDocs=this.webpackJsonpRedoclyReferenceDocs||[]).push([[0],Array(513).concat([function(e,t,n){"use strict";var r=n(517),o=n(547).f,i=n(657),a=n(514),s=n(558),l=n(525),c=n(522),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,k=b?r:x?r[y]:(r[y]||{}).prototype,C=b?a:a[y]||(a[y]={}),A=C.prototype;for(p in t)n=!i(b?p:y+(x?".":"#")+p,e.forced)&&k&&c(k,p),h=C[p],n&&(v=e.noTargetGet?(m=o(k,p))&&m.value:k[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),C[p]=g,w&&(c(a,f=y+"Prototype")||l(a,f,{}),a[f][p]=d,e.real&&A&&!A[p]&&l(A,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(514),o=n(522),i=n(613),a=n(530).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(15))},function(e,t,n){var r=n(517),o=n(609),i=n(522),a=n(582),s=n(607),l=n(661),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){var r=n(515);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(519);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(529),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(882)},function(e,t,n){var r=n(520),o=n(530),i=n(548);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(514);e.exports=function(e){return r[e+"Prototype"]}},function(e,t,n){var r=n(654),o=n(659),i=n(748),a=n(667),s=n(755),l=n(765),c=n(770),u=n(617),f=n(673);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(602),o=n(577);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(577);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(520),o=n(656),i=n(521),a=n(578),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(514),o=n(517),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(676),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(881)},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(591),o=n(839);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 k=y&&(c||f&&(null==w||w<12.11)),C=n||a&&s>=9;function A(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var O,S=function(e,t){var n=e.className,r=A(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 L(){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;A(t).test(n)||(e.className+=(n?" ":"")+t)}function I(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!A(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 _=function(e){e.select()};function N(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?_=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(_=function(e){try{e.select()}catch(e){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=N(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"}},z={scroll:!1},W={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 k=0;k<u;++k){var C=f[k];if(","==C)f[k]="N";else if("%"==C){var A=void 0;for(A=k+1;A<u&&"%"==f[A];++A);for(var O=k&&"!"==f[k-1]||A<u&&"1"==f[A]?"1":"N",S=k;S<A;++S)f[S]=O;k=A-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 L="L"==(M?f[M-1]:l),F=L==("L"==(P<u?f[P]:l))?L?"L":"R":l,I=M;I<P;++I)f[I]=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);N.push(new i(0,R,D))}else{var V=D,B=N.length,U="rtl"==s?1:0;for(++D;D<u&&"L"!=f[D];++D);for(var z=V;z<D;)if(o.test(f[z])){V<z&&(N.splice(B,0,new i(1,V,z)),B+=U);var W=z;for(++z;z<D&&o.test(f[z]);++z);N.splice(B,0,new i(2,W,z)),B+=U,V=z}else++z;V<D&&N.splice(B,0,new i(1,V,D))}return"ltr"==s&&(1==N[0].level&&(_=a.match(/^\s+/))&&(N[0].from=_[0].length,N.unshift(new i(0,0,_[0].length))),1==K(N).level&&(_=a.match(/\s+$/))&&(K(N).to-=_[0].length,N.push(new i(0,u-_[0].length,u)))),"rtl"==s?N.reverse():N}}();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 ke(e){be(e),xe(e)}function Ce(e){return e.target||e.srcElement}function Ae(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/)},Le=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),Ie=null,_e={},Ne={};function De(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_e[e]=t}function Re(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[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=_e[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 ze(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 We(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&&ze(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=We(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]=We(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,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(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,ze(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,kt=!1;function Ct(e,t,n){this.marker=e,this.from=t,this.to=n}function At(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 Ct(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 Ct(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=At(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?At(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 Ct(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 Lt(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=kt&&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||Lt(n,o.marker)<0)&&(n=o.marker);return n}function It(e){return Ft(e,!0)}function _t(e){return Ft(e,!1)}function Nt(e,t){var n,r=kt&&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||Lt(n,i.marker)<0)&&(n=i.marker)}return n}function Dt(e,t,n,r,o){var i=Ge(e,t),a=kt&&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=It(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=_t(r);)r=n.find(1,!0).line;return Ye(r)+1}function Ut(e,t){var n=kt&&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&&zt(e,t,r))return!0}}function zt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return zt(e,r.line,At(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)&&zt(e,t,o))return!0}function Wt(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=It(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=_t(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=I(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=I(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=I(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 k in l)l.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&w.setAttribute(k,l[k]);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],k=w.marker;if("bookmark"==k.type&&w.from==h&&k.widgetNode)y.push(k);else if(w.from<=h&&(null==w.to||w.to>h||k.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&m>w.to&&(m=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==h&&(u+=" "+k.startStyle),k.endStyle&&w.to==m&&(b||(b=[])).push(k.endStyle,w.to),k.title&&((p||(p={})).title=k.title),k.attributes)for(var C in k.attributes)(p||(p={}))[C]=k.attributes[C];k.collapsed&&(!f||Lt(f.marker,k)<0)&&(f=w)}else w.from>h&&m>w.from&&(m=w.from)}if(b)for(var A=0;A<b.length;A+=2)b[A+1]==m&&(c+=" "+b[A]);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=_t(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=A("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 kn(e,t){for(var n=Ce(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 Cn(e){return e.lineSpace.offsetTop}function An(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,Ln(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 Ln(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=Nn(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!=Ie)return Ie;var t=j(e,T("span","x")),n=t.getBoundingClientRect(),r=O(t,0,1).getBoundingClientRect();return Ie=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}:_n}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],k={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||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rtop=v,k.rbottom=g),k}(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 In,_n={left:0,right:0,top:0,bottom:0};function Nn(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=_n;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 zn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wn(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=Wn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=Wt(t);if("local"==r?a+=Cn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:zn());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-=zn();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=Ln(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=Wt(r)+Cn(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=Nt(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-=Wn(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=Ln(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-=Wt(t);var i=Ln(e,t),a=Wn(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==In){In=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)In.appendChild(document.createTextNode("x")),In.appendChild(T("br"));In.appendChild(document.createTextNode("x"))}j(e.measure,In);var n=In.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"==Ce(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)kt&&Vt(e.doc,t)<o.viewTo&&dr(e);else if(n<=o.viewFrom)kt&&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(!kt||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,k=!v||f==v.length-1;if(y.top-m.top<=3){var C=(c?x:b)&&k,A=(c?b:x)&&w?s:(g?m:y).left,O=C?l:(g?y:m).right;u(A,m.top,O-A,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&&k?l:y.right):(S=c?h(e,o,"before"):s,E=!c&&b&&w?l:m.right,j=!c&&x&&k?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 kr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ar(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Or(e))}),100)}function Ar(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-Cn(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,Wt(Ge(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(i=Xe(t,Wt(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+An(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 Lr(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,Ir(e,Kn(e,t.from),Kn(e,t.to),t.margin))}function Ir(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});Lr(e,o.scrollLeft,o.scrollTop)}function _r(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||lo(e,{top:t}),Nr(e,t,!0),n&&lo(e),ro(e,100))}function Nr(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+An(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;zr(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),zr(e,Rr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var Wr={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 Wr[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):_r(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==L();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&&kr(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&&Nr(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-Cn(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&&(_r(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,N(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?ze(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)),kt&&(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=Wt(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=L();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!=L()&&(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+An(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 ko(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&&_r(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 Co=function(e,t){this.ranges=e,this.primIndex=t};Co.prototype.primary=function(){return this.ranges[this.primIndex]},Co.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},Co.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ao(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new Co(e,this.primIndex)},Co.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Co.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 Ao=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 Ao(f?u:c,f?c:u))}}return new Co(t,n)}function So(e,t){return new Co([new Ao(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 Ao(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),Lo(e)}function Lo(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 Io(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 _o(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 No(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),_o(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||Wo(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 zo(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:Wo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Bo(o.undone)}function Wo(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?Co.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 Ao(o,t)}return new Ao(n||t,t)}function Jo(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new Co([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),zo(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 Ao(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 Ao(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()),z)}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=[];_o(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(Wo(o,l),n&&!o.equals(e.sel))return void ei(e,o,{clearRedo:!1});a=o}var u=[];Wo(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=[];_o(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 Co(J(e.sel.ranges,(function(e){return new Ao(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),Io(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):Io(e,t,r),ti(e,n,z),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}Ao.prototype.from=function(){return it(this.anchor,this.head)},Ao.prototype.to=function(){return ot(this.anchor,this.head)},Ao.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 ki=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 Ci(e,t,n){Wt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Mr(e,n)}ki.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(){Ci(e,n,-i),pr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},ki.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,Ci(n,r,o),ln(n,"lineWidgetChanged",n,e,Ye(r))})))},ye(ki);var Ai=0,Oi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ai};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 _o(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");kt=!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 Ct(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=++Ai,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=At(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=At(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];_o(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)),Io(this,{from:i,to:i,text:e}),ei(this,So(i),z)};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&&Lr(this.cm,0,0),ei(this,So(t),z)})),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 Ao(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 Ao(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 Ao(f?c:l,f?l:c)}else r[a]=new Ao(l,l)}return new Co(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),_o(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(A(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(A(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 ki(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=Wt(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];_o(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){_o(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 Li=0;function Fi(e){var t=this;if(Ii(t),!ve(t,e)&&!kn(t.display,e)){be(e),a&&(Li=+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 Ii(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function _i(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 Ni=!1;function Di(){var e;Ni||(fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,_i(Ri)}),100))})),fe(window,"blur",(function(){return _i(Or)})),Ni=!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 zi=1;zi<=12;zi++)Vi[zi+111]=Vi[zi+63235]="F"+zi;var Wi={};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),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(k?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?Wi[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=Ln(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")}Wi.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"},Wi.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"},Wi.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"},Wi.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"]},Wi.default=y?Wi.macDefault:Wi.pcDefault;var ta={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},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=_t(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 Ao(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=L(),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()||kn(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,kn(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=Ae(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(N(kr,e),0):e.curOp.focus=L();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:Cr(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&&Cr(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 Ao(n,n)):(s=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Ao(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,W):(l=0,ei(i,new Co([s],0),W),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 Ao(et(v,y),et(v,y))):m.length>y&&o.push(new Ao(et(v,y),et(v,q(m,h,a))))}o.length||o.push(new Ao(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),k=x.anchor;tt(w.anchor,k)>0?(b=w.head,k=it(x.from(),w.anchor)):(b=w.anchor,k=ot(x.to(),w.head));var C=c.ranges.slice(0);C[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 Ao(new et(n.line,h,v),r)}(e,new Ao(st(i,k),b)),ei(i,Oo(e,C,l),W)}}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&&Ae(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=L(),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):Ce(e)==n.scroller&&be(e):2==o?(r&&Jo(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function ma(e,t,n){if("char"==n)return new Ao(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ao(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ao(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){kn(e.display,t)||function(e,t){return!!me(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||C||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 ka={toString:function(){return"CodeMirror.Init"}},Ca={},Aa={};function Oa(e,t,n){if(!t!=!(n&&n!=ka)){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(Ca,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)&&!kn(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&&!kn(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 Ao(s,s):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(s):new Ao(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&&(_r(e,t.scroller.scrollTop),Dr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return ko(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return ko(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||ke(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),ke(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Li<100))ke(t);else if(!ve(e,t)&&!kn(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)||Ii(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 Ar(e,t)})),fe(l,"blur",(function(t){return Or(e,t)}))}(this),Di(),Gr(this),this.curOp.forceUpdate=!0,No(this,r),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ar(n)}),20):Or(this),Aa)Aa.hasOwnProperty(c)&&Aa[c](this,t[c],ka);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=Ca,Ea.optionHandlers=Aa;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 Ao(g,g));break}}}Ea.defineInitHook=function(e){return ja.push(e)};var Ma=null;function Pa(e){Ma=e}function La(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&&Ia(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 La(t,n,0,null,"paste")})),!0}function Ia(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var 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 _a(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 Na(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"),Na(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||Ln(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=Nn(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function za(e,t){return t&&(e.bad=!0),e}function Wa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return za(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 za(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 za(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 za(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 za(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 za(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=_a(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),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=L();_(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,Na(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=L()==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=Wa(t,e.anchorNode,e.anchorOffset),s=Wa(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()&&L()==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=Wa(t,e.anchorNode,e.anchorOffset),r=Wa(t,e.focusNode,e.focusOffset);n&&r&&Zr(t,(function(){ei(t.doc,So(n,r),z),(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),k=et(l,p.length?K(p).length-h:0);return f.length>1||f[0]||tt(w,k)?(vi(r.doc,f,w,k,"+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,La)(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=_a(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",o.value=t.text.join("\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(!kn(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){kn(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&&_(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||L()!=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||Le(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(){La(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),z);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(),C){ke(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!=ka&&o(e,t,n)}:o)}e.defineOption=n,e.Init=ka,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){Lo(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!=ka&&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!=ka&&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,Lo,!0),n("addModeClass",!1,Lo,!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,Lo,!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 Ao(i,c[r].to()),z)}}})),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-Wt(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&&_r(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){Ia(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 Ao(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()==L()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:to((function(e,t){Lr(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):Ir(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),Lr(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(),No(this,e),Bn(this),this.display.input.reset(),Lr(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){Ne[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=L();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=Wr,e.Pos=et,e.cmpPos=tt,e.modes=_e,e.mimeModes=Ne,e.resolveMode=Re,e.getMode=Ve,e.modeExtensions=Be,e.extendMode=Ue,e.copyState=ze,e.startState=He,e.innerMode=We,e.commands=ta,e.keyMap=Wi,e.keyName=Ji,e.isModifierKey=$i,e.lookupKey=Gi,e.normalizeKeyMap=qi,e.StringStream=qe,e.SharedTextMarker=Ei,e.TextMarker=Oi,e.LineWidget=ki,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=ke,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){var r=n(579),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(664),s=n(517),l=n(519),c=n(525),u=n(522),f=n(610),p=n(581),d=n(560),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(558),o=n(602),i=n(529),a=n(539),s=n(615),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),k=r(v,g,3),C=a(w.length),A=0,O=m||s,S=t?O(h,C):n||p?O(h,0):void 0;C>A;A++)if((d||A in w)&&(b=k(y=w[A],A,x),e))if(t)S[A]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return A;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(777),o=n(782);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(553),o=n(778),i=n(779),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(877)},function(e,t,n){e.exports=n(889)},function(e,t,n){e.exports=n(968)},function(e,t,n){var r=n(520),o=n(576),i=n(548),a=n(528),s=n(578),l=n(522),c=n(656),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(614),o=n(530).f,i=n(525),a=n(522),s=n(747),l=n(518)("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(668);var r=n(760),o=n(517),i=n(564),a=n(525),s=n(552),l=n(518)("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(532).Symbol;e.exports=r},function(e,t,n){var r=n(585),o=n(620);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(680),o=n(681),i=n(554);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(521),o=n(693),i=n(539),a=n(558),s=n(627),l=n(692),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),k=function(e){return u&&l(u),new c(!0,e)},C=function(e){return y?(r(e),x?w(e[0],e[1],k):w(e[0],e[1])):x?w(e,k):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=C(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=C(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){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(538);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(658),o=n(606);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){e.exports={}},function(e,t,n){var r=n(557);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r,o=n(521),i=n(662),a=n(606),s=n(560),l=n(663),c=n(603),u=n(581),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(525);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},function(e,t,n){var r=n(614),o=n(557),i=n(518)("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(515),o=n(518),i=n(580),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(522),o=n(529),i=n(581),a=n(671),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(578),o=n(530),i=n(548);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(584),o=n(674);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(842),o=n(843),i=n(629),a=n(844);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(538),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){var r=n(590);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(969)},function(e,t,n){var r=n(999),o=n(643),i=n(1e3),a=n(1001),s=n(1002),l=n(543),c=n(677),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";(function(e){n.d(t,"a",(function(){return Ge})),n.d(t,"b",(function(){return $e})),n.d(t,"c",(function(){return xe})),n.d(t,"d",(function(){return me})),n.d(t,"e",(function(){return ve}));var r=n(0),o=n.n(r),i=n(172);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return(u=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 f(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(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&&v(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(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 m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?m(e):t}function b(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=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function x(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)||k(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 w(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||k(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 k(e,t){if(e){if("string"==typeof e)return C(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)?C(e,t):void 0}}function C(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 A=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})}})),O=A("informed:ObjMap\t"),S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String.prototype.replace.call(e,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},E=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},j=function(e){return".".concat(e).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},T=function(e,t){var n=j(t),r=function(e){return e.replace(j(e),"").replace(/\./,"")}(t),o=n?E(e,n):e;return!(!o||!Object.hasOwnProperty.call(o,r.replace(/\[(.*)\]/,"$1")))},M=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)},P=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},L=function(e){var t=S(e);return Number.isInteger(+t[t.length-1])},F=function(){function e(){a(this,e)}return l(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 E(e,t)}},{key:"has",value:function(e,t){return T(e,t)}},{key:"set",value:function(t,n,r){if(void 0!==r)O("SETTING",n,r),M(t,n,r);else if(L(n)&&void 0!==e.get(t,n)){O("Special case SETTING",n,"to undefined"),M(t,n,void 0);var o=S(n);I(t,o=o.slice(0,o.length-1))}else L(n)||void 0===e.get(t,n)||(O("Special case REMOVING",n,"from object completley"),e.delete(t,n))}},{key:"delete",value:function(e,t){O("DELETE",t),L(t)?(O("ARRAY",t),this.pullOut(e,t)):P(e,t);var n=S(t);I(e,n=n.slice(0,n.length-1))}},{key:"pullOut",value:function(e,t){var n=S(t),r=n[n.length-1];n=n.slice(0,n.length-1),O("Pulling out:",n,"index",r);var o=E(e,n);O("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),I(e,n)}}]),e}();function I(e,t){if(0!==t.length){var n=E(e,t);(Array.isArray(n)?n.every((function(e){return null==e})):"{}"===JSON.stringify(n))&&P(e,t),I(e,t.slice(0,t.length-1))}}var _=o.a.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),N=o.a.createContext({}),D=o.a.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),R=o.a.createContext(),V=o.a.createContext(),B=o.a.createContext(),U=o.a.createContext(),z=o.a.createContext(),W=o.a.createContext();function H(){return Object(r.useContext)(D)}function q(e){var t=Object(r.useRef)(),n=Object(r.useRef)(!0),o=x(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 G=function(e){return e.type&&e.type.name?e.type.name:e.displayName||e.name||"Component"},$=function(e){var t={};if(e.inner){if(0===e.inner.length)return void F.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=k(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;F.get(t,o.path)||F.set(t,o.path,o.message)}}catch(o){r.e(o)}finally{r.f()}}return t},K=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(e){return $(e)}},J=function(e){if(e.inner){if(0===e.inner.length)return;return e.inner[0].message}},Y=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(e){return J(e)}},X=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(".",""),F.set(n,a,t)})),n},Q=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)}))},Z=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,f=t.title,d=t.minimum,h=t.maximum,v=t.minLength,g=t.maxLength,m=t.pattern,y=t.type,b=t.properties,x=Q();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:p(p({label:f,id:x,min:d,max:h,minLength:v,maxLength:g,pattern:m},o),i)};if(l){var k=t.oneOf.map((function(e){var t=e["input:props"],n=void 0===t?{}:t;return p({value:e.const,label:e.title},n)}));w.props.options=k}if(u){var C=t.enum.map((function(e){return{value:e,label:e}}));w.props.options=C}if(c&&c.oneOf){var A=c.oneOf.map((function(e){var t=e["input:props"],n=void 0===t?{}:t;return p({value:e.const,label:e.title},n)}));w.props.options=A}return w},ee=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 Z(e,t,n)}));return i&&l.push({componentType:"conditionals",allOf:i}),l}return[]},te=function(e,t){if(!e)return{value:e,offset:0};var n=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,e),r=n.findIndex((function(e){return"string"!=typeof e})),o=n.length-w(n).reverse().findIndex((function(e){return"string"!=typeof e})),i=[],a=e.split(""),s=0,l=0,c=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}(n.slice(0,r),a.slice(0,r));c>-1&&(s=c+1,i=i.concat(n.slice(0,c+1)),l=c+1),c<0&&(i=i.concat(n.slice(0,r)),l=r);for(var u=l;u<n.length;u++){var f=n[u];if(s!=a.length){var p=a[s],d="string"==typeof f?f===p:f.test(p);d&&"string"==typeof f?(i.push(f),s+=1):d||"string"!=typeof f?d&&"string"!=typeof f?(i.push(p),s+=1):d||"string"==typeof f||(s+=1,u-=1):s!=a.length&&i.push(f)}else{if(!("string"==typeof f&&u>=o))break;i.push(f)}}return{value:i.join(""),offset:e?i.length-e.length:0}},ne="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,re=function(e){var t=e.value,n=e.inputRef,o=e.maintainCursor,i=void 0===o||o,a=x(q(0),3),s=a[0],l=a[1],c=a[2],u=x(q(0),3),f=u[0],p=u[1],d=u[2];return Object(r.useLayoutEffect)((function(){if(null!=n.current&&c()){var e=c()+d();0!=d()&&i?n.current.setSelectionRange(e+1,e+1):i&&n.current.setSelectionRange(e,e)}}),[t]),{setCursorOffset:p,setCursor:l,cursor:s,getCursor:c,cursorOffset:f}},oe=A("informed:useField\t"),ie=function(e,t,n,r,o){if(null!=e)return o?o(e):t?t(e):n&&!r?te(e,n).value:e},ae=function(e,t,n,r){return t&&n?t(e):r?te(e,r).value:e},se=function(e,t,n){var r=n.required;return e||t?function(n,r){return t?Y(t,n):e?e(n,r):void 0}:r?function(e){return pe(e,r)}:void 0},le=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)}},ce=function(e){var t=e.setTouched,n=e.onBlur;return function(e){t(!0),n&&n(e)}},ue=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}},fe=function(e){switch(e){case"text":case"number":case"checkbox":return e;default:return}},pe=function(e,t){if(t&&(null==e||""===e))return"string"==typeof t?t:"This field is required"};function de(){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,f=e.parse,d=e.formatter,h=e.parser,v=e.initialValue,m=e.validateOnChange,y=e.validateOnBlur,b=e.validateOnMount,k=e.asyncValidateOnBlur,C=e.maskOnBlur,A=e.allowEmptyString,O=e.onValueChange,S=e.notify,E=e.keepState,j=e.maintainCursor,T=e.debug,M=e.shadow,P=e.step,L=e.fieldType,I=e.multiple,N=e.onChange,D=e.onBlur,R=e.formController,V=e.relevant,B=e.required,U=e.keepStateIfRelevant,z=e.initialize,G=g(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"]),$=Object(r.useState)(Q()),K=x($,1),J=K[0],Y=Object(r.useContext)(_),X=Object(r.useContext)(W),Z=X||U,ee=H(),pe=Object(r.useRef)(),de=Object(r.useRef)(!0),he=Object(r.useRef)(),ve=Object(r.useRef)(!1),ge=function(){return!ve.current},me=function(){return ve.current};R&&(Y=R.updater,ee=R.getFormApi());var ye,be,xe=se(i,s,{required:B}),we=Object(r.useState)((function(){return Y.getInitialValue(n)})),ke=x(we,1),Ce=ke[0],Ae=Y.getSavedValue(n);(E||Z)&&Ae?(oe("Setting field ".concat(bt,"'s kept state"),Ae),ye=Ae.value,be=Ae.touched,ee.removeSavedState(bt)):ye=null!=v?v:Ce;var Oe=q(ie(ye,l,d,h,z)),Se=x(Oe,3),Ee=Se[0],je=Se[1],Te=Se[2],Me=q(b?xe(Ee):void 0),Pe=x(Me,3),Le=Pe[0],Fe=Pe[1],Ie=Pe[2],_e=q(be),Ne=x(_e,3),De=Ne[0],Re=Ne[1],Ve=Ne[2],Be=Object(r.useState)((function(){return ae(Ee,u,f,d)})),Ue=x(Be,2),ze=Ue[0],We=Ue[1],He=Object(r.useRef)(v),qe=Object(r.useRef)(n),Ge=Object(r.useRef)();He.current=v,qe.current=n;var $e=Object(r.useRef)(null),Ke=o.a.useMemo((function(){return t||$e}),[]),Je=re({value:Ee,inputRef:Ke,maintainCursor:!!j}),Ye=Je.getCursor,Xe=Je.setCursor,Qe=Je.setCursorOffset,Ze=function(){return!0},et=function(e){var t=V||Ze,n=ee.getFullField(qe.current)||qe.current,r={path:n,parentPath:n.replace(/(.*)[.[].*/,"$1"),get:function(e,t){return F.get(e,t)}};return X&&X.relevant?t(e,r)&&X.relevant(e,r):t(e,r)},tt=q(et(ee.getValues())),nt=x(tt,3),rt=nt[0],ot=nt[1],it=nt[2],at=function(e){return!X||!X.relevant||X.relevant(e)},st=function(){var e=et(ee.getValues());return e!=it()&&ot(e),e};Object(r.useEffect)((function(){rt||E||pe.current.reset()}),[rt]);var lt=function(){return M?ee.getDerrivedValue(n):Te()},ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.preventUpdate;P&&ee.getStep()<P?(oe("Setting ".concat(n,"'s error to undefined as we are not at that step")),Fe(void 0),Y.setError(J,void 0,!r)):(oe("Setting ".concat(n,"'s error to ").concat(e)),Fe(e),Y.setError(J,e,!r))},ut=function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t;ve.current=!0,oe("Setting ".concat(n," to ").concat(i)),z&&(i=z(i));var a=ee.getOptions(),s=i;if(""!==i||A||o.allowEmptyString||a.allowEmptyStrings||(i=void 0),"number"!==e.type&&"number"!==L||void 0===i||(i=+i),r&&r.target&&r.target.selectionStart&&Xe(r.target.selectionStart),l&&!C&&(s=l(i,Ye()),i=l(i,Ye())),c&&!C){var p=c(i,Ye());s=p.value,i=p.value,Qe(p.offset)}if(u&&f&&(i=f(i),s=u(i)),d){var v=te(i,d);Qe(v.offset),i=s=v.value}h&&(i=null!=i?h(i):i),xe&&m&&!o.initial&&(oe("Validating after change ".concat(n," ").concat(i)),ct(xe(i,ee.getValues()))),je(i),We(s),O&&O(i),Y.setValue(J,i,!o.preventUpdate)},ft=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.preventUpdate;if(oe("Field ".concat(n," has been touched")),xe&&y&&!t&&e&&(oe("Validating after blur ".concat(n," ").concat(lt())),ct(xe(lt(),ee.getValues()))),a&&k&&!t&&e&&(oe("Validating async after blur ".concat(n," ").concat(lt())),a(lt(),ee.getValues())),l&&C){var i=l(lt());je(i),We(i),O&&O(i),Y.setValue(J,i,!o)}if(c&&C){var s=c(lt());Qe(s.offset),je(s.value),We(s.value),O&&O(s.value),Y.setValue(J,s.value,!o)}Re(e),Y.setTouched(J,e,!o)},pt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.preventUpdate,n=ie(He.current||Y.getInitialValue(qe.current),l,d,h,z);ut(n,null,{initial:!0,preventUpdate:t}),ct(b?xe(n):void 0,{preventUpdate:t}),ft(void 0,!0,{preventUpdate:t}),ve.current=!1},dt=function(e){xe&&(oe("Field validating ".concat(n," ").concat(lt())),ct(xe(lt(),e||ee.getValues())))},ht=function(e){a&&(oe("Field async validating ".concat(n," ").concat(lt())),a(lt(),e||ee.getValues()))},vt={setValue:ut,setTouched:ft,setError:ct,reset:pt,validate:dt,asyncValidate:ht,getValue:lt,getTouched:Ve,getError:Ie,getIsRelevant:it,getDirty:me,getPristine:ge,getFieldState:function(){return{value:lt(),touched:Ve(),dirty:me(),pristine:ge()}},relevant:et,multistepRelevant:at,checkRelevant:st};pe.current=vt;var gt={value:Ee,error:Le,touched:De,maskedValue:ze,isRelevant:rt,dirty:ve.current,pristine:!ve.current};M&&(gt={error:Le,touched:De}),oe("Render",ee.getFullField(n),gt),ne((function(){var e=ee.getFullField(qe.current);return oe("Register",J,qe.current),he.current={field:e,fieldId:J,fieldApi:vt,fieldState:gt,notify:S,keepState:E,inMultistep:Z,shadow:M},Y.register(J,he.current),function(){var e=ee.getFullField(qe.current);oe("Deregister",J,e),Y.deregister(J)}}),[]),Object(r.useEffect)((function(){var e=ee.getFullField(n);return de.current?de.current=!1:(oe("Update",n,Z),he.current.field=e,Y.update(J,he.current,Ge.current)),function(){Ge.current=e}}),[n]),ne((function(){T&&Ke&&(Ke.current.style.border="5px solid orange",setTimeout((function(){Ke.current.style.borderWidth="2px",Ke.current.style.borderStyle="inset",Ke.current.style.borderColor="initial",Ke.current.style.borderImage="initial"}),500))}));var mt=[].concat(w(Object.values(gt)),w(Object.values(e)),w(Object.values(G))),yt=function(e){return Object(r.useMemo)((function(){return rt?e:null}),w(mt))},bt=n,xt=le({fieldType:L,setValue:ut,onChange:N,multiple:I,ref:Ke}),wt=ce({setTouched:ft,onBlur:D}),kt=ue({fieldType:L,maskedValue:ze,multiple:I,value:Ee}),Ct=fe(L);return{fieldState:gt,fieldApi:vt,render:yt,ref:Ke,userProps:p(p({},G),{},{multiple:I,onChange:N,onBlur:D,id:G.id||J}),informed:p({name:bt,multiple:I,onChange:xt,onBlur:wt,value:kt,ref:Ke,type:Ct,id:G.id||J},G)}}var he,ve=function(e){var t=o.a.forwardRef((function(t,n){var r=de(t,n),i=r.fieldState,a=r.fieldApi,s=r.render,l=r.ref,c=r.userProps;return s(o.a.createElement(e,u({fieldApi:a,fieldState:i,field:t.field,forwardedRef:l,debug:t.debug,type:t.type},c)))}));return t.displayName="asField(".concat(G(e),")"),t},ge=A("informed:Text\t"),me=ve((function(e){var t=e.fieldApi,n=e.fieldState,r=g(e,["fieldApi","fieldState"]),i=n.maskedValue,a=t.setValue,s=t.setTouched,l=r.onChange,c=r.onBlur,f=r.field,p=(r.initialValue,r.forwardedRef),d=r.debug,h=r.label,v=(r.title,r.id),m=g(r,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return ge("Render",f),ne((function(){d&&p&&(p.current.style.background="red",setTimeout((function(){p.current.style.background="white"}),500))})),o.a.createElement(o.a.Fragment,null,h?o.a.createElement("label",{htmlFor:v}," ",h," "):null,o.a.createElement("input",u({},m,{id:v,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),c&&c(e)}})))})),ye=ve((function(e){var t=e.fieldApi,n=e.fieldState,r=g(e,["fieldApi","fieldState"]),i=n.maskedValue,a=t.setValue,s=t.setTouched,l=r.onChange,c=r.onBlur,f=r.field,p=(r.initialValue,r.forwardedRef),d=r.debug,h=r.label,v=r.id,m=g(r,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return ne((function(){d&&p&&(p.current.style.background="red",setTimeout((function(){p.current.style.background="white"}),500))})),o.a.createElement(o.a.Fragment,null,h?o.a.createElement("label",{htmlFor:v}," ",h," "):null,o.a.createElement("textarea",u({},m,{id:v,name:f,ref:p,value:i||"",onChange:function(e){a(e.target.value,e),l&&l(e)},onBlur:function(e){s(!0),c&&c(e)}})))})),be=A("informed:Select\t"),xe=ve((function(e){var t=e.fieldApi,n=e.fieldState,i=g(e,["fieldApi","fieldState"]),a=n.value,s=t.setTouched,l=i.onChange,c=i.onBlur,f=i.field,p=(i.initialValue,i.options),d=i.children,h=i.forwardedRef,v=i.debug,m=i.multiple,y=i.label,b=i.id,x=g(i,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),w=Object(r.useRef)();return ne((function(){v&&h&&(h.current.style.background="red",setTimeout((function(){h.current.style.background="white"}),500))})),be("Render",f,a),o.a.createElement(o.a.Fragment,null,y?o.a.createElement("label",{htmlFor:b}," ",y," "):null,o.a.createElement("select",u({},x,{id:b,multiple:m,name:f,ref:h||w,value:a||(m?[]:""),onChange:function(e){var n=Array.from((h||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),c&&c(e)}}),p?p.map((function(e){return o.a.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label)})):d))})),we=ve((function(e){var t=e.fieldApi,n=e.fieldState,r=g(e,["fieldApi","fieldState"]),i=n.value,a=t.setValue,s=t.setTouched,l=r.onChange,c=r.onBlur,f=r.field,p=(r.initialValue,r.debug,r.forwardedRef),d=r.id,h=r.label,v=g(r,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return o.a.createElement(o.a.Fragment,null,h?o.a.createElement("label",{htmlFor:d}," ",h," "):null,o.a.createElement("input",u({},v,{id:d,name:f,ref:p,checked:!!i,onChange:function(e){a(e.target.checked),l&&l(e)},onBlur:function(e){s(!0),c&&c(e)},type:"checkbox"})))})),ke=(he=function(e){var t=e.radioGroupApi,n=e.radioGroupState,r=g(e,["radioGroupApi","radioGroupState"]),i=n.value,a=t.setValue,s=t.setTouched,l=t.onChange,c=t.onBlur,f=r.value,p=r.onChange,d=r.onBlur,h=r.field,v=(r.initialValue,r.forwardedRef),m=g(r,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return o.a.createElement("input",u({},m,{name:h,ref:v,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),c&&c(e)},type:"radio"}))},o.a.forwardRef((function(e,t){return o.a.createElement(R.Consumer,null,(function(n){var r=n.radioGroupApi,i=n.radioGroupState;return o.a.createElement(he,u({radioGroupApi:r,radioGroupState:i,ref:t},e))}))}))),Ce=function(e){d(n,e);var t=b(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n,[{key:"render",value:function(){var e=this.props,t=e.options,n=e.children;return o.a.createElement(R.Provider,{value:this.groupContext},t?t.map((function(e){return o.a.createElement("label",{key:e.value},e.label," ",o.a.createElement(ke,{value:e.value}))})):n)}},{key:"groupContext",get:function(){return{radioGroupApi:p(p({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),n}(r.Component),Ae=ve(Ce);var Oe=A("informed:useArrayField\t"),Se=function(e){var t=e.field,n=e.initialValue,i=e.validate,a=e.arrayFieldApiRef,s=g(e,["field","initialValue","validate","arrayFieldApiRef"]),l=H(),c=x(Object(r.useState)(new Map),1)[0],u=Object(r.useContext)(_),f=l.getFullField(t),d=u.getInitialValue(t)||n||[],h=x(q(l.getSavedValue(f)&&l.getSavedValue(f).value||d),3),v=h[0],m=h[1],y=h[2],b=x(q(v?v.map((function(){return Q()})):[]),3),k=b[0],C=b[1],A=b[2],O=Object(r.useMemo)((function(){return function(e,t){var n=null==A()?0:A().length;return i?i(e,n,t):void 0}})),S=de(p({field:t,validate:i?O:void 0,shadow:!0},s)).fieldApi;ne((function(){var e=function(e){e!==f&&(Oe("".concat(f," changed")),RegExp("".concat(f,"\\[[0-9]+\\]")).test(e)&&S.validate())};return l.emitter.on("value",e),function(){l.emitter.removeListener("value",e)}}),[t]);var E=function(e,n){Oe("Swapping","".concat(t,"[").concat(e,"] and ").concat(t,"[").concat(n,"]"));var r=w(k);k[e]&&k[n]?(r[e]=k[n],r[n]=k[e]):console.warn("Attempted to swap ".concat(e," with ").concat(n," but one of them does not exist :(")),C(r)},j=function(){k.push(Q()),C(w(k))},T=function(e){k.push(Q()),C(w(k));var t=w(y());t[k.length-1]=e,m(t)},M=k.map((function(e,n){var r={remove:function(){return function(e){Oe("EXPECTING REMOVAL OF","".concat(t,"[").concat(e,"] and ").concat(t,"[").concat(k.length-1,"]")),u.expectRemoval("".concat(t,"[").concat(e,"]")),u.expectRemoval("".concat(t,"[").concat(k.length-1,"]"));var n=k.slice(0,e).concat(k.slice(e+1,k.length));C(n);var r=y(),o=r.slice(0,e).concat(r.slice(e+1,r.length));m(o)}(n)}},o={initialValue:v&&v[n],key:e,field:"".concat(t,"[").concat(n,"]"),index:n};return p(p({arrayFieldItemApi:r,arrayFieldItemState:o},r),o)})),P={add:j,swap:E,addWithInitialValue:T,reset:function(){var e=u.getInitialValue(t)||n||[];m(e);var r=e?e.map((function(){return Q()})):[];C(r)}};a&&(a.current=P);var L={fields:M,field:t},I=p(p({},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(f,"\\[[0-9]+\\]")).test(e)){var n=e.replace(t,""),r=F.get(y(),n);return Oe("Resetting ".concat(n," to ").concat(r)),r}return u.getInitialValue(e)}});return{render:function(e){return o.a.createElement(_.Provider,{value:I},o.a.createElement(B.Provider,{value:P},o.a.createElement(V.Provider,{value:L},e)))},add:j,swap:E,addWithInitialValue:T,fields:M,arrayFieldState:L,arrayFieldApi:P,field:t}};function Ee(e){var t=H();return Object(r.useMemo)((function(){return function(e,t){return p(p({},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 je(){return Object(r.useContext)(N)}var Te=function(e){var t=e.when,n=e.children;return t(je())?n:null},Me=function(e){var t=e.relevant,n=e.field,r=g(e,["relevant","field"]),i=H();if(t){var a=i.getFullField(n),s={path:a,parentPath:a.replace(/(.*)[.[].*/,"$1"),get:function(e,t){return F.get(e,t)}};return o.a.createElement(Te,{when:function(e){var n=e.values;return t(n,s)}},o.a.createElement(Pe,u({field:n},r)))}return o.a.createElement(Pe,u({field:n},r))},Pe=function(e){var t=e.children,n=g(e,["children"]),r=Se(n),o=r.render,i=r.arrayFieldState,a=r.arrayFieldApi,s=r.field;return o("function"==typeof t?t(p(p({field:s,arrayFieldApi:a,arrayFieldState:i},a),i)):t)},Le=function(e){var t=e.arrayFieldItemState,n=e.arrayFieldItemApi,i=e.children,a=Object(r.useContext)(_),s=H(),l=x(Object(r.useState)(0),2),c=(l[0],l[1]),u=x(Object(r.useState)(new Map),1)[0],f=t.field,d=Ee(f);Object(r.useEffect)((function(){var e=function(e){e.slice(0,-1!=e.lastIndexOf("[")?e.lastIndexOf("]")+1:e.length)===f&&c(Math.random())};return s.emitter.on("value",e),function(){s.emitter.removeListener("value",e)}}),[f]);var h,v,g,m,y=(h=s.getState(),v=h.values,g=h.errors,m=h.touched,{values:F.get(v,f),errors:F.get(g,f),touched:F.get(m,f)}),b=p(p({},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=p(p(p({},n),d),{},{reset:function(){u.forEach((function(e){e.fieldApi.reset()}))}}),k=p(p({},t),y);return"function"==typeof i?o.a.createElement(_.Provider,{value:b},o.a.createElement(U.Provider,{value:w},o.a.createElement(z.Provider,{value:k},i(p(p({arrayFieldItemApi:w,arrayFieldItemState:k},w),k))))):o.a.createElement(_.Provider,{value:b},o.a.createElement(U.Provider,{value:w},o.a.createElement(z.Provider,{value:k},i)))};Me.Items=function(e){var t=e.children;return Object(r.useContext)(V).fields.map((function(e){var n=e.arrayFieldItemState,r=e.arrayFieldItemApi,i=n.key;return o.a.createElement(Le,{key:i,arrayFieldItemApi:r,arrayFieldItemState:n},t)}))};var Fe=function(e){var t=e.components,n=Object(r.useContext)(_).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=A("informed:FormFields\t"),_e=function e(t){var n=t.schema,i=t.prefix,a=t.onlyValidateSchema,s=Object(r.useContext)(_).fieldMap;return Object(r.useMemo)((function(){return ee(n,a,i).map((function(t,n){var r=t.field,i=t.props,a=t.type,l=t.properties,c=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&&c?o.a.createElement(Ne,u({key:"ScheamField-".concat(n),field:r,items:c,uiBefore:p,uiAfter:d},i)):v&&"array"===f&&c&&"array"===a?o.a.createElement(v,u({key:"ScheamField-".concat(n),field:r,items:c,uiBefore:p,uiAfter:d},i)):"conditionals"===f?h.map((function(t){var r=t.then,i=t.if.properties;return o.a.createElement(Te,{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,u({key:"ScheamField-".concat(n),field:r},i)):null}))}),[n,i])},Ne=function(e){var t=e.field,n=e.items,r=e.uiBefore,i=e.uiAfter,a=g(e,["field","items","uiBefore","uiAfter"]);return o.a.createElement(Me,u({field:t},a),o.a.createElement(Fe,{components:r}),o.a.createElement(Me.Items,null,(function(e){var t=e.field;return o.a.createElement(o.a.Fragment,null,o.a.createElement(Fe,{components:n["ui:before"]}),o.a.createElement(_e,{schema:n,prefix:t}),o.a.createElement(Fe,{components:n["ui:after"]}))})),o.a.createElement(Fe,{components:i}))},De={select:xe,input:me,textarea:ye,checkbox:we,radio:Ae,add:function(){var e=Object(r.useContext)(B).add;return o.a.createElement("button",{onClick:function(){e()},type:"button"},"Add")},remove:function(){var e=Object(r.useContext)(U).remove;return o.a.createElement("button",{onClick:function(){e()},type:"button"},"Remove")},array:Ne},Re=A("informed:Controller\t"),Ve=function(){},Be=function(e){d(n,e);var t=b(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),(e=t.call(this)).options=r;var o=r.ajv,i=r.schema,s=r.fieldMap;return e.ajv=o?new o({allErrors:!0}):null,e.ajvValidate=o?e.ajv.compile(i):null,e.fieldMap=s||De,e.fieldsById=new Map,e.fieldsByName={get:function(t){var n;return e.fieldsById.forEach((function(e){e&&e.field===t&&(n=e)})),n}},e.onScreen={},e.expectedRemovals={},e.pulledOut={},e.savedValues={},e.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},e.dummyField={fieldApi:{setValue:Ve,setTouched:Ve,setError:Ve,reset:Ve,validate:Ve,getValue:Ve,getTouched:Ve,getError:Ve,getFieldState:Ve,checkRelevant:Ve,getPristine:Ve,getDirty:Ve}},e.deregister=e.deregister.bind(m(e)),e.register=e.register.bind(m(e)),e.getValue=e.getValue.bind(m(e)),e.getTouched=e.getTouched.bind(m(e)),e.getError=e.getError.bind(m(e)),e.getErrors=e.getErrors.bind(m(e)),e.setValue=e.setValue.bind(m(e)),e.getValues=e.getValues.bind(m(e)),e.getStep=e.getStep.bind(m(e)),e.setStep=e.setStep.bind(m(e)),e.back=e.back.bind(m(e)),e.next=e.next.bind(m(e)),e.setCurrent=e.setCurrent.bind(m(e)),e.setTouched=e.setTouched.bind(m(e)),e.setError=e.setError.bind(m(e)),e.setFormError=e.setFormError.bind(m(e)),e.submitForm=e.submitForm.bind(m(e)),e.reset=e.reset.bind(m(e)),e.update=e.update.bind(m(e)),e.validate=e.validate.bind(m(e)),e.screenValid=e.screenValid.bind(m(e)),e.keyDown=e.keyDown.bind(m(e)),e.getField=e.getField.bind(m(e)),e.getInitialValue=e.getInitialValue.bind(m(e)),e.setInitialValue=e.setInitialValue.bind(m(e)),e.getOptions=e.getOptions.bind(m(e)),e.getFormState=e.getFormState.bind(m(e)),e.expectRemoval=e.expectRemoval.bind(m(e)),e.getSavedValue=e.getSavedValue.bind(m(e)),e.removeSavedState=e.removeSavedState.bind(m(e)),e.getDerrivedValue=e.getDerrivedValue.bind(m(e)),e.setValues=e.setValues.bind(m(e)),e.resetField=e.resetField.bind(m(e)),e.fieldExists=e.fieldExists.bind(m(e)),e.validateField=e.validateField.bind(m(e)),e.notify=e.notify.bind(m(e)),e.validating=e.validating.bind(m(e)),e.validated=e.validated.bind(m(e)),e.getDirty=e.getDirty.bind(m(e)),e.getPristine=e.getPristine.bind(m(e)),e.updater={register:e.register,deregister:e.deregister,getField:e.getField,update:e.update,fieldMap:e.fieldMap,setValue:function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e.fieldsById.get(t);o.shadow||F.set(e.state.values,o.field,o.fieldApi.getValue()),o.fieldApi.relevant(e.state.values)||F.delete(e.state.values,o.field),e.fieldsById.forEach((function(t){var n=t.fieldApi.checkRelevant();t.fieldApi.multistepRelevant(e.state.values)&&(n||t.keepState)||(F.delete(e.state.values,t.field),F.delete(e.state.touched,t.field),F.delete(e.state.errors,t.field))})),r&&(e.emit("change"),e.emit("value",o.field,n))},setTouched:function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e.fieldsById.get(t);!o.shadow&&o.fieldApi.getIsRelevant()&&F.set(e.state.touched,o.field,o.fieldApi.getTouched()),o.shadow&&null!=o.fieldApi.getError()&&o.fieldApi.relevant(e.state.values)&&F.set(e.state.touched,o.field,o.fieldApi.getTouched()),r&&e.emit("change")},setError:function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e.fieldsById.get(t);!o.shadow&&o.fieldApi.getIsRelevant()&&F.set(e.state.errors,o.field,o.fieldApi.getError());var i=F.get(e.state.errors,o.field);(o.shadow&&null!=o.fieldApi.getError()&&o.fieldApi.relevant(e.state.values)||o.shadow&&void 0===o.fieldApi.getError()&&o.fieldApi.relevant(e.state.values)&&"string"==typeof i)&&F.set(e.state.errors,o.field,o.fieldApi.getError()),r&&e.emit("change")},expectRemoval:e.expectRemoval,getInitialValue:e.getInitialValue,getSavedValue:e.getSavedValue},e.formApi={setValue:e.setValue,setTouched:e.setTouched,setError:e.setError,setFormError:e.setFormError,setValues:e.setValues,setInitialValue:e.setInitialValue,getValue:e.getValue,getTouched:e.getTouched,getError:e.getError,reset:e.reset,submitForm:e.submitForm,getState:e.getFormState,getValues:e.getValues,getFullField:e.getFullField,fieldExists:e.fieldExists,getInitialValue:e.getInitialValue,validate:e.validate,validateField:e.validateField,screenValid:e.screenValid,resetField:e.resetField,getOptions:e.getOptions,emitter:m(e),getSavedValue:e.getSavedValue,removeSavedState:e.removeSavedState,getDerrivedValue:e.getDerrivedValue,getStep:e.getStep,setStep:e.setStep,next:e.next,back:e.back,setCurrent:e.setCurrent,validated:e.validated,validating:e.validating,getDirty:e.getDirty,getPristine:e.getPristine},e.on("value",(function(t){delete e.state.error,e.notify(t)})),e}return l(n,[{key:"setOptions",value:function(e){this.options=e}},{key:"setValue",value:function(e,t,n){this.getField(e).fieldApi.setValue(t,null,p({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()?(Re("Submit",this.state),this.emit("submit")):(Re("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){F.set(this.options.initialValues,e,t)}},{key:"getFormState",value:function(){return Re("Returning form state"),p(p({},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 F.get(t,e)}},{key:"getValue",value:function(e){var t=this.getField(e).fieldApi.getValue();return Re("Getting value for",e,t),t}},{key:"getTouched",value:function(e){var t=this.getField(e).fieldApi.getTouched();return Re("Getting touched for",e,t),t}},{key:"getError",value:function(e){var t=this.getField(e).fieldApi.getError();return Re("Getting error for",e,t),t}},{key:"getDirty",value:function(e){var t=this.getField(e).fieldApi.getDirty();return Re("Getting dirty for",e,t),t}},{key:"getPristine",value:function(e){var t=this.getField(e).fieldApi.getPristine();return Re("Getting pristine for",e,t),t}},{key:"getValues",value:function(){return Re("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return Re("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return Re("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?F.get(this.savedValues,"shadow-".concat(e)):F.get(this.savedValues,e)}},{key:"removeSavedState",value:function(e){var t=this.fieldsByName.get(e);return t&&t.shadow?F.delete(this.savedValues,"shadow-".concat(e)):F.delete(this.savedValues,e)}},{key:"getFullField",value:function(e){return e}},{key:"getInitialValue",value:function(e){return F.get(this.options.initialValues,e)}},{key:"getField",value:function(e){Re("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&&(Re("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!(!F.empty(e)||this.state.error)}},{key:"screenValid",value:function(){return!Object.entries(this.onScreen).some((function(e){return x(e,2)[1].fieldApi.getError()}))}},{key:"invalid",value:function(){var e=this.getErrors();return!(F.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(){Re("Resetting"),this.fieldsById.forEach((function(e){e.fieldApi.reset({preventUpdate:!0})})),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(e){Re("Setting values"),this.fieldsById.forEach((function(t){var n=F.get(e,t.field);void 0!==n&&t.fieldApi.setValue(n,null,{preventUpdate:!0})})),this.emit("change")}},{key:"validate",value:function(){var e=this;Re("Validating all fields");var t=this.getValues();if(this.options.validationSchema){var n=K(this.options.validationSchema,t);this.fieldsById.forEach((function(t){if(F.has(n,t.field)){var r=F.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=X(this.ajvValidate,t);this.fieldsById.forEach((function(t){if(F.has(r,t.field)){var n=F.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(F.has(i,t.field)){var n=F.get(i,t.field);e.setError(t.field,n)}}))}}},{key:"asyncValidate",value:function(){Re("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()?(Re("Submit",this.state),this.emit("submit")):(Re("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"register",value:function(e,t,n){var r=t.field,o=t.state;Re("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] &&
8
- i&&(t.keepState||t.inMultistep)?(Re("Already Registered",r),this.fieldsById.delete(i))://!this.expectedRemovals[magicValue] &&
9
- !i||t.keepState&&t.inMultistep||console.warn("Check to make sure you have not registered two fields with the fieldName",r),Re("Fields Registered",this.fieldsById.size),this.onScreen[e]=t,this.fieldsById.set(e,t),Re("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"))}},{key:"deregister",value:function(e){var t=this.fieldsById.get(e),n=t.field;Re("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||(Re("Saving field ".concat(n,"'s value"),t.fieldApi.getFieldState()),t.shadow?F.set(this.savedValues,"shadow-".concat(n),t.fieldApi.getFieldState()):F.set(this.savedValues,n,t.fieldApi.getFieldState())),(r||!t.keepState&&!t.inMultistep||!t.fieldApi.getIsRelevant()&&!t.keepState)&&(Re("Removing field",n),this.fieldsById.delete(e),r||(F.delete(this.state.values,n),F.delete(this.state.touched,n),F.delete(this.state.errors,n),t.shadow?F.delete(this.savedValues,"shadow-".concat(n)):F.delete(this.savedValues,n)),r&&this.pulledOut[o]&&(Re("Pulling out",n,"with magic value",o),F.pullOut(this.state.values,o),F.pullOut(this.state.touched,o),F.pullOut(this.state.errors,o),F.pullOut(this.savedValues,o),delete this.pulledOut[o])),this.emit("change")}},{key:"expectRemoval",value:function(e){Re("Expecting removal of",e),this.expectedRemovals[e]=!0,this.pulledOut[e]=!0}},{key:"update",value:function(e,t,n){Re("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&&(F.set(this.state.values,n),F.set(this.state.errors,n),F.set(this.state.touched,n)),F.set(this.state.values,t.field,r),F.set(this.state.errors,t.field,o),F.set(this.state.touched,t.field,i),this.emit("change")}}]),n}(i.EventEmitter),Ue=A("informed:FormProvider\t\t"),ze=function(e){var t=e.children,n=e.formApi,r=e.formController,i=e.formState,a=g(e,["children","formApi","formController","formState"]);if(Ue("Render FormProvider"),n)return Ue("Render FormProvider with given values"),o.a.createElement(_.Provider,{value:r.updater},o.a.createElement(D.Provider,{value:n},o.a.createElement(N.Provider,{value:i},t)));Ue("Render FormProvider with generated values");var s=He(a);return o.a.createElement(_.Provider,{value:s.formController.updater},o.a.createElement(D.Provider,{value:s.formApi},o.a.createElement(N.Provider,{value:s.formState},t)))},We=A("informed:useForm\t\t"),He=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,h=e.onValueChange,v=e.onSubmitFailure,m=e.validationSchema,y=e.schema,b=e.ajv,w=e.fieldMap,k=e.onlyValidateSchema,C=g(e,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);We("Render useForm");var A=Object(r.useMemo)((function(){return{dontPreventDefault:t,initialValues:n,validate:i,validateFields:a,allowEmptyStrings:s,preventEnter:l,validationSchema:m,schema:y,ajv:b,fieldMap:w}}),[t,n,i,a,s,l,m,y,b,w]),O=x(Object(r.useState)((function(){return new Be(A)})),1)[0];Object(r.useEffect)((function(){O.setOptions(A)}),[A]);var S=x(Object(r.useState)((function(){return O.getFormState()})),2),E=S[0],j=S[1];ne((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 h&&h(O.getFormState().values)},o=function(){return v&&v(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,h,v]),Object(r.useState)((function(){O.on("change",(function(){We("Setting form state"),j(O.getFormState())})),c&&c(O.getFormApi()),u&&(u.current=O.getFormApi())}));var T=x(Object(r.useState)((function(){return O.getFormApi()})),1)[0];return{formApi:T,formState:E,formController:O,render:function(e){return o.a.createElement(ze,{formApi:T,formState:E,formController:O},o.a.createElement(o.a.Fragment,null,e||o.a.createElement(_e,{schema:y,onlyValidateSchema:k})))},userProps:C}},qe=A("informed:Form\t\t"),Ge=function(e){var t=e.children,n=e.render,r=e.component,i=g(e,["children","render","component"]);qe("Render FORM");var a,s=He(i),l=s.formApi,c=s.formController,f=s.formState,p=s.render,d=s.userProps;return p(o.a.createElement("form",u({},d,{onReset:c.reset,onSubmit:c.submitForm,onKeyDown:c.keyDown}),(a={formState:f,formApi:l},r?o.a.createElement(r,a,t):n?n(a):"function"==typeof t?t(a):t)))};var $e=function(e){var t=e.value,n=e.forwardedRef,r=e.children,i=g(e,["value","forwardedRef","children"]);return o.a.createElement("option",u({ref:n,value:t,key:t},i),r)}}).call(this,n(14))},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(519);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(517),a=n(608),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(609),o=n(582),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(521),o=n(759);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(674),o=n(586),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(543),o=n(533);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(791),o=n(535),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(532),o=n(792),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(171)(e))},function(e,t,n){var r=n(543),o=n(535);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){e.exports=n(801)},function(e,t,n){"use strict";var r=n(827).charAt,o=n(540),i=n(669),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(858)},function(e,t,n){var r=n(523),o=n(641),i=n(905),a=n(686);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(542)(Object,"create");e.exports=r},function(e,t,n){var r=n(915),o=n(916),i=n(917),a=n(918),s=n(919);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(586);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(921);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(965),o=n(966),i=n(629),a=n(967);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(640);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(515),o=n(557),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(517),o=n(519),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(528),o=n(539),i=n(605),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(579),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(580),o=n(515);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(531);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(549),o=n(610);(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(517),o=n(745),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(658),o=n(606).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(518);t.f=r},function(e,t,n){var r={};r[n(518)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(519),o=n(561),i=n(518)("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(774)},function(e,t,n){var r=n(584),o=n(568),i=n(783),a=n(554),s=n(569),l=n(555),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(793),o=n(622),i=n(623),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(676),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(171)(e))},function(e,t,n){var r=n(591),o=n(626),i=n(628),a=n(629);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(826)},function(e,t,n){var r=n(564),o=n(552),i=n(518)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){e.exports=n(828)},function(e,t,n){var r=n(831),o=n(690),i=n(695);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(845);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(563);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(557),o=n(517);e.exports="process"==r(o.process)},function(e,t,n){e.exports=n(859)},function(e,t,n){e.exports=n(874)},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(894)(),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(637),m=n(897),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),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,A=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,k,(function(e,t,n,r){o[o.length]=n?x(r,C,"$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=A(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 k=s(c,v);c=(d=!!k)&&"get"in k&&!("originalValue"in k.get)?k.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(896);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){var r=n(903),o=n(928)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},function(e,t,n){var r=n(595),o=n(572);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(523),o=n(590),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(908),o=n(920),i=n(922),a=n(923),s=n(924);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(542)(n(532),"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(617);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(708),o=n(941);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(597),o=n(983),i=n(984),a=n(985),s=n(986),l=n(987);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(998),o=n(717),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(680),o=n(1017),i=n(554);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(682)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(714);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(560),o=n(519),i=n(522),a=n(530).f,s=n(582),l=n(1040),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(741)},function(e,t,n){n(742);var r=n(514);e.exports=r.Object.keys},function(e,t,n){var r=n(520),o=n(515),i=n(603);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(515),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(522),o=n(528),i=n(604).indexOf,a=n(560);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(743)},function(e,t,n){"use strict";var r=n(513),o=n(517),i=n(531),a=n(549),s=n(520),l=n(607),c=n(661),u=n(515),f=n(522),p=n(561),d=n(519),h=n(521),v=n(529),g=n(528),m=n(578),y=n(548),b=n(562),x=n(559),w=n(611),k=n(746),C=n(612),A=n(547),O=n(530),S=n(576),E=n(525),j=n(563),T=n(609),M=n(581),P=n(560),L=n(582),F=n(518),I=n(613),_=n(516),N=n(550),D=n(540),R=n(541).forEach,V=M("hidden"),B=F("toPrimitive"),U=D.set,z=D.getterFor("Symbol"),W=Object.prototype,H=o.Symbol,q=i("JSON","stringify"),G=A.f,$=O.f,K=k.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(W,t);r&&delete W[t],$(e,t,n),r&&e!==W&&$(W,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===W&&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===W&&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!==W||!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===W,n=K(t?X:g(e)),r=[];return R(n,(function(e){!f(Y,e)||t&&!f(W,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=L(e),n=function(e){this===W&&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(W,t,{configurable:!0,set:n}),oe(t,e)}).prototype,"toString",(function(){return z(this).tag})),j(H,"withoutSetter",(function(e){return oe(L(e),e)})),S.f=le,O.f=ae,A.f=ce,w.f=k.f=ue,C.f=fe,I.f=function(e){return oe(F(e),e)},s&&($(H.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),a||j(W,"propertyIsEnumerable",le,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:H}),R(x(ee),(function(e){_(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(){C.f(1)}))},{getOwnPropertySymbols:function(e){return C.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),N(H,"Symbol"),P[V]=!0},function(e,t,n){var r=n(607);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(520),o=n(530),i=n(521),a=n(559);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(531);e.exports=r("document","documentElement")},function(e,t,n){var r=n(517),o=n(665),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(610),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(750),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(752)},function(e,t,n){"use strict";var r=n(528),o=n(616),i=n(552),a=n(540),s=n(669),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(513),o=n(758),i=n(566),a=n(583),s=n(550),l=n(525),c=n(563),u=n(518),f=n(549),p=n(552),d=n(670),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,k,C=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)}},A=t+" Iterator",O=!1,S=e.prototype,E=S[g]||S["@@iterator"]||d&&S[d],j=!v&&E||C(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,A,!0,!0),f&&(p[A]=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:C("values"),keys:y?j:C("keys"),entries:C("entries")},b)for(k in w)(v||O||!(k in S))&&c(S,k,w[k]);else r({target:t,proto:!0,forced:v||O},w);return w}},function(e,t,n){"use strict";var r,o,i,a=n(515),s=n(566),l=n(525),c=n(522),u=n(518),f=n(549),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(515);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(515);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(617);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(675);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(542),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(15))},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(785),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(786),o=n(788)(r);e.exports=o},function(e,t,n){var r=n(790),o=n(588),i=n(523),a=n(589),s=n(587),l=n(621),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(569),o=n(794),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(795),o=n(684),i=n(685),a=n(686);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(553),o=n(796),i=n(523),a=n(590),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(797);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(684);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){"use strict";var r=n(513),o=n(515),i=n(561),a=n(519),s=n(529),l=n(539),c=n(567),u=n(615),f=n(565),p=n(518),d=n(580),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(516)("iterator")},function(e,t,n){var r=n(833),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(835)},function(e,t,n){n(592),n(836);var r=n(514);e.exports=r.Array.from},function(e,t,n){var r=n(521);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(518),o=n(552),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(518)("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(697),n(625),n(847),n(703),n(704),n(853),n(592),n(551);var r=n(514);e.exports=r.Promise},function(e,t,n){"use strict";var r=n(513),o=n(566),i=n(583),a=n(562),s=n(525),l=n(548),c=n(556),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(517);e.exports=r.Promise},function(e,t,n){var r=n(521),o=n(538),i=n(518)("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(517),s=n(515),l=n(558),c=n(663),u=n(603),f=n(701),p=n(633),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()}},k=function(e){return function(){w(e)}},C=function(e){w(e.data)},A=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(k(e))}:y&&y.now?r=function(e){y.now(k(e))}:m&&!f?(i=(o=new m).port2,o.port1.onmessage=C,r=l(i.postMessage,i,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&d&&"file:"!==d.protocol&&!s(A)?(r=A,a.addEventListener("message",C,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(k(e),0)}),e.exports={set:h,clear:v}},function(e,t,n){var r=n(608);e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r=n(521),o=n(519),i=n(571);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(513),o=n(538),i=n(571),a=n(593),s=n(556);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(513),o=n(538),i=n(531),a=n(571),s=n(593),l=n(556);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(885)},function(e,t,n){"use strict";var r=n(638),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){var r=n(926),o=n(927);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t,n){e.exports=n(938)},function(e,t,n){e.exports=n(952)},function(e,t,n){e.exports=n(973)},function(e,t,n){var r=n(981),o=n(1004),i=n(619),a=n(523),s=n(1005);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(988),o=n(535);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(989),o=n(992),i=n(993);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(532).Uint8Array;e.exports=r},function(e,t,n){var r=n(716),o=n(649),i=n(555);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(644),o=n(523);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(533);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(644),o=n(651),i=n(649),a=n(717),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 k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.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 C(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)}))}C.polyfill=!0,e.fetch||(e.fetch=C,e.Headers=p,e.Request=b,e.Response=w),t.Headers=p,t.Request=b,t.Response=w,t.fetch=C,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(1048)},function(e,t,n){var r=n(543),o=n(651),i=n(535),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(45).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(537));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(15))},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]||"",k(n[4]||""),k(n[5]||""),k(n[7]||""),k(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 k(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(14))},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 k(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 C(e,t,n,r,o){var i=e.cc;for(A.state=e,A.stream=o,A.marked=null,A.cc=i,A.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 A.marked?A.marked:"variable"==n&&k(e,r)?"variable-2":t}}var A={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)A.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=A.state;if(A.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 L=new P("this",new P("arguments",null));function F(){A.state.context=new M(A.state.context,A.state.localVars,!1),A.state.localVars=L}function I(){A.state.context=new M(A.state.context,A.state.localVars,!0),A.state.localVars=null}function _(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function N(e,t){var n=function(){var n=A.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,A.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function D(){var e=A.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(N("vardef",t),Ce,R(";"),D):"keyword a"==e?S(N("form"),W,V,D):"keyword b"==e?S(N("form"),V,D):"keyword d"==e?A.stream.match(/^\s*$/,!1)?S():S(N("stat"),q,R(";"),D):"debugger"==e?S(R(";")):"{"==e?S(N("}"),I,se,D,_):";"==e?S():"if"==e?("else"==A.state.lexical.info&&A.state.cc[A.state.cc.length-1]==D&&A.state.cc.pop()(),S(N("form"),W,V,D,Te)):"function"==e?S(Fe):"for"==e?S(N("form"),I,Me,V,_,D):"class"==e||u&&"interface"==t?(A.marked="keyword",S(N("form","class"==e?e:t),Re,D)):"variable"==e?u&&"declare"==t?(A.marked="keyword",S(V)):u&&("module"==t||"enum"==t||"type"==t)&&A.stream.match(/^\s*\w/,!1)?(A.marked="keyword","enum"==t?S(Ye):"type"==t?S(_e,R("operator"),pe,R(";")):S(N("form"),Ae,R("{"),N("}"),se,D,D)):u&&"namespace"==t?(A.marked="keyword",S(N("form"),U,V,D)):u&&"abstract"==t?(A.marked="keyword",S(V)):S(N("stat"),ee):"switch"==e?S(N("form"),W,R("{"),N("}","switch"),I,se,D,D,_):"case"==e?S(U,R(":")):"default"==e?S(R(":")):"catch"==e?S(N("form"),F,B,V,D,_):"export"==e?S(N("stat"),ze,D):"import"==e?S(N("stat"),He,D):"async"==e?S(V):"@"==t?S(U,V):O(N("stat"),U,R(";"),D)}function B(e){if("("==e)return S(Ne,R(")"))}function U(e,t){return H(e,t,!1)}function z(e,t){return H(e,t,!0)}function W(e){return"("!=e?O():S(N(")"),q,R(")"),D)}function H(e,t,n){if(A.state.fatArrowAt==A.stream.start){var r=n?X:Y;if("("==e)return S(F,N(")"),ie(Ne,")"),D,R("=>"),r,_);if("variable"==e)return O(F,Ae,R("=>"),r,_)}var o=n?$:G;return x.hasOwnProperty(e)?S(o):"function"==e?S(Fe,o):"class"==e||u&&"interface"==t?(A.marked="keyword",S(N("form"),De,D)):"keyword c"==e||"async"==e?S(n?z:U):"("==e?S(N(")"),q,R(")"),D,o):"operator"==e||"spread"==e?S(n?z:U):"["==e?S(N("]"),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?z: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:z;return"=>"==e?S(F,n?X:Y,_):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?S(r):u&&"<"==t&&A.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?S(N(">"),ie(pe,">"),D,r):"?"==t?S(U,R(":"),o):S(o):"quasi"==e?O(K,r):";"!=e?"("==e?ae(z,")","call",r):"."==e?S(te,r):"["==e?S(N("]"),q,R("]"),D,r):u&&"as"==t?(A.marked="keyword",S(pe,r)):"regexp"==e?(A.state.lastType=A.marked="operator",A.stream.backUp(A.stream.pos-A.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 A.marked="string-2",A.state.tokenize=y,S(K)}function Y(e){return b(A.stream,A.state),O("{"==e?V:U)}function X(e){return b(A.stream,A.state),O("{"==e?V:z)}function Q(e,t){if("target"==t)return A.marked="keyword",S(G)}function Z(e,t){if("target"==t)return A.marked="keyword",S($)}function ee(e){return":"==e?S(D,V):O(G,R(";"),D)}function te(e){if("variable"==e)return A.marked="property",S()}function ne(e,t){return"async"==e?(A.marked="property",S(ne)):"variable"==e||"keyword"==A.style?(A.marked="property","get"==t||"set"==t?S(re):(u&&A.state.fatArrowAt==A.stream.start&&(n=A.stream.match(/^\s*:\s*/,!1))&&(A.state.fatArrowAt=A.stream.pos+n[0].length),S(oe))):"number"==e||"string"==e?(A.marked=s?"property":A.style+" property",S(oe)):"jsonld-keyword"==e?S(oe):u&&T(t)?(A.marked="keyword",S(ne)):"["==e?S(U,le,R("]"),oe):"spread"==e?S(z,oe):"*"==t?(A.marked="keyword",S(ne)):":"==e?O(oe):void 0;var n}function re(e){return"variable"!=e?O(oe):(A.marked="property",S(Fe))}function oe(e){return":"==e?S(z):"("==e?O(Fe):void 0}function ie(e,t,n){function r(o,i){if(n?n.indexOf(o)>-1:","==o){var a=A.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++)A.cc.push(arguments[r]);return S(N(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 A.stream.match(/^\s*\w+\s+is\b/,!1)?S(U,fe,pe):S(pe)}function fe(e,t){if("is"==t)return A.marked="keyword",S()}function pe(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(A.marked="keyword",S("typeof"==t?z:pe)):"variable"==e||"void"==t?(A.marked="type",S(be)):"|"==t||"&"==t?S(pe):"string"==e||"number"==e||"atom"==e?S(be):"["==e?S(N("]"),ie(pe,"]",","),D,be):"{"==e?S(N("}"),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"==A.style?(A.marked="property",S(ve)):"?"==t||"number"==e||"string"==e?S(ve):":"==e?S(pe):"["==e?S(R("variable"),ce,R("]"),ve):"("==e?O(Ie,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 A.marked="string-2",A.state.tokenize=y,S(ge)}function ye(e,t){return"variable"==e&&A.stream.match(/^\s*[?:]/,!1)||"?"==t?S(ye):":"==e?S(pe):"spread"==e?S(ye):O(pe)}function be(e,t){return"<"==t?S(N(">"),ie(pe,">"),D,be):"|"==t||"."==e||"&"==t?S(pe):"["==e?S(pe,R("]"),be):"extends"==t||"implements"==t?(A.marked="keyword",S(pe)):"?"==t?S(pe,R(":"),pe):void 0}function xe(e,t){if("<"==t)return S(N(">"),ie(pe,">"),D,be)}function we(){return O(pe,ke)}function ke(e,t){if("="==t)return S(pe)}function Ce(e,t){return"enum"==t?(A.marked="keyword",S(Ye)):O(Ae,le,Ee,je)}function Ae(e,t){return u&&T(t)?(A.marked="keyword",S(Ae)):"variable"==e?(j(t),S()):"spread"==e?S(Ae):"["==e?ae(Se,"]"):"{"==e?ae(Oe,"}"):void 0}function Oe(e,t){return"variable"!=e||A.stream.match(/^\s*:/,!1)?("variable"==e&&(A.marked="property"),"spread"==e?S(Ae):"}"==e?O():"["==e?S(U,R("]"),R(":"),Oe):S(R(":"),Ae,Ee)):(j(t),S(Ee))}function Se(){return O(Ae,Ee)}function Ee(e,t){if("="==t)return S(z)}function je(e){if(","==e)return S(Ce)}function Te(e,t){if("keyword b"==e&&"else"==t)return S(N("form","else"),V,D)}function Me(e,t){return"await"==t?S(Me):"("==e?S(N(")"),Pe,D):void 0}function Pe(e){return"var"==e?S(Ce,Le):"variable"==e?S(Le):O(Le)}function Le(e,t){return")"==e?S():";"==e?S(Le):"in"==t||"of"==t?(A.marked="keyword",S(U,Le)):O(U,Le)}function Fe(e,t){return"*"==t?(A.marked="keyword",S(Fe)):"variable"==e?(j(t),S(Fe)):"("==e?S(F,N(")"),ie(Ne,")"),D,ue,V,_):u&&"<"==t?S(N(">"),ie(we,">"),D,Fe):void 0}function Ie(e,t){return"*"==t?(A.marked="keyword",S(Ie)):"variable"==e?(j(t),S(Ie)):"("==e?S(F,N(")"),ie(Ne,")"),D,ue,_):u&&"<"==t?S(N(">"),ie(we,">"),D,Ie):void 0}function _e(e,t){return"keyword"==e||"variable"==e?(A.marked="type",S(_e)):"<"==t?S(N(">"),ie(we,">"),D):void 0}function Ne(e,t){return"@"==t&&S(U,Ne),"spread"==e?S(Ne):u&&T(t)?(A.marked="keyword",S(Ne)):u&&"this"==e?S(le,Ee):O(Ae,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(N(">"),ie(we,">"),D,Ve):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(A.marked="keyword"),S(u?pe:U,Ve)):"{"==e?S(N("}"),Be,D):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&T(t))&&A.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(A.marked="keyword",S(Be)):"variable"==e||"keyword"==A.style?(A.marked="property",S(Ue,Be)):"number"==e||"string"==e?S(Ue,Be):"["==e?S(U,le,R("]"),Ue,Be):"*"==t?(A.marked="keyword",S(Be)):u&&"("==e?O(Ie,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(z);var n=A.state.lexical.prev;return O(n&&"interface"==n.info?Ie:Fe)}function ze(e,t){return"*"==t?(A.marked="keyword",S(Ke,R(";"))):"default"==t?(A.marked="keyword",S(U,R(";"))):"{"==e?S(ie(We,"}"),Ke,R(";")):O(V)}function We(e,t){return"as"==t?(A.marked="keyword",S(R("variable"))):"variable"==e?O(z,We):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&&(A.marked="keyword"),S($e))}function Ge(e){if(","==e)return S(qe,Ge)}function $e(e,t){if("as"==t)return A.marked="keyword",S(qe)}function Ke(e,t){if("from"==t)return A.marked="keyword",S(U)}function Je(e){return"]"==e?S():O(ie(z,"]"))}function Ye(){return O(N("form"),Ae,R("{"),N("}"),ie(Xe,"}"),D,D)}function Xe(){return O(Ae,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 _.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",C(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!=_)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){C(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(537))},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(537))},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(537))},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,k=0;if(g!==s.body){var C=-1!==["absolute","relative","fixed"].indexOf(l.getComputedStyle(g).position)?g:g.offsetParent,A=C.getBoundingClientRect(),O=s.body.getBoundingClientRect();w=A.left-O.left-C.scrollLeft,k=A.top-O.top-C.scrollTop}c.style.left=y-w+"px",c.style.top=b-k+"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-k)+"px",x=!1;else if(P>E){c.style.height=E-5+"px",c.style.top=(b=m.bottom-T.top-k)+"px";var L=a.getCursor();n.from.ch!=L.ch&&(m=a.cursorCoords(L),c.style.left=(y=m.left-w)+"px",T=c.getBoundingClientRect())}}var F,I=T.right-S;if(M&&(I+=a.display.nativeBarWidth),I>0&&(T.right-T.left>S&&(c.style.width=S-5+"px",I-=T.right-T.left-S),c.style.left=(y=m.left-I-w)+"px"),M)for(var _=c.firstChild;_;_=_.nextSibling)_.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 N=this.getSelectedHintRange();return 0===N.from&&0===N.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(537))},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 k=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(w)||k==o||e.isWordChar(k))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 C=c%2?a.charAt(c-1):o,A=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]=C+r[o]+A;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(C+A,null),t.triggerElectric(C+A),l(t,-1)):"addFour"==f&&(t.replaceSelection(C+C+C+C,"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(537))},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(537))},function(e,t,n){var r=n(258),o=n(734);"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(259)(!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(258),o=n(736);"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(259)(!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(258),o=n(738);"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(259)(!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(258),o=n(740);"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(259)(!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(655);e.exports=r},function(e,t,n){var r=n(513),o=n(529),i=n(559);r({target:"Object",stat:!0,forced:n(515)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){var r=n(744);e.exports=r},function(e,t,n){n(660);var r=n(514);e.exports=r.Object.getOwnPropertySymbols},function(e,t,n){var r=n(517),o=n(525);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(528),o=n(611).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(614),o=n(564);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){e.exports=n(749)},function(e,t,n){var r=n(666);e.exports=r},function(e,t,n){n(751);var r=n(526);e.exports=r("Array").filter},function(e,t,n){"use strict";var r=n(513),o=n(541).filter;r({target:"Array",proto:!0,forced:!n(565)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(753);e.exports=r},function(e,t,n){n(754);var r=n(514).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(513),o=n(515),i=n(528),a=n(547).f,s=n(520),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(756)},function(e,t,n){var r=n(757);e.exports=r},function(e,t,n){n(551);var r=n(761),o=n(564),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(670).IteratorPrototype,o=n(562),i=n(548),a=n(550),s=n(552),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(519);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(762);e.exports=r},function(e,t,n){n(763);var r=n(526);e.exports=r("Array").forEach},function(e,t,n){"use strict";var r=n(513),o=n(764);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){"use strict";var r=n(541).forEach,o=n(672)("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(766)},function(e,t,n){var r=n(767);e.exports=r},function(e,t,n){n(768);var r=n(514);e.exports=r.Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(513),o=n(520),i=n(769),a=n(528),s=n(547),l=n(567);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(531),o=n(611),i=n(612),a=n(521);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(771)},function(e,t,n){var r=n(772);e.exports=r},function(e,t,n){n(773);var r=n(514).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(513),o=n(520);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(662)})},function(e,t,n){var r=n(775);e.exports=r},function(e,t,n){n(776);var r=n(514).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(513),o=n(520);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(530).f})},function(e,t,n){var r=n(585),o=n(780),i=n(533),a=n(677),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(553),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(781),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(532)["__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(784),o=n(789);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(619),o=n(678),i=n(679);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(787),o=n(675),i=n(619),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(586),o=n(554),i=n(587),a=n(533);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(543),o=n(535);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(543),o=n(620),i=n(535),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(682)(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(798);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(799),o=n(533),i=n(590),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(800),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(802);n(819),n(820),n(821),n(822),n(823),n(824),n(825),e.exports=r},function(e,t,n){n(687),n(625),n(660),n(803),n(804),n(805),n(806),n(688),n(807),n(808),n(809),n(810),n(811),n(812),n(813),n(814),n(815),n(816),n(817),n(818);var r=n(514);e.exports=r.Symbol},function(e,t,n){n(516)("asyncIterator")},function(e,t){},function(e,t,n){n(516)("hasInstance")},function(e,t,n){n(516)("isConcatSpreadable")},function(e,t,n){n(516)("match")},function(e,t,n){n(516)("matchAll")},function(e,t,n){n(516)("replace")},function(e,t,n){n(516)("search")},function(e,t,n){n(516)("species")},function(e,t,n){n(516)("split")},function(e,t,n){n(516)("toPrimitive")},function(e,t,n){n(516)("toStringTag")},function(e,t,n){n(516)("unscopables")},function(e,t,n){var r=n(517);n(550)(r.JSON,"JSON",!0)},function(e,t){},function(e,t){},function(e,t,n){n(516)("asyncDispose")},function(e,t,n){n(516)("dispose")},function(e,t,n){n(516)("matcher")},function(e,t,n){n(516)("metadata")},function(e,t,n){n(516)("observable")},function(e,t,n){n(516)("patternMatch")},function(e,t,n){n(516)("replaceAll")},function(e,t,n){n(551),n(592);var r=n(627);e.exports=r},function(e,t,n){var r=n(579),o=n(577),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(829);e.exports=r},function(e,t,n){n(830);var r=n(514);e.exports=r.Array.isArray},function(e,t,n){n(513)({target:"Array",stat:!0},{isArray:n(561)})},function(e,t,n){e.exports=n(832)},function(e,t,n){var r=n(689);e.exports=r},function(e,t,n){n(834);var r=n(526);e.exports=r("Array").slice},function(e,t,n){"use strict";var r=n(513),o=n(519),i=n(561),a=n(605),s=n(539),l=n(528),c=n(567),u=n(518),f=n(565)("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(691);e.exports=r},function(e,t,n){var r=n(513),o=n(837);r({target:"Array",stat:!0,forced:!n(694)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(558),o=n(529),i=n(838),a=n(693),s=n(539),l=n(567),c=n(627);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(521),o=n(692);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(840)},function(e,t,n){var r=n(841);e.exports=r},function(e,t,n){n(688),n(592),n(551);var r=n(613);e.exports=r.f("iterator")},function(e,t,n){var r=n(628);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(591),o=n(626);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(846)},function(e,t,n){var r=n(696);n(854),n(855),n(856),n(857),e.exports=r},function(e,t,n){"use strict";var r,o,i,a,s=n(513),l=n(549),c=n(517),u=n(531),f=n(698),p=n(563),d=n(631),h=n(583),v=n(550),g=n(848),m=n(519),y=n(538),b=n(632),x=n(665),w=n(556),k=n(694),C=n(699),A=n(700).set,O=n(849),S=n(702),E=n(851),j=n(571),T=n(593),M=n(540),P=n(657),L=n(518),F=n(852),I=n(633),_=n(580),N=L("species"),D="Promise",R=M.get,V=M.set,B=M.getterFor(D),U=f&&f.prototype,z=f,W=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(z)!==String(z);if(!e&&66===_)return!0;if(l&&!W.finally)return!0;if(_>=51&&/native code/.test(z))return!1;var t=new z((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(t.constructor={})[N]=n,!(X=t.then((function(){}))instanceof n)||!e&&F&&!Y})),Z=Q||!k((function(e){z.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){A.call(c,(function(){var t,n=e.facade,r=e.value;if(oe(e)&&(t=T((function(){I?G.emit("unhandledRejection",r,n):ne("unhandledrejection",n,r)})),e.rejection=I||oe(e)?2:1,t.error))throw t.value}))},oe=function(e){return 1!==e.rejection&&!e.parent},ie=function(e){A.call(c,(function(){var t=e.facade;I?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&&(W=(z=function(e){b(this,z,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(W,{then:function(e,t){var n=B(this),r=$(C(this,z));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=I?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===z||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 z((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),p(U,"catch",W.catch,{unsafe:!0}));try{delete U.constructor}catch(e){}h&&h(U,W)}s({global:!0,wrap:!0,forced:Q},{Promise:z}),v(z,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?z: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(531),o=n(530),i=n(518),a=n(520),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(517),p=n(547).f,d=n(700).set,h=n(701),v=n(850),g=n(633),m=f.MutationObserver||f.WebKitMutationObserver,y=f.document,b=f.process,x=f.Promise,w=p(f,"queueMicrotask"),k=w&&w.value;k||(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=k||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(608);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(517);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(513),o=n(549),i=n(698),a=n(515),s=n(531),l=n(699),c=n(702),u=n(563);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(697)},function(e,t,n){n(703)},function(e,t,n){"use strict";var r=n(513),o=n(571),i=n(593);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(704)},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 C(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(A([])));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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function A(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=A,C.prototype={constructor:C,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(k),!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),k(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;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(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(860);e.exports=r},function(e,t,n){var r=n(861),o=n(863),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(862);var r=n(526);e.exports=r("Array").includes},function(e,t,n){"use strict";var r=n(513),o=n(604).includes,i=n(616);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(864);var r=n(526);e.exports=r("String").includes},function(e,t,n){"use strict";var r=n(513),o=n(865),i=n(577);r({target:"String",proto:!0,forced:!n(867)("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(866);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(519),o=n(557),i=n(518)("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(518)("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(869)},function(e,t,n){n(551);var r=n(870),o=n(564),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(871);e.exports=r},function(e,t,n){n(668);var r=n(526);e.exports=r("Array").entries},function(e,t,n){e.exports=n(873)},function(e,t,n){var r=n(691);e.exports=r},function(e,t,n){var r=n(875);e.exports=r},function(e,t,n){n(876);var r=n(514);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(513),o=n(531),i=n(515),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(878);e.exports=r},function(e,t,n){var r=n(879),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(880);var r=n(526);e.exports=r("Array").map},function(e,t,n){"use strict";var r=n(513),o=n(541).map;r({target:"Array",proto:!0,forced:!n(565)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(655);e.exports=r},function(e,t,n){var r=n(883);e.exports=r},function(e,t,n){var r=n(884),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(687);var r=n(526);e.exports=r("Array").concat},function(e,t,n){var r=n(886);e.exports=r},function(e,t,n){n(887);var r=n(514);e.exports=r.Object.entries},function(e,t,n){var r=n(513),o=n(888).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},function(e,t,n){var r=n(520),o=n(559),i=n(528),a=n(576).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(666);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 k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.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 C(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)}))}C.polyfill=!0,e.fetch||(e.fetch=C,e.Headers=p,e.Request=b,e.Response=w),t.Headers=p,t.Request=b,t.Response=w,t.fetch=C,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";var r=n(892),o=n(902),i=n(638);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";var r=n(893),o=n(706),i=n(638),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,k=t;if(x.has(t))throw new RangeError("Cyclic object value");if("function"==typeof f?k=f(n,k):k instanceof Date?k=v(k):"comma"===i&&l(k)&&(k=o.maybeMap(k,(function(e){return e instanceof Date?v(e):e}))),null===k){if(a)return c&&!y?c(n,d.encoder,b,"key",g):n;k=""}if("string"==typeof(w=k)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||o.isBuffer(k))return c?[m(y?n:c(n,d.encoder,b,"key",g))+"="+m(c(k,d.encoder,b,"value",g))]:[m(n)+"="+m(String(k))];var C,A=[];if(void 0===k)return A;if("comma"===i&&l(k))C=[{value:k.length>0?k.join(",")||null:void 0}];else if(l(f))C=f;else{var O=Object.keys(k);C=p?O.sort(p):O}for(var S=0;S<C.length;++S){var E=C[S],j="object"==typeof E&&void 0!==E.value?E.value:k[E];if(!s||null!==j){var T=l(k)?"function"==typeof i?i(n,E):n:n+(h?"."+E:"["+E+"]");x.set(t,!0);var M=r();u(A,e(j,T,i,a,s,c,f,p,h,v,g,m,y,b,M))}}return A};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(636),o=n(898),i=n(900),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(895);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(637);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r=n(636),o=n(899),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(637),o=n(636),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,k=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),A=n(901).custom,O=A&&M(A)?A: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(L(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(L(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=!L(s,"customInspect")||s.customInspect;if("boolean"!=typeof l)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(L(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,_),"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(I(o,t)>=0)return"[Circular]";function k(t,n,i){if(n&&(o=o.slice()).push(n),i){var a={depth:s.depth};return L(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if("function"==typeof t){var A=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,k);return"[Function"+(A?": "+A:" (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:N(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 z="<"+String(t.nodeName).toLowerCase(),W=t.attributes||[],H=0;H<W.length;H++)z+=" "+W[H].name+"="+E(j(W[H].value),"double",s);return z+=">",t.childNodes&&t.childNodes.length&&(z+="..."),z+="</"+String(t.nodeName).toLowerCase()+">"}if(T(t)){if(0===t.length)return"[]";var q=B(t,k);return b&&!function(e){for(var t=0;t<e.length;t++)if(I(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,k);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(k(n,t,!0)+" => "+k(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(k(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 N(k(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 N(k(y.call(t)));if(function(e){return!("[object Boolean]"!==F(e)||S&&"object"==typeof e&&S in e)}(t))return N(h.call(t));if(function(e){return!("[object String]"!==F(e)||S&&"object"==typeof e&&S in e)}(t))return N(k(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,k),Y=C?C(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 L(e,t){return P.call(e,t)}function F(e){return v.call(e)}function I(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 _(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 N(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]=L(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)L(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++)k.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(706),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){var r=n(904),o=n(707);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},function(e,t,n){var r=n(640),o=n(925),i=n(595);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(906),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(907);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(642);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(909),o=n(597),i=n(643);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(910),o=n(911),i=n(912),a=n(913),s=n(914);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(596);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(596),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(596),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(596);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(598),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(598);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(598);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(598);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(599);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(599);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(599);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(599);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(584),o=n(595),i=n(587),a=n(533),s=n(572);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(595),o=n(588),i=n(523),a=n(587),s=n(620),l=n(572);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(929),o=n(678),i=n(679);e.exports=function(e){return i(o(e,void 0,r),e+"")}},function(e,t,n){var r=n(930);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(644),o=n(931);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(553),o=n(588),i=n(523),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(933),o=n(667),i=n(937);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(934)},function(e,t,n){var r=n(935);e.exports=r},function(e,t,n){n(936);var r=n(514);e.exports=r.Reflect.get},function(e,t,n){var r=n(513),o=n(519),i=n(521),a=n(522),s=n(547),l=n(566);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(647);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(939);e.exports=r},function(e,t,n){n(940);var r=n(514);e.exports=r.Object.setPrototypeOf},function(e,t,n){n(513)({target:"Object",stat:!0},{setPrototypeOf:n(583)})},function(e,t,n){e.exports=n(942)},function(e,t,n){var r=n(943);e.exports=r},function(e,t,n){n(944);var r=n(514);e.exports=r.Object.getPrototypeOf},function(e,t,n){var r=n(513),o=n(515),i=n(529),a=n(566),s=n(671);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(946),o=n(950);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(947)},function(e,t,n){var r=n(948);e.exports=r},function(e,t,n){n(949);var r=n(514).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){n(513)({target:"Object",stat:!0,sham:!n(520)},{create:n(562)})},function(e,t,n){var r=n(708);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(709),o=n(647),i=n(956),a=n(957);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(953);e.exports=r},function(e,t,n){n(954);var r=n(514);e.exports=r.Reflect.construct},function(e,t,n){var r=n(513),o=n(531),i=n(538),a=n(521),s=n(519),l=n(562),c=n(955),u=n(515),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(538),o=n(519),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(709);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(536).default,o=n(958);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(960)},function(e,t,n){var r=n(961);e.exports=r},function(e,t,n){var r=n(962),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(963);var r=n(526);e.exports=r("Array").find},function(e,t,n){"use strict";var r=n(513),o=n(541).find,i=n(616),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(628),o=n(695);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(591),o=n(626),i=n(690);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(689);e.exports=r},function(e,t,n){var r=n(970);e.exports=r},function(e,t,n){n(971);var r=n(514);e.exports=r.Object.assign},function(e,t,n){var r=n(513),o=n(972);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){"use strict";var r=n(520),o=n(515),i=n(559),a=n(612),s=n(576),l=n(529),c=n(602),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(696);e.exports=r},function(e,t,n){e.exports=n(975)},function(e,t,n){var r=n(976);e.exports=r},function(e,t,n){var r=n(977),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(978);var r=n(526);e.exports=r("Array").splice},function(e,t,n){"use strict";var r=n(513),o=n(605),i=n(579),a=n(539),s=n(529),l=n(615),c=n(567),u=n(565)("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(980)(n(1008));e.exports=r},function(e,t,n){var r=n(711),o=n(554),i=n(555);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(982),o=n(1003),i=n(719);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(648),o=n(712);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(597);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(597),o=n(643),i=n(642);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(648),o=n(713),i=n(994),a=n(997),s=n(574),l=n(523),c=n(589),u=n(621),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,k=y==b;if(k&&c(e)){if(!c(t))return!1;g=!0,x=!1}if(k&&!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 C=x&&p.call(e,"__wrapped__"),A=w&&p.call(t,"__wrapped__");if(C||A){var O=C?e.value():e,S=A?t.value():t;return v||(v=new r),h(O,S,n,d,v)}}return!!k&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t,n){var r=n(642),o=n(990),i=n(991);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(553),o=n(714),i=n(586),a=n(713),s=n(995),l=n(996),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(715),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(542)(n(532),"DataView");e.exports=r},function(e,t,n){var r=n(542)(n(532),"Promise");e.exports=r},function(e,t,n){var r=n(542)(n(532),"Set");e.exports=r},function(e,t,n){var r=n(542)(n(532),"WeakMap");e.exports=r},function(e,t,n){var r=n(718),o=n(555);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(712),o=n(601),i=n(707),a=n(641),s=n(718),l=n(719),c=n(572);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(1006),o=n(1007),i=n(641),a=n(572);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(640);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(1009),o=n(711),i=n(685),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){
7
+ (this.webpackJsonpRedoclyReferenceDocs=this.webpackJsonpRedoclyReferenceDocs||[]).push([[0],Array(513).concat([function(e,t,n){"use strict";var r=n(517),o=n(547).f,i=n(657),a=n(514),s=n(558),l=n(525),c=n(522),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,k=b?r:x?r[y]:(r[y]||{}).prototype,C=b?a:a[y]||(a[y]={}),A=C.prototype;for(p in t)n=!i(b?p:y+(x?".":"#")+p,e.forced)&&k&&c(k,p),h=C[p],n&&(v=e.noTargetGet?(m=o(k,p))&&m.value:k[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),C[p]=g,w&&(c(a,f=y+"Prototype")||l(a,f,{}),a[f][p]=d,e.real&&A&&!A[p]&&l(A,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(514),o=n(522),i=n(613),a=n(530).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(15))},function(e,t,n){var r=n(517),o=n(609),i=n(522),a=n(582),s=n(607),l=n(661),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){var r=n(515);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(519);e.exports=function(e){if(!r(e))throw TypeError(String(e)+" is not an object");return e}},function(e,t,n){var r=n(529),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(882)},function(e,t,n){var r=n(520),o=n(530),i=n(548);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(514);e.exports=function(e){return r[e+"Prototype"]}},function(e,t,n){var r=n(654),o=n(659),i=n(748),a=n(667),s=n(755),l=n(765),c=n(770),u=n(617),f=n(673);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(602),o=n(577);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(577);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(520),o=n(656),i=n(521),a=n(578),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(514),o=n(517),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(676),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(881)},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(591),o=n(839);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 k=y&&(c||f&&(null==w||w<12.11)),C=n||a&&s>=9;function A(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var O,S=function(e,t){var n=e.className,r=A(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 L(){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 I(e,t){var n=e.className;A(t).test(n)||(e.className+=(n?" ":"")+t)}function F(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!A(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 _=function(e){e.select()};function N(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function R(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 D(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?_=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(_=function(e){try{e.select()}catch(e){}});var V=function(){this.id=null,this.f=null,this.time=0,this.handler=N(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"}},z={scroll:!1},W={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&&R(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 k=0;k<u;++k){var C=f[k];if(","==C)f[k]="N";else if("%"==C){var A=void 0;for(A=k+1;A<u&&"%"==f[A];++A);for(var O=k&&"!"==f[k-1]||A<u&&"1"==f[A]?"1":"N",S=k;S<A;++S)f[S]=O;k=A-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 L="L"==(M?f[M-1]:l),I=L==("L"==(P<u?f[P]:l))?L?"L":"R":l,F=M;F<P;++F)f[F]=I;M=P-1}for(var _,N=[],R=0;R<u;)if(r.test(f[R])){var D=R;for(++R;R<u&&r.test(f[R]);++R);N.push(new i(0,D,R))}else{var V=R,B=N.length,U="rtl"==s?1:0;for(++R;R<u&&"L"!=f[R];++R);for(var z=V;z<R;)if(o.test(f[z])){V<z&&(N.splice(B,0,new i(1,V,z)),B+=U);var W=z;for(++z;z<R&&o.test(f[z]);++z);N.splice(B,0,new i(2,W,z)),B+=U,V=z}else++z;V<R&&N.splice(B,0,new i(1,V,R))}return"ltr"==s&&(1==N[0].level&&(_=a.match(/^\s+/))&&(N[0].from=_[0].length,N.unshift(new i(0,0,_[0].length))),1==K(N).level&&(_=a.match(/\s+$/))&&(K(N).to-=_[0].length,N.push(new i(0,u-_[0].length,u)))),"rtl"==s?N.reverse():N}}();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 ke(e){be(e),xe(e)}function Ce(e){return e.target||e.srcElement}function Ae(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/)},Le=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)},Ie="oncopy"in(Me=T("div"))||(Me.setAttribute("oncopy","return;"),"function"==typeof Me.oncopy),Fe=null,_e={},Ne={};function Re(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),_e[e]=t}function De(e){if("string"==typeof e&&Ne.hasOwnProperty(e))e=Ne[e];else if(e&&"string"==typeof e.name&&Ne.hasOwnProperty(e.name)){var t=Ne[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 De("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return De("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=De(t);var n=_e[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){R(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function ze(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var o=t[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function We(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=D(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?D(this.string,this.lineStart,this.tabSize):0)},qe.prototype.indentation=function(){return D(this.string,null,this.tabSize)-(this.lineStart?D(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&&ze(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=D(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=We(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]=We(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,ze(e.mode,t.state),n,t.lookAhead):new ut(e,ze(e.mode,t),n)},ut.prototype.save=function(e){var t=!1!==e?ze(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,ze(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,kt=!1;function Ct(e,t,n){this.marker=e,this.from=t,this.to=n}function At(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 Ct(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 Ct(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=At(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?At(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 Ct(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 Lt(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 It(e,t){var n,r=kt&&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||Lt(n,o.marker)<0)&&(n=o.marker);return n}function Ft(e){return It(e,!0)}function _t(e){return It(e,!1)}function Nt(e,t){var n,r=kt&&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||Lt(n,i.marker)<0)&&(n=i.marker)}return n}function Rt(e,t,n,r,o){var i=Ge(e,t),a=kt&&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 Dt(e){for(var t;t=Ft(e);)e=t.find(-1,!0).line;return e}function Vt(e,t){var n=Ge(e,t),r=Dt(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=_t(r);)r=n.find(1,!0).line;return Ye(r)+1}function Ut(e,t){var n=kt&&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&&zt(e,t,r))return!0}}function zt(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return zt(e,r.line,At(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)&&zt(e,t,o))return!0}function Wt(e){for(var t=0,n=(e=Dt(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=Ft(r);){var o=t.find(0,!0);r=o.from.line,n+=o.from.ch-o.to.ch}for(r=e;t=_t(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=F(i.styleClasses.bgClass,r.bgClass||"")),i.styleClasses.textClass&&(r.textClass=F(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=F(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 k in l)l.hasOwnProperty(k)&&"style"!=k&&"class"!=k&&w.setAttribute(k,l[k]);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],k=w.marker;if("bookmark"==k.type&&w.from==h&&k.widgetNode)y.push(k);else if(w.from<=h&&(null==w.to||w.to>h||k.collapsed&&w.to==h&&w.from==h)){if(null!=w.to&&w.to!=h&&m>w.to&&(m=w.to,c=""),k.className&&(l+=" "+k.className),k.css&&(s=(s?s+";":"")+k.css),k.startStyle&&w.from==h&&(u+=" "+k.startStyle),k.endStyle&&w.to==m&&(b||(b=[])).push(k.endStyle,w.to),k.title&&((p||(p={})).title=k.title),k.attributes)for(var C in k.attributes)(p||(p={}))[C]=k.attributes[C];k.collapsed&&(!f||Lt(f.marker,k)<0)&&(f=w)}else w.from>h&&m>w.from&&(m=w.from)}if(b)for(var A=0;A<b.length;A+=2)b[A+1]==m&&(c+=" "+b[A]);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=_t(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=A("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 kn(e,t){for(var n=Ce(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 Cn(e){return e.lineSpace.offsetTop}function An(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 In(e,Ln(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 Ln(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=Dt(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 In(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=Nn(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():Rn(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!=Fe)return Fe;var t=j(e,T("span","x")),n=t.getBoundingClientRect(),r=O(t,0,1).getBoundingClientRect();return Fe=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}:_n}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],k={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||(k.bogus=!0),e.options.singleCursorHeightPerLine||(k.rtop=v,k.rbottom=g),k}(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 Fn,_n={left:0,right:0,top:0,bottom:0};function Nn(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 Rn(e,t){var n=_n;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 Dn(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++)Dn(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 zn(){return u&&g?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wn(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=Wn(t);n.top+=i,n.bottom+=i}if("line"==r)return n;r||(r="local");var a=Wt(t);if("local"==r?a+=Cn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:zn());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-=zn();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=In(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=Ln(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=Wt(r)+Cn(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=Nt(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-=Wn(t);var o=t.text.length,i=ie((function(t){return In(e,n,t-1).bottom<=r}),o,0);return{begin:i,end:o=ie((function(t){return In(e,n,t).top>r}),i,o)}}function Qn(e,t,n,r){return n||(n=Ln(e,t)),Xn(e,t,n,Hn(e,t,In(e,n,r),"line").top)}function Zn(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function er(e,t,n,r,o){o-=Wt(t);var i=Ln(e,t),a=Wn(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=In(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":In(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=In(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==Fn){Fn=T("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Fn.appendChild(document.createTextNode("x")),Fn.appendChild(T("br"));Fn.appendChild(document.createTextNode("x"))}j(e.measure,Fn);var n=Fn.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"==Ce(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=D(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)kt&&Vt(e.doc,t)<o.viewTo&&dr(e);else if(n<=o.viewFrom)kt&&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(!kt||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,k=!v||f==v.length-1;if(y.top-m.top<=3){var C=(c?x:b)&&k,A=(c?b:x)&&w?s:(g?m:y).left,O=C?l:(g?y:m).right;u(A,m.top,O-A,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&&k?l:y.right):(S=c?h(e,o,"before"):s,E=!c&&b&&w?l:m.right,j=!c&&x&&k?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=Dt(h)==Dt(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 kr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Ar(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&Or(e))}),100)}function Ar(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,I(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-Cn(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,Wt(Ge(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(i=Xe(t,Wt(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+An(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&&(Ir(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Pr(e){Ir(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Lr(e,t,n){null==t&&null==n||Ir(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Ir(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Fr(e,Kn(e,t.from),Kn(e,t.to),t.margin))}function Fr(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});Lr(e,o.scrollLeft,o.scrollTop)}function _r(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||lo(e,{top:t}),Nr(e,t,!0),n&&lo(e),ro(e,100))}function Nr(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 Rr(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 Dr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+An(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=Dr(e));var n=e.display.barWidth,r=e.display.barHeight;zr(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),zr(e,Dr(e)),n=e.display.barWidth,r=e.display.barHeight}function zr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var Wr={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 Wr[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?Rr(e,t):_r(e,t)}),e),e.display.scrollbars.addClass&&I(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=Dr(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&&Rr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==L();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&&kr(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&&Nr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Rr(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-Cn(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&&(_r(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Rr(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,N(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?ze(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)),kt&&(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=Wt(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=L();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!=L()&&(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+An(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=Dr(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=Dr(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 ko(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&&_r(e,Math.max(0,s.scrollTop+i*bo)),Rr(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 Co=function(e,t){this.ranges=e,this.primIndex=t};Co.prototype.primary=function(){return this.ranges[this.primIndex]},Co.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},Co.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ao(rt(this.ranges[t].anchor),rt(this.ranges[t].head));return new Co(e,this.primIndex)},Co.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},Co.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 Ao=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 Ao(f?u:c,f?c:u))}}return new Co(t,n)}function So(e,t){return new Co([new Ao(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 Ao(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),Lo(e)}function Lo(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 Io(e,t){return 0==t.from.ch&&0==t.to.ch&&""==K(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Fo(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(Io(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 _o(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 No(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,lr(e),Po(e),Ro(e),e.options.direction=t.direction,e.options.lineWrapping||qt(e),e.options.mode=t.modeOption,fr(e)}function Ro(e){("rtl"==e.doc.direction?I:S)(e.display.lineDiv,"CodeMirror-rtl")}function Do(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),_o(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||Wo(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 zo(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:Wo(t,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&!1!==r.clearRedo&&Bo(o.undone)}function Wo(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?Co.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 Ao(o,t)}return new Ao(n||t,t)}function Jo(e,t,n,r,o){null==o&&(o=e.cm&&(e.cm.display.shift||e.extend)),ei(e,new Co([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),zo(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 Ao(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 Ao(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()),z)}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=[];_o(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(Wo(o,l),n&&!o.equals(e.sel))return void ei(e,o,{clearRedo:!1});a=o}var u=[];Wo(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=[];_o(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 Co(J(e.sel.ranges,(function(e){return new Ao(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(Dt(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),Fo(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||Io(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):Fo(e,t,r),ti(e,n,z),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}Ao.prototype.from=function(){return it(this.anchor,this.head)},Ao.prototype.to=function(){return ot(this.anchor,this.head)},Ao.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 ki=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 Ci(e,t,n){Wt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Mr(e,n)}ki.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(){Ci(e,n,-i),pr(e,r,"widget")})),ln(e,"lineWidgetCleared",e,this,r))}},ki.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,Ci(n,r,o),ln(n,"lineWidgetChanged",n,e,Ye(r))})))},ye(ki);var Ai=0,Oi=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++Ai};function Si(e,t,n,r,o){if(r&&r.shared)return function(e,t,n,r,o){(r=R(r)).shared=!1;var i=[Si(e,t,n,r,o)],a=i[0],s=r.widgetNode;return _o(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&&R(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(Rt(e,t.line,t,n,i)||t.line!=n.line&&Rt(e,n.line,t,n,i))throw new Error("Inserting collapsed marker partially overlapping an existing one");kt=!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&&Dt(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 Ct(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=++Ai,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=At(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=Dt(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=At(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&&(Dn(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];_o(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 Do(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)),Fo(this,{from:i,to:i,text:e}),ei(this,So(i),z)};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&&Lr(this.cm,0,0),ei(this,So(t),z)})),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)),Dt(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 Ao(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 Ao(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 Ao(f?c:l,f?l:c)}else r[a]=new Ao(l,l)}return new Co(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 Do(this.history),_o(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 Do(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(A(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(A(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 ki(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=Wt(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];_o(e,(function(e){return n.push(e.id)}),!0),e.history=new Do(null),e.history.done=$o(this.history.done,n),e.history.undone=$o(this.history.undone,n)}},iterLinkedDocs:function(e){_o(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(){Ro(t),fr(t)})))}))}),Pi.prototype.eachLine=Pi.prototype.iter;var Li=0;function Ii(e){var t=this;if(Fi(t),!ve(t,e)&&!kn(t.display,e)){be(e),a&&(Li=+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 Fi(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function _i(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 Ni=!1;function Ri(){var e;Ni||(fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,_i(Di)}),100))})),fe(window,"blur",(function(){return _i(Or)})),Ni=!0)}function Di(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 zi=1;zi<=12;zi++)Vi[zi+111]=Vi[zi+63235]="F"+zi;var Wi={};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),(k?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(k?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?Wi[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=Ln(t,n);a=o<0?n.text.length-1:0;var u=In(t,c,a).top;a=ie((function(e){return In(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")}Wi.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"},Wi.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"},Wi.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"},Wi.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"]},Wi.default=y?Wi.macDefault:Wi.pcDefault;var ta={selectAll:li,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},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=_t(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=D(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 Ao(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=Dt(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=L(),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||Ie||!(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))}I(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()||kn(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,kn(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=Ae(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(N(kr,e),0):e.curOp.focus=L();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:Cr(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&&Cr(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 Ao(n,n)):(s=i.sel.primary(),l=i.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Ao(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,W):(l=0,ei(i,new Co([s],0),W),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=D(Ge(i,n.line).text,n.ch,a),f=D(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 Ao(et(v,y),et(v,y))):m.length>y&&o.push(new Ao(et(v,y),et(v,q(m,h,a))))}o.length||o.push(new Ao(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),k=x.anchor;tt(w.anchor,k)>0?(b=w.head,k=it(x.from(),w.anchor)):(b=w.anchor,k=ot(x.to(),w.head));var C=c.ranges.slice(0);C[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 Ao(new et(n.line,h,v),r)}(e,new Ao(st(i,k),b)),ei(i,Oo(e,C,l),W)}}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&&Ae(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=L(),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):Ce(e)==n.scroller&&be(e):2==o?(r&&Jo(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==o&&(C?t.display.input.onContextMenu(e):Cr(t)))}}function ma(e,t,n){if("char"==n)return new Ao(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ao(et(t.line,0),st(e.doc,et(t.line+1,0)));var r=n(e,t);return new Ao(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){kn(e.display,t)||function(e,t){return!!me(e,"gutterContextMenu")&&ya(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||C||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 ka={toString:function(){return"CodeMirror.Init"}},Ca={},Aa={};function Oa(e,t,n){if(!t!=!(n&&n!=ka)){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?(I(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?R(t):{},R(Ca,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)&&!kn(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&&!kn(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 Ao(s,s):!r.prev.prev||i(r,r.prev.prev)?e.findWordAt(s):new Ao(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&&(_r(e,t.scroller.scrollTop),Rr(e,t.scroller.scrollLeft,!0),he(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return ko(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return ko(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||ke(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),ke(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Li<100))ke(t);else if(!ve(e,t)&&!kn(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,Ii),leave:function(t){ve(e,t)||Fi(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 Ar(e,t)})),fe(l,"blur",(function(t){return Or(e,t)}))}(this),Ri(),Gr(this),this.curOp.forceUpdate=!0,No(this,r),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ar(n)}),20):Or(this),Aa)Aa.hasOwnProperty(c)&&Aa[c](this,t[c],ka);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=Ca,Ea.optionHandlers=Aa;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=D(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?D(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 Ao(g,g));break}}}Ea.defineInitHook=function(e){return ja.push(e)};var Ma=null;function Pa(e){Ma=e}function La(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&&Fa(e,t),Pr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Ia(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Zr(t,(function(){return La(t,n,0,null,"paste")})),!0}function Fa(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 _a(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 Na(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function Ra(){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"),Na(e),t}function Da(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||Ln(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=Nn(o.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function za(e,t){return t&&(e.bad=!0),e}function Wa(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return za(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 za(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 za(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 za(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 za(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 za(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=_a(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,z),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=Ra(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Ma.text.join("\n");var c=L();_(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==o&&n.showPrimarySelection()}),50)}}o.contentEditable=!0,Na(o,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),fe(o,"paste",(function(e){!i(e)||ve(r,e)||Ia(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=L()==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=Wa(t,e.anchorNode,e.anchorOffset),s=Wa(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()&&L()==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=Wa(t,e.anchorNode,e.anchorOffset),r=Wa(t,e.focusNode,e.focusOffset);n&&r&&Zr(t,(function(){ei(t.doc,So(n,r),z),(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),k=et(l,p.length?K(p).length-h:0);return f.length>1||f[0]||tt(w,k)?(vi(r.doc,f,w,k,"+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,La)(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=_a(r);Pa({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,z):(n.prevInput="",o.value=t.text.join("\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)||Ia(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),fe(o,"cut",i),fe(o,"copy",i),fe(e.scroller,"paste",(function(t){if(!kn(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){kn(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=Ra(),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&&_(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||L()!=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||Le(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(){La(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),z);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(),C){ke(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!=ka&&o(e,t,n)}:o)}e.defineOption=n,e.Init=ka,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){Lo(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!=ka&&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!=ka&&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,Lo,!0),n("addModeClass",!1,Lo,!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,Lo,!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 Ao(i,c[r].to()),z)}}})),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-Wt(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&&_r(i,s.scrollTop),null!=s.scrollLeft&&Rr(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){Fa(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=Da(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()?Da(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=Da(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 Ao(et(e.line,n),et(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?I(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()==L()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:to((function(e,t){Lr(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){Ir(e),e.curOp.scrollToPos=t}(this,e):Fr(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),Lr(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(),No(this,e),Bn(this),this.display.input.reset(),Lr(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),Re.apply(this,arguments)},Ea.defineMIME=function(e,t){Ne[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?R(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=L();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=D,e.findColumn=q,e.isWordChar=Z,e.Pass=U,e.signal=he,e.Line=Gt,e.changeEnd=Eo,e.scrollbarModel=Wr,e.Pos=et,e.cmpPos=tt,e.modes=_e,e.mimeModes=Ne,e.resolveMode=De,e.getMode=Ve,e.modeExtensions=Be,e.extendMode=Ue,e.copyState=ze,e.startState=He,e.innerMode=We,e.commands=ta,e.keyMap=Wi,e.keyName=Ji,e.isModifierKey=$i,e.lookupKey=Gi,e.normalizeKeyMap=qi,e.StringStream=qe,e.SharedTextMarker=Ei,e.TextMarker=Oi,e.LineWidget=ki,e.e_preventDefault=be,e.e_stopPropagation=xe,e.e_stop=ke,e.addClass=I,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){var r=n(579),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(664),s=n(517),l=n(519),c=n(525),u=n(522),f=n(610),p=n(581),d=n(560),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(558),o=n(602),i=n(529),a=n(539),s=n(615),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),k=r(v,g,3),C=a(w.length),A=0,O=m||s,S=t?O(h,C):n||p?O(h,0):void 0;C>A;A++)if((d||A in w)&&(b=k(y=w[A],A,x),e))if(t)S[A]=b;else if(b)switch(e){case 3:return!0;case 5:return y;case 6:return A;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(777),o=n(782);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(553),o=n(778),i=n(779),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(877)},function(e,t,n){e.exports=n(889)},function(e,t,n){e.exports=n(968)},function(e,t,n){var r=n(520),o=n(576),i=n(548),a=n(528),s=n(578),l=n(522),c=n(656),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(614),o=n(530).f,i=n(525),a=n(522),s=n(747),l=n(518)("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(668);var r=n(760),o=n(517),i=n(564),a=n(525),s=n(552),l=n(518)("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(532).Symbol;e.exports=r},function(e,t,n){var r=n(585),o=n(620);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(680),o=n(681),i=n(554);e.exports=function(e){return i(e)?r(e):o(e)}},function(e,t,n){var r=n(521),o=n(693),i=n(539),a=n(558),s=n(627),l=n(692),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),k=function(e){return u&&l(u),new c(!0,e)},C=function(e){return y?(r(e),x?w(e[0],e[1],k):w(e[0],e[1])):x?w(e,k):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=C(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=C(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){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(538);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(658),o=n(606);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t){e.exports={}},function(e,t,n){var r=n(557);e.exports=Array.isArray||function(e){return"Array"==r(e)}},function(e,t,n){var r,o=n(521),i=n(662),a=n(606),s=n(560),l=n(663),c=n(603),u=n(581),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(525);e.exports=function(e,t,n,o){o&&o.enumerable?e[t]=n:r(e,t,n)}},function(e,t,n){var r=n(614),o=n(557),i=n(518)("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(515),o=n(518),i=n(580),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(522),o=n(529),i=n(581),a=n(671),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(578),o=n(530),i=n(548);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(584),o=n(674);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(842),o=n(843),i=n(629),a=n(844);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(538),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){var r=n(590);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(969)},function(e,t,n){var r=n(999),o=n(643),i=n(1e3),a=n(1001),s=n(1002),l=n(543),c=n(677),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";(function(e){n.d(t,"a",(function(){return Ge})),n.d(t,"b",(function(){return $e})),n.d(t,"c",(function(){return xe})),n.d(t,"d",(function(){return me})),n.d(t,"e",(function(){return ve}));var r=n(0),o=n.n(r),i=n(172);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(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 l(e,t,n){return t&&s(e.prototype,t),n&&s(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(){return(u=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 f(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 p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(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&&v(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function v(e,t){return(v=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(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 m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function y(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?m(e):t}function b(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=h(e);if(t){var o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return y(this,n)}}function x(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)||k(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 w(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||k(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 k(e,t){if(e){if("string"==typeof e)return C(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)?C(e,t):void 0}}function C(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 A=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})}})),O=A("informed:ObjMap\t"),S=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return String.prototype.replace.call(e,/\['(.+?)'\]/g,".$1").split(/[,[\].]+?/).filter(Boolean)},E=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},j=function(e){return".".concat(e).replace(/(.*)[.[].*/,"$1").replace(/\./,"")},T=function(e,t){var n=j(t),r=function(e){return e.replace(j(e),"").replace(/\./,"")}(t),o=n?E(e,n):e;return!(!o||!Object.hasOwnProperty.call(o,r.replace(/\[(.*)\]/,"$1")))},M=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)},P=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},L=function(e){var t=S(e);return Number.isInteger(+t[t.length-1])},I=function(){function e(){a(this,e)}return l(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 E(e,t)}},{key:"has",value:function(e,t){return T(e,t)}},{key:"set",value:function(t,n,r){if(void 0!==r)O("SETTING",n,r),M(t,n,r);else if(L(n)&&void 0!==e.get(t,n)){O("Special case SETTING",n,"to undefined"),M(t,n,void 0);var o=S(n);F(t,o=o.slice(0,o.length-1))}else L(n)||void 0===e.get(t,n)||(O("Special case REMOVING",n,"from object completley"),e.delete(t,n))}},{key:"delete",value:function(e,t){O("DELETE",t),L(t)?(O("ARRAY",t),this.pullOut(e,t)):P(e,t);var n=S(t);F(e,n=n.slice(0,n.length-1))}},{key:"pullOut",value:function(e,t){var n=S(t),r=n[n.length-1];n=n.slice(0,n.length-1),O("Pulling out:",n,"index",r);var o=E(e,n);O("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),F(e,n)}}]),e}();function F(e,t){if(0!==t.length){var n=E(e,t);(Array.isArray(n)?n.every((function(e){return null==e})):"{}"===JSON.stringify(n))&&P(e,t),F(e,t.slice(0,t.length-1))}}var _=o.a.createContext({register:function(){},deregister:function(){},setValue:function(){},setTouched:function(){},setError:function(){},update:function(){},getField:function(){},expectRemoval:function(){},getInitialValue:function(){},getSavedValue:function(){}}),N=o.a.createContext({}),R=o.a.createContext({getFullField:function(){},getValues:function(){},getOptions:function(){return{}},setInitialValue:function(){},getInitialValue:function(){},getDerrivedValue:function(){},getSavedValue:function(){},removeSavedState:function(){}}),D=o.a.createContext(),V=o.a.createContext(),B=o.a.createContext(),U=o.a.createContext(),z=o.a.createContext(),W=o.a.createContext();function H(){return Object(r.useContext)(R)}function q(e){var t=Object(r.useRef)(),n=Object(r.useRef)(!0),o=x(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 G=function(e){return e.type&&e.type.name?e.type.name:e.displayName||e.name||"Component"},$=function(e){var t={};if(e.inner){if(0===e.inner.length)return void I.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=k(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;I.get(t,o.path)||I.set(t,o.path,o.message)}}catch(o){r.e(o)}finally{r.f()}}return t},K=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(e){return $(e)}},J=function(e){if(e.inner){if(0===e.inner.length)return;return e.inner[0].message}},Y=function(e,t){try{e.validateSync(t,{abortEarly:!1})}catch(e){return J(e)}},X=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(".",""),I.set(n,a,t)})),n},Q=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)}))},Z=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,f=t.title,d=t.minimum,h=t.maximum,v=t.minLength,g=t.maxLength,m=t.pattern,y=t.type,b=t.properties,x=Q();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:p(p({label:f,id:x,min:d,max:h,minLength:v,maxLength:g,pattern:m},o),i)};if(l){var k=t.oneOf.map((function(e){var t=e["input:props"],n=void 0===t?{}:t;return p({value:e.const,label:e.title},n)}));w.props.options=k}if(u){var C=t.enum.map((function(e){return{value:e,label:e}}));w.props.options=C}if(c&&c.oneOf){var A=c.oneOf.map((function(e){var t=e["input:props"],n=void 0===t?{}:t;return p({value:e.const,label:e.title},n)}));w.props.options=A}return w},ee=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 Z(e,t,n)}));return i&&l.push({componentType:"conditionals",allOf:i}),l}return[]},te=function(e,t){if(!e)return{value:e,offset:0};var n=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,e),r=n.findIndex((function(e){return"string"!=typeof e})),o=n.length-w(n).reverse().findIndex((function(e){return"string"!=typeof e})),i=[],a=e.split(""),s=0,l=0,c=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}(n.slice(0,r),a.slice(0,r));c>-1&&(s=c+1,i=i.concat(n.slice(0,c+1)),l=c+1),c<0&&(i=i.concat(n.slice(0,r)),l=r);for(var u=l;u<n.length;u++){var f=n[u];if(s!=a.length){var p=a[s],d="string"==typeof f?f===p:f.test(p);d&&"string"==typeof f?(i.push(f),s+=1):d||"string"!=typeof f?d&&"string"!=typeof f?(i.push(p),s+=1):d||"string"==typeof f||(s+=1,u-=1):s!=a.length&&i.push(f)}else{if(!("string"==typeof f&&u>=o))break;i.push(f)}}return{value:i.join(""),offset:e?i.length-e.length:0}},ne="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect,re=function(e){var t=e.value,n=e.inputRef,o=e.maintainCursor,i=void 0===o||o,a=x(q(0),3),s=a[0],l=a[1],c=a[2],u=x(q(0),3),f=u[0],p=u[1],d=u[2];return Object(r.useLayoutEffect)((function(){if(null!=n.current&&c()){var e=c()+d();0!=d()&&i?n.current.setSelectionRange(e+1,e+1):i&&n.current.setSelectionRange(e,e)}}),[t]),{setCursorOffset:p,setCursor:l,cursor:s,getCursor:c,cursorOffset:f}},oe=A("informed:useField\t"),ie=function(e,t,n,r,o){if(null!=e)return o?o(e):t?t(e):n&&!r?te(e,n).value:e},ae=function(e,t,n,r){return t&&n?t(e):r?te(e,r).value:e},se=function(e,t,n){var r=n.required;return e||t?function(n,r){return t?Y(t,n):e?e(n,r):void 0}:r?function(e){return pe(e,r)}:void 0},le=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)}},ce=function(e){var t=e.setTouched,n=e.onBlur;return function(e){t(!0),n&&n(e)}},ue=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}},fe=function(e){switch(e){case"text":case"number":case"checkbox":return e;default:return}},pe=function(e,t){if(t&&(null==e||""===e))return"string"==typeof t?t:"This field is required"};function de(){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,f=e.parse,d=e.formatter,h=e.parser,v=e.initialValue,m=e.validateOnChange,y=e.validateOnBlur,b=e.validateOnMount,k=e.asyncValidateOnBlur,C=e.maskOnBlur,A=e.allowEmptyString,O=e.onValueChange,S=e.notify,E=e.keepState,j=e.maintainCursor,T=e.debug,M=e.shadow,P=e.step,L=e.fieldType,F=e.multiple,N=e.onChange,R=e.onBlur,D=e.formController,V=e.relevant,B=e.required,U=e.keepStateIfRelevant,z=e.initialize,G=g(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"]),$=Object(r.useState)(Q()),K=x($,1),J=K[0],Y=Object(r.useContext)(_),X=Object(r.useContext)(W),Z=X||U,ee=H(),pe=Object(r.useRef)(),de=Object(r.useRef)(!0),he=Object(r.useRef)(),ve=Object(r.useRef)(!1),ge=function(){return!ve.current},me=function(){return ve.current};D&&(Y=D.updater,ee=D.getFormApi());var ye,be,xe=se(i,s,{required:B}),we=Object(r.useState)((function(){return Y.getInitialValue(n)})),ke=x(we,1),Ce=ke[0],Ae=Y.getSavedValue(n);(E||Z)&&Ae?(oe("Setting field ".concat(bt,"'s kept state"),Ae),ye=Ae.value,be=Ae.touched,ee.removeSavedState(bt)):ye=null!=v?v:Ce;var Oe=q(ie(ye,l,d,h,z)),Se=x(Oe,3),Ee=Se[0],je=Se[1],Te=Se[2],Me=q(b?xe(Ee):void 0),Pe=x(Me,3),Le=Pe[0],Ie=Pe[1],Fe=Pe[2],_e=q(be),Ne=x(_e,3),Re=Ne[0],De=Ne[1],Ve=Ne[2],Be=Object(r.useState)((function(){return ae(Ee,u,f,d)})),Ue=x(Be,2),ze=Ue[0],We=Ue[1],He=Object(r.useRef)(v),qe=Object(r.useRef)(n),Ge=Object(r.useRef)();He.current=v,qe.current=n;var $e=Object(r.useRef)(null),Ke=o.a.useMemo((function(){return t||$e}),[]),Je=re({value:Ee,inputRef:Ke,maintainCursor:!!j}),Ye=Je.getCursor,Xe=Je.setCursor,Qe=Je.setCursorOffset,Ze=function(){return!0},et=function(e){var t=V||Ze,n=ee.getFullField(qe.current)||qe.current,r={path:n,parentPath:n.replace(/(.*)[.[].*/,"$1"),get:function(e,t){return I.get(e,t)}};return X&&X.relevant?t(e,r)&&X.relevant(e,r):t(e,r)},tt=q(et(ee.getValues())),nt=x(tt,3),rt=nt[0],ot=nt[1],it=nt[2],at=function(e){return!X||!X.relevant||X.relevant(e)},st=function(){var e=et(ee.getValues());return e!=it()&&ot(e),e};Object(r.useEffect)((function(){rt||E||pe.current.reset()}),[rt]);var lt=function(){return M?ee.getDerrivedValue(n):Te()},ct=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.preventUpdate;P&&ee.getStep()<P?(oe("Setting ".concat(n,"'s error to undefined as we are not at that step")),Ie(void 0),Y.setError(J,void 0,!r)):(oe("Setting ".concat(n,"'s error to ").concat(e)),Ie(e),Y.setError(J,e,!r))},ut=function(t,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t;ve.current=!0,oe("Setting ".concat(n," to ").concat(i)),z&&(i=z(i));var a=ee.getOptions(),s=i;if(""!==i||A||o.allowEmptyString||a.allowEmptyStrings||(i=void 0),"number"!==e.type&&"number"!==L||void 0===i||(i=+i),r&&r.target&&r.target.selectionStart&&Xe(r.target.selectionStart),l&&!C&&(s=l(i,Ye()),i=l(i,Ye())),c&&!C){var p=c(i,Ye());s=p.value,i=p.value,Qe(p.offset)}if(u&&f&&(i=f(i),s=u(i)),d){var v=te(i,d);Qe(v.offset),i=s=v.value}h&&(i=null!=i?h(i):i),xe&&m&&!o.initial&&(oe("Validating after change ".concat(n," ").concat(i)),ct(xe(i,ee.getValues()))),je(i),We(s),O&&O(i),Y.setValue(J,i,!o.preventUpdate)},ft=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.preventUpdate;if(oe("Field ".concat(n," has been touched")),xe&&y&&!t&&e&&(oe("Validating after blur ".concat(n," ").concat(lt())),ct(xe(lt(),ee.getValues()))),a&&k&&!t&&e&&(oe("Validating async after blur ".concat(n," ").concat(lt())),a(lt(),ee.getValues())),l&&C){var i=l(lt());je(i),We(i),O&&O(i),Y.setValue(J,i,!o)}if(c&&C){var s=c(lt());Qe(s.offset),je(s.value),We(s.value),O&&O(s.value),Y.setValue(J,s.value,!o)}De(e),Y.setTouched(J,e,!o)},pt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.preventUpdate,n=ie(He.current||Y.getInitialValue(qe.current),l,d,h,z);ut(n,null,{initial:!0,preventUpdate:t}),ct(b?xe(n):void 0,{preventUpdate:t}),ft(void 0,!0,{preventUpdate:t}),ve.current=!1},dt=function(e){xe&&(oe("Field validating ".concat(n," ").concat(lt())),ct(xe(lt(),e||ee.getValues())))},ht=function(e){a&&(oe("Field async validating ".concat(n," ").concat(lt())),a(lt(),e||ee.getValues()))},vt={setValue:ut,setTouched:ft,setError:ct,reset:pt,validate:dt,asyncValidate:ht,getValue:lt,getTouched:Ve,getError:Fe,getIsRelevant:it,getDirty:me,getPristine:ge,getFieldState:function(){return{value:lt(),touched:Ve(),dirty:me(),pristine:ge()}},relevant:et,multistepRelevant:at,checkRelevant:st};pe.current=vt;var gt={value:Ee,error:Le,touched:Re,maskedValue:ze,isRelevant:rt,dirty:ve.current,pristine:!ve.current};M&&(gt={error:Le,touched:Re}),oe("Render",ee.getFullField(n),gt),ne((function(){var e=ee.getFullField(qe.current);return oe("Register",J,qe.current),he.current={field:e,fieldId:J,fieldApi:vt,fieldState:gt,notify:S,keepState:E,inMultistep:Z,shadow:M},Y.register(J,he.current),function(){var e=ee.getFullField(qe.current);oe("Deregister",J,e),Y.deregister(J)}}),[]),Object(r.useEffect)((function(){var e=ee.getFullField(n);return de.current?de.current=!1:(oe("Update",n,Z),he.current.field=e,Y.update(J,he.current,Ge.current)),function(){Ge.current=e}}),[n]),ne((function(){T&&Ke&&(Ke.current.style.border="5px solid orange",setTimeout((function(){Ke.current.style.borderWidth="2px",Ke.current.style.borderStyle="inset",Ke.current.style.borderColor="initial",Ke.current.style.borderImage="initial"}),500))}));var mt=[].concat(w(Object.values(gt)),w(Object.values(e)),w(Object.values(G))),yt=function(e){return Object(r.useMemo)((function(){return rt?e:null}),w(mt))},bt=n,xt=le({fieldType:L,setValue:ut,onChange:N,multiple:F,ref:Ke}),wt=ce({setTouched:ft,onBlur:R}),kt=ue({fieldType:L,maskedValue:ze,multiple:F,value:Ee}),Ct=fe(L);return{fieldState:gt,fieldApi:vt,render:yt,ref:Ke,userProps:p(p({},G),{},{multiple:F,onChange:N,onBlur:R,id:G.id||J}),informed:p({name:bt,multiple:F,onChange:xt,onBlur:wt,value:kt,ref:Ke,type:Ct,id:G.id||J},G)}}var he,ve=function(e){var t=o.a.forwardRef((function(t,n){var r=de(t,n),i=r.fieldState,a=r.fieldApi,s=r.render,l=r.ref,c=r.userProps;return s(o.a.createElement(e,u({fieldApi:a,fieldState:i,field:t.field,forwardedRef:l,debug:t.debug,type:t.type},c)))}));return t.displayName="asField(".concat(G(e),")"),t},ge=A("informed:Text\t"),me=ve((function(e){var t=e.fieldApi,n=e.fieldState,r=g(e,["fieldApi","fieldState"]),i=n.maskedValue,a=t.setValue,s=t.setTouched,l=r.onChange,c=r.onBlur,f=r.field,p=(r.initialValue,r.forwardedRef),d=r.debug,h=r.label,v=(r.title,r.id),m=g(r,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","title","id"]);return ge("Render",f),ne((function(){d&&p&&(p.current.style.background="red",setTimeout((function(){p.current.style.background="white"}),500))})),o.a.createElement(o.a.Fragment,null,h?o.a.createElement("label",{htmlFor:v}," ",h," "):null,o.a.createElement("input",u({},m,{id:v,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),c&&c(e)}})))})),ye=ve((function(e){var t=e.fieldApi,n=e.fieldState,r=g(e,["fieldApi","fieldState"]),i=n.maskedValue,a=t.setValue,s=t.setTouched,l=r.onChange,c=r.onBlur,f=r.field,p=(r.initialValue,r.forwardedRef),d=r.debug,h=r.label,v=r.id,m=g(r,["onChange","onBlur","field","initialValue","forwardedRef","debug","label","id"]);return ne((function(){d&&p&&(p.current.style.background="red",setTimeout((function(){p.current.style.background="white"}),500))})),o.a.createElement(o.a.Fragment,null,h?o.a.createElement("label",{htmlFor:v}," ",h," "):null,o.a.createElement("textarea",u({},m,{id:v,name:f,ref:p,value:i||"",onChange:function(e){a(e.target.value,e),l&&l(e)},onBlur:function(e){s(!0),c&&c(e)}})))})),be=A("informed:Select\t"),xe=ve((function(e){var t=e.fieldApi,n=e.fieldState,i=g(e,["fieldApi","fieldState"]),a=n.value,s=t.setTouched,l=i.onChange,c=i.onBlur,f=i.field,p=(i.initialValue,i.options),d=i.children,h=i.forwardedRef,v=i.debug,m=i.multiple,y=i.label,b=i.id,x=g(i,["onChange","onBlur","field","initialValue","options","children","forwardedRef","debug","multiple","label","id"]),w=Object(r.useRef)();return ne((function(){v&&h&&(h.current.style.background="red",setTimeout((function(){h.current.style.background="white"}),500))})),be("Render",f,a),o.a.createElement(o.a.Fragment,null,y?o.a.createElement("label",{htmlFor:b}," ",y," "):null,o.a.createElement("select",u({},x,{id:b,multiple:m,name:f,ref:h||w,value:a||(m?[]:""),onChange:function(e){var n=Array.from((h||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),c&&c(e)}}),p?p.map((function(e){return o.a.createElement("option",{key:e.value,value:e.value,disabled:e.disabled},e.label)})):d))})),we=ve((function(e){var t=e.fieldApi,n=e.fieldState,r=g(e,["fieldApi","fieldState"]),i=n.value,a=t.setValue,s=t.setTouched,l=r.onChange,c=r.onBlur,f=r.field,p=(r.initialValue,r.debug,r.forwardedRef),d=r.id,h=r.label,v=g(r,["onChange","onBlur","field","initialValue","debug","forwardedRef","id","label"]);return o.a.createElement(o.a.Fragment,null,h?o.a.createElement("label",{htmlFor:d}," ",h," "):null,o.a.createElement("input",u({},v,{id:d,name:f,ref:p,checked:!!i,onChange:function(e){a(e.target.checked),l&&l(e)},onBlur:function(e){s(!0),c&&c(e)},type:"checkbox"})))})),ke=(he=function(e){var t=e.radioGroupApi,n=e.radioGroupState,r=g(e,["radioGroupApi","radioGroupState"]),i=n.value,a=t.setValue,s=t.setTouched,l=t.onChange,c=t.onBlur,f=r.value,p=r.onChange,d=r.onBlur,h=r.field,v=(r.initialValue,r.forwardedRef),m=g(r,["value","onChange","onBlur","field","initialValue","forwardedRef"]);return o.a.createElement("input",u({},m,{name:h,ref:v,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),c&&c(e)},type:"radio"}))},o.a.forwardRef((function(e,t){return o.a.createElement(D.Consumer,null,(function(n){var r=n.radioGroupApi,i=n.radioGroupState;return o.a.createElement(he,u({radioGroupApi:r,radioGroupState:i,ref:t},e))}))}))),Ce=function(e){d(n,e);var t=b(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n,[{key:"render",value:function(){var e=this.props,t=e.options,n=e.children;return o.a.createElement(D.Provider,{value:this.groupContext},t?t.map((function(e){return o.a.createElement("label",{key:e.value},e.label," ",o.a.createElement(ke,{value:e.value}))})):n)}},{key:"groupContext",get:function(){return{radioGroupApi:p(p({},this.props.fieldApi),{},{onChange:this.props.onChange,onBlur:this.props.onBlur}),radioGroupState:this.props.fieldState}}}]),n}(r.Component),Ae=ve(Ce);var Oe=A("informed:useArrayField\t"),Se=function(e){var t=e.field,n=e.initialValue,i=e.validate,a=e.arrayFieldApiRef,s=g(e,["field","initialValue","validate","arrayFieldApiRef"]),l=H(),c=x(Object(r.useState)(new Map),1)[0],u=Object(r.useContext)(_),f=l.getFullField(t),d=u.getInitialValue(t)||n||[],h=x(q(l.getSavedValue(f)&&l.getSavedValue(f).value||d),3),v=h[0],m=h[1],y=h[2],b=x(q(v?v.map((function(){return Q()})):[]),3),k=b[0],C=b[1],A=b[2],O=Object(r.useMemo)((function(){return function(e,t){var n=null==A()?0:A().length;return i?i(e,n,t):void 0}})),S=de(p({field:t,validate:i?O:void 0,shadow:!0},s)).fieldApi;ne((function(){var e=function(e){e!==f&&(Oe("".concat(f," changed")),RegExp("".concat(f,"\\[[0-9]+\\]")).test(e)&&S.validate())};return l.emitter.on("value",e),function(){l.emitter.removeListener("value",e)}}),[t]);var E=function(e,n){Oe("Swapping","".concat(t,"[").concat(e,"] and ").concat(t,"[").concat(n,"]"));var r=w(k);k[e]&&k[n]?(r[e]=k[n],r[n]=k[e]):console.warn("Attempted to swap ".concat(e," with ").concat(n," but one of them does not exist :(")),C(r)},j=function(){k.push(Q()),C(w(k))},T=function(e){k.push(Q()),C(w(k));var t=w(y());t[k.length-1]=e,m(t)},M=k.map((function(e,n){var r={remove:function(){return function(e){Oe("EXPECTING REMOVAL OF","".concat(t,"[").concat(e,"] and ").concat(t,"[").concat(k.length-1,"]")),u.expectRemoval("".concat(t,"[").concat(e,"]")),u.expectRemoval("".concat(t,"[").concat(k.length-1,"]"));var n=k.slice(0,e).concat(k.slice(e+1,k.length));C(n);var r=y(),o=r.slice(0,e).concat(r.slice(e+1,r.length));m(o)}(n)}},o={initialValue:v&&v[n],key:e,field:"".concat(t,"[").concat(n,"]"),index:n};return p(p({arrayFieldItemApi:r,arrayFieldItemState:o},r),o)})),P={add:j,swap:E,addWithInitialValue:T,reset:function(){var e=u.getInitialValue(t)||n||[];m(e);var r=e?e.map((function(){return Q()})):[];C(r)}};a&&(a.current=P);var L={fields:M,field:t},F=p(p({},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(f,"\\[[0-9]+\\]")).test(e)){var n=e.replace(t,""),r=I.get(y(),n);return Oe("Resetting ".concat(n," to ").concat(r)),r}return u.getInitialValue(e)}});return{render:function(e){return o.a.createElement(_.Provider,{value:F},o.a.createElement(B.Provider,{value:P},o.a.createElement(V.Provider,{value:L},e)))},add:j,swap:E,addWithInitialValue:T,fields:M,arrayFieldState:L,arrayFieldApi:P,field:t}};function Ee(e){var t=H();return Object(r.useMemo)((function(){return function(e,t){return p(p({},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 je(){return Object(r.useContext)(N)}var Te=function(e){var t=e.when,n=e.children;return t(je())?n:null},Me=function(e){var t=e.relevant,n=e.field,r=g(e,["relevant","field"]),i=H();if(t){var a=i.getFullField(n),s={path:a,parentPath:a.replace(/(.*)[.[].*/,"$1"),get:function(e,t){return I.get(e,t)}};return o.a.createElement(Te,{when:function(e){var n=e.values;return t(n,s)}},o.a.createElement(Pe,u({field:n},r)))}return o.a.createElement(Pe,u({field:n},r))},Pe=function(e){var t=e.children,n=g(e,["children"]),r=Se(n),o=r.render,i=r.arrayFieldState,a=r.arrayFieldApi,s=r.field;return o("function"==typeof t?t(p(p({field:s,arrayFieldApi:a,arrayFieldState:i},a),i)):t)},Le=function(e){var t=e.arrayFieldItemState,n=e.arrayFieldItemApi,i=e.children,a=Object(r.useContext)(_),s=H(),l=x(Object(r.useState)(0),2),c=(l[0],l[1]),u=x(Object(r.useState)(new Map),1)[0],f=t.field,d=Ee(f);Object(r.useEffect)((function(){var e=function(e){e.slice(0,-1!=e.lastIndexOf("[")?e.lastIndexOf("]")+1:e.length)===f&&c(Math.random())};return s.emitter.on("value",e),function(){s.emitter.removeListener("value",e)}}),[f]);var h,v,g,m,y=(h=s.getState(),v=h.values,g=h.errors,m=h.touched,{values:I.get(v,f),errors:I.get(g,f),touched:I.get(m,f)}),b=p(p({},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=p(p(p({},n),d),{},{reset:function(){u.forEach((function(e){e.fieldApi.reset()}))}}),k=p(p({},t),y);return"function"==typeof i?o.a.createElement(_.Provider,{value:b},o.a.createElement(U.Provider,{value:w},o.a.createElement(z.Provider,{value:k},i(p(p({arrayFieldItemApi:w,arrayFieldItemState:k},w),k))))):o.a.createElement(_.Provider,{value:b},o.a.createElement(U.Provider,{value:w},o.a.createElement(z.Provider,{value:k},i)))};Me.Items=function(e){var t=e.children;return Object(r.useContext)(V).fields.map((function(e){var n=e.arrayFieldItemState,r=e.arrayFieldItemApi,i=n.key;return o.a.createElement(Le,{key:i,arrayFieldItemApi:r,arrayFieldItemState:n},t)}))};var Ie=function(e){var t=e.components,n=Object(r.useContext)(_).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},Fe=A("informed:FormFields\t"),_e=function e(t){var n=t.schema,i=t.prefix,a=t.onlyValidateSchema,s=Object(r.useContext)(_).fieldMap;return Object(r.useMemo)((function(){return ee(n,a,i).map((function(t,n){var r=t.field,i=t.props,a=t.type,l=t.properties,c=t.items,f=t.componentType,p=t.uiBefore,d=t.uiAfter,h=t.allOf,v=s[f];return Fe("Rendering Field",r,t),!v&&"object"===a&&l?o.a.createElement(e,{schema:t,prefix:r,key:"ScheamField-".concat(n)}):!v&&"array"===a&&c?o.a.createElement(Ne,u({key:"ScheamField-".concat(n),field:r,items:c,uiBefore:p,uiAfter:d},i)):v&&"array"===f&&c&&"array"===a?o.a.createElement(v,u({key:"ScheamField-".concat(n),field:r,items:c,uiBefore:p,uiAfter:d},i)):"conditionals"===f?h.map((function(t){var r=t.then,i=t.if.properties;return o.a.createElement(Te,{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,u({key:"ScheamField-".concat(n),field:r},i)):null}))}),[n,i])},Ne=function(e){var t=e.field,n=e.items,r=e.uiBefore,i=e.uiAfter,a=g(e,["field","items","uiBefore","uiAfter"]);return o.a.createElement(Me,u({field:t},a),o.a.createElement(Ie,{components:r}),o.a.createElement(Me.Items,null,(function(e){var t=e.field;return o.a.createElement(o.a.Fragment,null,o.a.createElement(Ie,{components:n["ui:before"]}),o.a.createElement(_e,{schema:n,prefix:t}),o.a.createElement(Ie,{components:n["ui:after"]}))})),o.a.createElement(Ie,{components:i}))},Re={select:xe,input:me,textarea:ye,checkbox:we,radio:Ae,add:function(){var e=Object(r.useContext)(B).add;return o.a.createElement("button",{onClick:function(){e()},type:"button"},"Add")},remove:function(){var e=Object(r.useContext)(U).remove;return o.a.createElement("button",{onClick:function(){e()},type:"button"},"Remove")},array:Ne},De=A("informed:Controller\t"),Ve=function(){},Be=function(e){d(n,e);var t=b(n);function n(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};a(this,n),(e=t.call(this)).options=r;var o=r.ajv,i=r.schema,s=r.fieldMap;return e.ajv=o?new o({allErrors:!0}):null,e.ajvValidate=o?e.ajv.compile(i):null,e.fieldMap=s||Re,e.fieldsById=new Map,e.fieldsByName={get:function(t){var n;return e.fieldsById.forEach((function(e){e&&e.field===t&&(n=e)})),n}},e.onScreen={},e.expectedRemovals={},e.pulledOut={},e.savedValues={},e.state={pristine:!0,dirty:!1,invalid:!1,submits:0,step:0,validating:0,submitting:!1,values:{},errors:{},touched:{}},e.dummyField={fieldApi:{setValue:Ve,setTouched:Ve,setError:Ve,reset:Ve,validate:Ve,getValue:Ve,getTouched:Ve,getError:Ve,getFieldState:Ve,checkRelevant:Ve,getPristine:Ve,getDirty:Ve}},e.deregister=e.deregister.bind(m(e)),e.register=e.register.bind(m(e)),e.getValue=e.getValue.bind(m(e)),e.getTouched=e.getTouched.bind(m(e)),e.getError=e.getError.bind(m(e)),e.getErrors=e.getErrors.bind(m(e)),e.setValue=e.setValue.bind(m(e)),e.getValues=e.getValues.bind(m(e)),e.getStep=e.getStep.bind(m(e)),e.setStep=e.setStep.bind(m(e)),e.back=e.back.bind(m(e)),e.next=e.next.bind(m(e)),e.setCurrent=e.setCurrent.bind(m(e)),e.setTouched=e.setTouched.bind(m(e)),e.setError=e.setError.bind(m(e)),e.setFormError=e.setFormError.bind(m(e)),e.submitForm=e.submitForm.bind(m(e)),e.reset=e.reset.bind(m(e)),e.update=e.update.bind(m(e)),e.validate=e.validate.bind(m(e)),e.screenValid=e.screenValid.bind(m(e)),e.keyDown=e.keyDown.bind(m(e)),e.getField=e.getField.bind(m(e)),e.getInitialValue=e.getInitialValue.bind(m(e)),e.setInitialValue=e.setInitialValue.bind(m(e)),e.getOptions=e.getOptions.bind(m(e)),e.getFormState=e.getFormState.bind(m(e)),e.expectRemoval=e.expectRemoval.bind(m(e)),e.getSavedValue=e.getSavedValue.bind(m(e)),e.removeSavedState=e.removeSavedState.bind(m(e)),e.getDerrivedValue=e.getDerrivedValue.bind(m(e)),e.setValues=e.setValues.bind(m(e)),e.resetField=e.resetField.bind(m(e)),e.fieldExists=e.fieldExists.bind(m(e)),e.validateField=e.validateField.bind(m(e)),e.notify=e.notify.bind(m(e)),e.validating=e.validating.bind(m(e)),e.validated=e.validated.bind(m(e)),e.getDirty=e.getDirty.bind(m(e)),e.getPristine=e.getPristine.bind(m(e)),e.updater={register:e.register,deregister:e.deregister,getField:e.getField,update:e.update,fieldMap:e.fieldMap,setValue:function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e.fieldsById.get(t);o.shadow||I.set(e.state.values,o.field,o.fieldApi.getValue()),o.fieldApi.relevant(e.state.values)||I.delete(e.state.values,o.field),e.fieldsById.forEach((function(t){var n=t.fieldApi.checkRelevant();t.fieldApi.multistepRelevant(e.state.values)&&(n||t.keepState)||(I.delete(e.state.values,t.field),I.delete(e.state.touched,t.field),I.delete(e.state.errors,t.field))})),r&&(e.emit("change"),e.emit("value",o.field,n))},setTouched:function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e.fieldsById.get(t);!o.shadow&&o.fieldApi.getIsRelevant()&&I.set(e.state.touched,o.field,o.fieldApi.getTouched()),o.shadow&&null!=o.fieldApi.getError()&&o.fieldApi.relevant(e.state.values)&&I.set(e.state.touched,o.field,o.fieldApi.getTouched()),r&&e.emit("change")},setError:function(t,n){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=e.fieldsById.get(t);!o.shadow&&o.fieldApi.getIsRelevant()&&I.set(e.state.errors,o.field,o.fieldApi.getError());var i=I.get(e.state.errors,o.field);(o.shadow&&null!=o.fieldApi.getError()&&o.fieldApi.relevant(e.state.values)||o.shadow&&void 0===o.fieldApi.getError()&&o.fieldApi.relevant(e.state.values)&&"string"==typeof i)&&I.set(e.state.errors,o.field,o.fieldApi.getError()),r&&e.emit("change")},expectRemoval:e.expectRemoval,getInitialValue:e.getInitialValue,getSavedValue:e.getSavedValue},e.formApi={setValue:e.setValue,setTouched:e.setTouched,setError:e.setError,setFormError:e.setFormError,setValues:e.setValues,setInitialValue:e.setInitialValue,getValue:e.getValue,getTouched:e.getTouched,getError:e.getError,reset:e.reset,submitForm:e.submitForm,getState:e.getFormState,getValues:e.getValues,getFullField:e.getFullField,fieldExists:e.fieldExists,getInitialValue:e.getInitialValue,validate:e.validate,validateField:e.validateField,screenValid:e.screenValid,resetField:e.resetField,getOptions:e.getOptions,emitter:m(e),getSavedValue:e.getSavedValue,removeSavedState:e.removeSavedState,getDerrivedValue:e.getDerrivedValue,getStep:e.getStep,setStep:e.setStep,next:e.next,back:e.back,setCurrent:e.setCurrent,validated:e.validated,validating:e.validating,getDirty:e.getDirty,getPristine:e.getPristine},e.on("value",(function(t){delete e.state.error,e.notify(t)})),e}return l(n,[{key:"setOptions",value:function(e){this.options=e}},{key:"setValue",value:function(e,t,n){this.getField(e).fieldApi.setValue(t,null,p({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()?(De("Submit",this.state),this.emit("submit")):(De("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){I.set(this.options.initialValues,e,t)}},{key:"getFormState",value:function(){return De("Returning form state"),p(p({},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 I.get(t,e)}},{key:"getValue",value:function(e){var t=this.getField(e).fieldApi.getValue();return De("Getting value for",e,t),t}},{key:"getTouched",value:function(e){var t=this.getField(e).fieldApi.getTouched();return De("Getting touched for",e,t),t}},{key:"getError",value:function(e){var t=this.getField(e).fieldApi.getError();return De("Getting error for",e,t),t}},{key:"getDirty",value:function(e){var t=this.getField(e).fieldApi.getDirty();return De("Getting dirty for",e,t),t}},{key:"getPristine",value:function(e){var t=this.getField(e).fieldApi.getPristine();return De("Getting pristine for",e,t),t}},{key:"getValues",value:function(){return De("Gettings values"),this.state.values}},{key:"getAllTouched",value:function(){return De("Gettings touched"),this.state.touched}},{key:"getErrors",value:function(){return De("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?I.get(this.savedValues,"shadow-".concat(e)):I.get(this.savedValues,e)}},{key:"removeSavedState",value:function(e){var t=this.fieldsByName.get(e);return t&&t.shadow?I.delete(this.savedValues,"shadow-".concat(e)):I.delete(this.savedValues,e)}},{key:"getFullField",value:function(e){return e}},{key:"getInitialValue",value:function(e){return I.get(this.options.initialValues,e)}},{key:"getField",value:function(e){De("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&&(De("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!(!I.empty(e)||this.state.error)}},{key:"screenValid",value:function(){return!Object.entries(this.onScreen).some((function(e){return x(e,2)[1].fieldApi.getError()}))}},{key:"invalid",value:function(){var e=this.getErrors();return!(I.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(){De("Resetting"),this.fieldsById.forEach((function(e){e.fieldApi.reset({preventUpdate:!0})})),this.emit("reset"),this.emit("change")}},{key:"setValues",value:function(e){De("Setting values"),this.fieldsById.forEach((function(t){var n=I.get(e,t.field);void 0!==n&&t.fieldApi.setValue(n,null,{preventUpdate:!0})})),this.emit("change")}},{key:"validate",value:function(){var e=this;De("Validating all fields");var t=this.getValues();if(this.options.validationSchema){var n=K(this.options.validationSchema,t);this.fieldsById.forEach((function(t){if(I.has(n,t.field)){var r=I.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=X(this.ajvValidate,t);this.fieldsById.forEach((function(t){if(I.has(r,t.field)){var n=I.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(I.has(i,t.field)){var n=I.get(i,t.field);e.setError(t.field,n)}}))}}},{key:"asyncValidate",value:function(){De("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()?(De("Submit",this.state),this.emit("submit")):(De("Submit",this.state),this.emit("failure")),this.state.submitting=!1,this.emit("change"))}},{key:"register",value:function(e,t,n){var r=t.field,o=t.state;De("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] &&
8
+ i&&(t.keepState||t.inMultistep)?(De("Already Registered",r),this.fieldsById.delete(i))://!this.expectedRemovals[magicValue] &&
9
+ !i||t.keepState&&t.inMultistep||console.warn("Check to make sure you have not registered two fields with the fieldName",r),De("Fields Registered",this.fieldsById.size),this.onScreen[e]=t,this.fieldsById.set(e,t),De("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"))}},{key:"deregister",value:function(e){var t=this.fieldsById.get(e),n=t.field;De("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||(De("Saving field ".concat(n,"'s value"),t.fieldApi.getFieldState()),t.shadow?I.set(this.savedValues,"shadow-".concat(n),t.fieldApi.getFieldState()):I.set(this.savedValues,n,t.fieldApi.getFieldState())),(r||!t.keepState&&!t.inMultistep||!t.fieldApi.getIsRelevant()&&!t.keepState)&&(De("Removing field",n),this.fieldsById.delete(e),r||(I.delete(this.state.values,n),I.delete(this.state.touched,n),I.delete(this.state.errors,n),t.shadow?I.delete(this.savedValues,"shadow-".concat(n)):I.delete(this.savedValues,n)),r&&this.pulledOut[o]&&(De("Pulling out",n,"with magic value",o),I.pullOut(this.state.values,o),I.pullOut(this.state.touched,o),I.pullOut(this.state.errors,o),I.pullOut(this.savedValues,o),delete this.pulledOut[o])),this.emit("change")}},{key:"expectRemoval",value:function(e){De("Expecting removal of",e),this.expectedRemovals[e]=!0,this.pulledOut[e]=!0}},{key:"update",value:function(e,t,n){De("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&&(I.set(this.state.values,n),I.set(this.state.errors,n),I.set(this.state.touched,n)),I.set(this.state.values,t.field,r),I.set(this.state.errors,t.field,o),I.set(this.state.touched,t.field,i),this.emit("change")}}]),n}(i.EventEmitter),Ue=A("informed:FormProvider\t\t"),ze=function(e){var t=e.children,n=e.formApi,r=e.formController,i=e.formState,a=g(e,["children","formApi","formController","formState"]);if(Ue("Render FormProvider"),n)return Ue("Render FormProvider with given values"),o.a.createElement(_.Provider,{value:r.updater},o.a.createElement(R.Provider,{value:n},o.a.createElement(N.Provider,{value:i},t)));Ue("Render FormProvider with generated values");var s=He(a);return o.a.createElement(_.Provider,{value:s.formController.updater},o.a.createElement(R.Provider,{value:s.formApi},o.a.createElement(N.Provider,{value:s.formState},t)))},We=A("informed:useForm\t\t"),He=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,h=e.onValueChange,v=e.onSubmitFailure,m=e.validationSchema,y=e.schema,b=e.ajv,w=e.fieldMap,k=e.onlyValidateSchema,C=g(e,["dontPreventDefault","initialValues","validate","validateFields","allowEmptyStrings","preventEnter","getApi","apiRef","onChange","onReset","onSubmit","onValueChange","onSubmitFailure","validationSchema","schema","ajv","fieldMap","onlyValidateSchema"]);We("Render useForm");var A=Object(r.useMemo)((function(){return{dontPreventDefault:t,initialValues:n,validate:i,validateFields:a,allowEmptyStrings:s,preventEnter:l,validationSchema:m,schema:y,ajv:b,fieldMap:w}}),[t,n,i,a,s,l,m,y,b,w]),O=x(Object(r.useState)((function(){return new Be(A)})),1)[0];Object(r.useEffect)((function(){O.setOptions(A)}),[A]);var S=x(Object(r.useState)((function(){return O.getFormState()})),2),E=S[0],j=S[1];ne((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 h&&h(O.getFormState().values)},o=function(){return v&&v(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,h,v]),Object(r.useState)((function(){O.on("change",(function(){We("Setting form state"),j(O.getFormState())})),c&&c(O.getFormApi()),u&&(u.current=O.getFormApi())}));var T=x(Object(r.useState)((function(){return O.getFormApi()})),1)[0];return{formApi:T,formState:E,formController:O,render:function(e){return o.a.createElement(ze,{formApi:T,formState:E,formController:O},o.a.createElement(o.a.Fragment,null,e||o.a.createElement(_e,{schema:y,onlyValidateSchema:k})))},userProps:C}},qe=A("informed:Form\t\t"),Ge=function(e){var t=e.children,n=e.render,r=e.component,i=g(e,["children","render","component"]);qe("Render FORM");var a,s=He(i),l=s.formApi,c=s.formController,f=s.formState,p=s.render,d=s.userProps;return p(o.a.createElement("form",u({},d,{onReset:c.reset,onSubmit:c.submitForm,onKeyDown:c.keyDown}),(a={formState:f,formApi:l},r?o.a.createElement(r,a,t):n?n(a):"function"==typeof t?t(a):t)))};var $e=function(e){var t=e.value,n=e.forwardedRef,r=e.children,i=g(e,["value","forwardedRef","children"]);return o.a.createElement("option",u({ref:n,value:t,key:t},i),r)}}).call(this,n(14))},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(519);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(517),a=n(608),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(609),o=n(582),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(521),o=n(759);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(674),o=n(586),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(543),o=n(533);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(791),o=n(535),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(532),o=n(792),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(171)(e))},function(e,t,n){var r=n(543),o=n(535);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},function(e,t,n){e.exports=n(801)},function(e,t,n){"use strict";var r=n(827).charAt,o=n(540),i=n(669),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(858)},function(e,t,n){var r=n(523),o=n(641),i=n(905),a=n(686);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(a(e))}},function(e,t,n){var r=n(542)(Object,"create");e.exports=r},function(e,t,n){var r=n(915),o=n(916),i=n(917),a=n(918),s=n(919);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(586);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(921);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(965),o=n(966),i=n(629),a=n(967);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(640);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(515),o=n(557),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(517),o=n(519),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(528),o=n(539),i=n(605),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(579),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(580),o=n(515);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(531);e.exports=r("navigator","userAgent")||""},function(e,t,n){var r=n(549),o=n(610);(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(517),o=n(745),i=r["__core-js_shared__"]||o("__core-js_shared__",{});e.exports=i},function(e,t,n){var r=n(658),o=n(606).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(518);t.f=r},function(e,t,n){var r={};r[n(518)("toStringTag")]="z",e.exports="[object z]"===String(r)},function(e,t,n){var r=n(519),o=n(561),i=n(518)("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(774)},function(e,t,n){var r=n(584),o=n(568),i=n(783),a=n(554),s=n(569),l=n(555),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(793),o=n(622),i=n(623),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(676),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(171)(e))},function(e,t,n){var r=n(591),o=n(626),i=n(628),a=n(629);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(826)},function(e,t,n){var r=n(564),o=n(552),i=n(518)("iterator");e.exports=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t,n){e.exports=n(828)},function(e,t,n){var r=n(831),o=n(690),i=n(695);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(845);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(563);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(557),o=n(517);e.exports="process"==r(o.process)},function(e,t,n){e.exports=n(859)},function(e,t,n){e.exports=n(874)},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(894)(),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(637),m=n(897),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),k=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,A=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,k,(function(e,t,n,r){o[o.length]=n?x(r,C,"$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=A(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 k=s(c,v);c=(d=!!k)&&"get"in k&&!("originalValue"in k.get)?k.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(896);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){var r=n(903),o=n(928)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},function(e,t,n){var r=n(595),o=n(572);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(523),o=n(590),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(908),o=n(920),i=n(922),a=n(923),s=n(924);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(542)(n(532),"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(617);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(708),o=n(941);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(597),o=n(983),i=n(984),a=n(985),s=n(986),l=n(987);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(998),o=n(717),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(680),o=n(1017),i=n(554);e.exports=function(e){return i(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(682)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(714);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(560),o=n(519),i=n(522),a=n(530).f,s=n(582),l=n(1040),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(741)},function(e,t,n){n(742);var r=n(514);e.exports=r.Object.keys},function(e,t,n){var r=n(520),o=n(515),i=n(603);e.exports=!r&&!o((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(515),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(522),o=n(528),i=n(604).indexOf,a=n(560);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(743)},function(e,t,n){"use strict";var r=n(513),o=n(517),i=n(531),a=n(549),s=n(520),l=n(607),c=n(661),u=n(515),f=n(522),p=n(561),d=n(519),h=n(521),v=n(529),g=n(528),m=n(578),y=n(548),b=n(562),x=n(559),w=n(611),k=n(746),C=n(612),A=n(547),O=n(530),S=n(576),E=n(525),j=n(563),T=n(609),M=n(581),P=n(560),L=n(582),I=n(518),F=n(613),_=n(516),N=n(550),R=n(540),D=n(541).forEach,V=M("hidden"),B=I("toPrimitive"),U=R.set,z=R.getterFor("Symbol"),W=Object.prototype,H=o.Symbol,q=i("JSON","stringify"),G=A.f,$=O.f,K=k.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(W,t);r&&delete W[t],$(e,t,n),r&&e!==W&&$(W,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===W&&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 D(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===W&&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!==W||!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 D(t,(function(e){f(Y,e)||f(P,e)||n.push(e)})),n},fe=function(e){var t=e===W,n=K(t?X:g(e)),r=[];return D(n,(function(e){!f(Y,e)||t&&!f(W,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=L(e),n=function(e){this===W&&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(W,t,{configurable:!0,set:n}),oe(t,e)}).prototype,"toString",(function(){return z(this).tag})),j(H,"withoutSetter",(function(e){return oe(L(e),e)})),S.f=le,O.f=ae,A.f=ce,w.f=k.f=ue,C.f=fe,F.f=function(e){return oe(I(e),e)},s&&($(H.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),a||j(W,"propertyIsEnumerable",le,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:H}),D(x(ee),(function(e){_(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(){C.f(1)}))},{getOwnPropertySymbols:function(e){return C.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),N(H,"Symbol"),P[V]=!0},function(e,t,n){var r=n(607);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){var r=n(520),o=n(530),i=n(521),a=n(559);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(531);e.exports=r("document","documentElement")},function(e,t,n){var r=n(517),o=n(665),i=r.WeakMap;e.exports="function"==typeof i&&/native code/.test(o(i))},function(e,t,n){var r=n(610),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(750),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(752)},function(e,t,n){"use strict";var r=n(528),o=n(616),i=n(552),a=n(540),s=n(669),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(513),o=n(758),i=n(566),a=n(583),s=n(550),l=n(525),c=n(563),u=n(518),f=n(549),p=n(552),d=n(670),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,k,C=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)}},A=t+" Iterator",O=!1,S=e.prototype,E=S[g]||S["@@iterator"]||d&&S[d],j=!v&&E||C(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,A,!0,!0),f&&(p[A]=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:C("values"),keys:y?j:C("keys"),entries:C("entries")},b)for(k in w)(v||O||!(k in S))&&c(S,k,w[k]);else r({target:t,proto:!0,forced:v||O},w);return w}},function(e,t,n){"use strict";var r,o,i,a=n(515),s=n(566),l=n(525),c=n(522),u=n(518),f=n(549),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(515);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(515);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(617);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(675);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(542),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(15))},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(785),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(786),o=n(788)(r);e.exports=o},function(e,t,n){var r=n(790),o=n(588),i=n(523),a=n(589),s=n(587),l=n(621),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(569),o=n(794),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(795),o=n(684),i=n(685),a=n(686);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(553),o=n(796),i=n(523),a=n(590),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(797);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(684);e.exports=function(e){return null==e?"":r(e)}},function(e,t,n){"use strict";var r=n(513),o=n(515),i=n(561),a=n(519),s=n(529),l=n(539),c=n(567),u=n(615),f=n(565),p=n(518),d=n(580),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(516)("iterator")},function(e,t,n){var r=n(833),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(835)},function(e,t,n){n(592),n(836);var r=n(514);e.exports=r.Array.from},function(e,t,n){var r=n(521);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(518),o=n(552),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(518)("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(697),n(625),n(847),n(703),n(704),n(853),n(592),n(551);var r=n(514);e.exports=r.Promise},function(e,t,n){"use strict";var r=n(513),o=n(566),i=n(583),a=n(562),s=n(525),l=n(548),c=n(556),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(517);e.exports=r.Promise},function(e,t,n){var r=n(521),o=n(538),i=n(518)("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(517),s=n(515),l=n(558),c=n(663),u=n(603),f=n(701),p=n(633),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()}},k=function(e){return function(){w(e)}},C=function(e){w(e.data)},A=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(k(e))}:y&&y.now?r=function(e){y.now(k(e))}:m&&!f?(i=(o=new m).port2,o.port1.onmessage=C,r=l(i.postMessage,i,1)):a.addEventListener&&"function"==typeof postMessage&&!a.importScripts&&d&&"file:"!==d.protocol&&!s(A)?(r=A,a.addEventListener("message",C,!1)):r="onreadystatechange"in u("script")?function(e){c.appendChild(u("script")).onreadystatechange=function(){c.removeChild(this),w(e)}}:function(e){setTimeout(k(e),0)}),e.exports={set:h,clear:v}},function(e,t,n){var r=n(608);e.exports=/(?:iphone|ipod|ipad).*applewebkit/i.test(r)},function(e,t,n){var r=n(521),o=n(519),i=n(571);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(513),o=n(538),i=n(571),a=n(593),s=n(556);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(513),o=n(538),i=n(531),a=n(571),s=n(593),l=n(556);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(885)},function(e,t,n){"use strict";var r=n(638),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){var r=n(926),o=n(927);e.exports=function(e,t){return null!=e&&o(e,t,r)}},function(e,t,n){e.exports=n(938)},function(e,t,n){e.exports=n(952)},function(e,t,n){e.exports=n(973)},function(e,t,n){var r=n(981),o=n(1004),i=n(619),a=n(523),s=n(1005);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(988),o=n(535);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(989),o=n(992),i=n(993);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(532).Uint8Array;e.exports=r},function(e,t,n){var r=n(716),o=n(649),i=n(555);e.exports=function(e){return r(e,i,o)}},function(e,t,n){var r=n(644),o=n(523);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(533);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(644),o=n(651),i=n(649),a=n(717),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 k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.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 C(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)}))}C.polyfill=!0,e.fetch||(e.fetch=C,e.Headers=p,e.Request=b,e.Response=w),t.Headers=p,t.Request=b,t.Response=w,t.fetch=C,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(1048)},function(e,t,n){var r=n(543),o=n(651),i=n(535),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(45).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(537));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(15))},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]||"",k(n[4]||""),k(n[5]||""),k(n[7]||""),k(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 k(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(14))},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 k(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 C(e,t,n,r,o){var i=e.cc;for(A.state=e,A.stream=o,A.marked=null,A.cc=i,A.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 A.marked?A.marked:"variable"==n&&k(e,r)?"variable-2":t}}var A={state:null,column:null,marked:null,cc:null};function O(){for(var e=arguments.length-1;e>=0;e--)A.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=A.state;if(A.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 L=new P("this",new P("arguments",null));function I(){A.state.context=new M(A.state.context,A.state.localVars,!1),A.state.localVars=L}function F(){A.state.context=new M(A.state.context,A.state.localVars,!0),A.state.localVars=null}function _(){A.state.localVars=A.state.context.vars,A.state.context=A.state.context.prev}function N(e,t){var n=function(){var n=A.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,A.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function R(){var e=A.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function D(e){return function t(n){return n==e?S():";"==e||"}"==n||")"==n||"]"==n?O():S(t)}}function V(e,t){return"var"==e?S(N("vardef",t),Ce,D(";"),R):"keyword a"==e?S(N("form"),W,V,R):"keyword b"==e?S(N("form"),V,R):"keyword d"==e?A.stream.match(/^\s*$/,!1)?S():S(N("stat"),q,D(";"),R):"debugger"==e?S(D(";")):"{"==e?S(N("}"),F,se,R,_):";"==e?S():"if"==e?("else"==A.state.lexical.info&&A.state.cc[A.state.cc.length-1]==R&&A.state.cc.pop()(),S(N("form"),W,V,R,Te)):"function"==e?S(Ie):"for"==e?S(N("form"),F,Me,V,_,R):"class"==e||u&&"interface"==t?(A.marked="keyword",S(N("form","class"==e?e:t),De,R)):"variable"==e?u&&"declare"==t?(A.marked="keyword",S(V)):u&&("module"==t||"enum"==t||"type"==t)&&A.stream.match(/^\s*\w/,!1)?(A.marked="keyword","enum"==t?S(Ye):"type"==t?S(_e,D("operator"),pe,D(";")):S(N("form"),Ae,D("{"),N("}"),se,R,R)):u&&"namespace"==t?(A.marked="keyword",S(N("form"),U,V,R)):u&&"abstract"==t?(A.marked="keyword",S(V)):S(N("stat"),ee):"switch"==e?S(N("form"),W,D("{"),N("}","switch"),F,se,R,R,_):"case"==e?S(U,D(":")):"default"==e?S(D(":")):"catch"==e?S(N("form"),I,B,V,R,_):"export"==e?S(N("stat"),ze,R):"import"==e?S(N("stat"),He,R):"async"==e?S(V):"@"==t?S(U,V):O(N("stat"),U,D(";"),R)}function B(e){if("("==e)return S(Ne,D(")"))}function U(e,t){return H(e,t,!1)}function z(e,t){return H(e,t,!0)}function W(e){return"("!=e?O():S(N(")"),q,D(")"),R)}function H(e,t,n){if(A.state.fatArrowAt==A.stream.start){var r=n?X:Y;if("("==e)return S(I,N(")"),ie(Ne,")"),R,D("=>"),r,_);if("variable"==e)return O(I,Ae,D("=>"),r,_)}var o=n?$:G;return x.hasOwnProperty(e)?S(o):"function"==e?S(Ie,o):"class"==e||u&&"interface"==t?(A.marked="keyword",S(N("form"),Re,R)):"keyword c"==e||"async"==e?S(n?z:U):"("==e?S(N(")"),q,D(")"),R,o):"operator"==e||"spread"==e?S(n?z:U):"["==e?S(N("]"),Je,R,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?z: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:z;return"=>"==e?S(I,n?X:Y,_):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?S(r):u&&"<"==t&&A.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?S(N(">"),ie(pe,">"),R,r):"?"==t?S(U,D(":"),o):S(o):"quasi"==e?O(K,r):";"!=e?"("==e?ae(z,")","call",r):"."==e?S(te,r):"["==e?S(N("]"),q,D("]"),R,r):u&&"as"==t?(A.marked="keyword",S(pe,r)):"regexp"==e?(A.state.lastType=A.marked="operator",A.stream.backUp(A.stream.pos-A.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 A.marked="string-2",A.state.tokenize=y,S(K)}function Y(e){return b(A.stream,A.state),O("{"==e?V:U)}function X(e){return b(A.stream,A.state),O("{"==e?V:z)}function Q(e,t){if("target"==t)return A.marked="keyword",S(G)}function Z(e,t){if("target"==t)return A.marked="keyword",S($)}function ee(e){return":"==e?S(R,V):O(G,D(";"),R)}function te(e){if("variable"==e)return A.marked="property",S()}function ne(e,t){return"async"==e?(A.marked="property",S(ne)):"variable"==e||"keyword"==A.style?(A.marked="property","get"==t||"set"==t?S(re):(u&&A.state.fatArrowAt==A.stream.start&&(n=A.stream.match(/^\s*:\s*/,!1))&&(A.state.fatArrowAt=A.stream.pos+n[0].length),S(oe))):"number"==e||"string"==e?(A.marked=s?"property":A.style+" property",S(oe)):"jsonld-keyword"==e?S(oe):u&&T(t)?(A.marked="keyword",S(ne)):"["==e?S(U,le,D("]"),oe):"spread"==e?S(z,oe):"*"==t?(A.marked="keyword",S(ne)):":"==e?O(oe):void 0;var n}function re(e){return"variable"!=e?O(oe):(A.marked="property",S(Ie))}function oe(e){return":"==e?S(z):"("==e?O(Ie):void 0}function ie(e,t,n){function r(o,i){if(n?n.indexOf(o)>-1:","==o){var a=A.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(D(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++)A.cc.push(arguments[r]);return S(N(t,n),ie(e,t),R)}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 A.stream.match(/^\s*\w+\s+is\b/,!1)?S(U,fe,pe):S(pe)}function fe(e,t){if("is"==t)return A.marked="keyword",S()}function pe(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(A.marked="keyword",S("typeof"==t?z:pe)):"variable"==e||"void"==t?(A.marked="type",S(be)):"|"==t||"&"==t?S(pe):"string"==e||"number"==e||"atom"==e?S(be):"["==e?S(N("]"),ie(pe,"]",","),R,be):"{"==e?S(N("}"),he,R,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"==A.style?(A.marked="property",S(ve)):"?"==t||"number"==e||"string"==e?S(ve):":"==e?S(pe):"["==e?S(D("variable"),ce,D("]"),ve):"("==e?O(Fe,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 A.marked="string-2",A.state.tokenize=y,S(ge)}function ye(e,t){return"variable"==e&&A.stream.match(/^\s*[?:]/,!1)||"?"==t?S(ye):":"==e?S(pe):"spread"==e?S(ye):O(pe)}function be(e,t){return"<"==t?S(N(">"),ie(pe,">"),R,be):"|"==t||"."==e||"&"==t?S(pe):"["==e?S(pe,D("]"),be):"extends"==t||"implements"==t?(A.marked="keyword",S(pe)):"?"==t?S(pe,D(":"),pe):void 0}function xe(e,t){if("<"==t)return S(N(">"),ie(pe,">"),R,be)}function we(){return O(pe,ke)}function ke(e,t){if("="==t)return S(pe)}function Ce(e,t){return"enum"==t?(A.marked="keyword",S(Ye)):O(Ae,le,Ee,je)}function Ae(e,t){return u&&T(t)?(A.marked="keyword",S(Ae)):"variable"==e?(j(t),S()):"spread"==e?S(Ae):"["==e?ae(Se,"]"):"{"==e?ae(Oe,"}"):void 0}function Oe(e,t){return"variable"!=e||A.stream.match(/^\s*:/,!1)?("variable"==e&&(A.marked="property"),"spread"==e?S(Ae):"}"==e?O():"["==e?S(U,D("]"),D(":"),Oe):S(D(":"),Ae,Ee)):(j(t),S(Ee))}function Se(){return O(Ae,Ee)}function Ee(e,t){if("="==t)return S(z)}function je(e){if(","==e)return S(Ce)}function Te(e,t){if("keyword b"==e&&"else"==t)return S(N("form","else"),V,R)}function Me(e,t){return"await"==t?S(Me):"("==e?S(N(")"),Pe,R):void 0}function Pe(e){return"var"==e?S(Ce,Le):"variable"==e?S(Le):O(Le)}function Le(e,t){return")"==e?S():";"==e?S(Le):"in"==t||"of"==t?(A.marked="keyword",S(U,Le)):O(U,Le)}function Ie(e,t){return"*"==t?(A.marked="keyword",S(Ie)):"variable"==e?(j(t),S(Ie)):"("==e?S(I,N(")"),ie(Ne,")"),R,ue,V,_):u&&"<"==t?S(N(">"),ie(we,">"),R,Ie):void 0}function Fe(e,t){return"*"==t?(A.marked="keyword",S(Fe)):"variable"==e?(j(t),S(Fe)):"("==e?S(I,N(")"),ie(Ne,")"),R,ue,_):u&&"<"==t?S(N(">"),ie(we,">"),R,Fe):void 0}function _e(e,t){return"keyword"==e||"variable"==e?(A.marked="type",S(_e)):"<"==t?S(N(">"),ie(we,">"),R):void 0}function Ne(e,t){return"@"==t&&S(U,Ne),"spread"==e?S(Ne):u&&T(t)?(A.marked="keyword",S(Ne)):u&&"this"==e?S(le,Ee):O(Ae,le,Ee)}function Re(e,t){return"variable"==e?De(e,t):Ve(e,t)}function De(e,t){if("variable"==e)return j(t),S(Ve)}function Ve(e,t){return"<"==t?S(N(">"),ie(we,">"),R,Ve):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(A.marked="keyword"),S(u?pe:U,Ve)):"{"==e?S(N("}"),Be,R):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&T(t))&&A.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(A.marked="keyword",S(Be)):"variable"==e||"keyword"==A.style?(A.marked="property",S(Ue,Be)):"number"==e||"string"==e?S(Ue,Be):"["==e?S(U,le,D("]"),Ue,Be):"*"==t?(A.marked="keyword",S(Be)):u&&"("==e?O(Fe,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(z);var n=A.state.lexical.prev;return O(n&&"interface"==n.info?Fe:Ie)}function ze(e,t){return"*"==t?(A.marked="keyword",S(Ke,D(";"))):"default"==t?(A.marked="keyword",S(U,D(";"))):"{"==e?S(ie(We,"}"),Ke,D(";")):O(V)}function We(e,t){return"as"==t?(A.marked="keyword",S(D("variable"))):"variable"==e?O(z,We):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&&(A.marked="keyword"),S($e))}function Ge(e){if(","==e)return S(qe,Ge)}function $e(e,t){if("as"==t)return A.marked="keyword",S(qe)}function Ke(e,t){if("from"==t)return A.marked="keyword",S(U)}function Je(e){return"]"==e?S():O(ie(z,"]"))}function Ye(){return O(N("form"),Ae,D("{"),N("}"),ie(Xe,"}"),R,R)}function Xe(){return O(Ae,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 _.lex=!0,R.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",C(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==R)l=l.prev;else if(u!=Te&&u!=_)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){C(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(537))},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(537))},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(537))},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,k=0;if(g!==s.body){var C=-1!==["absolute","relative","fixed"].indexOf(l.getComputedStyle(g).position)?g:g.offsetParent,A=C.getBoundingClientRect(),O=s.body.getBoundingClientRect();w=A.left-O.left-C.scrollLeft,k=A.top-O.top-C.scrollTop}c.style.left=y-w+"px",c.style.top=b-k+"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-k)+"px",x=!1;else if(P>E){c.style.height=E-5+"px",c.style.top=(b=m.bottom-T.top-k)+"px";var L=a.getCursor();n.from.ch!=L.ch&&(m=a.cursorCoords(L),c.style.left=(y=m.left-w)+"px",T=c.getBoundingClientRect())}}var I,F=T.right-S;if(M&&(F+=a.display.nativeBarWidth),F>0&&(T.right-T.left>S&&(c.style.width=S-5+"px",F-=T.right-T.left-S),c.style.left=(y=m.left-F-w)+"px"),M)for(var _=c.firstChild;_;_=_.nextSibling)_.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(){I=setTimeout((function(){t.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(I)})),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 N=this.getSelectedHintRange();return 0===N.from&&0===N.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(537))},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 k=0==x.ch?" ":t.getRange(n(x.line,x.ch-1),x);if(e.isWordChar(w)||k==o||e.isWordChar(k))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 C=c%2?a.charAt(c-1):o,A=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]=C+r[o]+A;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(C+A,null),t.triggerElectric(C+A),l(t,-1)):"addFour"==f&&(t.replaceSelection(C+C+C+C,"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(537))},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(537))},function(e,t,n){var r=n(258),o=n(734);"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(259)(!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(258),o=n(736);"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(259)(!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(258),o=n(738);"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(259)(!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(258),o=n(740);"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(259)(!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(655);e.exports=r},function(e,t,n){var r=n(513),o=n(529),i=n(559);r({target:"Object",stat:!0,forced:n(515)((function(){i(1)}))},{keys:function(e){return i(o(e))}})},function(e,t,n){var r=n(744);e.exports=r},function(e,t,n){n(660);var r=n(514);e.exports=r.Object.getOwnPropertySymbols},function(e,t,n){var r=n(517),o=n(525);e.exports=function(e,t){try{o(r,e,t)}catch(n){r[e]=t}return t}},function(e,t,n){var r=n(528),o=n(611).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(614),o=n(564);e.exports=r?{}.toString:function(){return"[object "+o(this)+"]"}},function(e,t,n){e.exports=n(749)},function(e,t,n){var r=n(666);e.exports=r},function(e,t,n){n(751);var r=n(526);e.exports=r("Array").filter},function(e,t,n){"use strict";var r=n(513),o=n(541).filter;r({target:"Array",proto:!0,forced:!n(565)("filter")},{filter:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(753);e.exports=r},function(e,t,n){n(754);var r=n(514).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(513),o=n(515),i=n(528),a=n(547).f,s=n(520),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(756)},function(e,t,n){var r=n(757);e.exports=r},function(e,t,n){n(551);var r=n(761),o=n(564),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(670).IteratorPrototype,o=n(562),i=n(548),a=n(550),s=n(552),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(519);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(762);e.exports=r},function(e,t,n){n(763);var r=n(526);e.exports=r("Array").forEach},function(e,t,n){"use strict";var r=n(513),o=n(764);r({target:"Array",proto:!0,forced:[].forEach!=o},{forEach:o})},function(e,t,n){"use strict";var r=n(541).forEach,o=n(672)("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(766)},function(e,t,n){var r=n(767);e.exports=r},function(e,t,n){n(768);var r=n(514);e.exports=r.Object.getOwnPropertyDescriptors},function(e,t,n){var r=n(513),o=n(520),i=n(769),a=n(528),s=n(547),l=n(567);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(531),o=n(611),i=n(612),a=n(521);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(771)},function(e,t,n){var r=n(772);e.exports=r},function(e,t,n){n(773);var r=n(514).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(513),o=n(520);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperties:n(662)})},function(e,t,n){var r=n(775);e.exports=r},function(e,t,n){n(776);var r=n(514).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(513),o=n(520);r({target:"Object",stat:!0,forced:!o,sham:!o},{defineProperty:n(530).f})},function(e,t,n){var r=n(585),o=n(780),i=n(533),a=n(677),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(553),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(781),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(532)["__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(784),o=n(789);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(619),o=n(678),i=n(679);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(787),o=n(675),i=n(619),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(586),o=n(554),i=n(587),a=n(533);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(543),o=n(535);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(543),o=n(620),i=n(535),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(682)(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(798);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(799),o=n(533),i=n(590),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(800),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(802);n(819),n(820),n(821),n(822),n(823),n(824),n(825),e.exports=r},function(e,t,n){n(687),n(625),n(660),n(803),n(804),n(805),n(806),n(688),n(807),n(808),n(809),n(810),n(811),n(812),n(813),n(814),n(815),n(816),n(817),n(818);var r=n(514);e.exports=r.Symbol},function(e,t,n){n(516)("asyncIterator")},function(e,t){},function(e,t,n){n(516)("hasInstance")},function(e,t,n){n(516)("isConcatSpreadable")},function(e,t,n){n(516)("match")},function(e,t,n){n(516)("matchAll")},function(e,t,n){n(516)("replace")},function(e,t,n){n(516)("search")},function(e,t,n){n(516)("species")},function(e,t,n){n(516)("split")},function(e,t,n){n(516)("toPrimitive")},function(e,t,n){n(516)("toStringTag")},function(e,t,n){n(516)("unscopables")},function(e,t,n){var r=n(517);n(550)(r.JSON,"JSON",!0)},function(e,t){},function(e,t){},function(e,t,n){n(516)("asyncDispose")},function(e,t,n){n(516)("dispose")},function(e,t,n){n(516)("matcher")},function(e,t,n){n(516)("metadata")},function(e,t,n){n(516)("observable")},function(e,t,n){n(516)("patternMatch")},function(e,t,n){n(516)("replaceAll")},function(e,t,n){n(551),n(592);var r=n(627);e.exports=r},function(e,t,n){var r=n(579),o=n(577),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(829);e.exports=r},function(e,t,n){n(830);var r=n(514);e.exports=r.Array.isArray},function(e,t,n){n(513)({target:"Array",stat:!0},{isArray:n(561)})},function(e,t,n){e.exports=n(832)},function(e,t,n){var r=n(689);e.exports=r},function(e,t,n){n(834);var r=n(526);e.exports=r("Array").slice},function(e,t,n){"use strict";var r=n(513),o=n(519),i=n(561),a=n(605),s=n(539),l=n(528),c=n(567),u=n(518),f=n(565)("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(691);e.exports=r},function(e,t,n){var r=n(513),o=n(837);r({target:"Array",stat:!0,forced:!n(694)((function(e){Array.from(e)}))},{from:o})},function(e,t,n){"use strict";var r=n(558),o=n(529),i=n(838),a=n(693),s=n(539),l=n(567),c=n(627);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(521),o=n(692);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(840)},function(e,t,n){var r=n(841);e.exports=r},function(e,t,n){n(688),n(592),n(551);var r=n(613);e.exports=r.f("iterator")},function(e,t,n){var r=n(628);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(591),o=n(626);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(846)},function(e,t,n){var r=n(696);n(854),n(855),n(856),n(857),e.exports=r},function(e,t,n){"use strict";var r,o,i,a,s=n(513),l=n(549),c=n(517),u=n(531),f=n(698),p=n(563),d=n(631),h=n(583),v=n(550),g=n(848),m=n(519),y=n(538),b=n(632),x=n(665),w=n(556),k=n(694),C=n(699),A=n(700).set,O=n(849),S=n(702),E=n(851),j=n(571),T=n(593),M=n(540),P=n(657),L=n(518),I=n(852),F=n(633),_=n(580),N=L("species"),R="Promise",D=M.get,V=M.set,B=M.getterFor(R),U=f&&f.prototype,z=f,W=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(R,(function(){var e=x(z)!==String(z);if(!e&&66===_)return!0;if(l&&!W.finally)return!0;if(_>=51&&/native code/.test(z))return!1;var t=new z((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(t.constructor={})[N]=n,!(X=t.then((function(){}))instanceof n)||!e&&I&&!Y})),Z=Q||!k((function(e){z.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){A.call(c,(function(){var t,n=e.facade,r=e.value;if(oe(e)&&(t=T((function(){F?G.emit("unhandledRejection",r,n):ne("unhandledrejection",n,r)})),e.rejection=F||oe(e)?2:1,t.error))throw t.value}))},oe=function(e){return 1!==e.rejection&&!e.parent},ie=function(e){A.call(c,(function(){var t=e.facade;F?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&&(W=(z=function(e){b(this,z,R),y(e),r.call(this);var t=D(this);try{e(ae(le,t),ae(se,t))}catch(e){se(t,e)}}).prototype,(r=function(e){V(this,{type:R,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(W,{then:function(e,t){var n=B(this),r=$(C(this,z));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=F?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=D(e);this.promise=e,this.resolve=ae(le,t),this.reject=ae(se,t)},j.f=$=function(e){return e===z||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 z((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),p(U,"catch",W.catch,{unsafe:!0}));try{delete U.constructor}catch(e){}h&&h(U,W)}s({global:!0,wrap:!0,forced:Q},{Promise:z}),v(z,R,!1,!0),g(R),i=u(R),s({target:R,stat:!0,forced:Q},{reject:function(e){var t=$(this);return t.reject.call(void 0,e),t.promise}}),s({target:R,stat:!0,forced:l||Q},{resolve:function(e){return S(l&&this===i?z:this,e)}}),s({target:R,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(531),o=n(530),i=n(518),a=n(520),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(517),p=n(547).f,d=n(700).set,h=n(701),v=n(850),g=n(633),m=f.MutationObserver||f.WebKitMutationObserver,y=f.document,b=f.process,x=f.Promise,w=p(f,"queueMicrotask"),k=w&&w.value;k||(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=k||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(608);e.exports=/web0s(?!.*chrome)/i.test(r)},function(e,t,n){var r=n(517);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(513),o=n(549),i=n(698),a=n(515),s=n(531),l=n(699),c=n(702),u=n(563);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(697)},function(e,t,n){n(703)},function(e,t,n){"use strict";var r=n(513),o=n(571),i=n(593);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(704)},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 C(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(A([])));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 k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function A(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=A,C.prototype={constructor:C,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(k),!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),k(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;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:A(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(860);e.exports=r},function(e,t,n){var r=n(861),o=n(863),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(862);var r=n(526);e.exports=r("Array").includes},function(e,t,n){"use strict";var r=n(513),o=n(604).includes,i=n(616);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(864);var r=n(526);e.exports=r("String").includes},function(e,t,n){"use strict";var r=n(513),o=n(865),i=n(577);r({target:"String",proto:!0,forced:!n(867)("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(866);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(519),o=n(557),i=n(518)("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(518)("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(869)},function(e,t,n){n(551);var r=n(870),o=n(564),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(871);e.exports=r},function(e,t,n){n(668);var r=n(526);e.exports=r("Array").entries},function(e,t,n){e.exports=n(873)},function(e,t,n){var r=n(691);e.exports=r},function(e,t,n){var r=n(875);e.exports=r},function(e,t,n){n(876);var r=n(514);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(513),o=n(531),i=n(515),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(878);e.exports=r},function(e,t,n){var r=n(879),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(880);var r=n(526);e.exports=r("Array").map},function(e,t,n){"use strict";var r=n(513),o=n(541).map;r({target:"Array",proto:!0,forced:!n(565)("map")},{map:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var r=n(655);e.exports=r},function(e,t,n){var r=n(883);e.exports=r},function(e,t,n){var r=n(884),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(687);var r=n(526);e.exports=r("Array").concat},function(e,t,n){var r=n(886);e.exports=r},function(e,t,n){n(887);var r=n(514);e.exports=r.Object.entries},function(e,t,n){var r=n(513),o=n(888).entries;r({target:"Object",stat:!0},{entries:function(e){return o(e)}})},function(e,t,n){var r=n(520),o=n(559),i=n(528),a=n(576).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(666);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 k=[301,302,303,307,308];w.redirect=function(e,t){if(-1===k.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 C(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)}))}C.polyfill=!0,e.fetch||(e.fetch=C,e.Headers=p,e.Request=b,e.Response=w),t.Headers=p,t.Request=b,t.Response=w,t.fetch=C,Object.defineProperty(t,"__esModule",{value:!0})}({})}("undefined"!=typeof self?self:this)},function(e,t,n){"use strict";var r=n(892),o=n(902),i=n(638);e.exports={formats:i,parse:o,stringify:r}},function(e,t,n){"use strict";var r=n(893),o=n(706),i=n(638),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,k=t;if(x.has(t))throw new RangeError("Cyclic object value");if("function"==typeof f?k=f(n,k):k instanceof Date?k=v(k):"comma"===i&&l(k)&&(k=o.maybeMap(k,(function(e){return e instanceof Date?v(e):e}))),null===k){if(a)return c&&!y?c(n,d.encoder,b,"key",g):n;k=""}if("string"==typeof(w=k)||"number"==typeof w||"boolean"==typeof w||"symbol"==typeof w||"bigint"==typeof w||o.isBuffer(k))return c?[m(y?n:c(n,d.encoder,b,"key",g))+"="+m(c(k,d.encoder,b,"value",g))]:[m(n)+"="+m(String(k))];var C,A=[];if(void 0===k)return A;if("comma"===i&&l(k))C=[{value:k.length>0?k.join(",")||null:void 0}];else if(l(f))C=f;else{var O=Object.keys(k);C=p?O.sort(p):O}for(var S=0;S<C.length;++S){var E=C[S],j="object"==typeof E&&void 0!==E.value?E.value:k[E];if(!s||null!==j){var T=l(k)?"function"==typeof i?i(n,E):n:n+(h?"."+E:"["+E+"]");x.set(t,!0);var M=r();u(A,e(j,T,i,a,s,c,f,p,h,v,g,m,y,b,M))}}return A};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(636),o=n(898),i=n(900),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(895);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(637);e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},function(e,t,n){"use strict";var r=n(636),o=n(899),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(637),o=n(636),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,k=Object.prototype.propertyIsEnumerable,C=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null),A=n(901).custom,O=A&&M(A)?A: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]"!==I(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(L(s,"quoteStyle")&&"single"!==s.quoteStyle&&"double"!==s.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(L(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=!L(s,"customInspect")||s.customInspect;if("boolean"!=typeof l)throw new TypeError('option "customInspect", if provided, must be `true` or `false`');if(L(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,_),"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(F(o,t)>=0)return"[Circular]";function k(t,n,i){if(n&&(o=o.slice()).push(n),i){var a={depth:s.depth};return L(s,"quoteStyle")&&(a.quoteStyle=s.quoteStyle),e(t,a,r+1,o)}return e(t,s,r+1,o)}if("function"==typeof t){var A=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,k);return"[Function"+(A?": "+A:" (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:N(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 z="<"+String(t.nodeName).toLowerCase(),W=t.attributes||[],H=0;H<W.length;H++)z+=" "+W[H].name+"="+E(j(W[H].value),"double",s);return z+=">",t.childNodes&&t.childNodes.length&&(z+="..."),z+="</"+String(t.nodeName).toLowerCase()+">"}if(T(t)){if(0===t.length)return"[]";var q=B(t,k);return b&&!function(e){for(var t=0;t<e.length;t++)if(F(e[t],"\n")>=0)return!1;return!0}(q)?"["+V(q,b)+"]":"[ "+q.join(", ")+" ]"}if(function(e){return!("[object Error]"!==I(e)||S&&"object"==typeof e&&S in e)}(t)){var G=B(t,k);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(k(n,t,!0)+" => "+k(e,t))})),D("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(k(e,t))})),D("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 R("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 R("WeakSet");if(function(e){if(!d||!e||"object"!=typeof e)return!1;try{return d.call(e),!0}catch(e){}return!1}(t))return R("WeakRef");if(function(e){return!("[object Number]"!==I(e)||S&&"object"==typeof e&&S in e)}(t))return N(k(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 N(k(y.call(t)));if(function(e){return!("[object Boolean]"!==I(e)||S&&"object"==typeof e&&S in e)}(t))return N(h.call(t));if(function(e){return!("[object String]"!==I(e)||S&&"object"==typeof e&&S in e)}(t))return N(k(String(t)));if(!function(e){return!("[object Date]"!==I(e)||S&&"object"==typeof e&&S in e)}(t)&&!function(e){return!("[object RegExp]"!==I(e)||S&&"object"==typeof e&&S in e)}(t)){var J=B(t,k),Y=C?C(t)===Object.prototype:t instanceof Object||t.constructor===Object,X=t instanceof Object?"":"null prototype",Q=!Y&&S&&Object(t)===t&&S in t?I(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 L(e,t){return P.call(e,t)}function I(e){return v.call(e)}function F(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 _(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 N(e){return"Object("+e+")"}function R(e){return e+" { ? }"}function D(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]=L(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)L(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++)k.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(706),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){var r=n(904),o=n(707);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},function(e,t,n){var r=n(640),o=n(925),i=n(595);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(906),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(907);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(642);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(909),o=n(597),i=n(643);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(910),o=n(911),i=n(912),a=n(913),s=n(914);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(596);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(596),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(596),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(596);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(598),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(598);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(598);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(598);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(599);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(599);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(599);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(599);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(584),o=n(595),i=n(587),a=n(533),s=n(572);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(595),o=n(588),i=n(523),a=n(587),s=n(620),l=n(572);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(929),o=n(678),i=n(679);e.exports=function(e){return i(o(e,void 0,r),e+"")}},function(e,t,n){var r=n(930);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},function(e,t,n){var r=n(644),o=n(931);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(553),o=n(588),i=n(523),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(933),o=n(667),i=n(937);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(934)},function(e,t,n){var r=n(935);e.exports=r},function(e,t,n){n(936);var r=n(514);e.exports=r.Reflect.get},function(e,t,n){var r=n(513),o=n(519),i=n(521),a=n(522),s=n(547),l=n(566);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(647);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(939);e.exports=r},function(e,t,n){n(940);var r=n(514);e.exports=r.Object.setPrototypeOf},function(e,t,n){n(513)({target:"Object",stat:!0},{setPrototypeOf:n(583)})},function(e,t,n){e.exports=n(942)},function(e,t,n){var r=n(943);e.exports=r},function(e,t,n){n(944);var r=n(514);e.exports=r.Object.getPrototypeOf},function(e,t,n){var r=n(513),o=n(515),i=n(529),a=n(566),s=n(671);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(946),o=n(950);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(947)},function(e,t,n){var r=n(948);e.exports=r},function(e,t,n){n(949);var r=n(514).Object;e.exports=function(e,t){return r.create(e,t)}},function(e,t,n){n(513)({target:"Object",stat:!0,sham:!n(520)},{create:n(562)})},function(e,t,n){var r=n(708);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(709),o=n(647),i=n(956),a=n(957);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(953);e.exports=r},function(e,t,n){n(954);var r=n(514);e.exports=r.Reflect.construct},function(e,t,n){var r=n(513),o=n(531),i=n(538),a=n(521),s=n(519),l=n(562),c=n(955),u=n(515),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(538),o=n(519),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(709);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(536).default,o=n(958);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(960)},function(e,t,n){var r=n(961);e.exports=r},function(e,t,n){var r=n(962),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(963);var r=n(526);e.exports=r("Array").find},function(e,t,n){"use strict";var r=n(513),o=n(541).find,i=n(616),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(628),o=n(695);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(591),o=n(626),i=n(690);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(689);e.exports=r},function(e,t,n){var r=n(970);e.exports=r},function(e,t,n){n(971);var r=n(514);e.exports=r.Object.assign},function(e,t,n){var r=n(513),o=n(972);r({target:"Object",stat:!0,forced:Object.assign!==o},{assign:o})},function(e,t,n){"use strict";var r=n(520),o=n(515),i=n(559),a=n(612),s=n(576),l=n(529),c=n(602),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(696);e.exports=r},function(e,t,n){e.exports=n(975)},function(e,t,n){var r=n(976);e.exports=r},function(e,t,n){var r=n(977),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(978);var r=n(526);e.exports=r("Array").splice},function(e,t,n){"use strict";var r=n(513),o=n(605),i=n(579),a=n(539),s=n(529),l=n(615),c=n(567),u=n(565)("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(980)(n(1008));e.exports=r},function(e,t,n){var r=n(711),o=n(554),i=n(555);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(982),o=n(1003),i=n(719);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(648),o=n(712);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(597);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(597),o=n(643),i=n(642);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(648),o=n(713),i=n(994),a=n(997),s=n(574),l=n(523),c=n(589),u=n(621),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,k=y==b;if(k&&c(e)){if(!c(t))return!1;g=!0,x=!1}if(k&&!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 C=x&&p.call(e,"__wrapped__"),A=w&&p.call(t,"__wrapped__");if(C||A){var O=C?e.value():e,S=A?t.value():t;return v||(v=new r),h(O,S,n,d,v)}}return!!k&&(v||(v=new r),a(e,t,n,d,h,v))}},function(e,t,n){var r=n(642),o=n(990),i=n(991);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(553),o=n(714),i=n(586),a=n(713),s=n(995),l=n(996),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(715),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(542)(n(532),"DataView");e.exports=r},function(e,t,n){var r=n(542)(n(532),"Promise");e.exports=r},function(e,t,n){var r=n(542)(n(532),"Set");e.exports=r},function(e,t,n){var r=n(542)(n(532),"WeakMap");e.exports=r},function(e,t,n){var r=n(718),o=n(555);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(712),o=n(601),i=n(707),a=n(641),s=n(718),l=n(719),c=n(572);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(1006),o=n(1007),i=n(641),a=n(572);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(640);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(1009),o=n(711),i=n(685),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){
10
10
  /*!
11
11
  * @description Recursive object extending
12
12
  * @author Viacheslav Lotsmanov <lotsmanov89@gmail.com>
@@ -33,16 +33,16 @@ i&&(t.keepState||t.inMultistep)?(Re("Already Registered",r),this.fieldsById.dele
33
33
  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
34
34
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35
35
  */
36
- 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(45).Buffer)},function(e,t,n){var r=n(1013);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(648),o=n(1014),i=n(584),a=n(1015),s=n(1016),l=n(1019),c=n(1020),u=n(1021),f=n(1022),p=n(715),d=n(1023),h=n(574),v=n(1024),g=n(1025),m=n(1030),y=n(523),b=n(589),x=n(1032),w=n(533),k=n(1034),C=n(555),A=n(650),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,L=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 I=y(t);if(I){if(M=v(t),!P)return c(t,M)}else{var _=h(t),N="[object Function]"==_||"[object GeneratorFunction]"==_;if(b(t))return l(t,P);if("[object Object]"==_||"[object Arguments]"==_||N&&!j){if(M=L||N?{}:m(t),!P)return L?f(t,s(M,t)):u(t,a(M,t))}else{if(!O[_])return j?t:{};M=g(t,_,P)}}T||(T=new r);var D=T.get(t);if(D)return D;T.set(t,M),k(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=I?void 0:(F?L?d:p:L?A:C)(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(568),o=n(555);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(568),o=n(650);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(533),o=n(569),i=n(1018),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(532),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(171)(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(568),o=n(649);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(568),o=n(720);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(716),o=n(720),i=n(650);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(652),o=n(1026),i=n(1027),a=n(1028),s=n(1029);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(652);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(553),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(652);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(1031),o=n(651),i=n(569);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(533),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(1033),o=n(622),i=n(623),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(574),o=n(535);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(1035),o=n(622),i=n(623),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(574),o=n(535);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){e.exports=n(1037)},function(e,t,n){var r=n(1038);e.exports=r},function(e,t,n){n(625),n(1039),n(551);var r=n(514);e.exports=r.WeakMap},function(e,t,n){"use strict";var r,o=n(517),i=n(631),a=n(653),s=n(1041),l=n(1042),c=n(519),u=n(540).enforce,f=n(664),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(515);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(513),o=n(517),i=n(653),a=n(515),s=n(525),l=n(556),c=n(632),u=n(519),f=n(550),p=n(530).f,d=n(541).forEach,h=n(520),v=n(540),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],k=w&&w.prototype,C={};if(h&&"function"==typeof w&&(b||k.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 A=m(e);d(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in k)||b&&"clear"==e||s(v.prototype,e,(function(n,r){var o=A(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 A(this).collection.size}})}else v=n.getConstructor(t,e,y,x),i.REQUIRED=!0;return f(v,e,!1,!0),C[e]=v,r({global:!0,forced:!0},C),b||n.setStrong(v,e,y),v}},function(e,t,n){"use strict";var r=n(631),o=n(653).getWeakData,i=n(521),a=n(519),s=n(632),l=n(556),c=n(541),u=n(522),f=n(540),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(45).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,k=0,C=0;C<e.length;++C){var A=e.charCodeAt(C);if(A!==t.charCodeAt(g)){if(g=0,w||(37===A?k=1:k>0&&(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102)?3==++k&&(w=!0):k=0),m<s){if(A===n.charCodeAt(m)){if(++m===s)v<(S=C-m+1)&&(y+=e.slice(v,S)),k=0,v=C+1;continue}m=0,x||(37===A?k=1:k>0&&(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102)?3==++k&&(x=!0):k=0)}43===A&&(m<s?(C-v>0&&(y+=e.slice(v,C)),y+="%20",x=!0):(C-v>0&&(b+=e.slice(v,C)),b+="%20",w=!0),v=C+1)}else if(++g===l){var O,S=C-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,k=0,y=b="",v=C+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(543),o=n(523),i=n(535);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(681),o=n(574),i=n(588),a=n(523),s=n(554),l=n(589),c=n(569),u=n(621),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(659),o=n(722),i=n(1052);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(1049);e.exports=r},function(e,t,n){var r=n(1050),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(1051);var r=n(526);e.exports=r("Array").indexOf},function(e,t,n){"use strict";var r=n(513),o=n(604).indexOf,i=n(672),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(654),o=n(722);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";
36
+ 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(45).Buffer)},function(e,t,n){var r=n(1013);e.exports=function(e){return r(e,5)}},function(e,t,n){var r=n(648),o=n(1014),i=n(584),a=n(1015),s=n(1016),l=n(1019),c=n(1020),u=n(1021),f=n(1022),p=n(715),d=n(1023),h=n(574),v=n(1024),g=n(1025),m=n(1030),y=n(523),b=n(589),x=n(1032),w=n(533),k=n(1034),C=n(555),A=n(650),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,L=2&n,I=4&n;if(S&&(M=j?S(t,E,j,T):S(t)),void 0!==M)return M;if(!w(t))return t;var F=y(t);if(F){if(M=v(t),!P)return c(t,M)}else{var _=h(t),N="[object Function]"==_||"[object GeneratorFunction]"==_;if(b(t))return l(t,P);if("[object Object]"==_||"[object Arguments]"==_||N&&!j){if(M=L||N?{}:m(t),!P)return L?f(t,s(M,t)):u(t,a(M,t))}else{if(!O[_])return j?t:{};M=g(t,_,P)}}T||(T=new r);var R=T.get(t);if(R)return R;T.set(t,M),k(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 D=F?void 0:(I?L?d:p:L?A:C)(t);return o(D||t,(function(r,o){D&&(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(568),o=n(555);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(568),o=n(650);e.exports=function(e,t){return e&&r(t,o(t),e)}},function(e,t,n){var r=n(533),o=n(569),i=n(1018),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(532),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(171)(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(568),o=n(649);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(568),o=n(720);e.exports=function(e,t){return r(e,o(e),t)}},function(e,t,n){var r=n(716),o=n(720),i=n(650);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(652),o=n(1026),i=n(1027),a=n(1028),s=n(1029);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(652);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(553),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(652);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(1031),o=n(651),i=n(569);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},function(e,t,n){var r=n(533),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(1033),o=n(622),i=n(623),a=i&&i.isMap,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(574),o=n(535);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},function(e,t,n){var r=n(1035),o=n(622),i=n(623),a=i&&i.isSet,s=a?o(a):r;e.exports=s},function(e,t,n){var r=n(574),o=n(535);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},function(e,t,n){e.exports=n(1037)},function(e,t,n){var r=n(1038);e.exports=r},function(e,t,n){n(625),n(1039),n(551);var r=n(514);e.exports=r.WeakMap},function(e,t,n){"use strict";var r,o=n(517),i=n(631),a=n(653),s=n(1041),l=n(1042),c=n(519),u=n(540).enforce,f=n(664),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(515);e.exports=!r((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var r=n(513),o=n(517),i=n(653),a=n(515),s=n(525),l=n(556),c=n(632),u=n(519),f=n(550),p=n(530).f,d=n(541).forEach,h=n(520),v=n(540),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],k=w&&w.prototype,C={};if(h&&"function"==typeof w&&(b||k.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 A=m(e);d(["add","clear","delete","forEach","get","has","set","keys","values","entries"],(function(e){var t="add"==e||"set"==e;!(e in k)||b&&"clear"==e||s(v.prototype,e,(function(n,r){var o=A(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 A(this).collection.size}})}else v=n.getConstructor(t,e,y,x),i.REQUIRED=!0;return f(v,e,!1,!0),C[e]=v,r({global:!0,forced:!0},C),b||n.setStrong(v,e,y),v}},function(e,t,n){"use strict";var r=n(631),o=n(653).getWeakData,i=n(521),a=n(519),s=n(632),l=n(556),c=n(541),u=n(522),f=n(540),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(45).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,k=0,C=0;C<e.length;++C){var A=e.charCodeAt(C);if(A!==t.charCodeAt(g)){if(g=0,w||(37===A?k=1:k>0&&(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102)?3==++k&&(w=!0):k=0),m<s){if(A===n.charCodeAt(m)){if(++m===s)v<(S=C-m+1)&&(y+=e.slice(v,S)),k=0,v=C+1;continue}m=0,x||(37===A?k=1:k>0&&(A>=48&&A<=57||A>=65&&A<=70||A>=97&&A<=102)?3==++k&&(x=!0):k=0)}43===A&&(m<s?(C-v>0&&(y+=e.slice(v,C)),y+="%20",x=!0):(C-v>0&&(b+=e.slice(v,C)),b+="%20",w=!0),v=C+1)}else if(++g===l){var O,S=C-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,k=0,y=b="",v=C+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(543),o=n(523),i=n(535);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(681),o=n(574),i=n(588),a=n(523),s=n(554),l=n(589),c=n(569),u=n(621),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(659),o=n(722),i=n(1052);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(1049);e.exports=r},function(e,t,n){var r=n(1050),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(1051);var r=n(526);e.exports=r("Array").indexOf},function(e,t,n){"use strict";var r=n(513),o=n(604).indexOf,i=n(672),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(654),o=n(722);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";
37
37
  /*!
38
38
  * cookie
39
39
  * Copyright(c) 2012-2014 Roman Shtylman
40
40
  * Copyright(c) 2015 Douglas Christopher Wilson
41
41
  * MIT Licensed
42
- */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}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Console",(function(){return ic}));var r={};n.r(r),n.d(r,"JsonPatchError",(function(){return Da})),n.d(r,"deepClone",(function(){return Ra})),n.d(r,"getValueByPointer",(function(){return Ua})),n.d(r,"applyOperation",(function(){return za})),n.d(r,"applyPatch",(function(){return Wa})),n.d(r,"applyReducer",(function(){return Ha})),n.d(r,"validator",(function(){return qa})),n.d(r,"validate",(function(){return Ga})),n.d(r,"_areEquals",(function(){return $a}));var o={};n.r(o),n.d(o,"unobserve",(function(){return Xa})),n.d(o,"observe",(function(){return Qa})),n.d(o,"generate",(function(){return Za})),n.d(o,"compare",(function(){return ts}));var i={};n.r(i),n.d(i,"path",(function(){return Bl})),n.d(i,"query",(function(){return Ul})),n.d(i,"header",(function(){return Wl})),n.d(i,"cookie",(function(){return Hl}));var a=n(1),s=n(0),l=n(575),c=n(7),u=n(36),f=n(113),p=n(3),d=n(69);function h(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(s.Fragment,null,s.createElement(x,null,s.createElement("span",null,t,":"),l&&l.length?s.createElement(C,{value:n,options:l,onChange:function(e){return i(e.value)}}):s.createElement(w,{value:n,onChange:function(e){return i(e.target.value)},placeholder:a})),r&&s.createElement(k,null,r))}var v,g,m,y,b,x=p.V.div(v||(v=Object(a.f)(["\n display: flex;\n padding-top: 10px;\n"],["\n display: flex;\n padding-top: 10px;\n"]))),w=p.V.input(g||(g=Object(a.f)(["\n margin-left: 10px;\n flex: 1;\n ","\n"],["\n margin-left: 10px;\n flex: 1;\n ","\n"])),d.l),k=p.V.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"]))),C=Object(p.V)(p.h)(y||(y=Object(a.f)(["\n &.dropdown {\n flex: 1;\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"],["\n &.dropdown {\n flex: 1;\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"]))),A=p.V.div(b||(b=Object(a.f)(["\n display: flex;\n padding-top: 10px;\n"],["\n display: flex;\n padding-top: 10px;\n"]))),O=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,"handleChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var n=t.props.operation.servers.find((function(t){return t.url===e.serverUrl})),r=n&&T(n)||{};t.props.onChange(e.serverUrl),Object(u.i)("serverUrl",e.serverUrl),t.setState({variables:r})}}),Object.defineProperty(t,"handleVariableChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){var r,o,i=Object(a.a)(Object(a.a)({},t.state.variables),((r={})[e]=n,r));t.setState({variables:i});var s=Object(u.c)("variables"),l=s&&JSON.parse(s)||{};Object(u.i)("variables",JSON.stringify(Object(a.a)(Object(a.a)({},l),((o={})[e]=n,o)))),t.props.onVarsChange(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(u.c)("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=this.props.operation.servers[this.state.activeIdx],t=T(e);this.props.onChange(e.url),this.props.onVarsChange(t),this.setState({variables:t})}}),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 "+j(E(t.url,e.state.variables),t.variables)+"\n - "+(t.description||"Default")+"\n "}})),r=Object.keys(this.state.variables);return s.createElement("div",null,s.createElement(A,null,s.createElement("span",null," Target: "),s.createElement(C,{openUp:!0,value:n[t].value,options:n,onChange:this.handleChange})),r.length?r.map((function(t){var n=e.props.operation.servers[e.state.activeIdx].variables[t];return s.createElement(h,{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)([c.a],t)}(s.Component),S=/(?:{)(\w+)(?:})/g;function E(e,t){return void 0===t&&(t={}),e.replace(S,(function(e,n){return t[n]||e}))}function j(e,t){return void 0===t&&(t={}),e.replace(S,(function(e,n){return t[n]&&t[n].default||e}))}function T(e){if(!e.variables)return{};var t=Object(u.c)("variables"),n=t&&JSON.parse(t)||{},r={};return Object.keys(e.variables).forEach((function(t){r[t]=e.variables[t].default||"",n.hasOwnProperty(t)&&(r[t]=n[t])})),Object(a.a)({},r)}var M=n(6),P=p.V.div(H||(H=Object(a.f)(["\n display: table;\n width: 100%;\n margin: 10px 0;\n"],["\n display: table;\n width: 100%;\n margin: 10px 0;\n"]))),L=Object(p.V)(l.d)(q||(q=Object(a.f)(["\n ",";\n width: 100%;\n"],["\n ",";\n width: 100%;\n"])),d.l),F=Object(p.V)(l.c)(G||(G=Object(a.f)(["\n ",";\n width: 100%;\n border-radius: 0;\n\n &&[multiple] {\n background: black;\n padding: 5px;\n border-radius: 5px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n }\n"],["\n ",";\n width: 100%;\n border-radius: 0;\n\n &&[multiple] {\n background: black;\n padding: 5px;\n border-radius: 5px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n }\n"])),d.l),I=l.b,_=p.V.div($||($=Object(a.f)(["\n color: #969a9a;\n font-size: 1em;\n font-weight: normal;\n text-align: left;\n position: absolute;\n"],["\n color: #969a9a;\n font-size: 1em;\n font-weight: normal;\n text-align: left;\n position: absolute;\n"]))),N=p.V.div(K||(K=Object(a.f)(["\n display: table-cell;\n width: 100%;\n vertical-align: middle;\n padding: 2px 0;\n"],["\n display: table-cell;\n width: 100%;\n vertical-align: middle;\n padding: 2px 0;\n"]))),D=p.V.div(J||(J=Object(a.f)(["\n display: table-row;\n margin-bottom: 10px;\n"],["\n display: table-row;\n margin-bottom: 10px;\n"]))),R=p.V.div(Y||(Y=Object(a.f)(["\n display: table;\n width: 100%;\n margin-bottom: 20px;\n"],["\n display: table;\n width: 100%;\n margin-bottom: 20px;\n"]))),V=p.V.label(X||(X=Object(a.f)(["\n padding: 5px 10px 5px 0;\n display: table-cell;\n max-width: 50%;\n white-space: nowrap;\n"],["\n padding: 5px 10px 5px 0;\n display: table-cell;\n max-width: 50%;\n white-space: nowrap;\n"]))),B=p.V.div(Q||(Q=Object(a.f)(["\n color: ",";\n font-size: 0.9em;\n & pre {\n word-break: break-word;\n white-space: pre-wrap;\n }\n"],["\n color: ",";\n font-size: 0.9em;\n & pre {\n word-break: break-word;\n white-space: pre-wrap;\n }\n"])),(function(e){return e.theme.colors.error.main})),U=p.V.div(Z||(Z=Object(a.f)(["\n color: ",";\n font-size: 0.9em;\n"],["\n color: ",";\n font-size: 0.9em;\n"])),(function(e){return e.theme.colors.warning.main})),z=Object(p.N)(ee||(ee=Object(a.f)(["\n animation: "," 1.2s infinite;\n"],["\n animation: "," 1.2s infinite;\n"])),d.k),W=p.V.div(re||(re=Object(a.f)(["\n background-color: ",";\n border: 0;\n font-size: 14px;\n padding: 5px 10px;\n color: white;\n font-weight: bold;\n text-align: center;\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n ","\n\n ","\n"],["\n background-color: ",";\n border: 0;\n font-size: 14px;\n padding: 5px 10px;\n color: white;\n font-weight: bold;\n text-align: center;\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n ","\n\n ","\n"])),(function(e){return e.theme.colors.primary.main}),(function(e){var t=e.theme;return Object(M.e)(.1,t.colors.primary.main)}),(function(e){var t=e.theme;return Object(M.a)(.05,t.colors.primary.main||"")}),(function(e){return e.loading&&Object(p.N)(te||(te=Object(a.f)(["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n ","\n }\n "],["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n ","\n }\n "])),z)||""}),(function(e){return e.disabled&&Object(p.N)(ne||(ne=Object(a.f)(["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n }\n "],["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n }\n "])))||""}));var H,q,G,$,K,J,Y,X,Q,Z,ee,te,ne,re,oe,ie,ae,se,le,ce,ue=p.V.div(oe||(oe=Object(a.f)(["\n display: flex;\n position: relative;\n margin-bottom: 1em;\n"],["\n display: flex;\n position: relative;\n margin-bottom: 1em;\n"]))),fe=p.V.code(ie||(ie=Object(a.f)(["\n flex: 1;\n overflow-wrap: anywhere;\n ","\n"],["\n flex: 1;\n overflow-wrap: anywhere;\n ","\n"])),(function(e){var t=e.masked,n=e.length;return t&&"\n color: transparent;\n\n &:before {\n content: "+function(e,t){for(var n="",r=0;r<e;r++)n+=t;return'"'+n+'"'}(n,"*")+";\n color: white;\n position: absolute;\n right: 100px;\n }\n "||""})),pe=p.V.span(ae||(ae=Object(a.f)(["\n padding: 0 5px;\n cursor: pointer;\n"],["\n padding: 0 5px;\n cursor: pointer;\n"]))),de=Object(p.V)(pe)(se||(se=Object(a.f)(["\n color: ",";\n"],["\n color: ",";\n"])),(function(e){return e.theme.colors.error.main})),he=p.V.div(le||(le=Object(a.f)(["\n font-weight: bold;\n font-size: 1.2em;\n margin: 1em 0;\n"],["\n font-weight: bold;\n font-size: 1.2em;\n margin: 1em 0;\n"])));!function(e){e.ARRAY="array",e.OBJECT="object"}(ce||(ce={}));var ve=function(e){return"("+e.schema.type+")"+(e.example?" "+e.example:"")},ge=p.V.span(me||(me=Object(a.f)(["\n color: ",";\n"],["\n color: ",";\n"])),(function(e){return e.theme.colors.error.main}));var me,ye=["path","query","cookie","header"];function be(e){function t(t,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===ce.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=e.values,i=Array.isArray(n.schema.enum)&&n.schema.enum.length?n.schema.enum:void 0,a=function(e){if(e.schema.type===ce.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),l=n.schema.type===ce.ARRAY;return i?s.createElement(F,{id:t,field:t,placeholder:ve(n),validate:r,initialValue:a||Object(u.d)(o,t),validateOnBlur:!0,validateOnChange:!0,multiple:l,onChange:e.onChange},!a&&!n.required&&!l&&s.createElement(I,{value:""},"--"),i.map((function(e,t){return s.createElement(I,{key:t,value:e},e)}))):s.createElement(L,{id:t,field:t,placeholder:ve(n),validate:r,initialValue:a||Object(u.d)(o,t,""),validateOnBlur:!0,validateOnChange:!0,onChange:e.onChange})}function n(r,o,i){var l,c,f,p,d,h=i?Object(u.b)(i,r.name):r.name,v=(l=r.schema,c=l.oneOfType,f=l.type,p=l.items,c||f===ce.ARRAY&&(null==p?void 0:p.type)===ce.OBJECT&&"Array of objects");if(v&&console.warn('Unsupported parameter definition: "'+v+'"'),r.schema.type===ce.OBJECT)return null===(d=r.schema.fields)||void 0===d?void 0:d.map((function(e){return n(e,o,h)}));var g=i?[o,i]:[r.in],m=u.b.apply(void 0,Object(a.g)(g,[r.name])),y=(e.errors[o]||{})[r.name];return s.createElement(D,{key:m},s.createElement(V,null,h,r.required&&s.createElement(ge,null," * ")),v?s.createElement(U,null,"Unsupported field schema definition"):s.createElement(N,null,t(m,r),y?s.createElement(B,null,y):""))}var r,o,i=e.operation,l=(r=i.parameters||[],o={},r.forEach((function(e){var t,n,r;t=o,n=e.in,r=e,t[n]||(t[n]=[]),t[n].push(r)})),o);return s.createElement(P,null,ye.map((function(e){return function(e,t){return t&&t.length?s.createElement(s.Fragment,{key:e},s.createElement(D,null,s.createElement(_,null," # ",e," parameters "),s.createElement("span",null," ")),t.map((function(t){return n(t,e)}))):null}(e,l[e])})))}function xe(e,t,n){var r=t.path||{},o=t.query||{},i=Object.keys(o),a=E(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(p.U)(t,o[e]):e+"="+encodeURIComponent(o[e])})).filter(Boolean).join("&")),a}var we,ke,Ce,Ae,Oe,Se,Ee,je,Te,Me,Pe,Le=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"handleExecute",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.loading||t.props.onExecute()}}),t}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.loading,n=e.operation,r=e.params,o=void 0===r?{}:r,i=e.hasResponse;return s.createElement(d.b,null,s.createElement(d.h,null,s.createElement(d.i,{type:n.httpVerb},n.httpVerb.toUpperCase())," ",s.createElement(d.g,null,xe(n.path,o,n.parameters))),s.createElement(d.a,{isLoading:t,onClick:this.handleExecute},t?"Sending...":i?"Resend":"Send"))}}),t}(s.PureComponent),Fe=n(71),Ie=Object(p.V)(Fe.d)(we||(we=Object(a.f)(["\n > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n\n > li {\n padding: 5px 10px;\n display: inline-block;\n\n background-color: rgba(0, 0, 0, 0.2);\n cursor: pointer;\n text-align: center;\n outline: none;\n color: #ccc;\n margin: 5px;\n border: 1px solid #181f22;\n border-radius: 5px;\n min-width: 60px;\n font-size: 0.9em;\n font-weight: bold;\n\n &.react-tabs__tab--selected {\n color: ",";\n background: #e2e2e2;\n }\n\n &:only-child {\n flex: none;\n min-width: 100px;\n }\n\n &.tab-success {\n color: ",";\n }\n\n &.tab-redirect {\n color: ",";\n }\n\n &.tab-info {\n color: ",";\n }\n\n &.tab-error {\n color: ",";\n }\n }\n }\n\n > .react-tabs__tab-panel {\n display: none;\n }\n\n > .react-tabs__tab-panel--selected {\n background: #171e21;\n padding: 20px;\n margin: 0;\n display: flex;\n flex-direction: column;\n\n flex: 1;\n }\n"],["\n > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n\n > li {\n padding: 5px 10px;\n display: inline-block;\n\n background-color: rgba(0, 0, 0, 0.2);\n cursor: pointer;\n text-align: center;\n outline: none;\n color: #ccc;\n margin: 5px;\n border: 1px solid #181f22;\n border-radius: 5px;\n min-width: 60px;\n font-size: 0.9em;\n font-weight: bold;\n\n &.react-tabs__tab--selected {\n color: ",";\n background: #e2e2e2;\n }\n\n &:only-child {\n flex: none;\n min-width: 100px;\n }\n\n &.tab-success {\n color: ",";\n }\n\n &.tab-redirect {\n color: ",";\n }\n\n &.tab-info {\n color: ",";\n }\n\n &.tab-error {\n color: ",";\n }\n }\n }\n\n > .react-tabs__tab-panel {\n display: none;\n }\n\n > .react-tabs__tab-panel--selected {\n background: #171e21;\n padding: 20px;\n margin: 0;\n display: flex;\n flex-direction: column;\n\n flex: 1;\n }\n"])),(function(e){return e.theme.colors.text.primary}),(function(e){return e.theme.colors.responses.success.color}),(function(e){return e.theme.colors.responses.redirect.color}),(function(e){return e.theme.colors.responses.info.color}),(function(e){return e.theme.colors.responses.error.color})),_e=Fe.a,Ne=p.V.span(ke||(ke=Object(a.f)(["\n","\n","\n"],["\n","\n","\n"])),(function(e){var t=e.error,n=e.theme;return t&&"\n color: "+n.colors.error.main+" !important;\n"||""}),(function(e){var t=e.success,n=e.theme;return t&&"\ncolor: "+n.colors.success.main+" !important;\n"||""})),De=Object(p.V)(Ie)(Ce||(Ce=Object(a.f)(["\n > ul {\n display: block;\n > li {\n padding: 2px 10px;\n min-width: auto;\n margin: 0;\n font-size: 13px;\n font-weight: normal;\n color: #c2c2c2;\n border-radius: 0;\n background: none;\n\n &:last-child {\n margin-right: 0;\n }\n\n &.react-tabs__tab--selected {\n color: #ffffff;\n background: none;\n border-bottom: 1px solid #6abe5b;\n }\n\n &.react-tabs__tab--disabled {\n color: #717171;\n cursor: default;\n }\n }\n }\n > .react-tabs__tab-panel--selected {\n padding: 10px;\n }\n"],["\n > ul {\n display: block;\n > li {\n padding: 2px 10px;\n min-width: auto;\n margin: 0;\n font-size: 13px;\n font-weight: normal;\n color: #c2c2c2;\n border-radius: 0;\n background: none;\n\n &:last-child {\n margin-right: 0;\n }\n\n &.react-tabs__tab--selected {\n color: #ffffff;\n background: none;\n border-bottom: 1px solid #6abe5b;\n }\n\n &.react-tabs__tab--disabled {\n color: #717171;\n cursor: default;\n }\n }\n }\n > .react-tabs__tab-panel--selected {\n padding: 10px;\n }\n"]))),Re=p.V.div(Ae||(Ae=Object(a.f)(["\n margin-bottom: 10px;\n"],["\n margin-bottom: 10px;\n"]))),Ve=p.V.div(Oe||(Oe=Object(a.f)(["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n border-radius: 10px;\n color: ",";\n\n span {\n color: ",";\n }\n"],["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n border-radius: 10px;\n color: ",";\n\n span {\n color: ",";\n }\n"])),(function(e){return e.theme.colors.primary.light}),(function(e){return e.theme.colors.text.secondary})),Be=Object(p.V)(Ve)(Se||(Se=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.success.light:n>=300&&n<400?t.colors.warning.light:n>400?t.colors.error.light:t.colors.responses.info.color})),Ue=p.V.strong(Ee||(Ee=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"]))),ze=p.V.header(je||(je=Object(a.f)(["\n font-weight: bold;\n margin-bottom: 10px;\n"],["\n font-weight: bold;\n margin-bottom: 10px;\n"]))),We=p.V.code(Te||(Te=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"]))),He=p.V.pre(Me||(Me=Object(a.f)(["\n overflow: auto;\n font-size: 0.9em;\n"],["\n overflow: auto;\n font-size: 0.9em;\n"]))),qe=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.error,n=e.response,r=e.time,o=n||t&&t.response,i=o&&o.data&&o.data.length||0,a="";if(a=i>1e6?(i/1e6).toFixed(2)+" MB":i>1e3?(i/1e3).toFixed(2)+" KB":i+" B",t&&!t.response||!o)return s.createElement(s.Fragment,null,s.createElement(ze,null," Could not get any response "),s.createElement(We,null,t&&t.message||"Unknown error"),s.createElement("br",null),s.createElement(ze,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(!o)return"Something went wrong";var l=Object.keys(o.headers);return s.createElement(s.Fragment,null,s.createElement(Re,null,s.createElement(Be,{code:o.status},s.createElement("span",null," Status: "),o.status," ",o.statusText),s.createElement(Ve,null," ",s.createElement("span",null," Time: "),r,"ms"),s.createElement(Ve,null," ",s.createElement("span",null," Size: "),a)),s.createElement(De,{forceRenderTabPanel:!0},s.createElement(Fe.b,null,s.createElement(_e,{key:"body"},"Body"),s.createElement(_e,{key:"headers"}," Headers ")),s.createElement(Fe.c,{key:"body"},o.body&&s.createElement(p.j,{data:o.body})||null,!o.body&&null!=o.data&&s.createElement(He,null,o.data?s.createElement("code",null,o.data):s.createElement("i",null,"no content"))||null),s.createElement(Fe.c,{key:"auth"},l.map((function(e){return s.createElement("div",{key:e},s.createElement(Ue,{style:{textTransform:"capitalize"}},e,":"),s.createElement("code",null," ",o.headers[e]))})))))}}),t}(s.PureComponent),Ge=n(725),$e=n(537);function Ke(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(Je(t)){do{r++,o+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Je(t));return a=15}if(Ye(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(Ye(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&&!Ye(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++,Ye(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||!Xe(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&&Xe(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&Xe(e.charCodeAt(r))))return f=3,e.substring(t,r);for(r++;r<e.length&&Xe(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&&Xe(e.charCodeAt(r))){for(r++;r<e.length&&Xe(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(Je(e)||Ye(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 Je(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 Ye(e){return 10===e||13===e||8232===e||8233===e}function Xe(e){return e>=48&&e<=57}function Qe(e,t,n){var r,o,i,a,s;if(t){for(a=t.offset,s=a+t.length,i=a;i>0&&!et(e,i-1);)i--;for(var l=s;l<e.length&&!et(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?Ze(" ",n.tabSize||4):"\t";var d=Ke(o,!1),h=!1;function v(){return u+Ze(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(Ze(c,r),i,x)}for(;17!==b;){for(var w=d.getTokenOffset()+d.getTokenLength()+i,k=g(),C="";!f&&(12===k||13===k);){y(" ",w,d.getTokenOffset()+i),w=d.getTokenOffset()+d.getTokenLength()+i,C=12===k?v():"",k=g()}if(2===k)1!==b&&(p--,C=v());else if(4===k)3!==b&&(p--,C=v());else{switch(b){case 3:case 1:p++,C=v();break;case 5:case 12:C=v();break;case 13:C=f?v():" ";break;case 6:C=" ";break;case 10:if(6===k){C="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===k||13===k?C=" ":5!==k&&17!==k&&(h=!0);break;case 16:h=!0}!f||12!==k&&13!==k||(C=v())}y(C,w,d.getTokenOffset()+i),b=k}return m}function Ze(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function et(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function tt(e,t,n){void 0===n&&(n=Pe.DEFAULT);var r=Ke(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}}(Pe||(Pe={}));var nt,rt,ot,it,at,st,lt,ct,ut,ft,pt,dt,ht,vt,gt,mt,yt,bt,xt,wt,kt,Ct,At,Ot,St,Et,jt=Ke,Tt=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=Pe.DEFAULT);var r=null,o=[],i=[];function a(e){Array.isArray(o)?o.push(e):null!==r&&(o[r]=e)}return tt(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]},Mt=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}},Pt=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},Lt=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 Ft(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(!Ft(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(),!Ft(o,i))return!1;for(n=0;n<o.length;n++)if(!Ft(e[o[n]],t[o[n]]))return!1}return!0}function It(e){return"number"==typeof e}function _t(e){return void 0!==e}function Nt(e){return"boolean"==typeof e}!function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(nt||(nt={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(rt||(rt={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=rt.MAX_VALUE),t===Number.MAX_VALUE&&(t=rt.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return mn.objectLiteral(t)&&mn.uinteger(t.line)&&mn.uinteger(t.character)}}(ot||(ot={})),function(e){e.create=function(e,t,n,r){if(mn.uinteger(e)&&mn.uinteger(t)&&mn.uinteger(n)&&mn.uinteger(r))return{start:ot.create(e,t),end:ot.create(n,r)};if(ot.is(e)&&ot.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 mn.objectLiteral(t)&&ot.is(t.start)&&ot.is(t.end)}}(it||(it={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return mn.defined(t)&&it.is(t.range)&&(mn.string(t.uri)||mn.undefined(t.uri))}}(at||(at={})),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 mn.defined(t)&&it.is(t.targetRange)&&mn.string(t.targetUri)&&(it.is(t.targetSelectionRange)||mn.undefined(t.targetSelectionRange))&&(it.is(t.originSelectionRange)||mn.undefined(t.originSelectionRange))}}(st||(st={})),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 mn.numberRange(t.red,0,1)&&mn.numberRange(t.green,0,1)&&mn.numberRange(t.blue,0,1)&&mn.numberRange(t.alpha,0,1)}}(lt||(lt={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return it.is(t.range)&&lt.is(t.color)}}(ct||(ct={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return mn.string(t.label)&&(mn.undefined(t.textEdit)||bt.is(t))&&(mn.undefined(t.additionalTextEdits)||mn.typedArray(t.additionalTextEdits,bt.is))}}(ut||(ut={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(ft||(ft={})),function(e){e.create=function(e,t,n,r,o){var i={startLine:e,endLine:t};return mn.defined(n)&&(i.startCharacter=n),mn.defined(r)&&(i.endCharacter=r),mn.defined(o)&&(i.kind=o),i},e.is=function(e){var t=e;return mn.uinteger(t.startLine)&&mn.uinteger(t.startLine)&&(mn.undefined(t.startCharacter)||mn.uinteger(t.startCharacter))&&(mn.undefined(t.endCharacter)||mn.uinteger(t.endCharacter))&&(mn.undefined(t.kind)||mn.string(t.kind))}}(pt||(pt={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return mn.defined(t)&&at.is(t.location)&&mn.string(t.message)}}(dt||(dt={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(ht||(ht={})),function(e){e.Unnecessary=1,e.Deprecated=2}(vt||(vt={})),function(e){e.is=function(e){var t=e;return null!=t&&mn.string(t.href)}}(gt||(gt={})),function(e){e.create=function(e,t,n,r,o,i){var a={range:e,message:t};return mn.defined(n)&&(a.severity=n),mn.defined(r)&&(a.code=r),mn.defined(o)&&(a.source=o),mn.defined(i)&&(a.relatedInformation=i),a},e.is=function(e){var t,n=e;return mn.defined(n)&&it.is(n.range)&&mn.string(n.message)&&(mn.number(n.severity)||mn.undefined(n.severity))&&(mn.integer(n.code)||mn.string(n.code)||mn.undefined(n.code))&&(mn.undefined(n.codeDescription)||mn.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(mn.string(n.source)||mn.undefined(n.source))&&(mn.undefined(n.relatedInformation)||mn.typedArray(n.relatedInformation,dt.is))}}(mt||(mt={})),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 mn.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return mn.defined(t)&&mn.string(t.title)&&mn.string(t.command)}}(yt||(yt={})),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 mn.objectLiteral(t)&&mn.string(t.newText)&&it.is(t.range)}}(bt||(bt={})),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&&mn.objectLiteral(t)&&mn.string(t.label)&&(mn.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(mn.string(t.description)||void 0===t.description)}}(xt||(xt={})),function(e){e.is=function(e){return"string"==typeof e}}(wt||(wt={})),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 bt.is(t)&&(xt.is(t.annotationId)||wt.is(t.annotationId))}}(kt||(kt={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return mn.defined(t)&&Vt.is(t.textDocument)&&Array.isArray(t.edits)}}(Ct||(Ct={})),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&&mn.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||mn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||mn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||wt.is(t.annotationId))}}(At||(At={})),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&&mn.string(t.oldUri)&&mn.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||mn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||mn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||wt.is(t.annotationId))}}(Ot||(Ot={})),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&&mn.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||mn.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||mn.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||wt.is(t.annotationId))}}(St||(St={})),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 mn.string(e.kind)?At.is(e)||Ot.is(e)||St.is(e):Ct.is(e)})))}}(Et||(Et={}));var Dt,Rt,Vt,Bt,Ut,zt,Wt,Ht,qt,Gt,$t,Kt,Jt,Yt,Xt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln,cn,un,fn,pn,dn,hn=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=bt.insert(e,t):wt.is(n)?(o=n,r=kt.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=kt.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=bt.replace(e,t):wt.is(n)?(o=n,r=kt.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=kt.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=bt.del(e):wt.is(t)?(r=t,n=kt.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=kt.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}(),vn=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(wt.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 vn(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Ct.is(e)){var n=new hn(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new hn(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(Vt.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 hn(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 hn(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new vn,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(xt.is(t)||wt.is(t)?r=t:n=t,void 0===r?o=At.create(e,n):(i=wt.is(r)?r:this._changeAnnotations.manage(r),o=At.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(xt.is(n)||wt.is(n)?o=n:r=n,void 0===o?i=Ot.create(e,t,r):(a=wt.is(o)?o:this._changeAnnotations.manage(o),i=Ot.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(xt.is(t)||wt.is(t)?r=t:n=t,void 0===r?o=St.create(e,n):(i=wt.is(r)?r:this._changeAnnotations.manage(r),o=St.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 mn.defined(t)&&mn.string(t.uri)}}(Dt||(Dt={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return mn.defined(t)&&mn.string(t.uri)&&mn.integer(t.version)}}(Rt||(Rt={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return mn.defined(t)&&mn.string(t.uri)&&(null===t.version||mn.integer(t.version))}}(Vt||(Vt={})),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 mn.defined(t)&&mn.string(t.uri)&&mn.string(t.languageId)&&mn.integer(t.version)&&mn.string(t.text)}}(Bt||(Bt={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(Ut||(Ut={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(Ut||(Ut={})),function(e){e.is=function(e){var t=e;return mn.objectLiteral(e)&&Ut.is(t.kind)&&mn.string(t.value)}}(zt||(zt={})),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}(Wt||(Wt={})),function(e){e.PlainText=1,e.Snippet=2}(Ht||(Ht={})),function(e){e.Deprecated=1}(qt||(qt={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&mn.string(t.newText)&&it.is(t.insert)&&it.is(t.replace)}}(Gt||(Gt={})),function(e){e.asIs=1,e.adjustIndentation=2}($t||($t={})),function(e){e.create=function(e){return{label:e}}}(Kt||(Kt={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(Jt||(Jt={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return mn.string(t)||mn.objectLiteral(t)&&mn.string(t.language)&&mn.string(t.value)}}(Yt||(Yt={})),function(e){e.is=function(e){var t=e;return!!t&&mn.objectLiteral(t)&&(zt.is(t.contents)||Yt.is(t.contents)||mn.typedArray(t.contents,Yt.is))&&(void 0===e.range||it.is(e.range))}}(Xt||(Xt={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Qt||(Qt={})),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 mn.defined(t)&&(o.documentation=t),mn.defined(n)?o.parameters=n:o.parameters=[],o}}(Zt||(Zt={})),function(e){e.Text=1,e.Read=2,e.Write=3}(en||(en={})),function(e){e.create=function(e,t){var n={range:e};return mn.number(t)&&(n.kind=t),n}}(tn||(tn={})),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}(nn||(nn={})),function(e){e.Deprecated=1}(rn||(rn={})),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}}(on||(on={})),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&&mn.string(t.name)&&mn.number(t.kind)&&it.is(t.range)&&it.is(t.selectionRange)&&(void 0===t.detail||mn.string(t.detail))&&(void 0===t.deprecated||mn.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(an||(an={})),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"}(sn||(sn={})),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 mn.defined(t)&&mn.typedArray(t.diagnostics,mt.is)&&(void 0===t.only||mn.typedArray(t.only,mn.string))}}(ln||(ln={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):yt.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&&mn.string(t.title)&&(void 0===t.diagnostics||mn.typedArray(t.diagnostics,mt.is))&&(void 0===t.kind||mn.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||yt.is(t.command))&&(void 0===t.isPreferred||mn.boolean(t.isPreferred))&&(void 0===t.edit||Et.is(t.edit))}}(cn||(cn={})),function(e){e.create=function(e,t){var n={range:e};return mn.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return mn.defined(t)&&it.is(t.range)&&(mn.undefined(t.command)||yt.is(t.command))}}(un||(un={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return mn.defined(t)&&mn.uinteger(t.tabSize)&&mn.boolean(t.insertSpaces)}}(fn||(fn={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return mn.defined(t)&&it.is(t.range)&&(mn.undefined(t.target)||mn.string(t.target))}}(pn||(pn={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&it.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(dn||(dn={}));var gn;!function(e){e.create=function(e,t,n,r){return new yn(e,t,n,r)},e.is=function(e){var t=e;return!!(mn.defined(t)&&mn.string(t.uri)&&(mn.undefined(t.languageId)||mn.string(t.languageId))&&mn.uinteger(t.lineCount)&&mn.func(t.getText)&&mn.func(t.positionAt)&&mn.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}}(gn||(gn={}));var mn,yn=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 ot.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 ot.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)}}(mn||(mn={}));var bn,xn,wn,kn=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=An(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=Cn(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=Cn(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 Cn(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 An(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 On(e){var t=An(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new kn(e,t,n,r)},e.update=function(e,t,n){if(e instanceof kn)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(On),(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("")}}(bn||(bn={})),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"}(xn||(xn={})),(wn||(wn={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ut.Markdown,Ut.PlainText],commitCharactersSupport:!0}}}};var Sn,En,jn=(Sn=function(e,t){return(Sn=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}Sn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Tn={"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,}))$/}},Mn=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}(),Pn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r.value=null,r}return jn(t,e),t}(Mn),Ln=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.type="boolean",o.value=n,o}return jn(t,e),t}(Mn),Fn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return jn(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(Mn),In=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 jn(t,e),t}(Mn),_n=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.type="string",o.value="",o}return jn(t,e),t}(Mn),Nn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="property",r.colonOffset=-1,r}return jn(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(Mn),Dn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return jn(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(Mn);function Rn(e){return Nt(e)?e?{}:{not:{}}:e}!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(En||(En={}));var Vn=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||Hn(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Bn=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}(),Un=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===xn.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 zn(e){return Lt(e)}function Wn(e){return Pt(e)}function Hn(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var qn=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 Mt(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 Un;return Gn(this.root,t,n,Bn.instance),n.problems.map((function(t){var n=it.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return mt.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 Vn(t,n);return this.root&&e&&Gn(this.root,e,new Un,r),r.schemas},e}();function Gn(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:ht.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(Nt(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:ht.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{var b=new Un;Gn(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 k=w[x],C=new RegExp(k),A=0,O=i.slice(0);A<O.length;A++){f=O[A];if(C.test(f))if(h(f),M=o[f])if(Nt(m=t.patternProperties[k]))if(m)n.propertiesMatches++,n.propertiesValueMatches++;else{y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:ht.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{b=new Un;Gn(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 Un;Gn(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:ht.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:ht.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:ht.Warning,message:"Object has fewer properties than the required number of "+t.minProperties});if(t.dependencies)for(var P=0,L=Object.keys(t.dependencies);P<L.length;P++){l=L[P];if(o[l]){var F=t.dependencies[l];if(Array.isArray(F))for(var I=0,_=F;I<_.length;I++){var N=_[I];o[N]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Object is missing property "+N+" required by property {$key}."})}else if(m=Rn(F)){b=new Un;Gn(e,m,b,r),n.mergePropertyMatch(b)}}}var D=Rn(t.propertyNames);if(D)for(var R=0,V=e.properties;R<V.length;R++){var B=V[R];(l=B.keyNode)&&Gn(l,D,n,Bn.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=Rn(o[i]),s=new Un;(p=e.items[i])?(Gn(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 Un;Gn(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:ht.Warning,message:"Array has too many items according to schema. Expected "+o.length+" or fewer."})}else{var c=Rn(t.items);if(c)for(var u=0,f=e.items;u<f.length;u++){var p=f[u];s=new Un;Gn(p,c,s,r),n.mergePropertyMatch(s)}}var d=Rn(t.contains);if(d){e.items.some((function(e){var t=new Un;return Gn(e,d,t,Bn.instance),!t.hasProblems()}))||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.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:ht.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:ht.Warning,message:"Array has too many items. Expected "+t.maxItems+" or fewer."});if(!0===t.uniqueItems){var h=zn(e);h.some((function(e,t){return t!==h.lastIndexOf(e)}))&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.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:ht.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:ht.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:ht.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:ht.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=Tn[t.format];e.value&&s.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.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:ht.Warning,message:"Value is not divisible by "+t.multipleOf+"."});function i(e,t){return It(t)?t:Nt(t)&&t?e:void 0}function a(e,t){if(!Nt(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:ht.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:ht.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:ht.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:ht.Warning,message:"Value is above the maximum of "+u+"."})}(e,t,n);break;case"property":return Gn(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:ht.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:ht.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];Gn(e,Rn(s),n,r)}var l=Rn(t.not);if(l){var c=new Un,u=r.newSub();Gn(e,l,c,u),c.hasProblems()||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.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=Rn(l[s]),u=new Un,f=r.newSub();if(Gn(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:ht.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 Un,i=r.newSub();Gn(e,Rn(t),o,i),n.merge(o),n.propertiesMatches+=o.propertiesMatches,n.propertiesValueMatches+=o.propertiesValueMatches,r.merge(i)},g=Rn(t.if);g&&function(t,n,o){var i=Rn(t),a=new Un,s=r.newSub();Gn(e,i,a,s),r.merge(s),a.hasProblems()?o&&v(o):n&&v(n)}(g,Rn(t.then),Rn(t.else));if(Array.isArray(t.enum)){for(var m=zn(e),y=!1,b=0,x=t.enum;b<x.length;b++){var w=x[b];if(Ft(m,w)){y=!0;break}}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,code:xn.EnumValueMismatch,message:t.errorMessage||"Value is not accepted. Valid values: "+t.enum.map((function(e){return JSON.stringify(e)})).join(", ")+"."})}if(_t(t.const)){Ft(m=zn(e),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,code:xn.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:ht.Warning,message:t.deprecationMessage})}(),r.add({node:e,schema:t})}}function $n(e,t){var n=[],r=-1,o=e.getText(),i=jt(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(it.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=ht.Error),0===n.length||i!==r){var l=it.create(e.positionAt(i),e.positionAt(a));n.push(mt.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.",xn.InvalidUnicode),!0;case 5:return c("Invalid escape character in string.",xn.InvalidEscapeCharacter),!0;case 3:return c("Unexpected end of number.",xn.UnexpectedEndOfNumber),!0;case 1:return c("Unexpected end of comment.",xn.UnexpectedEndOfComment),!0;case 2:return c("Unexpected end of string.",xn.UnexpectedEndOfString),!0;case 6:return c("Invalid characters in string. Control characters must be escaped.",xn.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 Nn(t,i.getTokenOffset()),o=d(r);if(!o){if(16!==i.getToken())return null;c("Property keys must be doublequoted",xn.Undefined);var a=new _n(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",xn.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,ht.Warning),"object"==typeof u&&l("DuplicateKeyWarning",xn.DuplicateKey,u.keyNode.offset,u.keyNode.offset+u.keyNode.length,ht.Warning),n[o.value]=!0):n[o.value]=r,6===i.getToken())r.colonOffset=i.getTokenOffset(),s();else if(c("Colon expected",xn.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",xn.ValueExpected,r,[],[2,5])}function d(e){if(10!==i.getToken())return null;var t=new _n(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 Fn(e,i.getTokenOffset());s();for(var n=0,r=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||c("Value expected",xn.ValueExpected);var o=i.getTokenOffset();if(s(),4===i.getToken()){r&&l("Trailing comma",xn.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",xn.CommaExpected);var a=h(t,n++);a?t.items.push(a):c("Value expected",xn.ValueExpected,null,[],[4,5]),r=!0}return 4!==i.getToken()?c("Expected comma or closing bracket",xn.CommaOrCloseBacketExpected,t):f(t,!0)}(e)||function(e){if(1!==i.getToken())return null;var t=new Dn(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",xn.PropertyExpected);var o=i.getTokenOffset();if(s(),2===i.getToken()){r&&l("Trailing comma",xn.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",xn.CommaExpected);var a=p(t,n);a?t.properties.push(a):c("Property expected",xn.PropertyExpected,null,[],[2,5]),r=!0}return 2!==i.getToken()?c("Expected comma or closing brace",xn.CommaOrCloseBraceExpected,t):f(t,!0)}(e)||d(e)||function(e){if(11!==i.getToken())return null;var t=new In(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.",xn.Undefined,t);t.value=r}catch(e){return c("Invalid number format.",xn.Undefined,t)}t.isInteger=-1===n.indexOf(".")}return f(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return f(new Pn(e,i.getTokenOffset()),!0);case 8:return f(new Ln(e,!0,i.getTokenOffset()),!0);case 9:return f(new Ln(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.",xn.Undefined):c("Expected a JSON object, array or literal.",xn.Undefined)),new qn(v,n,a)}function Kn(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}var Jn=[",","}","]"],Yn=[":"],Xn=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=it.create(e.positionAt(f),t)}else u=it.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=bt.replace(u,e.insertText)),p&&(e.commitCharacters=e.kind===Wt.Property?Yn:Jn),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]=Kt.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=Wn(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:Wt.Property,label:r.getLabelForValue(c),insertText:r.getInsertTextForProperty(c,null,!1,m),insertTextFormat:Ht.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:Wt.Property,label:a.sanitizeLabel(e),insertText:a.getInsertTextForProperty(e,n,r,o),insertTextFormat:Ht.Snippet,filterText:a.getFilterTextForValue(e),documentation:a.fromMarkup(n.markdownDescription)||n.description||""};Kn(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:Wt.Property,label:o.sanitizeLabel(t),insertText:o.getInsertTextForValue(t,""),insertTextFormat:Ht.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:Wt.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:Ht.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:Ht.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Ht.Snippet,documentation:""});var s=this.evaluateSeparatorAfter(r,a),l=function(e){Hn(e.parent,n,!0)||o.add({kind:i.getSuggestionKind(e.type),label:i.getLabelTextForMatchingNode(e,r),insertText:i.getInsertTextForMatchingNode(e,r,s),insertTextFormat:Ht.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=Wn(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(_t(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:Ht.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:Ht.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(_t(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:Ht.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(_t(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:Ht.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:Ht.Snippet,documentation:a})}},e.prototype.collectTypes=function(e,t){if(!Array.isArray(e.enum)&&!_t(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:Ht.Snippet,detail:"New object",documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:Ht.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:Ht.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Ht.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:Wt.Module,label:n.getLabelForValue(r),filterText:n.getFilterTextForValue(r),insertText:n.getInsertTextForValue(r,e),insertTextFormat:Ht.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 Wt.Value;switch(e){case"string":return Wt.Value;case"object":return Wt.Module;case"property":return Wt.Property;default:return Wt.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;_t(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),_t(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=jt(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=jt(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=jt(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:Ut.Markdown,value:e}},e.prototype.doesSupportMarkdown=function(){if(!_t(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(Ut.Markdown)}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!_t(this.supportsCommitCharacters)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),Qn=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=it.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),l=function(e){return{contents:e,range:s}},c=Wn(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||Zn(e.schema.description),e.schema.enum)){var t=e.schema.enum.indexOf(zn(o));e.schema.markdownEnumDescriptions?a=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(a=Zn(e.schema.enumDescriptions[t])),a&&"string"!=typeof(s=e.schema.enum[t])&&(s=JSON.stringify(s))}return!0}));var c="";return r&&(c=Zn(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 Zn(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var er=n(726),tr=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}(),nr=function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new rr(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}(),rr=function(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t},or=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){return Rn(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}(),ir=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=er.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 er.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 nr(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 tr(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 '"+ar(e)+"'. No schema request service available";return this.promise.resolve(new rr({},[t]))}return this.requestService(e).then((function(t){if(!t){var n="Unable to load schema from '"+ar(e)+"': No content.";return new rr({},[n])}var r,o=[];r=Tt(t,o);var i=o.length?["Unable to parse content from '"+ar(e)+"': Parse error at offset "+o[0].offset]:[];return new rr(r,i)}),(function(t){var n="Unable to load schema from '"+ar(e)+"': "+t.toString();return new rr({},[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 or({},["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 or(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=zn(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 ar(e){return e}var sr=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:ht.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?cr(n.trailingCommas):ht.Error,l=n?cr(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=it.create(e.positionAt(f.offset),e.positionAt(f.offset+f.length));s(mt.create(p,r.errors[0],ht.Warning,xn.SchemaResolveError))}else{p=it.create(e.positionAt(c.offset),e.positionAt(c.offset+1));s(mt.create(p,r.errors[0],ht.Warning,xn.SchemaResolveError))}}else{var d=t.validate(e,r.schema);d&&d.forEach(s)}(function e(t){if(t&&"object"==typeof t){if(Nt(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(Nt(i))return i}}return})(r.schema)&&(l=void 0),function e(t){if(t&&"object"==typeof t){if(Nt(t.allowTrailingCommas))return t.allowTrailingCommas;if(Nt(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(Nt(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===xn.TrailingComma){if("number"!=typeof a)continue;g.severity=a}s(g)}if("number"==typeof l){t.comments.forEach((function(e){s(mt.create(e,"Comments are not permitted in JSON.",l,xn.CommentNotPermitted))}))}return i};if(r){var c=r.id||"schemaservice://untitled/"+lr++;return this.jsonSchemaService.resolveSchemaContent(new rr(r),c,{}).then((function(e){return l(e)}))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((function(e){return l(e)}))},e}(),lr=0;function cr(e){switch(e){case"error":return ht.Error;case"warning":return ht.Warning;case"ignore":return}}function ur(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function fr(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*ur(e.charCodeAt(1))/255,green:17*ur(e.charCodeAt(2))/255,blue:17*ur(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*ur(e.charCodeAt(1))/255,green:17*ur(e.charCodeAt(2))/255,blue:17*ur(e.charCodeAt(3))/255,alpha:17*ur(e.charCodeAt(4))/255};case 7:return{red:(16*ur(e.charCodeAt(1))+ur(e.charCodeAt(2)))/255,green:(16*ur(e.charCodeAt(3))+ur(e.charCodeAt(4)))/255,blue:(16*ur(e.charCodeAt(5))+ur(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*ur(e.charCodeAt(1))+ur(e.charCodeAt(2)))/255,green:(16*ur(e.charCodeAt(3))+ur(e.charCodeAt(4)))/255,blue:(16*ur(e.charCodeAt(5))+ur(e.charCodeAt(6)))/255,alpha:(16*ur(e.charCodeAt(7))+ur(e.charCodeAt(8)))/255}}return null}var pr=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||Kn(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=at.create(e.uri,dr(e,u));if(s.push({name:zn(d.valueNode),kind:nn.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=at.create(e.uri,dr(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||Kn(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=dr(e,u),v=dr(e,d.keyNode);if(s.push({name:zn(d.valueNode),kind:nn.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=dr(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=dr(e,n),s=dr(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 nn.Module;case"string":return nn.String;case"number":return nn.Number;case"array":return nn.Array;case"boolean":return nn.Boolean;default:return nn.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=fr(zn(c.node));if(f){var p=dr(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:bt.replace(r,JSON.stringify(o))}),i},e}();function dr(e,t){return it.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var hr={schemaAssociations:{},schemas:{}};function vr(e,t){var n=[],r=[],o=[],i=-1,a=jt(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(ot.create(p+1,0))):p<d&&(l({startLine:p,endLine:d,kind:ft.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:ft.Region};o.push(c)}else{for(var v=o.length-1;v>=0&&o[v].kind!==ft.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++){(A=b[y])<30&&(m[A]=(m[A]||0)+1)}var x=0,w=0;for(v=0;v<m.length;v++){var k=m[v];if(k){if(k+x>g){w=v;break}x+=k}}var C=[];for(v=0;v<n.length;v++){var A;"number"==typeof(A=r[v])&&(A<w||A===w&&x++<g)&&C.push(n[v])}return C}function gr(e,t,n){function r(t,n){return it.create(e.positionAt(t),e.positionAt(n))}var o=jt(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=dn.create(s[p],f);return f||(f=dn.create(it.create(t,t))),f}))}n(727),n(728),n(729),n(730),n(731),n(732),n(733),n(735),n(737),n(739);var mr=function(e){var t=e.promiseConstructor||Promise,n=new ir(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(hr);var r=new Xn(n,e.contributions,t,e.clientCapabilities),o=new Qn(n,e.contributions,t),i=new pr(n),a=new sr(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 $n(e,{collectComments:!0})},newJSONDocument:function(e,t){return function(e,t){return void 0===t&&(t=[]),new qn(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:vr,getSelectionRanges:gr,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 Qe(e,t,n)}(e.getText(),r,i).map((function(t){return bt.replace(it.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)}))}}}({});$e.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,mr.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),o=bn.create(t.id+".json","json",0,e),i=mr.parseJSONDocument(o),[4,mr.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:$e.Pos(e.range.start.line,e.range.start.character),to:$e.Pos(e.range.end.line,e.range.end.character),message:e.message}}))]}}))}))})),$e.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)?(mr.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),r=e.getDoc().getCursor(),o=e.getTokenAt(r),i=bn.create(t.id+".json","json",0,e.getValue()),s=mr.parseJSONDocument(i),[4,mr.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:$e.Pos(r.line,o.start),to:$e.Pos(r.line,r.ch),list:u}]}}))}))}));var yr,br,xr,wr,kr,Cr,Ar,Or,Sr,Er,jr,Tr,Mr,Pr,Lr,Fr,Ir,_r=Object(p.M)(yr||(yr=Object(a.f)(["\n .cm-s-material.CodeMirror {\n background-color: black !important;\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 { background: rgba(255, 255, 255, 0.3) !important; }\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: center;\n\n flex: 1;\n }\n\n .CodeMirror {\n height: 600px!important;\n }\n"],["\n .cm-s-material.CodeMirror {\n background-color: black !important;\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 { background: rgba(255, 255, 255, 0.3) !important; }\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: center;\n\n flex: 1;\n }\n\n .CodeMirror {\n height: 600px!important;\n }\n"]))),Nr=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)}}),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)}}),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(_r,null),s.createElement(Ge.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),Dr=Object(l.e)(Nr),Rr=Object(p.V)(p.h)(br||(br=Object(a.f)(["\n &&.dropdown {\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n background: transparent;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"],["\n &&.dropdown {\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n background: transparent;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"]))),Vr=p.V.div(xr||(xr=Object(a.f)(["\n display: flex;\n align-items: center;\n\n "," {\n flex: 1;\n margin: 0 10px;\n }\n\n margin-top: 10px;\n"],["\n display: flex;\n align-items: center;\n\n "," {\n flex: 1;\n margin: 0 10px;\n }\n\n margin-top: 10px;\n"])),Rr),Br=p.V.button(wr||(wr=Object(a.f)(["\n background-color: transparent;\n color: rgba(255, 255, 255, 0.7490196078431373);\n text-transform: uppercase;\n border: 0;\n font-weight: bold;\n outline: none;\n cursor: pointer;\n &:hover {\n color: #ffffff;\n }\n"],["\n background-color: transparent;\n color: rgba(255, 255, 255, 0.7490196078431373);\n text-transform: uppercase;\n border: 0;\n font-weight: bold;\n outline: none;\n cursor: pointer;\n &:hover {\n color: #ffffff;\n }\n"]))),Ur=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:{activeExampleIdx:0}}),Object.defineProperty(t,"handleSampleChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){t.setState({activeExampleIdx:e.idx})}}),Object.defineProperty(t,"applyExample",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.console.formApi.setValue("body",t.getActiveSample())}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"getActiveSample",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.props.body.content;if(!e||!e.hasSample)return"";var t=Object.values(e.active&&e.active.examples||{});return t[this.state.activeExampleIdx]&&JSON.stringify(t[this.state.activeExampleIdx].value,null,2)||""}}),Object.defineProperty(t.prototype,"encodeSample",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?"application/x-www-form-urlencoded"===e.mime?e.value:JSON.stringify(e.value,null,2):""}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.state.activeExampleIdx,n=this.props.validate;return s.createElement(s.Fragment,null,s.createElement(p.n,{content:this.props.body.content,renderDropdown:this.renderDropdown},(function(r){var o,i=r.examples||{};e.props.resolvedBody&&(o=(e.props.resolvedBody.content[r.name]||{}).schema);var a=Object.values(i)[0],l=Object.keys(i).map((function(e,t){return{idx:t,value:i[e].summary||e}}));return s.createElement(s.Fragment,null,s.createElement(Dr,{id:"body"+e.props.id,field:"body",initialValue:e.encodeSample(a),schema:o,mode:r.name,validate:n}),l.length&&!(1===l.length&&"default"===l[0].value)&&s.createElement(Vr,null,s.createElement(Rr,{openUp:!0,options:l,value:l[t].value,onChange:e.handleSampleChange}),s.createElement(Br,{onClick:e.applyExample},"Use example"))||null)})))}}),Object.defineProperty(t.prototype,"renderDropdown",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return s.createElement(p.e,Object(a.a)({},e,{Label:zr,Dropdown:Rr}))}}),t}(s.Component),zr=p.V.div(kr||(kr=Object(a.f)(["\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin: 0 0 10px 0;\n display: block;\n color: rgba(255, 255, 255, 0.8);\n"],["\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin: 0 0 10px 0;\n display: block;\n color: rgba(255, 255, 255, 0.8);\n"]))),Wr=p.V.div(Cr||(Cr=Object(a.f)(["\n display: flex;\n font-size: 0.9em;\n"],["\n display: flex;\n font-size: 0.9em;\n"]))),Hr=p.V.div(Ar||(Ar=Object(a.f)(["\n background-color: #000000;\n padding: 5px 10px;\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n cursor: pointer;\n\n ","\n\n ","\n"],["\n background-color: #000000;\n padding: 5px 10px;\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n cursor: pointer;\n\n ","\n\n ","\n"])),(function(e){var t=e.active,n=e.theme;return t&&"background-color: "+n.colors.primary.main+";"||""}),(function(e){var t=e.disabled,n=e.theme;return t&&"\n color: "+n.colors.text.secondary+";\n cursor: default;\n "||""})),qr=p.V.span(Or||(Or=Object(a.f)(["\n display: inline-block;\n transform: rotateZ(180deg);\n"],["\n display: inline-block;\n transform: rotateZ(180deg);\n"]))),Gr=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(Wr,null,s.createElement(Hr,{onClick:function(){return t(0)},active:0===n},r?s.createElement(s.Fragment,null,s.createElement(qr,null,"➔")," Edit Request "):"Request"),s.createElement(Hr,{onClick:function(){return r&&t(1)},active:1===n,disabled:!r}," Response "))}}),t}(s.Component),$r=p.V.div(Sr||(Sr=Object(a.f)(["\n position: relative;\n"],["\n position: relative;\n"]))),Kr=p.V.span(Er||(Er=Object(a.f)(["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"],["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"])),(function(e){var t=e.theme;return Object(p.R)({color:t.rightPanel.textColor})})),Jr=Object(p.V)(L)(jr||(jr=Object(a.f)(["\n padding-right: 40px;\n"],["\n padding-right: 40px;\n"]))),Yr=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:{hidden:!0}}),Object.defineProperty(t,"toggle",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState({hidden:!t.state.hidden})}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.state.hidden;return s.createElement($r,null,s.createElement(Jr,Object(a.a)({},this.props,{type:e?"password":"text"})),s.createElement(Kr,{onClick:this.toggle}," ",e?"show":"hide"," "))}}),t}(s.Component),Xr=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.g)(o,[t]);else{var i=o.indexOf(t);r=Object(a.g)(o.slice(0,i),o.slice(i+1))}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(oo,null,a?s.createElement(no,null,s.createElement(ro,{onClick:function(){e.selectAll()}},"Select all"),s.createElement(ro,{onClick:function(){e.clearAll()}},"Clear")):null,s.createElement("div",null,p.map((function(t){return s.createElement(eo,{htmlFor:t,key:t,title:t},s.createElement(Zr,{type:"checkbox",id:t,name:t,value:t,checked:e.isFieldChecked(t),onChange:function(t){e.onCheckBoxClick(t),o&&r.validate()}}),t)})),n.length>f&&l?s.createElement(to,{onClick:function(){e.toggle()}},c?"Show all":"Collapse"):null),u?s.createElement(B,null,u):"")}}),t}(s.Component),Qr=Object(l.e)(Xr),Zr=p.V.input(Tr||(Tr=Object(a.f)(["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n"],["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n"]))),eo=p.V.label(Mr||(Mr=Object(a.f)(["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n width: 50%;\n margin-bottom: 4px;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n line-height: 20px;\n"],["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n width: 50%;\n margin-bottom: 4px;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n line-height: 20px;\n"]))),to=Object(p.V)(eo)(Pr||(Pr=Object(a.f)(["\n color: ",";\n float: right;\n\n &:hover {\n color: ",";\n }\n"],["\n color: ",";\n float: right;\n\n &:hover {\n color: ",";\n }\n"])),(function(e){var t=e.theme;return Object(M.e)(.05,t.colors.primary.main)}),(function(e){var t=e.theme;return Object(M.e)(.15,t.colors.primary.main)})),no=p.V.div(Lr||(Lr=Object(a.f)(["\n display: flex;\n margin-bottom: 4px;\n"],["\n display: flex;\n margin-bottom: 4px;\n"]))),ro=p.V.span(Fr||(Fr=Object(a.f)(["\n cursor: pointer;\n background-color: none;\n font-weight: normal;\n margin-right: 16px;\n font-size: 13px;\n\n &:hover {\n color: ",";\n }\n"],["\n cursor: pointer;\n background-color: none;\n font-weight: normal;\n margin-right: 16px;\n font-size: 13px;\n\n &:hover {\n color: ",";\n }\n"])),(function(e){var t=e.theme;return Object(M.e)(.15,t.colors.primary.main)})),oo=p.V.div(Ir||(Ir=Object(a.f)(["\n margin-top: 4px;\n"],["\n margin-top: 4px;\n"])));function io(e){var t=e.scopes,n=e.id,r=[];try{r=JSON.parse(Object(u.c)("auth."+n+".scopes"))}catch(e){}return t&&t.length?s.createElement(D,null,s.createElement(V,null," Scopes "),s.createElement(N,null,s.createElement(Qr,{field:"auth."+n+".scopes",initialValue:r,items:t,showControls:!0,trimItemsLength:!0}))):s.createElement(s.Fragment,null)}function ao(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function so(e){if(!e)return"Token is required"}var lo,co=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(u.i)("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,c,f,p,d,h;return Object(a.e)(this,(function(a){switch(a.label){case 0:if(this.state.loading)return[2];if(e=this.props.flow.tokenUrl,this.errors.client_id||this.errors.client_secret)return console.log("Provide client_id and client_secret"),[2];if(t=this.props.id,n=this.values.client_id||Object(u.c)("auth."+t+".client_id"),r=this.values.client_secret||Object(u.c)("auth."+t+".client_secret"),o=(this.values.scopes||[]).join(" "),!n||!r)return console.log("Provide client_id and client_secret"),[2];this.setState({loading:!0}),a.label=1;case 1:return a.trys.push([1,10,11,12]),[4,fetch(e.startsWith("http")?e:this.props.server+e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:ao({client_id:n,client_secret:r,grant_type:"client_credentials",scope:o})})];case 2:return(i=a.sent()).ok?[4,i.json()]:[3,4];case 3:return s=a.sent(),this.props.formApi.setValue("auth."+t+".token",s),this.state.error&&this.setState({error:""}),[3,9];case 4:return this.clearToken(),l=this.setState,c={},(i.headers.get("Content-Type")||"").indexOf("json")>-1?(d=(p=JSON).stringify,[4,i.json()]):[3,6];case 5:return f=d.apply(p,[a.sent()]),[3,8];case 6:return[4,i.text()];case 7:f=a.sent(),a.label=8;case 8:l.apply(this,[(c.error=f,c)]),a.label=9;case 9:return[3,12];case 10:return h=a.sent(),this.clearToken(),this.setState({error:h.message}),[3,12];case 11:return this.setState({loading:!1}),[7];case 12:return[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:!0,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:!0,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.id,i=Object.keys(this.props.flow.scopes),a=Object(u.c)("auth."+o+".token");return a=a?JSON.parse(a):"",s.createElement(s.Fragment,null,s.createElement(R,null,s.createElement(D,null,s.createElement(V,null,"Client ID:"),s.createElement(N,null,s.createElement(L,{field:"auth."+o+".client_id",initialValue:Object(u.c)("auth."+o+".client_id")}))),s.createElement(D,null,s.createElement(V,null,"Client Secret:"),s.createElement(N,null,s.createElement(Yr,{field:"auth."+o+".client_secret",initialValue:Object(u.c)("auth."+o+".client_secret")}))),s.createElement(L,{field:"auth."+o+".token",type:"hidden",initialValue:a,validate:so}),s.createElement(io,{id:o,scopes:i})),s.createElement(W,{onClick:this.requestToken,loading:t},t?"Loading...":"Request Token"),s.createElement(he,null," Access Token "),n?s.createElement(B,{style:{marginBottom:"1em"}},"Failed to request token: ",s.createElement("pre",null,n)):this.values.token&&this.values.token.access_token?s.createElement(ue,null,s.createElement(fe,{length:this.values.token.access_token.length,masked:r},this.values.token.access_token),s.createElement(pe,{onClick:this.toggleTokenMask},r?"Show":"Hide"),s.createElement(de,{onClick:this.clearToken}," Clear ")):s.createElement(B,{style:{marginBottom:"1em"}},"No token"))}}),t}(s.Component),uo=p.V.div(lo||(lo=Object(a.f)(["\n position: relative;\n height: 4px;\n display: block;\n width: 100%;\n background-color: #acece6;\n border-radius: 2px;\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: #26a69a;\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: #26a69a;\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: #acece6;\n border-radius: 2px;\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: #26a69a;\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: #26a69a;\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"]))),fo=function(){return s.createElement(uo,null,s.createElement("div",{className:"indeterminate"}))},po=function(){function e(){}return Object.defineProperty(e,"authorizeImplicit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n,r,o=t.url,i=t.clientId,s=t.scopes,l=void 0===s?[]:s,c=t.routingBasePath,u=t.redirectURI,f=t.successCallback,p=t.errorCallback,d=(n={date:(new Date).toString()},r=Object(a.a)({randomStr:ho()},n),btoa(JSON.stringify(r))),h=new URL(o),v="/"===c?"":c,g=""+window.location.origin+v+"/oauth2-redirect.html";h.searchParams.set("client_id",i),h.searchParams.set("redirect_uri",u||g),h.searchParams.set("response_type","token"),h.searchParams.set("state",d),h.searchParams.set("scope",l.join(" ")),window.redirectOAuth2={flow:"implicit",data:{url:o,clientId:i,scopes:l},state:d,successCallback:function(t){f(t),e.clearRedirectData()},errorCallback:function(t){p(t),e.clearRedirectData()}},window.open(h.toString())}}),Object.defineProperty(e,"clearRedirectData",{enumerable:!1,configurable:!0,writable:!0,value:function(){window.redirectOAuth2={flow:"implicit",data:{url:"",clientId:"",scopes:[]},state:"",successCallback:function(){},errorCallback:function(){}}}}),e}();new po;function ho(e){void 0===e&&(e=32);for(var t="";t.length<e;)t+=Math.random().toString(32).substring(2);return t.substring(0,e)}var vo,go,mo,yo=p.V.div(vo||(vo=Object(a.f)(["\n position: relative;\n"],["\n position: relative;\n"]))),bo=p.V.span(go||(go=Object(a.f)(["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"],["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"])),(function(e){var t=e.theme;return Object(p.R)({color:t.rightPanel.textColor})})),xo=Object(p.V)(L)(mo||(mo=Object(a.f)(["\n padding-right: 40px;\n"],["\n padding-right: 40px;\n"]))),wo=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:{hidden:!0}}),Object.defineProperty(t,"toggle",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState({hidden:!t.state.hidden})}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.state.hidden;return s.createElement(yo,null,s.createElement(xo,Object(a.a)({},this.props,{type:e?"password":"text"})),s.createElement(bo,{onClick:this.toggle}," ",e?"show":"hide"," "))}}),t}(s.Component);function ko(e){if(!e)return"Field is required"}var Co,Ao,Oo=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}}),Object.defineProperty(t,"clearToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.formApi.setValue("auth."+t.props.id+".token","")}}),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:!0,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:!0,configurable:!0}),Object.defineProperty(t.prototype,"handleAuthorize",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if(e&&(this.props.formApi.validate(),this.values.client_id)){this.setState({loading:!0,error:null});var n=this.props.formApi.getValue("auth."+this.props.id+".scopes");po.authorizeImplicit({url:e,clientId:this.values.client_id,scopes:n,redirectURI:this.context.oAuth2RedirectURI,routingBasePath:this.context.routingBasePath,successCallback:function(e){var n={access_token:e.accessToken,token_type:e.tokenType};t.setState({loading:!1,error:null}),t.props.formApi.setValue("auth."+t.props.id+".token",n)},errorCallback:function(e){t.setState({loading:!1,error:(null==e?void 0:e.message)||"Failed to retrieve the access token"})}})}}}),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}),po.clearRedirectData()}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t,n,r=this,o=this.state,i=o.error,a=o.loading,l=this.props,c=l.id,f=l.scopes,p=l.authorizationUrl;if(!p)return s.createElement(B,null,"No flow info");var d=Object(u.c)("auth."+c+".token");return d=d?JSON.parse(d):"",s.createElement("div",null,s.createElement(R,null,s.createElement(D,null,s.createElement(V,null," Client ID "),s.createElement(N,null,s.createElement(L,{field:"auth."+c+".client_id",initialValue:Object(u.c)("auth."+c+".client_id"),placeholder:"Your OAuth2 app Client ID",validate:ko,validateOnBlur:!0,validateOnChange:!0}),s.createElement("small",{style:{color:"red"}},null===(e=this.errors)||void 0===e?void 0:e.client_id))),s.createElement(L,{field:"auth."+c+".token",type:"hidden",initialValue:d,validate:ko}),s.createElement(io,{id:c,scopes:f}),this.values.token&&this.values.token.access_token?s.createElement(D,null,s.createElement(V,null," Access Token "),s.createElement(wo,{field:"",disabled:!0,initialValue:this.values.token.access_token})):null),s.createElement(Eo,null,this.values.token&&this.values.token.access_token?s.createElement(W,{onClick:function(){r.handleLogout()}},"Log out"):s.createElement(s.Fragment,null,a?s.createElement(s.Fragment,null,s.createElement(W,{onClick:function(){r.handleCancel()}},"Cancel"),s.createElement(fo,null)):s.createElement(W,{disabled:(null===(t=this.props)||void 0===t||null===(n=t.formApi)||void 0===n?void 0:n.getTouched("auth."+c+".client_id"))&&!this.values.client_id,onClick:function(){r.handleAuthorize(p)}},"Authorize"))),s.createElement(R,null,s.createElement(D,null,a?s.createElement(U,null,"Please, finish your authorization flow or cancel authorization."):i?s.createElement(s.Fragment,null,s.createElement(So,null,s.createElement(B,null,i))):this.values.token&&this.values.token.access_token?null:s.createElement(U,null," No Access Token. Please, Authorize. "))))}}),Object.defineProperty(t,"contextType",{enumerable:!0,configurable:!0,writable:!0,value:p.t}),t}(s.Component),So=p.V.div(Co||(Co=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"]))),Eo=p.V.div(Ao||(Ao=Object(a.f)(["\n margin-bottom: 15px;\n"],["\n margin-bottom: 15px;\n"])));function jo(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 To(e){var t,n=this,r=e.scheme,o=s.useState({}),i=o[0],l=o[1],c=s.useState(),u=c[0],f=c[1],p=s.useState(!1),d=p[0],h=p[1];s.useEffect((function(){v(r.openIdConnectUrl)}),[r.openIdConnectUrl]);var v=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:h(!0),f(""),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,jo(e)];case 2:return t=r.sent(),l(t),[3,4];case 3:return n=r.sent(),f(n.message),[3,4];case 4:return h(!1),[2]}}))}))};return s.createElement("div",null,d?s.createElement("div",null,s.createElement("div",null,"Fetching OpenID Conneсt metadata..."),s.createElement(fo,null)):s.createElement("div",null,u?s.createElement(B,null,u):s.createElement(s.Fragment,null,null!=i&&null!==(t=i.response_types_supported)&&void 0!==t&&t.includes("token")?s.createElement(s.Fragment,null,s.createElement(Po,null,"OAuth2 Implicit Flow"),s.createElement(Oo,{key:e.id,authorizationUrl:i.authorization_endpoint,scopes:i.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi})):s.createElement("div",null,"Unsupported flow"))))}var Mo,Po=p.V.div(Mo||(Mo=Object(a.f)(["\n margin-top: 5px;\n margin-bottom: 10px;\n"],["\n margin-top: 5px;\n margin-bottom: 10px;\n"]))),Lo=n(16);function Fo(e){if(!e)return"Field is required"}function Io(e){var t,n;if("cookie"===e.in)return t=e.name,(n=document.cookie.match("\\b"+t+"=([^;]*)\\b"))?n[1]:void 0}var _o=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(u.i)("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(u.c)("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.state.activeScheme,n=this.props.operation.security,r=this.props.form.errors,o=(void 0===r?{}:r).auth,i=n.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===i.length?null:s.createElement(s.Fragment,null,i.length>1&&s.createElement(Rr,{options:i,value:i[t].value,onChange:this.handleSchemeChange})||null,n[t].schemes.map((function(t){var n=t.id;if("apiKey"===t.type)return s.createElement(R,{key:n},s.createElement(D,{key:n},s.createElement(V,null," ",t.name,": "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n,validate:Fo,initialValue:Io(t)||Object(u.c)("auth."+n),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]?s.createElement(B,null,o[n]):"")));if("http"===t.type){if("basic"===t.scheme)return s.createElement(R,{key:n},s.createElement(D,null,s.createElement(V,null," ",Object(Lo.a)("tryItAuthBasicUsername"),": "),s.createElement(N,null,s.createElement(L,{field:"auth."+n+".username",validate:Fo,initialValue:Object(u.c)("auth."+n+".username"),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]&&o[n].username?s.createElement(B,null,o[n].username):"")),s.createElement(D,null,s.createElement(V,null," ",Object(Lo.a)("tryItAuthBasicPassword"),": "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n+".password",validate:Fo,initialValue:Object(u.c)("auth."+n+".password"),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]&&o[n].password?s.createElement(B,null,o[n].password):"")));if("bearer"===t.scheme)return s.createElement(R,{key:n},s.createElement(D,null,s.createElement(V,null," Bearer Token "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n,placeholder:"(without 'Bearer')",validate:Fo,initialValue:Object(u.c)("auth."+n),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]?s.createElement(B,null,o[n]):"")))}else{if("oauth2"===t.type&&t.flows&&t.flows.clientCredentials)return s.createElement(co,{key:n,flow:t.flows.clientCredentials,server:e.props.activeServer,id:n,form:e.props.form,formApi:e.props.formApi});var r,i;if("oauth2"===t.type&&t.flows&&t.flows.implicit)return s.createElement(Oo,{key:n,authorizationUrl:t.flows.implicit.authorizationUrl,scopes:Object.keys((null==t||null===(r=t.flows)||void 0===r||null===(i=r.implicit)||void 0===i?void 0:i.scopes)||{}),server:e.props.activeServer,id:n,form:e.props.form,formApi:e.props.formApi});if("oauth2"===t.type){var a=Object(u.c)("auth."+n+".token");return a=a?JSON.parse(a):{},s.createElement(R,{key:n},s.createElement(D,null,s.createElement(V,null," Access Token Type: "),s.createElement(N,null,s.createElement(L,{field:"auth."+n+".token.token_type",initialValue:a.token_type||"Bearer"}))),s.createElement(D,null,s.createElement(V,null," Access Token: "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n+".token.access_token",validate:Fo,initialValue:a.access_token,validateOnBlur:!0,validateOnChange:!0}),o&&o[n]&&o[n].token&&o[n].token.access_token?s.createElement(B,null,o[n].token.access_token):"")))}if("openIdConnect"===t.type)return s.createElement(To,{key:n,server:e.props.activeServer,id:n,form:e.props.form,formApi:e.props.formApi,scheme:t})}})),s.createElement("small",null,s.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))}}),t}(s.Component),No=n(527),Do=n.n(No),Ro=n(618),Vo=n.n(Ro),Bo=n(683),Uo=n.n(Bo),zo=n(23),Wo=n.n(zo),Ho=n(624),qo=n.n(Ho),Go=n(536),$o=n.n(Go),Ko=n(570),Jo=n.n(Ko),Yo=n(630),Xo=n.n(Yo),Qo=n(594),Zo=n.n(Qo),ei=n(634),ti=n.n(ei),ni=n(868),ri=n.n(ni),oi=n(872),ii=n.n(oi),ai=n(635),si=n.n(ai),li=n(544),ci=n.n(li),ui=n(534),fi=n.n(ui),pi=n(524),di=n.n(pi),hi=n(705),vi=n.n(hi),gi=n(545),mi=n.n(gi),yi=(n(890),n(891)),bi=n.n(yi),xi=n(136),wi=n.n(xi),ki=n(639),Ci=n.n(ki),Ai=n(585),Oi=n.n(Ai),Si=n(45),Ei=n(645),ji=n.n(Ei),Ti=n(646),Mi=n.n(Ti),Pi=n(932),Li=n.n(Pi),Fi=n(647),Ii=n.n(Fi),_i=n(945),Ni=n.n(_i),Di=n(951),Ri=n.n(Di),Vi=n(959),Bi=n.n(Vi),Ui=n(964),zi=function(e){var t=function(e,t){return{name:e,value:t}};return Oi()(e.prototype.set)||Oi()(e.prototype.get)||Oi()(e.prototype.getAll)||Oi()(e.prototype.has)?e:function(e){Ni()(r,e);var n=Ri()(r);function r(e){var t;return ji()(this,r),(t=n.call(this,e)).entryList=[],t}return Mi()(r,[{key:"append",value:function(e,n,o){return this.entryList.push(t(e,n)),Li()(Ii()(r.prototype),"append",this).call(this,e,n,o)}},{key:"set",value:function(e,n){var r,o=t(e,n);this.entryList=mi()(r=this.entryList).call(r,(function(t){return t.name!==e})),this.entryList.push(o)}},{key:"get",value:function(e){var t,n=Bi()(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 ci()(t=mi()(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(Ui).a),Wi=n(600),Hi=n.n(Wi),qi=n(546),Gi=n.n(qi),$i=n(45).Buffer,Ki=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},Ji=function(e){return/^[a-z0-9\-._~]+$/i.test(e)};function Yi(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):ci()(t=Hi()(e)).call(t,(function(e){var t,n;return Ji(e)||Ki(e)&&"unsafe"===r?e:ci()(t=ci()(n=$i.from(e).toJSON().data||[]).call(n,(function(e){var t;return Gi()(t="0".concat(e.toString(16).toUpperCase())).call(t,-2)}))).call(t,(function(e){return"%".concat(e)})).join("")})).join(""):e}function Xi(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 Yi(e,{escape:i})};if("simple"===r)return ci()(n).call(n,(function(e){return a(e)})).join(",");if("label"===r)return".".concat(ci()(n).call(n,(function(e){return a(e)})).join("."));if("matrix"===r)return ci()(n).call(n,(function(e){return a(e)})).reduce((function(e,n){var r,i,a;return!e||o?di()(i=di()(a="".concat(e||"",";")).call(a,t,"=")).call(i,n):di()(r="".concat(e,",")).call(r,n)}),"");if("form"===r){var s=o?"&".concat(t,"="):",";return ci()(n).call(n,(function(e){return a(e)})).join(s)}if("spaceDelimited"===r){var l=o?"".concat(t,"="):"";return ci()(n).call(n,(function(e){return a(e)})).join(" ".concat(l))}if("pipeDelimited"===r){var c=o?"".concat(t,"="):"";return ci()(n).call(n,(function(e){return a(e)})).join("|".concat(c))}return}(e):"object"===$o()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Yi(e,{escape:i})},s=fi()(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 di()(r=di()(i=di()(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 di()(r=di()(i=di()(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 di()(r=di()(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 di()(o=di()(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?di()(r="".concat(e)).call(r,o?"&":","):"",f=o?"=":",";return di()(i=di()(s=di()(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 Yi(e,{escape:i})};if("simple"===o)return a(r);if("label"===o)return".".concat(a(r));if("matrix"===o)return di()(t=";".concat(n,"=")).call(t,a(r));if("form"===o)return a(r);if("deepObject"===o)return a(r);return}(e)}var Qi={serializeRes:ra,mergeInQueryOrForm:ha};function Zi(e){return ea.apply(this,arguments)}function ea(){return(ea=Xo()(Zo.a.mark((function e(t){var n,r,o,i,a,s=arguments;return Zo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},"object"===$o()(t)&&(t=(n=t).url),n.headers=n.headers||{},Qi.mergeInQueryOrForm(n),n.headers&&fi()(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,Qi.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 ta=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function na(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):wi.a.safeLoad(e)}function ra(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:ia(e.headers)},a=i.headers["content-type"],s=o||ta(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=na(e,a);i.body=t,i.obj=t}catch(e){i.parseError=e}return i}))}function oa(e){return ti()(e).call(e,", ")?e.split(", "):e}function ia(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Oi()(ri()(e))?ii()(ri()(e).call(e)).reduce((function(e,t){var n=Jo()(t,2),r=n[0],o=n[1];return e[r]=oa(o),e}),{}):{}}function aa(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==$o()(e)||"string"!=typeof e.uri):"undefined"!=typeof File&&e instanceof File||("undefined"!=typeof Blob&&e instanceof Blob||(void 0!==Si.Buffer&&e instanceof Si.Buffer||null!==e&&"object"===$o()(e)&&"function"==typeof e.pipe))}function sa(e,t){return Array.isArray(e)&&e.some((function(e){return aa(e,t)}))}var la={form:",",spaceDelimited:"%20",pipeDelimited:"|"},ca={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function ua(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"!==$o()(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(aa(s)||sa(s))return[[c,s]];if(i)return fa(e,s,n,i);if(a){if([$o()(a.style),$o()(a.explode),$o()(a.allowReserved)].some((function(e){return"undefined"!==e})))return fa(e,s,n,Ci()(a,["style","explode","allowReserved"]));if(a.contentType){if("application/json"===a.contentType){var u="string"==typeof s?s:si()(s);return[[c,l(u)]]}return[[c,l(s.toString())]]}return"object"!==$o()(s)?[[c,l(s)]]:Array.isArray(s)&&s.every((function(e){return"object"!==$o()(e)}))?[[c,ci()(s).call(s,l).join(",")]]:[[c,l(si()(s))]]}return"object"!==$o()(s)?[[c,l(s)]]:Array.isArray(s)?"multi"===r?[[c,ci()(s).call(s,l)]]:[[c,ci()(s).call(s,l).join(ca[r||"csv"])]]:[[c,""]]}function fa(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 Yi(e,{escape:c})},f=n?function(e){return e}:function(e){return Yi(e,{escape:c})};return"object"!==$o()(t)?[[f(e),u(t)]]:Array.isArray(t)?l?[[f(e),ci()(t).call(t,u)]]:[[f(e),ci()(t).call(t,u).join(la[s])]]:"deepObject"===s?ci()(i=fi()(t)).call(i,(function(n){var r;return[f(di()(r="".concat(e,"[")).call(r,n,"]")),u(t[n])]})):l?ci()(a=fi()(t)).call(a,(function(e){return[f(e),u(t[e])]})):[[f(e),ci()(o=fi()(t)).call(o,(function(e){var n;return[di()(n="".concat(f(e),",")).call(n,u(t[e]))]})).join(",")]]}function pa(e){return vi()(e).reduce((function(e,t){var n,r=Jo()(t,2),o=r[0],i=r[1],a=qo()(ua(o,i,!0));try{for(a.s();!(n=a.n()).done;){var s=Jo()(n.value,2),l=s[0],c=s[1];if(Array.isArray(c)){var u,f=qo()(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 zi)}function da(e){var t=fi()(e).reduce((function(t,n){var r,o=qo()(ua(n,e[n]));try{for(o.s();!(r=o.n()).done;){var i=Jo()(r.value,2),a=i[0],s=i[1];t[a]=s}}catch(e){o.e(e)}finally{o.f()}return t}),{});return bi.a.stringify(t,{encode:!1,indices:!1})||""}function ha(){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=mi()(t).call(t,(function(e){return e})).join("&");return r?"?".concat(r):""};if(o){var a=fi()(o).some((function(e){var t=o[e].value;return aa(t)||sa(t)})),s=e.headers["content-type"]||e.headers["Content-Type"];a||/multipart\/form-data/i.test(s)?e.body=pa(e.form):e.body=da(o),delete e.form}if(r){var l=n.split("?"),c=Jo()(l,2),u=c[0],f=c[1],p="";if(f){var d=bi.a.parse(f),h=fi()(r);h.forEach((function(e){return delete d[e]})),p=bi.a.stringify(d,{encode:!0})}var v=i(p,da(r));e.url=u+v,delete e.query}return e}var va=n(573),ga=n.n(va),ma=n(710),ya=n.n(ma),ba=n(974),xa=n.n(ba),wa=n(979),ka=n.n(wa),Ca=n(1010),Aa=n.n(Ca),Oa=n(673),Sa=n.n(Oa),Ea=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)}}(),ja=Object.prototype.hasOwnProperty;function Ta(e,t){return ja.call(e,t)}function Ma(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)Ta(e,r)&&t.push(r);return t}function Pa(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function La(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 Fa(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Ia(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function _a(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 Na=function(e){function t(t,n,r,o,i){var a=this.constructor,s=e.call(this,_a(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=_a(t,{name:n,index:r,operation:o,tree:i}),s}return Ea(t,e),t}(Error),Da=Na,Ra=Pa,Va={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=Ua(n,this.path);r&&(r=Pa(r));var o=za(n,{op:"remove",path:this.from}).removed;return za(n,{op:"add",path:this.path,value:o}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=Ua(n,this.from);return za(n,{op:"add",path:this.path,value:Pa(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:$a(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Ba={add:function(e,t,n){return La(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:Va.move,copy:Va.copy,test:Va.test,_get:Va._get};function Ua(e,t){if(""==t)return e;var n={op:"_get",path:t};return za(e,n),n.value}function za(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):qa(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=Ua(e,t.from),"move"===t.op&&(a.removed=e),a;if("test"===t.op){if(a.test=$a(e,t.value),!1===a.test)throw new Da("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 Da("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",i,t,e);return a}r||(e=Pa(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:qa;;){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&&!La(p))throw new Da("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);La(p)&&(p=~~p)}if(c>=u){if(n&&"add"===t.op&&p>l.length)throw new Da("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=Ba[t.op].call(t,l,p,e)).test)throw new Da("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(p&&-1!=p.indexOf("~")&&(p=Ia(p)),c>=u){if(!1===(a=Va[t.op].call(t,l,p,e)).test)throw new Da("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}l=l[p]}}function Wa(e,t,n,r,o){if(void 0===r&&(r=!0),void 0===o&&(o=!0),n&&!Array.isArray(t))throw new Da("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Pa(e));for(var i=new Array(t.length),a=0,s=t.length;a<s;a++)i[a]=za(e,t[a],n,!0,o,a),e=i[a].newDocument;return i.newDocument=e,i}function Ha(e,t,n){var r=za(e,t);if(!1===r.test)throw new Da("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function qa(e,t,n,r){if("object"!=typeof e||null===e||Array.isArray(e))throw new Da("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(!Va[e.op])throw new Da("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 Da("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new Da('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 Da("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 Da("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=Ma(t),i=o.length;for(n=0;n<i;n++)if(e(t[o[n]]))return!0}return!1}(e.value))throw new Da("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 Da("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 Da("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=Ga([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new Da("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function Ga(e,t,n){try{if(!Array.isArray(e))throw new Da("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Wa(Pa(t),Pa(e),n||!0);else{n=n||qa;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(e){if(e instanceof Da)return e;throw e}}function $a(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(!$a(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(!$a(e[o=s[n]],t[o]))return!1;return!0}return e!=e&&t!=t}
42
+ */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}}},function(e,t,n){"use strict";n.r(t),n.d(t,"Console",(function(){return ic}));var r={};n.r(r),n.d(r,"JsonPatchError",(function(){return Ra})),n.d(r,"deepClone",(function(){return Da})),n.d(r,"getValueByPointer",(function(){return Ua})),n.d(r,"applyOperation",(function(){return za})),n.d(r,"applyPatch",(function(){return Wa})),n.d(r,"applyReducer",(function(){return Ha})),n.d(r,"validator",(function(){return qa})),n.d(r,"validate",(function(){return Ga})),n.d(r,"_areEquals",(function(){return $a}));var o={};n.r(o),n.d(o,"unobserve",(function(){return Xa})),n.d(o,"observe",(function(){return Qa})),n.d(o,"generate",(function(){return Za})),n.d(o,"compare",(function(){return ts}));var i={};n.r(i),n.d(i,"path",(function(){return Bl})),n.d(i,"query",(function(){return Ul})),n.d(i,"header",(function(){return Wl})),n.d(i,"cookie",(function(){return Hl}));var a=n(1),s=n(0),l=n(575),c=n(7),u=n(36),f=n(113),p=n(3),d=n(69);function h(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(s.Fragment,null,s.createElement(x,null,s.createElement("span",null,t,":"),l&&l.length?s.createElement(C,{value:n,options:l,onChange:function(e){return i(e.value)}}):s.createElement(w,{value:n,onChange:function(e){return i(e.target.value)},placeholder:a})),r&&s.createElement(k,null,r))}var v,g,m,y,b,x=p.V.div(v||(v=Object(a.f)(["\n display: flex;\n padding-top: 10px;\n"],["\n display: flex;\n padding-top: 10px;\n"]))),w=p.V.input(g||(g=Object(a.f)(["\n margin-left: 10px;\n flex: 1;\n ","\n"],["\n margin-left: 10px;\n flex: 1;\n ","\n"])),d.l),k=p.V.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"]))),C=Object(p.V)(p.h)(y||(y=Object(a.f)(["\n &.dropdown {\n flex: 1;\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"],["\n &.dropdown {\n flex: 1;\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"]))),A=p.V.div(b||(b=Object(a.f)(["\n display: flex;\n padding-top: 10px;\n"],["\n display: flex;\n padding-top: 10px;\n"]))),O=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,"handleChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var n=t.props.operation.servers.find((function(t){return t.url===e.serverUrl})),r=n&&T(n)||{};t.props.onChange(e.serverUrl),Object(u.i)("serverUrl",e.serverUrl),t.setState({variables:r})}}),Object.defineProperty(t,"handleVariableChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e,n){var r,o,i=Object(a.a)(Object(a.a)({},t.state.variables),((r={})[e]=n,r));t.setState({variables:i});var s=Object(u.c)("variables"),l=s&&JSON.parse(s)||{};Object(u.i)("variables",JSON.stringify(Object(a.a)(Object(a.a)({},l),((o={})[e]=n,o)))),t.props.onVarsChange(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(u.c)("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=this.props.operation.servers[this.state.activeIdx],t=T(e);this.props.onChange(e.url),this.props.onVarsChange(t),this.setState({variables:t})}}),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 "+j(E(t.url,e.state.variables),t.variables)+"\n - "+(t.description||"Default")+"\n "}})),r=Object.keys(this.state.variables);return s.createElement("div",null,s.createElement(A,null,s.createElement("span",null," Target: "),s.createElement(C,{openUp:!0,value:n[t].value,options:n,onChange:this.handleChange})),r.length?r.map((function(t){var n=e.props.operation.servers[e.state.activeIdx].variables[t];return s.createElement(h,{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)([c.a],t)}(s.Component),S=/(?:{)(\w+)(?:})/g;function E(e,t){return void 0===t&&(t={}),e.replace(S,(function(e,n){return t[n]||e}))}function j(e,t){return void 0===t&&(t={}),e.replace(S,(function(e,n){return t[n]&&t[n].default||e}))}function T(e){if(!e.variables)return{};var t=Object(u.c)("variables"),n=t&&JSON.parse(t)||{},r={};return Object.keys(e.variables).forEach((function(t){r[t]=e.variables[t].default||"",n.hasOwnProperty(t)&&(r[t]=n[t])})),Object(a.a)({},r)}var M=n(6),P=p.V.div(H||(H=Object(a.f)(["\n display: table;\n width: 100%;\n margin: 10px 0;\n"],["\n display: table;\n width: 100%;\n margin: 10px 0;\n"]))),L=Object(p.V)(l.d)(q||(q=Object(a.f)(["\n ",";\n width: 100%;\n"],["\n ",";\n width: 100%;\n"])),d.l),I=Object(p.V)(l.c)(G||(G=Object(a.f)(["\n ",";\n width: 100%;\n border-radius: 0;\n\n &&[multiple] {\n background: black;\n padding: 5px;\n border-radius: 5px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n }\n"],["\n ",";\n width: 100%;\n border-radius: 0;\n\n &&[multiple] {\n background: black;\n padding: 5px;\n border-radius: 5px;\n border: 1px solid rgba(255, 255, 255, 0.4);\n }\n"])),d.l),F=l.b,_=p.V.div($||($=Object(a.f)(["\n color: #969a9a;\n font-size: 1em;\n font-weight: normal;\n text-align: left;\n position: absolute;\n"],["\n color: #969a9a;\n font-size: 1em;\n font-weight: normal;\n text-align: left;\n position: absolute;\n"]))),N=p.V.div(K||(K=Object(a.f)(["\n display: table-cell;\n width: 100%;\n vertical-align: middle;\n padding: 2px 0;\n"],["\n display: table-cell;\n width: 100%;\n vertical-align: middle;\n padding: 2px 0;\n"]))),R=p.V.div(J||(J=Object(a.f)(["\n display: table-row;\n margin-bottom: 10px;\n"],["\n display: table-row;\n margin-bottom: 10px;\n"]))),D=p.V.div(Y||(Y=Object(a.f)(["\n display: table;\n width: 100%;\n margin-bottom: 20px;\n"],["\n display: table;\n width: 100%;\n margin-bottom: 20px;\n"]))),V=p.V.label(X||(X=Object(a.f)(["\n padding: 5px 10px 5px 0;\n display: table-cell;\n max-width: 50%;\n white-space: nowrap;\n"],["\n padding: 5px 10px 5px 0;\n display: table-cell;\n max-width: 50%;\n white-space: nowrap;\n"]))),B=p.V.div(Q||(Q=Object(a.f)(["\n color: ",";\n font-size: 0.9em;\n & pre {\n word-break: break-word;\n white-space: pre-wrap;\n }\n"],["\n color: ",";\n font-size: 0.9em;\n & pre {\n word-break: break-word;\n white-space: pre-wrap;\n }\n"])),(function(e){return e.theme.colors.error.main})),U=p.V.div(Z||(Z=Object(a.f)(["\n color: ",";\n font-size: 0.9em;\n"],["\n color: ",";\n font-size: 0.9em;\n"])),(function(e){return e.theme.colors.warning.main})),z=Object(p.N)(ee||(ee=Object(a.f)(["\n animation: "," 1.2s infinite;\n"],["\n animation: "," 1.2s infinite;\n"])),d.k),W=p.V.div(re||(re=Object(a.f)(["\n background-color: ",";\n border: 0;\n font-size: 14px;\n padding: 5px 10px;\n color: white;\n font-weight: bold;\n text-align: center;\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n ","\n\n ","\n"],["\n background-color: ",";\n border: 0;\n font-size: 14px;\n padding: 5px 10px;\n color: white;\n font-weight: bold;\n text-align: center;\n cursor: pointer;\n user-select: none;\n\n &:hover {\n background-color: ",";\n }\n\n &:active {\n background-color: ",";\n }\n\n ","\n\n ","\n"])),(function(e){return e.theme.colors.primary.main}),(function(e){var t=e.theme;return Object(M.e)(.1,t.colors.primary.main)}),(function(e){var t=e.theme;return Object(M.a)(.05,t.colors.primary.main||"")}),(function(e){return e.loading&&Object(p.N)(te||(te=Object(a.f)(["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n ","\n }\n "],["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n ","\n }\n "])),z)||""}),(function(e){return e.disabled&&Object(p.N)(ne||(ne=Object(a.f)(["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n }\n "],["\n cursor: default;\n &,\n &:hover,\n &:active {\n background-color: #586065;\n }\n "])))||""}));var H,q,G,$,K,J,Y,X,Q,Z,ee,te,ne,re,oe,ie,ae,se,le,ce,ue=p.V.div(oe||(oe=Object(a.f)(["\n display: flex;\n position: relative;\n margin-bottom: 1em;\n"],["\n display: flex;\n position: relative;\n margin-bottom: 1em;\n"]))),fe=p.V.code(ie||(ie=Object(a.f)(["\n flex: 1;\n overflow-wrap: anywhere;\n ","\n"],["\n flex: 1;\n overflow-wrap: anywhere;\n ","\n"])),(function(e){var t=e.masked,n=e.length;return t&&"\n color: transparent;\n\n &:before {\n content: "+function(e,t){for(var n="",r=0;r<e;r++)n+=t;return'"'+n+'"'}(n,"*")+";\n color: white;\n position: absolute;\n right: 100px;\n }\n "||""})),pe=p.V.span(ae||(ae=Object(a.f)(["\n padding: 0 5px;\n cursor: pointer;\n"],["\n padding: 0 5px;\n cursor: pointer;\n"]))),de=Object(p.V)(pe)(se||(se=Object(a.f)(["\n color: ",";\n"],["\n color: ",";\n"])),(function(e){return e.theme.colors.error.main})),he=p.V.div(le||(le=Object(a.f)(["\n font-weight: bold;\n font-size: 1.2em;\n margin: 1em 0;\n"],["\n font-weight: bold;\n font-size: 1.2em;\n margin: 1em 0;\n"])));!function(e){e.ARRAY="array",e.OBJECT="object"}(ce||(ce={}));var ve=function(e){return"("+e.schema.type+")"+(e.example?" "+e.example:"")},ge=p.V.span(me||(me=Object(a.f)(["\n color: ",";\n"],["\n color: ",";\n"])),(function(e){return e.theme.colors.error.main}));var me,ye=["path","query","cookie","header"];function be(e){function t(t,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===ce.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=e.values,i=Array.isArray(n.schema.enum)&&n.schema.enum.length?n.schema.enum:void 0,a=function(e){if(e.schema.type===ce.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),l=n.schema.type===ce.ARRAY;return i?s.createElement(I,{id:t,field:t,placeholder:ve(n),validate:r,initialValue:a||Object(u.d)(o,t),validateOnBlur:!0,validateOnChange:!0,multiple:l,onChange:e.onChange},!a&&!n.required&&!l&&s.createElement(F,{value:""},"--"),i.map((function(e,t){return s.createElement(F,{key:t,value:e},e)}))):s.createElement(L,{id:t,field:t,placeholder:ve(n),validate:r,initialValue:a||Object(u.d)(o,t),validateOnBlur:!0,validateOnChange:!0,onChange:e.onChange})}function n(r,o,i){var l,c,f,p,d,h=i?Object(u.b)(i,r.name):r.name,v=(l=r.schema,c=l.oneOfType,f=l.type,p=l.items,c||f===ce.ARRAY&&(null==p?void 0:p.type)===ce.OBJECT&&"Array of objects");if(v&&console.warn('Unsupported parameter definition: "'+v+'"'),r.schema.type===ce.OBJECT)return null===(d=r.schema.fields)||void 0===d?void 0:d.map((function(e){return n(e,o,h)}));var g=i?[o,i]:[r.in],m=u.b.apply(void 0,Object(a.g)(g,[r.name])),y=(e.errors[o]||{})[r.name];return s.createElement(R,{key:m},s.createElement(V,null,h,r.required&&s.createElement(ge,null," * ")),v?s.createElement(U,null,"Unsupported field schema definition"):s.createElement(N,null,t(m,r),y?s.createElement(B,null,y):""))}var r,o,i=e.operation,l=(r=i.parameters||[],o={},r.forEach((function(e){var t,n,r;t=o,n=e.in,r=e,t[n]||(t[n]=[]),t[n].push(r)})),o);return s.createElement(P,null,ye.map((function(e){return function(e,t){return t&&t.length?s.createElement(s.Fragment,{key:e},s.createElement(R,null,s.createElement(_,null," # ",e," parameters "),s.createElement("span",null," ")),t.map((function(t){return n(t,e)}))):null}(e,l[e])})))}function xe(e,t,n){var r=t.path||{},o=t.query||{},i=Object.keys(o),a=E(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(p.U)(t,o[e]):e+"="+encodeURIComponent(o[e])})).filter(Boolean).join("&")),a}var we,ke,Ce,Ae,Oe,Se,Ee,je,Te,Me,Pe,Le=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return Object.defineProperty(t,"handleExecute",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.loading||t.props.onExecute()}}),t}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.loading,n=e.operation,r=e.params,o=void 0===r?{}:r,i=e.hasResponse;return s.createElement(d.b,null,s.createElement(d.h,null,s.createElement(d.i,{type:n.httpVerb},n.httpVerb.toUpperCase())," ",s.createElement(d.g,null,xe(n.path,o,n.parameters))),s.createElement(d.a,{isLoading:t,onClick:this.handleExecute},t?"Sending...":i?"Resend":"Send"))}}),t}(s.PureComponent),Ie=n(71),Fe=Object(p.V)(Ie.d)(we||(we=Object(a.f)(["\n > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n\n > li {\n padding: 5px 10px;\n display: inline-block;\n\n background-color: rgba(0, 0, 0, 0.2);\n cursor: pointer;\n text-align: center;\n outline: none;\n color: #ccc;\n margin: 5px;\n border: 1px solid #181f22;\n border-radius: 5px;\n min-width: 60px;\n font-size: 0.9em;\n font-weight: bold;\n\n &.react-tabs__tab--selected {\n color: ",";\n background: #e2e2e2;\n }\n\n &:only-child {\n flex: none;\n min-width: 100px;\n }\n\n &.tab-success {\n color: ",";\n }\n\n &.tab-redirect {\n color: ",";\n }\n\n &.tab-info {\n color: ",";\n }\n\n &.tab-error {\n color: ",";\n }\n }\n }\n\n > .react-tabs__tab-panel {\n display: none;\n }\n\n > .react-tabs__tab-panel--selected {\n background: #171e21;\n padding: 20px;\n margin: 0;\n display: flex;\n flex-direction: column;\n\n flex: 1;\n }\n"],["\n > ul {\n list-style: none;\n padding: 0;\n margin: 0;\n\n > li {\n padding: 5px 10px;\n display: inline-block;\n\n background-color: rgba(0, 0, 0, 0.2);\n cursor: pointer;\n text-align: center;\n outline: none;\n color: #ccc;\n margin: 5px;\n border: 1px solid #181f22;\n border-radius: 5px;\n min-width: 60px;\n font-size: 0.9em;\n font-weight: bold;\n\n &.react-tabs__tab--selected {\n color: ",";\n background: #e2e2e2;\n }\n\n &:only-child {\n flex: none;\n min-width: 100px;\n }\n\n &.tab-success {\n color: ",";\n }\n\n &.tab-redirect {\n color: ",";\n }\n\n &.tab-info {\n color: ",";\n }\n\n &.tab-error {\n color: ",";\n }\n }\n }\n\n > .react-tabs__tab-panel {\n display: none;\n }\n\n > .react-tabs__tab-panel--selected {\n background: #171e21;\n padding: 20px;\n margin: 0;\n display: flex;\n flex-direction: column;\n\n flex: 1;\n }\n"])),(function(e){return e.theme.colors.text.primary}),(function(e){return e.theme.colors.responses.success.color}),(function(e){return e.theme.colors.responses.redirect.color}),(function(e){return e.theme.colors.responses.info.color}),(function(e){return e.theme.colors.responses.error.color})),_e=Ie.a,Ne=p.V.span(ke||(ke=Object(a.f)(["\n","\n","\n"],["\n","\n","\n"])),(function(e){var t=e.error,n=e.theme;return t&&"\n color: "+n.colors.error.main+" !important;\n"||""}),(function(e){var t=e.success,n=e.theme;return t&&"\ncolor: "+n.colors.success.main+" !important;\n"||""})),Re=Object(p.V)(Fe)(Ce||(Ce=Object(a.f)(["\n > ul {\n display: block;\n > li {\n padding: 2px 10px;\n min-width: auto;\n margin: 0;\n font-size: 13px;\n font-weight: normal;\n color: #c2c2c2;\n border-radius: 0;\n background: none;\n\n &:last-child {\n margin-right: 0;\n }\n\n &.react-tabs__tab--selected {\n color: #ffffff;\n background: none;\n border-bottom: 1px solid #6abe5b;\n }\n\n &.react-tabs__tab--disabled {\n color: #717171;\n cursor: default;\n }\n }\n }\n > .react-tabs__tab-panel--selected {\n padding: 10px;\n }\n"],["\n > ul {\n display: block;\n > li {\n padding: 2px 10px;\n min-width: auto;\n margin: 0;\n font-size: 13px;\n font-weight: normal;\n color: #c2c2c2;\n border-radius: 0;\n background: none;\n\n &:last-child {\n margin-right: 0;\n }\n\n &.react-tabs__tab--selected {\n color: #ffffff;\n background: none;\n border-bottom: 1px solid #6abe5b;\n }\n\n &.react-tabs__tab--disabled {\n color: #717171;\n cursor: default;\n }\n }\n }\n > .react-tabs__tab-panel--selected {\n padding: 10px;\n }\n"]))),De=p.V.div(Ae||(Ae=Object(a.f)(["\n margin-bottom: 10px;\n"],["\n margin-bottom: 10px;\n"]))),Ve=p.V.div(Oe||(Oe=Object(a.f)(["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n border-radius: 10px;\n color: ",";\n\n span {\n color: ",";\n }\n"],["\n display: inline-block;\n margin-right: 20px;\n padding: 2px 0;\n text-align: center;\n border-radius: 10px;\n color: ",";\n\n span {\n color: ",";\n }\n"])),(function(e){return e.theme.colors.primary.light}),(function(e){return e.theme.colors.text.secondary})),Be=Object(p.V)(Ve)(Se||(Se=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.success.light:n>=300&&n<400?t.colors.warning.light:n>400?t.colors.error.light:t.colors.responses.info.color})),Ue=p.V.strong(Ee||(Ee=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"]))),ze=p.V.header(je||(je=Object(a.f)(["\n font-weight: bold;\n margin-bottom: 10px;\n"],["\n font-weight: bold;\n margin-bottom: 10px;\n"]))),We=p.V.code(Te||(Te=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"]))),He=p.V.pre(Me||(Me=Object(a.f)(["\n overflow: auto;\n font-size: 0.9em;\n"],["\n overflow: auto;\n font-size: 0.9em;\n"]))),qe=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.error,n=e.response,r=e.time,o=n||t&&t.response,i=o&&o.data&&o.data.length||0,a="";if(a=i>1e6?(i/1e6).toFixed(2)+" MB":i>1e3?(i/1e3).toFixed(2)+" KB":i+" B",t&&!t.response||!o)return s.createElement(s.Fragment,null,s.createElement(ze,null," Could not get any response "),s.createElement(We,null,t&&t.message||"Unknown error"),s.createElement("br",null),s.createElement(ze,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(!o)return"Something went wrong";var l=Object.keys(o.headers);return s.createElement(s.Fragment,null,s.createElement(De,null,s.createElement(Be,{code:o.status},s.createElement("span",null," Status: "),o.status," ",o.statusText),s.createElement(Ve,null," ",s.createElement("span",null," Time: "),r,"ms"),s.createElement(Ve,null," ",s.createElement("span",null," Size: "),a)),s.createElement(Re,{forceRenderTabPanel:!0},s.createElement(Ie.b,null,s.createElement(_e,{key:"body"},"Body"),s.createElement(_e,{key:"headers"}," Headers ")),s.createElement(Ie.c,{key:"body"},o.body&&s.createElement(p.j,{data:o.body})||null,!o.body&&null!=o.data&&s.createElement(He,null,o.data?s.createElement("code",null,o.data):s.createElement("i",null,"no content"))||null),s.createElement(Ie.c,{key:"auth"},l.map((function(e){return s.createElement("div",{key:e},s.createElement(Ue,{style:{textTransform:"capitalize"}},e,":"),s.createElement("code",null," ",o.headers[e]))})))))}}),t}(s.PureComponent),Ge=n(725),$e=n(537);function Ke(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(Je(t)){do{r++,o+=String.fromCharCode(t),t=e.charCodeAt(r)}while(Je(t));return a=15}if(Ye(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(Ye(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&&!Ye(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++,Ye(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||!Xe(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&&Xe(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r)){if(!(++r<e.length&&Xe(e.charCodeAt(r))))return f=3,e.substring(t,r);for(r++;r<e.length&&Xe(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&&Xe(e.charCodeAt(r))){for(r++;r<e.length&&Xe(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(Je(e)||Ye(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 Je(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 Ye(e){return 10===e||13===e||8232===e||8233===e}function Xe(e){return e>=48&&e<=57}function Qe(e,t,n){var r,o,i,a,s;if(t){for(a=t.offset,s=a+t.length,i=a;i>0&&!et(e,i-1);)i--;for(var l=s;l<e.length&&!et(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?Ze(" ",n.tabSize||4):"\t";var d=Ke(o,!1),h=!1;function v(){return u+Ze(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(Ze(c,r),i,x)}for(;17!==b;){for(var w=d.getTokenOffset()+d.getTokenLength()+i,k=g(),C="";!f&&(12===k||13===k);){y(" ",w,d.getTokenOffset()+i),w=d.getTokenOffset()+d.getTokenLength()+i,C=12===k?v():"",k=g()}if(2===k)1!==b&&(p--,C=v());else if(4===k)3!==b&&(p--,C=v());else{switch(b){case 3:case 1:p++,C=v();break;case 5:case 12:C=v();break;case 13:C=f?v():" ";break;case 6:C=" ";break;case 10:if(6===k){C="";break}case 7:case 8:case 9:case 11:case 2:case 4:12===k||13===k?C=" ":5!==k&&17!==k&&(h=!0);break;case 16:h=!0}!f||12!==k&&13!==k||(C=v())}y(C,w,d.getTokenOffset()+i),b=k}return m}function Ze(e,t){for(var n="",r=0;r<t;r++)n+=e;return n}function et(e,t){return-1!=="\r\n".indexOf(e.charAt(t))}function tt(e,t,n){void 0===n&&(n=Pe.DEFAULT);var r=Ke(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}}(Pe||(Pe={}));var nt,rt,ot,it,at,st,lt,ct,ut,ft,pt,dt,ht,vt,gt,mt,yt,bt,xt,wt,kt,Ct,At,Ot,St,Et,jt=Ke,Tt=function(e,t,n){void 0===t&&(t=[]),void 0===n&&(n=Pe.DEFAULT);var r=null,o=[],i=[];function a(e){Array.isArray(o)?o.push(e):null!==r&&(o[r]=e)}return tt(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]},Mt=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}},Pt=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},Lt=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 It(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(!It(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(),!It(o,i))return!1;for(n=0;n<o.length;n++)if(!It(e[o[n]],t[o[n]]))return!1}return!0}function Ft(e){return"number"==typeof e}function _t(e){return void 0!==e}function Nt(e){return"boolean"==typeof e}!function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647}(nt||(nt={})),function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647}(rt||(rt={})),function(e){e.create=function(e,t){return e===Number.MAX_VALUE&&(e=rt.MAX_VALUE),t===Number.MAX_VALUE&&(t=rt.MAX_VALUE),{line:e,character:t}},e.is=function(e){var t=e;return mn.objectLiteral(t)&&mn.uinteger(t.line)&&mn.uinteger(t.character)}}(ot||(ot={})),function(e){e.create=function(e,t,n,r){if(mn.uinteger(e)&&mn.uinteger(t)&&mn.uinteger(n)&&mn.uinteger(r))return{start:ot.create(e,t),end:ot.create(n,r)};if(ot.is(e)&&ot.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 mn.objectLiteral(t)&&ot.is(t.start)&&ot.is(t.end)}}(it||(it={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return mn.defined(t)&&it.is(t.range)&&(mn.string(t.uri)||mn.undefined(t.uri))}}(at||(at={})),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 mn.defined(t)&&it.is(t.targetRange)&&mn.string(t.targetUri)&&(it.is(t.targetSelectionRange)||mn.undefined(t.targetSelectionRange))&&(it.is(t.originSelectionRange)||mn.undefined(t.originSelectionRange))}}(st||(st={})),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 mn.numberRange(t.red,0,1)&&mn.numberRange(t.green,0,1)&&mn.numberRange(t.blue,0,1)&&mn.numberRange(t.alpha,0,1)}}(lt||(lt={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return it.is(t.range)&&lt.is(t.color)}}(ct||(ct={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return mn.string(t.label)&&(mn.undefined(t.textEdit)||bt.is(t))&&(mn.undefined(t.additionalTextEdits)||mn.typedArray(t.additionalTextEdits,bt.is))}}(ut||(ut={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(ft||(ft={})),function(e){e.create=function(e,t,n,r,o){var i={startLine:e,endLine:t};return mn.defined(n)&&(i.startCharacter=n),mn.defined(r)&&(i.endCharacter=r),mn.defined(o)&&(i.kind=o),i},e.is=function(e){var t=e;return mn.uinteger(t.startLine)&&mn.uinteger(t.startLine)&&(mn.undefined(t.startCharacter)||mn.uinteger(t.startCharacter))&&(mn.undefined(t.endCharacter)||mn.uinteger(t.endCharacter))&&(mn.undefined(t.kind)||mn.string(t.kind))}}(pt||(pt={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return mn.defined(t)&&at.is(t.location)&&mn.string(t.message)}}(dt||(dt={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(ht||(ht={})),function(e){e.Unnecessary=1,e.Deprecated=2}(vt||(vt={})),function(e){e.is=function(e){var t=e;return null!=t&&mn.string(t.href)}}(gt||(gt={})),function(e){e.create=function(e,t,n,r,o,i){var a={range:e,message:t};return mn.defined(n)&&(a.severity=n),mn.defined(r)&&(a.code=r),mn.defined(o)&&(a.source=o),mn.defined(i)&&(a.relatedInformation=i),a},e.is=function(e){var t,n=e;return mn.defined(n)&&it.is(n.range)&&mn.string(n.message)&&(mn.number(n.severity)||mn.undefined(n.severity))&&(mn.integer(n.code)||mn.string(n.code)||mn.undefined(n.code))&&(mn.undefined(n.codeDescription)||mn.string(null===(t=n.codeDescription)||void 0===t?void 0:t.href))&&(mn.string(n.source)||mn.undefined(n.source))&&(mn.undefined(n.relatedInformation)||mn.typedArray(n.relatedInformation,dt.is))}}(mt||(mt={})),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 mn.defined(n)&&n.length>0&&(o.arguments=n),o},e.is=function(e){var t=e;return mn.defined(t)&&mn.string(t.title)&&mn.string(t.command)}}(yt||(yt={})),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 mn.objectLiteral(t)&&mn.string(t.newText)&&it.is(t.range)}}(bt||(bt={})),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&&mn.objectLiteral(t)&&mn.string(t.label)&&(mn.boolean(t.needsConfirmation)||void 0===t.needsConfirmation)&&(mn.string(t.description)||void 0===t.description)}}(xt||(xt={})),function(e){e.is=function(e){return"string"==typeof e}}(wt||(wt={})),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 bt.is(t)&&(xt.is(t.annotationId)||wt.is(t.annotationId))}}(kt||(kt={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return mn.defined(t)&&Vt.is(t.textDocument)&&Array.isArray(t.edits)}}(Ct||(Ct={})),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&&mn.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||mn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||mn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||wt.is(t.annotationId))}}(At||(At={})),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&&mn.string(t.oldUri)&&mn.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||mn.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||mn.boolean(t.options.ignoreIfExists)))&&(void 0===t.annotationId||wt.is(t.annotationId))}}(Ot||(Ot={})),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&&mn.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||mn.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||mn.boolean(t.options.ignoreIfNotExists)))&&(void 0===t.annotationId||wt.is(t.annotationId))}}(St||(St={})),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 mn.string(e.kind)?At.is(e)||Ot.is(e)||St.is(e):Ct.is(e)})))}}(Et||(Et={}));var Rt,Dt,Vt,Bt,Ut,zt,Wt,Ht,qt,Gt,$t,Kt,Jt,Yt,Xt,Qt,Zt,en,tn,nn,rn,on,an,sn,ln,cn,un,fn,pn,dn,hn=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=bt.insert(e,t):wt.is(n)?(o=n,r=kt.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=kt.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=bt.replace(e,t):wt.is(n)?(o=n,r=kt.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),o=this.changeAnnotations.manage(n),r=kt.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=bt.del(e):wt.is(t)?(r=t,n=kt.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=kt.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}(),vn=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(wt.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 vn(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach((function(e){if(Ct.is(e)){var n=new hn(e.edits,t._changeAnnotations);t._textEditChanges[e.textDocument.uri]=n}}))):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new hn(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(Vt.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 hn(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 hn(o),this._textEditChanges[e]=r}return r},e.prototype.initDocumentChanges=function(){void 0===this._workspaceEdit.documentChanges&&void 0===this._workspaceEdit.changes&&(this._changeAnnotations=new vn,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(xt.is(t)||wt.is(t)?r=t:n=t,void 0===r?o=At.create(e,n):(i=wt.is(r)?r:this._changeAnnotations.manage(r),o=At.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(xt.is(n)||wt.is(n)?o=n:r=n,void 0===o?i=Ot.create(e,t,r):(a=wt.is(o)?o:this._changeAnnotations.manage(o),i=Ot.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(xt.is(t)||wt.is(t)?r=t:n=t,void 0===r?o=St.create(e,n):(i=wt.is(r)?r:this._changeAnnotations.manage(r),o=St.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 mn.defined(t)&&mn.string(t.uri)}}(Rt||(Rt={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return mn.defined(t)&&mn.string(t.uri)&&mn.integer(t.version)}}(Dt||(Dt={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return mn.defined(t)&&mn.string(t.uri)&&(null===t.version||mn.integer(t.version))}}(Vt||(Vt={})),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 mn.defined(t)&&mn.string(t.uri)&&mn.string(t.languageId)&&mn.integer(t.version)&&mn.string(t.text)}}(Bt||(Bt={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(Ut||(Ut={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(Ut||(Ut={})),function(e){e.is=function(e){var t=e;return mn.objectLiteral(e)&&Ut.is(t.kind)&&mn.string(t.value)}}(zt||(zt={})),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}(Wt||(Wt={})),function(e){e.PlainText=1,e.Snippet=2}(Ht||(Ht={})),function(e){e.Deprecated=1}(qt||(qt={})),function(e){e.create=function(e,t,n){return{newText:e,insert:t,replace:n}},e.is=function(e){var t=e;return t&&mn.string(t.newText)&&it.is(t.insert)&&it.is(t.replace)}}(Gt||(Gt={})),function(e){e.asIs=1,e.adjustIndentation=2}($t||($t={})),function(e){e.create=function(e){return{label:e}}}(Kt||(Kt={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(Jt||(Jt={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return mn.string(t)||mn.objectLiteral(t)&&mn.string(t.language)&&mn.string(t.value)}}(Yt||(Yt={})),function(e){e.is=function(e){var t=e;return!!t&&mn.objectLiteral(t)&&(zt.is(t.contents)||Yt.is(t.contents)||mn.typedArray(t.contents,Yt.is))&&(void 0===e.range||it.is(e.range))}}(Xt||(Xt={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(Qt||(Qt={})),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 mn.defined(t)&&(o.documentation=t),mn.defined(n)?o.parameters=n:o.parameters=[],o}}(Zt||(Zt={})),function(e){e.Text=1,e.Read=2,e.Write=3}(en||(en={})),function(e){e.create=function(e,t){var n={range:e};return mn.number(t)&&(n.kind=t),n}}(tn||(tn={})),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}(nn||(nn={})),function(e){e.Deprecated=1}(rn||(rn={})),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}}(on||(on={})),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&&mn.string(t.name)&&mn.number(t.kind)&&it.is(t.range)&&it.is(t.selectionRange)&&(void 0===t.detail||mn.string(t.detail))&&(void 0===t.deprecated||mn.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}}(an||(an={})),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"}(sn||(sn={})),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 mn.defined(t)&&mn.typedArray(t.diagnostics,mt.is)&&(void 0===t.only||mn.typedArray(t.only,mn.string))}}(ln||(ln={})),function(e){e.create=function(e,t,n){var r={title:e},o=!0;return"string"==typeof t?(o=!1,r.kind=t):yt.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&&mn.string(t.title)&&(void 0===t.diagnostics||mn.typedArray(t.diagnostics,mt.is))&&(void 0===t.kind||mn.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||yt.is(t.command))&&(void 0===t.isPreferred||mn.boolean(t.isPreferred))&&(void 0===t.edit||Et.is(t.edit))}}(cn||(cn={})),function(e){e.create=function(e,t){var n={range:e};return mn.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return mn.defined(t)&&it.is(t.range)&&(mn.undefined(t.command)||yt.is(t.command))}}(un||(un={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return mn.defined(t)&&mn.uinteger(t.tabSize)&&mn.boolean(t.insertSpaces)}}(fn||(fn={})),function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return mn.defined(t)&&it.is(t.range)&&(mn.undefined(t.target)||mn.string(t.target))}}(pn||(pn={})),function(e){e.create=function(e,t){return{range:e,parent:t}},e.is=function(t){var n=t;return void 0!==n&&it.is(n.range)&&(void 0===n.parent||e.is(n.parent))}}(dn||(dn={}));var gn;!function(e){e.create=function(e,t,n,r){return new yn(e,t,n,r)},e.is=function(e){var t=e;return!!(mn.defined(t)&&mn.string(t.uri)&&(mn.undefined(t.languageId)||mn.string(t.languageId))&&mn.uinteger(t.lineCount)&&mn.func(t.getText)&&mn.func(t.positionAt)&&mn.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}}(gn||(gn={}));var mn,yn=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 ot.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 ot.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)}}(mn||(mn={}));var bn,xn,wn,kn=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=An(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=Cn(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=Cn(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 Cn(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 An(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 On(e){var t=An(e.range);return t!==e.range?{newText:e.newText,range:t}:e}!function(e){e.create=function(e,t,n,r){return new kn(e,t,n,r)},e.update=function(e,t,n){if(e instanceof kn)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(On),(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("")}}(bn||(bn={})),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"}(xn||(xn={})),(wn||(wn={})).LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ut.Markdown,Ut.PlainText],commitCharactersSupport:!0}}}};var Sn,En,jn=(Sn=function(e,t){return(Sn=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}Sn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Tn={"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,}))$/}},Mn=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}(),Pn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="null",r.value=null,r}return jn(t,e),t}(Mn),Ln=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.type="boolean",o.value=n,o}return jn(t,e),t}(Mn),In=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="array",r.items=[],r}return jn(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!0,configurable:!0}),t}(Mn),Fn=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 jn(t,e),t}(Mn),_n=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o.type="string",o.value="",o}return jn(t,e),t}(Mn),Nn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="property",r.colonOffset=-1,r}return jn(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!0,configurable:!0}),t}(Mn),Rn=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.type="object",r.properties=[],r}return jn(t,e),Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!0,configurable:!0}),t}(Mn);function Dn(e){return Nt(e)?e?{}:{not:{}}:e}!function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"}(En||(En={}));var Vn=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||Hn(e,this.focusOffset))&&e!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Bn=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}(),Un=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===xn.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 zn(e){return Lt(e)}function Wn(e){return Pt(e)}function Hn(e,t,n){return void 0===n&&(n=!1),t>=e.offset&&t<e.offset+e.length||n&&t===e.offset+e.length}var qn=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 Mt(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 Un;return Gn(this.root,t,n,Bn.instance),n.problems.map((function(t){var n=it.create(e.positionAt(t.location.offset),e.positionAt(t.location.offset+t.location.length));return mt.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 Vn(t,n);return this.root&&e&&Gn(this.root,e,new Un,r),r.schemas},e}();function Gn(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:ht.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(Nt(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:ht.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{var b=new Un;Gn(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 k=w[x],C=new RegExp(k),A=0,O=i.slice(0);A<O.length;A++){f=O[A];if(C.test(f))if(h(f),M=o[f])if(Nt(m=t.patternProperties[k]))if(m)n.propertiesMatches++,n.propertiesValueMatches++;else{y=M.parent;n.problems.push({location:{offset:y.keyNode.offset,length:y.keyNode.length},severity:ht.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}else{b=new Un;Gn(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 Un;Gn(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:ht.Warning,message:t.errorMessage||"Property "+f+" is not allowed."})}}Ft(t.maxProperties)&&e.properties.length>t.maxProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Object has more properties than limit of "+t.maxProperties+"."});Ft(t.minProperties)&&e.properties.length<t.minProperties&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Object has fewer properties than the required number of "+t.minProperties});if(t.dependencies)for(var P=0,L=Object.keys(t.dependencies);P<L.length;P++){l=L[P];if(o[l]){var I=t.dependencies[l];if(Array.isArray(I))for(var F=0,_=I;F<_.length;F++){var N=_[F];o[N]?n.propertiesValueMatches++:n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Object is missing property "+N+" required by property {$key}."})}else if(m=Dn(I)){b=new Un;Gn(e,m,b,r),n.mergePropertyMatch(b)}}}var R=Dn(t.propertyNames);if(R)for(var D=0,V=e.properties;D<V.length;D++){var B=V[D];(l=B.keyNode)&&Gn(l,R,n,Bn.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=Dn(o[i]),s=new Un;(p=e.items[i])?(Gn(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 Un;Gn(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:ht.Warning,message:"Array has too many items according to schema. Expected "+o.length+" or fewer."})}else{var c=Dn(t.items);if(c)for(var u=0,f=e.items;u<f.length;u++){var p=f[u];s=new Un;Gn(p,c,s,r),n.mergePropertyMatch(s)}}var d=Dn(t.contains);if(d){e.items.some((function(e){var t=new Un;return Gn(e,d,t,Bn.instance),!t.hasProblems()}))||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:t.errorMessage||"Array does not contain required item."})}Ft(t.minItems)&&e.items.length<t.minItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Array has too few items. Expected "+t.minItems+" or more."});Ft(t.maxItems)&&e.items.length>t.maxItems&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Array has too many items. Expected "+t.maxItems+" or fewer."});if(!0===t.uniqueItems){var h=zn(e);h.some((function(e,t){return t!==h.lastIndexOf(e)}))&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Array has duplicate items."})}}(e,t,n,r);break;case"string":!function(e,t,n,r){Ft(t.minLength)&&e.value.length<t.minLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"String is shorter than the minimum length of "+t.minLength+"."});Ft(t.maxLength)&&e.value.length>t.maxLength&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.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:ht.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:ht.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=Tn[t.format];e.value&&s.pattern.exec(e.value)||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:t.patternErrorMessage||t.errorMessage||s.errorMessage})}}(e,t,n);break;case"number":!function(e,t,n,r){var o=e.value;Ft(t.multipleOf)&&o%t.multipleOf!=0&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Value is not divisible by "+t.multipleOf+"."});function i(e,t){return Ft(t)?t:Nt(t)&&t?e:void 0}function a(e,t){if(!Nt(t)||!t)return e}var s=i(t.minimum,t.exclusiveMinimum);Ft(s)&&o<=s&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Value is below the exclusive minimum of "+s+"."});var l=i(t.maximum,t.exclusiveMaximum);Ft(l)&&o>=l&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Value is above the exclusive maximum of "+l+"."});var c=a(t.minimum,t.exclusiveMinimum);Ft(c)&&o<c&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Value is below the minimum of "+c+"."});var u=a(t.maximum,t.exclusiveMaximum);Ft(u)&&o>u&&n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,message:"Value is above the maximum of "+u+"."})}(e,t,n);break;case"property":return Gn(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:ht.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:ht.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];Gn(e,Dn(s),n,r)}var l=Dn(t.not);if(l){var c=new Un,u=r.newSub();Gn(e,l,c,u),c.hasProblems()||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.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=Dn(l[s]),u=new Un,f=r.newSub();if(Gn(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:ht.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 Un,i=r.newSub();Gn(e,Dn(t),o,i),n.merge(o),n.propertiesMatches+=o.propertiesMatches,n.propertiesValueMatches+=o.propertiesValueMatches,r.merge(i)},g=Dn(t.if);g&&function(t,n,o){var i=Dn(t),a=new Un,s=r.newSub();Gn(e,i,a,s),r.merge(s),a.hasProblems()?o&&v(o):n&&v(n)}(g,Dn(t.then),Dn(t.else));if(Array.isArray(t.enum)){for(var m=zn(e),y=!1,b=0,x=t.enum;b<x.length;b++){var w=x[b];if(It(m,w)){y=!0;break}}n.enumValues=t.enum,n.enumValueMatch=y,y||n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,code:xn.EnumValueMismatch,message:t.errorMessage||"Value is not accepted. Valid values: "+t.enum.map((function(e){return JSON.stringify(e)})).join(", ")+"."})}if(_t(t.const)){It(m=zn(e),t.const)?n.enumValueMatch=!0:(n.problems.push({location:{offset:e.offset,length:e.length},severity:ht.Warning,code:xn.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:ht.Warning,message:t.deprecationMessage})}(),r.add({node:e,schema:t})}}function $n(e,t){var n=[],r=-1,o=e.getText(),i=jt(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(it.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=ht.Error),0===n.length||i!==r){var l=it.create(e.positionAt(i),e.positionAt(a));n.push(mt.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.",xn.InvalidUnicode),!0;case 5:return c("Invalid escape character in string.",xn.InvalidEscapeCharacter),!0;case 3:return c("Unexpected end of number.",xn.UnexpectedEndOfNumber),!0;case 1:return c("Unexpected end of comment.",xn.UnexpectedEndOfComment),!0;case 2:return c("Unexpected end of string.",xn.UnexpectedEndOfString),!0;case 6:return c("Invalid characters in string. Control characters must be escaped.",xn.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 Nn(t,i.getTokenOffset()),o=d(r);if(!o){if(16!==i.getToken())return null;c("Property keys must be doublequoted",xn.Undefined);var a=new _n(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",xn.DuplicateKey,r.keyNode.offset,r.keyNode.offset+r.keyNode.length,ht.Warning),"object"==typeof u&&l("DuplicateKeyWarning",xn.DuplicateKey,u.keyNode.offset,u.keyNode.offset+u.keyNode.length,ht.Warning),n[o.value]=!0):n[o.value]=r,6===i.getToken())r.colonOffset=i.getTokenOffset(),s();else if(c("Colon expected",xn.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",xn.ValueExpected,r,[],[2,5])}function d(e){if(10!==i.getToken())return null;var t=new _n(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 In(e,i.getTokenOffset());s();for(var n=0,r=!1;4!==i.getToken()&&17!==i.getToken();){if(5===i.getToken()){r||c("Value expected",xn.ValueExpected);var o=i.getTokenOffset();if(s(),4===i.getToken()){r&&l("Trailing comma",xn.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",xn.CommaExpected);var a=h(t,n++);a?t.items.push(a):c("Value expected",xn.ValueExpected,null,[],[4,5]),r=!0}return 4!==i.getToken()?c("Expected comma or closing bracket",xn.CommaOrCloseBacketExpected,t):f(t,!0)}(e)||function(e){if(1!==i.getToken())return null;var t=new Rn(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",xn.PropertyExpected);var o=i.getTokenOffset();if(s(),2===i.getToken()){r&&l("Trailing comma",xn.TrailingComma,o,o+1);continue}}else r&&c("Expected comma",xn.CommaExpected);var a=p(t,n);a?t.properties.push(a):c("Property expected",xn.PropertyExpected,null,[],[2,5]),r=!0}return 2!==i.getToken()?c("Expected comma or closing brace",xn.CommaOrCloseBraceExpected,t):f(t,!0)}(e)||d(e)||function(e){if(11!==i.getToken())return null;var t=new Fn(e,i.getTokenOffset());if(0===i.getTokenError()){var n=i.getTokenValue();try{var r=JSON.parse(n);if(!Ft(r))return c("Invalid number format.",xn.Undefined,t);t.value=r}catch(e){return c("Invalid number format.",xn.Undefined,t)}t.isInteger=-1===n.indexOf(".")}return f(t,!0)}(e)||function(e){switch(i.getToken()){case 7:return f(new Pn(e,i.getTokenOffset()),!0);case 8:return f(new Ln(e,!0,i.getTokenOffset()),!0);case 9:return f(new Ln(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.",xn.Undefined):c("Expected a JSON object, array or literal.",xn.Undefined)),new qn(v,n,a)}function Kn(e,t){var n=e.length-t.length;return n>0?e.lastIndexOf(t)===n:0===n&&e===t}var Jn=[",","}","]"],Yn=[":"],Xn=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=it.create(e.positionAt(f),t)}else u=it.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=bt.replace(u,e.insertText)),p&&(e.commitCharacters=e.kind===Wt.Property?Yn:Jn),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]=Kt.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=Wn(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:Wt.Property,label:r.getLabelForValue(c),insertText:r.getInsertTextForProperty(c,null,!1,m),insertTextFormat:Ht.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:Wt.Property,label:a.sanitizeLabel(e),insertText:a.getInsertTextForProperty(e,n,r,o),insertTextFormat:Ht.Snippet,filterText:a.getFilterTextForValue(e),documentation:a.fromMarkup(n.markdownDescription)||n.description||""};Kn(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:Wt.Property,label:o.sanitizeLabel(t),insertText:o.getInsertTextForValue(t,""),insertTextFormat:Ht.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:Wt.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",null,!0,""),insertTextFormat:Ht.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:Ht.Snippet,documentation:""}),void o.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:Ht.Snippet,documentation:""});var s=this.evaluateSeparatorAfter(r,a),l=function(e){Hn(e.parent,n,!0)||o.add({kind:i.getSuggestionKind(e.type),label:i.getLabelTextForMatchingNode(e,r),insertText:i.getInsertTextForMatchingNode(e,r,s),insertTextFormat:Ht.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=Wn(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(_t(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:Ht.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:Ht.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(_t(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:Ht.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(_t(e.const)&&n.add({kind:this.getSuggestionKind(e.type),label:this.getLabelForValue(e.const),insertText:this.getInsertTextForValue(e.const,t),insertTextFormat:Ht.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:Ht.Snippet,documentation:a})}},e.prototype.collectTypes=function(e,t){if(!Array.isArray(e.enum)&&!_t(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:Ht.Snippet,detail:"New object",documentation:""}),e.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],t),insertTextFormat:Ht.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:Ht.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(e,t){t.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+e,insertTextFormat:Ht.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:Wt.Module,label:n.getLabelForValue(r),filterText:n.getFilterTextForValue(r),insertText:n.getInsertTextForValue(r,e),insertTextFormat:Ht.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 Wt.Value;switch(e){case"string":return Wt.Value;case"object":return Wt.Module;case"property":return Wt.Property;default:return Wt.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;_t(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),_t(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=jt(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=jt(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=jt(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:Ut.Markdown,value:e}},e.prototype.doesSupportMarkdown=function(){if(!_t(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(Ut.Markdown)}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!_t(this.supportsCommitCharacters)){var e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=e&&e.completionItem&&!!e.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),Qn=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=it.create(e.positionAt(i.offset),e.positionAt(i.offset+i.length)),l=function(e){return{contents:e,range:s}},c=Wn(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||Zn(e.schema.description),e.schema.enum)){var t=e.schema.enum.indexOf(zn(o));e.schema.markdownEnumDescriptions?a=e.schema.markdownEnumDescriptions[t]:e.schema.enumDescriptions&&(a=Zn(e.schema.enumDescriptions[t])),a&&"string"!=typeof(s=e.schema.enum[t])&&(s=JSON.stringify(s))}return!0}));var c="";return r&&(c=Zn(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 Zn(e){if(e)return e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,"$1\n\n$3").replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}var er=n(726),tr=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}(),nr=function(){function e(e,t,n){this.service=e,this.url=t,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new rr(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}(),rr=function(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t},or=function(){function e(e,t){void 0===t&&(t=[]),this.schema=e,this.errors=t}return e.prototype.getSection=function(e){return Dn(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}(),ir=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=er.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 er.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 nr(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 tr(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 '"+ar(e)+"'. No schema request service available";return this.promise.resolve(new rr({},[t]))}return this.requestService(e).then((function(t){if(!t){var n="Unable to load schema from '"+ar(e)+"': No content.";return new rr({},[n])}var r,o=[];r=Tt(t,o);var i=o.length?["Unable to parse content from '"+ar(e)+"': Parse error at offset "+o[0].offset]:[];return new rr(r,i)}),(function(t){var n="Unable to load schema from '"+ar(e)+"': "+t.toString();return new rr({},[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 or({},["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 or(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=zn(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 ar(e){return e}var sr=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:ht.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?cr(n.trailingCommas):ht.Error,l=n?cr(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=it.create(e.positionAt(f.offset),e.positionAt(f.offset+f.length));s(mt.create(p,r.errors[0],ht.Warning,xn.SchemaResolveError))}else{p=it.create(e.positionAt(c.offset),e.positionAt(c.offset+1));s(mt.create(p,r.errors[0],ht.Warning,xn.SchemaResolveError))}}else{var d=t.validate(e,r.schema);d&&d.forEach(s)}(function e(t){if(t&&"object"==typeof t){if(Nt(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(Nt(i))return i}}return})(r.schema)&&(l=void 0),function e(t){if(t&&"object"==typeof t){if(Nt(t.allowTrailingCommas))return t.allowTrailingCommas;if(Nt(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(Nt(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===xn.TrailingComma){if("number"!=typeof a)continue;g.severity=a}s(g)}if("number"==typeof l){t.comments.forEach((function(e){s(mt.create(e,"Comments are not permitted in JSON.",l,xn.CommentNotPermitted))}))}return i};if(r){var c=r.id||"schemaservice://untitled/"+lr++;return this.jsonSchemaService.resolveSchemaContent(new rr(r),c,{}).then((function(e){return l(e)}))}return this.jsonSchemaService.getSchemaForResource(e.uri,t).then((function(e){return l(e)}))},e}(),lr=0;function cr(e){switch(e){case"error":return ht.Error;case"warning":return ht.Warning;case"ignore":return}}function ur(e){return e<48?0:e<=57?e-48:(e<97&&(e+=32),e>=97&&e<=102?e-97+10:0)}function fr(e){if("#"!==e[0])return null;switch(e.length){case 4:return{red:17*ur(e.charCodeAt(1))/255,green:17*ur(e.charCodeAt(2))/255,blue:17*ur(e.charCodeAt(3))/255,alpha:1};case 5:return{red:17*ur(e.charCodeAt(1))/255,green:17*ur(e.charCodeAt(2))/255,blue:17*ur(e.charCodeAt(3))/255,alpha:17*ur(e.charCodeAt(4))/255};case 7:return{red:(16*ur(e.charCodeAt(1))+ur(e.charCodeAt(2)))/255,green:(16*ur(e.charCodeAt(3))+ur(e.charCodeAt(4)))/255,blue:(16*ur(e.charCodeAt(5))+ur(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(16*ur(e.charCodeAt(1))+ur(e.charCodeAt(2)))/255,green:(16*ur(e.charCodeAt(3))+ur(e.charCodeAt(4)))/255,blue:(16*ur(e.charCodeAt(5))+ur(e.charCodeAt(6)))/255,alpha:(16*ur(e.charCodeAt(7))+ur(e.charCodeAt(8)))/255}}return null}var pr=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||Kn(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=at.create(e.uri,dr(e,u));if(s.push({name:zn(d.valueNode),kind:nn.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=at.create(e.uri,dr(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||Kn(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=dr(e,u),v=dr(e,d.keyNode);if(s.push({name:zn(d.valueNode),kind:nn.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=dr(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=dr(e,n),s=dr(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 nn.Module;case"string":return nn.String;case"number":return nn.Number;case"array":return nn.Array;case"boolean":return nn.Boolean;default:return nn.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=fr(zn(c.node));if(f){var p=dr(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:bt.replace(r,JSON.stringify(o))}),i},e}();function dr(e,t){return it.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var hr={schemaAssociations:{},schemas:{}};function vr(e,t){var n=[],r=[],o=[],i=-1,a=jt(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(ot.create(p+1,0))):p<d&&(l({startLine:p,endLine:d,kind:ft.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:ft.Region};o.push(c)}else{for(var v=o.length-1;v>=0&&o[v].kind!==ft.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++){(A=b[y])<30&&(m[A]=(m[A]||0)+1)}var x=0,w=0;for(v=0;v<m.length;v++){var k=m[v];if(k){if(k+x>g){w=v;break}x+=k}}var C=[];for(v=0;v<n.length;v++){var A;"number"==typeof(A=r[v])&&(A<w||A===w&&x++<g)&&C.push(n[v])}return C}function gr(e,t,n){function r(t,n){return it.create(e.positionAt(t),e.positionAt(n))}var o=jt(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=dn.create(s[p],f);return f||(f=dn.create(it.create(t,t))),f}))}n(727),n(728),n(729),n(730),n(731),n(732),n(733),n(735),n(737),n(739);var mr=function(e){var t=e.promiseConstructor||Promise,n=new ir(e.schemaRequestService,e.workspaceContext,t);n.setSchemaContributions(hr);var r=new Xn(n,e.contributions,t,e.clientCapabilities),o=new Qn(n,e.contributions,t),i=new pr(n),a=new sr(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 $n(e,{collectComments:!0})},newJSONDocument:function(e,t){return function(e,t){return void 0===t&&(t=[]),new qn(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:vr,getSelectionRanges:gr,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 Qe(e,t,n)}(e.getText(),r,i).map((function(t){return bt.replace(it.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length)),t.content)}))}}}({});$e.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,mr.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),o=bn.create(t.id+".json","json",0,e),i=mr.parseJSONDocument(o),[4,mr.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:$e.Pos(e.range.start.line,e.range.start.character),to:$e.Pos(e.range.end.line,e.range.end.character),message:e.message}}))]}}))}))})),$e.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)?(mr.configure({validate:!0,schemas:[{uri:"stub://"+t.id,fileMatch:["*"],schema:n}]}),r=e.getDoc().getCursor(),o=e.getTokenAt(r),i=bn.create(t.id+".json","json",0,e.getValue()),s=mr.parseJSONDocument(i),[4,mr.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:$e.Pos(r.line,o.start),to:$e.Pos(r.line,r.ch),list:u}]}}))}))}));var yr,br,xr,wr,kr,Cr,Ar,Or,Sr,Er,jr,Tr,Mr,Pr,Lr,Ir,Fr,_r=Object(p.M)(yr||(yr=Object(a.f)(["\n .cm-s-material.CodeMirror {\n background-color: black !important;\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 { background: rgba(255, 255, 255, 0.3) !important; }\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: center;\n\n flex: 1;\n }\n\n .CodeMirror {\n height: 600px!important;\n }\n"],["\n .cm-s-material.CodeMirror {\n background-color: black !important;\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 { background: rgba(255, 255, 255, 0.3) !important; }\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: center;\n\n flex: 1;\n }\n\n .CodeMirror {\n height: 600px!important;\n }\n"]))),Nr=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)}}),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)}}),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(_r,null),s.createElement(Ge.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),Rr=Object(l.e)(Nr),Dr=Object(p.V)(p.h)(br||(br=Object(a.f)(["\n &&.dropdown {\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n background: transparent;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"],["\n &&.dropdown {\n height: 20px;\n padding-top: 0;\n padding-bottom: 0;\n background: transparent;\n .dropdown-selector {\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin-bottom: 0;\n padding-bottom: 5px;\n }\n }\n"]))),Vr=p.V.div(xr||(xr=Object(a.f)(["\n display: flex;\n align-items: center;\n\n "," {\n flex: 1;\n margin: 0 10px;\n }\n\n margin-top: 10px;\n"],["\n display: flex;\n align-items: center;\n\n "," {\n flex: 1;\n margin: 0 10px;\n }\n\n margin-top: 10px;\n"])),Dr),Br=p.V.button(wr||(wr=Object(a.f)(["\n background-color: transparent;\n color: rgba(255, 255, 255, 0.7490196078431373);\n text-transform: uppercase;\n border: 0;\n font-weight: bold;\n outline: none;\n cursor: pointer;\n &:hover {\n color: #ffffff;\n }\n"],["\n background-color: transparent;\n color: rgba(255, 255, 255, 0.7490196078431373);\n text-transform: uppercase;\n border: 0;\n font-weight: bold;\n outline: none;\n cursor: pointer;\n &:hover {\n color: #ffffff;\n }\n"]))),Ur=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:{activeExampleIdx:0}}),Object.defineProperty(t,"handleSampleChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){t.setState({activeExampleIdx:e.idx})}}),Object.defineProperty(t,"applyExample",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.console.formApi.setValue("body",t.getActiveSample())}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"getActiveSample",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.props.body.content;if(!e||!e.hasSample)return"";var t=Object.values(e.active&&e.active.examples||{});return t[this.state.activeExampleIdx]&&JSON.stringify(t[this.state.activeExampleIdx].value,null,2)||""}}),Object.defineProperty(t.prototype,"encodeSample",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return e?"application/x-www-form-urlencoded"===e.mime?e.value:JSON.stringify(e.value,null,2):""}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this,t=this.state.activeExampleIdx,n=this.props.validate;return s.createElement(s.Fragment,null,s.createElement(p.n,{content:this.props.body.content,renderDropdown:this.renderDropdown},(function(r){var o,i=r.examples||{};e.props.resolvedBody&&(o=(e.props.resolvedBody.content[r.name]||{}).schema);var a=Object.values(i)[0],l=Object.keys(i).map((function(e,t){return{idx:t,value:i[e].summary||e}}));return s.createElement(s.Fragment,null,s.createElement(Rr,{id:"body"+e.props.id,field:"body",initialValue:e.encodeSample(a),schema:o,mode:r.name,validate:n}),l.length&&!(1===l.length&&"default"===l[0].value)&&s.createElement(Vr,null,s.createElement(Dr,{openUp:!0,options:l,value:l[t].value,onChange:e.handleSampleChange}),s.createElement(Br,{onClick:e.applyExample},"Use example"))||null)})))}}),Object.defineProperty(t.prototype,"renderDropdown",{enumerable:!1,configurable:!0,writable:!0,value:function(e){return s.createElement(p.e,Object(a.a)({},e,{Label:zr,Dropdown:Dr}))}}),t}(s.Component),zr=p.V.div(kr||(kr=Object(a.f)(["\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin: 0 0 10px 0;\n display: block;\n color: rgba(255, 255, 255, 0.8);\n"],["\n border-bottom: 1px solid rgba(255, 255, 255, 0.9);\n margin: 0 0 10px 0;\n display: block;\n color: rgba(255, 255, 255, 0.8);\n"]))),Wr=p.V.div(Cr||(Cr=Object(a.f)(["\n display: flex;\n font-size: 0.9em;\n"],["\n display: flex;\n font-size: 0.9em;\n"]))),Hr=p.V.div(Ar||(Ar=Object(a.f)(["\n background-color: #000000;\n padding: 5px 10px;\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n cursor: pointer;\n\n ","\n\n ","\n"],["\n background-color: #000000;\n padding: 5px 10px;\n text-align: center;\n text-transform: uppercase;\n font-weight: bold;\n cursor: pointer;\n\n ","\n\n ","\n"])),(function(e){var t=e.active,n=e.theme;return t&&"background-color: "+n.colors.primary.main+";"||""}),(function(e){var t=e.disabled,n=e.theme;return t&&"\n color: "+n.colors.text.secondary+";\n cursor: default;\n "||""})),qr=p.V.span(Or||(Or=Object(a.f)(["\n display: inline-block;\n transform: rotateZ(180deg);\n"],["\n display: inline-block;\n transform: rotateZ(180deg);\n"]))),Gr=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(Wr,null,s.createElement(Hr,{onClick:function(){return t(0)},active:0===n},r?s.createElement(s.Fragment,null,s.createElement(qr,null,"➔")," Edit Request "):"Request"),s.createElement(Hr,{onClick:function(){return r&&t(1)},active:1===n,disabled:!r}," Response "))}}),t}(s.Component),$r=p.V.div(Sr||(Sr=Object(a.f)(["\n position: relative;\n"],["\n position: relative;\n"]))),Kr=p.V.span(Er||(Er=Object(a.f)(["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"],["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"])),(function(e){var t=e.theme;return Object(p.R)({color:t.rightPanel.textColor})})),Jr=Object(p.V)(L)(jr||(jr=Object(a.f)(["\n padding-right: 40px;\n"],["\n padding-right: 40px;\n"]))),Yr=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:{hidden:!0}}),Object.defineProperty(t,"toggle",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState({hidden:!t.state.hidden})}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.state.hidden;return s.createElement($r,null,s.createElement(Jr,Object(a.a)({},this.props,{type:e?"password":"text"})),s.createElement(Kr,{onClick:this.toggle}," ",e?"show":"hide"," "))}}),t}(s.Component),Xr=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.g)(o,[t]);else{var i=o.indexOf(t);r=Object(a.g)(o.slice(0,i),o.slice(i+1))}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(oo,null,a?s.createElement(no,null,s.createElement(ro,{onClick:function(){e.selectAll()}},"Select all"),s.createElement(ro,{onClick:function(){e.clearAll()}},"Clear")):null,s.createElement("div",null,p.map((function(t){return s.createElement(eo,{htmlFor:t,key:t,title:t},s.createElement(Zr,{type:"checkbox",id:t,name:t,value:t,checked:e.isFieldChecked(t),onChange:function(t){e.onCheckBoxClick(t),o&&r.validate()}}),t)})),n.length>f&&l?s.createElement(to,{onClick:function(){e.toggle()}},c?"Show all":"Collapse"):null),u?s.createElement(B,null,u):"")}}),t}(s.Component),Qr=Object(l.e)(Xr),Zr=p.V.input(Tr||(Tr=Object(a.f)(["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n"],["\n cursor: pointer;\n vertical-align: middle;\n margin-left: 0;\n margin-right: 5px;\n"]))),eo=p.V.label(Mr||(Mr=Object(a.f)(["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n width: 50%;\n margin-bottom: 4px;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n line-height: 20px;\n"],["\n display: inline-block;\n cursor: pointer;\n vertical-align: middle;\n width: 50%;\n margin-bottom: 4px;\n position: relative;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n line-height: 20px;\n"]))),to=Object(p.V)(eo)(Pr||(Pr=Object(a.f)(["\n color: ",";\n float: right;\n\n &:hover {\n color: ",";\n }\n"],["\n color: ",";\n float: right;\n\n &:hover {\n color: ",";\n }\n"])),(function(e){var t=e.theme;return Object(M.e)(.05,t.colors.primary.main)}),(function(e){var t=e.theme;return Object(M.e)(.15,t.colors.primary.main)})),no=p.V.div(Lr||(Lr=Object(a.f)(["\n display: flex;\n margin-bottom: 4px;\n"],["\n display: flex;\n margin-bottom: 4px;\n"]))),ro=p.V.span(Ir||(Ir=Object(a.f)(["\n cursor: pointer;\n background-color: none;\n font-weight: normal;\n margin-right: 16px;\n font-size: 13px;\n\n &:hover {\n color: ",";\n }\n"],["\n cursor: pointer;\n background-color: none;\n font-weight: normal;\n margin-right: 16px;\n font-size: 13px;\n\n &:hover {\n color: ",";\n }\n"])),(function(e){var t=e.theme;return Object(M.e)(.15,t.colors.primary.main)})),oo=p.V.div(Fr||(Fr=Object(a.f)(["\n margin-top: 4px;\n"],["\n margin-top: 4px;\n"])));function io(e){var t=e.scopes,n=e.id,r=[];try{r=JSON.parse(Object(u.c)("auth."+n+".scopes"))}catch(e){}return t&&t.length?s.createElement(R,null,s.createElement(V,null," Scopes "),s.createElement(N,null,s.createElement(Qr,{field:"auth."+n+".scopes",initialValue:r,items:t,showControls:!0,trimItemsLength:!0}))):s.createElement(s.Fragment,null)}function ao(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}function so(e){if(!e)return"Token is required"}var lo,co=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(u.i)("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,c,f,p,d,h;return Object(a.e)(this,(function(a){switch(a.label){case 0:if(this.state.loading)return[2];if(e=this.props.flow.tokenUrl,this.errors.client_id||this.errors.client_secret)return console.log("Provide client_id and client_secret"),[2];if(t=this.props.id,n=this.values.client_id||Object(u.c)("auth."+t+".client_id"),r=this.values.client_secret||Object(u.c)("auth."+t+".client_secret"),o=(this.values.scopes||[]).join(" "),!n||!r)return console.log("Provide client_id and client_secret"),[2];this.setState({loading:!0}),a.label=1;case 1:return a.trys.push([1,10,11,12]),[4,fetch(e.startsWith("http")?e:this.props.server+e,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},body:ao({client_id:n,client_secret:r,grant_type:"client_credentials",scope:o})})];case 2:return(i=a.sent()).ok?[4,i.json()]:[3,4];case 3:return s=a.sent(),this.props.formApi.setValue("auth."+t+".token",s),this.state.error&&this.setState({error:""}),[3,9];case 4:return this.clearToken(),l=this.setState,c={},(i.headers.get("Content-Type")||"").indexOf("json")>-1?(d=(p=JSON).stringify,[4,i.json()]):[3,6];case 5:return f=d.apply(p,[a.sent()]),[3,8];case 6:return[4,i.text()];case 7:f=a.sent(),a.label=8;case 8:l.apply(this,[(c.error=f,c)]),a.label=9;case 9:return[3,12];case 10:return h=a.sent(),this.clearToken(),this.setState({error:h.message}),[3,12];case 11:return this.setState({loading:!1}),[7];case 12:return[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:!0,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:!0,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.id,i=Object.keys(this.props.flow.scopes),a=Object(u.c)("auth."+o+".token");return a=a?JSON.parse(a):"",s.createElement(s.Fragment,null,s.createElement(D,null,s.createElement(R,null,s.createElement(V,null,"Client ID:"),s.createElement(N,null,s.createElement(L,{field:"auth."+o+".client_id",initialValue:Object(u.c)("auth."+o+".client_id")||this.props.clientId}))),s.createElement(R,null,s.createElement(V,null,"Client Secret:"),s.createElement(N,null,s.createElement(Yr,{field:"auth."+o+".client_secret",initialValue:Object(u.c)("auth."+o+".client_secret")}))),s.createElement(L,{field:"auth."+o+".token",type:"hidden",initialValue:a,validate:so}),s.createElement(io,{id:o,scopes:i})),s.createElement(W,{onClick:this.requestToken,loading:t},t?"Loading...":"Request Token"),s.createElement(he,null," Access Token "),n?s.createElement(B,{style:{marginBottom:"1em"}},"Failed to request token: ",s.createElement("pre",null,n)):this.values.token&&this.values.token.access_token?s.createElement(ue,null,s.createElement(fe,{length:this.values.token.access_token.length,masked:r},this.values.token.access_token),s.createElement(pe,{onClick:this.toggleTokenMask},r?"Show":"Hide"),s.createElement(de,{onClick:this.clearToken}," Clear ")):s.createElement(B,{style:{marginBottom:"1em"}},"No token"))}}),t}(s.Component),uo=p.V.div(lo||(lo=Object(a.f)(["\n position: relative;\n height: 4px;\n display: block;\n width: 100%;\n background-color: #acece6;\n border-radius: 2px;\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: #26a69a;\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: #26a69a;\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: #acece6;\n border-radius: 2px;\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: #26a69a;\n transition: width 0.3s linear;\n }\n .indeterminate {\n background-color: #26a69a;\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"]))),fo=function(){return s.createElement(uo,null,s.createElement("div",{className:"indeterminate"}))},po=function(){function e(){}return Object.defineProperty(e,"authorizeImplicit",{enumerable:!1,configurable:!0,writable:!0,value:function(t){var n,r,o=t.url,i=t.clientId,s=t.scopes,l=void 0===s?[]:s,c=t.routingBasePath,u=t.redirectURI,f=t.successCallback,p=t.errorCallback,d=(n={date:(new Date).toString()},r=Object(a.a)({randomStr:ho()},n),btoa(JSON.stringify(r))),h=new URL(o),v="/"===c?"":c,g=""+window.location.origin+v+"/oauth2-redirect.html";h.searchParams.set("client_id",i),h.searchParams.set("redirect_uri",u||g),h.searchParams.set("response_type","token"),h.searchParams.set("state",d),h.searchParams.set("scope",l.join(" ")),window.redirectOAuth2={flow:"implicit",data:{url:o,clientId:i,scopes:l},state:d,successCallback:function(t){f(t),e.clearRedirectData()},errorCallback:function(t){p(t),e.clearRedirectData()}},window.open(h.toString())}}),Object.defineProperty(e,"clearRedirectData",{enumerable:!1,configurable:!0,writable:!0,value:function(){window.redirectOAuth2={flow:"implicit",data:{url:"",clientId:"",scopes:[]},state:"",successCallback:function(){},errorCallback:function(){}}}}),e}();new po;function ho(e){void 0===e&&(e=32);for(var t="";t.length<e;)t+=Math.random().toString(32).substring(2);return t.substring(0,e)}var vo,go,mo,yo=p.V.div(vo||(vo=Object(a.f)(["\n position: relative;\n"],["\n position: relative;\n"]))),bo=p.V.span(go||(go=Object(a.f)(["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"],["\n position: absolute;\n right: 0;\n line-height: 1.5em;\n padding: 6px;\n cursor: pointer;\n font-size: 0.8em;\n text-align: center;\n width: 40px;\n ","\n"])),(function(e){var t=e.theme;return Object(p.R)({color:t.rightPanel.textColor})})),xo=Object(p.V)(L)(mo||(mo=Object(a.f)(["\n padding-right: 40px;\n"],["\n padding-right: 40px;\n"]))),wo=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:{hidden:!0}}),Object.defineProperty(t,"toggle",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.setState({hidden:!t.state.hidden})}}),t}return Object(a.d)(t,e),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.state.hidden;return s.createElement(yo,null,s.createElement(xo,Object(a.a)({},this.props,{type:e?"password":"text"})),s.createElement(bo,{onClick:this.toggle}," ",e?"show":"hide"," "))}}),t}(s.Component);function ko(e){if(!e)return"Field is required"}var Co,Ao,Oo=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}}),Object.defineProperty(t,"clearToken",{enumerable:!0,configurable:!0,writable:!0,value:function(){t.props.formApi.setValue("auth."+t.props.id+".token","")}}),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:!0,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:!0,configurable:!0}),Object.defineProperty(t.prototype,"handleAuthorize",{enumerable:!1,configurable:!0,writable:!0,value:function(e){var t=this;if(e&&(this.props.formApi.validate(),this.values.client_id)){this.setState({loading:!0,error:null});var n=this.props.formApi.getValue("auth."+this.props.id+".scopes");po.authorizeImplicit({url:e,clientId:this.values.client_id,scopes:n,redirectURI:this.context.oAuth2RedirectURI,routingBasePath:this.context.routingBasePath,successCallback:function(e){var n={access_token:e.accessToken,token_type:e.tokenType};t.setState({loading:!1,error:null}),t.props.formApi.setValue("auth."+t.props.id+".token",n)},errorCallback:function(e){t.setState({loading:!1,error:(null==e?void 0:e.message)||"Failed to retrieve the access token"})}})}}}),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}),po.clearRedirectData()}}),Object.defineProperty(t.prototype,"render",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e,t,n,r=this,o=this.state,i=o.error,a=o.loading,l=this.props,c=l.id,f=l.scopes,p=l.authorizationUrl;if(!p)return s.createElement(B,null,"No flow info");var d=Object(u.c)("auth."+c+".token");return d=d?JSON.parse(d):"",s.createElement("div",null,s.createElement(D,null,s.createElement(R,null,s.createElement(V,null," Client ID "),s.createElement(N,null,s.createElement(L,{field:"auth."+c+".client_id",initialValue:Object(u.c)("auth."+c+".client_id")||this.props.clientId,placeholder:"Your OAuth2 app Client ID",validate:ko,validateOnBlur:!0,validateOnChange:!0}),s.createElement("small",{style:{color:"red"}},null===(e=this.errors)||void 0===e?void 0:e.client_id))),s.createElement(L,{field:"auth."+c+".token",type:"hidden",initialValue:d,validate:ko}),s.createElement(io,{id:c,scopes:f}),this.values.token&&this.values.token.access_token?s.createElement(R,null,s.createElement(V,null," Access Token "),s.createElement(wo,{field:"",disabled:!0,initialValue:this.values.token.access_token})):null),s.createElement(Eo,null,this.values.token&&this.values.token.access_token?s.createElement(W,{onClick:function(){r.handleLogout()}},"Log out"):s.createElement(s.Fragment,null,a?s.createElement(s.Fragment,null,s.createElement(W,{onClick:function(){r.handleCancel()}},"Cancel"),s.createElement(fo,null)):s.createElement(W,{disabled:(null===(t=this.props)||void 0===t||null===(n=t.formApi)||void 0===n?void 0:n.getTouched("auth."+c+".client_id"))&&!this.values.client_id,onClick:function(){r.handleAuthorize(p)}},"Authorize"))),s.createElement(D,null,s.createElement(R,null,a?s.createElement(U,null,"Please, finish your authorization flow or cancel authorization."):i?s.createElement(s.Fragment,null,s.createElement(So,null,s.createElement(B,null,i))):this.values.token&&this.values.token.access_token?null:s.createElement(U,null," No Access Token. Please, Authorize. "))))}}),Object.defineProperty(t,"contextType",{enumerable:!0,configurable:!0,writable:!0,value:p.t}),t}(s.Component),So=p.V.div(Co||(Co=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"]))),Eo=p.V.div(Ao||(Ao=Object(a.f)(["\n margin-bottom: 15px;\n"],["\n margin-bottom: 15px;\n"])));function jo(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 To(e){var t,n=this,r=e.scheme,o=s.useState({}),i=o[0],l=o[1],c=s.useState(),u=c[0],f=c[1],p=s.useState(!1),d=p[0],h=p[1];s.useEffect((function(){v(r.openIdConnectUrl)}),[r.openIdConnectUrl]);var v=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:h(!0),f(""),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,jo(e)];case 2:return t=r.sent(),l(t),[3,4];case 3:return n=r.sent(),f(n.message),[3,4];case 4:return h(!1),[2]}}))}))};return s.createElement("div",null,d?s.createElement("div",null,s.createElement("div",null,"Fetching OpenID Conneсt metadata..."),s.createElement(fo,null)):s.createElement("div",null,u?s.createElement(B,null,u):s.createElement(s.Fragment,null,null!=i&&null!==(t=i.response_types_supported)&&void 0!==t&&t.includes("token")?s.createElement(s.Fragment,null,s.createElement(Po,null,"OAuth2 Implicit Flow"),s.createElement(Oo,{key:e.id,authorizationUrl:i.authorization_endpoint,scopes:i.scopes_supported,server:e.server,id:e.id,form:e.form,formApi:e.formApi,clientId:e.clientId})):s.createElement("div",null,"Unsupported flow"))))}var Mo,Po=p.V.div(Mo||(Mo=Object(a.f)(["\n margin-top: 5px;\n margin-bottom: 10px;\n"],["\n margin-top: 5px;\n margin-bottom: 10px;\n"]))),Lo=n(16);function Io(e){if(!e)return"Field is required"}function Fo(e){var t,n;if("cookie"===e.in)return t=e.name,(n=document.cookie.match("\\b"+t+"=([^;]*)\\b"))?n[1]:void 0}var _o=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(u.i)("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(u.c)("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.state.activeScheme,n=this.props.operation.security,r=this.props.form.errors,o=(void 0===r?{}:r).auth,i=n.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===i.length?null:s.createElement(s.Fragment,null,i.length>1&&s.createElement(Dr,{options:i,value:i[t].value,onChange:this.handleSchemeChange})||null,n[t].schemes.map((function(t){var n=t.id;if("apiKey"===t.type)return s.createElement(D,{key:n},s.createElement(R,{key:n},s.createElement(V,null," ",t.name,": "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n,validate:Io,initialValue:Fo(t)||Object(u.c)("auth."+n),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]?s.createElement(B,null,o[n]):"")));if("http"===t.type){if("basic"===t.scheme)return s.createElement(D,{key:n},s.createElement(R,null,s.createElement(V,null," ",Object(Lo.a)("tryItAuthBasicUsername"),": "),s.createElement(N,null,s.createElement(L,{field:"auth."+n+".username",validate:Io,initialValue:Object(u.c)("auth."+n+".username"),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]&&o[n].username?s.createElement(B,null,o[n].username):"")),s.createElement(R,null,s.createElement(V,null," ",Object(Lo.a)("tryItAuthBasicPassword"),": "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n+".password",validate:Io,initialValue:Object(u.c)("auth."+n+".password"),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]&&o[n].password?s.createElement(B,null,o[n].password):"")));if("bearer"===t.scheme)return s.createElement(D,{key:n},s.createElement(R,null,s.createElement(V,null," Bearer Token "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n,placeholder:"(without 'Bearer')",validate:Io,initialValue:Object(u.c)("auth."+n),validateOnBlur:!0,validateOnChange:!0}),o&&o[n]?s.createElement(B,null,o[n]):"")))}else{if("oauth2"===t.type&&t.flows&&t.flows.clientCredentials)return s.createElement(co,{key:n,flow:t.flows.clientCredentials,server:e.props.activeServer,id:n,form:e.props.form,formApi:e.props.formApi,clientId:t.flows.clientCredentials["x-defaultClientId"]||t["x-defaultClientId"]});var r,i;if("oauth2"===t.type&&t.flows&&t.flows.implicit)return s.createElement(Oo,{key:n,authorizationUrl:t.flows.implicit.authorizationUrl,scopes:Object.keys((null==t||null===(r=t.flows)||void 0===r||null===(i=r.implicit)||void 0===i?void 0:i.scopes)||{}),server:e.props.activeServer,id:n,form:e.props.form,formApi:e.props.formApi,clientId:t.flows.implicit["x-defaultClientId"]||t["x-defaultClientId"]});if("oauth2"===t.type){var a=Object(u.c)("auth."+n+".token");return a=a?JSON.parse(a):{},s.createElement(D,{key:n},s.createElement(R,null,s.createElement(V,null," Access Token Type: "),s.createElement(N,null,s.createElement(L,{field:"auth."+n+".token.token_type",initialValue:a.token_type||"Bearer"}))),s.createElement(R,null,s.createElement(V,null," Access Token: "),s.createElement(N,null,s.createElement(Yr,{field:"auth."+n+".token.access_token",validate:Io,initialValue:a.access_token,validateOnBlur:!0,validateOnChange:!0}),o&&o[n]&&o[n].token&&o[n].token.access_token?s.createElement(B,null,o[n].token.access_token):"")))}if("openIdConnect"===t.type)return s.createElement(To,{key:n,server:e.props.activeServer,id:n,form:e.props.form,formApi:e.props.formApi,scheme:t,clientId:t["x-defaultClientId"]})}})),s.createElement("small",null,s.createElement("strong",null,"Note"),": Your credentials will be saved until the end of the browser session"))}}),t}(s.Component),No=n(527),Ro=n.n(No),Do=n(618),Vo=n.n(Do),Bo=n(683),Uo=n.n(Bo),zo=n(23),Wo=n.n(zo),Ho=n(624),qo=n.n(Ho),Go=n(536),$o=n.n(Go),Ko=n(570),Jo=n.n(Ko),Yo=n(630),Xo=n.n(Yo),Qo=n(594),Zo=n.n(Qo),ei=n(634),ti=n.n(ei),ni=n(868),ri=n.n(ni),oi=n(872),ii=n.n(oi),ai=n(635),si=n.n(ai),li=n(544),ci=n.n(li),ui=n(534),fi=n.n(ui),pi=n(524),di=n.n(pi),hi=n(705),vi=n.n(hi),gi=n(545),mi=n.n(gi),yi=(n(890),n(891)),bi=n.n(yi),xi=n(136),wi=n.n(xi),ki=n(639),Ci=n.n(ki),Ai=n(585),Oi=n.n(Ai),Si=n(45),Ei=n(645),ji=n.n(Ei),Ti=n(646),Mi=n.n(Ti),Pi=n(932),Li=n.n(Pi),Ii=n(647),Fi=n.n(Ii),_i=n(945),Ni=n.n(_i),Ri=n(951),Di=n.n(Ri),Vi=n(959),Bi=n.n(Vi),Ui=n(964),zi=function(e){var t=function(e,t){return{name:e,value:t}};return Oi()(e.prototype.set)||Oi()(e.prototype.get)||Oi()(e.prototype.getAll)||Oi()(e.prototype.has)?e:function(e){Ni()(r,e);var n=Di()(r);function r(e){var t;return ji()(this,r),(t=n.call(this,e)).entryList=[],t}return Mi()(r,[{key:"append",value:function(e,n,o){return this.entryList.push(t(e,n)),Li()(Fi()(r.prototype),"append",this).call(this,e,n,o)}},{key:"set",value:function(e,n){var r,o=t(e,n);this.entryList=mi()(r=this.entryList).call(r,(function(t){return t.name!==e})),this.entryList.push(o)}},{key:"get",value:function(e){var t,n=Bi()(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 ci()(t=mi()(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(Ui).a),Wi=n(600),Hi=n.n(Wi),qi=n(546),Gi=n.n(qi),$i=n(45).Buffer,Ki=function(e){return":/?#[]@!$&'()*+,;=".indexOf(e)>-1},Ji=function(e){return/^[a-z0-9\-._~]+$/i.test(e)};function Yi(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):ci()(t=Hi()(e)).call(t,(function(e){var t,n;return Ji(e)||Ki(e)&&"unsafe"===r?e:ci()(t=ci()(n=$i.from(e).toJSON().data||[]).call(n,(function(e){var t;return Gi()(t="0".concat(e.toString(16).toUpperCase())).call(t,-2)}))).call(t,(function(e){return"%".concat(e)})).join("")})).join(""):e}function Xi(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 Yi(e,{escape:i})};if("simple"===r)return ci()(n).call(n,(function(e){return a(e)})).join(",");if("label"===r)return".".concat(ci()(n).call(n,(function(e){return a(e)})).join("."));if("matrix"===r)return ci()(n).call(n,(function(e){return a(e)})).reduce((function(e,n){var r,i,a;return!e||o?di()(i=di()(a="".concat(e||"",";")).call(a,t,"=")).call(i,n):di()(r="".concat(e,",")).call(r,n)}),"");if("form"===r){var s=o?"&".concat(t,"="):",";return ci()(n).call(n,(function(e){return a(e)})).join(s)}if("spaceDelimited"===r){var l=o?"".concat(t,"="):"";return ci()(n).call(n,(function(e){return a(e)})).join(" ".concat(l))}if("pipeDelimited"===r){var c=o?"".concat(t,"="):"";return ci()(n).call(n,(function(e){return a(e)})).join("|".concat(c))}return}(e):"object"===$o()(t)?function(e){var t=e.key,n=e.value,r=e.style,o=e.explode,i=e.escape,a=function(e){return Yi(e,{escape:i})},s=fi()(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 di()(r=di()(i=di()(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 di()(r=di()(i=di()(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 di()(r=di()(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 di()(o=di()(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?di()(r="".concat(e)).call(r,o?"&":","):"",f=o?"=":",";return di()(i=di()(s=di()(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 Yi(e,{escape:i})};if("simple"===o)return a(r);if("label"===o)return".".concat(a(r));if("matrix"===o)return di()(t=";".concat(n,"=")).call(t,a(r));if("form"===o)return a(r);if("deepObject"===o)return a(r);return}(e)}var Qi={serializeRes:ra,mergeInQueryOrForm:ha};function Zi(e){return ea.apply(this,arguments)}function ea(){return(ea=Xo()(Zo.a.mark((function e(t){var n,r,o,i,a,s=arguments;return Zo.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]?s[1]:{},"object"===$o()(t)&&(t=(n=t).url),n.headers=n.headers||{},Qi.mergeInQueryOrForm(n),n.headers&&fi()(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,Qi.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 ta=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return/(json|xml|yaml|text)\b/.test(e)};function na(e,t){return t&&(0===t.indexOf("application/json")||t.indexOf("+json")>0)?JSON.parse(e):wi.a.safeLoad(e)}function ra(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:ia(e.headers)},a=i.headers["content-type"],s=o||ta(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=na(e,a);i.body=t,i.obj=t}catch(e){i.parseError=e}return i}))}function oa(e){return ti()(e).call(e,", ")?e.split(", "):e}function ia(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Oi()(ri()(e))?ii()(ri()(e).call(e)).reduce((function(e,t){var n=Jo()(t,2),r=n[0],o=n[1];return e[r]=oa(o),e}),{}):{}}function aa(e,t){return t||"undefined"==typeof navigator||(t=navigator),t&&"ReactNative"===t.product?!(!e||"object"!==$o()(e)||"string"!=typeof e.uri):"undefined"!=typeof File&&e instanceof File||("undefined"!=typeof Blob&&e instanceof Blob||(void 0!==Si.Buffer&&e instanceof Si.Buffer||null!==e&&"object"===$o()(e)&&"function"==typeof e.pipe))}function sa(e,t){return Array.isArray(e)&&e.some((function(e){return aa(e,t)}))}var la={form:",",spaceDelimited:"%20",pipeDelimited:"|"},ca={csv:",",ssv:"%20",tsv:"%09",pipes:"|"};function ua(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"!==$o()(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(aa(s)||sa(s))return[[c,s]];if(i)return fa(e,s,n,i);if(a){if([$o()(a.style),$o()(a.explode),$o()(a.allowReserved)].some((function(e){return"undefined"!==e})))return fa(e,s,n,Ci()(a,["style","explode","allowReserved"]));if(a.contentType){if("application/json"===a.contentType){var u="string"==typeof s?s:si()(s);return[[c,l(u)]]}return[[c,l(s.toString())]]}return"object"!==$o()(s)?[[c,l(s)]]:Array.isArray(s)&&s.every((function(e){return"object"!==$o()(e)}))?[[c,ci()(s).call(s,l).join(",")]]:[[c,l(si()(s))]]}return"object"!==$o()(s)?[[c,l(s)]]:Array.isArray(s)?"multi"===r?[[c,ci()(s).call(s,l)]]:[[c,ci()(s).call(s,l).join(ca[r||"csv"])]]:[[c,""]]}function fa(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 Yi(e,{escape:c})},f=n?function(e){return e}:function(e){return Yi(e,{escape:c})};return"object"!==$o()(t)?[[f(e),u(t)]]:Array.isArray(t)?l?[[f(e),ci()(t).call(t,u)]]:[[f(e),ci()(t).call(t,u).join(la[s])]]:"deepObject"===s?ci()(i=fi()(t)).call(i,(function(n){var r;return[f(di()(r="".concat(e,"[")).call(r,n,"]")),u(t[n])]})):l?ci()(a=fi()(t)).call(a,(function(e){return[f(e),u(t[e])]})):[[f(e),ci()(o=fi()(t)).call(o,(function(e){var n;return[di()(n="".concat(f(e),",")).call(n,u(t[e]))]})).join(",")]]}function pa(e){return vi()(e).reduce((function(e,t){var n,r=Jo()(t,2),o=r[0],i=r[1],a=qo()(ua(o,i,!0));try{for(a.s();!(n=a.n()).done;){var s=Jo()(n.value,2),l=s[0],c=s[1];if(Array.isArray(c)){var u,f=qo()(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 zi)}function da(e){var t=fi()(e).reduce((function(t,n){var r,o=qo()(ua(n,e[n]));try{for(o.s();!(r=o.n()).done;){var i=Jo()(r.value,2),a=i[0],s=i[1];t[a]=s}}catch(e){o.e(e)}finally{o.f()}return t}),{});return bi.a.stringify(t,{encode:!1,indices:!1})||""}function ha(){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=mi()(t).call(t,(function(e){return e})).join("&");return r?"?".concat(r):""};if(o){var a=fi()(o).some((function(e){var t=o[e].value;return aa(t)||sa(t)})),s=e.headers["content-type"]||e.headers["Content-Type"];a||/multipart\/form-data/i.test(s)?e.body=pa(e.form):e.body=da(o),delete e.form}if(r){var l=n.split("?"),c=Jo()(l,2),u=c[0],f=c[1],p="";if(f){var d=bi.a.parse(f),h=fi()(r);h.forEach((function(e){return delete d[e]})),p=bi.a.stringify(d,{encode:!0})}var v=i(p,da(r));e.url=u+v,delete e.query}return e}var va=n(573),ga=n.n(va),ma=n(710),ya=n.n(ma),ba=n(974),xa=n.n(ba),wa=n(979),ka=n.n(wa),Ca=n(1010),Aa=n.n(Ca),Oa=n(673),Sa=n.n(Oa),Ea=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)}}(),ja=Object.prototype.hasOwnProperty;function Ta(e,t){return ja.call(e,t)}function Ma(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)Ta(e,r)&&t.push(r);return t}function Pa(e){switch(typeof e){case"object":return JSON.parse(JSON.stringify(e));case"undefined":return null;default:return e}}function La(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 Ia(e){return-1===e.indexOf("/")&&-1===e.indexOf("~")?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Fa(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function _a(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 Na=function(e){function t(t,n,r,o,i){var a=this.constructor,s=e.call(this,_a(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=_a(t,{name:n,index:r,operation:o,tree:i}),s}return Ea(t,e),t}(Error),Ra=Na,Da=Pa,Va={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=Ua(n,this.path);r&&(r=Pa(r));var o=za(n,{op:"remove",path:this.from}).removed;return za(n,{op:"add",path:this.path,value:o}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=Ua(n,this.from);return za(n,{op:"add",path:this.path,value:Pa(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:$a(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},Ba={add:function(e,t,n){return La(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:Va.move,copy:Va.copy,test:Va.test,_get:Va._get};function Ua(e,t){if(""==t)return e;var n={op:"_get",path:t};return za(e,n),n.value}function za(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):qa(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=Ua(e,t.from),"move"===t.op&&(a.removed=e),a;if("test"===t.op){if(a.test=$a(e,t.value),!1===a.test)throw new Ra("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 Ra("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",i,t,e);return a}r||(e=Pa(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:qa;;){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&&!La(p))throw new Ra("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);La(p)&&(p=~~p)}if(c>=u){if(n&&"add"===t.op&&p>l.length)throw new Ra("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=Ba[t.op].call(t,l,p,e)).test)throw new Ra("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(p&&-1!=p.indexOf("~")&&(p=Fa(p)),c>=u){if(!1===(a=Va[t.op].call(t,l,p,e)).test)throw new Ra("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}l=l[p]}}function Wa(e,t,n,r,o){if(void 0===r&&(r=!0),void 0===o&&(o=!0),n&&!Array.isArray(t))throw new Ra("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");r||(e=Pa(e));for(var i=new Array(t.length),a=0,s=t.length;a<s;a++)i[a]=za(e,t[a],n,!0,o,a),e=i[a].newDocument;return i.newDocument=e,i}function Ha(e,t,n){var r=za(e,t);if(!1===r.test)throw new Ra("Test operation failed","TEST_OPERATION_FAILED",n,t,e);return r.newDocument}function qa(e,t,n,r){if("object"!=typeof e||null===e||Array.isArray(e))throw new Ra("Operation is not an object","OPERATION_NOT_AN_OBJECT",t,e,n);if(!Va[e.op])throw new Ra("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 Ra("Operation `path` property is not a string","OPERATION_PATH_INVALID",t,e,n);if(0!==e.path.indexOf("/")&&e.path.length>0)throw new Ra('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 Ra("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 Ra("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=Ma(t),i=o.length;for(n=0;n<i;n++)if(e(t[o[n]]))return!0}return!1}(e.value))throw new Ra("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 Ra("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 Ra("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=Ga([{op:"_get",path:e.from,value:void 0}],n);if(a&&"OPERATION_PATH_UNRESOLVABLE"===a.name)throw new Ra("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,n)}}function Ga(e,t,n){try{if(!Array.isArray(e))throw new Ra("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Wa(Pa(t),Pa(e),n||!0);else{n=n||qa;for(var r=0;r<e.length;r++)n(e[r],r,t,void 0)}}catch(e){if(e instanceof Ra)return e;throw e}}function $a(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(!$a(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(!$a(e[o=s[n]],t[o]))return!1;return!0}return e!=e&&t!=t}
43
43
  /*!
44
44
  * https://github.com/Starcounter-Jack/JSON-Patch
45
45
  * (c) 2017 Joachim Wester
46
46
  * MIT license
47
47
  */
48
- var Ka=new WeakMap,Ja=function(e){this.observers=new Map,this.obj=e},Ya=function(e,t){this.callback=e,this.observer=t};function Xa(e,t){t.unobserve()}function Qa(e,t){var n,r=function(e){return Ka.get(e)}(e);if(r){var o=function(e,t){return e.observers.get(t)}(r,t);n=o&&o.observer}else r=new Ja(e),Ka.set(e,r);if(n)return n;if(n={},r.value=Pa(e),t){n.callback=t,n.next=null;var i=function(){Za(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(){Za(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 Ya(t,n)),n}function Za(e,t){void 0===t&&(t=!1);var n=Ka.get(e.object);es(n.value,e.object,e.patches,"",t),e.patches.length&&Wa(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function es(e,t,n,r,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=Ma(t),a=Ma(e),s=!1,l=a.length-1;l>=0;l--){var c=e[f=a[l]];if(!Ta(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+"/"+Fa(f),value:Pa(c)}),n.push({op:"remove",path:r+"/"+Fa(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?es(c,u,n,r+"/"+Fa(f),o):c!==u&&(!0,o&&n.push({op:"test",path:r+"/"+Fa(f),value:Pa(c)}),n.push({op:"replace",path:r+"/"+Fa(f),value:Pa(u)}))}}if(s||i.length!=a.length)for(l=0;l<i.length;l++){var f;Ta(e,f=i[l])||void 0===t[f]||n.push({op:"add",path:r+"/"+Fa(f),value:Pa(t[f])})}}}function ts(e,t,n){void 0===n&&(n=!1);var r=[];return es(e,t,r,"",n),r}Object.assign({},r,o,{JsonPatchError:Na,deepClone:Pa,escapePathComponent:Fa,unescapePathComponent:Ia});var ns=n(1011),rs=n.n(ns),os=n(1012),is=n.n(os),as={add:function(e,t){return{op:"add",path:e,value:t}},replace:ls,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=Do()(Do()({},t),{},{path:t.path&&ss(t.path)})).op){var r=ws(e,t.path);ga()(r,t.value),Wa(e,[ls(t.path,r)])}else if("mergeDeep"===t.op){var o=ws(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]=di()(l).call(l,a)}else if(vs(a)&&!s){var c=Do()({},o[i]);for(var u in a){if(Object.prototype.hasOwnProperty.call(c,u)){c=rs()(is()(c),a);break}ga()(c,Sa()({},u,a[u]))}o[i]=c}else o[i]=a}}else if("add"===t.op&&""===t.path&&vs(t.value)){var f=fi()(t.value).reduce((function(e,n){return e.push({op:"add",path:"/".concat(ss(n)),value:t.value[n]}),e}),[]);Wa(e,f)}else if("replace"===t.op&&""===t.path){var p=t.value;n.allowMetaPatches&&t.meta&&bs(t)&&(Array.isArray(t.value)||vs(t.value))&&(p=Do()(Do()({},p),t.meta)),e=p}else if(Wa(e,[t]),n.allowMetaPatches&&t.meta&&bs(t)&&(Array.isArray(t.value)||vs(t.value))){var d=ws(e,t.path),h=Do()(Do()({},d),t.meta);Wa(e,[ls(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:ds,fullyNormalizeArray:function(e){return hs(ds(ps(e)))},normalizeArray:ps,isPromise:function(e){return vs(e)&&gs(e.then)},forEachNew:function(e,t){try{return cs(e,fs,t)}catch(e){return e}},forEachNewPrimitive:function(e,t){try{return cs(e,us,t)}catch(e){return e}},isJsonPatch:ms,isContextPatch:function(e){return xs(e)&&"context"===e.type},isPatch:xs,isMutation:ys,isAdditiveMutation:bs,isGenerator:function(e){return"[object GeneratorFunction]"===Object.prototype.toString.call(e)},isFunction:gs,isObject:vs,isError:function(e){return e instanceof Error}};function ss(e){return Array.isArray(e)?e.length<1?"":"/".concat(ci()(e).call(e,(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")})).join("/")):e}function ls(e,t,n){return{op:"replace",path:e,value:t,meta:n}}function cs(e,t,n){var r;return hs(ds(ci()(r=mi()(e).call(e,bs)).call(r,(function(e){return t(e.value,n,e.path)}))||[]))}function us(e,t,n){return n=n||[],Array.isArray(e)?ci()(e).call(e,(function(e,r){return us(e,t,di()(n).call(n,r))})):vs(e)?ci()(r=fi()(e)).call(r,(function(r){return us(e[r],t,di()(n).call(n,r))})):t(e,n[n.length-1],n);var r}function fs(e,t,n){var r=[];if((n=n||[]).length>0){var o=t(e,n[n.length-1],n);o&&(r=di()(r).call(r,o))}if(Array.isArray(e)){var i=ci()(e).call(e,(function(e,r){return fs(e,t,di()(n).call(n,r))}));i&&(r=di()(r).call(r,i))}else if(vs(e)){var a,s=ci()(a=fi()(e)).call(a,(function(r){return fs(e[r],t,di()(n).call(n,r))}));s&&(r=di()(r).call(r,s))}return r=ds(r)}function ps(e){return Array.isArray(e)?e:[e]}function ds(e){var t;return di()(t=[]).apply(t,Hi()(ci()(e).call(e,(function(e){return Array.isArray(e)?ds(e):e}))))}function hs(e){return mi()(e).call(e,(function(e){return void 0!==e}))}function vs(e){return e&&"object"===$o()(e)}function gs(e){return e&&"function"==typeof e}function ms(e){if(xs(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function ys(e){return ms(e)||xs(e)&&"mutation"===e.type}function bs(e){return ys(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function xs(e){return e&&"object"===$o()(e)}function ws(e,t){try{return Ua(e,t)}catch(e){return console.error(e),{}}}var ks=n(1036),Cs=n.n(ks),As=n(721),Os=n(1043),Ss=n.n(Os);function Es(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 js=n(1044),Ts=n.n(js),Ms=n(1045),Ps=n.n(Ms),Ls=["properties"],Fs=["properties"],Is=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],_s=["schema/example","items/example"];function Ns(e){var t=e[e.length-1],n=e[e.length-2],r=e.join("/");return Ls.indexOf(t)>-1&&-1===Fs.indexOf(n)||Is.indexOf(r)>-1||_s.some((function(e){return r.indexOf(e)>-1}))}function Ds(e,t){var n,r=e.split("#"),o=Jo()(r,2),i=o[0],a=o[1],s=Wo.a.resolve(i||"",t||"");return a?di()(n="".concat(s,"#")).call(n,a):s}var Rs=new RegExp("^([a-z]+://|//)","i"),Vs=Es("JSONRefError",(function(e,t,n){this.originalError=n,ga()(this,t||{})})),Bs={},Us=new Cs.a,zs=[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]}],Ws={key:"$ref",plugin:function(e,t,n,r){var o=r.getInstance(),i=Gi()(n).call(n,0,-1);if(!Ns(i)&&(a=i,!zs.some((function(e){return e(a)})))){var a,s=r.getContext(n).baseDoc;if("string"!=typeof e)return new Vs("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:s,fullPath:n});var l,c,u,f=Ks(e),p=f[0],d=f[1]||"";try{l=s||p?Gs(p,s):null}catch(t){return $s(t,{pointer:d,$ref:e,basePath:l,fullPath:n})}if(function(e,t,n,r){var o,i,a=Us.get(r);a||(a={},Us.set(r,a));var s=function(e){if(0===e.length)return"";return"/".concat(ci()(e).call(e,el).join("/"))}(n),l=di()(o="".concat(t||"<specmap-base>","#")).call(o,e),c=s.replace(/allOf\/\d+\/?/g,""),u=r.contextTree.get([]).baseDoc;if(t==u&&tl(c,e))return!0;var f="";if(n.some((function(e){var t;return f=di()(t="".concat(f,"/")).call(t,el(e)),a[f]&&a[f].some((function(e){return tl(e,l)||tl(l,e)}))})))return!0;return void(a[c]=di()(i=a[c]||[]).call(i,l))}(d,l,i,r)&&!o.useCircularStructures){var h=Ds(e,l);return e===h?null:as.replace(n,h)}if(null==l?(u=Qs(d),void 0===(c=r.get(u))&&(c=new Vs("Could not resolve reference: ".concat(e),{pointer:d,$ref:e,baseDoc:s,fullPath:n}))):c=null!=(c=Js(l,d)).__value?c.__value:c.catch((function(t){throw $s(t,{pointer:d,$ref:e,baseDoc:s,fullPath:n})})),c instanceof Error)return[as.remove(n),c];var v=Ds(e,l),g=as.replace(i,c,{$$ref:v});if(l&&l!==s)return[g,as.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 as.isObject(t)&&(n.indexOf(t)>=0||fi()(t).some((function(n){return e(t[n])})))}(t.value)}(r.state,g)||o.useCircularStructures)return g}catch(e){return null}}}},Hs=ga()(Ws,{docCache:Bs,absoluteify:Gs,clearCache:function(e){void 0!==e?delete Bs[e]:fi()(Bs).forEach((function(e){delete Bs[e]}))},JSONRefError:Vs,wrapError:$s,getDoc:Ys,split:Ks,extractFromDoc:Js,fetchJSON:function(e){return Object(As.fetch)(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((function(e){return e.text()})).then((function(e){return wi.a.safeLoad(e)}))},extract:Xs,jsonPointerToArray:Qs,unescapeJsonPointerToken:Zs}),qs=Hs;function Gs(e,t){if(!Rs.test(e)){var n;if(!t)throw new Vs(di()(n="Tried to resolve a relative URL, without having a basePath. path: '".concat(e,"' basePath: '")).call(n,t,"'"));return Wo.a.resolve(t,e)}return e}function $s(e,t){var n,r;e&&e.response&&e.response.body?n=di()(r="".concat(e.response.body.code," ")).call(r,e.response.body.message):n=e.message;return new Vs("Could not resolve reference: ".concat(n),t,e)}function Ks(e){return(e+"").split("#")}function Js(e,t){var n=Bs[e];if(n&&!as.isPromise(n))try{var r=Xs(t,n);return ga()(ya.a.resolve(r),{__value:r})}catch(e){return ya.a.reject(e)}return Ys(e).then((function(e){return Xs(t,e)}))}function Ys(e){var t=Bs[e];return t?as.isPromise(t)?t:ya.a.resolve(t):(Bs[e]=Hs.fetchJSON(e).then((function(t){return Bs[e]=t,t})),Bs[e])}function Xs(e,t){var n=Qs(e);if(n.length<1)return t;var r=as.getIn(t,n);if(void 0===r)throw new Vs("Could not resolve pointer: ".concat(e," does not exist in document"),{pointer:e});return r}function Qs(e){var t;if("string"!=typeof e)throw new TypeError("Expected a string, got a ".concat($o()(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:ci()(t=e.split("/")).call(t,Zs)}function Zs(e){return"string"!=typeof e?e:Ss.a.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function el(e){return Ss.a.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}function tl(e,t){if(!(n=t)||"/"===n||"#"===n)return!0;var n,r=e.charAt(t.length),o=Gi()(t).call(t,-1);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)&&"#"!==o}var nl=n(1046),rl=n.n(nl),ol={key:"allOf",plugin:function(e,t,n,r,o){if(!o.meta||!o.meta.$$ref){var i=Gi()(n).call(n,0,-1);if(!Ns(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=Do()({},l),!rl()(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(di()(n=[]).call(n,Hi()(t),Hi()(e))).baseDoc}:o,a=n.targetKeys,s=void 0===a?["$ref","$$ref"]:a,l=[];return Ts()(e).forEach((function(){if(ti()(s).call(s,this.key)&&Ps()(this.node)){var e=this.path,n=di()(t).call(t,this.path),o=Ds(this.node,i(e));l.push(r.replace(n,o))}})),l}(e,Gi()(n).call(n,0,-1),{getBaseUrlForNodePath:function(e){var o;return r.getContext(di()(o=[]).call(o,Hi()(n),[t],Hi()(e))).baseDoc},specmap:r});u.push.apply(u,Hi()(a))})),u.push(r.mergeDeep(i,l)),!l.$$ref)u.push(r.remove(di()(c=[]).call(c,i,"$$ref")));return u}}}}},il={key:"parameters",plugin:function(e,t,n,r){if(Array.isArray(e)&&e.length){var o=ga()([],e),i=Gi()(n).call(n,0,-1),a=Do()({},as.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}})),as.replace(n,o)}return as.replace(n,e)}},al={key:"properties",plugin:function(e,t,n,r){var o=Do()({},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 as.replace(n,o)}},sl=function(){function e(t){ji()(this,e),this.root=ll(t||{})}return Mi()(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]?cl(o[r],t,n):o[r]=ll(t,n)}else cl(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:Gi()(e).call(e,0,-1).reduce((function(e,n){if(!e)return e;var r=e.children;return!r[n]&&t&&(r[n]=ll(null,e)),r[n]}),this.root)}}]),e}();function ll(e,t){return cl({children:{}},e,t)}function cl(e,t,n){return e.value=t||{},e.protoValue=n?Do()(Do()({},n.protoValue),e.value):e.value,fi()(e.children).forEach((function(t){var n=e.children[t];e.children[t]=cl(n,n.value,e)})),e}var ul=function(){function e(t){var n,r,o=this;ji()(this,e),ga()(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new sl,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:ga()(Object.create(this),as,{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=mi()(n=ci()(r=this.plugins).call(r,this.wrapPlugin.bind(this))).call(n,as.isFunction),this.patches.push(as.add([],this.spec)),this.patches.push(as.context([],this.context)),this.updatePatches(this.patches)}return Mi()(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,di()(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]):as.isFunction(e)?n=e:as.isObject(e)&&(r=e,o=function(e,t){return!Array.isArray(e)||e.every((function(e,n){return e===t[n]}))},n=Zo.a.mark((function e(t,n){var a,s,l,c,u,f;return Zo.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,k;return Zo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(as.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=fi()(e);case 12:if(!(v<g.length)){a.next=30;break}if(m=g[v],y=e[m],b=di()(t).call(t,m),x=as.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(k=o(i,t),i&&!k){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=Zo.a.mark(f),s={},l=qo()(mi()(t).call(t,as.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]])}))),ga()(n.bind(a),{pluginName:e.name||t,isGenerator:as.isGenerator(n)})}},{key:"nextPlugin",value:function(){var e=this;return ka()(this.wrappedPlugins,(function(t){return e.getMutationsForPlugin(t).length>0}))}},{key:"nextPromisedPatch",value:function(){var e;if(this.promisedPatches.length>0)return ya.a.race(ci()(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;as.normalizeArray(e).forEach((function(e){if(e instanceof Error)t.errors.push(e);else try{if(!as.isObject(e))return void t.debug("updatePatches","Got a non-object patch",e);if(t.showDebug&&t.allPatches.push(e),as.isPromise(e.value))return t.promisedPatches.push(e),void t.promisedPatchThen(e);if(as.isContextPatch(e))return void t.setContext(e.path,e.value);if(as.isMutation(e))return void t.updateMutations(e)}catch(e){console.error(e),t.errors.push(e)}}))}},{key:"updateMutations",value:function(e){"object"===$o()(e.value)&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value=Do()({},e.value));var t=as.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!"):xa()(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=Do()(Do()({},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),Gi()(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 as.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),ya.a.resolve(i)}if(n.pluginCount=n.pluginCount||{},n.pluginCount[r]=(n.pluginCount[r]||0)+1,n.pluginCount[r]>100)return ya.a.resolve({spec:n.state,errors:di()(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=ci()(a=this.promisedPatches).call(a,(function(e){return e.value}));return ya.a.all(ci()(s).call(s,(function(e){return e.then(Aa.a,Aa.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=qo()(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([ga()(Object.create(e),{plugin:r})])}finally{n.updatePluginHistory(r,{mutationIndex:t})}return n.dispatch()}();function l(e){e&&(e=as.fullyNormalizeArray(e),n.updatePatches(e,r))}}}],[{key:"getPluginName",value:function(e){return e.pluginName}},{key:"getPatchesOfType",value:function(e,t){return mi()(e).call(e,t)}}]),e}();var fl={refs:qs,allOf:ol,parameters:il,properties:al},pl=n(533),dl=n.n(pl),hl=function(e){return String.prototype.toLowerCase.call(e)},vl=function(e){return e.replace(/[^\w]/gi,"_")};function gl(e){var t=e.openapi;return!!t&&Uo()(t,"3")}function ml(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"!==$o()(e))return null;var i=(e.operationId||"").replace(/\s/g,"");return i.length?vl(e.operationId):yl(t,n,{v2OperationIdCompatibilityMode:o})}function yl(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var i,a,s=di()(i="".concat(t.toLowerCase(),"_")).call(i,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(s=s||di()(a="".concat(e.substring(1),"_")).call(a,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return di()(n="".concat(hl(t))).call(n,vl(e))}function bl(e,t){var n;return di()(n="".concat(hl(t),"-")).call(n,e)}function xl(e,t){return e&&e.paths?function(e,t){return wl(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==$o()(o))return!1;var i=o.operationId;return[ml(o,n,r),bl(n,r),i].some((function(e){return e&&e===t}))})):null}function wl(e,t,n){if(!e||"object"!==$o()(e)||!e.paths||"object"!==$o()(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"===$o()(a)){var s={spec:e,pathName:o,method:i.toUpperCase(),operation:a},l=t(s);if(n&&l)return s}}}function kl(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(dl()(i)){var a=i.parameters,s=function(e){var n=i[e];if(!dl()(n))return"continue";var s=ml(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=di()(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=qo()(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=qo()(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 Cl(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 Al(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||Zi,n?g(n):Cl(h,{requestInterceptor:u,responseInterceptor:f})(v).then(g);function g(e){v&&(fl.refs.docCache[v]=e),fl.refs.fetchJSON=Cl(h,{requestInterceptor:u,responseInterceptor:f});var t,n=[fl.refs];return"function"==typeof c&&n.push(fl.parameters),"function"==typeof l&&n.push(fl.properties),"strict"!==o&&n.push(fl.allOf),(t={spec:e,context:{baseDoc:v},plugins:n,allowMetaPatches:a,pathDiscriminator:s,parameterMacro:c,modelPropertyMacro:l,useCircularStructures:d},new ul(t).dispatch()).then(p?function(){var e=Xo()(Zo.a.mark((function e(t){return Zo.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)}}():kl)}}var Ol=n(601),Sl=n.n(Ol);function El(){return(El=Xo()(Zo.a.mark((function e(t,n){var r,o,i,a,s,l,c,u,f,p,d,h,v=arguments;return Zo.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=kl({spec:t}),d=p.spec,e.next=6,Al(Do()(Do()({},f),{},{spec:d,allowMetaPatches:!0,skipNormalization:!0}));case 6:return h=e.sent,!o&&Array.isArray(n)&&n.length&&(h.spec=Sl()(h.spec,n)||null),e.abrupt("return",h);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var jl=function(){return null},Tl={mapTagOperations:function(e){var t=e.spec,n=e.cb,r=void 0===n?jl:n,o=e.defaultTag,i=void 0===o?"default":o,a=e.v2OperationIdCompatibilityMode,s={},l={};return wl(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=ml(u,o,c,{v2OperationIdCompatibilityMode:a}),p=r({spec:t,pathName:o,method:c,operation:u,operationId:f});if(s[f])s[f]+=1,i[di()(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[di()(d="".concat(f)).call(d,s[f])]=p;var g=i[f];delete i[f],i[di()(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(Do()(Do()({spec:e.spec},Ci()(e,"requestInterceptor","responseInterceptor","userFetch")),{},{pathName:n,method:r,parameters:t,operationId:o},i))}}}};var Ml=n(1047),Pl=n.n(Ml),Ll=n(723),Fl=n.n(Ll),Il=n(523),_l=n.n(Il),Nl=n(1053),Dl=n.n(Nl),Rl={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 Vl(e,t){return ti()(t).call(t,"application/json")?"string"==typeof e?e:si()(e):e.toString()}function Bl(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=fi()(s)[0];t.url=t.url.split("{".concat(o,"}")).join(Yi(Vl(n,l),{escape:!0}))}else{var c=Xi({key:r.name,value:n,style:i||"simple",explode:a||!1,escape:!0});t.url=t.url.split("{".concat(o,"}")).join(c)}}function Ul(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},r.content){var o=fi()(r.content)[0];t.query[r.name]=Vl(n,o)}else if(!1===n&&(n="false"),0===n&&(n="0"),n)t.query[r.name]={value:n,serializationOption:Ci()(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 zl=["accept","authorization","content-type"];function Wl(e){var t=e.req,n=e.parameter,r=e.value;if(t.headers=t.headers||{},!(zl.indexOf(n.name.toLowerCase())>-1))if(n.content){var o=fi()(n.content)[0];t.headers[n.name]=Vl(r,o)}else void 0!==r&&(t.headers[n.name]=Xi({key:n.name,value:r,style:n.style||"simple",explode:void 0!==n.explode&&n.explode,escape:!1}))}function Hl(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{};var o=$o()(r);if(n.content){var i,a=fi()(n.content)[0];t.headers.Cookie=di()(i="".concat(n.name,"=")).call(i,Vl(r,a))}else if("undefined"!==o){var s="object"===o&&!Array.isArray(r)&&n.explode?"":"".concat(n.name,"=");t.headers.Cookie=s+Xi({key:n.name,value:r,escape:!1,style:n.style||"form",explode:void 0!==n.explode&&n.explode})}}var ql=n(724),Gl=n.n(ql);function $l(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=Vo()({},t),l=r.authorized,c=void 0===l?{}:l,u=i.security||a.security||[],f=c&&!!fi()(c).length,p=Sl()(a,["components","securitySchemes"])||{};if(s.headers=s.headers||{},s.query=s.query||{},!fi()(r).length||!f||!u||Array.isArray(i.security)&&!i.security.length)return t;return u.forEach((function(e){fi()(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=Gl()(di()(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=di()(f="".concat(v," ")).call(f,h)}}}))})),s}({request:t,securities:o,operation:n,spec:i});var l=n.requestBody||{},c=fi()(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=mi()(p=vi()(n.responses)).call(p,(function(e){var t=Jo()(e,2),n=t[0],r=t[1],o=parseInt(n,10);return o>=200&&o<300&&Fl()(r.content)})).reduce((function(e,t){var n=Jo()(t,2)[1];return di()(e).call(e,fi()(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"===$o()(r)){var h=(l.content[s]||{}).encoding||{};t.form={},fi()(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 Kl(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=Vo()({},t),l=r.authorized,c=void 0===l?{}:l,u=r.specSecurity,f=void 0===u?[]:u,p=i.security||f,d=c&&!!fi()(c).length,h=a.securityDefinitions;if(s.headers=s.headers||{},s.query=s.query||{},!fi()(r).length||!d||!p||Array.isArray(i.security)&&!i.security.length)return t;return p.forEach((function(e){fi()(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=Gl()(di()(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=di()(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=Jo()(i.consumes,1);t.headers["Content-Type"]=u[0]}else if(Array.isArray(o.consumes)){var f=Jo()(o.consumes,1);t.headers["Content-Type"]=f[0]}else i.parameters&&mi()(n=i.parameters).call(n,(function(e){return"file"===e.type})).length?t.headers["Content-Type"]="multipart/form-data":i.parameters&&mi()(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&&mi()(p=i.parameters).call(p,(function(e){return"body"===e.in})).length>0,v=i.parameters&&mi()(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 Jl=function(e){return Array.isArray(e)?e:[]},Yl=Es("OperationNotFoundError",(function(e,t,n){this.originalError=n,ga()(this,t||{})})),Xl={buildRequest:Ql};function Ql(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=gl(r);g||(g=m?i:Rl);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=xl(r,o);if(!b)throw new Yl("Operation ".concat(o," not found"));var x=b.operation,w=void 0===x?{}:x,k=b.method,C=b.pathName;if(y.url+=ec({spec:r,scheme:s,contextUrl:u,server:p,serverVariables:d,pathName:C,method:k}),!o)return delete y.cookies,y;y.url+=C,y.method="".concat(k).toUpperCase(),v=v||{};var A=r.paths[C]||{};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 fi()(t).forEach((function(e){fi()(t[e]).forEach((function(r){n.push(t[e][r])}))})),n}(di()(t=di()(n=[]).call(n,Jl(w.parameters))).call(t,Jl(A.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[di()(n="".concat(e.in,".")).call(n,e.name)];else if(function(e,t){return mi()(t).call(t,(function(t){return t.name===e}))}(e.name,O).length>1){var i;console.warn(di()(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=Do()(Do()({},e),{},{operation:w});if((y=m?$l(S,y):Kl(S,y)).cookies&&fi()(y.cookies).length){var E=fi()(y.cookies).reduce((function(e,t){var n=y.cookies[t];return e+(e?"&":"")+Dl.a.serialize(t,n)}),"");y.headers.Cookie=E}return y.cookies&&delete y.cookies,ha(y),y}var Zl=function(e){return e?e.replace(/\W/g,""):null};function ec(e){return gl(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=Sl()(t,["paths",n,(r||"").toLowerCase(),"servers"])||Sl()(t,["paths",n,"servers"])||Sl()(t,["servers"]),c="",u=null;if(o&&l&&l.length){var f=ci()(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=Jo()(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?Wo.a.parse(Wo.a.resolve(r,n)):Wo.a.parse(n),i=Wo.a.parse(r),a=Zl(o.protocol)||Zl(i.protocol)||"",s=o.host||i.host,l=o.pathname||"";e=a&&s?di()(t="".concat(a,"://")).call(t,s+l):l;return"/"===e[e.length-1]?Gi()(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=Wo.a.parse(a),l=Array.isArray(r.schemes)?r.schemes[0]:null,c=o||l||Zl(s.protocol)||"http",u=r.host||s.host||"",f=r.basePath||"";t=c&&u?di()(n="".concat(c,"://")).call(n,u+f):f;return"/"===t[t.length-1]?Gi()(t).call(t,0,-1):t}(e)}function tc(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 tc))return new tc(n);Vo()(this,n);var r=this.resolve().then((function(){return t.disableInterfaces||Vo()(t,tc.makeApisTagOperation(t)),t}));return r.client=this,r}tc.http=Zi,tc.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}),Qi.mergeInQueryOrForm(r),r=t(r),n(e(r))}}.bind(null,tc.http),tc.resolve=Al,tc.resolveSubtree=function(e,t){return El.apply(this,arguments)},tc.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=Pl()(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),u=t||n||Zi;i&&a&&!o&&(o=bl(i,a));var f=Xl.buildRequest(Do()({spec:r,operationId:o,parameters:s,securities:l,http:u},c));return f.body&&(Fl()(f.body)||_l()(f.body))&&(f.body=si()(f.body)),u(f)},tc.serializeRes=ra,tc.serializeHeaders=ia,tc.clearCache=function(){fl.refs.clearCache()},tc.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Tl.makeExecute(e);return{apis:Tl.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},tc.buildRequest=Ql,tc.helpers={opId:ml},tc.getBaseUrl=ec,tc.prototype={http:Zi,execute:function(e){return this.applyDefaults(),tc.execute(Do()({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 tc.resolve(Do()({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}))}},tc.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&Uo()(t,"http")){var n=Wo.a.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}};tc.helpers;var nc=tc,rc={flex:1,display:"flex",flexDirection:"column"};function oc(e){return e.startsWith("//")?"https:"+e:e}var ic=function(e){function t(t){var r=e.call(this,t)||this;Object.defineProperty(r,"formApi",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(r,"serverUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"serverVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"setFormApi",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.formApi=e}}),Object.defineProperty(r,"handleChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.setState({form:e}),function(e){var t=Object(u.c)("securityRequirementName");if(e.values.auth)for(var n=0,r=Object.keys(e.values.auth);n<r.length;n++){var o=r[n],i=e.values.auth[o];t&&t!==o||Object(u.h)(o,i)}}(e)}}),Object.defineProperty(r,"onOperationParametersChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.target;!function(e){var t,n=e.id,r=e.value,o=e.formState;if(null!==(t=o.values)&&void 0!==t&&t.path)for(var i=0,a=Object.keys(o.values.path);i<a.length;i++){var s=a[i];n.includes(s)&&Object(u.g)(n,r)}}({id:t.id,value:t.value,formState:r.state.form})}}),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.serverUrl=e}}),Object.defineProperty(r,"handleVarsChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.serverVariables=e}}),Object.defineProperty(r,"handleClear",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.formApi.reset()}}),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,p,d,h,v,g,m,y,b,x,w,k,C,A,O,S,E,j,T,M=this;return Object(a.e)(this,(function(P){switch(P.label){case 0:if(this.formApi.submitForm(),r=this.formApi.getState(),o=r.values,r.invalid)return this.setState({shaking:!0}),setTimeout((function(){return M.setState({shaking:!1})}),1e3),[2];if(i=this.props.operation.requestBody,s=i&&i.content&&i.content.active&&i.content.active.name||"",l=o.body,/json/.test(s))try{l=JSON.parse(l)}catch(e){console.error(e)}if(this.setState({loading:!0}),c=this.props.store,p=c.dereferencedRawSpec,d=this.props.operation,!(h=Object(u.d)(p,["paths",d.path,(d.httpVerb||"").toLowerCase(),"servers"])||Object(u.d)(p,["paths",d.path,"servers"])||Object(u.d)(p,["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");v=h.find((function(e){return M.serverUrl.endsWith(e.url.endsWith("/")?e.url.substring(0,e.url.length-1):e.url)})),g=Date.now(),m=!!window.document.documentMode,o.auth?(b=Object.keys(o.auth)[0],y=Object(a.a)(Object(a.a)({},p),{components:Object(a.a)(Object(a.a)({},p.components),{securitySchemes:Object(a.a)(Object(a.a)({},p.components.securitySchemes),(T={},T[b]=Object(a.a)(Object(a.a)({},p.components.securitySchemes[b]),{type:"openIdConnect"===p.components.securitySchemes[b].type?"oauth2":p.components.securitySchemes[b].type}),T))})})):y=Object(a.a)({},p),(x=c.options.corsProxyUrl)&&p.servers&&p.servers.length&&(y.servers=p.servers.map((function(e){return{url:x+oc(e.url),description:e.description}}))),w=(null==i||null===(e=i.content)||void 0===e||null===(t=e.active)||void 0===t?void 0:t.name)||null,k="application/x-www-form-urlencoded"===w?Object(f.parse)(l):l,P.label=1;case 1:return P.trys.push([1,5,8,9]),A={userFetch:m&&n(721).fetch,server:x?x+oc(v.url):v.url,serverVariables:this.serverVariables,spec:y,pathName:d.path,method:d.httpVerb,parameters:Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},o.path),o.query),o.header),o.cookie),securities:{authorized:o.auth},requestBody:k,requestContentType:w,responseContentType:(null===(C=o.header)||void 0===C?void 0:C.Accept)||null},[4,nc.execute(A)];case 2:return(O=P.sent())&&O.data instanceof Blob?(S=O,[4,O.data.text()]):[3,4];case 3:S.data=P.sent(),P.label=4;case 4:return this.setState({response:O,error:void 0}),[3,9];case 5:return(E=P.sent())&&E.response&&E.response.data instanceof Blob?(j=E.response,[4,E.response.data.text()]):[3,7];case 6:j.data=P.sent(),P.label=7;case 7:return this.setState({response:void 0,error:E}),[3,9];case 8:return this.setState({loading:!1,activeTab:1,time:Date.now()-g}),[7];case 9:return[2]}}))}))}}),Object.defineProperty(r,"validateBody",{enumerable:!0,configurable:!0,writable:!0,value:function(){}});var o=t.operation.parameters.filter((function(e){return"path"===e.in})).reduce((function(e,t){var n=t.in,r=t.name;return e[r]=Object(u.c)(n+"."+r),e}),{});return r.state={form:{values:{path:o||{}}},shaking:!1,loading:!1,activeTab:0},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}),[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,p=o.error,h=!(!u&&!p);return s.createElement(ac,{shaking:i,className:n,rootElement:r},s.createElement(d.e,null,s.createElement(Gr,{active:l,onChange:this.handleTabChange,hasResponse:h}),s.createElement(d.c,{onClick:this.props.onClose}," ✕ ")),s.createElement(d.d,{hidden:0!==l},this.renderRequest()),s.createElement(d.d,{hidden:1!==l},this.renderResponse()),s.createElement(Le,{hasResponse:h,params:c.values&&Object(a.a)({},c.values),operation:t,loading:f,onExecute:this.handleExecute,onClear:this.handleClear}))}}),Object.defineProperty(t.prototype,"renderRequest",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.props.operation,t=this.state,n=t.form,r=t.resolvedRawSpec,o=n.errors||{},i=o.path||o.cookie||o.header||o.query,c=r&&p.i.get(r,e.pointer),u=n.values&&n.values.auth&&Object.keys(n.values.auth)[0];u&&n.values.auth[u]||(u=void 0),!u||void 0===n.values.auth[u].token&&void 0===n.values.auth[u].client_id&&void 0===n.values.auth[u].client_secret||n.values.auth[u].token&&n.values.auth[u].token.access_token||(u=void 0);var f=e.parameters||[];return r?s.createElement(s.Fragment,null,s.createElement(l.a,{onChange:this.handleChange,getApi:this.setFormApi,style:Object(a.a)(Object(a.a)({},rc),{margin:0})},s.createElement(De,{key:e.name,style:rc},s.createElement(Fe.b,null,e.requestBody&&s.createElement(_e,{key:"body"},s.createElement(Ne,{error:!!o.body}," Body ")),f.length&&s.createElement(_e,{key:"params"},s.createElement(Ne,{error:i},"Parameters (",f.length,")"))||null,e.security.length&&s.createElement(_e,{key:"auth"},s.createElement(Ne,{error:!!o.auth,success:!!u},"Auth ",u&&"("+u+")"||null))||null),e.requestBody&&s.createElement(Fe.c,{key:"body"},s.createElement(Ur,{validate:this.validateBody,console:this,body:e.requestBody,id:e.id,resolvedBody:c.requestBody})),f.length&&s.createElement(Fe.c,{key:"params"},s.createElement(be,{operation:e,values:n.values,errors:n.errors||{},onChange:this.onOperationParametersChange}))||null,e.security.length&&s.createElement(Fe.c,{key:"auth"},s.createElement(_o,{formApi:this.formApi,form:n,operation:e,activeServer:this.serverUrl}))||null)),s.createElement(O,{operation:e,onChange:this.handleServerChange,onVarsChange:this.handleVarsChange})):"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(qe,{response:t,error:n,time:r})}}),t=Object(a.c)([c.a],t)}(s.Component);function ac(e){var t=e.shaking,n=e.className,r=e.children,o=e.rootElement,i=Object(u.j)(o)[0];return s.createElement(d.f,{shaking:t,className:n,"data-cy":"console",fullWidth:null==i?void 0:i.width},r)}}])]);
48
+ var Ka=new WeakMap,Ja=function(e){this.observers=new Map,this.obj=e},Ya=function(e,t){this.callback=e,this.observer=t};function Xa(e,t){t.unobserve()}function Qa(e,t){var n,r=function(e){return Ka.get(e)}(e);if(r){var o=function(e,t){return e.observers.get(t)}(r,t);n=o&&o.observer}else r=new Ja(e),Ka.set(e,r);if(n)return n;if(n={},r.value=Pa(e),t){n.callback=t,n.next=null;var i=function(){Za(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(){Za(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 Ya(t,n)),n}function Za(e,t){void 0===t&&(t=!1);var n=Ka.get(e.object);es(n.value,e.object,e.patches,"",t),e.patches.length&&Wa(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function es(e,t,n,r,o){if(t!==e){"function"==typeof t.toJSON&&(t=t.toJSON());for(var i=Ma(t),a=Ma(e),s=!1,l=a.length-1;l>=0;l--){var c=e[f=a[l]];if(!Ta(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+"/"+Ia(f),value:Pa(c)}),n.push({op:"remove",path:r+"/"+Ia(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?es(c,u,n,r+"/"+Ia(f),o):c!==u&&(!0,o&&n.push({op:"test",path:r+"/"+Ia(f),value:Pa(c)}),n.push({op:"replace",path:r+"/"+Ia(f),value:Pa(u)}))}}if(s||i.length!=a.length)for(l=0;l<i.length;l++){var f;Ta(e,f=i[l])||void 0===t[f]||n.push({op:"add",path:r+"/"+Ia(f),value:Pa(t[f])})}}}function ts(e,t,n){void 0===n&&(n=!1);var r=[];return es(e,t,r,"",n),r}Object.assign({},r,o,{JsonPatchError:Na,deepClone:Pa,escapePathComponent:Ia,unescapePathComponent:Fa});var ns=n(1011),rs=n.n(ns),os=n(1012),is=n.n(os),as={add:function(e,t){return{op:"add",path:e,value:t}},replace:ls,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=Ro()(Ro()({},t),{},{path:t.path&&ss(t.path)})).op){var r=ws(e,t.path);ga()(r,t.value),Wa(e,[ls(t.path,r)])}else if("mergeDeep"===t.op){var o=ws(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]=di()(l).call(l,a)}else if(vs(a)&&!s){var c=Ro()({},o[i]);for(var u in a){if(Object.prototype.hasOwnProperty.call(c,u)){c=rs()(is()(c),a);break}ga()(c,Sa()({},u,a[u]))}o[i]=c}else o[i]=a}}else if("add"===t.op&&""===t.path&&vs(t.value)){var f=fi()(t.value).reduce((function(e,n){return e.push({op:"add",path:"/".concat(ss(n)),value:t.value[n]}),e}),[]);Wa(e,f)}else if("replace"===t.op&&""===t.path){var p=t.value;n.allowMetaPatches&&t.meta&&bs(t)&&(Array.isArray(t.value)||vs(t.value))&&(p=Ro()(Ro()({},p),t.meta)),e=p}else if(Wa(e,[t]),n.allowMetaPatches&&t.meta&&bs(t)&&(Array.isArray(t.value)||vs(t.value))){var d=ws(e,t.path),h=Ro()(Ro()({},d),t.meta);Wa(e,[ls(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:ds,fullyNormalizeArray:function(e){return hs(ds(ps(e)))},normalizeArray:ps,isPromise:function(e){return vs(e)&&gs(e.then)},forEachNew:function(e,t){try{return cs(e,fs,t)}catch(e){return e}},forEachNewPrimitive:function(e,t){try{return cs(e,us,t)}catch(e){return e}},isJsonPatch:ms,isContextPatch:function(e){return xs(e)&&"context"===e.type},isPatch:xs,isMutation:ys,isAdditiveMutation:bs,isGenerator:function(e){return"[object GeneratorFunction]"===Object.prototype.toString.call(e)},isFunction:gs,isObject:vs,isError:function(e){return e instanceof Error}};function ss(e){return Array.isArray(e)?e.length<1?"":"/".concat(ci()(e).call(e,(function(e){return(e+"").replace(/~/g,"~0").replace(/\//g,"~1")})).join("/")):e}function ls(e,t,n){return{op:"replace",path:e,value:t,meta:n}}function cs(e,t,n){var r;return hs(ds(ci()(r=mi()(e).call(e,bs)).call(r,(function(e){return t(e.value,n,e.path)}))||[]))}function us(e,t,n){return n=n||[],Array.isArray(e)?ci()(e).call(e,(function(e,r){return us(e,t,di()(n).call(n,r))})):vs(e)?ci()(r=fi()(e)).call(r,(function(r){return us(e[r],t,di()(n).call(n,r))})):t(e,n[n.length-1],n);var r}function fs(e,t,n){var r=[];if((n=n||[]).length>0){var o=t(e,n[n.length-1],n);o&&(r=di()(r).call(r,o))}if(Array.isArray(e)){var i=ci()(e).call(e,(function(e,r){return fs(e,t,di()(n).call(n,r))}));i&&(r=di()(r).call(r,i))}else if(vs(e)){var a,s=ci()(a=fi()(e)).call(a,(function(r){return fs(e[r],t,di()(n).call(n,r))}));s&&(r=di()(r).call(r,s))}return r=ds(r)}function ps(e){return Array.isArray(e)?e:[e]}function ds(e){var t;return di()(t=[]).apply(t,Hi()(ci()(e).call(e,(function(e){return Array.isArray(e)?ds(e):e}))))}function hs(e){return mi()(e).call(e,(function(e){return void 0!==e}))}function vs(e){return e&&"object"===$o()(e)}function gs(e){return e&&"function"==typeof e}function ms(e){if(xs(e)){var t=e.op;return"add"===t||"remove"===t||"replace"===t}return!1}function ys(e){return ms(e)||xs(e)&&"mutation"===e.type}function bs(e){return ys(e)&&("add"===e.op||"replace"===e.op||"merge"===e.op||"mergeDeep"===e.op)}function xs(e){return e&&"object"===$o()(e)}function ws(e,t){try{return Ua(e,t)}catch(e){return console.error(e),{}}}var ks=n(1036),Cs=n.n(ks),As=n(721),Os=n(1043),Ss=n.n(Os);function Es(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 js=n(1044),Ts=n.n(js),Ms=n(1045),Ps=n.n(Ms),Ls=["properties"],Is=["properties"],Fs=["definitions","parameters","responses","securityDefinitions","components/schemas","components/responses","components/parameters","components/securitySchemes"],_s=["schema/example","items/example"];function Ns(e){var t=e[e.length-1],n=e[e.length-2],r=e.join("/");return Ls.indexOf(t)>-1&&-1===Is.indexOf(n)||Fs.indexOf(r)>-1||_s.some((function(e){return r.indexOf(e)>-1}))}function Rs(e,t){var n,r=e.split("#"),o=Jo()(r,2),i=o[0],a=o[1],s=Wo.a.resolve(i||"",t||"");return a?di()(n="".concat(s,"#")).call(n,a):s}var Ds=new RegExp("^([a-z]+://|//)","i"),Vs=Es("JSONRefError",(function(e,t,n){this.originalError=n,ga()(this,t||{})})),Bs={},Us=new Cs.a,zs=[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]}],Ws={key:"$ref",plugin:function(e,t,n,r){var o=r.getInstance(),i=Gi()(n).call(n,0,-1);if(!Ns(i)&&(a=i,!zs.some((function(e){return e(a)})))){var a,s=r.getContext(n).baseDoc;if("string"!=typeof e)return new Vs("$ref: must be a string (JSON-Ref)",{$ref:e,baseDoc:s,fullPath:n});var l,c,u,f=Ks(e),p=f[0],d=f[1]||"";try{l=s||p?Gs(p,s):null}catch(t){return $s(t,{pointer:d,$ref:e,basePath:l,fullPath:n})}if(function(e,t,n,r){var o,i,a=Us.get(r);a||(a={},Us.set(r,a));var s=function(e){if(0===e.length)return"";return"/".concat(ci()(e).call(e,el).join("/"))}(n),l=di()(o="".concat(t||"<specmap-base>","#")).call(o,e),c=s.replace(/allOf\/\d+\/?/g,""),u=r.contextTree.get([]).baseDoc;if(t==u&&tl(c,e))return!0;var f="";if(n.some((function(e){var t;return f=di()(t="".concat(f,"/")).call(t,el(e)),a[f]&&a[f].some((function(e){return tl(e,l)||tl(l,e)}))})))return!0;return void(a[c]=di()(i=a[c]||[]).call(i,l))}(d,l,i,r)&&!o.useCircularStructures){var h=Rs(e,l);return e===h?null:as.replace(n,h)}if(null==l?(u=Qs(d),void 0===(c=r.get(u))&&(c=new Vs("Could not resolve reference: ".concat(e),{pointer:d,$ref:e,baseDoc:s,fullPath:n}))):c=null!=(c=Js(l,d)).__value?c.__value:c.catch((function(t){throw $s(t,{pointer:d,$ref:e,baseDoc:s,fullPath:n})})),c instanceof Error)return[as.remove(n),c];var v=Rs(e,l),g=as.replace(i,c,{$$ref:v});if(l&&l!==s)return[g,as.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 as.isObject(t)&&(n.indexOf(t)>=0||fi()(t).some((function(n){return e(t[n])})))}(t.value)}(r.state,g)||o.useCircularStructures)return g}catch(e){return null}}}},Hs=ga()(Ws,{docCache:Bs,absoluteify:Gs,clearCache:function(e){void 0!==e?delete Bs[e]:fi()(Bs).forEach((function(e){delete Bs[e]}))},JSONRefError:Vs,wrapError:$s,getDoc:Ys,split:Ks,extractFromDoc:Js,fetchJSON:function(e){return Object(As.fetch)(e,{headers:{Accept:"application/json, application/yaml"},loadSpec:!0}).then((function(e){return e.text()})).then((function(e){return wi.a.safeLoad(e)}))},extract:Xs,jsonPointerToArray:Qs,unescapeJsonPointerToken:Zs}),qs=Hs;function Gs(e,t){if(!Ds.test(e)){var n;if(!t)throw new Vs(di()(n="Tried to resolve a relative URL, without having a basePath. path: '".concat(e,"' basePath: '")).call(n,t,"'"));return Wo.a.resolve(t,e)}return e}function $s(e,t){var n,r;e&&e.response&&e.response.body?n=di()(r="".concat(e.response.body.code," ")).call(r,e.response.body.message):n=e.message;return new Vs("Could not resolve reference: ".concat(n),t,e)}function Ks(e){return(e+"").split("#")}function Js(e,t){var n=Bs[e];if(n&&!as.isPromise(n))try{var r=Xs(t,n);return ga()(ya.a.resolve(r),{__value:r})}catch(e){return ya.a.reject(e)}return Ys(e).then((function(e){return Xs(t,e)}))}function Ys(e){var t=Bs[e];return t?as.isPromise(t)?t:ya.a.resolve(t):(Bs[e]=Hs.fetchJSON(e).then((function(t){return Bs[e]=t,t})),Bs[e])}function Xs(e,t){var n=Qs(e);if(n.length<1)return t;var r=as.getIn(t,n);if(void 0===r)throw new Vs("Could not resolve pointer: ".concat(e," does not exist in document"),{pointer:e});return r}function Qs(e){var t;if("string"!=typeof e)throw new TypeError("Expected a string, got a ".concat($o()(e)));return"/"===e[0]&&(e=e.substr(1)),""===e?[]:ci()(t=e.split("/")).call(t,Zs)}function Zs(e){return"string"!=typeof e?e:Ss.a.unescape(e.replace(/~1/g,"/").replace(/~0/g,"~"))}function el(e){return Ss.a.escape(e.replace(/~/g,"~0").replace(/\//g,"~1"))}function tl(e,t){if(!(n=t)||"/"===n||"#"===n)return!0;var n,r=e.charAt(t.length),o=Gi()(t).call(t,-1);return 0===e.indexOf(t)&&(!r||"/"===r||"#"===r)&&"#"!==o}var nl=n(1046),rl=n.n(nl),ol={key:"allOf",plugin:function(e,t,n,r,o){if(!o.meta||!o.meta.$$ref){var i=Gi()(n).call(n,0,-1);if(!Ns(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=Ro()({},l),!rl()(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(di()(n=[]).call(n,Hi()(t),Hi()(e))).baseDoc}:o,a=n.targetKeys,s=void 0===a?["$ref","$$ref"]:a,l=[];return Ts()(e).forEach((function(){if(ti()(s).call(s,this.key)&&Ps()(this.node)){var e=this.path,n=di()(t).call(t,this.path),o=Rs(this.node,i(e));l.push(r.replace(n,o))}})),l}(e,Gi()(n).call(n,0,-1),{getBaseUrlForNodePath:function(e){var o;return r.getContext(di()(o=[]).call(o,Hi()(n),[t],Hi()(e))).baseDoc},specmap:r});u.push.apply(u,Hi()(a))})),u.push(r.mergeDeep(i,l)),!l.$$ref)u.push(r.remove(di()(c=[]).call(c,i,"$$ref")));return u}}}}},il={key:"parameters",plugin:function(e,t,n,r){if(Array.isArray(e)&&e.length){var o=ga()([],e),i=Gi()(n).call(n,0,-1),a=Ro()({},as.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}})),as.replace(n,o)}return as.replace(n,e)}},al={key:"properties",plugin:function(e,t,n,r){var o=Ro()({},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 as.replace(n,o)}},sl=function(){function e(t){ji()(this,e),this.root=ll(t||{})}return Mi()(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]?cl(o[r],t,n):o[r]=ll(t,n)}else cl(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:Gi()(e).call(e,0,-1).reduce((function(e,n){if(!e)return e;var r=e.children;return!r[n]&&t&&(r[n]=ll(null,e)),r[n]}),this.root)}}]),e}();function ll(e,t){return cl({children:{}},e,t)}function cl(e,t,n){return e.value=t||{},e.protoValue=n?Ro()(Ro()({},n.protoValue),e.value):e.value,fi()(e.children).forEach((function(t){var n=e.children[t];e.children[t]=cl(n,n.value,e)})),e}var ul=function(){function e(t){var n,r,o=this;ji()(this,e),ga()(this,{spec:"",debugLevel:"info",plugins:[],pluginHistory:{},errors:[],mutations:[],promisedPatches:[],state:{},patches:[],context:{},contextTree:new sl,showDebug:!1,allPatches:[],pluginProp:"specMap",libMethods:ga()(Object.create(this),as,{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=mi()(n=ci()(r=this.plugins).call(r,this.wrapPlugin.bind(this))).call(n,as.isFunction),this.patches.push(as.add([],this.spec)),this.patches.push(as.context([],this.context)),this.updatePatches(this.patches)}return Mi()(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,di()(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]):as.isFunction(e)?n=e:as.isObject(e)&&(r=e,o=function(e,t){return!Array.isArray(e)||e.every((function(e,n){return e===t[n]}))},n=Zo.a.mark((function e(t,n){var a,s,l,c,u,f;return Zo.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,k;return Zo.a.wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(as.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=fi()(e);case 12:if(!(v<g.length)){a.next=30;break}if(m=g[v],y=e[m],b=di()(t).call(t,m),x=as.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(k=o(i,t),i&&!k){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=Zo.a.mark(f),s={},l=qo()(mi()(t).call(t,as.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]])}))),ga()(n.bind(a),{pluginName:e.name||t,isGenerator:as.isGenerator(n)})}},{key:"nextPlugin",value:function(){var e=this;return ka()(this.wrappedPlugins,(function(t){return e.getMutationsForPlugin(t).length>0}))}},{key:"nextPromisedPatch",value:function(){var e;if(this.promisedPatches.length>0)return ya.a.race(ci()(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;as.normalizeArray(e).forEach((function(e){if(e instanceof Error)t.errors.push(e);else try{if(!as.isObject(e))return void t.debug("updatePatches","Got a non-object patch",e);if(t.showDebug&&t.allPatches.push(e),as.isPromise(e.value))return t.promisedPatches.push(e),void t.promisedPatchThen(e);if(as.isContextPatch(e))return void t.setContext(e.path,e.value);if(as.isMutation(e))return void t.updateMutations(e)}catch(e){console.error(e),t.errors.push(e)}}))}},{key:"updateMutations",value:function(e){"object"===$o()(e.value)&&!Array.isArray(e.value)&&this.allowMetaPatches&&(e.value=Ro()({},e.value));var t=as.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!"):xa()(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=Ro()(Ro()({},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),Gi()(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 as.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),ya.a.resolve(i)}if(n.pluginCount=n.pluginCount||{},n.pluginCount[r]=(n.pluginCount[r]||0)+1,n.pluginCount[r]>100)return ya.a.resolve({spec:n.state,errors:di()(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=ci()(a=this.promisedPatches).call(a,(function(e){return e.value}));return ya.a.all(ci()(s).call(s,(function(e){return e.then(Aa.a,Aa.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=qo()(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([ga()(Object.create(e),{plugin:r})])}finally{n.updatePluginHistory(r,{mutationIndex:t})}return n.dispatch()}();function l(e){e&&(e=as.fullyNormalizeArray(e),n.updatePatches(e,r))}}}],[{key:"getPluginName",value:function(e){return e.pluginName}},{key:"getPatchesOfType",value:function(e,t){return mi()(e).call(e,t)}}]),e}();var fl={refs:qs,allOf:ol,parameters:il,properties:al},pl=n(533),dl=n.n(pl),hl=function(e){return String.prototype.toLowerCase.call(e)},vl=function(e){return e.replace(/[^\w]/gi,"_")};function gl(e){var t=e.openapi;return!!t&&Uo()(t,"3")}function ml(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"!==$o()(e))return null;var i=(e.operationId||"").replace(/\s/g,"");return i.length?vl(e.operationId):yl(t,n,{v2OperationIdCompatibilityMode:o})}function yl(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.v2OperationIdCompatibilityMode;if(o){var i,a,s=di()(i="".concat(t.toLowerCase(),"_")).call(i,e).replace(/[\s!@#$%^&*()_+=[{\]};:<>|./?,\\'""-]/g,"_");return(s=s||di()(a="".concat(e.substring(1),"_")).call(a,t)).replace(/((_){2,})/g,"_").replace(/^(_)*/g,"").replace(/([_])*$/g,"")}return di()(n="".concat(hl(t))).call(n,vl(e))}function bl(e,t){var n;return di()(n="".concat(hl(t),"-")).call(n,e)}function xl(e,t){return e&&e.paths?function(e,t){return wl(e,t,!0)||null}(e,(function(e){var n=e.pathName,r=e.method,o=e.operation;if(!o||"object"!==$o()(o))return!1;var i=o.operationId;return[ml(o,n,r),bl(n,r),i].some((function(e){return e&&e===t}))})):null}function wl(e,t,n){if(!e||"object"!==$o()(e)||!e.paths||"object"!==$o()(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"===$o()(a)){var s={spec:e,pathName:o,method:i.toUpperCase(),operation:a},l=t(s);if(n&&l)return s}}}function kl(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(dl()(i)){var a=i.parameters,s=function(e){var n=i[e];if(!dl()(n))return"continue";var s=ml(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=di()(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=qo()(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=qo()(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 Cl(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 Al(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||Zi,n?g(n):Cl(h,{requestInterceptor:u,responseInterceptor:f})(v).then(g);function g(e){v&&(fl.refs.docCache[v]=e),fl.refs.fetchJSON=Cl(h,{requestInterceptor:u,responseInterceptor:f});var t,n=[fl.refs];return"function"==typeof c&&n.push(fl.parameters),"function"==typeof l&&n.push(fl.properties),"strict"!==o&&n.push(fl.allOf),(t={spec:e,context:{baseDoc:v},plugins:n,allowMetaPatches:a,pathDiscriminator:s,parameterMacro:c,modelPropertyMacro:l,useCircularStructures:d},new ul(t).dispatch()).then(p?function(){var e=Xo()(Zo.a.mark((function e(t){return Zo.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)}}():kl)}}var Ol=n(601),Sl=n.n(Ol);function El(){return(El=Xo()(Zo.a.mark((function e(t,n){var r,o,i,a,s,l,c,u,f,p,d,h,v=arguments;return Zo.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=kl({spec:t}),d=p.spec,e.next=6,Al(Ro()(Ro()({},f),{},{spec:d,allowMetaPatches:!0,skipNormalization:!0}));case 6:return h=e.sent,!o&&Array.isArray(n)&&n.length&&(h.spec=Sl()(h.spec,n)||null),e.abrupt("return",h);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var jl=function(){return null},Tl={mapTagOperations:function(e){var t=e.spec,n=e.cb,r=void 0===n?jl:n,o=e.defaultTag,i=void 0===o?"default":o,a=e.v2OperationIdCompatibilityMode,s={},l={};return wl(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=ml(u,o,c,{v2OperationIdCompatibilityMode:a}),p=r({spec:t,pathName:o,method:c,operation:u,operationId:f});if(s[f])s[f]+=1,i[di()(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[di()(d="".concat(f)).call(d,s[f])]=p;var g=i[f];delete i[f],i[di()(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(Ro()(Ro()({spec:e.spec},Ci()(e,"requestInterceptor","responseInterceptor","userFetch")),{},{pathName:n,method:r,parameters:t,operationId:o},i))}}}};var Ml=n(1047),Pl=n.n(Ml),Ll=n(723),Il=n.n(Ll),Fl=n(523),_l=n.n(Fl),Nl=n(1053),Rl=n.n(Nl),Dl={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 Vl(e,t){return ti()(t).call(t,"application/json")?"string"==typeof e?e:si()(e):e.toString()}function Bl(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=fi()(s)[0];t.url=t.url.split("{".concat(o,"}")).join(Yi(Vl(n,l),{escape:!0}))}else{var c=Xi({key:r.name,value:n,style:i||"simple",explode:a||!1,escape:!0});t.url=t.url.split("{".concat(o,"}")).join(c)}}function Ul(e){var t=e.req,n=e.value,r=e.parameter;if(t.query=t.query||{},r.content){var o=fi()(r.content)[0];t.query[r.name]=Vl(n,o)}else if(!1===n&&(n="false"),0===n&&(n="0"),n)t.query[r.name]={value:n,serializationOption:Ci()(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 zl=["accept","authorization","content-type"];function Wl(e){var t=e.req,n=e.parameter,r=e.value;if(t.headers=t.headers||{},!(zl.indexOf(n.name.toLowerCase())>-1))if(n.content){var o=fi()(n.content)[0];t.headers[n.name]=Vl(r,o)}else void 0!==r&&(t.headers[n.name]=Xi({key:n.name,value:r,style:n.style||"simple",explode:void 0!==n.explode&&n.explode,escape:!1}))}function Hl(e){var t=e.req,n=e.parameter,r=e.value;t.headers=t.headers||{};var o=$o()(r);if(n.content){var i,a=fi()(n.content)[0];t.headers.Cookie=di()(i="".concat(n.name,"=")).call(i,Vl(r,a))}else if("undefined"!==o){var s="object"===o&&!Array.isArray(r)&&n.explode?"":"".concat(n.name,"=");t.headers.Cookie=s+Xi({key:n.name,value:r,escape:!1,style:n.style||"form",explode:void 0!==n.explode&&n.explode})}}var ql=n(724),Gl=n.n(ql);function $l(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=Vo()({},t),l=r.authorized,c=void 0===l?{}:l,u=i.security||a.security||[],f=c&&!!fi()(c).length,p=Sl()(a,["components","securitySchemes"])||{};if(s.headers=s.headers||{},s.query=s.query||{},!fi()(r).length||!f||!u||Array.isArray(i.security)&&!i.security.length)return t;return u.forEach((function(e){fi()(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=Gl()(di()(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=di()(f="".concat(v," ")).call(f,h)}}}))})),s}({request:t,securities:o,operation:n,spec:i});var l=n.requestBody||{},c=fi()(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=mi()(p=vi()(n.responses)).call(p,(function(e){var t=Jo()(e,2),n=t[0],r=t[1],o=parseInt(n,10);return o>=200&&o<300&&Il()(r.content)})).reduce((function(e,t){var n=Jo()(t,2)[1];return di()(e).call(e,fi()(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"===$o()(r)){var h=(l.content[s]||{}).encoding||{};t.form={},fi()(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 Kl(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=Vo()({},t),l=r.authorized,c=void 0===l?{}:l,u=r.specSecurity,f=void 0===u?[]:u,p=i.security||f,d=c&&!!fi()(c).length,h=a.securityDefinitions;if(s.headers=s.headers||{},s.query=s.query||{},!fi()(r).length||!d||!p||Array.isArray(i.security)&&!i.security.length)return t;return p.forEach((function(e){fi()(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=Gl()(di()(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=di()(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=Jo()(i.consumes,1);t.headers["Content-Type"]=u[0]}else if(Array.isArray(o.consumes)){var f=Jo()(o.consumes,1);t.headers["Content-Type"]=f[0]}else i.parameters&&mi()(n=i.parameters).call(n,(function(e){return"file"===e.type})).length?t.headers["Content-Type"]="multipart/form-data":i.parameters&&mi()(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&&mi()(p=i.parameters).call(p,(function(e){return"body"===e.in})).length>0,v=i.parameters&&mi()(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 Jl=function(e){return Array.isArray(e)?e:[]},Yl=Es("OperationNotFoundError",(function(e,t,n){this.originalError=n,ga()(this,t||{})})),Xl={buildRequest:Ql};function Ql(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=gl(r);g||(g=m?i:Dl);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=xl(r,o);if(!b)throw new Yl("Operation ".concat(o," not found"));var x=b.operation,w=void 0===x?{}:x,k=b.method,C=b.pathName;if(y.url+=ec({spec:r,scheme:s,contextUrl:u,server:p,serverVariables:d,pathName:C,method:k}),!o)return delete y.cookies,y;y.url+=C,y.method="".concat(k).toUpperCase(),v=v||{};var A=r.paths[C]||{};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 fi()(t).forEach((function(e){fi()(t[e]).forEach((function(r){n.push(t[e][r])}))})),n}(di()(t=di()(n=[]).call(n,Jl(w.parameters))).call(t,Jl(A.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[di()(n="".concat(e.in,".")).call(n,e.name)];else if(function(e,t){return mi()(t).call(t,(function(t){return t.name===e}))}(e.name,O).length>1){var i;console.warn(di()(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=Ro()(Ro()({},e),{},{operation:w});if((y=m?$l(S,y):Kl(S,y)).cookies&&fi()(y.cookies).length){var E=fi()(y.cookies).reduce((function(e,t){var n=y.cookies[t];return e+(e?"&":"")+Rl.a.serialize(t,n)}),"");y.headers.Cookie=E}return y.cookies&&delete y.cookies,ha(y),y}var Zl=function(e){return e?e.replace(/\W/g,""):null};function ec(e){return gl(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=Sl()(t,["paths",n,(r||"").toLowerCase(),"servers"])||Sl()(t,["paths",n,"servers"])||Sl()(t,["servers"]),c="",u=null;if(o&&l&&l.length){var f=ci()(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=Jo()(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?Wo.a.parse(Wo.a.resolve(r,n)):Wo.a.parse(n),i=Wo.a.parse(r),a=Zl(o.protocol)||Zl(i.protocol)||"",s=o.host||i.host,l=o.pathname||"";e=a&&s?di()(t="".concat(a,"://")).call(t,s+l):l;return"/"===e[e.length-1]?Gi()(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=Wo.a.parse(a),l=Array.isArray(r.schemes)?r.schemes[0]:null,c=o||l||Zl(s.protocol)||"http",u=r.host||s.host||"",f=r.basePath||"";t=c&&u?di()(n="".concat(c,"://")).call(n,u+f):f;return"/"===t[t.length-1]?Gi()(t).call(t,0,-1):t}(e)}function tc(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 tc))return new tc(n);Vo()(this,n);var r=this.resolve().then((function(){return t.disableInterfaces||Vo()(t,tc.makeApisTagOperation(t)),t}));return r.client=this,r}tc.http=Zi,tc.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}),Qi.mergeInQueryOrForm(r),r=t(r),n(e(r))}}.bind(null,tc.http),tc.resolve=Al,tc.resolveSubtree=function(e,t){return El.apply(this,arguments)},tc.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=Pl()(e,["http","fetch","spec","operationId","pathName","method","parameters","securities"]),u=t||n||Zi;i&&a&&!o&&(o=bl(i,a));var f=Xl.buildRequest(Ro()({spec:r,operationId:o,parameters:s,securities:l,http:u},c));return f.body&&(Il()(f.body)||_l()(f.body))&&(f.body=si()(f.body)),u(f)},tc.serializeRes=ra,tc.serializeHeaders=ia,tc.clearCache=function(){fl.refs.clearCache()},tc.makeApisTagOperation=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Tl.makeExecute(e);return{apis:Tl.mapTagOperations({v2OperationIdCompatibilityMode:e.v2OperationIdCompatibilityMode,spec:e.spec,cb:t})}},tc.buildRequest=Ql,tc.helpers={opId:ml},tc.getBaseUrl=ec,tc.prototype={http:Zi,execute:function(e){return this.applyDefaults(),tc.execute(Ro()({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 tc.resolve(Ro()({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}))}},tc.prototype.applyDefaults=function(){var e=this.spec,t=this.url;if(t&&Uo()(t,"http")){var n=Wo.a.parse(t);e.host||(e.host=n.host),e.schemes||(e.schemes=[n.protocol.replace(":","")]),e.basePath||(e.basePath="/")}};tc.helpers;var nc=tc,rc={flex:1,display:"flex",flexDirection:"column"};function oc(e){return e.startsWith("//")?"https:"+e:e}var ic=function(e){function t(t){var r=e.call(this,t)||this;Object.defineProperty(r,"formApi",{enumerable:!0,configurable:!0,writable:!0,value:null}),Object.defineProperty(r,"serverUrl",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(r,"serverVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),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}),function(e){var t=Object(u.c)("securityRequirementName");if(e.values.auth)for(var n=0,r=Object.keys(e.values.auth);n<r.length;n++){var o=r[n],i=e.values.auth[o];t&&t!==o||Object(u.h)(o,i)}}(e)}}),Object.defineProperty(r,"onOperationParametersChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){var t=e.target;!function(e){var t,n=e.id,r=e.value,o=e.formState;if(null!==(t=o.values)&&void 0!==t&&t.path)for(var i=0,a=Object.keys(o.values.path);i<a.length;i++){var s=a[i];n.includes(s)&&Object(u.g)(n,r)}}({id:t.id,value:t.value,formState:r.state.form})}}),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.serverUrl=e}}),Object.defineProperty(r,"handleVarsChange",{enumerable:!0,configurable:!0,writable:!0,value:function(e){r.serverVariables=e}}),Object.defineProperty(r,"handleClear",{enumerable:!0,configurable:!0,writable:!0,value:function(){r.formApi.reset()}}),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,p,d,h,v,g,m,y,b,x,w,k,C,A,O,S,E,j,T,M=this;return Object(a.e)(this,(function(P){switch(P.label){case 0:if(this.formApi.submitForm(),r=this.formApi.getState(),o=r.values,r.invalid)return this.setState({shaking:!0}),setTimeout((function(){return M.setState({shaking:!1})}),1e3),[2];if(i=this.props.operation.requestBody,s=i&&i.content&&i.content.active&&i.content.active.name||"",l=o.body,/json/.test(s))try{l=JSON.parse(l)}catch(e){console.error(e)}if(this.setState({loading:!0}),c=this.props.store,p=c.dereferencedRawSpec,d=this.props.operation,!(h=Object(u.d)(p,["paths",d.path,(d.httpVerb||"").toLowerCase(),"servers"])||Object(u.d)(p,["paths",d.path,"servers"])||Object(u.d)(p,["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");v=h.find((function(e){return M.serverUrl.endsWith(e.url.endsWith("/")?e.url.substring(0,e.url.length-1):e.url)})),g=Date.now(),m=!!window.document.documentMode,o.auth?(b=Object.keys(o.auth)[0],y=Object(a.a)(Object(a.a)({},p),{components:Object(a.a)(Object(a.a)({},p.components),{securitySchemes:Object(a.a)(Object(a.a)({},p.components.securitySchemes),(T={},T[b]=Object(a.a)(Object(a.a)({},p.components.securitySchemes[b]),{type:"openIdConnect"===p.components.securitySchemes[b].type?"oauth2":p.components.securitySchemes[b].type}),T))})})):y=Object(a.a)({},p),(x=c.options.corsProxyUrl)&&p.servers&&p.servers.length&&(y.servers=p.servers.map((function(e){return{url:x+oc(e.url),description:e.description}}))),w=(null==i||null===(e=i.content)||void 0===e||null===(t=e.active)||void 0===t?void 0:t.name)||null,k="application/x-www-form-urlencoded"===w?Object(f.parse)(l):l,P.label=1;case 1:return P.trys.push([1,5,8,9]),A={userFetch:m&&n(721).fetch,server:x?x+oc(v.url):v.url,serverVariables:this.serverVariables,spec:y,pathName:d.path,method:d.httpVerb,parameters:Object(a.a)(Object(a.a)(Object(a.a)(Object(a.a)({},o.path),o.query),o.header),o.cookie),securities:{authorized:o.auth},requestBody:k,requestContentType:w,responseContentType:(null===(C=o.header)||void 0===C?void 0:C.Accept)||null},[4,nc.execute(A)];case 2:return(O=P.sent())&&O.data instanceof Blob?(S=O,[4,O.data.text()]):[3,4];case 3:S.data=P.sent(),P.label=4;case 4:return this.setState({response:O,error:void 0}),[3,9];case 5:return(E=P.sent())&&E.response&&E.response.data instanceof Blob?(j=E.response,[4,E.response.data.text()]):[3,7];case 6:j.data=P.sent(),P.label=7;case 7:return this.setState({response:void 0,error:E}),[3,9];case 8:return this.setState({loading:!1,activeTab:1,time:Date.now()-g}),[7];case 9:return[2]}}))}))}}),Object.defineProperty(r,"validateBody",{enumerable:!0,configurable:!0,writable:!0,value:function(){}});var o=t.operation.parameters.filter((function(e){return"path"===e.in})).reduce((function(e,t){var n=t.in,r=t.name;return e[r]=Object(u.c)(n+"."+r),e}),{});return r.state={form:{values:{path:o||{}}},shaking:!1,loading:!1,activeTab:0},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}),[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,p=o.error,h=!(!u&&!p);return s.createElement(ac,{shaking:i,className:n,rootElement:r},s.createElement(d.e,null,s.createElement(Gr,{active:l,onChange:this.handleTabChange,hasResponse:h}),s.createElement(d.c,{onClick:this.props.onClose}," ✕ ")),s.createElement(d.d,{hidden:0!==l},this.renderRequest()),s.createElement(d.d,{hidden:1!==l},this.renderResponse()),s.createElement(Le,{hasResponse:h,params:c.values&&Object(a.a)({},c.values),operation:t,loading:f,onExecute:this.handleExecute,onClear:this.handleClear}))}}),Object.defineProperty(t.prototype,"renderRequest",{enumerable:!1,configurable:!0,writable:!0,value:function(){var e=this.props.operation,t=this.state,n=t.form,r=t.resolvedRawSpec,o=n.errors||{},i=o.path||o.cookie||o.header||o.query,c=r&&p.i.get(r,e.pointer),u=n.values&&n.values.auth&&Object.keys(n.values.auth)[0];u&&n.values.auth[u]||(u=void 0),!u||void 0===n.values.auth[u].token&&void 0===n.values.auth[u].client_id&&void 0===n.values.auth[u].client_secret||n.values.auth[u].token&&n.values.auth[u].token.access_token||(u=void 0);var f=e.parameters||[];return r?s.createElement(s.Fragment,null,s.createElement(l.a,{onChange:this.handleChange,getApi:this.setFormApi,style:Object(a.a)(Object(a.a)({},rc),{margin:0})},s.createElement(Re,{key:e.name,forceRenderTabPanel:!0,style:rc},s.createElement(Ie.b,null,e.requestBody&&s.createElement(_e,{key:"body"},s.createElement(Ne,{error:!!o.body}," Body ")),f.length&&s.createElement(_e,{key:"params"},s.createElement(Ne,{error:i},"Parameters (",f.length,")"))||null,e.security.length&&s.createElement(_e,{key:"auth"},s.createElement(Ne,{error:!!o.auth,success:!!u},"Auth ",u&&"("+u+")"||null))||null),e.requestBody&&s.createElement(Ie.c,{key:"body"},s.createElement(Ur,{validate:this.validateBody,console:this,body:e.requestBody,id:e.id,resolvedBody:c.requestBody})),f.length&&s.createElement(Ie.c,{key:"params"},s.createElement(be,{operation:e,values:n.values,errors:n.errors||{},onChange:this.onOperationParametersChange}))||null,e.security.length&&s.createElement(Ie.c,{key:"auth"},s.createElement(_o,{formApi:this.formApi,form:n,operation:e,activeServer:this.serverUrl}))||null)),s.createElement(O,{operation:e,onChange:this.handleServerChange,onVarsChange:this.handleVarsChange})):"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(qe,{response:t,error:n,time:r})}}),t=Object(a.c)([c.a],t)}(s.Component);function ac(e){var t=e.shaking,n=e.className,r=e.children,o=e.rootElement,i=Object(u.j)(o)[0];return s.createElement(d.f,{shaking:t,className:n,"data-cy":"console",fullWidth:null==i?void 0:i.width},r)}}])]);