@ws-ui/shared 1.6.1 → 1.6.3
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.
|
@@ -148,7 +148,8 @@ declare namespace webforms {
|
|
|
148
148
|
| MemberFunctionEvent
|
|
149
149
|
| NavigationEvent
|
|
150
150
|
| SimpleActionEvent
|
|
151
|
-
| DialogActionEvent
|
|
151
|
+
| DialogActionEvent
|
|
152
|
+
| QodlyProActionEvent;
|
|
152
153
|
|
|
153
154
|
type EventExtra = {
|
|
154
155
|
shortcuts?: {
|
|
@@ -160,7 +161,12 @@ declare namespace webforms {
|
|
|
160
161
|
interface BaseEvent {
|
|
161
162
|
id: string;
|
|
162
163
|
events: string[];
|
|
163
|
-
type:
|
|
164
|
+
type:
|
|
165
|
+
| 'method'
|
|
166
|
+
| 'navigation'
|
|
167
|
+
| 'simple-action'
|
|
168
|
+
| 'dialog'
|
|
169
|
+
| 'qodly-pro-action';
|
|
164
170
|
disabled?: boolean;
|
|
165
171
|
extra?: EventExtra;
|
|
166
172
|
}
|
|
@@ -169,18 +175,18 @@ declare namespace webforms {
|
|
|
169
175
|
type: 'method';
|
|
170
176
|
params: MethodParam[];
|
|
171
177
|
} & Partial<{
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
178
|
+
method: string;
|
|
179
|
+
dataclass: string;
|
|
180
|
+
returns: Omit<MethodParam, 'id'>;
|
|
181
|
+
namespace: string;
|
|
182
|
+
code: string;
|
|
183
|
+
feedback: boolean;
|
|
184
|
+
datasource: string;
|
|
185
|
+
variadicType: string;
|
|
186
|
+
methodType?: 'dataclass' | 'singleton';
|
|
187
|
+
openIn: string;
|
|
188
|
+
allowedOnHTTPGET?: boolean;
|
|
189
|
+
}>;
|
|
184
190
|
|
|
185
191
|
type WebformStateActionType = 'add' | 'delete' | 'clear';
|
|
186
192
|
|
|
@@ -223,6 +229,17 @@ declare namespace webforms {
|
|
|
223
229
|
targetDialog: string;
|
|
224
230
|
}
|
|
225
231
|
|
|
232
|
+
type QodlyProActionEvent = BaseEvent & {
|
|
233
|
+
type: 'qodly-pro-action';
|
|
234
|
+
actionType: '4d-method' | 'auth';
|
|
235
|
+
} & Partial<{
|
|
236
|
+
action: string;
|
|
237
|
+
method: string;
|
|
238
|
+
params: MethodParam[];
|
|
239
|
+
returns: Omit<MethodParam, 'id'>;
|
|
240
|
+
variadicType: string;
|
|
241
|
+
}>;
|
|
242
|
+
|
|
226
243
|
interface NavigationEvent extends BaseEvent {
|
|
227
244
|
type: 'navigation';
|
|
228
245
|
parent: string;
|
|
@@ -255,7 +272,7 @@ declare namespace webforms {
|
|
|
255
272
|
|
|
256
273
|
type MethodReturn = Omit<MethodParam, 'name'>;
|
|
257
274
|
|
|
258
|
-
interface QueryParam extends MethodParam {
|
|
275
|
+
interface QueryParam extends MethodParam {}
|
|
259
276
|
|
|
260
277
|
interface OrderBy {
|
|
261
278
|
name: string; // replace with attribute
|
package/dist/index.cjs.js
CHANGED
|
@@ -140,5 +140,5 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
140
140
|
${a}`}function tg(e){return/^\/\/%attributes.*(?:\r\n|\n)?/g.test(e)}function rg(e){return e.replace(/^\/\/%attributes.*(?:\r\n|\n)?/g,"")}const xR=()=>Dl.uuid().replaceAll("-","").toUpperCase(),Xe="/rest/$designer",ho="/rest/$designer-ext";function OR(...e){return r=>{if(e.length===0)return r;const n={...r};return e.forEach(o=>{typeof n[o]=="string"&&(n[o]=new Date(n[o]))}),n}}class _l extends Error{constructor(r,n,o){super(),this.url=r,this.response=n,this.data=o}log(){console.error("Error while sending the request",this)}}async function Le(e,r){var a;ja.next({action:io.REQUEST_SENT});const n=await window.fetch(e,r);if(/401/.test(n.status.toString())&&(window.location.href="/login.html?redirect=studio"),/^[45]/.test(n.status.toString())){let u;try{const l=await n.json();((a=l==null?void 0:l.__ERROR)==null?void 0:a.some(w=>w.errCode===1651))&&ja.next({action:io.EVENT_EMITED,payload:{eventName:"onsessionexpired"}}),u=new _l(e,n,l)}catch{u=new _l(e,n)}throw u.log(),u}return await n.json()}function AR(e){return ja.next({action:io.REQUEST_SENT}),e}var lr={},lt={},Fh;function yn(){if(Fh)return lt;Fh=1;var e=lt.ValidationError=function(f,g,b,_,x,C){if(Array.isArray(_)?(this.path=_,this.property=_.reduce(function(M,H){return M+d(H)},"instance")):_!==void 0&&(this.property=_),f&&(this.message=f),b){var T=b.$id||b.id;this.schema=T||b}g!==void 0&&(this.instance=g),this.name=x,this.argument=C,this.stack=this.toString()};e.prototype.toString=function(){return this.property+" "+this.message};var r=lt.ValidatorResult=function(f,g,b,_){this.instance=f,this.schema=g,this.options=b,this.path=_.path,this.propertyPath=_.propertyPath,this.errors=[],this.throwError=b&&b.throwError,this.throwFirst=b&&b.throwFirst,this.throwAll=b&&b.throwAll,this.disableFormat=b&&b.disableFormat===!0};r.prototype.addError=function(f){var g;if(typeof f=="string")g=new e(f,this.instance,this.schema,this.path);else{if(!f)throw new Error("Missing error detail");if(!f.message)throw new Error("Missing error message");if(!f.name)throw new Error("Missing validator type");g=new e(f.message,this.instance,this.schema,this.path,f.name,f.argument)}if(this.errors.push(g),this.throwFirst)throw new o(this);if(this.throwError)throw g;return g},r.prototype.importErrors=function(f){typeof f=="string"||f&&f.validatorType?this.addError(f):f&&f.errors&&(this.errors=this.errors.concat(f.errors))};function n(m,f){return f+": "+m.toString()+`
|
|
141
141
|
`}r.prototype.toString=function(f){return this.errors.map(n).join("")},Object.defineProperty(r.prototype,"valid",{get:function(){return!this.errors.length}}),lt.ValidatorResultError=o;function o(m){typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,o),this.instance=m.instance,this.schema=m.schema,this.options=m.options,this.errors=m.errors}o.prototype=new Error,o.prototype.constructor=o,o.prototype.name="Validation Error";var a=lt.SchemaError=function m(f,g){this.message=f,this.schema=g,Error.call(this,f),typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,m)};a.prototype=Object.create(Error.prototype,{constructor:{value:a,enumerable:!1},name:{value:"SchemaError",enumerable:!1}});var u=lt.SchemaContext=function(f,g,b,_,x){this.schema=f,this.options=g,Array.isArray(b)?(this.path=b,this.propertyPath=b.reduce(function(C,T){return C+d(T)},"instance")):this.propertyPath=b,this.base=_,this.schemas=x};u.prototype.resolve=function(f){return p(this.base,f)},u.prototype.makeChild=function(f,g){var b=g===void 0?this.path:this.path.concat([g]),_=f.$id||f.id;let x=p(this.base,_||"");var C=new u(f,this.options,b,x,Object.create(this.schemas));return _&&!C.schemas[x]&&(C.schemas[x]=f),C};var l=lt.FORMAT_REGEXPS={"date-time":/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,date:/^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,time:/^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,duration:/P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,email:/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,"idn-email":/^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,"ip-address":/^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,ipv6:/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,uri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"uri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,iri:/^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,"iri-reference":/^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"uri-template":/(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,"json-pointer":/^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,"relative-json-pointer":/^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,hostname:/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"host-name":/^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,"utc-millisec":function(m){return typeof m=="string"&&parseFloat(m)===parseInt(m,10)&&!isNaN(m)},regex:function(m){var f=!0;try{new RegExp(m)}catch{f=!1}return f},style:/[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,color:/^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,phone:/^\+(?:[0-9] ?){6,14}[0-9]$/,alpha:/^[a-zA-Z]+$/,alphanumeric:/^[a-zA-Z0-9]+$/};l.regexp=l.regex,l.pattern=l.regex,l.ipv4=l["ip-address"],lt.isFormat=function(f,g,b){if(typeof f=="string"&&l[g]!==void 0){if(l[g]instanceof RegExp)return l[g].test(f);if(typeof l[g]=="function")return l[g](f)}else if(b&&b.customFormats&&typeof b.customFormats[g]=="function")return b.customFormats[g](f);return!0};var d=lt.makeSuffix=function(f){return f=f.toString(),!f.match(/[.\s\[\]]/)&&!f.match(/^[\d]/)?"."+f:f.match(/^\d+$/)?"["+f+"]":"["+JSON.stringify(f)+"]"};lt.deepCompareStrict=function m(f,g){if(typeof f!=typeof g)return!1;if(Array.isArray(f))return!Array.isArray(g)||f.length!==g.length?!1:f.every(function(x,C){return m(f[C],g[C])});if(typeof f=="object"){if(!f||!g)return f===g;var b=Object.keys(f),_=Object.keys(g);return b.length!==_.length?!1:b.every(function(x){return m(f[x],g[x])})}return f===g};function w(m,f,g,b){typeof g=="object"?f[b]=h(m[b],g):m.indexOf(g)===-1&&f.push(g)}function S(m,f,g){f[g]=m[g]}function y(m,f,g,b){typeof f[b]!="object"||!f[b]?g[b]=f[b]:m[b]?g[b]=h(m[b],f[b]):g[b]=f[b]}function h(m,f){var g=Array.isArray(f),b=g&&[]||{};return g?(m=m||[],b=b.concat(m),f.forEach(w.bind(null,m,b))):(m&&typeof m=="object"&&Object.keys(m).forEach(S.bind(null,m,b)),Object.keys(f).forEach(y.bind(null,m,f,b))),b}lt.deepMerge=h,lt.objectGetPath=function(f,g){for(var b=g.split("/").slice(1),_;typeof(_=b.shift())=="string";){var x=decodeURIComponent(_.replace(/~0/,"~").replace(/~1/g,"/"));if(!(x in f))return;f=f[x]}return f};function c(m){return"/"+encodeURIComponent(m).replace(/~/g,"%7E")}lt.encodePath=function(f){return f.map(c).join("")},lt.getDecimalPlaces=function(f){var g=0;if(isNaN(f))return g;typeof f!="number"&&(f=Number(f));var b=f.toString().split("e");if(b.length===2){if(b[1][0]!=="-")return g;g=Number(b[1].slice(1))}var _=b[0].split(".");return _.length===2&&(g+=_[1].length),g},lt.isSchema=function(f){return typeof f=="object"&&f||typeof f=="boolean"};var p=lt.resolveUrl=function(f,g){const b=new URL(g,new URL(f,"resolve://"));if(b.protocol==="resolve:"){const{pathname:_,search:x,hash:C}=b;return _+x+C}return b.toString()};return lt}var nl,Lh;function TR(){if(Lh)return nl;Lh=1;var e=yn(),r=e.ValidatorResult,n=e.SchemaError,o={};o.ignoreProperties={id:!0,default:!0,description:!0,title:!0,additionalItems:!0,then:!0,else:!0,$schema:!0,$ref:!0,extends:!0};var a=o.validators={};a.type=function(h,c,p,m){if(h===void 0)return null;var f=new r(h,c,p,m),g=Array.isArray(c.type)?c.type:[c.type];if(!g.some(this.testType.bind(this,h,c,p,m))){var b=g.map(function(_){if(_){var x=_.$id||_.id;return x?"<"+x+">":_+""}});f.addError({name:"type",argument:b,message:"is not of a type(s) "+b})}return f};function u(y,h,c,p,m){var f=h.throwError,g=h.throwAll;h.throwError=!1,h.throwAll=!1;var b=this.validateSchema(y,m,h,c);return h.throwError=f,h.throwAll=g,!b.valid&&p instanceof Function&&p(b),b.valid}a.anyOf=function(h,c,p,m){if(h===void 0)return null;var f=new r(h,c,p,m),g=new r(h,c,p,m);if(!Array.isArray(c.anyOf))throw new n("anyOf must be an array");if(!c.anyOf.some(u.bind(this,h,p,m,function(_){g.importErrors(_)}))){var b=c.anyOf.map(function(_,x){var C=_.$id||_.id;return C?"<"+C+">":_.title&&JSON.stringify(_.title)||_.$ref&&"<"+_.$ref+">"||"[subschema "+x+"]"});p.nestedErrors&&f.importErrors(g),f.addError({name:"anyOf",argument:b,message:"is not any of "+b.join(",")})}return f},a.allOf=function(h,c,p,m){if(h===void 0)return null;if(!Array.isArray(c.allOf))throw new n("allOf must be an array");var f=new r(h,c,p,m),g=this;return c.allOf.forEach(function(b,_){var x=g.validateSchema(h,b,p,m);if(!x.valid){var C=b.$id||b.id,T=C||b.title&&JSON.stringify(b.title)||b.$ref&&"<"+b.$ref+">"||"[subschema "+_+"]";f.addError({name:"allOf",argument:{id:T,length:x.errors.length,valid:x},message:"does not match allOf schema "+T+" with "+x.errors.length+" error[s]:"}),f.importErrors(x)}}),f},a.oneOf=function(h,c,p,m){if(h===void 0)return null;if(!Array.isArray(c.oneOf))throw new n("oneOf must be an array");var f=new r(h,c,p,m),g=new r(h,c,p,m),b=c.oneOf.filter(u.bind(this,h,p,m,function(x){g.importErrors(x)})).length,_=c.oneOf.map(function(x,C){var T=x.$id||x.id;return T||x.title&&JSON.stringify(x.title)||x.$ref&&"<"+x.$ref+">"||"[subschema "+C+"]"});return b!==1&&(p.nestedErrors&&f.importErrors(g),f.addError({name:"oneOf",argument:_,message:"is not exactly one from "+_.join(",")})),f},a.if=function(h,c,p,m){if(h===void 0)return null;if(!e.isSchema(c.if))throw new Error('Expected "if" keyword to be a schema');var f=u.call(this,h,p,m,null,c.if),g=new r(h,c,p,m),b;if(f){if(c.then===void 0)return;if(!e.isSchema(c.then))throw new Error('Expected "then" keyword to be a schema');b=this.validateSchema(h,c.then,p,m.makeChild(c.then)),g.importErrors(b)}else{if(c.else===void 0)return;if(!e.isSchema(c.else))throw new Error('Expected "else" keyword to be a schema');b=this.validateSchema(h,c.else,p,m.makeChild(c.else)),g.importErrors(b)}return g};function l(y,h){if(Object.hasOwnProperty.call(y,h))return y[h];if(h in y){for(;y=Object.getPrototypeOf(y);)if(Object.propertyIsEnumerable.call(y,h))return y[h]}}a.propertyNames=function(h,c,p,m){if(this.types.object(h)){var f=new r(h,c,p,m),g=c.propertyNames!==void 0?c.propertyNames:{};if(!e.isSchema(g))throw new n('Expected "propertyNames" to be a schema (object or boolean)');for(var b in h)if(l(h,b)!==void 0){var _=this.validateSchema(b,g,p,m.makeChild(g));f.importErrors(_)}return f}},a.properties=function(h,c,p,m){if(this.types.object(h)){var f=new r(h,c,p,m),g=c.properties||{};for(var b in g){var _=g[b];if(_!==void 0){if(_===null)throw new n('Unexpected null, expected schema in "properties"');typeof p.preValidateProperty=="function"&&p.preValidateProperty(h,b,_,p,m);var x=l(h,b),C=this.validateSchema(x,_,p,m.makeChild(_,b));C.instance!==f.instance[b]&&(f.instance[b]=C.instance),f.importErrors(C)}}return f}};function d(y,h,c,p,m,f){if(this.types.object(y)&&!(h.properties&&h.properties[m]!==void 0))if(h.additionalProperties===!1)f.addError({name:"additionalProperties",argument:m,message:"is not allowed to have the additional property "+JSON.stringify(m)});else{var g=h.additionalProperties||{};typeof c.preValidateProperty=="function"&&c.preValidateProperty(y,m,g,c,p);var b=this.validateSchema(y[m],g,c,p.makeChild(g,m));b.instance!==f.instance[m]&&(f.instance[m]=b.instance),f.importErrors(b)}}a.patternProperties=function(h,c,p,m){if(this.types.object(h)){var f=new r(h,c,p,m),g=c.patternProperties||{};for(var b in h){var _=!0;for(var x in g){var C=g[x];if(C!==void 0){if(C===null)throw new n('Unexpected null, expected schema in "patternProperties"');try{var T=new RegExp(x,"u")}catch{T=new RegExp(x)}if(T.test(b)){_=!1,typeof p.preValidateProperty=="function"&&p.preValidateProperty(h,b,C,p,m);var M=this.validateSchema(h[b],C,p,m.makeChild(C,b));M.instance!==f.instance[b]&&(f.instance[b]=M.instance),f.importErrors(M)}}}_&&d.call(this,h,c,p,m,b,f)}return f}},a.additionalProperties=function(h,c,p,m){if(this.types.object(h)){if(c.patternProperties)return null;var f=new r(h,c,p,m);for(var g in h)d.call(this,h,c,p,m,g,f);return f}},a.minProperties=function(h,c,p,m){if(this.types.object(h)){var f=new r(h,c,p,m),g=Object.keys(h);return g.length>=c.minProperties||f.addError({name:"minProperties",argument:c.minProperties,message:"does not meet minimum property length of "+c.minProperties}),f}},a.maxProperties=function(h,c,p,m){if(this.types.object(h)){var f=new r(h,c,p,m),g=Object.keys(h);return g.length<=c.maxProperties||f.addError({name:"maxProperties",argument:c.maxProperties,message:"does not meet maximum property length of "+c.maxProperties}),f}},a.items=function(h,c,p,m){var f=this;if(this.types.array(h)&&c.items!==void 0){var g=new r(h,c,p,m);return h.every(function(b,_){if(Array.isArray(c.items))var x=c.items[_]===void 0?c.additionalItems:c.items[_];else var x=c.items;if(x===void 0)return!0;if(x===!1)return g.addError({name:"items",message:"additionalItems not permitted"}),!1;var C=f.validateSchema(b,x,p,m.makeChild(x,_));return C.instance!==g.instance[_]&&(g.instance[_]=C.instance),g.importErrors(C),!0}),g}},a.contains=function(h,c,p,m){var f=this;if(this.types.array(h)&&c.contains!==void 0){if(!e.isSchema(c.contains))throw new Error('Expected "contains" keyword to be a schema');var g=new r(h,c,p,m),b=h.some(function(_,x){var C=f.validateSchema(_,c.contains,p,m.makeChild(c.contains,x));return C.errors.length===0});return b===!1&&g.addError({name:"contains",argument:c.contains,message:"must contain an item matching given schema"}),g}},a.minimum=function(h,c,p,m){if(this.types.number(h)){var f=new r(h,c,p,m);return c.exclusiveMinimum&&c.exclusiveMinimum===!0?h>c.minimum||f.addError({name:"minimum",argument:c.minimum,message:"must be greater than "+c.minimum}):h>=c.minimum||f.addError({name:"minimum",argument:c.minimum,message:"must be greater than or equal to "+c.minimum}),f}},a.maximum=function(h,c,p,m){if(this.types.number(h)){var f=new r(h,c,p,m);return c.exclusiveMaximum&&c.exclusiveMaximum===!0?h<c.maximum||f.addError({name:"maximum",argument:c.maximum,message:"must be less than "+c.maximum}):h<=c.maximum||f.addError({name:"maximum",argument:c.maximum,message:"must be less than or equal to "+c.maximum}),f}},a.exclusiveMinimum=function(h,c,p,m){if(typeof c.exclusiveMinimum!="boolean"&&this.types.number(h)){var f=new r(h,c,p,m),g=h>c.exclusiveMinimum;return g||f.addError({name:"exclusiveMinimum",argument:c.exclusiveMinimum,message:"must be strictly greater than "+c.exclusiveMinimum}),f}},a.exclusiveMaximum=function(h,c,p,m){if(typeof c.exclusiveMaximum!="boolean"&&this.types.number(h)){var f=new r(h,c,p,m),g=h<c.exclusiveMaximum;return g||f.addError({name:"exclusiveMaximum",argument:c.exclusiveMaximum,message:"must be strictly less than "+c.exclusiveMaximum}),f}};var w=function(h,c,p,m,f,g){if(this.types.number(h)){var b=c[f];if(b==0)throw new n(f+" cannot be zero");var _=new r(h,c,p,m),x=e.getDecimalPlaces(h),C=e.getDecimalPlaces(b),T=Math.max(x,C),M=Math.pow(10,T);return Math.round(h*M)%Math.round(b*M)!==0&&_.addError({name:f,argument:b,message:g+JSON.stringify(b)}),_}};a.multipleOf=function(h,c,p,m){return w.call(this,h,c,p,m,"multipleOf","is not a multiple of (divisible by) ")},a.divisibleBy=function(h,c,p,m){return w.call(this,h,c,p,m,"divisibleBy","is not divisible by (multiple of) ")},a.required=function(h,c,p,m){var f=new r(h,c,p,m);return h===void 0&&c.required===!0?f.addError({name:"required",message:"is required"}):this.types.object(h)&&Array.isArray(c.required)&&c.required.forEach(function(g){l(h,g)===void 0&&f.addError({name:"required",argument:g,message:"requires property "+JSON.stringify(g)})}),f},a.pattern=function(h,c,p,m){if(this.types.string(h)){var f=new r(h,c,p,m),g=c.pattern;try{var b=new RegExp(g,"u")}catch{b=new RegExp(g)}return h.match(b)||f.addError({name:"pattern",argument:c.pattern,message:"does not match pattern "+JSON.stringify(c.pattern.toString())}),f}},a.format=function(h,c,p,m){if(h!==void 0){var f=new r(h,c,p,m);return!f.disableFormat&&!e.isFormat(h,c.format,this)&&f.addError({name:"format",argument:c.format,message:"does not conform to the "+JSON.stringify(c.format)+" format"}),f}},a.minLength=function(h,c,p,m){if(this.types.string(h)){var f=new r(h,c,p,m),g=h.match(/[\uDC00-\uDFFF]/g),b=h.length-(g?g.length:0);return b>=c.minLength||f.addError({name:"minLength",argument:c.minLength,message:"does not meet minimum length of "+c.minLength}),f}},a.maxLength=function(h,c,p,m){if(this.types.string(h)){var f=new r(h,c,p,m),g=h.match(/[\uDC00-\uDFFF]/g),b=h.length-(g?g.length:0);return b<=c.maxLength||f.addError({name:"maxLength",argument:c.maxLength,message:"does not meet maximum length of "+c.maxLength}),f}},a.minItems=function(h,c,p,m){if(this.types.array(h)){var f=new r(h,c,p,m);return h.length>=c.minItems||f.addError({name:"minItems",argument:c.minItems,message:"does not meet minimum length of "+c.minItems}),f}},a.maxItems=function(h,c,p,m){if(this.types.array(h)){var f=new r(h,c,p,m);return h.length<=c.maxItems||f.addError({name:"maxItems",argument:c.maxItems,message:"does not meet maximum length of "+c.maxItems}),f}};function S(y,h,c){var p,m=c.length;for(p=h+1,m;p<m;p++)if(e.deepCompareStrict(y,c[p]))return!1;return!0}return a.uniqueItems=function(h,c,p,m){if(c.uniqueItems===!0&&this.types.array(h)){var f=new r(h,c,p,m);return h.every(S)||f.addError({name:"uniqueItems",message:"contains duplicate item"}),f}},a.dependencies=function(h,c,p,m){if(this.types.object(h)){var f=new r(h,c,p,m);for(var g in c.dependencies)if(h[g]!==void 0){var b=c.dependencies[g],_=m.makeChild(b,g);if(typeof b=="string"&&(b=[b]),Array.isArray(b))b.forEach(function(C){h[C]===void 0&&f.addError({name:"dependencies",argument:_.propertyPath,message:"property "+C+" not found, required by "+_.propertyPath})});else{var x=this.validateSchema(h,b,p,_);f.instance!==x.instance&&(f.instance=x.instance),x&&x.errors.length&&(f.addError({name:"dependencies",argument:_.propertyPath,message:"does not meet dependency required by "+_.propertyPath}),f.importErrors(x))}}return f}},a.enum=function(h,c,p,m){if(h===void 0)return null;if(!Array.isArray(c.enum))throw new n("enum expects an array",c);var f=new r(h,c,p,m);return c.enum.some(e.deepCompareStrict.bind(null,h))||f.addError({name:"enum",argument:c.enum,message:"is not one of enum values: "+c.enum.map(String).join(",")}),f},a.const=function(h,c,p,m){if(h===void 0)return null;var f=new r(h,c,p,m);return e.deepCompareStrict(c.const,h)||f.addError({name:"const",argument:c.const,message:"does not exactly match expected constant: "+c.const}),f},a.not=a.disallow=function(h,c,p,m){var f=this;if(h===void 0)return null;var g=new r(h,c,p,m),b=c.not||c.disallow;return b?(Array.isArray(b)||(b=[b]),b.forEach(function(_){if(f.testType(h,c,p,m,_)){var x=_&&(_.$id||_.id),C=x||_;g.addError({name:"not",argument:C,message:"is of prohibited type "+C})}}),g):null},nl=o,nl}var xa={},Dh;function xl(){if(Dh)return xa;Dh=1;var e=yn();xa.SchemaScanResult=r;function r(n,o){this.id=n,this.ref=o}return xa.scan=function(o,a){function u(y,h){if(!h||typeof h!="object")return;if(h.$ref){let f=e.resolveUrl(y,h.$ref);S[f]=S[f]?S[f]+1:0;return}var c=h.$id||h.id;let p=e.resolveUrl(y,c);var m=c?p:y;if(m){if(m.indexOf("#")<0&&(m+="#"),w[m]){if(!e.deepCompareStrict(w[m],h))throw new Error("Schema <"+m+"> already exists with different definition");return w[m]}w[m]=h,m[m.length-1]=="#"&&(w[m.substring(0,m.length-1)]=h)}l(m+"/items",Array.isArray(h.items)?h.items:[h.items]),l(m+"/extends",Array.isArray(h.extends)?h.extends:[h.extends]),u(m+"/additionalItems",h.additionalItems),d(m+"/properties",h.properties),u(m+"/additionalProperties",h.additionalProperties),d(m+"/definitions",h.definitions),d(m+"/patternProperties",h.patternProperties),d(m+"/dependencies",h.dependencies),l(m+"/disallow",h.disallow),l(m+"/allOf",h.allOf),l(m+"/anyOf",h.anyOf),l(m+"/oneOf",h.oneOf),u(m+"/not",h.not)}function l(y,h){if(Array.isArray(h))for(var c=0;c<h.length;c++)u(y+"/"+c,h[c])}function d(y,h){if(!(!h||typeof h!="object"))for(var c in h)u(y+"/"+c,h[c])}var w={},S={};return u(o,a),new r(w,S)},xa}var il,$h;function CR(){if($h)return il;$h=1;var e=TR(),r=yn(),n=xl().scan,o=r.ValidatorResult,a=r.ValidatorResultError,u=r.SchemaError,l=r.SchemaContext,d="/",w=function h(){this.customFormats=Object.create(h.prototype.customFormats),this.schemas={},this.unresolvedRefs=[],this.types=Object.create(y),this.attributes=Object.create(e.validators)};w.prototype.customFormats={},w.prototype.schemas=null,w.prototype.types=null,w.prototype.attributes=null,w.prototype.unresolvedRefs=null,w.prototype.addSchema=function(c,p){var m=this;if(!c)return null;var f=n(p||d,c),g=p||c.$id||c.id;for(var b in f.id)this.schemas[b]=f.id[b];for(var b in f.ref)this.unresolvedRefs.push(b);return this.unresolvedRefs=this.unresolvedRefs.filter(function(_){return typeof m.schemas[_]>"u"}),this.schemas[g]},w.prototype.addSubSchemaArray=function(c,p){if(Array.isArray(p))for(var m=0;m<p.length;m++)this.addSubSchema(c,p[m])},w.prototype.addSubSchemaObject=function(c,p){if(!(!p||typeof p!="object"))for(var m in p)this.addSubSchema(c,p[m])},w.prototype.setSchemas=function(c){this.schemas=c},w.prototype.getSchema=function(c){return this.schemas[c]},w.prototype.validate=function(c,p,m,f){if(typeof p!="boolean"&&typeof p!="object"||p===null)throw new u("Expected `schema` to be an object or boolean");m||(m={});var g=p.$id||p.id;let b=r.resolveUrl(m.base,g||"");if(!f){f=new l(p,m,[],b,Object.create(this.schemas)),f.schemas[b]||(f.schemas[b]=p);var _=n(b,p);for(var x in _.id){var C=_.id[x];f.schemas[x]=C}}if(m.required&&c===void 0){var T=new o(c,p,m,f);return T.addError("is required, but is undefined"),T}var T=this.validateSchema(c,p,m,f);if(T){if(m.throwAll&&T.errors.length)throw new a(T)}else throw new Error("Result undefined");return T};function S(h){var c=typeof h=="string"?h:h.$ref;return typeof c=="string"?c:!1}w.prototype.validateSchema=function(c,p,m,f){var g=new o(c,p,m,f);if(typeof p=="boolean")p===!0?p={}:p===!1&&(p={type:[]});else if(!p)throw new Error("schema is undefined");if(p.extends)if(Array.isArray(p.extends)){var b={schema:p,ctx:f};p.extends.forEach(this.schemaTraverser.bind(this,b)),p=b.schema,b.schema=null,b.ctx=null,b=null}else p=r.deepMerge(p,this.superResolve(p.extends,f));var _=S(p);if(_){var x=this.resolve(p,_,f),C=new l(x.subschema,m,f.path,x.switchSchema,f.schemas);return this.validateSchema(c,x.subschema,m,C)}var T=m&&m.skipAttributes||[];for(var M in p)if(!e.ignoreProperties[M]&&T.indexOf(M)<0){var H=null,L=this.attributes[M];if(L)H=L.call(this,c,p,m,f);else if(m.allowUnknownAttributes===!1)throw new u("Unsupported attribute: "+M,p);H&&g.importErrors(H)}if(typeof m.rewrite=="function"){var k=m.rewrite.call(this,c,p,m,f);g.instance=k}return g},w.prototype.schemaTraverser=function(c,p){c.schema=r.deepMerge(c.schema,this.superResolve(p,c.ctx))},w.prototype.superResolve=function(c,p){var m=S(c);return m?this.resolve(c,m,p).subschema:c},w.prototype.resolve=function(c,p,m){if(p=m.resolve(p),m.schemas[p])return{subschema:m.schemas[p],switchSchema:p};let g=new URL(p,"thismessage::/").hash;var b=g&&g.length&&p.substr(0,p.length-g.length);if(!b||!m.schemas[b])throw new u("no such schema <"+p+">",c);var _=r.objectGetPath(m.schemas[b],g.substr(1));if(_===void 0)throw new u("no such schema "+g+" located in <"+b+">",c);return{subschema:_,switchSchema:p}},w.prototype.testType=function(c,p,m,f,g){if(g!==void 0){if(g===null)throw new u('Unexpected null in "type" keyword');if(typeof this.types[g]=="function")return this.types[g].call(this,c);if(g&&typeof g=="object"){var b=this.validateSchema(c,g,m,f);return b===void 0||!(b&&b.errors.length)}return!0}};var y=w.prototype.types={};return y.string=function(c){return typeof c=="string"},y.number=function(c){return typeof c=="number"&&isFinite(c)},y.integer=function(c){return typeof c=="number"&&c%1===0},y.boolean=function(c){return typeof c=="boolean"},y.array=function(c){return Array.isArray(c)},y.null=function(c){return c===null},y.date=function(c){return c instanceof Date},y.any=function(c){return!0},y.object=function(c){return c&&typeof c=="object"&&!Array.isArray(c)&&!(c instanceof Date)},il=w,il}var Nh;function PR(){if(Nh)return lr;Nh=1;var e=lr.Validator=CR();return lr.ValidatorResult=yn().ValidatorResult,lr.ValidatorResultError=yn().ValidatorResultError,lr.ValidationError=yn().ValidationError,lr.SchemaError=yn().SchemaError,lr.SchemaScanResult=xl().SchemaScanResult,lr.scan=xl().scan,lr.validate=function(r,n,o){var a=new e;return a.validate(r,n,o)},lr}var RR=PR();const ng=(e,r,n)=>{const o=e instanceof RegExp?kh(e,n):e,a=r instanceof RegExp?kh(r,n):r,u=o!==null&&a!=null&&MR(o,a,n);return u&&{start:u[0],end:u[1],pre:n.slice(0,u[0]),body:n.slice(u[0]+o.length,u[1]),post:n.slice(u[1]+a.length)}},kh=(e,r)=>{const n=r.match(e);return n?n[0]:null},MR=(e,r,n)=>{let o,a,u,l,d,w=n.indexOf(e),S=n.indexOf(r,w+1),y=w;if(w>=0&&S>0){if(e===r)return[w,S];for(o=[],u=n.length;y>=0&&!d;){if(y===w)o.push(y),w=n.indexOf(e,y+1);else if(o.length===1){const h=o.pop();h!==void 0&&(d=[h,S])}else a=o.pop(),a!==void 0&&a<u&&(u=a,l=S),S=n.indexOf(r,y+1);y=w<S&&w>=0?w:S}o.length&&l!==void 0&&(d=[u,l])}return d},ig="\0SLASH"+Math.random()+"\0",og="\0OPEN"+Math.random()+"\0",ec="\0CLOSE"+Math.random()+"\0",ag="\0COMMA"+Math.random()+"\0",sg="\0PERIOD"+Math.random()+"\0",IR=new RegExp(ig,"g"),FR=new RegExp(og,"g"),LR=new RegExp(ec,"g"),DR=new RegExp(ag,"g"),$R=new RegExp(sg,"g"),NR=/\\\\/g,kR=/\\{/g,jR=/\\}/g,WR=/\\,/g,UR=/\\./g;function ol(e){return isNaN(e)?e.charCodeAt(0):parseInt(e,10)}function BR(e){return e.replace(NR,ig).replace(kR,og).replace(jR,ec).replace(WR,ag).replace(UR,sg)}function zR(e){return e.replace(IR,"\\").replace(FR,"{").replace(LR,"}").replace(DR,",").replace($R,".")}function ug(e){if(!e)return[""];const r=[],n=ng("{","}",e);if(!n)return e.split(",");const{pre:o,body:a,post:u}=n,l=o.split(",");l[l.length-1]+="{"+a+"}";const d=ug(u);return u.length&&(l[l.length-1]+=d.shift(),l.push.apply(l,d)),r.push.apply(r,l),r}function HR(e){return e?(e.slice(0,2)==="{}"&&(e="\\{\\}"+e.slice(2)),Ki(BR(e),!0).map(zR)):[]}function qR(e){return"{"+e+"}"}function ZR(e){return/^-?0\d/.test(e)}function GR(e,r){return e<=r}function KR(e,r){return e>=r}function Ki(e,r){const n=[],o=ng("{","}",e);if(!o)return[e];const a=o.pre,u=o.post.length?Ki(o.post,!1):[""];if(/\$$/.test(o.pre))for(let l=0;l<u.length;l++){const d=a+"{"+o.body+"}"+u[l];n.push(d)}else{const l=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),d=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),w=l||d,S=o.body.indexOf(",")>=0;if(!w&&!S)return o.post.match(/,(?!,).*\}/)?(e=o.pre+"{"+o.body+ec+o.post,Ki(e)):[e];let y;if(w)y=o.body.split(/\.\./);else if(y=ug(o.body),y.length===1&&y[0]!==void 0&&(y=Ki(y[0],!1).map(qR),y.length===1))return u.map(c=>o.pre+y[0]+c);let h;if(w&&y[0]!==void 0&&y[1]!==void 0){const c=ol(y[0]),p=ol(y[1]),m=Math.max(y[0].length,y[1].length);let f=y.length===3&&y[2]!==void 0?Math.abs(ol(y[2])):1,g=GR;p<c&&(f*=-1,g=KR);const _=y.some(ZR);h=[];for(let x=c;g(x,p);x+=f){let C;if(d)C=String.fromCharCode(x),C==="\\"&&(C="");else if(C=String(x),_){const T=m-C.length;if(T>0){const M=new Array(T+1).join("0");x<0?C="-"+M+C.slice(1):C=M+C}}h.push(C)}}else{h=[];for(let c=0;c<y.length;c++)h.push.apply(h,Ki(y[c],!1))}for(let c=0;c<h.length;c++)for(let p=0;p<u.length;p++){const m=a+h[c]+u[p];(!r||w||m)&&n.push(m)}}return n}const VR=1024*64,Wa=e=>{if(typeof e!="string")throw new TypeError("invalid pattern");if(e.length>VR)throw new TypeError("pattern is too long")},YR={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},qi=e=>e.replace(/[[\]\\-]/g,"\\$&"),XR=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),jh=e=>e.join(""),JR=(e,r)=>{const n=r;if(e.charAt(n)!=="[")throw new Error("not in a brace expression");const o=[],a=[];let u=n+1,l=!1,d=!1,w=!1,S=!1,y=n,h="";e:for(;u<e.length;){const f=e.charAt(u);if((f==="!"||f==="^")&&u===n+1){S=!0,u++;continue}if(f==="]"&&l&&!w){y=u+1;break}if(l=!0,f==="\\"&&!w){w=!0,u++;continue}if(f==="["&&!w){for(const[g,[b,_,x]]of Object.entries(YR))if(e.startsWith(g,u)){if(h)return["$.",!1,e.length-n,!0];u+=g.length,x?a.push(b):o.push(b),d=d||_;continue e}}if(w=!1,h){f>h?o.push(qi(h)+"-"+qi(f)):f===h&&o.push(qi(f)),h="",u++;continue}if(e.startsWith("-]",u+1)){o.push(qi(f+"-")),u+=2;continue}if(e.startsWith("-",u+1)){h=f,u+=2;continue}o.push(qi(f)),u++}if(y<u)return["",!1,0,!1];if(!o.length&&!a.length)return["$.",!1,e.length-n,!0];if(a.length===0&&o.length===1&&/^\\?.$/.test(o[0])&&!S){const f=o[0].length===2?o[0].slice(-1):o[0];return[XR(f),!1,y-n,!1]}const c="["+(S?"^":"")+jh(o)+"]",p="["+(S?"":"^")+jh(a)+"]";return[o.length&&a.length?"("+c+"|"+p+")":o.length?c:p,d,y-n,!0]},Vi=(e,{windowsPathsNoEscape:r=!1}={})=>r?e.replace(/\[([^\/\\])\]/g,"$1"):e.replace(/((?!\\).|^)\[([^\/\\])\]/g,"$1$2").replace(/\\([^\/])/g,"$1"),QR=new Set(["!","?","+","*","@"]),Wh=e=>QR.has(e),eM="(?!(?:^|/)\\.\\.?(?:$|/))",Oa="(?!\\.)",tM=new Set(["[","."]),rM=new Set(["..","."]),nM=new Set("().*{}+?[]^$\\!"),iM=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),tc="[^/]",Uh=tc+"*?",Bh=tc+"+?";var tt,ot,Rr,je,Ke,Xr,wn,Jr,cr,bn,ao,Tn,lg,tn,Ia,Ol,cg;const bt=class bt{constructor(r,n,o={}){Ot(this,Tn);et(this,"type");Ot(this,tt);Ot(this,ot);Ot(this,Rr,!1);Ot(this,je,[]);Ot(this,Ke);Ot(this,Xr);Ot(this,wn);Ot(this,Jr,!1);Ot(this,cr);Ot(this,bn);Ot(this,ao,!1);this.type=r,r&&Ge(this,ot,!0),Ge(this,Ke,n),Ge(this,tt,re(this,Ke)?re(re(this,Ke),tt):this),Ge(this,cr,re(this,tt)===this?o:re(re(this,tt),cr)),Ge(this,wn,re(this,tt)===this?[]:re(re(this,tt),wn)),r==="!"&&!re(re(this,tt),Jr)&&re(this,wn).push(this),Ge(this,Xr,re(this,Ke)?re(re(this,Ke),je).length:0)}get hasMagic(){if(re(this,ot)!==void 0)return re(this,ot);for(const r of re(this,je))if(typeof r!="string"&&(r.type||r.hasMagic))return Ge(this,ot,!0);return re(this,ot)}toString(){return re(this,bn)!==void 0?re(this,bn):this.type?Ge(this,bn,this.type+"("+re(this,je).map(r=>String(r)).join("|")+")"):Ge(this,bn,re(this,je).map(r=>String(r)).join(""))}push(...r){for(const n of r)if(n!==""){if(typeof n!="string"&&!(n instanceof bt&&re(n,Ke)===this))throw new Error("invalid part: "+n);re(this,je).push(n)}}toJSON(){var n;const r=this.type===null?re(this,je).slice().map(o=>typeof o=="string"?o:o.toJSON()):[this.type,...re(this,je).map(o=>o.toJSON())];return this.isStart()&&!this.type&&r.unshift([]),this.isEnd()&&(this===re(this,tt)||re(re(this,tt),Jr)&&((n=re(this,Ke))==null?void 0:n.type)==="!")&&r.push({}),r}isStart(){var n;if(re(this,tt)===this)return!0;if(!((n=re(this,Ke))!=null&&n.isStart()))return!1;if(re(this,Xr)===0)return!0;const r=re(this,Ke);for(let o=0;o<re(this,Xr);o++){const a=re(r,je)[o];if(!(a instanceof bt&&a.type==="!"))return!1}return!0}isEnd(){var n,o,a;if(re(this,tt)===this||((n=re(this,Ke))==null?void 0:n.type)==="!")return!0;if(!((o=re(this,Ke))!=null&&o.isEnd()))return!1;if(!this.type)return(a=re(this,Ke))==null?void 0:a.isEnd();const r=re(this,Ke)?re(re(this,Ke),je).length:0;return re(this,Xr)===r-1}copyIn(r){typeof r=="string"?this.push(r):this.push(r.clone(this))}clone(r){const n=new bt(this.type,r);for(const o of re(this,je))n.copyIn(o);return n}static fromGlob(r,n={}){var a;const o=new bt(null,void 0,n);return Zr(a=bt,tn,Ia).call(a,r,o,0,n),o}toMMPattern(){if(this!==re(this,tt))return re(this,tt).toMMPattern();const r=this.toString(),[n,o,a,u]=this.toRegExpSource();if(!(a||re(this,ot)||re(this,cr).nocase&&!re(this,cr).nocaseMagicOnly&&r.toUpperCase()!==r.toLowerCase()))return o;const d=(re(this,cr).nocase?"i":"")+(u?"u":"");return Object.assign(new RegExp(`^${n}$`,d),{_src:n,_glob:r})}get options(){return re(this,cr)}toRegExpSource(r){var w;const n=r??!!re(this,cr).dot;if(re(this,tt)===this&&Zr(this,Tn,lg).call(this),!this.type){const S=this.isStart()&&this.isEnd(),y=re(this,je).map(m=>{var x;const[f,g,b,_]=typeof m=="string"?Zr(x=bt,tn,cg).call(x,m,re(this,ot),S):m.toRegExpSource(r);return Ge(this,ot,re(this,ot)||b),Ge(this,Rr,re(this,Rr)||_),f}).join("");let h="";if(this.isStart()&&typeof re(this,je)[0]=="string"&&!(re(this,je).length===1&&rM.has(re(this,je)[0]))){const f=tM,g=n&&f.has(y.charAt(0))||y.startsWith("\\.")&&f.has(y.charAt(2))||y.startsWith("\\.\\.")&&f.has(y.charAt(4)),b=!n&&!r&&f.has(y.charAt(0));h=g?eM:b?Oa:""}let c="";return this.isEnd()&&re(re(this,tt),Jr)&&((w=re(this,Ke))==null?void 0:w.type)==="!"&&(c="(?:$|\\/)"),[h+y+c,Vi(y),Ge(this,ot,!!re(this,ot)),re(this,Rr)]}const o=this.type==="*"||this.type==="+",a=this.type==="!"?"(?:(?!(?:":"(?:";let u=Zr(this,Tn,Ol).call(this,n);if(this.isStart()&&this.isEnd()&&!u&&this.type!=="!"){const S=this.toString();return Ge(this,je,[S]),this.type=null,Ge(this,ot,void 0),[S,Vi(this.toString()),!1,!1]}let l=!o||r||n||!Oa?"":Zr(this,Tn,Ol).call(this,!0);l===u&&(l=""),l&&(u=`(?:${u})(?:${l})*?`);let d="";if(this.type==="!"&&re(this,ao))d=(this.isStart()&&!n?Oa:"")+Bh;else{const S=this.type==="!"?"))"+(this.isStart()&&!n&&!r?Oa:"")+Uh+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&l?")":this.type==="*"&&l?")?":`)${this.type}`;d=a+u+S}return[d,Vi(u),Ge(this,ot,!!re(this,ot)),re(this,Rr)]}};tt=new WeakMap,ot=new WeakMap,Rr=new WeakMap,je=new WeakMap,Ke=new WeakMap,Xr=new WeakMap,wn=new WeakMap,Jr=new WeakMap,cr=new WeakMap,bn=new WeakMap,ao=new WeakMap,Tn=new WeakSet,lg=function(){if(this!==re(this,tt))throw new Error("should only call on root");if(re(this,Jr))return this;this.toString(),Ge(this,Jr,!0);let r;for(;r=re(this,wn).pop();){if(r.type!=="!")continue;let n=r,o=re(n,Ke);for(;o;){for(let a=re(n,Xr)+1;!o.type&&a<re(o,je).length;a++)for(const u of re(r,je)){if(typeof u=="string")throw new Error("string part in extglob AST??");u.copyIn(re(o,je)[a])}n=o,o=re(n,Ke)}}return this},tn=new WeakSet,Ia=function(r,n,o,a){var p,m;let u=!1,l=!1,d=-1,w=!1;if(n.type===null){let f=o,g="";for(;f<r.length;){const b=r.charAt(f++);if(u||b==="\\"){u=!u,g+=b;continue}if(l){f===d+1?(b==="^"||b==="!")&&(w=!0):b==="]"&&!(f===d+2&&w)&&(l=!1),g+=b;continue}else if(b==="["){l=!0,d=f,w=!1,g+=b;continue}if(!a.noext&&Wh(b)&&r.charAt(f)==="("){n.push(g),g="";const _=new bt(b,n);f=Zr(p=bt,tn,Ia).call(p,r,_,f,a),n.push(_);continue}g+=b}return n.push(g),f}let S=o+1,y=new bt(null,n);const h=[];let c="";for(;S<r.length;){const f=r.charAt(S++);if(u||f==="\\"){u=!u,c+=f;continue}if(l){S===d+1?(f==="^"||f==="!")&&(w=!0):f==="]"&&!(S===d+2&&w)&&(l=!1),c+=f;continue}else if(f==="["){l=!0,d=S,w=!1,c+=f;continue}if(Wh(f)&&r.charAt(S)==="("){y.push(c),c="";const g=new bt(f,y);y.push(g),S=Zr(m=bt,tn,Ia).call(m,r,g,S,a);continue}if(f==="|"){y.push(c),c="",h.push(y),y=new bt(null,n);continue}if(f===")")return c===""&&re(n,je).length===0&&Ge(n,ao,!0),y.push(c),c="",n.push(...h,y),S;c+=f}return n.type=null,Ge(n,ot,void 0),Ge(n,je,[r.substring(o-1)]),S},Ol=function(r){return re(this,je).map(n=>{if(typeof n=="string")throw new Error("string type in extglob ast??");const[o,a,u,l]=n.toRegExpSource(r);return Ge(this,Rr,re(this,Rr)||l),o}).filter(n=>!(this.isStart()&&this.isEnd())||!!n).join("|")},cg=function(r,n,o=!1){let a=!1,u="",l=!1;for(let d=0;d<r.length;d++){const w=r.charAt(d);if(a){a=!1,u+=(nM.has(w)?"\\":"")+w;continue}if(w==="\\"){d===r.length-1?u+="\\\\":a=!0;continue}if(w==="["){const[S,y,h,c]=JR(r,d);if(h){u+=S,l=l||y,d+=h-1,n=n||c;continue}}if(w==="*"){o&&r==="*"?u+=Bh:u+=Uh,n=!0;continue}if(w==="?"){u+=tc,n=!0;continue}u+=iM(w)}return[u,Vi(r),!!n,l]},Ot(bt,tn);let Ua=bt;const oM=(e,{windowsPathsNoEscape:r=!1}={})=>r?e.replace(/[?*()[\]]/g,"[$&]"):e.replace(/[?*()[\]\\]/g,"\\$&"),mt=(e,r,n={})=>(Wa(r),!n.nocomment&&r.charAt(0)==="#"?!1:new Qa(r,n).match(e)),aM=/^\*+([^+@!?\*\[\(]*)$/,sM=e=>r=>!r.startsWith(".")&&r.endsWith(e),uM=e=>r=>r.endsWith(e),lM=e=>(e=e.toLowerCase(),r=>!r.startsWith(".")&&r.toLowerCase().endsWith(e)),cM=e=>(e=e.toLowerCase(),r=>r.toLowerCase().endsWith(e)),fM=/^\*+\.\*+$/,dM=e=>!e.startsWith(".")&&e.includes("."),pM=e=>e!=="."&&e!==".."&&e.includes("."),hM=/^\.\*+$/,vM=e=>e!=="."&&e!==".."&&e.startsWith("."),mM=/^\*+$/,gM=e=>e.length!==0&&!e.startsWith("."),yM=e=>e.length!==0&&e!=="."&&e!=="..",wM=/^\?+([^+@!?\*\[\(]*)?$/,bM=([e,r=""])=>{const n=fg([e]);return r?(r=r.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(r)):n},SM=([e,r=""])=>{const n=dg([e]);return r?(r=r.toLowerCase(),o=>n(o)&&o.toLowerCase().endsWith(r)):n},EM=([e,r=""])=>{const n=dg([e]);return r?o=>n(o)&&o.endsWith(r):n},_M=([e,r=""])=>{const n=fg([e]);return r?o=>n(o)&&o.endsWith(r):n},fg=([e])=>{const r=e.length;return n=>n.length===r&&!n.startsWith(".")},dg=([e])=>{const r=e.length;return n=>n.length===r&&n!=="."&&n!==".."},pg=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",zh={win32:{sep:"\\"},posix:{sep:"/"}},xM=pg==="win32"?zh.win32.sep:zh.posix.sep;mt.sep=xM;const Gt=Symbol("globstar **");mt.GLOBSTAR=Gt;const OM="[^/]",AM=OM+"*?",TM="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",CM="(?:(?!(?:\\/|^)\\.).)*?",PM=(e,r={})=>n=>mt(n,e,r);mt.filter=PM;const Zt=(e,r={})=>Object.assign({},e,r),RM=e=>{if(!e||typeof e!="object"||!Object.keys(e).length)return mt;const r=mt;return Object.assign((o,a,u={})=>r(o,a,Zt(e,u)),{Minimatch:class extends r.Minimatch{constructor(a,u={}){super(a,Zt(e,u))}static defaults(a){return r.defaults(Zt(e,a)).Minimatch}},AST:class extends r.AST{constructor(a,u,l={}){super(a,u,Zt(e,l))}static fromGlob(a,u={}){return r.AST.fromGlob(a,Zt(e,u))}},unescape:(o,a={})=>r.unescape(o,Zt(e,a)),escape:(o,a={})=>r.escape(o,Zt(e,a)),filter:(o,a={})=>r.filter(o,Zt(e,a)),defaults:o=>r.defaults(Zt(e,o)),makeRe:(o,a={})=>r.makeRe(o,Zt(e,a)),braceExpand:(o,a={})=>r.braceExpand(o,Zt(e,a)),match:(o,a,u={})=>r.match(o,a,Zt(e,u)),sep:r.sep,GLOBSTAR:Gt})};mt.defaults=RM;const hg=(e,r={})=>(Wa(e),r.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:HR(e));mt.braceExpand=hg;const MM=(e,r={})=>new Qa(e,r).makeRe();mt.makeRe=MM;const IM=(e,r,n={})=>{const o=new Qa(r,n);return e=e.filter(a=>o.match(a)),o.options.nonull&&!e.length&&e.push(r),e};mt.match=IM;const Hh=/[?*]|[+@!]\(.*?\)|\[|\]/,FM=e=>e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&");class Qa{constructor(r,n={}){et(this,"options");et(this,"set");et(this,"pattern");et(this,"windowsPathsNoEscape");et(this,"nonegate");et(this,"negate");et(this,"comment");et(this,"empty");et(this,"preserveMultipleSlashes");et(this,"partial");et(this,"globSet");et(this,"globParts");et(this,"nocase");et(this,"isWindows");et(this,"platform");et(this,"windowsNoMagicRoot");et(this,"regexp");Wa(r),n=n||{},this.options=n,this.pattern=r,this.platform=n.platform||pg,this.isWindows=this.platform==="win32",this.windowsPathsNoEscape=!!n.windowsPathsNoEscape||n.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!n.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!n.nonegate,this.comment=!1,this.empty=!1,this.partial=!!n.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=n.windowsNoMagicRoot!==void 0?n.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(const r of this.set)for(const n of r)if(typeof n!="string")return!0;return!1}debug(...r){}make(){const r=this.pattern,n=this.options;if(!n.nocomment&&r.charAt(0)==="#"){this.comment=!0;return}if(!r){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],n.debug&&(this.debug=(...u)=>console.error(...u)),this.debug(this.pattern,this.globSet);const o=this.globSet.map(u=>this.slashSplit(u));this.globParts=this.preprocess(o),this.debug(this.pattern,this.globParts);let a=this.globParts.map((u,l,d)=>{if(this.isWindows&&this.windowsNoMagicRoot){const w=u[0]===""&&u[1]===""&&(u[2]==="?"||!Hh.test(u[2]))&&!Hh.test(u[3]),S=/^[a-z]:/i.test(u[0]);if(w)return[...u.slice(0,4),...u.slice(4).map(y=>this.parse(y))];if(S)return[u[0],...u.slice(1).map(y=>this.parse(y))]}return u.map(w=>this.parse(w))});if(this.debug(this.pattern,a),this.set=a.filter(u=>u.indexOf(!1)===-1),this.isWindows)for(let u=0;u<this.set.length;u++){const l=this.set[u];l[0]===""&&l[1]===""&&this.globParts[u][2]==="?"&&typeof l[3]=="string"&&/^[a-z]:$/i.test(l[3])&&(l[2]="?")}this.debug(this.pattern,this.set)}preprocess(r){if(this.options.noglobstar)for(let o=0;o<r.length;o++)for(let a=0;a<r[o].length;a++)r[o][a]==="**"&&(r[o][a]="*");const{optimizationLevel:n=1}=this.options;return n>=2?(r=this.firstPhasePreProcess(r),r=this.secondPhasePreProcess(r)):n>=1?r=this.levelOneOptimize(r):r=this.adjascentGlobstarOptimize(r),r}adjascentGlobstarOptimize(r){return r.map(n=>{let o=-1;for(;(o=n.indexOf("**",o+1))!==-1;){let a=o;for(;n[a+1]==="**";)a++;a!==o&&n.splice(o,a-o)}return n})}levelOneOptimize(r){return r.map(n=>(n=n.reduce((o,a)=>{const u=o[o.length-1];return a==="**"&&u==="**"?o:a===".."&&u&&u!==".."&&u!=="."&&u!=="**"?(o.pop(),o):(o.push(a),o)},[]),n.length===0?[""]:n))}levelTwoFileOptimize(r){Array.isArray(r)||(r=this.slashSplit(r));let n=!1;do{if(n=!1,!this.preserveMultipleSlashes){for(let a=1;a<r.length-1;a++){const u=r[a];a===1&&u===""&&r[0]===""||(u==="."||u==="")&&(n=!0,r.splice(a,1),a--)}r[0]==="."&&r.length===2&&(r[1]==="."||r[1]==="")&&(n=!0,r.pop())}let o=0;for(;(o=r.indexOf("..",o+1))!==-1;){const a=r[o-1];a&&a!=="."&&a!==".."&&a!=="**"&&(n=!0,r.splice(o-1,2),o-=2)}}while(n);return r.length===0?[""]:r}firstPhasePreProcess(r){let n=!1;do{n=!1;for(let o of r){let a=-1;for(;(a=o.indexOf("**",a+1))!==-1;){let l=a;for(;o[l+1]==="**";)l++;l>a&&o.splice(a+1,l-a);let d=o[a+1];const w=o[a+2],S=o[a+3];if(d!==".."||!w||w==="."||w===".."||!S||S==="."||S==="..")continue;n=!0,o.splice(a,1);const y=o.slice(0);y[a]="**",r.push(y),a--}if(!this.preserveMultipleSlashes){for(let l=1;l<o.length-1;l++){const d=o[l];l===1&&d===""&&o[0]===""||(d==="."||d==="")&&(n=!0,o.splice(l,1),l--)}o[0]==="."&&o.length===2&&(o[1]==="."||o[1]==="")&&(n=!0,o.pop())}let u=0;for(;(u=o.indexOf("..",u+1))!==-1;){const l=o[u-1];if(l&&l!=="."&&l!==".."&&l!=="**"){n=!0;const w=u===1&&o[u+1]==="**"?["."]:[];o.splice(u-1,2,...w),o.length===0&&o.push(""),u-=2}}}}while(n);return r}secondPhasePreProcess(r){for(let n=0;n<r.length-1;n++)for(let o=n+1;o<r.length;o++){const a=this.partsMatch(r[n],r[o],!this.preserveMultipleSlashes);if(a){r[n]=[],r[o]=a;break}}return r.filter(n=>n.length)}partsMatch(r,n,o=!1){let a=0,u=0,l=[],d="";for(;a<r.length&&u<n.length;)if(r[a]===n[u])l.push(d==="b"?n[u]:r[a]),a++,u++;else if(o&&r[a]==="**"&&n[u]===r[a+1])l.push(r[a]),a++;else if(o&&n[u]==="**"&&r[a]===n[u+1])l.push(n[u]),u++;else if(r[a]==="*"&&n[u]&&(this.options.dot||!n[u].startsWith("."))&&n[u]!=="**"){if(d==="b")return!1;d="a",l.push(r[a]),a++,u++}else if(n[u]==="*"&&r[a]&&(this.options.dot||!r[a].startsWith("."))&&r[a]!=="**"){if(d==="a")return!1;d="b",l.push(n[u]),a++,u++}else return!1;return r.length===n.length&&l}parseNegate(){if(this.nonegate)return;const r=this.pattern;let n=!1,o=0;for(let a=0;a<r.length&&r.charAt(a)==="!";a++)n=!n,o++;o&&(this.pattern=r.slice(o)),this.negate=n}matchOne(r,n,o=!1){const a=this.options;if(this.isWindows){const f=typeof r[0]=="string"&&/^[a-z]:$/i.test(r[0]),g=!f&&r[0]===""&&r[1]===""&&r[2]==="?"&&/^[a-z]:$/i.test(r[3]),b=typeof n[0]=="string"&&/^[a-z]:$/i.test(n[0]),_=!b&&n[0]===""&&n[1]===""&&n[2]==="?"&&typeof n[3]=="string"&&/^[a-z]:$/i.test(n[3]),x=g?3:f?0:void 0,C=_?3:b?0:void 0;if(typeof x=="number"&&typeof C=="number"){const[T,M]=[r[x],n[C]];T.toLowerCase()===M.toLowerCase()&&(n[C]=T,C>x?n=n.slice(C):x>C&&(r=r.slice(x)))}}const{optimizationLevel:u=1}=this.options;u>=2&&(r=this.levelTwoFileOptimize(r)),this.debug("matchOne",this,{file:r,pattern:n}),this.debug("matchOne",r.length,n.length);for(var l=0,d=0,w=r.length,S=n.length;l<w&&d<S;l++,d++){this.debug("matchOne loop");var y=n[d],h=r[l];if(this.debug(n,y,h),y===!1)return!1;if(y===Gt){this.debug("GLOBSTAR",[n,y,h]);var c=l,p=d+1;if(p===S){for(this.debug("** at the end");l<w;l++)if(r[l]==="."||r[l]===".."||!a.dot&&r[l].charAt(0)===".")return!1;return!0}for(;c<w;){var m=r[c];if(this.debug(`
|
|
142
142
|
globstar while`,r,c,n,p,m),this.matchOne(r.slice(c),n.slice(p),o))return this.debug("globstar found match!",c,w,m),!0;if(m==="."||m===".."||!a.dot&&m.charAt(0)==="."){this.debug("dot detected!",r,c,n,p);break}this.debug("globstar swallow a segment, and continue"),c++}return!!(o&&(this.debug(`
|
|
143
|
-
>>> no match, partial?`,r,c,n,p),c===w))}let f;if(typeof y=="string"?(f=h===y,this.debug("string match",y,h,f)):(f=y.test(h),this.debug("pattern match",y,h,f)),!f)return!1}if(l===w&&d===S)return!0;if(l===w)return o;if(d===S)return l===w-1&&r[l]==="";throw new Error("wtf?")}braceExpand(){return hg(this.pattern,this.options)}parse(r){Wa(r);const n=this.options;if(r==="**")return Gt;if(r==="")return"";let o,a=null;(o=r.match(mM))?a=n.dot?yM:gM:(o=r.match(aM))?a=(n.nocase?n.dot?cM:lM:n.dot?uM:sM)(o[1]):(o=r.match(wM))?a=(n.nocase?n.dot?SM:bM:n.dot?EM:_M)(o):(o=r.match(fM))?a=n.dot?pM:dM:(o=r.match(hM))&&(a=vM);const u=Ua.fromGlob(r,this.options).toMMPattern();return a&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:a}),u}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const r=this.set;if(!r.length)return this.regexp=!1,this.regexp;const n=this.options,o=n.noglobstar?AM:n.dot?TM:CM,a=new Set(n.nocase?["i"]:[]);let u=r.map(w=>{const S=w.map(y=>{if(y instanceof RegExp)for(const h of y.flags.split(""))a.add(h);return typeof y=="string"?FM(y):y===Gt?Gt:y._src});return S.forEach((y,h)=>{const c=S[h+1],p=S[h-1];y!==Gt||p===Gt||(p===void 0?c!==void 0&&c!==Gt?S[h+1]="(?:\\/|"+o+"\\/)?"+c:S[h]=o:c===void 0?S[h-1]=p+"(?:\\/|"+o+")?":c!==Gt&&(S[h-1]=p+"(?:\\/|\\/"+o+"\\/)"+c,S[h+1]=Gt))}),S.filter(y=>y!==Gt).join("/")}).join("|");const[l,d]=r.length>1?["(?:",")"]:["",""];u="^"+l+u+d+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(r){return this.preserveMultipleSlashes?r.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(r)?["",...r.split(/\/+/)]:r.split(/\/+/)}match(r,n=this.partial){if(this.debug("match",r,this.pattern),this.comment)return!1;if(this.empty)return r==="";if(r==="/"&&n)return!0;const o=this.options;this.isWindows&&(r=r.split("\\").join("/"));const a=this.slashSplit(r);this.debug(this.pattern,"split",a);const u=this.set;this.debug(this.pattern,"set",u);let l=a[a.length-1];if(!l)for(let d=a.length-2;!l&&d>=0;d--)l=a[d];for(let d=0;d<u.length;d++){const w=u[d];let S=a;if(o.matchBase&&w.length===1&&(S=[l]),this.matchOne(S,w,n))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(r){return mt.defaults(r).Minimatch}}mt.AST=Ua;mt.Minimatch=Qa;mt.escape=oM;mt.unescape=Vi;const rc="/$shared",LM={"**/saved_conditions.json":{parser:"json",content:{conditions:[]},schema:{type:"object",properties:{conditions:{type:"array",items:{type:"object"}}},required:["conditions"]}},"**/shared_datasources.json":{parser:"json",content:{},schema:{type:"object",additionalProperties:!0,patternProperties:{"^.*$":{type:"array"}}}},"**/shared_css.json":{parser:"json",content:{classes:[]},schema:{type:"object",properties:{classes:{type:"array",items:{type:"object"}}},required:["classes"]}},"**/shared_app_events.json":{parser:"json",content:[]},"**/CustomComponents/manifest.json":{parser:"json",content:[],schema:{type:"array",items:{type:"object"}}},"**/crafted_components.json":{parser:"json",content:[],schema:{type:"array"}},"**/HTTPHandlers.json":{parser:"json",content:[],schema:{type:"array"}},"**/*.json":{parser:"json",content:{}}};function vg(e){const r=Object.entries(LM).find(([n])=>mt(e,n));return r==null?void 0:r[1]}function nc(e){var o;const r=(o=vg(e))==null?void 0:o.content;if(!r)return;const n=e.replace(`${rc}/`,"Shared/");ic({name:n,content:r,asText:typeof r=="string"})}function vo({path:e,createIfNotExists:r=!1}){const n=`${rc}/${e}`;return Le(`${n}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})}).then(o=>{const a=vg(e);let u=o;if(!a)return u;if(typeof u=="string")try{switch(a.parser){case"json":u=JSON.parse(u);break;default:break}}catch{throw new Error("Cannot parse")}if(a.schema&&!new RR.Validator().validate(u,a.schema).valid)throw new Error("Invalid Schema");return u}).catch(o=>{if(DM(o)&&r){const a=$M(o,e);$m.next({message:a,kind:"warning"}),nc(n)}throw o})}function DM(e){var r;return((r=e==null?void 0:e.response)==null?void 0:r.status)===404||(e==null?void 0:e.message)==="Invalid Schema"||(e==null?void 0:e.message)==="Cannot parse"||(e==null?void 0:e.name)==="SyntaxError"}function $M(e,r){var n;switch(!0){case((e==null?void 0:e.message)==="Cannot parse "||(e==null?void 0:e.name)==="SyntaxError"):return`Cannot parse file '${r}', resetting...`;case(e==null?void 0:e.message)==="Invalid Schema":return`File '${r}' is corrupt, resetting...`;case((n=e==null?void 0:e.response)==null?void 0:n.status)===404:return`File '${r}' not found, creating...`;default:return e==null?void 0:e.message}}function NM(e){return Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function kM(e){return Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const mg=()=>{const{host:e,protocol:r}=window.location,n=r==="https:";return{projectOpened:!1,remoteDebuggerMode:Xl.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${n?"s":""}://${e}/remoteDebugger`,lsp:`ws${n?"s":""}://${e}/LSP`},isRestActive:!0}};async function jM(){const{hostname:e,host:r,protocol:n}=window.location,o=n==="https:";try{const a=await Le(Xe,{method:"POST",body:JSON.stringify({verb:nn.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(a.rendererPath)return a.rendererPath;const l=`http://${e}:${a.webServerHTTPPort}`,d=`https://${e}:${a.webServerHTTPSPort}`;return a.webServerHTTPPort&&a.webServerHTTPSPort?o?d:l:a.webServerHTTPPort?l:d})();return{projectOpened:a.webServerHTTPSPort>0||a.webServerHTTPPort>0,remoteDebuggerMode:a.remoteDebuggerMode,baseUrl:u,qodly:typeof a.qodly>"u"?!0:a.qodly,urls:{renderer:a.rendererPath||`${u}/$lib/renderer/`,debugger:`ws${o?"s":""}://${r}/remoteDebugger`,lsp:`ws${o?"s":""}://${r}/LSP`},isRestActive:a.isRESTActive}}catch(a){return console.error(a),mg()}}async function gg(e){return await Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function WM(...e){return(await Promise.all(e.map(o=>gg({root:o,verb:nn.GET_FOLDER})))).map(({children:o})=>o.map(({name:a,date:u,type:l})=>({name:a,type:l,date:u,path:`${l}/${a}`}))).flat()}function UM(e,r={}){const{sanitize:n=!0}=r;return Le(`/rest/$getWebForm/${e}`,{method:"GET"}).then(o=>{if(!(o!=null&&o.components)||!n)return o;const a=new Map;return{...o,components:Ve.entries(o.components).map(([u,l])=>{const d=u,{resolvedName:w}=l.type;if(w==="WebformLoader"){const S=Dl.generate();a.set(u,S),u=S}return[u,l,d]}).reduce((u,[l,d,w])=>{var S;return d.nodes&&(d.nodes=d.nodes.map(y=>a.get(y)||y)),d.linkedNodes&&(d.linkedNodes=Ve.entries(d.linkedNodes).reduce((y,[h,c])=>({...y,[h]:a.get(c)||c}),{})),(S=d.props)!=null&&S.events&&(d.props.events=d.props.events.map(y=>(y.type==="navigation"&&y.loader&&(y.loader=a.get(y.loader)||y.loader),y))),{...u,[l]:{...d,props:{...d.props,__originalID:w}}}},{})}})}function BM(e){return Le(Xe,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(r=>({...r,content:[Kt.METHOD,Kt.CLASS].includes(r.type)?Ja(r.content):r.content}))}function zM(e){return e.type==="folder"?Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function HM(e){return e.type==="folder"?(await Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function qM(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function ZM(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function GM(e){return(await Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function KM(...e){return await Le(Xe,{method:"POST",body:JSON.stringify({verb:nn.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function VM(e){const r=await Le("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return r.isLogged&&r.success}async function YM(){return await Le("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function XM(){try{const e=process.env.NODE_ENV==="development"?"/i18n/languages.json":"/$lib/studio/i18n/languages.json",n=await(await fetch(e)).text(),{supported:o}=JSON.parse(n);return o}catch{return[]}}async function JM({name:e,path:r="",root:n="root",asText:o=!1}){return Le(Xe,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:n,path:r,name:e,asText:o}),headers:new Headers({"Content-Type":"application/json"})})}async function QM(e={}){try{return await vo({path:"shared_datasources.json",...e})}catch{return{}}}async function eI(e={}){try{return await vo({path:"shared_app_events.json",createIfNotExists:!0,...e})}catch{return[]}}async function tI(e={}){try{return await vo({path:"shared_css.json",...e})}catch{return{classes:[]}}}async function rI(e={}){try{return await vo({path:"saved_conditions.json",...e})}catch{return{conditions:[]}}}async function nI(){try{return await Le("/rest/$info/privileges",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch{return{privileges:[]}}}async function iI(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const oI=Jl(),aI=async e=>{const r={verb:nn.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return oI(async()=>(await Le(Xe,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}),e))},sI=Jl(),uI=async e=>{const r={verb:nn.SET_FILE_CONTENT,asText:!1,name:"shared_app_events.json",path:"",root:"shared",content:e};return sI(async()=>(await Le(Xe,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}),e))},ic=async e=>{const r=await Le(Xe,{method:"POST",body:JSON.stringify({...e,verb:nn.SET_FILE_CONTENT,root:Yl.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),n=Hm(`${e.path||"Sources"}/${e.name}`);return{...r,type:n,size:0}},lI=async e=>await ic({name:"crafted_components.json",path:en.WEBFORMS,content:e});function cI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function fI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function dI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function pI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(r=>Array.isArray(r)?r:{...r,content:["4dm","4qm","4qs"].includes(r.ext)?Ja(r.content):r.content}).catch(r=>{var n,o;throw((o=(n=r.data)==null?void 0:n.__ERROR[0])==null?void 0:o.errCode)===1839&&nc(e.path),r})}function hI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function vI(e){const r=new RegExp(/^\((.+)(?=\))/gi).exec(e);return r!==null?r[1]:""}function mI(e){const r=new RegExp(/(->)(.*)/gi).exec(e);if(r!==null)return r[0].replace("->","");const n=/:([^)]*)$/.exec(e);return n!==null?`result : ${n[1].trim()}`:""}function gI(e){const r=vI(e).split(/[;,]/g).filter(Boolean).map(a=>{const u=a.split(":")[0].trim(),l=a.split(":")[1].trim();return{name:u,type:l}}),n=mI(e),o=n?{name:n.split(":")[0].trim(),type:n.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:r,result:o}}async function yI(e,r){const o=e.split(".").pop();try{const a=await Le(Xe,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:r,functionName:o}),headers:new Headers({"Content-Type":"application/json"})});a.content=Ja(a.content);const{params:u,result:l}=gI(a.parameters);return{...a,params:u,returns:l}}catch(a){return console.error(a),{className:r,functionName:o,filePath:e,content:"",params:[]}}}var yg=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(yg||{});function wI(e,r){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...r}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(n=>{})}function bI(e){window.pagesense=window.pagesense||[],window.pagesense.push(["trackEvent",e])}var wg=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(wg||{}),bg=(e=>(e[e.METHOD=1]="METHOD",e[e.CLASS=10]="CLASS",e))(bg||{}),Sg=(e=>(e.WelCome="WelCome",e.ActionPanel="ActionPanel",e.SideBar="SideBar",e.Settings="Settings",e.Main="Main",e.Explorer="Explorer",e.Header="Header",e.ComponentList="ComponentList",e))(Sg||{}),Eg=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(Eg||{});const SI={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},EI={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=Xe;exports.AppLoader=JC;exports.ControlledSwitch=bm;exports.DATASOURCE_THEMES=SI;exports.DatasourcesActions=Dm;exports.DebuggerActions=jm;exports.DesignerRequestVerb=nn;exports.Dialog=vx;exports.DialogBody=ov;exports.EActivity=yg;exports.EDITOR=EI;exports.EIDENTIFIERS=Sg;exports.ERROR_CODES=Eg;exports.EWebFormStyleClassScope=wg;exports.EXT_API_PREFIX=ho;exports.FileFolderType=Kt;exports.FolderRootPath=en;exports.FolderRootType=Yl;exports.HTTPError=_l;exports.HTTP_HANDLERS_PATH=zm;exports.IPreemptive=oo;exports.IPublished=Qm;exports.IPublishedRestScope=Ql;exports.IdentityProvider=xP;exports.Incase=BO;exports.IndentLines=Cv;exports.LOCALIZATION_PATH=YP;exports.LogoSVG=Sm;exports.LspActions=km;exports.MAX_FILE_NAME_LENGTH=Kl;exports.MODEL_TAB_PATH=VP;exports.Modal=rP;exports.ModalCloseReason=Vn;exports.ModalColor=_n;exports.ModalIcons=bl;exports.ModalType=Zl;exports.Mutex=qm;exports.NameError=Vl;exports.Overlay=iv;exports.Portal=Zh;exports.PublishOptions=SR;exports.ROLES_TAB_PATH=Um;exports.RemoteDebuggerMode=Xl;exports.SETTINGS_TAB_PATH=Bm;exports.SHARED_API_PREFIX=rc;exports.SourceCodeDescriptor=bg;exports.Switcher=Pv;exports.TabEventsActions=Nm;exports.Tip=eC;exports.TipsProvider=JT;exports.Toast=_O;exports.Tooltip=YC;exports.Tree=UO;exports.TreeIcon=xv;exports.TreeNode=$l;exports.WebformActions=Lm;exports.WebformEventsActions=io;exports.ZoomComponent=oP;exports.ZoomLevel=_m;exports._isArrayDatasource=mR;exports._isObjectDatasource=gR;exports.addAttributesToContent=_R;exports.addFolder=qM;exports.by=Zm;exports.byId=tR;exports.byPath=rR;exports.callServerSideParser=AR;exports.checkUpdates=NM;exports.createFolder=cI;exports.datasourcesSubject=UP;exports.debuggerSubject=qP;exports.dropFile=HM;exports.dropFolder=GM;exports.exists=nR;exports.extractWebformName=JP;exports.generateUUID=xR;exports.getAppSettings=jM;exports.getCatalog=YM;exports.getDatasourceId=iR;exports.getDefaultAppSettings=mg;exports.getFile=BM;exports.getFileContent=JM;exports.getFileExtentionFromType=XP;exports.getFilesInfo=KM;exports.getFolder=gg;exports.getFolders=WM;exports.getFunctionContent=yI;exports.getMonacoTheme=iI;exports.getNodeInfo=pI;exports.getSavedConditions=rI;exports.getSharedAppEvents=eI;exports.getSharedCSS=tI;exports.getSharedDatasources=QM;exports.getSharedResource=vo;exports.getSupportedLanguages=XM;exports.getTypeFromExtension=Hm;exports.getUserPrivileges=nI;exports.getWebForm=UM;exports.hasAttributesString=tg;exports.http=Le;exports.installUpdates=kM;exports.isArrayDatasource=Ym;exports.isDataClassMethod=uR;exports.isDataStoreMethod=sR;exports.isDateDatasource=yR;exports.isEntity=hR;exports.isEntityDatasource=fR;exports.isEntityMethod=lR;exports.isEntitySelection=vR;exports.isEntitySelectionDatasource=dR;exports.isEntitySelectionMethod=cR;exports.isObjectAttribute=oR;exports.isObjectDatasource=Xm;exports.isRelatedAttribute=aR;exports.isRelatedEntitiesAttribute=Km;exports.isRelatedEntityAttribute=Vm;exports.isScalarDatasource=Jm;exports.isSimpleAttribute=Gm;exports.isSimpleDatasource=pR;exports.loadDS=wR;exports.loadI18n=bR;exports.log=wI;exports.login=VM;exports.lspSubject=HP;exports.moveItem=dI;exports.outBy=QP;exports.outById=eR;exports.parseAttributes=ER;exports.queue=Jl;exports.removeAttributesString=rg;exports.removeItem=fI;exports.renameFile=zM;exports.renameFolder=ZM;exports.sanitizeContent=Ja;exports.saveContent=hI;exports.setCraftedComponents=lI;exports.setFileContent=ic;exports.setSharedAppEvents=uI;exports.setSharedSources=aI;exports.stringifyAttributes=eg;exports.tabEventsSubject=zP;exports.tasksManagerSubject=ZP;exports.toastSubject=$m;exports.trackEvent=bI;exports.transformDates=OR;exports.tryCreateSharedResource=nc;exports.useDidMountEffect=aP;exports.useDoubleClick=CP;exports.useFeatureFlags=_P;exports.useForwardedRef=EP;exports.useHotkeys=yP;exports.useIdentity=OP;exports.useOutsideClick=wP;exports.usePrevious=bP;exports.useStateObject=AP;exports.useStateRef=SP;exports.useTip=um;exports.validateName=Wm;exports.validateServerSide=GP;exports.validateValue=KP;exports.webformEventsSubject=ja;exports.webformSubject=BP;
|
|
143
|
+
>>> no match, partial?`,r,c,n,p),c===w))}let f;if(typeof y=="string"?(f=h===y,this.debug("string match",y,h,f)):(f=y.test(h),this.debug("pattern match",y,h,f)),!f)return!1}if(l===w&&d===S)return!0;if(l===w)return o;if(d===S)return l===w-1&&r[l]==="";throw new Error("wtf?")}braceExpand(){return hg(this.pattern,this.options)}parse(r){Wa(r);const n=this.options;if(r==="**")return Gt;if(r==="")return"";let o,a=null;(o=r.match(mM))?a=n.dot?yM:gM:(o=r.match(aM))?a=(n.nocase?n.dot?cM:lM:n.dot?uM:sM)(o[1]):(o=r.match(wM))?a=(n.nocase?n.dot?SM:bM:n.dot?EM:_M)(o):(o=r.match(fM))?a=n.dot?pM:dM:(o=r.match(hM))&&(a=vM);const u=Ua.fromGlob(r,this.options).toMMPattern();return a&&typeof u=="object"&&Reflect.defineProperty(u,"test",{value:a}),u}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;const r=this.set;if(!r.length)return this.regexp=!1,this.regexp;const n=this.options,o=n.noglobstar?AM:n.dot?TM:CM,a=new Set(n.nocase?["i"]:[]);let u=r.map(w=>{const S=w.map(y=>{if(y instanceof RegExp)for(const h of y.flags.split(""))a.add(h);return typeof y=="string"?FM(y):y===Gt?Gt:y._src});return S.forEach((y,h)=>{const c=S[h+1],p=S[h-1];y!==Gt||p===Gt||(p===void 0?c!==void 0&&c!==Gt?S[h+1]="(?:\\/|"+o+"\\/)?"+c:S[h]=o:c===void 0?S[h-1]=p+"(?:\\/|"+o+")?":c!==Gt&&(S[h-1]=p+"(?:\\/|\\/"+o+"\\/)"+c,S[h+1]=Gt))}),S.filter(y=>y!==Gt).join("/")}).join("|");const[l,d]=r.length>1?["(?:",")"]:["",""];u="^"+l+u+d+"$",this.negate&&(u="^(?!"+u+").+$");try{this.regexp=new RegExp(u,[...a].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(r){return this.preserveMultipleSlashes?r.split("/"):this.isWindows&&/^\/\/[^\/]+/.test(r)?["",...r.split(/\/+/)]:r.split(/\/+/)}match(r,n=this.partial){if(this.debug("match",r,this.pattern),this.comment)return!1;if(this.empty)return r==="";if(r==="/"&&n)return!0;const o=this.options;this.isWindows&&(r=r.split("\\").join("/"));const a=this.slashSplit(r);this.debug(this.pattern,"split",a);const u=this.set;this.debug(this.pattern,"set",u);let l=a[a.length-1];if(!l)for(let d=a.length-2;!l&&d>=0;d--)l=a[d];for(let d=0;d<u.length;d++){const w=u[d];let S=a;if(o.matchBase&&w.length===1&&(S=[l]),this.matchOne(S,w,n))return o.flipNegate?!0:!this.negate}return o.flipNegate?!1:this.negate}static defaults(r){return mt.defaults(r).Minimatch}}mt.AST=Ua;mt.Minimatch=Qa;mt.escape=oM;mt.unescape=Vi;const rc="/$shared",LM={"**/saved_conditions.json":{parser:"json",content:{conditions:[]},schema:{type:"object",properties:{conditions:{type:"array",items:{type:"object"}}},required:["conditions"]}},"**/shared_datasources.json":{parser:"json",content:{},schema:{type:"object",additionalProperties:!0,patternProperties:{"^.*$":{type:"array"}}}},"**/shared_css.json":{parser:"json",content:{classes:[]},schema:{type:"object",properties:{classes:{type:"array",items:{type:"object"}}},required:["classes"]}},"**/shared_app_events.json":{parser:"json",content:[]},"**/CustomComponents/manifest.json":{parser:"json",content:[],schema:{type:"array",items:{type:"object"}}},"**/crafted_components.json":{parser:"json",content:[],schema:{type:"array"}},"**/HTTPHandlers.json":{parser:"json",content:[],schema:{type:"array"}},"**/*.json":{parser:"json",content:{}}};function vg(e){const r=Object.entries(LM).find(([n])=>mt(e,n));return r==null?void 0:r[1]}function nc(e){var o;const r=(o=vg(e))==null?void 0:o.content;if(!r)return;const n=e.replace(`${rc}/`,"Shared/");ic({name:n,content:r,asText:typeof r=="string"})}function vo({path:e,createIfNotExists:r=!1}){const n=`${rc}/${e}`;return Le(`${n}?t=${Date.now()}`,{method:"GET",headers:new Headers({"Content-Type":"application/json"})}).then(o=>{const a=vg(e);let u=o;if(!a)return u;if(typeof u=="string")try{switch(a.parser){case"json":u=JSON.parse(u);break;default:break}}catch{throw new Error("Cannot parse")}if(a.schema&&!new RR.Validator().validate(u,a.schema).valid)throw new Error("Invalid Schema");return u}).catch(o=>{if(DM(o)&&r){const a=$M(o,e);$m.next({message:a,kind:"warning"}),nc(n)}throw o})}function DM(e){var r;return((r=e==null?void 0:e.response)==null?void 0:r.status)===404||(e==null?void 0:e.message)==="Invalid Schema"||(e==null?void 0:e.message)==="Cannot parse"||(e==null?void 0:e.name)==="SyntaxError"}function $M(e,r){var n;switch(!0){case((e==null?void 0:e.message)==="Cannot parse "||(e==null?void 0:e.name)==="SyntaxError"):return`Cannot parse file '${r}', resetting...`;case(e==null?void 0:e.message)==="Invalid Schema":return`File '${r}' is corrupt, resetting...`;case((n=e==null?void 0:e.response)==null?void 0:n.status)===404:return`File '${r}' not found, creating...`;default:return e==null?void 0:e.message}}function NM(e){return Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function kM(e){return Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}const mg=()=>{const{host:e,protocol:r}=window.location,n=r==="https:";return{projectOpened:!1,remoteDebuggerMode:Xl.DISABLED,baseUrl:"",qodly:!0,urls:{renderer:"/$lib/renderer/",debugger:`ws${n?"s":""}://${e}/remoteDebugger`,lsp:`ws${n?"s":""}://${e}/LSP`},isRestActive:!0}};async function jM(){const{hostname:e,host:r,protocol:n}=window.location,o=n==="https:";try{const a=await Le(Xe,{method:"POST",body:JSON.stringify({verb:nn.GET_APP_SETTINGS}),headers:new Headers({"Content-Type":"application/json"})}),u=(()=>{if(a.rendererPath)return a.rendererPath;const l=`http://${e}:${a.webServerHTTPPort}`,d=`https://${e}:${a.webServerHTTPSPort}`;return a.webServerHTTPPort&&a.webServerHTTPSPort?o?d:l:a.webServerHTTPPort?l:d})();return{projectOpened:a.webServerHTTPSPort>0||a.webServerHTTPPort>0,remoteDebuggerMode:a.remoteDebuggerMode,baseUrl:u,qodly:typeof a.qodly>"u"?!0:a.qodly,urls:{renderer:a.rendererPath||`${u}/$lib/renderer/`,debugger:`ws${o?"s":""}://${r}/remoteDebugger`,lsp:`ws${o?"s":""}://${r}/LSP`},isRestActive:a.isRESTActive}}catch(a){return console.error(a),mg()}}async function gg(e){return await Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function WM(...e){return(await Promise.all(e.map(o=>gg({root:o,verb:nn.GET_FOLDER})))).map(({children:o})=>o.map(({name:a,date:u,type:l})=>({name:a,type:l,date:u,path:`${l}/${a}`}))).flat()}function UM(e,r={}){const{sanitize:n=!0}=r;return Le(`/rest/$getWebForm/${e}`,{method:"GET"}).then(o=>{if(!(o!=null&&o.components)||!n)return o;const a=new Map;return{...o,components:Ve.entries(o.components).map(([u,l])=>{const d=u,{resolvedName:w}=l.type;if(w==="WebformLoader"){const S=Dl.generate();a.set(u,S),u=S}return[u,l,d]}).reduce((u,[l,d,w])=>{var S;return d.nodes&&(d.nodes=d.nodes.map(y=>a.get(y)||y)),d.linkedNodes&&(d.linkedNodes=Ve.entries(d.linkedNodes).reduce((y,[h,c])=>({...y,[h]:a.get(c)||c}),{})),(S=d.props)!=null&&S.events&&(d.props.events=d.props.events.map(y=>(y.type==="navigation"&&y.loader&&(y.loader=a.get(y.loader)||y.loader),y))),{...u,[l]:{...d,props:{...d.props,__originalID:w}}}},{})}})}function BM(e){return Le(Xe,{method:"POST",headers:new Headers({"Content-Type":"application/json"}),body:JSON.stringify(e)}).then(r=>({...r,content:[Kt.METHOD,Kt.CLASS].includes(r.type)?Ja(r.content):r.content}))}function zM(e){return e.type==="folder"?Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}):Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function HM(e){return e.type==="folder"?(await Le(ho,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted:(await Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}function qM(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function ZM(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}async function GM(e){return(await Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})).deleted}async function KM(...e){return await Le(Xe,{method:"POST",body:JSON.stringify({verb:nn.GET_FILES_INFO,files:e}),headers:new Headers({"Content-Type":"application/json"})})}async function VM(e){const r=await Le("/api/login",{method:"POST",body:JSON.stringify({accessKey:e}),headers:new Headers({"Content-Type":"application/json"})});return r.isLogged&&r.success}async function YM(){return await Le("/rest/$catalog/$all?$metadata=full",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}async function XM(e){try{const r=process.env.NODE_ENV==="development"?"/i18n/languages.json":`/$lib/${e?"studio":"renderer"}/i18n/languages.json`,o=await(await fetch(r)).text(),{supported:a}=JSON.parse(o);return a}catch{return[]}}async function JM({name:e,path:r="",root:n="root",asText:o=!1}){return Le(Xe,{method:"POST",body:JSON.stringify({verb:"getFileContent",root:n,path:r,name:e,asText:o}),headers:new Headers({"Content-Type":"application/json"})})}async function QM(e={}){try{return await vo({path:"shared_datasources.json",...e})}catch{return{}}}async function eI(e={}){try{return await vo({path:"shared_app_events.json",createIfNotExists:!0,...e})}catch{return[]}}async function tI(e={}){try{return await vo({path:"shared_css.json",...e})}catch{return{classes:[]}}}async function rI(e={}){try{return await vo({path:"saved_conditions.json",...e})}catch{return{conditions:[]}}}async function nI(){try{return await Le("/rest/$info/privileges",{method:"GET",headers:new Headers({"Content-Type":"application/json"})})}catch{return{privileges:[]}}}async function iI(){try{return await(await fetch(`monaco_theme.json?t=${Date.now()}`)).json()}catch{return null}}const oI=Jl(),aI=async e=>{const r={verb:nn.SET_FILE_CONTENT,asText:!1,name:"shared_datasources.json",path:"",root:"shared",content:e};return oI(async()=>(await Le(Xe,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}),e))},sI=Jl(),uI=async e=>{const r={verb:nn.SET_FILE_CONTENT,asText:!1,name:"shared_app_events.json",path:"",root:"shared",content:e};return sI(async()=>(await Le(Xe,{method:"POST",body:JSON.stringify(r),headers:new Headers({"Content-Type":"application/json"})}),e))},ic=async e=>{const r=await Le(Xe,{method:"POST",body:JSON.stringify({...e,verb:nn.SET_FILE_CONTENT,root:Yl.ROOT}),headers:new Headers({"Content-Type":"application/json"})}),n=Hm(`${e.path||"Sources"}/${e.name}`);return{...r,type:n,size:0}},lI=async e=>await ic({name:"crafted_components.json",path:en.WEBFORMS,content:e});function cI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function fI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function dI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function pI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})}).then(r=>Array.isArray(r)?r:{...r,content:["4dm","4qm","4qs"].includes(r.ext)?Ja(r.content):r.content}).catch(r=>{var n,o;throw((o=(n=r.data)==null?void 0:n.__ERROR[0])==null?void 0:o.errCode)===1839&&nc(e.path),r})}function hI(e){return Le(Xe,{method:"POST",body:JSON.stringify(e),headers:new Headers({"Content-Type":"application/json"})})}function vI(e){const r=new RegExp(/^\((.+)(?=\))/gi).exec(e);return r!==null?r[1]:""}function mI(e){const r=new RegExp(/(->)(.*)/gi).exec(e);if(r!==null)return r[0].replace("->","");const n=/:([^)]*)$/.exec(e);return n!==null?`result : ${n[1].trim()}`:""}function gI(e){const r=vI(e).split(/[;,]/g).filter(Boolean).map(a=>{const u=a.split(":")[0].trim(),l=a.split(":")[1].trim();return{name:u,type:l}}),n=mI(e),o=n?{name:n.split(":")[0].trim(),type:n.split(":")[1].trim()}:{name:"result",type:"Variable"};return{params:r,result:o}}async function yI(e,r){const o=e.split(".").pop();try{const a=await Le(Xe,{method:"POST",body:JSON.stringify({verb:"getFunctionContent",className:r,functionName:o}),headers:new Headers({"Content-Type":"application/json"})});a.content=Ja(a.content);const{params:u,result:l}=gI(a.parameters);return{...a,params:u,returns:l}}catch(a){return console.error(a),{className:r,functionName:o,filePath:e,content:"",params:[]}}}var yg=(e=>(e.STUDIO_LOADED="UA-1-0",e.WELCOME_TOUR_INIT="UA-1-3",e.WELCOME_TOUR_END="UA-1-4",e))(yg||{});function wI(e,r){fetch("/api/v1/activity",{body:JSON.stringify({AID:e,...r}),headers:{"Content-Type":"application/json"},method:"POST"}).catch(n=>{})}function bI(e){window.pagesense=window.pagesense||[],window.pagesense.push(["trackEvent",e])}var wg=(e=>(e.LOCAL="local",e.SHARED="shared",e.THEME="theme",e))(wg||{}),bg=(e=>(e[e.METHOD=1]="METHOD",e[e.CLASS=10]="CLASS",e))(bg||{}),Sg=(e=>(e.WelCome="WelCome",e.ActionPanel="ActionPanel",e.SideBar="SideBar",e.Settings="Settings",e.Main="Main",e.Explorer="Explorer",e.Header="Header",e.ComponentList="ComponentList",e))(Sg||{}),Eg=(e=>(e[e.FILE_NOT_FOUND=1839]="FILE_NOT_FOUND",e[e.JSON_MALFORMED=554]="JSON_MALFORMED",e[e.JSON_MALFORMED_AT_LINE=550]="JSON_MALFORMED_AT_LINE",e))(Eg||{});const SI={transparent:{backgroundColor:"transparent"},black:{backgroundColor:"#4a4a4a",color:"white",padding:"3px 5px",borderRadius:5},grey:{backgroundColor:"#e8e8e8",color:"#262626",padding:"3px 5px",borderRadius:5}},EI={Code:{key:"editors:code",config:{language:"4d",theme:"fd-dark"}},WebForm:{key:"editors:webforms"}};exports.API_PREFIX=Xe;exports.AppLoader=JC;exports.ControlledSwitch=bm;exports.DATASOURCE_THEMES=SI;exports.DatasourcesActions=Dm;exports.DebuggerActions=jm;exports.DesignerRequestVerb=nn;exports.Dialog=vx;exports.DialogBody=ov;exports.EActivity=yg;exports.EDITOR=EI;exports.EIDENTIFIERS=Sg;exports.ERROR_CODES=Eg;exports.EWebFormStyleClassScope=wg;exports.EXT_API_PREFIX=ho;exports.FileFolderType=Kt;exports.FolderRootPath=en;exports.FolderRootType=Yl;exports.HTTPError=_l;exports.HTTP_HANDLERS_PATH=zm;exports.IPreemptive=oo;exports.IPublished=Qm;exports.IPublishedRestScope=Ql;exports.IdentityProvider=xP;exports.Incase=BO;exports.IndentLines=Cv;exports.LOCALIZATION_PATH=YP;exports.LogoSVG=Sm;exports.LspActions=km;exports.MAX_FILE_NAME_LENGTH=Kl;exports.MODEL_TAB_PATH=VP;exports.Modal=rP;exports.ModalCloseReason=Vn;exports.ModalColor=_n;exports.ModalIcons=bl;exports.ModalType=Zl;exports.Mutex=qm;exports.NameError=Vl;exports.Overlay=iv;exports.Portal=Zh;exports.PublishOptions=SR;exports.ROLES_TAB_PATH=Um;exports.RemoteDebuggerMode=Xl;exports.SETTINGS_TAB_PATH=Bm;exports.SHARED_API_PREFIX=rc;exports.SourceCodeDescriptor=bg;exports.Switcher=Pv;exports.TabEventsActions=Nm;exports.Tip=eC;exports.TipsProvider=JT;exports.Toast=_O;exports.Tooltip=YC;exports.Tree=UO;exports.TreeIcon=xv;exports.TreeNode=$l;exports.WebformActions=Lm;exports.WebformEventsActions=io;exports.ZoomComponent=oP;exports.ZoomLevel=_m;exports._isArrayDatasource=mR;exports._isObjectDatasource=gR;exports.addAttributesToContent=_R;exports.addFolder=qM;exports.by=Zm;exports.byId=tR;exports.byPath=rR;exports.callServerSideParser=AR;exports.checkUpdates=NM;exports.createFolder=cI;exports.datasourcesSubject=UP;exports.debuggerSubject=qP;exports.dropFile=HM;exports.dropFolder=GM;exports.exists=nR;exports.extractWebformName=JP;exports.generateUUID=xR;exports.getAppSettings=jM;exports.getCatalog=YM;exports.getDatasourceId=iR;exports.getDefaultAppSettings=mg;exports.getFile=BM;exports.getFileContent=JM;exports.getFileExtentionFromType=XP;exports.getFilesInfo=KM;exports.getFolder=gg;exports.getFolders=WM;exports.getFunctionContent=yI;exports.getMonacoTheme=iI;exports.getNodeInfo=pI;exports.getSavedConditions=rI;exports.getSharedAppEvents=eI;exports.getSharedCSS=tI;exports.getSharedDatasources=QM;exports.getSharedResource=vo;exports.getSupportedLanguages=XM;exports.getTypeFromExtension=Hm;exports.getUserPrivileges=nI;exports.getWebForm=UM;exports.hasAttributesString=tg;exports.http=Le;exports.installUpdates=kM;exports.isArrayDatasource=Ym;exports.isDataClassMethod=uR;exports.isDataStoreMethod=sR;exports.isDateDatasource=yR;exports.isEntity=hR;exports.isEntityDatasource=fR;exports.isEntityMethod=lR;exports.isEntitySelection=vR;exports.isEntitySelectionDatasource=dR;exports.isEntitySelectionMethod=cR;exports.isObjectAttribute=oR;exports.isObjectDatasource=Xm;exports.isRelatedAttribute=aR;exports.isRelatedEntitiesAttribute=Km;exports.isRelatedEntityAttribute=Vm;exports.isScalarDatasource=Jm;exports.isSimpleAttribute=Gm;exports.isSimpleDatasource=pR;exports.loadDS=wR;exports.loadI18n=bR;exports.log=wI;exports.login=VM;exports.lspSubject=HP;exports.moveItem=dI;exports.outBy=QP;exports.outById=eR;exports.parseAttributes=ER;exports.queue=Jl;exports.removeAttributesString=rg;exports.removeItem=fI;exports.renameFile=zM;exports.renameFolder=ZM;exports.sanitizeContent=Ja;exports.saveContent=hI;exports.setCraftedComponents=lI;exports.setFileContent=ic;exports.setSharedAppEvents=uI;exports.setSharedSources=aI;exports.stringifyAttributes=eg;exports.tabEventsSubject=zP;exports.tasksManagerSubject=ZP;exports.toastSubject=$m;exports.trackEvent=bI;exports.transformDates=OR;exports.tryCreateSharedResource=nc;exports.useDidMountEffect=aP;exports.useDoubleClick=CP;exports.useFeatureFlags=_P;exports.useForwardedRef=EP;exports.useHotkeys=yP;exports.useIdentity=OP;exports.useOutsideClick=wP;exports.usePrevious=bP;exports.useStateObject=AP;exports.useStateRef=SP;exports.useTip=um;exports.validateName=Wm;exports.validateServerSide=GP;exports.validateValue=KP;exports.webformEventsSubject=ja;exports.webformSubject=BP;
|
|
144
144
|
//# sourceMappingURL=index.cjs.js.map
|