@storybook/components 6.5.8 → 6.5.9-alpha.2

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 (22) hide show
  1. package/dist/cjs/{Color-d3116a31.js → Color-a62ba7e9.js} +3 -1
  2. package/dist/cjs/{OverlayScrollbars-b655a091.js → OverlayScrollbars-c574dc71.js} +3 -1
  3. package/dist/cjs/{WithTooltip-aa7ec521.js → WithTooltip-f49e8812.js} +6 -2
  4. package/dist/cjs/{formatter-42139f42.js → formatter-e9350ac6.js} +2 -2
  5. package/dist/cjs/{index-82acc4b4.js → index-967d55af.js} +9 -22
  6. package/dist/cjs/index.js +3 -1
  7. package/dist/cjs/{syntaxhighlighter-3f6db113.js → syntaxhighlighter-9522fde9.js} +6 -2
  8. package/dist/esm/{Color-e9687cd5.js → Color-3c22bb81.js} +2 -1
  9. package/dist/esm/{OverlayScrollbars-d54f9566.js → OverlayScrollbars-26c4a78d.js} +2 -1
  10. package/dist/esm/{WithTooltip-5d9955be.js → WithTooltip-508b8277.js} +3 -2
  11. package/dist/esm/{formatter-c2d2643c.js → formatter-9dc562d4.js} +2 -2
  12. package/dist/esm/{index-f6d446d8.js → index-b45716e8.js} +9 -22
  13. package/dist/esm/index.js +2 -1
  14. package/dist/esm/{syntaxhighlighter-75381027.js → syntaxhighlighter-82dea71a.js} +3 -2
  15. package/dist/modern/{Color-31c3091f.js → Color-f9ce6f57.js} +2 -1
  16. package/dist/modern/{OverlayScrollbars-0d0d9ac6.js → OverlayScrollbars-119b80c2.js} +2 -1
  17. package/dist/modern/{WithTooltip-c478b6c7.js → WithTooltip-040f3a83.js} +3 -2
  18. package/dist/modern/{formatter-781ca345.js → formatter-12a1a8d1.js} +2 -2
  19. package/dist/modern/{index-4e034b71.js → index-9ef3b84b.js} +9 -22
  20. package/dist/modern/index.js +2 -1
  21. package/dist/modern/{syntaxhighlighter-848db87b.js → syntaxhighlighter-5c1fdb3d.js} +3 -2
  22. package/package.json +5 -5
