@fern-api/php-dynamic-snippets 0.0.1

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 (34) hide show
  1. package/cjs/DynamicSnippetsGenerator.cjs +41 -0
  2. package/cjs/DynamicSnippetsGenerator.d.cts +15 -0
  3. package/cjs/DynamicSnippetsGeneratorContext-jAUczdEu.d.cts +80 -0
  4. package/cjs/EndpointSnippetGenerator.cjs +30 -0
  5. package/cjs/EndpointSnippetGenerator.d.cts +48 -0
  6. package/cjs/context/DynamicSnippetsGeneratorContext.cjs +39 -0
  7. package/cjs/context/DynamicSnippetsGeneratorContext.d.cts +4 -0
  8. package/cjs/context/DynamicTypeLiteralMapper.cjs +28 -0
  9. package/cjs/context/DynamicTypeLiteralMapper.d.cts +4 -0
  10. package/cjs/context/FilePropertyMapper.cjs +28 -0
  11. package/cjs/context/FilePropertyMapper.d.cts +4 -0
  12. package/cjs/index.cjs +53 -0
  13. package/cjs/index.d.cts +6 -0
  14. package/esm/DynamicSnippetsGenerator.d.ts +15 -0
  15. package/esm/DynamicSnippetsGenerator.js +1 -0
  16. package/esm/DynamicSnippetsGeneratorContext-jAUczdEu.d.ts +80 -0
  17. package/esm/EndpointSnippetGenerator.d.ts +48 -0
  18. package/esm/EndpointSnippetGenerator.js +1 -0
  19. package/esm/chunk-7HKG5U5F.js +1 -0
  20. package/esm/chunk-BGMLQMW7.js +14 -0
  21. package/esm/chunk-G6X3OBKW.js +1 -0
  22. package/esm/chunk-MMCQWL5J.js +3 -0
  23. package/esm/chunk-RYQOC3FW.js +1 -0
  24. package/esm/chunk-YELOIV6Y.js +1 -0
  25. package/esm/chunk-ZFTBBCKC.js +28 -0
  26. package/esm/context/DynamicSnippetsGeneratorContext.d.ts +4 -0
  27. package/esm/context/DynamicSnippetsGeneratorContext.js +1 -0
  28. package/esm/context/DynamicTypeLiteralMapper.d.ts +4 -0
  29. package/esm/context/DynamicTypeLiteralMapper.js +1 -0
  30. package/esm/context/FilePropertyMapper.d.ts +4 -0
  31. package/esm/context/FilePropertyMapper.js +1 -0
  32. package/esm/index.d.ts +6 -0
  33. package/esm/index.js +13 -0
  34. package/package.json +27 -0
