UNPKG

@knapsack/app

Version:

Build Design Systems on top of knapsack, by Basalt

2 lines • 27.8 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([["vendors~custom-page-KXWAf~pattern-view-page-WE7TE~226f7f79"],{"../node_modules/@miksu/prettier/lib/common/common-options.js":function(e,t,n){e.exports={bracketSpacing:{since:"0.0.0",category:"Common",type:"boolean",default:!0,description:"Print spaces between brackets.",oppositeDescription:"Do not print spaces between brackets."},singleQuote:{since:"0.0.0",category:"Common",type:"boolean",default:!1,description:"Use single quotes instead of double quotes."},proseWrap:{since:"1.8.2",category:"Common",type:"choice",default:[{since:"1.8.2",value:!0},{since:"1.9.0",value:"preserve"}],description:"How to wrap prose.",choices:[{since:"1.9.0",value:"always",description:"Wrap prose if it exceeds the print width."},{since:"1.9.0",value:"never",description:"Do not wrap prose."},{since:"1.9.0",value:"preserve",description:"Wrap prose as-is."},{value:!1,deprecated:"1.9.0",redirect:"never"},{value:!0,deprecated:"1.9.0",redirect:"always"}]}}},"../node_modules/@miksu/prettier/lib/common/end-of-line.js":function(e,t,n){e.exports={guessEndOfLine:function guessEndOfLine(e){var t=e.indexOf("\r");return t>=0?"\n"===e.charAt(t+1)?"crlf":"cr":"lf"},convertEndOfLineToChars:function convertEndOfLineToChars(e){switch(e){case"cr":return"\r";case"crlf":return"\r\n";default:return"\n"}}}},"../node_modules/@miksu/prettier/lib/common/errors.js":function(e,t,n){function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function _typeof(e){return typeof e}:function _typeof(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _possibleConstructorReturn(e,t){return!t||"object"!==_typeof(t)&&"function"!=typeof t?function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function _inherits(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&&_setPrototypeOf(e,t)}function _wrapNativeSuper(e){var t="function"==typeof Map?new Map:void 0;return(_wrapNativeSuper=function _wrapNativeSuper(e){if(null===e||!function _isNativeFunction(e){return-1!==Function.toString.call(e).indexOf("[native code]")}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,Wrapper)}function Wrapper(){return _construct(e,arguments,_getPrototypeOf(this).constructor)}return Wrapper.prototype=Object.create(e.prototype,{constructor:{value:Wrapper,enumerable:!1,writable:!0,configurable:!0}}),_setPrototypeOf(Wrapper,e)})(e)}function _construct(e,t,n){return(_construct=function isNativeReflectConstruct(){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}}()?Reflect.construct:function _construct(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&_setPrototypeOf(o,n.prototype),o}).apply(null,arguments)}function _setPrototypeOf(e,t){return(_setPrototypeOf=Object.setPrototypeOf||function _setPrototypeOf(e,t){return e.__proto__=t,e})(e,t)}function _getPrototypeOf(e){return(_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf:function _getPrototypeOf(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var r=function(e){function ConfigError(){return _classCallCheck(this,ConfigError),_possibleConstructorReturn(this,_getPrototypeOf(ConfigError).apply(this,arguments))}return _inherits(ConfigError,e),ConfigError}(_wrapNativeSuper(Error)),o=function(e){function DebugError(){return _classCallCheck(this,DebugError),_possibleConstructorReturn(this,_getPrototypeOf(DebugError).apply(this,arguments))}return _inherits(DebugError,e),DebugError}(_wrapNativeSuper(Error)),i=function(e){function UndefinedParserError(){return _classCallCheck(this,UndefinedParserError),_possibleConstructorReturn(this,_getPrototypeOf(UndefinedParserError).apply(this,arguments))}return _inherits(UndefinedParserError,e),UndefinedParserError}(_wrapNativeSuper(Error));e.exports={ConfigError:r,DebugError:o,UndefinedParserError:i}},"../node_modules/@miksu/prettier/lib/common/fast-path.js":function(e,t,n){var r=n("../node_modules/assert/assert.js");function FastPath(e){r.ok(this instanceof FastPath),this.stack=[e]}function getNodeHelper(e,t){var n=getNodeStackIndexHelper(e.stack,t);return-1===n?null:e.stack[n]}function getNodeStackIndexHelper(e,t){for(var n=e.length-1;n>=0;n-=2){var r=e[n];if(r&&!Array.isArray(r)&&--t<0)return n}return-1}FastPath.prototype.getName=function getName(){var e=this.stack,t=e.length;return t>1?e[t-2]:null},FastPath.prototype.getValue=function getValue(){var e=this.stack;return e[e.length-1]},FastPath.prototype.getNode=function getNode(e){return getNodeHelper(this,~~e)},FastPath.prototype.getParentNode=function getParentNode(e){return getNodeHelper(this,1+~~e)},FastPath.prototype.call=function call(e){for(var t=this.stack,n=t.length,r=t[n-1],o=arguments.length,i=1;i<o;++i){var a=arguments[i];r=r[a],t.push(a,r)}var s=e(this);return t.length=n,s},FastPath.prototype.callParent=function callParent(e,t){var n=getNodeStackIndexHelper(this.stack,1+~~t),r=this.stack.splice(n+1),o=e(this);return Array.prototype.push.apply(this.stack,r),o},FastPath.prototype.each=function each(e){for(var t=this.stack,n=t.length,r=t[n-1],o=arguments.length,i=1;i<o;++i){var a=arguments[i];r=r[a],t.push(a,r)}for(var s=0;s<r.length;++s)s in r&&(t.push(s,r[s]),e(this),t.length-=2);t.length=n},FastPath.prototype.map=function map(e){for(var t=this.stack,n=t.length,r=t[n-1],o=arguments.length,i=1;i<o;++i){var a=arguments[i];r=r[a],t.push(a,r)}for(var s=new Array(r.length),u=0;u<r.length;++u)u in r&&(t.push(u,r[u]),s[u]=e(this,u),t.length-=2);return t.length=n,s},e.exports=FastPath},"../node_modules/@miksu/prettier/lib/common/parser-create-error.js":function(e,t,n){e.exports=function createError(e,t){var n=new SyntaxError(e+" ("+t.start.line+":"+t.start.column+")");return n.loc=t,n}},"../node_modules/@miksu/prettier/lib/common/util-shared.js":function(e,t,n){var r=n("../node_modules/@miksu/prettier/lib/common/util.js"),o=n("../node_modules/@miksu/prettier/lib/doc/index.js").utils.mapDoc;e.exports={getMaxContinuousCount:r.getMaxContinuousCount,getStringWidth:r.getStringWidth,getAlignmentSize:r.getAlignmentSize,getIndentSize:r.getIndentSize,skip:r.skip,skipWhitespace:r.skipWhitespace,skipSpaces:r.skipSpaces,skipNewline:r.skipNewline,skipToLineEnd:r.skipToLineEnd,skipEverythingButNewLine:r.skipEverythingButNewLine,skipInlineComment:r.skipInlineComment,skipTrailingComment:r.skipTrailingComment,hasNewline:r.hasNewline,hasNewlineInRange:r.hasNewlineInRange,hasSpaces:r.hasSpaces,isNextLineEmpty:function isNextLineEmpty(e,t,n){return r.isNextLineEmpty(e,t,n.locEnd)},isNextLineEmptyAfterIndex:r.isNextLineEmptyAfterIndex,isPreviousLineEmpty:function isPreviousLineEmpty(e,t,n){return r.isPreviousLineEmpty(e,t,n.locStart)},getNextNonSpaceNonCommentCharacterIndex:function getNextNonSpaceNonCommentCharacterIndex(e,t,n){return r.getNextNonSpaceNonCommentCharacterIndex(e,t,n.locEnd)},mapDoc:o,makeString:r.makeString,addLeadingComment:r.addLeadingComment,addDanglingComment:r.addDanglingComment,addTrailingComment:r.addTrailingComment}},"../node_modules/@miksu/prettier/lib/common/util.js":function(e,t,n){var r=n("../node_modules/@miksu/prettier/node_modules/string-width/index.js"),o=n("../node_modules/escape-string-regexp/index.js"),i=n("../node_modules/@miksu/prettier/lib/utils/get-last.js"),a=/[^\x20-\x7F]/;function isExportDeclaration(e){if(e)switch(e.type){case"ExportDefaultDeclaration":case"ExportDefaultSpecifier":case"DeclareExportDeclaration":case"ExportNamedDeclaration":case"ExportAllDeclaration":return!0}return!1}function skip(e){return function(t,n,r){var o=r&&r.backwards;if(!1===n)return!1;for(var i=t.length,a=n;a>=0&&a<i;){var s=t.charAt(a);if(e instanceof RegExp){if(!e.test(s))return a}else if(-1===e.indexOf(s))return a;o?a--:a++}return(-1===a||a===i)&&a}}var s=skip(/\s/),u=skip(" \t"),c=skip(",; \t"),p=skip(/[^\r\n]/);function skipInlineComment(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(var n=t+2;n<e.length;++n)if("*"===e.charAt(n)&&"/"===e.charAt(n+1))return n+2;return t}function skipTrailingComment(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?p(e,t):t)}function skipNewline(e,t,n){var r=n&&n.backwards;if(!1===t)return!1;var o=e.charAt(t);if(r){if("\r"===e.charAt(t-1)&&"\n"===o)return t-2;if("\n"===o||"\r"===o||"\u2028"===o||"\u2029"===o)return t-1}else{if("\r"===o&&"\n"===e.charAt(t+1))return t+2;if("\n"===o||"\r"===o||"\u2028"===o||"\u2029"===o)return t+1}return t}function hasNewline(e,t,n){var r=u(e,(n=n||{}).backwards?t-1:t,n);return r!==skipNewline(e,r,n)}function isNextLineEmptyAfterIndex(e,t){for(var n=null,r=t;r!==n;)n=r,r=skipInlineComment(e,r=c(e,r)),r=u(e,r);return hasNewline(e,r=skipNewline(e,r=skipTrailingComment(e,r)))}function getNextNonSpaceNonCommentCharacterIndexWithStartIndex(e,t){for(var n=null;t!==n;)n=t,t=skipNewline(e,t=skipTrailingComment(e,t=skipInlineComment(e,t=u(e,t))));return t}function getNextNonSpaceNonCommentCharacterIndex(e,t,n){return getNextNonSpaceNonCommentCharacterIndexWithStartIndex(e,n(t))}var l={};function getPrecedence(e){return l[e]}[["|>"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!=="],["<",">","<=",">=","in","instanceof"],[">>","<<",">>>"],["+","-"],["*","/","%"],["**"]].forEach((function(e,t){e.forEach((function(e){l[e]=t}))}));var f={"==":!0,"!=":!0,"===":!0,"!==":!0},d={"*":!0,"/":!0,"%":!0},h={">>":!0,">>>":!0,"<<":!0};function getAlignmentSize(e,t,n){for(var r=0,o=n=n||0;o<e.length;++o)"\t"===e[o]?r=r+t-r%t:r++;return r}function getPreferredQuote(e,t){var n=e,r={quote:'"',regex:/"/g},o={quote:"'",regex:/'/g},i="'"===t?o:r,a=i===o?r:o,s=i.quote;(n.includes(i.quote)||n.includes(a.quote))&&(s=(n.match(i.regex)||[]).length>(n.match(a.regex)||[]).length?a.quote:i.quote);return s}function makeString(e,t,n){var r='"'===t?"'":'"',o=e.replace(/\\([\s\S])|(['"])/g,(function(e,o,i){return o===r?o:i===t?"\\"+i:i||(n&&/^[^\\nrvtbfux\r\n\u2028\u2029"'0-7]$/.test(o)?o:"\\"+o)}));return t+o+t}function hasNodeIgnoreComment(e){return e&&e.comments&&e.comments.length>0&&e.comments.some((function(e){return"prettier-ignore"===e.value.trim()}))}function addCommentHelper(e,t){(e.comments||(e.comments=[])).push(t),t.printed=!1,"JSXText"===e.type&&(t.printed=!0)}e.exports={replaceEndOfLineWith:function replaceEndOfLineWith(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e.split("\n")[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;0!==n.length&&n.push(t),n.push(u)}}catch(e){o=!0,i=e}finally{try{r||null==s.return||s.return()}finally{if(o)throw i}}return n},getStringWidth:function getStringWidth(e){return e?a.test(e)?r(e):e.length:0},getMaxContinuousCount:function getMaxContinuousCount(e,t){var n=e.match(new RegExp("(".concat(o(t),")+"),"g"));return null===n?0:n.reduce((function(e,n){return Math.max(e,n.length/t.length)}),0)},getMinNotPresentContinuousCount:function getMinNotPresentContinuousCount(e,t){var n=e.match(new RegExp("(".concat(o(t),")+"),"g"));if(null===n)return 0;var r=new Map,i=0,a=!0,s=!1,u=void 0;try{for(var c,p=n[Symbol.iterator]();!(a=(c=p.next()).done);a=!0){var l=c.value.length/t.length;r.set(l,!0),l>i&&(i=l)}}catch(e){s=!0,u=e}finally{try{a||null==p.return||p.return()}finally{if(s)throw u}}for(var f=1;f<i;f++)if(!r.get(f))return f;return i+1},getPrecedence:getPrecedence,shouldFlatten:function shouldFlatten(e,t){return getPrecedence(t)===getPrecedence(e)&&("**"!==e&&((!f[e]||!f[t])&&(!("%"===t&&d[e]||"%"===e&&d[t])&&((t===e||!d[t]||!d[e])&&(!h[e]||!h[t])))))},isBitwiseOperator:function isBitwiseOperator(e){return!!h[e]||"|"===e||"^"===e||"&"===e},isExportDeclaration:isExportDeclaration,getParentExportDeclaration:function getParentExportDeclaration(e){var t=e.getParentNode();return"declaration"===e.getName()&&isExportDeclaration(t)?t:null},getPenultimate:function getPenultimate(e){return e.length>1?e[e.length-2]:null},getLast:i,getNextNonSpaceNonCommentCharacterIndexWithStartIndex:getNextNonSpaceNonCommentCharacterIndexWithStartIndex,getNextNonSpaceNonCommentCharacterIndex:getNextNonSpaceNonCommentCharacterIndex,getNextNonSpaceNonCommentCharacter:function getNextNonSpaceNonCommentCharacter(e,t,n){return e.charAt(getNextNonSpaceNonCommentCharacterIndex(e,t,n))},skip:skip,skipWhitespace:s,skipSpaces:u,skipToLineEnd:c,skipEverythingButNewLine:p,skipInlineComment:skipInlineComment,skipTrailingComment:skipTrailingComment,skipNewline:skipNewline,isNextLineEmptyAfterIndex:isNextLineEmptyAfterIndex,isNextLineEmpty:function isNextLineEmpty(e,t,n){return isNextLineEmptyAfterIndex(e,n(t))},isPreviousLineEmpty:function isPreviousLineEmpty(e,t,n){var r=n(t)-1;return r=skipNewline(e,r=u(e,r,{backwards:!0}),{backwards:!0}),(r=u(e,r,{backwards:!0}))!==skipNewline(e,r,{backwards:!0})},hasNewline:hasNewline,hasNewlineInRange:function hasNewlineInRange(e,t,n){for(var r=t;r<n;++r)if("\n"===e.charAt(r))return!0;return!1},hasSpaces:function hasSpaces(e,t,n){return u(e,(n=n||{}).backwards?t-1:t,n)!==t},setLocStart:function setLocStart(e,t){e.range?e.range[0]=t:e.start=t},setLocEnd:function setLocEnd(e,t){e.range?e.range[1]=t:e.end=t},startsWithNoLookaheadToken:function startsWithNoLookaheadToken(e,t){switch((e=function getLeftMost(e){if(e.left)return getLeftMost(e.left);return e}(e)).type){case"FunctionExpression":case"ClassExpression":case"DoExpression":return t;case"ObjectExpression":return!0;case"MemberExpression":return startsWithNoLookaheadToken(e.object,t);case"TaggedTemplateExpression":return"FunctionExpression"!==e.tag.type&&startsWithNoLookaheadToken(e.tag,t);case"CallExpression":return"FunctionExpression"!==e.callee.type&&startsWithNoLookaheadToken(e.callee,t);case"ConditionalExpression":return startsWithNoLookaheadToken(e.test,t);case"UpdateExpression":return!e.prefix&&startsWithNoLookaheadToken(e.argument,t);case"BindExpression":return e.object&&startsWithNoLookaheadToken(e.object,t);case"SequenceExpression":return startsWithNoLookaheadToken(e.expressions[0],t);case"TSAsExpression":return startsWithNoLookaheadToken(e.expression,t);default:return!1}},getAlignmentSize:getAlignmentSize,getIndentSize:function getIndentSize(e,t){var n=e.lastIndexOf("\n");return-1===n?0:getAlignmentSize(e.slice(n+1).match(/^[ \t]*/)[0],t)},getPreferredQuote:getPreferredQuote,printString:function printString(e,t,n){var r=e,o=!r.includes('"')&&!r.includes("'"),i="json"===t.parser?'"':t.__isInHtmlAttribute?"'":getPreferredQuote(e,t.singleQuote?"'":'"');return n?o?i+r+i:e:makeString(r,i,!("css"===t.parser||"less"===t.parser||"scss"===t.parser||t.embeddedInHtml))},printNumber:function printNumber(e){return e.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e|$)/,"")},hasIgnoreComment:function hasIgnoreComment(e){return hasNodeIgnoreComment(e.getValue())},hasNodeIgnoreComment:hasNodeIgnoreComment,makeString:makeString,matchAncestorTypes:function matchAncestorTypes(e,t,n){for(n=n||0,t=t.slice();t.length;){var r=e.getParentNode(n),o=t.shift();if(!r||r.type!==o)return!1;n++}return!0},addLeadingComment:function addLeadingComment(e,t){t.leading=!0,t.trailing=!1,addCommentHelper(e,t)},addDanglingComment:function addDanglingComment(e,t){t.leading=!1,t.trailing=!1,addCommentHelper(e,t)},addTrailingComment:function addTrailingComment(e,t){t.leading=!1,t.trailing=!0,addCommentHelper(e,t)},isWithinParentArrayProperty:function isWithinParentArrayProperty(e,t){var n=e.getValue(),r=e.getParentNode();if(null==r)return!1;if(!Array.isArray(r[t]))return!1;var o=e.getName();return r[t][o]===n}}},"../node_modules/@miksu/prettier/lib/doc/doc-builders.js":function(e,t,n){function concat(e){return{type:"concat",parts:e}}function indent(e){return{type:"indent",contents:e}}function align(e,t){return{type:"align",contents:t,n:e}}function group(e,t){return{type:"group",id:(t=t||{}).id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}var r={type:"break-parent"},o=concat([{type:"line",hard:!0},r]),i=concat([{type:"line",hard:!0,literal:!0},r]),a={type:"cursor",placeholder:Symbol("cursor")};e.exports={concat:concat,join:function join(e,t){for(var n=[],r=0;r<t.length;r++)0!==r&&n.push(e),n.push(t[r]);return concat(n)},line:{type:"line"},softline:{type:"line",soft:!0},hardline:o,literalline:i,group:group,conditionalGroup:function conditionalGroup(e,t){return group(e[0],Object.assign(t||{},{expandedStates:e}))},fill:function fill(e){return{type:"fill",parts:e}},lineSuffix:function lineSuffix(e){return{type:"line-suffix",contents:e}},lineSuffixBoundary:{type:"line-suffix-boundary"},cursor:a,breakParent:r,ifBreak:function ifBreak(e,t,n){return{type:"if-break",breakContents:e,flatContents:t,groupId:(n=n||{}).groupId}},trim:{type:"trim"},indent:indent,align:align,addAlignmentToDoc:function addAlignmentToDoc(e,t,n){var r=e;if(t>0){for(var o=0;o<Math.floor(t/n);++o)r=indent(r);r=align(t%n,r),r=align(-1/0,r)}return r},markAsRoot:function markAsRoot(e){return align({type:"root"},e)},dedentToRoot:function dedentToRoot(e){return align(-1/0,e)},dedent:function dedent(e){return align(-1,e)}}},"../node_modules/@miksu/prettier/lib/doc/doc-debug.js":function(e,t,n){function flattenDoc(e){if("concat"===e.type){for(var t=[],n=0;n<e.parts.length;++n){var r=e.parts[n];if("string"!=typeof r&&"concat"===r.type)[].push.apply(t,flattenDoc(r).parts);else{var o=flattenDoc(r);""!==o&&t.push(o)}}return Object.assign({},e,{parts:t})}return"if-break"===e.type?Object.assign({},e,{breakContents:null!=e.breakContents?flattenDoc(e.breakContents):null,flatContents:null!=e.flatContents?flattenDoc(e.flatContents):null}):"group"===e.type?Object.assign({},e,{contents:flattenDoc(e.contents),expandedStates:e.expandedStates?e.expandedStates.map(flattenDoc):e.expandedStates}):e.contents?Object.assign({},e,{contents:flattenDoc(e.contents)}):e}function printDoc(e){if("string"==typeof e)return JSON.stringify(e);if("line"===e.type)return e.literal?"literalline":e.hard?"hardline":e.soft?"softline":"line";if("break-parent"===e.type)return"breakParent";if("trim"===e.type)return"trim";if("concat"===e.type)return"["+e.parts.map(printDoc).join(", ")+"]";if("indent"===e.type)return"indent("+printDoc(e.contents)+")";if("align"===e.type)return e.n===-1/0?"dedentToRoot("+printDoc(e.contents)+")":e.n<0?"dedent("+printDoc(e.contents)+")":"root"===e.n.type?"markAsRoot("+printDoc(e.contents)+")":"align("+JSON.stringify(e.n)+", "+printDoc(e.contents)+")";if("if-break"===e.type)return"ifBreak("+printDoc(e.breakContents)+(e.flatContents?", "+printDoc(e.flatContents):"")+")";if("group"===e.type)return e.expandedStates?"conditionalGroup(["+e.expandedStates.map(printDoc).join(",")+"])":(e.break?"wrappedGroup":"group")+"("+printDoc(e.contents)+")";if("fill"===e.type)return"fill("+e.parts.map(printDoc).join(", ")+")";if("line-suffix"===e.type)return"lineSuffix("+printDoc(e.contents)+")";if("line-suffix-boundary"===e.type)return"lineSuffixBoundary";throw new Error("Unknown doc type "+e.type)}e.exports={printDocToDebug:function printDocToDebug(e){return printDoc(flattenDoc(e))}}},"../node_modules/@miksu/prettier/lib/doc/doc-printer.js":function(e,t,n){var r,o=n("../node_modules/@miksu/prettier/lib/common/util.js").getStringWidth,i=n("../node_modules/@miksu/prettier/lib/common/end-of-line.js").convertEndOfLineToChars,a=n("../node_modules/@miksu/prettier/lib/doc/doc-builders.js"),s=a.concat,u=a.fill,c=a.cursor,p=1,l=2;function makeIndent(e,t){return generateInd(e,{type:"indent"},t)}function makeAlign(e,t,n){return t===-1/0?e.root||{value:"",length:0,queue:[]}:t<0?generateInd(e,{type:"dedent"},n):t?"root"===t.type?Object.assign({},e,{root:e}):generateInd(e,"string"==typeof t?{type:"stringAlign",n:t}:{type:"numberAlign",n:t},n):e}function generateInd(e,t,n){var r="dedent"===t.type?e.queue.slice(0,-1):e.queue.concat(t),o="",i=0,a=0,s=0,u=!0,c=!1,p=void 0;try{for(var l,f=r[Symbol.iterator]();!(u=(l=f.next()).done);u=!0){var d=l.value;switch(d.type){case"indent":flush(),n.useTabs?addTabs(1):addSpaces(n.tabWidth);break;case"stringAlign":flush(),o+=d.n,i+=d.n.length;break;case"numberAlign":a+=1,s+=d.n;break;default:throw new Error("Unexpected type '".concat(d.type,"'"))}}}catch(e){c=!0,p=e}finally{try{u||null==f.return||f.return()}finally{if(c)throw p}}return flushSpaces(),Object.assign({},e,{value:o,length:i,queue:r});function addTabs(e){o+="\t".repeat(e),i+=n.tabWidth*e}function addSpaces(e){o+=" ".repeat(e),i+=e}function flush(){n.useTabs?function flushTabs(){a>0&&addTabs(a);resetLast()}():flushSpaces()}function flushSpaces(){s>0&&addSpaces(s),resetLast()}function resetLast(){a=0,s=0}}function trim(e){if(0===e.length)return 0;for(var t=0;e.length>0&&"string"==typeof e[e.length-1]&&e[e.length-1].match(/^[ \t]*$/);)t+=e.pop().length;if(e.length&&"string"==typeof e[e.length-1]){var n=e[e.length-1].replace(/[ \t]*$/,"");t+=e[e.length-1].length-n.length,e[e.length-1]=n}return t}function fits(e,t,n,i,a){for(var s=t.length,u=[e],c=[];n>=0;)if(0!==u.length){var f=u.pop(),d=f[0],h=f[1],g=f[2];if("string"==typeof g)c.push(g),n-=o(g);else switch(g.type){case"concat":for(var m=g.parts.length-1;m>=0;m--)u.push([d,h,g.parts[m]]);break;case"indent":u.push([makeIndent(d,i),h,g.contents]);break;case"align":u.push([makeAlign(d,g.n,i),h,g.contents]);break;case"trim":n+=trim(c);break;case"group":if(a&&g.break)return!1;u.push([d,g.break?p:h,g.contents]),g.id&&(r[g.id]=u[u.length-1][1]);break;case"fill":for(var k=g.parts.length-1;k>=0;k--)u.push([d,h,g.parts[k]]);break;case"if-break":var y=g.groupId?r[g.groupId]:h;y===p&&g.breakContents&&u.push([d,h,g.breakContents]),y===l&&g.flatContents&&u.push([d,h,g.flatContents]);break;case"line":switch(h){case l:if(!g.hard){g.soft||(c.push(" "),n-=1);break}return!0;case p:return!0}}}else{if(0===s)return!0;u.push(t[s-1]),s--}return!1}e.exports={printDocToString:function printDocToString(e,t){r={};for(var n=t.printWidth,a=i(t.endOfLine),f=0,d=[[{value:"",length:0,queue:[]},p,e]],h=[],g=!1,m=[];0!==d.length;){var k=d.pop(),y=k[0],b=k[1],v=k[2];if("string"==typeof v)h.push(v),f+=o(v);else switch(v.type){case"cursor":h.push(c.placeholder);break;case"concat":for(var x=v.parts.length-1;x>=0;x--)d.push([y,b,v.parts[x]]);break;case"indent":d.push([makeIndent(y,t),b,v.contents]);break;case"align":d.push([makeAlign(y,v.n,t),b,v.contents]);break;case"trim":f-=trim(h);break;case"group":switch(b){case l:if(!g){d.push([y,v.break?p:l,v.contents]);break}case p:g=!1;var C=[y,l,v.contents],N=n-f;if(!v.break&&fits(C,d,N,t))d.push(C);else if(v.expandedStates){var S=v.expandedStates[v.expandedStates.length-1];if(v.break){d.push([y,p,S]);break}for(var E=1;E<v.expandedStates.length+1;E++){if(E>=v.expandedStates.length){d.push([y,p,S]);break}var w=v.expandedStates[E],D=[y,l,w];if(fits(D,d,N,t)){d.push(D);break}}}else d.push([y,p,v.contents])}v.id&&(r[v.id]=d[d.length-1][1]);break;case"fill":var _=n-f,P=v.parts;if(0===P.length)break;var I=P[0],L=[y,l,I],T=[y,p,I],j=fits(L,[],_,t,!0);if(1===P.length){j?d.push(L):d.push(T);break}var O=P[1],A=[y,l,O],W=[y,p,O];if(2===P.length){j?(d.push(A),d.push(L)):(d.push(W),d.push(T));break}P.splice(0,2);var F=[y,b,u(P)],R=P[0];fits([y,l,s([I,O,R])],[],_,t,!0)?(d.push(F),d.push(A),d.push(L)):j?(d.push(F),d.push(W),d.push(L)):(d.push(F),d.push(W),d.push(T));break;case"if-break":var B=v.groupId?r[v.groupId]:b;B===p&&v.breakContents&&d.push([y,b,v.breakContents]),B===l&&v.flatContents&&d.push([y,b,v.flatContents]);break;case"line-suffix":m.push([y,b,v.contents]);break;case"line-suffix-boundary":m.length>0&&d.push([y,b,{type:"line",hard:!0}]);break;case"line":switch(b){case l:if(!v.hard){v.soft||(h.push(" "),f+=1);break}g=!0;case p:if(m.length){d.push([y,b,v]),[].push.apply(d,m.reverse()),m=[];break}v.literal?y.root?(h.push(a,y.root.value),f=y.root.length):(h.push(a),f=0):(f-=trim(h),h.push(a+y.value),f=y.length)}}}var H=h.indexOf(c.placeholder);if(-1!==H){var q=h.indexOf(c.placeholder,H+1),M=h.slice(0,H).join(""),$=h.slice(H+1,q).join("");return{formatted:M+$+h.slice(q+1).join(""),cursorNodeStart:M.length,cursorNodeText:$}}return{formatted:h.join("")}}}},"../node_modules/@miksu/prettier/lib/doc/doc-utils.js":function(e,t,n){var r={};function traverseDoc(e,t,n,o){for(var i=[e];0!==i.length;){var a=i.pop();if(a!==r){var s=!0;if(t&&!1===t(a)&&(s=!1),n&&(i.push(a),i.push(r)),s)if("concat"===a.type||"fill"===a.type)for(var u=a.parts.length-1;u>=0;--u)i.push(a.parts[u]);else if("if-break"===a.type)a.flatContents&&i.push(a.flatContents),a.breakContents&&i.push(a.breakContents);else if("group"===a.type&&a.expandedStates)if(o)for(var c=a.expandedStates.length-1;c>=0;--c)i.push(a.expandedStates[c]);else i.push(a.contents);else a.contents&&i.push(a.contents)}else n(i.pop())}}function mapDoc(e,t){if("concat"===e.type||"fill"===e.type){var n=e.parts.map((function(e){return mapDoc(e,t)}));return t(Object.assign({},e,{parts:n}))}if("if-break"===e.type){var r=e.breakContents&&mapDoc(e.breakContents,t),o=e.flatContents&&mapDoc(e.flatContents,t);return t(Object.assign({},e,{breakContents:r,flatContents:o}))}if(e.contents){var i=mapDoc(e.contents,t);return t(Object.assign({},e,{contents:i}))}return t(e)}function findInDoc(e,t,n){var r=n,o=!1;return traverseDoc(e,(function findInDocOnEnterFn(e){var n=t(e);if(void 0!==n&&(o=!0,r=n),o)return!1})),r}function isLineNextFn(e){return"string"!=typeof e&&("line"===e.type||void 0)}function willBreakFn(e){return!("group"!==e.type||!e.break)||(!("line"!==e.type||!e.hard)||("break-parent"===e.type||void 0))}function breakParentGroup(e){if(e.length>0){var t=e[e.length-1];t.expandedStates||(t.break=!0)}return null}function removeLinesFn(e){return"line"!==e.type||e.hard?"if-break"===e.type?e.flatContents||"":e:e.soft?"":" "}e.exports={isEmpty:function isEmpty(e){return"string"==typeof e&&0===e.length},willBreak:function willBreak(e){return findInDoc(e,willBreakFn,!1)},isLineNext:function isLineNext(e){return findInDoc(e,isLineNextFn,!1)},traverseDoc:traverseDoc,findInDoc:findInDoc,mapDoc:mapDoc,propagateBreaks:function propagateBreaks(e){var t=new Set,n=[];traverseDoc(e,(function propagateBreaksOnEnterFn(e){if("break-parent"===e.type&&breakParentGroup(n),"group"===e.type){if(n.push(e),t.has(e))return!1;t.add(e)}}),(function propagateBreaksOnExitFn(e){"group"===e.type&&n.pop().break&&breakParentGroup(n)}),!0)},removeLines:function removeLines(e){return mapDoc(e,removeLinesFn)},stripTrailingHardline:function stripTrailingHardline(e){if("concat"===e.type&&0!==e.parts.length){var t=e.parts[e.parts.length-1];if("concat"===t.type)return 2===t.parts.length&&t.parts[0].hard&&"break-parent"===t.parts[1].type?{type:"concat",parts:e.parts.slice(0,-1)}:{type:"concat",parts:e.parts.slice(0,-1).concat(stripTrailingHardline(t))}}return e}}},"../node_modules/@miksu/prettier/lib/doc/index.js":function(e,t,n){e.exports={builders:n("../node_modules/@miksu/prettier/lib/doc/doc-builders.js"),printer:n("../node_modules/@miksu/prettier/lib/doc/doc-printer.js"),utils:n("../node_modules/@miksu/prettier/lib/doc/doc-utils.js"),debug:n("../node_modules/@miksu/prettier/lib/doc/doc-debug.js")}}}]); //# sourceMappingURL=vendors~custom-page-KXWAf~pattern-view-page-WE7TE~226f7f79.chunk.eaa5497fb7f7db0479e3.js.map