"use strict";(self.webpackChunkvertx_web_graphiql=self.webpackChunkvertx_web_graphiql||[]).push([[782],{7782:function(e,t,r){r.r(t),r.d(t,{c:function(){return l}});var n=r(1003),a=Object.defineProperty,i=function(e,t){return a(e,"name",{value:t,configurable:!0})};function o(e,t){return t.forEach((function(t){t&&"string"!==typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(r){if("default"!==r&&!(r in e)){var n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:function(){return t[r]}})}}))})),Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}i(o,"_mergeNamespaces");var s={exports:{}};!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},r=e.Pos;function n(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:t[r]}e.defineOption("autoCloseBrackets",!1,(function(t,r,i){i&&i!=e.Init&&(t.removeKeyMap(a),t.state.closeBrackets=null),r&&(o(n(r,"pairs")),t.state.closeBrackets=r,t.addKeyMap(a))})),i(n,"getOption");var a={Backspace:c,Enter:u};function o(e){for(var t=0;t<e.length;t++){var r=e.charAt(t),n="'"+r+"'";a[n]||(a[n]=s(r))}}function s(e){return function(t){return p(t,e)}}function l(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function c(t){var a=l(t);if(!a||t.getOption("disableInput"))return e.Pass;for(var i=n(a,"pairs"),o=t.listSelections(),s=0;s<o.length;s++){if(!o[s].empty())return e.Pass;var c=d(t,o[s].head);if(!c||i.indexOf(c)%2!=0)return e.Pass}for(s=o.length-1;s>=0;s--){var u=o[s].head;t.replaceRange("",r(u.line,u.ch-1),r(u.line,u.ch+1),"+delete")}}function u(t){var r=l(t),a=r&&n(r,"explode");if(!a||t.getOption("disableInput"))return e.Pass;for(var i=t.listSelections(),o=0;o<i.length;o++){if(!i[o].empty())return e.Pass;var s=d(t,i[o].head);if(!s||a.indexOf(s)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),f(t,-1),i=t.listSelections();for(var r=0;r<i.length;r++){var n=i[r].head.line;t.indentLine(n,null,!0),t.indentLine(n+1,null,!0)}}))}function f(e,t){for(var r=[],n=e.listSelections(),a=0,i=0;i<n.length;i++){var o=n[i];o.head==e.getCursor()&&(a=i);var s=o.head.ch||t>0?{line:o.head.line,ch:o.head.ch+t}:{line:o.head.line-1};r.push({anchor:s,head:s})}e.setSelections(r,a)}function h(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new r(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new r(t.head.line,t.head.ch+(n?1:-1))}}function p(t,a){var i=l(t);if(!i||t.getOption("disableInput"))return e.Pass;var o=n(i,"pairs"),s=o.indexOf(a);if(-1==s)return e.Pass;for(var c,u=n(i,"closeBefore"),p=n(i,"triples"),d=o.charAt(s+1)==a,v=t.listSelections(),b=s%2==0,k=0;k<v.length;k++){var y,S=v[k],O=S.head,P=t.getRange(O,r(O.line,O.ch+1));if(b&&!S.empty())y="surround";else if(!d&&b||P!=a)if(d&&O.ch>1&&p.indexOf(a)>=0&&t.getRange(r(O.line,O.ch-2),O)==a+a){if(O.ch>2&&/\bstring/.test(t.getTokenTypeAt(r(O.line,O.ch-2))))return e.Pass;y="addFour"}else if(d){var x=0==O.ch?" ":t.getRange(r(O.line,O.ch-1),O);if(e.isWordChar(P)||x==a||e.isWordChar(x))return e.Pass;y="both"}else{if(!b||!(0===P.length||/\s/.test(P)||u.indexOf(P)>-1))return e.Pass;y="both"}else y=d&&g(t,O)?"both":p.indexOf(a)>=0&&t.getRange(O,r(O.line,O.ch+3))==a+a+a?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var A=s%2?o.charAt(s-1):a,m=s%2?a:o.charAt(s+1);t.operation((function(){if("skip"==c)f(t,1);else if("skipThree"==c)f(t,3);else if("surround"==c){for(var e=t.getSelections(),r=0;r<e.length;r++)e[r]=A+e[r]+m;for(t.replaceSelections(e,"around"),e=t.listSelections().slice(),r=0;r<e.length;r++)e[r]=h(e[r]);t.setSelections(e)}else"both"==c?(t.replaceSelection(A+m,null),t.triggerElectric(A+m),f(t,-1)):"addFour"==c&&(t.replaceSelection(A+A+A+A,"before"),f(t,1))}))}function d(e,t){var n=e.getRange(r(t.line,t.ch-1),r(t.line,t.ch+1));return 2==n.length?n:null}function g(e,t){var n=e.getTokenAt(r(t.line,t.ch+1));return/\bstring/.test(n.type)&&n.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}i(o,"ensureBound"),o(t.pairs+"`"),i(s,"handler"),i(l,"getConfig"),i(c,"handleBackspace"),i(u,"handleEnter"),i(f,"moveSel"),i(h,"contractSelection"),i(p,"handleChar"),i(d,"charsAround"),i(g,"stringStartsAfter")}(n.a.exports);var l=o({__proto__:null,default:s.exports},[s.exports])}}]);