@@ -1,4 +1,4 @@
1
- import"core-js/modules/es.typed-array.set.js";import{c as commonjsGlobal,g as getDefaultExportFromCjs,m as memoizerific,d as dedent}from'./index-4e034b71.js';import'react';import'@storybook/theming';import'@storybook/csf';import'qs';import'@storybook/client-logger';var parserHtml={exports:{}};(function(module,exports){!function(e,t){module.exports=t();}(commonjsGlobal,function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};function t(e){var t={exports:{}};return e(t,t.exports),t.exports;}var r=t(function(e,t){function r(e){return t.$0<=e&&e<=t.$9;}/**
1
+ import"core-js/modules/es.typed-array.set.js";import memoize from'memoizerific';import{c as commonjsGlobal,g as getDefaultExportFromCjs,d as dedent}from'./index-9ef3b84b.js';import'react';import'@storybook/theming';import'@storybook/csf';import'qs';import'@storybook/client-logger';var parserHtml={exports:{}};(function(module,exports){!function(e,t){module.exports=t();}(commonjsGlobal,function(){var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof commonjsGlobal?commonjsGlobal:"undefined"!=typeof self?self:{};function t(e){var t={exports:{}};return e(t,t.exports),t.exports;}var r=t(function(e,t){function r(e){return t.$0<=e&&e<=t.$9;}/**
2
2
  * @license
3
3
  * Copyright Google Inc. All Rights Reserved.
4
4
  *
@@ -125,4 +125,4 @@ import"core-js/modules/es.typed-array.set.js";import{c as commonjsGlobal,g as ge
125
125
  *
126
126
  * Use of this source code is governed by an MIT-style license that can be
127
127
  * found in the LICENSE file at https://angular.io/license
128
- */class n{constructor(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r;}toString(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url;}moveBy(e){const t=this.file.content,r=t.length;let o=this.offset,i=this.line,u=this.col;for(;o>0&&e<0;){o--,e++;if(t.charCodeAt(o)==MO.$LF){i--;const e=t.substr(0,o-1).lastIndexOf(String.fromCharCode(MO.$LF));u=e>0?o-e:o;}else u--;}for(;o<r&&e>0;){const n=t.charCodeAt(o);o++,e--,n==MO.$LF?(i++,u=0):u++;}return new n(this.file,o,i,u);}getContext(e,t){const n=this.file.content;let r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);let o=r,i=0,u=0;for(;i<e&&r>0&&(r--,i++,"\n"!=n[r]||++u!=t););for(i=0,u=0;i<e&&o<n.length-1&&(o++,i++,"\n"!=n[o]||++u!=t););return{before:n.substring(r,this.offset),after:n.substring(this.offset,o+1)};}return null;}}t.ParseLocation=n;class r{constructor(e,t){this.content=e,this.url=t;}}t.ParseSourceFile=r;class o{constructor(e,t,n=null){this.start=e,this.end=t,this.details=n;}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset);}}var i;t.ParseSourceSpan=o,t.EMPTY_PARSE_LOCATION=new n(new r("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new o(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR";}(i=t.ParseErrorLevel||(t.ParseErrorLevel={}));t.ParseError=class{constructor(e,t,n=i.ERROR){this.span=e,this.msg=t,this.level=n;}contextualMessage(){const e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(i[this.level]," ->]").concat(e.after,'")'):this.msg;}toString(){const e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e);}},t.typeSourceSpan=function(e,t){const i=DI.identifierModuleUrl(t),u=null!=i?"in ".concat(e," ").concat(DI.identifierName(t)," in ").concat(i):"in ".concat(e," ").concat(DI.identifierName(t)),s=new r("",u);return new o(new n(s,-1,-1,-1),new n(s,-1,-1,-1));},t.r3JitTypeSourceSpan=function(e,t,i){const u="in ".concat(e," ").concat(t," in ").concat(i),s=new r("",u);return new o(new n(s,-1,-1,-1),new n(s,-1,-1,-1));};});const{ParseSourceSpan:bI}=EI,{htmlTrim:CI,getLeadingAndTrailingHtmlWhitespace:vI,hasHtmlWhitespace:AI,canHaveInterpolation:FI,getNodeCssStyleDisplay:xI,isDanglingSpaceSensitiveNode:SI,isIndentationSensitiveNode:wI,isLeadingSpaceSensitiveNode:TI,isTrailingSpaceSensitiveNode:BI,isWhitespaceSensitiveNode:kI}=_O,NI=[function(e){return e.map(e=>{if("element"===e.type&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&"text"===e.children[0].type&&"\n"===e.children[0].value[0]){const[t,...n]=e.children;return e.clone({children:1===t.value.length?n:[t.clone({value:t.value.slice(1)}),...n]});}return e;});},function(e){const t=e=>"element"===e.type&&e.prev&&"ieConditionalStartComment"===e.prev.type&&e.prev.sourceSpan.end.offset===e.startSourceSpan.start.offset&&e.firstChild&&"ieConditionalEndComment"===e.firstChild.type&&e.firstChild.sourceSpan.start.offset===e.startSourceSpan.end.offset;return e.map(e=>{if(e.children){const n=e.children.map(t);if(n.some(Boolean)){const t=[];for(let r=0;r<e.children.length;r++){const o=e.children[r];if(!n[r+1])if(n[r]){const e=o.prev,n=o.firstChild,r=new bI(e.sourceSpan.start,n.sourceSpan.end),i=new bI(r.start,o.sourceSpan.end);t.push(o.clone({condition:e.condition,sourceSpan:i,startSourceSpan:r,children:o.children.slice(1)}));}else t.push(o);}return e.clone({children:t});}}return e;});},function(e){return function(e,t,n){return e.map(e=>{if(e.children){const r=e.children.map(t);if(r.some(Boolean)){const t=[];for(let o=0;o<e.children.length;o++){const i=e.children[o];if("text"!==i.type&&!r[o]){t.push(i);continue;}const u="text"===i.type?i:i.clone({type:"text",value:n(i)});if(0===t.length||"text"!==ke(t).type){t.push(u);continue;}const s=t.pop();t.push(s.clone({value:s.value+u.value,sourceSpan:new bI(s.sourceSpan.start,u.sourceSpan.end)}));}return e.clone({children:t});}}return e;});}(e,e=>"cdata"===e.type,e=>"<![CDATA[".concat(e.value,"]]>"));},function(e,t){if("html"===t.parser)return e;const n=/{{([\S\s]+?)}}/g;return e.map(e=>{if(!FI(e))return e;const t=[];for(const r of e.children){if("text"!==r.type){t.push(r);continue;}let e=r.sourceSpan.start,o=null;const i=r.value.split(n);for(let n=0;n<i.length;n++,e=o){const r=i[n];n%2!=0?(o=e.moveBy(r.length+4),t.push({type:"interpolation",sourceSpan:new bI(e,o),children:0===r.length?[]:[{type:"text",value:r,sourceSpan:new bI(e.moveBy(2),o.moveBy(-2))}]})):(o=e.moveBy(r.length),r.length>0&&t.push({type:"text",value:r,sourceSpan:new bI(e,o)}));}}return e.clone({children:t});});},function(e){const t="whitespace";return e.map(e=>{if(!e.children)return e;if(0===e.children.length||1===e.children.length&&"text"===e.children[0].type&&0===CI(e.children[0].value).length)return e.clone({children:[],hasDanglingSpaces:e.children.length>0});const n=kI(e),r=wI(e);return e.clone({isWhitespaceSensitive:n,isIndentationSensitive:r,children:e.children.reduce((e,r)=>{if("text"!==r.type||n)return[...e,r];const o=[],{leadingWhitespace:i,text:u,trailingWhitespace:s}=vI(r.value);return i&&o.push({type:t}),u&&o.push({type:"text",value:u,sourceSpan:new bI(r.sourceSpan.start.moveBy(i.length),r.sourceSpan.end.moveBy(-s.length))}),s&&o.push({type:t}),[...e,...o];},[]).reduce((e,n,r,o)=>{if(n.type===t)return e;const i=0!==r&&o[r-1].type===t,u=r!==o.length-1&&o[r+1].type===t;return[...e,Object.assign({},n,{hasLeadingSpaces:i,hasTrailingSpaces:u})];},[])});});},function(e,t){return e.map(e=>Object.assign(e,{cssDisplay:xI(e,t)}));},function(e){return e.map(e=>Object.assign(e,{isSelfClosing:!e.children||"element"===e.type&&(e.tagDefinition.isVoid||e.startSourceSpan===e.endSourceSpan)}));},function(e,t){return e.map(e=>"element"!==e.type?e:Object.assign(e,{hasHtmComponentClosingTag:e.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(e.endSourceSpan.start.offset,e.endSourceSpan.end.offset))}));},function(e,t){return e.map(e=>e.children?0===e.children.length?e.clone({isDanglingSpaceSensitive:SI(e)}):e.clone({children:e.children.map(e=>Object.assign({},e,{isLeadingSpaceSensitive:TI(e,t),isTrailingSpaceSensitive:BI(e,t)})).map((e,t,n)=>Object.assign({},e,{isLeadingSpaceSensitive:(0===t||n[t-1].isTrailingSpaceSensitive)&&e.isLeadingSpaceSensitive,isTrailingSpaceSensitive:(t===n.length-1||n[t+1].isLeadingSpaceSensitive)&&e.isTrailingSpaceSensitive}))}):e);},function(e){const t=e=>"element"===e.type&&0===e.attrs.length&&1===e.children.length&&"text"===e.firstChild.type&&!AI(e.children[0].value)&&!e.firstChild.hasLeadingSpaces&&!e.firstChild.hasTrailingSpaces&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces&&e.prev&&"text"===e.prev.type&&e.next&&"text"===e.next.type;return e.map(e=>{if(e.children){const n=e.children.map(t);if(n.some(Boolean)){const t=[];for(let r=0;r<e.children.length;r++){const o=e.children[r];if(n[r]){const n=t.pop(),i=e.children[++r],{isTrailingSpaceSensitive:u,hasTrailingSpaces:s}=i;t.push(n.clone({value:n.value+"<".concat(o.rawName,">")+o.firstChild.value+"</".concat(o.rawName,">")+i.value,sourceSpan:new bI(n.sourceSpan.start,i.sourceSpan.end),isTrailingSpaceSensitive:u,hasTrailingSpaces:s}));}else t.push(o);}return e.clone({children:t});}}return e;});}];var PI=function(e,t){for(const n of NI)e=n(e,t);return e;};var OI={hasPragma:function(e){return /^\s*<!--\s*@(format|prettier)\s*-->/.test(e);},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"");}};var II={locStart:function(e){return e.sourceSpan.start.offset;},locEnd:function(e){return e.sourceSpan.end.offset;}};const{builders:{group:jI}}=Rn;var LI={isVueEventBindingExpression:function(e){const t=e.trim();return /^([\w$]+|\([^)]*?\))\s*=>|^function\s*\(/.test(t)||/^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/.test(t);},printVueFor:function(e,t){const{left:n,operator:r,right:o}=function(e){const t=/([^]*?)\s+(in|of)\s+([^]*)/,n=/,([^,\]}]*)(?:,([^,\]}]*))?$/,r=/^\(|\)$/g,o=e.match(t);if(!o)return;const i={};i.for=o[3].trim();const u=o[1].trim().replace(r,""),s=u.match(n);s?(i.alias=u.replace(n,""),i.iterator1=s[1].trim(),s[2]&&(i.iterator2=s[2].trim())):i.alias=u;return{left:"".concat([i.alias,i.iterator1,i.iterator2].filter(Boolean).join(",")),operator:o[2],right:i.for};}(e);return[jI(t("function _(".concat(n,") {}"),{parser:"babel",__isVueForBindingLeft:!0}))," ",r," ",t(o,{parser:"__js_expression"},{stripTrailingHardline:!0})];},printVueBindings:function(e,t){return t("function _(".concat(e,") {}"),{parser:"babel",__isVueBindings:!0});}},_I=i(function(e){!function(t,n){e.exports?e.exports=n():t.parseSrcset=n();}(r,function(){return function(e,t){var n=t&&t.logger||console;function r(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e;}function o(t){var n,r=t.exec(e.substring(y));if(r)return n=r[0],y+=n.length,n;}for(var i,u,s,a,c,l=e.length,p=/^[ \t\n\r\u000c]+/,f=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,m=/^\d+$/,g=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,y=0,D=[];;){if(o(f),y>=l)return D;i=o(d),u=[],","===i.slice(-1)?(i=i.replace(h,""),b()):E();}function E(){for(o(p),s="",a="in descriptor";;){if(c=e.charAt(y),"in descriptor"===a){if(r(c))s&&(u.push(s),s="",a="after descriptor");else{if(","===c)return y+=1,s&&u.push(s),void b();if("("===c)s+=c,a="in parens";else{if(""===c)return s&&u.push(s),void b();s+=c;}}}else if("in parens"===a){if(")"===c)s+=c,a="in descriptor";else{if(""===c)return u.push(s),void b();s+=c;}}else if("after descriptor"===a)if(r(c));else{if(""===c)return void b();a="in descriptor",y-=1;}y+=1;}}function b(){var t,r,o,s,a,c,l,p,f,d=!1,h={};for(s=0;s<u.length;s++)c=(a=u[s])[a.length-1],l=a.substring(0,a.length-1),p=parseInt(l,10),f=parseFloat(l),m.test(l)&&"w"===c?((t||r)&&(d=!0),0===p?d=!0:t=p):g.test(l)&&"x"===c?((t||r||o)&&(d=!0),f<0?d=!0:r=f):m.test(l)&&"h"===c?((o||r)&&(d=!0),0===p?d=!0:o=p):d=!0;d?n&&n.error&&n.error("Invalid srcset descriptor found in '"+e+"' at '"+a+"'."):(h.url=i,t&&(h.w=t),r&&(h.d=r),o&&(h.h=o),D.push(h));}};});});const{builders:{group:MI,ifBreak:RI,indent:VI,join:$I,line:qI,softline:WI}}=Rn;const UI=["__","--","_","-"];function zI(e){const t=e.search(/[^_-]/);if(-1!==t)for(const n of UI){const r=e.indexOf(n,t);if(-1!==r)return e.slice(0,r);}return e;}var HI={printImgSrcset:function(e){const t=_I(e,{logger:{error(e){throw new Error(e);}}}),n=t.some(({w:e})=>e),r=t.some(({h:e})=>e);if(n+r+t.some(({d:e})=>e)>1)throw new Error("Mixed descriptor in srcset is not supported");const o=n?"w":r?"h":"d",i=n?"w":r?"h":"x",u=e=>Math.max(...e),s=t.map(e=>e.url),a=u(s.map(e=>e.length)),c=t.map(e=>e[o]).map(e=>e?e.toString():""),l=c.map(e=>{const t=e.indexOf(".");return-1===t?e.length:t;}),p=u(l);return $I([",",qI],s.map((e,t)=>{const n=[e],r=c[t];if(r){const o=a-e.length+1,u=p-l[t],s=" ".repeat(o+u);n.push(RI(s," "),r+i);}return n;}));},printClassNames:function(e){const t=e.trim().split(/\s+/),n=[];let r;for(let e=0;e<t.length;e++){const o=zI(t[e]);o!==r&&o!==t[e-1]&&n.push([]),ke(n).push(t[e]),r=o;}return[VI([WI,$I(qI,n.map(e=>MI($I(qI,e))))]),WI];}};const{builders:{breakParent:GI,dedentToRoot:JI,fill:XI,group:YI,hardline:KI,ifBreak:QI,indentIfBreak:ZI,indent:ej,join:tj,line:nj,literalline:rj,softline:oj},utils:{mapDoc:ij,cleanDoc:uj,getDocParts:sj,isConcat:aj}}=Rn,{replaceEndOfLineWith:cj,isNonEmptyArray:lj}=rn,{htmlTrimPreserveIndentation:pj,splitByHtmlWhitespace:fj,countChars:dj,countParents:hj,dedentString:mj,forceBreakChildren:gj,forceBreakContent:yj,forceNextEmptyLine:Dj,getLastDescendant:Ej,getPrettierIgnoreAttributeCommentData:bj,hasPrettierIgnore:Cj,inferScriptParser:vj,isVueCustomBlock:Aj,isVueNonHtmlBlock:Fj,isVueSlotAttribute:xj,isVueSfcBindingsAttribute:Sj,isScriptLikeTag:wj,isTextLikeNode:Tj,preferHardlineAsLeadingSpaces:Bj,shouldNotPrintClosingTag:kj,shouldPreserveContent:Nj,unescapeQuoteEntities:Pj,isPreLikeNode:Oj}=_O,{insertPragma:Ij}=OI,{locStart:jj,locEnd:Lj}=II,{printVueFor:_j,printVueBindings:Mj,isVueEventBindingExpression:Rj}=LI,{printImgSrcset:Vj,printClassNames:$j}=HI;function qj(e,t,n){const r=e.getValue();if(gj(r))return[GI,...e.map(e=>{const t=e.getValue(),n=t.prev?u(t.prev,t):"";return[n?[n,Dj(t.prev)?KI:""]:"",i(e)];},"children")];const o=r.children.map(()=>Symbol(""));return e.map((e,t)=>{const n=e.getValue();if(Tj(n)){if(n.prev&&Tj(n.prev)){const t=u(n.prev,n);if(t)return Dj(n.prev)?[KI,KI,i(e)]:[t,i(e)];}return i(e);}const r=[],s=[],a=[],c=[],l=n.prev?u(n.prev,n):"",p=n.next?u(n,n.next):"";return l&&(Dj(n.prev)?r.push(KI,KI):l===KI?r.push(KI):Tj(n.prev)?s.push(l):s.push(QI("",oj,{groupId:o[t-1]}))),p&&(Dj(n)?Tj(n.next)&&c.push(KI,KI):p===KI?Tj(n.next)&&c.push(KI):a.push(p)),[...r,YI([...s,YI([i(e),...a],{id:o[t]})]),...c];},"children");function i(e){const r=e.getValue();return Cj(r)?[nL(r,t),...cj(t.originalText.slice(jj(r)+(r.prev&&Kj(r.prev)?iL(r).length:0),Lj(r)-(r.next&&Zj(r.next)?aL(r,t).length:0)),rj),oL(r,t)]:n();}function u(e,t){return Tj(e)&&Tj(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?Bj(t)?KI:nj:"":Bj(t)?KI:oj:Kj(e)&&(Cj(t)||t.firstChild||t.isSelfClosing||"element"===t.type&&t.attrs.length>0)||"element"===e.type&&e.isSelfClosing&&Zj(t)?"":!t.isLeadingSpaceSensitive||Bj(t)||Zj(t)&&e.lastChild&&tL(e.lastChild)&&e.lastChild.lastChild&&tL(e.lastChild.lastChild)?KI:t.hasLeadingSpaces?nj:oj;}}function Wj(e,t){let n=e.startSourceSpan.end.offset;e.firstChild&&Qj(e.firstChild)&&(n-=uL(e).length);let r=e.endSourceSpan.start.offset;return e.lastChild&&tL(e.lastChild)?r+=sL(e,t).length:eL(e)&&(r-=aL(e.lastChild,t).length),t.originalText.slice(n,r);}function Uj(e,t,n){const r=e.getValue();if(!lj(r.attrs))return r.isSelfClosing?" ":"";const o=r.prev&&"comment"===r.prev.type&&bj(r.prev.value),i="boolean"==typeof o?()=>o:Array.isArray(o)?e=>o.includes(e.rawName):()=>!1,u=e.map(e=>{const r=e.getValue();return i(r)?cj(t.originalText.slice(jj(r),Lj(r)),rj):n();},"attrs"),s="element"===r.type&&"script"===r.fullName&&1===r.attrs.length&&"src"===r.attrs[0].fullName&&0===r.children.length,a=[ej([s?" ":nj,tj(nj,u)])];return r.firstChild&&Qj(r.firstChild)||r.isSelfClosing&&eL(r.parent)||s?a.push(r.isSelfClosing?" ":""):a.push(r.isSelfClosing?nj:oj),a;}function zj(e,t,n){const r=e.getValue();return[Hj(r,t),Uj(e,t,n),r.isSelfClosing?"":Gj(r)];}function Hj(e,t){return e.prev&&Kj(e.prev)?"":[nL(e,t),iL(e)];}function Gj(e){return e.firstChild&&Qj(e.firstChild)?"":uL(e);}function Jj(e,t){return[e.isSelfClosing?"":Xj(e,t),Yj(e,t)];}function Xj(e,t){return e.lastChild&&tL(e.lastChild)?"":[rL(e,t),sL(e,t)];}function Yj(e,t){return(e.next?Zj(e.next):eL(e.parent))?"":[aL(e,t),oL(e,t)];}function Kj(e){return e.next&&!Tj(e.next)&&Tj(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces;}function Qj(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces;}function Zj(e){return e.prev&&"docType"!==e.prev.type&&!Tj(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces;}function eL(e){return e.lastChild&&e.lastChild.isTrailingSpaceSensitive&&!e.lastChild.hasTrailingSpaces&&!Tj(Ej(e.lastChild))&&!Oj(e);}function tL(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&Tj(Ej(e));}function nL(e,t){return Qj(e)?uL(e.parent):Zj(e)?aL(e.prev,t):"";}function rL(e,t){return eL(e)?aL(e.lastChild,t):"";}function oL(e,t){return tL(e)?sL(e.parent,t):Kj(e)?iL(e.next):"";}function iL(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return"\x3c!--[if ".concat(e.condition);case"ieConditionalEndComment":return"\x3c!--<!";case"interpolation":return"{{";case"docType":return"<!DOCTYPE";case"element":if(e.condition)return"\x3c!--[if ".concat(e.condition,"]>\x3c!--\x3e<").concat(e.rawName);default:return"<".concat(e.rawName);}}function uL(e){switch(Il(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">\x3c!--<![endif]--\x3e";default:return">";}}function sL(e,t){if(Il(!e.isSelfClosing),kj(e,t))return"";switch(e.type){case"ieConditionalComment":return"<!";case"element":if(e.hasHtmComponentClosingTag)return"<//";default:return"</".concat(e.rawName);}}function aL(e,t){if(kj(e,t))return"";switch(e.type){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]--\x3e";case"ieConditionalStartComment":return"]>\x3c!--\x3e";case"interpolation":return"}}";case"element":if(e.isSelfClosing)return"/>";default:return">";}}function cL(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?cj(t,rj):cj(mj(pj(t)),KI):sj(tj(nj,fj(t)));}var lL={preprocess:PI,print:function(e,t,n){const r=e.getValue();switch(r.type){case"front-matter":return cj(r.raw,rj);case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(r),[YI(qj(e,t,n)),KI];case"element":case"ieConditionalComment":{if(Nj(r,t))return[nL(r,t),YI(zj(e,t,n)),...cj(Wj(r,t),rj),...Jj(r,t),oL(r,t)];const i=1===r.children.length&&"interpolation"===r.firstChild.type&&r.firstChild.isLeadingSpaceSensitive&&!r.firstChild.hasLeadingSpaces&&r.lastChild.isTrailingSpaceSensitive&&!r.lastChild.hasTrailingSpaces,u=Symbol("element-attr-group-id");return[YI([YI(zj(e,t,n),{id:u}),0===r.children.length?r.hasDanglingSpaces&&r.isDanglingSpaceSensitive?nj:"":[yj(r)?GI:"",(o=[i?QI(oj,"",{groupId:u}):r.firstChild.hasLeadingSpaces&&r.firstChild.isLeadingSpaceSensitive?nj:"text"===r.firstChild.type&&r.isWhitespaceSensitive&&r.isIndentationSensitive?JI(oj):oj,qj(e,t,n)],i?ZI(o,{groupId:u}):!wj(r)&&!Aj(r,t)||"root"!==r.parent.type||"vue"!==t.parser||t.vueIndentScriptAndStyle?ej(o):o),(r.next?Zj(r.next):eL(r.parent))?r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?" ":"":i?QI(oj,"",{groupId:u}):r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?nj:("comment"===r.lastChild.type||"text"===r.lastChild.type&&r.isWhitespaceSensitive&&r.isIndentationSensitive)&&new RegExp("\\n[\\t ]{".concat(t.tabWidth*hj(e,e=>e.parent&&"root"!==e.parent.type),"}$")).test(r.lastChild.value)?"":oj]]),Jj(r,t)];}case"ieConditionalStartComment":case"ieConditionalEndComment":return[Hj(r),Yj(r)];case"interpolation":return[Hj(r,t),...e.map(n,"children"),Yj(r,t)];case"text":{if("interpolation"===r.parent.type){const e=/\n[^\S\n]*?$/,t=e.test(r.value),n=t?r.value.replace(e,""):r.value;return[...cj(n,rj),t?KI:""];}const e=uj([nL(r,t),...cL(r),oL(r,t)]);return aj(e)||"fill"===e.type?XI(sj(e)):e;}case"docType":return[YI([Hj(r,t)," ",r.value.replace(/^html\b/i,"html").replace(/\s+/g," ")]),Yj(r,t)];case"comment":return[nL(r,t),...cj(t.originalText.slice(jj(r),Lj(r)),rj),oL(r,t)];case"attribute":{if(null===r.value)return r.rawName;const e=Pj(r.value),t=dj(e,"'")<dj(e,'"')?"'":'"';return[r.rawName,"=",t,...cj('"'===t?e.replace(/"/g,"&quot;"):e.replace(/'/g,"&apos;"),rj),t];}default:throw new Error("Unexpected node type ".concat(r.type));}var o;},insertPragma:Ij,massageAstNode:oO,embed:function(e,t,n,r){const o=e.getValue();switch(o.type){case"element":if(wj(o)||"interpolation"===o.type)return;if(!o.isSelfClosing&&Fj(o,r)){const i=vj(o,r);if(!i)return;const u=Wj(o,r);let s=/^\s*$/.test(u),a="";return s||(a=n(pj(u),{parser:i,__embeddedInHtml:!0},{stripTrailingHardline:!0}),s=""===a),[nL(o,r),YI(zj(e,r,t)),s?"":KI,a,s?"":KI,Jj(o,r),oL(o,r)];}break;case"text":if(wj(o.parent)){const e=vj(o.parent);if(e){const t="markdown"===e?mj(o.value.replace(/^[^\S\n]*?\n/,"")):o.value,i={parser:e,__embeddedInHtml:!0};if("html"===r.parser&&"babel"===e){let e="script";const{attrMap:t}=o.parent;t&&("module"===t.type||"text/babel"===t.type&&"module"===t["data-type"])&&(e="module"),i.__babelSourceType=e;}return[GI,nL(o,r),n(t,i,{stripTrailingHardline:!0}),oL(o,r)];}}else if("interpolation"===o.parent.type){const e={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return"angular"===r.parser?(e.parser="__ng_interpolation",e.trailingComma="none"):"vue"===r.parser?e.parser="__vue_expression":e.parser="__js_expression",[ej([nj,n(o.value,e,{stripTrailingHardline:!0})]),o.parent.next&&Zj(o.parent.next)?" ":nj];}break;case"attribute":{if(!o.value)break;if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.originalText.slice(o.valueSpan.start.offset,o.valueSpan.end.offset)))return[o.rawName,"=",o.value];if("lwc"===r.parser){if(/^{[\S\s]*}$/.test(r.originalText.slice(o.valueSpan.start.offset,o.valueSpan.end.offset)))return[o.rawName,"=",o.value];}const e=function(e,t,n){const r=t=>new RegExp(t.join("|")).test(e.fullName),o=()=>Pj(e.value);let i=!1;const u=(e,t)=>{const n="NGRoot"===e.type?"NGMicrosyntax"===e.node.type&&1===e.node.body.length&&"NGMicrosyntaxExpression"===e.node.body[0].type?e.node.body[0].expression:e.node:"JsExpressionRoot"===e.type?e.node:e;!n||"ObjectExpression"!==n.type&&"ArrayExpression"!==n.type&&("__vue_expression"!==t.parser||"TemplateLiteral"!==n.type&&"StringLiteral"!==n.type)||(i=!0);},s=e=>YI(e),a=(e,t=!0)=>YI([ej([oj,e]),t?oj:""]),c=e=>i?s(e):a(e),l=(e,n)=>t(e,Object.assign({__onHtmlBindingRoot:u,__embeddedInHtml:!0},n),{stripTrailingHardline:!0});if("srcset"===e.fullName&&("img"===e.parent.fullName||"source"===e.parent.fullName))return a(Vj(o()));if("class"===e.fullName&&!n.parentParser){const e=o();if(!e.includes("{{"))return $j(e);}if("style"===e.fullName&&!n.parentParser){const e=o();if(!e.includes("{{"))return a(l(e,{parser:"css",__isHTMLStyleAttribute:!0}));}if("vue"===n.parser){if("v-for"===e.fullName)return _j(o(),l);if(xj(e)||Sj(e,n))return Mj(o(),l);const t=["^:","^v-bind:"],i=["^v-"];if(r(["^@","^v-on:"])){const e=o();return c(l(e,{parser:Rj(e)?"__js_expression":"__vue_event_binding"}));}if(r(t))return c(l(o(),{parser:"__vue_expression"}));if(r(i))return c(l(o(),{parser:"__js_expression"}));}if("angular"===n.parser){const t=(e,t)=>l(e,Object.assign({},t,{trailingComma:"none"})),n=["^\\*"],i=["^\\[.+\\]$","^bind(on)?-","^ng-(if|show|hide|class|style)$"],u=["^i18n(-.+)?$"];if(r(["^\\(.+\\)$","^on-"]))return c(t(o(),{parser:"__ng_action"}));if(r(i))return c(t(o(),{parser:"__ng_binding"}));if(r(u)){const t=o().trim();return a(XI(cL(e,t)),!t.includes("@@"));}if(r(n))return c(t(o(),{parser:"__ng_directive"}));const s=/{{([\S\s]+?)}}/g,p=o();if(s.test(p)){const e=[];for(const[n,r]of p.split(s).entries())if(n%2==0)e.push(cj(r,rj));else try{e.push(YI(["{{",ej([nj,t(r,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),nj,"}}"]));}catch(t){e.push("{{",cj(r,rj),"}}");}return YI(e);}}return null;}(o,(e,t)=>n(e,Object.assign({__isInHtmlAttribute:!0,__embeddedInHtml:!0},t),{stripTrailingHardline:!0}),r);if(e)return[o.rawName,'="',YI(ij(e,e=>"string"==typeof e?e.replace(/"/g,"&quot;"):e)),'"'];break;}case"front-matter":return Xw(o,n);}}};const pL="HTML";var fL={htmlWhitespaceSensitivity:{since:"1.15.0",category:pL,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},vueIndentScriptAndStyle:{since:"1.19.0",category:pL,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},dL={name:"HTML",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".html",".htm",".html.hl",".inc",".xht",".xhtml"],languageId:146},hL={name:"Vue",type:"markup",color:"#2c3e50",extensions:[".vue"],tmScope:"text.html.vue",aceMode:"html",languageId:391};var mL={languages:[df(dL,()=>({name:"Angular",since:"1.15.0",parsers:["angular"],vscodeLanguageIds:["html"],extensions:[".component.html"],filenames:[]})),df(dL,e=>({since:"1.15.0",parsers:["html"],vscodeLanguageIds:["html"],extensions:[...e.extensions,".mjml"]})),df(dL,()=>({name:"Lightning Web Components",since:"1.17.0",parsers:["lwc"],vscodeLanguageIds:["html"],extensions:[],filenames:[]})),df(hL,()=>({since:"1.10.0",parsers:["vue"],vscodeLanguageIds:["vue"]}))],printers:{html:lL},options:fL,parsers:{get html(){return{}.parsers.html;},get vue(){return{}.parsers.vue;},get angular(){return{}.parsers.angular;},get lwc(){return{}.parsers.lwc;}}};var gL={isPragma:function(e){return /^\s*@(prettier|format)\s*$/.test(e);},hasPragma:function(e){return /^\s*#[^\S\n]*@(prettier|format)\s*?(\n|$)/.test(e);},insertPragma:function(e){return"# @format\n\n".concat(e);}};var yL={locStart:function(e){return e.position.start.offset;},locEnd:function(e){return e.position.end.offset;}};var DL=function(e,t,n,r){if("root"===e.getValue().type&&r.filepath&&/(?:[/\\]|^)\.prettierrc$/.test(r.filepath))return n(r.originalText,Object.assign({},r,{parser:"json"}));};const{getLast:EL,isNonEmptyArray:bL}=rn;function CL(e,t){return e&&"string"==typeof e.type&&(!t||t.includes(e.type));}function vL(e){return"prettier-ignore"===e.value.trim();}function AL(e){return e&&bL(e.leadingComments);}function FL(e){return e&&bL(e.middleComments);}function xL(e){return e&&e.indicatorComment;}function SL(e){return e&&e.trailingComment;}function wL(e){return e&&bL(e.endComments);}function TL(e){const t=[];let n;for(const r of e.split(/( +)/g))" "!==r?" "===n?t.push(r):t.push((t.pop()||"")+r):void 0===n&&t.unshift(""),n=r;return" "===n&&t.push((t.pop()||"")+" "),""===t[0]&&(t.shift(),t.unshift(" "+(t.shift()||""))),t;}var BL={getLast:EL,getAncestorCount:function(e,t){let n=0;const r=e.stack.length-1;for(let o=0;o<r;o++){const r=e.stack[o];CL(r)&&t(r)&&n++;}return n;},isNode:CL,isEmptyNode:function(e){return!bL(e.children)&&!function(e){return AL(e)||FL(e)||xL(e)||SL(e)||wL(e);}(e);},isInlineNode:function(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1;}},mapNode:function e(t,n,r){return n("children"in t?Object.assign({},t,{children:t.children.map(r=>e(r,n,t))}):t,r);},defineShortcut:function(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1});},isNextLineEmpty:function(e,t){let n=0;const r=t.length;for(let o=e.position.end.offset-1;o<r;o++){const e=t[o];if("\n"===e&&n++,1===n&&/\S/.test(e))return!1;if(2===n)return!0;}return!1;},isLastDescendantNode:function(e){switch(e.getValue().type){case"tag":case"anchor":case"comment":return!1;}const t=e.stack.length;for(let n=1;n<t;n++){const t=e.stack[n],r=e.stack[n-1];if(Array.isArray(r)&&"number"==typeof t&&t!==r.length-1)return!1;}return!0;},getBlockValueLineContents:function(e,{parentIndent:t,isLastDescendant:n,options:r}){const o=e.position.start.line===e.position.end.line?"":r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*?\n([\S\s]*)$/)[1],i=null===e.indent?(u=o.match(/^( *)\S/m))?u[1].length:Number.POSITIVE_INFINITY:e.indent-1+t;var u;const s=o.split("\n").map(e=>e.slice(i));return"preserve"===r.proseWrap||"blockLiteral"===e.type?a(s.map(e=>0===e.length?[]:[e])):a(s.map(e=>0===e.length?[]:TL(e)).reduce((e,t,n)=>0!==n&&s[n-1].length>0&&t.length>0&&!/^\s/.test(t[0])&&!/^\s|\s$/.test(EL(e))?[...e.slice(0,-1),[...EL(e),...t]]:[...e,t],[]).map(e=>e.reduce((e,t)=>e.length>0&&/\s$/.test(EL(e))?[...e.slice(0,-1),EL(e)+" "+t]:[...e,t],[])).map(e=>"never"===r.proseWrap?[e.join(" ")]:e));function a(t){if("keep"===e.chomping)return 0===EL(t).length?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&0===t[e].length;e--)r++;return 0===r?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r);}},getFlowScalarLineContents:function(e,t,n){const r=t.split("\n").map((e,t,n)=>0===t&&t===n.length-1?e:0!==t&&t!==n.length-1?e.trim():0===t?e.trimEnd():e.trimStart());return"preserve"===n.proseWrap?r.map(e=>0===e.length?[]:[e]):r.map(e=>0===e.length?[]:TL(e)).reduce((t,n,o)=>0!==o&&r[o-1].length>0&&n.length>0&&("quoteDouble"!==e||!EL(EL(t)).endsWith("\\"))?[...t.slice(0,-1),[...EL(t),...n]]:[...t,n],[]).map(e=>"never"===n.proseWrap?[e.join(" ")]:e);},getLastDescendantNode:function e(t){return bL(t.children)?e(EL(t.children)):t;},hasPrettierIgnore:function(e){const t=e.getValue();if("documentBody"===t.type){const t=e.getParentNode();return wL(t.head)&&vL(EL(t.head.endComments));}return AL(t)&&vL(EL(t.leadingComments));},hasLeadingComments:AL,hasMiddleComments:FL,hasIndicatorComment:xL,hasTrailingComment:SL,hasEndComments:wL};const{defineShortcut:kL,mapNode:NL}=BL;function PL(e){switch(e.type){case"document":kL(e,"head",()=>e.children[0]),kL(e,"body",()=>e.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":kL(e,"content",()=>e.children[0]);break;case"mappingItem":case"flowMappingItem":kL(e,"key",()=>e.children[0]),kL(e,"value",()=>e.children[1]);}return e;}var OL=function(e){return NL(e,PL);};const{builders:{softline:IL,align:jL}}=Rn,{hasEndComments:LL,isNextLineEmpty:_L,isNode:ML}=BL,RL=new WeakMap();function VL(e){return LL(e)&&!ML(e,["documentHead","documentBody","flowMapping","flowSequence"]);}var $L={alignWithSpaces:function(e,t){return jL(" ".repeat(e),t);},shouldPrintEndComments:VL,printNextEmptyLine:function(e,t){const n=e.getValue(),r=e.stack[0];let o;return RL.has(r)?o=RL.get(r):(o=new Set(),RL.set(r,o)),o.has(n.position.end.line)||(o.add(n.position.end.line),!_L(n,t)||VL(e.getParentNode()))?"":IL;}};const{builders:{ifBreak:qL,line:WL,softline:UL,hardline:zL,join:HL}}=Rn,{isEmptyNode:GL,getLast:JL,hasEndComments:XL}=BL,{printNextEmptyLine:YL,alignWithSpaces:KL}=$L;function QL(e,t,n){const r=e.getValue(),o="flowMapping"===r.type,i=o?"{":"[",u=o?"}":"]";let s=UL;o&&r.children.length>0&&n.bracketSpacing&&(s=WL);const a=JL(r.children),c=a&&"flowMappingItem"===a.type&&GL(a.key)&&GL(a.value);return[i,KL(n.tabWidth,[s,ZL(e,t,n),"none"===n.trailingComma?"":qL(","),XL(r)?[zL,HL(zL,e.map(t,"endComments"))]:""]),c?"":s,u];}function ZL(e,t,n){const r=e.getValue();return e.map((e,o)=>[t(),o===r.children.length-1?"":[",",WL,r.children[o].position.start.line!==r.children[o+1].position.start.line?YL(e,n.originalText):""]],"children");}var e_={printFlowMapping:QL,printFlowSequence:QL};const{builders:{conditionalGroup:t_,group:n_,hardline:r_,ifBreak:o_,join:i_,line:u_}}=Rn,{hasLeadingComments:s_,hasMiddleComments:a_,hasTrailingComment:c_,hasEndComments:l_,isNode:p_,isEmptyNode:f_,isInlineNode:d_}=BL,{alignWithSpaces:h_}=$L;function m_(e,t){if(!e)return!0;switch(e.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1;}if("preserve"===t.proseWrap)return e.position.start.line===e.position.end.line;if(/\\$/m.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case"never":return!e.value.includes("\n");case"always":return!/[\n ]/.test(e.value);default:return!1;}}var g_=function(e,t,n,r,o){const{key:i,value:u}=e,s=f_(i),a=f_(u);if(s&&a)return": ";const c=r("key"),l=function(e){return e.key.content&&"alias"===e.key.content.type;}(e)?" ":"";if(a)return"flowMappingItem"===e.type&&"flowMapping"===t.type?c:"mappingItem"!==e.type||!m_(i.content,o)||c_(i.content)||t.tag&&"tag:yaml.org,2002:set"===t.tag.value?["? ",h_(2,c)]:[c,l,":"];const p=r("value");if(s)return[": ",h_(2,p)];if(s_(u)||!d_(i.content))return["? ",h_(2,c),r_,i_("",n.map(r,"value","leadingComments").map(e=>[e,r_])),": ",h_(2,p)];if(function(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":return e.position.start.line===e.position.end.line;case"alias":return!0;default:return!1;}}(i.content)&&!s_(i.content)&&!a_(i.content)&&!c_(i.content)&&!l_(i)&&!s_(u.content)&&!a_(u.content)&&!l_(u)&&m_(u.content,o))return[c,l,": ",p];const f=Symbol("mappingKey"),d=n_([o_("? "),n_(h_(2,c),{id:f})]),h=[r_,": ",h_(2,p)],m=[l,":"];s_(u.content)||l_(u)&&u.content&&!p_(u.content,["mapping","sequence"])||"mapping"===t.type&&c_(i.content)&&d_(u.content)||p_(u.content,["mapping","sequence"])&&null===u.content.tag&&null===u.content.anchor?m.push(r_):u.content&&m.push(u_),m.push(p);const g=h_(o.tabWidth,m);return t_([[d,o_(h,g,{groupId:f})]]);};const{builders:{dedent:y_,dedentToRoot:D_,fill:E_,hardline:b_,join:C_,line:v_,literalline:A_,markAsRoot:F_},utils:{getDocParts:x_}}=Rn,{getAncestorCount:S_,getBlockValueLineContents:w_,hasIndicatorComment:T_,isLastDescendantNode:B_,isNode:k_}=BL,{alignWithSpaces:N_}=$L;var P_=function(e,t,n){const r=e.getValue(),o=S_(e,e=>k_(e,["sequence","mapping"])),i=B_(e),u=["blockFolded"===r.type?">":"|"];null!==r.indent&&u.push(r.indent.toString()),"clip"!==r.chomping&&u.push("keep"===r.chomping?"+":"-"),T_(r)&&u.push(" ",t("indicatorComment"));const s=w_(r,{parentIndent:o,isLastDescendant:i,options:n}),a=[];for(const[e,t]of s.entries())0===e&&a.push(b_),a.push(E_(x_(C_(v_,t)))),e!==s.length-1?a.push(0===t.length?b_:F_(A_)):"keep"===r.chomping&&i&&a.push(D_(0===t.length?b_:A_));return null===r.indent?u.push(y_(N_(n.tabWidth,a))):u.push(D_(N_(r.indent-1+o,a))),u;};const{builders:{breakParent:O_,fill:I_,group:j_,hardline:L_,join:__,line:M_,lineSuffix:R_,literalline:V_},utils:{getDocParts:$_}}=Rn,{replaceEndOfLineWith:q_,isPreviousLineEmpty:W_}=rn,{insertPragma:U_,isPragma:z_}=gL,{locStart:H_}=yL,{getFlowScalarLineContents:G_,getLastDescendantNode:J_,hasLeadingComments:X_,hasMiddleComments:Y_,hasTrailingComment:K_,hasEndComments:Q_,hasPrettierIgnore:Z_,isLastDescendantNode:eM,isNode:tM,isInlineNode:nM}=BL,{alignWithSpaces:rM,printNextEmptyLine:oM,shouldPrintEndComments:iM}=$L,{printFlowMapping:uM,printFlowSequence:sM}=e_;function aM(e,t){return K_(e)||t&&(t.head.children.length>0||Q_(t.head));}function cM(e,t,n){const r=G_(e,t,n);return __(L_,r.map(e=>I_($_(__(M_,e)))));}var lM={preprocess:OL,embed:DL,print:function(e,t,n){const r=e.getValue(),o=[];"mappingValue"!==r.type&&X_(r)&&o.push([__(L_,e.map(n,"leadingComments")),L_]);const{tag:i,anchor:u}=r;i&&o.push(n("tag")),i&&u&&o.push(" "),u&&o.push(n("anchor"));let s="";tM(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!eM(e)&&(s=oM(e,t.originalText)),(i||u)&&(tM(r,["sequence","mapping"])&&!Y_(r)?o.push(L_):o.push(" ")),Y_(r)&&o.push([1===r.middleComments.length?"":L_,__(L_,e.map(n,"middleComments")),L_]);const a=e.getParentNode();return Z_(e)?o.push(q_(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd(),V_)):o.push(j_(function(e,t,n,r,o){switch(e.type){case"root":{const{children:t}=e,r=[];n.each((e,n)=>{const i=t[n],u=t[n+1];0!==n&&r.push(L_),r.push(o()),aM(i,u)?(r.push(L_,"..."),K_(i)&&r.push(" ",o("trailingComment"))):u&&!K_(u.head)&&r.push(L_,"---");},"children");const i=J_(e);return tM(i,["blockLiteral","blockFolded"])&&"keep"===i.chomping||r.push(L_),r;}case"document":{const i=[];return"head"===function(e,t,n,r){if(n.children[0]===e&&/---(\s|$)/.test(r.originalText.slice(H_(e),H_(e)+4))||e.head.children.length>0||Q_(e.head)||K_(e.head))return"head";if(aM(e,t))return!1;return!!t&&"root";}(e,t.children[n.getName()+1],t,r)&&((e.head.children.length>0||e.head.endComments.length>0)&&i.push(o("head")),K_(e.head)?i.push(["---"," ",o(["head","trailingComment"])]):i.push("---")),function(e){return e.body.children.length>0||Q_(e.body);}(e)&&i.push(o("body")),__(L_,i);}case"documentHead":return __(L_,[...n.map(o,"children"),...n.map(o,"endComments")]);case"documentBody":{const{children:t,endComments:r}=e;let i="";if(t.length>0&&r.length>0){const t=J_(e);tM(t,["blockFolded","blockLiteral"])?"keep"!==t.chomping&&(i=[L_,L_]):i=L_;}return[__(L_,n.map(o,"children")),i,__(L_,n.map(o,"endComments"))];}case"directive":return["%",__(" ",[e.name,...e.parameters])];case"comment":return["#",e.value];case"alias":return["*",e.value];case"tag":return r.originalText.slice(e.position.start.offset,e.position.end.offset);case"anchor":return["&",e.value];case"plain":return cM(e.type,r.originalText.slice(e.position.start.offset,e.position.end.offset),r);case"quoteDouble":case"quoteSingle":{const t="'",n='"',o=r.originalText.slice(e.position.start.offset+1,e.position.end.offset-1);if("quoteSingle"===e.type&&o.includes("\\")||"quoteDouble"===e.type&&/\\[^"]/.test(o)){const i="quoteDouble"===e.type?n:t;return[i,cM(e.type,o,r),i];}if(o.includes(n))return[t,cM(e.type,"quoteDouble"===e.type?o.replace(/\\"/g,n).replace(/'/g,t.repeat(2)):o,r),t];if(o.includes(t))return[n,cM(e.type,"quoteSingle"===e.type?o.replace(/''/g,t):o,r),n];const i=r.singleQuote?t:n;return[i,cM(e.type,o,r),i];}case"blockFolded":case"blockLiteral":return P_(n,o,r);case"mapping":case"sequence":return __(L_,n.map(o,"children"));case"sequenceItem":return["- ",rM(2,e.content?o("content"):"")];case"mappingKey":case"mappingValue":return e.content?o("content"):"";case"mappingItem":case"flowMappingItem":return g_(e,t,n,o,r);case"flowMapping":return uM(n,o,r);case"flowSequence":return sM(n,o,r);case"flowSequenceItem":return o("content");default:throw new Error("Unexpected node type ".concat(e.type));}}(r,a,e,t,n))),K_(r)&&!tM(r,["document","documentHead"])&&o.push(R_(["mappingValue"!==r.type||r.content?" ":"","mappingKey"===a.type&&"mapping"===e.getParentNode(2).type&&nM(r)?"":O_,n("trailingComment")])),iM(r)&&o.push(rM("sequenceItem"===r.type?2:0,[L_,__(L_,e.map(e=>[W_(t.originalText,e.getValue(),H_)?L_:"",n()],"endComments"))])),o.push(s),o;},massageAstNode:function(e,t){if(tM(t))switch(delete t.position,t.type){case"comment":if(z_(t.value))return null;break;case"quoteDouble":case"quoteSingle":t.type="quote";}},insertPragma:U_},pM={bracketSpacing:Ow.bracketSpacing,singleQuote:Ow.singleQuote,proseWrap:Ow.proseWrap};var fM=[qw,GB,rN,FN,eO,mL,{languages:[df({name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","glide.lock","yarn.lock"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",languageId:407},e=>({since:"1.14.0",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"],filenames:[...e.filenames.filter(e=>"yarn.lock"!==e),".prettierrc"]}))],printers:{yaml:lM},options:pM,parsers:{get yaml(){return{}.parsers.yaml;}}}];const{version:dM}=n,{getSupportInfo:hM}=Mt,mM=fM.map(t=>e(t,["parsers"]));function gM(e,t=1){return(...n)=>{const r=n[t]||{},o=r.plugins||[];return n[t]=Object.assign({},r,{plugins:[...mM,...(Array.isArray(o)?o:Object.values(o))]}),e(...n);};}const yM=gM($p.formatWithCursor);return{formatWithCursor:yM,format:(e,t)=>yM(e,t).formatted,check(e,t){const{formatted:n}=yM(e,t);return n===e;},doc:Rn,getSupportInfo:gM(hM,0),version:dM,util:ff,__debug:{parse:gM($p.parse),formatAST:gM($p.formatAST),formatDoc:gM($p.formatDoc),printToDoc:gM($p.printToDoc),printDocToString:gM($p.printDocToString)}};});})(standalone);const prettier=/*@__PURE__*/getDefaultExportFromCjs(standalone.exports);const formatter=memoizerific(2)((type,source)=>{if(type===false){return source;}if(type==='dedent'||type===true){return dedent(source);}return prettier.format(source,{parser:type,plugins:[prettierHtml],htmlWhitespaceSensitivity:'ignore'}).trim();});export{formatter};
128
+ */class n{constructor(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r;}toString(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url;}moveBy(e){const t=this.file.content,r=t.length;let o=this.offset,i=this.line,u=this.col;for(;o>0&&e<0;){o--,e++;if(t.charCodeAt(o)==MO.$LF){i--;const e=t.substr(0,o-1).lastIndexOf(String.fromCharCode(MO.$LF));u=e>0?o-e:o;}else u--;}for(;o<r&&e>0;){const n=t.charCodeAt(o);o++,e--,n==MO.$LF?(i++,u=0):u++;}return new n(this.file,o,i,u);}getContext(e,t){const n=this.file.content;let r=this.offset;if(null!=r){r>n.length-1&&(r=n.length-1);let o=r,i=0,u=0;for(;i<e&&r>0&&(r--,i++,"\n"!=n[r]||++u!=t););for(i=0,u=0;i<e&&o<n.length-1&&(o++,i++,"\n"!=n[o]||++u!=t););return{before:n.substring(r,this.offset),after:n.substring(this.offset,o+1)};}return null;}}t.ParseLocation=n;class r{constructor(e,t){this.content=e,this.url=t;}}t.ParseSourceFile=r;class o{constructor(e,t,n=null){this.start=e,this.end=t,this.details=n;}toString(){return this.start.file.content.substring(this.start.offset,this.end.offset);}}var i;t.ParseSourceSpan=o,t.EMPTY_PARSE_LOCATION=new n(new r("",""),0,0,0),t.EMPTY_SOURCE_SPAN=new o(t.EMPTY_PARSE_LOCATION,t.EMPTY_PARSE_LOCATION),function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR";}(i=t.ParseErrorLevel||(t.ParseErrorLevel={}));t.ParseError=class{constructor(e,t,n=i.ERROR){this.span=e,this.msg=t,this.level=n;}contextualMessage(){const e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(i[this.level]," ->]").concat(e.after,'")'):this.msg;}toString(){const e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e);}},t.typeSourceSpan=function(e,t){const i=DI.identifierModuleUrl(t),u=null!=i?"in ".concat(e," ").concat(DI.identifierName(t)," in ").concat(i):"in ".concat(e," ").concat(DI.identifierName(t)),s=new r("",u);return new o(new n(s,-1,-1,-1),new n(s,-1,-1,-1));},t.r3JitTypeSourceSpan=function(e,t,i){const u="in ".concat(e," ").concat(t," in ").concat(i),s=new r("",u);return new o(new n(s,-1,-1,-1),new n(s,-1,-1,-1));};});const{ParseSourceSpan:bI}=EI,{htmlTrim:CI,getLeadingAndTrailingHtmlWhitespace:vI,hasHtmlWhitespace:AI,canHaveInterpolation:FI,getNodeCssStyleDisplay:xI,isDanglingSpaceSensitiveNode:SI,isIndentationSensitiveNode:wI,isLeadingSpaceSensitiveNode:TI,isTrailingSpaceSensitiveNode:BI,isWhitespaceSensitiveNode:kI}=_O,NI=[function(e){return e.map(e=>{if("element"===e.type&&e.tagDefinition.ignoreFirstLf&&e.children.length>0&&"text"===e.children[0].type&&"\n"===e.children[0].value[0]){const[t,...n]=e.children;return e.clone({children:1===t.value.length?n:[t.clone({value:t.value.slice(1)}),...n]});}return e;});},function(e){const t=e=>"element"===e.type&&e.prev&&"ieConditionalStartComment"===e.prev.type&&e.prev.sourceSpan.end.offset===e.startSourceSpan.start.offset&&e.firstChild&&"ieConditionalEndComment"===e.firstChild.type&&e.firstChild.sourceSpan.start.offset===e.startSourceSpan.end.offset;return e.map(e=>{if(e.children){const n=e.children.map(t);if(n.some(Boolean)){const t=[];for(let r=0;r<e.children.length;r++){const o=e.children[r];if(!n[r+1])if(n[r]){const e=o.prev,n=o.firstChild,r=new bI(e.sourceSpan.start,n.sourceSpan.end),i=new bI(r.start,o.sourceSpan.end);t.push(o.clone({condition:e.condition,sourceSpan:i,startSourceSpan:r,children:o.children.slice(1)}));}else t.push(o);}return e.clone({children:t});}}return e;});},function(e){return function(e,t,n){return e.map(e=>{if(e.children){const r=e.children.map(t);if(r.some(Boolean)){const t=[];for(let o=0;o<e.children.length;o++){const i=e.children[o];if("text"!==i.type&&!r[o]){t.push(i);continue;}const u="text"===i.type?i:i.clone({type:"text",value:n(i)});if(0===t.length||"text"!==ke(t).type){t.push(u);continue;}const s=t.pop();t.push(s.clone({value:s.value+u.value,sourceSpan:new bI(s.sourceSpan.start,u.sourceSpan.end)}));}return e.clone({children:t});}}return e;});}(e,e=>"cdata"===e.type,e=>"<![CDATA[".concat(e.value,"]]>"));},function(e,t){if("html"===t.parser)return e;const n=/{{([\S\s]+?)}}/g;return e.map(e=>{if(!FI(e))return e;const t=[];for(const r of e.children){if("text"!==r.type){t.push(r);continue;}let e=r.sourceSpan.start,o=null;const i=r.value.split(n);for(let n=0;n<i.length;n++,e=o){const r=i[n];n%2!=0?(o=e.moveBy(r.length+4),t.push({type:"interpolation",sourceSpan:new bI(e,o),children:0===r.length?[]:[{type:"text",value:r,sourceSpan:new bI(e.moveBy(2),o.moveBy(-2))}]})):(o=e.moveBy(r.length),r.length>0&&t.push({type:"text",value:r,sourceSpan:new bI(e,o)}));}}return e.clone({children:t});});},function(e){const t="whitespace";return e.map(e=>{if(!e.children)return e;if(0===e.children.length||1===e.children.length&&"text"===e.children[0].type&&0===CI(e.children[0].value).length)return e.clone({children:[],hasDanglingSpaces:e.children.length>0});const n=kI(e),r=wI(e);return e.clone({isWhitespaceSensitive:n,isIndentationSensitive:r,children:e.children.reduce((e,r)=>{if("text"!==r.type||n)return[...e,r];const o=[],{leadingWhitespace:i,text:u,trailingWhitespace:s}=vI(r.value);return i&&o.push({type:t}),u&&o.push({type:"text",value:u,sourceSpan:new bI(r.sourceSpan.start.moveBy(i.length),r.sourceSpan.end.moveBy(-s.length))}),s&&o.push({type:t}),[...e,...o];},[]).reduce((e,n,r,o)=>{if(n.type===t)return e;const i=0!==r&&o[r-1].type===t,u=r!==o.length-1&&o[r+1].type===t;return[...e,Object.assign({},n,{hasLeadingSpaces:i,hasTrailingSpaces:u})];},[])});});},function(e,t){return e.map(e=>Object.assign(e,{cssDisplay:xI(e,t)}));},function(e){return e.map(e=>Object.assign(e,{isSelfClosing:!e.children||"element"===e.type&&(e.tagDefinition.isVoid||e.startSourceSpan===e.endSourceSpan)}));},function(e,t){return e.map(e=>"element"!==e.type?e:Object.assign(e,{hasHtmComponentClosingTag:e.endSourceSpan&&/^<\s*\/\s*\/\s*>$/.test(t.originalText.slice(e.endSourceSpan.start.offset,e.endSourceSpan.end.offset))}));},function(e,t){return e.map(e=>e.children?0===e.children.length?e.clone({isDanglingSpaceSensitive:SI(e)}):e.clone({children:e.children.map(e=>Object.assign({},e,{isLeadingSpaceSensitive:TI(e,t),isTrailingSpaceSensitive:BI(e,t)})).map((e,t,n)=>Object.assign({},e,{isLeadingSpaceSensitive:(0===t||n[t-1].isTrailingSpaceSensitive)&&e.isLeadingSpaceSensitive,isTrailingSpaceSensitive:(t===n.length-1||n[t+1].isLeadingSpaceSensitive)&&e.isTrailingSpaceSensitive}))}):e);},function(e){const t=e=>"element"===e.type&&0===e.attrs.length&&1===e.children.length&&"text"===e.firstChild.type&&!AI(e.children[0].value)&&!e.firstChild.hasLeadingSpaces&&!e.firstChild.hasTrailingSpaces&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces&&e.prev&&"text"===e.prev.type&&e.next&&"text"===e.next.type;return e.map(e=>{if(e.children){const n=e.children.map(t);if(n.some(Boolean)){const t=[];for(let r=0;r<e.children.length;r++){const o=e.children[r];if(n[r]){const n=t.pop(),i=e.children[++r],{isTrailingSpaceSensitive:u,hasTrailingSpaces:s}=i;t.push(n.clone({value:n.value+"<".concat(o.rawName,">")+o.firstChild.value+"</".concat(o.rawName,">")+i.value,sourceSpan:new bI(n.sourceSpan.start,i.sourceSpan.end),isTrailingSpaceSensitive:u,hasTrailingSpaces:s}));}else t.push(o);}return e.clone({children:t});}}return e;});}];var PI=function(e,t){for(const n of NI)e=n(e,t);return e;};var OI={hasPragma:function(e){return /^\s*<!--\s*@(format|prettier)\s*-->/.test(e);},insertPragma:function(e){return"\x3c!-- @format --\x3e\n\n"+e.replace(/^\s*\n/,"");}};var II={locStart:function(e){return e.sourceSpan.start.offset;},locEnd:function(e){return e.sourceSpan.end.offset;}};const{builders:{group:jI}}=Rn;var LI={isVueEventBindingExpression:function(e){const t=e.trim();return /^([\w$]+|\([^)]*?\))\s*=>|^function\s*\(/.test(t)||/^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/.test(t);},printVueFor:function(e,t){const{left:n,operator:r,right:o}=function(e){const t=/([^]*?)\s+(in|of)\s+([^]*)/,n=/,([^,\]}]*)(?:,([^,\]}]*))?$/,r=/^\(|\)$/g,o=e.match(t);if(!o)return;const i={};i.for=o[3].trim();const u=o[1].trim().replace(r,""),s=u.match(n);s?(i.alias=u.replace(n,""),i.iterator1=s[1].trim(),s[2]&&(i.iterator2=s[2].trim())):i.alias=u;return{left:"".concat([i.alias,i.iterator1,i.iterator2].filter(Boolean).join(",")),operator:o[2],right:i.for};}(e);return[jI(t("function _(".concat(n,") {}"),{parser:"babel",__isVueForBindingLeft:!0}))," ",r," ",t(o,{parser:"__js_expression"},{stripTrailingHardline:!0})];},printVueBindings:function(e,t){return t("function _(".concat(e,") {}"),{parser:"babel",__isVueBindings:!0});}},_I=i(function(e){!function(t,n){e.exports?e.exports=n():t.parseSrcset=n();}(r,function(){return function(e,t){var n=t&&t.logger||console;function r(e){return" "===e||"\t"===e||"\n"===e||"\f"===e||"\r"===e;}function o(t){var n,r=t.exec(e.substring(y));if(r)return n=r[0],y+=n.length,n;}for(var i,u,s,a,c,l=e.length,p=/^[ \t\n\r\u000c]+/,f=/^[, \t\n\r\u000c]+/,d=/^[^ \t\n\r\u000c]+/,h=/[,]+$/,m=/^\d+$/,g=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,y=0,D=[];;){if(o(f),y>=l)return D;i=o(d),u=[],","===i.slice(-1)?(i=i.replace(h,""),b()):E();}function E(){for(o(p),s="",a="in descriptor";;){if(c=e.charAt(y),"in descriptor"===a){if(r(c))s&&(u.push(s),s="",a="after descriptor");else{if(","===c)return y+=1,s&&u.push(s),void b();if("("===c)s+=c,a="in parens";else{if(""===c)return s&&u.push(s),void b();s+=c;}}}else if("in parens"===a){if(")"===c)s+=c,a="in descriptor";else{if(""===c)return u.push(s),void b();s+=c;}}else if("after descriptor"===a)if(r(c));else{if(""===c)return void b();a="in descriptor",y-=1;}y+=1;}}function b(){var t,r,o,s,a,c,l,p,f,d=!1,h={};for(s=0;s<u.length;s++)c=(a=u[s])[a.length-1],l=a.substring(0,a.length-1),p=parseInt(l,10),f=parseFloat(l),m.test(l)&&"w"===c?((t||r)&&(d=!0),0===p?d=!0:t=p):g.test(l)&&"x"===c?((t||r||o)&&(d=!0),f<0?d=!0:r=f):m.test(l)&&"h"===c?((o||r)&&(d=!0),0===p?d=!0:o=p):d=!0;d?n&&n.error&&n.error("Invalid srcset descriptor found in '"+e+"' at '"+a+"'."):(h.url=i,t&&(h.w=t),r&&(h.d=r),o&&(h.h=o),D.push(h));}};});});const{builders:{group:MI,ifBreak:RI,indent:VI,join:$I,line:qI,softline:WI}}=Rn;const UI=["__","--","_","-"];function zI(e){const t=e.search(/[^_-]/);if(-1!==t)for(const n of UI){const r=e.indexOf(n,t);if(-1!==r)return e.slice(0,r);}return e;}var HI={printImgSrcset:function(e){const t=_I(e,{logger:{error(e){throw new Error(e);}}}),n=t.some(({w:e})=>e),r=t.some(({h:e})=>e);if(n+r+t.some(({d:e})=>e)>1)throw new Error("Mixed descriptor in srcset is not supported");const o=n?"w":r?"h":"d",i=n?"w":r?"h":"x",u=e=>Math.max(...e),s=t.map(e=>e.url),a=u(s.map(e=>e.length)),c=t.map(e=>e[o]).map(e=>e?e.toString():""),l=c.map(e=>{const t=e.indexOf(".");return-1===t?e.length:t;}),p=u(l);return $I([",",qI],s.map((e,t)=>{const n=[e],r=c[t];if(r){const o=a-e.length+1,u=p-l[t],s=" ".repeat(o+u);n.push(RI(s," "),r+i);}return n;}));},printClassNames:function(e){const t=e.trim().split(/\s+/),n=[];let r;for(let e=0;e<t.length;e++){const o=zI(t[e]);o!==r&&o!==t[e-1]&&n.push([]),ke(n).push(t[e]),r=o;}return[VI([WI,$I(qI,n.map(e=>MI($I(qI,e))))]),WI];}};const{builders:{breakParent:GI,dedentToRoot:JI,fill:XI,group:YI,hardline:KI,ifBreak:QI,indentIfBreak:ZI,indent:ej,join:tj,line:nj,literalline:rj,softline:oj},utils:{mapDoc:ij,cleanDoc:uj,getDocParts:sj,isConcat:aj}}=Rn,{replaceEndOfLineWith:cj,isNonEmptyArray:lj}=rn,{htmlTrimPreserveIndentation:pj,splitByHtmlWhitespace:fj,countChars:dj,countParents:hj,dedentString:mj,forceBreakChildren:gj,forceBreakContent:yj,forceNextEmptyLine:Dj,getLastDescendant:Ej,getPrettierIgnoreAttributeCommentData:bj,hasPrettierIgnore:Cj,inferScriptParser:vj,isVueCustomBlock:Aj,isVueNonHtmlBlock:Fj,isVueSlotAttribute:xj,isVueSfcBindingsAttribute:Sj,isScriptLikeTag:wj,isTextLikeNode:Tj,preferHardlineAsLeadingSpaces:Bj,shouldNotPrintClosingTag:kj,shouldPreserveContent:Nj,unescapeQuoteEntities:Pj,isPreLikeNode:Oj}=_O,{insertPragma:Ij}=OI,{locStart:jj,locEnd:Lj}=II,{printVueFor:_j,printVueBindings:Mj,isVueEventBindingExpression:Rj}=LI,{printImgSrcset:Vj,printClassNames:$j}=HI;function qj(e,t,n){const r=e.getValue();if(gj(r))return[GI,...e.map(e=>{const t=e.getValue(),n=t.prev?u(t.prev,t):"";return[n?[n,Dj(t.prev)?KI:""]:"",i(e)];},"children")];const o=r.children.map(()=>Symbol(""));return e.map((e,t)=>{const n=e.getValue();if(Tj(n)){if(n.prev&&Tj(n.prev)){const t=u(n.prev,n);if(t)return Dj(n.prev)?[KI,KI,i(e)]:[t,i(e)];}return i(e);}const r=[],s=[],a=[],c=[],l=n.prev?u(n.prev,n):"",p=n.next?u(n,n.next):"";return l&&(Dj(n.prev)?r.push(KI,KI):l===KI?r.push(KI):Tj(n.prev)?s.push(l):s.push(QI("",oj,{groupId:o[t-1]}))),p&&(Dj(n)?Tj(n.next)&&c.push(KI,KI):p===KI?Tj(n.next)&&c.push(KI):a.push(p)),[...r,YI([...s,YI([i(e),...a],{id:o[t]})]),...c];},"children");function i(e){const r=e.getValue();return Cj(r)?[nL(r,t),...cj(t.originalText.slice(jj(r)+(r.prev&&Kj(r.prev)?iL(r).length:0),Lj(r)-(r.next&&Zj(r.next)?aL(r,t).length:0)),rj),oL(r,t)]:n();}function u(e,t){return Tj(e)&&Tj(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?Bj(t)?KI:nj:"":Bj(t)?KI:oj:Kj(e)&&(Cj(t)||t.firstChild||t.isSelfClosing||"element"===t.type&&t.attrs.length>0)||"element"===e.type&&e.isSelfClosing&&Zj(t)?"":!t.isLeadingSpaceSensitive||Bj(t)||Zj(t)&&e.lastChild&&tL(e.lastChild)&&e.lastChild.lastChild&&tL(e.lastChild.lastChild)?KI:t.hasLeadingSpaces?nj:oj;}}function Wj(e,t){let n=e.startSourceSpan.end.offset;e.firstChild&&Qj(e.firstChild)&&(n-=uL(e).length);let r=e.endSourceSpan.start.offset;return e.lastChild&&tL(e.lastChild)?r+=sL(e,t).length:eL(e)&&(r-=aL(e.lastChild,t).length),t.originalText.slice(n,r);}function Uj(e,t,n){const r=e.getValue();if(!lj(r.attrs))return r.isSelfClosing?" ":"";const o=r.prev&&"comment"===r.prev.type&&bj(r.prev.value),i="boolean"==typeof o?()=>o:Array.isArray(o)?e=>o.includes(e.rawName):()=>!1,u=e.map(e=>{const r=e.getValue();return i(r)?cj(t.originalText.slice(jj(r),Lj(r)),rj):n();},"attrs"),s="element"===r.type&&"script"===r.fullName&&1===r.attrs.length&&"src"===r.attrs[0].fullName&&0===r.children.length,a=[ej([s?" ":nj,tj(nj,u)])];return r.firstChild&&Qj(r.firstChild)||r.isSelfClosing&&eL(r.parent)||s?a.push(r.isSelfClosing?" ":""):a.push(r.isSelfClosing?nj:oj),a;}function zj(e,t,n){const r=e.getValue();return[Hj(r,t),Uj(e,t,n),r.isSelfClosing?"":Gj(r)];}function Hj(e,t){return e.prev&&Kj(e.prev)?"":[nL(e,t),iL(e)];}function Gj(e){return e.firstChild&&Qj(e.firstChild)?"":uL(e);}function Jj(e,t){return[e.isSelfClosing?"":Xj(e,t),Yj(e,t)];}function Xj(e,t){return e.lastChild&&tL(e.lastChild)?"":[rL(e,t),sL(e,t)];}function Yj(e,t){return(e.next?Zj(e.next):eL(e.parent))?"":[aL(e,t),oL(e,t)];}function Kj(e){return e.next&&!Tj(e.next)&&Tj(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces;}function Qj(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces;}function Zj(e){return e.prev&&"docType"!==e.prev.type&&!Tj(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces;}function eL(e){return e.lastChild&&e.lastChild.isTrailingSpaceSensitive&&!e.lastChild.hasTrailingSpaces&&!Tj(Ej(e.lastChild))&&!Oj(e);}function tL(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&Tj(Ej(e));}function nL(e,t){return Qj(e)?uL(e.parent):Zj(e)?aL(e.prev,t):"";}function rL(e,t){return eL(e)?aL(e.lastChild,t):"";}function oL(e,t){return tL(e)?sL(e.parent,t):Kj(e)?iL(e.next):"";}function iL(e){switch(e.type){case"ieConditionalComment":case"ieConditionalStartComment":return"\x3c!--[if ".concat(e.condition);case"ieConditionalEndComment":return"\x3c!--<!";case"interpolation":return"{{";case"docType":return"<!DOCTYPE";case"element":if(e.condition)return"\x3c!--[if ".concat(e.condition,"]>\x3c!--\x3e<").concat(e.rawName);default:return"<".concat(e.rawName);}}function uL(e){switch(Il(!e.isSelfClosing),e.type){case"ieConditionalComment":return"]>";case"element":if(e.condition)return">\x3c!--<![endif]--\x3e";default:return">";}}function sL(e,t){if(Il(!e.isSelfClosing),kj(e,t))return"";switch(e.type){case"ieConditionalComment":return"<!";case"element":if(e.hasHtmComponentClosingTag)return"<//";default:return"</".concat(e.rawName);}}function aL(e,t){if(kj(e,t))return"";switch(e.type){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]--\x3e";case"ieConditionalStartComment":return"]>\x3c!--\x3e";case"interpolation":return"}}";case"element":if(e.isSelfClosing)return"/>";default:return">";}}function cL(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?cj(t,rj):cj(mj(pj(t)),KI):sj(tj(nj,fj(t)));}var lL={preprocess:PI,print:function(e,t,n){const r=e.getValue();switch(r.type){case"front-matter":return cj(r.raw,rj);case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(r),[YI(qj(e,t,n)),KI];case"element":case"ieConditionalComment":{if(Nj(r,t))return[nL(r,t),YI(zj(e,t,n)),...cj(Wj(r,t),rj),...Jj(r,t),oL(r,t)];const i=1===r.children.length&&"interpolation"===r.firstChild.type&&r.firstChild.isLeadingSpaceSensitive&&!r.firstChild.hasLeadingSpaces&&r.lastChild.isTrailingSpaceSensitive&&!r.lastChild.hasTrailingSpaces,u=Symbol("element-attr-group-id");return[YI([YI(zj(e,t,n),{id:u}),0===r.children.length?r.hasDanglingSpaces&&r.isDanglingSpaceSensitive?nj:"":[yj(r)?GI:"",(o=[i?QI(oj,"",{groupId:u}):r.firstChild.hasLeadingSpaces&&r.firstChild.isLeadingSpaceSensitive?nj:"text"===r.firstChild.type&&r.isWhitespaceSensitive&&r.isIndentationSensitive?JI(oj):oj,qj(e,t,n)],i?ZI(o,{groupId:u}):!wj(r)&&!Aj(r,t)||"root"!==r.parent.type||"vue"!==t.parser||t.vueIndentScriptAndStyle?ej(o):o),(r.next?Zj(r.next):eL(r.parent))?r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?" ":"":i?QI(oj,"",{groupId:u}):r.lastChild.hasTrailingSpaces&&r.lastChild.isTrailingSpaceSensitive?nj:("comment"===r.lastChild.type||"text"===r.lastChild.type&&r.isWhitespaceSensitive&&r.isIndentationSensitive)&&new RegExp("\\n[\\t ]{".concat(t.tabWidth*hj(e,e=>e.parent&&"root"!==e.parent.type),"}$")).test(r.lastChild.value)?"":oj]]),Jj(r,t)];}case"ieConditionalStartComment":case"ieConditionalEndComment":return[Hj(r),Yj(r)];case"interpolation":return[Hj(r,t),...e.map(n,"children"),Yj(r,t)];case"text":{if("interpolation"===r.parent.type){const e=/\n[^\S\n]*?$/,t=e.test(r.value),n=t?r.value.replace(e,""):r.value;return[...cj(n,rj),t?KI:""];}const e=uj([nL(r,t),...cL(r),oL(r,t)]);return aj(e)||"fill"===e.type?XI(sj(e)):e;}case"docType":return[YI([Hj(r,t)," ",r.value.replace(/^html\b/i,"html").replace(/\s+/g," ")]),Yj(r,t)];case"comment":return[nL(r,t),...cj(t.originalText.slice(jj(r),Lj(r)),rj),oL(r,t)];case"attribute":{if(null===r.value)return r.rawName;const e=Pj(r.value),t=dj(e,"'")<dj(e,'"')?"'":'"';return[r.rawName,"=",t,...cj('"'===t?e.replace(/"/g,"&quot;"):e.replace(/'/g,"&apos;"),rj),t];}default:throw new Error("Unexpected node type ".concat(r.type));}var o;},insertPragma:Ij,massageAstNode:oO,embed:function(e,t,n,r){const o=e.getValue();switch(o.type){case"element":if(wj(o)||"interpolation"===o.type)return;if(!o.isSelfClosing&&Fj(o,r)){const i=vj(o,r);if(!i)return;const u=Wj(o,r);let s=/^\s*$/.test(u),a="";return s||(a=n(pj(u),{parser:i,__embeddedInHtml:!0},{stripTrailingHardline:!0}),s=""===a),[nL(o,r),YI(zj(e,r,t)),s?"":KI,a,s?"":KI,Jj(o,r),oL(o,r)];}break;case"text":if(wj(o.parent)){const e=vj(o.parent);if(e){const t="markdown"===e?mj(o.value.replace(/^[^\S\n]*?\n/,"")):o.value,i={parser:e,__embeddedInHtml:!0};if("html"===r.parser&&"babel"===e){let e="script";const{attrMap:t}=o.parent;t&&("module"===t.type||"text/babel"===t.type&&"module"===t["data-type"])&&(e="module"),i.__babelSourceType=e;}return[GI,nL(o,r),n(t,i,{stripTrailingHardline:!0}),oL(o,r)];}}else if("interpolation"===o.parent.type){const e={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return"angular"===r.parser?(e.parser="__ng_interpolation",e.trailingComma="none"):"vue"===r.parser?e.parser="__vue_expression":e.parser="__js_expression",[ej([nj,n(o.value,e,{stripTrailingHardline:!0})]),o.parent.next&&Zj(o.parent.next)?" ":nj];}break;case"attribute":{if(!o.value)break;if(/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/.test(r.originalText.slice(o.valueSpan.start.offset,o.valueSpan.end.offset)))return[o.rawName,"=",o.value];if("lwc"===r.parser){if(/^{[\S\s]*}$/.test(r.originalText.slice(o.valueSpan.start.offset,o.valueSpan.end.offset)))return[o.rawName,"=",o.value];}const e=function(e,t,n){const r=t=>new RegExp(t.join("|")).test(e.fullName),o=()=>Pj(e.value);let i=!1;const u=(e,t)=>{const n="NGRoot"===e.type?"NGMicrosyntax"===e.node.type&&1===e.node.body.length&&"NGMicrosyntaxExpression"===e.node.body[0].type?e.node.body[0].expression:e.node:"JsExpressionRoot"===e.type?e.node:e;!n||"ObjectExpression"!==n.type&&"ArrayExpression"!==n.type&&("__vue_expression"!==t.parser||"TemplateLiteral"!==n.type&&"StringLiteral"!==n.type)||(i=!0);},s=e=>YI(e),a=(e,t=!0)=>YI([ej([oj,e]),t?oj:""]),c=e=>i?s(e):a(e),l=(e,n)=>t(e,Object.assign({__onHtmlBindingRoot:u,__embeddedInHtml:!0},n),{stripTrailingHardline:!0});if("srcset"===e.fullName&&("img"===e.parent.fullName||"source"===e.parent.fullName))return a(Vj(o()));if("class"===e.fullName&&!n.parentParser){const e=o();if(!e.includes("{{"))return $j(e);}if("style"===e.fullName&&!n.parentParser){const e=o();if(!e.includes("{{"))return a(l(e,{parser:"css",__isHTMLStyleAttribute:!0}));}if("vue"===n.parser){if("v-for"===e.fullName)return _j(o(),l);if(xj(e)||Sj(e,n))return Mj(o(),l);const t=["^:","^v-bind:"],i=["^v-"];if(r(["^@","^v-on:"])){const e=o();return c(l(e,{parser:Rj(e)?"__js_expression":"__vue_event_binding"}));}if(r(t))return c(l(o(),{parser:"__vue_expression"}));if(r(i))return c(l(o(),{parser:"__js_expression"}));}if("angular"===n.parser){const t=(e,t)=>l(e,Object.assign({},t,{trailingComma:"none"})),n=["^\\*"],i=["^\\[.+\\]$","^bind(on)?-","^ng-(if|show|hide|class|style)$"],u=["^i18n(-.+)?$"];if(r(["^\\(.+\\)$","^on-"]))return c(t(o(),{parser:"__ng_action"}));if(r(i))return c(t(o(),{parser:"__ng_binding"}));if(r(u)){const t=o().trim();return a(XI(cL(e,t)),!t.includes("@@"));}if(r(n))return c(t(o(),{parser:"__ng_directive"}));const s=/{{([\S\s]+?)}}/g,p=o();if(s.test(p)){const e=[];for(const[n,r]of p.split(s).entries())if(n%2==0)e.push(cj(r,rj));else try{e.push(YI(["{{",ej([nj,t(r,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),nj,"}}"]));}catch(t){e.push("{{",cj(r,rj),"}}");}return YI(e);}}return null;}(o,(e,t)=>n(e,Object.assign({__isInHtmlAttribute:!0,__embeddedInHtml:!0},t),{stripTrailingHardline:!0}),r);if(e)return[o.rawName,'="',YI(ij(e,e=>"string"==typeof e?e.replace(/"/g,"&quot;"):e)),'"'];break;}case"front-matter":return Xw(o,n);}}};const pL="HTML";var fL={htmlWhitespaceSensitivity:{since:"1.15.0",category:pL,type:"choice",default:"css",description:"How to handle whitespaces in HTML.",choices:[{value:"css",description:"Respect the default value of CSS display property."},{value:"strict",description:"Whitespaces are considered sensitive."},{value:"ignore",description:"Whitespaces are considered insensitive."}]},vueIndentScriptAndStyle:{since:"1.19.0",category:pL,type:"boolean",default:!1,description:"Indent script and style tags in Vue files."}},dL={name:"HTML",type:"markup",tmScope:"text.html.basic",aceMode:"html",codemirrorMode:"htmlmixed",codemirrorMimeType:"text/html",color:"#e34c26",aliases:["xhtml"],extensions:[".html",".htm",".html.hl",".inc",".xht",".xhtml"],languageId:146},hL={name:"Vue",type:"markup",color:"#2c3e50",extensions:[".vue"],tmScope:"text.html.vue",aceMode:"html",languageId:391};var mL={languages:[df(dL,()=>({name:"Angular",since:"1.15.0",parsers:["angular"],vscodeLanguageIds:["html"],extensions:[".component.html"],filenames:[]})),df(dL,e=>({since:"1.15.0",parsers:["html"],vscodeLanguageIds:["html"],extensions:[...e.extensions,".mjml"]})),df(dL,()=>({name:"Lightning Web Components",since:"1.17.0",parsers:["lwc"],vscodeLanguageIds:["html"],extensions:[],filenames:[]})),df(hL,()=>({since:"1.10.0",parsers:["vue"],vscodeLanguageIds:["vue"]}))],printers:{html:lL},options:fL,parsers:{get html(){return{}.parsers.html;},get vue(){return{}.parsers.vue;},get angular(){return{}.parsers.angular;},get lwc(){return{}.parsers.lwc;}}};var gL={isPragma:function(e){return /^\s*@(prettier|format)\s*$/.test(e);},hasPragma:function(e){return /^\s*#[^\S\n]*@(prettier|format)\s*?(\n|$)/.test(e);},insertPragma:function(e){return"# @format\n\n".concat(e);}};var yL={locStart:function(e){return e.position.start.offset;},locEnd:function(e){return e.position.end.offset;}};var DL=function(e,t,n,r){if("root"===e.getValue().type&&r.filepath&&/(?:[/\\]|^)\.prettierrc$/.test(r.filepath))return n(r.originalText,Object.assign({},r,{parser:"json"}));};const{getLast:EL,isNonEmptyArray:bL}=rn;function CL(e,t){return e&&"string"==typeof e.type&&(!t||t.includes(e.type));}function vL(e){return"prettier-ignore"===e.value.trim();}function AL(e){return e&&bL(e.leadingComments);}function FL(e){return e&&bL(e.middleComments);}function xL(e){return e&&e.indicatorComment;}function SL(e){return e&&e.trailingComment;}function wL(e){return e&&bL(e.endComments);}function TL(e){const t=[];let n;for(const r of e.split(/( +)/g))" "!==r?" "===n?t.push(r):t.push((t.pop()||"")+r):void 0===n&&t.unshift(""),n=r;return" "===n&&t.push((t.pop()||"")+" "),""===t[0]&&(t.shift(),t.unshift(" "+(t.shift()||""))),t;}var BL={getLast:EL,getAncestorCount:function(e,t){let n=0;const r=e.stack.length-1;for(let o=0;o<r;o++){const r=e.stack[o];CL(r)&&t(r)&&n++;}return n;},isNode:CL,isEmptyNode:function(e){return!bL(e.children)&&!function(e){return AL(e)||FL(e)||xL(e)||SL(e)||wL(e);}(e);},isInlineNode:function(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":case"alias":case"flowMapping":case"flowSequence":return!0;default:return!1;}},mapNode:function e(t,n,r){return n("children"in t?Object.assign({},t,{children:t.children.map(r=>e(r,n,t))}):t,r);},defineShortcut:function(e,t,n){Object.defineProperty(e,t,{get:n,enumerable:!1});},isNextLineEmpty:function(e,t){let n=0;const r=t.length;for(let o=e.position.end.offset-1;o<r;o++){const e=t[o];if("\n"===e&&n++,1===n&&/\S/.test(e))return!1;if(2===n)return!0;}return!1;},isLastDescendantNode:function(e){switch(e.getValue().type){case"tag":case"anchor":case"comment":return!1;}const t=e.stack.length;for(let n=1;n<t;n++){const t=e.stack[n],r=e.stack[n-1];if(Array.isArray(r)&&"number"==typeof t&&t!==r.length-1)return!1;}return!0;},getBlockValueLineContents:function(e,{parentIndent:t,isLastDescendant:n,options:r}){const o=e.position.start.line===e.position.end.line?"":r.originalText.slice(e.position.start.offset,e.position.end.offset).match(/^[^\n]*?\n([\S\s]*)$/)[1],i=null===e.indent?(u=o.match(/^( *)\S/m))?u[1].length:Number.POSITIVE_INFINITY:e.indent-1+t;var u;const s=o.split("\n").map(e=>e.slice(i));return"preserve"===r.proseWrap||"blockLiteral"===e.type?a(s.map(e=>0===e.length?[]:[e])):a(s.map(e=>0===e.length?[]:TL(e)).reduce((e,t,n)=>0!==n&&s[n-1].length>0&&t.length>0&&!/^\s/.test(t[0])&&!/^\s|\s$/.test(EL(e))?[...e.slice(0,-1),[...EL(e),...t]]:[...e,t],[]).map(e=>e.reduce((e,t)=>e.length>0&&/\s$/.test(EL(e))?[...e.slice(0,-1),EL(e)+" "+t]:[...e,t],[])).map(e=>"never"===r.proseWrap?[e.join(" ")]:e));function a(t){if("keep"===e.chomping)return 0===EL(t).length?t.slice(0,-1):t;let r=0;for(let e=t.length-1;e>=0&&0===t[e].length;e--)r++;return 0===r?t:r>=2&&!n?t.slice(0,-(r-1)):t.slice(0,-r);}},getFlowScalarLineContents:function(e,t,n){const r=t.split("\n").map((e,t,n)=>0===t&&t===n.length-1?e:0!==t&&t!==n.length-1?e.trim():0===t?e.trimEnd():e.trimStart());return"preserve"===n.proseWrap?r.map(e=>0===e.length?[]:[e]):r.map(e=>0===e.length?[]:TL(e)).reduce((t,n,o)=>0!==o&&r[o-1].length>0&&n.length>0&&("quoteDouble"!==e||!EL(EL(t)).endsWith("\\"))?[...t.slice(0,-1),[...EL(t),...n]]:[...t,n],[]).map(e=>"never"===n.proseWrap?[e.join(" ")]:e);},getLastDescendantNode:function e(t){return bL(t.children)?e(EL(t.children)):t;},hasPrettierIgnore:function(e){const t=e.getValue();if("documentBody"===t.type){const t=e.getParentNode();return wL(t.head)&&vL(EL(t.head.endComments));}return AL(t)&&vL(EL(t.leadingComments));},hasLeadingComments:AL,hasMiddleComments:FL,hasIndicatorComment:xL,hasTrailingComment:SL,hasEndComments:wL};const{defineShortcut:kL,mapNode:NL}=BL;function PL(e){switch(e.type){case"document":kL(e,"head",()=>e.children[0]),kL(e,"body",()=>e.children[1]);break;case"documentBody":case"sequenceItem":case"flowSequenceItem":case"mappingKey":case"mappingValue":kL(e,"content",()=>e.children[0]);break;case"mappingItem":case"flowMappingItem":kL(e,"key",()=>e.children[0]),kL(e,"value",()=>e.children[1]);}return e;}var OL=function(e){return NL(e,PL);};const{builders:{softline:IL,align:jL}}=Rn,{hasEndComments:LL,isNextLineEmpty:_L,isNode:ML}=BL,RL=new WeakMap();function VL(e){return LL(e)&&!ML(e,["documentHead","documentBody","flowMapping","flowSequence"]);}var $L={alignWithSpaces:function(e,t){return jL(" ".repeat(e),t);},shouldPrintEndComments:VL,printNextEmptyLine:function(e,t){const n=e.getValue(),r=e.stack[0];let o;return RL.has(r)?o=RL.get(r):(o=new Set(),RL.set(r,o)),o.has(n.position.end.line)||(o.add(n.position.end.line),!_L(n,t)||VL(e.getParentNode()))?"":IL;}};const{builders:{ifBreak:qL,line:WL,softline:UL,hardline:zL,join:HL}}=Rn,{isEmptyNode:GL,getLast:JL,hasEndComments:XL}=BL,{printNextEmptyLine:YL,alignWithSpaces:KL}=$L;function QL(e,t,n){const r=e.getValue(),o="flowMapping"===r.type,i=o?"{":"[",u=o?"}":"]";let s=UL;o&&r.children.length>0&&n.bracketSpacing&&(s=WL);const a=JL(r.children),c=a&&"flowMappingItem"===a.type&&GL(a.key)&&GL(a.value);return[i,KL(n.tabWidth,[s,ZL(e,t,n),"none"===n.trailingComma?"":qL(","),XL(r)?[zL,HL(zL,e.map(t,"endComments"))]:""]),c?"":s,u];}function ZL(e,t,n){const r=e.getValue();return e.map((e,o)=>[t(),o===r.children.length-1?"":[",",WL,r.children[o].position.start.line!==r.children[o+1].position.start.line?YL(e,n.originalText):""]],"children");}var e_={printFlowMapping:QL,printFlowSequence:QL};const{builders:{conditionalGroup:t_,group:n_,hardline:r_,ifBreak:o_,join:i_,line:u_}}=Rn,{hasLeadingComments:s_,hasMiddleComments:a_,hasTrailingComment:c_,hasEndComments:l_,isNode:p_,isEmptyNode:f_,isInlineNode:d_}=BL,{alignWithSpaces:h_}=$L;function m_(e,t){if(!e)return!0;switch(e.type){case"plain":case"quoteSingle":case"quoteDouble":break;case"alias":return!0;default:return!1;}if("preserve"===t.proseWrap)return e.position.start.line===e.position.end.line;if(/\\$/m.test(t.originalText.slice(e.position.start.offset,e.position.end.offset)))return!1;switch(t.proseWrap){case"never":return!e.value.includes("\n");case"always":return!/[\n ]/.test(e.value);default:return!1;}}var g_=function(e,t,n,r,o){const{key:i,value:u}=e,s=f_(i),a=f_(u);if(s&&a)return": ";const c=r("key"),l=function(e){return e.key.content&&"alias"===e.key.content.type;}(e)?" ":"";if(a)return"flowMappingItem"===e.type&&"flowMapping"===t.type?c:"mappingItem"!==e.type||!m_(i.content,o)||c_(i.content)||t.tag&&"tag:yaml.org,2002:set"===t.tag.value?["? ",h_(2,c)]:[c,l,":"];const p=r("value");if(s)return[": ",h_(2,p)];if(s_(u)||!d_(i.content))return["? ",h_(2,c),r_,i_("",n.map(r,"value","leadingComments").map(e=>[e,r_])),": ",h_(2,p)];if(function(e){if(!e)return!0;switch(e.type){case"plain":case"quoteDouble":case"quoteSingle":return e.position.start.line===e.position.end.line;case"alias":return!0;default:return!1;}}(i.content)&&!s_(i.content)&&!a_(i.content)&&!c_(i.content)&&!l_(i)&&!s_(u.content)&&!a_(u.content)&&!l_(u)&&m_(u.content,o))return[c,l,": ",p];const f=Symbol("mappingKey"),d=n_([o_("? "),n_(h_(2,c),{id:f})]),h=[r_,": ",h_(2,p)],m=[l,":"];s_(u.content)||l_(u)&&u.content&&!p_(u.content,["mapping","sequence"])||"mapping"===t.type&&c_(i.content)&&d_(u.content)||p_(u.content,["mapping","sequence"])&&null===u.content.tag&&null===u.content.anchor?m.push(r_):u.content&&m.push(u_),m.push(p);const g=h_(o.tabWidth,m);return t_([[d,o_(h,g,{groupId:f})]]);};const{builders:{dedent:y_,dedentToRoot:D_,fill:E_,hardline:b_,join:C_,line:v_,literalline:A_,markAsRoot:F_},utils:{getDocParts:x_}}=Rn,{getAncestorCount:S_,getBlockValueLineContents:w_,hasIndicatorComment:T_,isLastDescendantNode:B_,isNode:k_}=BL,{alignWithSpaces:N_}=$L;var P_=function(e,t,n){const r=e.getValue(),o=S_(e,e=>k_(e,["sequence","mapping"])),i=B_(e),u=["blockFolded"===r.type?">":"|"];null!==r.indent&&u.push(r.indent.toString()),"clip"!==r.chomping&&u.push("keep"===r.chomping?"+":"-"),T_(r)&&u.push(" ",t("indicatorComment"));const s=w_(r,{parentIndent:o,isLastDescendant:i,options:n}),a=[];for(const[e,t]of s.entries())0===e&&a.push(b_),a.push(E_(x_(C_(v_,t)))),e!==s.length-1?a.push(0===t.length?b_:F_(A_)):"keep"===r.chomping&&i&&a.push(D_(0===t.length?b_:A_));return null===r.indent?u.push(y_(N_(n.tabWidth,a))):u.push(D_(N_(r.indent-1+o,a))),u;};const{builders:{breakParent:O_,fill:I_,group:j_,hardline:L_,join:__,line:M_,lineSuffix:R_,literalline:V_},utils:{getDocParts:$_}}=Rn,{replaceEndOfLineWith:q_,isPreviousLineEmpty:W_}=rn,{insertPragma:U_,isPragma:z_}=gL,{locStart:H_}=yL,{getFlowScalarLineContents:G_,getLastDescendantNode:J_,hasLeadingComments:X_,hasMiddleComments:Y_,hasTrailingComment:K_,hasEndComments:Q_,hasPrettierIgnore:Z_,isLastDescendantNode:eM,isNode:tM,isInlineNode:nM}=BL,{alignWithSpaces:rM,printNextEmptyLine:oM,shouldPrintEndComments:iM}=$L,{printFlowMapping:uM,printFlowSequence:sM}=e_;function aM(e,t){return K_(e)||t&&(t.head.children.length>0||Q_(t.head));}function cM(e,t,n){const r=G_(e,t,n);return __(L_,r.map(e=>I_($_(__(M_,e)))));}var lM={preprocess:OL,embed:DL,print:function(e,t,n){const r=e.getValue(),o=[];"mappingValue"!==r.type&&X_(r)&&o.push([__(L_,e.map(n,"leadingComments")),L_]);const{tag:i,anchor:u}=r;i&&o.push(n("tag")),i&&u&&o.push(" "),u&&o.push(n("anchor"));let s="";tM(r,["mapping","sequence","comment","directive","mappingItem","sequenceItem"])&&!eM(e)&&(s=oM(e,t.originalText)),(i||u)&&(tM(r,["sequence","mapping"])&&!Y_(r)?o.push(L_):o.push(" ")),Y_(r)&&o.push([1===r.middleComments.length?"":L_,__(L_,e.map(n,"middleComments")),L_]);const a=e.getParentNode();return Z_(e)?o.push(q_(t.originalText.slice(r.position.start.offset,r.position.end.offset).trimEnd(),V_)):o.push(j_(function(e,t,n,r,o){switch(e.type){case"root":{const{children:t}=e,r=[];n.each((e,n)=>{const i=t[n],u=t[n+1];0!==n&&r.push(L_),r.push(o()),aM(i,u)?(r.push(L_,"..."),K_(i)&&r.push(" ",o("trailingComment"))):u&&!K_(u.head)&&r.push(L_,"---");},"children");const i=J_(e);return tM(i,["blockLiteral","blockFolded"])&&"keep"===i.chomping||r.push(L_),r;}case"document":{const i=[];return"head"===function(e,t,n,r){if(n.children[0]===e&&/---(\s|$)/.test(r.originalText.slice(H_(e),H_(e)+4))||e.head.children.length>0||Q_(e.head)||K_(e.head))return"head";if(aM(e,t))return!1;return!!t&&"root";}(e,t.children[n.getName()+1],t,r)&&((e.head.children.length>0||e.head.endComments.length>0)&&i.push(o("head")),K_(e.head)?i.push(["---"," ",o(["head","trailingComment"])]):i.push("---")),function(e){return e.body.children.length>0||Q_(e.body);}(e)&&i.push(o("body")),__(L_,i);}case"documentHead":return __(L_,[...n.map(o,"children"),...n.map(o,"endComments")]);case"documentBody":{const{children:t,endComments:r}=e;let i="";if(t.length>0&&r.length>0){const t=J_(e);tM(t,["blockFolded","blockLiteral"])?"keep"!==t.chomping&&(i=[L_,L_]):i=L_;}return[__(L_,n.map(o,"children")),i,__(L_,n.map(o,"endComments"))];}case"directive":return["%",__(" ",[e.name,...e.parameters])];case"comment":return["#",e.value];case"alias":return["*",e.value];case"tag":return r.originalText.slice(e.position.start.offset,e.position.end.offset);case"anchor":return["&",e.value];case"plain":return cM(e.type,r.originalText.slice(e.position.start.offset,e.position.end.offset),r);case"quoteDouble":case"quoteSingle":{const t="'",n='"',o=r.originalText.slice(e.position.start.offset+1,e.position.end.offset-1);if("quoteSingle"===e.type&&o.includes("\\")||"quoteDouble"===e.type&&/\\[^"]/.test(o)){const i="quoteDouble"===e.type?n:t;return[i,cM(e.type,o,r),i];}if(o.includes(n))return[t,cM(e.type,"quoteDouble"===e.type?o.replace(/\\"/g,n).replace(/'/g,t.repeat(2)):o,r),t];if(o.includes(t))return[n,cM(e.type,"quoteSingle"===e.type?o.replace(/''/g,t):o,r),n];const i=r.singleQuote?t:n;return[i,cM(e.type,o,r),i];}case"blockFolded":case"blockLiteral":return P_(n,o,r);case"mapping":case"sequence":return __(L_,n.map(o,"children"));case"sequenceItem":return["- ",rM(2,e.content?o("content"):"")];case"mappingKey":case"mappingValue":return e.content?o("content"):"";case"mappingItem":case"flowMappingItem":return g_(e,t,n,o,r);case"flowMapping":return uM(n,o,r);case"flowSequence":return sM(n,o,r);case"flowSequenceItem":return o("content");default:throw new Error("Unexpected node type ".concat(e.type));}}(r,a,e,t,n))),K_(r)&&!tM(r,["document","documentHead"])&&o.push(R_(["mappingValue"!==r.type||r.content?" ":"","mappingKey"===a.type&&"mapping"===e.getParentNode(2).type&&nM(r)?"":O_,n("trailingComment")])),iM(r)&&o.push(rM("sequenceItem"===r.type?2:0,[L_,__(L_,e.map(e=>[W_(t.originalText,e.getValue(),H_)?L_:"",n()],"endComments"))])),o.push(s),o;},massageAstNode:function(e,t){if(tM(t))switch(delete t.position,t.type){case"comment":if(z_(t.value))return null;break;case"quoteDouble":case"quoteSingle":t.type="quote";}},insertPragma:U_},pM={bracketSpacing:Ow.bracketSpacing,singleQuote:Ow.singleQuote,proseWrap:Ow.proseWrap};var fM=[qw,GB,rN,FN,eO,mL,{languages:[df({name:"YAML",type:"data",color:"#cb171e",tmScope:"source.yaml",aliases:["yml"],extensions:[".yml",".mir",".reek",".rviz",".sublime-syntax",".syntax",".yaml",".yaml-tmlanguage",".yaml.sed",".yml.mysql"],filenames:[".clang-format",".clang-tidy",".gemrc","glide.lock","yarn.lock"],aceMode:"yaml",codemirrorMode:"yaml",codemirrorMimeType:"text/x-yaml",languageId:407},e=>({since:"1.14.0",parsers:["yaml"],vscodeLanguageIds:["yaml","ansible","home-assistant"],filenames:[...e.filenames.filter(e=>"yarn.lock"!==e),".prettierrc"]}))],printers:{yaml:lM},options:pM,parsers:{get yaml(){return{}.parsers.yaml;}}}];const{version:dM}=n,{getSupportInfo:hM}=Mt,mM=fM.map(t=>e(t,["parsers"]));function gM(e,t=1){return(...n)=>{const r=n[t]||{},o=r.plugins||[];return n[t]=Object.assign({},r,{plugins:[...mM,...(Array.isArray(o)?o:Object.values(o))]}),e(...n);};}const yM=gM($p.formatWithCursor);return{formatWithCursor:yM,format:(e,t)=>yM(e,t).formatted,check(e,t){const{formatted:n}=yM(e,t);return n===e;},doc:Rn,getSupportInfo:gM(hM,0),version:dM,util:ff,__debug:{parse:gM($p.parse),formatAST:gM($p.formatAST),formatDoc:gM($p.formatDoc),printToDoc:gM($p.printToDoc),printDocToString:gM($p.printDocToString)}};});})(standalone);const prettier=/*@__PURE__*/getDefaultExportFromCjs(standalone.exports);const formatter=memoize(2)((type,source)=>{if(type===false){return source;}if(type==='dedent'||type===true){return dedent(source);}return prettier.format(source,{parser:type,plugins:[prettierHtml],htmlWhitespaceSensitivity:'ignore'}).trim();});export{formatter};
@@ -1,4 +1,4 @@
1
- import React__default,{lazy,Suspense,Children,memo,useRef,useState,useEffect,Component,forwardRef,useLayoutEffect,useCallback,createElement,Fragment,createContext,cloneElement,useMemo}from'react';import{styled,themes,ThemeProvider,convert,isPropValid,keyframes,useTheme}from'@storybook/theming';import{sanitize,includeConditionalArg}from'@storybook/csf';import qs from'qs';import{logger,once}from'@storybook/client-logger';/*! *****************************************************************************
1
+ import React__default,{lazy,Suspense,Children,memo,useRef,useState,useEffect,Component,forwardRef,useLayoutEffect,useCallback,createElement,Fragment,createContext,cloneElement,useMemo}from'react';import{styled,themes,ThemeProvider,convert,isPropValid,keyframes,useTheme}from'@storybook/theming';import memoize$2 from'memoizerific';import{sanitize,includeConditionalArg}from'@storybook/csf';import qs from'qs';import{logger,once}from'@storybook/client-logger';/*! *****************************************************************************
2
2
  Copyright (c) Microsoft Corporation.
3
3
 
4
4
  Permission to use, copy, modify, and/or distribute this software for any
@@ -294,7 +294,7 @@ var curriedOpacify=/*#__PURE__*/curry/* ::<number | string, string, string> */(o
294
294
  * background: "rgba(255,0,0,0.3)";
295
295
  * }
296
296
  */function transparentize(amount,color){if(color==='transparent')return color;var parsedColor=parseToRgb(color);var alpha=typeof parsedColor.alpha==='number'?parsedColor.alpha:1;var colorWithAlpha=_extends$1({},parsedColor,{alpha:guard(0,1,+(alpha*100-parseFloat(amount)*100).toFixed(2)/100)});return rgba(colorWithAlpha);}// prettier-ignore
297
- var curriedTransparentize=/*#__PURE__*/curry/* ::<number | string, string, string> */(transparentize);var curriedTransparentize$1=curriedTransparentize;const headerCommon=({theme})=>({margin:'20px 0 8px',padding:0,cursor:'text',position:'relative',color:theme.color.defaultText,'&:first-of-type':{marginTop:0,paddingTop:0},'&:hover a.anchor':{textDecoration:'none'},'& tt, & code':{fontSize:'inherit'}});const codeCommon=({theme})=>({lineHeight:1,margin:'0 2px',padding:'3px 5px',whiteSpace:'nowrap',borderRadius:3,fontSize:theme.typography.size.s2-1,border:theme.base==='light'?`1px solid ${theme.color.mediumlight}`:`1px solid ${theme.color.darker}`,color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.3,theme.color.defaultText),backgroundColor:theme.base==='light'?theme.color.lighter:theme.color.border});const withReset=({theme})=>({fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s3,margin:0,WebkitFontSmoothing:'antialiased',MozOsxFontSmoothing:'grayscale',WebkitTapHighlightColor:'rgba(0, 0, 0, 0)',WebkitOverflowScrolling:'touch'});const withMargin={margin:'16px 0'};const Link$1=_a=>{var{href:input,children}=_a,props=__rest(_a,["href","children"]);const isStorybookPath=/^\//.test(input);const isAnchorUrl=/^#.*/.test(input);const href=isStorybookPath?`?path=${input}`:input;const target=isAnchorUrl?'_self':'_top';return React__default.createElement("a",Object.assign({href:href,target:target},props),children);};const A$2=styled(Link$1)(withReset,({theme})=>({fontSize:'inherit',lineHeight:'24px',color:theme.color.secondary,textDecoration:'none','&.absent':{color:'#cc0000'},'&.anchor':{display:'block',paddingLeft:30,marginLeft:-30,cursor:'pointer',position:'absolute',top:0,left:0,bottom:0}}));const Blockquote=styled.blockquote(withReset,withMargin,({theme})=>({borderLeft:`4px solid ${theme.color.medium}`,padding:'0 15px',color:theme.color.dark,'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}}));const Wrapper$8=styled.div(withReset,({theme})=>({backgroundColor:theme.base==='light'?'rgba(0,0,0,.01)':'rgba(255,255,255,.01)',borderRadius:theme.appBorderRadius,border:`1px dashed ${theme.appBorderColor}`,display:'flex',alignItems:'center',justifyContent:'center',padding:20,margin:'25px 0 40px',color:curriedTransparentize$1(0.3,theme.color.defaultText),fontSize:theme.typography.size.s2}));const EmptyBlock=props=>React__default.createElement(Wrapper$8,Object.assign({},props,{className:"docblock-emptyblock"}));const LazySyntaxHighlighter=lazy(()=>import('./syntaxhighlighter-848db87b.js'));const LazySyntaxHighlighterWithFormatter=lazy(()=>__awaiter(void 0,void 0,void 0,function*(){const[{SyntaxHighlighter},{formatter}]=yield Promise.all([import('./syntaxhighlighter-848db87b.js'),import('./formatter-781ca345.js')]);return{default:props=>React__default.createElement(SyntaxHighlighter,Object.assign({},props,{formatter:formatter}))};}));const SyntaxHighlighter=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},props.format!==false?React__default.createElement(LazySyntaxHighlighterWithFormatter,Object.assign({},props)):React__default.createElement(LazySyntaxHighlighter,Object.assign({},props)));const StyledSyntaxHighlighter=styled(SyntaxHighlighter)(({theme})=>({// DocBlocks-specific styling and overrides
297
+ var curriedTransparentize=/*#__PURE__*/curry/* ::<number | string, string, string> */(transparentize);var curriedTransparentize$1=curriedTransparentize;const headerCommon=({theme})=>({margin:'20px 0 8px',padding:0,cursor:'text',position:'relative',color:theme.color.defaultText,'&:first-of-type':{marginTop:0,paddingTop:0},'&:hover a.anchor':{textDecoration:'none'},'& tt, & code':{fontSize:'inherit'}});const codeCommon=({theme})=>({lineHeight:1,margin:'0 2px',padding:'3px 5px',whiteSpace:'nowrap',borderRadius:3,fontSize:theme.typography.size.s2-1,border:theme.base==='light'?`1px solid ${theme.color.mediumlight}`:`1px solid ${theme.color.darker}`,color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.3,theme.color.defaultText),backgroundColor:theme.base==='light'?theme.color.lighter:theme.color.border});const withReset=({theme})=>({fontFamily:theme.typography.fonts.base,fontSize:theme.typography.size.s3,margin:0,WebkitFontSmoothing:'antialiased',MozOsxFontSmoothing:'grayscale',WebkitTapHighlightColor:'rgba(0, 0, 0, 0)',WebkitOverflowScrolling:'touch'});const withMargin={margin:'16px 0'};const Link$1=_a=>{var{href:input,children}=_a,props=__rest(_a,["href","children"]);const isStorybookPath=/^\//.test(input);const isAnchorUrl=/^#.*/.test(input);const href=isStorybookPath?`?path=${input}`:input;const target=isAnchorUrl?'_self':'_top';return React__default.createElement("a",Object.assign({href:href,target:target},props),children);};const A$2=styled(Link$1)(withReset,({theme})=>({fontSize:'inherit',lineHeight:'24px',color:theme.color.secondary,textDecoration:'none','&.absent':{color:'#cc0000'},'&.anchor':{display:'block',paddingLeft:30,marginLeft:-30,cursor:'pointer',position:'absolute',top:0,left:0,bottom:0}}));const Blockquote=styled.blockquote(withReset,withMargin,({theme})=>({borderLeft:`4px solid ${theme.color.medium}`,padding:'0 15px',color:theme.color.dark,'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}}));const Wrapper$8=styled.div(withReset,({theme})=>({backgroundColor:theme.base==='light'?'rgba(0,0,0,.01)':'rgba(255,255,255,.01)',borderRadius:theme.appBorderRadius,border:`1px dashed ${theme.appBorderColor}`,display:'flex',alignItems:'center',justifyContent:'center',padding:20,margin:'25px 0 40px',color:curriedTransparentize$1(0.3,theme.color.defaultText),fontSize:theme.typography.size.s2}));const EmptyBlock=props=>React__default.createElement(Wrapper$8,Object.assign({},props,{className:"docblock-emptyblock"}));const LazySyntaxHighlighter=lazy(()=>import('./syntaxhighlighter-5c1fdb3d.js'));const LazySyntaxHighlighterWithFormatter=lazy(()=>__awaiter(void 0,void 0,void 0,function*(){const[{SyntaxHighlighter},{formatter}]=yield Promise.all([import('./syntaxhighlighter-5c1fdb3d.js'),import('./formatter-12a1a8d1.js')]);return{default:props=>React__default.createElement(SyntaxHighlighter,Object.assign({},props,{formatter:formatter}))};}));const SyntaxHighlighter=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},props.format!==false?React__default.createElement(LazySyntaxHighlighterWithFormatter,Object.assign({},props)):React__default.createElement(LazySyntaxHighlighter,Object.assign({},props)));const StyledSyntaxHighlighter=styled(SyntaxHighlighter)(({theme})=>({// DocBlocks-specific styling and overrides
298
298
  fontSize:`${theme.typography.size.s2-1}px`,lineHeight:'19px',margin:'25px 0 40px',borderRadius:theme.appBorderRadius,boxShadow:theme.base==='light'?'rgba(0, 0, 0, 0.10) 0 1px 3px 0':'rgba(0, 0, 0, 0.20) 0 2px 5px 0','pre.prismjs':{padding:20,background:'inherit'}}));var SourceError;(function(SourceError){SourceError["NO_STORY"]="There\u2019s no story here.";SourceError["SOURCE_UNAVAILABLE"]="Oh no! The source is not available.";})(SourceError||(SourceError={}));const SourceSkeletonWrapper=styled.div(({theme})=>({background:theme.background.content,borderRadius:theme.appBorderRadius,border:`1px solid ${theme.appBorderColor}`,boxShadow:theme.base==='light'?'rgba(0, 0, 0, 0.10) 0 1px 3px 0':'rgba(0, 0, 0, 0.20) 0 2px 5px 0',margin:'25px 0 40px',padding:'20px 20px 20px 22px'}));const SourceSkeletonPlaceholder=styled.div(({theme})=>({animation:`${theme.animation.glow} 1.5s ease-in-out infinite`,background:theme.appBorderColor,height:17,marginTop:1,width:'60%',[`&:first-child`]:{margin:0}}));const SourceSkeleton=()=>React__default.createElement(SourceSkeletonWrapper,null,React__default.createElement(SourceSkeletonPlaceholder,null),React__default.createElement(SourceSkeletonPlaceholder,{style:{width:'80%'}}),React__default.createElement(SourceSkeletonPlaceholder,{style:{width:'30%'}}),React__default.createElement(SourceSkeletonPlaceholder,{style:{width:'80%'}}));/**
299
299
  * Syntax-highlighted source code for a component (or anything!)
300
300
  */const Source=props=>{const{isLoading,error}=props;if(isLoading){return React__default.createElement(SourceSkeleton,null);}if(error){return React__default.createElement(EmptyBlock,null,error);}const _a=props,{language,code,dark,format}=_a,rest=__rest(_a,["language","code","dark","format"]);const syntaxHighlighter=React__default.createElement(StyledSyntaxHighlighter,Object.assign({bordered:true,copyable:true,format:format,language:language,className:"docblock-source"},rest),code);if(typeof dark==='undefined'){return syntaxHighlighter;}const overrideTheme=dark?themes.dark:themes.light;return React__default.createElement(ThemeProvider,{theme:convert(overrideTheme)},syntaxHighlighter);};Source.defaultProps={format:false};const isReactChildString=child=>typeof child==='string';const isInlineCodeRegex=/[\n\r]/g;const DefaultCodeBlock=styled.code(({theme})=>({// from reset
@@ -310,7 +310,7 @@ const icons={mobile:'M648 64h-272c-66.274 0-120 53.726-120 120v656c0 66.274 53.7
310
310
  shapeRendering:'inherit',transform:'translate3d(0,0,0)'},({inline})=>inline?{display:'inline-block'}:{display:'block'});Svg.displayName='Svg';const Path=styled.path({fill:'currentColor'});// TODO: if we can resize the 1024 to 20, we can remove the size attributes
311
311
  const Icons=memo(_a=>{var{icon,symbol}=_a,props=__rest(_a,["icon","symbol"]);return React__default.createElement(Svg,Object.assign({viewBox:"0 0 1024 1024"},props),symbol?React__default.createElement("use",{xlinkHref:`#icon--${symbol}`}):React__default.createElement(Path,{d:icons[icon]}));});const Symbols=memo(({icons:keys=Object.keys(icons)})=>React__default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:{position:'absolute',width:0,height:0},"data-chromatic":"ignore"},keys.map(key=>React__default.createElement("symbol",{id:`icon--${key}`,key:key},React__default.createElement(Path,{d:icons[key]})))));// Cmd/Ctrl/Shift/Alt + Click should trigger default browser behavior. Same applies to non-left clicks
