velloo 0.8.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/BUN-LICENSE.md +4 -3
  2. package/README.md +112 -128
  3. package/THIRD-PARTY-NOTICES.md +61 -61
  4. package/canvas/assets/InitWizard-C1CkcS7C.js +3 -0
  5. package/canvas/assets/index-CZPX0col.css +2 -0
  6. package/canvas/assets/index-D7gy-ZUv.js +49 -0
  7. package/canvas/assets/lucide-all-B49qZ9YE.js +1 -0
  8. package/canvas/assets/radix-CuVEihKE.js +41 -0
  9. package/canvas/assets/react-C1iE8mnY.js +9 -0
  10. package/canvas/assets/rolldown-runtime-XKyaHtl9.js +1 -0
  11. package/canvas/assets/vendor-DXkvBgGY.js +58 -0
  12. package/canvas/assets/wand-sparkles-BxGgFkAt.js +1 -0
  13. package/canvas/index.html +6 -6
  14. package/{chunk-32cq4wpr.js → chunk-0rvdh1j3.js} +1 -1
  15. package/chunk-12pgt83m.js +8 -0
  16. package/chunk-12vc3f1h.js +3 -0
  17. package/{chunk-majd3gx9.js → chunk-28mhcvw2.js} +1 -1
  18. package/{chunk-ez720ked.js → chunk-3zm7ydna.js} +1 -1
  19. package/chunk-457fm9yy.js +7 -0
  20. package/chunk-46jg9aqy.js +40 -0
  21. package/chunk-5gwh0zpn.js +3 -0
  22. package/{chunk-q7wwqn03.js → chunk-5hb1e233.js} +1 -1
  23. package/{chunk-w30zfv3m.js → chunk-5ts4fvd9.js} +1 -1
  24. package/{chunk-rg86bhtb.js → chunk-62amy8bj.js} +1 -1
  25. package/{chunk-nrxqr4v5.js → chunk-6p8zwxxx.js} +1 -1
  26. package/{chunk-45wv1fs5.js → chunk-75gfv9g4.js} +11 -12
  27. package/chunk-84qjmqmz.js +2 -0
  28. package/{chunk-esg0x95a.js → chunk-85m9p67t.js} +2 -2
  29. package/chunk-91qesxwh.js +2 -0
  30. package/{chunk-hsk91jms.js → chunk-976rm76x.js} +1 -1
  31. package/chunk-99ccjbaa.js +4 -0
  32. package/{chunk-asqpx5v7.js → chunk-9hc7m55p.js} +3 -4
  33. package/{chunk-h3ser37q.js → chunk-a7xka0bj.js} +1 -1
  34. package/chunk-ak57bgnh.js +2 -0
  35. package/chunk-bf5808x5.js +2 -0
  36. package/{chunk-mqtnj8ws.js → chunk-bj47gjs9.js} +1 -1
  37. package/chunk-d0m56cjx.js +2 -0
  38. package/chunk-d6a6198y.js +3 -0
  39. package/{chunk-aefn23tr.js → chunk-etv7qsw7.js} +1 -1
  40. package/chunk-f2793pj6.js +85 -0
  41. package/{chunk-3612470d.js → chunk-fnv123mm.js} +1 -1
  42. package/{chunk-pjtg3wnm.js → chunk-fzevxpdz.js} +1 -1
  43. package/chunk-ghwy99py.js +68 -0
  44. package/chunk-gtt1qww8.js +2 -0
  45. package/chunk-hhkjqvww.js +1501 -0
  46. package/{chunk-d19ttv1a.js → chunk-hrvqwp8z.js} +1 -1
  47. package/{chunk-v6ks5v53.js → chunk-hxk0wkt3.js} +1 -1
  48. package/{chunk-qgbat4fv.js → chunk-jc95phff.js} +2 -2
  49. package/chunk-kwym0g80.js +11 -0
  50. package/chunk-kxcjme3n.js +6 -0
  51. package/{chunk-dy7qwj3t.js → chunk-mkctjrrz.js} +2 -2
  52. package/{chunk-z6r6wxm6.js → chunk-mknhfnkn.js} +1 -1
  53. package/chunk-mseawt58.js +849 -0
  54. package/{chunk-cg0sjdqt.js → chunk-nccfyeyy.js} +1 -1
  55. package/{chunk-c4164x55.js → chunk-npnxs0fy.js} +1 -1
  56. package/{chunk-ffm2jpxp.js → chunk-p9p2vbat.js} +2 -2
  57. package/chunk-pqc7dbhc.js +2 -0
  58. package/{chunk-g3k8k6fq.js → chunk-qc7c328q.js} +1 -1
  59. package/chunk-qe6pp4p6.js +72 -0
  60. package/{chunk-zgwvkgsz.js → chunk-qwy0jba8.js} +1 -1
  61. package/{chunk-mqx96m2g.js → chunk-s26bgjqz.js} +1 -1
  62. package/{chunk-8n07n0cr.js → chunk-s8pqbr4n.js} +2 -2
  63. package/{chunk-p93x4pn2.js → chunk-tjy12q19.js} +1 -1
  64. package/{chunk-cq2q36d1.js → chunk-v1by80c5.js} +1 -1
  65. package/chunk-vdy4ave9.js +2 -0
  66. package/chunk-vwhee991.js +3 -0
  67. package/chunk-wf7r45wh.js +12 -0
  68. package/chunk-x4jsr5et.js +17 -0
  69. package/{chunk-8qf0ne1p.js → chunk-x9gk2n9v.js} +1 -1
  70. package/chunk-xxjevh62.js +2 -0
  71. package/{chunk-s1cwck4c.js → chunk-y2y1b3zm.js} +1 -1
  72. package/chunk-y6jq6y8t.js +2 -0
  73. package/cli.js +1 -1
  74. package/package.json +11 -11
  75. package/pkgs/helpers/src/icon-data.ts +868 -172
  76. package/pkgs/schema/src/index.ts +1 -0
  77. package/pkgs/schema/src/snippet-resolve.ts +43 -0
  78. package/pkgs/shadcn-snapshot/dist/manifest.json +348 -0
  79. package/pkgs/shadcn-snapshot/src/components/canvas-portal.tsx +3 -3
  80. package/plugins/claude/velloo/.claude-plugin/plugin.json +5 -2
  81. package/plugins/gemini/gemini-extension.json +7 -2
  82. package/canvas/assets/index-CcPwhD7W.js +0 -31
  83. package/canvas/assets/index-CkVteRZ9.css +0 -2
  84. package/canvas/assets/lucide-all-Cezxn40A.js +0 -1
  85. package/canvas/assets/radix-gmpYzWRH.js +0 -41
  86. package/canvas/assets/react-D0Ec-185.js +0 -9
  87. package/canvas/assets/rolldown-runtime-hePW80VL.js +0 -1
  88. package/canvas/assets/vendor-CKmQ-Zst.js +0 -53
  89. package/chunk-07fxzrx2.js +0 -40
  90. package/chunk-4g4c9h7k.js +0 -2
  91. package/chunk-6w42sr61.js +0 -6
  92. package/chunk-80fjfyha.js +0 -86
  93. package/chunk-8ztgcajz.js +0 -8
  94. package/chunk-9g45c5md.js +0 -815
  95. package/chunk-b4hny6hw.js +0 -3
  96. package/chunk-bntsn3wj.js +0 -2
  97. package/chunk-djwvt6jx.js +0 -2
  98. package/chunk-dqqpbmxt.js +0 -22
  99. package/chunk-ejpccmcj.js +0 -18
  100. package/chunk-emty5315.js +0 -2
  101. package/chunk-jxgwdz2r.js +0 -5
  102. package/chunk-kvq7pcph.js +0 -2
  103. package/chunk-m0v3d581.js +0 -2
  104. package/chunk-nx0ex7qw.js +0 -2
  105. package/chunk-qqagacne.js +0 -4
  106. package/chunk-qx83fdv2.js +0 -85
  107. package/chunk-r5y1sh4f.js +0 -12
  108. package/chunk-rhfzy9c0.js +0 -2
  109. package/chunk-rrrn1mkq.js +0 -3
  110. package/chunk-sjxp2bx3.js +0 -2
  111. package/chunk-t08391mh.js +0 -3
  112. package/chunk-t61vyqpd.js +0 -2
  113. package/chunk-vbk1qhdz.js +0 -3
  114. package/chunk-x84qrz4q.js +0 -6
  115. package/chunk-xg49s85z.js +0 -1491
  116. package/chunk-xxw67jpk.js +0 -63
  117. package/chunk-yjwtdm71.js +0 -2