@@ -0,0 +1 @@
1
+ import{a as P,b as T,c as S,d as b,j as a,k as p,m as l,n as f,o as E}from"./chunk-ZFTBBCKC.js";p();l();p();l();var y=class{constructor(){a(this,"reporter");a(this,"snippet");a(this,"err");this.snippet=void 0,this.reporter=void 0,this.err=void 0}update({context:e,snippet:r}){(this.reporter==null||this.reporter.size()>e.errors.size())&&(this.reporter=e.errors.clone(),this.snippet=r)}getResponseOrThrow({endpoint:e}){var r;if(this.snippet!=null&&this.reporter!=null)return{snippet:this.snippet,errors:this.reporter.toDynamicSnippetErrors()};throw(r=this.err)!=null?r:new Error(`Failed to generate snippet for endpoint "${e.method} ${e.path}"`)}};var R=class{constructor(e){a(this,"context");this.context=e}async generate(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let t=new y;for(let n of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let o=await u.generateSnippet({endpoint:n,request:e});if(i.errors.empty())return{snippet:o,errors:void 0};t.update({context:i,snippet:o})}catch(o){t.err==null&&(t.err=o)}}return t.getResponseOrThrow({endpoint:e.endpoint})}generateSync(e){let r=this.context.resolveEndpointLocationOrThrow(e.endpoint);if(r.length===0)throw new Error(`No endpoints found that match "${e.endpoint.method} ${e.endpoint.path}"`);let t=new y;for(let n of r){let i=this.context.clone(),u=this.createSnippetGenerator(i);try{let o=u.generateSnippetSync({endpoint:n,request:e});if(i.errors.empty())return{snippet:o,errors:void 0};t.update({context:i,snippet:o})}catch(o){t.err==null&&(t.err=o)}}return t.getResponseOrThrow({endpoint:e.endpoint})}};p();l();var s={Critical:"CRITICAL",Warning:"WARNING"},g=class h{constructor(){a(this,"errors");a(this,"path");this.errors=[],this.path=[]}add(e){this.errors.push(T(P({},e),{path:[...this.path]}))}scope(e){this.path.push(e)}unscope(){this.path.pop()}getBySeverity(e){return this.errors.filter(r=>r.severity===e)}empty(){return this.errors.length===0}size(){return this.errors.length}clone(){let e=new h;return e.errors=[...this.errors],e.path=[...this.path],e}reset(){this.errors=[],this.path=[]}toDynamicSnippetErrors(){return this.errors.map(e=>({severity:e.severity,path:e.path!=null?this.pathToStringArray(e.path):void 0,message:e.message}))}pathToStringArray(e){let r=[];for(let t of e){if(typeof t=="string"){r.push(t);continue}r[r.length-1]+=`[${t.index}]`}return r}};p();l();p();l();p();l();var v=class{constructor(){a(this,"REFERENCE_REGEX",/^(GET|POST|PUT|DELETE|PATCH)\s(\/[a-zA-Z0-9\/{}_-]*)$/)}validate(e){return this.REFERENCE_REGEX.test(e)?{type:"valid"}:{type:"invalid"}}tryParse(e){if(this.validate(e).type==="invalid")return;let t=e.match(this.REFERENCE_REGEX);if(!(t==null||t[1]==null||t[2]==null))return{method:t[1],path:t[2]}}};var w=class{constructor({ir:e,config:r}){a(this,"config");a(this,"errors");a(this,"_ir");a(this,"httpEndpointReferenceParser");this._ir=e,this.config=r,this.errors=new g,this.httpEndpointReferenceParser=new v}associateQueryParametersByWireValue({parameters:e,values:r}){let t=[];for(let[n,i]of Object.entries(r)){this.errors.scope(n);try{let u=e.find(m=>m.name.wireValue===n);if(u==null)throw this.newParameterNotRecognizedError(n);let o=this.isListTypeReference(u.typeReference)&&!Array.isArray(i)?[i]:i;t.push({name:u.name,typeReference:u.typeReference,value:o})}finally{this.errors.unscope()}}return t}associateByWireValue({parameters:e,values:r,ignoreMissingParameters:t}){let n=[];for(let[i,u]of Object.entries(r)){this.errors.scope(i);try{let o=e.find(m=>m.name.wireValue===i);if(o==null){if(t)continue;this.errors.add({severity:s.Critical,message:this.newParameterNotRecognizedError(i).message});continue}n.push({name:o.name,typeReference:o.typeReference,value:u})}finally{this.errors.unscope()}}return n}getSingleFileValue({property:e,record:r}){let t=r[e.wireValue];if(t!=null){if(typeof t!="string"){this.errors.add({severity:s.Critical,message:`Expected file value to be a string, got ${typeof t}`});return}return t}}getFileArrayValues({property:e,record:r}){let t=r[e.wireValue];if(t==null)return;if(!Array.isArray(t)){this.errors.add({severity:s.Critical,message:`Expected file array value to be an array of strings, got ${typeof t}`});return}let n=[];for(let i of t){if(typeof i!="string"){this.errors.add({severity:s.Critical,message:`Expected file array value to be an array of strings, got ${typeof i}`});return}n.push(i)}return n}getRecord(e){if(typeof e!="object"||Array.isArray(e)){this.errors.add({severity:s.Critical,message:`Expected object with key, value pairs but got: ${Array.isArray(e)?"array":typeof e}`});return}return e==null?{}:e}resolveNamedType({typeId:e}){let r=this._ir.types[e];if(r==null){this.errors.add({severity:s.Critical,message:`Type identified by "${e}" could not be found`});return}return r}resolveDiscriminatedUnionTypeInstance({discriminatedUnion:e,value:r}){let t=this.getRecord(r);if(t==null)return;let n=e.discriminant.wireValue,i=t[n];if(i==null){this.errors.add({severity:s.Critical,message:this.newParameterNotRecognizedError(n).message});return}if(typeof i!="string"){this.errors.add({severity:s.Critical,message:`Expected discriminant value to be a string but got: ${typeof i}`});return}let u=e.types[i];if(u==null){this.errors.add({severity:s.Critical,message:`No type found for discriminant value "${i}"`});return}let x=t,{[n]:o}=x,m=b(x,[S(n)]);return{singleDiscriminatedUnionType:u,discriminantValue:u.discriminantValue,value:m}}resolveEndpointOrThrow(e){let r=this.httpEndpointReferenceParser.tryParse(e);if(r==null)throw new Error(`Failed to parse endpoint reference "${e}"`);return this.resolveEndpointLocationOrThrow(r)}resolveEndpointLocationOrThrow(e){let r=[];for(let t of Object.values(this._ir.endpoints))this.parsedEndpointMatches({endpoint:t,parsedEndpoint:e})&&r.push(t);if(r.length===0)throw new Error(`Failed to find endpoint identified by "${e.method} ${e.path}"`);return r}needsRequestParameter({request:e,inlinePathParameters:r,inlineFileProperties:t}){var n;return this.includePathParametersInWrappedRequest({request:e,inlinePathParameters:r})||e.queryParameters!=null&&e.queryParameters.length>0||e.headers!=null&&e.headers.length>0?!0:e.body!=null?this.includeRequestBodyInWrappedRequest({body:e.body,inlineFileProperties:t}):!((n=e.metadata)!=null&&n.onlyPathParameters)}includePathParametersInWrappedRequest({request:e,inlinePathParameters:r}){var t,n;return r&&((n=(t=e.metadata)==null?void 0:t.includePathParameters)!=null?n:!1)}isFileUploadRequestBody(e){switch(e.type){case"fileUpload":return!0;case"properties":case"referenced":return!1;default:f(e)}}resolveEnvironmentName(e){if(this._ir.environments==null)return;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":{let t=r.environments.find(n=>n.id===e);return t==null?void 0:t.name}case"multipleBaseUrls":{let t=r.environments.find(n=>n.id===e);return t==null?void 0:t.name}default:f(r)}}isSingleEnvironmentID(e){return typeof e=="string"}isMultiEnvironmentValues(e){return typeof e=="object"}validateMultiEnvironmentUrlValues(e){if(this._ir.environments==null)return this.errors.add({severity:s.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;let r=this._ir.environments.environments;switch(r.type){case"singleBaseUrl":return this.errors.add({severity:s.Critical,message:"Multiple environments are not supported for single base URL environments; use the baseUrl option instead"}),!1;case"multipleBaseUrls":{let t=r.environments[0];if(t==null)return this.errors.add({severity:s.Critical,message:"Multiple environments are not supported; use the baseUrl option instead"}),!1;let n=new Set(E(t.urls));for(let i of E(e))n.has(i)&&n.delete(i);return n.size>0?(this.errors.add({severity:s.Critical,message:`The provided environments are invalid; got: [${Object.keys(e).join(", ")}], expected: [${E(t.urls).join(", ")}]`}),!1):!0}}}getValueAsNumber({value:e}){if(typeof e!="number"){this.errors.add({severity:s.Critical,message:this.newTypeMismatchError({expected:"number",value:e}).message});return}return e}getValueAsBoolean({value:e}){if(typeof e!="boolean"){this.errors.add({severity:s.Critical,message:this.newTypeMismatchError({expected:"boolean",value:e}).message});return}return e}getValueAsString({value:e}){if(typeof e!="string"){this.errors.add({severity:s.Critical,message:this.newTypeMismatchError({expected:"string",value:e}).message});return}return e}isOptional(e){switch(e.type){case"nullable":return this.isOptional(e.value);case"optional":return!0;case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}isNullable(e){switch(e.type){case"nullable":return!0;case"optional":return this.isNullable(e.value);case"named":{let r=this.resolveNamedType({typeId:e.value});return r==null?!1:r.type==="alias"?this.isNullable(r.typeReference):!1}}return!1}newAuthMismatchError({auth:e,values:r}){return new Error(`Expected auth type ${e.type}, got ${r.type}`)}newParameterNotRecognizedError(e){return new Error(`"${e}" is not a recognized parameter for this endpoint`)}newTypeMismatchError({expected:e,value:r}){return new Error(`Expected ${e}, got ${typeof r}`)}includeRequestBodyInWrappedRequest({body:e,inlineFileProperties:r}){switch(e.type){case"properties":case"referenced":return!0;case"fileUpload":return this.includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r});default:f(e)}}includeFileUploadBodyInWrappedRequest({fileUpload:e,inlineFileProperties:r}){return this.fileUploadHasBodyProperties({fileUpload:e})||r&&this.fileUploadHasFileProperties({fileUpload:e})}fileUploadHasBodyProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!1;case"bodyProperty":return!0;default:f(r)}})}fileUploadHasFileProperties({fileUpload:e}){return e.properties.some(r=>{switch(r.type){case"file":case"fileArray":return!0;case"bodyProperty":return!1;default:f(r)}})}isListTypeReference(e){return e.type==="optional"?this.isListTypeReference(e.value):e.type==="list"||e.type==="set"}parsedEndpointMatches({endpoint:e,parsedEndpoint:r}){return e.location.method===r.method&&e.location.path===r.path}};p();l();var A={PathParameters:"pathParameters",QueryParameters:"queryParameters",Headers:"headers",RequestBody:"requestBody"};p();l();export{R as a,s as b,w as c,A as d};
@@ -0,0 +1,14 @@
1
+ import{a as S}from"./chunk-G6X3OBKW.js";import{c as R}from"./chunk-7HKG5U5F.js";import{a as A}from"./chunk-YELOIV6Y.js";import{j as n,k as r,m as t,p as g}from"./chunk-ZFTBBCKC.js";r();t();r();t();r();t();r();t();r();t();r();t();r();t();var ve=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,N=ve;var Ie=typeof self=="object"&&self&&self.Object===Object&&self,Oe=N||Ie||Function("return this")(),v=Oe;var Ee=v.Symbol,l=Ee;r();t();var I=Object.prototype,Te=I.hasOwnProperty,je=I.toString,c=l?l.toStringTag:void 0;function Me(e){var a=Te.call(e,c),o=e[c];try{e[c]=void 0;var u=!0}catch(d){}var f=je.call(e);return u&&(a?e[c]=o:delete e[c]),f}var O=Me;r();t();var we=Object.prototype,We=we.toString;function Fe(e){return We.call(e)}var E=Fe;var Le="[object Null]",ke="[object Undefined]",T=l?l.toStringTag:void 0;function Ue(e){return e==null?e===void 0?ke:Le:T&&T in Object(e)?O(e):E(e)}var j=Ue;r();t();function Pe(e){return e!=null&&typeof e=="object"}var M=Pe;var ze="[object Symbol]";function Be(e){return typeof e=="symbol"||M(e)&&j(e)==ze}var w=Be;r();t();r();t();function De(e,a){for(var o=-1,u=e==null?0:e.length,f=Array(u);++o<u;)f[o]=a(e[o],o,e);return f}var W=De;r();t();var Ze=Array.isArray,F=Ze;var qe=1/0,L=l?l.prototype:void 0,k=L?L.toString:void 0;function U(e){if(typeof e=="string")return e;if(F(e))return W(e,U)+"";if(w(e))return k?k.call(e):"";var a=e+"";return a=="0"&&1/e==-qe?"-0":a}var P=U;r();t();function Ge(e){return e==null?"":P(e)}var m=Ge;r();t();r();t();r();t();r();t();r();t();r();t();function He(e,a,o){var u=-1,f=e.length;a<0&&(a=-a>f?0:f+a),o=o>f?f:o,o<0&&(o+=f),f=a>o?0:o-a>>>0,a>>>=0;for(var d=Array(f);++u<f;)d[u]=e[u+a];return d}var z=He;function Ve(e,a,o){var u=e.length;return o=o===void 0?u:o,!a&&o>=u?e:z(e,a,o)}var B=Ve;r();t();var Je="\\ud800-\\udfff",_e="\\u0300-\\u036f",$e="\\ufe20-\\ufe2f",Ke="\\u20d0-\\u20ff",Ye=_e+$e+Ke,Qe="\\ufe0e\\ufe0f",Xe="\\u200d",er=RegExp("["+Xe+Je+Ye+Qe+"]");function rr(e){return er.test(e)}var b=rr;r();t();r();t();function tr(e){return e.split("")}var D=tr;r();t();var Z="\\ud800-\\udfff",or="\\u0300-\\u036f",ar="\\ufe20-\\ufe2f",fr="\\u20d0-\\u20ff",ur=or+ar+fr,sr="\\ufe0e\\ufe0f",pr="["+Z+"]",y="["+ur+"]",C="\\ud83c[\\udffb-\\udfff]",lr="(?:"+y+"|"+C+")",q="[^"+Z+"]",G="(?:\\ud83c[\\udde6-\\uddff]){2}",H="[\\ud800-\\udbff][\\udc00-\\udfff]",dr="\\u200d",V=lr+"?",J="["+sr+"]?",mr="(?:"+dr+"(?:"+[q,G,H].join("|")+")"+J+V+")*",nr=J+V+mr,ir="(?:"+[q+y+"?",y,G,H,pr].join("|")+")",xr=RegExp(C+"(?="+C+")|"+ir+nr,"g");function cr(e){return e.match(xr)||[]}var _=cr;function gr(e){return b(e)?_(e):D(e)}var $=gr;function br(e){return function(a){a=m(a);var o=b(a)?$(a):void 0,u=o?o[0]:a.charAt(0),f=o?B(o,1).join(""):a.slice(1);return u[e]()+f}}var K=br;var hr=K("toUpperCase"),i=hr;function yr(e){return i(m(e).toLowerCase())}var Y=yr;r();t();r();t();function Cr(e,a,o,u){var f=-1,d=e==null?0:e.length;for(u&&d&&(o=e[++f]);++f<d;)o=a(o,e[f],f,e);return o}var Q=Cr;r();t();r();t();r();t();function Rr(e){return function(a){return e==null?void 0:e[a]}}var X=Rr;var Sr={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ar=X(Sr),ee=Ar;var Nr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vr="\\u0300-\\u036f",Ir="\\ufe20-\\ufe2f",Or="\\u20d0-\\u20ff",Er=vr+Ir+Or,Tr="["+Er+"]",jr=RegExp(Tr,"g");function Mr(e){return e=m(e),e&&e.replace(Nr,ee).replace(jr,"")}var re=Mr;r();t();r();t();var wr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Wr(e){return e.match(wr)||[]}var te=Wr;r();t();var Fr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Lr(e){return Fr.test(e)}var oe=Lr;r();t();var pe="\\ud800-\\udfff",kr="\\u0300-\\u036f",Ur="\\ufe20-\\ufe2f",Pr="\\u20d0-\\u20ff",zr=kr+Ur+Pr,le="\\u2700-\\u27bf",de="a-z\\xdf-\\xf6\\xf8-\\xff",Br="\\xac\\xb1\\xd7\\xf7",Dr="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Zr="\\u2000-\\u206f",qr=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",me="A-Z\\xc0-\\xd6\\xd8-\\xde",Gr="\\ufe0e\\ufe0f",ne=Br+Dr+Zr+qr,ie="['\u2019]",ae="["+ne+"]",Hr="["+zr+"]",xe="\\d+",Vr="["+le+"]",ce="["+de+"]",ge="[^"+pe+ne+xe+le+de+me+"]",Jr="\\ud83c[\\udffb-\\udfff]",_r="(?:"+Hr+"|"+Jr+")",$r="[^"+pe+"]",be="(?:\\ud83c[\\udde6-\\uddff]){2}",he="[\\ud800-\\udbff][\\udc00-\\udfff]",x="["+me+"]",Kr="\\u200d",fe="(?:"+ce+"|"+ge+")",Yr="(?:"+x+"|"+ge+")",ue="(?:"+ie+"(?:d|ll|m|re|s|t|ve))?",se="(?:"+ie+"(?:D|LL|M|RE|S|T|VE))?",ye=_r+"?",Ce="["+Gr+"]?",Qr="(?:"+Kr+"(?:"+[$r,be,he].join("|")+")"+Ce+ye+")*",Xr="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",et="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",rt=Ce+ye+Qr,tt="(?:"+[Vr,be,he].join("|")+")"+rt,ot=RegExp([x+"?"+ce+"+"+ue+"(?="+[ae,x,"$"].join("|")+")",Yr+"+"+se+"(?="+[ae,x+fe,"$"].join("|")+")",x+"?"+fe+"+"+ue,x+"+"+se,et,Xr,xe,tt].join("|"),"g");function at(e){return e.match(ot)||[]}var Re=at;function ft(e,a,o){return e=m(e),a=o?void 0:a,a===void 0?oe(e)?Re(e):te(e):e.match(a)||[]}var Se=ft;var ut="['\u2019]",st=RegExp(ut,"g");function pt(e){return function(a){return Q(Se(re(a).replace(st,"")),e,"")}}var Ae=pt;var lt=Ae(function(e,a,o){return a=a.toLowerCase(),e+(o?Y(a):a)}),h=lt;var dt=["use","clone","list"],mt="Requests",nt="Types",Ne=class e extends R{constructor({ir:o,config:u}){var f;super({ir:o,config:u});n(this,"ir");n(this,"customConfig");n(this,"dynamicTypeLiteralMapper");n(this,"filePropertyMapper");n(this,"rootNamespace");this.ir=o,this.customConfig=u.customConfig!=null?u.customConfig:void 0,this.dynamicTypeLiteralMapper=new S({context:this}),this.filePropertyMapper=new A({context:this}),this.rootNamespace=it({organization:u.organization,namespaceOverride:(f=this.customConfig)==null?void 0:f.namespace})}clone(){return new e({ir:this.ir,config:this.config})}getParameterName(o){return this.prependUnderscoreIfNeeded(o.camelCase.unsafeName)}getPropertyName(o){return this.prependUnderscoreIfNeeded(o.camelCase.unsafeName)}getMethodName(o){let u=o.camelCase.unsafeName;return dt.includes(u)?u:o.camelCase.safeName}getClassName(o){return o.pascalCase.safeName}getRootClientClassName(){var o,u,f;return((o=this.customConfig)==null?void 0:o.clientName)!=null?this.customConfig.clientName:((u=this.customConfig)==null?void 0:u["client-class-name"])!=null?(f=this.customConfig)==null?void 0:f["client-class-name"]:this.getComputedClientName()}getEnvironmentsClassReference(){return g.classReference({name:"Environments",namespace:this.rootNamespace})}getRequestNamespace(o){return this.getNamespace(o,mt)}getTypesNamespace(o){return this.getNamespace(o,nt)}getNamespace(o,u){let f=o.allParts.map(d=>d.pascalCase.safeName);return f=u!=null?[...f,u]:f,[this.rootNamespace,...f].join("\\")}getEnvironmentClassAccessFromID(o){let u=this.resolveEnvironmentName(o);if(u!=null)return g.codeblock(f=>{f.writeNode(this.getEnvironmentClassReference(u)),f.write("::"),f.write(this.getClassName(u))})}getEnvironmentClassReference(o){return g.classReference({name:"Environments",namespace:this.rootNamespace})}prependUnderscoreIfNeeded(o){return/^[a-zA-Z_]/.test(o)?o:`_${o}`}getComputedClientName(){return`${this.getOrganizationPascalCase()}Client`}getOrganizationPascalCase(){return`${i(h(this.config.organization))}`}};function it({organization:e,namespaceOverride:a}){return a!=null?a:`${i(h(e))}`}export{Ne as a};
2
+ /*! Bundled license information:
3
+
4
+ lodash-es/lodash.js:
5
+ (**
6
+ * @license
7
+ * Lodash (Custom Build) <https://lodash.com/>
8
+ * Build: `lodash modularize exports="es" -o ./`
9
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
10
+ * Released under MIT license <https://lodash.com/license>
11
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
12
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
13
+ *)
14
+ */
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-7HKG5U5F.js";import{j as c,k as p,m as l,n as o,p as r}from"./chunk-ZFTBBCKC.js";p();l();var u=class{constructor({context:e}){c(this,"context");this.context=e}convert(e){if(e.value===null)return this.context.isNullable(e.typeReference)?r.TypeLiteral.null():(this.context.errors.add({severity:a.Critical,message:"Expected non-null value, but got null"}),r.TypeLiteral.nop());if(e.value===void 0)return r.TypeLiteral.nop();switch(e.typeReference.type){case"list":case"set":return this.convertList({list:e.typeReference.value,value:e.value});case"literal":return this.convertLiteral({literalType:e.typeReference.value,value:e.value});case"map":return this.convertMap({map:e.typeReference,value:e.value});case"named":{let t=this.context.resolveNamedType({typeId:e.typeReference.value});return t==null?r.TypeLiteral.nop():this.convertNamed({named:t,value:e.value,as:e.as})}case"optional":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"nullable":return this.convert({typeReference:e.typeReference.value,value:e.value,as:e.as});case"primitive":return this.convertPrimitive({primitive:e.typeReference.value,value:e.value,as:e.as});case"unknown":return this.convertUnknown({value:e.value});default:o(e.typeReference)}}convertLiteral({literalType:e,value:t}){switch(e.type){case"boolean":{let n=this.context.getValueAsBoolean({value:t});return n==null?r.TypeLiteral.nop():r.TypeLiteral.boolean(n)}case"string":{let n=this.context.getValueAsString({value:t});return n==null?r.TypeLiteral.nop():r.TypeLiteral.string(n)}default:o(e)}}convertList({list:e,value:t}){return Array.isArray(t)?r.TypeLiteral.list({values:t.map((n,i)=>{this.context.errors.scope({index:i});try{return this.convert({typeReference:e,value:n})}finally{this.context.errors.unscope()}})}):(this.context.errors.add({severity:a.Critical,message:`Expected array but got: ${typeof t}`}),r.TypeLiteral.nop())}convertMap({map:e,value:t}){return typeof t!="object"||t==null?(this.context.errors.add({severity:a.Critical,message:`Expected object but got: ${t==null?"null":typeof t}`}),r.TypeLiteral.nop()):r.TypeLiteral.map({entries:Object.entries(t).map(([n,i])=>{this.context.errors.scope(n);try{return{key:this.convert({typeReference:e.key,value:n,as:"key"}),value:this.convert({typeReference:e.value,value:i})}}finally{this.context.errors.unscope()}})})}convertNamed({named:e,value:t,as:n}){switch(e.type){case"alias":return this.convert({typeReference:e.typeReference,value:t,as:n});case"discriminatedUnion":return this.convertDiscriminatedUnion({discriminatedUnion:e,value:t});case"enum":return this.convertEnum({enum_:e,value:t});case"object":return this.convertObject({object_:e,value:t});case"undiscriminatedUnion":return this.convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t});default:o(e)}}convertDiscriminatedUnion({discriminatedUnion:e,value:t}){return r.TypeLiteral.string("todo")}convertObject({object_:e,value:t}){var i;let n=this.context.associateByWireValue({parameters:e.properties,values:(i=this.context.getRecord(t))!=null?i:{}});return r.TypeLiteral.class_({reference:r.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)}),fields:n.map(s=>{this.context.errors.scope(s.name.wireValue);try{return{name:this.context.getPropertyName(s.name.name),value:this.convert(s)}}finally{this.context.errors.unscope()}})})}convertEnum({enum_:e,value:t}){let n=this.getEnumValueName({enum_:e,value:t});return n==null?r.TypeLiteral.nop():r.TypeLiteral.reference(r.codeblock(i=>{i.writeNode(r.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getTypesNamespace(e.declaration.fernFilepath)})),i.write("::"),i.write(n),i.write("->value")}))}getEnumValueName({enum_:e,value:t}){if(typeof t!="string"){this.context.errors.add({severity:a.Critical,message:`Expected enum value string, got: ${typeof t}`});return}let n=e.values.find(i=>i.wireValue===t);if(n==null){this.context.errors.add({severity:a.Critical,message:`An enum value named "${t}" does not exist in this context`});return}return this.context.getClassName(n.name)}convertUndiscriminatedUnion({undiscriminatedUnion:e,value:t}){let n=this.findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t});return n==null?r.TypeLiteral.nop():n}findMatchingUndiscriminatedUnionType({undiscriminatedUnion:e,value:t}){for(let n of e.types)try{return this.convert({typeReference:n,value:t})}catch(i){continue}this.context.errors.add({severity:a.Critical,message:`None of the types in the undiscriminated union matched the given "${typeof t}" value`})}convertUnknown({value:e}){return r.TypeLiteral.unknown(e)}convertPrimitive({primitive:e,value:t,as:n}){switch(e){case"INTEGER":case"LONG":case"UINT":case"UINT_64":{let i=this.getValueAsNumber({value:t,as:n});return i==null?r.TypeLiteral.nop():r.TypeLiteral.number(i)}case"FLOAT":case"DOUBLE":{let i=this.getValueAsNumber({value:t});return i==null?r.TypeLiteral.nop():r.TypeLiteral.float(i)}case"BOOLEAN":{let i=this.getValueAsBoolean({value:t,as:n});return i==null?r.TypeLiteral.nop():r.TypeLiteral.boolean(i)}case"DATE":case"DATE_TIME":{let i=this.context.getValueAsString({value:t});return i==null?r.TypeLiteral.nop():r.TypeLiteral.datetime(i)}case"BASE_64":case"UUID":case"BIG_INTEGER":case"STRING":{let i=this.context.getValueAsString({value:t});return i==null?r.TypeLiteral.nop():r.TypeLiteral.string(i)}default:o(e)}}getValueAsNumber({value:e,as:t}){let n=t==="key"&&typeof e=="string"?Number(e):e;return this.context.getValueAsNumber({value:n})}getValueAsBoolean({value:e,as:t}){let n=t==="key"?typeof e=="string"?e==="true":e==="false"?!1:e:e;return this.context.getValueAsBoolean({value:n})}};export{u as a};
@@ -0,0 +1,3 @@
1
+ import{b as o,d as p}from"./chunk-7HKG5U5F.js";import{j as f,k as F,m as P,n as c,p as s}from"./chunk-ZFTBBCKC.js";F();P();var v="$client",u="Example",I=`<?php
2
+
3
+ `,x=class{constructor({context:e}){f(this,"context");this.context=e}async generateSnippet({endpoint:e,request:t}){var n;let r=this.buildCodeBlock({endpoint:e,snippet:t});return I+await r.toStringAsync({namespace:u,rootNamespace:u,customConfig:(n=this.context.customConfig)!=null?n:{}})}generateSnippetSync({endpoint:e,request:t}){var n;let r=this.buildCodeBlock({endpoint:e,snippet:t});return I+r.toString({namespace:u,rootNamespace:u,customConfig:(n=this.context.customConfig)!=null?n:{}})}buildCodeBlock({endpoint:e,snippet:t}){return s.codeblock(r=>{r.writeNodeStatement(this.constructClient({endpoint:e,snippet:t})),r.writeNodeStatement(this.callMethod({endpoint:e,snippet:t}))})}constructClient({endpoint:e,snippet:t}){return s.codeblock(r=>{r.write(`${v} = `),r.writeNode(this.getRootClientClassInstantiation(this.getConstructorArgs({endpoint:e,snippet:t})))})}callMethod({endpoint:e,snippet:t}){return s.invokeMethod({on:s.codeblock(v),method:this.getMethod({endpoint:e}),arguments_:this.getMethodArgs({endpoint:e,snippet:t}),multiline:!0})}getConstructorArgs({endpoint:e,snippet:t}){let r=[];e.auth!=null&&(t.auth!=null?r.push(...this.getConstructorAuthArgs({auth:e.auth,values:t.auth})):this.context.errors.add({severity:o.Warning,message:`Auth with ${e.auth.type} configuration is required for this endpoint`}));let n=[],a=this.getConstructorBaseUrlArgs({baseUrl:t.baseURL,environment:t.environment});return a.length>0&&n.push(...a),this.context.errors.scope(p.Headers),this.context.ir.headers!=null&&t.headers!=null&&n.push(...this.getConstructorHeaderArgs({headers:this.context.ir.headers,values:t.headers})),this.context.errors.unscope(),n.length===0?r:[...r,{name:"options",assignment:s.TypeLiteral.map({entries:n.map(i=>({key:s.TypeLiteral.string(i.name),value:i.value}))})}]}getConstructorAuthArgs({auth:e,values:t}){switch(e.type){case"basic":return t.type!=="basic"?(this.context.errors.add({severity:o.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getConstructorBasicAuthArgs({auth:e,values:t});case"bearer":return t.type!=="bearer"?(this.context.errors.add({severity:o.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getConstructorBearerAuthArgs({auth:e,values:t});case"header":return t.type!=="header"?(this.context.errors.add({severity:o.Critical,message:this.context.newAuthMismatchError({auth:e,values:t}).message}),[]):this.getConstructorHeaderAuthArgs({auth:e,values:t});default:c(e)}}getConstructorBasicAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.username),assignment:s.TypeLiteral.string(t.username)},{name:this.context.getPropertyName(e.password),assignment:s.TypeLiteral.string(t.password)}]}getConstructorBaseUrlArgs({baseUrl:e,environment:t}){let r=this.getBaseUrlArg({baseUrl:e,environment:t});return s.TypeLiteral.isNop(r)?[]:[{name:"baseUrl",value:r}]}getBaseUrlArg({baseUrl:e,environment:t}){if(e!=null&&t!=null)return this.context.errors.add({severity:o.Critical,message:"Cannot specify both baseUrl and environment options"}),s.TypeLiteral.nop();if(e!=null)return s.TypeLiteral.string(e);if(t!=null){if(this.context.isSingleEnvironmentID(t)){let r=this.context.getEnvironmentClassAccessFromID(t);return r==null?(this.context.errors.add({severity:o.Warning,message:`Environment ${JSON.stringify(t)} was not found`}),s.TypeLiteral.nop()):s.TypeLiteral.reference(s.codeblock(n=>{n.writeNode(r),n.write("->value")}))}this.context.isMultiEnvironmentValues(t)&&this.context.errors.add({severity:o.Warning,message:"The PHP SDK doesn't support a multi-environment client option yet; use the baseUrl option instead"})}return s.TypeLiteral.nop()}getConstructorBearerAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.token),assignment:s.TypeLiteral.string(t.token)}]}getConstructorHeaderAuthArgs({auth:e,values:t}){return[{name:this.context.getPropertyName(e.header.name.name),assignment:this.context.dynamicTypeLiteralMapper.convert({typeReference:e.header.typeReference,value:t.value})}]}getConstructorHeaderArgs({headers:e,values:t}){let r=[];for(let n of e){let a=this.getConstructorHeaderArg({header:n,value:t.value});a!=null&&r.push({name:this.context.getPropertyName(n.name.name),value:a})}return r}getConstructorHeaderArg({header:e,value:t}){let r=this.context.dynamicTypeLiteralMapper.convert({typeReference:e.typeReference,value:t});if(!s.TypeLiteral.isNop(r))return r}getMethodArgs({endpoint:e,snippet:t}){switch(e.request.type){case"inlined":return this.getMethodArgsForInlinedRequest({request:e.request,snippet:t});case"body":return this.getMethodArgsForBodyRequest({request:e.request,snippet:t});default:c(e.request)}}getMethodArgsForBodyRequest({request:e,snippet:t}){let r=[];if(this.context.errors.scope(p.PathParameters),e.pathParameters!=null){let n=this.getPathParameters({namedParameters:e.pathParameters,snippet:t});r.push(...n.map(a=>a.value))}return this.context.errors.unscope(),this.context.errors.scope(p.RequestBody),e.body!=null&&r.push(this.getBodyRequestArg({body:e.body,value:t.requestBody})),this.context.errors.unscope(),r}getBodyRequestArg({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:c(e)}}getBytesBodyRequestArg({value:e}){return this.context.errors.add({severity:o.Critical,message:"The PHP SDK doesn't support bytes requests yet"}),s.TypeLiteral.nop()}getMethodArgsForInlinedRequest({request:e,snippet:t}){let r=[];this.context.errors.scope(p.PathParameters);let a=[];e.pathParameters!=null&&a.push(...this.getPathParameters({namedParameters:e.pathParameters,snippet:t})),this.context.errors.unscope(),this.context.errors.scope(p.RequestBody);let i=this.getFilePropertyInfo({request:e,snippet:t});return this.context.errors.unscope(),this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:!1})||r.push(...a.map(l=>l.value)),this.context.needsRequestParameter({request:e,inlinePathParameters:!1,inlineFileProperties:!0})&&r.push(this.getInlinedRequestArg({request:e,snippet:t,pathParameterFields:this.context.includePathParametersInWrappedRequest({request:e,inlinePathParameters:!1})?a:[],filePropertyInfo:i})),r}getFilePropertyInfo({request:e,snippet:t}){return e.body==null||!this.context.isFileUploadRequestBody(e.body)?{fileFields:[],bodyPropertyFields:[]}:this.context.filePropertyMapper.getFilePropertyInfo({body:e.body,value:t.requestBody})}getInlinedRequestArg({request:e,snippet:t,pathParameterFields:r,filePropertyInfo:n}){var h,m,y,g;this.context.errors.scope(p.QueryParameters);let i=this.context.associateQueryParametersByWireValue({parameters:(h=e.queryParameters)!=null?h:[],values:(m=t.queryParameters)!=null?m:{}}).map(d=>({name:this.context.getPropertyName(d.name.name),value:this.context.dynamicTypeLiteralMapper.convert(d)}));this.context.errors.unscope(),this.context.errors.scope(p.Headers);let R=this.context.associateByWireValue({parameters:(y=e.headers)!=null?y:[],values:(g=t.headers)!=null?g:{}}).map(d=>({name:this.context.getPropertyName(d.name.name),value:this.context.dynamicTypeLiteralMapper.convert(d)}));this.context.errors.unscope(),this.context.errors.scope(p.RequestBody);let A=e.body!=null?this.getInlinedRequestBodyConstructorFields({body:e.body,value:t.requestBody,filePropertyInfo:n}):[];return this.context.errors.unscope(),s.TypeLiteral.class_({reference:s.classReference({name:this.context.getClassName(e.declaration.name),namespace:this.context.getRequestNamespace(e.declaration.fernFilepath)}),fields:[...r,...i,...R,...A]})}getInlinedRequestBodyConstructorFields({body:e,value:t,filePropertyInfo:r}){switch(e.type){case"properties":return this.getInlinedRequestBodyPropertyConstructorFields({parameters:e.value,value:t});case"referenced":return[this.getReferencedRequestBodyPropertyConstructorField({body:e,value:t})];case"fileUpload":return this.getFileUploadRequestBodyConstructorFields({filePropertyInfo:r});default:c(e)}}getFileUploadRequestBodyConstructorFields({filePropertyInfo:e}){return[...e.fileFields,...e.bodyPropertyFields]}getReferencedRequestBodyPropertyConstructorField({body:e,value:t}){return{name:this.context.getPropertyName(e.bodyKey),value:this.getReferencedRequestBodyPropertyTypeLiteral({body:e.bodyType,value:t})}}getReferencedRequestBodyPropertyTypeLiteral({body:e,value:t}){switch(e.type){case"bytes":return this.getBytesBodyRequestArg({value:t});case"typeReference":return this.context.dynamicTypeLiteralMapper.convert({typeReference:e.value,value:t});default:c(e)}}getInlinedRequestBodyPropertyConstructorFields({parameters:e,value:t}){var a;let r=[],n=this.context.associateByWireValue({parameters:e,values:(a=this.context.getRecord(t))!=null?a:{}});for(let i of n)r.push({name:this.context.getPropertyName(i.name.name),value:this.context.dynamicTypeLiteralMapper.convert(i)});return r}getPathParameters({namedParameters:e,snippet:t}){var a;let r=[],n=this.context.associateByWireValue({parameters:e,values:(a=t.pathParameters)!=null?a:{}});for(let i of n)r.push({name:this.context.getPropertyName(i.name.name),value:this.context.dynamicTypeLiteralMapper.convert(i)});return r}getMethod({endpoint:e}){return e.declaration.fernFilepath.allParts.length>0?`${e.declaration.fernFilepath.allParts.map(t=>this.context.getPropertyName(t)).join("->")}->${this.context.getMethodName(e.declaration.name)}`:this.context.getMethodName(e.declaration.name)}getRootClientClassInstantiation(e){return s.instantiateClass({classReference:s.classReference({name:this.context.getRootClientClassName(),namespace:this.context.rootNamespace}),arguments_:e,multiline:!0})}};export{x as a};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-MMCQWL5J.js";import{a as p}from"./chunk-BGMLQMW7.js";import{a as t}from"./chunk-7HKG5U5F.js";import{k as r,m as n}from"./chunk-ZFTBBCKC.js";r();n();var i=class extends t{constructor({ir:e,config:a}){super(new p({ir:e,config:a}))}createSnippetGenerator(e){return new o({context:e})}};export{i as a};
@@ -0,0 +1 @@
1
+ import{j as l,k as a,m as y,n as s,p as i}from"./chunk-ZFTBBCKC.js";a();y();var c=class{constructor({context:r}){l(this,"context");this.context=r}getFilePropertyInfo({body:r,value:o}){var p;let e={fileFields:[],bodyPropertyFields:[]},n=(p=this.context.getRecord(o))!=null?p:{};for(let t of r.properties)switch(t.type){case"file":e.fileFields.push({name:this.context.getPropertyName(t.name),value:this.getSingleFileProperty({property:t,record:n})});break;case"fileArray":e.fileFields.push({name:this.context.getPropertyName(t.name),value:this.getArrayFileProperty({property:t,record:n})});break;case"bodyProperty":e.bodyPropertyFields.push({name:this.context.getPropertyName(t.name.name),value:this.getBodyProperty({property:t,record:n})});break;default:s(t)}return e}getSingleFileProperty({property:r,record:o}){let e=this.context.getSingleFileValue({property:r,record:o});return e==null?i.TypeLiteral.nop():i.TypeLiteral.file(e)}getArrayFileProperty({property:r,record:o}){let e=this.context.getFileArrayValues({property:r,record:o});return e==null?i.TypeLiteral.nop():i.TypeLiteral.list({values:e.map(n=>i.TypeLiteral.file(n))})}getBodyProperty({property:r,record:o}){let e=o[r.name.wireValue];return e==null?i.TypeLiteral.nop():this.context.dynamicTypeLiteralMapper.convert({typeReference:r.typeReference,value:e})}};export{c as a};
@@ -0,0 +1,28 @@
1
+ var ut=Object.create;var oe=Object.defineProperty,ct=Object.defineProperties,ht=Object.getOwnPropertyDescriptor,lt=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertyNames,ce=Object.getOwnPropertySymbols,mt=Object.getPrototypeOf,Ne=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable;var ve=(r,t,e)=>t in r?oe(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e,he=(r,t)=>{for(var e in t||(t={}))Ne.call(t,e)&&ve(r,e,t[e]);if(ce)for(var e of ce(t))Ce.call(t,e)&&ve(r,e,t[e]);return r},le=(r,t)=>ct(r,lt(t));var Jr=r=>typeof r=="symbol"?r:r+"",qr=(r,t)=>{var e={};for(var n in r)Ne.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&ce)for(var n of ce(r))t.indexOf(n)<0&&Ce.call(r,n)&&(e[n]=r[n]);return e};var Le=(r,t)=>()=>(r&&(t=r(r=0)),t);var Hr=(r,t)=>()=>(t||r((t={exports:{}}).exports,t),t.exports),dt=(r,t)=>{for(var e in t)oe(r,e,{get:t[e],enumerable:!0})},Se=(r,t,e,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of pt(t))!Ne.call(r,i)&&i!==e&&oe(r,i,{get:()=>t[i],enumerable:!(n=ht(t,i))||n.enumerable});return r};var Qr=(r,t,e)=>(e=r!=null?ut(mt(r)):{},Se(t||!r||!r.__esModule?oe(e,"default",{value:r,enumerable:!0}):e,r)),Xr=r=>Se(oe({},"__esModule",{value:!0}),r);var f=(r,t,e)=>ve(r,typeof t!="symbol"?t+"":t,e);function Ue(){throw new Error("setTimeout has not been defined")}function Me(){throw new Error("clearTimeout has not been defined")}function Pe(r){if(D===setTimeout)return setTimeout(r,0);if((D===Ue||!D)&&setTimeout)return D=setTimeout,setTimeout(r,0);try{return D(r,0)}catch(t){try{return D.call(null,r,0)}catch(e){return D.call(this,r,0)}}}function wt(r){if($===clearTimeout)return clearTimeout(r);if(($===Me||!$)&&clearTimeout)return $=clearTimeout,clearTimeout(r);try{return $(r)}catch(t){try{return $.call(null,r)}catch(e){return $.call(this,r)}}}function xt(){!ne||!z||(ne=!1,z.length?b=z.concat(b):pe=-1,b.length&&De())}function De(){if(!ne){var r=Pe(xt);ne=!0;for(var t=b.length;t;){for(z=b,b=[];++pe<t;)z&&z[pe].run();pe=-1,t=b.length}z=null,ne=!1,wt(r)}}function yt(r){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];b.push(new $e(r,t)),b.length===1&&!ne&&Pe(De)}function $e(r,t){this.fun=r,this.array=t}function G(){}function Mt(r){throw new Error("process.binding is not supported")}function Pt(){return"/"}function Dt(r){throw new Error("process.chdir is not supported")}function $t(){return 0}function Ot(r){var t=Yt.call(re)*.001,e=Math.floor(t),n=Math.floor(t%1*1e9);return r&&(e=e-r[0],n=n-r[1],n<0&&(e--,n+=1e9)),[e,n]}function Wt(){var r=new Date,t=r-Ft;return t/1e3}var D,$,b,ne,z,pe,gt,Tt,At,Et,vt,Nt,Lt,_t,Rt,It,kt,bt,Ct,St,Bt,Ut,re,Yt,Ft,d,Be,u=Le(()=>{"use strict";D=Ue,$=Me;typeof globalThis.setTimeout=="function"&&(D=setTimeout);typeof globalThis.clearTimeout=="function"&&($=clearTimeout);b=[],ne=!1,pe=-1;$e.prototype.run=function(){this.fun.apply(null,this.array)};gt="browser",Tt="browser",At=!0,Et={},vt=[],Nt="",Lt={},_t={},Rt={};It=G,kt=G,bt=G,Ct=G,St=G,Bt=G,Ut=G;re=globalThis.performance||{},Yt=re.now||re.mozNow||re.msNow||re.oNow||re.webkitNow||function(){return new Date().getTime()};Ft=new Date;d={nextTick:yt,title:gt,browser:At,env:Et,argv:vt,version:Nt,versions:Lt,on:It,addListener:kt,once:bt,off:Ct,removeListener:St,removeAllListeners:Bt,emit:Ut,binding:Mt,cwd:Pt,chdir:Dt,umask:$t,hrtime:Ot,platform:Tt,release:_t,config:Rt,uptime:Wt},Be={};Object.keys(Be).forEach(r=>{let t=r.split("."),e=d;for(let n=0;n<t.length;n++){let i=t[n];n===t.length-1?e[i]=Be[r]:e=e[i]||(e[i]={})}})});function We(){Re=!0;for(var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0,e=r.length;t<e;++t)R[t]=r[t],N[r.charCodeAt(t)]=t;N[45]=62,N[95]=63}function zt(r){Re||We();var t,e,n,i,o,s,h=r.length;if(h%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o=r[h-2]==="="?2:r[h-1]==="="?1:0,s=new Vt(h*3/4-o),n=o>0?h-4:h;var l=0;for(t=0,e=0;t<n;t+=4,e+=3)i=N[r.charCodeAt(t)]<<18|N[r.charCodeAt(t+1)]<<12|N[r.charCodeAt(t+2)]<<6|N[r.charCodeAt(t+3)],s[l++]=i>>16&255,s[l++]=i>>8&255,s[l++]=i&255;return o===2?(i=N[r.charCodeAt(t)]<<2|N[r.charCodeAt(t+1)]>>4,s[l++]=i&255):o===1&&(i=N[r.charCodeAt(t)]<<10|N[r.charCodeAt(t+1)]<<4|N[r.charCodeAt(t+2)]>>2,s[l++]=i>>8&255,s[l++]=i&255),s}function Gt(r){return R[r>>18&63]+R[r>>12&63]+R[r>>6&63]+R[r&63]}function Jt(r,t,e){for(var n,i=[],o=t;o<e;o+=3)n=(r[o]<<16)+(r[o+1]<<8)+r[o+2],i.push(Gt(n));return i.join("")}function Ye(r){Re||We();for(var t,e=r.length,n=e%3,i="",o=[],s=16383,h=0,l=e-n;h<l;h+=s)o.push(Jt(r,h,h+s>l?l:h+s));return n===1?(t=r[e-1],i+=R[t>>2],i+=R[t<<4&63],i+="=="):n===2&&(t=(r[e-2]<<8)+r[e-1],i+=R[t>>10],i+=R[t>>4&63],i+=R[t<<2&63],i+="="),o.push(i),o.join("")}function me(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function C(r,t){if(me()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(r=new Uint8Array(t),r.__proto__=a.prototype):(r===null&&(r=new a(t)),r.length=t),r}function a(r,t,e){if(!a.TYPED_ARRAY_SUPPORT&&!(this instanceof a))return new a(r,t,e);if(typeof r=="number"){if(typeof t=="string")throw new Error("If encoding is specified then the first argument must be a string");return Ie(this,r)}return Ve(this,r,t,e)}function Ve(r,t,e,n){if(typeof t=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&t instanceof ArrayBuffer?Qt(r,t,e,n):typeof t=="string"?Ht(r,t,e):Xt(r,t)}function ze(r){if(typeof r!="number")throw new TypeError('"size" argument must be a number');if(r<0)throw new RangeError('"size" argument must not be negative')}function qt(r,t,e,n){return ze(t),t<=0?C(r,t):e!==void 0?typeof n=="string"?C(r,t).fill(e,n):C(r,t).fill(e):C(r,t)}function Ie(r,t){if(ze(t),r=C(r,t<0?0:ke(t)|0),!a.TYPED_ARRAY_SUPPORT)for(var e=0;e<t;++e)r[e]=0;return r}function Ht(r,t,e){if((typeof e!="string"||e==="")&&(e="utf8"),!a.isEncoding(e))throw new TypeError('"encoding" must be a valid string encoding');var n=Ge(t,e)|0;r=C(r,n);var i=r.write(t,e);return i!==n&&(r=r.slice(0,i)),r}function _e(r,t){var e=t.length<0?0:ke(t.length)|0;r=C(r,e);for(var n=0;n<e;n+=1)r[n]=t[n]&255;return r}function Qt(r,t,e,n){if(t.byteLength,e<0||t.byteLength<e)throw new RangeError("'offset' is out of bounds");if(t.byteLength<e+(n||0))throw new RangeError("'length' is out of bounds");return e===void 0&&n===void 0?t=new Uint8Array(t):n===void 0?t=new Uint8Array(t,e):t=new Uint8Array(t,e,n),a.TYPED_ARRAY_SUPPORT?(r=t,r.__proto__=a.prototype):r=_e(r,t),r}function Xt(r,t){if(I(t)){var e=ke(t.length)|0;return r=C(r,e),r.length===0||t.copy(r,0,0,e),r}if(t){if(typeof ArrayBuffer!="undefined"&&t.buffer instanceof ArrayBuffer||"length"in t)return typeof t.length!="number"||dr(t.length)?C(r,0):_e(r,t);if(t.type==="Buffer"&&Array.isArray(t.data))return _e(r,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ke(r){if(r>=me())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+me().toString(16)+" bytes");return r|0}function I(r){return!!(r!=null&&r._isBuffer)}function Ge(r,t){if(I(r))return r.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(r)||r instanceof ArrayBuffer))return r.byteLength;typeof r!="string"&&(r=""+r);var e=r.length;if(e===0)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return de(r).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return e*2;case"hex":return e>>>1;case"base64":return je(r).length;default:if(n)return de(r).length;t=(""+t).toLowerCase(),n=!0}}function Zt(r,t,e){var n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((e===void 0||e>this.length)&&(e=this.length),e<=0)||(e>>>=0,t>>>=0,e<=t))return"";for(r||(r="utf8");;)switch(r){case"hex":return ar(this,t,e);case"utf8":case"utf-8":return He(this,t,e);case"ascii":return or(this,t,e);case"latin1":case"binary":return sr(this,t,e);case"base64":return nr(this,t,e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fr(this,t,e);default:if(n)throw new TypeError("Unknown encoding: "+r);r=(r+"").toLowerCase(),n=!0}}function J(r,t,e){var n=r[t];r[t]=r[e],r[e]=n}function Je(r,t,e,n,i){if(r.length===0)return-1;if(typeof e=="string"?(n=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),e=+e,isNaN(e)&&(e=i?0:r.length-1),e<0&&(e=r.length+e),e>=r.length){if(i)return-1;e=r.length-1}else if(e<0)if(i)e=0;else return-1;if(typeof t=="string"&&(t=a.from(t,n)),I(t))return t.length===0?-1:Oe(r,t,e,n,i);if(typeof t=="number")return t=t&255,a.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?i?Uint8Array.prototype.indexOf.call(r,t,e):Uint8Array.prototype.lastIndexOf.call(r,t,e):Oe(r,[t],e,n,i);throw new TypeError("val must be string, number or Buffer")}function Oe(r,t,e,n,i){var o=1,s=r.length,h=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(r.length<2||t.length<2)return-1;o=2,s/=2,h/=2,e/=2}function l(E,te){return o===1?E[te]:E.readUInt16BE(te*o)}var m;if(i){var w=-1;for(m=e;m<s;m++)if(l(r,m)===l(t,w===-1?0:m-w)){if(w===-1&&(w=m),m-w+1===h)return w*o}else w!==-1&&(m-=m-w),w=-1}else for(e+h>s&&(e=s-h),m=e;m>=0;m--){for(var x=!0,L=0;L<h;L++)if(l(r,m+L)!==l(t,L)){x=!1;break}if(x)return m}return-1}function jt(r,t,e,n){e=Number(e)||0;var i=r.length-e;n?(n=Number(n),n>i&&(n=i)):n=i;var o=t.length;if(o%2!==0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;s<n;++s){var h=parseInt(t.substr(s*2,2),16);if(isNaN(h))return s;r[e+s]=h}return s}function Kt(r,t,e,n){return ye(de(t,r.length-e),r,e,n)}function qe(r,t,e,n){return ye(pr(t),r,e,n)}function er(r,t,e,n){return qe(r,t,e,n)}function tr(r,t,e,n){return ye(je(t),r,e,n)}function rr(r,t,e,n){return ye(mr(t,r.length-e),r,e,n)}function nr(r,t,e){return t===0&&e===r.length?Ye(r):Ye(r.slice(t,e))}function He(r,t,e){e=Math.min(r.length,e);for(var n=[],i=t;i<e;){var o=r[i],s=null,h=o>239?4:o>223?3:o>191?2:1;if(i+h<=e){var l,m,w,x;switch(h){case 1:o<128&&(s=o);break;case 2:l=r[i+1],(l&192)===128&&(x=(o&31)<<6|l&63,x>127&&(s=x));break;case 3:l=r[i+1],m=r[i+2],(l&192)===128&&(m&192)===128&&(x=(o&15)<<12|(l&63)<<6|m&63,x>2047&&(x<55296||x>57343)&&(s=x));break;case 4:l=r[i+1],m=r[i+2],w=r[i+3],(l&192)===128&&(m&192)===128&&(w&192)===128&&(x=(o&15)<<18|(l&63)<<12|(m&63)<<6|w&63,x>65535&&x<1114112&&(s=x))}}s===null?(s=65533,h=1):s>65535&&(s-=65536,n.push(s>>>10&1023|55296),s=56320|s&1023),n.push(s),i+=h}return ir(n)}function ir(r){var t=r.length;if(t<=Fe)return String.fromCharCode.apply(String,r);for(var e="",n=0;n<t;)e+=String.fromCharCode.apply(String,r.slice(n,n+=Fe));return e}function or(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]&127);return n}function sr(r,t,e){var n="";e=Math.min(r.length,e);for(var i=t;i<e;++i)n+=String.fromCharCode(r[i]);return n}function ar(r,t,e){var n=r.length;(!t||t<0)&&(t=0),(!e||e<0||e>n)&&(e=n);for(var i="",o=t;o<e;++o)i+=lr(r[o]);return i}function fr(r,t,e){for(var n=r.slice(t,e),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+n[o+1]*256);return i}function y(r,t,e){if(r%1!==0||r<0)throw new RangeError("offset is not uint");if(r+t>e)throw new RangeError("Trying to access beyond buffer length")}function A(r,t,e,n,i,o){if(!I(r))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(e+n>r.length)throw new RangeError("Index out of range")}function we(r,t,e,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(r.length-e,2);i<o;++i)r[e+i]=(t&255<<8*(n?i:1-i))>>>(n?i:1-i)*8}function xe(r,t,e,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(r.length-e,4);i<o;++i)r[e+i]=t>>>(n?i:3-i)*8&255}function Qe(r,t,e,n,i,o){if(e+n>r.length)throw new RangeError("Index out of range");if(e<0)throw new RangeError("Index out of range")}function Xe(r,t,e,n,i){return i||Qe(r,t,e,4,34028234663852886e22,-34028234663852886e22),et(r,t,e,n,23,4),e+4}function Ze(r,t,e,n,i){return i||Qe(r,t,e,8,17976931348623157e292,-17976931348623157e292),et(r,t,e,n,52,8),e+8}function cr(r){if(r=hr(r).replace(ur,""),r.length<2)return"";for(;r.length%4!==0;)r=r+"=";return r}function hr(r){return r.trim?r.trim():r.replace(/^\s+|\s+$/g,"")}function lr(r){return r<16?"0"+r.toString(16):r.toString(16)}function de(r,t){t=t||1/0;for(var e,n=r.length,i=null,o=[],s=0;s<n;++s){if(e=r.charCodeAt(s),e>55295&&e<57344){if(!i){if(e>56319){(t-=3)>-1&&o.push(239,191,189);continue}else if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=e;continue}if(e<56320){(t-=3)>-1&&o.push(239,191,189),i=e;continue}e=(i-55296<<10|e-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,e<128){if((t-=1)<0)break;o.push(e)}else if(e<2048){if((t-=2)<0)break;o.push(e>>6|192,e&63|128)}else if(e<65536){if((t-=3)<0)break;o.push(e>>12|224,e>>6&63|128,e&63|128)}else if(e<1114112){if((t-=4)<0)break;o.push(e>>18|240,e>>12&63|128,e>>6&63|128,e&63|128)}else throw new Error("Invalid code point")}return o}function pr(r){for(var t=[],e=0;e<r.length;++e)t.push(r.charCodeAt(e)&255);return t}function mr(r,t){for(var e,n,i,o=[],s=0;s<r.length&&!((t-=2)<0);++s)e=r.charCodeAt(s),n=e>>8,i=e%256,o.push(i),o.push(n);return o}function je(r){return zt(cr(r))}function ye(r,t,e,n){for(var i=0;i<n&&!(i+e>=t.length||i>=r.length);++i)t[i+e]=r[i];return i}function dr(r){return r!==r}function wr(r){return r!=null&&(!!r._isBuffer||Ke(r)||xr(r))}function Ke(r){return!!r.constructor&&typeof r.constructor.isBuffer=="function"&&r.constructor.isBuffer(r)}function xr(r){return typeof r.readFloatLE=="function"&&typeof r.slice=="function"&&Ke(r.slice(0,0))}function ge(r,t,e,n,i){var o,s,h=i*8-n-1,l=(1<<h)-1,m=l>>1,w=-7,x=e?i-1:0,L=e?-1:1,E=r[t+x];for(x+=L,o=E&(1<<-w)-1,E>>=-w,w+=h;w>0;o=o*256+r[t+x],x+=L,w-=8);for(s=o&(1<<-w)-1,o>>=-w,w+=n;w>0;s=s*256+r[t+x],x+=L,w-=8);if(o===0)o=1-m;else{if(o===l)return s?NaN:(E?-1:1)*(1/0);s=s+Math.pow(2,n),o=o-m}return(E?-1:1)*s*Math.pow(2,o-n)}function et(r,t,e,n,i,o){var s,h,l,m=o*8-i-1,w=(1<<m)-1,x=w>>1,L=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,E=n?0:o-1,te=n?1:-1,ft=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(h=isNaN(t)?1:0,s=w):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+x>=1?t+=L/l:t+=L*Math.pow(2,1-x),t*l>=2&&(s++,l/=2),s+x>=w?(h=0,s=w):s+x>=1?(h=(t*l-1)*Math.pow(2,i),s=s+x):(h=t*Math.pow(2,x-1)*Math.pow(2,i),s=0));i>=8;r[e+E]=h&255,E+=te,h/=256,i-=8);for(s=s<<i|h,m+=i;m>0;r[e+E]=s&255,E+=te,s/=256,m-=8);r[e+E-te]|=ft*128}var R,N,Vt,Re,Fe,ur,tt=Le(()=>{"use strict";u();c();R=[],N=[],Vt=typeof Uint8Array!="undefined"?Uint8Array:Array,Re=!1;a.TYPED_ARRAY_SUPPORT=globalThis.TYPED_ARRAY_SUPPORT!==void 0?globalThis.TYPED_ARRAY_SUPPORT:!0;a.poolSize=8192;a._augment=function(r){return r.__proto__=a.prototype,r};a.from=function(r,t,e){return Ve(null,r,t,e)};a.kMaxLength=me();a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&a[Symbol.species]);a.alloc=function(r,t,e){return qt(null,r,t,e)};a.allocUnsafe=function(r){return Ie(null,r)};a.allocUnsafeSlow=function(r){return Ie(null,r)};a.isBuffer=wr;a.compare=function(t,e){if(!I(t)||!I(e))throw new TypeError("Arguments must be Buffers");if(t===e)return 0;for(var n=t.length,i=e.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==e[o]){n=t[o],i=e[o];break}return n<i?-1:i<n?1:0};a.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}};a.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(t.length===0)return a.alloc(0);var n;if(e===void 0)for(e=0,n=0;n<t.length;++n)e+=t[n].length;var i=a.allocUnsafe(e),o=0;for(n=0;n<t.length;++n){var s=t[n];if(!I(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i};a.byteLength=Ge;a.prototype._isBuffer=!0;a.prototype.swap16=function(){var t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)J(this,e,e+1);return this};a.prototype.swap32=function(){var t=this.length;if(t%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)J(this,e,e+3),J(this,e+1,e+2);return this};a.prototype.swap64=function(){var t=this.length;if(t%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)J(this,e,e+7),J(this,e+1,e+6),J(this,e+2,e+5),J(this,e+3,e+4);return this};a.prototype.toString=function(){var t=this.length|0;return t===0?"":arguments.length===0?He(this,0,t):Zt.apply(this,arguments)};a.prototype.equals=function(t){if(!I(t))throw new TypeError("Argument must be a Buffer");return this===t?!0:a.compare(this,t)===0};a.prototype.compare=function(t,e,n,i,o){if(!I(t))throw new TypeError("Argument must be a Buffer");if(e===void 0&&(e=0),n===void 0&&(n=t?t.length:0),i===void 0&&(i=0),o===void 0&&(o=this.length),e<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&e>=n)return 0;if(i>=o)return-1;if(e>=n)return 1;if(e>>>=0,n>>>=0,i>>>=0,o>>>=0,this===t)return 0;for(var s=o-i,h=n-e,l=Math.min(s,h),m=this.slice(i,o),w=t.slice(e,n),x=0;x<l;++x)if(m[x]!==w[x]){s=m[x],h=w[x];break}return s<h?-1:h<s?1:0};a.prototype.includes=function(t,e,n){return this.indexOf(t,e,n)!==-1};a.prototype.indexOf=function(t,e,n){return Je(this,t,e,n,!0)};a.prototype.lastIndexOf=function(t,e,n){return Je(this,t,e,n,!1)};a.prototype.write=function(t,e,n,i){if(e===void 0)i="utf8",n=this.length,e=0;else if(n===void 0&&typeof e=="string")i=e,n=this.length,e=0;else if(isFinite(e))e=e|0,isFinite(n)?(n=n|0,i===void 0&&(i="utf8")):(i=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var o=this.length-e;if((n===void 0||n>o)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return jt(this,t,e,n);case"utf8":case"utf-8":return Kt(this,t,e,n);case"ascii":return qe(this,t,e,n);case"latin1":case"binary":return er(this,t,e,n);case"base64":return tr(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return rr(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}};a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};Fe=4096;a.prototype.slice=function(t,e){var n=this.length;t=~~t,e=e===void 0?n:~~e,t<0?(t+=n,t<0&&(t=0)):t>n&&(t=n),e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),e<t&&(e=t);var i;if(a.TYPED_ARRAY_SUPPORT)i=this.subarray(t,e),i.__proto__=a.prototype;else{var o=e-t;i=new a(o,void 0);for(var s=0;s<o;++s)i[s]=this[s+t]}return i};a.prototype.readUIntLE=function(t,e,n){t=t|0,e=e|0,n||y(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return i};a.prototype.readUIntBE=function(t,e,n){t=t|0,e=e|0,n||y(t,e,this.length);for(var i=this[t+--e],o=1;e>0&&(o*=256);)i+=this[t+--e]*o;return i};a.prototype.readUInt8=function(t,e){return e||y(t,1,this.length),this[t]};a.prototype.readUInt16LE=function(t,e){return e||y(t,2,this.length),this[t]|this[t+1]<<8};a.prototype.readUInt16BE=function(t,e){return e||y(t,2,this.length),this[t]<<8|this[t+1]};a.prototype.readUInt32LE=function(t,e){return e||y(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};a.prototype.readUInt32BE=function(t,e){return e||y(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};a.prototype.readIntLE=function(t,e,n){t=t|0,e=e|0,n||y(t,e,this.length);for(var i=this[t],o=1,s=0;++s<e&&(o*=256);)i+=this[t+s]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i};a.prototype.readIntBE=function(t,e,n){t=t|0,e=e|0,n||y(t,e,this.length);for(var i=e,o=1,s=this[t+--i];i>0&&(o*=256);)s+=this[t+--i]*o;return o*=128,s>=o&&(s-=Math.pow(2,8*e)),s};a.prototype.readInt8=function(t,e){return e||y(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};a.prototype.readInt16LE=function(t,e){e||y(t,2,this.length);var n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};a.prototype.readInt16BE=function(t,e){e||y(t,2,this.length);var n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};a.prototype.readInt32LE=function(t,e){return e||y(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};a.prototype.readInt32BE=function(t,e){return e||y(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};a.prototype.readFloatLE=function(t,e){return e||y(t,4,this.length),ge(this,t,!0,23,4)};a.prototype.readFloatBE=function(t,e){return e||y(t,4,this.length),ge(this,t,!1,23,4)};a.prototype.readDoubleLE=function(t,e){return e||y(t,8,this.length),ge(this,t,!0,52,8)};a.prototype.readDoubleBE=function(t,e){return e||y(t,8,this.length),ge(this,t,!1,52,8)};a.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;A(this,t,e,n,o,0)}var s=1,h=0;for(this[e]=t&255;++h<n&&(s*=256);)this[e+h]=t/s&255;return e+n};a.prototype.writeUIntBE=function(t,e,n,i){if(t=+t,e=e|0,n=n|0,!i){var o=Math.pow(2,8*n)-1;A(this,t,e,n,o,0)}var s=n-1,h=1;for(this[e+s]=t&255;--s>=0&&(h*=256);)this[e+s]=t/h&255;return e+n};a.prototype.writeUInt8=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,1,255,0),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=t&255,e+1};a.prototype.writeUInt16LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):we(this,t,e,!0),e+2};a.prototype.writeUInt16BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):we(this,t,e,!1),e+2};a.prototype.writeUInt32LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=t&255):xe(this,t,e,!0),e+4};a.prototype.writeUInt32BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):xe(this,t,e,!1),e+4};a.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);A(this,t,e,n,o-1,-o)}var s=0,h=1,l=0;for(this[e]=t&255;++s<n&&(h*=256);)t<0&&l===0&&this[e+s-1]!==0&&(l=1),this[e+s]=(t/h>>0)-l&255;return e+n};a.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e=e|0,!i){var o=Math.pow(2,8*n-1);A(this,t,e,n,o-1,-o)}var s=n-1,h=1,l=0;for(this[e+s]=t&255;--s>=0&&(h*=256);)t<0&&l===0&&this[e+s+1]!==0&&(l=1),this[e+s]=(t/h>>0)-l&255;return e+n};a.prototype.writeInt8=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,1,127,-128),a.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=t&255,e+1};a.prototype.writeInt16LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8):we(this,t,e,!0),e+2};a.prototype.writeInt16BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=t&255):we(this,t,e,!1),e+2};a.prototype.writeInt32LE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[e]=t&255,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):xe(this,t,e,!0),e+4};a.prototype.writeInt32BE=function(t,e,n){return t=+t,e=e|0,n||A(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),a.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=t&255):xe(this,t,e,!1),e+4};a.prototype.writeFloatLE=function(t,e,n){return Xe(this,t,e,!0,n)};a.prototype.writeFloatBE=function(t,e,n){return Xe(this,t,e,!1,n)};a.prototype.writeDoubleLE=function(t,e,n){return Ze(this,t,e,!0,n)};a.prototype.writeDoubleBE=function(t,e,n){return Ze(this,t,e,!1,n)};a.prototype.copy=function(t,e,n,i){if(n||(n=0),!i&&i!==0&&(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i<n&&(i=n),i===n||t.length===0||this.length===0)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e<i-n&&(i=t.length-e+n);var o=i-n,s;if(this===t&&n<e&&e<i)for(s=o-1;s>=0;--s)t[s+e]=this[s+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<o;++s)t[s+e]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),e);return o};a.prototype.fill=function(t,e,n,i){if(typeof t=="string"){if(typeof e=="string"?(i=e,e=0,n=this.length):typeof n=="string"&&(i=n,n=this.length),t.length===1){var o=t.charCodeAt(0);o<256&&(t=o)}if(i!==void 0&&typeof i!="string")throw new TypeError("encoding must be a string");if(typeof i=="string"&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i)}else typeof t=="number"&&(t=t&255);if(e<0||this.length<e||this.length<n)throw new RangeError("Out of range index");if(n<=e)return this;e=e>>>0,n=n===void 0?this.length:n>>>0,t||(t=0);var s;if(typeof t=="number")for(s=e;s<n;++s)this[s]=t;else{var h=I(t)?t:de(new a(t,i).toString()),l=h.length;for(s=0;s<n-e;++s)this[s+e]=h[s%l]}return this};ur=/[^+\/0-9A-Za-z-_]/g});var c=Le(()=>{"use strict";tt()});u();c();function se(r){throw new Error("Unexpected value: "+JSON.stringify(r))}u();c();u();c();function yr(r){return Object.keys(r)}var ue={};dt(ue,{Array:()=>q,AstNode:()=>p,Attribute:()=>H,Class:()=>B,ClassInstantiation:()=>k,ClassReference:()=>g,CodeBlock:()=>T,DataClass:()=>X,Enum:()=>Z,Field:()=>j,Map:()=>K,Method:()=>M,MethodInvocation:()=>P,Parameter:()=>U,Trait:()=>Q,Type:()=>_,TypeLiteral:()=>V,Writer:()=>O,array:()=>Rr,assignVariable:()=>Fr,attribute:()=>Ir,classReference:()=>Cr,class_:()=>kr,codeblock:()=>ee,dataClass:()=>Sr,enum_:()=>Br,field:()=>Ur,instantiateClass:()=>at,invokeMethod:()=>Mr,map:()=>Dr,mergeArrays:()=>zr,method:()=>$r,parameter:()=>Yr,string:()=>Vr,ternary:()=>Or,this_:()=>Gr,throwException:()=>Pr,trait:()=>br,variable:()=>Wr});u();c();u();c();u();c();var S=class{};u();c();u();c();var Y=class extends S{constructor(e){super();f(this,"value");this.value=e}write(e){typeof this.value=="string"?e.write(this.value):this.value(e)}};var gr=4,ae=class{constructor(){f(this,"buffer","");f(this,"indentLevel",0);f(this,"hasWrittenAnything",!1);f(this,"lastCharacterIsNewline",!1)}write(t){let e=t.length>0&&t.endsWith(`
2
+ `),n=e?t.substring(0,t.length-1):t,i=this.getIndentString(),o=n.replaceAll(`
3
+ `,`
4
+ ${i}`);this.isAtStartOfLine()&&(o=i+o),e&&(o+=`
5
+ `),this.writeInternal(o)}writeNoIndent(t){let e=this.indentLevel;this.indentLevel=0,this.write(t),this.indentLevel=e}writeNode(t){t.write(this)}writeNodeOrString(t){if(typeof t=="string"){this.write(t);return}this.writeNode(t)}writeNodeStatement(t){t.write(this),this.write(";"),this.writeNewLineIfLastLineNot()}writeTextStatement(t){new Y(t).write(this),this.write(";"),this.writeNewLineIfLastLineNot()}controlFlow(t,e){new Y(t).write(this),this.write(" ("),this.writeNode(e),this.write(") {"),this.writeNewLineIfLastLineNot(),this.indent()}endControlFlow(){this.dedent(),this.writeLine("}")}openBlock(t,e="{",n,i="}"){let o=t.filter(s=>s!==void 0).join(" ");o?this.write(`${o} ${e!=null?e:""}`):this.write(e!=null?e:"");try{this.indent(),n(),this.dedent()}finally{this.write(i!=null?i:"")}}writeLine(t=""){this.write(t),this.writeNewLineIfLastLineNot()}newLine(){this.writeInternal(`
6
+ `)}writeNewLineIfLastLineNot(){this.lastCharacterIsNewline||this.writeInternal(`
7
+ `)}indent(){this.indentLevel++}dedent(){this.indentLevel--}delimit({nodes:t,delimiter:e,writeFunction:n}){if(t.length>0){let i=t[0];i!=null&&n(i);for(let o=1;o<t.length;o++){this.write(e);let s=t[o];s!=null&&n(s)}}}toString(){return this.buffer}writeInternal(t){return t.length>0&&(this.hasWrittenAnything=!0,this.lastCharacterIsNewline=t.endsWith(`
8
+ `)),this.buffer+=t}isAtStartOfLine(){return this.lastCharacterIsNewline||!this.hasWrittenAnything}getIndentString(){return" ".repeat(this.indentLevel*gr)}};u();c();function be(r){return(r==null?void 0:r.name)!=null}u();c();var fe=class extends S{constructor({condition:e,true_:n,false_:i}){super();f(this,"condition");f(this,"true_");f(this,"false_");this.condition=e,this.true_=n,this.false_=i}write(e){e.writeNode(this.condition),e.write(" ? "),e.writeNode(this.true_),e.write(" : "),e.writeNode(this.false_)}};u();c();u();c();u();c();u();c();u();c();var Te="";function rt(r){return{namespace:r.substring(0,r.lastIndexOf("\\")),name:r.substring(r.lastIndexOf("\\")+1)}}var O=class extends ae{constructor({namespace:e,rootNamespace:n,customConfig:i}){super();f(this,"namespace");f(this,"rootNamespace");f(this,"customConfig");f(this,"references",{});this.namespace=e,this.rootNamespace=n,this.customConfig=i}addReference(e){var s,h;if(e.namespace==null)return;if(Object.keys(this.references).filter(l=>{let m=rt(l);return m.namespace!==e.namespace&&m.name===e.name}).length>0){e.requireFullyQualified();return}let i=e.namespace===Te?e.name:`${e.namespace}\\${e.name}`;((h=(s=this.references)[i])!=null?h:s[i]=[]).push(e)}toString(){let e=`namespace ${this.namespace};`,n=this.stringifyImports();return n.length>0?`${e}
9
+
10
+ ${n}
11
+
12
+ ${this.buffer}`:e+`
13
+
14
+ `+this.buffer}stringifyImports(){let e=Object.keys(this.references);return e.length===0?"":e.filter(n=>rt(n).namespace!==this.namespace).map(n=>`use ${n};`).join(`
15
+ `)}};var p=class extends S{toString(t){if(t==null)throw new Error("Internal error; AstNode.toString method called incorrectly.");let{namespace:e,rootNamespace:n,customConfig:i}=t,o=new O({namespace:e,rootNamespace:n,customConfig:i});return this.write(o),o.toString()}async toStringAsync({namespace:t,rootNamespace:e,customConfig:n}){let i=new O({namespace:t,rootNamespace:e,customConfig:n});return this.write(i),i.toString()}};var q=class extends p{constructor({entries:e}){super();f(this,"entries");this.entries=e!=null?e:[]}write(e){e.write("["),this.entries.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.write("]")}};u();c();var H=class extends p{constructor(e){var n;super();f(this,"reference");f(this,"arguments");this.reference=e.reference,this.arguments=(n=e.arguments)!=null?n:[]}write(e){e.addReference(this.reference),e.write(`${this.reference.name}`),this.arguments.length>0&&(e.write("("),this.arguments.forEach((n,i)=>{i>0&&e.write(","),typeof n=="string"?e.write(n):n.write(e)}),e.write(")"))}};u();c();u();c();var g=class extends p{constructor({name:e,namespace:n}){super();f(this,"name");f(this,"namespace");f(this,"fullyQualified");this.name=e,this.namespace=n,this.fullyQualified=!1}requireFullyQualified(){this.fullyQualified=!0}write(e){e.addReference(this);let n=this.fullyQualified?`\\${this.namespace}\\${this.name}`:this.name;e.write(`${n}`)}};u();c();u();c();function F(r){return r.startsWith("$")?r:`$${r}`}var v=class extends p{constructor({docs:e}={}){super();f(this,"docs");f(this,"tags",[]);this.docs=e}addTag(e){this.tags.push(le(he({},e),{name:e.name!=null?F(e.name):void 0}))}write(e){e.writeLine("/**"),this.docs!=null&&(this.docs.split(`
16
+ `).forEach(n=>{e.writeLine(` * ${n}`)}),this.tags.length>0&&e.writeLine(" *"));for(let n of this.tags)this.writeTag({writer:e,tag:n});e.writeLine(" */")}writeTag({writer:e,tag:n}){let i=n.docs!=null?n.docs.split(`
17
+ `):void 0;i!=null&&i.length>1&&(i.forEach(o=>{e.writeLine(` * ${o}`)}),e.writeLine(" *")),e.write(` * @${n.tagType} `),n.type.write(e,{comment:!0}),n.name!=null&&e.write(` ${n.name}`),i!=null&&i.length===1&&e.write(` ${i[0]}`),e.newLine()}};u();c();u();c();var Ae={Public:"public",Private:"private",Protected:"protected"};function W(r){return Tr(r,[Ae.Public,Ae.Protected,Ae.Private])}function Tr(r,t){return t.reduce((e,n)=>[...e,...r.filter(i=>i.access===n)],[])}var B=class extends p{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:s,traits:h}){super();f(this,"name");f(this,"namespace");f(this,"abstract");f(this,"docs");f(this,"parentClassReference");f(this,"traits");f(this,"fields",[]);f(this,"methods",[]);f(this,"constructor_");this.name=e,this.namespace=n,this.abstract=i!=null?i:!1,this.docs=o,this.parentClassReference=s,this.traits=h!=null?h:[]}addConstructor(e){this.constructor_=e}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}addTrait(e){this.traits.push(e)}write(e){e.addReference(new g({name:this.name,namespace:this.namespace})),this.abstract&&e.write("abstract "),this.writeComment(e),e.write(`class ${this.name} `),this.parentClassReference!=null&&(e.write("extends "),this.parentClassReference.write(e)),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:W(this.fields)}),(this.constructor!=null||this.methods.length>0)&&e.newLine(),this.constructor_!=null&&(this.writeConstructor({writer:e,constructor:this.constructor_}),this.methods.length>0&&e.newLine()),this.writeMethods({writer:e,methods:W(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({docs:this.docs}).write(e)}writeConstructor({writer:e,constructor:n}){var i;this.writeConstructorComment({writer:e,constructor:n}),n.access!=null&&e.write(`${n.access} `),e.write("function __construct("),e.indent(),n.parameters.forEach((o,s)=>{s===0&&e.newLine(),o.write(e),e.writeLine(",")}),e.dedent(),e.writeLine(")"),e.writeLine("{"),e.indent(),(i=n.body)==null||i.write(e),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeConstructorComment({writer:e,constructor:n}){if(n.parameters.length===0)return;let i=new v;for(let o of n.parameters)i.addTag(o.getCommentTag());i.write(e)}writeFields({writer:e,fields:n}){n.filter(i=>!i.inherited).forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};u();c();var Q=class extends p{constructor({name:e,namespace:n,docs:i,traits:o}){super();f(this,"name");f(this,"namespace");f(this,"docs");f(this,"traits");f(this,"fields",[]);f(this,"methods",[]);this.name=e,this.namespace=n,this.docs=i,this.traits=o!=null?o:[]}addField(e){this.fields.push(e)}addMethod(e){this.methods.push(e)}write(e){this.writeComment(e),e.write(`trait ${this.name} `),e.newLine(),e.writeLine("{"),e.indent(),this.traits.length>0&&(e.write("use "),this.traits.forEach((n,i)=>{i>0&&e.write(","),e.writeNode(n)}),e.writeTextStatement(""),e.newLine()),this.writeFields({writer:e,fields:W(this.fields)}),this.writeMethods({writer:e,methods:W(this.methods)}),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({docs:this.docs}).write(e)}writeFields({writer:e,fields:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}writeMethods({writer:e,methods:n}){n.forEach((i,o)=>{o>0&&e.newLine(),i.write(e),e.writeNewLineIfLastLineNot()})}};u();c();u();c();function ie({writer:r,arguments_:t,multiline:e}){if(t.length===0){r.write("()");return}if(e){Ar({writer:r,arguments_:t});return}Er({writer:r,arguments_:t})}function Ar({writer:r,arguments_:t}){r.writeLine("("),r.indent();for(let e of t)nt({writer:r,argument:e}),r.writeLine(",");r.dedent(),r.write(")")}function Er({writer:r,arguments_:t}){r.write("("),t.forEach((e,n)=>{n>0&&r.write(", "),nt({writer:r,argument:e})}),r.write(")")}function nt({writer:r,argument:t}){be(t)?(r.write(`${t.name}: `),r.writeNodeOrString(t.assignment)):t.write(r)}var k=class extends p{constructor({classReference:e,arguments_:n,multiline:i}){super();f(this,"classReference");f(this,"arguments_");f(this,"multiline");this.classReference=e,this.arguments_=n,this.multiline=i!=null?i:!1}write(e){e.write("new "),e.writeNode(this.classReference),ie({writer:e,arguments_:this.arguments_,multiline:this.multiline})}};u();c();var T=class extends p{constructor(e){super();f(this,"arg");this.arg=e}write(e){return new Y(this.arg).write(e)}};u();c();u();c();u();c();var U=class extends p{constructor({name:e,type:n,docs:i,initializer:o,access:s,readonly_:h}){super();f(this,"name");f(this,"type");f(this,"docs");f(this,"initializer");f(this,"access");f(this,"readonly_");this.name=F(e),this.type=n,this.docs=i,this.initializer=o,this.access=s,this.readonly_=h!=null?h:!1}getCommentTag(){return{tagType:"param",type:this.type,name:this.name,docs:this.docs}}write(e){this.access!=null&&e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null?(e.write(" = "),this.initializer.write(e)):this.type.isOptional()&&e.write(" = null")}};u();c();var _=class r extends p{constructor(e){super();f(this,"internalType");this.internalType=e}write(e,{comment:n}={}){switch(this.internalType.type){case"int":e.write("int");break;case"string":e.write("string");break;case"bool":e.write("bool");break;case"float":e.write("float");break;case"date":e.addReference(it),e.write("DateTime");break;case"dateTime":e.addReference(it),e.write("DateTime");break;case"mixed":e.write("mixed");break;case"object":e.write("object");break;case"array":if(!n){e.write("array");break}e.write("array<"),this.internalType.value.write(e,{comment:n}),e.write(">");break;case"map":{if(!n){e.write("array");break}e.write("array<"),this.internalType.keyType.write(e,{comment:n}),e.write(", "),this.internalType.valueType.write(e,{comment:n}),e.write(">");break}case"null":{e.write("null");break}case"typeDict":{if(!n){e.write("array");break}if(this.internalType.multiline){e.writeLine("array{");for(let i of this.internalType.entries)e.write(" * "),this.writeTypeDictEntry({writer:e,entry:i,comment:n}),e.writeLine(",");e.write(" * }");break}e.write("array{"),this.internalType.entries.forEach((i,o)=>{o>0&&e.write(", "),this.writeTypeDictEntry({writer:e,entry:i,comment:n})}),e.write("}");break}case"union":{this.getUniqueTypes({types:this.internalType.types,comment:n,writer:e}).forEach((o,s)=>{s>0&&e.write("|"),o.write(e,{comment:n}),s++});break}case"optional":{let i=this.internalType.value.internalType.type==="mixed",o=this.internalType.value.internalType.type==="union";!o&&!i&&e.write("?"),this.internalType.value.write(e,{comment:n}),o&&(e.write("|"),e.writeNode(r.null()));break}case"reference":e.writeNode(this.internalType.value);break;case"enumString":n?(e.write("value-of<"),e.writeNode(this.internalType.value),e.write(">")):e.write("string");break;default:se(this.internalType)}}toOptionalIfNotAlready(){return this.internalType.type==="optional"?this:r.optional(this)}underlyingTypeIfOptional(){if(this.internalType.type==="optional")return this.internalType.value}underlyingType(){var e;return(e=this.underlyingTypeIfOptional())!=null?e:this}isOptional(){return this.internalType.type==="optional"}static int(){return new this({type:"int"})}static string(){return new this({type:"string"})}static bool(){return new this({type:"bool"})}static float(){return new this({type:"float"})}static date(){return new this({type:"date"})}static dateTime(){return new this({type:"dateTime"})}static mixed(){return new this({type:"mixed"})}static object(){return new this({type:"object"})}static array(e){return new this({type:"array",value:e})}static map(e,n){return new this({type:"map",keyType:e,valueType:n})}static typeDict(e,{multiline:n}={}){return new this({type:"typeDict",entries:e,multiline:n})}static union(e){return new this({type:"union",types:e})}static optional(e){return this.isAlreadyOptional(e)?e:new this({type:"optional",value:e})}static null(){return new this({type:"null"})}static reference(e){return new this({type:"reference",value:e})}static enumString(e){return new this({type:"enumString",value:e})}static isAlreadyOptional(e){return e.internalType.type==="optional"}writeTypeDictEntry({writer:e,entry:n,comment:i}){e.write(n.key),n.optional&&e.write("?"),e.write(": "),n.valueType.write(e,{comment:i})}getUniqueTypes({writer:e,types:n,comment:i}){let o=new Set;return n.filter(s=>{if(i)return!0;let h=s.toString({namespace:e.namespace,rootNamespace:e.rootNamespace,customConfig:e.customConfig});return o.has(h)?!1:(o.add(h),!0)})}},it=new g({namespace:Te,name:"DateTime"});u();c();function ot(r){return r.startsWith("$")?r.slice(1):r}var st="values",X=class extends p{constructor({name:e,namespace:n,abstract:i,docs:o,parentClassReference:s,traits:h}){super();f(this,"name");f(this,"namespace");f(this,"class_");this.name=e,this.namespace=n,this.class_=new B({name:e,namespace:n,abstract:i,docs:o,parentClassReference:s,traits:h})}addField(e){this.class_.addField(e)}addMethod(e){this.class_.addMethod(e)}addTrait(e){this.class_.addTrait(e)}write(e){let n=W(this.class_.fields).map(i=>le(he({},i),{name:ot(i.name)}));n.length>0&&this.class_.addConstructor({access:"public",parameters:this.getConstructorParameters({orderedFields:n}),body:ue.codeblock(i=>{for(let o of n)i.write(`$this->${o.name} = $${st}['${o.name}']`),o.type.isOptional()&&i.write(" ?? null"),i.write(";")})}),this.class_.write(e)}allFieldsAreOptional(){return this.class_.fields.every(e=>e.type.isOptional())}getConstructorParameters({orderedFields:e}){return[new U({name:st,type:_.typeDict(e.map(n=>({key:n.name,valueType:n.type,optional:n.type.isOptional()})),{multiline:!0}),initializer:this.allFieldsAreOptional()?new T("[]"):void 0})]}};u();c();u();c();var M=class extends p{constructor({name:e,access:n,parameters:i,throws:o,return_:s,body:h,docs:l,classReference:m}){super();f(this,"name");f(this,"access");f(this,"parameters");f(this,"throws");f(this,"return_");f(this,"body");f(this,"docs");f(this,"classReference");this.name=e,this.access=n,this.parameters=i,this.throws=o!=null?o:[],this.return_=s,this.body=h,this.docs=l,this.classReference=m}write(e){var n;this.writeComment(e),e.write(`${this.access} function ${this.name}(`),this.parameters.forEach((i,o)=>{o>0&&e.write(", "),i.write(e)}),e.write("): "),this.return_!=null?this.return_.write(e):e.write("void"),e.writeLine(" {"),e.indent(),(n=this.body)==null||n.write(e),e.dedent(),e.writeLine("}")}writeComment(e){let n=new v({docs:this.docs});for(let i of this.parameters)n.addTag({tagType:"param",type:i.type,name:i.name,docs:i.docs});this.return_!=null&&n.addTag({tagType:"return",type:this.return_});for(let i of this.throws)n.addTag({tagType:"throws",type:_.reference(i)});e.writeNode(n)}};var Z=class extends p{constructor({name:e,namespace:n,backing:i,docs:o,serializable:s}){super();f(this,"name");f(this,"namespace");f(this,"backing");f(this,"docs");f(this,"members",[]);f(this,"serializable");this.name=e,this.namespace=n,this.backing=i,this.docs=o,this.serializable=s!=null?s:!1}addMember(e){this.members.push(e)}write(e){this.writeComment(e),e.write("enum "),e.writeLine(`${this.name}`),this.backing!=null&&e.write(` : ${this.backing}`),this.serializable&&(e.addReference(new g({name:"JsonSerializable",namespace:""})),e.writeLine(" implements JsonSerializable")),e.writeLine(" {"),e.indent();for(let n of this.members)e.write(`case ${n.name}`),n.value!=null&&(typeof n.value=="string"?e.write(` = "${n.value}"`):e.write(` = ${n.value}`)),e.writeTextStatement("");this.serializable&&(e.newLine(),e.writeNode(new M({name:"jsonSerialize",return_:_.string(),access:"public",parameters:[],body:new T("return $this->value;")}))),e.writeNewLineIfLastLineNot(),e.dedent(),e.writeLine("}")}writeComment(e){if(this.docs==null)return;new v({docs:this.docs}).write(e)}};u();c();var j=class extends p{constructor({name:e,type:n,access:i,readonly_:o,initializer:s,docs:h,inlineDocs:l,attributes:m,inherited:w}){super();f(this,"name");f(this,"type");f(this,"access");f(this,"readonly_");f(this,"initializer");f(this,"docs");f(this,"inlineDocs");f(this,"attributes");f(this,"inherited");this.name=F(e),this.type=n,this.access=i,this.readonly_=o!=null?o:!1,this.initializer=s,this.docs=h,this.inlineDocs=l,this.attributes=m!=null?m:[],this.inherited=w!=null?w:!1}write(e){this.writeComment(e),this.writeAttributesIfPresent(e),e.write(`${this.access} `),this.readonly_&&e.write("readonly "),this.type.write(e),e.write(` ${this.name}`),this.initializer!=null&&(e.write(" = "),this.initializer.write(e)),e.write(";"),this.inlineDocs!=null&&e.write(` // ${this.inlineDocs}`),e.newLine()}writeComment(e){let n=new v;n.addTag({tagType:"var",type:this.type,name:this.name,docs:this.docs}),n.write(e)}writeAttributesIfPresent(e){this.attributes.length>0&&(e.write("#["),this.attributes.forEach((n,i)=>{i>0&&e.write(", "),n.write(e)}),e.writeLine("]"))}};u();c();var K=class extends p{constructor({entries:e,multiline:n}){super();f(this,"entries");f(this,"multiline");this.entries=e!=null?e:[],this.multiline=n!=null?n:!1}write(e){if(this.multiline){this.writeMultiline(e);return}this.writeCompact(e)}writeMultiline(e){e.writeLine("["),e.indent();for(let{key:n,value:i}of this.entries)n.write(e),e.write(" => "),i.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeCompact(e){e.write("[");for(let[n,{key:i,value:o}]of this.entries.entries())n>0&&e.write(", "),i.write(e),e.write(" => "),o.write(e);e.write("]")}};u();c();var P=class extends p{constructor({method:e,arguments_:n,static_:i,multiline:o,on:s}){super();f(this,"method");f(this,"arguments_");f(this,"multiline");f(this,"static_");f(this,"on");this.method=e,this.arguments_=n,this.static_=i!=null?i:!1,this.multiline=o!=null?o:!1,this.on=s}write(e){this.on!=null&&(this.on.write(e),e.write(this.getMethodAccessor())),e.write(this.method),ie({writer:e,arguments_:this.arguments_,multiline:this.multiline})}getMethodAccessor(){return this.static_?"::":"->"}};u();c();u();c();var V=class r extends p{constructor(e){super();f(this,"internalType");this.internalType=e}write(e){switch(this.internalType.type){case"list":{this.writeList({writer:e,list:this.internalType});break}case"boolean":{e.write(this.internalType.value.toString());break}case"class":{this.writeClass({writer:e,class_:this.internalType});break}case"file":{e.writeNode(Nr({writer:e,value:this.internalType.value}));break}case"float":{e.write(this.internalType.value.toString());break}case"number":{e.write(this.internalType.value.toString());break}case"map":{this.writeMap({writer:e,map:this.internalType});break}case"reference":{e.writeNode(this.internalType.value);break}case"datetime":{e.writeNode(vr({writer:e,value:this.internalType.value}));break}case"string":{if(this.internalType.value.includes(`
18
+ `)){this.writeStringWithHeredoc({writer:e,value:this.internalType.value});break}e.write(`'${this.internalType.value.replaceAll("'","\\'")}'`);break}case"unknown":{this.writeUnknown({writer:e,value:this.internalType.value});break}case"null":{e.write("null");break}case"nop":break;default:se(this.internalType)}}writeStringWithHeredoc({writer:e,value:n}){e.writeLine("<<<EOT"),e.writeNoIndent(n),e.newLine(),e.writeNoIndent("EOT")}writeClass({writer:e,class_:n}){e.writeNode(new k({classReference:n.reference,arguments_:[r.map({entries:n.fields.map(i=>({key:r.string(i.name),value:i.value}))})]}))}writeList({writer:e,list:n}){let i=_r({values:n.values});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.write(e),e.writeLine(",");e.dedent(),e.write("]")}writeMap({writer:e,map:n}){let i=Lr({entries:n.entries});if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let o of i)o.key.write(e),e.write(" => "),o.value.write(e),e.writeLine(",");e.dedent(),e.write("]")}static list({values:e}){return new this({type:"list",values:e})}static boolean(e){return new this({type:"boolean",value:e})}static class_({reference:e,fields:n}){return new this({type:"class",reference:e,fields:n})}static file(e){return new this({type:"file",value:e})}static float(e){return new this({type:"float",value:e})}static datetime(e){return new this({type:"datetime",value:e})}static number(e){return new this({type:"number",value:e})}static map({entries:e}){return new this({type:"map",entries:e})}static reference(e){return new this({type:"reference",value:e})}static string(e){return new this({type:"string",value:e})}static unknown(e){return new this({type:"unknown",value:e})}static null(){return new this({type:"null"})}static nop(){return new this({type:"nop"})}static isNop(e){return e.internalType.type==="nop"}writeUnknown({writer:e,value:n}){switch(typeof n){case"boolean":e.write(n.toString());return;case"string":e.write(n.includes('"')?`\`${n}\``:`"${n}"`);return;case"number":e.write(n.toString());return;case"object":if(n==null){e.write("null");return}if(Array.isArray(n)){this.writeUnknownArray({writer:e,value:n});return}this.writeUnknownMap({writer:e,value:n});return;default:throw new Error(`Internal error; unsupported unknown type: ${typeof n}`)}}writeUnknownArray({writer:e,value:n}){if(n.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let i of n)e.writeNode(r.unknown(i)),e.writeLine(",");e.dedent(),e.write("]")}writeUnknownMap({writer:e,value:n}){let i=Object.entries(n);if(i.length===0){e.write("[]");return}e.writeLine("["),e.indent();for(let[o,s]of i)e.write(`'${o}' => `),e.writeNode(r.unknown(s)),e.writeLine(",");e.dedent(),e.write("]")}};function vr({writer:r,value:t}){return new k({classReference:new g({name:"DateTime",namespace:""}),arguments_:[new T(`'${t}'`)]})}function Nr({writer:r,value:t}){return new P({on:new g({name:"File",namespace:`${r.rootNamespace}\\Utils`}),method:"createFromString",arguments_:[new T(`"${t}"`)]})}function Lr({entries:r}){return r.filter(t=>!V.isNop(t.key)&&!V.isNop(t.value))}function _r({values:r}){return r.filter(t=>!V.isNop(t))}u();c();var Ee=class extends p{constructor(e){super();f(this,"arrays");this.arrays=e}write(e){e.write("array_merge"),ie({writer:e,arguments_:this.arrays.map(n=>ee(i=>{if(typeof n=="string"||n instanceof p){i.writeNodeOrString(n);return}i.writeNodeOrString(n.ref),n.fallback&&(i.write(" ?? "),i.writeNodeOrString(n.fallback))}))})}};function Rr(r){return new q(r)}function Ir(r){return new H(r)}function kr(r){return new B(r)}function br(r){return new Q(r)}function Cr(r){return new g(r)}function ee(r){return new T(r)}function Sr(r){return new X(r)}function Br(r){return new Z(r)}function Ur(r){return new j(r)}function at(r){return new k(r)}function Mr(r){return new P(r)}function Pr(r){return ee(t=>{t.write("throw "),t.writeNode(at(r))})}function Dr(r){return new K(r)}function $r(r){return new M(r)}function Yr(r){return new U(r)}function Or(r){return new fe(r)}function Fr(r,t){return ee(e=>{e.writeNodeOrString(r),e.write(" = "),e.writeNodeOrString(t)})}function Wr(r){return ee(F(r))}function Vr(r){return ee(`"${r}"`)}function zr(...r){return new Ee(r)}function Gr(){return new T(r=>{r.write("$this")})}export{he as a,le as b,Jr as c,qr as d,Le as e,Hr as f,dt as g,Qr as h,Xr as i,f as j,u as k,a as l,c as m,se as n,yr as o,ue as p};
19
+ /*! Bundled license information:
20
+
21
+ @esbuild-plugins/node-globals-polyfill/Buffer.js:
22
+ (*!
23
+ * The buffer module from node.js, for the browser.
24
+ *
25
+ * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
26
+ * @license MIT
27
+ *)
28
+ */
@@ -0,0 +1,4 @@
1
+ import '@fern-api/browser-compatible-base-generator';
2
+ import '@fern-api/dynamic-ir-sdk';
3
+ import '@fern-api/php-codegen';
4
+ export { D as DynamicSnippetsGeneratorContext } from '../DynamicSnippetsGeneratorContext-jAUczdEu.js';
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-BGMLQMW7.js";import"../chunk-G6X3OBKW.js";import"../chunk-7HKG5U5F.js";import"../chunk-YELOIV6Y.js";import"../chunk-ZFTBBCKC.js";export{a as DynamicSnippetsGeneratorContext};
@@ -0,0 +1,4 @@
1
+ import '@fern-api/dynamic-ir-sdk';
2
+ import '@fern-api/php-codegen';
3
+ export { a as DynamicTypeLiteralMapper } from '../DynamicSnippetsGeneratorContext-jAUczdEu.js';
4
+ import '@fern-api/browser-compatible-base-generator';
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-G6X3OBKW.js";import"../chunk-7HKG5U5F.js";import"../chunk-ZFTBBCKC.js";export{a as DynamicTypeLiteralMapper};
@@ -0,0 +1,4 @@
1
+ import '@fern-api/dynamic-ir-sdk';
2
+ import '@fern-api/php-codegen';
3
+ export { F as FilePropertyInfo, b as FilePropertyMapper } from '../DynamicSnippetsGeneratorContext-jAUczdEu.js';
4
+ import '@fern-api/browser-compatible-base-generator';
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-YELOIV6Y.js";import"../chunk-ZFTBBCKC.js";export{a as FilePropertyMapper};
package/esm/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export { DynamicSnippetsGenerator } from './DynamicSnippetsGenerator.js';
2
+ import '@fern-api/browser-compatible-base-generator';
3
+ import '@fern-api/dynamic-ir-sdk';
4
+ import './EndpointSnippetGenerator.js';
5
+ import './DynamicSnippetsGeneratorContext-jAUczdEu.js';
6
+ import '@fern-api/php-codegen';
package/esm/index.js ADDED
@@ -0,0 +1,13 @@
1
+ import{a as yu}from"./chunk-RYQOC3FW.js";import"./chunk-MMCQWL5J.js";import"./chunk-BGMLQMW7.js";import"./chunk-G6X3OBKW.js";import"./chunk-7HKG5U5F.js";import"./chunk-YELOIV6Y.js";import{e as be,f as l,g as su,h as lu,i as cu,k as o,l as p,m as i}from"./chunk-ZFTBBCKC.js";var Lt=l((Ql,kt)=>{"use strict";o();i();var vu="Function.prototype.bind called on incompatible ",gu=Object.prototype.toString,du=Math.max,hu="[object Function]",Wt=function(r,t){for(var n=[],a=0;a<r.length;a+=1)n[a]=r[a];for(var u=0;u<t.length;u+=1)n[u+r.length]=t[u];return n},mu=function(r,t){for(var n=[],a=t||0,u=0;a<r.length;a+=1,u+=1)n[u]=r[a];return n},bu=function(e,r){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=r);return t};kt.exports=function(r){var t=this;if(typeof t!="function"||gu.apply(t)!==hu)throw new TypeError(vu+t);for(var n=mu(arguments,1),a,u=function(){if(this instanceof a){var g=t.apply(this,Wt(n,arguments));return Object(g)===g?g:this}return t.apply(r,Wt(n,arguments))},f=du(0,t.length-n.length),c=[],y=0;y<f;y++)c[y]="$"+y;if(a=Function("binder","return function ("+bu(c,",")+"){ return binder.apply(this,arguments); }")(u),t.prototype){var h=function(){};h.prototype=t.prototype,a.prototype=new h,h.prototype=null}return a}});var L=l((rc,zt)=>{"use strict";o();i();var Su=Lt();zt.exports=Function.prototype.bind||Su});var Se=l((nc,Jt)=>{"use strict";o();i();Jt.exports=Error});var Ae=l((ac,Ht)=>{"use strict";o();i();Ht.exports=EvalError});var we=l((pc,Kt)=>{"use strict";o();i();Kt.exports=RangeError});var Pe=l((cc,Vt)=>{"use strict";o();i();Vt.exports=ReferenceError});var Ur=l((gc,Yt)=>{"use strict";o();i();Yt.exports=SyntaxError});var w=l((mc,Qt)=>{"use strict";o();i();Qt.exports=TypeError});var Oe=l((Ac,Xt)=>{"use strict";o();i();Xt.exports=URIError});var rn=l((Oc,Zt)=>{"use strict";o();i();Zt.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(t in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var u=Object.getOwnPropertySymbols(r);if(u.length!==1||u[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var f=Object.getOwnPropertyDescriptor(r,t);if(f.value!==a||f.enumerable!==!0)return!1}return!0}});var Ee=l((xc,tn)=>{"use strict";o();i();var en=typeof Symbol!="undefined"&&Symbol,Au=rn();tn.exports=function(){return typeof en!="function"||typeof Symbol!="function"||typeof en("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Au()}});var on=l((Fc,nn)=>{"use strict";o();i();var qe={__proto__:null,foo:{}},wu=Object;nn.exports=function(){return{__proto__:qe}.foo===qe.foo&&!(qe instanceof wu)}});var xe=l((Nc,an)=>{"use strict";o();i();var Pu=Function.prototype.call,Ou=Object.prototype.hasOwnProperty,Eu=L();an.exports=Eu.call(Pu,Ou)});var F=l((Dc,ln)=>{"use strict";o();i();var m,qu=Se(),xu=Ae(),$u=we(),Iu=Pe(),tr=Ur(),er=w(),Fu=Oe(),sn=Function,$e=function(e){try{return sn('"use strict"; return ('+e+").constructor;")()}catch(r){}},z=Object.getOwnPropertyDescriptor;if(z)try{z({},"")}catch(e){z=null}var Ie=function(){throw new er},Tu=z?function(){try{return arguments.callee,Ie}catch(e){try{return z(arguments,"callee").get}catch(r){return Ie}}}():Ie,Z=Ee()(),Ru=on()(),O=Object.getPrototypeOf||(Ru?function(e){return e.__proto__}:null),rr={},Nu=typeof Uint8Array=="undefined"||!O?m:O(Uint8Array),J={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?m:ArrayBuffer,"%ArrayIteratorPrototype%":Z&&O?O([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":rr,"%AsyncGenerator%":rr,"%AsyncGeneratorFunction%":rr,"%AsyncIteratorPrototype%":rr,"%Atomics%":typeof Atomics=="undefined"?m:Atomics,"%BigInt%":typeof BigInt=="undefined"?m:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?m:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?m:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":qu,"%eval%":eval,"%EvalError%":xu,"%Float32Array%":typeof Float32Array=="undefined"?m:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?m:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?m:FinalizationRegistry,"%Function%":sn,"%GeneratorFunction%":rr,"%Int8Array%":typeof Int8Array=="undefined"?m:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?m:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Z&&O?O(O([][Symbol.iterator]())):m,"%JSON%":typeof JSON=="object"?JSON:m,"%Map%":typeof Map=="undefined"?m:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!Z||!O?m:O(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?m:Promise,"%Proxy%":typeof Proxy=="undefined"?m:Proxy,"%RangeError%":$u,"%ReferenceError%":Iu,"%Reflect%":typeof Reflect=="undefined"?m:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?m:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!Z||!O?m:O(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Z&&O?O(""[Symbol.iterator]()):m,"%Symbol%":Z?Symbol:m,"%SyntaxError%":tr,"%ThrowTypeError%":Tu,"%TypedArray%":Nu,"%TypeError%":er,"%Uint8Array%":typeof Uint8Array=="undefined"?m:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?m:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?m:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?m:Uint32Array,"%URIError%":Fu,"%WeakMap%":typeof WeakMap=="undefined"?m:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?m:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?m:WeakSet};if(O)try{null.error}catch(e){un=O(O(e)),J["%Error.prototype%"]=un}var un,_u=function e(r){var t;if(r==="%AsyncFunction%")t=$e("async function () {}");else if(r==="%GeneratorFunction%")t=$e("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=$e("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&O&&(t=O(a.prototype))}return J[r]=t,t},fn={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},vr=L(),Dr=xe(),Uu=vr.call(Function.call,Array.prototype.concat),Du=vr.call(Function.apply,Array.prototype.splice),pn=vr.call(Function.call,String.prototype.replace),Br=vr.call(Function.call,String.prototype.slice),Bu=vr.call(Function.call,RegExp.prototype.exec),Mu=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Cu=/\\(\\)?/g,ju=function(r){var t=Br(r,0,1),n=Br(r,-1);if(t==="%"&&n!=="%")throw new tr("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new tr("invalid intrinsic syntax, expected opening `%`");var a=[];return pn(r,Mu,function(u,f,c,y){a[a.length]=c?pn(y,Cu,"$1"):f||u}),a},Gu=function(r,t){var n=r,a;if(Dr(fn,n)&&(a=fn[n],n="%"+a[0]+"%"),Dr(J,n)){var u=J[n];if(u===rr&&(u=_u(n)),typeof u=="undefined"&&!t)throw new er("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:u}}throw new tr("intrinsic "+r+" does not exist!")};ln.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new er("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new er('"allowMissing" argument must be a boolean');if(Bu(/^%?[^%]*%?$/,r)===null)throw new tr("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=ju(r),a=n.length>0?n[0]:"",u=Gu("%"+a+"%",t),f=u.name,c=u.value,y=!1,h=u.alias;h&&(a=h[0],Du(n,Uu([0,1],h)));for(var g=1,d=!0;g<n.length;g+=1){var v=n[g],A=Br(v,0,1),P=Br(v,-1);if((A==='"'||A==="'"||A==="`"||P==='"'||P==="'"||P==="`")&&A!==P)throw new tr("property names with quotes must have matching quotes");if((v==="constructor"||!d)&&(y=!0),a+="."+v,f="%"+a+"%",Dr(J,f))c=J[f];else if(c!=null){if(!(v in c)){if(!t)throw new er("base intrinsic for "+r+" exists, but the property is not available.");return}if(z&&g+1>=n.length){var S=z(c,v);d=!!S,d&&"get"in S&&!("originalValue"in S.get)?c=S.get:c=c[v]}else d=Dr(c,v),c=c[v];d&&!y&&(J[f]=c)}}return c}});var Fe=l((Cc,cn)=>{"use strict";o();i();cn.exports=Object});var vn=l((Wc,yn)=>{"use strict";o();i();yn.exports=Math.abs});var dn=l((zc,gn)=>{"use strict";o();i();gn.exports=Math.floor});var mn=l((Kc,hn)=>{"use strict";o();i();hn.exports=Math.max});var Sn=l((Qc,bn)=>{"use strict";o();i();bn.exports=Math.min});var wn=l((ry,An)=>{"use strict";o();i();An.exports=Math.pow});var On=l((ny,Pn)=>{"use strict";o();i();Pn.exports=Math.round});var qn=l((ay,En)=>{"use strict";o();i();En.exports=Number.isNaN||function(r){return r!==r}});var $n=l((py,xn)=>{"use strict";o();i();var Wu=qn();xn.exports=function(r){return Wu(r)||r===0?r:r<0?-1:1}});var Fn=l((cy,In)=>{"use strict";o();i();In.exports=Object.getOwnPropertyDescriptor});var gr=l((gy,Tn)=>{"use strict";o();i();var Mr=Fn();if(Mr)try{Mr([],"length")}catch(e){Mr=null}Tn.exports=Mr});var jr=l((my,Rn)=>{"use strict";o();i();var Cr=Object.defineProperty||!1;if(Cr)try{Cr({},"a",{value:1})}catch(e){Cr=!1}Rn.exports=Cr});var Te=l((Ay,Nn)=>{"use strict";o();i();Nn.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;r[t]=a;for(var u in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var f=Object.getOwnPropertySymbols(r);if(f.length!==1||f[0]!==t||!Object.prototype.propertyIsEnumerable.call(r,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(r,t);if(c.value!==a||c.enumerable!==!0)return!1}return!0}});var Dn=l((Oy,Un)=>{"use strict";o();i();var _n=typeof Symbol!="undefined"&&Symbol,ku=Te();Un.exports=function(){return typeof _n!="function"||typeof Symbol!="function"||typeof _n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:ku()}});var Re=l((xy,Bn)=>{"use strict";o();i();Bn.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var Ne=l((Fy,Mn)=>{"use strict";o();i();var Lu=Fe();Mn.exports=Lu.getPrototypeOf||null});var Gr=l((Ny,Cn)=>{"use strict";o();i();Cn.exports=Function.prototype.call});var _e=l((Dy,jn)=>{"use strict";o();i();jn.exports=Function.prototype.apply});var Wn=l((Cy,Gn)=>{"use strict";o();i();Gn.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var Ln=l((Wy,kn)=>{"use strict";o();i();var zu=L(),Ju=_e(),Hu=Gr(),Ku=Wn();kn.exports=Ku||zu.call(Hu,Ju)});var Jn=l((zy,zn)=>{"use strict";o();i();var Vu=L(),Yu=w(),Qu=Gr(),Xu=Ln();zn.exports=function(r){if(r.length<1||typeof r[0]!="function")throw new Yu("a function is required");return Xu(Vu,Qu,r)}});var Xn=l((Ky,Qn)=>{"use strict";o();i();var Zu=Jn(),Hn=gr(),Vn;try{Vn=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ue=!!Vn&&Hn&&Hn(Object.prototype,"__proto__"),Yn=Object,Kn=Yn.getPrototypeOf;Qn.exports=Ue&&typeof Ue.get=="function"?Zu([Ue.get]):typeof Kn=="function"?function(r){return Kn(r==null?r:Yn(r))}:!1});var no=l((Qy,to)=>{"use strict";o();i();var Zn=Re(),ro=Ne(),eo=Xn();to.exports=Zn?function(r){return Zn(r)}:ro?function(r){if(!r||typeof r!="object"&&typeof r!="function")throw new TypeError("getProto: not an object");return ro(r)}:eo?function(r){return eo(r)}:null});var Me=l((rv,po)=>{"use strict";o();i();var b,rf=Fe(),ef=Se(),tf=Ae(),nf=we(),of=Pe(),ar=Ur(),ir=w(),af=Oe(),uf=vn(),ff=dn(),pf=mn(),sf=Sn(),lf=wn(),cf=On(),yf=$n(),uo=Function,De=function(e){try{return uo('"use strict"; return ('+e+").constructor;")()}catch(r){}},dr=gr(),vf=jr(),Be=function(){throw new ir},gf=dr?function(){try{return arguments.callee,Be}catch(e){try{return dr(arguments,"callee").get}catch(r){return Be}}}():Be,nr=Dn()(),E=no(),df=Ne(),hf=Re(),fo=_e(),hr=Gr(),or={},mf=typeof Uint8Array=="undefined"||!E?b:E(Uint8Array),H={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?b:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?b:ArrayBuffer,"%ArrayIteratorPrototype%":nr&&E?E([][Symbol.iterator]()):b,"%AsyncFromSyncIteratorPrototype%":b,"%AsyncFunction%":or,"%AsyncGenerator%":or,"%AsyncGeneratorFunction%":or,"%AsyncIteratorPrototype%":or,"%Atomics%":typeof Atomics=="undefined"?b:Atomics,"%BigInt%":typeof BigInt=="undefined"?b:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?b:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?b:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?b:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ef,"%eval%":eval,"%EvalError%":tf,"%Float32Array%":typeof Float32Array=="undefined"?b:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?b:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?b:FinalizationRegistry,"%Function%":uo,"%GeneratorFunction%":or,"%Int8Array%":typeof Int8Array=="undefined"?b:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?b:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?b:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":nr&&E?E(E([][Symbol.iterator]())):b,"%JSON%":typeof JSON=="object"?JSON:b,"%Map%":typeof Map=="undefined"?b:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!nr||!E?b:E(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":rf,"%Object.getOwnPropertyDescriptor%":dr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?b:Promise,"%Proxy%":typeof Proxy=="undefined"?b:Proxy,"%RangeError%":nf,"%ReferenceError%":of,"%Reflect%":typeof Reflect=="undefined"?b:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?b:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!nr||!E?b:E(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?b:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":nr&&E?E(""[Symbol.iterator]()):b,"%Symbol%":nr?Symbol:b,"%SyntaxError%":ar,"%ThrowTypeError%":gf,"%TypedArray%":mf,"%TypeError%":ir,"%Uint8Array%":typeof Uint8Array=="undefined"?b:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?b:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?b:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?b:Uint32Array,"%URIError%":af,"%WeakMap%":typeof WeakMap=="undefined"?b:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?b:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?b:WeakSet,"%Function.prototype.call%":hr,"%Function.prototype.apply%":fo,"%Object.defineProperty%":vf,"%Object.getPrototypeOf%":df,"%Math.abs%":uf,"%Math.floor%":ff,"%Math.max%":pf,"%Math.min%":sf,"%Math.pow%":lf,"%Math.round%":cf,"%Math.sign%":yf,"%Reflect.getPrototypeOf%":hf};if(E)try{null.error}catch(e){oo=E(E(e)),H["%Error.prototype%"]=oo}var oo,bf=function e(r){var t;if(r==="%AsyncFunction%")t=De("async function () {}");else if(r==="%GeneratorFunction%")t=De("function* () {}");else if(r==="%AsyncGeneratorFunction%")t=De("async function* () {}");else if(r==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(r==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&E&&(t=E(a.prototype))}return H[r]=t,t},io={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},mr=L(),Wr=xe(),Sf=mr.call(hr,Array.prototype.concat),Af=mr.call(fo,Array.prototype.splice),ao=mr.call(hr,String.prototype.replace),kr=mr.call(hr,String.prototype.slice),wf=mr.call(hr,RegExp.prototype.exec),Pf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Of=/\\(\\)?/g,Ef=function(r){var t=kr(r,0,1),n=kr(r,-1);if(t==="%"&&n!=="%")throw new ar("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new ar("invalid intrinsic syntax, expected opening `%`");var a=[];return ao(r,Pf,function(u,f,c,y){a[a.length]=c?ao(y,Of,"$1"):f||u}),a},qf=function(r,t){var n=r,a;if(Wr(io,n)&&(a=io[n],n="%"+a[0]+"%"),Wr(H,n)){var u=H[n];if(u===or&&(u=bf(n)),typeof u=="undefined"&&!t)throw new ir("intrinsic "+r+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:u}}throw new ar("intrinsic "+r+" does not exist!")};po.exports=function(r,t){if(typeof r!="string"||r.length===0)throw new ir("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new ir('"allowMissing" argument must be a boolean');if(wf(/^%?[^%]*%?$/,r)===null)throw new ar("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Ef(r),a=n.length>0?n[0]:"",u=qf("%"+a+"%",t),f=u.name,c=u.value,y=!1,h=u.alias;h&&(a=h[0],Af(n,Sf([0,1],h)));for(var g=1,d=!0;g<n.length;g+=1){var v=n[g],A=kr(v,0,1),P=kr(v,-1);if((A==='"'||A==="'"||A==="`"||P==='"'||P==="'"||P==="`")&&A!==P)throw new ar("property names with quotes must have matching quotes");if((v==="constructor"||!d)&&(y=!0),a+="."+v,f="%"+a+"%",Wr(H,f))c=H[f];else if(c!=null){if(!(v in c)){if(!t)throw new ir("base intrinsic for "+r+" exists, but the property is not available.");return}if(dr&&g+1>=n.length){var S=dr(c,v);d=!!S,d&&"get"in S&&!("originalValue"in S.get)?c=S.get:c=c[v]}else d=Wr(c,v),c=c[v];d&&!y&&(H[f]=c)}}return c}});var Ce=l((nv,co)=>{"use strict";o();i();var so=jr(),xf=Ur(),ur=w(),lo=gr();co.exports=function(r,t,n){if(!r||typeof r!="object"&&typeof r!="function")throw new ur("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new ur("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new ur("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new ur("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new ur("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new ur("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,y=!!lo&&lo(r,t);if(so)so(r,t,{configurable:f===null&&y?y.configurable:!f,enumerable:a===null&&y?y.enumerable:!a,value:n,writable:u===null&&y?y.writable:!u});else if(c||!a&&!u&&!f)r[t]=n;else throw new xf("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var Ge=l((av,vo)=>{"use strict";o();i();var je=jr(),yo=function(){return!!je};yo.hasArrayLengthDefineBug=function(){if(!je)return null;try{return je([],"length",{value:1}).length!==1}catch(r){return!0}};vo.exports=yo});var So=l((pv,bo)=>{"use strict";o();i();var $f=Me(),go=Ce(),If=Ge()(),ho=gr(),mo=w(),Ff=$f("%Math.floor%");bo.exports=function(r,t){if(typeof r!="function")throw new mo("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||Ff(t)!==t)throw new mo("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,u=!0;if("length"in r&&ho){var f=ho(r,"length");f&&!f.configurable&&(a=!1),f&&!f.writable&&(u=!1)}return(a||u||!n)&&(If?go(r,"length",t,!0,!0):go(r,"length",t)),r}});var wo=l((cv,Ao)=>{"use strict";o();i();var Tf=Me(),Lr=Tf("%Object.defineProperty%",!0)||!1;if(Lr)try{Lr({},"a",{value:1})}catch(e){Lr=!1}Ao.exports=Lr});var Hr=l((gv,zr)=>{"use strict";o();i();var We=L(),Jr=F(),Rf=So(),Nf=w(),Eo=Jr("%Function.prototype.apply%"),qo=Jr("%Function.prototype.call%"),xo=Jr("%Reflect.apply%",!0)||We.call(qo,Eo),Po=wo(),_f=Jr("%Math.max%");zr.exports=function(r){if(typeof r!="function")throw new Nf("a function is required");var t=xo(We,qo,arguments);return Rf(t,1+_f(0,r.length-(arguments.length-1)),!0)};var Oo=function(){return xo(We,Eo,arguments)};Po?Po(zr.exports,"apply",{value:Oo}):zr.exports.apply=Oo});var ke=l((mv,Io)=>{"use strict";o();i();var $o=Object.prototype.toString;Io.exports=function(r){var t=$o.call(r),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&$o.call(r.callee)==="[object Function]"),n}});var Mo=l((Av,Bo)=>{"use strict";o();i();var Do;Object.keys||(br=Object.prototype.hasOwnProperty,Le=Object.prototype.toString,Fo=ke(),ze=Object.prototype.propertyIsEnumerable,To=!ze.call({toString:null},"toString"),Ro=ze.call(function(){},"prototype"),Sr=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Kr=function(e){var r=e.constructor;return r&&r.prototype===e},No={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},_o=function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!No["$"+e]&&br.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{Kr(window[e])}catch(r){return!0}}catch(r){return!0}return!1}(),Uo=function(e){if(typeof window=="undefined"||!_o)return Kr(e);try{return Kr(e)}catch(r){return!1}},Do=function(r){var t=r!==null&&typeof r=="object",n=Le.call(r)==="[object Function]",a=Fo(r),u=t&&Le.call(r)==="[object String]",f=[];if(!t&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var c=Ro&&n;if(u&&r.length>0&&!br.call(r,0))for(var y=0;y<r.length;++y)f.push(String(y));if(a&&r.length>0)for(var h=0;h<r.length;++h)f.push(String(h));else for(var g in r)!(c&&g==="prototype")&&br.call(r,g)&&f.push(String(g));if(To)for(var d=Uo(r),v=0;v<Sr.length;++v)!(d&&Sr[v]==="constructor")&&br.call(r,Sr[v])&&f.push(Sr[v]);return f});var br,Le,Fo,ze,To,Ro,Sr,Kr,No,_o,Uo;Bo.exports=Do});var Wo=l((Ov,Go)=>{"use strict";o();i();var Uf=Array.prototype.slice,Df=ke(),Co=Object.keys,Vr=Co?function(r){return Co(r)}:Mo(),jo=Object.keys;Vr.shim=function(){if(Object.keys){var r=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);r||(Object.keys=function(n){return Df(n)?jo(Uf.call(n)):jo(n)})}else Object.keys=Vr;return Object.keys||Vr};Go.exports=Vr});var Ar=l((xv,Jo)=>{"use strict";o();i();var Bf=Wo(),Mf=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Cf=Object.prototype.toString,jf=Array.prototype.concat,ko=Ce(),Gf=function(e){return typeof e=="function"&&Cf.call(e)==="[object Function]"},Lo=Ge()(),Wf=function(e,r,t,n){if(r in e){if(n===!0){if(e[r]===t)return}else if(!Gf(n)||!n())return}Lo?ko(e,r,t,!0):ko(e,r,t)},zo=function(e,r){var t=arguments.length>2?arguments[2]:{},n=Bf(r);Mf&&(n=jf.call(n,Object.getOwnPropertySymbols(r)));for(var a=0;a<n.length;a+=1)Wf(e,n[a],r[n[a]],t[n[a]])};zo.supportsDescriptors=!!Lo;Jo.exports=zo});var I=l((Fv,Vo)=>{"use strict";o();i();var Ho=F(),Ko=Hr(),kf=Ko(Ho("String.prototype.indexOf"));Vo.exports=function(r,t){var n=Ho(r,!!t);return typeof n=="function"&&kf(r,".prototype.")>-1?Ko(n):n}});var Xo=l((Nv,Qo)=>{"use strict";o();i();var Lf=F(),Yo=Lf("%Array%"),zf=!Yo.isArray&&I()("Object.prototype.toString");Qo.exports=Yo.isArray||function(r){return zf(r)==="[object Array]"}});var Je=l((Dv,Zo)=>{"use strict";o();i();Zo.exports=Xo()});var ei=l((Cv,ri)=>{"use strict";o();i();var Jf=F(),Hf=I(),Kf=w(),Vf=Je(),Yf=Jf("%Reflect.apply%",!0)||Hf("Function.prototype.apply");ri.exports=function(r,t){var n=arguments.length>2?arguments[2]:[];if(!Vf(n))throw new Kf("Assertion failed: optional `argumentsList`, if provided, must be a List");return Yf(r,t,n)}});function ti(){throw new Error("setTimeout has not been defined")}function ni(){throw new Error("clearTimeout has not been defined")}function oi(e){if(C===setTimeout)return setTimeout(e,0);if((C===ti||!C)&&setTimeout)return C=setTimeout,setTimeout(e,0);try{return C(e,0)}catch(r){try{return C.call(null,e,0)}catch(t){return C.call(this,e,0)}}}function Qf(e){if(j===clearTimeout)return clearTimeout(e);if((j===ni||!j)&&clearTimeout)return j=clearTimeout,clearTimeout(e);try{return j(e)}catch(r){try{return j.call(null,e)}catch(t){return j.call(this,e)}}}function Xf(){!pr||!K||(pr=!1,K.length?U=K.concat(U):Yr=-1,U.length&&ii())}function ii(){if(!pr){var e=oi(Xf);pr=!0;for(var r=U.length;r;){for(K=U,U=[];++Yr<r;)K&&K[Yr].run();Yr=-1,r=U.length}K=null,pr=!1,Qf(e)}}function Zf(e){var r=new Array(arguments.length-1);if(arguments.length>1)for(var t=1;t<arguments.length;t++)r[t-1]=arguments[t];U.push(new ai(e,r)),U.length===1&&!pr&&oi(ii)}function ai(e,r){this.fun=e,this.array=r}function V(){}function dp(e){throw new Error("process.binding is not supported")}function hp(){return"/"}function mp(e){throw new Error("process.chdir is not supported")}function bp(){return 0}function Ap(e){var r=Sp.call(fr)*.001,t=Math.floor(r),n=Math.floor(r%1*1e9);return e&&(t=t-e[0],n=n-e[1],n<0&&(t--,n+=1e9)),[t,n]}function Pp(){var e=new Date,r=e-wp;return r/1e3}var C,j,U,pr,K,Yr,rp,ep,tp,np,op,ip,ap,up,fp,pp,sp,lp,cp,yp,vp,gp,fr,Sp,wp,Op,wr,ui=be(()=>{"use strict";o();i();C=ti,j=ni;typeof globalThis.setTimeout=="function"&&(C=setTimeout);typeof globalThis.clearTimeout=="function"&&(j=clearTimeout);U=[],pr=!1,Yr=-1;ai.prototype.run=function(){this.fun.apply(null,this.array)};rp="browser",ep="browser",tp=!0,np={},op=[],ip="",ap={},up={},fp={};pp=V,sp=V,lp=V,cp=V,yp=V,vp=V,gp=V;fr=globalThis.performance||{},Sp=fr.now||fr.mozNow||fr.msNow||fr.oNow||fr.webkitNow||function(){return new Date().getTime()};wp=new Date;Op={nextTick:Zf,title:rp,browser:tp,env:np,argv:op,version:ip,versions:ap,on:pp,addListener:sp,once:lp,off:cp,removeListener:yp,removeAllListeners:vp,emit:gp,binding:dp,cwd:hp,chdir:mp,umask:bp,hrtime:Ap,platform:ep,release:up,config:fp,uptime:Pp},wr=Op});var He,Ke,fi=be(()=>{"use strict";o();i();typeof Object.create=="function"?He=function(r,t){r.super_=t,r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}})}:He=function(r,t){r.super_=t;var n=function(){};n.prototype=t.prototype,r.prototype=new n,r.prototype.constructor=r};Ke=He});var di={};su(di,{_extend:()=>nt,debuglog:()=>pi,default:()=>_p,deprecate:()=>Ze,format:()=>re,inherits:()=>Ke,inspect:()=>R,isArray:()=>rt,isBoolean:()=>ee,isBuffer:()=>yi,isDate:()=>Zr,isError:()=>Or,isFunction:()=>Er,isNull:()=>qr,isNullOrUndefined:()=>si,isNumber:()=>et,isObject:()=>Y,isPrimitive:()=>ci,isRegExp:()=>Pr,isString:()=>xr,isSymbol:()=>li,isUndefined:()=>T,log:()=>vi});function re(e){if(!xr(e)){for(var r=[],t=0;t<arguments.length;t++)r.push(R(arguments[t]));return r.join(" ")}for(var t=1,n=arguments,a=n.length,u=String(e).replace(Ep,function(c){if(c==="%%")return"%";if(t>=a)return c;switch(c){case"%s":return String(n[t++]);case"%d":return Number(n[t++]);case"%j":try{return JSON.stringify(n[t++])}catch(y){return"[Circular]"}default:return c}}),f=n[t];t<a;f=n[++t])qr(f)||!Y(f)?u+=" "+f:u+=" "+R(f);return u}function Ze(e,r){if(T(globalThis.process))return function(){return Ze(e,r).apply(this,arguments)};if(wr.noDeprecation===!0)return e;var t=!1;function n(){if(!t){if(wr.throwDeprecation)throw new Error(r);wr.traceDeprecation?console.trace(r):console.error(r),t=!0}return e.apply(this,arguments)}return n}function pi(e){if(T(Ve)&&(Ve=wr.env.NODE_DEBUG||""),e=e.toUpperCase(),!Qr[e])if(new RegExp("\\b"+e+"\\b","i").test(Ve)){var r=0;Qr[e]=function(){var t=re.apply(null,arguments);console.error("%s %d: %s",e,r,t)}}else Qr[e]=function(){};return Qr[e]}function R(e,r){var t={seen:[],stylize:xp};return arguments.length>=3&&(t.depth=arguments[2]),arguments.length>=4&&(t.colors=arguments[3]),ee(r)?t.showHidden=r:r&&nt(t,r),T(t.showHidden)&&(t.showHidden=!1),T(t.depth)&&(t.depth=2),T(t.colors)&&(t.colors=!1),T(t.customInspect)&&(t.customInspect=!0),t.colors&&(t.stylize=qp),Xr(t,e,t.depth)}function qp(e,r){var t=R.styles[r];return t?"\x1B["+R.colors[t][0]+"m"+e+"\x1B["+R.colors[t][1]+"m":e}function xp(e,r){return e}function $p(e){var r={};return e.forEach(function(t,n){r[t]=!0}),r}function Xr(e,r,t){if(e.customInspect&&r&&Er(r.inspect)&&r.inspect!==R&&!(r.constructor&&r.constructor.prototype===r)){var n=r.inspect(t,e);return xr(n)||(n=Xr(e,n,t)),n}var a=Ip(e,r);if(a)return a;var u=Object.keys(r),f=$p(u);if(e.showHidden&&(u=Object.getOwnPropertyNames(r)),Or(r)&&(u.indexOf("message")>=0||u.indexOf("description")>=0))return Ye(r);if(u.length===0){if(Er(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(Pr(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(Zr(r))return e.stylize(Date.prototype.toString.call(r),"date");if(Or(r))return Ye(r)}var y="",h=!1,g=["{","}"];if(rt(r)&&(h=!0,g=["[","]"]),Er(r)){var d=r.name?": "+r.name:"";y=" [Function"+d+"]"}if(Pr(r)&&(y=" "+RegExp.prototype.toString.call(r)),Zr(r)&&(y=" "+Date.prototype.toUTCString.call(r)),Or(r)&&(y=" "+Ye(r)),u.length===0&&(!h||r.length==0))return g[0]+y+g[1];if(t<0)return Pr(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special");e.seen.push(r);var v;return h?v=Fp(e,r,t,f,u):v=u.map(function(A){return Xe(e,r,t,f,A,h)}),e.seen.pop(),Tp(v,y,g)}function Ip(e,r){if(T(r))return e.stylize("undefined","undefined");if(xr(r)){var t="'"+JSON.stringify(r).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(t,"string")}if(et(r))return e.stylize(""+r,"number");if(ee(r))return e.stylize(""+r,"boolean");if(qr(r))return e.stylize("null","null")}function Ye(e){return"["+Error.prototype.toString.call(e)+"]"}function Fp(e,r,t,n,a){for(var u=[],f=0,c=r.length;f<c;++f)gi(r,String(f))?u.push(Xe(e,r,t,n,String(f),!0)):u.push("");return a.forEach(function(y){y.match(/^\d+$/)||u.push(Xe(e,r,t,n,y,!0))}),u}function Xe(e,r,t,n,a,u){var f,c,y;if(y=Object.getOwnPropertyDescriptor(r,a)||{value:r[a]},y.get?y.set?c=e.stylize("[Getter/Setter]","special"):c=e.stylize("[Getter]","special"):y.set&&(c=e.stylize("[Setter]","special")),gi(n,a)||(f="["+a+"]"),c||(e.seen.indexOf(y.value)<0?(qr(t)?c=Xr(e,y.value,null):c=Xr(e,y.value,t-1),c.indexOf(`
2
+ `)>-1&&(u?c=c.split(`
3
+ `).map(function(h){return" "+h}).join(`
4
+ `).substr(2):c=`
5
+ `+c.split(`
6
+ `).map(function(h){return" "+h}).join(`
7
+ `))):c=e.stylize("[Circular]","special")),T(f)){if(u&&a.match(/^\d+$/))return c;f=JSON.stringify(""+a),f.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(f=f.substr(1,f.length-2),f=e.stylize(f,"name")):(f=f.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),f=e.stylize(f,"string"))}return f+": "+c}function Tp(e,r,t){var n=0,a=e.reduce(function(u,f){return n++,f.indexOf(`
8
+ `)>=0&&n++,u+f.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?t[0]+(r===""?"":r+`
9
+ `)+" "+e.join(`,
10
+ `)+" "+t[1]:t[0]+r+" "+e.join(", ")+" "+t[1]}function rt(e){return Array.isArray(e)}function ee(e){return typeof e=="boolean"}function qr(e){return e===null}function si(e){return e==null}function et(e){return typeof e=="number"}function xr(e){return typeof e=="string"}function li(e){return typeof e=="symbol"}function T(e){return e===void 0}function Pr(e){return Y(e)&&tt(e)==="[object RegExp]"}function Y(e){return typeof e=="object"&&e!==null}function Zr(e){return Y(e)&&tt(e)==="[object Date]"}function Or(e){return Y(e)&&(tt(e)==="[object Error]"||e instanceof Error)}function Er(e){return typeof e=="function"}function ci(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}function yi(e){return p.isBuffer(e)}function tt(e){return Object.prototype.toString.call(e)}function Qe(e){return e<10?"0"+e.toString(10):e.toString(10)}function Np(){var e=new Date,r=[Qe(e.getHours()),Qe(e.getMinutes()),Qe(e.getSeconds())].join(":");return[e.getDate(),Rp[e.getMonth()],r].join(" ")}function vi(){console.log("%s - %s",Np(),re.apply(null,arguments))}function nt(e,r){if(!r||!Y(r))return e;for(var t=Object.keys(r),n=t.length;n--;)e[t[n]]=r[t[n]];return e}function gi(e,r){return Object.prototype.hasOwnProperty.call(e,r)}var Ep,Qr,Ve,Rp,_p,hi=be(()=>{"use strict";o();i();ui();fi();Ep=/%[sdj%]/g;Qr={};R.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]};R.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};Rp=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];_p={inherits:Ke,_extend:nt,log:vi,isBuffer:yi,isPrimitive:ci,isFunction:Er,isError:Or,isDate:Zr,isObject:Y,isRegExp:Pr,isUndefined:T,isSymbol:li,isString:xr,isNumber:et,isNullOrUndefined:si,isNull:qr,isBoolean:ee,isArray:rt,inspect:R,deprecate:Ze,format:re,debuglog:pi}});var mi=l((Xv,te)=>{"use strict";o();i();var Q=(hi(),cu(di));if(Q&&Q.default){te.exports=Q.default;for(let e in Q)te.exports[e]=Q[e]}else Q&&(te.exports=Q)});var Si=l((eg,bi)=>{"use strict";o();i();bi.exports=mi().inspect});var Tr=l((og,ji)=>{"use strict";o();i();var yt=typeof Map=="function"&&Map.prototype,ot=Object.getOwnPropertyDescriptor&&yt?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,oe=yt&&ot&&typeof ot.get=="function"?ot.get:null,Ai=yt&&Map.prototype.forEach,vt=typeof Set=="function"&&Set.prototype,it=Object.getOwnPropertyDescriptor&&vt?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,ie=vt&&it&&typeof it.get=="function"?it.get:null,wi=vt&&Set.prototype.forEach,Up=typeof WeakMap=="function"&&WeakMap.prototype,Ir=Up?WeakMap.prototype.has:null,Dp=typeof WeakSet=="function"&&WeakSet.prototype,Fr=Dp?WeakSet.prototype.has:null,Bp=typeof WeakRef=="function"&&WeakRef.prototype,Pi=Bp?WeakRef.prototype.deref:null,Mp=Boolean.prototype.valueOf,Cp=Object.prototype.toString,jp=Function.prototype.toString,Gp=String.prototype.match,gt=String.prototype.slice,G=String.prototype.replace,Wp=String.prototype.toUpperCase,Oi=String.prototype.toLowerCase,Ni=RegExp.prototype.test,Ei=Array.prototype.concat,N=Array.prototype.join,kp=Array.prototype.slice,qi=Math.floor,ft=typeof BigInt=="function"?BigInt.prototype.valueOf:null,at=Object.getOwnPropertySymbols,pt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,sr=typeof Symbol=="function"&&typeof Symbol.iterator=="object",q=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===sr||!0)?Symbol.toStringTag:null,_i=Object.prototype.propertyIsEnumerable,xi=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function $i(e,r){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||Ni.call(/e/,r))return r;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-qi(-e):qi(e);if(n!==e){var a=String(n),u=gt.call(r,a.length+1);return G.call(a,t,"$&_")+"."+G.call(G.call(u,/([0-9]{3})/g,"$&_"),/_$/,"")}}return G.call(r,t,"$&_")}var st=Si(),Ii=st.custom,Fi=Bi(Ii)?Ii:null,Ui={__proto__:null,double:'"',single:"'"},Lp={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};ji.exports=function e(r,t,n,a){var u=t||{};if(D(u,"quoteStyle")&&!D(Ui,u.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(D(u,"maxStringLength")&&(typeof u.maxStringLength=="number"?u.maxStringLength<0&&u.maxStringLength!==1/0:u.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var f=D(u,"customInspect")?u.customInspect:!0;if(typeof f!="boolean"&&f!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(D(u,"indent")&&u.indent!==null&&u.indent!==" "&&!(parseInt(u.indent,10)===u.indent&&u.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(D(u,"numericSeparator")&&typeof u.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var c=u.numericSeparator;if(typeof r=="undefined")return"undefined";if(r===null)return"null";if(typeof r=="boolean")return r?"true":"false";if(typeof r=="string")return Ci(r,u);if(typeof r=="number"){if(r===0)return 1/0/r>0?"0":"-0";var y=String(r);return c?$i(r,y):y}if(typeof r=="bigint"){var h=String(r)+"n";return c?$i(r,h):h}var g=typeof u.depth=="undefined"?5:u.depth;if(typeof n=="undefined"&&(n=0),n>=g&&g>0&&typeof r=="object")return lt(r)?"[Array]":"[Object]";var d=fs(u,n);if(typeof a=="undefined")a=[];else if(Mi(a,r)>=0)return"[Circular]";function v(X,_r,pu){if(_r&&(a=kp.call(a),a.push(_r)),pu){var Gt={depth:u.depth};return D(u,"quoteStyle")&&(Gt.quoteStyle=u.quoteStyle),e(X,Gt,n+1,a)}return e(X,u,n+1,a)}if(typeof r=="function"&&!Ti(r)){var A=Zp(r),P=ne(r,v);return"[Function"+(A?": "+A:" (anonymous)")+"]"+(P.length>0?" { "+N.call(P,", ")+" }":"")}if(Bi(r)){var S=sr?G.call(String(r),/^(Symbol\(.*\))_[^)]*$/,"$1"):pt.call(r);return typeof r=="object"&&!sr?$r(S):S}if(is(r)){for(var x="<"+Oi.call(String(r.nodeName)),$=r.attributes||[],_=0;_<$.length;_++)x+=" "+$[_].name+"="+Di(zp($[_].value),"double",u);return x+=">",r.childNodes&&r.childNodes.length&&(x+="..."),x+="</"+Oi.call(String(r.nodeName))+">",x}if(lt(r)){if(r.length===0)return"[]";var k=ne(r,v);return d&&!us(k)?"["+ct(k,d)+"]":"[ "+N.call(k,", ")+" ]"}if(Hp(r)){var yr=ne(r,v);return!("cause"in Error.prototype)&&"cause"in r&&!_i.call(r,"cause")?"{ ["+String(r)+"] "+N.call(Ei.call("[cause]: "+v(r.cause),yr),", ")+" }":yr.length===0?"["+String(r)+"]":"{ ["+String(r)+"] "+N.call(yr,", ")+" }"}if(typeof r=="object"&&f){if(Fi&&typeof r[Fi]=="function"&&st)return st(r,{depth:g-n});if(f!=="symbol"&&typeof r.inspect=="function")return r.inspect()}if(rs(r)){var Nr=[];return Ai&&Ai.call(r,function(X,_r){Nr.push(v(_r,r,!0)+" => "+v(X,r))}),Ri("Map",oe.call(r),Nr,d)}if(ns(r)){var Mt=[];return wi&&wi.call(r,function(X){Mt.push(v(X,r))}),Ri("Set",ie.call(r),Mt,d)}if(es(r))return ut("WeakMap");if(os(r))return ut("WeakSet");if(ts(r))return ut("WeakRef");if(Vp(r))return $r(v(Number(r)));if(Qp(r))return $r(v(ft.call(r)));if(Yp(r))return $r(Mp.call(r));if(Kp(r))return $r(v(String(r)));if(typeof window!="undefined"&&r===window)return"{ [object Window] }";if(typeof globalThis!="undefined"&&r===globalThis||typeof globalThis!="undefined"&&r===globalThis)return"{ [object globalThis] }";if(!Jp(r)&&!Ti(r)){var de=ne(r,v),Ct=xi?xi(r)===Object.prototype:r instanceof Object||r.constructor===Object,he=r instanceof Object?"":"null prototype",jt=!Ct&&q&&Object(r)===r&&q in r?gt.call(W(r),8,-1):he?"Object":"",fu=Ct||typeof r.constructor!="function"?"":r.constructor.name?r.constructor.name+" ":"",me=fu+(jt||he?"["+N.call(Ei.call([],jt||[],he||[]),": ")+"] ":"");return de.length===0?me+"{}":d?me+"{"+ct(de,d)+"}":me+"{ "+N.call(de,", ")+" }"}return String(r)};function Di(e,r,t){var n=t.quoteStyle||r,a=Ui[n];return a+e+a}function zp(e){return G.call(String(e),/"/g,"&quot;")}function lt(e){return W(e)==="[object Array]"&&(!q||!(typeof e=="object"&&q in e))}function Jp(e){return W(e)==="[object Date]"&&(!q||!(typeof e=="object"&&q in e))}function Ti(e){return W(e)==="[object RegExp]"&&(!q||!(typeof e=="object"&&q in e))}function Hp(e){return W(e)==="[object Error]"&&(!q||!(typeof e=="object"&&q in e))}function Kp(e){return W(e)==="[object String]"&&(!q||!(typeof e=="object"&&q in e))}function Vp(e){return W(e)==="[object Number]"&&(!q||!(typeof e=="object"&&q in e))}function Yp(e){return W(e)==="[object Boolean]"&&(!q||!(typeof e=="object"&&q in e))}function Bi(e){if(sr)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!pt)return!1;try{return pt.call(e),!0}catch(r){}return!1}function Qp(e){if(!e||typeof e!="object"||!ft)return!1;try{return ft.call(e),!0}catch(r){}return!1}var Xp=Object.prototype.hasOwnProperty||function(e){return e in this};function D(e,r){return Xp.call(e,r)}function W(e){return Cp.call(e)}function Zp(e){if(e.name)return e.name;var r=Gp.call(jp.call(e),/^function\s*([\w$]+)/);return r?r[1]:null}function Mi(e,r){if(e.indexOf)return e.indexOf(r);for(var t=0,n=e.length;t<n;t++)if(e[t]===r)return t;return-1}function rs(e){if(!oe||!e||typeof e!="object")return!1;try{oe.call(e);try{ie.call(e)}catch(r){return!0}return e instanceof Map}catch(r){}return!1}function es(e){if(!Ir||!e||typeof e!="object")return!1;try{Ir.call(e,Ir);try{Fr.call(e,Fr)}catch(r){return!0}return e instanceof WeakMap}catch(r){}return!1}function ts(e){if(!Pi||!e||typeof e!="object")return!1;try{return Pi.call(e),!0}catch(r){}return!1}function ns(e){if(!ie||!e||typeof e!="object")return!1;try{ie.call(e);try{oe.call(e)}catch(r){return!0}return e instanceof Set}catch(r){}return!1}function os(e){if(!Fr||!e||typeof e!="object")return!1;try{Fr.call(e,Fr);try{Ir.call(e,Ir)}catch(r){return!0}return e instanceof WeakSet}catch(r){}return!1}function is(e){return!e||typeof e!="object"?!1:typeof HTMLElement!="undefined"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function Ci(e,r){if(e.length>r.maxStringLength){var t=e.length-r.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Ci(gt.call(e,0,r.maxStringLength),r)+n}var a=Lp[r.quoteStyle||"single"];a.lastIndex=0;var u=G.call(G.call(e,a,"\\$1"),/[\x00-\x1f]/g,as);return Di(u,"single",r)}function as(e){var r=e.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[r];return t?"\\"+t:"\\x"+(r<16?"0":"")+Wp.call(r.toString(16))}function $r(e){return"Object("+e+")"}function ut(e){return e+" { ? }"}function Ri(e,r,t,n){var a=n?ct(t,n):N.call(t,", ");return e+" ("+r+") {"+a+"}"}function us(e){for(var r=0;r<e.length;r++)if(Mi(e[r],`
11
+ `)>=0)return!1;return!0}function fs(e,r){var t;if(e.indent===" ")t=" ";else if(typeof e.indent=="number"&&e.indent>0)t=N.call(Array(e.indent+1)," ");else return null;return{base:t,prev:N.call(Array(r+1),t)}}function ct(e,r){if(e.length===0)return"";var t=`
12
+ `+r.prev+r.base;return t+N.call(e,","+t)+`
13
+ `+r.prev}function ne(e,r){var t=lt(e),n=[];if(t){n.length=e.length;for(var a=0;a<e.length;a++)n[a]=D(e,a)?r(e[a],e):""}var u=typeof at=="function"?at(e):[],f;if(sr){f={};for(var c=0;c<u.length;c++)f["$"+u[c]]=u[c]}for(var y in e)D(e,y)&&(t&&String(Number(y))===y&&y<e.length||sr&&f["$"+y]instanceof Symbol||(Ni.call(/[^\w$]/,y)?n.push(r(y,e)+": "+r(e[y],e)):n.push(y+": "+r(e[y],e))));if(typeof at=="function")for(var h=0;h<u.length;h++)_i.call(e,u[h])&&n.push("["+r(u[h])+"]: "+r(e[u[h]],e));return n}});var ae=l((ug,Gi)=>{"use strict";o();i();Gi.exports=function(r){return typeof r=="string"||typeof r=="symbol"}});var ki=l((sg,Wi)=>{"use strict";o();i();var ps=w(),ss=Tr(),ls=ae();Wi.exports=function(r,t){if(!ls(t))throw new ps("Assertion failed: IsPropertyKey(P) is not true, got "+ss(t));return r[t]}});var Hi=l((yg,Ji)=>{"use strict";o();i();var zi=Function.prototype.toString,lr=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,ht,ue;if(typeof lr=="function"&&typeof Object.defineProperty=="function")try{ht=Object.defineProperty({},"length",{get:function(){throw ue}}),ue={},lr(function(){throw 42},null,ht)}catch(e){e!==ue&&(lr=null)}else lr=null;var cs=/^\s*class\b/,mt=function(r){try{var t=zi.call(r);return cs.test(t)}catch(n){return!1}},dt=function(r){try{return mt(r)?!1:(zi.call(r),!0)}catch(t){return!1}},fe=Object.prototype.toString,ys="[object Object]",vs="[object Function]",gs="[object GeneratorFunction]",ds="[object HTMLAllCollection]",hs="[object HTML document.all class]",ms="[object HTMLCollection]",bs=typeof Symbol=="function"&&!!Symbol.toStringTag,Ss=!(0 in[,]),bt=function(){return!1};typeof document=="object"&&(Li=document.all,fe.call(Li)===fe.call(document.all)&&(bt=function(r){if((Ss||!r)&&(typeof r=="undefined"||typeof r=="object"))try{var t=fe.call(r);return(t===ds||t===hs||t===ms||t===ys)&&r("")==null}catch(n){}return!1}));var Li;Ji.exports=lr?function(r){if(bt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;try{lr(r,null,ht)}catch(t){if(t!==ue)return!1}return!mt(r)&&dt(r)}:function(r){if(bt(r))return!0;if(!r||typeof r!="function"&&typeof r!="object")return!1;if(bs)return dt(r);if(mt(r))return!1;var t=fe.call(r);return t!==vs&&t!==gs&&!/^\[object HTML/.test(t)?!1:dt(r)}});var St=l((dg,Ki)=>{"use strict";o();i();Ki.exports=Hi()});var Xi=l((bg,Qi)=>{"use strict";o();i();var Vi=w(),As=ki(),ws=St(),Ps=ae(),Yi=Tr();Qi.exports=function(r,t){if(!Ps(t))throw new Vi("Assertion failed: IsPropertyKey(P) is not true");var n=As(r,t);if(n!=null){if(!ws(n))throw new Vi(Yi(t)+" is not a function: "+Yi(n));return n}}});var ra=l((wg,Zi)=>{"use strict";o();i();var Os=Te();Zi.exports=function(){return Os()&&!!Symbol.toStringTag}});var Ot=l((Eg,oa)=>{"use strict";o();i();var At=I(),ea=ra()(),ta,na,wt,Pt;ea&&(ta=At("Object.prototype.hasOwnProperty"),na=At("RegExp.prototype.exec"),wt={},pe=function(){throw wt},Pt={toString:pe,valueOf:pe},typeof Symbol.toPrimitive=="symbol"&&(Pt[Symbol.toPrimitive]=pe));var pe,Es=At("Object.prototype.toString"),qs=Object.getOwnPropertyDescriptor,xs="[object RegExp]";oa.exports=ea?function(r){if(!r||typeof r!="object")return!1;var t=qs(r,"lastIndex"),n=t&&ta(t,"value");if(!n)return!1;try{na(r,Pt)}catch(a){return a===wt}}:function(r){return!r||typeof r!="object"&&typeof r!="function"?!1:Es(r)===xs}});var Et=l(($g,ia)=>{"use strict";o();i();var $s=I(),Is=Ot(),Fs=$s("RegExp.prototype.exec"),Ts=w();ia.exports=function(r){if(!Is(r))throw new Ts("`regex` must be a RegExp");return function(n){return Fs(r,n)!==null}}});var ua=l((Tg,aa)=>{"use strict";o();i();aa.exports=function(r,t){for(var n=0;n<r.length;n+=1)if(!t(r[n],n,r))return!1;return!0}});var pa=l((_g,fa)=>{"use strict";o();i();fa.exports=function(r){if(r===null)return"Null";if(typeof r=="undefined")return"Undefined";if(typeof r=="function"||typeof r=="object")return"Object";if(typeof r=="number")return"Number";if(typeof r=="boolean")return"Boolean";if(typeof r=="string")return"String"}});var qt=l((Bg,sa)=>{"use strict";o();i();var Rs=pa();sa.exports=function(r){return typeof r=="symbol"?"Symbol":typeof r=="bigint"?"BigInt":Rs(r)}});var ya=l((jg,ca)=>{"use strict";o();i();var la=w(),Ns=Tr(),_s=ae(),Us=qt();ca.exports=function(r,t){if(Us(r)!=="Object")throw new la("Assertion failed: Type(O) is not Object");if(!_s(t))throw new la("Assertion failed: IsPropertyKey(P) is not true, got "+Ns(t));return r[t]}});var ga=l((kg,va)=>{"use strict";o();i();var Ds=F();va.exports=Ds("%Math.min%")});var xt=l((Jg,da)=>{"use strict";o();i();da.exports=Number.isNaN||function(r){return r!==r}});var ma=l((Vg,ha)=>{"use strict";o();i();var Bs=xt();ha.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!Bs(e)&&e!==1/0&&e!==-1/0}});var se=l((Xg,Sa)=>{"use strict";o();i();var ba=F(),Ms=ba("%Math.abs%"),Cs=ba("%Math.floor%"),js=xt(),Gs=ma();Sa.exports=function(r){if(typeof r!="number"||js(r)||!Gs(r))return!1;var t=Ms(r);return Cs(t)===t}});var It=l((ed,Aa)=>{"use strict";o();i();var Ws=I(),$t=w(),ks=se(),Ls=Ws("String.prototype.slice");Aa.exports=function(r,t,n){if(typeof r!="string")throw new $t("Assertion failed: `string` must be a String");if(typeof t!="string")throw new $t("Assertion failed: `searchValue` must be a String");if(!ks(n)||n<0)throw new $t("Assertion failed: `fromIndex` must be a non-negative integer");var a=r.length;if(t===""&&n<=a)return n;for(var u=t.length,f=n;f<=a-u;f+=1){var c=Ls(r,f,f+u);if(c===t)return f}return-1}});var le=l((od,wa)=>{"use strict";o();i();var zs=w();wa.exports=function(r){if(r==null)throw new zs(arguments.length>0&&arguments[1]||"Cannot call method on "+r);return r}});var ce=l((ud,Pa)=>{"use strict";o();i();var Js=F(),Hs=Js("%String%"),Ks=w();Pa.exports=function(r){if(typeof r=="symbol")throw new Ks("Cannot convert a Symbol value to a string");return Hs(r)}});var Ft=l((sd,qa)=>{"use strict";o();i();var Vs=le(),Ys=ce(),Qs=I(),Oa=Qs("String.prototype.replace"),Ea=/^\s$/.test("\u180E"),Xs=Ea?/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/:/^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/,Zs=Ea?/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/:/[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;qa.exports=function(){var r=Ys(Vs(this));return Oa(Oa(r,Xs,""),Zs,"")}});var Tt=l((yd,$a)=>{"use strict";o();i();var rl=Ft(),xa="\u200B",cr="\u180E";$a.exports=function(){return String.prototype.trim&&xa.trim()===xa&&cr.trim()===cr&&("_"+cr).trim()==="_"+cr&&(cr+"_").trim()===cr+"_"?String.prototype.trim:rl}});var Fa=l((dd,Ia)=>{"use strict";o();i();var el=Ar(),tl=Tt();Ia.exports=function(){var r=tl();return el(String.prototype,{trim:r},{trim:function(){return String.prototype.trim!==r}}),r}});var _a=l((bd,Na)=>{"use strict";o();i();var nl=Hr(),ol=Ar(),il=le(),al=Ft(),Ta=Tt(),ul=Fa(),fl=nl(Ta()),Ra=function(r){return il(r),fl(r)};ol(Ra,{getPolyfill:Ta,implementation:al,shim:ul});Na.exports=Ra});var Ma=l((wd,Ba)=>{"use strict";o();i();var Nt=F(),Rt=Nt("%Number%"),pl=Nt("%RegExp%"),sl=w(),Ua=Nt("%parseInt%"),ll=I(),ye=Et(),Da=ll("String.prototype.slice"),cl=ye(/^0b[01]+$/i),yl=ye(/^0o[0-7]+$/i),vl=ye(/^[-+]0x[0-9a-f]+$/i),gl=["\x85","\u200B","\uFFFE"].join(""),dl=new pl("["+gl+"]","g"),hl=ye(dl),ml=_a();Ba.exports=function e(r){if(typeof r!="string")throw new sl("Assertion failed: `argument` is not a String");if(cl(r))return Rt(Ua(Da(r,2),2));if(yl(r))return Rt(Ua(Da(r,2),8));if(hl(r)||vl(r))return NaN;var t=ml(r);return t!==r?e(t):Rt(r)}});var Ga=l((Ed,ja)=>{"use strict";o();i();var bl=w(),Ca=se(),Sl=I(),Al=Sl("String.prototype.slice");ja.exports=function(r,t,n){if(typeof r!="string"||!Ca(t)||arguments.length>2&&!Ca(n))throw new bl("`S` must be a String, and `inclusiveStart` and `exclusiveEnd` must be integers");return Al(r,t,arguments.length>2?n:r.length)}});var ka=l(($d,Wa)=>{"use strict";o();i();Wa.exports=function(r){return typeof r=="string"||typeof r=="undefined"}});var za=l((Td,La)=>{"use strict";o();i();var wl=I()("String.prototype.slice");La.exports=function(r,t){return r===t?!0:r.length>t.length?!1:wl(t,0,r.length)===r}});var Ya=l((_d,Va)=>{"use strict";o();i();var B=w(),Ka=Et(),Pl=ua(),_t=Tr(),Ol=ya(),El=Je(),ql=ga(),xl=It(),Ja=Ma(),M=Ga(),$l=ce(),Ha=qt(),Il=se(),Fl=ka(),Rr=za(),Tl=Ka(/^\$[0-9]/),Rl=Ka(/^\$[0-9][0-9]/);Va.exports=function(r,t,n,a,u,f){if(typeof r!="string")throw new B("Assertion failed: `matched` must be a String");if(typeof t!="string")throw new B("Assertion failed: `str` must be a String");if(!Il(n)||n<0)throw new B("Assertion failed: `position` must be a nonnegative integer, got "+_t(n));if(!El(a)||!Pl(a,Fl))throw new B("Assertion failed: `captures` must be a possibly-empty List of Strings or `undefined`, got "+_t(a));if(typeof u!="undefined"&&Ha(u)!=="Object")throw new B("Assertion failed: `namedCaptures` must be `undefined` or an Object");if(typeof f!="string")throw new B("Assertion failed: `replacementTemplate` must be a String");var c=t.length;if(n>c)throw new B("Assertion failed: position > stringLength, got "+_t(n));for(var y=f,h="";y!=="";){var g,d,v;if(Rr("$$",y))g="$$",d="$";else if(Rr("$`",y))g="$`",d=M(t,0,n);else if(Rr("$&",y))g="$&",d=r;else if(Rr("$'",y)){g="$'";var A=r.length,P=n+A;d=M(t,ql(P,c))}else if(Tl(y)){var S=Rl(y)?2:1,x=M(y,1,1+S),$=Ja(x);if($<0||$>99)throw new B("Assertion failed: `index` must be >= 0 and <= 99");var _=a.length;$>_&&S===2&&(S=1,x=M(x,0,1),$=Ja(x)),g=M(y,0,1+S),1<=$&&$<=_?(v=a[$-1],typeof v=="undefined"?d="":d=v):d=g}else if(Rr("$<",y)){var k=xl(y,">",0);if(k===-1||typeof u=="undefined")g="$<",d=g;else{g=M(y,0,k+1);var yr=M(y,2,k);if(Ha(u)!=="Object")throw new B("Assertion failed: Type(namedCaptures) is not Object");v=Ol(u,yr),typeof v=="undefined"?d="":d=$l(v)}}else g=M(y,0,1),d=g;var Nr=g.length;y=M(y,Nr),h+=d}return h}});var Dt=l((Bd,ru)=>{"use strict";o();i();var Qa=ei(),Nl=Xi(),_l=Ya(),Ul=St(),Dl=le(),ve=ce(),Xa=It(),Bl=F(),ge=I(),Ml=Ee()(),Cl=Ot(),jl=Bl("%Math.max%"),Za=w(),Gl=ge("Array.prototype.push"),Ut=ge("String.prototype.slice"),Wl=ge("String.prototype.indexOf"),kl=ge("String.prototype.replace");ru.exports=function(r,t){var n=Dl(this),a=Cl(r);if(a&&Wl(Ut(r,r.source.length+2),"g")===-1)throw new Za("use .replace for a non-global regex. NOTE: this may be allowed in the future.");if(Ml&&Symbol.replace){if(r!=null){var u=Nl(r,Symbol.replace);if(typeof u!="undefined")return Qa(u,r,[n,t])}}else if(a)return kl(n,r,t);var f=ve(n),c=ve(r),y=Ul(t);y||(t=ve(t));for(var h=c.length,g=jl(1,h),d=[],v=Xa(f,c,0);v!==-1;)Gl(d,v),v=Xa(f,c,v+g);for(var A=0,P="",S=0;S<d.length;S+=1){var x;if(y)x=ve(Qa(t,void 0,[c,d[S],f]));else{if(typeof t!="string")throw new Za("Assertion failed: `replaceValue` should be a string at this point");var $=[];x=_l(c,f,d[S],$,void 0,t)}var _=Ut(f,A,d[S]);P+=_+x,A=d[S]+h}return A<f.length&&(P+=Ut(f,A)),P}});var Bt=l((jd,eu)=>{"use strict";o();i();var Ll=Dt();eu.exports=function(){return String.prototype.replaceAll||Ll}});var nu=l((kd,tu)=>{"use strict";o();i();var zl=Ar(),Jl=Bt();tu.exports=function(){var r=Jl();return zl(String.prototype,{replaceAll:r},{replaceAll:function(){return String.prototype.replaceAll!==r}}),r}});var uu=l((Jd,au)=>{"use strict";o();i();var Hl=Hr(),Kl=Ar(),ou=Dt(),Vl=Bt(),Yl=nu(),iu=Hl(ou);Kl(iu,{getPolyfill:Vl,implementation:ou,shim:Yl});au.exports=iu});o();i();var Vd=lu(uu(),1);export{yu as DynamicSnippetsGenerator};
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@fern-api/php-dynamic-snippets",
3
+ "version": "0.0.1",
4
+ "repository": {
5
+ "type": "git",
6
+ "url": "https://github.com/fern-api/fern.git",
7
+ "directory": "generators/php/dynamic-snippets"
8
+ },
9
+ "type": "module",
10
+ "exports": {
11
+ "import": {
12
+ "types": "./esm/index.d.ts",
13
+ "default": "./esm/index.js"
14
+ },
15
+ "require": {
16
+ "types": "./cjs/index.d.cts",
17
+ "default": "./cjs/index.cjs"
18
+ }
19
+ },
20
+ "main": "./cjs/index.cjs",
21
+ "module": "./esm/index.js",
22
+ "types": "./cjs/index.d.cts",
23
+ "files": [
24
+ "cjs",
25
+ "esm"
26
+ ]
27
+ }