312
312
  const LEFT_BUTTON=0;const isPlainLeftClick=e=>e.button===LEFT_BUTTON&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey;const cancelled=(e,cb)=>{if(isPlainLeftClick(e)){e.preventDefault();cb(e);}};const LinkInner=styled.span(({withArrow})=>withArrow?{'> svg:last-of-type':{height:'0.7em',width:'0.7em',marginRight:0,marginLeft:'0.25em',bottom:'auto',verticalAlign:'inherit'}}:{},({containsIcon})=>containsIcon?{svg:{height:'1em',width:'1em',verticalAlign:'middle',position:'relative',bottom:0,marginRight:0}}:{});const A$1=styled.a(({theme})=>({display:'inline-block',transition:'all 150ms ease-out',textDecoration:'none',color:theme.color.secondary,'&:hover, &:focus':{cursor:'pointer',color:curriedDarken$1(0.07,theme.color.secondary),'svg path':{fill:curriedDarken$1(0.07,theme.color.secondary)}},'&:active':{color:curriedDarken$1(0.1,theme.color.secondary),'svg path':{fill:curriedDarken$1(0.1,theme.color.secondary)}},svg:{display:'inline-block',height:'1em',width:'1em',verticalAlign:'text-top',position:'relative',bottom:'-0.125em',marginRight:'0.4em','& path':{fill:theme.color.secondary}}}),({theme,secondary,tertiary})=>{let colors;if(secondary){colors=[theme.color.mediumdark,theme.color.dark,theme.color.darker];}if(tertiary){colors=[theme.color.dark,theme.color.darkest,theme.color.mediumdark];}return colors?{color:colors[0],'svg path':{fill:colors[0]},'&:hover':{color:colors[1],'svg path':{fill:colors[1]}},'&:active':{color:colors[2],'svg path':{fill:colors[2]}}}:{};},({nochrome})=>nochrome?{color:'inherit','&:hover, &:active':{color:'inherit',textDecoration:'underline'}}:{},({theme,inverse})=>inverse?{color:theme.color.lightest,'svg path':{fill:theme.color.lightest},'&:hover':{color:theme.color.lighter,'svg path':{fill:theme.color.lighter}},'&:active':{color:theme.color.light,'svg path':{fill:theme.color.light}}}:{},({isButton})=>isButton?{border:0,borderRadius:0,background:'none',padding:0,fontSize:'inherit'}:{});const Link=_a=>{var{cancel,children,onClick,withArrow,containsIcon,className}=_a,rest=__rest(_a,["cancel","children","onClick","withArrow","containsIcon","className"]);return React__default.createElement(A$1,Object.assign({},rest,{onClick:onClick&&cancel?e=>cancelled(e,onClick):onClick,className:className}),React__default.createElement(LinkInner,{withArrow:withArrow,containsIcon:containsIcon},children,withArrow&&React__default.createElement(Icons,{icon:"arrowright"})));};Link.defaultProps={cancel:true,className:undefined,style:undefined,onClick:undefined,withArrow:false,containsIcon:false};const DocumentWrapper=styled.div(({theme})=>({fontSize:`${theme.typography.size.s2}px`,lineHeight:'1.6',h1:{fontSize:`${theme.typography.size.l1}px`,fontWeight:theme.typography.weight.black},h2:{fontSize:`${theme.typography.size.m2}px`,borderBottom:`1px solid ${theme.appBorderColor}`},h3:{fontSize:`${theme.typography.size.m1}px`},h4:{fontSize:`${theme.typography.size.s3}px`},h5:{fontSize:`${theme.typography.size.s2}px`},h6:{fontSize:`${theme.typography.size.s2}px`,color:theme.color.dark},'pre:not(.prismjs)':{background:'transparent',border:'none',borderRadius:0,padding:0,margin:0},'pre pre, pre.prismjs':{padding:15,margin:0,whiteSpace:'pre-wrap',color:'inherit',fontSize:'13px',lineHeight:'19px'},'pre pre code, pre.prismjs code':{color:'inherit',fontSize:'inherit'},'pre code':{margin:0,padding:0,whiteSpace:'pre',border:'none',background:'transparent'},'pre code, pre tt':{backgroundColor:'transparent',border:'none'},/* GitHub inspired Markdown styles loosely from https://gist.github.com/tuzz/3331384 */'body > *:first-of-type':{marginTop:'0 !important'},'body > *:last-child':{marginBottom:'0 !important'},a:{color:theme.color.secondary,textDecoration:'none'},'a.absent':{color:'#cc0000'},'a.anchor':{display:'block',paddingLeft:30,marginLeft:-30,cursor:'pointer',position:'absolute',top:0,left:0,bottom:0},'h1, h2, h3, h4, h5, h6':{margin:'20px 0 10px',padding:0,cursor:'text',position:'relative','&:first-of-type':{marginTop:0,paddingTop:0},'&:hover a.anchor':{textDecoration:'none'},'& tt, & code':{fontSize:'inherit'}},'h1:first-of-type + h2':{marginTop:0,paddingTop:0},'p, blockquote, ul, ol, dl, li, table, pre':{margin:'15px 0'},hr:{border:'0 none',borderTop:`1px solid ${theme.appBorderColor}`,height:4,padding:0},'body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type':{marginTop:0,paddingTop:0},'body > h1:first-of-type + h2':{marginTop:0,paddingTop:0},'a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6':{marginTop:0,paddingTop:0},'h1 p, h2 p, h3 p, h4 p, h5 p, h6 p':{marginTop:0},'li p.first':{display:'inline-block'},'ul, ol':{paddingLeft:30,'& :first-of-type':{marginTop:0},'& :last-child':{marginBottom:0}},dl:{padding:0},'dl dt':{fontSize:'14px',fontWeight:'bold',fontStyle:'italic',margin:'0 0 15px',padding:'0 15px','&:first-of-type':{padding:0},'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}},blockquote:{borderLeft:`4px solid ${theme.color.medium}`,padding:'0 15px',color:theme.color.dark,'& > :first-of-type':{marginTop:0},'& > :last-child':{marginBottom:0}},table:{padding:0,borderCollapse:'collapse','& tr':{borderTop:`1px solid ${theme.appBorderColor}`,backgroundColor:'white',margin:0,padding:0,'& th':{fontWeight:'bold',border:`1px solid ${theme.appBorderColor}`,textAlign:'left',margin:0,padding:'6px 13px'},'& td':{border:`1px solid ${theme.appBorderColor}`,textAlign:'left',margin:0,padding:'6px 13px'},'&:nth-of-type(2n)':{backgroundColor:theme.color.lighter},'& th :first-of-type, & td :first-of-type':{marginTop:0},'& th :last-child, & td :last-child':{marginBottom:0}}},img:{maxWidth:'100%'},'span.frame':{display:'block',overflow:'hidden','& > span':{border:`1px solid ${theme.color.medium}`,display:'block',float:'left',overflow:'hidden',margin:'13px 0 0',padding:7,width:'auto'},'& span img':{display:'block',float:'left'},'& span span':{clear:'both',color:theme.color.darkest,display:'block',padding:'5px 0 0'}},'span.align-center':{display:'block',overflow:'hidden',clear:'both','& > span':{display:'block',overflow:'hidden',margin:'13px auto 0',textAlign:'center'},'& span img':{margin:'0 auto',textAlign:'center'}},'span.align-right':{display:'block',overflow:'hidden',clear:'both','& > span':{display:'block',overflow:'hidden',margin:'13px 0 0',textAlign:'right'},'& span img':{margin:0,textAlign:'right'}},'span.float-left':{display:'block',marginRight:13,overflow:'hidden',float:'left','& span':{margin:'13px 0 0'}},'span.float-right':{display:'block',marginLeft:13,overflow:'hidden',float:'right','& > span':{display:'block',overflow:'hidden',margin:'13px auto 0',textAlign:'right'}},'code, tt':{margin:'0 2px',padding:'0 5px',whiteSpace:'nowrap',border:`1px solid ${theme.color.mediumlight}`,backgroundColor:theme.color.lighter,borderRadius:3,color:theme.base==='dark'&&theme.color.darkest}}));const Container$1=styled.div(({theme})=>({position:'absolute',bottom:0,right:0,maxWidth:'100%',display:'flex',background:theme.background.content,zIndex:1}));const ActionButton=styled.button(({theme})=>({margin:0,border:'0 none',padding:'4px 10px',cursor:'pointer',display:'flex',alignItems:'center',color:theme.color.defaultText,background:theme.background.content,fontSize:12,lineHeight:'16px',fontFamily:theme.typography.fonts.base,fontWeight:theme.typography.weight.bold,borderTop:`1px solid ${theme.appBorderColor}`,borderLeft:`1px solid ${theme.appBorderColor}`,marginLeft:-1,borderRadius:`4px 0 0 0`,'&:not(:last-child)':{borderRight:`1px solid ${theme.appBorderColor}`},'& + *':{borderLeft:`1px solid ${theme.appBorderColor}`,borderRadius:0},'&:focus':{boxShadow:`${theme.color.secondary} 0 -3px 0 0 inset`,outline:'0 none'}}),({disabled})=>disabled&&{cursor:'not-allowed',opacity:0.5});ActionButton.displayName='ActionButton';const ActionBar=_a=>{var{actionItems}=_a,props=__rest(_a,["actionItems"]);return React__default.createElement(Container$1,Object.assign({},props),actionItems.map(({title,className,onClick,disabled},index)=>// eslint-disable-next-line react/no-array-index-key
313
- React__default.createElement(ActionButton,{key:index,className:className,onClick:onClick,disabled:disabled},title)));};const toNumber=input=>typeof input==='number'?input:Number(input);const Container=styled.div(({theme,col,row=1})=>col?{display:'inline-block',verticalAlign:'inherit','& > *':{marginLeft:col*theme.layoutMargin,verticalAlign:'inherit'},[`& > *:first-child`]:{marginLeft:0}}:{'& > *':{marginTop:row*theme.layoutMargin},[`& > *:first-child`]:{marginTop:0}},({theme,outer,col,row})=>{switch(true){case!!(outer&&col):{return{marginLeft:outer*theme.layoutMargin,marginRight:outer*theme.layoutMargin};}case!!(outer&&row):{return{marginTop:outer*theme.layoutMargin,marginBottom:outer*theme.layoutMargin};}default:{return{};}}});const Spaced=_a=>{var{col,row,outer,children}=_a,rest=__rest(_a,["col","row","outer","children"]);const outerAmount=toNumber(typeof outer==='number'||!outer?outer:col||row);return React__default.createElement(Container,Object.assign({col:col,row:row,outer:outerAmount},rest),children);};const Title$3=styled.div(({theme})=>({fontWeight:theme.typography.weight.bold}));const Desc$1=styled.div();const Message$1=styled.div(({theme})=>({padding:30,textAlign:'center',color:theme.color.defaultText,fontSize:theme.typography.size.s2-1}));const Placeholder=_a=>{var{children}=_a,props=__rest(_a,["children"]);const[title,desc]=Children.toArray(children);return React__default.createElement(Message$1,Object.assign({},props),React__default.createElement(Title$3,null,title),desc&&React__default.createElement(Desc$1,null,desc));};const GlobalScrollAreaStyles=lazy(()=>import('./GlobalScrollAreaStyles-8793ce4a.js'));const OverlayScrollbars=lazy(()=>import('./OverlayScrollbars-0d0d9ac6.js'));const Scroller=_a=>{var props=__rest(_a,["horizontal","vertical"]);return React__default.createElement(Suspense,{fallback:React__default.createElement("div",Object.assign({},props))},React__default.createElement(GlobalScrollAreaStyles,null),React__default.createElement(OverlayScrollbars,Object.assign({options:{scrollbars:{autoHide:'leave'}}},props)));};const ScrollArea=styled(Scroller)(({vertical})=>!vertical?{overflowY:'hidden'}:{overflowY:'auto',height:'100%'},({horizontal})=>!horizontal?{overflowX:'hidden'}:{overflowX:'auto',width:'100%'});ScrollArea.defaultProps={horizontal:false,vertical:false};var commonjsGlobal=typeof globalThis!=='undefined'?globalThis:typeof window!=='undefined'?window:typeof global!=='undefined'?global:typeof self!=='undefined'?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,'default')?x['default']:x;}var win;if(typeof window!=="undefined"){win=window;}else if(typeof commonjsGlobal!=="undefined"){win=commonjsGlobal;}else if(typeof self!=="undefined"){win=self;}else{win={};}var window_1=win;const{window:globalWindow$2}=window_1;function browserSupportsCssZoom(){try{return globalWindow$2.document.implementation.createHTMLDocument('').body.style.zoom!==undefined;}catch(error){return false;}}const ZoomElementWrapper=styled.div(({scale=1,height})=>browserSupportsCssZoom()?{'> *':{zoom:1/scale}}:{height:height+50,transformOrigin:'top left',transform:`scale(${1/scale})`});function ZoomElement({scale,children}){const componentWrapperRef=useRef(null);const[height,setHeight]=useState(0);useEffect(()=>{if(componentWrapperRef.current){setHeight(componentWrapperRef.current.getBoundingClientRect().height);}},[scale,componentWrapperRef.current]);return React__default.createElement(ZoomElementWrapper,{scale:scale,height:height},React__default.createElement("div",{ref:componentWrapperRef,className:"innerZoomElementWrapper"},children));}class ZoomIFrame extends Component{constructor(){super(...arguments);this.iframe=null;}componentDidMount(){const{iFrameRef}=this.props;this.iframe=iFrameRef.current;}shouldComponentUpdate(nextProps){const{scale,active}=this.props;if(scale!==nextProps.scale){this.setIframeInnerZoom(nextProps.scale);}if(active!==nextProps.active){this.iframe.setAttribute('data-is-storybook',nextProps.active?'true':'false');}// this component renders an iframe, which gets updates via post-messages
313
+ React__default.createElement(ActionButton,{key:index,className:className,onClick:onClick,disabled:disabled},title)));};const toNumber=input=>typeof input==='number'?input:Number(input);const Container=styled.div(({theme,col,row=1})=>col?{display:'inline-block',verticalAlign:'inherit','& > *':{marginLeft:col*theme.layoutMargin,verticalAlign:'inherit'},[`& > *:first-child`]:{marginLeft:0}}:{'& > *':{marginTop:row*theme.layoutMargin},[`& > *:first-child`]:{marginTop:0}},({theme,outer,col,row})=>{switch(true){case!!(outer&&col):{return{marginLeft:outer*theme.layoutMargin,marginRight:outer*theme.layoutMargin};}case!!(outer&&row):{return{marginTop:outer*theme.layoutMargin,marginBottom:outer*theme.layoutMargin};}default:{return{};}}});const Spaced=_a=>{var{col,row,outer,children}=_a,rest=__rest(_a,["col","row","outer","children"]);const outerAmount=toNumber(typeof outer==='number'||!outer?outer:col||row);return React__default.createElement(Container,Object.assign({col:col,row:row,outer:outerAmount},rest),children);};const Title$3=styled.div(({theme})=>({fontWeight:theme.typography.weight.bold}));const Desc$1=styled.div();const Message$1=styled.div(({theme})=>({padding:30,textAlign:'center',color:theme.color.defaultText,fontSize:theme.typography.size.s2-1}));const Placeholder=_a=>{var{children}=_a,props=__rest(_a,["children"]);const[title,desc]=Children.toArray(children);return React__default.createElement(Message$1,Object.assign({},props),React__default.createElement(Title$3,null,title),desc&&React__default.createElement(Desc$1,null,desc));};const GlobalScrollAreaStyles=lazy(()=>import('./GlobalScrollAreaStyles-8793ce4a.js'));const OverlayScrollbars=lazy(()=>import('./OverlayScrollbars-119b80c2.js'));const Scroller=_a=>{var props=__rest(_a,["horizontal","vertical"]);return React__default.createElement(Suspense,{fallback:React__default.createElement("div",Object.assign({},props))},React__default.createElement(GlobalScrollAreaStyles,null),React__default.createElement(OverlayScrollbars,Object.assign({options:{scrollbars:{autoHide:'leave'}}},props)));};const ScrollArea=styled(Scroller)(({vertical})=>!vertical?{overflowY:'hidden'}:{overflowY:'auto',height:'100%'},({horizontal})=>!horizontal?{overflowX:'hidden'}:{overflowX:'auto',width:'100%'});ScrollArea.defaultProps={horizontal:false,vertical:false};var commonjsGlobal=typeof globalThis!=='undefined'?globalThis:typeof window!=='undefined'?window:typeof global!=='undefined'?global:typeof self!=='undefined'?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,'default')?x['default']:x;}var win;if(typeof window!=="undefined"){win=window;}else if(typeof commonjsGlobal!=="undefined"){win=commonjsGlobal;}else if(typeof self!=="undefined"){win=self;}else{win={};}var window_1=win;const{window:globalWindow$2}=window_1;function browserSupportsCssZoom(){try{return globalWindow$2.document.implementation.createHTMLDocument('').body.style.zoom!==undefined;}catch(error){return false;}}const ZoomElementWrapper=styled.div(({scale=1,height})=>browserSupportsCssZoom()?{'> *':{zoom:1/scale}}:{height:height+50,transformOrigin:'top left',transform:`scale(${1/scale})`});function ZoomElement({scale,children}){const componentWrapperRef=useRef(null);const[height,setHeight]=useState(0);useEffect(()=>{if(componentWrapperRef.current){setHeight(componentWrapperRef.current.getBoundingClientRect().height);}},[scale,componentWrapperRef.current]);return React__default.createElement(ZoomElementWrapper,{scale:scale,height:height},React__default.createElement("div",{ref:componentWrapperRef,className:"innerZoomElementWrapper"},children));}class ZoomIFrame extends Component{constructor(){super(...arguments);this.iframe=null;}componentDidMount(){const{iFrameRef}=this.props;this.iframe=iFrameRef.current;}shouldComponentUpdate(nextProps){const{scale,active}=this.props;if(scale!==nextProps.scale){this.setIframeInnerZoom(nextProps.scale);}if(active!==nextProps.active){this.iframe.setAttribute('data-is-storybook',nextProps.active?'true':'false');}// this component renders an iframe, which gets updates via post-messages
314
314
  // never update this component, it will cause the iframe to refresh
315
315
  // the only exception is when the url changes, which happens when the version changes
316
316
  return nextProps.children.props.src!==this.props.children.props.src;}setIframeInnerZoom(scale){try{if(browserSupportsCssZoom()){Object.assign(this.iframe.contentDocument.body.style,{zoom:1/scale});}else{Object.assign(this.iframe.contentDocument.body.style,{width:`${scale*100}%`,height:`${scale*100}%`,transform:`scale(${1/scale})`,transformOrigin:'top left'});}}catch(e){this.setIframeZoom(scale);}}setIframeZoom(scale){Object.assign(this.iframe.style,{width:`${scale*100}%`,height:`${scale*100}%`,transform:`scale(${1/scale})`,transformOrigin:'top left'});}render(){const{children}=this.props;return children;}}const Zoom$1={Element:ZoomElement,IFrame:ZoomIFrame};const ButtonWrapper=styled.button(({small,theme})=>({border:0,borderRadius:'3em',cursor:'pointer',display:'inline-block',overflow:'hidden',padding:small?'8px 16px':'13px 20px',position:'relative',textAlign:'center',textDecoration:'none',transition:'all 150ms ease-out',transform:'translate3d(0,0,0)',verticalAlign:'top',whiteSpace:'nowrap',userSelect:'none',opacity:1,margin:0,background:'transparent',fontSize:`${small?theme.typography.size.s1:theme.typography.size.s2-1}px`,fontWeight:theme.typography.weight.bold,lineHeight:'1',svg:{display:'inline-block',height:small?14:16,width:small?14:16,verticalAlign:'top',marginRight:small?4:6,marginTop:small?-1:-2,marginBottom:small?-1:-2,/* Necessary for js mouse events to not glitch out when hovering on svgs */pointerEvents:'none',path:{fill:'currentColor'}}}),({disabled})=>disabled?{cursor:'not-allowed !important',opacity:0.5,'&:hover':{transform:'none'}}:{},({containsIcon,small})=>containsIcon?Object.assign({svg:{display:'block',margin:0}},small?{padding:9}:{padding:12}):{},({theme,primary,secondary,gray})=>{let color;if(gray){color=theme.color.medium;}else if(secondary){color=theme.color.secondary;}else if(primary){color=theme.color.primary;}return color?{background:color,color:gray?theme.color.darkest:theme.color.lightest,'&:hover':{background:curriedDarken$1(0.05,color)},'&:active':{boxShadow:'rgba(0, 0, 0, 0.1) 0 0 0 3em inset'},'&:focus':{boxShadow:`${rgba(color,1)} 0 1px 9px 2px`,outline:'none'},'&:focus:hover':{boxShadow:`${rgba(color,0.2)} 0 8px 18px 0px`}}:{};},({theme,tertiary,inForm,small})=>tertiary?Object.assign(Object.assign({background:theme.base==='light'?curriedDarken$1(0.02,theme.input.background):curriedLighten$1(0.02,theme.input.background),color:theme.input.color,boxShadow:`${theme.input.border} 0 0 0 1px inset`,borderRadius:theme.input.borderRadius},inForm&&small?{padding:'10px 16px'}:{}),{'&:hover':Object.assign({background:theme.base==='light'?curriedDarken$1(0.05,theme.input.background):curriedLighten$1(0.05,theme.input.background)},inForm?{}:{boxShadow:'rgba(0,0,0,.2) 0 2px 6px 0, rgba(0,0,0,.1) 0 0 0 1px inset'}),'&:active':{background:theme.input.background},'&:focus':{boxShadow:`${rgba(theme.color.secondary,1)} 0 0 0 1px inset`,outline:'none'}}):{},({theme,outline})=>outline?{boxShadow:`${curriedTransparentize$1(0.8,theme.color.defaultText)} 0 0 0 1px inset`,color:curriedTransparentize$1(0.3,theme.color.defaultText),background:'transparent','&:hover, &:focus':{boxShadow:`${curriedTransparentize$1(0.5,theme.color.defaultText)} 0 0 0 1px inset`,outline:'none'},'&:active':{boxShadow:`${curriedTransparentize$1(0.5,theme.color.defaultText)} 0 0 0 2px inset`,color:curriedTransparentize$1(0,theme.color.defaultText)}}:{},({theme,outline,primary})=>{const color=theme.color.primary;return outline&&primary?{boxShadow:`${color} 0 0 0 1px inset`,color,'svg path':{fill:color},'&:hover':{boxShadow:`${color} 0 0 0 1px inset`,background:'transparent'},'&:active':{background:color,boxShadow:`${color} 0 0 0 1px inset`,color:theme.color.tertiary},'&:focus':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.4)} 0 1px 9px 2px`,outline:'none'},'&:focus:hover':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.2)} 0 8px 18px 0px`}}:{};},({theme,outline,primary,secondary})=>{let color;if(secondary){color=theme.color.secondary;}else if(primary){color=theme.color.primary;}return outline&&color?{boxShadow:`${color} 0 0 0 1px inset`,color,'svg path':{fill:color},'&:hover':{boxShadow:`${color} 0 0 0 1px inset`,background:'transparent'},'&:active':{background:color,boxShadow:`${color} 0 0 0 1px inset`,color:theme.color.tertiary},'&:focus':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.4)} 0 1px 9px 2px`,outline:'none'},'&:focus:hover':{boxShadow:`${color} 0 0 0 1px inset, ${rgba(color,0.2)} 0 8px 18px 0px`}}:{};});const ButtonLink=ButtonWrapper.withComponent('a');const Button$2=Object.assign(forwardRef((_a,ref)=>{var{isLink,children}=_a,props=__rest(_a,["isLink","children"]);if(isLink){return React__default.createElement(ButtonLink,Object.assign({},props,{ref:ref}),children);}return React__default.createElement(ButtonWrapper,Object.assign({},props,{ref:ref}),children);}),{defaultProps:{isLink:false}});const Wrapper$7=styled.label(({theme})=>({display:'flex',borderBottom:`1px solid ${theme.appBorderColor}`,margin:'0 15px',padding:'8px 0','&:last-child':{marginBottom:'3rem'}}));const Label$4=styled.span(({theme})=>({minWidth:100,fontWeight:theme.typography.weight.bold,marginRight:15,display:'flex',justifyContent:'flex-start',alignItems:'center',lineHeight:'16px'}));const Field=_a=>{var{label,children}=_a,props=__rest(_a,["label","children"]);return React__default.createElement(Wrapper$7,Object.assign({},props),label?React__default.createElement(Label$4,null,React__default.createElement("span",null,label)):null,children);};Field.defaultProps={label:undefined};function _extends(){_extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};return _extends.apply(this,arguments);}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}var index$1=typeof document!=='undefined'?useLayoutEffect:useEffect;var useLatest=function useLatest(value){var ref=useRef(value);index$1(function(){ref.current=value;});return ref;};var updateRef=function updateRef(ref,value){if(typeof ref==='function'){ref(value);return;}ref.current=value;};var useComposedRef=function useComposedRef(libRef,userRef){var prevUserRef=useRef();return useCallback(function(instance){libRef.current=instance;if(prevUserRef.current){updateRef(prevUserRef.current,null);}prevUserRef.current=userRef;if(!userRef){return;}updateRef(userRef,instance);},[userRef]);};var HIDDEN_TEXTAREA_STYLE={'min-height':'0','max-height':'none',height:'0',visibility:'hidden',overflow:'hidden',position:'absolute','z-index':'-1000',top:'0',right:'0'};var forceHiddenStyles=function forceHiddenStyles(node){Object.keys(HIDDEN_TEXTAREA_STYLE).forEach(function(key){node.style.setProperty(key,HIDDEN_TEXTAREA_STYLE[key],'important');});};// export type CalculatedNodeHeights = [height: number, rowHeight: number];
@@ -326,21 +326,8 @@ if(boxSizing===''){return null;}// IE (Edge has already correct behaviour) retur
326
326
  if(isIE&&boxSizing==='border-box'){sizingStyle.width=parseFloat(sizingStyle.width)+parseFloat(sizingStyle.borderRightWidth)+parseFloat(sizingStyle.borderLeftWidth)+parseFloat(sizingStyle.paddingRight)+parseFloat(sizingStyle.paddingLeft)+'px';}var paddingSize=parseFloat(sizingStyle.paddingBottom)+parseFloat(sizingStyle.paddingTop);var borderSize=parseFloat(sizingStyle.borderBottomWidth)+parseFloat(sizingStyle.borderTopWidth);return{sizingStyle:sizingStyle,paddingSize:paddingSize,borderSize:borderSize};};var useWindowResizeListener=function useWindowResizeListener(listener){var latestListener=useLatest(listener);useLayoutEffect(function(){var handler=function handler(event){latestListener.current(event);};window.addEventListener('resize',handler);return function(){window.removeEventListener('resize',handler);};},[]);};var TextareaAutosize=function TextareaAutosize(_ref,userRef){var cacheMeasurements=_ref.cacheMeasurements,maxRows=_ref.maxRows,minRows=_ref.minRows,_ref$onChange=_ref.onChange,onChange=_ref$onChange===void 0?noop$2:_ref$onChange,_ref$onHeightChange=_ref.onHeightChange,onHeightChange=_ref$onHeightChange===void 0?noop$2:_ref$onHeightChange,props=_objectWithoutPropertiesLoose(_ref,["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"]);if(process.env.NODE_ENV!=='production'&&props.style){if('maxHeight'in props.style){throw new Error('Using `style.maxHeight` for <TextareaAutosize/> is not supported. Please use `maxRows`.');}if('minHeight'in props.style){throw new Error('Using `style.minHeight` for <TextareaAutosize/> is not supported. Please use `minRows`.');}}var isControlled=props.value!==undefined;var libRef=useRef(null);var ref=useComposedRef(libRef,userRef);var heightRef=useRef(0);var measurementsCacheRef=useRef();var resizeTextarea=function resizeTextarea(){var node=libRef.current;var nodeSizingData=cacheMeasurements&&measurementsCacheRef.current?measurementsCacheRef.current:getSizingData(node);if(!nodeSizingData){return;}measurementsCacheRef.current=nodeSizingData;var _calculateNodeHeight=calculateNodeHeight(nodeSizingData,node.value||node.placeholder||'x',minRows,maxRows),height=_calculateNodeHeight[0],rowHeight=_calculateNodeHeight[1];if(heightRef.current!==height){heightRef.current=height;node.style.setProperty('height',height+"px",'important');onHeightChange(height,{rowHeight:rowHeight});}};var handleChange=function handleChange(event){if(!isControlled){resizeTextarea();}onChange(event);};if(typeof document!=='undefined'){useLayoutEffect(resizeTextarea);useWindowResizeListener(resizeTextarea);}return/*#__PURE__*/createElement("textarea",_extends({},props,{onChange:handleChange,ref:ref}));};var index=/* #__PURE__ */forwardRef(TextareaAutosize);const TextareaAutoResize=index;const styleResets$1={// resets
327
327
  appearance:'none',border:'0 none',boxSizing:'inherit',display:' block',margin:' 0',background:'transparent',padding:0,fontSize:'inherit',position:'relative'};const styles=({theme})=>Object.assign(Object.assign({},styleResets$1),{transition:'box-shadow 200ms ease-out, opacity 200ms ease-out',color:theme.input.color||'inherit',background:theme.input.background,boxShadow:`${theme.input.border} 0 0 0 1px inset`,borderRadius:theme.input.borderRadius,fontSize:theme.typography.size.s2-1,lineHeight:'20px',padding:'6px 10px','&:focus':{boxShadow:`${theme.color.secondary} 0 0 0 1px inset`,outline:'none'},'&[disabled]':{cursor:'not-allowed',opacity:0.5},'&:-webkit-autofill':{WebkitBoxShadow:`0 0 0 3em ${theme.color.lightest} inset`},'::placeholder':{color:theme.color.mediumdark}});const sizes=({size})=>{switch(size){case'100%':{return{width:'100%'};}case'flex':{return{flex:1};}case'auto':default:{return{display:'inline'};}}};const alignment=({align})=>{switch(align){case'end':{return{textAlign:'right'};}case'center':{return{textAlign:'center'};}case'start':default:{return{textAlign:'left'};}}};const validation=({valid,theme})=>{switch(valid){case'valid':{return{boxShadow:`${theme.color.positive} 0 0 0 1px inset !important`};}case'error':{return{boxShadow:`${theme.color.negative} 0 0 0 1px inset !important`};}case'warn':{return{boxShadow:`${theme.color.warning} 0 0 0 1px inset`};}case undefined:case null:default:{return{};}}};const Input$1=Object.assign(styled(forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default.createElement("input",Object.assign({},props,{ref:ref}));}))(styles,sizes,alignment,validation,{minHeight:32}),{displayName:'Input'});const Select=Object.assign(styled(forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default.createElement("select",Object.assign({},props,{ref:ref}));}))(styles,sizes,validation,{height:32,userSelect:'none',paddingRight:20,appearance:'menulist'}),{displayName:'Select'});const Textarea=Object.assign(styled(forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default.createElement(TextareaAutoResize,Object.assign({},props,{ref:ref}));}))(styles,sizes,alignment,validation,({height=400})=>({overflow:'visible',maxHeight:height})),{displayName:'Textarea'});const ButtonStyled=styled(forwardRef((_a,ref)=>{var props=__rest(_a,["size","valid","align"]);return React__default.createElement(Button$2,Object.assign({},props,{ref:ref}));}))(sizes,validation,{// Custom styling for color widget nested in buttons
328
328
  userSelect:'none',overflow:'visible',zIndex:2,// overrides the default hover from Button
329
- '&:hover':{transform:'none'}});const Button$1=Object.assign(forwardRef((props,ref)=>React__default.createElement(ButtonStyled,Object.assign({},props,{tertiary:true,small:true,inForm:true},{ref:ref}))),{displayName:'Button'});const Form=Object.assign(styled.form({boxSizing:'border-box',width:'100%'}),{Field,Input:Input$1,Select,Textarea,Button:Button$1});const LazyWithTooltip=lazy(()=>import('./WithTooltip-c478b6c7.js').then(mod=>({default:mod.WithTooltip})));const WithTooltip=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},React__default.createElement(LazyWithTooltip,Object.assign({},props)));const LazyWithTooltipPure=lazy(()=>import('./WithTooltip-c478b6c7.js').then(mod=>({default:mod.WithTooltipPure})));const WithTooltipPure=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},React__default.createElement(LazyWithTooltipPure,Object.assign({},props)));const Title$2=styled.div(({theme})=>({fontWeight:theme.typography.weight.black}));const Desc=styled.span();const Links=styled.div(({theme})=>({marginTop:8,textAlign:'center','> *':{margin:'0 8px',fontWeight:theme.typography.weight.black}}));const Message=styled.div(({theme})=>({color:theme.textColor,lineHeight:'18px'}));const MessageWrapper=styled.div({padding:15,width:280,boxSizing:'border-box'});const TooltipMessage=({title,desc,links})=>{return React__default.createElement(MessageWrapper,null,React__default.createElement(Message,null,title&&React__default.createElement(Title$2,null,title),desc&&React__default.createElement(Desc,null,desc)),links&&React__default.createElement(Links,null,links.map(_a=>{var{title:linkTitle}=_a,other=__rest(_a,["title"]);return React__default.createElement(Link,Object.assign({},other,{key:linkTitle}),linkTitle);})));};TooltipMessage.defaultProps={title:null,desc:null,links:null};const Note=styled.div(({theme})=>({padding:'2px 6px',lineHeight:'16px',fontSize:10,fontWeight:theme.typography.weight.bold,color:theme.color.lightest,boxShadow:'0 0 5px 0 rgba(0, 0, 0, 0.3)',borderRadius:4,whiteSpace:'nowrap',pointerEvents:'none',zIndex:-1,background:theme.base==='light'?'rgba(60, 60, 60, 0.9)':'rgba(20, 20, 20, 0.85)',margin:6}));const TooltipNote=_a=>{var{note}=_a,props=__rest(_a,["note"]);return React__default.createElement(Note,Object.assign({},props),note);};function Similar(){this.list=[];this.lastItem=undefined;this.size=0;return this;}Similar.prototype.get=function(key){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){return this.lastItem.val;}index=this.indexOf(key);if(index>=0){this.lastItem=this.list[index];return this.list[index].val;}return undefined;};Similar.prototype.set=function(key,val){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){this.lastItem.val=val;return this;}index=this.indexOf(key);if(index>=0){this.lastItem=this.list[index];this.list[index].val=val;return this;}this.lastItem={key:key,val:val};this.list.push(this.lastItem);this.size++;return this;};Similar.prototype.delete=function(key){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){this.lastItem=undefined;}index=this.indexOf(key);if(index>=0){this.size--;return this.list.splice(index,1)[0];}return undefined;};// important that has() doesn't use get() in case an existing key has a falsy value, in which case has() would return false
330
- Similar.prototype.has=function(key){var index;if(this.lastItem&&this.isEqual(this.lastItem.key,key)){return true;}index=this.indexOf(key);if(index>=0){this.lastItem=this.list[index];return true;}return false;};Similar.prototype.forEach=function(callback,thisArg){var i;for(i=0;i<this.size;i++){callback.call(thisArg||this,this.list[i].val,this.list[i].key,this);}};Similar.prototype.indexOf=function(key){var i;for(i=0;i<this.size;i++){if(this.isEqual(this.list[i].key,key)){return i;}}return-1;};// check if the numbers are equal, or whether they are both precisely NaN (isNaN returns true for all non-numbers)
331
- Similar.prototype.isEqual=function(val1,val2){return val1===val2||val1!==val1&&val2!==val2;};var similar=Similar;var mapOrSimilar=function(forceSimilar){if(typeof Map!=='function'||forceSimilar){var Similar=similar;return new Similar();}else{return new Map();}};var MapOrSimilar=mapOrSimilar;var memoizerific=function(limit){var cache=new MapOrSimilar(process.env.FORCE_SIMILAR_INSTEAD_OF_MAP==='true'),lru=[];return function(fn){var memoizerific=function(){var currentCache=cache,newMap,fnResult,argsLengthMinusOne=arguments.length-1,lruPath=Array(argsLengthMinusOne+1),isMemoized=true,i;if((memoizerific.numArgs||memoizerific.numArgs===0)&&memoizerific.numArgs!==argsLengthMinusOne+1){throw new Error('Memoizerific functions should always be called with the same number of arguments');}// loop through each argument to traverse the map tree
332
- for(i=0;i<argsLengthMinusOne;i++){lruPath[i]={cacheItem:currentCache,arg:arguments[i]};// climb through the hierarchical map tree until the second-last argument has been found, or an argument is missing.
333
- // if all arguments up to the second-last have been found, this will potentially be a cache hit (determined later)
334
- if(currentCache.has(arguments[i])){currentCache=currentCache.get(arguments[i]);continue;}isMemoized=false;// make maps until last value
335
- newMap=new MapOrSimilar(process.env.FORCE_SIMILAR_INSTEAD_OF_MAP==='true');currentCache.set(arguments[i],newMap);currentCache=newMap;}// we are at the last arg, check if it is really memoized
336
- if(isMemoized){if(currentCache.has(arguments[argsLengthMinusOne])){fnResult=currentCache.get(arguments[argsLengthMinusOne]);}else{isMemoized=false;}}// if the result wasn't memoized, compute it and cache it
337
- if(!isMemoized){fnResult=fn.apply(null,arguments);currentCache.set(arguments[argsLengthMinusOne],fnResult);}// if there is a cache limit, purge any extra results
338
- if(limit>0){lruPath[argsLengthMinusOne]={cacheItem:currentCache,arg:arguments[argsLengthMinusOne]};if(isMemoized){moveToMostRecentLru(lru,lruPath);}else{lru.push(lruPath);}if(lru.length>limit){removeCachedResult(lru.shift());}}memoizerific.wasMemoized=isMemoized;memoizerific.numArgs=argsLengthMinusOne+1;return fnResult;};memoizerific.limit=limit;memoizerific.wasMemoized=false;memoizerific.cache=cache;memoizerific.lru=lru;return memoizerific;};};// move current args to most recent position
339
- function moveToMostRecentLru(lru,lruPath){var lruLen=lru.length,lruPathLen=lruPath.length,isMatch,i,ii;for(i=0;i<lruLen;i++){isMatch=true;for(ii=0;ii<lruPathLen;ii++){if(!isEqual(lru[i][ii].arg,lruPath[ii].arg)){isMatch=false;break;}}if(isMatch){break;}}lru.push(lru.splice(i,1)[0]);}// remove least recently used cache item and all dead branches
340
- function removeCachedResult(removedLru){var removedLruLen=removedLru.length,currentLru=removedLru[removedLruLen-1],tmp,i;currentLru.cacheItem.delete(currentLru.arg);// walk down the tree removing dead branches (size 0) along the way
341
- for(i=removedLruLen-2;i>=0;i--){currentLru=removedLru[i];tmp=currentLru.cacheItem.get(currentLru.arg);if(!tmp||!tmp.size){currentLru.cacheItem.delete(currentLru.arg);}else{break;}}}// check if the numbers are equal, or whether they are both precisely NaN (isNaN returns true for all non-numbers)
342
- function isEqual(val1,val2){return val1===val2||val1!==val1&&val2!==val2;}const Title$1=styled(_a=>{var rest=__rest(_a,["active","loading","disabled"]);return React__default.createElement("span",Object.assign({},rest));})(({theme})=>({color:theme.color.defaultText,// Previously was theme.typography.weight.normal but this weight does not exists in Theme
343
- fontWeight:theme.typography.weight.regular}),({active,theme})=>active?{color:theme.color.primary,fontWeight:theme.typography.weight.bold}:{},({loading,theme})=>loading?Object.assign({display:'inline-block',flex:'none'},theme.animation.inlineGlow):{},({disabled,theme})=>disabled?{color:curriedTransparentize$1(0.7,theme.color.defaultText)}:{});const Right=styled.span({'& svg':{transition:'all 200ms ease-out',opacity:0,height:12,width:12,margin:'3px 0',verticalAlign:'top'},'& path':{fill:'inherit'}},({active,theme})=>active?{'& svg':{opacity:1},'& path':{fill:theme.color.primary}}:{});const Center=styled.span({flex:1,textAlign:'left',display:'inline-flex','& > * + *':{paddingLeft:10}});const CenterText=styled.span({flex:1,textAlign:'center'},({active,theme})=>active?{color:theme.color.primary}:{},({theme,disabled})=>disabled?{color:theme.color.mediumdark}:{});const Left=styled.span(({active,theme})=>active?{'& svg':{opacity:1},'& path':{fill:theme.color.primary}}:{});const Item$3=styled.a(({theme})=>({fontSize:theme.typography.size.s1,transition:'all 150ms ease-out',color:curriedTransparentize$1(0.5,theme.color.defaultText),textDecoration:'none',cursor:'pointer',justifyContent:'space-between',lineHeight:'18px',padding:'7px 15px',display:'flex',alignItems:'center','& > * + *':{paddingLeft:10},'&:hover':{background:theme.background.hoverable},'&:hover svg':{opacity:1}}),({disabled})=>disabled?{cursor:'not-allowed'}:{});const getItemProps=memoizerific(100)((onClick,href,LinkWrapper)=>{const result={};if(onClick){Object.assign(result,{onClick});}if(href){Object.assign(result,{href});}if(LinkWrapper&&href){Object.assign(result,{to:href,as:LinkWrapper});}return result;});const ListItem=_a=>{var{loading,left,title,center,right,active,disabled,href,onClick,LinkWrapper}=_a,rest=__rest(_a,["loading","left","title","center","right","active","disabled","href","onClick","LinkWrapper"]);const itemProps=getItemProps(onClick,href,LinkWrapper);const commonProps={active,disabled};return React__default.createElement(Item$3,Object.assign({},commonProps,rest,itemProps),left&&React__default.createElement(Left,Object.assign({},commonProps),left),title||center?React__default.createElement(Center,null,title&&React__default.createElement(Title$1,Object.assign({},commonProps,{loading:loading}),title),center&&React__default.createElement(CenterText,Object.assign({},commonProps),center)):null,right&&React__default.createElement(Right,Object.assign({},commonProps),right));};ListItem.defaultProps={loading:false,left:null,title:React__default.createElement("span",null,"Loading state"),center:null,right:null,active:false,disabled:false,href:null,LinkWrapper:null,onClick:null};const List$2=styled.div({minWidth:180,overflow:'hidden',overflowY:'auto',maxHeight:13.5*32},({theme})=>({borderRadius:theme.appBorderRadius*2}));const Item$2=props=>{const{LinkWrapper,onClick:onClickFromProps}=props,rest=__rest(props,["LinkWrapper","onClick"]);const{title,href,active}=rest;const onClick=useCallback(event=>{onClickFromProps(event,rest);},[onClickFromProps]);const hasOnClick=!!onClickFromProps;return React__default.createElement(ListItem,Object.assign({title:title,active:active,href:href,LinkWrapper:LinkWrapper},rest,hasOnClick?{onClick}:{}));};const TooltipLinkList=({links,LinkWrapper})=>React__default.createElement(List$2,null,links.map(_a=>{var{isGatsby}=_a,p=__rest(_a,["isGatsby"]);return React__default.createElement(Item$2,Object.assign({key:p.id,LinkWrapper:isGatsby?LinkWrapper:null},p));}));TooltipLinkList.defaultProps={LinkWrapper:ListItem.defaultProps.LinkWrapper};const Side=styled.div({display:'flex',whiteSpace:'nowrap',flexBasis:'auto',flexShrink:0,marginLeft:3,marginRight:3},({left})=>left?{'& > *':{marginLeft:4}}:{},({right})=>right?{marginLeft:30,'& > *':{marginRight:4}}:{});Side.displayName='Side';const Bar$1=styled(({children,className})=>React__default.createElement(ScrollArea,{horizontal:true,vertical:false,className:className},children))(({theme})=>({color:theme.barTextColor,width:'100%',height:40,flexShrink:0,overflow:'auto',overflowY:'hidden'}),({theme,border})=>border?{boxShadow:`${theme.appBorderColor} 0 -1px 0 0 inset`,background:theme.barBg}:{});Bar$1.displayName='Bar';const BarInner=styled.div(({bgColor})=>({display:'flex',justifyContent:'space-between',position:'relative',flexWrap:'nowrap',flexShrink:0,height:40,backgroundColor:bgColor||''}));const FlexBar=_a=>{var{children,backgroundColor}=_a,rest=__rest(_a,["children","backgroundColor"]);const[left,right]=Children.toArray(children);return React__default.createElement(Bar$1,Object.assign({},rest),React__default.createElement(BarInner,{bgColor:backgroundColor},React__default.createElement(Side,{left:true},left),right?React__default.createElement(Side,{right:true},right):null));};FlexBar.displayName='FlexBar';var top='top';var bottom='bottom';var right='right';var left='left';var auto='auto';var basePlacements=[top,bottom,right,left];var start='start';var end='end';var clippingParents='clippingParents';var viewport='viewport';var popper='popper';var reference='reference';var variationPlacements=/*#__PURE__*/basePlacements.reduce(function(acc,placement){return acc.concat([placement+"-"+start,placement+"-"+end]);},[]);var placements=/*#__PURE__*/[].concat(basePlacements,[auto]).reduce(function(acc,placement){return acc.concat([placement,placement+"-"+start,placement+"-"+end]);},[]);// modifiers that need to read the DOM
329
+ '&:hover':{transform:'none'}});const Button$1=Object.assign(forwardRef((props,ref)=>React__default.createElement(ButtonStyled,Object.assign({},props,{tertiary:true,small:true,inForm:true},{ref:ref}))),{displayName:'Button'});const Form=Object.assign(styled.form({boxSizing:'border-box',width:'100%'}),{Field,Input:Input$1,Select,Textarea,Button:Button$1});const LazyWithTooltip=lazy(()=>import('./WithTooltip-040f3a83.js').then(mod=>({default:mod.WithTooltip})));const WithTooltip=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},React__default.createElement(LazyWithTooltip,Object.assign({},props)));const LazyWithTooltipPure=lazy(()=>import('./WithTooltip-040f3a83.js').then(mod=>({default:mod.WithTooltipPure})));const WithTooltipPure=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},React__default.createElement(LazyWithTooltipPure,Object.assign({},props)));const Title$2=styled.div(({theme})=>({fontWeight:theme.typography.weight.black}));const Desc=styled.span();const Links=styled.div(({theme})=>({marginTop:8,textAlign:'center','> *':{margin:'0 8px',fontWeight:theme.typography.weight.black}}));const Message=styled.div(({theme})=>({color:theme.textColor,lineHeight:'18px'}));const MessageWrapper=styled.div({padding:15,width:280,boxSizing:'border-box'});const TooltipMessage=({title,desc,links})=>{return React__default.createElement(MessageWrapper,null,React__default.createElement(Message,null,title&&React__default.createElement(Title$2,null,title),desc&&React__default.createElement(Desc,null,desc)),links&&React__default.createElement(Links,null,links.map(_a=>{var{title:linkTitle}=_a,other=__rest(_a,["title"]);return React__default.createElement(Link,Object.assign({},other,{key:linkTitle}),linkTitle);})));};TooltipMessage.defaultProps={title:null,desc:null,links:null};const Note=styled.div(({theme})=>({padding:'2px 6px',lineHeight:'16px',fontSize:10,fontWeight:theme.typography.weight.bold,color:theme.color.lightest,boxShadow:'0 0 5px 0 rgba(0, 0, 0, 0.3)',borderRadius:4,whiteSpace:'nowrap',pointerEvents:'none',zIndex:-1,background:theme.base==='light'?'rgba(60, 60, 60, 0.9)':'rgba(20, 20, 20, 0.85)',margin:6}));const TooltipNote=_a=>{var{note}=_a,props=__rest(_a,["note"]);return React__default.createElement(Note,Object.assign({},props),note);};const Title$1=styled(_a=>{var rest=__rest(_a,["active","loading","disabled"]);return React__default.createElement("span",Object.assign({},rest));})(({theme})=>({color:theme.color.defaultText,// Previously was theme.typography.weight.normal but this weight does not exists in Theme
330
+ fontWeight:theme.typography.weight.regular}),({active,theme})=>active?{color:theme.color.primary,fontWeight:theme.typography.weight.bold}:{},({loading,theme})=>loading?Object.assign({display:'inline-block',flex:'none'},theme.animation.inlineGlow):{},({disabled,theme})=>disabled?{color:curriedTransparentize$1(0.7,theme.color.defaultText)}:{});const Right=styled.span({'& svg':{transition:'all 200ms ease-out',opacity:0,height:12,width:12,margin:'3px 0',verticalAlign:'top'},'& path':{fill:'inherit'}},({active,theme})=>active?{'& svg':{opacity:1},'& path':{fill:theme.color.primary}}:{});const Center=styled.span({flex:1,textAlign:'left',display:'inline-flex','& > * + *':{paddingLeft:10}});const CenterText=styled.span({flex:1,textAlign:'center'},({active,theme})=>active?{color:theme.color.primary}:{},({theme,disabled})=>disabled?{color:theme.color.mediumdark}:{});const Left=styled.span(({active,theme})=>active?{'& svg':{opacity:1},'& path':{fill:theme.color.primary}}:{});const Item$3=styled.a(({theme})=>({fontSize:theme.typography.size.s1,transition:'all 150ms ease-out',color:curriedTransparentize$1(0.5,theme.color.defaultText),textDecoration:'none',cursor:'pointer',justifyContent:'space-between',lineHeight:'18px',padding:'7px 15px',display:'flex',alignItems:'center','& > * + *':{paddingLeft:10},'&:hover':{background:theme.background.hoverable},'&:hover svg':{opacity:1}}),({disabled})=>disabled?{cursor:'not-allowed'}:{});const getItemProps=memoize$2(100)((onClick,href,LinkWrapper)=>{const result={};if(onClick){Object.assign(result,{onClick});}if(href){Object.assign(result,{href});}if(LinkWrapper&&href){Object.assign(result,{to:href,as:LinkWrapper});}return result;});const ListItem=_a=>{var{loading,left,title,center,right,active,disabled,href,onClick,LinkWrapper}=_a,rest=__rest(_a,["loading","left","title","center","right","active","disabled","href","onClick","LinkWrapper"]);const itemProps=getItemProps(onClick,href,LinkWrapper);const commonProps={active,disabled};return React__default.createElement(Item$3,Object.assign({},commonProps,rest,itemProps),left&&React__default.createElement(Left,Object.assign({},commonProps),left),title||center?React__default.createElement(Center,null,title&&React__default.createElement(Title$1,Object.assign({},commonProps,{loading:loading}),title),center&&React__default.createElement(CenterText,Object.assign({},commonProps),center)):null,right&&React__default.createElement(Right,Object.assign({},commonProps),right));};ListItem.defaultProps={loading:false,left:null,title:React__default.createElement("span",null,"Loading state"),center:null,right:null,active:false,disabled:false,href:null,LinkWrapper:null,onClick:null};const List$2=styled.div({minWidth:180,overflow:'hidden',overflowY:'auto',maxHeight:13.5*32},({theme})=>({borderRadius:theme.appBorderRadius*2}));const Item$2=props=>{const{LinkWrapper,onClick:onClickFromProps}=props,rest=__rest(props,["LinkWrapper","onClick"]);const{title,href,active}=rest;const onClick=useCallback(event=>{onClickFromProps(event,rest);},[onClickFromProps]);const hasOnClick=!!onClickFromProps;return React__default.createElement(ListItem,Object.assign({title:title,active:active,href:href,LinkWrapper:LinkWrapper},rest,hasOnClick?{onClick}:{}));};const TooltipLinkList=({links,LinkWrapper})=>React__default.createElement(List$2,null,links.map(_a=>{var{isGatsby}=_a,p=__rest(_a,["isGatsby"]);return React__default.createElement(Item$2,Object.assign({key:p.id,LinkWrapper:isGatsby?LinkWrapper:null},p));}));TooltipLinkList.defaultProps={LinkWrapper:ListItem.defaultProps.LinkWrapper};const Side=styled.div({display:'flex',whiteSpace:'nowrap',flexBasis:'auto',flexShrink:0,marginLeft:3,marginRight:3},({left})=>left?{'& > *':{marginLeft:4}}:{},({right})=>right?{marginLeft:30,'& > *':{marginRight:4}}:{});Side.displayName='Side';const Bar$1=styled(({children,className})=>React__default.createElement(ScrollArea,{horizontal:true,vertical:false,className:className},children))(({theme})=>({color:theme.barTextColor,width:'100%',height:40,flexShrink:0,overflow:'auto',overflowY:'hidden'}),({theme,border})=>border?{boxShadow:`${theme.appBorderColor} 0 -1px 0 0 inset`,background:theme.barBg}:{});Bar$1.displayName='Bar';const BarInner=styled.div(({bgColor})=>({display:'flex',justifyContent:'space-between',position:'relative',flexWrap:'nowrap',flexShrink:0,height:40,backgroundColor:bgColor||''}));const FlexBar=_a=>{var{children,backgroundColor}=_a,rest=__rest(_a,["children","backgroundColor"]);const[left,right]=Children.toArray(children);return React__default.createElement(Bar$1,Object.assign({},rest),React__default.createElement(BarInner,{bgColor:backgroundColor},React__default.createElement(Side,{left:true},left),right?React__default.createElement(Side,{right:true},right):null));};FlexBar.displayName='FlexBar';var top='top';var bottom='bottom';var right='right';var left='left';var auto='auto';var basePlacements=[top,bottom,right,left];var start='start';var end='end';var clippingParents='clippingParents';var viewport='viewport';var popper='popper';var reference='reference';var variationPlacements=/*#__PURE__*/basePlacements.reduce(function(acc,placement){return acc.concat([placement+"-"+start,placement+"-"+end]);},[]);var placements=/*#__PURE__*/[].concat(basePlacements,[auto]).reduce(function(acc,placement){return acc.concat([placement,placement+"-"+start,placement+"-"+end]);},[]);// modifiers that need to read the DOM
344
331
  var beforeRead='beforeRead';var read='read';var afterRead='afterRead';// pure-logic modifiers
345
332
  var beforeMain='beforeMain';var main='main';var afterMain='afterMain';// modifier with the purpose to write to the DOM (or write into a framework state)
346
333
  var beforeWrite='beforeWrite';var write='write';var afterWrite='afterWrite';var modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];const ButtonOrLink=_a=>{var{children}=_a,restProps=__rest(_a,["children"]);return restProps.href!=null?React__default.createElement("a",Object.assign({},restProps),children):React__default.createElement("button",Object.assign({type:"button"},restProps),children);};const TabButton=styled(ButtonOrLink,{shouldForwardProp:isPropValid})({whiteSpace:'normal',display:'inline-flex',overflow:'hidden',verticalAlign:'top',justifyContent:'center',alignItems:'center',textAlign:'center',textDecoration:'none','&:empty':{display:'none'}},({theme})=>({padding:'0 15px',transition:'color 0.2s linear, border-bottom-color 0.2s linear',height:40,lineHeight:'12px',cursor:'pointer',background:'transparent',border:'0 solid transparent',borderTop:'3px solid transparent',borderBottom:'3px solid transparent',fontWeight:'bold',fontSize:13,'&:focus':{outline:'0 none',borderBottomColor:theme.color.secondary}}),({active,textColor,theme})=>active?{color:textColor||theme.barSelectedColor,borderBottomColor:theme.barSelectedColor}:{color:textColor||theme.barTextColor,borderBottomColor:'transparent'});TabButton.displayName='TabButton';const IconButton=styled(ButtonOrLink,{shouldForwardProp:isPropValid})(()=>({alignItems:'center',background:'transparent',border:'none',borderRadius:4,color:'inherit',cursor:'pointer',display:'inline-flex',fontSize:13,fontWeight:'bold',height:28,justifyContent:'center',marginTop:6,padding:'8px 7px','& > svg':{width:14}}),({active,theme})=>active?{backgroundColor:theme.background.hoverable,color:theme.color.secondary}:{},({disabled,theme})=>disabled?{opacity:0.5,cursor:'not-allowed'}:{'&:hover, &:focus-visible':{background:curriedTransparentize$1(0.88,theme.color.secondary),color:theme.color.secondary},'&:focus-visible':{outline:auto},'&:focus:not(:focus-visible)':{outline:'none'}});IconButton.displayName='IconButton';const IconPlaceholder=styled.div(({theme})=>({width:14,height:14,backgroundColor:theme.appBorderColor,animation:`${theme.animation.glow} 1.5s ease-in-out infinite`}));const IconButtonSkeletonWrapper=styled.div(()=>({marginTop:6,padding:7,height:28}));const IconButtonSkeleton=()=>React__default.createElement(IconButtonSkeletonWrapper,null,React__default.createElement(IconPlaceholder,null));const Wrapper$6=styled.div(({theme,bordered})=>bordered?{backgroundClip:'padding-box',border:`1px solid ${theme.appBorderColor}`,borderRadius:theme.appBorderRadius,overflow:'hidden',boxSizing:'border-box'}:{},({absolute})=>absolute?{width:'100%',height:'100%',boxSizing:'border-box',display:'flex',flexDirection:'column'}:{display:'block'});const TabBar=styled.div({overflow:'hidden','&:first-of-type':{marginLeft:-3}});const Content=styled.div({display:'block',position:'relative'},({theme})=>({fontSize:theme.typography.size.s2-1,background:theme.background.content}),({bordered,theme})=>bordered?{borderRadius:`0 0 ${theme.appBorderRadius-1}px ${theme.appBorderRadius-1}px`}:{},({absolute,bordered})=>absolute?{height:`calc(100% - ${bordered?42:40}px)`,position:'absolute',left:0+(bordered?1:0),right:0+(bordered?1:0),bottom:0+(bordered?1:0),top:40+(bordered?1:0),overflow:'auto',[`& > *:first-child`]:{position:'absolute',left:0+(bordered?1:0),right:0+(bordered?1:0),bottom:0+(bordered?1:0),top:0+(bordered?1:0),height:`calc(100% - ${bordered?2:0}px)`,overflow:'auto'}}:{});const VisuallyHidden=styled.div(({active})=>active?{display:'block'}:{display:'none'});const TabWrapper=({active,render,children})=>React__default.createElement(VisuallyHidden,{active:active},render?render():children);const childrenToList=(children,selected)=>Children.toArray(children).map(({props:{title,id,color,children:childrenOfChild}},index)=>{const content=Array.isArray(childrenOfChild)?childrenOfChild[0]:childrenOfChild;return{active:selected?id===selected:index===0,title,id,color,render:typeof content==='function'?content:({active,key})=>React__default.createElement(VisuallyHidden,{key:key,active:active,role:"tabpanel"},content)};});const Tabs=memo(({children,selected,actions,absolute,bordered,tools,backgroundColor,id:htmlId})=>{const list=childrenToList(children,selected);return list.length?React__default.createElement(Wrapper$6,{absolute:absolute,bordered:bordered,id:htmlId},React__default.createElement(FlexBar,{border:true,backgroundColor:backgroundColor},React__default.createElement(TabBar,{role:"tablist"},list.map(({title,id,active,color})=>{const tabTitle=typeof title==='function'?title():title;return React__default.createElement(TabButton,{id:`tabbutton-${sanitize(tabTitle)}`,className:`tabbutton ${active?'tabbutton-active':''}`,type:"button",key:id,active:active,textColor:color,onClick:e=>{e.preventDefault();actions.onSelect(id);},role:"tab"},tabTitle);})),tools?React__default.createElement(Fragment,null,tools):null),React__default.createElement(Content,{id:"panel-tab-content",bordered:bordered,absolute:absolute},list.map(({id,active,render})=>render({key:id,active})))):React__default.createElement(Placeholder,null,React__default.createElement(Fragment,{key:"title"},"Nothing found"));});Tabs.displayName='Tabs';Tabs.defaultProps={id:null,children:null,tools:null,selected:null,absolute:false,bordered:false};class TabsState extends Component{constructor(props){super(props);this.handlers={onSelect:id=>this.setState({selected:id})};this.state={selected:props.initial};}render(){const{bordered=false,absolute=false,children,backgroundColor}=this.props;const{selected}=this.state;return React__default.createElement(Tabs,{bordered:bordered,absolute:absolute,selected:selected,backgroundColor:backgroundColor,actions:this.handlers},children);}}TabsState.defaultProps={children:[],initial:null,absolute:false,bordered:false,backgroundColor:''};const Separator=styled.span(({theme})=>({width:1,height:20,background:theme.appBorderColor,marginTop:10,marginLeft:6,marginRight:2}),({force})=>force?{}:{'& + &':{display:'none'}});Separator.displayName='Separator';const interleaveSeparators=list=>list.reduce((acc,item,index)=>item?React__default.createElement(Fragment,{key:item.id||item.key||`f-${index}`},acc,index>0?React__default.createElement(Separator,{key:`s-${index}`}):null,item.render()||item):acc,null);const usePrevious=value=>{const ref=useRef();useEffect(()=>{// happens after return
@@ -376,7 +363,7 @@ if(CONFIG_TYPE!=='DEVELOPMENT'||!EventSource)return undefined;const eventSource=
376
363
  * items. The preview also shows the source for the component
377
364
  * as a drop-down.
378
365
  */const Preview=_a=>{var{isLoading,isColumn,columns,children,withSource,withToolbar=false,isExpanded=false,additionalActions,className}=_a,props=__rest(_a,["isLoading","isColumn","columns","children","withSource","withToolbar","isExpanded","additionalActions","className"]);const[expanded,setExpanded]=useState(isExpanded);const{source,actionItem}=getSource(withSource,expanded,setExpanded);const[scale,setScale]=useState(1);const previewClasses=[className].concat(['sbdocs','sbdocs-preview']);const defaultActionItems=withSource?[actionItem]:[];const[additionalActionItems,setAdditionalActionItems]=useState(additionalActions?[...additionalActions]:[]);const actionItems=[...defaultActionItems,...additionalActionItems];// @ts-ignore
379
- const layout=getLayout(Children.count(children)===1?[children]:children);const{window:globalWindow}=window_1;const copyToClipboard=useCallback(text=>__awaiter(void 0,void 0,void 0,function*(){const{createCopyToClipboardFunction}=yield import('./syntaxhighlighter-848db87b.js');createCopyToClipboardFunction();}),[]);const onCopyCapture=e=>{e.preventDefault();if(additionalActionItems.filter(item=>item.title==='Copied').length===0){copyToClipboard(source.props.code).then(()=>{setAdditionalActionItems([...additionalActionItems,{title:'Copied',onClick:()=>{}}]);globalWindow.setTimeout(()=>setAdditionalActionItems(additionalActionItems.filter(item=>item.title!=='Copied')),1500);});}};return React__default.createElement(PreviewContainer,Object.assign({},{withSource,withToolbar},props,{className:previewClasses.join(' ')}),withToolbar&&React__default.createElement(PositionedToolbar,{isLoading:isLoading,border:true,zoom:z=>setScale(scale*z),resetZoom:()=>setScale(1),storyId:getStoryId(children),baseUrl:"./iframe.html"}),React__default.createElement(ZoomContext.Provider,{value:{scale}},React__default.createElement(Relative,{className:"docs-story",onCopyCapture:withSource&&onCopyCapture},React__default.createElement(ChildrenContainer,{isColumn:isColumn||!Array.isArray(children),columns:columns,layout:layout},React__default.createElement(Zoom$1.Element,{scale:scale},Array.isArray(children)?// eslint-disable-next-line react/no-array-index-key
366
+ const layout=getLayout(Children.count(children)===1?[children]:children);const{window:globalWindow}=window_1;const copyToClipboard=useCallback(text=>__awaiter(void 0,void 0,void 0,function*(){const{createCopyToClipboardFunction}=yield import('./syntaxhighlighter-5c1fdb3d.js');createCopyToClipboardFunction();}),[]);const onCopyCapture=e=>{e.preventDefault();if(additionalActionItems.filter(item=>item.title==='Copied').length===0){copyToClipboard(source.props.code).then(()=>{setAdditionalActionItems([...additionalActionItems,{title:'Copied',onClick:()=>{}}]);globalWindow.setTimeout(()=>setAdditionalActionItems(additionalActionItems.filter(item=>item.title!=='Copied')),1500);});}};return React__default.createElement(PreviewContainer,Object.assign({},{withSource,withToolbar},props,{className:previewClasses.join(' ')}),withToolbar&&React__default.createElement(PositionedToolbar,{isLoading:isLoading,border:true,zoom:z=>setScale(scale*z),resetZoom:()=>setScale(1),storyId:getStoryId(children),baseUrl:"./iframe.html"}),React__default.createElement(ZoomContext.Provider,{value:{scale}},React__default.createElement(Relative,{className:"docs-story",onCopyCapture:withSource&&onCopyCapture},React__default.createElement(ChildrenContainer,{isColumn:isColumn||!Array.isArray(children),columns:columns,layout:layout},React__default.createElement(Zoom$1.Element,{scale:scale},Array.isArray(children)?// eslint-disable-next-line react/no-array-index-key
380
367
  children.map((child,i)=>React__default.createElement("div",{key:i},child)):React__default.createElement("div",null,children))),React__default.createElement(ActionBar,{actionItems:actionItems}))),withSource&&expanded&&source);};const StyledPreview=styled(Preview)(()=>({'.docs-story':{paddingTop:32,paddingBottom:40}}));const PreviewSkeleton=()=>React__default.createElement(StyledPreview,{isLoading:true,withToolbar:true},React__default.createElement(StorySkeleton,null));/**
381
368
  * A specialized version of `_.map` for arrays without support for iteratee
382
369
  * shorthands.
@@ -1653,7 +1640,7 @@ marginTop:0,marginBottom:0,'th:first-of-type, td:first-of-type':{paddingLeft:0},
1653
1640
  * // => [2, 1]
1654
1641
  */function uniq(array){return array&&array.length?baseUniq(array):[];}var uniq_1=uniq;const ITEMS_BEFORE_EXPANSION=8;const Summary=styled.div(({isExpanded})=>({display:'flex',flexDirection:isExpanded?'column':'row',flexWrap:'wrap',alignItems:'flex-start',marginBottom:'-4px',minWidth:100}));const Text$2=styled.span(codeCommon,({theme,simple=false})=>Object.assign({flex:'0 0 auto',fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,wordBreak:'break-word',whiteSpace:'normal',maxWidth:'100%',margin:0,marginRight:'4px',marginBottom:'4px',paddingTop:'2px',paddingBottom:'2px',lineHeight:'13px'},simple&&{background:'transparent',border:'0 none',paddingLeft:0}));const ExpandButton=styled.button(({theme})=>({fontFamily:theme.typography.fonts.mono,color:theme.color.secondary,marginBottom:'4px',background:'none',border:'none'}));const Expandable=styled.div(codeCommon,({theme})=>({fontFamily:theme.typography.fonts.mono,color:theme.color.secondary,fontSize:theme.typography.size.s1,margin:0,whiteSpace:'nowrap',display:'flex',alignItems:'center'}));const Detail=styled.div(({theme,width})=>({width,minWidth:200,maxWidth:800,padding:15,// Don't remove the mono fontFamily here even if it seems useless, this is used by the browser to calculate the length of a "ch" unit.
1655
1642
  fontFamily:theme.typography.fonts.mono,fontSize:theme.typography.size.s1,// Most custom stylesheet will reset the box-sizing to "border-box" and will break the tooltip.
1656
- boxSizing:'content-box','& code':{padding:'0 !important'}}));const ArrowIcon=styled(Icons)({height:10,width:10,minWidth:10,marginLeft:4});const EmptyArg=()=>{return React__default.createElement("span",null,"-");};const ArgText=({text,simple})=>{return React__default.createElement(Text$2,{simple:simple},text);};const calculateDetailWidth=memoizerific(1000)(detail=>{const lines=detail.split(/\r?\n/);return`${Math.max(...lines.map(x=>x.length))}ch`;});const getSummaryItems=summary=>{if(!summary)return[summary];const splittedItems=summary.split('|');const summaryItems=splittedItems.map(value=>value.trim());return uniq_1(summaryItems);};const renderSummaryItems=(summaryItems,isExpanded=true)=>{let items=summaryItems;if(!isExpanded){items=summaryItems.slice(0,ITEMS_BEFORE_EXPANSION);}return items.map(item=>React__default.createElement(ArgText,{key:item,text:item===''?'""':item}));};const ArgSummary=({value,initialExpandedArgs})=>{const{summary,detail}=value;const[isOpen,setIsOpen]=useState(false);const[isExpanded,setIsExpanded]=useState(initialExpandedArgs||false);if(summary===undefined||summary===null)return null;// summary is used for the default value
1643
+ boxSizing:'content-box','& code':{padding:'0 !important'}}));const ArrowIcon=styled(Icons)({height:10,width:10,minWidth:10,marginLeft:4});const EmptyArg=()=>{return React__default.createElement("span",null,"-");};const ArgText=({text,simple})=>{return React__default.createElement(Text$2,{simple:simple},text);};const calculateDetailWidth=memoize$2(1000)(detail=>{const lines=detail.split(/\r?\n/);return`${Math.max(...lines.map(x=>x.length))}ch`;});const getSummaryItems=summary=>{if(!summary)return[summary];const splittedItems=summary.split('|');const summaryItems=splittedItems.map(value=>value.trim());return uniq_1(summaryItems);};const renderSummaryItems=(summaryItems,isExpanded=true)=>{let items=summaryItems;if(!isExpanded){items=summaryItems.slice(0,ITEMS_BEFORE_EXPANSION);}return items.map(item=>React__default.createElement(ArgText,{key:item,text:item===''?'""':item}));};const ArgSummary=({value,initialExpandedArgs})=>{const{summary,detail}=value;const[isOpen,setIsOpen]=useState(false);const[isExpanded,setIsExpanded]=useState(initialExpandedArgs||false);if(summary===undefined||summary===null)return null;// summary is used for the default value
1657
1644
  // below check fixes not displaying default values for boolean typescript vars
1658
1645
  const summaryAsString=typeof summary.toString==='function'?summary.toString():summary;if(detail==null){const cannotBeSafelySplitted=/[(){}[\]<>]/.test(summaryAsString);if(cannotBeSafelySplitted){return React__default.createElement(ArgText,{text:summaryAsString});}const summaryItems=getSummaryItems(summaryAsString);const itemsCount=summaryItems.length;const hasManyItems=itemsCount>ITEMS_BEFORE_EXPANSION;return hasManyItems?React__default.createElement(Summary,{isExpanded:isExpanded},renderSummaryItems(summaryItems,isExpanded),React__default.createElement(ExpandButton,{onClick:()=>setIsExpanded(!isExpanded)},isExpanded?'Show less...':`Show ${itemsCount-ITEMS_BEFORE_EXPANSION} more...`)):React__default.createElement(Summary,null,renderSummaryItems(summaryItems));}return React__default.createElement(WithTooltipPure,{closeOnClick:true,trigger:"click",placement:"bottom",tooltipShown:isOpen,onVisibilityChange:isVisible=>{setIsOpen(isVisible);},tooltip:React__default.createElement(Detail,{width:calculateDetailWidth(detail)},React__default.createElement(SyntaxHighlighter,{language:"jsx",format:false},detail))},React__default.createElement(Expandable,{className:"sbdocs-expandable"},React__default.createElement("span",null,summaryAsString),React__default.createElement(ArrowIcon,{icon:isOpen?'arrowup':'arrowdown'})));};const ArgValue=({value,initialExpandedArgs})=>{return value==null?React__default.createElement(EmptyArg,null):React__default.createElement(ArgSummary,{value:value,initialExpandedArgs:initialExpandedArgs});};/**
1659
1646
  * Adds `control` prefix to make ID attribute more specific.
@@ -2010,7 +1997,7 @@ JsonTree.defaultProps={rootName:'root',isCollapsed:(keyPath,deep)=>deep!==-1,get
2010
1997
  ${curriedLighten$1(0.02,theme.input.background)} ${(value-min)/(max-min)*100}%,
2011
1998
  ${curriedLighten$1(0.02,theme.input.background)} 100%)`,boxShadow:`${theme.appBorderColor} 0 0 0 1px inset`,color:'transparent',width:'100%',height:'6px',cursor:'pointer'},'&::-ms-fill-lower':{borderRadius:6},'&::-ms-fill-upper':{borderRadius:6},'&::-ms-thumb':{width:16,height:16,background:`${theme.input.background}`,border:`1px solid ${rgba(theme.appBorderColor,0.2)}`,borderRadius:50,cursor:'grab',marginTop:0},'@supports (-ms-ime-align:auto)':{'input[type=range]':{margin:'0'}}}));const RangeLabel=styled.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:'nowrap',fontFeatureSettings:'tnum',fontVariantNumeric:'tabular-nums'});const RangeWrapper=styled.div({display:'flex',alignItems:'center',width:'100%'});function getNumberOfDecimalPlaces(number){const match=number.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return!match?0:Math.max(0,// Number of digits right of decimal point.
2012
1999
  (match[1]?match[1].length:0)-(// Adjust for scientific notation.
2013
- match[2]?+match[2]:0));}const RangeControl=({name,value,onChange,min=0,max=100,step=1,onBlur,onFocus})=>{const handleChange=event=>{onChange(parse$1(event.target.value));};const hasValue=value!==undefined;const numberOFDecimalsPlaces=useMemo(()=>getNumberOfDecimalPlaces(step),[step]);return React__default.createElement(RangeWrapper,null,React__default.createElement(RangeLabel,null,min),React__default.createElement(RangeInput,Object.assign({id:getControlId(name),type:"range",onChange:handleChange},{name,value,min,max,step,onFocus,onBlur})),React__default.createElement(RangeLabel,null,`${hasValue?value.toFixed(numberOFDecimalsPlaces):'--'}`," / ",max));};const Wrapper$1=styled.label({display:'flex'});const TextControl=({name,value,onChange,onFocus,onBlur})=>{const handleChange=event=>{onChange(event.target.value);};const[forceVisible,setForceVisible]=useState(false);const onForceVisible=useCallback(()=>{onChange('');setForceVisible(true);},[setForceVisible]);if(value===undefined){return React__default.createElement(Form.Button,{id:getControlSetterButtonId(name),onClick:onForceVisible},"Set string");}const isValid=typeof value==='string';return React__default.createElement(Wrapper$1,null,React__default.createElement(Form.Textarea,Object.assign({id:getControlId(name),onChange:handleChange,size:"flex",placeholder:"Edit string...",autoFocus:forceVisible,valid:isValid?null:'error'},{name,value:isValid?value:'',onFocus,onBlur})));};const FileInput=styled(Form.Input)({padding:10});function revokeOldUrls(urls){urls.forEach(url=>{if(url.startsWith('blob:')){URL.revokeObjectURL(url);}});}const FilesControl=({onChange,name,accept='image/*',value})=>{function handleFileChange(e){if(!e.target.files){return;}const fileUrls=Array.from(e.target.files).map(file=>URL.createObjectURL(file));onChange(fileUrls);revokeOldUrls(value);}return React__default.createElement(FileInput,{id:getControlId(name),type:"file",name:name,multiple:true,onChange:handleFileChange,accept:accept,size:"flex"});};const LazyColorControl=lazy(()=>import('./Color-31c3091f.js'));const ColorControl=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},React__default.createElement(LazyColorControl,Object.assign({},props)));const Controls={array:ObjectControl,object:ObjectControl,boolean:BooleanControl,color:ColorControl,date:DateControl,number:NumberControl,check:OptionsControl,'inline-check':OptionsControl,radio:OptionsControl,'inline-radio':OptionsControl,select:OptionsControl,'multi-select':OptionsControl,range:RangeControl,text:TextControl,file:FilesControl};const NoControl=()=>React__default.createElement(React__default.Fragment,null,"-");const ArgControl=({row,arg,updateArgs})=>{const{key,control}=row;const[isFocused,setFocused]=useState(false);// box because arg can be a fn (e.g. actions) and useState calls fn's
2000
+ match[2]?+match[2]:0));}const RangeControl=({name,value,onChange,min=0,max=100,step=1,onBlur,onFocus})=>{const handleChange=event=>{onChange(parse$1(event.target.value));};const hasValue=value!==undefined;const numberOFDecimalsPlaces=useMemo(()=>getNumberOfDecimalPlaces(step),[step]);return React__default.createElement(RangeWrapper,null,React__default.createElement(RangeLabel,null,min),React__default.createElement(RangeInput,Object.assign({id:getControlId(name),type:"range",onChange:handleChange},{name,value,min,max,step,onFocus,onBlur})),React__default.createElement(RangeLabel,null,`${hasValue?value.toFixed(numberOFDecimalsPlaces):'--'}`," / ",max));};const Wrapper$1=styled.label({display:'flex'});const TextControl=({name,value,onChange,onFocus,onBlur})=>{const handleChange=event=>{onChange(event.target.value);};const[forceVisible,setForceVisible]=useState(false);const onForceVisible=useCallback(()=>{onChange('');setForceVisible(true);},[setForceVisible]);if(value===undefined){return React__default.createElement(Form.Button,{id:getControlSetterButtonId(name),onClick:onForceVisible},"Set string");}const isValid=typeof value==='string';return React__default.createElement(Wrapper$1,null,React__default.createElement(Form.Textarea,Object.assign({id:getControlId(name),onChange:handleChange,size:"flex",placeholder:"Edit string...",autoFocus:forceVisible,valid:isValid?null:'error'},{name,value:isValid?value:'',onFocus,onBlur})));};const FileInput=styled(Form.Input)({padding:10});function revokeOldUrls(urls){urls.forEach(url=>{if(url.startsWith('blob:')){URL.revokeObjectURL(url);}});}const FilesControl=({onChange,name,accept='image/*',value})=>{function handleFileChange(e){if(!e.target.files){return;}const fileUrls=Array.from(e.target.files).map(file=>URL.createObjectURL(file));onChange(fileUrls);revokeOldUrls(value);}return React__default.createElement(FileInput,{id:getControlId(name),type:"file",name:name,multiple:true,onChange:handleFileChange,accept:accept,size:"flex"});};const LazyColorControl=lazy(()=>import('./Color-f9ce6f57.js'));const ColorControl=props=>React__default.createElement(Suspense,{fallback:React__default.createElement("div",null)},React__default.createElement(LazyColorControl,Object.assign({},props)));const Controls={array:ObjectControl,object:ObjectControl,boolean:BooleanControl,color:ColorControl,date:DateControl,number:NumberControl,check:OptionsControl,'inline-check':OptionsControl,radio:OptionsControl,'inline-radio':OptionsControl,select:OptionsControl,'multi-select':OptionsControl,range:RangeControl,text:TextControl,file:FilesControl};const NoControl=()=>React__default.createElement(React__default.Fragment,null,"-");const ArgControl=({row,arg,updateArgs})=>{const{key,control}=row;const[isFocused,setFocused]=useState(false);// box because arg can be a fn (e.g. actions) and useState calls fn's
2014
2001
  const[boxedValue,setBoxedValue]=useState({value:arg});useEffect(()=>{if(!isFocused)setBoxedValue({value:arg});},[isFocused,arg]);const onChange=useCallback(argVal=>{setBoxedValue({value:argVal});updateArgs({[key]:argVal});return argVal;},[updateArgs,key]);const onBlur=useCallback(()=>setFocused(false),[]);const onFocus=useCallback(()=>setFocused(true),[]);if(!control||control.disable)return React__default.createElement(NoControl,null);// row.name is a display name and not a suitable DOM input id or name - i might contain whitespace etc.
2015
2002
  // row.key is a hash key and therefore a much safer choice
2016
2003
  const props={name:key,argType:row,value:boxedValue.value,onChange,onBlur,onFocus};const Control=Controls[control.type]||NoControl;return React__default.createElement(Control,Object.assign({},props,control,{controlType:control.type}));};const Name=styled.span({fontWeight:'bold'});const Required=styled.span(({theme})=>({color:theme.color.negative,fontFamily:theme.typography.fonts.mono,cursor:'help'}));const Description=styled.div(({theme})=>({'&&':{p:{margin:'0 0 10px 0'},a:{color:theme.color.secondary}},code:Object.assign(Object.assign({},codeCommon({theme})),{fontSize:12,fontFamily:theme.typography.fonts.mono}),'& code':{margin:0,display:'inline-block'},'& pre > code':{whiteSpace:'pre-wrap'}}));const Type=styled.div(({theme,hasDescription})=>({color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.2,theme.color.defaultText),marginTop:hasDescription?4:0}));const TypeWithJsDoc=styled.div(({theme,hasDescription})=>({color:theme.base==='light'?curriedTransparentize$1(0.1,theme.color.defaultText):curriedTransparentize$1(0.2,theme.color.defaultText),marginTop:hasDescription?12:0,marginBottom:12}));const StyledTd$1=styled.td(({theme,expandable})=>({paddingLeft:expandable?'40px !important':'20px !important'}));const ArgRow=props=>{var _a;const{row,updateArgs,compact,expandable,initialExpandedArgs}=props;const{name,description}=row;const table=row.table||{};const type=table.type||row.type;const defaultValue=table.defaultValue||row.defaultValue;const required=(_a=row.type)===null||_a===void 0?void 0:_a.required;const hasDescription=description!=null&&description!=='';return React__default.createElement("tr",null,React__default.createElement(StyledTd$1,{expandable:expandable},React__default.createElement(Name,null,name),required?React__default.createElement(Required,{title:"Required"},"*"):null),compact?null:React__default.createElement("td",null,hasDescription&&React__default.createElement(Description,null,React__default.createElement(Markdown,null,description)),table.jsDocTags!=null?React__default.createElement(React__default.Fragment,null,React__default.createElement(TypeWithJsDoc,{hasDescription:hasDescription},React__default.createElement(ArgValue,{value:type,initialExpandedArgs:initialExpandedArgs})),React__default.createElement(ArgJsDoc,{tags:table.jsDocTags})):React__default.createElement(Type,{hasDescription:hasDescription},React__default.createElement(ArgValue,{value:type,initialExpandedArgs:initialExpandedArgs}))),compact?null:React__default.createElement("td",null,React__default.createElement(ArgValue,{value:defaultValue,initialExpandedArgs:initialExpandedArgs})),updateArgs?React__default.createElement("td",null,React__default.createElement(ArgControl,Object.assign({},props))):null);};const ExpanderIcon=styled(Icons)(({theme})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:theme.base==='light'?curriedTransparentize$1(0.25,theme.color.defaultText):curriedTransparentize$1(0.3,theme.color.defaultText),border:'none',display:'inline-block'}));const FlexWrapper=styled.span(({theme})=>({display:'flex',lineHeight:'20px',alignItems:'center'}));const Section=styled.td(({theme})=>({position:'relative',letterSpacing:'0.35em',textTransform:'uppercase',fontWeight:theme.typography.weight.black,fontSize:theme.typography.size.s1-1,color:theme.base==='light'?curriedTransparentize$1(0.4,theme.color.defaultText):curriedTransparentize$1(0.6,theme.color.defaultText),background:`${theme.background.app} !important`,'& ~ td':{background:`${theme.background.app} !important`}}));const Subsection=styled.td(({theme})=>({position:'relative',fontWeight:theme.typography.weight.bold,fontSize:theme.typography.size.s2-1,background:theme.background.content}));const StyledTd=styled.td(({theme})=>({position:'relative'}));const StyledTr=styled.tr(({theme})=>({'&:hover > td':{backgroundColor:`${theme.background.hoverable} !important`,boxShadow:`${theme.color.mediumlight} 0 - 1px 0 0 inset`,cursor:'row-resize'}}));const ClickIntercept=styled.button(()=>({// reset button style
@@ -2057,4 +2044,4 @@ const sortFn=sortFns[sort];const sortSubsection=record=>{if(!sortFn)return recor
2057
2044
  * Show a grid of icons, as specified by `IconItem`.
2058
2045
  */const IconGallery=_a=>{var{children}=_a,props=__rest(_a,["children"]);return React__default.createElement(ResetWrapper,null,React__default.createElement(List,Object.assign({},props,{className:"docblock-icongallery"}),children));};// eslint-disable-next-line @typescript-eslint/triple-slash-reference
2059
2046
  // eslint-disable-next-line prefer-destructuring
2060
- const components=components$1;const resetComponents={};Object.keys(components$1).forEach(key=>{resetComponents[key]=forwardRef((props,ref)=>createElement(key,Object.assign(Object.assign({},props),{ref})));});export{Span as $,ActionBar as A,getControlId as B,components as C,resetComponents as D,A$2 as E,Form as F,Blockquote as G,Code as H,Icons as I,Div as J,DL as K,H1 as L,H2 as M,H3 as N,H4 as O,H5 as P,H6 as Q,HR as R,ScrollArea as S,TooltipNote as T,Img as U,LI as V,WithTooltip as W,OL as X,P$1 as Y,Pre as Z,__awaiter as _,__rest as a,parse$1 as a$,Table$1 as a0,TT as a1,UL as a2,Badge as a3,Link as a4,DocumentWrapper as a5,SyntaxHighlighter as a6,Spaced as a7,Placeholder as a8,Zoom$1 as a9,Preview as aA,PreviewSkeleton as aB,TableWrapper as aC,ArgsTableError as aD,argsTableLoadingData as aE,ArgsTable as aF,TabbedArgsTable as aG,NoControlsWarning as aH,SourceError as aI,Source as aJ,StyledSyntaxHighlighter as aK,StoryError as aL,Story as aM,StorySkeleton as aN,IFrame as aO,Typeset as aP,ColorItem as aQ,ColorPalette as aR,IconItem as aS,IconGallery as aT,ColorControl as aU,BooleanControl as aV,parseDate as aW,parseTime as aX,formatDate as aY,formatTime as aZ,DateControl as a_,Button$2 as aa,WithTooltipPure as ab,TooltipMessage as ac,TooltipLinkList as ad,Tabs as ae,TabsState as af,TabBar as ag,TabWrapper as ah,IconButton as ai,TabButton as aj,Separator as ak,interleaveSeparators as al,Bar$1 as am,FlexBar as an,AddonPanel as ao,Symbols as ap,StorybookLogo as aq,StorybookIcon as ar,Loader as as,getStoryHref as at,Description$1 as au,Title as av,Subtitle as aw,DocsContent as ax,DocsWrapper as ay,DocsPageWrapper as az,basePlacements as b,format as b0,NumberControl as b1,OptionsControl as b2,ObjectControl as b3,RangeControl as b4,TextControl as b5,FilesControl as b6,nameSpaceClassNames as b7,commonjsGlobal as c,dedent as d,bottom as e,end as f,getDefaultExportFromCjs as g,clippingParents as h,reference as i,variationPlacements as j,placements as k,left as l,memoizerific as m,auto as n,modifierPhases as o,popper as p,_extends as q,right as r,start as s,top as t,_objectWithoutPropertiesLoose as u,viewport as v,window_1 as w,_root as x,isObject_1 as y,isSymbol_1 as z};
2047
+ const components=components$1;const resetComponents={};Object.keys(components$1).forEach(key=>{resetComponents[key]=forwardRef((props,ref)=>createElement(key,Object.assign(Object.assign({},props),{ref})));});export{Table$1 as $,ActionBar as A,components as B,resetComponents as C,A$2 as D,Blockquote as E,Form as F,Code as G,Div as H,Icons as I,DL as J,H1 as K,H2 as L,H3 as M,H4 as N,H5 as O,H6 as P,HR as Q,Img as R,ScrollArea as S,TooltipNote as T,LI as U,OL as V,WithTooltip as W,P$1 as X,Pre as Y,Span as Z,__awaiter as _,__rest as a,format as a$,TT as a0,UL as a1,Badge as a2,Link as a3,DocumentWrapper as a4,SyntaxHighlighter as a5,Spaced as a6,Placeholder as a7,Zoom$1 as a8,Button$2 as a9,PreviewSkeleton as aA,TableWrapper as aB,ArgsTableError as aC,argsTableLoadingData as aD,ArgsTable as aE,TabbedArgsTable as aF,NoControlsWarning as aG,SourceError as aH,Source as aI,StyledSyntaxHighlighter as aJ,StoryError as aK,Story as aL,StorySkeleton as aM,IFrame as aN,Typeset as aO,ColorItem as aP,ColorPalette as aQ,IconItem as aR,IconGallery as aS,ColorControl as aT,BooleanControl as aU,parseDate as aV,parseTime as aW,formatDate as aX,formatTime as aY,DateControl as aZ,parse$1 as a_,WithTooltipPure as aa,TooltipMessage as ab,TooltipLinkList as ac,Tabs as ad,TabsState as ae,TabBar as af,TabWrapper as ag,IconButton as ah,TabButton as ai,Separator as aj,interleaveSeparators as ak,Bar$1 as al,FlexBar as am,AddonPanel as an,Symbols as ao,StorybookLogo as ap,StorybookIcon as aq,Loader as ar,getStoryHref as as,Description$1 as at,Title as au,Subtitle as av,DocsContent as aw,DocsWrapper as ax,DocsPageWrapper as ay,Preview as az,basePlacements as b,NumberControl as b0,OptionsControl as b1,ObjectControl as b2,RangeControl as b3,TextControl as b4,FilesControl as b5,nameSpaceClassNames as b6,commonjsGlobal as c,dedent as d,bottom as e,end as f,getDefaultExportFromCjs as g,clippingParents as h,reference as i,variationPlacements as j,placements as k,left as l,auto as m,modifierPhases as n,_extends as o,popper as p,_objectWithoutPropertiesLoose as q,right as r,start as s,top as t,_root as u,viewport as v,window_1 as w,isObject_1 as x,isSymbol_1 as y,getControlId as z};
@@ -1,6 +1,7 @@
1
1
  import 'react';
2
- export { E as A, A as ActionBar, ao as AddonPanel, aF as ArgsTable, aD as ArgsTableError, a3 as Badge, am as Bar, G as Blockquote, aV as BooleanControl, aa as Button, H as Code, aU as ColorControl, aQ as ColorItem, aR as ColorPalette, K as DL, a_ as DateControl, au as Description, J as Div, ax as DocsContent, az as DocsPageWrapper, ay as DocsWrapper, a5 as DocumentWrapper, b6 as FilesControl, an as FlexBar, F as Form, L as H1, M as H2, N as H3, O as H4, P as H5, Q as H6, R as HR, aO as IFrame, ai as IconButton, aT as IconGallery, aS as IconItem, I as Icons, U as Img, V as LI, a4 as Link, as as Loader, aH as NoControlsWarning, b1 as NumberControl, X as OL, b3 as ObjectControl, b2 as OptionsControl, Y as P, a8 as Placeholder, Z as Pre, aA as Preview, aB as PreviewSkeleton, b4 as RangeControl, S as ScrollArea, ak as Separator, aJ as Source, aI as SourceError, a7 as Spaced, $ as Span, aM as Story, aL as StoryError, aN as StorySkeleton, ar as StorybookIcon, aq as StorybookLogo, aK as StyledSyntaxHighlighter, aw as Subtitle, ap as Symbols, a6 as SyntaxHighlighter, a1 as TT, ag as TabBar, aj as TabButton, ah as TabWrapper, aG as TabbedArgsTable, a0 as Table, aC as TableWrapper, ae as Tabs, af as TabsState, b5 as TextControl, av as Title, ad as TooltipLinkList, ac as TooltipMessage, T as TooltipNote, aP as Typeset, a2 as UL, W as WithTooltip, ab as WithTooltipPure, a9 as Zoom, aE as argsTableLoadingData, C as components, b0 as format, aY as formatDate, aZ as formatTime, at as getStoryHref, al as interleaveSeparators, b7 as nameSpaceClassNames, a$ as parse, aW as parseDate, aX as parseTime, D as resetComponents } from './index-4e034b71.js';
2
+ export { D as A, A as ActionBar, an as AddonPanel, aE as ArgsTable, aC as ArgsTableError, a2 as Badge, al as Bar, E as Blockquote, aU as BooleanControl, a9 as Button, G as Code, aT as ColorControl, aP as ColorItem, aQ as ColorPalette, J as DL, aZ as DateControl, at as Description, H as Div, aw as DocsContent, ay as DocsPageWrapper, ax as DocsWrapper, a4 as DocumentWrapper, b5 as FilesControl, am as FlexBar, F as Form, K as H1, L as H2, M as H3, N as H4, O as H5, P as H6, Q as HR, aN as IFrame, ah as IconButton, aS as IconGallery, aR as IconItem, I as Icons, R as Img, U as LI, a3 as Link, ar as Loader, aG as NoControlsWarning, b0 as NumberControl, V as OL, b2 as ObjectControl, b1 as OptionsControl, X as P, a7 as Placeholder, Y as Pre, az as Preview, aA as PreviewSkeleton, b3 as RangeControl, S as ScrollArea, aj as Separator, aI as Source, aH as SourceError, a6 as Spaced, Z as Span, aL as Story, aK as StoryError, aM as StorySkeleton, aq as StorybookIcon, ap as StorybookLogo, aJ as StyledSyntaxHighlighter, av as Subtitle, ao as Symbols, a5 as SyntaxHighlighter, a0 as TT, af as TabBar, ai as TabButton, ag as TabWrapper, aF as TabbedArgsTable, $ as Table, aB as TableWrapper, ad as Tabs, ae as TabsState, b4 as TextControl, au as Title, ac as TooltipLinkList, ab as TooltipMessage, T as TooltipNote, aO as Typeset, a1 as UL, W as WithTooltip, aa as WithTooltipPure, a8 as Zoom, aD as argsTableLoadingData, B as components, a$ as format, aX as formatDate, aY as formatTime, as as getStoryHref, ak as interleaveSeparators, b6 as nameSpaceClassNames, a_ as parse, aV as parseDate, aW as parseTime, C as resetComponents } from './index-9ef3b84b.js';
3
3
  import '@storybook/theming';
4
+ import 'memoizerific';
4
5
  import '@storybook/csf';
5
6
  import 'qs';
6
7
  import '@storybook/client-logger';