package/chunk-ejpccmcj.js DELETED
@@ -1,18 +0,0 @@
1
- // @bun
2
- import{require_react_development}from"./chunk-xg49s85z.js";import{__toESM,__commonJS,__require}from"./chunk-2smsg2ct.js";var require_emotion_sheet_development_cjs=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var isDevelopment=!0;function sheetForTag(tag){if(tag.sheet)return tag.sheet;for(var i=0;i<document.styleSheets.length;i++)if(document.styleSheets[i].ownerNode===tag)return document.styleSheets[i];return}function createStyleElement(options){var tag=document.createElement("style");if(tag.setAttribute("data-emotion",options.key),options.nonce!==void 0)tag.setAttribute("nonce",options.nonce);return tag.appendChild(document.createTextNode("")),tag.setAttribute("data-s",""),tag}var StyleSheet=function(){function StyleSheet(options){var _this=this;this._insertTag=function(tag){var before;if(_this.tags.length===0)if(_this.insertionPoint)before=_this.insertionPoint.nextSibling;else if(_this.prepend)before=_this.container.firstChild;else before=_this.before;else before=_this.tags[_this.tags.length-1].nextSibling;_this.container.insertBefore(tag,before),_this.tags.push(tag)},this.isSpeedy=options.speedy===void 0?!isDevelopment:options.speedy,this.tags=[],this.ctr=0,this.nonce=options.nonce,this.key=options.key,this.container=options.container,this.prepend=options.prepend,this.insertionPoint=options.insertionPoint,this.before=null}var _proto=StyleSheet.prototype;return _proto.hydrate=function(nodes){nodes.forEach(this._insertTag)},_proto.insert=function(rule){if(this.ctr%(this.isSpeedy?65000:1)===0)this._insertTag(createStyleElement(this));var tag=this.tags[this.tags.length-1];{var isImportRule=rule.charCodeAt(0)===64&&rule.charCodeAt(1)===105;if(isImportRule&&this._alreadyInsertedOrderInsensitiveRule)console.error(`You're attempting to insert the following rule:
3
- `+rule+"\n\n`@import` rules must be before all other types of rules in a stylesheet but other rules have already been inserted. Please ensure that `@import` rules are before all other rules.");this._alreadyInsertedOrderInsensitiveRule=this._alreadyInsertedOrderInsensitiveRule||!isImportRule}if(this.isSpeedy){var sheet=sheetForTag(tag);try{sheet.insertRule(rule,sheet.cssRules.length)}catch(e){if(!/:(-moz-placeholder|-moz-focus-inner|-moz-focusring|-ms-input-placeholder|-moz-read-write|-moz-read-only|-ms-clear|-ms-expand|-ms-reveal){/.test(rule))console.error('There was a problem inserting the following rule: "'+rule+'"',e)}}else tag.appendChild(document.createTextNode(rule));this.ctr++},_proto.flush=function(){this.tags.forEach(function(tag){var _tag$parentNode;return(_tag$parentNode=tag.parentNode)==null?void 0:_tag$parentNode.removeChild(tag)}),this.tags=[],this.ctr=0,this._alreadyInsertedOrderInsensitiveRule=!1},StyleSheet}();exports.StyleSheet=StyleSheet});var require_stylis=__commonJS(function(exports,module){(function(e,r){typeof exports==="object"&&typeof module<"u"?r(exports):typeof define==="function"&&define.amd?define(["exports"],r):(e=e||self,r(e.stylis={}))})(exports,function(e){var r="-ms-",a="-moz-",c="-webkit-",n="comm",t="rule",s="decl",i="@page",u="@media",o="@import",f="@charset",l="@viewport",p="@supports",h="@document",v="@namespace",d="@keyframes",b="@font-face",w="@counter-style",m="@font-feature-values",g="@layer",k=Math.abs,$=String.fromCharCode,x=Object.assign;function E(e,r){return M(e,0)^45?(((r<<2^M(e,0))<<2^M(e,1))<<2^M(e,2))<<2^M(e,3):0}function y(e){return e.trim()}function T(e,r){return(e=r.exec(e))?e[0]:e}function A(e,r,a){return e.replace(r,a)}function O(e,r){return e.indexOf(r)}function M(e,r){return e.charCodeAt(r)|0}function C(e,r,a){return e.slice(r,a)}function R(e){return e.length}function S(e){return e.length}function z(e,r){return r.push(e),e}function N(e,r){return e.map(r).join("")}e.line=1,e.column=1,e.length=0,e.position=0,e.character=0,e.characters="";function P(r,a,c,n,t,s,i){return{value:r,root:a,parent:c,type:n,props:t,children:s,line:e.line,column:e.column,length:i,return:""}}function j(e,r){return x(P("",null,null,"",null,null,0),e,{length:-e.length},r)}function U(){return e.character}function _(){if(e.character=e.position>0?M(e.characters,--e.position):0,e.column--,e.character===10)e.column=1,e.line--;return e.character}function F(){if(e.character=e.position<e.length?M(e.characters,e.position++):0,e.column++,e.character===10)e.column=1,e.line++;return e.character}function I(){return M(e.characters,e.position)}function L(){return e.position}function D(r,a){return C(e.characters,r,a)}function Y(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function K(r){return e.line=e.column=1,e.length=R(e.characters=r),e.position=0,[]}function V(r){return e.characters="",r}function W(r){return y(D(e.position-1,q(r===91?r+2:r===40?r+1:r)))}function B(e){return V(H(K(e)))}function G(r){while(e.character=I())if(e.character<33)F();else break;return Y(r)>2||Y(e.character)>3?"":" "}function H(r){while(F())switch(Y(e.character)){case 0:z(Q(e.position-1),r);break;case 2:z(W(e.character),r);break;default:z($(e.character),r)}return r}function Z(r,a){while(--a&&F())if(e.character<48||e.character>102||e.character>57&&e.character<65||e.character>70&&e.character<97)break;return D(r,L()+(a<6&&I()==32&&F()==32))}function q(r){while(F())switch(e.character){case r:return e.position;case 34:case 39:if(r!==34&&r!==39)q(e.character);break;case 40:if(r===41)q(r);break;case 92:F();break}return e.position}function J(r,a){while(F())if(r+e.character===57)break;else if(r+e.character===84&&I()===47)break;return"/*"+D(a,e.position-1)+"*"+$(r===47?r:F())}function Q(r){while(!Y(I()))F();return D(r,e.position)}function X(e){return V(ee("",null,null,null,[""],e=K(e),0,[0],e))}function ee(e,r,a,c,n,t,s,i,u){var o=0,f=0,l=s,p=0,h=0,v=0,d=1,b=1,w=1,m=0,g="",k=n,x=t,E=c,y=g;while(b)switch(v=m,m=F()){case 40:if(v!=108&&M(y,l-1)==58){if(O(y+=A(W(m),"&","&\f"),"&\f")!=-1)w=-1;break}case 34:case 39:case 91:y+=W(m);break;case 9:case 10:case 13:case 32:y+=G(v);break;case 92:y+=Z(L()-1,7);continue;case 47:switch(I()){case 42:case 47:z(ae(J(F(),L()),r,a),u);break;default:y+="/"}break;case 123*d:i[o++]=R(y)*w;case 125*d:case 59:case 0:switch(m){case 0:case 125:b=0;case 59+f:if(w==-1)y=A(y,/\f/g,"");if(h>0&&R(y)-l)z(h>32?ce(y+";",c,a,l-1):ce(A(y," ","")+";",c,a,l-2),u);break;case 59:y+=";";default:if(z(E=re(y,r,a,o,f,n,i,g,k=[],x=[],l),t),m===123)if(f===0)ee(y,r,E,E,k,t,l,i,x);else switch(p===99&&M(y,3)===110?100:p){case 100:case 108:case 109:case 115:ee(e,E,E,c&&z(re(e,E,E,0,0,n,i,g,n,k=[],l),x),n,x,l,i,c?k:x);break;default:ee(y,E,E,E,[""],x,0,i,x)}}o=f=h=0,d=w=1,g=y="",l=s;break;case 58:l=1+R(y),h=v;default:if(d<1){if(m==123)--d;else if(m==125&&d++==0&&_()==125)continue}switch(y+=$(m),m*d){case 38:w=f>0?1:(y+="\f",-1);break;case 44:i[o++]=(R(y)-1)*w,w=1;break;case 64:if(I()===45)y+=W(F());p=I(),f=l=R(g=y+=Q(L())),m++;break;case 45:if(v===45&&R(y)==2)d=0}}return t}function re(e,r,a,c,n,s,i,u,o,f,l){var p=n-1,h=n===0?s:[""],v=S(h);for(var d=0,b=0,w=0;d<c;++d)for(var m=0,g=C(e,p+1,p=k(b=i[d])),$=e;m<v;++m)if($=y(b>0?h[m]+" "+g:A(g,/&\f/g,h[m])))o[w++]=$;return P(e,r,a,n===0?t:u,o,f,l)}function ae(e,r,a){return P(e,r,a,n,$(U()),C(e,2,-2),0)}function ce(e,r,a,c){return P(e,r,a,s,C(e,0,c),C(e,c+1,-1),c)}function ne(e,n,t){switch(E(e,n)){case 5103:return c+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return c+e+e;case 4789:return a+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return c+e+a+e+r+e+e;case 5936:switch(M(e,n+11)){case 114:return c+e+r+A(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return c+e+r+A(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return c+e+r+A(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return c+e+r+e+e;case 6165:return c+e+r+"flex-"+e+e;case 5187:return c+e+A(e,/(\w+).+(:[^]+)/,c+"box-$1$2"+r+"flex-$1$2")+e;case 5443:return c+e+r+"flex-item-"+A(e,/flex-|-self/g,"")+(!T(e,/flex-|baseline/)?r+"grid-row-"+A(e,/flex-|-self/g,""):"")+e;case 4675:return c+e+r+"flex-line-pack"+A(e,/align-content|flex-|-self/g,"")+e;case 5548:return c+e+r+A(e,"shrink","negative")+e;case 5292:return c+e+r+A(e,"basis","preferred-size")+e;case 6060:return c+"box-"+A(e,"-grow","")+c+e+r+A(e,"grow","positive")+e;case 4554:return c+A(e,/([^-])(transform)/g,"$1"+c+"$2")+e;case 6187:return A(A(A(e,/(zoom-|grab)/,c+"$1"),/(image-set)/,c+"$1"),e,"")+e;case 5495:case 3959:return A(e,/(image-set\([^]*)/,c+"$1$`$1");case 4968:return A(A(e,/(.+:)(flex-)?(.*)/,c+"box-pack:$3"+r+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+c+e+e;case 4200:if(!T(e,/flex-|baseline/))return r+"grid-column-align"+C(e,n)+e;break;case 2592:case 3360:return r+A(e,"template-","")+e;case 4384:case 3616:if(t&&t.some(function(e,r){return n=r,T(e.props,/grid-\w+-end/)}))return~O(e+(t=t[n].value),"span")?e:r+A(e,"-start","")+e+r+"grid-row-span:"+(~O(t,"span")?T(t,/\d+/):+T(t,/\d+/)-+T(e,/\d+/))+";";return r+A(e,"-start","")+e;case 4896:case 4128:return t&&t.some(function(e){return T(e.props,/grid-\w+-start/)})?e:r+A(A(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return A(e,/(.+)-inline(.+)/,c+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(R(e)-1-n>6)switch(M(e,n+1)){case 109:if(M(e,n+4)!==45)break;case 102:return A(e,/(.+:)(.+)-([^]+)/,"$1"+c+"$2-$3$1"+a+(M(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~O(e,"stretch")?ne(A(e,"stretch","fill-available"),n,t)+e:e}break;case 5152:case 5920:return A(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(a,c,n,t,s,i,u){return r+c+":"+n+u+(t?r+c+"-span:"+(s?i:+i-+n)+u:"")+e});case 4949:if(M(e,n+6)===121)return A(e,":",":"+c)+e;break;case 6444:switch(M(e,M(e,14)===45?18:11)){case 120:return A(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+c+(M(e,14)===45?"inline-":"")+"box$3$1"+c+"$2$3$1"+r+"$2box$3")+e;case 100:return A(e,":",":"+r)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return A(e,"scroll-","scroll-snap-")+e}return e}function te(e,r){var a="",c=S(e);for(var n=0;n<c;n++)a+=r(e[n],n,e,r)||"";return a}function se(e,r,a,c){switch(e.type){case g:if(e.children.length)break;case o:case s:return e.return=e.return||e.value;case n:return"";case d:return e.return=e.value+"{"+te(e.children,c)+"}";case t:e.value=e.props.join(",")}return R(a=te(e.children,c))?e.return=e.value+"{"+a+"}":""}function ie(e){var r=S(e);return function(a,c,n,t){var s="";for(var i=0;i<r;i++)s+=e[i](a,c,n,t)||"";return s}}function ue(e){return function(r){if(!r.root){if(r=r.return)e(r)}}}function oe(e,n,i,u){if(e.length>-1){if(!e.return)switch(e.type){case s:e.return=ne(e.value,e.length,i);return;case d:return te([j(e,{value:A(e.value,"@","@"+c)})],u);case t:if(e.length)return N(e.props,function(n){switch(T(n,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return te([j(e,{props:[A(n,/:(read-\w+)/,":"+a+"$1")]})],u);case"::placeholder":return te([j(e,{props:[A(n,/:(plac\w+)/,":"+c+"input-$1")]}),j(e,{props:[A(n,/:(plac\w+)/,":"+a+"$1")]}),j(e,{props:[A(n,/:(plac\w+)/,r+"input-$1")]})],u)}return""})}}}function fe(e){switch(e.type){case t:e.props=e.props.map(function(r){return N(B(r),function(r,a,c){switch(M(r,0)){case 12:return C(r,1,R(r));case 0:case 40:case 43:case 62:case 126:return r;case 58:if(c[++a]==="global")c[a]="",c[++a]="\f"+C(c[a],a=1,-1);case 32:return a===1?"":r;default:switch(a){case 0:return e=r,S(c)>1?"":r;case(a=S(c)-1):case 2:return a===2?r+e+e:r+e;default:return r}}})})}}e.CHARSET=f,e.COMMENT=n,e.COUNTER_STYLE=w,e.DECLARATION=s,e.DOCUMENT=h,e.FONT_FACE=b,e.FONT_FEATURE_VALUES=m,e.IMPORT=o,e.KEYFRAMES=d,e.LAYER=g,e.MEDIA=u,e.MOZ=a,e.MS=r,e.NAMESPACE=v,e.PAGE=i,e.RULESET=t,e.SUPPORTS=p,e.VIEWPORT=l,e.WEBKIT=c,e.abs=k,e.alloc=K,e.append=z,e.assign=x,e.caret=L,e.char=U,e.charat=M,e.combine=N,e.comment=ae,e.commenter=J,e.compile=X,e.copy=j,e.dealloc=V,e.declaration=ce,e.delimit=W,e.delimiter=q,e.escaping=Z,e.from=$,e.hash=E,e.identifier=Q,e.indexof=O,e.match=T,e.middleware=ie,e.namespace=fe,e.next=F,e.node=P,e.parse=ee,e.peek=I,e.prefix=ne,e.prefixer=oe,e.prev=_,e.replace=A,e.ruleset=re,e.rulesheet=ue,e.serialize=te,e.sizeof=S,e.slice=D,e.stringify=se,e.strlen=R,e.substr=C,e.token=Y,e.tokenize=B,e.tokenizer=H,e.trim=y,e.whitespace=G,Object.defineProperty(e,"__esModule",{value:!0})})});var require_emotion_weak_memoize_cjs_dev=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var weakMemoize=function(func){var cache=new WeakMap;return function(arg){if(cache.has(arg))return cache.get(arg);var ret=func(arg);return cache.set(arg,ret),ret}};exports.default=weakMemoize});var require_emotion_memoize_cjs_dev=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});function memoize(fn){var cache=Object.create(null);return function(arg){if(cache[arg]===void 0)cache[arg]=fn(arg);return cache[arg]}}exports.default=memoize});var require_emotion_cache_development_cjs=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var sheet=require_emotion_sheet_development_cjs(),stylis=require_stylis(),weakMemoize=require_emotion_weak_memoize_cjs_dev(),memoize=require_emotion_memoize_cjs_dev();function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var weakMemoize__default=_interopDefault(weakMemoize),memoize__default=_interopDefault(memoize),isBrowser=typeof document<"u",identifierWithPointTracking=function(begin,points,index){var previous=0,character=0;while(!0){if(previous=character,character=stylis.peek(),previous===38&&character===12)points[index]=1;if(stylis.token(character))break;stylis.next()}return stylis.slice(begin,stylis.position)},toRules=function(parsed,points){var index=-1,character=44;do switch(stylis.token(character)){case 0:if(character===38&&stylis.peek()===12)points[index]=1;parsed[index]+=identifierWithPointTracking(stylis.position-1,points,index);break;case 2:parsed[index]+=stylis.delimit(character);break;case 4:if(character===44){parsed[++index]=stylis.peek()===58?"&\f":"",points[index]=parsed[index].length;break}default:parsed[index]+=stylis.from(character)}while(character=stylis.next());return parsed},getRules=function(value,points){return stylis.dealloc(toRules(stylis.alloc(value),points))},fixedElements=new WeakMap,compat=function(element){if(element.type!=="rule"||!element.parent||element.length<1)return;var{value,parent}=element,isImplicitRule=element.column===parent.column&&element.line===parent.line;while(parent.type!=="rule")if(parent=parent.parent,!parent)return;if(element.props.length===1&&value.charCodeAt(0)!==58&&!fixedElements.get(parent))return;if(isImplicitRule)return;fixedElements.set(element,!0);var points=[],rules=getRules(value,points),parentRules=parent.props;for(var i=0,k=0;i<rules.length;i++)for(var j=0;j<parentRules.length;j++,k++)element.props[k]=points[i]?rules[i].replace(/&\f/g,parentRules[j]):parentRules[j]+" "+rules[i]},removeLabel=function(element){if(element.type==="decl"){var value=element.value;if(value.charCodeAt(0)===108&&value.charCodeAt(2)===98)element.return="",element.value=""}},ignoreFlag="emotion-disable-server-rendering-unsafe-selector-warning-please-do-not-use-this-the-warning-exists-for-a-reason",isIgnoringComment=function(element){return element.type==="comm"&&element.children.indexOf(ignoreFlag)>-1},createUnsafeSelectorsAlarm=function(cache){return function(element,index,children){if(element.type!=="rule"||cache.compat)return;var unsafePseudoClasses=element.value.match(/(:first|:nth|:nth-last)-child/g);if(unsafePseudoClasses){var isNested=!!element.parent,commentContainer=isNested?element.parent.children:children;for(var i=commentContainer.length-1;i>=0;i--){var node=commentContainer[i];if(node.line<element.line)break;if(node.column<element.column){if(isIgnoringComment(node))return;break}}unsafePseudoClasses.forEach(function(unsafePseudoClass){console.error('The pseudo class "'+unsafePseudoClass+'" is potentially unsafe when doing server-side rendering. Try changing it to "'+unsafePseudoClass.split("-child")[0]+'-of-type".')})}}},isImportRule=function(element){return element.type.charCodeAt(1)===105&&element.type.charCodeAt(0)===64},isPrependedWithRegularRules=function(index,children){for(var i=index-1;i>=0;i--)if(!isImportRule(children[i]))return!0;return!1},nullifyElement=function(element){element.type="",element.value="",element.return="",element.children="",element.props=""},incorrectImportAlarm=function(element,index,children){if(!isImportRule(element))return;if(element.parent)console.error("`@import` rules can't be nested inside other rules. Please move it to the top level and put it before regular rules. Keep in mind that they can only be used within global styles."),nullifyElement(element);else if(isPrependedWithRegularRules(index,children))console.error("`@import` rules can't be after other rules. Please put your `@import` rules before your other rules."),nullifyElement(element)};function prefix(value,length){switch(stylis.hash(value,length)){case 5103:return stylis.WEBKIT+"print-"+value+value;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return stylis.WEBKIT+value+value;case 5349:case 4246:case 4810:case 6968:case 2756:return stylis.WEBKIT+value+stylis.MOZ+value+stylis.MS+value+value;case 6828:case 4268:return stylis.WEBKIT+value+stylis.MS+value+value;case 6165:return stylis.WEBKIT+value+stylis.MS+"flex-"+value+value;case 5187:return stylis.WEBKIT+value+stylis.replace(value,/(\w+).+(:[^]+)/,stylis.WEBKIT+"box-$1$2"+stylis.MS+"flex-$1$2")+value;case 5443:return stylis.WEBKIT+value+stylis.MS+"flex-item-"+stylis.replace(value,/flex-|-self/,"")+value;case 4675:return stylis.WEBKIT+value+stylis.MS+"flex-line-pack"+stylis.replace(value,/align-content|flex-|-self/,"")+value;case 5548:return stylis.WEBKIT+value+stylis.MS+stylis.replace(value,"shrink","negative")+value;case 5292:return stylis.WEBKIT+value+stylis.MS+stylis.replace(value,"basis","preferred-size")+value;case 6060:return stylis.WEBKIT+"box-"+stylis.replace(value,"-grow","")+stylis.WEBKIT+value+stylis.MS+stylis.replace(value,"grow","positive")+value;case 4554:return stylis.WEBKIT+stylis.replace(value,/([^-])(transform)/g,"$1"+stylis.WEBKIT+"$2")+value;case 6187:return stylis.replace(stylis.replace(stylis.replace(value,/(zoom-|grab)/,stylis.WEBKIT+"$1"),/(image-set)/,stylis.WEBKIT+"$1"),value,"")+value;case 5495:case 3959:return stylis.replace(value,/(image-set\([^]*)/,stylis.WEBKIT+"$1$`$1");case 4968:return stylis.replace(stylis.replace(value,/(.+:)(flex-)?(.*)/,stylis.WEBKIT+"box-pack:$3"+stylis.MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+stylis.WEBKIT+value+value;case 4095:case 3583:case 4068:case 2532:return stylis.replace(value,/(.+)-inline(.+)/,stylis.WEBKIT+"$1$2")+value;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(stylis.strlen(value)-1-length>6)switch(stylis.charat(value,length+1)){case 109:if(stylis.charat(value,length+4)!==45)break;case 102:return stylis.replace(value,/(.+:)(.+)-([^]+)/,"$1"+stylis.WEBKIT+"$2-$3$1"+stylis.MOZ+(stylis.charat(value,length+3)==108?"$3":"$2-$3"))+value;case 115:return~stylis.indexof(value,"stretch")?prefix(stylis.replace(value,"stretch","fill-available"),length)+value:value}break;case 4949:if(stylis.charat(value,length+1)!==115)break;case 6444:switch(stylis.charat(value,stylis.strlen(value)-3-(~stylis.indexof(value,"!important")&&10))){case 107:return stylis.replace(value,":",":"+stylis.WEBKIT)+value;case 101:return stylis.replace(value,/(.+:)([^;!]+)(;|!.+)?/,"$1"+stylis.WEBKIT+(stylis.charat(value,14)===45?"inline-":"")+"box$3$1"+stylis.WEBKIT+"$2$3$1"+stylis.MS+"$2box$3")+value}break;case 5936:switch(stylis.charat(value,length+11)){case 114:return stylis.WEBKIT+value+stylis.MS+stylis.replace(value,/[svh]\w+-[tblr]{2}/,"tb")+value;case 108:return stylis.WEBKIT+value+stylis.MS+stylis.replace(value,/[svh]\w+-[tblr]{2}/,"tb-rl")+value;case 45:return stylis.WEBKIT+value+stylis.MS+stylis.replace(value,/[svh]\w+-[tblr]{2}/,"lr")+value}return stylis.WEBKIT+value+stylis.MS+value+value}return value}var prefixer=function(element,index,children,callback){if(element.length>-1){if(!element.return)switch(element.type){case stylis.DECLARATION:element.return=prefix(element.value,element.length);break;case stylis.KEYFRAMES:return stylis.serialize([stylis.copy(element,{value:stylis.replace(element.value,"@","@"+stylis.WEBKIT)})],callback);case stylis.RULESET:if(element.length)return stylis.combine(element.props,function(value){switch(stylis.match(value,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return stylis.serialize([stylis.copy(element,{props:[stylis.replace(value,/:(read-\w+)/,":"+stylis.MOZ+"$1")]})],callback);case"::placeholder":return stylis.serialize([stylis.copy(element,{props:[stylis.replace(value,/:(plac\w+)/,":"+stylis.WEBKIT+"input-$1")]}),stylis.copy(element,{props:[stylis.replace(value,/:(plac\w+)/,":"+stylis.MOZ+"$1")]}),stylis.copy(element,{props:[stylis.replace(value,/:(plac\w+)/,stylis.MS+"input-$1")]})],callback)}return""})}}},getServerStylisCache=isBrowser?void 0:weakMemoize__default.default(function(){return memoize__default.default(function(){return{}})}),defaultStylisPlugins=[prefixer],getSourceMap;sourceMapPattern=/\/\*#\ssourceMappingURL=data:application\/json;\S+\s+\*\//g,getSourceMap=function(styles){var matches=styles.match(sourceMapPattern);if(!matches)return;return matches[matches.length-1]};var sourceMapPattern,createCache=function(options){var key=options.key;if(!key)throw Error(`You have to configure \`key\` for your cache. Please make sure it's unique (and not equal to 'css') as it's used for linking styles to your cache.
4
- If multiple caches share the same key they might "fight" for each other's style elements.`);if(isBrowser&&key==="css"){var ssrStyles=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(ssrStyles,function(node){var dataEmotionAttribute=node.getAttribute("data-emotion");if(dataEmotionAttribute.indexOf(" ")===-1)return;document.head.appendChild(node),node.setAttribute("data-s","")})}var stylisPlugins=options.stylisPlugins||defaultStylisPlugins;if(/[^a-z-]/.test(key))throw Error('Emotion key must only contain lower case alphabetical characters and - but "'+key+'" was passed');var inserted={},container,nodesToHydrate=[];if(isBrowser)container=options.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+key+' "]'),function(node){var attrib=node.getAttribute("data-emotion").split(" ");for(var i=1;i<attrib.length;i++)inserted[attrib[i]]=!0;nodesToHydrate.push(node)});var _insert,omnipresentPlugins=[compat,removeLabel];if(omnipresentPlugins.push(createUnsafeSelectorsAlarm({get compat(){return cache.compat}}),incorrectImportAlarm),!getServerStylisCache){var currentSheet,finalizingPlugins=[stylis.stringify,function(element){if(!element.root){if(element.return)currentSheet.insert(element.return);else if(element.value&&element.type!==stylis.COMMENT)currentSheet.insert(element.value+"{}")}}],serializer=stylis.middleware(omnipresentPlugins.concat(stylisPlugins,finalizingPlugins)),stylis$1=function(styles){return stylis.serialize(stylis.compile(styles),serializer)};_insert=function(selector,serialized,sheet,shouldCache){if(currentSheet=sheet,getSourceMap){var sourceMap=getSourceMap(serialized.styles);if(sourceMap)currentSheet={insert:function(rule){sheet.insert(rule+sourceMap)}}}if(stylis$1(selector?selector+"{"+serialized.styles+"}":serialized.styles),shouldCache)cache.inserted[serialized.name]=!0}}else{var _finalizingPlugins=[stylis.stringify],_serializer=stylis.middleware(omnipresentPlugins.concat(stylisPlugins,_finalizingPlugins)),_stylis=function(styles){return stylis.serialize(stylis.compile(styles),_serializer)},serverStylisCache=getServerStylisCache(stylisPlugins)(key),getRules=function(selector,serialized){var name=serialized.name;if(serverStylisCache[name]===void 0)serverStylisCache[name]=_stylis(selector?selector+"{"+serialized.styles+"}":serialized.styles);return serverStylisCache[name]};_insert=function(selector,serialized,sheet,shouldCache){var name=serialized.name,rules=getRules(selector,serialized);if(cache.compat===void 0){if(shouldCache)cache.inserted[name]=!0;if(getSourceMap){var sourceMap=getSourceMap(serialized.styles);if(sourceMap)return rules+sourceMap}return rules}else if(shouldCache)cache.inserted[name]=rules;else return rules}}var cache={key,sheet:new sheet.StyleSheet({key,container,nonce:options.nonce,speedy:options.speedy,prepend:options.prepend,insertionPoint:options.insertionPoint}),nonce:options.nonce,inserted,registered:{},insert:_insert};return cache.sheet.hydrate(nodesToHydrate),cache};exports.default=createCache});var require_extends=__commonJS(function(exports,module){function _extends(){return module.exports=_extends=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},module.exports.__esModule=!0,module.exports.default=module.exports,_extends.apply(null,arguments)}module.exports=_extends,module.exports.__esModule=!0,module.exports.default=module.exports});var require_react_is_development=__commonJS(function(exports){(function(){var hasSymbol=typeof Symbol==="function"&&Symbol.for,REACT_ELEMENT_TYPE=hasSymbol?Symbol.for("react.element"):60103,REACT_PORTAL_TYPE=hasSymbol?Symbol.for("react.portal"):60106,REACT_FRAGMENT_TYPE=hasSymbol?Symbol.for("react.fragment"):60107,REACT_STRICT_MODE_TYPE=hasSymbol?Symbol.for("react.strict_mode"):60108,REACT_PROFILER_TYPE=hasSymbol?Symbol.for("react.profiler"):60114,REACT_PROVIDER_TYPE=hasSymbol?Symbol.for("react.provider"):60109,REACT_CONTEXT_TYPE=hasSymbol?Symbol.for("react.context"):60110,REACT_ASYNC_MODE_TYPE=hasSymbol?Symbol.for("react.async_mode"):60111,REACT_CONCURRENT_MODE_TYPE=hasSymbol?Symbol.for("react.concurrent_mode"):60111,REACT_FORWARD_REF_TYPE=hasSymbol?Symbol.for("react.forward_ref"):60112,REACT_SUSPENSE_TYPE=hasSymbol?Symbol.for("react.suspense"):60113,REACT_SUSPENSE_LIST_TYPE=hasSymbol?Symbol.for("react.suspense_list"):60120,REACT_MEMO_TYPE=hasSymbol?Symbol.for("react.memo"):60115,REACT_LAZY_TYPE=hasSymbol?Symbol.for("react.lazy"):60116,REACT_BLOCK_TYPE=hasSymbol?Symbol.for("react.block"):60121,REACT_FUNDAMENTAL_TYPE=hasSymbol?Symbol.for("react.fundamental"):60117,REACT_RESPONDER_TYPE=hasSymbol?Symbol.for("react.responder"):60118,REACT_SCOPE_TYPE=hasSymbol?Symbol.for("react.scope"):60119;function isValidElementType(type){return typeof type==="string"||typeof type==="function"||type===REACT_FRAGMENT_TYPE||type===REACT_CONCURRENT_MODE_TYPE||type===REACT_PROFILER_TYPE||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||typeof type==="object"&&type!==null&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_FUNDAMENTAL_TYPE||type.$$typeof===REACT_RESPONDER_TYPE||type.$$typeof===REACT_SCOPE_TYPE||type.$$typeof===REACT_BLOCK_TYPE)}function typeOf(object){if(typeof object==="object"&&object!==null){var $$typeof=object.$$typeof;switch($$typeof){case REACT_ELEMENT_TYPE:var type=object.type;switch(type){case REACT_ASYNC_MODE_TYPE:case REACT_CONCURRENT_MODE_TYPE:case REACT_FRAGMENT_TYPE:case REACT_PROFILER_TYPE:case REACT_STRICT_MODE_TYPE:case REACT_SUSPENSE_TYPE:return type;default:var $$typeofType=type&&type.$$typeof;switch($$typeofType){case REACT_CONTEXT_TYPE:case REACT_FORWARD_REF_TYPE:case REACT_LAZY_TYPE:case REACT_MEMO_TYPE:case REACT_PROVIDER_TYPE:return $$typeofType;default:return $$typeof}}case REACT_PORTAL_TYPE:return $$typeof}}return}var AsyncMode=REACT_ASYNC_MODE_TYPE,ConcurrentMode=REACT_CONCURRENT_MODE_TYPE,ContextConsumer=REACT_CONTEXT_TYPE,ContextProvider=REACT_PROVIDER_TYPE,Element=REACT_ELEMENT_TYPE,ForwardRef=REACT_FORWARD_REF_TYPE,Fragment=REACT_FRAGMENT_TYPE,Lazy=REACT_LAZY_TYPE,Memo=REACT_MEMO_TYPE,Portal=REACT_PORTAL_TYPE,Profiler=REACT_PROFILER_TYPE,StrictMode=REACT_STRICT_MODE_TYPE,Suspense=REACT_SUSPENSE_TYPE,hasWarnedAboutDeprecatedIsAsyncMode=!1;function isAsyncMode(object){if(!hasWarnedAboutDeprecatedIsAsyncMode)hasWarnedAboutDeprecatedIsAsyncMode=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");return isConcurrentMode(object)||typeOf(object)===REACT_ASYNC_MODE_TYPE}function isConcurrentMode(object){return typeOf(object)===REACT_CONCURRENT_MODE_TYPE}function isContextConsumer(object){return typeOf(object)===REACT_CONTEXT_TYPE}function isContextProvider(object){return typeOf(object)===REACT_PROVIDER_TYPE}function isElement(object){return typeof object==="object"&&object!==null&&object.$$typeof===REACT_ELEMENT_TYPE}function isForwardRef(object){return typeOf(object)===REACT_FORWARD_REF_TYPE}function isFragment(object){return typeOf(object)===REACT_FRAGMENT_TYPE}function isLazy(object){return typeOf(object)===REACT_LAZY_TYPE}function isMemo(object){return typeOf(object)===REACT_MEMO_TYPE}function isPortal(object){return typeOf(object)===REACT_PORTAL_TYPE}function isProfiler(object){return typeOf(object)===REACT_PROFILER_TYPE}function isStrictMode(object){return typeOf(object)===REACT_STRICT_MODE_TYPE}function isSuspense(object){return typeOf(object)===REACT_SUSPENSE_TYPE}exports.AsyncMode=AsyncMode,exports.ConcurrentMode=ConcurrentMode,exports.ContextConsumer=ContextConsumer,exports.ContextProvider=ContextProvider,exports.Element=Element,exports.ForwardRef=ForwardRef,exports.Fragment=Fragment,exports.Lazy=Lazy,exports.Memo=Memo,exports.Portal=Portal,exports.Profiler=Profiler,exports.StrictMode=StrictMode,exports.Suspense=Suspense,exports.isAsyncMode=isAsyncMode,exports.isConcurrentMode=isConcurrentMode,exports.isContextConsumer=isContextConsumer,exports.isContextProvider=isContextProvider,exports.isElement=isElement,exports.isForwardRef=isForwardRef,exports.isFragment=isFragment,exports.isLazy=isLazy,exports.isMemo=isMemo,exports.isPortal=isPortal,exports.isProfiler=isProfiler,exports.isStrictMode=isStrictMode,exports.isSuspense=isSuspense,exports.isValidElementType=isValidElementType,exports.typeOf=typeOf})()});var require_hoist_non_react_statics_cjs=__commonJS(function(exports,module){var reactIs=__toESM(require_react_is_development()),REACT_STATICS={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},KNOWN_STATICS={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},FORWARD_REF_STATICS={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},MEMO_STATICS={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},TYPE_STATICS={};TYPE_STATICS[reactIs.ForwardRef]=FORWARD_REF_STATICS;TYPE_STATICS[reactIs.Memo]=MEMO_STATICS;function getStatics(component){if(reactIs.isMemo(component))return MEMO_STATICS;return TYPE_STATICS[component.$$typeof]||REACT_STATICS}var{defineProperty,getOwnPropertyNames,getOwnPropertySymbols,getOwnPropertyDescriptor,getPrototypeOf,prototype:objectPrototype}=Object;function hoistNonReactStatics(targetComponent,sourceComponent,blacklist){if(typeof sourceComponent!=="string"){if(objectPrototype){var inheritedComponent=getPrototypeOf(sourceComponent);if(inheritedComponent&&inheritedComponent!==objectPrototype)hoistNonReactStatics(targetComponent,inheritedComponent,blacklist)}var keys=getOwnPropertyNames(sourceComponent);if(getOwnPropertySymbols)keys=keys.concat(getOwnPropertySymbols(sourceComponent));var targetStatics=getStatics(targetComponent),sourceStatics=getStatics(sourceComponent);for(var i=0;i<keys.length;++i){var key=keys[i];if(!KNOWN_STATICS[key]&&!(blacklist&&blacklist[key])&&!(sourceStatics&&sourceStatics[key])&&!(targetStatics&&targetStatics[key])){var descriptor=getOwnPropertyDescriptor(sourceComponent,key);try{defineProperty(targetComponent,key,descriptor)}catch(e){}}}}return targetComponent}module.exports=hoistNonReactStatics});var require_emotion_react__isolated_hnrs_development_cjs=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var hoistNonReactStatics$1=require_hoist_non_react_statics_cjs();function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var hoistNonReactStatics__default=_interopDefault(hoistNonReactStatics$1),hoistNonReactStatics=function(targetComponent,sourceComponent){return hoistNonReactStatics__default.default(targetComponent,sourceComponent)};exports.default=hoistNonReactStatics});var require_emotion_utils_cjs=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var isBrowser=typeof document<"u";function getRegisteredStyles(registered,registeredStyles,classNames){var rawClassName="";return classNames.split(" ").forEach(function(className){if(registered[className]!==void 0)registeredStyles.push(registered[className]+";");else if(className)rawClassName+=className+" "}),rawClassName}var registerStyles=function(cache,serialized,isStringTag){var className=cache.key+"-"+serialized.name;if((isStringTag===!1||isBrowser===!1&&cache.compat!==void 0)&&cache.registered[className]===void 0)cache.registered[className]=serialized.styles},insertStyles=function(cache,serialized,isStringTag){registerStyles(cache,serialized,isStringTag);var className=cache.key+"-"+serialized.name;if(cache.inserted[serialized.name]===void 0){var stylesForSSR="",current=serialized;do{var maybeStyles=cache.insert(serialized===current?"."+className:"",current,cache.sheet,!0);if(!isBrowser&&maybeStyles!==void 0)stylesForSSR+=maybeStyles;current=current.next}while(current!==void 0);if(!isBrowser&&stylesForSSR.length!==0)return stylesForSSR}};exports.getRegisteredStyles=getRegisteredStyles;exports.insertStyles=insertStyles;exports.registerStyles=registerStyles});var require_emotion_hash_cjs_dev=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});function murmur2(str){var h=0,k,i=0,len=str.length;for(;len>=4;++i,len-=4)k=str.charCodeAt(i)&255|(str.charCodeAt(++i)&255)<<8|(str.charCodeAt(++i)&255)<<16|(str.charCodeAt(++i)&255)<<24,k=(k&65535)*1540483477+((k>>>16)*59797<<16),k^=k>>>24,h=(k&65535)*1540483477+((k>>>16)*59797<<16)^(h&65535)*1540483477+((h>>>16)*59797<<16);switch(len){case 3:h^=(str.charCodeAt(i+2)&255)<<16;case 2:h^=(str.charCodeAt(i+1)&255)<<8;case 1:h^=str.charCodeAt(i)&255,h=(h&65535)*1540483477+((h>>>16)*59797<<16)}return h^=h>>>13,h=(h&65535)*1540483477+((h>>>16)*59797<<16),((h^h>>>15)>>>0).toString(36)}exports.default=murmur2});var require_emotion_unitless_cjs=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};exports.default=unitlessKeys});var require_emotion_serialize_development_cjs=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var hashString=require_emotion_hash_cjs_dev(),unitless=require_emotion_unitless_cjs(),memoize=require_emotion_memoize_cjs_dev();function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var hashString__default=_interopDefault(hashString),unitless__default=_interopDefault(unitless),memoize__default=_interopDefault(memoize),isDevelopment=!0,ILLEGAL_ESCAPE_SEQUENCE_ERROR=`You have illegal escape sequence in your template literal, most likely inside content's property value.
5
- Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
6
- You can read more about this here:
7
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,UNDEFINED_AS_OBJECT_KEY_ERROR="You have passed in falsy value as style object's key (can happen when in example you pass unexported component as computed key).",hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function(property){return property.charCodeAt(1)===45},isProcessableValue=function(value){return value!=null&&typeof value!=="boolean"},processStyleName=memoize__default.default(function(styleName){return isCustomProperty(styleName)?styleName:styleName.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function(key,value){switch(key){case"animation":case"animationName":if(typeof value==="string")return value.replace(animationRegex,function(match,p1,p2){return cursor={name:p1,styles:p2,next:cursor},p1})}if(unitless__default.default[key]!==1&&!isCustomProperty(key)&&typeof value==="number"&&value!==0)return value+"px";return value};contentValuePattern=/(var|attr|counters?|url|element|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,contentValues=["normal","none","initial","inherit","unset"],oldProcessStyleValue=processStyleValue,msPattern=/^-ms-/,hyphenPattern=/-(.)/g,hyphenatedCache={},processStyleValue=function(key,value){if(key==="content"){if(typeof value!=="string"||contentValues.indexOf(value)===-1&&!contentValuePattern.test(value)&&(value.charAt(0)!==value.charAt(value.length-1)||value.charAt(0)!=='"'&&value.charAt(0)!=="'"))throw Error("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\""+value+"\"'`")}var processed=oldProcessStyleValue(key,value);if(processed!==""&&!isCustomProperty(key)&&key.indexOf("-")!==-1&&hyphenatedCache[key]===void 0)hyphenatedCache[key]=!0,console.error("Using kebab-case for css properties in objects is not supported. Did you mean "+key.replace(msPattern,"ms-").replace(hyphenPattern,function(str,_char){return _char.toUpperCase()})+"?");return processed};var contentValuePattern,contentValues,oldProcessStyleValue,msPattern,hyphenPattern,hyphenatedCache,noComponentSelectorMessage="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function handleInterpolation(mergedProps,registered,interpolation){if(interpolation==null)return"";var componentSelector=interpolation;if(componentSelector.__emotion_styles!==void 0){if(String(componentSelector)==="NO_COMPONENT_SELECTOR")throw Error(noComponentSelectorMessage);return componentSelector}switch(typeof interpolation){case"boolean":return"";case"object":{var keyframes=interpolation;if(keyframes.anim===1)return cursor={name:keyframes.name,styles:keyframes.styles,next:cursor},keyframes.name;var serializedStyles=interpolation;if(serializedStyles.styles!==void 0){var next=serializedStyles.next;if(next!==void 0)while(next!==void 0)cursor={name:next.name,styles:next.styles,next:cursor},next=next.next;var styles=serializedStyles.styles+";";return styles}return createStringFromObject(mergedProps,registered,interpolation)}case"function":{if(mergedProps!==void 0){var previousCursor=cursor,result=interpolation(mergedProps);return cursor=previousCursor,handleInterpolation(mergedProps,registered,result)}else console.error("Functions that are interpolated in css calls will be stringified.\nIf you want to have a css call based on props, create a function that returns a css call like this\nlet dynamicStyle = (props) => css`color: ${props.color}`\nIt can be called directly with props or interpolated in a styled call like this\nlet SomeComponent = styled('div')`${dynamicStyle}`");break}case"string":{var matched=[],replaced=interpolation.replace(animationRegex,function(_match,_p1,p2){var fakeVarName="animation"+matched.length;return matched.push("const "+fakeVarName+" = keyframes`"+p2.replace(/^@keyframes animation-\w+/,"")+"`"),"${"+fakeVarName+"}"});if(matched.length)console.error("`keyframes` output got interpolated into plain string, please wrap it with `css`.\n\nInstead of doing this:\n\n"+[].concat(matched,["`"+replaced+"`"]).join(`
8
- `)+`
9
-
10
- You should wrap it with \`css\` like this:
11
-
12
- css\``+replaced+"`")}break}var asString=interpolation;if(registered==null)return asString;var cached=registered[asString];return cached!==void 0?cached:asString}function createStringFromObject(mergedProps,registered,obj){var string="";if(Array.isArray(obj))for(var i=0;i<obj.length;i++)string+=handleInterpolation(mergedProps,registered,obj[i])+";";else for(var key in obj){var value=obj[key];if(typeof value!=="object"){var asString=value;if(registered!=null&&registered[asString]!==void 0)string+=key+"{"+registered[asString]+"}";else if(isProcessableValue(asString))string+=processStyleName(key)+":"+processStyleValue(key,asString)+";"}else{if(key==="NO_COMPONENT_SELECTOR"&&isDevelopment)throw Error(noComponentSelectorMessage);if(Array.isArray(value)&&typeof value[0]==="string"&&(registered==null||registered[value[0]]===void 0)){for(var _i=0;_i<value.length;_i++)if(isProcessableValue(value[_i]))string+=processStyleName(key)+":"+processStyleValue(key,value[_i])+";"}else{var interpolated=handleInterpolation(mergedProps,registered,value);switch(key){case"animation":case"animationName":{string+=processStyleName(key)+":"+interpolated+";";break}default:{if(key==="undefined")console.error(UNDEFINED_AS_OBJECT_KEY_ERROR);string+=key+"{"+interpolated+"}"}}}}}return string}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor;function serializeStyles(args,registered,mergedProps){if(args.length===1&&typeof args[0]==="object"&&args[0]!==null&&args[0].styles!==void 0)return args[0];var stringMode=!0,styles="";cursor=void 0;var strings=args[0];if(strings==null||strings.raw===void 0)stringMode=!1,styles+=handleInterpolation(mergedProps,registered,strings);else{var asTemplateStringsArr=strings;if(asTemplateStringsArr[0]===void 0)console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);styles+=asTemplateStringsArr[0]}for(var i=1;i<args.length;i++)if(styles+=handleInterpolation(mergedProps,registered,args[i]),stringMode){var templateStringsArr=strings;if(templateStringsArr[i]===void 0)console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);styles+=templateStringsArr[i]}labelPattern.lastIndex=0;var identifierName="",match;while((match=labelPattern.exec(styles))!==null)identifierName+="-"+match[1];var name=hashString__default.default(styles)+identifierName;{var devStyles={name,styles,next:cursor,toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}};return devStyles}}exports.serializeStyles=serializeStyles});var require_emotion_use_insertion_effect_with_fallbacks_cjs=__commonJS(function(exports){var React=__toESM(require_react_development());Object.defineProperty(exports,"__esModule",{value:!0});function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e)Object.keys(e).forEach(function(k){if(k!=="default"){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}});return n.default=e,Object.freeze(n)}var React__namespace=_interopNamespace(React),isBrowser=typeof document<"u",syncFallback=function(create){return create()},useInsertionEffect=React__namespace.useInsertionEffect?React__namespace.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=!isBrowser?syncFallback:useInsertionEffect||syncFallback,useInsertionEffectWithLayoutFallback=useInsertionEffect||React__namespace.useLayoutEffect;exports.useInsertionEffectAlwaysWithSyncFallback=useInsertionEffectAlwaysWithSyncFallback;exports.useInsertionEffectWithLayoutFallback=useInsertionEffectWithLayoutFallback});var require_emotion_element_e8f4cc37_development_cjs=__commonJS(function(exports){var React=__toESM(require_react_development()),createCache=require_emotion_cache_development_cjs(),_extends=require_extends(),weakMemoize=require_emotion_weak_memoize_cjs_dev(),_isolatedHnrs_dist_emotionReact_isolatedHnrs=require_emotion_react__isolated_hnrs_development_cjs(),utils=require_emotion_utils_cjs(),serialize=require_emotion_serialize_development_cjs(),useInsertionEffectWithFallbacks=require_emotion_use_insertion_effect_with_fallbacks_cjs();function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e)Object.keys(e).forEach(function(k){if(k!=="default"){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}});return n.default=e,Object.freeze(n)}var React__namespace=_interopNamespace(React),createCache__default=_interopDefault(createCache),weakMemoize__default=_interopDefault(weakMemoize),isBrowser=typeof document<"u",EmotionCacheContext=React__namespace.createContext(typeof HTMLElement<"u"?createCache__default.default({key:"css"}):null);EmotionCacheContext.displayName="EmotionCacheContext";var CacheProvider=EmotionCacheContext.Provider,__unsafe_useEmotionCache=function(){return React.useContext(EmotionCacheContext)};exports.withEmotionCache=function(func){return React.forwardRef(function(props,ref){var cache=React.useContext(EmotionCacheContext);return func(props,cache,ref)})};if(!isBrowser)exports.withEmotionCache=function(func){return function(props){var cache=React.useContext(EmotionCacheContext);if(cache===null)return cache=createCache__default.default({key:"css"}),React__namespace.createElement(EmotionCacheContext.Provider,{value:cache},func(props,cache));else return func(props,cache)}};var ThemeContext=React__namespace.createContext({});ThemeContext.displayName="EmotionThemeContext";var useTheme=function(){return React__namespace.useContext(ThemeContext)},getTheme=function(outerTheme,theme){if(typeof theme==="function"){var mergedTheme=theme(outerTheme);if(mergedTheme==null||typeof mergedTheme!=="object"||Array.isArray(mergedTheme))throw Error("[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!");return mergedTheme}if(theme==null||typeof theme!=="object"||Array.isArray(theme))throw Error("[ThemeProvider] Please make your theme prop a plain object");return _extends({},outerTheme,theme)},createCacheWithTheme=weakMemoize__default.default(function(outerTheme){return weakMemoize__default.default(function(theme){return getTheme(outerTheme,theme)})}),ThemeProvider=function(props){var theme=React__namespace.useContext(ThemeContext);if(props.theme!==theme)theme=createCacheWithTheme(theme)(props.theme);return React__namespace.createElement(ThemeContext.Provider,{value:theme},props.children)};function withTheme(Component){var componentName=Component.displayName||Component.name||"Component",WithTheme=React__namespace.forwardRef(function(props,ref){var theme=React__namespace.useContext(ThemeContext);return React__namespace.createElement(Component,_extends({theme,ref},props))});return WithTheme.displayName="WithTheme("+componentName+")",_isolatedHnrs_dist_emotionReact_isolatedHnrs.default(WithTheme,Component)}var hasOwn={}.hasOwnProperty,getLastPart=function(functionName){var parts=functionName.split(".");return parts[parts.length-1]},getFunctionNameFromStackTraceLine=function(line){var match=/^\s+at\s+([A-Za-z0-9$.]+)\s/.exec(line);if(match)return getLastPart(match[1]);if(match=/^([A-Za-z0-9$.]+)@/.exec(line),match)return getLastPart(match[1]);return},internalReactFunctionNames=new Set(["renderWithHooks","processChild","finishClassComponent","renderToString"]),sanitizeIdentifier=function(identifier){return identifier.replace(/\$/g,"-")},getLabelFromStackTrace=function(stackTrace){if(!stackTrace)return;var lines=stackTrace.split(`
13
- `);for(var i=0;i<lines.length;i++){var functionName=getFunctionNameFromStackTraceLine(lines[i]);if(!functionName)continue;if(internalReactFunctionNames.has(functionName))break;if(/^[A-Z]/.test(functionName))return sanitizeIdentifier(functionName)}return},typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",labelPropName="__EMOTION_LABEL_PLEASE_DO_NOT_USE__",createEmotionProps=function(type,props){if(typeof props.css==="string"&&props.css.indexOf(":")!==-1)throw Error("Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`"+props.css+"`");var newProps={};for(var _key in props)if(hasOwn.call(props,_key))newProps[_key]=props[_key];if(newProps[typePropName]=type,typeof globalThis<"u"&&!!globalThis.EMOTION_RUNTIME_AUTO_LABEL&&!!props.css&&(typeof props.css!=="object"||!("name"in props.css)||typeof props.css.name!=="string"||props.css.name.indexOf("-")===-1)){var label=getLabelFromStackTrace(Error().stack);if(label)newProps[labelPropName]=label}return newProps},Insertion=function(_ref){var{cache,serialized,isStringTag}=_ref;utils.registerStyles(cache,serialized,isStringTag);var rules=useInsertionEffectWithFallbacks.useInsertionEffectAlwaysWithSyncFallback(function(){return utils.insertStyles(cache,serialized,isStringTag)});if(!isBrowser&&rules!==void 0){var _ref2,{name:serializedNames,next}=serialized;while(next!==void 0)serializedNames+=" "+next.name,next=next.next;return React__namespace.createElement("style",(_ref2={},_ref2["data-emotion"]=cache.key+" "+serializedNames,_ref2.dangerouslySetInnerHTML={__html:rules},_ref2.nonce=cache.sheet.nonce,_ref2))}return null},Emotion=exports.withEmotionCache(function(props,cache,ref){var cssProp=props.css;if(typeof cssProp==="string"&&cache.registered[cssProp]!==void 0)cssProp=cache.registered[cssProp];var WrappedComponent=props[typePropName],registeredStyles=[cssProp],className="";if(typeof props.className==="string")className=utils.getRegisteredStyles(cache.registered,registeredStyles,props.className);else if(props.className!=null)className=props.className+" ";var serialized=serialize.serializeStyles(registeredStyles,void 0,React__namespace.useContext(ThemeContext));if(serialized.name.indexOf("-")===-1){var labelFromStack=props[labelPropName];if(labelFromStack)serialized=serialize.serializeStyles([serialized,"label:"+labelFromStack+";"])}className+=cache.key+"-"+serialized.name;var newProps={};for(var _key2 in props)if(hasOwn.call(props,_key2)&&_key2!=="css"&&_key2!==typePropName&&_key2!==labelPropName)newProps[_key2]=props[_key2];if(newProps.className=className,ref)newProps.ref=ref;return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Insertion,{cache,serialized,isStringTag:typeof WrappedComponent==="string"}),React__namespace.createElement(WrappedComponent,newProps))});Emotion.displayName="EmotionCssPropInternal";var Emotion$1=Emotion;exports.CacheProvider=CacheProvider;exports.Emotion=Emotion$1;exports.ThemeContext=ThemeContext;exports.ThemeProvider=ThemeProvider;exports.__unsafe_useEmotionCache=__unsafe_useEmotionCache;exports.createEmotionProps=createEmotionProps;exports.hasOwn=hasOwn;exports.isBrowser=isBrowser;exports.useTheme=useTheme;exports.withTheme=withTheme});var require_emotion_react_development_cjs=__commonJS(function(exports){var React=__toESM(require_react_development());Object.defineProperty(exports,"__esModule",{value:!0});var emotionElement=require_emotion_element_e8f4cc37_development_cjs(),utils=require_emotion_utils_cjs(),useInsertionEffectWithFallbacks=require_emotion_use_insertion_effect_with_fallbacks_cjs(),serialize=require_emotion_serialize_development_cjs();require_emotion_cache_development_cjs();require_extends();require_emotion_weak_memoize_cjs_dev();require_emotion_react__isolated_hnrs_development_cjs();require_hoist_non_react_statics_cjs();function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e)Object.keys(e).forEach(function(k){if(k!=="default"){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}});return n.default=e,Object.freeze(n)}var React__namespace=_interopNamespace(React),isDevelopment=!0,pkg={name:"@emotion/react",version:"11.14.0",main:"dist/emotion-react.cjs.js",module:"dist/emotion-react.esm.js",types:"dist/emotion-react.cjs.d.ts",exports:{".":{types:{import:"./dist/emotion-react.cjs.mjs",default:"./dist/emotion-react.cjs.js"},development:{"edge-light":{module:"./dist/emotion-react.development.edge-light.esm.js",import:"./dist/emotion-react.development.edge-light.cjs.mjs",default:"./dist/emotion-react.development.edge-light.cjs.js"},worker:{module:"./dist/emotion-react.development.edge-light.esm.js",import:"./dist/emotion-react.development.edge-light.cjs.mjs",default:"./dist/emotion-react.development.edge-light.cjs.js"},workerd:{module:"./dist/emotion-react.development.edge-light.esm.js",import:"./dist/emotion-react.development.edge-light.cjs.mjs",default:"./dist/emotion-react.development.edge-light.cjs.js"},browser:{module:"./dist/emotion-react.browser.development.esm.js",import:"./dist/emotion-react.browser.development.cjs.mjs",default:"./dist/emotion-react.browser.development.cjs.js"},module:"./dist/emotion-react.development.esm.js",import:"./dist/emotion-react.development.cjs.mjs",default:"./dist/emotion-react.development.cjs.js"},"edge-light":{module:"./dist/emotion-react.edge-light.esm.js",import:"./dist/emotion-react.edge-light.cjs.mjs",default:"./dist/emotion-react.edge-light.cjs.js"},worker:{module:"./dist/emotion-react.edge-light.esm.js",import:"./dist/emotion-react.edge-light.cjs.mjs",default:"./dist/emotion-react.edge-light.cjs.js"},workerd:{module:"./dist/emotion-react.edge-light.esm.js",import:"./dist/emotion-react.edge-light.cjs.mjs",default:"./dist/emotion-react.edge-light.cjs.js"},browser:{module:"./dist/emotion-react.browser.esm.js",import:"./dist/emotion-react.browser.cjs.mjs",default:"./dist/emotion-react.browser.cjs.js"},module:"./dist/emotion-react.esm.js",import:"./dist/emotion-react.cjs.mjs",default:"./dist/emotion-react.cjs.js"},"./jsx-runtime":{types:{import:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"},development:{"edge-light":{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"},worker:{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"},workerd:{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.edge-light.cjs.js"},browser:{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.development.cjs.js"},module:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.development.cjs.js"},"edge-light":{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"},worker:{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"},workerd:{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.edge-light.cjs.js"},browser:{module:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.browser.cjs.js"},module:"./jsx-runtime/dist/emotion-react-jsx-runtime.esm.js",import:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.mjs",default:"./jsx-runtime/dist/emotion-react-jsx-runtime.cjs.js"},"./_isolated-hnrs":{types:{import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"},development:{"edge-light":{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"},worker:{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"},workerd:{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.edge-light.cjs.js"},browser:{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.development.cjs.js"},module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.development.cjs.js"},"edge-light":{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"},worker:{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"},workerd:{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.edge-light.cjs.js"},browser:{module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.cjs.js"},module:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.esm.js",import:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.mjs",default:"./_isolated-hnrs/dist/emotion-react-_isolated-hnrs.cjs.js"},"./jsx-dev-runtime":{types:{import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"},development:{"edge-light":{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"},worker:{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"},workerd:{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.edge-light.cjs.js"},browser:{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.development.cjs.js"},module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.development.cjs.js"},"edge-light":{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"},worker:{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"},workerd:{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.edge-light.cjs.js"},browser:{module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.browser.cjs.js"},module:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.esm.js",import:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.mjs",default:"./jsx-dev-runtime/dist/emotion-react-jsx-dev-runtime.cjs.js"},"./package.json":"./package.json","./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}},imports:{"#is-development":{development:"./src/conditions/true.ts",default:"./src/conditions/false.ts"},"#is-browser":{"edge-light":"./src/conditions/false.ts",workerd:"./src/conditions/false.ts",worker:"./src/conditions/false.ts",browser:"./src/conditions/true.ts",default:"./src/conditions/is-browser.ts"}},files:["src","dist","jsx-runtime","jsx-dev-runtime","_isolated-hnrs","types/css-prop.d.ts","macro.*"],sideEffects:!1,author:"Emotion Contributors",license:"MIT",scripts:{"test:typescript":"dtslint types"},dependencies:{"@babel/runtime":"^7.18.3","@emotion/babel-plugin":"^11.13.5","@emotion/cache":"^11.14.0","@emotion/serialize":"^1.3.3","@emotion/use-insertion-effect-with-fallbacks":"^1.2.0","@emotion/utils":"^1.4.2","@emotion/weak-memoize":"^0.4.0","hoist-non-react-statics":"^3.3.1"},peerDependencies:{react:">=16.8.0"},peerDependenciesMeta:{"@types/react":{optional:!0}},devDependencies:{"@definitelytyped/dtslint":"0.0.112","@emotion/css":"11.13.5","@emotion/css-prettifier":"1.2.0","@emotion/server":"11.11.0","@emotion/styled":"11.14.0","@types/hoist-non-react-statics":"^3.3.5","html-tag-names":"^1.1.2",react:"16.14.0","svg-tag-names":"^1.1.1",typescript:"^5.4.5"},repository:"https://github.com/emotion-js/emotion/tree/main/packages/react",publishConfig:{access:"public"},"umd:main":"dist/emotion-react.umd.min.js",preconstruct:{entrypoints:["./index.ts","./jsx-runtime.ts","./jsx-dev-runtime.ts","./_isolated-hnrs.ts"],umdName:"emotionReact",exports:{extra:{"./types/css-prop":"./types/css-prop.d.ts","./macro":{types:{import:"./macro.d.mts",default:"./macro.d.ts"},default:"./macro.js"}}}}};exports.jsx=function(type,props){var args=arguments;if(props==null||!emotionElement.hasOwn.call(props,"css"))return React__namespace.createElement.apply(void 0,args);var argsLength=args.length,createElementArgArray=Array(argsLength);createElementArgArray[0]=emotionElement.Emotion,createElementArgArray[1]=emotionElement.createEmotionProps(type,props);for(var i=2;i<argsLength;i++)createElementArgArray[i]=args[i];return React__namespace.createElement.apply(null,createElementArgArray)};(function(_jsx){var JSX;(function(_JSX){})(JSX||(JSX=_jsx.JSX||(_jsx.JSX={})))})(exports.jsx||(exports.jsx={}));var warnedAboutCssPropForGlobal=!1,Global=emotionElement.withEmotionCache(function(props,cache){if(!warnedAboutCssPropForGlobal&&(("className"in props)&&props.className||("css"in props)&&props.css))console.error("It looks like you're using the css prop on Global, did you mean to use the styles prop instead?"),warnedAboutCssPropForGlobal=!0;var styles=props.styles,serialized=serialize.serializeStyles([styles],void 0,React__namespace.useContext(emotionElement.ThemeContext));if(!emotionElement.isBrowser){var _ref,{name:serializedNames,styles:serializedStyles,next}=serialized;while(next!==void 0)serializedNames+=" "+next.name,serializedStyles+=next.styles,next=next.next;var shouldCache=cache.compat===!0,rules=cache.insert("",{name:serializedNames,styles:serializedStyles},cache.sheet,shouldCache);if(shouldCache)return null;return React__namespace.createElement("style",(_ref={},_ref["data-emotion"]=cache.key+"-global "+serializedNames,_ref.dangerouslySetInnerHTML={__html:rules},_ref.nonce=cache.sheet.nonce,_ref))}var sheetRef=React__namespace.useRef();return useInsertionEffectWithFallbacks.useInsertionEffectWithLayoutFallback(function(){var key=cache.key+"-global",sheet=new cache.sheet.constructor({key,nonce:cache.sheet.nonce,container:cache.sheet.container,speedy:cache.sheet.isSpeedy}),rehydrating=!1,node=document.querySelector('style[data-emotion="'+key+" "+serialized.name+'"]');if(cache.sheet.tags.length)sheet.before=cache.sheet.tags[0];if(node!==null)rehydrating=!0,node.setAttribute("data-emotion",key),sheet.hydrate([node]);return sheetRef.current=[sheet,rehydrating],function(){sheet.flush()}},[cache]),useInsertionEffectWithFallbacks.useInsertionEffectWithLayoutFallback(function(){var sheetRefCurrent=sheetRef.current,sheet=sheetRefCurrent[0],rehydrating=sheetRefCurrent[1];if(rehydrating){sheetRefCurrent[1]=!1;return}if(serialized.next!==void 0)utils.insertStyles(cache,serialized.next,!0);if(sheet.tags.length){var element=sheet.tags[sheet.tags.length-1].nextElementSibling;sheet.before=element,sheet.flush()}cache.insert("",serialized,sheet,!1)},[cache,serialized.name]),null});Global.displayName="EmotionGlobal";function css(){for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];return serialize.serializeStyles(args)}function keyframes(){var insertable=css.apply(void 0,arguments),name="animation-"+insertable.name;return{name,styles:"@keyframes "+name+"{"+insertable.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}var classnames=function classnames(args){var len=args.length,i=0,cls="";for(;i<len;i++){var arg=args[i];if(arg==null)continue;var toAdd=void 0;switch(typeof arg){case"boolean":break;case"object":{if(Array.isArray(arg))toAdd=classnames(arg);else{if(arg.styles!==void 0&&arg.name!==void 0)console.error("You have passed styles created with `css` from `@emotion/react` package to the `cx`.\n`cx` is meant to compose class names (strings) so you should convert those styles to a class name by passing them to the `css` received from <ClassNames/> component.");toAdd="";for(var k in arg)if(arg[k]&&k)toAdd&&(toAdd+=" "),toAdd+=k}break}default:toAdd=arg}if(toAdd)cls&&(cls+=" "),cls+=toAdd}return cls};function merge(registered,css,className){var registeredStyles=[],rawClassName=utils.getRegisteredStyles(registered,registeredStyles,className);if(registeredStyles.length<2)return className;return rawClassName+css(registeredStyles)}var Insertion=function(_ref){var{cache,serializedArr}=_ref,rules=useInsertionEffectWithFallbacks.useInsertionEffectAlwaysWithSyncFallback(function(){var rules="";for(var i=0;i<serializedArr.length;i++){var res=utils.insertStyles(cache,serializedArr[i],!1);if(!emotionElement.isBrowser&&res!==void 0)rules+=res}if(!emotionElement.isBrowser)return rules});if(!emotionElement.isBrowser&&rules.length!==0){var _ref2;return React__namespace.createElement("style",(_ref2={},_ref2["data-emotion"]=cache.key+" "+serializedArr.map(function(serialized){return serialized.name}).join(" "),_ref2.dangerouslySetInnerHTML={__html:rules},_ref2.nonce=cache.sheet.nonce,_ref2))}return null},ClassNames=emotionElement.withEmotionCache(function(props,cache){var hasRendered=!1,serializedArr=[],css=function(){if(hasRendered&&isDevelopment)throw Error("css can only be used during render");for(var _len=arguments.length,args=Array(_len),_key=0;_key<_len;_key++)args[_key]=arguments[_key];var serialized=serialize.serializeStyles(args,cache.registered);return serializedArr.push(serialized),utils.registerStyles(cache,serialized,!1),cache.key+"-"+serialized.name},cx=function(){if(hasRendered&&isDevelopment)throw Error("cx can only be used during render");for(var _len2=arguments.length,args=Array(_len2),_key2=0;_key2<_len2;_key2++)args[_key2]=arguments[_key2];return merge(cache.registered,css,classnames(args))},content={css,cx,theme:React__namespace.useContext(emotionElement.ThemeContext)},ele=props.children(content);return hasRendered=!0,React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Insertion,{cache,serializedArr}),ele)});ClassNames.displayName="EmotionClassNames";if(isBrowser=typeof document<"u",isTestEnv=typeof jest<"u"||typeof vi<"u",isBrowser&&!isTestEnv){if(globalContext=typeof globalThis<"u"?globalThis:isBrowser?window:global,globalKey="__EMOTION_REACT_"+pkg.version.split(".")[0]+"__",globalContext[globalKey])console.warn("You are loading @emotion/react when it is already loaded. Running multiple instances may cause problems. This can happen if multiple versions are used, or if multiple builds of the same version are used.");globalContext[globalKey]=!0}var isBrowser,isTestEnv,globalContext,globalKey;exports.CacheProvider=emotionElement.CacheProvider;exports.ThemeContext=emotionElement.ThemeContext;exports.ThemeProvider=emotionElement.ThemeProvider;exports.__unsafe_useEmotionCache=emotionElement.__unsafe_useEmotionCache;exports.useTheme=emotionElement.useTheme;Object.defineProperty(exports,"withEmotionCache",{enumerable:!0,get:function(){return emotionElement.withEmotionCache}});exports.withTheme=emotionElement.withTheme;exports.ClassNames=ClassNames;exports.Global=Global;exports.createElement=exports.jsx;exports.css=css;exports.keyframes=keyframes});var require_through=__commonJS(function(exports,module){var Stream=__require("stream");exports=module.exports=through;through.through=through;function through(write,end,opts){write=write||function(data){this.queue(data)},end=end||function(){this.queue(null)};var ended=!1,destroyed=!1,buffer=[],_ended=!1,stream=new Stream;stream.readable=stream.writable=!0,stream.paused=!1,stream.autoDestroy=!(opts&&opts.autoDestroy===!1),stream.write=function(data){return write.call(this,data),!stream.paused};function drain(){while(buffer.length&&!stream.paused){var data=buffer.shift();if(data===null)return stream.emit("end");else stream.emit("data",data)}}stream.queue=stream.push=function(data){if(_ended)return stream;if(data===null)_ended=!0;return buffer.push(data),drain(),stream},stream.on("end",function(){if(stream.readable=!1,!stream.writable&&stream.autoDestroy)process.nextTick(function(){stream.destroy()})});function _end(){if(stream.writable=!1,end.call(stream),!stream.readable&&stream.autoDestroy)stream.destroy()}return stream.end=function(data){if(ended)return;if(ended=!0,arguments.length)stream.write(data);return _end(),stream},stream.destroy=function(){if(destroyed)return;return destroyed=!0,ended=!0,buffer.length=0,stream.writable=stream.readable=!1,stream.emit("close"),stream},stream.pause=function(){if(stream.paused)return;return stream.paused=!0,stream},stream.resume=function(){if(stream.paused)stream.paused=!1,stream.emit("resume");if(drain(),!stream.paused)stream.emit("drain");return stream},stream}});var require_buffer_from=__commonJS(function(exports,module){var toString=Object.prototype.toString,isModern=typeof Buffer.alloc==="function"&&typeof Buffer.allocUnsafe==="function"&&typeof Buffer.from==="function";function isArrayBuffer(input){return toString.call(input).slice(8,-1)==="ArrayBuffer"}function fromArrayBuffer(obj,byteOffset,length){byteOffset>>>=0;var maxLength=obj.byteLength-byteOffset;if(maxLength<0)throw RangeError("'offset' is out of bounds");if(length===void 0)length=maxLength;else if(length>>>=0,length>maxLength)throw RangeError("'length' is out of bounds");return isModern?Buffer.from(obj.slice(byteOffset,byteOffset+length)):new Buffer(new Uint8Array(obj.slice(byteOffset,byteOffset+length)))}function fromString(string,encoding){if(typeof encoding!=="string"||encoding==="")encoding="utf8";if(!Buffer.isEncoding(encoding))throw TypeError('"encoding" must be a valid string encoding');return isModern?Buffer.from(string,encoding):new Buffer(string,encoding)}function bufferFrom(value,encodingOrOffset,length){if(typeof value==="number")throw TypeError('"value" argument must not be a number');if(isArrayBuffer(value))return fromArrayBuffer(value,encodingOrOffset,length);if(typeof value==="string")return fromString(value,encodingOrOffset);return isModern?Buffer.from(value):new Buffer(value)}module.exports=bufferFrom});var require_isarray=__commonJS(function(exports,module){module.exports=Array.isArray||function(arr){return Object.prototype.toString.call(arr)=="[object Array]"}});var require_util=__commonJS(function(exports){function isArray(arg){if(Array.isArray)return Array.isArray(arg);return objectToString(arg)==="[object Array]"}exports.isArray=isArray;function isBoolean(arg){return typeof arg==="boolean"}exports.isBoolean=isBoolean;function isNull(arg){return arg===null}exports.isNull=isNull;function isNullOrUndefined(arg){return arg==null}exports.isNullOrUndefined=isNullOrUndefined;function isNumber(arg){return typeof arg==="number"}exports.isNumber=isNumber;function isString(arg){return typeof arg==="string"}exports.isString=isString;function isSymbol(arg){return typeof arg==="symbol"}exports.isSymbol=isSymbol;function isUndefined(arg){return arg===void 0}exports.isUndefined=isUndefined;function isRegExp(re){return objectToString(re)==="[object RegExp]"}exports.isRegExp=isRegExp;function isObject(arg){return typeof arg==="object"&&arg!==null}exports.isObject=isObject;function isDate(d){return objectToString(d)==="[object Date]"}exports.isDate=isDate;function isError(e){return objectToString(e)==="[object Error]"||e instanceof Error}exports.isError=isError;function isFunction(arg){return typeof arg==="function"}exports.isFunction=isFunction;function isPrimitive(arg){return arg===null||typeof arg==="boolean"||typeof arg==="number"||typeof arg==="string"||typeof arg==="symbol"||typeof arg>"u"}exports.isPrimitive=isPrimitive;exports.isBuffer=__require("buffer").Buffer.isBuffer;function objectToString(o){return Object.prototype.toString.call(o)}});var require_inherits_browser=__commonJS(function(exports,module){if(typeof Object.create==="function")module.exports=function(ctor,superCtor){if(superCtor)ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})};else module.exports=function(ctor,superCtor){if(superCtor){ctor.super_=superCtor;var TempCtor=function(){};TempCtor.prototype=superCtor.prototype,ctor.prototype=new TempCtor,ctor.prototype.constructor=ctor}}});var require_inherits=__commonJS(function(exports,module){try{if(util=__require("util"),typeof util.inherits!=="function")throw"";module.exports=util.inherits}catch(e){module.exports=require_inherits_browser()}var util});var require_string_decoder=__commonJS(function(exports){var Buffer2=__require("buffer").Buffer,isBufferEncoding=Buffer2.isEncoding||function(encoding){switch(encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function assertEncoding(encoding){if(encoding&&!isBufferEncoding(encoding))throw Error("Unknown encoding: "+encoding)}var StringDecoder=exports.StringDecoder=function(encoding){switch(this.encoding=(encoding||"utf8").toLowerCase().replace(/[-_]/,""),assertEncoding(encoding),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=utf16DetectIncompleteChar;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=base64DetectIncompleteChar;break;default:this.write=passThroughWrite;return}this.charBuffer=new Buffer2(6),this.charReceived=0,this.charLength=0};StringDecoder.prototype.write=function(buffer){var charStr="";while(this.charLength){var available=buffer.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:buffer.length;if(buffer.copy(this.charBuffer,this.charReceived,0,available),this.charReceived+=available,this.charReceived<this.charLength)return"";buffer=buffer.slice(available,buffer.length),charStr=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var charCode=charStr.charCodeAt(charStr.length-1);if(charCode>=55296&&charCode<=56319){this.charLength+=this.surrogateSize,charStr="";continue}if(this.charReceived=this.charLength=0,buffer.length===0)return charStr;break}this.detectIncompleteChar(buffer);var end=buffer.length;if(this.charLength)buffer.copy(this.charBuffer,0,buffer.length-this.charReceived,end),end-=this.charReceived;charStr+=buffer.toString(this.encoding,0,end);var end=charStr.length-1,charCode=charStr.charCodeAt(end);if(charCode>=55296&&charCode<=56319){var size=this.surrogateSize;return this.charLength+=size,this.charReceived+=size,this.charBuffer.copy(this.charBuffer,size,0,size),buffer.copy(this.charBuffer,0,0,size),charStr.substring(0,end)}return charStr};StringDecoder.prototype.detectIncompleteChar=function(buffer){var i=buffer.length>=3?3:buffer.length;for(;i>0;i--){var c=buffer[buffer.length-i];if(i==1&&c>>5==6){this.charLength=2;break}if(i<=2&&c>>4==14){this.charLength=3;break}if(i<=3&&c>>3==30){this.charLength=4;break}}this.charReceived=i};StringDecoder.prototype.end=function(buffer){var res="";if(buffer&&buffer.length)res=this.write(buffer);if(this.charReceived){var cr=this.charReceived,buf=this.charBuffer,enc=this.encoding;res+=buf.slice(0,cr).toString(enc)}return res};function passThroughWrite(buffer){return buffer.toString(this.encoding)}function utf16DetectIncompleteChar(buffer){this.charReceived=buffer.length%2,this.charLength=this.charReceived?2:0}function base64DetectIncompleteChar(buffer){this.charReceived=buffer.length%3,this.charLength=this.charReceived?3:0}});var require__stream_readable=__commonJS(function(exports,module){module.exports=Readable;var isArray=require_isarray(),Buffer2=__require("buffer").Buffer;Readable.ReadableState=ReadableState;var EE=__require("events").EventEmitter;if(!EE.listenerCount)EE.listenerCount=function(emitter,type){return emitter.listeners(type).length};var Stream=__require("stream"),util=require_util();util.inherits=require_inherits();var StringDecoder;util.inherits(Readable,Stream);function ReadableState(options,stream){options=options||{};var hwm=options.highWaterMark;if(this.highWaterMark=hwm||hwm===0?hwm:16384,this.highWaterMark=~~this.highWaterMark,this.buffer=[],this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=!1,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.calledRead=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.objectMode=!!options.objectMode,this.defaultEncoding=options.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding){if(!StringDecoder)StringDecoder=require_string_decoder().StringDecoder;this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding}}function Readable(options){if(!(this instanceof Readable))return new Readable(options);this._readableState=new ReadableState(options,this),this.readable=!0,Stream.call(this)}Readable.prototype.push=function(chunk,encoding){var state=this._readableState;if(typeof chunk==="string"&&!state.objectMode){if(encoding=encoding||state.defaultEncoding,encoding!==state.encoding)chunk=new Buffer2(chunk,encoding),encoding=""}return readableAddChunk(this,state,chunk,encoding,!1)};Readable.prototype.unshift=function(chunk){var state=this._readableState;return readableAddChunk(this,state,chunk,"",!0)};function readableAddChunk(stream,state,chunk,encoding,addToFront){var er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(chunk===null||chunk===void 0){if(state.reading=!1,!state.ended)onEofChunk(stream,state)}else if(state.objectMode||chunk&&chunk.length>0)if(state.ended&&!addToFront){var e=Error("stream.push() after EOF");stream.emit("error",e)}else if(state.endEmitted&&addToFront){var e=Error("stream.unshift() after end event");stream.emit("error",e)}else{if(state.decoder&&!addToFront&&!encoding)chunk=state.decoder.write(chunk);if(state.length+=state.objectMode?1:chunk.length,addToFront)state.buffer.unshift(chunk);else state.reading=!1,state.buffer.push(chunk);if(state.needReadable)emitReadable(stream);maybeReadMore(stream,state)}else if(!addToFront)state.reading=!1;return needMoreData(state)}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=require_string_decoder().StringDecoder;this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc};var MAX_HWM=8388608;function roundUpToNextPowerOf2(n){if(n>=MAX_HWM)n=MAX_HWM;else{n--;for(var p=1;p<32;p<<=1)n|=n>>p;n++}return n}function howMuchToRead(n,state){if(state.length===0&&state.ended)return 0;if(state.objectMode)return n===0?0:1;if(n===null||isNaN(n))if(state.flowing&&state.buffer.length)return state.buffer[0].length;else return state.length;if(n<=0)return 0;if(n>state.highWaterMark)state.highWaterMark=roundUpToNextPowerOf2(n);if(n>state.length)if(!state.ended)return state.needReadable=!0,0;else return state.length;return n}Readable.prototype.read=function(n){var state=this._readableState;state.calledRead=!0;var nOrig=n,ret;if(typeof n!=="number"||n>0)state.emittedReadable=!1;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended))return emitReadable(this),null;if(n=howMuchToRead(n,state),n===0&&state.ended){if(ret=null,state.length>0&&state.decoder)ret=fromList(n,state),state.length-=ret.length;if(state.length===0)endReadable(this);return ret}var doRead=state.needReadable;if(state.length-n<=state.highWaterMark)doRead=!0;if(state.ended||state.reading)doRead=!1;if(doRead){if(state.reading=!0,state.sync=!0,state.length===0)state.needReadable=!0;this._read(state.highWaterMark),state.sync=!1}if(doRead&&!state.reading)n=howMuchToRead(nOrig,state);if(n>0)ret=fromList(n,state);else ret=null;if(ret===null)state.needReadable=!0,n=0;if(state.length-=n,state.length===0&&!state.ended)state.needReadable=!0;if(state.ended&&!state.endEmitted&&state.length===0)endReadable(this);return ret};function chunkInvalid(state,chunk){var er=null;if(!Buffer2.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==void 0&&!state.objectMode)er=TypeError("Invalid non-string/buffer chunk");return er}function onEofChunk(stream,state){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length}if(state.ended=!0,state.length>0)emitReadable(stream);else endReadable(stream)}function emitReadable(stream){var state=stream._readableState;if(state.needReadable=!1,state.emittedReadable)return;if(state.emittedReadable=!0,state.sync)process.nextTick(function(){emitReadable_(stream)});else emitReadable_(stream)}function emitReadable_(stream){stream.emit("readable")}function maybeReadMore(stream,state){if(!state.readingMore)state.readingMore=!0,process.nextTick(function(){maybeReadMore_(stream,state)})}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark)if(stream.read(0),len===state.length)break;else len=state.length;state.readingMore=!1}Readable.prototype._read=function(n){this.emit("error",Error("not implemented"))};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1;var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:cleanup;if(state.endEmitted)process.nextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);function onunpipe(readable){if(readable!==src)return;cleanup()}function onend(){dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);function cleanup(){if(dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",cleanup),!dest._writableState||dest._writableState.needDrain)ondrain()}function onerror(er){if(unpipe(),dest.removeListener("error",onerror),EE.listenerCount(dest,"error")===0)dest.emit("error",er)}if(!dest._events||!dest._events.error)dest.on("error",onerror);else if(isArray(dest._events.error))dest._events.error.unshift(onerror);else dest._events.error=[onerror,dest._events.error];function onclose(){dest.removeListener("finish",onfinish),unpipe()}dest.once("close",onclose);function onfinish(){dest.removeListener("close",onclose),unpipe()}dest.once("finish",onfinish);function unpipe(){src.unpipe(dest)}if(dest.emit("pipe",src),!state.flowing)this.on("readable",pipeOnReadable),state.flowing=!0,process.nextTick(function(){flow(src)});return dest};function pipeOnDrain(src){return function(){var dest=this,state=src._readableState;if(state.awaitDrain--,state.awaitDrain===0)flow(src)}}function flow(src){var state=src._readableState,chunk;state.awaitDrain=0;function write(dest,i,list){var written=dest.write(chunk);if(written===!1)state.awaitDrain++}while(state.pipesCount&&(chunk=src.read())!==null){if(state.pipesCount===1)write(state.pipes,0,null);else forEach(state.pipes,write);if(src.emit("data",chunk),state.awaitDrain>0)return}if(state.pipesCount===0){if(state.flowing=!1,EE.listenerCount(src,"data")>0)emitDataEvents(src);return}state.ranOut=!0}function pipeOnReadable(){if(this._readableState.ranOut)this._readableState.ranOut=!1,flow(this)}Readable.prototype.unpipe=function(dest){var state=this._readableState;if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;if(state.pipes=null,state.pipesCount=0,this.removeListener("readable",pipeOnReadable),state.flowing=!1,dest)dest.emit("unpipe",this);return this}if(!dest){var{pipes:dests,pipesCount:len}=state;state.pipes=null,state.pipesCount=0,this.removeListener("readable",pipeOnReadable),state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this);return this}var i=indexOf(state.pipes,dest);if(i===-1)return this;if(state.pipes.splice(i,1),state.pipesCount-=1,state.pipesCount===1)state.pipes=state.pipes[0];return dest.emit("unpipe",this),this};Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if(ev==="data"&&!this._readableState.flowing)emitDataEvents(this);if(ev==="readable"&&this.readable){var state=this._readableState;if(!state.readableListening){if(state.readableListening=!0,state.emittedReadable=!1,state.needReadable=!0,!state.reading)this.read(0);else if(state.length)emitReadable(this,state)}}return res};Readable.prototype.addListener=Readable.prototype.on;Readable.prototype.resume=function(){emitDataEvents(this),this.read(0),this.emit("resume")};Readable.prototype.pause=function(){emitDataEvents(this,!0),this.emit("pause")};function emitDataEvents(stream,startPaused){var state=stream._readableState;if(state.flowing)throw Error("Cannot switch to old mode now.");var paused=startPaused||!1,readable=!1;stream.readable=!0,stream.pipe=Stream.prototype.pipe,stream.on=stream.addListener=Stream.prototype.on,stream.on("readable",function(){readable=!0;var c;while(!paused&&(c=stream.read())!==null)stream.emit("data",c);if(c===null)readable=!1,stream._readableState.needReadable=!0}),stream.pause=function(){paused=!0,this.emit("pause")},stream.resume=function(){if(paused=!1,readable)process.nextTick(function(){stream.emit("readable")});else this.read(0);this.emit("resume")},stream.emit("readable")}Readable.prototype.wrap=function(stream){var state=this._readableState,paused=!1,self2=this;stream.on("end",function(){if(state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)self2.push(chunk)}self2.push(null)}),stream.on("data",function(chunk){if(state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===void 0))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=self2.push(chunk);if(!ret)paused=!0,stream.pause()});for(var i in stream)if(typeof stream[i]==="function"&&typeof this[i]>"u")this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i);var events=["error","close","destroy","pause","resume"];return forEach(events,function(ev){stream.on(ev,self2.emit.bind(self2,ev))}),self2._read=function(n){if(paused)paused=!1,stream.resume()},self2};Readable._fromList=fromList;function fromList(n,state){var{buffer:list,length}=state,stringMode=!!state.decoder,objectMode=!!state.objectMode,ret;if(list.length===0)return null;if(length===0)ret=null;else if(objectMode)ret=list.shift();else if(!n||n>=length){if(stringMode)ret=list.join("");else ret=Buffer2.concat(list,length);list.length=0}else if(n<list[0].length){var buf=list[0];ret=buf.slice(0,n),list[0]=buf.slice(n)}else if(n===list[0].length)ret=list.shift();else{if(stringMode)ret="";else ret=new Buffer2(n);var c=0;for(var i=0,l=list.length;i<l&&c<n;i++){var buf=list[0],cpy=Math.min(n-c,buf.length);if(stringMode)ret+=buf.slice(0,cpy);else buf.copy(ret,c,0,cpy);if(cpy<buf.length)list[0]=buf.slice(cpy);else list.shift();c+=cpy}}return ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw Error("endReadable called on non-empty stream");if(!state.endEmitted&&state.calledRead)state.ended=!0,process.nextTick(function(){if(!state.endEmitted&&state.length===0)state.endEmitted=!0,stream.readable=!1,stream.emit("end")})}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}});var require__stream_duplex=__commonJS(function(exports,module){module.exports=Duplex;var objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys},util=require_util();util.inherits=require_inherits();var Readable=require__stream_readable(),Writable=require__stream_writable();util.inherits(Duplex,Readable);forEach(objectKeys(Writable.prototype),function(method){if(!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]});function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);if(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1)this.readable=!1;if(options&&options.writable===!1)this.writable=!1;if(this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1)this.allowHalfOpen=!1;this.once("end",onend)}function onend(){if(this.allowHalfOpen||this._writableState.ended)return;process.nextTick(this.end.bind(this))}function forEach(xs,f){for(var i=0,l=xs.length;i<l;i++)f(xs[i],i)}});var require__stream_writable=__commonJS(function(exports,module){module.exports=Writable;var Buffer2=__require("buffer").Buffer;Writable.WritableState=WritableState;var util=require_util();util.inherits=require_inherits();var Stream=__require("stream");util.inherits(Writable,Stream);function WriteReq(chunk,encoding,cb){this.chunk=chunk,this.encoding=encoding,this.callback=cb}function WritableState(options,stream){options=options||{};var hwm=options.highWaterMark;this.highWaterMark=hwm||hwm===0?hwm:16384,this.objectMode=!!options.objectMode,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.buffer=[],this.errorEmitted=!1}function Writable(options){var Duplex=require__stream_duplex();if(!(this instanceof Writable)&&!(this instanceof Duplex))return new Writable(options);this._writableState=new WritableState(options,this),this.writable=!0,Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",Error("Cannot pipe. Not readable."))};function writeAfterEnd(stream,state,cb){var er=Error("write after end");stream.emit("error",er),process.nextTick(function(){cb(er)})}function validChunk(stream,state,chunk,cb){var valid=!0;if(!Buffer2.isBuffer(chunk)&&typeof chunk!=="string"&&chunk!==null&&chunk!==void 0&&!state.objectMode){var er=TypeError("Invalid non-string/buffer chunk");stream.emit("error",er),process.nextTick(function(){cb(er)}),valid=!1}return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1;if(typeof encoding==="function")cb=encoding,encoding=null;if(Buffer2.isBuffer(chunk))encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=function(){};if(state.ended)writeAfterEnd(this,state,cb);else if(validChunk(this,state,chunk,cb))ret=writeOrBuffer(this,state,chunk,encoding,cb);return ret};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==!1&&typeof chunk==="string")chunk=new Buffer2(chunk,encoding);return chunk}function writeOrBuffer(stream,state,chunk,encoding,cb){if(chunk=decodeChunk(state,chunk,encoding),Buffer2.isBuffer(chunk))encoding="buffer";var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=!0;if(state.writing)state.buffer.push(new WriteReq(chunk,encoding,cb));else doWrite(stream,state,len,chunk,encoding,cb);return ret}function doWrite(stream,state,len,chunk,encoding,cb){state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,stream._write(chunk,encoding,state.onwrite),state.sync=!1}function onwriteError(stream,state,sync,er,cb){if(sync)process.nextTick(function(){cb(er)});else cb(er);stream._writableState.errorEmitted=!0,stream.emit("error",er)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,{sync,writecb:cb}=state;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(stream,state);if(!finished&&!state.bufferProcessing&&state.buffer.length)clearBuffer(stream,state);if(sync)process.nextTick(function(){afterWrite(stream,state,finished,cb)});else afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);if(cb(),finished)finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain)state.needDrain=!1,stream.emit("drain")}function clearBuffer(stream,state){state.bufferProcessing=!0;for(var c=0;c<state.buffer.length;c++){var entry=state.buffer[c],{chunk,encoding,callback:cb}=entry,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,len,chunk,encoding,cb),state.writing){c++;break}}if(state.bufferProcessing=!1,c<state.buffer.length)state.buffer=state.buffer.slice(c);else state.buffer.length=0}Writable.prototype._write=function(chunk,encoding,cb){cb(Error("not implemented"))};Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;if(typeof chunk==="function")cb=chunk,chunk=null,encoding=null;else if(typeof encoding==="function")cb=encoding,encoding=null;if(typeof chunk<"u"&&chunk!==null)this.write(chunk,encoding);if(!state.ending&&!state.finished)endWritable(this,state,cb)};function needFinish(stream,state){return state.ending&&state.length===0&&!state.finished&&!state.writing}function finishMaybe(stream,state){var need=needFinish(stream,state);if(need)state.finished=!0,stream.emit("finish");return need}function endWritable(stream,state,cb){if(state.ending=!0,finishMaybe(stream,state),cb)if(state.finished)process.nextTick(cb);else stream.once("finish",cb);state.ended=!0}});var require__stream_transform=__commonJS(function(exports,module){module.exports=Transform;var Duplex=require__stream_duplex(),util=require_util();util.inherits=require_inherits();util.inherits(Transform,Duplex);function TransformState(options,stream){this.afterTransform=function(er,data){return afterTransform(stream,er,data)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null}function afterTransform(stream,er,data){var ts=stream._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return stream.emit("error",Error("no writecb in Transform class"));if(ts.writechunk=null,ts.writecb=null,data!==null&&data!==void 0)stream.push(data);if(cb)cb(er);var rs=stream._readableState;if(rs.reading=!1,rs.needReadable||rs.length<rs.highWaterMark)stream._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);Duplex.call(this,options);var ts=this._transformState=new TransformState(options,this),stream=this;this._readableState.needReadable=!0,this._readableState.sync=!1,this.once("finish",function(){if(typeof this._flush==="function")this._flush(function(er){done(stream,er)});else done(stream)})}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw Error("not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;if(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}};Transform.prototype._read=function(n){var ts=this._transformState;if(ts.writechunk!==null&&ts.writecb&&!ts.transforming)ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform);else ts.needTransform=!0};function done(stream,er){if(er)return stream.emit("error",er);var{_writableState:ws,_readableState:rs,_transformState:ts}=stream;if(ws.length)throw Error("calling transform done when ws.length != 0");if(ts.transforming)throw Error("calling transform done when still transforming");return stream.push(null)}});var require__stream_passthrough=__commonJS(function(exports,module){module.exports=PassThrough;var Transform=require__stream_transform(),util=require_util();util.inherits=require_inherits();util.inherits(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}});var require_readable=__commonJS(function(exports,module){var Stream=__require("stream");exports=module.exports=require__stream_readable();exports.Stream=Stream;exports.Readable=exports;exports.Writable=require__stream_writable();exports.Duplex=require__stream_duplex();exports.Transform=require__stream_transform();exports.PassThrough=require__stream_passthrough();if(process.env.READABLE_STREAM==="disable")module.exports=__require("stream")});var require_html_tokenize=__commonJS(function(exports,module){var bufferFrom=require_buffer_from(),Transform=require_readable().Transform,inherits=require_inherits();inherits(Tokenize,Transform);module.exports=Tokenize;var codes={lt:60,gt:62,slash:47,dquote:34,squote:39,equal:61},strings={endScript:bufferFrom("</script"),endStyle:bufferFrom("</style"),endTitle:bufferFrom("</title"),comment:bufferFrom("<!--"),endComment:bufferFrom("-->"),cdata:bufferFrom("<![CDATA["),endCdata:bufferFrom("]]>")},states={TagNameState:1,AttributeNameState:2,BeforeAttributeValueState:3,AttributeValueState:4};function Tokenize(){if(!(this instanceof Tokenize))return new Tokenize;Transform.call(this),this._readableState.objectMode=!0,this.state="text",this.tagState=null,this.quoteState=null,this.raw=null,this.buffers=[],this._last=[]}Tokenize.prototype._transform=function(buf,enc,next){var i=0,offset=0;if(this._prev)buf=Buffer.concat([this._prev,buf]),i=this._prev.length-1,offset=this._offset,this._prev=null,this._offset=0;for(;i<buf.length;i++){var b=buf[i];if(this._last.push(b),this._last.length>9)this._last.shift();if(this.raw){var parts=this._testRaw(buf,offset,i);if(parts){if(this.push(["text",parts[0]]),this.raw===strings.endComment||this.raw===strings.endCdata)this.state="text",this.buffers=[],this.push(["close",parts[1]]);else this.state="open",this.buffers=[parts[1]];this.raw=null,offset=i+1}}else if(this.state==="text"&&b===codes.lt&&i===buf.length-1)return this._prev=buf,this._offset=offset,next();else if(this.state==="text"&&b===codes.lt&&!isWhiteSpace(buf[i+1])){if(i>0&&i-offset>0)this.buffers.push(buf.slice(offset,i));offset=i,this.state="open",this.tagState=states.TagNameState,this._pushState("text")}else if(this.tagState===states.TagNameState&&isWhiteSpace(b))this.tagState=states.AttributeNameState;else if(this.tagState===states.AttributeNameState&&b===codes.equal)this.tagState=states.BeforeAttributeValueState;else if(this.tagState===states.BeforeAttributeValueState&&isWhiteSpace(b));else if(this.tagState===states.BeforeAttributeValueState&&b!==codes.gt)if(this.tagState=states.AttributeValueState,b===codes.dquote)this.quoteState="double";else if(b===codes.squote)this.quoteState="single";else this.quoteState=null;else if(this.tagState===states.AttributeValueState&&!this.quoteState&&isWhiteSpace(b))this.tagState=states.AttributeNameState;else if(this.tagState===states.AttributeValueState&&this.quoteState==="double"&&b===codes.dquote)this.quoteState=null,this.tagState=states.AttributeNameState;else if(this.tagState===states.AttributeValueState&&this.quoteState==="single"&&b===codes.squote)this.quoteState=null,this.tagState=states.AttributeNameState;else if(this.state==="open"&&b===codes.gt&&!this.quoteState)if(this.buffers.push(buf.slice(offset,i+1)),offset=i+1,this.state="text",this.tagState=null,this._getChar(1)===codes.slash)this._pushState("close");else{var tag=this._getTag();if(tag==="script")this.raw=strings.endScript;if(tag==="style")this.raw=strings.endStyle;if(tag==="title")this.raw=strings.endTitle;this._pushState("open")}else if(this.state==="open"&&compare(this._last,strings.comment))this.buffers.push(buf.slice(offset,i+1)),offset=i+1,this.state="text",this.raw=strings.endComment,this._pushState("open");else if(this.state==="open"&&compare(this._last,strings.cdata))this.buffers.push(buf.slice(offset,i+1)),offset=i+1,this.state="text",this.raw=strings.endCdata,this._pushState("open")}if(offset<buf.length)this.buffers.push(buf.slice(offset));next()};Tokenize.prototype._flush=function(next){if(this.state==="text")this._pushState("text");this.push(null),next()};Tokenize.prototype._pushState=function(ev){if(this.buffers.length===0)return;var buf=Buffer.concat(this.buffers);this.buffers=[],this.push([ev,buf])};Tokenize.prototype._getChar=function(i){var offset=0;for(var j=0;j<this.buffers.length;j++){var buf=this.buffers[j];if(offset+buf.length>i)return buf[i-offset];offset+=buf}};Tokenize.prototype._getTag=function(){var offset=0,tag="";for(var j=0;j<this.buffers.length;j++){var buf=this.buffers[j];for(var k=0;k<buf.length;k++){if(offset===0&&k===0)continue;var c=String.fromCharCode(buf[k]);if(/[^\w-!\[\]]/.test(c))return tag.toLowerCase();else tag+=c}offset+=buf.length}};Tokenize.prototype._testRaw=function(buf,offset,index){var raw=this.raw,last=this._last;if(!compare(last,raw))return;this.buffers.push(buf.slice(offset,index+1));var buf=Buffer.concat(this.buffers),k=buf.length-raw.length;return[buf.slice(0,k),buf.slice(k)]};function compare(a,b){if(a.length<b.length)return!1;for(var i=a.length-1,j=b.length-1;i>=0&&j>=0;i--,j--)if(lower(a[i])!==lower(b[j]))return!1;return!0}function lower(n){if(n>=65&&n<=90)return n+32;return n}function isWhiteSpace(b){return b===32||b===9||b===10||b===12||b===13}});var require_process_nextick_args=__commonJS(function(exports,module){if(typeof process>"u"||!process.version||process.version.indexOf("v0.")===0||process.version.indexOf("v1.")===0&&process.version.indexOf("v1.8.")!==0)module.exports={nextTick};else module.exports=process;function nextTick(fn,arg1,arg2,arg3){if(typeof fn!=="function")throw TypeError('"callback" argument must be a function');var len=arguments.length,args,i;switch(len){case 0:case 1:return process.nextTick(fn);case 2:return process.nextTick(function(){fn.call(null,arg1)});case 3:return process.nextTick(function(){fn.call(null,arg1,arg2)});case 4:return process.nextTick(function(){fn.call(null,arg1,arg2,arg3)});default:args=Array(len-1),i=0;while(i<args.length)args[i++]=arguments[i];return process.nextTick(function(){fn.apply(null,args)})}}});var require_isarray2=__commonJS(function(exports,module){var toString={}.toString;module.exports=Array.isArray||function(arr){return toString.call(arr)=="[object Array]"}});var require_safe_buffer=__commonJS(function(exports,module){var buffer=__require("buffer"),Buffer2=buffer.Buffer;function copyProps(src,dst){for(var key in src)dst[key]=src[key]}if(Buffer2.from&&Buffer2.alloc&&Buffer2.allocUnsafe&&Buffer2.allocUnsafeSlow)module.exports=buffer;else copyProps(buffer,exports),exports.Buffer=SafeBuffer;function SafeBuffer(arg,encodingOrOffset,length){return Buffer2(arg,encodingOrOffset,length)}copyProps(Buffer2,SafeBuffer);SafeBuffer.from=function(arg,encodingOrOffset,length){if(typeof arg==="number")throw TypeError("Argument must not be a number");return Buffer2(arg,encodingOrOffset,length)};SafeBuffer.alloc=function(size,fill,encoding){if(typeof size!=="number")throw TypeError("Argument must be a number");var buf=Buffer2(size);if(fill!==void 0)if(typeof encoding==="string")buf.fill(fill,encoding);else buf.fill(fill);else buf.fill(0);return buf};SafeBuffer.allocUnsafe=function(size){if(typeof size!=="number")throw TypeError("Argument must be a number");return Buffer2(size)};SafeBuffer.allocUnsafeSlow=function(size){if(typeof size!=="number")throw TypeError("Argument must be a number");return buffer.SlowBuffer(size)}});var require_BufferList=__commonJS(function(exports,module){function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor))throw TypeError("Cannot call a class as a function")}var Buffer2=require_safe_buffer().Buffer,util=__require("util");function copyBuffer(src,target,offset){src.copy(target,offset)}module.exports=function(){function BufferList(){_classCallCheck(this,BufferList),this.head=null,this.tail=null,this.length=0}return BufferList.prototype.push=function(v){var entry={data:v,next:null};if(this.length>0)this.tail.next=entry;else this.head=entry;this.tail=entry,++this.length},BufferList.prototype.unshift=function(v){var entry={data:v,next:this.head};if(this.length===0)this.tail=entry;this.head=entry,++this.length},BufferList.prototype.shift=function(){if(this.length===0)return;var ret=this.head.data;if(this.length===1)this.head=this.tail=null;else this.head=this.head.next;return--this.length,ret},BufferList.prototype.clear=function(){this.head=this.tail=null,this.length=0},BufferList.prototype.join=function(s){if(this.length===0)return"";var p=this.head,ret=""+p.data;while(p=p.next)ret+=s+p.data;return ret},BufferList.prototype.concat=function(n){if(this.length===0)return Buffer2.alloc(0);var ret=Buffer2.allocUnsafe(n>>>0),p=this.head,i=0;while(p)copyBuffer(p.data,ret,i),i+=p.data.length,p=p.next;return ret},BufferList}();if(util&&util.inspect&&util.inspect.custom)module.exports.prototype[util.inspect.custom]=function(){var obj=util.inspect({length:this.length});return this.constructor.name+" "+obj}});var require_destroy=__commonJS(function(exports,module){var pna=require_process_nextick_args();function destroy(err,cb){var _this=this,readableDestroyed=this._readableState&&this._readableState.destroyed,writableDestroyed=this._writableState&&this._writableState.destroyed;if(readableDestroyed||writableDestroyed){if(cb)cb(err);else if(err){if(!this._writableState)pna.nextTick(emitErrorNT,this,err);else if(!this._writableState.errorEmitted)this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,this,err)}return this}if(this._readableState)this._readableState.destroyed=!0;if(this._writableState)this._writableState.destroyed=!0;return this._destroy(err||null,function(err){if(!cb&&err){if(!_this._writableState)pna.nextTick(emitErrorNT,_this,err);else if(!_this._writableState.errorEmitted)_this._writableState.errorEmitted=!0,pna.nextTick(emitErrorNT,_this,err)}else if(cb)cb(err)}),this}function undestroy(){if(this._readableState)this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1;if(this._writableState)this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1}function emitErrorNT(self2,err){self2.emit("error",err)}module.exports={destroy,undestroy}});var require_node=__commonJS(function(exports,module){module.exports=__require("util").deprecate});var require__stream_writable2=__commonJS(function(exports,module){var pna=require_process_nextick_args();module.exports=Writable;function CorkedRequest(state){var _this=this;this.next=null,this.entry=null,this.finish=function(){onCorkedFinish(_this,state)}}var asyncWrite=["v0.10","v0.9."].indexOf(process.version.slice(0,5))>-1?setImmediate:pna.nextTick,Duplex;Writable.WritableState=WritableState;var util=Object.create(require_util());util.inherits=require_inherits();var internalUtil={deprecate:require_node()},Stream=__require("stream"),Buffer2=require_safe_buffer().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer2.from(chunk)}function _isUint8Array(obj){return Buffer2.isBuffer(obj)||obj instanceof OurUint8Array}var destroyImpl=require_destroy();util.inherits(Writable,Stream);function nop(){}function WritableState(options,stream){Duplex=Duplex||require__stream_duplex2(),options=options||{};var isDuplex=stream instanceof Duplex;if(this.objectMode=!!options.objectMode,isDuplex)this.objectMode=this.objectMode||!!options.writableObjectMode;var hwm=options.highWaterMark,writableHwm=options.writableHighWaterMark,defaultHwm=this.objectMode?16:16384;if(hwm||hwm===0)this.highWaterMark=hwm;else if(isDuplex&&(writableHwm||writableHwm===0))this.highWaterMark=writableHwm;else this.highWaterMark=defaultHwm;this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var noDecode=options.decodeStrings===!1;this.decodeStrings=!noDecode,this.defaultEncoding=options.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(er){onwrite(stream,er)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new CorkedRequest(this)}WritableState.prototype.getBuffer=function(){var current=this.bufferedRequest,out=[];while(current)out.push(current),current=current.next;return out};(function(){try{Object.defineProperty(WritableState.prototype,"buffer",{get:internalUtil.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(_){}})();var realHasInstance;if(typeof Symbol==="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]==="function")realHasInstance=Function.prototype[Symbol.hasInstance],Object.defineProperty(Writable,Symbol.hasInstance,{value:function(object){if(realHasInstance.call(this,object))return!0;if(this!==Writable)return!1;return object&&object._writableState instanceof WritableState}});else realHasInstance=function(object){return object instanceof this};function Writable(options){if(Duplex=Duplex||require__stream_duplex2(),!realHasInstance.call(Writable,this)&&!(this instanceof Duplex))return new Writable(options);if(this._writableState=new WritableState(options,this),this.writable=!0,options){if(typeof options.write==="function")this._write=options.write;if(typeof options.writev==="function")this._writev=options.writev;if(typeof options.destroy==="function")this._destroy=options.destroy;if(typeof options.final==="function")this._final=options.final}Stream.call(this)}Writable.prototype.pipe=function(){this.emit("error",Error("Cannot pipe, not readable"))};function writeAfterEnd(stream,cb){var er=Error("write after end");stream.emit("error",er),pna.nextTick(cb,er)}function validChunk(stream,state,chunk,cb){var valid=!0,er=!1;if(chunk===null)er=TypeError("May not write null values to stream");else if(typeof chunk!=="string"&&chunk!==void 0&&!state.objectMode)er=TypeError("Invalid non-string/buffer chunk");if(er)stream.emit("error",er),pna.nextTick(cb,er),valid=!1;return valid}Writable.prototype.write=function(chunk,encoding,cb){var state=this._writableState,ret=!1,isBuf=!state.objectMode&&_isUint8Array(chunk);if(isBuf&&!Buffer2.isBuffer(chunk))chunk=_uint8ArrayToBuffer(chunk);if(typeof encoding==="function")cb=encoding,encoding=null;if(isBuf)encoding="buffer";else if(!encoding)encoding=state.defaultEncoding;if(typeof cb!=="function")cb=nop;if(state.ended)writeAfterEnd(this,cb);else if(isBuf||validChunk(this,state,chunk,cb))state.pendingcb++,ret=writeOrBuffer(this,state,isBuf,chunk,encoding,cb);return ret};Writable.prototype.cork=function(){var state=this._writableState;state.corked++};Writable.prototype.uncork=function(){var state=this._writableState;if(state.corked){if(state.corked--,!state.writing&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(this,state)}};Writable.prototype.setDefaultEncoding=function(encoding){if(typeof encoding==="string")encoding=encoding.toLowerCase();if(!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((encoding+"").toLowerCase())>-1))throw TypeError("Unknown encoding: "+encoding);return this._writableState.defaultEncoding=encoding,this};function decodeChunk(state,chunk,encoding){if(!state.objectMode&&state.decodeStrings!==!1&&typeof chunk==="string")chunk=Buffer2.from(chunk,encoding);return chunk}Object.defineProperty(Writable.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function writeOrBuffer(stream,state,isBuf,chunk,encoding,cb){if(!isBuf){var newChunk=decodeChunk(state,chunk,encoding);if(chunk!==newChunk)isBuf=!0,encoding="buffer",chunk=newChunk}var len=state.objectMode?1:chunk.length;state.length+=len;var ret=state.length<state.highWaterMark;if(!ret)state.needDrain=!0;if(state.writing||state.corked){var last=state.lastBufferedRequest;if(state.lastBufferedRequest={chunk,encoding,isBuf,callback:cb,next:null},last)last.next=state.lastBufferedRequest;else state.bufferedRequest=state.lastBufferedRequest;state.bufferedRequestCount+=1}else doWrite(stream,state,!1,len,chunk,encoding,cb);return ret}function doWrite(stream,state,writev,len,chunk,encoding,cb){if(state.writelen=len,state.writecb=cb,state.writing=!0,state.sync=!0,writev)stream._writev(chunk,state.onwrite);else stream._write(chunk,encoding,state.onwrite);state.sync=!1}function onwriteError(stream,state,sync,er,cb){if(--state.pendingcb,sync)pna.nextTick(cb,er),pna.nextTick(finishMaybe,stream,state),stream._writableState.errorEmitted=!0,stream.emit("error",er);else cb(er),stream._writableState.errorEmitted=!0,stream.emit("error",er),finishMaybe(stream,state)}function onwriteStateUpdate(state){state.writing=!1,state.writecb=null,state.length-=state.writelen,state.writelen=0}function onwrite(stream,er){var state=stream._writableState,{sync,writecb:cb}=state;if(onwriteStateUpdate(state),er)onwriteError(stream,state,sync,er,cb);else{var finished=needFinish(state);if(!finished&&!state.corked&&!state.bufferProcessing&&state.bufferedRequest)clearBuffer(stream,state);if(sync)asyncWrite(afterWrite,stream,state,finished,cb);else afterWrite(stream,state,finished,cb)}}function afterWrite(stream,state,finished,cb){if(!finished)onwriteDrain(stream,state);state.pendingcb--,cb(),finishMaybe(stream,state)}function onwriteDrain(stream,state){if(state.length===0&&state.needDrain)state.needDrain=!1,stream.emit("drain")}function clearBuffer(stream,state){state.bufferProcessing=!0;var entry=state.bufferedRequest;if(stream._writev&&entry&&entry.next){var l=state.bufferedRequestCount,buffer=Array(l),holder=state.corkedRequestsFree;holder.entry=entry;var count=0,allBuffers=!0;while(entry){if(buffer[count]=entry,!entry.isBuf)allBuffers=!1;entry=entry.next,count+=1}if(buffer.allBuffers=allBuffers,doWrite(stream,state,!0,state.length,buffer,"",holder.finish),state.pendingcb++,state.lastBufferedRequest=null,holder.next)state.corkedRequestsFree=holder.next,holder.next=null;else state.corkedRequestsFree=new CorkedRequest(state);state.bufferedRequestCount=0}else{while(entry){var chunk=entry.chunk,encoding=entry.encoding,cb=entry.callback,len=state.objectMode?1:chunk.length;if(doWrite(stream,state,!1,len,chunk,encoding,cb),entry=entry.next,state.bufferedRequestCount--,state.writing)break}if(entry===null)state.lastBufferedRequest=null}state.bufferedRequest=entry,state.bufferProcessing=!1}Writable.prototype._write=function(chunk,encoding,cb){cb(Error("_write() is not implemented"))};Writable.prototype._writev=null;Writable.prototype.end=function(chunk,encoding,cb){var state=this._writableState;if(typeof chunk==="function")cb=chunk,chunk=null,encoding=null;else if(typeof encoding==="function")cb=encoding,encoding=null;if(chunk!==null&&chunk!==void 0)this.write(chunk,encoding);if(state.corked)state.corked=1,this.uncork();if(!state.ending)endWritable(this,state,cb)};function needFinish(state){return state.ending&&state.length===0&&state.bufferedRequest===null&&!state.finished&&!state.writing}function callFinal(stream,state){stream._final(function(err){if(state.pendingcb--,err)stream.emit("error",err);state.prefinished=!0,stream.emit("prefinish"),finishMaybe(stream,state)})}function prefinish(stream,state){if(!state.prefinished&&!state.finalCalled)if(typeof stream._final==="function")state.pendingcb++,state.finalCalled=!0,pna.nextTick(callFinal,stream,state);else state.prefinished=!0,stream.emit("prefinish")}function finishMaybe(stream,state){var need=needFinish(state);if(need){if(prefinish(stream,state),state.pendingcb===0)state.finished=!0,stream.emit("finish")}return need}function endWritable(stream,state,cb){if(state.ending=!0,finishMaybe(stream,state),cb)if(state.finished)pna.nextTick(cb);else stream.once("finish",cb);state.ended=!0,stream.writable=!1}function onCorkedFinish(corkReq,state,err){var entry=corkReq.entry;corkReq.entry=null;while(entry){var cb=entry.callback;state.pendingcb--,cb(err),entry=entry.next}state.corkedRequestsFree.next=corkReq}Object.defineProperty(Writable.prototype,"destroyed",{get:function(){if(this._writableState===void 0)return!1;return this._writableState.destroyed},set:function(value){if(!this._writableState)return;this._writableState.destroyed=value}});Writable.prototype.destroy=destroyImpl.destroy;Writable.prototype._undestroy=destroyImpl.undestroy;Writable.prototype._destroy=function(err,cb){this.end(),cb(err)}});var require__stream_duplex2=__commonJS(function(exports,module){var pna=require_process_nextick_args(),objectKeys=Object.keys||function(obj){var keys=[];for(var key in obj)keys.push(key);return keys};module.exports=Duplex;var util=Object.create(require_util());util.inherits=require_inherits();var Readable=require__stream_readable2(),Writable=require__stream_writable2();util.inherits(Duplex,Readable);{keys=objectKeys(Writable.prototype);for(v=0;v<keys.length;v++)if(method=keys[v],!Duplex.prototype[method])Duplex.prototype[method]=Writable.prototype[method]}var keys,method,v;function Duplex(options){if(!(this instanceof Duplex))return new Duplex(options);if(Readable.call(this,options),Writable.call(this,options),options&&options.readable===!1)this.readable=!1;if(options&&options.writable===!1)this.writable=!1;if(this.allowHalfOpen=!0,options&&options.allowHalfOpen===!1)this.allowHalfOpen=!1;this.once("end",onend)}Object.defineProperty(Duplex.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function onend(){if(this.allowHalfOpen||this._writableState.ended)return;pna.nextTick(onEndNT,this)}function onEndNT(self2){self2.end()}Object.defineProperty(Duplex.prototype,"destroyed",{get:function(){if(this._readableState===void 0||this._writableState===void 0)return!1;return this._readableState.destroyed&&this._writableState.destroyed},set:function(value){if(this._readableState===void 0||this._writableState===void 0)return;this._readableState.destroyed=value,this._writableState.destroyed=value}});Duplex.prototype._destroy=function(err,cb){this.push(null),this.end(),pna.nextTick(cb,err)}});var require_string_decoder2=__commonJS(function(exports){var Buffer2=require_safe_buffer().Buffer,isEncoding=Buffer2.isEncoding||function(encoding){switch(encoding=""+encoding,encoding&&encoding.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function _normalizeEncoding(enc){if(!enc)return"utf8";var retried;while(!0)switch(enc){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return enc;default:if(retried)return;enc=(""+enc).toLowerCase(),retried=!0}}function normalizeEncoding(enc){var nenc=_normalizeEncoding(enc);if(typeof nenc!=="string"&&(Buffer2.isEncoding===isEncoding||!isEncoding(enc)))throw Error("Unknown encoding: "+enc);return nenc||enc}exports.StringDecoder=StringDecoder;function StringDecoder(encoding){this.encoding=normalizeEncoding(encoding);var nb;switch(this.encoding){case"utf16le":this.text=utf16Text,this.end=utf16End,nb=4;break;case"utf8":this.fillLast=utf8FillLast,nb=4;break;case"base64":this.text=base64Text,this.end=base64End,nb=3;break;default:this.write=simpleWrite,this.end=simpleEnd;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=Buffer2.allocUnsafe(nb)}StringDecoder.prototype.write=function(buf){if(buf.length===0)return"";var r,i;if(this.lastNeed){if(r=this.fillLast(buf),r===void 0)return"";i=this.lastNeed,this.lastNeed=0}else i=0;if(i<buf.length)return r?r+this.text(buf,i):this.text(buf,i);return r||""};StringDecoder.prototype.end=utf8End;StringDecoder.prototype.text=utf8Text;StringDecoder.prototype.fillLast=function(buf){if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,this.lastTotal-this.lastNeed,0,buf.length),this.lastNeed-=buf.length};function utf8CheckByte(byte){if(byte<=127)return 0;else if(byte>>5===6)return 2;else if(byte>>4===14)return 3;else if(byte>>3===30)return 4;return byte>>6===2?-1:-2}function utf8CheckIncomplete(self2,buf,i){var j=buf.length-1;if(j<i)return 0;var nb=utf8CheckByte(buf[j]);if(nb>=0){if(nb>0)self2.lastNeed=nb-1;return nb}if(--j<i||nb===-2)return 0;if(nb=utf8CheckByte(buf[j]),nb>=0){if(nb>0)self2.lastNeed=nb-2;return nb}if(--j<i||nb===-2)return 0;if(nb=utf8CheckByte(buf[j]),nb>=0){if(nb>0)if(nb===2)nb=0;else self2.lastNeed=nb-3;return nb}return 0}function utf8CheckExtraBytes(self2,buf,p){if((buf[0]&192)!==128)return self2.lastNeed=0,"\uFFFD";if(self2.lastNeed>1&&buf.length>1){if((buf[1]&192)!==128)return self2.lastNeed=1,"\uFFFD";if(self2.lastNeed>2&&buf.length>2){if((buf[2]&192)!==128)return self2.lastNeed=2,"\uFFFD"}}}function utf8FillLast(buf){var p=this.lastTotal-this.lastNeed,r=utf8CheckExtraBytes(this,buf,p);if(r!==void 0)return r;if(this.lastNeed<=buf.length)return buf.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);buf.copy(this.lastChar,p,0,buf.length),this.lastNeed-=buf.length}function utf8Text(buf,i){var total=utf8CheckIncomplete(this,buf,i);if(!this.lastNeed)return buf.toString("utf8",i);this.lastTotal=total;var end=buf.length-(total-this.lastNeed);return buf.copy(this.lastChar,0,end),buf.toString("utf8",i,end)}function utf8End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed)return r+"\uFFFD";return r}function utf16Text(buf,i){if((buf.length-i)%2===0){var r=buf.toString("utf16le",i);if(r){var c=r.charCodeAt(r.length-1);if(c>=55296&&c<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=buf[buf.length-1],buf.toString("utf16le",i,buf.length-1)}function utf16End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed){var end=this.lastTotal-this.lastNeed;return r+this.lastChar.toString("utf16le",0,end)}return r}function base64Text(buf,i){var n=(buf.length-i)%3;if(n===0)return buf.toString("base64",i);if(this.lastNeed=3-n,this.lastTotal=3,n===1)this.lastChar[0]=buf[buf.length-1];else this.lastChar[0]=buf[buf.length-2],this.lastChar[1]=buf[buf.length-1];return buf.toString("base64",i,buf.length-n)}function base64End(buf){var r=buf&&buf.length?this.write(buf):"";if(this.lastNeed)return r+this.lastChar.toString("base64",0,3-this.lastNeed);return r}function simpleWrite(buf){return buf.toString(this.encoding)}function simpleEnd(buf){return buf&&buf.length?this.write(buf):""}});var require__stream_readable2=__commonJS(function(exports,module){var pna=require_process_nextick_args();module.exports=Readable;var isArray=require_isarray2(),Duplex;Readable.ReadableState=ReadableState;var EE=__require("events").EventEmitter,EElistenerCount=function(emitter,type){return emitter.listeners(type).length},Stream=__require("stream"),Buffer2=require_safe_buffer().Buffer,OurUint8Array=(typeof global<"u"?global:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _uint8ArrayToBuffer(chunk){return Buffer2.from(chunk)}function _isUint8Array(obj){return Buffer2.isBuffer(obj)||obj instanceof OurUint8Array}var util=Object.create(require_util());util.inherits=require_inherits();var debugUtil=__require("util"),debug=void 0;if(debugUtil&&debugUtil.debuglog)debug=debugUtil.debuglog("stream");else debug=function(){};var BufferList=require_BufferList(),destroyImpl=require_destroy(),StringDecoder;util.inherits(Readable,Stream);var kProxyEvents=["error","close","destroy","pause","resume"];function prependListener(emitter,event,fn){if(typeof emitter.prependListener==="function")return emitter.prependListener(event,fn);if(!emitter._events||!emitter._events[event])emitter.on(event,fn);else if(isArray(emitter._events[event]))emitter._events[event].unshift(fn);else emitter._events[event]=[fn,emitter._events[event]]}function ReadableState(options,stream){Duplex=Duplex||require__stream_duplex2(),options=options||{};var isDuplex=stream instanceof Duplex;if(this.objectMode=!!options.objectMode,isDuplex)this.objectMode=this.objectMode||!!options.readableObjectMode;var hwm=options.highWaterMark,readableHwm=options.readableHighWaterMark,defaultHwm=this.objectMode?16:16384;if(hwm||hwm===0)this.highWaterMark=hwm;else if(isDuplex&&(readableHwm||readableHwm===0))this.highWaterMark=readableHwm;else this.highWaterMark=defaultHwm;if(this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new BufferList,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=options.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,options.encoding){if(!StringDecoder)StringDecoder=require_string_decoder2().StringDecoder;this.decoder=new StringDecoder(options.encoding),this.encoding=options.encoding}}function Readable(options){if(Duplex=Duplex||require__stream_duplex2(),!(this instanceof Readable))return new Readable(options);if(this._readableState=new ReadableState(options,this),this.readable=!0,options){if(typeof options.read==="function")this._read=options.read;if(typeof options.destroy==="function")this._destroy=options.destroy}Stream.call(this)}Object.defineProperty(Readable.prototype,"destroyed",{get:function(){if(this._readableState===void 0)return!1;return this._readableState.destroyed},set:function(value){if(!this._readableState)return;this._readableState.destroyed=value}});Readable.prototype.destroy=destroyImpl.destroy;Readable.prototype._undestroy=destroyImpl.undestroy;Readable.prototype._destroy=function(err,cb){this.push(null),cb(err)};Readable.prototype.push=function(chunk,encoding){var state=this._readableState,skipChunkCheck;if(!state.objectMode){if(typeof chunk==="string"){if(encoding=encoding||state.defaultEncoding,encoding!==state.encoding)chunk=Buffer2.from(chunk,encoding),encoding="";skipChunkCheck=!0}}else skipChunkCheck=!0;return readableAddChunk(this,chunk,encoding,!1,skipChunkCheck)};Readable.prototype.unshift=function(chunk){return readableAddChunk(this,chunk,null,!0,!1)};function readableAddChunk(stream,chunk,encoding,addToFront,skipChunkCheck){var state=stream._readableState;if(chunk===null)state.reading=!1,onEofChunk(stream,state);else{var er;if(!skipChunkCheck)er=chunkInvalid(state,chunk);if(er)stream.emit("error",er);else if(state.objectMode||chunk&&chunk.length>0){if(typeof chunk!=="string"&&!state.objectMode&&Object.getPrototypeOf(chunk)!==Buffer2.prototype)chunk=_uint8ArrayToBuffer(chunk);if(addToFront)if(state.endEmitted)stream.emit("error",Error("stream.unshift() after end event"));else addChunk(stream,state,chunk,!0);else if(state.ended)stream.emit("error",Error("stream.push() after EOF"));else if(state.reading=!1,state.decoder&&!encoding)if(chunk=state.decoder.write(chunk),state.objectMode||chunk.length!==0)addChunk(stream,state,chunk,!1);else maybeReadMore(stream,state);else addChunk(stream,state,chunk,!1)}else if(!addToFront)state.reading=!1}return needMoreData(state)}function addChunk(stream,state,chunk,addToFront){if(state.flowing&&state.length===0&&!state.sync)stream.emit("data",chunk),stream.read(0);else{if(state.length+=state.objectMode?1:chunk.length,addToFront)state.buffer.unshift(chunk);else state.buffer.push(chunk);if(state.needReadable)emitReadable(stream)}maybeReadMore(stream,state)}function chunkInvalid(state,chunk){var er;if(!_isUint8Array(chunk)&&typeof chunk!=="string"&&chunk!==void 0&&!state.objectMode)er=TypeError("Invalid non-string/buffer chunk");return er}function needMoreData(state){return!state.ended&&(state.needReadable||state.length<state.highWaterMark||state.length===0)}Readable.prototype.isPaused=function(){return this._readableState.flowing===!1};Readable.prototype.setEncoding=function(enc){if(!StringDecoder)StringDecoder=require_string_decoder2().StringDecoder;return this._readableState.decoder=new StringDecoder(enc),this._readableState.encoding=enc,this};var MAX_HWM=8388608;function computeNewHighWaterMark(n){if(n>=MAX_HWM)n=MAX_HWM;else n--,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n++;return n}function howMuchToRead(n,state){if(n<=0||state.length===0&&state.ended)return 0;if(state.objectMode)return 1;if(n!==n)if(state.flowing&&state.length)return state.buffer.head.data.length;else return state.length;if(n>state.highWaterMark)state.highWaterMark=computeNewHighWaterMark(n);if(n<=state.length)return n;if(!state.ended)return state.needReadable=!0,0;return state.length}Readable.prototype.read=function(n){debug("read",n),n=parseInt(n,10);var state=this._readableState,nOrig=n;if(n!==0)state.emittedReadable=!1;if(n===0&&state.needReadable&&(state.length>=state.highWaterMark||state.ended)){if(debug("read: emitReadable",state.length,state.ended),state.length===0&&state.ended)endReadable(this);else emitReadable(this);return null}if(n=howMuchToRead(n,state),n===0&&state.ended){if(state.length===0)endReadable(this);return null}var doRead=state.needReadable;if(debug("need readable",doRead),state.length===0||state.length-n<state.highWaterMark)doRead=!0,debug("length less than watermark",doRead);if(state.ended||state.reading)doRead=!1,debug("reading or ended",doRead);else if(doRead){if(debug("do read"),state.reading=!0,state.sync=!0,state.length===0)state.needReadable=!0;if(this._read(state.highWaterMark),state.sync=!1,!state.reading)n=howMuchToRead(nOrig,state)}var ret;if(n>0)ret=fromList(n,state);else ret=null;if(ret===null)state.needReadable=!0,n=0;else state.length-=n;if(state.length===0){if(!state.ended)state.needReadable=!0;if(nOrig!==n&&state.ended)endReadable(this)}if(ret!==null)this.emit("data",ret);return ret};function onEofChunk(stream,state){if(state.ended)return;if(state.decoder){var chunk=state.decoder.end();if(chunk&&chunk.length)state.buffer.push(chunk),state.length+=state.objectMode?1:chunk.length}state.ended=!0,emitReadable(stream)}function emitReadable(stream){var state=stream._readableState;if(state.needReadable=!1,!state.emittedReadable)if(debug("emitReadable",state.flowing),state.emittedReadable=!0,state.sync)pna.nextTick(emitReadable_,stream);else emitReadable_(stream)}function emitReadable_(stream){debug("emit readable"),stream.emit("readable"),flow(stream)}function maybeReadMore(stream,state){if(!state.readingMore)state.readingMore=!0,pna.nextTick(maybeReadMore_,stream,state)}function maybeReadMore_(stream,state){var len=state.length;while(!state.reading&&!state.flowing&&!state.ended&&state.length<state.highWaterMark)if(debug("maybeReadMore read 0"),stream.read(0),len===state.length)break;else len=state.length;state.readingMore=!1}Readable.prototype._read=function(n){this.emit("error",Error("_read() is not implemented"))};Readable.prototype.pipe=function(dest,pipeOpts){var src=this,state=this._readableState;switch(state.pipesCount){case 0:state.pipes=dest;break;case 1:state.pipes=[state.pipes,dest];break;default:state.pipes.push(dest);break}state.pipesCount+=1,debug("pipe count=%d opts=%j",state.pipesCount,pipeOpts);var doEnd=(!pipeOpts||pipeOpts.end!==!1)&&dest!==process.stdout&&dest!==process.stderr,endFn=doEnd?onend:unpipe;if(state.endEmitted)pna.nextTick(endFn);else src.once("end",endFn);dest.on("unpipe",onunpipe);function onunpipe(readable,unpipeInfo){if(debug("onunpipe"),readable===src){if(unpipeInfo&&unpipeInfo.hasUnpiped===!1)unpipeInfo.hasUnpiped=!0,cleanup()}}function onend(){debug("onend"),dest.end()}var ondrain=pipeOnDrain(src);dest.on("drain",ondrain);var cleanedUp=!1;function cleanup(){if(debug("cleanup"),dest.removeListener("close",onclose),dest.removeListener("finish",onfinish),dest.removeListener("drain",ondrain),dest.removeListener("error",onerror),dest.removeListener("unpipe",onunpipe),src.removeListener("end",onend),src.removeListener("end",unpipe),src.removeListener("data",ondata),cleanedUp=!0,state.awaitDrain&&(!dest._writableState||dest._writableState.needDrain))ondrain()}var increasedAwaitDrain=!1;src.on("data",ondata);function ondata(chunk){debug("ondata"),increasedAwaitDrain=!1;var ret=dest.write(chunk);if(ret===!1&&!increasedAwaitDrain){if((state.pipesCount===1&&state.pipes===dest||state.pipesCount>1&&indexOf(state.pipes,dest)!==-1)&&!cleanedUp)debug("false write response, pause",state.awaitDrain),state.awaitDrain++,increasedAwaitDrain=!0;src.pause()}}function onerror(er){if(debug("onerror",er),unpipe(),dest.removeListener("error",onerror),EElistenerCount(dest,"error")===0)dest.emit("error",er)}prependListener(dest,"error",onerror);function onclose(){dest.removeListener("finish",onfinish),unpipe()}dest.once("close",onclose);function onfinish(){debug("onfinish"),dest.removeListener("close",onclose),unpipe()}dest.once("finish",onfinish);function unpipe(){debug("unpipe"),src.unpipe(dest)}if(dest.emit("pipe",src),!state.flowing)debug("pipe resume"),src.resume();return dest};function pipeOnDrain(src){return function(){var state=src._readableState;if(debug("pipeOnDrain",state.awaitDrain),state.awaitDrain)state.awaitDrain--;if(state.awaitDrain===0&&EElistenerCount(src,"data"))state.flowing=!0,flow(src)}}Readable.prototype.unpipe=function(dest){var state=this._readableState,unpipeInfo={hasUnpiped:!1};if(state.pipesCount===0)return this;if(state.pipesCount===1){if(dest&&dest!==state.pipes)return this;if(!dest)dest=state.pipes;if(state.pipes=null,state.pipesCount=0,state.flowing=!1,dest)dest.emit("unpipe",this,unpipeInfo);return this}if(!dest){var{pipes:dests,pipesCount:len}=state;state.pipes=null,state.pipesCount=0,state.flowing=!1;for(var i=0;i<len;i++)dests[i].emit("unpipe",this,{hasUnpiped:!1});return this}var index=indexOf(state.pipes,dest);if(index===-1)return this;if(state.pipes.splice(index,1),state.pipesCount-=1,state.pipesCount===1)state.pipes=state.pipes[0];return dest.emit("unpipe",this,unpipeInfo),this};Readable.prototype.on=function(ev,fn){var res=Stream.prototype.on.call(this,ev,fn);if(ev==="data"){if(this._readableState.flowing!==!1)this.resume()}else if(ev==="readable"){var state=this._readableState;if(!state.endEmitted&&!state.readableListening){if(state.readableListening=state.needReadable=!0,state.emittedReadable=!1,!state.reading)pna.nextTick(nReadingNextTick,this);else if(state.length)emitReadable(this)}}return res};Readable.prototype.addListener=Readable.prototype.on;function nReadingNextTick(self2){debug("readable nexttick read 0"),self2.read(0)}Readable.prototype.resume=function(){var state=this._readableState;if(!state.flowing)debug("resume"),state.flowing=!0,resume(this,state);return this};function resume(stream,state){if(!state.resumeScheduled)state.resumeScheduled=!0,pna.nextTick(resume_,stream,state)}function resume_(stream,state){if(!state.reading)debug("resume read 0"),stream.read(0);if(state.resumeScheduled=!1,state.awaitDrain=0,stream.emit("resume"),flow(stream),state.flowing&&!state.reading)stream.read(0)}Readable.prototype.pause=function(){if(debug("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1)debug("pause"),this._readableState.flowing=!1,this.emit("pause");return this};function flow(stream){var state=stream._readableState;debug("flow",state.flowing);while(state.flowing&&stream.read()!==null);}Readable.prototype.wrap=function(stream){var _this=this,state=this._readableState,paused=!1;stream.on("end",function(){if(debug("wrapped end"),state.decoder&&!state.ended){var chunk=state.decoder.end();if(chunk&&chunk.length)_this.push(chunk)}_this.push(null)}),stream.on("data",function(chunk){if(debug("wrapped data"),state.decoder)chunk=state.decoder.write(chunk);if(state.objectMode&&(chunk===null||chunk===void 0))return;else if(!state.objectMode&&(!chunk||!chunk.length))return;var ret=_this.push(chunk);if(!ret)paused=!0,stream.pause()});for(var i in stream)if(this[i]===void 0&&typeof stream[i]==="function")this[i]=function(method){return function(){return stream[method].apply(stream,arguments)}}(i);for(var n=0;n<kProxyEvents.length;n++)stream.on(kProxyEvents[n],this.emit.bind(this,kProxyEvents[n]));return this._read=function(n){if(debug("wrapped _read",n),paused)paused=!1,stream.resume()},this};Object.defineProperty(Readable.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Readable._fromList=fromList;function fromList(n,state){if(state.length===0)return null;var ret;if(state.objectMode)ret=state.buffer.shift();else if(!n||n>=state.length){if(state.decoder)ret=state.buffer.join("");else if(state.buffer.length===1)ret=state.buffer.head.data;else ret=state.buffer.concat(state.length);state.buffer.clear()}else ret=fromListPartial(n,state.buffer,state.decoder);return ret}function fromListPartial(n,list,hasStrings){var ret;if(n<list.head.data.length)ret=list.head.data.slice(0,n),list.head.data=list.head.data.slice(n);else if(n===list.head.data.length)ret=list.shift();else ret=hasStrings?copyFromBufferString(n,list):copyFromBuffer(n,list);return ret}function copyFromBufferString(n,list){var p=list.head,c=1,ret=p.data;n-=ret.length;while(p=p.next){var str=p.data,nb=n>str.length?str.length:n;if(nb===str.length)ret+=str;else ret+=str.slice(0,n);if(n-=nb,n===0){if(nb===str.length)if(++c,p.next)list.head=p.next;else list.head=list.tail=null;else list.head=p,p.data=str.slice(nb);break}++c}return list.length-=c,ret}function copyFromBuffer(n,list){var ret=Buffer2.allocUnsafe(n),p=list.head,c=1;p.data.copy(ret),n-=p.data.length;while(p=p.next){var buf=p.data,nb=n>buf.length?buf.length:n;if(buf.copy(ret,ret.length-n,0,nb),n-=nb,n===0){if(nb===buf.length)if(++c,p.next)list.head=p.next;else list.head=list.tail=null;else list.head=p,p.data=buf.slice(nb);break}++c}return list.length-=c,ret}function endReadable(stream){var state=stream._readableState;if(state.length>0)throw Error('"endReadable()" called on non-empty stream');if(!state.endEmitted)state.ended=!0,pna.nextTick(endReadableNT,state,stream)}function endReadableNT(state,stream){if(!state.endEmitted&&state.length===0)state.endEmitted=!0,stream.readable=!1,stream.emit("end")}function indexOf(xs,x){for(var i=0,l=xs.length;i<l;i++)if(xs[i]===x)return i;return-1}});var require__stream_transform2=__commonJS(function(exports,module){module.exports=Transform;var Duplex=require__stream_duplex2(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(Transform,Duplex);function afterTransform(er,data){var ts=this._transformState;ts.transforming=!1;var cb=ts.writecb;if(!cb)return this.emit("error",Error("write callback called multiple times"));if(ts.writechunk=null,ts.writecb=null,data!=null)this.push(data);cb(er);var rs=this._readableState;if(rs.reading=!1,rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}function Transform(options){if(!(this instanceof Transform))return new Transform(options);if(Duplex.call(this,options),this._transformState={afterTransform:afterTransform.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,options){if(typeof options.transform==="function")this._transform=options.transform;if(typeof options.flush==="function")this._flush=options.flush}this.on("prefinish",prefinish)}function prefinish(){var _this=this;if(typeof this._flush==="function")this._flush(function(er,data){done(_this,er,data)});else done(this,null,null)}Transform.prototype.push=function(chunk,encoding){return this._transformState.needTransform=!1,Duplex.prototype.push.call(this,chunk,encoding)};Transform.prototype._transform=function(chunk,encoding,cb){throw Error("_transform() is not implemented")};Transform.prototype._write=function(chunk,encoding,cb){var ts=this._transformState;if(ts.writecb=cb,ts.writechunk=chunk,ts.writeencoding=encoding,!ts.transforming){var rs=this._readableState;if(ts.needTransform||rs.needReadable||rs.length<rs.highWaterMark)this._read(rs.highWaterMark)}};Transform.prototype._read=function(n){var ts=this._transformState;if(ts.writechunk!==null&&ts.writecb&&!ts.transforming)ts.transforming=!0,this._transform(ts.writechunk,ts.writeencoding,ts.afterTransform);else ts.needTransform=!0};Transform.prototype._destroy=function(err,cb){var _this2=this;Duplex.prototype._destroy.call(this,err,function(err2){cb(err2),_this2.emit("close")})};function done(stream,er,data){if(er)return stream.emit("error",er);if(data!=null)stream.push(data);if(stream._writableState.length)throw Error("Calling transform done when ws.length != 0");if(stream._transformState.transforming)throw Error("Calling transform done when still transforming");return stream.push(null)}});var require__stream_passthrough2=__commonJS(function(exports,module){module.exports=PassThrough;var Transform=require__stream_transform2(),util=Object.create(require_util());util.inherits=require_inherits();util.inherits(PassThrough,Transform);function PassThrough(options){if(!(this instanceof PassThrough))return new PassThrough(options);Transform.call(this,options)}PassThrough.prototype._transform=function(chunk,encoding,cb){cb(null,chunk)}});var require_readable2=__commonJS(function(exports,module){var Stream=__require("stream");if(process.env.READABLE_STREAM==="disable"&&Stream)module.exports=Stream,exports=module.exports=Stream.Readable,exports.Readable=Stream.Readable,exports.Writable=Stream.Writable,exports.Duplex=Stream.Duplex,exports.Transform=Stream.Transform,exports.PassThrough=Stream.PassThrough,exports.Stream=Stream;else exports=module.exports=require__stream_readable2(),exports.Stream=Stream||exports,exports.Readable=exports,exports.Writable=require__stream_writable2(),exports.Duplex=require__stream_duplex2(),exports.Transform=require__stream_transform2(),exports.PassThrough=require__stream_passthrough2()});var require_duplexer2=__commonJS(function(exports,module){var stream=require_readable2();function DuplexWrapper(options,writable,readable){if(typeof readable>"u")readable=writable,writable=options,options=null;if(stream.Duplex.call(this,options),typeof readable.read!=="function")readable=new stream.Readable(options).wrap(readable);this._writable=writable,this._readable=readable,this._waiting=!1;var self2=this;if(writable.once("finish",function(){self2.end()}),this.once("finish",function(){writable.end()}),readable.on("readable",function(){if(self2._waiting)self2._waiting=!1,self2._read()}),readable.once("end",function(){self2.push(null)}),!options||typeof options.bubbleErrors>"u"||options.bubbleErrors)writable.on("error",function(err){self2.emit("error",err)}),readable.on("error",function(err){self2.emit("error",err)})}DuplexWrapper.prototype=Object.create(stream.Duplex.prototype,{constructor:{value:DuplexWrapper}});DuplexWrapper.prototype._write=function(input,encoding,done){this._writable.write(input,encoding,done)};DuplexWrapper.prototype._read=function(){var buf,reads=0;while((buf=this._readable.read())!==null)this.push(buf),reads++;if(reads===0)this._waiting=!0};module.exports=function(options,writable,readable){return new DuplexWrapper(options,writable,readable)};module.exports.DuplexWrapper=DuplexWrapper});var require_object_assign=__commonJS(function(exports,module){var getOwnPropertySymbols=Object.getOwnPropertySymbols,hasOwnProperty=Object.prototype.hasOwnProperty,propIsEnumerable=Object.prototype.propertyIsEnumerable;function toObject(val){if(val===null||val===void 0)throw TypeError("Object.assign cannot be called with null or undefined");return Object(val)}function shouldUseNative(){try{if(!Object.assign)return!1;var test1=new String("abc");if(test1[5]="de",Object.getOwnPropertyNames(test1)[0]==="5")return!1;var test2={};for(var i=0;i<10;i++)test2["_"+String.fromCharCode(i)]=i;var order2=Object.getOwnPropertyNames(test2).map(function(n){return test2[n]});if(order2.join("")!=="0123456789")return!1;var test3={};if("abcdefghijklmnopqrst".split("").forEach(function(letter){test3[letter]=letter}),Object.keys(Object.assign({},test3)).join("")!=="abcdefghijklmnopqrst")return!1;return!0}catch(err){return!1}}module.exports=shouldUseNative()?Object.assign:function(target,source){var from,to=toObject(target),symbols;for(var s=1;s<arguments.length;s++){from=Object(arguments[s]);for(var key in from)if(hasOwnProperty.call(from,key))to[key]=from[key];if(getOwnPropertySymbols){symbols=getOwnPropertySymbols(from);for(var i=0;i<symbols.length;i++)if(propIsEnumerable.call(from,symbols[i]))to[symbols[i]]=from[symbols[i]]}}return to}});var require_multipipe=__commonJS(function(exports,module){var duplexer=require_duplexer2(),PassThrough=__require("stream").PassThrough,Readable=__require("stream").PassThrough,objectAssign=require_object_assign(),slice=[].slice,defaultOpts={bubbleErrors:!1,objectMode:!0};module.exports=pipe;function pipe(streams,opts,cb){if(!Array.isArray(streams))streams=slice.call(arguments),opts=null,cb=null;var lastArg=streams[streams.length-1];if(typeof lastArg=="function")cb=streams.splice(-1)[0],lastArg=streams[streams.length-1];if(typeof lastArg=="object"&&typeof lastArg.pipe!="function")opts=streams.splice(-1)[0];var first=streams[0],last=streams[streams.length-1],ret;if(opts=objectAssign({},defaultOpts,opts),!first){if(cb)process.nextTick(cb);return new PassThrough(opts)}if(first.writable&&last.readable)ret=duplexer(opts,first,last);else if(streams.length==1)ret=new Readable(opts).wrap(streams[0]);else if(first.writable)ret=first;else if(last.readable)ret=last;else ret=new PassThrough(opts);if(streams.forEach(function(stream,i){var next=streams[i+1];if(next)stream.pipe(next);if(stream!=ret)stream.on("error",ret.emit.bind(ret,"error"))}),cb){let end2=function(err){if(ended)return;ended=!0,cb(err)};var end=end2,ended=!1;ret.on("error",end2),last.on("finish",function(){end2()}),last.on("close",function(){end2()})}return ret}});var require_emotion_server_create_instance_cjs_dev=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var through=require_through(),tokenize=require_html_tokenize(),pipe=require_multipipe();function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var through__default=_interopDefault(through),tokenize__default=_interopDefault(tokenize),pipe__default=_interopDefault(pipe),createExtractCritical=function(cache){return function(html){var RGX=new RegExp(cache.key+"-([a-zA-Z0-9-_]+)","gm"),o={html,ids:[],css:""},match,ids={};while((match=RGX.exec(html))!==null)if(ids[match[1]]===void 0)ids[match[1]]=!0;return o.ids=Object.keys(cache.inserted).filter(function(id){if((ids[id]!==void 0||cache.registered[cache.key+"-"+id]===void 0)&&cache.inserted[id]!==!0)return o.css+=cache.inserted[id],!0}),o}},createExtractCriticalToChunks=function(cache){return function(html){var RGX=new RegExp(cache.key+"-([a-zA-Z0-9-_]+)","gm"),o={html,styles:[]},match,ids={};while((match=RGX.exec(html))!==null)if(ids[match[1]]===void 0)ids[match[1]]=!0;var regularCssIds=[],regularCss="";return Object.keys(cache.inserted).forEach(function(id){if((ids[id]!==void 0||cache.registered[cache.key+"-"+id]===void 0)&&cache.inserted[id]!==!0)if(cache.registered[cache.key+"-"+id])regularCssIds.push(id),regularCss+=cache.inserted[id];else o.styles.push({key:cache.key+"-global",ids:[id],css:cache.inserted[id]})}),o.styles.push({key:cache.key,ids:regularCssIds,css:regularCss}),o}};function generateStyleTag(cssKey,ids,styles,nonceString){return'<style data-emotion="'+cssKey+" "+ids+'"'+nonceString+">"+styles+"</style>"}var createRenderStylesToString=function(cache,nonceString){return function(html){var{inserted,key:cssKey,registered}=cache,regex=new RegExp("<|"+cssKey+"-([a-zA-Z0-9-_]+)","gm"),seen={},result="",globalIds="",globalStyles="";for(var id in inserted)if(inserted.hasOwnProperty(id)){var style=inserted[id],key=cssKey+"-"+id;if(style!==!0&&registered[key]===void 0)globalStyles+=style,globalIds+=" "+id}if(globalStyles!=="")result=generateStyleTag(cssKey,globalIds.substring(1),globalStyles,nonceString);var ids="",styles="",lastInsertionPoint=0,match;while((match=regex.exec(html))!==null){if(match[0]==="<"){if(ids!=="")result+=generateStyleTag(cssKey,ids.substring(1),styles,nonceString),ids="",styles="";result+=html.substring(lastInsertionPoint,match.index),lastInsertionPoint=match.index;continue}var _id=match[1],_style=inserted[_id];if(_style===!0||_style===void 0||seen[_id])continue;seen[_id]=!0,styles+=_style,ids+=" "+_id}return result+=html.substring(lastInsertionPoint),result}},createRenderStylesToNodeStream=function(cache,nonceString){return function(){var insed={},tokenStream=tokenize__default.default(),inlineStream=through__default.default(function(thing){var type=thing[0],data=thing[1];if(type==="open"){var css="",ids={},match,fragment=data.toString(),regex=new RegExp(cache.key+"-([a-zA-Z0-9-_]+)","gm");while((match=regex.exec(fragment))!==null)if(match!==null&&insed[match[1]]===void 0)ids[match[1]]=!0;if(Object.keys(cache.inserted).forEach(function(id){if(cache.inserted[id]!==!0&&insed[id]===void 0&&(ids[id]===!0||cache.registered[cache.key+"-"+id]===void 0&&(ids[id]=!0)))insed[id]=!0,css+=cache.inserted[id]}),css!=="")this.queue('<style data-emotion="'+cache.key+" "+Object.keys(ids).join(" ")+'"'+nonceString+">"+css+"</style>")}this.queue(data)},function(){this.queue(null)});return pipe__default.default(tokenStream,inlineStream)}},createConstructStyleTagsFromChunks=function(cache,nonceString){return function(criticalData){var styleTagsString="";return criticalData.styles.forEach(function(item){styleTagsString+=generateStyleTag(item.key,item.ids.join(" "),item.css,nonceString)}),styleTagsString}};function createEmotionServer(cache){if(cache.compat!==!0)cache.compat=!0;var nonceString=cache.nonce!==void 0?' nonce="'+cache.nonce+'"':"";return{extractCritical:createExtractCritical(cache),extractCriticalToChunks:createExtractCriticalToChunks(cache),renderStylesToString:createRenderStylesToString(cache,nonceString),renderStylesToNodeStream:createRenderStylesToNodeStream(cache,nonceString),constructStyleTagsFromChunks:createConstructStyleTagsFromChunks(cache,nonceString)}}exports.default=createEmotionServer});var require_emotion_is_prop_valid_cjs=__commonJS(function(exports){Object.defineProperty(exports,"__esModule",{value:!0});var memoize=require_emotion_memoize_cjs_dev();function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var memoize__default=_interopDefault(memoize),reactPropsRegex=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,isPropValid=memoize__default.default(function(prop){return reactPropsRegex.test(prop)||prop.charCodeAt(0)===111&&prop.charCodeAt(1)===110&&prop.charCodeAt(2)<91});exports.default=isPropValid});var require_emotion_styled_base_development_cjs=__commonJS(function(exports){var React=__toESM(require_react_development());Object.defineProperty(exports,"__esModule",{value:!0});var _extends=require_extends(),react=require_emotion_react_development_cjs(),serialize=require_emotion_serialize_development_cjs(),useInsertionEffectWithFallbacks=require_emotion_use_insertion_effect_with_fallbacks_cjs(),utils=require_emotion_utils_cjs(),isPropValid=require_emotion_is_prop_valid_cjs();function _interopDefault(e){return e&&e.__esModule?e:{default:e}}function _interopNamespace(e){if(e&&e.__esModule)return e;var n=Object.create(null);if(e)Object.keys(e).forEach(function(k){if(k!=="default"){var d=Object.getOwnPropertyDescriptor(e,k);Object.defineProperty(n,k,d.get?d:{enumerable:!0,get:function(){return e[k]}})}});return n.default=e,Object.freeze(n)}var React__namespace=_interopNamespace(React),isPropValid__default=_interopDefault(isPropValid),isBrowser=typeof document<"u",isDevelopment=!0,testOmitPropsOnStringTag=isPropValid__default.default,testOmitPropsOnComponent=function(key){return key!=="theme"},getDefaultShouldForwardProp=function(tag){return typeof tag==="string"&&tag.charCodeAt(0)>96?testOmitPropsOnStringTag:testOmitPropsOnComponent},composeShouldForwardProps=function(tag,options,isReal){var shouldForwardProp;if(options){var optionsShouldForwardProp=options.shouldForwardProp;shouldForwardProp=tag.__emotion_forwardProp&&optionsShouldForwardProp?function(propName){return tag.__emotion_forwardProp(propName)&&optionsShouldForwardProp(propName)}:optionsShouldForwardProp}if(typeof shouldForwardProp!=="function"&&isReal)shouldForwardProp=tag.__emotion_forwardProp;return shouldForwardProp},ILLEGAL_ESCAPE_SEQUENCE_ERROR=`You have illegal escape sequence in your template literal, most likely inside content's property value.
14
- Because you write your CSS inside a JavaScript string you actually have to do double escaping, so for example "content: '\\00d7';" should become "content: '\\\\00d7';".
15
- You can read more about this here:
16
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#ES2018_revision_of_illegal_escape_sequences`,Insertion=function(_ref){var{cache,serialized,isStringTag}=_ref;utils.registerStyles(cache,serialized,isStringTag);var rules=useInsertionEffectWithFallbacks.useInsertionEffectAlwaysWithSyncFallback(function(){return utils.insertStyles(cache,serialized,isStringTag)});if(!isBrowser&&rules!==void 0){var _ref2,{name:serializedNames,next}=serialized;while(next!==void 0)serializedNames+=" "+next.name,next=next.next;return React__namespace.createElement("style",(_ref2={},_ref2["data-emotion"]=cache.key+" "+serializedNames,_ref2.dangerouslySetInnerHTML={__html:rules},_ref2.nonce=cache.sheet.nonce,_ref2))}return null},createStyled=function createStyled(tag,options){if(tag===void 0)throw Error(`You are trying to create a styled element with an undefined component.
17
- You may have forgotten to import it.`);var isReal=tag.__emotion_real===tag,baseTag=isReal&&tag.__emotion_base||tag,identifierName,targetClassName;if(options!==void 0)identifierName=options.label,targetClassName=options.target;var shouldForwardProp=composeShouldForwardProps(tag,options,isReal),defaultShouldForwardProp=shouldForwardProp||getDefaultShouldForwardProp(baseTag),shouldUseAs=!defaultShouldForwardProp("as");return function(){var args=arguments,styles=isReal&&tag.__emotion_styles!==void 0?tag.__emotion_styles.slice(0):[];if(identifierName!==void 0)styles.push("label:"+identifierName+";");if(args[0]==null||args[0].raw===void 0)styles.push.apply(styles,args);else{var templateStringsArr=args[0];if(templateStringsArr[0]===void 0)console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);styles.push(templateStringsArr[0]);var len=args.length,i=1;for(;i<len;i++){if(templateStringsArr[i]===void 0)console.error(ILLEGAL_ESCAPE_SEQUENCE_ERROR);styles.push(args[i],templateStringsArr[i])}}var Styled=react.withEmotionCache(function(props,cache,ref){var FinalTag=shouldUseAs&&props.as||baseTag,className="",classInterpolations=[],mergedProps=props;if(props.theme==null){mergedProps={};for(var key in props)mergedProps[key]=props[key];mergedProps.theme=React__namespace.useContext(react.ThemeContext)}if(typeof props.className==="string")className=utils.getRegisteredStyles(cache.registered,classInterpolations,props.className);else if(props.className!=null)className=props.className+" ";var serialized=serialize.serializeStyles(styles.concat(classInterpolations),cache.registered,mergedProps);if(className+=cache.key+"-"+serialized.name,targetClassName!==void 0)className+=" "+targetClassName;var finalShouldForwardProp=shouldUseAs&&shouldForwardProp===void 0?getDefaultShouldForwardProp(FinalTag):defaultShouldForwardProp,newProps={};for(var _key in props){if(shouldUseAs&&_key==="as")continue;if(finalShouldForwardProp(_key))newProps[_key]=props[_key]}if(newProps.className=className,ref)newProps.ref=ref;return React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Insertion,{cache,serialized,isStringTag:typeof FinalTag==="string"}),React__namespace.createElement(FinalTag,newProps))});return Styled.displayName=identifierName!==void 0?identifierName:"Styled("+(typeof baseTag==="string"?baseTag:baseTag.displayName||baseTag.name||"Component")+")",Styled.defaultProps=tag.defaultProps,Styled.__emotion_real=Styled,Styled.__emotion_base=baseTag,Styled.__emotion_styles=styles,Styled.__emotion_forwardProp=shouldForwardProp,Object.defineProperty(Styled,"toString",{value:function(){if(targetClassName===void 0&&isDevelopment)return"NO_COMPONENT_SELECTOR";return"."+targetClassName}}),Styled.withComponent=function(nextTag,nextOptions){var newStyled=createStyled(nextTag,_extends({},options,nextOptions,{shouldForwardProp:composeShouldForwardProps(Styled,nextOptions,!0)}));return newStyled.apply(void 0,styles)},Styled}};exports.default=createStyled});var require_emotion_styled_development_cjs=__commonJS(function(exports){var react=__toESM(require_react_development());Object.defineProperty(exports,"__esModule",{value:!0});var base_dist_emotionStyledBase=require_emotion_styled_base_development_cjs();require_extends();require_emotion_react_development_cjs();require_emotion_serialize_development_cjs();require_emotion_use_insertion_effect_with_fallbacks_cjs();require_emotion_utils_cjs();require_emotion_is_prop_valid_cjs();var tags=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],styled=base_dist_emotionStyledBase.default.bind(null);tags.forEach(function(tagName){styled[tagName]=styled(tagName)});exports.default=styled});var import_emotion_react_development_cjs=__toESM(require_emotion_react_development_cjs(),1);var $_default2=require_emotion_cache_development_cjs().default;var import_emotion_cache_development_cjs=__toESM(require_emotion_cache_development_cjs(),1);var $_default3=require_emotion_server_create_instance_cjs_dev().default;var import_emotion_server_create_instance_cjs=__toESM(require_emotion_server_create_instance_cjs_dev(),1);var $_default=require_emotion_styled_development_cjs().default;var import_emotion_styled_development_cjs=__toESM(require_emotion_styled_development_cjs(),1);
18
- export{require_react_is_development,require_object_assign,require_emotion_serialize_development_cjs,$_default,import_emotion_react_development_cjs,$_default2,$_default3};
package/chunk-emty5315.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{withMcpSessionUrl,MCP_SURFACE_MODES,parseMcpSurfaceSelection,withMcpSurfaceUrl,runStdioFormatGate,runStdioMcpProxy}from"./chunk-9g45c5md.js";import"./chunk-xxw67jpk.js";import"./chunk-xg49s85z.js";import"./chunk-bntsn3wj.js";import"./chunk-rrrn1mkq.js";import{assertLoopbackHost,daemonRoot,DesignFolderFormatError,ensureDaemon,stopDaemon}from"./chunk-qgbat4fv.js";import"./chunk-80fjfyha.js";import"./chunk-s23gtejf.js";import{upgradeFolder}from"./chunk-ez720ked.js";import{DESIGN_ARG_DESCRIPTION,resolveDesignForSession}from"./chunk-6w42sr61.js";import"./chunk-w30zfv3m.js";import{traceEnabled}from"./chunk-6tx68d90.js";import{defineCommand}from"./chunk-2smsg2ct.js";import{join}from"path";async function serveFormatGate(err){console.error(`velloo mcp: ${err.message.slice(8)}`),console.error("velloo mcp: serving the upgrade gate over MCP instead of the design tools.");let closing=!1,shutdown=async(close)=>{if(closing)return;closing=!0,await close?.(),process.exit(0)},gate=await runStdioFormatGate({root:err.root,found:err.found,current:err.current,upgrade:err.found<err.current?async()=>(await stopDaemon(daemonRoot(err.root)),upgradeFolder(err.root)):void 0,onExit:()=>void shutdown()});return process.on("SIGINT",()=>void shutdown(gate.close)),process.on("SIGTERM",()=>void shutdown(gate.close)),process.stdin.on("end",()=>void shutdown(gate.close)),process.stdin.on("close",()=>void shutdown(gate.close)),await new Promise(()=>{})}var mcp_default=defineCommand({meta:{name:"mcp",description:"Connect this agent to the folder's canvas over MCP (stdio by default). Usually spawned by your agent."},args:{design:{type:"positional",required:!1,description:DESIGN_ARG_DESCRIPTION},http:{type:"boolean",default:!1,description:"Print the daemon's HTTP MCP URL instead of bridging over stdio"},port:{type:"string",description:"Preferred canvas port when starting the daemon fresh (default 7300)"},host:{type:"string",description:"Loopback bind hostname: 127.0.0.1 (default), localhost or ::1"},surface:{type:"string",description:`Tool surface: ${MCP_SURFACE_MODES.join(", ")} (default guided; env VELLOO_MCP_SURFACE)`}},async run({args}){assertLoopbackHost(args.host??"127.0.0.1");let{folder,pick}=await resolveDesignForSession(args.design,"mcp"),preferredPort=args.port?Number(args.port):void 0,parsedSurface=parseMcpSurfaceSelection(args.surface??process.env.VELLOO_MCP_SURFACE);if(!parsedSurface.ok)throw Error(`velloo mcp: ${parsedSurface.error}`);let surface=parsedSurface.selection,spawned=!1,rec;try{rec=await ensureDaemon(folder,{preferredPort,host:args.host,onSpawn:()=>{spawned=!0}})}catch(err){if(err instanceof DesignFolderFormatError&&!args.http)await serveFormatGate(err);throw err}if(traceEnabled())console.error(spawned?`velloo: \u29BF trace recording ON \u2014 tapes \u2192 ${join(folder,".velloo","trace")} (view with \`velloo trace\`)`:"velloo: VELLOO_TRACE is set, but attached to an already-running canvas \u2014 recording is only active if that daemon was started trace-enabled (`velloo stop` then reconnect to force a fresh one).");if(args.http){let selectedUrl=withMcpSessionUrl(withMcpSurfaceUrl(rec.mcpUrl,surface),{pick});console.log(`velloo: canvas at ${rec.canvasUrl}`),console.log(`velloo: MCP server at ${selectedUrl} (point your AI agent here)`),console.log("velloo: it keeps running in the background \u2014 `velloo stop` to stop it.");return}console.error(`velloo: bridging MCP to the canvas at ${rec.canvasUrl}`);let closing=!1,shutdown=async(close)=>{if(closing)return;closing=!0,await close?.(),process.exit(0)},current=folder,portFor=(root)=>root===folder?preferredPort:void 0,sessionUrl=(mcpUrl,opened)=>withMcpSessionUrl(withMcpSurfaceUrl(mcpUrl,surface),{switchable:!0,pick:opened}),proxy=await runStdioMcpProxy(sessionUrl(rec.mcpUrl,pick),{onExit:()=>void shutdown(),rediscover:async()=>{try{let fresh=await ensureDaemon(current,{preferredPort:portFor(current),host:args.host});return sessionUrl(fresh.mcpUrl,void 0)}catch{return null}},switchTo:async(root)=>{try{let next=await ensureDaemon(root,{preferredPort:portFor(root),host:args.host});return current=root,{url:sessionUrl(next.mcpUrl,void 0)}}catch(err){let message=err instanceof Error?err.message:String(err);return{error:message.startsWith("velloo: ")?message.slice(8):message}}}});process.on("SIGINT",()=>void shutdown(proxy.close)),process.on("SIGTERM",()=>void shutdown(proxy.close)),process.stdin.on("end",()=>void shutdown(proxy.close)),process.stdin.on("close",()=>void shutdown(proxy.close)),await new Promise(()=>{})}});export{mcp_default as default};
package/chunk-jxgwdz2r.js DELETED
@@ -1,5 +0,0 @@
1
- // @bun
2
- import{ok,err,PROTECTED_SHARES_UNAVAILABLE,PublishDestinationsResponseSchema,LinkResponseSchema,LinkAccessResponseSchema,VersionUploadResponseSchema,PublishedDesignsResponseSchema,TeamsResponseSchema,unreachable,protocolViolation,uploadRaceLost,readFailure,cloudFailure,httpFailureFrom,boardLimitFrom,describeBoardLimit,describeCloudError,cloudJson,cloudFetch}from"./chunk-bntsn3wj.js";import{prettifyError,string,number,boolean,array,object,strictObject,record,_enum,literal,AnnotationSchema,CanvasNoteSchema,BoardSchema,ExtensionSchema,ViewportPresetSchema,LibrarySchema,StylingSchema,ScreenSchema,SnippetSchema,sanitizeSvgMarkup,ThemeSchema,ViewportSchema}from"./chunk-xxw67jpk.js";import{buildBoardComposite,MAX_CONCURRENT_RENDERS,renderScreen,captureMountedDocument,captureScreenshot}from"./chunk-xg49s85z.js";import{writeJsonAtomic,managedDesignId,localDesignOf,recordedDesignName,orderedBoards,activeBoards,registryForScreen,renderPassForScreen,hostStylesheetsForScreen,hostFilesFetch,storedHostSource,shipHostFiles,createCaptureMount}from"./chunk-9g45c5md.js";import{LIVE_BUNDLE_PATH,withAssetServer,createOneShotLiveBundler,buildLiveModule}from"./chunk-hsk91jms.js";import{checkCloudHealth}from"./chunk-w30zfv3m.js";var VERSION_UPLOAD_TIMEOUT_MS=60000,VERSION_UPLOAD_RETRIES=1;async function listPublishDestinations(opts){let query=new URLSearchParams({folderId:opts.folderId});if(opts.teamId)query.set("teamId",opts.teamId);return cloudFetch(`${opts.baseUrl}/v1/publish-destinations?${query}`,PublishDestinationsResponseSchema,{operation:"listing publish destinations",token:opts.token})}async function uploadLinkBundle(opts){let{baseUrl,token,form}=opts,authorized={authorization:`Bearer ${token}`},createRes=await fetch(`${baseUrl}/v1/links`,{method:"POST",headers:authorized,body:JSON.stringify(opts.link)}).catch((error)=>error);if(!(createRes instanceof Response))return err(unreachable(createRes,{url:baseUrl}));if(createRes.status!==200&&createRes.status!==201)return err(await httpFailureFrom("link creation",createRes));let created=createRes.status===201,createdLink=await cloudJson(createRes,LinkResponseSchema,"link creation");if(!createdLink.ok)return createdLink;let link=createdLink.value;if(opts.link.publishMode==="new"&&!created)return err(protocolViolation("the cloud reused a link even though a new publish destination was requested"));if(opts.link.publishMode==="update"&&created)return await fetch(`${baseUrl}/v1/links/${link.slug}`,{method:"DELETE",headers:authorized}).catch(()=>{}),err(protocolViolation("the cloud created a link even though an existing destination was selected"));if(!created){let accessRes=await fetch(`${baseUrl}/v1/links/${link.slug}/access`,{method:"PUT",headers:{...authorized,"content-type":"application/json"},body:JSON.stringify({visibility:opts.link.visibility,password:opts.link.password??null,passwordExpiresAt:opts.link.password?opts.link.passwordExpiresAt??null:null,expectedVersionId:opts.link.expectedVersionId??null,...opts.link.audience?.length?{audience:opts.link.audience}:{},...opts.link.publicComments!==void 0?{publicComments:opts.link.publicComments}:{}})});if(!accessRes.ok)return err(await httpFailureFrom("privacy update",accessRes));let access=await cloudJson(accessRes,LinkAccessResponseSchema,"privacy update");if(!access.ok)return access;link={...link,...access.value}}if(form.append("publishMode",opts.link.publishMode),opts.link.expectedVersionId)form.append("expectedVersionId",opts.link.expectedVersionId);let attempt=await uploadVersionWithRetry({url:`${baseUrl}/v1/links/${link.slug}/versions`,headers:authorized,form,timeoutMs:opts.uploadTimeoutMs??VERSION_UPLOAD_TIMEOUT_MS,retries:opts.uploadRetries??VERSION_UPLOAD_RETRIES});if(!attempt.ok)return attempt;let upload=attempt.value,uploadRes=upload.response;if(uploadRes.status!==201){let{detail,code}=await readFailure(uploadRes);if(upload.transientFailures>0&&uploadRes.status===409&&/slot changed|already has a version/i.test(detail))return err(uploadRaceLost());if(created)await fetch(`${baseUrl}/v1/links/${link.slug}`,{method:"DELETE",headers:authorized}).catch(()=>{});return err(cloudFailure("upload",uploadRes.status,detail,code))}let parsed=await cloudJson(uploadRes,VersionUploadResponseSchema,"upload");if(!parsed.ok)return parsed;let uploaded=parsed.value;return ok({link:{slug:link.slug,visibility:link.visibility??opts.link.visibility,passwordProtected:link.passwordProtected??opts.link.password!=null,...link.audience!==void 0?{audience:link.audience}:{},...link.publicComments!==void 0?{publicComments:link.publicComments}:{}},created,files:uploaded.files,bytes:uploaded.bytes,shareUrl:uploaded.url.startsWith("http")?uploaded.url:`${baseUrl}${uploaded.url}`,...uploaded.tier!==void 0?{tier:uploaded.tier}:{},...uploaded.history!==void 0?{history:uploaded.history}:{}})}async function uploadVersionWithRetry(opts){let attempts=Math.max(1,Math.floor(opts.retries)+1),transientFailures=0,lastNetworkError="unknown network error",lastTimedOut=!1;for(let attempt=1;attempt<=attempts;attempt+=1){let controller=new AbortController,timedOut=!1,timer=setTimeout(()=>{timedOut=!0,controller.abort()},Math.max(1,opts.timeoutMs));try{let response=await fetch(opts.url,{method:"POST",headers:opts.headers,body:opts.form,signal:controller.signal});if(response.status<500||attempt===attempts)return ok({response,transientFailures});transientFailures+=1,await response.body?.cancel().catch(()=>{})}catch(error){if(transientFailures+=1,lastTimedOut=timedOut,lastNetworkError=error instanceof Error?error.message:String(error),attempt===attempts){let retried=attempts>1?` after ${attempts} attempts`:"";return err(timedOut?unreachable(`timed out after ${formatDuration(opts.timeoutMs)}${retried}`,{url:opts.url,timedOut:!0}):unreachable(`version upload${retried}: ${lastNetworkError}`,{url:opts.url}))}}finally{clearTimeout(timer)}}return err(lastTimedOut?unreachable(`timed out after ${formatDuration(opts.timeoutMs)}`,{url:opts.url,timedOut:!0}):unreachable(`version upload: ${lastNetworkError}`,{url:opts.url}))}function formatDuration(ms){return ms>=1000?`${Math.round(ms/1000)}s`:`${Math.max(1,Math.round(ms))}ms`}var cloudUnhealthy=(detail)=>({kind:"CloudUnhealthy",detail}),noScreens=(root)=>({kind:"NoScreens",root}),noBoardScreens=(unplaced)=>({kind:"NoBoardScreens",unplaced}),bundleInvalid=(detail)=>({kind:"BundleInvalid",detail}),teamNotFound=(requested)=>({kind:"TeamNotFound",requested}),teamAmbiguous=(requested)=>({kind:"TeamAmbiguous",requested}),teamNotPublishable=(requested,reviewer)=>({kind:"TeamNotPublishable",requested,reviewer}),noPublishableTeam=(reviewer)=>({kind:"NoPublishableTeam",reviewer}),teamChoiceRequired=(names)=>({kind:"TeamChoiceRequired",names}),REVIEWERS_CANNOT_PUBLISH="reviewers can view and comment on boards, but not publish them \u2014 to publish, ask an owner or admin to make you a member",FREE_PLAN_OWNER_ONLY="on the Free plan only the organization owner publishes \u2014 ask the owner to renew, or leave the organization to publish on your own";function unplacedHint(unplaced){if(unplaced.length===0)return"";let shown=unplaced.slice(0,5).join(", "),more=unplaced.length>5?`, and ${unplaced.length-5} more`:"",[subject,it]=unplaced.length===1?["1 screen is","it"]:[`${unplaced.length} screens are`,"each"];return` ${subject} on no board (${shown}${more}): add a frame for ${it} on the canvas, or with add_frame.`}function describePublishError(error){switch(error.kind){case"CloudUnhealthy":return error.detail;case"NoScreens":return`no screens found in ${error.root} \u2014 is this a velloo design folder?`;case"NoBoardScreens":return`the selected boards have no screens.${unplacedHint(error.unplaced)}`;case"BundleInvalid":return`velloo built an invalid design bundle and did not upload it: ${error.detail}. This is a bug \u2014 please report it.`;case"TeamNotFound":return`no team named or identified by '${error.requested}'`;case"TeamAmbiguous":return`more than one team is named '${error.requested}'; pass its UUID`;case"TeamNotPublishable":return error.reviewer?REVIEWERS_CANNOT_PUBLISH:`you can't publish to '${error.requested}' \u2014 you can only publish to teams you're on`;case"NoPublishableTeam":return error.reviewer?REVIEWERS_CANNOT_PUBLISH:FREE_PLAN_OWNER_ONLY;case"TeamChoiceRequired":return`you can publish to more than one team \u2014 choose one (${error.names.join(", ")}) with --team`;case"HttpFailure":{if(error.status===403&&/protected shares/i.test(error.detail))return`${PROTECTED_SHARES_UNAVAILABLE}. Publish publicly, or upgrade your plan from your cloud's billing page`;let limit=boardLimitFrom(error);if(limit)return`${describeBoardLimit(limit)}. Run \`velloo publish list\` to see them, or upgrade your plan from your cloud's billing page`;return describeCloudError(error)}default:return describeCloudError(error)}}import{execFileSync}from"child_process";import{existsSync}from"fs";import{readFile}from"fs/promises";import{join}from"path";var DESIGN_BUNDLE_FORMAT=2,BundleScreenshotsSchema=object({cover:string().optional(),screens:record(string(),string()).optional(),boards:record(string(),string()).optional()}),DesignBundleMetaSchema=object({formatVersion:number().int().positive().optional(),title:string().optional(),screens:array(object({id:string(),name:string().optional()})).optional(),boards:array(object({id:string()})).optional(),screenshots:BundleScreenshotsSchema.optional()});var DesignBundleSchema=strictObject({formatVersion:literal(DESIGN_BUNDLE_FORMAT),title:string(),viewport:ViewportSchema,defaultLibrary:string(),libraries:record(string(),LibrarySchema),extensions:record(string(),ExtensionSchema),styling:StylingSchema.optional(),viewportPresets:array(ViewportPresetSchema),theme:ThemeSchema,themes:record(string(),ThemeSchema),customCss:string(),snippets:array(SnippetSchema),screens:array(ScreenSchema),boards:array(BoardSchema),annotations:record(string(),array(AnnotationSchema)),notes:record(string(),array(CanvasNoteSchema)),live:boolean(),snapshotCssPath:string(),bundlePath:string().optional(),hostStylesheets:array(string().regex(/^(?:assets\/host\/[A-Za-z0-9._@~+-][A-Za-z0-9._@~+/-]*\.css|https:\/\/\S+)$/)).optional(),appStylesheets:record(string(),string().regex(/^app-[a-z0-9]+\.css$/)).optional(),frozenScreens:record(string(),record(string(),string().regex(/^frozen\/[a-z0-9]+\.json$/))).optional(),screenshots:object({cover:string(),screens:record(string(),string()),boards:record(string(),string())}).optional()}),FrozenScreenSchema=strictObject({head:array(strictObject({tag:_enum(["style","link"]),attributes:record(string(),string()),css:string().optional(),file:string().regex(/^(?:snapshot|app-[a-z0-9]+|frozen\/[a-z0-9]+)\.css$/).optional()})),body:string(),htmlAttributes:record(string(),string()),bodyAttributes:record(string(),string())});function frozenVariantKey(themeName,scheme){return`${themeName}/${scheme}`}import{homedir}from"os";import{delimiter,dirname,resolve}from"path";function designGitEnv(folder){let ceilings=[homedir()];if(managedDesignId(folder)||localDesignOf(folder))ceilings.push(dirname(resolve(folder)));let inherited=process.env.GIT_CEILING_DIRECTORIES;if(inherited)ceilings.push(inherited);return{...process.env,GIT_CEILING_DIRECTORIES:ceilings.join(delimiter)}}var MAX_SCREENSHOT_BYTES=4194304,MAX_SCREENSHOT_COUNT=120,DOWNSCALE_WIDTH=1280;function isBrowserMissing(err){return err instanceof Error&&err.name==="BrowserMissingError"}async function captureBundleScreenshots(opts){let{screens,boards,viewport,renderHtml,capture,warn,progress}=opts,selectedScreens=opts.screenIds?screens.filter((screen)=>opts.screenIds?.has(screen.id)):screens,selectedBoards=opts.boardIds?boards.filter((board)=>opts.boardIds?.has(board.id)):boards,manifest={cover:"",screens:{},boards:{}},total=selectedScreens.length+selectedBoards.filter((board)=>board.frames.length>0).length,done=0,advance=()=>{done+=1,progress?.(done,total)},shoot=async(html,vp,fullPage,screen)=>{let of=screen?{screen}:{},png=await capture({html,viewport:vp,fullPage,deviceScaleFactor:1,...of});if(png.byteLength>MAX_SCREENSHOT_BYTES&&DOWNSCALE_WIDTH<vp.w)png=await capture({html,viewport:vp,fullPage,deviceScaleFactor:DOWNSCALE_WIDTH/vp.w,...of});return png.byteLength<=MAX_SCREENSHOT_BYTES?png:null},jobs=[];for(let screen of selectedScreens)jobs.push({run:async()=>{try{let png=await shoot(await renderHtml(screen),viewport,!0,screen);if(!png)return warn(`screenshot of screen "${screen.id}" exceeds 4MB even downscaled \u2014 skipped`),null;return{kind:"screen",id:screen.id,path:`screenshots/${screen.id}.png`,bytes:png}}catch(err){if(isBrowserMissing(err))throw err;return warn(`screenshot of screen "${screen.id}" failed \u2014 skipped (${message(err)})`),null}finally{advance()}}});let screenById=new Map(screens.map((screen)=>[screen.id,screen]));for(let board of selectedBoards){if(board.frames.length===0)continue;jobs.push({run:async()=>{try{let framed=(await Promise.all(board.frames.map(async(frame)=>{let screen=screenById.get(frame.screen);return screen?{frame,html:await renderHtml(screen,board.theme,frame.scheme??"light")}:null}))).filter((entry)=>entry!==null);if(framed.length===0)return null;let composite=buildBoardComposite(framed),png=await shoot(composite.html,composite.viewport,!1);if(!png)return warn(`screenshot of board "${board.id}" exceeds 4MB even downscaled \u2014 skipped`),null;return{kind:"board",id:board.id,path:`screenshots/${board.id}.png`,bytes:png}}catch(err){if(isBrowserMissing(err))throw err;return warn(`screenshot of board "${board.id}" failed \u2014 skipped (${message(err)})`),null}finally{advance()}}})}let shotLimit=MAX_SCREENSHOT_COUNT-1,results=Array.from({length:jobs.length},()=>null),nextJob=0,completedShots=0,reservedShots=0,browserMissing=!1,worker=async()=>{while(!browserMissing&&nextJob<jobs.length&&completedShots+reservedShots<shotLimit){let index=nextJob++;reservedShots+=1;try{let shot=await jobs[index]?.run();if(shot)results[index]=shot,completedShots+=1}catch(err){if(isBrowserMissing(err))browserMissing=!0;else throw err}finally{reservedShots-=1}}},concurrency=Math.max(1,Math.min(MAX_CONCURRENT_RENDERS,Math.floor(opts.concurrency??MAX_CONCURRENT_RENDERS)));if(await Promise.all(Array.from({length:Math.min(concurrency,jobs.length)},worker)),browserMissing)return warn("no headless browser available \u2014 publishing without screenshots"),null;if(nextJob<jobs.length)warn(`screenshot limit (${MAX_SCREENSHOT_COUNT}) reached \u2014 remaining shots skipped`);let files=[];for(let shot of results){if(!shot)continue;if(files.push({path:shot.path,bytes:shot.bytes}),shot.kind==="screen")manifest.screens[shot.id]=shot.path;else manifest.boards[shot.id]=shot.path}let coverSource=selectedBoards.map((b)=>manifest.boards[b.id]).find((p)=>p!==void 0)??selectedScreens.map((s)=>manifest.screens[s.id]).find((p)=>p!==void 0);if(!coverSource)return null;let source=files.find((f)=>f.path===coverSource);if(!source)return null;return manifest.cover="screenshots/cover.png",files.push({path:manifest.cover,bytes:source.bytes}),{manifest,files}}function message(err){let msg=err instanceof Error?err.message:String(err);return msg.split(`
3
- `)[0]??msg}var normalizedBoardIds=(boardIds)=>[...new Set(boardIds)].sort();function publishSlotMismatches(slot,current){let mismatches=[];if(!slot.context.contextKnown)mismatches.push("older publish has no board-selection context");if(!(current.candidateTeamIds?slot.teamId!==null&&current.candidateTeamIds.includes(slot.teamId):slot.teamId===current.teamId))mismatches.push("team differs");if(JSON.stringify(normalizedBoardIds(slot.context.boardIds))!==JSON.stringify(normalizedBoardIds(current.boardIds)))mismatches.push("board selection differs");if(slot.context.repo!==current.repo)mismatches.push("repository differs");else if(current.repo!==null){if(!slot.context.branch||!current.branch)mismatches.push("branch is unavailable");else if(slot.context.branch!==current.branch)mismatches.push("branch differs")}return mismatches}function recommendedPublishSlot(slots,current){return exactPublishSlots(slots,current)[0]??null}function exactPublishSlots(slots,current){return slots.filter((slot)=>publishSlotMismatches(slot,current).length===0).sort((left,right)=>publishedAt(right.lastPublishedAt)-publishedAt(left.lastPublishedAt))}var publishedAt=(value)=>{let parsed=value?Date.parse(value):Number.NaN;return Number.isFinite(parsed)?parsed:Number.NEGATIVE_INFINITY},PUBLISH_VIEWPORT={w:1440,h:900};function defaultPublishTitle(folderRoot){return`${recordedDesignName(folderRoot)??folderRoot.split("/").filter(Boolean).pop()} designs`}async function ensureFolderId(folder,existing,report){if(existing)return existing;let path=join(folder,".design","config.json"),raw=JSON.parse(await readFile(path,"utf8")),folderId=crypto.randomUUID();return await writeJsonAtomic(path,{...raw,folderId}),report({kind:"note",message:"assigned this folder a cloud id (.design/config.json folderId) \u2014 commit it so every clone finds the folder's share links."}),folderId}function reportProvenance(git,report){if(git.repo){report({kind:"info",message:git.branch?`source: ${git.repo} on ${git.branch}`:`source: ${git.repo} (detached HEAD \u2014 no branch recorded)`});return}report({kind:"info",message:git.branch?`source: branch ${git.branch} \u2014 no git remote, publishing without a repository`:"source: not a git repository \u2014 publishing without repository or branch"})}function gitProbe(folder){return{encoding:"utf8",stdio:["ignore","pipe","ignore"],env:designGitEnv(folder)}}function gitCommitSha(folder){try{let probe=gitProbe(folder);if(execFileSync("git",["-C",folder,"status","--porcelain"],probe).trim().length>0)return null;return execFileSync("git",["-C",folder,"rev-parse","HEAD"],probe).trim()}catch{return null}}function normalizeRemote(url){let rest=url.trim().replace(/\.git\/?$/,"");if(/^[./~]/.test(rest)||/^[a-z]:[\\/]/i.test(rest)||rest.startsWith("file://"))return null;let scp=/^(?:[\w.-]+@)?([\w.-]+):(?!\/\/)(.+)$/.exec(rest);if(scp?.[1]&&scp[2])return`${scp[1]}/${scp[2].replace(/^\/+/,"")}`;try{let parsed=new URL(rest.includes("://")?rest:`https://${rest}`);if(!parsed.hostname||!parsed.pathname||parsed.pathname==="/")return null;return`${parsed.hostname}${parsed.pathname.replace(/\/+$/,"")}`}catch{return null}}function gitContext(folder){let probe=gitProbe(folder),run=(args)=>{try{return execFileSync("git",["-C",folder,...args],probe).trim()||null}catch{return null}},branchRaw=run(["rev-parse","--abbrev-ref","HEAD"]),remote=run(["remote","get-url","origin"]);return{repo:remote?normalizeRemote(remote):null,branch:branchRaw==="HEAD"?null:branchRaw}}function publishableTeams(teams){return teams.filter((team)=>team.canPublish!==!1)}function resolvePublishTeam(teams,requested){if(teams.length===0)return requested?err(teamNotFound(requested)):ok({kind:"personal"});let reviewer=teams.some((team)=>team.role==="reviewer"),publishable=publishableTeams(teams);if(requested){let named=(candidates)=>candidates.filter((team)=>team.id===requested||team.name.toLowerCase()===requested.toLowerCase()),exact=named(publishable);if(exact.length>1)return err(teamAmbiguous(requested));let[team]=exact;if(team)return ok({kind:"team",team});return err(named(teams).length>0?teamNotPublishable(requested,reviewer):publishable.length===0?noPublishableTeam(reviewer):teamNotFound(requested))}let[only,...rest]=publishable;if(!only)return err(noPublishableTeam(reviewer));return rest.length===0?ok({kind:"team",team:only}):ok({kind:"choose",teams:publishable})}async function listTeams(baseUrl,token){let body=await cloudFetch(`${baseUrl}/v1/teams/mine`,TeamsResponseSchema,{operation:"listing teams",token});return body.ok?ok(body.value.teams):body}function selectBoards(design,boardIds){if(!boardIds||boardIds.length===0)return activeBoards(design).map(([,board])=>board);let wanted=new Set(boardIds);return orderedBoards(design).map(([,board])=>board).filter((board)=>wanted.has(board.id))}var SNAPSHOT_CSS_PATH="snapshot.css",SHARED_CSS_MIN_LENGTH=2048;function frozenVariantsOf(screen,design,boards){let themes=new Map,see=(themeName,pinnedDark)=>{let theme=(themeName?design.themes.get(themeName):void 0)??design.theme,seen=themes.get(theme.name);themes.set(theme.name,{themeName:seen?seen.themeName:themeName,theme,dark:Boolean(seen?.dark)||pinnedDark||Boolean(theme.colorsDark)})};see(void 0,!1);for(let board of boards)for(let frame of board.frames)if(frame.screen===screen.id)see(board.theme,frame.scheme==="dark");return[...themes.values()].flatMap(({themeName,theme,dark})=>(dark?["light","dark"]:["light"]).map((scheme)=>({key:`${screen.id}\x00${theme.name}\x00${scheme}`,screen,themeName,theme,scheme})))}async function publishDesign(cloud,pipeline,request,report=()=>{}){let{folder:design}=pipeline,{root,config}=design;report({kind:"step",step:"check",message:"checking the cloud"});let health=await checkCloudHealth(cloud.baseUrl);if(health.status==="unreachable")return err(unreachable(health.reason,{url:cloud.baseUrl}));if(health.status==="unhealthy")return err(cloudUnhealthy(health.detail));if(design.screens.size===0)return err(noScreens(root));report({kind:"step",step:"select",message:"collecting boards"});let boards=selectBoards(design,request.boardIds),screenIds=Boolean(request.boardIds&&request.boardIds.length>0)?new Set(boards.flatMap((b)=>b.frames.map((f)=>f.screen))):null,screens=screenIds?[...design.screens.values()].filter((s)=>screenIds.has(s.id)):[...design.screens.values()];if(screens.length===0){let placed=new Set([...design.boards.values()].flatMap((board)=>board.frames.map((frame)=>frame.screen)));return err(noBoardScreens([...design.screens.keys()].filter((id)=>!placed.has(id))))}let viewport=request.viewport??PUBLISH_VIEWPORT,title=request.title?.trim()||defaultPublishTitle(root),form=new FormData,bundleFiles=0,bundleBytes=0,addFile=(path,data,type)=>{if(typeof data==="string"?data.length===0:data.byteLength===0)return report({kind:"warn",message:`skipped empty file: ${path}`}),!1;return form.append("file",new File([data],path,type?{type}:void 0)),bundleFiles+=1,bundleBytes+=typeof data==="string"?new TextEncoder().encode(data).byteLength:data.byteLength,!0},bundler=pipeline.liveBundler??createOneShotLiveBundler(root,config);report({kind:"step",step:"styles",message:"compiling styles"});let snapshotCss=await pipeline.snapshotCss(),live=!1,liveCode=null;if(bundler){report({kind:"step",step:"bundle",message:"bundling live components"});let bundle=await buildLiveModule(bundler);for(let message of bundle.warnings)report({kind:"warn",message});if(bundle.code!==null&&addFile("bundle.js",bundle.code,"text/javascript"))liveCode=bundle.code,live=!0}report({kind:"step",step:"capture",message:"capturing previews"});let mount=createCaptureMount(pipeline.folder,pipeline.providers,pipeline.defaultProvider),appCss=new Map,appStylesheets={},assetBearing=[],shipped=new Set,sharedCss=new Map;if(snapshotCss)sharedCss.set(snapshotCss,SNAPSHOT_CSS_PATH);let addOnce=(path,data,type)=>{if(shipped.has(path))return;shipped.add(path),addFile(path,data,type)};for(let screen of screens){let css=await mount.appCss(screen).catch(()=>"");if(css.trim()==="")continue;appCss.set(screen.id,css);let path=`app-${Bun.hash(css).toString(36)}.css`;addOnce(path,css,"text/css"),appStylesheets[screen.id]=path,sharedCss.set(css,path),assetBearing.push(css)}let frozenFiles=new Map,frozenAt=new Map,freezeAttempted=new Set,notFrozen=new Set,browserMissing=!1,nameOf=(screen)=>screen.name||screen.id,shareStyle=(style)=>{let{tag,attributes,css}=style;if(css===void 0)return{tag,attributes};if(css.length<SHARED_CSS_MIN_LENGTH)return{tag,attributes,css};let file=sharedCss.get(css);if(!file)file=`frozen/${Bun.hash(css).toString(36)}.css`,frozenFiles.set(file,css),sharedCss.set(css,file);return{tag,attributes,file}},keepFrozen=(variant,page)=>{if(freezeAttempted.add(variant.key),!page?.mounted){notFrozen.add(nameOf(variant.screen));return}let frozen={head:page.head.map(shareStyle),body:page.body,htmlAttributes:page.htmlAttributes,bodyAttributes:page.bodyAttributes},json=JSON.stringify(frozen),path=`frozen/${Bun.hash(json).toString(36)}.json`;frozenFiles.set(path,json);let variants=frozenAt.get(variant.screen.id)??new Map;variants.set(frozenVariantKey(variant.theme.name,variant.scheme),path),frozenAt.set(variant.screen.id,variants)},shots=await withAssetServer(root,liveCode,async(baseHref)=>{let htmlCache=new Map,renderHtml=async(screen,themeName,scheme="light")=>{let theme=(themeName?design.themes.get(themeName):void 0)??design.theme,key=`${screen.id}\x00${theme.name}\x00${scheme}`,cached=htmlCache.get(key);if(cached)return cached;let canvasBundle=await mount.forScreen(screen,theme,scheme==="dark"),rendering=renderScreen(screen,theme,{viewport,snapshotCss,registry:registryForScreen(screen,pipeline.providers,pipeline.defaultProvider,config.extensions??{},config.styling?.framework),renderPass:renderPassForScreen(screen,pipeline.providers,pipeline.defaultProvider,theme),snippets:design.snippets,customCss:design.customCss,appCss:appCss.get(screen.id),dark:scheme==="dark",baseHref,includeRuntime:!1,...live?{liveBundleUrl:LIVE_BUNDLE_PATH}:{},...canvasBundle?{canvasBundle}:{},hostStylesheets:hostStylesheetsForScreen(screen,pipeline.providers,pipeline.defaultProvider,config.hostApp)}).then(({html})=>html);return htmlCache.set(key,rendering),rendering},variants=[];for(let screen of screens){if(await mount.forScreen(screen,design.theme,!1)===void 0)continue;variants.push(...frozenVariantsOf(screen,design,boards))}let previewed=(screen)=>request.screenshotSelection?.screenIds.has(screen.id)??!0,withPreview=new Map;for(let variant of variants)if(variant.themeName===void 0&&variant.scheme==="light"&&previewed(variant.screen))withPreview.set(variant.screen.id,variant);let freeze=async(variant)=>{try{keepFrozen(variant,await captureMountedDocument({html:await renderHtml(variant.screen,variant.themeName,variant.scheme),viewport}))}catch(error){if(error instanceof Error&&error.name==="BrowserMissingError")browserMissing=!0;freezeAttempted.add(variant.key),notFrozen.add(nameOf(variant.screen))}},ownLoads=Promise.all(variants.filter((variant)=>withPreview.get(variant.screen.id)!==variant).map(freeze)),shots=await captureBundleScreenshots({screens,boards,...request.screenshotSelection?{screenIds:request.screenshotSelection.screenIds,boardIds:request.screenshotSelection.boardIds}:{},viewport,renderHtml,capture:async(req)=>{let variant=req.screen?withPreview.get(req.screen.id):void 0,toFreeze=variant!==void 0&&!freezeAttempted.has(variant.key),shot=await captureScreenshot({html:req.html,viewport:req.viewport,fullPage:req.fullPage,deviceScaleFactor:req.deviceScaleFactor,...toFreeze?{freeze:!0}:{}});if(toFreeze)keepFrozen(variant,shot.frozen);return shot.png},warn:(message)=>report({kind:"warn",message}),progress:(done,total)=>report({kind:"capture",done,total})});return await ownLoads,await Promise.all(variants.filter((variant)=>!freezeAttempted.has(variant.key)).map(freeze)),shots},{bundle:mount.serve,host:hostFilesFetch(()=>root)});for(let path of[...frozenFiles.keys()].sort()){let text=frozenFiles.get(path)??"";addFile(path,text,path.endsWith(".css")?"text/css":"application/json"),assetBearing.push(text)}let frozenScreens={};for(let screen of screens){let at=frozenAt.get(screen.id);if(at)frozenScreens[screen.id]=Object.fromEntries([...at].sort(([a],[b])=>a<b?-1:1))}for(let f of shots?.files??[])addFile(f.path,f.bytes,"image/png");if(notFrozen.size>0)report({kind:"warn",message:`the share will not match the canvas for ${[...notFrozen].sort().join(", ")}: the canvas draws ${notFrozen.size===1?"it":"them"} with the app's own components, which could not be mounted here, so a viewer sees velloo's stand-ins instead. ${browserMissing?"Run `velloo browser install` and publish again.":"component_status says what stopped them mounting."}`});let host=Object.values(pipeline.providers).some((provider)=>provider.hostStylesheets)?await shipHostFiles({source:storedHostSource(root),stylesheets:config.hostApp?.stylesheets??[],screens,snippets:[...design.snippets.values()],warn:(message)=>report({kind:"warn",message}),designAsset:(path)=>existsSync(join(root,path))}):{screens,snippets:[...design.snippets.values()],files:[],stylesheets:[]};for(let f of host.files)addFile(f.path,f.bytes,f.type);let annotations=Object.fromEntries([...design.annotations].filter(([screenId,list])=>list.length>0&&screens.some((s)=>s.id===screenId))),notes=Object.fromEntries([...design.notes].filter(([boardId,list])=>list.length>0&&boards.some((b)=>b.id===boardId))),designDoc={formatVersion:DESIGN_BUNDLE_FORMAT,title,viewport,defaultLibrary:config.defaultLibrary,libraries:config.libraries,extensions:config.extensions??{},...config.styling?{styling:config.styling}:{},viewportPresets:config.viewportPresets??[],theme:design.theme,themes:Object.fromEntries(design.themes),customCss:design.customCss,snippets:host.snippets,screens:host.screens,boards,annotations,notes,live,snapshotCssPath:SNAPSHOT_CSS_PATH,...live?{bundlePath:"bundle.js"}:{},...host.stylesheets.length>0?{hostStylesheets:host.stylesheets}:{},...Object.keys(appStylesheets).length>0?{appStylesheets}:{},...Object.keys(frozenScreens).length>0?{frozenScreens}:{},...shots?{screenshots:shots.manifest}:{}},validated=DesignBundleSchema.safeParse(designDoc);if(!validated.success)return err(bundleInvalid(prettifyError(validated.error)));addFile("design.json",JSON.stringify(designDoc),"application/json"),addFile(SNAPSHOT_CSS_PATH,snapshotCss||`/* this folder uses no CSS framework */
4
- `,"text/css");let assetRefs=new Set,assetRe=/\/assets\/[A-Za-z0-9._@\-/]+/g;for(let source of[...host.screens,...host.snippets])for(let m of JSON.stringify(source).matchAll(assetRe))assetRefs.add(m[0]);for(let text of[design.customCss,...assetBearing])for(let m of text.matchAll(assetRe))assetRefs.add(m[0]);for(let ref of assetRefs){if(ref.startsWith("/assets/host/"))continue;let rel=ref.replace(/^\//,"");try{let bytes=await readFile(join(root,rel));addFile(rel,/\.svg$/i.test(rel)?Buffer.from(sanitizeSvgMarkup(bytes.toString("utf8")),"utf8"):bytes)}catch{report({kind:"warn",message:`asset not found: ${rel}`})}}let commitSha=gitCommitSha(root);if(commitSha)form.append("commitSha",commitSha);let git=request.provenance??gitContext(root);if(reportProvenance(git,report),git.repo)form.append("gitRepo",git.repo);if(git.branch)form.append("gitBranch",git.branch);let folderId=await ensureFolderId(root,config.folderId,report);report({kind:"step",step:"upload",message:`uploading ${bundleFiles} file${bundleFiles===1?"":"s"} (${formatBytes(bundleBytes)})`});let uploaded=await uploadLinkBundle({baseUrl:cloud.baseUrl,token:cloud.token,link:{...request.destination.slug?{slug:request.destination.slug}:{},folderId,publishMode:request.destination.mode,...request.destination.mode==="update"?{expectedVersionId:request.destination.expectedVersionId}:{},title,visibility:request.visibility,...request.teamId?{teamId:request.teamId}:{},...request.audience?.length?{audience:request.audience}:{},...request.publicComments!==void 0?{publicComments:request.publicComments}:{},...request.password?{password:request.password}:{},...request.passwordExpiresAt?{passwordExpiresAt:request.passwordExpiresAt}:{}},form});if(!uploaded.ok)return uploaded;let upload=uploaded.value;return ok({shareUrl:upload.shareUrl,slug:upload.link.slug,visibility:upload.link.visibility,passwordProtected:upload.link.passwordProtected,...upload.link.audience!==void 0?{audience:upload.link.audience}:{},...upload.link.publicComments!==void 0?{publicComments:upload.link.publicComments}:{},files:upload.files,bytes:upload.bytes,screenshots:shots?.files.length??0,boards:boards.length,screens:screens.length,commitSha,created:upload.created,...upload.tier!==void 0?{tier:upload.tier}:{},...upload.history!==void 0?{history:upload.history}:{}})}function formatBytes(bytes){if(bytes>=1048576)return`${(bytes/1048576).toFixed(1)} MB`;if(bytes>=1024)return`${Math.round(bytes/1024)} KB`;return`${bytes} B`}function publishedDesignSubtitle(design){let published=design.lastPublishedAt?`Published ${design.lastPublishedAt}`:"Publish time unavailable",who=design.ownerEmail?.trim()||design.ownerName?.trim(),publisher=who?`by ${who}`:"publisher unavailable",repo=design.git?.repo?.trim(),branch=design.git?.branch?.trim(),source=repo?`repo ${repo}${branch?` (${branch})`:""}`:"repository unavailable";return`${published} \xB7 ${publisher} \xB7 ${source}`}async function listPublishedDesigns(opts){let body=await cloudFetch(`${opts.baseUrl}/v1/links`,PublishedDesignsResponseSchema,{operation:"listing published designs",token:opts.token});if(!body.ok)return body;return ok((body.value.links??[]).filter((link)=>link.published).map((link)=>({...link,url:link.url.startsWith("http")?link.url:`${opts.baseUrl}${link.url}`})))}async function unpublishDesign(opts){let res=await fetch(`${opts.baseUrl}/v1/links/${encodeURIComponent(opts.slug)}`,{method:"DELETE",headers:{authorization:`Bearer ${opts.token}`}}).catch((error)=>error);if(!(res instanceof Response))return err(unreachable(res,{url:opts.baseUrl}));if(!res.ok)return err(await httpFailureFrom("unpublishing the design",res));return ok(void 0)}
5
- export{publishedDesignSubtitle,listPublishedDesigns,unpublishDesign,listPublishDestinations,designGitEnv,teamChoiceRequired,describePublishError,recommendedPublishSlot,exactPublishSlots,PUBLISH_VIEWPORT,gitContext,publishableTeams,resolvePublishTeam,listTeams,publishDesign};
package/chunk-kvq7pcph.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{upgrade_default,migrateFolder2}from"./chunk-mqx96m2g.js";import"./chunk-07fxzrx2.js";import"./chunk-pjtg3wnm.js";import"./chunk-ez720ked.js";import"./chunk-qgbat4fv.js";import"./chunk-6w42sr61.js";import"./chunk-80fjfyha.js";import"./chunk-9g45c5md.js";import"./chunk-xg49s85z.js";import"./chunk-w30zfv3m.js";import"./chunk-bntsn3wj.js";import"./chunk-d19ttv1a.js";import"./chunk-rrrn1mkq.js";import"./chunk-s23gtejf.js";import"./chunk-xxw67jpk.js";export{upgrade_default as default,migrateFolder2 as migrateFolder};
package/chunk-m0v3d581.js DELETED
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{isCancel,select}from"./chunk-80fjfyha.js";import{chromiumExecutable,closePooledBrowser}from"./chunk-xg49s85z.js";import"./chunk-xxw67jpk.js";import{writeText,findFrame,exportFilename,exportFramePng,exportBoardPng,exportFramePdf,exportBoardPdf,exportScreenHtml,exportScreenPng,exportScreenPdf,exportFrameHtml,exportBoardHtml,hostFilesFetch,screensForExportTarget}from"./chunk-9g45c5md.js";import"./chunk-bntsn3wj.js";import{fail}from"./chunk-s23gtejf.js";import{captureWithBrowserSetup}from"./chunk-dy7qwj3t.js";import{confirmRenderFailures}from"./chunk-qqagacne.js";import{LIVE_BUNDLE_PATH,withAssetServer,loadPipeline}from"./chunk-hsk91jms.js";import{DESIGN_ARG_DESCRIPTION,resolveDesign}from"./chunk-6w42sr61.js";import{defineCommand}from"./chunk-2smsg2ct.js";import{extname,isAbsolute,resolve}from"path";var export_default=defineCommand({meta:{name:"export",description:"Export a screen, frame, or board as PNG, PDF, or standalone HTML (format = --to extension)"},args:{target:{type:"positional",required:!1,description:"Screen, frame, or board id. Omit to pick interactively."},design:{type:"string",description:DESIGN_ARG_DESCRIPTION},to:{type:"string",description:"Output path; extension picks the format (.png | .pdf | .html). Default: ./<target>.png"},mode:{type:"string",description:"light (default) | dark | compare (side-by-side light|dark; PNG, non-board only)"},scale:{type:"string",description:"PNG raster density (0.25\u20133; default 1; 2 = retina)"},theme:{type:"string",description:"Named theme to render with (default: the board's pin, else the folder default)"},w:{type:"string",description:"Viewport width for screen targets (default: first preset)"},h:{type:"string",description:"Viewport height for screen targets (default: first preset)"},yes:{type:"boolean",description:"Export even when a component fails to render (required without an interactive terminal)"}},async run({args}){let folder=await resolveDesign(args.design,"export",{designFlag:"--design"}),pipeline=await loadPipeline(folder),design=pipeline.design,mode=args.mode??"light";if(!["light","dark","compare"].includes(mode))fail("export",`--mode must be light, dark, or compare \u2014 got '${args.mode}'`);let scale=args.scale?Number(args.scale):1;if(!Number.isFinite(scale)||scale<0.25||scale>3)fail("export",`--scale must be between 0.25 and 3 \u2014 got '${args.scale}'`);let targetId=args.target;if(!targetId){let options=[...[...design.boards.values()].map((b)=>({value:b.id,label:b.name,hint:`board \xB7 ${b.frames.length} frame${b.frames.length===1?"":"s"}`})),...[...design.screens.values()].map((s)=>({value:s.id,label:s.name||s.id,hint:"screen"}))];if(options.length===0)fail("export",`nothing to export in ${folder}.`);if(!process.stdin.isTTY)fail("export",`pass a target: ${options.map((o)=>o.value).join(", ")} (boards and screens; frame ids work too)`);let chosen=await select({message:"Export what?",options});if(isCancel(chosen))fail("export","cancelled.");targetId=chosen}let screen=design.screens.get(targetId),framed=screen?null:findFrame(design,targetId),board=screen||framed?null:design.boards.get(targetId),kind=screen?"screen":framed?"frame":board?"board":null;if(!kind)fail("export",`no screen, frame, or board with id "${targetId}" in ${folder}. Boards: ${[...design.boards.keys()].join(", ")||"(none)"}; screens: ${[...design.screens.keys()].join(", ")||"(none)"}.`);let name=screen?.name||framed?.frame.label||(framed?design.screens.get(framed.frame.screen)?.name:void 0)||board?.name||targetId,outPath=args.to?isAbsolute(args.to)?args.to:resolve(args.to):resolve(exportFilename(name,"png")),ext=extname(outPath).toLowerCase().slice(1);if(ext!=="png"&&ext!=="pdf"&&ext!=="html")fail("export",`unsupported output extension ".${ext}" \u2014 use .png, .pdf, or .html.`);let format=ext;if(mode==="compare"&&(format!=="png"||kind==="board"))fail("export",'mode "compare" is PNG-only and not available for boards.');let preset=design.config.viewportPresets[0]??{name:"default",w:1440,h:900},viewport={w:args.w?Number(args.w):preset.w,h:args.h?Number(args.h):preset.h};await confirmRenderFailures("export",{folder:design,providers:pipeline.providers,defaultProvider:pipeline.defaultProvider},screensForExportTarget(design,kind,targetId),args.yes===!0);let opts={mode,scale,...args.theme?{theme:args.theme}:{}},assetOrigin,live=format==="html"?null:await pipeline.liveModule(),notes=[],p={folder:design,providers:pipeline.providers,defaultProvider:pipeline.defaultProvider,snapshotCss:async()=>pipeline.snapshotCss,assetOrigin:()=>assetOrigin,canvasBundleFor:pipeline.capture.forScreen,appCss:pipeline.capture.appCss,mountProblems:pipeline.capture.problems,warn:(message)=>{if(!notes.includes(message))notes.push(message)},liveBundleUrl:()=>live?.code?LIVE_BUNDLE_PATH:void 0},produce=async()=>{if(kind==="screen"&&screen){if(format==="html"){let out=await exportScreenHtml(p,screen,{dark:mode==="dark",...args.theme?{theme:args.theme}:{},viewport});return{bytes:out.html,warnings:out.warnings}}if(format==="pdf")return{bytes:await exportScreenPdf(p,screen,{...opts,viewport}),warnings:[]};return{bytes:await exportScreenPng(p,screen,{...opts,viewport}),warnings:[]}}if(kind==="frame"&&framed){if(format==="html"){let out=await exportFrameHtml(p,framed.board,framed.frame,opts);return{bytes:out.html,warnings:out.warnings}}return{bytes:format==="pdf"?await exportFramePdf(p,framed.board,framed.frame,opts):await exportFramePng(p,framed.board,framed.frame,opts),warnings:[]}}if(!board)fail("export","internal: target resolution failed");if(format==="html"){let out=await exportBoardHtml(p,board,opts);return{bytes:out.html,warnings:out.warnings}}return{bytes:format==="pdf"?await exportBoardPdf(p,board,opts):await exportBoardPng(p,board,opts),warnings:[]}},result;try{if(format==="html"&&await chromiumExecutable()===null)result=await produce();else if(format==="html")await withAssetServer(folder,null,async(baseHref)=>{assetOrigin=baseHref,result=await produce()},{bundle:pipeline.capture.serve,host:hostFilesFetch(()=>folder)});else await withAssetServer(folder,live?.code??null,async(baseHref)=>{assetOrigin=baseHref,await captureWithBrowserSetup("export",async()=>{result=await produce()})},{bundle:pipeline.capture.serve,host:hostFilesFetch(()=>folder)})}finally{await closePooledBrowser()}if(!result)fail("export","capture produced no output");if(typeof result.bytes==="string")await writeText(outPath,result.bytes);else await Bun.write(outPath,result.bytes);console.log(`velloo export: wrote ${outPath} (${kind}=${targetId}, mode=${mode})`);for(let warning of[...live?.warnings??[],...notes,...result.warnings])console.log(` note: ${warning}`)}});export{export_default as default};