@pen.dev/cli 0.3.10 → 0.3.11

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 (40) hide show
  1. package/README.md +6 -4
  2. package/dist/browserAll-BVNfpTCH.mjs +15 -0
  3. package/dist/chunk-V2S4ZYJR-B9IPlZGx.mjs +7 -0
  4. package/dist/esm-N6I77Ols.mjs +63 -0
  5. package/dist/esm-Rg36NIlb.mjs +2 -0
  6. package/dist/html-BzmDMzcE.mjs +26 -0
  7. package/dist/index.d.mts +2 -0
  8. package/dist/index.mjs +3 -2
  9. package/dist/init-79Ivv_Iw.mjs +555 -0
  10. package/dist/limit-io-DqzENcBM.mjs +3 -0
  11. package/dist/module-ES6BEMUI-nLDaJUtp.mjs +2 -0
  12. package/dist/module-asyncify-2EFITU5U-B-l6gXmU.mjs +2 -0
  13. package/dist/node_modules/@highagency/pencil-wasm/package.json +1 -1
  14. package/dist/node_modules/@highagency/pencil-wasm/pencil.wasm +0 -0
  15. package/dist/out/mcp-server-darwin-arm64 +0 -0
  16. package/dist/out/mcp-server-darwin-x64 +0 -0
  17. package/dist/out/mcp-server-linux-arm64 +0 -0
  18. package/dist/out/mcp-server-linux-x64 +0 -0
  19. package/dist/out/mcp-server-windows-arm64.exe +0 -0
  20. package/dist/out/mcp-server-windows-x64.exe +0 -0
  21. package/dist/out/skills/pen-dev/SKILL.md +1 -0
  22. package/dist/out/skills/pen-dev/execute.md +1 -0
  23. package/dist/out/skills/pen-dev/pen-schema.md +5 -11
  24. package/dist/out/skills/pen-dev/scripts-and-shaders.md +35 -3
  25. package/dist/rolldown-runtime-DUc_qoCt.mjs +2 -0
  26. package/dist/standalone-DmZDPu3b.mjs +30 -0
  27. package/dist/validate-response-Cd_RKmhH.mjs +3 -0
  28. package/dist/webworkerAll-tGgDIbvf.mjs +2 -0
  29. package/package.json +31 -31
  30. package/dist/browserAll-DN_YxOXQ.mjs +0 -2
  31. package/dist/dist-CbU0Evuc.mjs +0 -4
  32. package/dist/esm-BHQtsEyo.mjs +0 -2
  33. package/dist/esm-BYcFG9-N.mjs +0 -25
  34. package/dist/html-C5EUiP3B.mjs +0 -26
  35. package/dist/init-C4ANyG-9.mjs +0 -2
  36. package/dist/module-ES6BEMUI-fiUywq2c.mjs +0 -2
  37. package/dist/module-asyncify-2EFITU5U-Ck30SKgw.mjs +0 -2
  38. package/dist/standalone-D4MlQZsr.mjs +0 -30
  39. package/dist/validate-response-DHB60j_7.mjs +0 -3
  40. package/dist/webworkerAll-FVvp_NgY.mjs +0 -2
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ function e(e,t){if(!e)throw Error(t)}function t(e){if(typeof e!=`number`)throw Error(`invalid int 32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int 32: `+e)}function n(e){if(typeof e!=`number`)throw Error(`invalid uint 32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint 32: `+e)}function r(e){if(typeof e!=`number`)throw Error(`invalid float 32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float 32: `+e)}const i=Symbol(`@bufbuild/protobuf/enum-type`);function a(t){let n=t[i];return e(n,`missing enum type on enum object`),n}function o(e,t,n,r){e[i]=s(t,n.map(t=>({no:t.no,name:t.name,localName:e[t.no]})),r)}function s(e,t,n){let r=Object.create(null),i=Object.create(null),a=[];for(let e of t){let t=l(e);a.push(t),r[e.name]=t,i[e.no]=t}return{typeName:e,values:a,findName(e){return r[e]},findNumber(e){return i[e]}}}function c(e,t,n){let r={};for(let e of t){let t=l(e);r[t.localName]=t.no,r[t.no]=t.localName}return o(r,e,t,n),r}function l(e){return`localName`in e?e:Object.assign(Object.assign({},e),{localName:e.name})}var u=class{equals(e){return this.getType().runtime.util.equals(this.getType(),this,e)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(e,t){let n=this.getType().runtime.bin,r=n.makeReadOptions(t);return n.readMessage(this,r.readerFactory(e),e.byteLength,r),this}fromJson(e,t){let n=this.getType(),r=n.runtime.json,i=r.makeReadOptions(t);return r.readMessage(n,e,i,this),this}fromJsonString(e,t){let n;try{n=JSON.parse(e)}catch(e){throw Error(`cannot decode ${this.getType().typeName} from JSON: ${e instanceof Error?e.message:String(e)}`)}return this.fromJson(n,t)}toBinary(e){let t=this.getType().runtime.bin,n=t.makeWriteOptions(e),r=n.writerFactory();return t.writeMessage(this,r,n),r.finish()}toJson(e){let t=this.getType().runtime.json,n=t.makeWriteOptions(e);return t.writeMessage(this,n)}toJsonString(e){let t=this.toJson(e);return JSON.stringify(t,null,e?.prettySpaces??0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}};function ee(e,t,n,r){let i=r?.localName??t.substring(t.lastIndexOf(`.`)+1),a={[i]:function(t){e.util.initFields(this),e.util.initPartial(t,this)}}[i];return Object.setPrototypeOf(a.prototype,new u),Object.assign(a,{runtime:e,typeName:t,fields:e.util.newFieldList(n),fromBinary(e,t){return new a().fromBinary(e,t)},fromJson(e,t){return new a().fromJson(e,t)},fromJsonString(e,t){return new a().fromJsonString(e,t)},equals(t,n){return e.util.equals(a,t,n)}}),a}function te(){let e=0,t=0;for(let n=0;n<28;n+=7){let r=this.buf[this.pos++];if(e|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}let n=this.buf[this.pos++];if(e|=(n&15)<<28,t=(n&112)>>4,!(n&128))return this.assertBounds(),[e,t];for(let n=3;n<=31;n+=7){let r=this.buf[this.pos++];if(t|=(r&127)<<n,!(r&128))return this.assertBounds(),[e,t]}throw Error(`invalid varint`)}function d(e,t,n){for(let r=0;r<28;r+=7){let i=e>>>r,a=!(!(i>>>7)&&t==0),o=(a?i|128:i)&255;if(n.push(o),!a)return}let r=e>>>28&15|(t&7)<<4,i=!!(t>>3);if(n.push((i?r|128:r)&255),i){for(let e=3;e<31;e+=7){let r=t>>>e,i=!!(r>>>7),a=(i?r|128:r)&255;if(n.push(a),!i)return}n.push(t>>>31&1)}}const f=4294967296;function p(e){let t=e[0]===`-`;t&&(e=e.slice(1));let n=1e6,r=0,i=0;function a(t,a){let o=Number(e.slice(t,a));i*=n,r=r*n+o,r>=f&&(i+=r/f|0,r%=f)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?h(r,i):m(r,i)}function ne(e,t){let n=m(e,t),r=n.hi&2147483648;r&&(n=h(n.lo,n.hi));let i=re(n.lo,n.hi);return r?`-`+i:i}function re(e,t){if({lo:e,hi:t}=ie(e,t),t<=2097151)return String(f*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+ae(o)+ae(a)}function ie(e,t){return{lo:e>>>0,hi:t>>>0}}function m(e,t){return{lo:e|0,hi:t|0}}function h(e,t){return t=~t,e?e=~e+1:t+=1,m(e,t)}const ae=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function oe(e,t){if(e>=0){for(;e>127;)t.push(e&127|128),e>>>=7;t.push(e)}else{for(let n=0;n<9;n++)t.push(e&127|128),e>>=7;t.push(1)}}function se(){let e=this.buf[this.pos++],t=e&127;if(!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}function ce(){let t=/* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof t.getBigInt64==`function`&&typeof t.getBigUint64==`function`&&typeof t.setBigInt64==`function`&&typeof t.setBigUint64==`function`&&(typeof process!=`object`||typeof process.env!=`object`||process.env.BUF_BIGINT_DISABLE!==`1`)){let e=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(t){let r=typeof t==`bigint`?t:BigInt(t);if(r>n||r<e)throw Error(`int64 invalid: ${t}`);return r},uParse(e){let t=typeof e==`bigint`?e:BigInt(e);if(t>i||t<r)throw Error(`uint64 invalid: ${e}`);return t},enc(e){return t.setBigInt64(0,this.parse(e),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},uEnc(e){return t.setBigInt64(0,this.uParse(e),!0),{lo:t.getInt32(0,!0),hi:t.getInt32(4,!0)}},dec(e,n){return t.setInt32(0,e,!0),t.setInt32(4,n,!0),t.getBigInt64(0,!0)},uDec(e,n){return t.setInt32(0,e,!0),t.setInt32(4,n,!0),t.getBigUint64(0,!0)}}}let n=t=>e(/^-?[0-9]+$/.test(t),`int64 invalid: ${t}`),r=t=>e(/^[0-9]+$/.test(t),`uint64 invalid: ${t}`);return{zero:`0`,supported:!1,parse(e){return typeof e!=`string`&&(e=e.toString()),n(e),e},uParse(e){return typeof e!=`string`&&(e=e.toString()),r(e),e},enc(e){return typeof e!=`string`&&(e=e.toString()),n(e),p(e)},uEnc(e){return typeof e!=`string`&&(e=e.toString()),r(e),p(e)},dec(e,t){return ne(e,t)},uDec(e,t){return re(e,t)}}}const g=ce();var _;(function(e){e[e.DOUBLE=1]=`DOUBLE`,e[e.FLOAT=2]=`FLOAT`,e[e.INT64=3]=`INT64`,e[e.UINT64=4]=`UINT64`,e[e.INT32=5]=`INT32`,e[e.FIXED64=6]=`FIXED64`,e[e.FIXED32=7]=`FIXED32`,e[e.BOOL=8]=`BOOL`,e[e.STRING=9]=`STRING`,e[e.BYTES=12]=`BYTES`,e[e.UINT32=13]=`UINT32`,e[e.SFIXED32=15]=`SFIXED32`,e[e.SFIXED64=16]=`SFIXED64`,e[e.SINT32=17]=`SINT32`,e[e.SINT64=18]=`SINT64`})(_||={});var v;(function(e){e[e.BIGINT=0]=`BIGINT`,e[e.STRING=1]=`STRING`})(v||={});function y(e,t,n){if(t===n)return!0;if(e==_.BYTES){if(!(t instanceof Uint8Array)||!(n instanceof Uint8Array)||t.length!==n.length)return!1;for(let e=0;e<t.length;e++)if(t[e]!==n[e])return!1;return!0}switch(e){case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return t==n}return!1}function b(e,t){switch(e){case _.BOOL:return!1;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return t==0?g.zero:`0`;case _.DOUBLE:case _.FLOAT:return 0;case _.BYTES:return/* @__PURE__ */ new Uint8Array;case _.STRING:return``;default:return 0}}function x(e,t){switch(e){case _.BOOL:return t===!1;case _.STRING:return t===``;case _.BYTES:return t instanceof Uint8Array&&!t.byteLength;default:return t==0}}var S;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(S||={});var le=class{constructor(e){this.stack=[],this.textEncoder=e??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let e=0;for(let t=0;t<this.chunks.length;t++)e+=this.chunks[t].length;let t=new Uint8Array(e),n=0;for(let e=0;e<this.chunks.length;e++)t.set(this.chunks[e],n),n+=this.chunks[e].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let e=this.finish(),t=this.stack.pop();if(!t)throw Error(`invalid state, fork stack empty`);return this.chunks=t.chunks,this.buf=t.buf,this.uint32(e.byteLength),this.raw(e)}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(e),this}uint32(e){for(n(e);e>127;)this.buf.push(e&127|128),e>>>=7;return this.buf.push(e),this}int32(e){return t(e),oe(e,this.buf),this}bool(e){return this.buf.push(+!!e),this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){let t=this.textEncoder.encode(e);return this.uint32(t.byteLength),this.raw(t)}float(e){r(e);let t=/* @__PURE__ */ new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,e,!0),this.raw(t)}double(e){let t=/* @__PURE__ */ new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,e,!0),this.raw(t)}fixed32(e){n(e);let t=/* @__PURE__ */ new Uint8Array(4);return new DataView(t.buffer).setUint32(0,e,!0),this.raw(t)}sfixed32(e){t(e);let n=/* @__PURE__ */ new Uint8Array(4);return new DataView(n.buffer).setInt32(0,e,!0),this.raw(n)}sint32(e){return t(e),e=(e<<1^e>>31)>>>0,oe(e,this.buf),this}sfixed64(e){let t=/* @__PURE__ */ new Uint8Array(8),n=new DataView(t.buffer),r=g.enc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}fixed64(e){let t=/* @__PURE__ */ new Uint8Array(8),n=new DataView(t.buffer),r=g.uEnc(e);return n.setInt32(0,r.lo,!0),n.setInt32(4,r.hi,!0),this.raw(t)}int64(e){let t=g.enc(e);return d(t.lo,t.hi,this.buf),this}sint64(e){let t=g.enc(e),n=t.hi>>31;return d(t.lo<<1^n,(t.hi<<1|t.lo>>>31)^n,this.buf),this}uint64(e){let t=g.uEnc(e);return d(t.lo,t.hi,this.buf),this}},ue=class{constructor(e,t){this.varint64=te,this.uint32=se,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength),this.textDecoder=t??new TextDecoder}tag(){let e=this.uint32(),t=e>>>3,n=e&7;if(t<=0||n<0||n>5)throw Error(`illegal tag: field no `+t+` wire type `+n);return[t,n]}skip(e,t){let n=this.pos;switch(e){case S.Varint:for(;this.buf[this.pos++]&128;);break;case S.Bit64:this.pos+=4;case S.Bit32:this.pos+=4;break;case S.LengthDelimited:let n=this.uint32();this.pos+=n;break;case S.StartGroup:for(;;){let[e,n]=this.tag();if(n===S.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(n,e)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return g.dec(...this.varint64())}uint64(){return g.uDec(...this.varint64())}sint64(){let[e,t]=this.varint64(),n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,g.dec(e,t)}bool(){let[e,t]=this.varint64();return e!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return g.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return g.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(){return this.textDecoder.decode(this.bytes())}};function de(e,t,n,r){let i;return{typeName:t,extendee:n,get field(){if(!i){let n=typeof r==`function`?r():r;n.name=t.split(`.`).pop(),n.jsonName=`[${t}]`,i=e.util.newFieldList([n]).list()[0]}return i},runtime:e}}function fe(e){let t=e.field.localName,n=Object.create(null);return n[t]=pe(e),[n,()=>n[t]]}function pe(e){let t=e.field;if(t.repeated)return[];if(t.default!==void 0)return t.default;switch(t.kind){case`enum`:return t.T.values[0].no;case`scalar`:return b(t.T,t.L);case`message`:let e=t.T,n=new e;return e.fieldWrapper?e.fieldWrapper.unwrapField(n):n;case`map`:throw`map fields are not allowed to be extensions`}}function me(e,t){if(!t.repeated&&(t.kind==`enum`||t.kind==`scalar`)){for(let n=e.length-1;n>=0;--n)if(e[n].no==t.no)return[e[n]];return[]}return e.filter(e=>e.no===t.no)}let C=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),w=[];for(let e=0;e<C.length;e++)w[C[e].charCodeAt(0)]=e;w[45]=C.indexOf(`+`),w[95]=C.indexOf(`/`);const T={dec(e){let t=e.length*3/4;e[e.length-2]==`=`?t-=2:e[e.length-1]==`=`&&--t;let n=new Uint8Array(t),r=0,i=0,a,o=0;for(let t=0;t<e.length;t++){if(a=w[e.charCodeAt(t)],a===void 0)switch(e[t]){case`=`:i=0;case`
3
+ `:case`\r`:case` `:case` `:continue;default:throw Error(`invalid base64 string.`)}switch(i){case 0:o=a,i=1;break;case 1:n[r++]=o<<2|(a&48)>>4,o=a,i=2;break;case 2:n[r++]=(o&15)<<4|(a&60)>>2,o=a,i=3;break;case 3:n[r++]=(o&3)<<6|a,i=0}}if(i==1)throw Error(`invalid base64 string.`);return n.subarray(0,r)},enc(e){let t=``,n=0,r,i=0;for(let a=0;a<e.length;a++)switch(r=e[a],n){case 0:t+=C[r>>2],i=(r&3)<<4,n=1;break;case 1:t+=C[i|r>>4],i=(r&15)<<2,n=2;break;case 2:t+=C[i|r>>6],t+=C[r&63],n=0}return n&&(t+=C[i],t+=`=`,n==1&&(t+=`=`)),t}};function he(e,t,n){ve(t,e);let r=t.runtime.bin.makeReadOptions(n),i=me(e.getType().runtime.bin.listUnknownFields(e),t.field),[a,o]=fe(t);for(let e of i)t.runtime.bin.readField(a,r.readerFactory(e.data),t.field,e.wireType,r);return o()}function ge(e,t,n,r){ve(t,e);let i=t.runtime.bin.makeReadOptions(r),a=t.runtime.bin.makeWriteOptions(r);if(_e(e,t)){let n=e.getType().runtime.bin.listUnknownFields(e).filter(e=>e.no!=t.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(let t of n)e.getType().runtime.bin.onUnknownField(e,t.no,t.wireType,t.data)}let o=a.writerFactory(),s=t.field;!s.opt&&!s.repeated&&(s.kind==`enum`||s.kind==`scalar`)&&(s=Object.assign(Object.assign({},t.field),{opt:!0})),t.runtime.bin.writeField(s,n,o,a);let c=i.readerFactory(o.finish());for(;c.pos<c.len;){let[t,n]=c.tag(),r=c.skip(n,t);e.getType().runtime.bin.onUnknownField(e,t,n,r)}}function _e(e,t){let n=e.getType();return t.extendee.typeName===n.typeName&&!!n.runtime.bin.listUnknownFields(e).find(e=>e.no==t.field.no)}function ve(t,n){e(t.extendee.typeName==n.getType().typeName,`extension ${t.typeName} can only be applied to message ${t.extendee.typeName}`)}function ye(e,t){let n=e.localName;if(e.repeated)return t[n].length>0;if(e.oneof)return t[e.oneof.localName].case===n;switch(e.kind){case`enum`:case`scalar`:return e.opt||e.req?t[n]!==void 0:e.kind==`enum`?t[n]!==e.T.values[0].no:!x(e.T,t[n]);case`message`:return t[n]!==void 0;case`map`:return Object.keys(t[n]).length>0}}function be(e,t){let n=e.localName,r=!e.opt&&!e.req;if(e.repeated)t[n]=[];else if(e.oneof)t[e.oneof.localName]={case:void 0};else switch(e.kind){case`map`:t[n]={};break;case`enum`:t[n]=r?e.T.values[0].no:void 0;break;case`scalar`:t[n]=r?b(e.T,e.L):void 0;break;case`message`:t[n]=void 0}}function E(e,t){if(typeof e!=`object`||!e||!Object.getOwnPropertyNames(u.prototype).every(t=>t in e&&typeof e[t]==`function`))return!1;let n=e.getType();return n===null||typeof n!=`function`||!(`typeName`in n)||typeof n.typeName!=`string`?!1:t===void 0||n.typeName==t.typeName}function D(e,t){return E(t)||!e.fieldWrapper?t:e.fieldWrapper.wrapField(t)}_.DOUBLE,_.FLOAT,_.INT64,_.UINT64,_.INT32,_.UINT32,_.BOOL,_.STRING,_.BYTES;const O={ignoreUnknownFields:!1},k={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function xe(e){return e?Object.assign(Object.assign({},O),e):O}function Se(e){return e?Object.assign(Object.assign({},k),e):k}const A=Symbol(),j=Symbol();function Ce(){return{makeReadOptions:xe,makeWriteOptions:Se,readMessage(e,t,n,r){if(t==null||Array.isArray(t)||typeof t!=`object`)throw Error(`cannot decode message ${e.typeName} from JSON: ${M(t)}`);r??=new e;let i=/* @__PURE__ */ new Map,a=n.typeRegistry;for(let[o,s]of Object.entries(t)){let t=e.fields.findJsonName(o);if(t){if(t.oneof){if(s===null&&t.kind==`scalar`)continue;let n=i.get(t.oneof);if(n!==void 0)throw Error(`cannot decode message ${e.typeName} from JSON: multiple keys for oneof "${t.oneof.name}" present: "${n}", "${o}"`);i.set(t.oneof,o)}N(r,s,t,n,e)}else{let t=!1;if(a?.findExtension&&o.startsWith(`[`)&&o.endsWith(`]`)){let i=a.findExtension(o.substring(1,o.length-1));if(i&&i.extendee.typeName==e.typeName){t=!0;let[e,a]=fe(i);N(e,s,i.field,n,i),ge(r,i,a(),n)}}if(!t&&!n.ignoreUnknownFields)throw Error(`cannot decode message ${e.typeName} from JSON: key "${o}" is unknown`)}}return r},writeMessage(e,t){let n=e.getType(),r={},i;try{for(i of n.fields.byNumber()){if(!ye(i,e)){if(i.req)throw`required field not set`;if(!t.emitDefaultValues||!Te(i))continue}let n=i.oneof?e[i.oneof.localName].value:e[i.localName],a=I(i,n,t);a!==void 0&&(r[t.useProtoFieldName?i.name:i.jsonName]=a)}let a=t.typeRegistry;if(a?.findExtensionFor)for(let i of n.runtime.bin.listUnknownFields(e)){let o=a.findExtensionFor(n.typeName,i.no);if(o&&_e(e,o)){let n=he(e,o,t),i=I(o.field,n,t);i!==void 0&&(r[o.field.jsonName]=i)}}}catch(e){let t=i?`cannot encode field ${n.typeName}.${i.name} to JSON`:`cannot encode message ${n.typeName} to JSON`,r=e instanceof Error?e.message:String(e);throw Error(t+(r.length>0?`: ${r}`:``))}return r},readScalar(e,t,n){return P(e,t,n??v.BIGINT,!0)},writeScalar(e,t,n){if(t!==void 0&&(n||x(e,t)))return R(e,t)},debug:M}}function M(e){if(e===null)return`null`;switch(typeof e){case`object`:return Array.isArray(e)?`array`:`object`;case`string`:return e.length>100?`string`:`"${e.split(`"`).join(`\\"`)}"`;default:return String(e)}}function N(t,n,r,i,a){let o=r.localName;if(r.repeated){if(e(r.kind!=`map`),n===null)return;if(!Array.isArray(n))throw Error(`cannot decode field ${a.typeName}.${r.name} from JSON: ${M(n)}`);let s=t[o];for(let e of n){if(e===null)throw Error(`cannot decode field ${a.typeName}.${r.name} from JSON: ${M(e)}`);switch(r.kind){case`message`:s.push(r.T.fromJson(e,i));break;case`enum`:let t=F(r.T,e,i.ignoreUnknownFields,!0);t!==j&&s.push(t);break;case`scalar`:try{s.push(P(r.T,e,r.L,!0))}catch(t){let n=`cannot decode field ${a.typeName}.${r.name} from JSON: ${M(e)}`;throw t instanceof Error&&t.message.length>0&&(n+=`: ${t.message}`),Error(n)}}}}else if(r.kind==`map`){if(n===null)return;if(typeof n!=`object`||Array.isArray(n))throw Error(`cannot decode field ${a.typeName}.${r.name} from JSON: ${M(n)}`);let e=t[o];for(let[t,o]of Object.entries(n)){if(o===null)throw Error(`cannot decode field ${a.typeName}.${r.name} from JSON: map value null`);let s;try{s=we(r.K,t)}catch(e){let t=`cannot decode map key for field ${a.typeName}.${r.name} from JSON: ${M(n)}`;throw e instanceof Error&&e.message.length>0&&(t+=`: ${e.message}`),Error(t)}switch(r.V.kind){case`message`:e[s]=r.V.T.fromJson(o,i);break;case`enum`:let t=F(r.V.T,o,i.ignoreUnknownFields,!0);t!==j&&(e[s]=t);break;case`scalar`:try{e[s]=P(r.V.T,o,v.BIGINT,!0)}catch(e){let t=`cannot decode map value for field ${a.typeName}.${r.name} from JSON: ${M(n)}`;throw e instanceof Error&&e.message.length>0&&(t+=`: ${e.message}`),Error(t)}}}}else switch(r.oneof&&(t=t[r.oneof.localName]={case:o},o=`value`),r.kind){case`message`:let e=r.T;if(n===null&&e.typeName!=`google.protobuf.Value`)return;let s=t[o];E(s)?s.fromJson(n,i):(t[o]=s=e.fromJson(n,i),e.fieldWrapper&&!r.oneof&&(t[o]=e.fieldWrapper.unwrapField(s)));break;case`enum`:let c=F(r.T,n,i.ignoreUnknownFields,!1);switch(c){case A:be(r,t);break;case j:break;default:t[o]=c}break;case`scalar`:try{let e=P(r.T,n,r.L,!1);switch(e){case A:be(r,t);break;default:t[o]=e}}catch(e){let t=`cannot decode field ${a.typeName}.${r.name} from JSON: ${M(n)}`;throw e instanceof Error&&e.message.length>0&&(t+=`: ${e.message}`),Error(t)}}}function we(e,t){if(e===_.BOOL)switch(t){case`true`:t=!0;break;case`false`:t=!1}return P(e,t,v.BIGINT,!0).toString()}function P(e,i,a,o){if(i===null)return o?b(e,a):A;switch(e){case _.DOUBLE:case _.FLOAT:if(i===`NaN`)return NaN;if(i===`Infinity`)return 1/0;if(i===`-Infinity`)return-1/0;if(i===``||typeof i==`string`&&i.trim().length!==i.length||typeof i!=`string`&&typeof i!=`number`)break;let o=Number(i);if(Number.isNaN(o)||!Number.isFinite(o))break;return e==_.FLOAT&&r(o),o;case _.INT32:case _.FIXED32:case _.SFIXED32:case _.SINT32:case _.UINT32:let s;if(typeof i==`number`?s=i:typeof i==`string`&&i.length>0&&i.trim().length===i.length&&(s=Number(i)),s===void 0)break;return e==_.UINT32||e==_.FIXED32?n(s):t(s),s;case _.INT64:case _.SFIXED64:case _.SINT64:if(typeof i!=`number`&&typeof i!=`string`)break;let c=g.parse(i);return a?c.toString():c;case _.FIXED64:case _.UINT64:if(typeof i!=`number`&&typeof i!=`string`)break;let l=g.uParse(i);return a?l.toString():l;case _.BOOL:if(typeof i!=`boolean`)break;return i;case _.STRING:if(typeof i!=`string`)break;return i;case _.BYTES:if(i===``)return/* @__PURE__ */ new Uint8Array;if(typeof i!=`string`)break;return T.dec(i)}throw Error()}function F(e,t,n,r){if(t===null)return e.typeName==`google.protobuf.NullValue`?0:r?e.values[0].no:A;switch(typeof t){case`number`:if(Number.isInteger(t))return t;break;case`string`:let r=e.findName(t);if(r!==void 0)return r.no;if(n)return j}throw Error(`cannot decode enum ${e.typeName} from JSON: ${M(t)}`)}function Te(e){return e.repeated||e.kind==`map`?!0:!(e.oneof||e.kind==`message`||e.opt||e.req)}function I(t,n,r){if(t.kind==`map`){e(typeof n==`object`&&!!n);let i={},a=Object.entries(n);switch(t.V.kind){case`scalar`:for(let[e,n]of a)i[e.toString()]=R(t.V.T,n);break;case`message`:for(let[e,t]of a)i[e.toString()]=t.toJson(r);break;case`enum`:let e=t.V.T;for(let[t,n]of a)i[t.toString()]=L(e,n,r.enumAsInteger)}return r.emitDefaultValues||a.length>0?i:void 0}if(t.repeated){e(Array.isArray(n));let i=[];switch(t.kind){case`scalar`:for(let e=0;e<n.length;e++)i.push(R(t.T,n[e]));break;case`enum`:for(let e=0;e<n.length;e++)i.push(L(t.T,n[e],r.enumAsInteger));break;case`message`:for(let e=0;e<n.length;e++)i.push(n[e].toJson(r))}return r.emitDefaultValues||i.length>0?i:void 0}switch(t.kind){case`scalar`:return R(t.T,n);case`enum`:return L(t.T,n,r.enumAsInteger);case`message`:return D(t.T,n).toJson(r)}}function L(t,n,r){return e(typeof n==`number`),t.typeName==`google.protobuf.NullValue`?null:r?n:t.findNumber(n)?.name??n}function R(t,n){switch(t){case _.INT32:case _.SFIXED32:case _.SINT32:case _.FIXED32:case _.UINT32:return e(typeof n==`number`),n;case _.FLOAT:case _.DOUBLE:return e(typeof n==`number`),Number.isNaN(n)?`NaN`:n===1/0?`Infinity`:n===-1/0?`-Infinity`:n;case _.STRING:return e(typeof n==`string`),n;case _.BOOL:return e(typeof n==`boolean`),n;case _.UINT64:case _.FIXED64:case _.INT64:case _.SFIXED64:case _.SINT64:return e(typeof n==`bigint`||typeof n==`string`||typeof n==`number`),n.toString();case _.BYTES:return e(n instanceof Uint8Array),T.enc(n)}}const z=Symbol(`@bufbuild/protobuf/unknown-fields`),B={readUnknownFields:!0,readerFactory:e=>new ue(e)},V={writeUnknownFields:!0,writerFactory:()=>new le};function Ee(e){return e?Object.assign(Object.assign({},B),e):B}function De(e){return e?Object.assign(Object.assign({},V),e):V}function Oe(){return{makeReadOptions:Ee,makeWriteOptions:De,listUnknownFields(e){return e[z]??[]},discardUnknownFields(e){delete e[z]},writeUnknownFields(e,t){let n=e[z];if(n)for(let e of n)t.tag(e.no,e.wireType).raw(e.data)},onUnknownField(e,t,n,r){let i=e;Array.isArray(i[z])||(i[z]=[]),i[z].push({no:t,wireType:n,data:r})},readMessage(e,t,n,r,i){let a=e.getType(),o=i?t.len:t.pos+n,s,c;for(;t.pos<o&&([s,c]=t.tag(),i!==!0||c!=S.EndGroup);){let n=a.fields.find(s);if(!n){let n=t.skip(c,s);r.readUnknownFields&&this.onUnknownField(e,s,c,n);continue}H(e,t,n,c,r)}if(i&&(c!=S.EndGroup||s!==n))throw Error(`invalid end group tag`)},readField:H,writeMessage(e,t,n){let r=e.getType();for(let i of r.fields.byNumber()){if(!ye(i,e)){if(i.req)throw Error(`cannot encode field ${r.typeName}.${i.name} to binary: required field not set`);continue}je(i,i.oneof?e[i.oneof.localName].value:e[i.localName],t,n)}return n.writeUnknownFields&&this.writeUnknownFields(e,t),t},writeField(e,t,n,r){t!==void 0&&je(e,t,n,r)}}}function H(e,t,n,r,i){let{repeated:a,localName:o}=n;switch(n.oneof&&(e=e[n.oneof.localName],e.case!=o&&delete e.value,e.case=o,o=`value`),n.kind){case`scalar`:case`enum`:let s=n.kind==`enum`?_.INT32:n.T,c=W;if(n.kind==`scalar`&&n.L>0&&(c=Ae),a){let n=e[o];if(r==S.LengthDelimited&&s!=_.STRING&&s!=_.BYTES){let e=t.uint32()+t.pos;for(;t.pos<e;)n.push(c(t,s))}else n.push(c(t,s))}else e[o]=c(t,s);break;case`message`:let l=n.T;a?e[o].push(U(t,new l,i,n)):E(e[o])?U(t,e[o],i,n):(e[o]=U(t,new l,i,n),l.fieldWrapper&&!n.oneof&&!n.repeated&&(e[o]=l.fieldWrapper.unwrapField(e[o])));break;case`map`:let[u,ee]=ke(n,t,i);e[o][u]=ee}}function U(e,t,n,r){let i=t.getType().runtime.bin,a=r?.delimited;return i.readMessage(t,e,a?r.no:e.uint32(),n,a),t}function ke(e,t,n){let r=t.uint32(),i=t.pos+r,a,o;for(;t.pos<i;){let[r]=t.tag();switch(r){case 1:a=W(t,e.K);break;case 2:switch(e.V.kind){case`scalar`:o=W(t,e.V.T);break;case`enum`:o=t.int32();break;case`message`:o=U(t,new e.V.T,n,void 0)}}}if(a===void 0&&(a=b(e.K,v.BIGINT)),typeof a!=`string`&&typeof a!=`number`&&(a=a.toString()),o===void 0)switch(e.V.kind){case`scalar`:o=b(e.V.T,v.BIGINT);break;case`enum`:o=e.V.T.values[0].no;break;case`message`:o=new e.V.T}return[a,o]}function Ae(e,t){let n=W(e,t);return typeof n==`bigint`?n.toString():n}function W(e,t){switch(t){case _.STRING:return e.string();case _.BOOL:return e.bool();case _.DOUBLE:return e.double();case _.FLOAT:return e.float();case _.INT32:return e.int32();case _.INT64:return e.int64();case _.UINT64:return e.uint64();case _.FIXED64:return e.fixed64();case _.BYTES:return e.bytes();case _.FIXED32:return e.fixed32();case _.SFIXED32:return e.sfixed32();case _.SFIXED64:return e.sfixed64();case _.SINT64:return e.sint64();case _.UINT32:return e.uint32();case _.SINT32:return e.sint32()}}function je(t,n,r,i){e(n!==void 0);let a=t.repeated;switch(t.kind){case`scalar`:case`enum`:let o=t.kind==`enum`?_.INT32:t.T;if(a){if(e(Array.isArray(n)),t.packed)Pe(r,o,t.no,n);else for(let e of n)G(r,o,t.no,e)}else G(r,o,t.no,n);break;case`message`:if(a){e(Array.isArray(n));for(let e of n)Ne(r,i,t,e)}else Ne(r,i,t,n);break;case`map`:e(typeof n==`object`&&!!n);for(let[e,a]of Object.entries(n))Me(r,i,t,e,a)}}function Me(t,n,r,i,a){t.tag(r.no,S.LengthDelimited),t.fork();let o=i;switch(r.K){case _.INT32:case _.FIXED32:case _.UINT32:case _.SFIXED32:case _.SINT32:o=Number.parseInt(i);break;case _.BOOL:e(i==`true`||i==`false`),o=i==`true`}switch(G(t,r.K,1,o),r.V.kind){case`scalar`:G(t,r.V.T,2,a);break;case`enum`:G(t,_.INT32,2,a);break;case`message`:e(a!==void 0),t.tag(2,S.LengthDelimited).bytes(a.toBinary(n))}t.join()}function Ne(e,t,n,r){let i=D(n.T,r);n.delimited?e.tag(n.no,S.StartGroup).raw(i.toBinary(t)).tag(n.no,S.EndGroup):e.tag(n.no,S.LengthDelimited).bytes(i.toBinary(t))}function G(t,n,r,i){e(i!==void 0);let[a,o]=Fe(n);t.tag(r,a)[o](i)}function Pe(e,t,n,r){if(!r.length)return;e.tag(n,S.LengthDelimited).fork();let[,i]=Fe(t);for(let t=0;t<r.length;t++)e[i](r[t]);e.join()}function Fe(e){let t=S.Varint;switch(e){case _.BYTES:case _.STRING:t=S.LengthDelimited;break;case _.DOUBLE:case _.FIXED64:case _.SFIXED64:t=S.Bit64;break;case _.FIXED32:case _.SFIXED32:case _.FLOAT:t=S.Bit32}let n=_[e].toLowerCase();return[t,n]}function Ie(){return{setEnumType:o,initPartial(e,t){if(e===void 0)return;let n=t.getType();for(let r of n.fields.byMember()){let n=r.localName,i=t,a=e;if(a[n]!=null)switch(r.kind){case`oneof`:let e=a[n].case;if(e===void 0)continue;let t=r.findField(e),o=a[n].value;t&&t.kind==`message`&&!E(o,t.T)?o=new t.T(o):t&&t.kind===`scalar`&&t.T===_.BYTES&&(o=q(o)),i[n]={case:e,value:o};break;case`scalar`:case`enum`:let s=a[n];r.T===_.BYTES&&(s=r.repeated?s.map(q):q(s)),i[n]=s;break;case`map`:switch(r.V.kind){case`scalar`:case`enum`:if(r.V.T===_.BYTES)for(let[e,t]of Object.entries(a[n]))i[n][e]=q(t);else Object.assign(i[n],a[n]);break;case`message`:let e=r.V.T;for(let t of Object.keys(a[n])){let r=a[n][t];e.fieldWrapper||(r=new e(r)),i[n][t]=r}}break;case`message`:let c=r.T;if(r.repeated)i[n]=a[n].map(e=>E(e,c)?e:new c(e));else{let e=a[n];i[n]=c.fieldWrapper?c.typeName===`google.protobuf.BytesValue`?q(e):e:E(e,c)?e:new c(e)}}}},equals(e,t,n){return t===n?!0:!t||!n?!1:e.fields.byMember().every(e=>{let r=t[e.localName],i=n[e.localName];if(e.repeated){if(r.length!==i.length)return!1;switch(e.kind){case`message`:return r.every((t,n)=>e.T.equals(t,i[n]));case`scalar`:return r.every((t,n)=>y(e.T,t,i[n]));case`enum`:return r.every((e,t)=>y(_.INT32,e,i[t]))}throw Error(`repeated cannot contain ${e.kind}`)}switch(e.kind){case`message`:return e.T.equals(r,i);case`enum`:return y(_.INT32,r,i);case`scalar`:return y(e.T,r,i);case`oneof`:if(r.case!==i.case)return!1;let t=e.findField(r.case);if(t===void 0)return!0;switch(t.kind){case`message`:return t.T.equals(r.value,i.value);case`enum`:return y(_.INT32,r.value,i.value);case`scalar`:return y(t.T,r.value,i.value)}throw Error(`oneof cannot contain ${t.kind}`);case`map`:let n=Object.keys(r).concat(Object.keys(i));switch(e.V.kind){case`message`:let t=e.V.T;return n.every(e=>t.equals(r[e],i[e]));case`enum`:return n.every(e=>y(_.INT32,r[e],i[e]));case`scalar`:let a=e.V.T;return n.every(e=>y(a,r[e],i[e]))}}})},clone(e){let t=e.getType(),n=new t,r=n;for(let n of t.fields.byMember()){let t=e[n.localName],i;if(n.repeated)i=t.map(K);else if(n.kind==`map`){i=r[n.localName];for(let[e,n]of Object.entries(t))i[e]=K(n)}else i=n.kind==`oneof`?n.findField(t.case)?{case:t.case,value:K(t.value)}:{case:void 0}:K(t);r[n.localName]=i}for(let n of t.runtime.bin.listUnknownFields(e))t.runtime.bin.onUnknownField(r,n.no,n.wireType,n.data);return n}}}function K(e){if(e===void 0)return e;if(E(e))return e.clone();if(e instanceof Uint8Array){let t=new Uint8Array(e.byteLength);return t.set(e),t}return e}function q(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function Le(e,t,n){return{syntax:e,json:Ce(),bin:Oe(),util:Object.assign(Object.assign({},Ie()),{newFieldList:t,initFields:n}),makeMessageType(e,t,n){return ee(this,e,t,n)},makeEnum:c,makeEnumType:s,getEnumType:a,makeExtension(e,t,n){return de(this,e,t,n)}}}var Re=class{constructor(e,t){this._fields=e,this._normalizer=t}findJsonName(e){if(!this.jsonNames){let e={};for(let t of this.list())e[t.jsonName]=e[t.name]=t;this.jsonNames=e}return this.jsonNames[e]}find(e){if(!this.numbers){let e={};for(let t of this.list())e[t.no]=t;this.numbers=e}return this.numbers[e]}list(){return this.all||=this._normalizer(this._fields),this.all}byNumber(){return this.numbersAsc||=this.list().concat().sort((e,t)=>e.no-t.no),this.numbersAsc}byMember(){if(!this.members){this.members=[];let e=this.members,t;for(let n of this.list())n.oneof?n.oneof!==t&&(t=n.oneof,e.push(t)):e.push(n)}return this.members}};function ze(e,t){let n=He(e);return t?n:qe(Ke(n))}function Be(e){return ze(e,!1)}const Ve=He;function He(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=e.charAt(r);switch(i){case`_`:t=!0;break;case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:n.push(i),t=!1;break;default:t&&(t=!1,i=i.toUpperCase()),n.push(i)}}return n.join(``)}const Ue=/* @__PURE__ */ new Set([`constructor`,`toString`,`toJSON`,`valueOf`]),We=/* @__PURE__ */ new Set([`getType`,`clone`,`equals`,`fromBinary`,`fromJson`,`fromJsonString`,`toBinary`,`toJson`,`toJsonString`,`toObject`]),Ge=e=>`${e}$`,Ke=e=>We.has(e)?Ge(e):e,qe=e=>Ue.has(e)?Ge(e):e;var Je=class{constructor(e){this.kind=`oneof`,this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=e,this.localName=Be(e)}addField(t){e(t.oneof===this,`field ${t.name} not one of ${this.name}`),this.fields.push(t)}findField(e){if(!this._lookup){this._lookup=Object.create(null);for(let e=0;e<this.fields.length;e++)this._lookup[this.fields[e].localName]=this.fields[e]}return this._lookup[e]}};function Ye(e,t){let n=[],r;for(let i of typeof e==`function`?e():e){let e=i;if(e.localName=ze(i.name,i.oneof!==void 0),e.jsonName=i.jsonName??Ve(i.name),e.repeated=i.repeated??!1,i.kind==`scalar`&&(e.L=i.L??v.BIGINT),e.delimited=i.delimited??!1,e.req=i.req??!1,e.opt=i.opt??!1,i.packed===void 0&&(e.packed=t?i.kind==`enum`||i.kind==`scalar`&&i.T!=_.BYTES&&i.T!=_.STRING:!1),i.oneof!==void 0){let t=typeof i.oneof==`string`?i.oneof:i.oneof.name;(!r||r.name!=t)&&(r=new Je(t)),e.oneof=r,r.addField(e)}n.push(e)}return n}const Xe=Le(`proto3`,e=>new Re(e,e=>Ye(e,!0)),e=>{for(let t of e.getType().fields.byMember()){if(t.opt)continue;let n=t.localName,r=e;if(t.repeated){r[n]=[];continue}switch(t.kind){case`oneof`:r[n]={case:void 0};break;case`enum`:r[n]=0;break;case`map`:r[n]={};break;case`scalar`:r[n]=b(t.T,t.L)}}});var Ze;(function(e){e[e.Unary=0]=`Unary`,e[e.ServerStreaming=1]=`ServerStreaming`,e[e.ClientStreaming=2]=`ClientStreaming`,e[e.BiDiStreaming=3]=`BiDiStreaming`})(Ze||={});var Qe;(function(e){e[e.NoSideEffects=1]=`NoSideEffects`,e[e.Idempotent=2]=`Idempotent`})(Qe||={});var J;(function(e){e[e.Canceled=1]=`Canceled`,e[e.Unknown=2]=`Unknown`,e[e.InvalidArgument=3]=`InvalidArgument`,e[e.DeadlineExceeded=4]=`DeadlineExceeded`,e[e.NotFound=5]=`NotFound`,e[e.AlreadyExists=6]=`AlreadyExists`,e[e.PermissionDenied=7]=`PermissionDenied`,e[e.ResourceExhausted=8]=`ResourceExhausted`,e[e.FailedPrecondition=9]=`FailedPrecondition`,e[e.Aborted=10]=`Aborted`,e[e.OutOfRange=11]=`OutOfRange`,e[e.Unimplemented=12]=`Unimplemented`,e[e.Internal=13]=`Internal`,e[e.Unavailable=14]=`Unavailable`,e[e.DataLoss=15]=`DataLoss`,e[e.Unauthenticated=16]=`Unauthenticated`})(J||={});function Y(e){let t=J[e];return typeof t==`string`?t[0].toLowerCase()+t.substring(1).replace(/[A-Z]/g,e=>`_`+e.toLowerCase()):e.toString()}let X;function $e(e){if(!X){X={};for(let e of Object.values(J))typeof e!=`string`&&(X[Y(e)]=e)}return X[e]}var Z=class e extends Error{constructor(e,t=J.Unknown,n,r,i){super(et(e,t)),this.name=`ConnectError`,Object.setPrototypeOf(this,new.target.prototype),this.rawMessage=e,this.code=t,this.metadata=new Headers(n??{}),this.details=r??[],this.cause=i}static from(t,n=J.Unknown){return t instanceof e?t:t instanceof Error?t.name==`AbortError`?new e(t.message,J.Canceled):new e(t.message,n,void 0,void 0,t):new e(String(t),n,void 0,void 0,t)}static[Symbol.hasInstance](t){return t instanceof Error?Object.getPrototypeOf(t)===e.prototype||t.name===`ConnectError`&&`code`in t&&typeof t.code==`number`&&`metadata`in t&&`details`in t&&Array.isArray(t.details)&&`rawMessage`in t&&typeof t.rawMessage==`string`&&`cause`in t:!1}findDetails(e){let t=`typeName`in e?{findMessage:t=>t===e.typeName?e:void 0}:e,n=[];for(let e of this.details){if(`getType`in e){t.findMessage(e.getType().typeName)&&n.push(e);continue}let r=t.findMessage(e.type);if(r)try{n.push(r.fromBinary(e.value))}catch{}}return n}};function et(e,t){return e.length?`[${Y(t)}] ${e}`:`[${Y(t)}]`}function tt(e,t,n,r){let i=null,a=null,o;if(t!==null&&t!==`identity`){let n=e.find(e=>e.name===t);if(n)i=n;else{let n=e.map(e=>e.name).join(`,`);o=new Z(`unknown compression "${t}": supported encodings are ${n}`,J.Unimplemented,{[r]:n})}}if(n===null||n===``)a=i;else{let t=n.split(`,`).map(e=>e.trim());for(let n of t){let t=e.find(e=>e.name===n);if(t){a=t;break}}}return{request:i,response:a,error:o}}function nt(e){let t,n=/* @__PURE__ */ new Uint8Array;function r(e){let t=new Uint8Array(n.length+e.length);t.set(n),t.set(e,n.length),n=t}return new ReadableStream({start(){t=e.getReader()},async pull(e){let i;for(;;){if(i===void 0&&n.byteLength>=5){let e=0;for(let t=1;t<5;t++)e=(e<<8)+n[t];i={flags:n[0],length:e}}if(i!==void 0&&n.byteLength>=i.length+5)break;let e=await t.read();if(e.done)break;r(e.value)}if(i===void 0){if(n.byteLength==0){e.close();return}e.error(new Z(`premature end of stream`,J.DataLoss));return}let a=n.subarray(5,5+i.length);n=n.subarray(5+i.length),e.enqueue({flags:i.flags,data:a})}})}async function rt(e,t,n){let{flags:r,data:i}=e;if((r&1)==1)throw new Z(`invalid envelope, already compressed`,J.Internal);return t&&i.byteLength>=n&&(i=await t.compress(i),r|=1),{data:i,flags:r}}async function it(e,t,n){let{flags:r,data:i}=e;if((r&1)==1){if(!t)throw new Z(`received compressed envelope, but do not know how to decompress`,J.Internal);i=await t.decompress(i,n),r^=1}return{data:i,flags:r}}function at(e,t){let n=new Uint8Array(t.length+5);n.set(t,5);let r=new DataView(n.buffer,n.byteOffset,n.byteLength);return r.setUint8(0,e),r.setUint32(1,t.length),n}const Q=4294967295,$=Q;function ot(e,t,n){if(t??=$,e??=Q,n??=1024,t<1||t>$)throw new Z(`writeMaxBytes ${t} must be >= 1 and <= ${$}`,J.Internal);if(e<1||e>Q)throw new Z(`readMaxBytes ${e} must be >= 1 and <= ${Q}`,J.Internal);return{readMaxBytes:e,writeMaxBytes:t,compressMinBytes:n}}function st(e,t){if(t>e)throw new Z(`message size ${t} is larger than configured writeMaxBytes ${e}`,J.ResourceExhausted)}function ct(e,t,n=!1){if(t>e){let r=`message size is larger than configured readMaxBytes ${e}`;throw n&&(r=`message size ${t} is larger than configured readMaxBytes ${e}`),new Z(r,J.ResourceExhausted)}}export{g as _,at as a,tt as c,Y as d,J as f,T as g,Xe as h,nt as i,Z as l,Ze as m,st as n,rt as o,Qe as p,ot as r,it as s,ct as t,$e as u,u as v};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{c as e,l as t,o as n,r}from"./chunk-V2S4ZYJR-B9IPlZGx.mjs";export{r as QuickJSModuleCallbacks,n as QuickJSWASMModule,e as applyBaseRuntimeOptions,t as applyModuleEvalRuntimeOptions};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{a as e,c as t,d as n,i as r,l as i,n as a,o,s,t as c,u as l}from"./chunk-V2S4ZYJR-B9IPlZGx.mjs";var u=class extends a{async evalCodeAsync(e,t=`eval.js`,n){let r=+(n===void 0),i=l(n),a=0;try{a=await this.memory.newHeapCharPointer(e).consume(e=>this.ffi.QTS_Eval_MaybeAsync(this.ctx.value,e.value.ptr,e.value.strlen,t,r,i))}catch(e){throw this.runtime.debugLog(`QTS_Eval_MaybeAsync threw`,e),e}let o=this.ffi.QTS_ResolveException(this.ctx.value,a);return o?(this.ffi.QTS_FreeValuePointer(this.ctx.value,a),this.fail(this.memory.heapValueHandle(o))):this.success(this.memory.heapValueHandle(a))}newAsyncifiedFunction(e,t){return this.newFunction(e,t)}},d=class extends e{constructor(e){super(e)}newContext(e={}){let t=n(e.intrinsics),r=new c(this.ffi.QTS_NewContext(this.rt.value,t),void 0,e=>{this.contextMap.delete(e),this.callbacks.deleteContext(e),this.ffi.QTS_FreeContext(e)}),i=new u({module:this.module,ctx:r,ffi:this.ffi,rt:this.rt,ownedLifetimes:[],runtime:this,callbacks:this.callbacks});return this.contextMap.set(r.value,i),i}setModuleLoader(e,t){super.setModuleLoader(e,t)}setMaxStackSize(e){return super.setMaxStackSize(e)}},f=class extends o{constructor(e,t){super(e,t),this.ffi=t,this.module=e}newRuntime(e={}){let n=new c(this.ffi.QTS_NewRuntime(),void 0,e=>{this.callbacks.deleteRuntime(e),this.ffi.QTS_FreeRuntime(e)}),r=new d({module:this.module,ffi:this.ffi,rt:n,callbacks:this.callbacks});return t(r,e),e.moduleLoader&&r.setModuleLoader(e.moduleLoader),r}newContext(e={}){let t=this.newRuntime(),n=e.ownedLifetimes?e.ownedLifetimes.concat([t]):[t],r=t.newContext({...e,ownedLifetimes:n});return t.context=r,r}evalCode(){throw new r(`QuickJSWASMModuleAsyncify.evalCode: use evalCodeAsync instead`)}evalCodeAsync(e,t){return s.withScopeAsync(async n=>{let r=n.manage(this.newContext());i(r.runtime,t);let a=await r.evalCodeAsync(e,`eval.js`);if(t.memoryLimitBytes!==void 0&&r.runtime.setMemoryLimit(-1),a.error)throw r.dump(n.manage(a.error));return r.dump(n.manage(a.value))})}};export{f as QuickJSAsyncWASMModule};
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@highagency/pencil-wasm",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "WASM rendering library for Pencil",
5
5
  "type": "module",
6
6
  "main": "./pencil.js",
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -40,6 +40,7 @@ pen.dev is an infinite canvas design tool with nested object hierarchy.
40
40
  - When the design has repeated UI, consider building those as reusable components first and then instancing them, so edits to the component propagate to every instance.
41
41
  - Changes in the document are presented in real-time to the user. Make the changes in a logical order as a designer would.
42
42
  - Minimize the time between the user requests and showing something on the screen. Users don't want to wait a long time before they see the progress.
43
+ - Answers support Markdown links to websites and local output files. Use absolute paths for local files and angle brackets for paths with spaces, for example `[Preview](http://localhost:3000)` or `[Notes](</Users/name/project/image prompts.txt>)`.
43
44
  - Use the canvas as part of your thinking. You don't need to preplan every little detail. Iteratively design using the document.
44
45
 
45
46
  - Do NOT use or think in CSS/HTML properties or behavior. pen.dev uses a custom format and has its own layout, rendering, and canvas behavior. pen.dev has similar concepts and naming, but it's not the same as CSS/HTML.
@@ -234,6 +234,7 @@ Export([pageId], "html-tailwind", "./landing.html")
234
234
  ### Generate
235
235
 
236
236
  - Brings imagery and vector artwork into the document: `"ai"` and `"stock"` for a new image, `"svg"` for new vector artwork, and `"remove-background"`, `"replace-background"`, and `"vectorize-image"` for an image the document ALREADY has.
237
+ - `Generate` needs the user to be signed in to pen.dev; `get_app_state` shows it under `Account`. When they aren't signed in, every `Generate` call fails, so don't call it. Instead, create images with your own tools if you can, save them next to the .pen file and apply them as image fills with a relative url (`./images/hero.png`), and draw vector artwork as `path` nodes. Otherwise use placeholders and tell the user that signing in to pen.dev enables `Generate`.
237
238
  - IMPORTANT: There is NO `image` node type. Images are applied as FILLS to existing nodes; SVGs become paths inside a parent frame.
238
239
  - Every type is async: the result lands after the `execute` call that started it has returned, so a screenshot taken right away will not show it. Never re-generate it, draw the result by hand, or add children to a frame you generated into.
239
240
  - Read [generate.md](./generate.md) before calling it.
@@ -34,6 +34,8 @@ export interface Position { x?: number; y?: number; }
34
34
  export interface Size { width?: NumberOrVariable | SizingBehavior; height?: NumberOrVariable | SizingBehavior; }
35
35
  /** Affine matrix [a, b, c, d, tx, ty]. */
36
36
  export type AffineTransform = [number, number, number, number, number, number];
37
+ /** Override values for shader uniforms, keyed by uniform name. Uniforms annotated with `@resolution` or `@time` must not appear here. Allowed value shapes: number (float/int), boolean (bool), hex color string like `#RRGGBB[AA]` (color), array of 2-4 numbers (vec2/3/4), or a variable reference `$name` (numeric uniforms accept number variables; color uniforms accept color variables). */
38
+ export interface ShaderUniforms { [key: string]: number | boolean | string | number[]; }
37
39
  export type BlendMode = 'normal' | 'darken' | 'multiply' | 'linearBurn' | 'colorBurn' | 'light' | 'screen' | 'linearDodge' | 'colorDodge' | 'overlay' | 'softLight' | 'hardLight' | 'difference' | 'exclusion' | 'hue' | 'saturation' | 'color' | 'luminosity';
38
40
  export type Fill = ColorOrVariable | {
39
41
  type: "color";
@@ -64,15 +66,7 @@ url?: string;
64
66
  mode?: "cover" | "contain" | "stretch";
65
67
  /** Crops the image. Maps normalized image coordinates (0..1 across its width and height) into the crop's 0..1 box, so [2, 0, 0, 1, -1, 0] is the right half. The mode fits the crop into the shape like a whole image, and cover keeps it inside the image. Defaults to identity, no crop. */
66
68
  transform?: AffineTransform;
67
- } | /** Shader fill. URL points to a WebGL 1.0 (#version 100) fragment shader file, relative to the .pen file, e.g. `./effect.glsl`. Uniforms are described via `@directive` annotations inside block comments in the shader source. A `vec2` uniform annotated with `@resolution` is auto-bound to the fill size in pixels. Other uniforms' user-set values are stored in `uniforms`. */ {
68
- type: "shader";
69
- enabled?: BooleanOrVariable;
70
- blendMode?: BlendMode;
71
- opacity?: NumberOrVariable;
72
- url: string;
73
- /** Override values for shader uniforms, keyed by uniform name. Uniforms annotated with `@resolution` or `@time` must not appear here. Allowed value shapes: number (float/int), boolean (bool), hex color string like `#RRGGBB[AA]` (color), array of 2-4 numbers (vec2/3/4), or a variable reference `$name` (numeric uniforms accept number variables; color uniforms accept color variables). */
74
- uniforms?: { [key: string]: number | boolean | string | number[] };
75
- } | /** Bezier-interpolated color grid, row-major. Keep edge points at default positions. */ {
69
+ } | /** Shader fill. URL points to a WebGL 1.0 (#version 100) fragment shader file, relative to the .pen file, e.g. `./effect.glsl`. Uniforms are described via `@directive` annotations inside block comments in the shader source. A `vec2` uniform annotated with `@resolution` is auto-bound to the fill size in pixels. Other uniforms' user-set values are stored in `uniforms`. */ { type: "shader"; enabled?: BooleanOrVariable; blendMode?: BlendMode; opacity?: NumberOrVariable; url: string; uniforms?: ShaderUniforms } | /** Bezier-interpolated color grid, row-major. Keep edge points at default positions. */ {
76
70
  type: "mesh_gradient";
77
71
  enabled?: BooleanOrVariable;
78
72
  blendMode?: BlendMode;
@@ -93,7 +87,7 @@ export interface CanHaveStroke {
93
87
  strokeLinejoin?: "miter" | "bevel" | "round";
94
88
  strokeAlignment?: "inner" | "center" | "outer";
95
89
  }
96
- export type Effect = /** Blurs the entire node. */ { enabled?: BooleanOrVariable; type: "blur"; radius?: NumberOrVariable } | /** Blurs the backdrop behind the node. */ { enabled?: BooleanOrVariable; type: "background_blur"; radius?: NumberOrVariable } | /** Inner or outer drop shadow. */ { type: "shadow"; enabled?: BooleanOrVariable; shadowType?: "inner" | "outer"; offset?: { x: NumberOrVariable; y: NumberOrVariable }; blur?: NumberOrVariable; color?: ColorOrVariable; blendMode?: BlendMode };
90
+ export type Effect = /** Blurs the entire node. */ { enabled?: BooleanOrVariable; type: "blur"; radius?: NumberOrVariable } | /** Blurs the backdrop behind the node. */ { enabled?: BooleanOrVariable; type: "background_blur"; radius?: NumberOrVariable } | /** Inner or outer drop shadow. */ { type: "shadow"; enabled?: BooleanOrVariable; shadowType?: "inner" | "outer"; offset?: { x: NumberOrVariable; y: NumberOrVariable }; blur?: NumberOrVariable; color?: ColorOrVariable; blendMode?: BlendMode } | /** Post-processes the rendered node with a fragment shader. Same shader format as the shader fill. A `sampler2D` uniform annotated with `@content` is auto-bound to the rendered node. `@resolution` is the size of the node's visual bounds. */ { type: "shader"; enabled?: BooleanOrVariable; url: string; uniforms?: ShaderUniforms };
97
91
  export type Effects = Effect | Effect[];
98
92
  export interface CanHaveEffects { effect?: Effects; }
99
93
  export interface CanHaveGraphics extends CanHaveEffects, CanHaveStroke { fill?: Fills; }
@@ -223,5 +217,5 @@ export interface Ref extends Entity {
223
217
  }
224
218
  export type Child = Frame | Group | Rectangle | Ellipse | Path | Polygon | Text | Note | Prompt | Context | Icon | Script | Browser | Ref;
225
219
  export type IdPath = string;
226
- export interface Document { version: "2.20"; themes?: { [key: string /** RegEx: [^:]+ */]: string[] }; imports?: { [key: string]: string /** Value: relative URI of imported .pen file. Key: short alias. */ }; variables?: { [key: string /** RegEx: [^:]+ */]: { type: "boolean"; value: BooleanOrVariable | { value: BooleanOrVariable; theme?: Theme }[] } | { type: "color"; value: ColorOrVariable | { value: ColorOrVariable; theme?: Theme }[] } | { type: "number"; value: NumberOrVariable | { value: NumberOrVariable; theme?: Theme }[] } | { type: "string"; value: StringOrVariable | { value: StringOrVariable; theme?: Theme }[] } }; children: (Frame | Group | Rectangle | Ellipse | Polygon | Path | Text | Note | Context | Prompt | Icon | Script | Browser | Ref)[]; }
220
+ export interface Document { version: "2.21"; themes?: { [key: string /** RegEx: [^:]+ */]: string[] }; imports?: { [key: string]: string /** Value: relative URI of imported .pen file. Key: short alias. */ }; variables?: { [key: string /** RegEx: [^:]+ */]: { type: "boolean"; value: BooleanOrVariable | { value: BooleanOrVariable; theme?: Theme }[] } | { type: "color"; value: ColorOrVariable | { value: ColorOrVariable; theme?: Theme }[] } | { type: "number"; value: NumberOrVariable | { value: NumberOrVariable; theme?: Theme }[] } | { type: "string"; value: StringOrVariable | { value: StringOrVariable; theme?: Theme }[] } }; children: (Frame | Group | Rectangle | Ellipse | Polygon | Path | Text | Note | Context | Prompt | Icon | Script | Browser | Ref)[]; }
227
221
  ```
@@ -42,7 +42,7 @@ return nodes;
42
42
 
43
43
  ## Shaders
44
44
 
45
- The `shader` fill type can be used to create complex graphics effects using WebGL shaders.
45
+ The `shader` fill type can be used to create complex graphics effects using WebGL shaders. The `shader` effect type runs the same kind of shader over the rendered node instead (see Shader effects below).
46
46
 
47
47
  - Shaders are WebGL 1.0 fragment shaders (#version 100), with one addition: textureSize(sampler, lod) is available for aspect-correct texturing.
48
48
  - Supported uniform types:
@@ -55,8 +55,10 @@ The `shader` fill type can be used to create complex graphics effects using WebG
55
55
  - @resolution: set to the resolution of the output. e.g. can be used to normalize gl_FragCoord.
56
56
  - @mouse: set to the mouse position in the same space as gl_FragCoord. For interactive effects.
57
57
  - @time: set to the elapsed time in seconds. For animations.
58
- - @sdf: a sampler2D set to an SDF texture of the node's shape. The r channel holds the signed distance in @resolution units (positive = inside). The gb channels hold the gradient of the distance field (direction of increasing distance), in texel space. Use gb instead of numerically differentiating the r channel!
59
- - @backdrop: a sampler2D set to the content rendered behind the node. offset/distort the sampling coordinate for refraction-like effects. Ideal for glass/frosted/refraction/magnifier effects. Prefer @backdrop over faking the background.
58
+ - @sdf: a sampler2D set to an SDF texture of the node's shape (in a shader effect: of the rendered content). The r channel holds the signed distance in @resolution units (positive = inside). The gb channels hold the gradient of the distance field (direction of increasing distance), in texel space. Use gb instead of numerically differentiating the r channel!
59
+ - @content: a sampler2D set to the node's own rendering below the shader, over transparent: in a fill the fills under it (plus the node's effects drawn before fills, like shadows), in a stroke additionally all fills, in an effect every fill, stroke and earlier effect. Texels are premultiplied by alpha, like gl_FragColor; outside the node it is transparent.
60
+ - @backdrop: a sampler2D set to the content rendered behind the node, with nothing of the node itself. Outside the node it mirrors. Offset/distort the sampling coordinate for refraction-like effects. Ideal for glass/frosted/refraction/magnifier effects. Prefer @backdrop over faking the background.
61
+ - @mipmap: the texture will be mipmapped. Off by default. Turn it on when the sample coordinate varies smoothly (glass, refraction, blur); keep it off when it jumps between neighboring pixels (pixelation, mosaics, high-frequency turbulence).
60
62
  - @min/@max: set the range of a uniform for better UI controls. Only applies to number uniforms.
61
63
  - @range <min>, <max>: shorthand for @min and @max on the same line. Shows a slider in the UI.
62
64
  - @label <text>: sets the uniform's display name in the UI. Always set the label.
@@ -92,3 +94,33 @@ void main() {
92
94
  gl_FragColor = vec4(color, 1.0);
93
95
  }
94
96
  ```
97
+
98
+ ### Shader effects
99
+
100
+ A `shader` effect (`effect: { type: "shader", url, uniforms }`) post-processes the node: the node, its children and its other effects are rendered into the `@content` texture, and the shader's output is drawn in place of the node. Use it for distortion, pixelation, color grading, glitch and similar effects on existing content. Use a shader fill when the shader generates the image itself. `@content` and `@backdrop` mean the same in fills and effects, so a shader written for one works as the other; a `@backdrop` shader (glass, ripple, ...) refracts what is behind the node either way.
101
+
102
+ - `@resolution` and `gl_FragCoord` are the same as for a fill: the node's size and the node's own coordinates. The shader is run over the node's visual bounds (strokes, shadows, blur, unclipped children included), so there `gl_FragCoord` goes outside `0..@resolution`, and `@content`, `@sdf` and `@backdrop` cover those bounds too: uv outside `0..1` samples them.
103
+ - Multiple shader effects are chained in list order: each one's `@content` is the output of the previous one.
104
+ - `@sdf` is the SDF of the content's alpha channel (edge at 50% alpha), so shadows, blurs and earlier shader effects on the node move the edge.
105
+ - `@content` is rendered over transparent, so blend modes inside the node only blend with the node's own content below them. A blend mode that reaches the bottom of the node (nothing opaque under it) blends with the scene when drawn normally, but not inside `@content`.
106
+ - Combine `@content` and `@backdrop`: distort the shape with `@content` and refract `@backdrop` through the result for a glass effect on a distorted node.
107
+
108
+ ```glsl
109
+ /** @resolution */
110
+ uniform vec2 u_resolution;
111
+
112
+ /** @content */
113
+ uniform sampler2D u_content;
114
+
115
+ /**
116
+ * @label Pixel Size
117
+ * @default 8
118
+ * @range 1, 64
119
+ */
120
+ uniform float u_pixelSize;
121
+
122
+ void main() {
123
+ vec2 cell = (floor(gl_FragCoord.xy / u_pixelSize) + 0.5) * u_pixelSize;
124
+ gl_FragColor = texture2D(u_content, cell / u_resolution);
125
+ }
126
+ ```
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import{createRequire as e}from"node:module";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=/* @__PURE__ */ e(import.meta.url);export{u as i,c as n,d as r,s as t};
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),s=(e,n)=>{for(var r in n)t(e,r,{get:n[r],enumerable:!0})},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(let c of r(i))!a.call(e,c)&&c!==o&&t(e,c,{get:()=>i[c],enumerable:!(s=n(i,c))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e,t)=>{var n,r,i,a,o,s,c,l,u,d,f,p,m=/\/(?![*\/])(?:\[(?:[^\]\\\n\r\u2028\u2029]+|\\.)*\]|[^\/\\\n\r\u2028\u2029]+|\\.)*(\/[$_\u200C\u200D\p{ID_Continue}]*|\\)?/uy,h,g,_,v,y,ee;p=/--|\+\+|=>|\.{3}|\??\.(?!\d)|(?:&&|\|\||\?\?|[+\-%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2}|\/(?![\/*]))=?|[?~,:;[\](){}]/y,n=/(\x23?)(?=[$_\p{ID_Start}\\])(?:[$_\u200C\u200D\p{ID_Continue}]+|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+/uy,g=/(['"])(?:[^'"\\\n\r]+|(?!\1)['"]|\\(?:\r\n|[^]))*(\1)?/y,f=/(?:0[xX][\da-fA-F](?:_?[\da-fA-F])*|0[oO][0-7](?:_?[0-7])*|0[bB][01](?:_?[01])*)n?|0n|[1-9](?:_?\d)*n|(?:(?:0(?!\d)|0\d*[89]\d*|[1-9](?:_?\d)*)(?:\.(?:\d(?:_?\d)*)?)?|\.\d(?:_?\d)*)(?:[eE][+-]?\d(?:_?\d)*)?|0[0-7]+/y,_=/[`}](?:[^`\\$]+|\\[^]|\$(?!\{))*(`|\$\{)?/y,ee=/[\t\v\f\ufeff\p{Zs}]+/uy,l=/\r?\n|[\r\u2028\u2029]/y,u=/\/\*(?:[^*]+|\*(?!\/))*(\*\/)?/y,h=/\/\/.*/y,i=/[<>.:={}]|\/(?![\/*])/y,r=/[$_\p{ID_Start}][$_\u200C\u200D\p{ID_Continue}-]*/uy,a=/(['"])(?:[^'"]+|(?!\1)['"])*(\1)?/y,o=/[^<>{}]+/y,y=/^(?:[\/+-]|\.{3}|\?(?:InterpolationIn(?:JSX|Template)|NoLineTerminatorHere|NonExpressionParenEnd|UnaryIncDec))?$|[{}([,;<>=*%&|^!~?:]$/,v=/^(?:=>|[;\]){}]|else|\?(?:NoLineTerminatorHere|NonExpressionParenEnd))?$/,s=/^(?:await|case|default|delete|do|else|instanceof|new|return|throw|typeof|void|yield)$/,c=/^(?:return|throw|yield)$/,d=RegExp(l.source),t.exports=function*(e,{jsx:t=!1}={}){var b,x,te,S,C,ne,w,T,re,E,ie,D,O,k;for({length:ne}=e,S=0,C=``,k=[{tag:`JS`}],b=[],ie=0,D=!1;S<ne;){switch(T=k[k.length-1],T.tag){case`JS`:case`JSNonExpressionParen`:case`InterpolationInTemplate`:case`InterpolationInJSX`:if(e[S]===`/`&&(y.test(C)||s.test(C))&&(m.lastIndex=S,w=m.exec(e))){S=m.lastIndex,C=w[0],D=!0,yield{type:`RegularExpressionLiteral`,value:w[0],closed:w[1]!==void 0&&w[1]!==`\\`};continue}if(p.lastIndex=S,w=p.exec(e)){switch(O=w[0],re=p.lastIndex,E=O,O){case`(`:C===`?NonExpressionParenKeyword`&&k.push({tag:`JSNonExpressionParen`,nesting:ie}),ie++,D=!1;break;case`)`:ie--,D=!0,T.tag===`JSNonExpressionParen`&&ie===T.nesting&&(k.pop(),E=`?NonExpressionParenEnd`,D=!1);break;case`{`:p.lastIndex=0,te=!v.test(C)&&(y.test(C)||s.test(C)),b.push(te),D=!1;break;case`}`:switch(T.tag){case`InterpolationInTemplate`:if(b.length===T.nesting){_.lastIndex=S,w=_.exec(e),S=_.lastIndex,C=w[0],w[1]==="${"?(C=`?InterpolationInTemplate`,D=!1,yield{type:`TemplateMiddle`,value:w[0]}):(k.pop(),D=!0,yield{type:`TemplateTail`,value:w[0],closed:w[1]==="`"});continue}break;case`InterpolationInJSX`:if(b.length===T.nesting){k.pop(),S+=1,C=`}`,yield{type:`JSXPunctuator`,value:`}`};continue}}D=b.pop(),E=D?`?ExpressionBraceEnd`:`}`;break;case`]`:D=!0;break;case`++`:case`--`:E=D?`?PostfixIncDec`:`?UnaryIncDec`;break;case`<`:if(t&&(y.test(C)||s.test(C))){k.push({tag:`JSXTag`}),S+=1,C=`<`,yield{type:`JSXPunctuator`,value:O};continue}D=!1;break;default:D=!1}S=re,C=E,yield{type:`Punctuator`,value:O};continue}if(n.lastIndex=S,w=n.exec(e)){switch(S=n.lastIndex,E=w[0],w[0]){case`for`:case`if`:case`while`:case`with`:C!==`.`&&C!==`?.`&&(E=`?NonExpressionParenKeyword`)}C=E,D=!s.test(w[0]),yield{type:w[1]===`#`?`PrivateIdentifier`:`IdentifierName`,value:w[0]};continue}if(g.lastIndex=S,w=g.exec(e)){S=g.lastIndex,C=w[0],D=!0,yield{type:`StringLiteral`,value:w[0],closed:w[2]!==void 0};continue}if(f.lastIndex=S,w=f.exec(e)){S=f.lastIndex,C=w[0],D=!0,yield{type:`NumericLiteral`,value:w[0]};continue}if(_.lastIndex=S,w=_.exec(e)){S=_.lastIndex,C=w[0],w[1]==="${"?(C=`?InterpolationInTemplate`,k.push({tag:`InterpolationInTemplate`,nesting:b.length}),D=!1,yield{type:`TemplateHead`,value:w[0]}):(D=!0,yield{type:`NoSubstitutionTemplate`,value:w[0],closed:w[1]==="`"});continue}break;case`JSXTag`:case`JSXTagEnd`:if(i.lastIndex=S,w=i.exec(e)){switch(S=i.lastIndex,E=w[0],w[0]){case`<`:k.push({tag:`JSXTag`});break;case`>`:k.pop(),C===`/`||T.tag===`JSXTagEnd`?(E=`?JSX`,D=!0):k.push({tag:`JSXChildren`});break;case`{`:k.push({tag:`InterpolationInJSX`,nesting:b.length}),E=`?InterpolationInJSX`,D=!1;break;case`/`:C===`<`&&(k.pop(),k[k.length-1].tag===`JSXChildren`&&k.pop(),k.push({tag:`JSXTagEnd`}))}C=E,yield{type:`JSXPunctuator`,value:w[0]};continue}if(r.lastIndex=S,w=r.exec(e)){S=r.lastIndex,C=w[0],yield{type:`JSXIdentifier`,value:w[0]};continue}if(a.lastIndex=S,w=a.exec(e)){S=a.lastIndex,C=w[0],yield{type:`JSXString`,value:w[0],closed:w[2]!==void 0};continue}break;case`JSXChildren`:if(o.lastIndex=S,w=o.exec(e)){S=o.lastIndex,C=w[0],yield{type:`JSXText`,value:w[0]};continue}switch(e[S]){case`<`:k.push({tag:`JSXTag`}),S++,C=`<`,yield{type:`JSXPunctuator`,value:`<`};continue;case`{`:k.push({tag:`InterpolationInJSX`,nesting:b.length}),S++,C=`?InterpolationInJSX`,D=!1,yield{type:`JSXPunctuator`,value:`{`};continue}}if(ee.lastIndex=S,w=ee.exec(e)){S=ee.lastIndex,yield{type:`WhiteSpace`,value:w[0]};continue}if(l.lastIndex=S,w=l.exec(e)){S=l.lastIndex,D=!1,c.test(C)&&(C=`?NoLineTerminatorHere`),yield{type:`LineTerminatorSequence`,value:w[0]};continue}if(u.lastIndex=S,w=u.exec(e)){S=u.lastIndex,d.test(w[0])&&(D=!1,c.test(C)&&(C=`?NoLineTerminatorHere`)),yield{type:`MultiLineComment`,value:w[0],closed:w[1]!==void 0};continue}if(h.lastIndex=S,w=h.exec(e)){S=h.lastIndex,D=!1,yield{type:`SingleLineComment`,value:w[0]};continue}x=String.fromCodePoint(e.codePointAt(S)),S+=x.length,C=x,D=!1,yield{type:T.tag.startsWith(`JSX`)?`JSXInvalid`:`Invalid`,value:x}}}}),d={};s(d,{__debug:()=>Ya,check:()=>qa,doc:()=>oa,format:()=>Ka,formatWithCursor:()=>Ga,getSupportInfo:()=>Ja,util:()=>da,version:()=>ua});var f=(e,t)=>(n,r,...i)=>n|1&&r==null?void 0:(t.call(r)??r[e]).apply(r,i),p=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},m=f(`replaceAll`,function(){if(typeof this==`string`)return p}),h=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}},g=new class extends h{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function _(e,t,n){return g.diff(e,t,n)}var v=()=>{},y=`cr`,ee=`crlf`,b=`lf`,x=`\r`,te=`\r
3
+ `,S=`
4
+ `,C=S;function ne(e){let t=e.indexOf(x);return t===-1?b:e.charAt(t+1)===S?ee:y}function w(e){return e===y?x:e===ee?te:C}var T=/* @__PURE__ */ new Map([[S,/\n/gu],[x,/\r/gu],[te,/\r\n/gu]]);function re(e,t){let n=T.get(t);return e.match(n)?.length??0}var E=/\r\n?/gu;function ie(e){return m(0,e,E,S)}function D(e){return this[e<0?this.length+e:e]}var O=f(`at`,function(){if(Array.isArray(this)||typeof this==`string`)return D}),k=`string`,A=`array`,j=`cursor`,M=`indent`,N=`align`,P=`trim`,F=`group`,I=`fill`,L=`if-break`,R=`indent-if-break`,z=`line-suffix`,B=`line-suffix-boundary`,V=`line`,H=`label`,U=`break-parent`,ae=/* @__PURE__ */ new Set([j,M,N,P,F,I,L,R,z,B,V,H,U]);function oe(e){let t=e.length;for(;t>0&&(e[t-1]===`\r`||e[t-1]===`
5
+ `);)t--;return t<e.length?e.slice(0,t):e}function se(e){if(typeof e==`string`)return k;if(Array.isArray(e))return A;if(!e)return;let{type:t}=e;if(ae.has(t))return t}var ce=se,le=e=>new Intl.ListFormat(`en-US`,{type:`disjunction`}).format(e);function ue(e){let t=e===null?`null`:typeof e;if(t!==`string`&&t!==`object`)return`Unexpected doc '${t}',
6
+ Expected it to be 'string' or 'object'.`;if(ce(e))throw Error(`doc is valid.`);let n=Object.prototype.toString.call(e);if(n!==`[object Object]`)return`Unexpected doc '${n}'.`;let r=le([...ae].map(e=>`'${e}'`));return`Unexpected doc.type '${e.type}'.
7
+ Expected it to be ${r}.`}var de=class extends Error{name=`InvalidDocError`;constructor(e){super(ue(e)),this.doc=e}},fe={};function pe(e,t,n,r){let i=[e];for(;i.length>0;){let e=i.pop();if(e===fe){n(i.pop());continue}n&&i.push(e,fe);let a=ce(e);if(!a)throw new de(e);if(t?.(e)!==!1)switch(a){case A:case I:{let t=a===A?e:e.parts;for(let e=t.length-1;e>=0;--e)i.push(t[e]);break}case L:i.push(e.flatContents,e.breakContents);break;case F:if(r&&e.expandedStates)for(let t=e.expandedStates.length,n=t-1;n>=0;--n)i.push(e.expandedStates[n]);else i.push(e.contents);break;case N:case M:case R:case H:case z:i.push(e.contents);break;case k:case j:case P:case B:case V:case U:break;default:throw new de(e)}}}var me=pe;function he(e,t){if(typeof e==`string`)return t(e);let n=/* @__PURE__ */ new Map;return r(e);function r(e){if(n.has(e))return n.get(e);let t=i(e);return n.set(e,t),t}function i(e){switch(ce(e)){case A:return t(e.map(r));case I:return t({...e,parts:e.parts.map(r)});case L:return t({...e,breakContents:r(e.breakContents),flatContents:r(e.flatContents)});case F:{let{expandedStates:n,contents:i}=e;return n?(n=n.map(r),i=n[0]):i=r(i),t({...e,contents:i,expandedStates:n})}case N:case M:case R:case H:case z:return t({...e,contents:r(e.contents)});case k:case j:case P:case B:case V:case U:return t(e);default:throw new de(e)}}}function ge(e,t,n){let r=n,i=!1;function a(e){if(i)return!1;let n=t(e);n!==void 0&&(i=!0,r=n)}return me(e,a),r}function _e(e){if(e.type===F&&e.break||e.type===V&&e.hard||e.type===U)return!0}function ve(e){return ge(e,_e,!1)}function ye(e){if(e.length>0){let t=O(0,e,-1);!t.expandedStates&&!t.break&&(t.break=`propagated`)}return null}function be(e){let t=/* @__PURE__ */ new Set,n=[];function r(e){if(e.type===U&&ye(n),e.type===F){if(n.push(e),t.has(e))return!1;t.add(e)}}function i(e){e.type===F&&n.pop().break&&ye(n)}me(e,r,i,!0)}function xe(e){return e.type===V&&!e.hard?e.soft?``:` `:e.type===L?e.flatContents:e}function Se(e){return he(e,xe)}function Ce(e){for(e=[...e];e.length>=2&&O(0,e,-2).type===V&&O(0,e,-1).type===U;)e.length-=2;if(e.length>0){let t=we(O(0,e,-1));e[e.length-1]=t}return e}function we(e){switch(ce(e)){case M:case R:case F:case z:case H:{let t=we(e.contents);return{...e,contents:t}}case L:return{...e,breakContents:we(e.breakContents),flatContents:we(e.flatContents)};case I:return{...e,parts:Ce(e.parts)};case A:return Ce(e);case k:return oe(e);case N:case j:case P:case B:case V:case U:break;default:throw new de(e)}return e}function Te(e){return we(De(e))}function Ee(e){switch(ce(e)){case I:if(e.parts.every(e=>e===``))return``;break;case F:if(!e.contents&&!e.id&&!e.break&&!e.expandedStates)return``;if(e.contents.type===F&&e.contents.id===e.id&&e.contents.break===e.break&&e.contents.expandedStates===e.expandedStates)return e.contents;break;case N:case M:case R:case z:if(!e.contents)return``;break;case L:if(!e.flatContents&&!e.breakContents)return``;break;case A:{let t=[];for(let n of e){if(!n)continue;let[e,...r]=Array.isArray(n)?n:[n];typeof e==`string`&&typeof O(0,t,-1)==`string`?t[t.length-1]+=e:t.push(e),t.push(...r)}return t.length===0?``:t.length===1?t[0]:t}case k:case j:case P:case B:case V:case H:case U:break;default:throw new de(e)}return e}function De(e){return he(e,e=>Ee(e))}function Oe(e,t=$e){return he(e,e=>typeof e==`string`?qe(t,e.split(`
8
+ `)):e)}function ke(e){if(e.type===V)return!0}function Ae(e){return ge(e,ke,!1)}function je(e,t){return e.type===H?{...e,contents:t(e.contents)}:t(e)}var W=v,Me=v,Ne=v,Pe=v;function Fe(e){return W(e),{type:M,contents:e}}function Ie(e,t){return Pe(e),W(t),{type:N,contents:t,n:e}}function Le(e){return Ie(-1/0,e)}function Re(e){return Ie({type:`root`},e)}function ze(e){return Ie(-1,e)}function Be(e,t,n){W(e);let r=e;if(t>0){for(let e=0;e<Math.floor(t/n);++e)r=Fe(r);r=Ie(t%n,r),r=Ie(-1/0,r)}return r}var Ve={type:U},G={type:j};function He(e){return Ne(e),{type:I,parts:e}}function Ue(e,t={}){return W(e),Me(t.expandedStates,!0),{type:F,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function We(e,t){return Ue(e[0],{...t,expandedStates:e})}function Ge(e,t=``,n={}){return W(e),t!==``&&W(t),{type:L,breakContents:e,flatContents:t,groupId:n.groupId}}function Ke(e,t){return W(e),{type:R,contents:e,groupId:t.groupId,negate:t.negate}}function qe(e,t){W(e),Me(t);let n=[];for(let r=0;r<t.length;r++)r!==0&&n.push(e),n.push(t[r]);return n}function Je(e,t){return W(t),e?{type:H,label:e,contents:t}:t}var Ye={type:V},Xe={type:V,soft:!0},Ze={type:V,hard:!0},K=[Ze,Ve],Qe={type:V,hard:!0,literal:!0},$e=[Qe,Ve];function et(e){return W(e),{type:z,contents:e}}var tt={type:B},nt={type:P};function q(e){if(!e)return``;if(Array.isArray(e)){let t=[];for(let n of e)if(Array.isArray(n))t.push(...q(n));else{let e=q(n);e!==``&&t.push(e)}return t}return e.type===L?{...e,breakContents:q(e.breakContents),flatContents:q(e.flatContents)}:e.type===F?{...e,contents:q(e.contents),expandedStates:e.expandedStates?.map(q)}:e.type===I?{type:`fill`,parts:e.parts.map(q)}:e.contents?{...e,contents:q(e.contents)}:e}function rt(e){let t=Object.create(null),n=/* @__PURE__ */ new Set;return r(q(e));function r(e,t,n){if(typeof e==`string`)return JSON.stringify(e);if(Array.isArray(e)){let t=e.map(r).filter(Boolean);return t.length===1?t[0]:`[${t.join(`, `)}]`}if(e.type===V){let r=n?.[t+1]?.type===U;return e.literal?r?`literalline`:`literallineWithoutBreakParent`:e.hard?r?`hardline`:`hardlineWithoutBreakParent`:e.soft?`softline`:`line`}if(e.type===U)return n?.[t-1]?.type===V&&n[t-1].hard?void 0:`breakParent`;if(e.type===P)return`trim`;if(e.type===M)return`indent(`+r(e.contents)+`)`;if(e.type===N)return e.n===-1/0?`dedentToRoot(`+r(e.contents)+`)`:e.n<0?`dedent(`+r(e.contents)+`)`:e.n.type===`root`?`markAsRoot(`+r(e.contents)+`)`:`align(`+JSON.stringify(e.n)+`, `+r(e.contents)+`)`;if(e.type===L)return`ifBreak(`+r(e.breakContents)+(e.flatContents?`, `+r(e.flatContents):``)+(e.groupId?(e.flatContents?``:`, ""`)+`, { groupId: ${i(e.groupId)} }`:``)+`)`;if(e.type===R){let t=[];e.negate&&t.push(`negate: true`),e.groupId&&t.push(`groupId: ${i(e.groupId)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return`indentIfBreak(${r(e.contents)}${n})`}if(e.type===F){let t=[];e.break&&e.break!==`propagated`&&t.push(`shouldBreak: true`),e.id&&t.push(`id: ${i(e.id)}`);let n=t.length>0?`, { ${t.join(`, `)} }`:``;return e.expandedStates?`conditionalGroup([${e.expandedStates.map(e=>r(e)).join(`,`)}]${n})`:`group(${r(e.contents)}${n})`}if(e.type===I)return`fill([${e.parts.map(e=>r(e)).join(`, `)}])`;if(e.type===z)return`lineSuffix(`+r(e.contents)+`)`;if(e.type===B)return`lineSuffixBoundary`;if(e.type===H)return`label(${JSON.stringify(e.label)}, ${r(e.contents)})`;if(e.type===j)return`cursor`;throw Error(`Unknown doc type `+e.type)}function i(e){if(typeof e!=`symbol`)return JSON.stringify(String(e));if(e in t)return t[e];let r=e.description||`symbol`;for(let i=0;;i++){let a=r+(i>0?` #${i}`:``);if(!n.has(a))return n.add(a),t[e]=`Symbol.for(${JSON.stringify(a)})`}}}var it=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E-\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED8\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDD1D\uDEEF]\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE]|[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE]|\uDEEF\u200D\uD83D\uDC69\uD83C[\uDFFB-\uDFFE])))?))?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3C-\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE8A\uDE8E-\uDEC2\uDEC6\uDEC8\uDECD-\uDEDC\uDEDF-\uDEEA\uDEEF]|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC30\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3\uDE70]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF]|\uDEEF\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function at(e){return e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510}function ot(e){return e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9776&&e<=9783||e>=9800&&e<=9811||e===9855||e>=9866&&e<=9871||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12773||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e>=94192&&e<=94198||e>=94208&&e<=101589||e>=101631&&e<=101662||e>=101760&&e<=101874||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e>=119552&&e<=119638||e>=119648&&e<=119670||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128728||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129674||e>=129678&&e<=129734||e===129736||e>=129741&&e<=129756||e>=129759&&e<=129770||e>=129775&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141}var st=`©®‼⁉™ℹ↔↕↖↗↘↙↩↪⌨⏏⏱⏲⏸⏹⏺▪▫▶◀◻◼☀☁☂☃☄☎☑☘☝☠☢☣☦☪☮☯☸☹☺♀♂♟♠♣♥♦♨♻♾⚒⚔⚕⚖⚗⚙⚛⚜⚠⚧⚰⚱⛈⛏⛑⛓⛩⛱⛷⛸⛹✂✈✉✌✍✏✒✔✖✝✡✳✴❄❇❣❤➡⤴⤵⬅⬆⬇`,ct=/[^\x20-\x7F]/u,lt=new Set(st);function ut(e){if(!e)return 0;if(!ct.test(e))return e.length;e=e.replace(it(),e=>lt.has(e)?` `:` `);let t=0;for(let n of e){let e=n.codePointAt(0);e<=31||e>=127&&e<=159||e>=768&&e<=879||e>=65024&&e<=65039||(t+=at(e)||ot(e)?2:1)}return t}var dt=ut,ft={type:0},pt={type:1},mt={value:``,length:0,queue:[],get root(){return mt}};function ht(e,t,n){let r=t.type===1?e.queue.slice(0,-1):[...e.queue,t],i=``,a=0,o=0,s=0;for(let e of r)switch(e.type){case 0:u(),n.useTabs?c(1):l(n.tabWidth);break;case 3:{let{string:t}=e;u(),i+=t,a+=t.length;break}case 2:{let{width:t}=e;o+=1,s+=t;break}default:throw Error(`Unexpected indent comment '${e.type}'.`)}return f(),{...e,value:i,length:a,queue:r};function c(e){i+=` `.repeat(e),a+=n.tabWidth*e}function l(e){i+=` `.repeat(e),a+=e}function u(){n.useTabs?d():f()}function d(){o>0&&c(o),p()}function f(){s>0&&l(s),p()}function p(){o=0,s=0}}function gt(e,t,n){if(!t)return e;if(t.type===`root`)return{...e,root:e};if(t===-1/0)return e.root;let r;return r=typeof t==`number`?t<0?pt:{type:2,width:t}:{type:3,string:t},ht(e,r,n)}function _t(e,t){return ht(e,ft,t)}function vt(e){let t=0;for(let n=e.length-1;n>=0;n--){let r=e[n];if(r===` `||r===` `)t++;else break}return t}function yt(e){let t=vt(e);return{text:t===0?e:e.slice(0,e.length-t),count:t}}var J=Symbol(`MODE_BREAK`),Y=Symbol(`MODE_FLAT`),bt=Symbol(`DOC_FILL_PRINTED_LENGTH`);function xt(e,t,n,r,i,a){if(n===1/0)return!0;let o=t.length,s=!1,c=[e],l=``;for(;n>=0;){if(c.length===0){if(o===0)return!0;c.push(t[--o]);continue}let{mode:e,doc:u}=c.pop(),d=ce(u);switch(d){case k:u&&(s&&=(l+=` `,--n,!1),l+=u,n-=dt(u));break;case A:case I:{let t=d===A?u:u.parts,n=u[bt]??0;for(let r=t.length-1;r>=n;r--)c.push({mode:e,doc:t[r]});break}case M:case N:case R:case H:c.push({mode:e,doc:u.contents});break;case P:{let{text:e,count:t}=yt(l);l=e,n+=t;break}case F:{if(a&&u.break)return!1;let t=u.break?J:e,n=u.expandedStates&&t===J?O(0,u.expandedStates,-1):u.contents;c.push({mode:t,doc:n});break}case L:{let t=(u.groupId?i[u.groupId]||Y:e)===J?u.breakContents:u.flatContents;t&&c.push({mode:e,doc:t});break}case V:if(e===J||u.hard)return!0;u.soft||(s=!0);break;case z:r=!0;break;case B:if(r)return!1}}return!1}function St(e,t){let n=Object.create(null),r=t.printWidth,i=w(t.endOfLine),a=0,o=[{indent:mt,mode:J,doc:e}],s=``,c=!1,l=[],u=[],d=[],f=[],p=0;for(be(e);o.length>0;){let{indent:e,mode:d,doc:f}=o.pop();switch(ce(f)){case k:{let e=i===`
9
+ `?f:m(0,f,`
10
+ `,i);e&&(s+=e,o.length>0&&(a+=dt(e)));break}case A:for(let t=f.length-1;t>=0;t--)o.push({indent:e,mode:d,doc:f[t]});break;case j:if(u.length>=2)throw Error(`There are too many 'cursor' in doc.`);u.push(p+s.length);break;case M:o.push({indent:_t(e,t),mode:d,doc:f.contents});break;case N:o.push({indent:gt(e,f.n,t),mode:d,doc:f.contents});break;case P:v();break;case F:switch(d){case Y:if(!c){o.push({indent:e,mode:f.break?J:Y,doc:f.contents});break}case J:{c=!1;let t={indent:e,mode:Y,doc:f.contents},i=r-a,s=l.length>0;if(!f.break&&xt(t,o,i,s,n))o.push(t);else if(f.expandedStates){let t=O(0,f.expandedStates,-1);if(f.break){o.push({indent:e,mode:J,doc:t});break}for(let r=1;r<f.expandedStates.length+1;r++)if(r>=f.expandedStates.length){o.push({indent:e,mode:J,doc:t});break}else{let t={indent:e,mode:Y,doc:f.expandedStates[r]};if(xt(t,o,i,s,n)){o.push(t);break}}}else o.push({indent:e,mode:J,doc:f.contents});break}}f.id&&(n[f.id]=O(0,o,-1).mode);break;case I:{let t=r-a,i=f[bt]??0,{parts:s}=f,c=s.length-i;if(c===0)break;let u=s[i+0],p=s[i+1],m={indent:e,mode:Y,doc:u},h={indent:e,mode:J,doc:u},g=xt(m,[],t,l.length>0,n,!0);if(c===1){g?o.push(m):o.push(h);break}let _={indent:e,mode:Y,doc:p},v={indent:e,mode:J,doc:p};if(c===2){g?o.push(_,m):o.push(v,h);break}let y=s[i+2],ee={indent:e,mode:d,doc:{...f,[bt]:i+2}},b=xt({indent:e,mode:Y,doc:[u,p,y]},[],t,l.length>0,n,!0);o.push(ee),b?o.push(_,m):g?o.push(v,m):o.push(v,h);break}case L:case R:{let t=f.groupId?n[f.groupId]:d;if(t===J){let t=f.type===L?f.breakContents:f.negate?f.contents:Fe(f.contents);t&&o.push({indent:e,mode:d,doc:t})}if(t===Y){let t=f.type===L?f.flatContents:f.negate?Fe(f.contents):f.contents;t&&o.push({indent:e,mode:d,doc:t})}break}case z:l.push({indent:e,mode:d,doc:f.contents});break;case B:l.length>0&&o.push({indent:e,mode:d,doc:Ze});break;case V:switch(d){case Y:if(f.hard)c=!0;else{f.soft||(s+=` `,a+=1);break}case J:if(l.length>0){o.push({indent:e,mode:d,doc:f},...l.reverse()),l.length=0;break}f.literal?(s+=i,a=0,e.root&&(e.root.value&&(s+=e.root.value),a=e.root.length)):(v(),s+=i+e.value,a=e.length)}break;case H:o.push({indent:e,mode:d,doc:f.contents});break;case U:break;default:throw new de(f)}o.length===0&&l.length>0&&(o.push(...l.reverse()),l.length=0)}let h=d.join(``)+s,g=[...f,...u];if(g.length!==2)return{formatted:h};let _=g[0];return{formatted:h,cursorNodeStart:_,cursorNodeText:h.slice(_,O(0,g,-1))};function v(){let{text:e,count:t}=yt(s);e&&(d.push(e),p+=e.length),s=``,a-=t,u.length>0&&(f.push(...u.map(e=>Math.min(e,p))),u.length=0)}}function Ct(e,t,n=0){let r=0;for(let i=n;i<e.length;++i)e[i]===` `?r=r+t-r%t:r++;return r}var wt=Ct,Tt=class{constructor(e){this.stack=[e]}get key(){let{stack:e,siblings:t}=this;return O(0,e,t===null?-2:-4)??null}get index(){return this.siblings===null?null:O(0,this.stack,-2)}get node(){return O(0,this.stack,-1)}get parent(){return this.getNode(1)}get grandparent(){return this.getNode(2)}get isInArray(){return this.siblings!==null}get siblings(){let{stack:e}=this,t=O(0,e,-3);return Array.isArray(t)?t:null}get next(){let{siblings:e}=this;return e===null?null:e[this.index+1]}get previous(){let{siblings:e}=this;return e===null?null:e[this.index-1]}get isFirst(){return this.index===0}get isLast(){let{siblings:e,index:t}=this;return e!==null&&t===e.length-1}get isRoot(){return this.stack.length===1}get root(){return this.stack[0]}get ancestors(){return[...this.#t()]}getName(){let{stack:e}=this,{length:t}=e;return t>1?O(0,e,-2):null}getValue(){return O(0,this.stack,-1)}getNode(e=0){let t=this.#e(e);return t===-1?null:this.stack[t]}getParentNode(e=0){return this.getNode(e+1)}#e(e){let{stack:t}=this;for(let n=t.length-1;n>=0;n-=2)if(!Array.isArray(t[n])&&--e<0)return n;return-1}call(e,...t){let{stack:n}=this,{length:r}=n,i=O(0,n,-1);for(let e of t)i=i?.[e],n.push(e,i);try{return e(this)}finally{n.length=r}}callParent(e,t=0){let n=this.#e(t+1),r=this.stack.splice(n+1);try{return e(this)}finally{this.stack.push(...r)}}each(e,...t){let{stack:n}=this,{length:r}=n,i=O(0,n,-1);for(let e of t)i=i[e],n.push(e,i);try{for(let t=0;t<i.length;++t)n.push(t,i[t]),e(this,t,i),n.length-=2}finally{n.length=r}}map(e,...t){let n=[];return this.each((t,r,i)=>{n[r]=e(t,r,i)},...t),n}match(...e){let t=this.stack.length-1,n=null,r=this.stack[t--];for(let i of e){if(r===void 0)return!1;let e=null;if(typeof n==`number`&&(e=n,n=this.stack[t--],r=this.stack[t--]),i&&!i(r,n,e))return!1;n=this.stack[t--],r=this.stack[t--]}return!0}findAncestor(e){for(let t of this.#t())if(e(t))return t}hasAncestor(e){for(let t of this.#t())if(e(t))return!0;return!1}*#t(){let{stack:e}=this;for(let t=e.length-3;t>=0;t-=2){let n=e[t];Array.isArray(n)||(yield n)}}};function Et(e){return typeof e==`object`&&!!e}var Dt=Et;function Ot(e){return(t,n,r)=>{let i=!!r?.backwards;if(n===!1)return!1;let{length:a}=t,o=n;for(;o>=0&&o<a;){let n=t.charAt(o);if(e instanceof RegExp){if(!e.test(n))return o}else if(!e.includes(n))return o;i?o--:o++}return o===-1||o===a?o:!1}}var kt=Ot(/\s/u),X=Ot(` `),At=Ot(`,; `),jt=Ot(/[^\n\r]/u),Mt=e=>e===`
11
+ `||e===`\r`||e===`\u2028`||e===`\u2029`;function Nt(e,t,n){let r=!!n?.backwards;if(t===!1)return!1;let i=e.charAt(t);if(r){if(e.charAt(t-1)===`\r`&&i===`
12
+ `)return t-2;if(Mt(i))return t-1}else{if(i===`\r`&&e.charAt(t+1)===`
13
+ `)return t+2;if(Mt(i))return t+1}return t}var Pt=Nt;function Ft(e,t,n={}){let r=X(e,n.backwards?t-1:t,n);return r!==Pt(e,r,n)}var Z=Ft;function It(e){return Array.isArray(e)&&e.length>0}var Lt=It;function*Rt(e,t){let{getVisitorKeys:n,filter:r=()=>!0}=t,i=e=>Dt(e)&&r(e);for(let t of n(e)){let n=e[t];if(Array.isArray(n))for(let e of n)i(e)&&(yield e);else i(n)&&(yield n)}}function*zt(e,t){let n=[e];for(let e=0;e<n.length;e++){let r=n[e];for(let e of Rt(r,t))yield e,n.push(e)}}function Bt(e,t){return Rt(e,t).next().done}function Vt(e,t,n){let{cache:r}=n;if(r.has(e))return r.get(e);let{filter:i}=n;if(!i)return[];let a,o=(n.getChildren?.(e,n)??[...Rt(e,{getVisitorKeys:n.getVisitorKeys})]).flatMap(r=>(a??=[e,...t],i(r,a)?[r]:Vt(r,a,n))),{locStart:s,locEnd:c}=n;return o.sort((e,t)=>s(e)-s(t)||c(e)-c(t)),r.set(e,o),o}var Ht=Vt;function Ut(e){let t=e.type||e.kind||`(unknown type)`,n=String(e.name||e.id&&(typeof e.id==`object`?e.id.name:e.id)||e.key&&(typeof e.key==`object`?e.key.name:e.key)||e.value&&(typeof e.value==`object`?``:String(e.value))||e.operator||``);return n.length>20&&(n=n.slice(0,19)+`…`),t+(n?` `+n:``)}function Wt(e,t){(e.comments??=[]).push(t),t.printed=!1,t.nodeDescription=Ut(e)}function Gt(e,t){t.leading=!0,t.trailing=!1,Wt(e,t)}function Kt(e,t,n){t.leading=!1,t.trailing=!1,n&&(t.marker=n),Wt(e,t)}function qt(e,t){t.leading=!1,t.trailing=!0,Wt(e,t)}var Jt=/* @__PURE__ */ new WeakMap;function Yt(e,t,n,r,i=[]){let{locStart:a,locEnd:o}=n,s=a(t),c=o(t),l=Ht(e,i,{cache:Jt,locStart:a,locEnd:o,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes}),u,d,f=0,p=l.length;for(;f<p;){let e=f+p>>1,r=l[e],m=a(r),h=o(r);if(m<=s&&c<=h)return Yt(r,t,n,r,[r,...i]);if(h<=s){u=r,f=e+1;continue}if(c<=m){d=r,p=e;continue}throw Error(`Comment location overlaps with node location`)}if(r?.type===`TemplateLiteral`){let{quasis:e}=r,i=nn(e,t,n);u&&nn(e,u,n)!==i&&(u=null),d&&nn(e,d,n)!==i&&(d=null)}return{enclosingNode:r,precedingNode:u,followingNode:d}}var Xt=()=>!1;function Zt(e,t){let{comments:n}=e;if(delete e.comments,!Lt(n)||!t.printer.canAttachComment)return;let r=[],{printer:{features:{experimental_avoidAstMutation:i},handleComments:a={}},originalText:o}=t,{ownLine:s=Xt,endOfLine:c=Xt,remaining:l=Xt}=a,u=n.map((r,i)=>({...Yt(e,r,t),comment:r,text:o,options:t,ast:e,isLastComment:n.length-1===i}));for(let[e,t]of u.entries()){let{comment:n,precedingNode:a,enclosingNode:o,followingNode:d,text:f,options:p,ast:m,isLastComment:h}=t,g;if(i?g=[t]:(n.enclosingNode=o,n.precedingNode=a,n.followingNode=d,g=[n,f,p,m,h]),$t(f,p,u,e))n.placement=`ownLine`,s(...g)||(d?Gt(d,n):a?qt(a,n):Kt(o||m,n));else if(en(f,p,u,e))n.placement=`endOfLine`,c(...g)||(a?qt(a,n):d?Gt(d,n):Kt(o||m,n));else if(n.placement=`remaining`,!l(...g)){if(a&&d){let e=r.length;e>0&&r[e-1].followingNode!==d&&tn(r,p),r.push(t)}else a?qt(a,n):d?Gt(d,n):Kt(o||m,n)}}if(tn(r,t),!i)for(let e of n)delete e.precedingNode,delete e.enclosingNode,delete e.followingNode}var Qt=e=>!/[\S\n\u2028\u2029]/u.test(e);function $t(e,t,n,r){let{comment:i,precedingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=o(i);if(a)for(let t=r-1;t>=0;t--){let{comment:r,precedingNode:i}=n[t];if(i!==a||!Qt(e.slice(s(r),c)))break;c=o(r)}return Z(e,c,{backwards:!0})}function en(e,t,n,r){let{comment:i,followingNode:a}=n[r],{locStart:o,locEnd:s}=t,c=s(i);if(a)for(let t=r+1;t<n.length;t++){let{comment:r,followingNode:i}=n[t];if(i!==a||!Qt(e.slice(c,o(r))))break;c=s(r)}return Z(e,c)}function tn(e,t){let n=e.length;if(n===0)return;let{precedingNode:r,followingNode:i}=e[0],a=t.locStart(i),o;for(o=n;o>0;--o){let{comment:n,precedingNode:r,followingNode:i}=e[o-1],s=t.originalText.slice(t.locEnd(n),a);if(t.printer.isGap?.(s,t)??/^[\s(]*$/u.test(s))a=t.locStart(n);else break}for(let[t,{comment:n}]of e.entries())t<o?qt(r,n):Gt(i,n);for(let e of[r,i])e.comments&&e.comments.length>1&&e.comments.sort((e,n)=>t.locStart(e)-t.locStart(n));e.length=0}function nn(e,t,n){let r=n.locStart(t)-1;for(let t=1;t<e.length;++t)if(r<n.locStart(e[t]))return t-1;return 0}function rn(e,t){let n=t-1;n=X(e,n,{backwards:!0}),n=Pt(e,n,{backwards:!0}),n=X(e,n,{backwards:!0});let r=Pt(e,n,{backwards:!0});return n!==r}var an=rn;function on(e,t){let n=e.node;return n.printed=!0,t.printer.printComment(e,t)}function sn(e,t){let n=e.node,r=[on(e,t)],{printer:i,originalText:a,locStart:o,locEnd:s}=t;if(i.isBlockComment?.(n)){let e=Z(a,s(n))?Z(a,o(n),{backwards:!0})?K:Ye:` `;r.push(e)}else r.push(K);let c=Pt(a,X(a,s(n)));return c!==!1&&Z(a,c)&&r.push(K),r}function cn(e,t,n){let r=e.node,i=on(e,t),{printer:a,originalText:o,locStart:s}=t,c=a.isBlockComment?.(r);return n?.hasLineSuffix&&!n?.isBlock||Z(o,s(r),{backwards:!0})?{doc:et([K,an(o,s(r))?K:``,i]),isBlock:c,hasLineSuffix:!0}:!c||n?.hasLineSuffix?{doc:[et([` `,i]),Ve],isBlock:c,hasLineSuffix:!0}:{doc:[` `,i],isBlock:c,hasLineSuffix:!1}}function ln(e,t){let n=e.node;if(!n)return{};let r=t[Symbol.for(`printedComments`)];if((n.comments||[]).filter(e=>!r.has(e)).length===0)return{leading:``,trailing:``};let i=[],a=[],o;return e.each(()=>{let n=e.node;if(r?.has(n))return;let{leading:s,trailing:c}=n;s?i.push(sn(e,t)):c&&(o=cn(e,t,o),a.push(o.doc))},`comments`),{leading:i,trailing:a}}function un(e,t,n){let{leading:r,trailing:i}=ln(e,n);return!r&&!i?t:je(t,e=>[r,e,i])}function dn(e){let{[Symbol.for(`comments`)]:t,[Symbol.for(`printedComments`)]:n}=e;for(let e of t){if(!e.printed&&!n.has(e))throw Error(`Comment "`+e.value.trim()+`" was not printed. Please report this error!`);delete e.printed}}var fn=()=>v,pn=class extends Error{name=`ConfigError`},mn=class extends Error{name=`UndefinedParserError`},hn={checkIgnorePragma:{category:`Special`,type:`boolean`,default:!1,description:`Check whether the file's first docblock comment contains '@noprettier' or '@noformat' to determine if it should be formatted.`,cliCategory:`Other`},cursorOffset:{category:`Special`,type:`int`,default:-1,range:{start:-1,end:1/0,step:1},description:`Print (to stderr) where a cursor at the given position would move to after formatting.`,cliCategory:`Editor`},endOfLine:{category:`Global`,type:`choice`,default:`lf`,description:`Which end of line characters to apply.`,choices:[{value:`lf`,description:`Line Feed only (\\n), common on Linux and macOS as well as inside git repos`},{value:`crlf`,description:`Carriage Return + Line Feed characters (\\r\\n), common on Windows`},{value:`cr`,description:`Carriage Return character only (\\r), used very rarely`},{value:`auto`,description:`Maintain existing
14
+ (mixed values within one file are normalised by looking at what's used after the first line)`}]},filepath:{category:`Special`,type:`path`,description:`Specify the input filepath. This will be used to do parser inference.`,cliName:`stdin-filepath`,cliCategory:`Other`,cliDescription:`Path to the file to pretend that stdin comes from.`},insertPragma:{category:`Special`,type:`boolean`,default:!1,description:`Insert @format pragma into file's first docblock comment.`,cliCategory:`Other`},parser:{category:`Global`,type:`choice`,default:void 0,description:`Which parser to use.`,exception:e=>typeof e==`string`||typeof e==`function`,choices:[{value:`flow`,description:`Flow`},{value:`babel`,description:`JavaScript`},{value:`babel-flow`,description:`Flow`},{value:`babel-ts`,description:`TypeScript`},{value:`typescript`,description:`TypeScript`},{value:`acorn`,description:`JavaScript`},{value:`espree`,description:`JavaScript`},{value:`meriyah`,description:`JavaScript`},{value:`css`,description:`CSS`},{value:`less`,description:`Less`},{value:`scss`,description:`SCSS`},{value:`json`,description:`JSON`},{value:`json5`,description:`JSON5`},{value:`jsonc`,description:`JSON with Comments`},{value:`json-stringify`,description:`JSON.stringify`},{value:`graphql`,description:`GraphQL`},{value:`markdown`,description:`Markdown`},{value:`mdx`,description:`MDX`},{value:`vue`,description:`Vue`},{value:`yaml`,description:`YAML`},{value:`glimmer`,description:`Ember / Handlebars`},{value:`html`,description:`HTML`},{value:`angular`,description:`Angular`},{value:`lwc`,description:`Lightning Web Components`},{value:`mjml`,description:`MJML`}]},plugins:{type:`path`,array:!0,default:[{value:[]}],category:`Global`,description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>typeof e==`string`||typeof e==`object`,cliName:`plugin`,cliCategory:`Config`},printWidth:{category:`Global`,type:`int`,default:80,description:`The line length where Prettier will try wrap.`,range:{start:0,end:1/0,step:1}},rangeEnd:{category:`Special`,type:`int`,default:1/0,range:{start:0,end:1/0,step:1},description:`Format code ending at a given character offset (exclusive).
15
+ The range will extend forwards to the end of the selected statement.`,cliCategory:`Editor`},rangeStart:{category:`Special`,type:`int`,default:0,range:{start:0,end:1/0,step:1},description:`Format code starting at a given character offset.
16
+ The range will extend backwards to the start of the first line containing the selected statement.`,cliCategory:`Editor`},requirePragma:{category:`Special`,type:`boolean`,default:!1,description:`Require either '@prettier' or '@format' to be present in the file's first docblock comment in order for it to be formatted.`,cliCategory:`Other`},tabWidth:{type:`int`,category:`Global`,default:2,description:`Number of spaces per indentation level.`,range:{start:0,end:1/0,step:1}},useTabs:{category:`Global`,type:`boolean`,default:!1,description:`Indent with tabs instead of spaces.`},embeddedLanguageFormatting:{category:`Global`,type:`choice`,default:`auto`,description:`Control how Prettier formats quoted code embedded in the file.`,choices:[{value:`auto`,description:`Format embedded code if Prettier can automatically identify it.`},{value:`off`,description:`Never automatically format embedded code.`}]}};function gn({plugins:e=[],showDeprecated:t=!1}={}){let n=e.flatMap(e=>e.languages??[]),r=[];for(let i of vn(Object.assign({},...e.map(({options:e})=>e),hn)))!t&&i.deprecated||(Array.isArray(i.choices)&&(t||(i.choices=i.choices.filter(e=>!e.deprecated)),i.name===`parser`&&(i.choices=[...i.choices,..._n(i.choices,n,e)])),i.pluginDefaults=Object.fromEntries(e.filter(e=>e.defaultOptions?.[i.name]!==void 0).map(e=>[e.name,e.defaultOptions[i.name]])),r.push(i));return{languages:n,options:r}}function*_n(e,t,n){let r=new Set(e.map(e=>e.value));for(let e of t)if(e.parsers){for(let t of e.parsers)if(!r.has(t)){r.add(t);let i=n.find(e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t)),a=e.name;i?.name&&(a+=` (plugin: ${i.name})`),yield{value:t,description:a}}}}function vn(e){let t=[];for(let[n,r]of Object.entries(e)){let e={name:n,...r};Array.isArray(e.default)&&(e.default=O(0,e.default,-1).value),t.push(e)}return t}var yn=Array.prototype.toReversed??function(){return[...this].reverse()},bn=f(`toReversed`,function(){if(Array.isArray(this))return yn});function xn(){let e=globalThis,t=e.Deno?.build?.os;return typeof t==`string`?t===`windows`:e.navigator?.platform?.startsWith(`Win`)??e.process?.platform?.startsWith(`win`)??!1}var Sn=xn();function Cn(e){if(e=e instanceof URL?e:new URL(e),e.protocol!==`file:`)throw TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function wn(e){return e=Cn(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,`%25`))}function Tn(e){e=Cn(e);let t=decodeURIComponent(e.pathname.replace(/\//g,`\\`).replace(/%(?![0-9A-Fa-f]{2})/g,`%25`)).replace(/^\\*([A-Za-z]:)(\\|$)/,`$1\\`);return e.hostname!==``&&(t=`\\\\${e.hostname}${t}`),t}function En(e){return Sn?Tn(e):wn(e)}var Dn=e=>String(e).split(/[/\\]/u).pop(),On=e=>String(e).startsWith(`file:`);function kn(e,t){if(!t)return;let n=Dn(t).toLowerCase();return e.find(({filenames:e})=>e?.some(e=>e.toLowerCase()===n))??e.find(({extensions:e})=>e?.some(e=>n.endsWith(e)))}function An(e,t){if(t)return e.find(({name:e})=>e.toLowerCase()===t)??e.find(({aliases:e})=>e?.includes(t))??e.find(({extensions:e})=>e?.includes(`.${t}`))}var jn=void 0;function Mn(e,t){if(t){if(On(t))try{t=En(t)}catch{return}if(typeof t==`string`)return e.find(({isSupported:e})=>e?.({filepath:t}))}}function Nn(e,t){let n=bn(0,e.plugins).flatMap(e=>e.languages??[]);return(An(n,t.language)??kn(n,t.physicalFile)??kn(n,t.file)??Mn(n,t.physicalFile)??Mn(n,t.file)??jn?.(n,t.physicalFile))?.parsers[0]}var Pn=Nn,Fn={key:e=>/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(e)?e:JSON.stringify(e),value(e){if(typeof e!=`object`||!e)return JSON.stringify(e);if(Array.isArray(e))return`[${e.map(e=>Fn.value(e)).join(`, `)}]`;let t=Object.keys(e);return t.length===0?`{}`:`{ ${t.map(t=>`${Fn.key(t)}: ${Fn.value(e[t])}`).join(`, `)} }`},pair:({key:e,value:t})=>Fn.value({[e]:t})},In=new Proxy(String,{get:()=>In}),Q=In,Ln=()=>In,Rn=(e,t,{descriptor:n})=>{let r=[`${Q.yellow(typeof e==`string`?n.key(e):n.pair(e))} is deprecated`];return t&&r.push(`we now treat it as ${Q.blue(typeof t==`string`?n.key(t):n.pair(t))}`),r.join(`; `)+`.`},zn=Symbol.for(`vnopts.VALUE_NOT_EXIST`),Bn=Symbol.for(`vnopts.VALUE_UNCHANGED`),Vn=` `.repeat(2),Hn=(e,t,n)=>{let{text:r,list:i}=n.normalizeExpectedResult(n.schemas[e].expected(n)),a=[];return r&&a.push(Un(e,t,r,n.descriptor)),i&&a.push([Un(e,t,i.title,n.descriptor)].concat(i.values.map(e=>Wn(e,n.loggerPrintWidth))).join(`
17
+ `)),Gn(a,n.loggerPrintWidth)};function Un(e,t,n,r){return[`Invalid ${Q.red(r.key(e))} value.`,`Expected ${Q.blue(n)},`,`but received ${t===zn?Q.gray(`nothing`):Q.red(r.value(t))}.`].join(` `)}function Wn({text:e,list:t},n){let r=[];return e&&r.push(`- ${Q.blue(e)}`),t&&r.push([`- ${Q.blue(t.title)}:`].concat(t.values.map(e=>Wn(e,n-Vn.length).replace(/^|\n/g,`$&${Vn}`))).join(`
18
+ `)),Gn(r,n)}function Gn(e,t){if(e.length===1)return e[0];let[n,r]=e,[i,a]=e.map(e=>e.split(`
19
+ `,1)[0].length);return i>t&&i>a?r:n}var Kn=[],qn=[];function Jn(e,t,n){if(e===t)return 0;let r=n?.maxDistance,i=e;e.length>t.length&&(e=t,t=i);let a=e.length,o=t.length;for(;a>0&&e.charCodeAt(~-a)===t.charCodeAt(~-o);)a--,o--;let s=0;for(;s<a&&e.charCodeAt(s)===t.charCodeAt(s);)s++;if(a-=s,o-=s,r!==void 0&&o-a>r)return r;if(a===0)return r!==void 0&&o>r?r:o;let c,l,u,d,f=0,p=0;for(;f<a;)qn[f]=e.charCodeAt(s+f),Kn[f]=++f;for(;p<o;){for(c=t.charCodeAt(s+p),u=p++,l=p,f=0;f<a;f++)d=c===qn[f]?u:u+1,u=Kn[f],l=Kn[f]=u>l?d>l?l+1:d:d>u?u+1:d;if(r!==void 0){let e=l;for(f=0;f<a;f++)Kn[f]<e&&(e=Kn[f]);if(e>r)return r}}return Kn.length=a,qn.length=a,r!==void 0&&l>r?r:l}function Yn(e,t,n){if(!Array.isArray(t)||t.length===0)return;let r=n?.maxDistance,i=e.length;for(let n of t)if(n===e)return n;if(r===0)return;let a,o=1/0,s=/* @__PURE__ */ new Set;for(let n of t){if(s.has(n))continue;s.add(n);let t=Math.abs(n.length-i);if(t>=o||r!==void 0&&t>r)continue;let c=Number.isFinite(o)?r===void 0?o:Math.min(o,r):r,l=c===void 0?Jn(e,n):Jn(e,n,{maxDistance:c});if(r!==void 0&&l>r)continue;let u=l;if(c!==void 0&&l===c&&c===r&&(u=Jn(e,n)),u<o&&(o=u,a=n,o===0))break}if(!(r!==void 0&&o>r))return a}var Xn=(e,t,{descriptor:n,logger:r,schemas:i})=>{let a=[`Ignored unknown option ${Q.yellow(n.pair({key:e,value:t}))}.`],o=Yn(e,Object.keys(i),{maxDistance:3});o&&a.push(`Did you mean ${Q.blue(n.key(o))}?`),r.warn(a.join(` `))},Zn=[`default`,`expected`,`validate`,`deprecated`,`forward`,`redirect`,`overlap`,`preprocess`,`postprocess`];function Qn(e,t){let n=new e(t),r=Object.create(n);for(let e of Zn)e in t&&(r[e]=$n(t[e],n,$.prototype[e].length));return r}var $=class{static create(e){return Qn(this,e)}constructor(e){this.name=e.name}default(e){}expected(e){return`nothing`}validate(e,t){return!1}deprecated(e,t){return!1}forward(e,t){}redirect(e,t){}overlap(e,t,n){return e}preprocess(e,t){return e}postprocess(e,t){return Bn}};function $n(e,t,n){return typeof e==`function`?(...r)=>e(...r.slice(0,n-1),t,...r.slice(n-1)):()=>e}var er=class extends ${constructor(e){super(e),this._sourceName=e.sourceName}expected(e){return e.schemas[this._sourceName].expected(e)}validate(e,t){return t.schemas[this._sourceName].validate(e,t)}redirect(e,t){return this._sourceName}},tr=class extends ${expected(){return`anything`}validate(){return!0}},nr=class extends ${constructor({valueSchema:e,name:t=e.name,...n}){super({...n,name:t}),this._valueSchema=e}expected(e){let{text:t,list:n}=e.normalizeExpectedResult(this._valueSchema.expected(e));return{text:t&&`an array of ${t}`,list:n&&{title:`an array of the following values`,values:[{list:n}]}}}validate(e,t){if(!Array.isArray(e))return!1;let n=[];for(let r of e){let e=t.normalizeValidateResult(this._valueSchema.validate(r,t),r);e!==!0&&n.push(e.value)}return n.length===0||{value:n}}deprecated(e,t){let n=[];for(let r of e){let e=t.normalizeDeprecatedResult(this._valueSchema.deprecated(r,t),r);e!==!1&&n.push(...e.map(({value:e})=>({value:[e]})))}return n}forward(e,t){let n=[];for(let r of e){let e=t.normalizeForwardResult(this._valueSchema.forward(r,t),r);n.push(...e.map(rr))}return n}redirect(e,t){let n=[],r=[];for(let i of e){let e=t.normalizeRedirectResult(this._valueSchema.redirect(i,t),i);`remain`in e&&n.push(e.remain),r.push(...e.redirect.map(rr))}return n.length===0?{redirect:r}:{redirect:r,remain:n}}overlap(e,t){return e.concat(t)}};function rr({from:e,to:t}){return{from:[e],to:t}}var ir=class extends ${expected(){return`true or false`}validate(e){return typeof e==`boolean`}};function ar(e,t){let n=Object.create(null);for(let r of e){let e=r[t];if(n[e])throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n[e]=r}return n}function or(e,t){let n=/* @__PURE__ */ new Map;for(let r of e){let e=r[t];if(n.has(e))throw Error(`Duplicate ${t} ${JSON.stringify(e)}`);n.set(e,r)}return n}function sr(){let e=Object.create(null);return t=>{let n=JSON.stringify(t);return e[n]?!0:(e[n]=!0,!1)}}function cr(e,t){let n=[],r=[];for(let i of e)t(i)?n.push(i):r.push(i);return[n,r]}function lr(e){return e===Math.floor(e)}function ur(e,t){if(e===t)return 0;let n=typeof e,r=typeof t,i=[`undefined`,`object`,`boolean`,`number`,`string`];return n===r?n===`string`?e.localeCompare(t):Number(e)-Number(t):i.indexOf(n)-i.indexOf(r)}function dr(e){return(...t)=>{let n=e(...t);return typeof n==`string`?Error(n):n}}function fr(e){return e===void 0?{}:e}function pr(e){if(typeof e==`string`)return{text:e};let{text:t,list:n}=e;return yr((t||n)!==void 0,"Unexpected `expected` result, there should be at least one field."),n?{text:t,list:{title:n.title,values:n.values.map(pr)}}:{text:t}}function mr(e,t){return e===!0?!0:e===!1?{value:t}:e}function hr(e,t,n=!1){return e===!1?!1:e===!0?n?!0:[{value:t}]:`value`in e?[e]:e.length!==0&&e}function gr(e,t){return typeof e==`string`||`key`in e?{from:t,to:e}:`from`in e?{from:e.from,to:e.to}:{from:t,to:e.to}}function _r(e,t){return e===void 0?[]:Array.isArray(e)?e.map(e=>gr(e,t)):[gr(e,t)]}function vr(e,t){let n=_r(typeof e==`object`&&`redirect`in e?e.redirect:e,t);return n.length===0?{remain:t,redirect:n}:typeof e==`object`&&`remain`in e?{remain:e.remain,redirect:n}:{redirect:n}}function yr(e,t){if(!e)throw Error(t)}var br=class extends ${constructor(e){super(e),this._choices=or(e.choices.map(e=>e&&typeof e==`object`?e:{value:e}),`value`)}expected({descriptor:e}){let t=Array.from(this._choices.keys()).map(e=>this._choices.get(e)).filter(({hidden:e})=>!e).map(e=>e.value).sort(ur).map(e.value),n=t.slice(0,-2),r=t.slice(-2);return{text:n.concat(r.join(` or `)).join(`, `),list:{title:`one of the following values`,values:t}}}validate(e){return this._choices.has(e)}deprecated(e){let t=this._choices.get(e);return t&&t.deprecated?{value:e}:!1}forward(e){let t=this._choices.get(e);return t?t.forward:void 0}redirect(e){let t=this._choices.get(e);return t?t.redirect:void 0}},xr=class extends ${expected(){return`a number`}validate(e,t){return typeof e==`number`}},Sr=class extends xr{expected(){return`an integer`}validate(e,t){return t.normalizeValidateResult(super.validate(e,t),e)===!0&&lr(e)}},Cr=class extends ${expected(){return`a string`}validate(e){return typeof e==`string`}},wr=Fn,Tr=Xn,Er=Hn,Dr=Rn,Or=class{constructor(e,t){let{logger:n=console,loggerPrintWidth:r=80,descriptor:i=wr,unknown:a=Tr,invalid:o=Er,deprecated:s=Dr,missing:c=()=>!1,required:l=()=>!1,preprocess:u=e=>e,postprocess:d=()=>Bn}=t||{};this._utils={descriptor:i,logger:n||{warn:()=>{}},loggerPrintWidth:r,schemas:ar(e,`name`),normalizeDefaultResult:fr,normalizeExpectedResult:pr,normalizeDeprecatedResult:hr,normalizeForwardResult:_r,normalizeRedirectResult:vr,normalizeValidateResult:mr},this._unknownHandler=a,this._invalidHandler=dr(o),this._deprecatedHandler=s,this._identifyMissing=(e,t)=>!(e in t)||c(e,t),this._identifyRequired=l,this._preprocess=u,this._postprocess=d,this.cleanHistory()}cleanHistory(){this._hasDeprecationWarned=sr()}normalize(e){let t={},n=[this._preprocess(e,this._utils)],r=()=>{for(;n.length!==0;){let e=n.shift(),r=this._applyNormalization(e,t);n.push(...r)}};r();for(let e of Object.keys(this._utils.schemas)){let r=this._utils.schemas[e];if(!(e in t)){let t=fr(r.default(this._utils));`value`in t&&n.push({[e]:t.value})}}r();for(let e of Object.keys(this._utils.schemas)){if(!(e in t))continue;let n=this._utils.schemas[e],r=t[e],i=n.postprocess(r,this._utils);i!==Bn&&(this._applyValidation(i,e,n),t[e]=i)}return this._applyPostprocess(t),this._applyRequiredCheck(t),t}_applyNormalization(e,t){let n=[],{knownKeys:r,unknownKeys:i}=this._partitionOptionKeys(e);for(let i of r){let r=this._utils.schemas[i],a=r.preprocess(e[i],this._utils);this._applyValidation(a,i,r);let o=({from:e,to:t})=>{n.push(typeof t==`string`?{[t]:e}:{[t.key]:t.value})},s=({value:e,redirectTo:t})=>{let n=hr(r.deprecated(e,this._utils),a,!0);if(n!==!1){if(n===!0)this._hasDeprecationWarned(i)||this._utils.logger.warn(this._deprecatedHandler(i,t,this._utils));else for(let{value:e}of n){let n={key:i,value:e};if(!this._hasDeprecationWarned(n)){let r=typeof t==`string`?{key:t,value:e}:t;this._utils.logger.warn(this._deprecatedHandler(n,r,this._utils))}}}};_r(r.forward(a,this._utils),a).forEach(o);let c=vr(r.redirect(a,this._utils),a);if(c.redirect.forEach(o),`remain`in c){let e=c.remain;t[i]=i in t?r.overlap(t[i],e,this._utils):e,s({value:e})}for(let{from:e,to:t}of c.redirect)s({value:e,redirectTo:t})}for(let r of i){let i=e[r];this._applyUnknownHandler(r,i,t,(e,t)=>{n.push({[e]:t})})}return n}_applyRequiredCheck(e){for(let t of Object.keys(this._utils.schemas))if(this._identifyMissing(t,e)&&this._identifyRequired(t))throw this._invalidHandler(t,zn,this._utils)}_partitionOptionKeys(e){let[t,n]=cr(Object.keys(e).filter(t=>!this._identifyMissing(t,e)),e=>e in this._utils.schemas);return{knownKeys:t,unknownKeys:n}}_applyValidation(e,t,n){let r=mr(n.validate(e,this._utils),e);if(r!==!0)throw this._invalidHandler(t,r.value,this._utils)}_applyUnknownHandler(e,t,n,r){let i=this._unknownHandler(e,t,this._utils);if(i)for(let e of Object.keys(i)){if(this._identifyMissing(e,i))continue;let t=i[e];e in this._utils.schemas?r(e,t):n[e]=t}}_applyPostprocess(e){let t=this._postprocess(e,this._utils);if(t!==Bn){if(t.delete)for(let n of t.delete)delete e[n];if(t.override){let{knownKeys:n,unknownKeys:r}=this._partitionOptionKeys(t.override);for(let r of n){let n=t.override[r];this._applyValidation(n,r,this._utils.schemas[r]),e[r]=n}for(let n of r){let r=t.override[n];this._applyUnknownHandler(n,r,e,(t,n)=>{let r=this._utils.schemas[t];this._applyValidation(n,t,r),e[t]=n})}}}}},kr;function Ar(e,t,{logger:n=!1,isCLI:r=!1,passThrough:i=!1,FlagSchema:a,descriptor:o}={}){if(r){if(!a)throw Error(`'FlagSchema' option is required.`);if(!o)throw Error(`'descriptor' option is required.`)}else o=Fn;let s=i?Array.isArray(i)?(e,t)=>i.includes(e)?{[e]:t}:void 0:(e,t)=>({[e]:t}):(e,t,n)=>{let{_:r,...i}=n.schemas;return Xn(e,t,{...n,schemas:i})},c=new Or(jr(t,{isCLI:r,FlagSchema:a}),{logger:n,unknown:s,descriptor:o}),l=n!==!1;l&&kr&&(c._hasDeprecationWarned=kr);let u=c.normalize(e);return l&&(kr=c._hasDeprecationWarned),u}function jr(e,{isCLI:t,FlagSchema:n}){let r=[];t&&r.push(tr.create({name:`_`}));for(let i of e)r.push(Mr(i,{isCLI:t,optionInfos:e,FlagSchema:n})),i.alias&&t&&r.push(er.create({name:i.alias,sourceName:i.name}));return r}function Mr(e,{isCLI:t,optionInfos:n,FlagSchema:r}){let{name:i}=e,a={name:i},o,s={};switch(e.type){case`int`:o=Sr,t&&(a.preprocess=Number);break;case`string`:o=Cr;break;case`choice`:o=br,a.choices=e.choices.map(t=>t?.redirect?{...t,redirect:{to:{key:e.name,value:t.redirect}}}:t);break;case`boolean`:o=ir;break;case`flag`:o=r,a.flags=n.flatMap(e=>[e.alias,e.description&&e.name,e.oppositeDescription&&`no-${e.name}`].filter(Boolean));break;case`path`:o=Cr;break;default:throw Error(`Unexpected type ${e.type}`)}if(a.validate=e.exception?(t,n,r)=>e.exception(t)||n.validate(t,r):(e,t,n)=>e===void 0||t.validate(e,n),e.redirect&&(s.redirect=t=>t?{to:typeof e.redirect==`string`?e.redirect:{key:e.redirect.option,value:e.redirect.value}}:void 0),e.deprecated&&(s.deprecated=!0),t&&!e.array){let e=a.preprocess||(e=>e);a.preprocess=(t,n,r)=>n.preprocess(e(Array.isArray(t)?O(0,t,-1):t),r)}return e.array?nr.create({...t?{preprocess:e=>Array.isArray(e)?e:[e]}:{},...s,valueSchema:o.create(a)}):o.create({...a,...s})}var Nr=Ar,Pr=Array.prototype.findLast??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return n}},Fr=f(`findLast`,function(){if(Array.isArray(this))return Pr}),Ir=Symbol.for(`PRETTIER_IS_FRONT_MATTER`),Lr=[];function Rr(e){return!!e?.[Ir]}var zr=Rr,Br=/* @__PURE__ */ new Set([`yaml`,`toml`]),Vr=({node:e})=>zr(e)&&Br.has(e.language);async function Hr(e,t,n,r){let{node:i}=n,{language:a}=i;if(!Br.has(a))return;let o=i.value.trim(),s;if(o){let t=a===`yaml`?a:Pn(r,{language:a});if(!t)return;s=o?await e(o,{parser:t}):``}else s=o;return Re([i.startDelimiter,i.explicitLanguage??``,K,s,s?K:``,i.endDelimiter])}function Ur(e,t){return Vr({node:e})&&(delete t.end,delete t.raw,delete t.value),t}var Wr=Ur;function Gr({node:e}){return e.raw}var Kr=Gr,qr=/* @__PURE__ */ new Set([`tokens`,`comments`,`parent`,`enclosingNode`,`precedingNode`,`followingNode`]),Jr=e=>Object.keys(e).filter(e=>!qr.has(e));function Yr(e,t){let n=e?t=>e(t,qr):Jr;return t?new Proxy(n,{apply:(e,t,n)=>zr(n[0])?Lr:Reflect.apply(e,t,n)}):n}var Xr=Yr;function Zr(e,t){if(!t)throw Error(`parserName is required.`);let n=Fr(0,e,e=>e.parsers&&Object.prototype.hasOwnProperty.call(e.parsers,t));if(n)return n;let r=`Couldn't resolve parser "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new pn(r)}function Qr(e,t){if(!t)throw Error(`astFormat is required.`);let n=Fr(0,e,e=>e.printers&&Object.prototype.hasOwnProperty.call(e.printers,t));if(n)return n;let r=`Couldn't find plugin for AST format "${t}".`;throw r+=` Plugins must be explicitly added to the standalone bundle.`,new pn(r)}function $r({plugins:e,parser:t}){return ei(Zr(e,t),t)}function ei(e,t){let n=e.parsers[t];return typeof n==`function`?n():n}async function ti(e,t){let n=e.printers[t];return ri(typeof n==`function`?await n():n)}var ni=/* @__PURE__ */ new WeakMap;function ri(e){if(ni.has(e))return ni.get(e);let{features:t,getVisitorKeys:n,embed:r,massageAstNode:i,print:a,...o}=e;t=oi(t);let s=t.experimental_frontMatterSupport;n=Xr(n,s.massageAstNode||s.embed||s.print);let c=i;i&&s.massageAstNode&&(c=new Proxy(i,{apply(e,t,n){return Wr(...n),Reflect.apply(e,t,n)}}));let l=r;if(r){let e;l=new Proxy(r,{get(t,i,a){return i===`getVisitorKeys`?(e??=r.getVisitorKeys?Xr(r.getVisitorKeys,s.massageAstNode||s.embed):n,e):Reflect.get(t,i,a)},apply:(e,t,n)=>s.embed&&Vr(...n)?Hr:Reflect.apply(e,t,n)})}let u=a;s.print&&(u=new Proxy(a,{apply(e,t,n){let[r]=n;return zr(r.node)?Kr(r):Reflect.apply(e,t,n)}}));let d={features:t,getVisitorKeys:n,embed:l,massageAstNode:c,print:u,...o};return ni.set(e,d),d}var ii=Object.fromEntries([`clean`,`embed`,`print`].map(e=>[e,!1]));function ai(e){return{...ii,...e}}function oi(e){return{experimental_avoidAstMutation:!1,...e,experimental_frontMatterSupport:ai(e?.experimental_frontMatterSupport)}}var si={astFormat:`estree`,printer:{},originalText:void 0,locStart:null,locEnd:null,getVisitorKeys:null};async function ci(e,t={}){let n={...e};if(!n.parser){if(n.filepath){if(n.parser=Pn(n,{physicalFile:n.filepath}),!n.parser)throw new mn(`No parser could be inferred for file "${n.filepath}".`)}else throw new mn(`No parser and no file path given, couldn't infer a parser.`)}let r=gn({plugins:e.plugins,showDeprecated:!0}).options,i={...si,...Object.fromEntries(r.filter(e=>e.default!==void 0).map(e=>[e.name,e.default]))},a=Zr(n.plugins,n.parser),o=await ei(a,n.parser);n.astFormat=o.astFormat,n.locEnd=o.locEnd,n.locStart=o.locStart;let s=a.printers?.[o.astFormat]?a:Qr(n.plugins,o.astFormat),c=await ti(s,o.astFormat);n.printer=c,n.getVisitorKeys=c.getVisitorKeys;let l=s.defaultOptions?Object.fromEntries(Object.entries(s.defaultOptions).filter(([,e])=>e!==void 0)):{},u={...i,...l};for(let[e,t]of Object.entries(u))(n[e]===null||n[e]===void 0)&&(n[e]=t);return n.parser===`json`&&(n.trailingComma=`none`),Nr(n,r,{passThrough:Object.keys(si),...t})}var li=ci;l(u(),1);var ui=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,di=`·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`;RegExp(`[`+ui+`]`),RegExp(`[`+ui+di+`]`),ui=di=null;var fi={keyword:/* @__PURE__ */ `break.case.catch.continue.debugger.default.do.else.finally.for.function.if.return.switch.throw.try.var.const.while.with.new.this.super.class.extends.export.import.null.true.false.in.instanceof.typeof.void.delete`.split(`.`),strict:[`implements`,`interface`,`let`,`package`,`private`,`protected`,`public`,`static`,`yield`],strictBind:[`eval`,`arguments`]};new Set(fi.keyword),new Set(fi.strict),new Set(fi.strictBind);var pi=(e,t)=>n=>e(t(n));function mi(e){return{keyword:e.cyan,capitalized:e.yellow,jsxIdentifier:e.yellow,punctuator:e.yellow,number:e.magenta,string:e.green,regex:e.magenta,comment:e.gray,invalid:pi(pi(e.white,e.bgRed),e.bold),gutter:e.gray,marker:pi(e.red,e.bold),message:pi(e.red,e.bold),reset:e.reset}}mi(Ln(!0)),mi(Ln(!1));function hi(){return new Proxy({},{get:()=>e=>e})}var gi=/\r\n|[\n\r\u2028\u2029]/;function _i(e,t,n){let r=Object.assign({column:0,line:-1},e.start),i=Object.assign({},r,e.end),{linesAbove:a=2,linesBelow:o=3}=n||{},s=r.line,c=r.column,l=i.line,u=i.column,d=Math.max(s-(a+1),0),f=Math.min(t.length,l+o);s===-1&&(d=0),l===-1&&(f=t.length);let p=l-s,m={};if(p)for(let e=0;e<=p;e++){let n=e+s;m[n]=c?e===0?[c,t[n-1].length-c+1]:e===p?[0,u]:[0,t[n-e].length]:!0}else m[s]=c===u?!c||[c,0]:[c,u-c];return{start:d,end:f,markerLines:m}}function vi(e,t,n={}){let r=hi(!1),{start:i,end:a,markerLines:o}=_i(t,e.split(gi),n),s=t.start&&typeof t.start.column==`number`,c=String(a).length,l=e.split(gi,a).slice(i,a).map((e,t)=>{let a=i+1+t,s=` ${` ${a}`.slice(-c)} |`,l=o[a],u=!o[a+1];if(l){let t=``;if(Array.isArray(l)){let i=e.slice(0,Math.max(l[0]-1,0)).replace(/[^\t]/g,` `),a=l[1]||1;t=[`
20
+ `,r.gutter(s.replace(/\d/g,` `)),` `,i,r.marker(`^`).repeat(a)].join(``),u&&n.message&&(t+=` `+r.message(n.message))}return[r.marker(`>`),r.gutter(s),e.length>0?` ${e}`:``,t].join(``)}return` ${r.gutter(s)}${e.length>0?` ${e}`:``}`}).join(`
21
+ `);return n.message&&!s&&(l=`${` `.repeat(c+1)}${n.message}
22
+ ${l}`),l}async function yi(e,t){let n=await $r(t),r=n.preprocess?await n.preprocess(e,t):e;t.originalText=r;let i;try{i=await n.parse(r,t,t)}catch(t){bi(t,e)}return{text:r,ast:i}}function bi(e,t){let{loc:n}=e;if(n){let r=vi(t,n,{highlightCode:!0});throw e.message+=`
23
+ `+r,e.codeFrame=r,e}throw e}var xi=yi;async function Si(e,t,n,r,i){if(n.embeddedLanguageFormatting!==`auto`)return;let{printer:a}=n,{embed:o}=a;if(!o)return;if(o.length>2)throw Error(`printer.embed has too many parameters. The API changed in Prettier v3. Please update your plugin. See https://prettier.io/docs/plugins#optional-embed`);let{hasPrettierIgnore:s}=a,{getVisitorKeys:c}=o,l=[];f();let u=e.stack;for(let{print:r,node:a,pathStack:o}of l)try{e.stack=o;let s=await r(d,t,e,n);s&&i.set(a,s)}catch(e){if(globalThis.PRETTIER_DEBUG)throw e}e.stack=u;function d(e,t){return Ci(e,t,n,r)}function f(){let{node:t}=e;if(typeof t!=`object`||!t||s?.(e))return;for(let n of c(t))Array.isArray(t[n])?e.each(f,n):e.call(f,n);let r=o(e,n);if(r){if(typeof r==`function`){l.push({print:r,node:t,pathStack:[...e.stack]});return}i.set(t,r)}}}async function Ci(e,t,n,r){let i=await li({...n,...t,parentParser:n.parser,originalText:e,cursorOffset:void 0,rangeStart:void 0,rangeEnd:void 0},{passThrough:!0}),{ast:a}=await xi(e,i);return Te(await r(a,i))}function wi(e,t,n,r){let{originalText:i,[Symbol.for(`comments`)]:a,locStart:o,locEnd:s,[Symbol.for(`printedComments`)]:c}=t,{node:l}=e,u=o(l),d=s(l);for(let e of a)o(e)>=u&&s(e)<=d&&c.add(e);let{printPrettierIgnored:f}=t.printer;return f?f(e,t,n,r):i.slice(u,d)}var Ti=wi;async function Ei(e,t){({ast:e}=await Oi(e,t));let n=/* @__PURE__ */ new Map,r=new Tt(e),i=fn(t),a=/* @__PURE__ */ new Map;await Si(r,s,t,Ei,a);let o=await Di(r,t,s,void 0,a);if(dn(t),t.cursorOffset>=0){if(t.nodeAfterCursor&&!t.nodeBeforeCursor)return[G,o];if(t.nodeBeforeCursor&&!t.nodeAfterCursor)return[o,G]}return o;function s(e,t){return e===void 0||e===r?c(t):Array.isArray(e)?r.call(()=>c(t),...e):r.call(()=>c(t),e)}function c(e){i(r);let o=r.node;if(o==null)return``;let c=Dt(o)&&e===void 0;if(c&&n.has(o))return n.get(o);let l=Di(r,t,s,e,a);return c&&n.set(o,l),l}}function Di(e,t,n,r,i){let{node:a}=e,{printer:o}=t,s;switch(s=o.hasPrettierIgnore?.(e)?Ti(e,t,n,r):i.has(a)?i.get(a):o.print(e,t,n,r),a){case t.cursorNode:s=je(s,e=>[G,e,G]);break;case t.nodeBeforeCursor:s=je(s,e=>[e,G]);break;case t.nodeAfterCursor:s=je(s,e=>[G,e])}return o.printComment&&!o.willPrintOwnComments?.(e,t)&&(s=un(e,s,t)),s}async function Oi(e,t){let n=e.comments??[];t[Symbol.for(`comments`)]=n,t[Symbol.for(`printedComments`)]=/* @__PURE__ */ new Set,Zt(e,t);let{printer:{preprocess:r}}=t;return e=r?await r(e,t):e,{ast:e,comments:n}}function ki(e,t){let{cursorOffset:n,locStart:r,locEnd:i,getVisitorKeys:a}=t,o=e=>r(e)<=n&&i(e)>=n,s=e,c=[e];for(let t of zt(e,{getVisitorKeys:a,filter:o}))c.push(t),s=t;if(Bt(s,{getVisitorKeys:a}))return{cursorNode:s};let l,u,d=-1,f=1/0;for(;c.length>0&&(l===void 0||u===void 0);){s=c.pop();let e=l!==void 0,t=u!==void 0;for(let o of Rt(s,{getVisitorKeys:a})){if(!e){let e=i(o);e<=n&&e>d&&(l=o,d=e)}if(!t){let e=r(o);e>=n&&e<f&&(u=o,f=e)}}}return{nodeBeforeCursor:l,nodeAfterCursor:u}}var Ai=ki;function ji(e,t){let{printer:n}=t,r=n.massageAstNode;if(!r)return e;let{getVisitorKeys:i}=n,{ignoredProperties:a}=r;return o(e);function o(e,t){if(!Dt(e))return e;if(Array.isArray(e))return e.map(e=>o(e,t)).filter(Boolean);let n={},s=new Set(i(e));for(let t in e)!Object.prototype.hasOwnProperty.call(e,t)||a?.has(t)||(n[t]=s.has(t)?o(e[t],e):e[t]);let c=r(e,n,t);if(c!==null)return c??n}}var Mi=ji,Ni=Array.prototype.findLastIndex??function(e){for(let t=this.length-1;t>=0;t--){let n=this[t];if(e(n,t,this))return t}return-1},Pi=f(`findLastIndex`,function(){if(Array.isArray(this))return Ni}),Fi=({parser:e})=>e===`json`||e===`json5`||e===`jsonc`||e===`json-stringify`;function Ii(e,t){return t=new Set(t),e.find(e=>Vi.has(e.type)&&t.has(e))}function Li(e){let t=Pi(0,e,e=>e.type!==`Program`&&e.type!==`File`);return t===-1?e:e.slice(0,t+1)}function Ri(e,t,{locStart:n,locEnd:r}){let[i,...a]=e,[o,...s]=t;if(i===o)return[i,o];let c=n(i);for(let e of Li(s))if(n(e)>=c)o=e;else break;let l=r(o);for(let e of Li(a)){if(r(e)<=l)i=e;else break;if(i===o)break}return[i,o]}function zi(e,t,n,r,i=[],a){let{locStart:o,locEnd:s}=n,c=o(e),l=s(e);if(t>l||t<c||a===`rangeEnd`&&t===c||a===`rangeStart`&&t===l)return;let u=[e,...i],d=Ht(e,u,{cache:Jt,locStart:o,locEnd:s,getVisitorKeys:n.getVisitorKeys,filter:n.printer.canAttachComment,getChildren:n.printer.getCommentChildNodes});for(let e of d){let i=zi(e,t,n,r,u,a);if(i)return i}if(r(e,i[0]))return u}function Bi(e,t){return t!==`DeclareExportDeclaration`&&e!==`TypeParameterDeclaration`&&(e===`Directive`||e===`TypeAlias`||e===`TSExportAssignment`||e.startsWith(`Declare`)||e.startsWith(`TSDeclare`)||e.endsWith(`Statement`)||e.endsWith(`Declaration`))}var Vi=/* @__PURE__ */ new Set([`JsonRoot`,`ObjectExpression`,`ArrayExpression`,`StringLiteral`,`NumericLiteral`,`BooleanLiteral`,`NullLiteral`,`UnaryExpression`,`TemplateLiteral`]),Hi=/* @__PURE__ */ new Set([`OperationDefinition`,`FragmentDefinition`,`VariableDefinition`,`TypeExtensionDefinition`,`ObjectTypeDefinition`,`FieldDefinition`,`DirectiveDefinition`,`EnumTypeDefinition`,`EnumValueDefinition`,`InputValueDefinition`,`InputObjectTypeDefinition`,`SchemaDefinition`,`OperationTypeDefinition`,`InterfaceTypeDefinition`,`UnionTypeDefinition`,`ScalarTypeDefinition`]);function Ui(e,t,n){if(!t)return!1;switch(e.parser){case`flow`:case`hermes`:case`babel`:case`babel-flow`:case`babel-ts`:case`typescript`:case`acorn`:case`espree`:case`meriyah`:case`oxc`:case`oxc-ts`:case`__babel_estree`:return Bi(t.type,n?.type);case`json`:case`json5`:case`jsonc`:case`json-stringify`:return Vi.has(t.type);case`graphql`:return Hi.has(t.kind);case`vue`:return t.tag!==`root`}return!1}function Wi(e,t,n){let{rangeStart:r,rangeEnd:i,locStart:a,locEnd:o}=t,s=e.slice(r,i).search(/\S/u),c=s===-1;if(!c)for(r+=s;i>r&&!/\S/u.test(e[i-1]);--i);let l=zi(n,r,t,(e,n)=>Ui(t,e,n),[],`rangeStart`);if(!l)return;let u=c?l:zi(n,i,t,e=>Ui(t,e),[],`rangeEnd`);if(!u)return;let d,f;if(Fi(t)){let e=Ii(l,u);d=e,f=e}else[d,f]=Ri(l,u,t);return[Math.min(a(d),a(f)),Math.max(o(d),o(f))]}var Gi=``,Ki=Symbol(`cursor`);async function qi(e,t,n=0){if(!e||e.trim().length===0)return{formatted:``,cursorOffset:-1,comments:[]};let{ast:r,text:i}=await xi(e,t);t.cursorOffset>=0&&(t={...t,...Ai(r,t)});let a=await Ei(r,t,n);n>0&&(a=Be([K,a],n,t.tabWidth));let o=St(a,t);if(n>0){let e=o.formatted.trim();o.cursorNodeStart!==void 0&&(o.cursorNodeStart-=o.formatted.indexOf(e),o.cursorNodeStart<0&&(o.cursorNodeStart=0,o.cursorNodeText=o.cursorNodeText.trimStart()),o.cursorNodeStart+o.cursorNodeText.length>e.length&&(o.cursorNodeText=o.cursorNodeText.trimEnd())),o.formatted=e+w(t.endOfLine)}let s=t[Symbol.for(`comments`)];if(t.cursorOffset>=0){let e,n,r,a;if((t.cursorNode||t.nodeBeforeCursor||t.nodeAfterCursor)&&o.cursorNodeText){if(r=o.cursorNodeStart,a=o.cursorNodeText,t.cursorNode)e=t.locStart(t.cursorNode),n=i.slice(e,t.locEnd(t.cursorNode));else{if(!t.nodeBeforeCursor&&!t.nodeAfterCursor)throw Error(`Cursor location must contain at least one of cursorNode, nodeBeforeCursor, nodeAfterCursor`);e=t.nodeBeforeCursor?t.locEnd(t.nodeBeforeCursor):0;let r=t.nodeAfterCursor?t.locStart(t.nodeAfterCursor):i.length;n=i.slice(e,r)}}else e=0,n=i,r=0,a=o.formatted;let c=t.cursorOffset-e;if(n===a)return{formatted:o.formatted,cursorOffset:r+c,comments:s};let l=n.split(``);l.splice(c,0,Ki);let u=_(l,a.split(``)),d=r;for(let e of u)if(e.removed){if(e.value.includes(Ki))break}else d+=e.count;return{formatted:o.formatted,cursorOffset:d,comments:s}}return{formatted:o.formatted,cursorOffset:-1,comments:s}}async function Ji(e,t){let{ast:n,text:r}=await xi(e,t),[i,a]=Wi(r,t,n)??[0,0],o=r.slice(i,a),s=Math.min(i,r.lastIndexOf(`
24
+ `,i)+1),c=r.slice(s,i).match(/^\s*/u)[0],l=wt(c,t.tabWidth),u=await qi(o,{...t,rangeStart:0,rangeEnd:1/0,cursorOffset:t.cursorOffset>i&&t.cursorOffset<=a?t.cursorOffset-i:-1,endOfLine:`lf`},l),d=u.formatted.trimEnd(),{cursorOffset:f}=t;f>a?f+=d.length-o.length:u.cursorOffset>=0&&(f=u.cursorOffset+i);let p=r.slice(0,i)+d+r.slice(a);if(t.endOfLine!==`lf`){let e=w(t.endOfLine);f>=0&&e===`\r
25
+ `&&(f+=re(p.slice(0,f),`
26
+ `)),p=m(0,p,`
27
+ `,e)}return{formatted:p,cursorOffset:f,comments:u.comments}}function Yi(e,t,n){return typeof t!=`number`||Number.isNaN(t)||t<0||t>e.length?n:t}function Xi(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i}=t;return n=Yi(e,n,-1),r=Yi(e,r,0),i=Yi(e,i,e.length),{...t,cursorOffset:n,rangeStart:r,rangeEnd:i}}function Zi(e,t){let{cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a}=Xi(e,t),o=e.charAt(0)===Gi;if(o&&(e=e.slice(1),n--,r--,i--),a===`auto`&&(a=ne(e)),e.includes(`\r`)){let t=t=>re(e.slice(0,Math.max(t,0)),`\r
28
+ `);n-=t(n),r-=t(r),i-=t(i),e=ie(e)}return{hasBOM:o,text:e,options:Xi(e,{...t,cursorOffset:n,rangeStart:r,rangeEnd:i,endOfLine:a})}}async function Qi(e,t){let n=await $r(t);return!n.hasPragma||n.hasPragma(e)}async function $i(e,t){return(await $r(t)).hasIgnorePragma?.(e)}async function ea(e,t){let{hasBOM:n,text:r,options:i}=Zi(e,await li(t));if(i.rangeStart>=i.rangeEnd&&r!==``||i.requirePragma&&!await Qi(r,i)||i.checkIgnorePragma&&await $i(r,i))return{formatted:e,cursorOffset:t.cursorOffset,comments:[]};let a;return i.rangeStart>0||i.rangeEnd<r.length?a=await Ji(r,i):(!i.requirePragma&&i.insertPragma&&i.printer.insertPragma&&!await Qi(r,i)&&(r=i.printer.insertPragma(r)),a=await qi(r,i)),n&&(a.formatted=Gi+a.formatted,a.cursorOffset>=0&&a.cursorOffset++),a}async function ta(e,t,n){let{text:r,options:i}=Zi(e,await li(t)),a=await xi(r,i);return n&&(n.preprocessForPrint&&(a.ast=await Oi(a.ast,i)),n.massage&&(a.ast=Mi(a.ast,i))),a}async function na(e,t){return t=await li(t),St(await Ei(e,t),t)}async function ra(e,t){let{formatted:n}=await ea(rt(e),{...t,parser:`__js_expression`});return n}async function ia(e,t){t=await li(t);let{ast:n}=await xi(e,t);return t.cursorOffset>=0&&(t={...t,...Ai(n,t)}),Ei(n,t)}async function aa(e,t){return St(e,await li(t))}var oa={};s(oa,{builders:()=>sa,printer:()=>ca,utils:()=>la});var sa={join:qe,line:Ye,softline:Xe,hardline:K,literalline:$e,group:Ue,conditionalGroup:We,fill:He,lineSuffix:et,lineSuffixBoundary:tt,cursor:G,breakParent:Ve,ifBreak:Ge,trim:nt,indent:Fe,indentIfBreak:Ke,align:Ie,addAlignmentToDoc:Be,markAsRoot:Re,dedentToRoot:Le,dedent:ze,hardlineWithoutBreakParent:Ze,literallineWithoutBreakParent:Qe,label:Je,concat:e=>e},ca={printDocToString:St},la={willBreak:ve,traverseDoc:me,findInDoc:ge,mapDoc:he,removeLines:Se,stripTrailingHardline:Te,replaceEndOfLine:Oe,canBreak:Ae},ua=`3.8.3`,da={};s(da,{addDanglingComment:()=>Kt,addLeadingComment:()=>Gt,addTrailingComment:()=>qt,getAlignmentSize:()=>wt,getIndentSize:()=>xa,getMaxContinuousCount:()=>wa,getNextNonSpaceNonCommentCharacter:()=>Ea,getNextNonSpaceNonCommentCharacterIndex:()=>Ra,getPreferredQuote:()=>Ma,getStringWidth:()=>dt,hasNewline:()=>Z,hasNewlineInRange:()=>Pa,hasSpaces:()=>Ia,isNextLineEmpty:()=>Ua,isNextLineEmptyAfterIndex:()=>ya,isPreviousLineEmpty:()=>Ba,makeString:()=>Ha,skip:()=>Ot,skipEverythingButNewLine:()=>jt,skipInlineComment:()=>pa,skipNewline:()=>Pt,skipSpaces:()=>X,skipToLineEnd:()=>At,skipTrailingComment:()=>ha,skipWhitespace:()=>kt});function fa(e,t){if(t===!1)return!1;if(e.charAt(t)===`/`&&e.charAt(t+1)===`*`){for(let n=t+2;n<e.length;++n)if(e.charAt(n)===`*`&&e.charAt(n+1)===`/`)return n+2}return t}var pa=fa;function ma(e,t){return t===!1?!1:e.charAt(t)===`/`&&e.charAt(t+1)===`/`?jt(e,t):t}var ha=ma;function ga(e,t){let n=null,r=t;for(;r!==n;)n=r,r=X(e,r),r=pa(e,r),r=ha(e,r),r=Pt(e,r);return r}var _a=ga;function va(e,t){let n=null,r=t;for(;r!==n;)n=r,r=At(e,r),r=pa(e,r),r=X(e,r);return r=ha(e,r),r=Pt(e,r),r!==!1&&Z(e,r)}var ya=va;function ba(e,t){let n=e.lastIndexOf(`
29
+ `);return n===-1?0:wt(e.slice(n+1).match(/^[\t ]*/u)[0],t)}var xa=ba;function Sa(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Ca(e,t){let n=e.matchAll(RegExp(`(?:${Sa(t)})+`,`gu`));return n.reduce||(n=[...n]),n.reduce((e,[t])=>Math.max(e,t.length),0)/t.length}var wa=Ca;function Ta(e,t){let n=_a(e,t);return n===!1?``:e.charAt(n)}var Ea=Ta,Da=Object.freeze({character:`'`,codePoint:39}),Oa=Object.freeze({character:`"`,codePoint:34}),ka=Object.freeze({preferred:Da,alternate:Oa}),Aa=Object.freeze({preferred:Oa,alternate:Da});function ja(e,t){let{preferred:n,alternate:r}=t===!0||t===`'`?ka:Aa,{length:i}=e,a=0,o=0;for(let t=0;t<i;t++){let i=e.charCodeAt(t);i===n.codePoint?a++:i===r.codePoint&&o++}return(a>o?r:n).character}var Ma=ja;function Na(e,t,n){for(let r=t;r<n;++r)if(e.charAt(r)===`
30
+ `)return!0;return!1}var Pa=Na;function Fa(e,t,n={}){return X(e,n.backwards?t-1:t,n)!==t}var Ia=Fa;function La(e,t,n){return _a(e,n(t))}function Ra(e,t){return arguments.length===2||typeof t==`number`?_a(e,t):La(...arguments)}function za(e,t,n){return an(e,n(t))}function Ba(e,t){return arguments.length===2||typeof t==`number`?an(e,t):za(...arguments)}function Va(e,t,n){return ya(e,n(t))}function Ha(e,t,n){let r=t===`"`?`'`:`"`;return t+m(0,e,/\\(.)|(["'])/gsu,(e,i,a)=>i===r?i:a===t?`\\`+a:a||(n&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/u.test(i)?i:`\\`+i))+t}function Ua(e,t){return arguments.length===2||typeof t==`number`?ya(e,t):Va(...arguments)}function Wa(e,t=1){return async(...n)=>{let r=n[t]??{},i=r.plugins??[];return n[t]={...r,plugins:Array.isArray(i)?i:Object.values(i)},e(...n)}}var Ga=Wa(ea);async function Ka(e,t){let{formatted:n}=await Ga(e,{...t,cursorOffset:-1});return n}async function qa(e,t){return await Ka(e,t)===e}var Ja=Wa(gn,0),Ya={parse:Wa(ta),formatAST:Wa(na),formatDoc:Wa(ra),printToDoc:Wa(ia),printDocToString:Wa(aa)};export{Ya as __debug,qa as check,d as default,oa as doc,Ka as format,Ga as formatWithCursor,Ja as getSupportInfo,da as util,ua as version};
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ import{d as e,f as t,g as n,h as r,l as i,m as a,n as o,t as s,u as c,v as l}from"./limit-io-DqzENcBM.mjs";var u=class e extends l{constructor(e){super(),this.typeUrl=``,this.value=/* @__PURE__ */ new Uint8Array,r.util.initPartial(e,this)}toJson(e){if(this.typeUrl===``)return{};let t=this.typeUrlToName(this.typeUrl),n=(e?.typeRegistry)?.findMessage(t);if(!n)throw Error(`cannot encode message google.protobuf.Any to JSON: "${this.typeUrl}" is not in the type registry`);let r=n.fromBinary(this.value).toJson(e);return(t.startsWith(`google.protobuf.`)||r===null||Array.isArray(r)||typeof r!=`object`)&&(r={value:r}),r[`@type`]=this.typeUrl,r}fromJson(e,t){if(e===null||Array.isArray(e)||typeof e!=`object`)throw Error(`cannot decode message google.protobuf.Any from JSON: expected object but got ${e===null?`null`:Array.isArray(e)?`array`:typeof e}`);if(Object.keys(e).length==0)return this;let n=e[`@type`];if(typeof n!=`string`||n==``)throw Error(`cannot decode message google.protobuf.Any from JSON: "@type" is empty`);let r=this.typeUrlToName(n),i=(t?.typeRegistry)?.findMessage(r);if(!i)throw Error(`cannot decode message google.protobuf.Any from JSON: ${n} is not in the type registry`);let a;if(r.startsWith(`google.protobuf.`)&&Object.prototype.hasOwnProperty.call(e,`value`))a=i.fromJson(e.value,t);else{let n=Object.assign({},e);delete n[`@type`],a=i.fromJson(n,t)}return this.packFrom(a),this}packFrom(e){this.value=e.toBinary(),this.typeUrl=this.typeNameToUrl(e.getType().typeName)}unpackTo(e){return this.is(e.getType())?(e.fromBinary(this.value),!0):!1}unpack(e){if(this.typeUrl===``)return;let t=e.findMessage(this.typeUrlToName(this.typeUrl));if(t)return t.fromBinary(this.value)}is(e){if(this.typeUrl===``)return!1;let t=this.typeUrlToName(this.typeUrl),n=``;return n=typeof e==`string`?e:e.typeName,t===n}typeNameToUrl(e){return`type.googleapis.com/${e}`}typeUrlToName(e){if(!e.length)throw Error(`invalid type url: ${e}`);let t=e.lastIndexOf(`/`),n=t>=0?e.substring(t+1):e;if(!n.length)throw Error(`invalid type url: ${e}`);return n}static pack(t){let n=new e;return n.packFrom(t),n}static fromBinary(t,n){return new e().fromBinary(t,n)}static fromJson(t,n){return new e().fromJson(t,n)}static fromJsonString(t,n){return new e().fromJsonString(t,n)}static equals(t,n){return r.util.equals(e,t,n)}};u.runtime=r,u.typeName=`google.protobuf.Any`,u.fields=r.util.newFieldList(()=>[{no:1,name:`type_url`,kind:`scalar`,T:9},{no:2,name:`value`,kind:`scalar`,T:12}]);function ee(e){let t;return t=typeof e==`object`&&`getType`in e?e.toBinary():typeof e==`string`?new TextEncoder().encode(e):e instanceof Uint8Array?e:new Uint8Array(e),n.enc(t).replace(/=+$/,``)}function te(e,r,a){try{let t=n.dec(e);return r?r.fromBinary(t,a):t}catch(e){throw i.from(e,t.DataLoss)}}function d(...e){let t=new Headers;for(let n of e)n.forEach((e,n)=>{t.append(n,e)});return t}function f(...e){let t=new AbortController,n=e.filter(e=>e!==void 0).concat(t.signal);for(let e of n){if(e.aborted){r.apply(e);break}e.addEventListener(`abort`,r)}function r(){t.signal.aborted||t.abort(m(this));for(let e of n)e.removeEventListener(`abort`,r)}return t}function p(e){let n=new AbortController,r=()=>{n.abort(new i(`the operation timed out`,t.DeadlineExceeded))},a;return e!==void 0&&(e<=0?r():a=setTimeout(r,e)),{signal:n.signal,cleanup:()=>clearTimeout(a)}}function m(e){if(!e.aborted)return;if(e.reason!==void 0)return e.reason;let t=/* @__PURE__ */ Error(`This operation was aborted`);return t.name=`AbortError`,t}function ne(){return{get(e){return e.id in this?this[e.id]:e.defaultValue},set(e,t){return this[e.id]=t,this},delete(e){return delete this[e.id],this}}}function h(e){let t=new Headers,n=new TextDecoder().decode(e).split(`\r
3
+ `);for(let e of n){if(e===``)continue;let n=e.indexOf(`:`);if(n>0){let r=e.substring(0,n).trim(),i=e.substring(n+1).trim();t.append(r,i)}}return t}function re(e){let t=[];return e.forEach((e,n)=>{t.push(`${n}: ${e}\r\n`)}),new TextEncoder().encode(t.join(``))}function ie(){return{serialize:re,parse:h}}const g=`Content-Type`,_=`Grpc-Encoding`,v=`Grpc-Accept-Encoding`,y=`Grpc-Timeout`,b=`Grpc-Status`,x=`Grpc-Status-Details-Bin`,S=`User-Agent`,C=/^application\/grpc-web(-text)?(?:\+(?:(json)(?:; ?charset=utf-?8)?|proto))?$/i,ae=`application/grpc-web+proto`,w=`application/grpc-web+json`;function oe(e){let t=e?.match(C);if(t)return{text:!!t[1],binary:!t[2]}}var T=class e extends l{constructor(e){super(),this.code=0,this.message=``,this.details=[],r.util.initPartial(e,this)}static fromBinary(t,n){return new e().fromBinary(t,n)}static fromJson(t,n){return new e().fromJson(t,n)}static fromJsonString(t,n){return new e().fromJsonString(t,n)}static equals(t,n){return r.util.equals(e,t,n)}};T.runtime=r,T.typeName=`google.rpc.Status`,T.fields=r.util.newFieldList(()=>[{no:1,name:`code`,kind:`scalar`,T:5},{no:2,name:`message`,kind:`scalar`,T:9},{no:3,name:`details`,kind:`message`,T:u,repeated:!0}]);function se(e,t){if(t){if(e.set(b,t.code.toString(10)),e.set(`Grpc-Message`,encodeURIComponent(t.rawMessage)),t.details.length>0){let n=new T({code:t.code,message:t.rawMessage,details:t.details.map(e=>`getType`in e?u.pack(e):new u({typeUrl:`type.googleapis.com/${e.type}`,value:e.value}))});e.set(x,ee(n))}}else e.set(b,`0`);return e}function E(e){let n=e.get(x);if(n!=null){let t=te(n,T);if(t.code==0)return;let r=new i(t.message,t.code,e);return r.details=t.details.map(e=>({type:e.typeUrl.substring(e.typeUrl.lastIndexOf(`/`)+1),value:e.value})),r}let r=e.get(b);if(r!=null){if(r===`0`)return;let n=parseInt(r,10);return n in t?new i(decodeURIComponent(e.get(`Grpc-Message`)??``),n,e):new i(`invalid grpc-status: ${r}`,t.Internal,e)}}function ce(e,t,n){let r=typeof t==`string`?t:t.typeName,i=typeof n==`string`?n:n.name;return e.toString().replace(/\/?$/,`/${r}/${i}`)}function D(e,t){return t instanceof e?t:new e(t)}function O(e,t){function n(t){return t.done===!0?t:{done:t.done,value:D(e,t.value)}}return{[Symbol.asyncIterator](){let e=t[Symbol.asyncIterator](),r={next:()=>e.next().then(n)};return e.throw!==void 0&&(r.throw=t=>e.throw(t).then(n)),e.return!==void 0&&(r.return=t=>e.return(t).then(n)),r}}}function k(e,t){return t?.concat().reverse().reduce((e,t)=>t(e),e)??e}function A(e){let t=Object.assign({},e);return t.ignoreUnknownFields??=!0,t}function le(e,t,n,r){let i=j(M(e.I,t),r),a=j(N(e.I,n),r),o=j(M(e.O,t),r),s=j(N(e.O,n),r);return{getI(e){return e?i:a},getO(e){return e?o:s}}}function ue(e,t,n,r){let i=t?M(e.I,r):N(e.I,n);return{parse:(t?M(e.O,r):N(e.O,n)).parse,serialize:i.serialize}}function j(e,t){return{serialize(n){let r=e.serialize(n);return o(t.writeMaxBytes,r.byteLength),r},parse(n){return s(t.readMaxBytes,n.byteLength,!0),e.parse(n)}}}function M(e,n){return{parse(r){try{return e.fromBinary(r,n)}catch(e){let n=e instanceof Error?e.message:String(e);throw new i(`parse binary: ${n}`,t.Internal)}},serialize(e){try{return e.toBinary(n)}catch(e){let n=e instanceof Error?e.message:String(e);throw new i(`serialize binary: ${n}`,t.Internal)}}}}function N(e,n){let r=n?.textEncoder??new TextEncoder,a=n?.textDecoder??new TextDecoder,o=A(n);return{parse(n){try{let t=a.decode(n);return e.fromJsonString(t,o)}catch(e){throw i.from(e,t.InvalidArgument)}},serialize(e){try{let t=e.toJsonString(o);return r.encode(t)}catch(e){throw i.from(e,t.Internal)}}}}const de=/^application\/(connect\+)?(?:(json)(?:; ?charset=utf-?8)?|(proto))$/i,fe=/^application\/(?:json(?:; ?charset=utf-?8)?|proto)$/i,pe=/^application\/connect\+?(?:json(?:; ?charset=utf-?8)?|proto)$/i,P=`application/proto`,F=`application/json`,I=`application/connect+proto`,L=`application/connect+json`;function R(e){let t=e?.match(de);if(t)return{stream:!!t[1],binary:!!t[3]}}function me(e){switch(e){case`proto`:return{stream:!1,binary:!0};case`json`:return{stream:!1,binary:!1};default:return}}var he=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};function z(e,t,r){if(t&&new Headers(t).forEach((e,t)=>r.metadata.append(t,e)),typeof e!=`object`||!e||Array.isArray(e))throw r;let a=r.code;`code`in e&&typeof e.code==`string`&&(a=c(e.code)??a);let o=e.message;if(o!=null&&typeof o!=`string`)throw r;let s=new i(o??``,a,t);if(`details`in e&&Array.isArray(e.details))for(let t of e.details){if(typeof t!=`object`||!t||Array.isArray(t)||typeof t.type!=`string`||typeof t.value!=`string`)throw r;try{s.details.push({type:t.type,value:n.dec(t.value),debug:t.debug})}catch{throw r}}return s}function ge(e,t,n){let r;try{r=JSON.parse(new TextDecoder().decode(e))}catch{throw n}return z(r,t,n)}function B(t,r){let i={code:e(t.code)};return t.rawMessage.length>0&&(i.message=t.rawMessage),t.details.length>0&&(i.details=t.details.map(e=>{if(`getType`in e){let t={type:e.getType().typeName,value:e.toBinary()};try{t.debug=e.toJson(r)}catch{}return t}return e}).map(e=>{var{value:t}=e,r=he(e,[`value`]);return Object.assign(Object.assign({},r),{value:n.enc(t).replace(/=+$/,``)})})),i}function _e(e,n){let r=new TextEncoder;try{let t=B(e,n),i=JSON.stringify(t);return r.encode(i)}catch(e){let n=e instanceof Error?e.message:String(e);throw new i(`failed to serialize Connect Error: ${n}`,t.Internal)}}function V(e){let n=new i(`invalid end stream`,t.Unknown),r;try{r=JSON.parse(typeof e==`string`?e:new TextDecoder().decode(e))}catch{throw n}if(typeof r!=`object`||!r||Array.isArray(r))throw n;let a=new Headers;if(`metadata`in r){if(typeof r.metadata!=`object`||r.metadata==null||Array.isArray(r.metadata))throw n;for(let[e,t]of Object.entries(r.metadata)){if(!Array.isArray(t)||t.some(e=>typeof e!=`string`))throw n;for(let n of t)a.append(e,n)}}return{metadata:a,error:`error`in r&&r.error!=null?z(r.error,a,n):void 0}}function ve(e,t,n){let r={};t!==void 0&&(r.error=B(t,n),e=d(e,t.metadata));let i=!1,a={};return e.forEach((e,t)=>{i=!0,a[t]=[e]}),i&&(r.metadata=a),r}function ye(e){let n=new TextEncoder;return{serialize(r){try{let t=ve(r.metadata,r.error,e),i=JSON.stringify(t);return n.encode(i)}catch(e){let n=e instanceof Error?e.message:String(e);throw new i(`failed to serialize EndStreamResponse: ${n}`,t.Internal)}},parse(e){try{return V(e)}catch(e){let n=e instanceof Error?e.message:String(e);throw new i(`failed to parse EndStreamResponse: ${n}`,t.InvalidArgument)}}}}const H=`Content-Type`,U=`Content-Length`,W=`Content-Encoding`,G=`Connect-Content-Encoding`,K=`Accept-Encoding`,q=`Connect-Accept-Encoding`,J=`Connect-Timeout-Ms`,Y=`Connect-Protocol-Version`;function be(e){switch(e){case 400:return t.Internal;case 401:return t.Unauthenticated;case 403:return t.PermissionDenied;case 404:return t.Unimplemented;case 429:return t.Unavailable;case 502:return t.Unavailable;case 503:return t.Unavailable;case 504:return t.Unavailable;default:return t.Unknown}}function xe(e){switch(e){case t.Canceled:return 499;case t.Unknown:return 500;case t.InvalidArgument:return 400;case t.DeadlineExceeded:return 504;case t.NotFound:return 404;case t.AlreadyExists:return 409;case t.PermissionDenied:return 403;case t.ResourceExhausted:return 429;case t.FailedPrecondition:return 400;case t.Aborted:return 409;case t.OutOfRange:return 400;case t.Unimplemented:return 501;case t.Internal:return 500;case t.Unavailable:return 503;case t.DataLoss:return 500;case t.Unauthenticated:return 401;default:return 500}}const X=`connect`,Se=`encoding`,Ce=`compression`,we=`base64`,Te=`message`;function Ee(e){let t=new Headers,n=new Headers;return e.forEach((e,r)=>{r.toLowerCase().startsWith(`trailer-`)?n.append(r.substring(8),e):t.append(r,e)}),[t,n]}function De(e,t){let n=new Headers(e);return t.forEach((e,t)=>{n.append(`trailer-${t}`,e)}),n}function Oe(e){let n=e.get(Y);if(n===null)throw new i(`missing required header: set ${Y} to "1"`,t.InvalidArgument);if(n!==`1`)throw new i(`${Y} must be "1": got "${n}"`,t.InvalidArgument)}function ke(e){let n=e.get(X);if(n===null)throw new i(`missing required parameter: set ${X} to "v1"`,t.InvalidArgument);if(n!==`v1`)throw new i(`${X} must be "v1": got "${n}"`,t.InvalidArgument)}function Z(e,t,n,r,i){let o=new Headers(r??{});return n!==void 0&&o.set(J,`${n}`),o.set(H,e==a.Unary?t?P:F:t?I:L),o.set(Y,`1`),i&&!o.has(`User-Agent`)&&o.set(`User-Agent`,`connect-es/1.7.0`),o}function Ae(e,t,n,r,i,o,s){let c=Z(e,t,n,r,s);if(o!=null){let t=e==a.Unary?W:G;c.set(t,o.name)}if(i.length>0){let t=e==a.Unary?K:q;c.set(t,i.map(e=>e.name).join(`,`))}return c}function Q(e,n,r,o){let s=o.get(H),c=R(s);if(r!==200){let t=new i(`HTTP ${r}`,be(r),o);if(e==a.Unary&&c&&!c.binary)return{isUnaryError:!0,unaryError:t};throw t}let l={binary:n,stream:e!==a.Unary};if(c?.binary!==l.binary||c.stream!==l.stream)throw new i(`unsupported content type ${s}`,c===void 0?t.Unknown:t.Internal,o);return{isUnaryError:!1}}function je(e,n,r,o,s){let c,l=s.get(e==a.Unary?W:G);if(l!=null&&l.toLowerCase()!==`identity`&&(c=n.find(e=>e.name===l),!c))throw new i(`unsupported response encoding "${l}"`,t.Internal,s);return Object.assign({compression:c},Q(e,r,o,s))}function Me(e,t){return t?n.enc(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=+$/,``):encodeURIComponent(new TextDecoder().decode(e))}function Ne(e,t,n){let r=`?connect=v1`,i=e.header.get(H);i?.indexOf(`application/`)===0&&(r+=`&encoding=`+encodeURIComponent(i.slice(12)));let a=e.header.get(W);a!==null&&a!==`identity`&&(r+=`&compression=`+encodeURIComponent(a),n=!0),n&&(r+=`&base64=1`),r+=`&message=`+Me(t,n);let o=e.url+r,s=new Headers(e.header);return[Y,H,U,W,K].forEach(e=>s.delete(e)),Object.assign(Object.assign({},e),{init:Object.assign(Object.assign({},e.init),{method:`GET`}),url:o,header:s})}function Pe(e){let t=k(e.next,e.interceptors),[n,r,i]=$(e);return t(Object.assign(Object.assign({},e.req),{message:D(e.req.method.I,e.req.message),signal:n})).then(e=>(i(),e),r)}function Fe(e){let t=k(e.next,e.interceptors),[n,r,i]=$(e),a=Object.assign(Object.assign({},e.req),{message:O(e.req.method.I,e.req.message),signal:n}),o=!1;return n.addEventListener(`abort`,function(){var t,n;let r=e.req.message[Symbol.asyncIterator]();o||(t=r.throw)==null||t.call(r,this.reason).catch(()=>{}),(n=r.return)==null||n.call(r).catch(()=>{})}),t(a).then(e=>Object.assign(Object.assign({},e),{message:{[Symbol.asyncIterator](){let t=e.message[Symbol.asyncIterator]();return{next(){return t.next().then(e=>(e.done==1&&(o=!0,i()),e),r)}}}}}),r)}function $(e){let{signal:t,cleanup:n}=p(e.timeoutMs),r=f(e.signal,t);return[r.signal,function(e){let a=i.from(t.aborted?m(t):e);return r.abort(a),n(),Promise.reject(a)},function(){n(),r.abort()}]}function Ie(e,n){let r=E(e);if(r)throw n.forEach((e,t)=>{r.metadata.append(t,e)}),r;if(!n.has(`Grpc-Status`)&&!e.has(`Grpc-Status`))throw new i(`protocol error: missing status`,t.Internal)}function Le(e,t,n,r){let i=new Headers(n??{});i.set(g,e?ae:w),i.set(`X-Grpc-Web`,`1`);let a=i.get(`User-Agent`)??i.get(`X-User-Agent`)??`connect-es/1.7.0`;return i.set(`X-User-Agent`,a),r&&i.set(S,a),t!==void 0&&i.set(y,`${t}m`),i}function Re(e,t,n,r,i,a){let o=Le(e,t,n,a);return i!=null&&o.set(_,i.name),r.length>0&&o.set(v,r.map(e=>e.name).join(`,`)),o}function ze(e){switch(e){case 400:return t.Internal;case 401:return t.Unauthenticated;case 403:return t.PermissionDenied;case 404:return t.Unimplemented;case 429:return t.Unavailable;case 502:return t.Unavailable;case 503:return t.Unavailable;case 504:return t.Unavailable;default:return t.Unknown}}function Be(e,t){if(e>=200&&e<300)return{foundStatus:t.has(b),headerError:E(t)};throw new i(decodeURIComponent(t.get(`Grpc-Message`)??`HTTP ${e}`),ze(e),t)}function Ve(e,n,r){let{foundStatus:a,headerError:o}=Be(n,r),s,c=r.get(_);if(c!==null&&c.toLowerCase()!==`identity`&&(s=e.find(e=>e.name===c),!s))throw new i(`unsupported response encoding "${c}"`,t.Internal,r);return{foundStatus:a,compression:s,headerError:o}}export{ae as $,ye as A,fe as B,H as C,K as D,J as E,L as F,A as G,me as H,I,O as J,k as K,pe as L,z as M,ge as N,U as O,_e as P,w as Q,F as R,xe as S,G as T,ue as U,R as V,le as W,E as X,ce as Y,se as Z,De as _,Re as a,b as at,Se as b,Pe as c,ie as ct,je as d,p as dt,C as et,Z as f,f as ft,Ee as g,ke as h,Le as i,_ as it,V as j,W as k,Ne as l,h as lt,Oe as m,d as mt,Ve as n,v as nt,Ie as o,y as ot,Ae as p,m as pt,D as q,ze as r,g as rt,Fe as s,S as st,Be as t,oe as tt,Q as u,ne as ut,we as v,q as w,Te as x,Ce as y,P as z};
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import"./init-79Ivv_Iw.mjs";import"./index.mjs";export{};