@sockethub/examples 1.0.0-beta.1 → 1.0.0-beta.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.
- package/build/_app/immutable/assets/0.DcfK0tAS.css +1 -0
- package/build/_app/immutable/chunks/{BRcKhWZZ.js → BHzw4I4G.js} +1 -1
- package/build/_app/immutable/chunks/BJctjvPM.js +1 -0
- package/build/_app/immutable/chunks/{BKtlB-ZE.js → BPju5WGe.js} +22 -22
- package/build/_app/immutable/chunks/Bfx7qmE-.js +3 -0
- package/build/_app/immutable/chunks/Bige9f4F.js +1 -0
- package/build/_app/immutable/chunks/{BFJazgM-.js → BqL0wH9S.js} +2 -2
- package/build/_app/immutable/chunks/BqVGmFmc.js +1 -0
- package/build/_app/immutable/chunks/{CgjHsrhs.js → BrzeKAzG.js} +2 -2
- package/build/_app/immutable/chunks/{CbO4bo1j.js → CmN_Lgkn.js} +1 -1
- package/build/_app/immutable/chunks/D4JoyovE.js +1 -0
- package/build/_app/immutable/chunks/Dn5i8FcP.js +1 -0
- package/build/_app/immutable/chunks/{D5R3T3gW.js → DpVTR4Ke.js} +1 -1
- package/build/_app/immutable/chunks/{BymJmDWJ.js → k-cRz8DS.js} +1 -1
- package/build/_app/immutable/chunks/peuwRZld.js +1 -0
- package/build/_app/immutable/entry/app.CdcIotKP.js +2 -0
- package/build/_app/immutable/entry/start.VoXZusO8.js +1 -0
- package/build/_app/immutable/nodes/0.CvrK3N84.js +39 -0
- package/build/_app/immutable/nodes/1.BLx3kTa4.js +1 -0
- package/build/_app/immutable/nodes/10.CoN6yO4L.js +1 -0
- package/build/_app/immutable/nodes/11.vC6KIt-V.js +1 -0
- package/build/_app/immutable/nodes/12.ClWnp5sH.js +1 -0
- package/build/_app/immutable/nodes/2.BtsGnuO2.js +5 -0
- package/build/_app/immutable/nodes/3.CbjWQhCK.js +1 -0
- package/build/_app/immutable/nodes/4.BixPYKg0.js +1 -0
- package/build/_app/immutable/nodes/5.CCO3cm2J.js +2 -0
- package/build/_app/immutable/nodes/{5.D6ttn0N8.js → 6.Cgvwdlyd.js} +1 -1
- package/build/_app/immutable/nodes/{3.DrGIkVu0.js → 7.Bwm4uyL1.js} +1 -1
- package/build/_app/immutable/nodes/8.CMrlNz8n.js +1 -0
- package/build/_app/immutable/nodes/{6.CkpDg7i6.js → 9.Dalef57T.js} +1 -1
- package/build/_app/version.json +1 -1
- package/build/caldav.html +10 -10
- package/build/carddav.html +10 -10
- package/build/dummy.html +10 -10
- package/build/email.html +40 -0
- package/build/feeds.html +10 -10
- package/build/index.html +10 -10
- package/build/instagram.html +40 -0
- package/build/irc.html +10 -10
- package/build/messenger.html +40 -0
- package/build/metadata.html +10 -10
- package/build/xmpp.html +10 -10
- package/package.json +4 -4
- package/build/_app/immutable/assets/0.DiwDnc-u.css +0 -1
- package/build/_app/immutable/chunks/BDxEtWDn.js +0 -1
- package/build/_app/immutable/chunks/C7zmhnYM.js +0 -1
- package/build/_app/immutable/chunks/CH5OY5MF.js +0 -1
- package/build/_app/immutable/chunks/Cko76dBZ.js +0 -1
- package/build/_app/immutable/chunks/FpM_-oX5.js +0 -1
- package/build/_app/immutable/chunks/wMyiGnQa.js +0 -1
- package/build/_app/immutable/entry/app.C88mAu2e.js +0 -2
- package/build/_app/immutable/entry/start.B1PB6bga.js +0 -1
- package/build/_app/immutable/nodes/0.BwQUhEGu.js +0 -39
- package/build/_app/immutable/nodes/1.C-zkRZjk.js +0 -1
- package/build/_app/immutable/nodes/2.8bzWQILm.js +0 -5
- package/build/_app/immutable/nodes/4.Clpm2HdH.js +0 -1
- package/build/_app/immutable/nodes/7.DrKGjs0l.js +0 -1
- package/build/_app/immutable/nodes/8.2NG23_e4.js +0 -1
- package/build/_app/immutable/nodes/9.D7zgVgYt.js +0 -2
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
var
|
|
2
|
-
\r\f \v\uFEFF`];function Co(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var s in r)if(r[s])n=n?n+" "+s:s;else if(n.length)for(var o=s.length,i=0;(i=n.indexOf(s,i))>=0;){var u=i+o;(i===0||Ms.includes(n[i-1]))&&(u===n.length||Ms.includes(n[u]))?n=(i===0?"":n.substring(0,i))+n.substring(u+1):i=u}}return n===""?null:n}function Ds(t,e=!1){var r=e?" !important;":";",n="";for(var s in t){var o=t[s];o!=null&&o!==""&&(n+=" "+s+": "+o+r)}return n}function kn(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function jo(t,e){if(e){var r="",n,s;if(Array.isArray(e)?(n=e[0],s=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,i=0,u=!1,a=[];n&&a.push(...Object.keys(n).map(kn)),s&&a.push(...Object.keys(s).map(kn));var f=0,l=-1;const E=t.length;for(var d=0;d<E;d++){var w=t[d];if(u?w==="/"&&t[d-1]==="*"&&(u=!1):o?o===w&&(o=!1):w==="/"&&t[d+1]==="*"?u=!0:w==='"'||w==="'"?o=w:w==="("?i++:w===")"&&i--,!u&&o===!1&&i===0){if(w===":"&&l===-1)l=d;else if(w===";"||d===E-1){if(l!==-1){var P=kn(t.substring(f,l).trim());if(!a.includes(P)){w!==";"&&d++;var $=t.substring(f,d).trim();r+=" "+$+";"}}f=d+1,l=-1}}}}return n&&(r+=Ds(n)),s&&(r+=Ds(s,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function ur(t,e,r,n,s,o){var i=t.__className;if(lt||i!==r||i===void 0){var u=Co(r,n,o);(!lt||u!==t.getAttribute("class"))&&(u==null?t.removeAttribute("class"):e?t.className=u:t.setAttribute("class",u)),t.__className=r}else if(o&&s!==o)for(var a in o){var f=!!o[a];(s==null||f!==!!s[a])&&t.classList.toggle(a,f)}return o}function On(t,e={},r,n){for(var s in r){var o=r[s];e[s]!==o&&(r[s]==null?t.style.removeProperty(s):t.style.setProperty(s,o,n))}}function Mo(t,e,r,n){var s=t.__style;if(lt||s!==e){var o=jo(e,n);(!lt||o!==t.getAttribute("style"))&&(o==null?t.removeAttribute("style"):t.style.cssText=o),t.__style=e}else n&&(Array.isArray(n)?(On(t,r==null?void 0:r[0],n[0]),On(t,r==null?void 0:r[1],n[1],"important")):On(t,r,n));return n}function Kr(t,e,r=!1){if(t.multiple){if(e==null)return;if(!pi(e))return Ha();for(var n of t.options)n.selected=e.includes($r(n));return}for(n of t.options){var s=$r(n);if(Ka(s,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function Si(t){var e=new MutationObserver(()=>{Kr(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ga(()=>{e.disconnect()})}function Hd(t,e,r=e){var n=new WeakSet,s=!0;Wa(t,"change",o=>{var i=o?"[selected]":":checked",u;if(t.multiple)u=[].map.call(t.querySelectorAll(i),$r);else{var a=t.querySelector(i)??t.querySelector("option:not([disabled])");u=a&&$r(a)}r(u),qr!==null&&n.add(qr)}),as(()=>{var o=e();if(t===document.activeElement){var i=Ja??qr;if(n.has(i))return}if(Kr(t,o,s),s&&o===void 0){var u=t.querySelector(":checked");u!==null&&(o=$r(u),r(o))}t.__value=o,s=!1}),Si(t)}function $r(t){return"__value"in t?t.__value:t.value}const _r=Symbol("class"),gr=Symbol("style"),Pi=Symbol("is custom element"),ki=Symbol("is html");function Do(t){if(lt){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;It(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var s=t.checked;It(t,"checked",null),t.checked=s}}};t.__on_r=r,vi(r),eo()}}function qo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function It(t,e,r,n){var s=Oi(t);lt&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=r)&&(e==="loading"&&(t[no]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Ni(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Lo(t,e,r,n,s=!1,o=!1){if(lt&&s&&t.tagName==="INPUT"){var i=t,u=i.type==="checkbox"?"defaultChecked":"defaultValue";u in r||Do(i)}var a=Oi(t),f=a[Pi],l=!a[ki];let d=lt&&f;d&&sr(!1);var w=e||{},P=t.tagName==="OPTION";for(var $ in e)$ in r||(r[$]=null);r.class?r.class=Ao(r.class):r.class=null,r[gr]&&(r.style??(r.style=null));var E=Ni(t);for(const g in r){let h=r[g];if(P&&g==="value"&&h==null){t.value=t.__value="",w[g]=h;continue}if(g==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";ur(t,m,h,n,e==null?void 0:e[_r],r[_r]),w[g]=h,w[_r]=r[_r];continue}if(g==="style"){Mo(t,h,e==null?void 0:e[gr],r[gr]),w[g]=h,w[gr]=r[gr];continue}var c=w[g];if(!(h===c&&!(h===void 0&&t.hasAttribute(g)))){w[g]=h;var _=g[0]+g[1];if(_!=="$$")if(_==="on"){const S={},O="$$"+g;let A=g.slice(2);var p=$o(A);if(_o(A)&&(A=A.slice(0,-7),S.capture=!0),!p&&c){if(h!=null)continue;t.removeEventListener(A,w[O],S),w[O]=null}if(h!=null)if(p)t[`__${A}`]=h,rn([A]);else{let D=function(q){w[g].call(this,q)};w[O]=wo(A,t,D,S)}else p&&(t[`__${A}`]=void 0)}else if(g==="style")It(t,g,h);else if(g==="autofocus")Ya(t,!!h);else if(!f&&(g==="__value"||g==="value"&&h!=null))t.value=t.__value=h;else if(g==="selected"&&P)qo(t,h);else{var v=g;l||(v=bo(v));var b=v==="defaultValue"||v==="defaultChecked";if(h==null&&!f&&!b)if(a[g]=null,v==="value"||v==="checked"){let S=t;const O=e===void 0;if(v==="value"){let A=S.defaultValue;S.removeAttribute(v),S.defaultValue=A,S.value=S.__value=O?A:null}else{let A=S.defaultChecked;S.removeAttribute(v),S.defaultChecked=A,S.checked=O?A:!1}}else t.removeAttribute(g);else b||E.includes(v)&&(f||typeof h!="string")?(t[v]=h,v in a&&(a[v]=Za)):typeof h!="function"&&It(t,v,h)}}}return d&&sr(!0),w}function Vo(t,e,r=[],n=[],s=[],o,i=!1,u=!1){Qa(s,r,n,a=>{var f=void 0,l={},d=t.nodeName==="SELECT",w=!1;if(_i(()=>{var $=e(...a.map(te)),E=Lo(t,f,$,o,i,u);w&&d&&"value"in $&&Kr(t,$.value);for(let c of Object.getOwnPropertySymbols(l))$[c]||xr(l[c]);for(let c of Object.getOwnPropertySymbols($)){var m=$[c];c.description===Xa&&(!f||m!==f[c])&&(l[c]&&xr(l[c]),l[c]=Er(()=>Ro(t,()=>m))),E[c]=m}f=E}),d){var P=t;as(()=>{Kr(P,f.value,!0),Si(P)})}w=!0})}function Oi(t){return t.__attributes??(t.__attributes={[Pi]:t.nodeName.includes("-"),[ki]:t.namespaceURI===to})}var qs=new Map;function Ni(t){var e=t.getAttribute("is")||t.nodeName,r=qs.get(e);if(r)return r;qs.set(e,r=[]);for(var n,s=t,o=Element.prototype;o!==s;){n=so(s);for(var i in n)n[i].set&&r.push(i);s=ro(s)}return r}const Wn=lr([]),Ar=new Map;function Ti(t,e=!1){var r,n,s;if(console.log("displayMessage called:",{type:t.type,platform:Wr(t["@context"]),isResponse:e,actor:t.actor,content:(r=t.object)==null?void 0:r.content}),t.type==="send"&&((n=t.object)==null?void 0:n.type)==="message"){const o=typeof t.actor=="string"?t.actor:((s=t.actor)==null?void 0:s.name)||"",i=t.object.content||"",u=`${o}:${i}`,a=Date.now(),f=Ar.get(u);if(f&&a-f<2e3){console.log("Skipping duplicate message:",u);return}Ar.set(u,a);for(const[l,d]of Ar)a-d>5e3&&Ar.delete(l);Wn.set([...io(Wn),[o,i]]),console.log("Message displayed:",{actorName:o,content:i,isResponse:e,platform:Wr(t["@context"])})}}var Uo=Be("<li> </li>"),Fo=Be('<div><label for="incomingMessagesContainer" class="text-gray-900 font-bold">Incoming Messages</label> <div id="incomingMessagesContainer" class="incoming-messages-container w-full"><ui class="incoming-messages"></ui> <div class="incoming-messages-anchor"></div></div></div>');function Kd(t,e){Ut(e,!1);const r=()=>po(Wn,"$messages",n),[n,s]=mo();bi();var o=Fo(),i=Oe(de(o),2),u=de(i);Gn(u,5,r,$i,(a,f)=>{var l=Uo(),d=de(l);le(l),nt(()=>We(d,`${te(f)[0]??""}: ${te(f)[1]??""}`)),Ne(a,l)}),le(u),wi(2),le(i),le(o),Ne(t,o),Ft(),s()}function zo(t,e,r){var s,o,i;const n=((s=e[r])==null?void 0:s.requestId)??r;return{sent:(o=t[n])==null?void 0:o[0],response:(i=t[r])==null?void 0:i[1]}}function Bo(t){return typeof t=="object"&&t!==null&&t.type==="page"}var xo=Be('<video class="w-full max-h-80 bg-black" controls preload="metadata"></video>',2),Ho=Be('<img class="w-full max-h-80 object-cover bg-gray-100"/>'),Ko=Be('<div class="w-full h-24 bg-gray-100 flex items-center justify-center text-gray-400 text-sm">No preview image</div>'),Go=Be('<img class="w-4 h-4" alt=""/>'),Wo=Be('<h4 class="font-semibold text-gray-900 whitespace-pre-line"> </h4>'),Jo=Be('<p class="text-sm text-gray-600 whitespace-pre-line line-clamp-6"> </p>'),Qo=Be('<a class="block text-xs text-indigo-600 hover:text-indigo-800 truncate" target="_blank" rel="noopener noreferrer"> </a>'),Xo=Be('<div class="bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden max-w-xl"><!> <div class="p-4 space-y-1"><div class="flex items-center space-x-2 text-xs text-gray-500 uppercase tracking-wide"><!> <span> </span></div> <!> <!> <!></div></div>');function Yo(t,e){Ut(e,!0);const r=Ge(()=>{if(e.page.favicon)try{return new URL(e.page.favicon,e.page.url).href}catch{return}}),n=Ge(()=>{var A;return(A=e.page.image)==null?void 0:A[0]}),s=Ge(()=>{var A,D;return((A=e.page.video)==null?void 0:A.thumbnail)??((D=te(n))==null?void 0:D.url)}),o=Ge(()=>{if(!e.page.url)return"";try{return new URL(e.page.url).hostname}catch{return e.page.url}});let i=Dt(void 0),u=Dt(void 0);const a=Ge(()=>te(r)!==void 0&&te(i)===te(r)),f=Ge(()=>te(n)!==void 0&&te(u)===te(n).url);var l=Xo(),d=de(l);{var w=A=>{var D=xo();nt(()=>{It(D,"src",e.page.video.url),It(D,"poster",te(s))}),Ne(A,D)},P=A=>{var D=Gt(),q=wt(D);{var X=Z=>{var ce=Ho();nt(()=>{It(ce,"src",te(n).url),It(ce,"alt",te(n).alt??e.page.title??"")}),As("error",ce,()=>{var ye;return ht(u,(ye=te(n))==null?void 0:ye.url,!0)}),Cs(ce),Ne(Z,ce)},G=Z=>{var ce=Ko();Ne(Z,ce)};ot(q,Z=>{te(n)&&!te(f)?Z(X):Z(G,!1)},!0)}Ne(A,D)};ot(d,A=>{var D;(D=e.page.video)!=null&&D.url?A(w):A(P,!1)})}var $=Oe(d,2),E=de($),m=de(E);{var c=A=>{var D=Go();nt(()=>It(D,"src",te(r))),As("error",D,()=>ht(i,te(r),!0)),Cs(D),Ne(A,D)};ot(m,A=>{te(r)&&!te(a)&&A(c)})}var _=Oe(m,2),p=de(_,!0);le(_),le(E);var v=Oe(E,2);{var b=A=>{var D=Wo(),q=de(D,!0);le(D),nt(()=>We(q,e.page.title)),Ne(A,D)};ot(v,A=>{e.page.title&&A(b)})}var g=Oe(v,2);{var h=A=>{var D=Jo(),q=de(D,!0);le(D),nt(()=>We(q,e.page.description)),Ne(A,D)};ot(g,A=>{e.page.description&&A(h)})}var S=Oe(g,2);{var O=A=>{var D=Qo(),q=de(D,!0);le(D),nt(()=>{It(D,"href",e.page.url),We(q,e.page.url)}),Ne(A,D)};ot(S,A=>{e.page.url&&A(O)})}le($),le(l),nt(()=>We(p,e.page.name||te(o))),Ne(t,l),Ft()}var Zo=Be("<span> </span>");function os(t,e){Ut(e,!0);const r=Ge(()=>Wr(e.entry["@context"]));var n=Zo(),s=de(n);le(n),nt(()=>We(s,`[${te(r)??"unknown"??""}:${e.entry.type??""}]`)),Ne(t,n),Ft()}var ec=Be("<!> <span> </span> <span> </span>",1);function tc(t,e){Ut(e,!0);var r=ec(),n=wt(r);os(n,{get entry(){return e.entry}});var s=Oe(n,2),o=de(s);le(s);var i=Oe(s,2),u=de(i,!0);le(i),nt(()=>{var a,f,l;We(o,`#${e.id??""}
|
|
3
|
-
${(typeof e.entry.actor=="string"?e.entry.actor:((a=e.entry.actor)==null?void 0:a.name)||((f=e.entry.actor)==null?void 0:f.id))??""}:`),We(
|
|
4
|
-
${(typeof e.entry.actor=="string"?e.entry.actor:((i=e.entry.actor)==null?void 0:i.name)||((u=e.entry.actor)==null?void 0:u.id))??""}`)}),Ne(t,r),Ft()}var lc=Be('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),fc=Be('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),dc=Be('<div class="mt-2 p-3 bg-red-50 border border-red-200 rounded-lg"><div class="flex items-center space-x-2"><svg class="w-4 h-4 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="text-red-800 font-medium text-sm">Error:</span> <span class="text-red-700 text-sm"> </span></div></div>'),hc=Be('<li class="p-4 hover:bg-gray-50 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-2"><div class="flex items-center space-x-2"><span class="text-sm font-semibold text-gray-700"> </span> <!> <!></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <div class="text-sm text-gray-600"><!></div> <!></div></div></li>');function Ls(t,e){Ut(e,!0);const r=Ge(()=>Wr(e.entry["@context"])),n=Ge(()=>e.timestamp?new Date(e.timestamp).toLocaleTimeString():""),s=Ge(()=>e.hasSend&&e.hasResponse?"Sent → Response OK":e.hasSend?"Sent → Awaiting response":""),o=Ge(()=>e.hasSend&&e.hasResponse?"bg-green-500":e.hasSend?"bg-orange-400":"bg-green-500");var i=hc(),u=de(i),a=de(u),f=de(a),l=Oe(f,2),d=de(l,!0);le(l),le(a);var w=Oe(a,2),P=de(w),$=de(P),E=de($),m=de(E,!0);le(E);var c=Oe(E,2);{var _=q=>{var X=lc(),G=de(X,!0);le(X),nt(Z=>We(G,Z),[()=>te(r).toUpperCase()]),Ne(q,X)};ot(c,q=>{te(r)&&q(_)})}var p=Oe(c,2);{var v=q=>{var X=fc(),G=de(X,!0);le(X),nt(()=>We(G,e.entry.type)),Ne(q,X)};ot(p,q=>{e.entry.type&&q(v)})}le($);var b=Oe($,2);b.__click=function(...q){var X;(X=e.buttonAction)==null||X.apply(this,q)},le(P);var g=Oe(P,2),h=de(g);{var S=q=>{tc(q,{get id(){return e.id},get entry(){return e.entry}})},O=q=>{var X=Gt(),G=wt(X);{var Z=ye=>{oc(ye,{get id(){return e.id},get entry(){return e.entry}})},ce=ye=>{uc(ye,{get id(){return e.id},get entry(){return e.entry}})};ot(G,ye=>{te(r)==="feeds"?ye(Z):ye(ce,!1)},!0)}Ne(q,X)};ot(h,q=>{te(r)==="dummy"?q(S):q(O,!1)})}le(g);var A=Oe(g,2);{var D=q=>{var X=dc(),G=de(X),Z=Oe(de(G),4),ce=de(Z,!0);le(Z),le(G),le(X),nt(()=>We(ce,e.entry.error)),Ne(q,X)};ot(A,q=>{e.entry.error&&q(D)})}le(w),le(u),le(i),nt(()=>{ur(f,1,`w-3 h-3 ${te(o)??""} rounded-full`),We(d,te(n)||`#${e.id}`),We(m,te(s))}),Ne(t,i),Ft()}rn(["click"]);var pc=Be('<div class="mt-2 p-2 bg-red-50 border border-red-200 rounded-lg"><span class="text-red-700 text-xs"> </span></div>'),mc=Be('<li class="p-4 hover:bg-indigo-50/40 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-1"><div class="flex items-center space-x-2"><span> </span></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <p class="text-sm text-gray-600 truncate"> </p> <!></div></div></li>');function gc(t,e){Ut(e,!0);const r={schemas:{label:"Schemas Received",color:"text-indigo-800",bg:"bg-indigo-100"},ready:{label:"Client Ready",color:"text-emerald-800",bg:"bg-emerald-100"},init_error:{label:"Init Error",color:"text-red-800",bg:"bg-red-100"}},n=Ge(()=>r[e.entry._logType]??r.schemas);function s(h){if(!h||typeof h!="object")return"";const S=h;if(e.entry._logType==="schemas"){const A=(Array.isArray(S.platforms)?S.platforms:[]).map(q=>q==null?void 0:q.id).filter(Boolean);return`API v${typeof S.apiVersion=="number"?S.apiVersion:"unknown"} — ${A.length} platform${A.length!==1?"s":""}: ${A.join(", ")}`}if(e.entry._logType==="ready"){const O=typeof S.reason=="string"?S.reason:"",A=typeof S.apiVersion=="number"?S.apiVersion:"unknown",D=Array.isArray(S.platforms)?S.platforms.length:0;return`${O} — Sockethub API v${A}, ${D} platform${D!==1?"s":""}`}if(e.entry._logType==="init_error"){const O=typeof S.error=="string"?S.error:"unknown",A=typeof S.phase=="string"?S.phase:"",D=S.retrying?" (retrying)":"";return`${A}: ${O}${D}`}return JSON.stringify(h).slice(0,120)}const o=Ge(()=>s(e.entry.payload)),i=Ge(()=>new Date(e.entry._timestamp).toLocaleTimeString());var u=mc(),a=de(u),f=de(a),l=de(f),d=Oe(l,2),w=de(d,!0);le(d),le(f);var P=Oe(f,2),$=de(P),E=de($),m=de(E),c=de(m,!0);le(m),le(E);var _=Oe(E,2);_.__click=function(...h){var S;(S=e.buttonAction)==null||S.apply(this,h)},le($);var p=Oe($,2),v=de(p,!0);le(p);var b=Oe(p,2);{var g=h=>{var S=pc(),O=de(S),A=de(O,!0);le(O),le(S),nt(()=>{var D;return We(A,((D=e.entry.payload)==null?void 0:D.error)??"")}),Ne(h,S)};ot(b,h=>{e.entry._logType==="init_error"&&h(g)})}le(P),le(a),le(u),nt(()=>{ur(l,1,`w-3 h-3 ${e.entry._logType==="init_error"?"bg-red-500":"bg-indigo-500"} rounded-full`),We(w,te(i)),ur(m,1,`px-2 py-1 ${te(n).bg??""} ${te(n).color??""} text-xs font-semibold rounded-full`),We(c,te(n).label),We(v,te(o))}),Ne(t,u),Ft()}rn(["click"]);function vc(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Nn,Vs;function yc(){if(Vs)return Nn;Vs=1;function t(L){return L instanceof Map?L.clear=L.delete=L.set=function(){throw new Error("map is read-only")}:L instanceof Set&&(L.add=L.clear=L.delete=function(){throw new Error("set is read-only")}),Object.freeze(L),Object.getOwnPropertyNames(L).forEach(Y=>{const se=L[Y],$e=typeof se;($e==="object"||$e==="function")&&!Object.isFrozen(se)&&t(se)}),L}class e{constructor(Y){Y.data===void 0&&(Y.data={}),this.data=Y.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(L){return L.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function n(L,...Y){const se=Object.create(null);for(const $e in L)se[$e]=L[$e];return Y.forEach(function($e){for(const Ye in $e)se[Ye]=$e[Ye]}),se}const s="</span>",o=L=>!!L.scope,i=(L,{prefix:Y})=>{if(L.startsWith("language:"))return L.replace("language:","language-");if(L.includes(".")){const se=L.split(".");return[`${Y}${se.shift()}`,...se.map(($e,Ye)=>`${$e}${"_".repeat(Ye+1)}`)].join(" ")}return`${Y}${L}`};class u{constructor(Y,se){this.buffer="",this.classPrefix=se.classPrefix,Y.walk(this)}addText(Y){this.buffer+=r(Y)}openNode(Y){if(!o(Y))return;const se=i(Y.scope,{prefix:this.classPrefix});this.span(se)}closeNode(Y){o(Y)&&(this.buffer+=s)}value(){return this.buffer}span(Y){this.buffer+=`<span class="${Y}">`}}const a=(L={})=>{const Y={children:[]};return Object.assign(Y,L),Y};class f{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Y){this.top.children.push(Y)}openNode(Y){const se=a({scope:Y});this.add(se),this.stack.push(se)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Y){return this.constructor._walk(Y,this.rootNode)}static _walk(Y,se){return typeof se=="string"?Y.addText(se):se.children&&(Y.openNode(se),se.children.forEach($e=>this._walk(Y,$e)),Y.closeNode(se)),Y}static _collapse(Y){typeof Y!="string"&&Y.children&&(Y.children.every(se=>typeof se=="string")?Y.children=[Y.children.join("")]:Y.children.forEach(se=>{f._collapse(se)}))}}class l extends f{constructor(Y){super(),this.options=Y}addText(Y){Y!==""&&this.add(Y)}startScope(Y){this.openNode(Y)}endScope(){this.closeNode()}__addSublanguage(Y,se){const $e=Y.root;se&&($e.scope=`language:${se}`),this.add($e)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(L){return L?typeof L=="string"?L:L.source:null}function w(L){return E("(?=",L,")")}function P(L){return E("(?:",L,")*")}function $(L){return E("(?:",L,")?")}function E(...L){return L.map(se=>d(se)).join("")}function m(L){const Y=L[L.length-1];return typeof Y=="object"&&Y.constructor===Object?(L.splice(L.length-1,1),Y):{}}function c(...L){return"("+(m(L).capture?"":"?:")+L.map($e=>d($e)).join("|")+")"}function _(L){return new RegExp(L.toString()+"|").exec("").length-1}function p(L,Y){const se=L&&L.exec(Y);return se&&se.index===0}const v=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function b(L,{joinWith:Y}){let se=0;return L.map($e=>{se+=1;const Ye=se;let tt=d($e),he="";for(;tt.length>0;){const ue=v.exec(tt);if(!ue){he+=tt;break}he+=tt.substring(0,ue.index),tt=tt.substring(ue.index+ue[0].length),ue[0][0]==="\\"&&ue[1]?he+="\\"+String(Number(ue[1])+Ye):(he+=ue[0],ue[0]==="("&&se++)}return he}).map($e=>`(${$e})`).join(Y)}const g=/\b\B/,h="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",O="\\b\\d+(\\.\\d+)?",A="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",D="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",X=(L={})=>{const Y=/^#![ ]*\//;return L.binary&&(L.begin=E(Y,/.*\b/,L.binary,/\b.*/)),n({scope:"meta",begin:Y,end:/$/,relevance:0,"on:begin":(se,$e)=>{se.index!==0&&$e.ignoreMatch()}},L)},G={begin:"\\\\[\\s\\S]",relevance:0},Z={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[G]},ce={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[G]},ye={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Re=function(L,Y,se={}){const $e=n({scope:"comment",begin:L,end:Y,contains:[]},se);$e.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ye=c("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return $e.contains.push({begin:E(/[ ]+/,"(",Ye,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),$e},ie=Re("//","$"),z=Re("/\\*","\\*/"),T=Re("#","$"),U={scope:"number",begin:O,relevance:0},I={scope:"number",begin:A,relevance:0},y={scope:"number",begin:D,relevance:0},k={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[G,{begin:/\[/,end:/\]/,relevance:0,contains:[G]}]},C={scope:"title",begin:h,relevance:0},H={scope:"title",begin:S,relevance:0},x={begin:"\\.\\s*"+S,relevance:0};var ne=Object.freeze({__proto__:null,APOS_STRING_MODE:Z,BACKSLASH_ESCAPE:G,BINARY_NUMBER_MODE:y,BINARY_NUMBER_RE:D,COMMENT:Re,C_BLOCK_COMMENT_MODE:z,C_LINE_COMMENT_MODE:ie,C_NUMBER_MODE:I,C_NUMBER_RE:A,END_SAME_AS_BEGIN:function(L){return Object.assign(L,{"on:begin":(Y,se)=>{se.data._beginMatch=Y[1]},"on:end":(Y,se)=>{se.data._beginMatch!==Y[1]&&se.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:h,MATCH_NOTHING_RE:g,METHOD_GUARD:x,NUMBER_MODE:U,NUMBER_RE:O,PHRASAL_WORDS_MODE:ye,QUOTE_STRING_MODE:ce,REGEXP_MODE:k,RE_STARTERS_RE:q,SHEBANG:X,TITLE_MODE:C,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:H});function ve(L,Y){L.input[L.index-1]==="."&&Y.ignoreMatch()}function N(L,Y){L.className!==void 0&&(L.scope=L.className,delete L.className)}function R(L,Y){Y&&L.beginKeywords&&(L.begin="\\b("+L.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",L.__beforeBegin=ve,L.keywords=L.keywords||L.beginKeywords,delete L.beginKeywords,L.relevance===void 0&&(L.relevance=0))}function V(L,Y){Array.isArray(L.illegal)&&(L.illegal=c(...L.illegal))}function B(L,Y){if(L.match){if(L.begin||L.end)throw new Error("begin & end are not supported with match");L.begin=L.match,delete L.match}}function Q(L,Y){L.relevance===void 0&&(L.relevance=1)}const re=(L,Y)=>{if(!L.beforeMatch)return;if(L.starts)throw new Error("beforeMatch cannot be used with starts");const se=Object.assign({},L);Object.keys(L).forEach($e=>{delete L[$e]}),L.keywords=se.keywords,L.begin=E(se.beforeMatch,w(se.begin)),L.starts={relevance:0,contains:[Object.assign(se,{endsParent:!0})]},L.relevance=0,delete se.beforeMatch},be=["of","and","for","in","not","or","if","then","parent","list","value"],Ve="keyword";function Te(L,Y,se=Ve){const $e=Object.create(null);return typeof L=="string"?Ye(se,L.split(" ")):Array.isArray(L)?Ye(se,L):Object.keys(L).forEach(function(tt){Object.assign($e,Te(L[tt],Y,tt))}),$e;function Ye(tt,he){Y&&(he=he.map(ue=>ue.toLowerCase())),he.forEach(function(ue){const we=ue.split("|");$e[we[0]]=[tt,je(we[0],we[1])]})}}function je(L,Y){return Y?Number(Y):_e(L)?0:1}function _e(L){return be.includes(L.toLowerCase())}const xe={},Ie=L=>{console.error(L)},yt=(L,...Y)=>{console.log(`WARN: ${L}`,...Y)},st=(L,Y)=>{xe[`${L}/${Y}`]||(console.log(`Deprecated as of ${L}. ${Y}`),xe[`${L}/${Y}`]=!0)},mt=new Error;function Et(L,Y,{key:se}){let $e=0;const Ye=L[se],tt={},he={};for(let ue=1;ue<=Y.length;ue++)he[ue+$e]=Ye[ue],tt[ue+$e]=!0,$e+=_(Y[ue-1]);L[se]=he,L[se]._emit=tt,L[se]._multi=!0}function ct(L){if(Array.isArray(L.begin)){if(L.skip||L.excludeBegin||L.returnBegin)throw Ie("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),mt;if(typeof L.beginScope!="object"||L.beginScope===null)throw Ie("beginScope must be object"),mt;Et(L,L.begin,{key:"beginScope"}),L.begin=b(L.begin,{joinWith:""})}}function $t(L){if(Array.isArray(L.end)){if(L.skip||L.excludeEnd||L.returnEnd)throw Ie("skip, excludeEnd, returnEnd not compatible with endScope: {}"),mt;if(typeof L.endScope!="object"||L.endScope===null)throw Ie("endScope must be object"),mt;Et(L,L.end,{key:"endScope"}),L.end=b(L.end,{joinWith:""})}}function ir(L){L.scope&&typeof L.scope=="object"&&L.scope!==null&&(L.beginScope=L.scope,delete L.scope)}function ar(L){ir(L),typeof L.beginScope=="string"&&(L.beginScope={_wrap:L.beginScope}),typeof L.endScope=="string"&&(L.endScope={_wrap:L.endScope}),ct(L),$t(L)}function zt(L){function Y(he,ue){return new RegExp(d(he),"m"+(L.case_insensitive?"i":"")+(L.unicodeRegex?"u":"")+(ue?"g":""))}class se{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ue,we){we.position=this.position++,this.matchIndexes[this.matchAt]=we,this.regexes.push([we,ue]),this.matchAt+=_(ue)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ue=this.regexes.map(we=>we[1]);this.matcherRe=Y(b(ue,{joinWith:"|"}),!0),this.lastIndex=0}exec(ue){this.matcherRe.lastIndex=this.lastIndex;const we=this.matcherRe.exec(ue);if(!we)return null;const ut=we.findIndex((j,F)=>F>0&&j!==void 0),M=this.matchIndexes[ut];return we.splice(0,ut),Object.assign(we,M)}}class $e{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ue){if(this.multiRegexes[ue])return this.multiRegexes[ue];const we=new se;return this.rules.slice(ue).forEach(([ut,M])=>we.addRule(ut,M)),we.compile(),this.multiRegexes[ue]=we,we}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ue,we){this.rules.push([ue,we]),we.type==="begin"&&this.count++}exec(ue){const we=this.getMatcher(this.regexIndex);we.lastIndex=this.lastIndex;let ut=we.exec(ue);if(this.resumingScanAtSamePosition()&&!(ut&&ut.index===this.lastIndex)){const M=this.getMatcher(0);M.lastIndex=this.lastIndex+1,ut=M.exec(ue)}return ut&&(this.regexIndex+=ut.position+1,this.regexIndex===this.count&&this.considerAll()),ut}}function Ye(he){const ue=new $e;return he.contains.forEach(we=>ue.addRule(we.begin,{rule:we,type:"begin"})),he.terminatorEnd&&ue.addRule(he.terminatorEnd,{type:"end"}),he.illegal&&ue.addRule(he.illegal,{type:"illegal"}),ue}function tt(he,ue){const we=he;if(he.isCompiled)return we;[N,B,ar,re].forEach(M=>M(he,ue)),L.compilerExtensions.forEach(M=>M(he,ue)),he.__beforeBegin=null,[R,V,Q].forEach(M=>M(he,ue)),he.isCompiled=!0;let ut=null;return typeof he.keywords=="object"&&he.keywords.$pattern&&(he.keywords=Object.assign({},he.keywords),ut=he.keywords.$pattern,delete he.keywords.$pattern),ut=ut||/\w+/,he.keywords&&(he.keywords=Te(he.keywords,L.case_insensitive)),we.keywordPatternRe=Y(ut,!0),ue&&(he.begin||(he.begin=/\B|\b/),we.beginRe=Y(we.begin),!he.end&&!he.endsWithParent&&(he.end=/\B|\b/),he.end&&(we.endRe=Y(we.end)),we.terminatorEnd=d(we.end)||"",he.endsWithParent&&ue.terminatorEnd&&(we.terminatorEnd+=(he.end?"|":"")+ue.terminatorEnd)),he.illegal&&(we.illegalRe=Y(he.illegal)),he.contains||(he.contains=[]),he.contains=[].concat(...he.contains.map(function(M){return yn(M==="self"?he:M)})),he.contains.forEach(function(M){tt(M,we)}),he.starts&&tt(he.starts,ue),we.matcher=Ye(we),we}if(L.compilerExtensions||(L.compilerExtensions=[]),L.contains&&L.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return L.classNameAliases=n(L.classNameAliases||{}),tt(L)}function dr(L){return L?L.endsWithParent||dr(L.starts):!1}function yn(L){return L.variants&&!L.cachedVariants&&(L.cachedVariants=L.variants.map(function(Y){return n(L,{variants:null},Y)})),L.cachedVariants?L.cachedVariants:dr(L)?n(L,{starts:L.starts?n(L.starts):null}):Object.isFrozen(L)?n(L):L}var kr="11.11.1";class St extends Error{constructor(Y,se){super(Y),this.name="HTMLInjectionError",this.html=se}}const hr=r,Or=n,Nr=Symbol("nomatch"),_n=7,Tr=function(L){const Y=Object.create(null),se=Object.create(null),$e=[];let Ye=!0;const tt="Could not find the language '{}', did you forget to load/include a language module?",he={disableAutodetect:!0,name:"Plain text",contains:[]};let ue={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:l};function we(ee){return ue.noHighlightRe.test(ee)}function ut(ee){let fe=ee.className+" ";fe+=ee.parentNode?ee.parentNode.className:"";const Se=ue.languageDetectRe.exec(fe);if(Se){const qe=Ue(Se[1]);return qe||(yt(tt.replace("{}",Se[1])),yt("Falling back to no-highlight mode for this block.",ee)),qe?Se[1]:"no-highlight"}return fe.split(/\s+/).find(qe=>we(qe)||Ue(qe))}function M(ee,fe,Se){let qe="",Ze="";typeof fe=="object"?(qe=ee,Se=fe.ignoreIllegals,Ze=fe.language):(st("10.7.0","highlight(lang, code, ...args) has been deprecated."),st("10.7.0",`Please use highlight(code, options) instead.
|
|
5
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),
|
|
6
|
-
`,1;if(
|
|
1
|
+
var Ta=Object.defineProperty;var Ra=(t,e,r)=>e in t?Ta(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Ye=(t,e,r)=>Ra(t,typeof e!="symbol"?e+"":e,r);import{N as qr,S as ss,Y as cr,E as lt,aG as or,T as xr,g as te,j as Ia,V as Ca,W as Aa,X as Ts,Z as sr,P as rr,ao as is,aU as ja,az as Rs,C as Lr,aW as Wt,O as Er,R as Ma,a3 as Is,$ as mi,aS as as,aX as gi,aY as Da,aZ as qa,a_ as La,K as vi,M as yi,a$ as kn,aO as Hr,aR as Va,L as Kr,J as _i,b0 as wi,b1 as Ua,t as nt,a2 as Fa,b2 as za,aV as Ba,aP as xa,U as Ha,b3 as Ka,b4 as bi,aj as os,b5 as Ga,H as Wa,I as Ja,B as Qa,G as Xa,b6 as Ya,b7 as Za,b8 as eo,b9 as to,ba as ro,bb as no,bc as so,bd as io,be as ao,w as lr,a1 as oo,p as Ut,c as Oe,d as de,r as le,n as $i,b as Ft,u as Ge,s as Dt,f as wt,e as ht,bf as co,bg as uo,bh as lo,bi as fo,y as On,h as ho,a as Nn,al as po}from"./k-cRz8DS.js";import{B as mo,a as go,s as vo,i as ot,l as Gr,p as nr,d as yo,_ as _o}from"./Dn5i8FcP.js";import{b as Cs,e as wo,i as bo,g as $o,d as an,n as Eo,j as So,f as Be,a as Ne,s as We,c as Gt,k as As,r as js,t as Po}from"./BrzeKAzG.js";import{i as Ei}from"./BJctjvPM.js";function Si(t,e){return e}function ko(t,e,r){for(var n=[],s=e.length,o,i=e.length,l=0;l<s;l++){let d=e[l];yi(d,()=>{if(o){if(o.pending.delete(d),o.done.add(d),o.pending.size===0){var w=t.outrogroups;Gn(as(o.done)),w.delete(o),w.size===0&&(t.outrogroups=null)}}else i-=1},!1)}if(i===0){var a=n.length===0&&r!==null;if(a){var f=r,u=f.parentNode;Va(u),u.append(f),t.items.clear()}Gn(e,!a)}else o={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(o)}function Gn(t,e=!0){for(var r=0;r<t.length;r++)Kr(t[r],e)}var Ms;function Wn(t,e,r,n,s,o=null){var i=t,l=new Map,a=(e&wi)!==0;if(a){var f=t;i=lt?cr(or(f)):f.appendChild(qr())}lt&&xr();var u=null,d=Ia(()=>{var c=r();return gi(c)?c:c==null?[]:as(c)}),w,P=!0;function $(){m.fallback=u,Oo(m,w,i,e,n),u!==null&&(w.length===0?(u.f&Wt)===0?vi(u):(u.f^=Wt,yr(u,null,i)):yi(u,()=>{u=null}))}var E=ss(()=>{w=te(d);var c=w.length;let _=!1;if(lt){var p=Ca(i)===Aa;p!==(c===0)&&(i=Ts(),cr(i),sr(!1),_=!0)}for(var v=new Set,b=Lr,g=Ma(),h=0;h<c;h+=1){lt&&rr.nodeType===is&&rr.data===ja&&(i=rr,_=!0,sr(!1));var S=w[h],O=n(S,h),C=P?null:l.get(O);C?(C.v&&Rs(C.v,S),C.i&&Rs(C.i,h),g&&b.skipped_effects.delete(C.e)):(C=No(l,P?i:Ms??(Ms=qr()),S,O,h,s,e,r),P||(C.e.f|=Wt),l.set(O,C)),v.add(O)}if(c===0&&o&&!u&&(P?u=Er(()=>o(i)):(u=Er(()=>o(Ms??(Ms=qr()))),u.f|=Wt)),lt&&c>0&&cr(Ts()),!P)if(g){for(const[D,q]of l)v.has(D)||b.skipped_effects.add(q.e);b.oncommit($),b.ondiscard(()=>{})}else $();_&&sr(!0),te(d)}),m={effect:E,items:l,outrogroups:null,fallback:u};P=!1,lt&&(i=rr)}function Oo(t,e,r,n,s){var C,D,q,X,G,Z,ce,ye,Re;var o=(n&Ua)!==0,i=e.length,l=t.items,a=t.effect.first,f,u=null,d,w=[],P=[],$,E,m,c;if(o)for(c=0;c<i;c+=1)$=e[c],E=s($,c),m=l.get(E).e,(m.f&Wt)===0&&((D=(C=m.nodes)==null?void 0:C.a)==null||D.measure(),(d??(d=new Set)).add(m));for(c=0;c<i;c+=1){if($=e[c],E=s($,c),m=l.get(E).e,t.outrogroups!==null)for(const ie of t.outrogroups)ie.pending.delete(m),ie.done.delete(m);if((m.f&Wt)!==0)if(m.f^=Wt,m===a)yr(m,null,r);else{var _=u?u.next:a;m===t.effect.last&&(t.effect.last=m.prev),m.prev&&(m.prev.next=m.next),m.next&&(m.next.prev=m.prev),Xt(t,u,m),Xt(t,m,_),yr(m,_,r),u=m,w=[],P=[],a=u.next;continue}if((m.f&kn)!==0&&(vi(m),o&&((X=(q=m.nodes)==null?void 0:q.a)==null||X.unfix(),(d??(d=new Set)).delete(m))),m!==a){if(f!==void 0&&f.has(m)){if(w.length<P.length){var p=P[0],v;u=p.prev;var b=w[0],g=w[w.length-1];for(v=0;v<w.length;v+=1)yr(w[v],p,r);for(v=0;v<P.length;v+=1)f.delete(P[v]);Xt(t,b.prev,g.next),Xt(t,u,b),Xt(t,g,p),a=p,u=g,c-=1,w=[],P=[]}else f.delete(m),yr(m,a,r),Xt(t,m.prev,m.next),Xt(t,m,u===null?t.effect.first:u.next),Xt(t,u,m),u=m;continue}for(w=[],P=[];a!==null&&a!==m;)(f??(f=new Set)).add(a),P.push(a),a=a.next;if(a===null)continue}(m.f&Wt)===0&&w.push(m),u=m,a=m.next}if(t.outrogroups!==null){for(const ie of t.outrogroups)ie.pending.size===0&&(Gn(as(ie.done)),(G=t.outrogroups)==null||G.delete(ie));t.outrogroups.size===0&&(t.outrogroups=null)}if(a!==null||f!==void 0){var h=[];if(f!==void 0)for(m of f)(m.f&kn)===0&&h.push(m);for(;a!==null;)(a.f&kn)===0&&a!==t.fallback&&h.push(a),a=a.next;var S=h.length;if(S>0){var O=(n&wi)!==0&&i===0?r:null;if(o){for(c=0;c<S;c+=1)(ce=(Z=h[c].nodes)==null?void 0:Z.a)==null||ce.measure();for(c=0;c<S;c+=1)(Re=(ye=h[c].nodes)==null?void 0:ye.a)==null||Re.fix()}ko(t,h,O)}}o&&_i(()=>{var ie,z;if(d!==void 0)for(m of d)(z=(ie=m.nodes)==null?void 0:ie.a)==null||z.apply()})}function No(t,e,r,n,s,o,i,l){var a=(i&Da)!==0?(i&qa)===0?mi(r,!1,!1):Is(r):null,f=(i&La)!==0?Is(s):null;return{v:a,i:f,e:Er(()=>(o(e,a??r,f??s,l),()=>{t.delete(n)}))}}function yr(t,e,r){if(t.nodes)for(var n=t.nodes.start,s=t.nodes.end,o=e&&(e.f&Wt)===0?e.nodes.start:r;n!==null;){var i=Hr(n);if(o.before(n),n===s)return;n=i}}function Xt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function To(t,e,r=!1,n=!1,s=!1){var o=t,i="";nt(()=>{var l=Fa;if(i===(i=e()??"")){lt&&xr();return}if(l.nodes!==null&&(za(l.nodes.start,l.nodes.end),l.nodes=null),i!==""){if(lt){rr.data;for(var a=xr(),f=a;a!==null&&(a.nodeType!==is||a.data!=="");)f=a,a=Hr(a);if(a===null)throw Ba(),xa;Cs(rr,f),o=cr(a);return}var u=i+"";r?u=`<svg>${u}</svg>`:n&&(u=`<math>${u}</math>`);var d=wo(u);if((r||n)&&(d=or(d)),Cs(or(d),d.lastChild),r||n)for(;or(d);)o.before(or(d));else o.before(d)}})}function Ro(t,e,r,n,s){var l;lt&&xr();var o=(l=e.$$slots)==null?void 0:l[r],i=!1;o===!0&&(o=e.children,i=!0),o===void 0?s!==null&&s(t):o(t,i?()=>n:n)}function Wd(t,e,...r){var n=new mo(t);ss(()=>{const s=e()??null;n.ensure(s,s&&(o=>s(o,...r)))},Ha)}function Io(t,e){let r=null,n=lt;var s;if(lt){r=rr;for(var o=or(document.head);o!==null&&(o.nodeType!==is||o.data!==t);)o=Hr(o);if(o===null)sr(!1);else{var i=Hr(o);o.remove(),cr(i)}}lt||(s=document.head.appendChild(qr()));try{ss(()=>e(s),Ka)}finally{n&&(sr(!0),cr(r))}}function Co(t,e){var r=void 0,n;bi(()=>{r!==(r=e())&&(n&&(Kr(n),n=null),r&&(n=Er(()=>{os(()=>r(t))})))})}function Pi(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(r=Pi(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Ao(){for(var t,e,r=0,n="",s=arguments.length;r<s;r++)(t=arguments[r])&&(e=Pi(t))&&(n&&(n+=" "),n+=e);return n}function jo(t){return typeof t=="object"?Ao(t):t??""}const Ds=[...`
|
|
2
|
+
\r\f \v\uFEFF`];function Mo(t,e,r){var n=t==null?"":""+t;if(e&&(n=n?n+" "+e:e),r){for(var s in r)if(r[s])n=n?n+" "+s:s;else if(n.length)for(var o=s.length,i=0;(i=n.indexOf(s,i))>=0;){var l=i+o;(i===0||Ds.includes(n[i-1]))&&(l===n.length||Ds.includes(n[l]))?n=(i===0?"":n.substring(0,i))+n.substring(l+1):i=l}}return n===""?null:n}function qs(t,e=!1){var r=e?" !important;":";",n="";for(var s in t){var o=t[s];o!=null&&o!==""&&(n+=" "+s+": "+o+r)}return n}function Tn(t){return t[0]!=="-"||t[1]!=="-"?t.toLowerCase():t}function Do(t,e){if(e){var r="",n,s;if(Array.isArray(e)?(n=e[0],s=e[1]):n=e,t){t=String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,i=0,l=!1,a=[];n&&a.push(...Object.keys(n).map(Tn)),s&&a.push(...Object.keys(s).map(Tn));var f=0,u=-1;const E=t.length;for(var d=0;d<E;d++){var w=t[d];if(l?w==="/"&&t[d-1]==="*"&&(l=!1):o?o===w&&(o=!1):w==="/"&&t[d+1]==="*"?l=!0:w==='"'||w==="'"?o=w:w==="("?i++:w===")"&&i--,!l&&o===!1&&i===0){if(w===":"&&u===-1)u=d;else if(w===";"||d===E-1){if(u!==-1){var P=Tn(t.substring(f,u).trim());if(!a.includes(P)){w!==";"&&d++;var $=t.substring(f,d).trim();r+=" "+$+";"}}f=d+1,u=-1}}}}return n&&(r+=qs(n)),s&&(r+=qs(s,!0)),r=r.trim(),r===""?null:r}return t==null?null:String(t)}function ur(t,e,r,n,s,o){var i=t.__className;if(lt||i!==r||i===void 0){var l=Mo(r,n,o);(!lt||l!==t.getAttribute("class"))&&(l==null?t.removeAttribute("class"):e?t.className=l:t.setAttribute("class",l)),t.__className=r}else if(o&&s!==o)for(var a in o){var f=!!o[a];(s==null||f!==!!s[a])&&t.classList.toggle(a,f)}return o}function Rn(t,e={},r,n){for(var s in r){var o=r[s];e[s]!==o&&(r[s]==null?t.style.removeProperty(s):t.style.setProperty(s,o,n))}}function qo(t,e,r,n){var s=t.__style;if(lt||s!==e){var o=Do(e,n);(!lt||o!==t.getAttribute("style"))&&(o==null?t.removeAttribute("style"):t.style.cssText=o),t.__style=e}else n&&(Array.isArray(n)?(Rn(t,r==null?void 0:r[0],n[0]),Rn(t,r==null?void 0:r[1],n[1],"important")):Rn(t,r,n));return n}function Wr(t,e,r=!1){if(t.multiple){if(e==null)return;if(!gi(e))return Ga();for(var n of t.options)n.selected=e.includes($r(n));return}for(n of t.options){var s=$r(n);if(Wa(s,e)){n.selected=!0;return}}(!r||e!==void 0)&&(t.selectedIndex=-1)}function ki(t){var e=new MutationObserver(()=>{Wr(t,t.__value)});e.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Ja(()=>{e.disconnect()})}function Jd(t,e,r=e){var n=new WeakSet,s=!0;Qa(t,"change",o=>{var i=o?"[selected]":":checked",l;if(t.multiple)l=[].map.call(t.querySelectorAll(i),$r);else{var a=t.querySelector(i)??t.querySelector("option:not([disabled])");l=a&&$r(a)}r(l),Lr!==null&&n.add(Lr)}),os(()=>{var o=e();if(t===document.activeElement){var i=Xa??Lr;if(n.has(i))return}if(Wr(t,o,s),s&&o===void 0){var l=t.querySelector(":checked");l!==null&&(o=$r(l),r(o))}t.__value=o,s=!1}),ki(t)}function $r(t){return"__value"in t?t.__value:t.value}const _r=Symbol("class"),gr=Symbol("style"),Oi=Symbol("is custom element"),Ni=Symbol("is html");function Lo(t){if(lt){var e=!1,r=()=>{if(!e){if(e=!0,t.hasAttribute("value")){var n=t.value;It(t,"value",null),t.value=n}if(t.hasAttribute("checked")){var s=t.checked;It(t,"checked",null),t.checked=s}}};t.__on_r=r,_i(r),ro()}}function Vo(t,e){e?t.hasAttribute("selected")||t.setAttribute("selected",""):t.removeAttribute("selected")}function It(t,e,r,n){var s=Ti(t);lt&&(s[e]=t.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&t.nodeName==="LINK")||s[e]!==(s[e]=r)&&(e==="loading"&&(t[io]=r),r==null?t.removeAttribute(e):typeof r!="string"&&Ri(t).includes(e)?t[e]=r:t.setAttribute(e,r))}function Uo(t,e,r,n,s=!1,o=!1){if(lt&&s&&t.tagName==="INPUT"){var i=t,l=i.type==="checkbox"?"defaultChecked":"defaultValue";l in r||Lo(i)}var a=Ti(t),f=a[Oi],u=!a[Ni];let d=lt&&f;d&&sr(!1);var w=e||{},P=t.tagName==="OPTION";for(var $ in e)$ in r||(r[$]=null);r.class?r.class=jo(r.class):r.class=null,r[gr]&&(r.style??(r.style=null));var E=Ri(t);for(const g in r){let h=r[g];if(P&&g==="value"&&h==null){t.value=t.__value="",w[g]=h;continue}if(g==="class"){var m=t.namespaceURI==="http://www.w3.org/1999/xhtml";ur(t,m,h,n,e==null?void 0:e[_r],r[_r]),w[g]=h,w[_r]=r[_r];continue}if(g==="style"){qo(t,h,e==null?void 0:e[gr],r[gr]),w[g]=h,w[gr]=r[gr];continue}var c=w[g];if(!(h===c&&!(h===void 0&&t.hasAttribute(g)))){w[g]=h;var _=g[0]+g[1];if(_!=="$$")if(_==="on"){const S={},O="$$"+g;let C=g.slice(2);var p=So(C);if(bo(C)&&(C=C.slice(0,-7),S.capture=!0),!p&&c){if(h!=null)continue;t.removeEventListener(C,w[O],S),w[O]=null}if(h!=null)if(p)t[`__${C}`]=h,an([C]);else{let D=function(q){w[g].call(this,q)};w[O]=$o(C,t,D,S)}else p&&(t[`__${C}`]=void 0)}else if(g==="style")It(t,g,h);else if(g==="autofocus")eo(t,!!h);else if(!f&&(g==="__value"||g==="value"&&h!=null))t.value=t.__value=h;else if(g==="selected"&&P)Vo(t,h);else{var v=g;u||(v=Eo(v));var b=v==="defaultValue"||v==="defaultChecked";if(h==null&&!f&&!b)if(a[g]=null,v==="value"||v==="checked"){let S=t;const O=e===void 0;if(v==="value"){let C=S.defaultValue;S.removeAttribute(v),S.defaultValue=C,S.value=S.__value=O?C:null}else{let C=S.defaultChecked;S.removeAttribute(v),S.defaultChecked=C,S.checked=O?C:!1}}else t.removeAttribute(g);else b||E.includes(v)&&(f||typeof h!="string")?(t[v]=h,v in a&&(a[v]=to)):typeof h!="function"&&It(t,v,h)}}}return d&&sr(!0),w}function Fo(t,e,r=[],n=[],s=[],o,i=!1,l=!1){Ya(s,r,n,a=>{var f=void 0,u={},d=t.nodeName==="SELECT",w=!1;if(bi(()=>{var $=e(...a.map(te)),E=Uo(t,f,$,o,i,l);w&&d&&"value"in $&&Wr(t,$.value);for(let c of Object.getOwnPropertySymbols(u))$[c]||Kr(u[c]);for(let c of Object.getOwnPropertySymbols($)){var m=$[c];c.description===Za&&(!f||m!==f[c])&&(u[c]&&Kr(u[c]),u[c]=Er(()=>Co(t,()=>m))),E[c]=m}f=E}),d){var P=t;os(()=>{Wr(P,f.value,!0),ki(P)})}w=!0})}function Ti(t){return t.__attributes??(t.__attributes={[Oi]:t.nodeName.includes("-"),[Ni]:t.namespaceURI===no})}var Ls=new Map;function Ri(t){var e=t.getAttribute("is")||t.nodeName,r=Ls.get(e);if(r)return r;Ls.set(e,r=[]);for(var n,s=t,o=Element.prototype;o!==s;){n=ao(s);for(var i in n)n[i].set&&r.push(i);s=so(s)}return r}const Jn=lr([]),Cr=new Map;function Ii(t,e=!1){var r,n,s;if(console.log("displayMessage called:",{type:t.type,platform:Qr(t["@context"]),isResponse:e,actor:t.actor,content:(r=t.object)==null?void 0:r.content}),t.type==="send"&&((n=t.object)==null?void 0:n.type)==="message"){const o=typeof t.actor=="string"?t.actor:((s=t.actor)==null?void 0:s.name)||"",i=t.object.content||"",l=`${o}:${i}`,a=Date.now(),f=Cr.get(l);if(f&&a-f<2e3){console.log("Skipping duplicate message:",l);return}Cr.set(l,a);for(const[u,d]of Cr)a-d>5e3&&Cr.delete(u);Jn.set([...oo(Jn),[o,i]]),console.log("Message displayed:",{actorName:o,content:i,isResponse:e,platform:Qr(t["@context"])})}}var zo=Be("<li> </li>"),Bo=Be('<div><label for="incomingMessagesContainer" class="text-gray-900 font-bold">Incoming Messages</label> <div id="incomingMessagesContainer" class="incoming-messages-container w-full"><ui class="incoming-messages"></ui> <div class="incoming-messages-anchor"></div></div></div>');function Qd(t,e){Ut(e,!1);const r=()=>go(Jn,"$messages",n),[n,s]=vo();Ei();var o=Bo(),i=Oe(de(o),2),l=de(i);Wn(l,5,r,Si,(a,f)=>{var u=zo(),d=de(u);le(u),nt(()=>We(d,`${te(f)[0]??""}: ${te(f)[1]??""}`)),Ne(a,u)}),le(l),$i(2),le(i),le(o),Ne(t,o),Ft(),s()}function xo(t,e,r){var s,o,i;const n=((s=e[r])==null?void 0:s.requestId)??r;return{sent:(o=t[n])==null?void 0:o[0],response:(i=t[r])==null?void 0:i[1]}}function Ho(t){return typeof t=="object"&&t!==null&&t.type==="page"}var Ko=Be('<video class="w-full max-h-80 bg-black" controls preload="metadata"></video>',2),Go=Be('<img class="w-full max-h-80 object-cover bg-gray-100"/>'),Wo=Be('<div class="w-full h-24 bg-gray-100 flex items-center justify-center text-gray-400 text-sm">No preview image</div>'),Jo=Be('<img class="w-4 h-4" alt=""/>'),Qo=Be('<h4 class="font-semibold text-gray-900 whitespace-pre-line"> </h4>'),Xo=Be('<p class="text-sm text-gray-600 whitespace-pre-line line-clamp-6"> </p>'),Yo=Be('<a class="block text-xs text-indigo-600 hover:text-indigo-800 truncate" target="_blank" rel="noopener noreferrer"> </a>'),Zo=Be('<div class="bg-white border border-gray-200 rounded-xl shadow-sm overflow-hidden max-w-xl"><!> <div class="p-4 space-y-1"><div class="flex items-center space-x-2 text-xs text-gray-500 uppercase tracking-wide"><!> <span> </span></div> <!> <!> <!></div></div>');function ec(t,e){Ut(e,!0);const r=Ge(()=>{if(e.page.favicon)try{return new URL(e.page.favicon,e.page.url).href}catch{return}}),n=Ge(()=>{var C;return(C=e.page.image)==null?void 0:C[0]}),s=Ge(()=>{var C,D;return((C=e.page.video)==null?void 0:C.thumbnail)??((D=te(n))==null?void 0:D.url)}),o=Ge(()=>{if(!e.page.url)return"";try{return new URL(e.page.url).hostname}catch{return e.page.url}});let i=Dt(void 0),l=Dt(void 0);const a=Ge(()=>te(r)!==void 0&&te(i)===te(r)),f=Ge(()=>te(n)!==void 0&&te(l)===te(n).url);var u=Zo(),d=de(u);{var w=C=>{var D=Ko();nt(()=>{It(D,"src",e.page.video.url),It(D,"poster",te(s))}),Ne(C,D)},P=C=>{var D=Gt(),q=wt(D);{var X=Z=>{var ce=Go();nt(()=>{It(ce,"src",te(n).url),It(ce,"alt",te(n).alt??e.page.title??"")}),As("error",ce,()=>{var ye;return ht(l,(ye=te(n))==null?void 0:ye.url,!0)}),js(ce),Ne(Z,ce)},G=Z=>{var ce=Wo();Ne(Z,ce)};ot(q,Z=>{te(n)&&!te(f)?Z(X):Z(G,!1)},!0)}Ne(C,D)};ot(d,C=>{var D;(D=e.page.video)!=null&&D.url?C(w):C(P,!1)})}var $=Oe(d,2),E=de($),m=de(E);{var c=C=>{var D=Jo();nt(()=>It(D,"src",te(r))),As("error",D,()=>ht(i,te(r),!0)),js(D),Ne(C,D)};ot(m,C=>{te(r)&&!te(a)&&C(c)})}var _=Oe(m,2),p=de(_,!0);le(_),le(E);var v=Oe(E,2);{var b=C=>{var D=Qo(),q=de(D,!0);le(D),nt(()=>We(q,e.page.title)),Ne(C,D)};ot(v,C=>{e.page.title&&C(b)})}var g=Oe(v,2);{var h=C=>{var D=Xo(),q=de(D,!0);le(D),nt(()=>We(q,e.page.description)),Ne(C,D)};ot(g,C=>{e.page.description&&C(h)})}var S=Oe(g,2);{var O=C=>{var D=Yo(),q=de(D,!0);le(D),nt(()=>{It(D,"href",e.page.url),We(q,e.page.url)}),Ne(C,D)};ot(S,C=>{e.page.url&&C(O)})}le($),le(u),nt(()=>We(p,e.page.name||te(o))),Ne(t,u),Ft()}var tc=Be("<span> </span>");function cs(t,e){Ut(e,!0);const r=Ge(()=>Qr(e.entry["@context"]));var n=tc(),s=de(n);le(n),nt(()=>We(s,`[${te(r)??"unknown"??""}:${e.entry.type??""}]`)),Ne(t,n),Ft()}var rc=Be("<!> <span> </span> <span> </span>",1);function nc(t,e){Ut(e,!0);var r=rc(),n=wt(r);cs(n,{get entry(){return e.entry}});var s=Oe(n,2),o=de(s);le(s);var i=Oe(s,2),l=de(i,!0);le(i),nt(()=>{var a,f,u;We(o,`#${e.id??""}
|
|
3
|
+
${(typeof e.entry.actor=="string"?e.entry.actor:((a=e.entry.actor)==null?void 0:a.name)||((f=e.entry.actor)==null?void 0:f.id))??""}:`),We(l,((u=e.entry.object)==null?void 0:u.content)||"")}),Ne(t,r),Ft()}var sc=Be('<span class="font-medium">📰 Fetched feed:</span> <span> </span> <span class="text-gray-500"> </span>',1),ic=Be("<span> </span>"),ac=Be('<span class="text-gray-500 text-xs italic"> </span>'),oc=Be('<span class="text-gray-500"> </span> <!> <span><a rel="noreferrer" target="_blank" class="text-blue-600 hover:text-blue-800 underline"> </a></span> <!>',1),cc=Be("<!> <!>",1);function uc(t,e){Ut(e,!0);const r=Ge(()=>e.entry.totalItems!==void 0),n=Ge(()=>{var u;return te(r)?e.entry.summary:(u=e.entry.object)==null?void 0:u.url}),s=Ge(()=>{var u,d;return typeof e.entry.actor=="string"?e.entry.actor:((u=e.entry.actor)==null?void 0:u.name)||((d=e.entry.actor)==null?void 0:d.id)});var o=cc(),i=wt(o);cs(i,{get entry(){return e.entry}});var l=Oe(i,2);{var a=u=>{var d=sc(),w=Oe(wt(d),2),P=de(w,!0);le(w);var $=Oe(w,2),E=de($);le($),nt(()=>{We(P,te(n)),We(E,`(${e.entry.totalItems??""} ${e.entry.totalItems===1?"item":"items"})`)}),Ne(u,d)},f=u=>{var d=oc(),w=wt(d),P=de(w);le(w);var $=Oe(w,2);{var E=b=>{var g=ic(),h=de(g);le(g),nt(()=>We(h,`${te(s)??""}:`)),Ne(b,g)};ot($,b=>{te(s)&&b(E)})}var m=Oe($,2),c=de(m),_=de(c,!0);le(c),le(m);var p=Oe(m,2);{var v=b=>{var g=ac(),h=de(g,!0);le(g),nt(S=>We(h,S),[()=>{var S;return(S=e.entry.object)==null?void 0:S.published.split("T")[0]}]),Ne(b,g)};ot(p,b=>{var g;(g=e.entry.object)!=null&&g.published&&b(v)})}nt(()=>{var b,g,h;We(P,`#${e.id??""}`),It(c,"href",(b=e.entry.object)==null?void 0:b.url),We(_,((g=e.entry.object)==null?void 0:g.title)||(typeof e.entry.target=="string"?e.entry.target:(h=e.entry.target)==null?void 0:h.id))}),Ne(u,d)};ot(l,u=>{te(r)?u(a):u(f,!1)})}Ne(t,o),Ft()}var lc=Be("<!> <span> </span>",1);function fc(t,e){Ut(e,!0);var r=lc(),n=wt(r);cs(n,{get entry(){return e.entry}});var s=Oe(n,2),o=de(s);le(s),nt(()=>{var i,l;return We(o,`#${e.id??""}
|
|
4
|
+
${(typeof e.entry.actor=="string"?e.entry.actor:((i=e.entry.actor)==null?void 0:i.name)||((l=e.entry.actor)==null?void 0:l.id))??""}`)}),Ne(t,r),Ft()}var dc=Be('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),hc=Be('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),pc=Be('<div class="mt-2 p-3 bg-red-50 border border-red-200 rounded-lg"><div class="flex items-center space-x-2"><svg class="w-4 h-4 text-red-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="text-red-800 font-medium text-sm">Error:</span> <span class="text-red-700 text-sm"> </span></div></div>'),mc=Be('<li class="p-4 hover:bg-gray-50 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-2"><div class="flex items-center space-x-2"><span class="text-sm font-semibold text-gray-700"> </span> <!> <!></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <div class="text-sm text-gray-600"><!></div> <!></div></div></li>');function Vs(t,e){Ut(e,!0);const r=Ge(()=>Qr(e.entry["@context"])),n=Ge(()=>e.timestamp?new Date(e.timestamp).toLocaleTimeString():""),s=Ge(()=>e.hasSend&&e.hasResponse?"Sent → Response OK":e.hasSend?"Sent → Awaiting response":""),o=Ge(()=>e.hasSend&&e.hasResponse?"bg-green-500":e.hasSend?"bg-orange-400":"bg-green-500");var i=mc(),l=de(i),a=de(l),f=de(a),u=Oe(f,2),d=de(u,!0);le(u),le(a);var w=Oe(a,2),P=de(w),$=de(P),E=de($),m=de(E,!0);le(E);var c=Oe(E,2);{var _=q=>{var X=dc(),G=de(X,!0);le(X),nt(Z=>We(G,Z),[()=>te(r).toUpperCase()]),Ne(q,X)};ot(c,q=>{te(r)&&q(_)})}var p=Oe(c,2);{var v=q=>{var X=hc(),G=de(X,!0);le(X),nt(()=>We(G,e.entry.type)),Ne(q,X)};ot(p,q=>{e.entry.type&&q(v)})}le($);var b=Oe($,2);b.__click=function(...q){var X;(X=e.buttonAction)==null||X.apply(this,q)},le(P);var g=Oe(P,2),h=de(g);{var S=q=>{nc(q,{get id(){return e.id},get entry(){return e.entry}})},O=q=>{var X=Gt(),G=wt(X);{var Z=ye=>{uc(ye,{get id(){return e.id},get entry(){return e.entry}})},ce=ye=>{fc(ye,{get id(){return e.id},get entry(){return e.entry}})};ot(G,ye=>{te(r)==="feeds"?ye(Z):ye(ce,!1)},!0)}Ne(q,X)};ot(h,q=>{te(r)==="dummy"?q(S):q(O,!1)})}le(g);var C=Oe(g,2);{var D=q=>{var X=pc(),G=de(X),Z=Oe(de(G),4),ce=de(Z,!0);le(Z),le(G),le(X),nt(()=>We(ce,e.entry.error)),Ne(q,X)};ot(C,q=>{e.entry.error&&q(D)})}le(w),le(l),le(i),nt(()=>{ur(f,1,`w-3 h-3 ${te(o)??""} rounded-full`),We(d,te(n)||`#${e.id}`),We(m,te(s))}),Ne(t,i),Ft()}an(["click"]);var gc=Be('<div class="mt-2 p-2 bg-red-50 border border-red-200 rounded-lg"><span class="text-red-700 text-xs"> </span></div>'),vc=Be('<li class="p-4 hover:bg-indigo-50/40 transition-colors"><div class="flex items-start space-x-3"><div class="flex flex-col items-center space-y-1 mt-1"><div></div> <div class="text-xs text-gray-400 font-mono"> </div></div> <div class="flex-1 min-w-0"><div class="flex items-center justify-between mb-1"><div class="flex items-center space-x-2"><span> </span></div> <button class="px-3 py-1 text-xs font-medium text-indigo-600 hover:text-indigo-800 hover:bg-indigo-50 rounded-md transition-colors flex items-center space-x-1"><svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg> <span>View Details</span></button></div> <p class="text-sm text-gray-600 truncate"> </p> <!></div></div></li>');function yc(t,e){Ut(e,!0);const r={schemas:{label:"Schemas Received",color:"text-indigo-800",bg:"bg-indigo-100"},ready:{label:"Client Ready",color:"text-emerald-800",bg:"bg-emerald-100"},init_error:{label:"Init Error",color:"text-red-800",bg:"bg-red-100"}},n=Ge(()=>r[e.entry._logType]??r.schemas);function s(h){if(!h||typeof h!="object")return"";const S=h;if(e.entry._logType==="schemas"){const C=(Array.isArray(S.platforms)?S.platforms:[]).map(q=>q==null?void 0:q.id).filter(Boolean);return`API v${typeof S.apiVersion=="number"?S.apiVersion:"unknown"} — ${C.length} platform${C.length!==1?"s":""}: ${C.join(", ")}`}if(e.entry._logType==="ready"){const O=typeof S.reason=="string"?S.reason:"",C=typeof S.apiVersion=="number"?S.apiVersion:"unknown",D=Array.isArray(S.platforms)?S.platforms.length:0;return`${O} — Sockethub API v${C}, ${D} platform${D!==1?"s":""}`}if(e.entry._logType==="init_error"){const O=typeof S.error=="string"?S.error:"unknown",C=typeof S.phase=="string"?S.phase:"",D=S.retrying?" (retrying)":"";return`${C}: ${O}${D}`}return JSON.stringify(h).slice(0,120)}const o=Ge(()=>s(e.entry.payload)),i=Ge(()=>new Date(e.entry._timestamp).toLocaleTimeString());var l=vc(),a=de(l),f=de(a),u=de(f),d=Oe(u,2),w=de(d,!0);le(d),le(f);var P=Oe(f,2),$=de(P),E=de($),m=de(E),c=de(m,!0);le(m),le(E);var _=Oe(E,2);_.__click=function(...h){var S;(S=e.buttonAction)==null||S.apply(this,h)},le($);var p=Oe($,2),v=de(p,!0);le(p);var b=Oe(p,2);{var g=h=>{var S=gc(),O=de(S),C=de(O,!0);le(O),le(S),nt(()=>{var D;return We(C,((D=e.entry.payload)==null?void 0:D.error)??"")}),Ne(h,S)};ot(b,h=>{e.entry._logType==="init_error"&&h(g)})}le(P),le(a),le(l),nt(()=>{ur(u,1,`w-3 h-3 ${e.entry._logType==="init_error"?"bg-red-500":"bg-indigo-500"} rounded-full`),We(w,te(i)),ur(m,1,`px-2 py-1 ${te(n).bg??""} ${te(n).color??""} text-xs font-semibold rounded-full`),We(c,te(n).label),We(v,te(o))}),Ne(t,l),Ft()}an(["click"]);function _c(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var In,Us;function wc(){if(Us)return In;Us=1;function t(L){return L instanceof Map?L.clear=L.delete=L.set=function(){throw new Error("map is read-only")}:L instanceof Set&&(L.add=L.clear=L.delete=function(){throw new Error("set is read-only")}),Object.freeze(L),Object.getOwnPropertyNames(L).forEach(Y=>{const se=L[Y],$e=typeof se;($e==="object"||$e==="function")&&!Object.isFrozen(se)&&t(se)}),L}class e{constructor(Y){Y.data===void 0&&(Y.data={}),this.data=Y.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function r(L){return L.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function n(L,...Y){const se=Object.create(null);for(const $e in L)se[$e]=L[$e];return Y.forEach(function($e){for(const Ze in $e)se[Ze]=$e[Ze]}),se}const s="</span>",o=L=>!!L.scope,i=(L,{prefix:Y})=>{if(L.startsWith("language:"))return L.replace("language:","language-");if(L.includes(".")){const se=L.split(".");return[`${Y}${se.shift()}`,...se.map(($e,Ze)=>`${$e}${"_".repeat(Ze+1)}`)].join(" ")}return`${Y}${L}`};class l{constructor(Y,se){this.buffer="",this.classPrefix=se.classPrefix,Y.walk(this)}addText(Y){this.buffer+=r(Y)}openNode(Y){if(!o(Y))return;const se=i(Y.scope,{prefix:this.classPrefix});this.span(se)}closeNode(Y){o(Y)&&(this.buffer+=s)}value(){return this.buffer}span(Y){this.buffer+=`<span class="${Y}">`}}const a=(L={})=>{const Y={children:[]};return Object.assign(Y,L),Y};class f{constructor(){this.rootNode=a(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(Y){this.top.children.push(Y)}openNode(Y){const se=a({scope:Y});this.add(se),this.stack.push(se)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(Y){return this.constructor._walk(Y,this.rootNode)}static _walk(Y,se){return typeof se=="string"?Y.addText(se):se.children&&(Y.openNode(se),se.children.forEach($e=>this._walk(Y,$e)),Y.closeNode(se)),Y}static _collapse(Y){typeof Y!="string"&&Y.children&&(Y.children.every(se=>typeof se=="string")?Y.children=[Y.children.join("")]:Y.children.forEach(se=>{f._collapse(se)}))}}class u extends f{constructor(Y){super(),this.options=Y}addText(Y){Y!==""&&this.add(Y)}startScope(Y){this.openNode(Y)}endScope(){this.closeNode()}__addSublanguage(Y,se){const $e=Y.root;se&&($e.scope=`language:${se}`),this.add($e)}toHTML(){return new l(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function d(L){return L?typeof L=="string"?L:L.source:null}function w(L){return E("(?=",L,")")}function P(L){return E("(?:",L,")*")}function $(L){return E("(?:",L,")?")}function E(...L){return L.map(se=>d(se)).join("")}function m(L){const Y=L[L.length-1];return typeof Y=="object"&&Y.constructor===Object?(L.splice(L.length-1,1),Y):{}}function c(...L){return"("+(m(L).capture?"":"?:")+L.map($e=>d($e)).join("|")+")"}function _(L){return new RegExp(L.toString()+"|").exec("").length-1}function p(L,Y){const se=L&&L.exec(Y);return se&&se.index===0}const v=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function b(L,{joinWith:Y}){let se=0;return L.map($e=>{se+=1;const Ze=se;let tt=d($e),he="";for(;tt.length>0;){const ue=v.exec(tt);if(!ue){he+=tt;break}he+=tt.substring(0,ue.index),tt=tt.substring(ue.index+ue[0].length),ue[0][0]==="\\"&&ue[1]?he+="\\"+String(Number(ue[1])+Ze):(he+=ue[0],ue[0]==="("&&se++)}return he}).map($e=>`(${$e})`).join(Y)}const g=/\b\B/,h="[a-zA-Z]\\w*",S="[a-zA-Z_]\\w*",O="\\b\\d+(\\.\\d+)?",C="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",D="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",X=(L={})=>{const Y=/^#![ ]*\//;return L.binary&&(L.begin=E(Y,/.*\b/,L.binary,/\b.*/)),n({scope:"meta",begin:Y,end:/$/,relevance:0,"on:begin":(se,$e)=>{se.index!==0&&$e.ignoreMatch()}},L)},G={begin:"\\\\[\\s\\S]",relevance:0},Z={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[G]},ce={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[G]},ye={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},Re=function(L,Y,se={}){const $e=n({scope:"comment",begin:L,end:Y,contains:[]},se);$e.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const Ze=c("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return $e.contains.push({begin:E(/[ ]+/,"(",Ze,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),$e},ie=Re("//","$"),z=Re("/\\*","\\*/"),T=Re("#","$"),U={scope:"number",begin:O,relevance:0},I={scope:"number",begin:C,relevance:0},y={scope:"number",begin:D,relevance:0},k={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[G,{begin:/\[/,end:/\]/,relevance:0,contains:[G]}]},A={scope:"title",begin:h,relevance:0},H={scope:"title",begin:S,relevance:0},x={begin:"\\.\\s*"+S,relevance:0};var ne=Object.freeze({__proto__:null,APOS_STRING_MODE:Z,BACKSLASH_ESCAPE:G,BINARY_NUMBER_MODE:y,BINARY_NUMBER_RE:D,COMMENT:Re,C_BLOCK_COMMENT_MODE:z,C_LINE_COMMENT_MODE:ie,C_NUMBER_MODE:I,C_NUMBER_RE:C,END_SAME_AS_BEGIN:function(L){return Object.assign(L,{"on:begin":(Y,se)=>{se.data._beginMatch=Y[1]},"on:end":(Y,se)=>{se.data._beginMatch!==Y[1]&&se.ignoreMatch()}})},HASH_COMMENT_MODE:T,IDENT_RE:h,MATCH_NOTHING_RE:g,METHOD_GUARD:x,NUMBER_MODE:U,NUMBER_RE:O,PHRASAL_WORDS_MODE:ye,QUOTE_STRING_MODE:ce,REGEXP_MODE:k,RE_STARTERS_RE:q,SHEBANG:X,TITLE_MODE:A,UNDERSCORE_IDENT_RE:S,UNDERSCORE_TITLE_MODE:H});function ve(L,Y){L.input[L.index-1]==="."&&Y.ignoreMatch()}function N(L,Y){L.className!==void 0&&(L.scope=L.className,delete L.className)}function R(L,Y){Y&&L.beginKeywords&&(L.begin="\\b("+L.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",L.__beforeBegin=ve,L.keywords=L.keywords||L.beginKeywords,delete L.beginKeywords,L.relevance===void 0&&(L.relevance=0))}function V(L,Y){Array.isArray(L.illegal)&&(L.illegal=c(...L.illegal))}function B(L,Y){if(L.match){if(L.begin||L.end)throw new Error("begin & end are not supported with match");L.begin=L.match,delete L.match}}function Q(L,Y){L.relevance===void 0&&(L.relevance=1)}const re=(L,Y)=>{if(!L.beforeMatch)return;if(L.starts)throw new Error("beforeMatch cannot be used with starts");const se=Object.assign({},L);Object.keys(L).forEach($e=>{delete L[$e]}),L.keywords=se.keywords,L.begin=E(se.beforeMatch,w(se.begin)),L.starts={relevance:0,contains:[Object.assign(se,{endsParent:!0})]},L.relevance=0,delete se.beforeMatch},be=["of","and","for","in","not","or","if","then","parent","list","value"],Ve="keyword";function Te(L,Y,se=Ve){const $e=Object.create(null);return typeof L=="string"?Ze(se,L.split(" ")):Array.isArray(L)?Ze(se,L):Object.keys(L).forEach(function(tt){Object.assign($e,Te(L[tt],Y,tt))}),$e;function Ze(tt,he){Y&&(he=he.map(ue=>ue.toLowerCase())),he.forEach(function(ue){const we=ue.split("|");$e[we[0]]=[tt,je(we[0],we[1])]})}}function je(L,Y){return Y?Number(Y):_e(L)?0:1}function _e(L){return be.includes(L.toLowerCase())}const xe={},Ie=L=>{console.error(L)},yt=(L,...Y)=>{console.log(`WARN: ${L}`,...Y)},st=(L,Y)=>{xe[`${L}/${Y}`]||(console.log(`Deprecated as of ${L}. ${Y}`),xe[`${L}/${Y}`]=!0)},mt=new Error;function Et(L,Y,{key:se}){let $e=0;const Ze=L[se],tt={},he={};for(let ue=1;ue<=Y.length;ue++)he[ue+$e]=Ze[ue],tt[ue+$e]=!0,$e+=_(Y[ue-1]);L[se]=he,L[se]._emit=tt,L[se]._multi=!0}function ct(L){if(Array.isArray(L.begin)){if(L.skip||L.excludeBegin||L.returnBegin)throw Ie("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),mt;if(typeof L.beginScope!="object"||L.beginScope===null)throw Ie("beginScope must be object"),mt;Et(L,L.begin,{key:"beginScope"}),L.begin=b(L.begin,{joinWith:""})}}function $t(L){if(Array.isArray(L.end)){if(L.skip||L.excludeEnd||L.returnEnd)throw Ie("skip, excludeEnd, returnEnd not compatible with endScope: {}"),mt;if(typeof L.endScope!="object"||L.endScope===null)throw Ie("endScope must be object"),mt;Et(L,L.end,{key:"endScope"}),L.end=b(L.end,{joinWith:""})}}function ir(L){L.scope&&typeof L.scope=="object"&&L.scope!==null&&(L.beginScope=L.scope,delete L.scope)}function ar(L){ir(L),typeof L.beginScope=="string"&&(L.beginScope={_wrap:L.beginScope}),typeof L.endScope=="string"&&(L.endScope={_wrap:L.endScope}),ct(L),$t(L)}function zt(L){function Y(he,ue){return new RegExp(d(he),"m"+(L.case_insensitive?"i":"")+(L.unicodeRegex?"u":"")+(ue?"g":""))}class se{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ue,we){we.position=this.position++,this.matchIndexes[this.matchAt]=we,this.regexes.push([we,ue]),this.matchAt+=_(ue)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ue=this.regexes.map(we=>we[1]);this.matcherRe=Y(b(ue,{joinWith:"|"}),!0),this.lastIndex=0}exec(ue){this.matcherRe.lastIndex=this.lastIndex;const we=this.matcherRe.exec(ue);if(!we)return null;const ut=we.findIndex((j,F)=>F>0&&j!==void 0),M=this.matchIndexes[ut];return we.splice(0,ut),Object.assign(we,M)}}class $e{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ue){if(this.multiRegexes[ue])return this.multiRegexes[ue];const we=new se;return this.rules.slice(ue).forEach(([ut,M])=>we.addRule(ut,M)),we.compile(),this.multiRegexes[ue]=we,we}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ue,we){this.rules.push([ue,we]),we.type==="begin"&&this.count++}exec(ue){const we=this.getMatcher(this.regexIndex);we.lastIndex=this.lastIndex;let ut=we.exec(ue);if(this.resumingScanAtSamePosition()&&!(ut&&ut.index===this.lastIndex)){const M=this.getMatcher(0);M.lastIndex=this.lastIndex+1,ut=M.exec(ue)}return ut&&(this.regexIndex+=ut.position+1,this.regexIndex===this.count&&this.considerAll()),ut}}function Ze(he){const ue=new $e;return he.contains.forEach(we=>ue.addRule(we.begin,{rule:we,type:"begin"})),he.terminatorEnd&&ue.addRule(he.terminatorEnd,{type:"end"}),he.illegal&&ue.addRule(he.illegal,{type:"illegal"}),ue}function tt(he,ue){const we=he;if(he.isCompiled)return we;[N,B,ar,re].forEach(M=>M(he,ue)),L.compilerExtensions.forEach(M=>M(he,ue)),he.__beforeBegin=null,[R,V,Q].forEach(M=>M(he,ue)),he.isCompiled=!0;let ut=null;return typeof he.keywords=="object"&&he.keywords.$pattern&&(he.keywords=Object.assign({},he.keywords),ut=he.keywords.$pattern,delete he.keywords.$pattern),ut=ut||/\w+/,he.keywords&&(he.keywords=Te(he.keywords,L.case_insensitive)),we.keywordPatternRe=Y(ut,!0),ue&&(he.begin||(he.begin=/\B|\b/),we.beginRe=Y(we.begin),!he.end&&!he.endsWithParent&&(he.end=/\B|\b/),he.end&&(we.endRe=Y(we.end)),we.terminatorEnd=d(we.end)||"",he.endsWithParent&&ue.terminatorEnd&&(we.terminatorEnd+=(he.end?"|":"")+ue.terminatorEnd)),he.illegal&&(we.illegalRe=Y(he.illegal)),he.contains||(he.contains=[]),he.contains=[].concat(...he.contains.map(function(M){return bn(M==="self"?he:M)})),he.contains.forEach(function(M){tt(M,we)}),he.starts&&tt(he.starts,ue),we.matcher=Ze(we),we}if(L.compilerExtensions||(L.compilerExtensions=[]),L.contains&&L.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return L.classNameAliases=n(L.classNameAliases||{}),tt(L)}function dr(L){return L?L.endsWithParent||dr(L.starts):!1}function bn(L){return L.variants&&!L.cachedVariants&&(L.cachedVariants=L.variants.map(function(Y){return n(L,{variants:null},Y)})),L.cachedVariants?L.cachedVariants:dr(L)?n(L,{starts:L.starts?n(L.starts):null}):Object.isFrozen(L)?n(L):L}var kr="11.11.1";class St extends Error{constructor(Y,se){super(Y),this.name="HTMLInjectionError",this.html=se}}const hr=r,Or=n,Nr=Symbol("nomatch"),$n=7,Tr=function(L){const Y=Object.create(null),se=Object.create(null),$e=[];let Ze=!0;const tt="Could not find the language '{}', did you forget to load/include a language module?",he={disableAutodetect:!0,name:"Plain text",contains:[]};let ue={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:u};function we(ee){return ue.noHighlightRe.test(ee)}function ut(ee){let fe=ee.className+" ";fe+=ee.parentNode?ee.parentNode.className:"";const Se=ue.languageDetectRe.exec(fe);if(Se){const qe=Ue(Se[1]);return qe||(yt(tt.replace("{}",Se[1])),yt("Falling back to no-highlight mode for this block.",ee)),qe?Se[1]:"no-highlight"}return fe.split(/\s+/).find(qe=>we(qe)||Ue(qe))}function M(ee,fe,Se){let qe="",et="";typeof fe=="object"?(qe=ee,Se=fe.ignoreIllegals,et=fe.language):(st("10.7.0","highlight(lang, code, ...args) has been deprecated."),st("10.7.0",`Please use highlight(code, options) instead.
|
|
5
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),et=ee,qe=fe),Se===void 0&&(Se=!0);const bt={code:qe,language:et};Nt("before:highlight",bt);const Tt=bt.result?bt.result:j(bt.language,bt.code,Se);return Tt.code=bt.code,Nt("after:highlight",Tt),Tt}function j(ee,fe,Se,qe){const et=Object.create(null);function bt(oe,me){return oe.keywords[me]}function Tt(){if(!Pe.keywords){pt.addText(Xe);return}let oe=0;Pe.keywordPatternRe.lastIndex=0;let me=Pe.keywordPatternRe.exec(Xe),Ce="";for(;me;){Ce+=Xe.substring(oe,me.index);const He=Mt.case_insensitive?me[0].toLowerCase():me[0],gt=bt(Pe,He);if(gt){const[Ht,Oa]=gt;if(pt.addText(Ce),Ce="",et[He]=(et[He]||0)+1,et[He]<=$n&&(Ir+=Oa),Ht.startsWith("_"))Ce+=me[0];else{const Na=Mt.classNameAliases[Ht]||Ht;_t(me[0],Na)}}else Ce+=me[0];oe=Pe.keywordPatternRe.lastIndex,me=Pe.keywordPatternRe.exec(Xe)}Ce+=Xe.substring(oe),pt.addText(Ce)}function xt(){if(Xe==="")return;let oe=null;if(typeof Pe.subLanguage=="string"){if(!Y[Pe.subLanguage]){pt.addText(Xe);return}oe=j(Pe.subLanguage,Xe,!0,Ns[Pe.subLanguage]),Ns[Pe.subLanguage]=oe._top}else oe=W(Xe,Pe.subLanguage.length?Pe.subLanguage:null);Pe.relevance>0&&(Ir+=oe.relevance),pt.__addSublanguage(oe._emitter,oe.language)}function dt(){Pe.subLanguage!=null?xt():Tt(),Xe=""}function _t(oe,me){oe!==""&&(pt.startScope(me),pt.addText(oe),pt.endScope())}function pr(oe,me){let Ce=1;const He=me.length-1;for(;Ce<=He;){if(!oe._emit[Ce]){Ce++;continue}const gt=Mt.classNameAliases[oe[Ce]]||oe[Ce],Ht=me[Ce];gt?_t(Ht,gt):(Xe=Ht,Tt(),Xe=""),Ce++}}function mr(oe,me){return oe.scope&&typeof oe.scope=="string"&&pt.openNode(Mt.classNameAliases[oe.scope]||oe.scope),oe.beginScope&&(oe.beginScope._wrap?(_t(Xe,Mt.classNameAliases[oe.beginScope._wrap]||oe.beginScope._wrap),Xe=""):oe.beginScope._multi&&(pr(oe.beginScope,me),Xe="")),Pe=Object.create(oe,{parent:{value:Pe}}),Pe}function Qt(oe,me,Ce){let He=p(oe.endRe,Ce);if(He){if(oe["on:end"]){const gt=new e(oe);oe["on:end"](me,gt),gt.isMatchIgnored&&(He=!1)}if(He){for(;oe.endsParent&&oe.parent;)oe=oe.parent;return oe}}if(oe.endsWithParent)return Qt(oe.parent,me,Ce)}function $a(oe){return Pe.matcher.regexIndex===0?(Xe+=oe[0],1):(Pn=!0,0)}function Ea(oe){const me=oe[0],Ce=oe.rule,He=new e(Ce),gt=[Ce.__beforeBegin,Ce["on:begin"]];for(const Ht of gt)if(Ht&&(Ht(oe,He),He.isMatchIgnored))return $a(me);return Ce.skip?Xe+=me:(Ce.excludeBegin&&(Xe+=me),dt(),!Ce.returnBegin&&!Ce.excludeBegin&&(Xe=me)),mr(Ce,oe),Ce.returnBegin?0:me.length}function Sa(oe){const me=oe[0],Ce=fe.substring(oe.index),He=Qt(Pe,oe,Ce);if(!He)return Nr;const gt=Pe;Pe.endScope&&Pe.endScope._wrap?(dt(),_t(me,Pe.endScope._wrap)):Pe.endScope&&Pe.endScope._multi?(dt(),pr(Pe.endScope,oe)):gt.skip?Xe+=me:(gt.returnEnd||gt.excludeEnd||(Xe+=me),dt(),gt.excludeEnd&&(Xe=me));do Pe.scope&&pt.closeNode(),!Pe.skip&&!Pe.subLanguage&&(Ir+=Pe.relevance),Pe=Pe.parent;while(Pe!==He.parent);return He.starts&&mr(He.starts,oe),gt.returnEnd?0:me.length}function Pa(){const oe=[];for(let me=Pe;me!==Mt;me=me.parent)me.scope&&oe.unshift(me.scope);oe.forEach(me=>pt.openNode(me))}let Rr={};function Os(oe,me){const Ce=me&&me[0];if(Xe+=oe,Ce==null)return dt(),0;if(Rr.type==="begin"&&me.type==="end"&&Rr.index===me.index&&Ce===""){if(Xe+=fe.slice(me.index,me.index+1),!Ze){const He=new Error(`0 width match regex (${ee})`);throw He.languageName=ee,He.badRule=Rr.rule,He}return 1}if(Rr=me,me.type==="begin")return Ea(me);if(me.type==="illegal"&&!Se){const He=new Error('Illegal lexeme "'+Ce+'" for mode "'+(Pe.scope||"<unnamed>")+'"');throw He.mode=Pe,He}else if(me.type==="end"){const He=Sa(me);if(He!==Nr)return He}if(me.type==="illegal"&&Ce==="")return Xe+=`
|
|
6
|
+
`,1;if(Sn>1e5&&Sn>me.index*3)throw new Error("potential infinite loop, way more iterations than matches");return Xe+=Ce,Ce.length}const Mt=Ue(ee);if(!Mt)throw Ie(tt.replace("{}",ee)),new Error('Unknown language: "'+ee+'"');const ka=zt(Mt);let En="",Pe=qe||ka;const Ns={},pt=new ue.__emitter(ue);Pa();let Xe="",Ir=0,tr=0,Sn=0,Pn=!1;try{if(Mt.__emitTokens)Mt.__emitTokens(fe,pt);else{for(Pe.matcher.considerAll();;){Sn++,Pn?Pn=!1:Pe.matcher.considerAll(),Pe.matcher.lastIndex=tr;const oe=Pe.matcher.exec(fe);if(!oe)break;const me=fe.substring(tr,oe.index),Ce=Os(me,oe);tr=oe.index+Ce}Os(fe.substring(tr))}return pt.finalize(),En=pt.toHTML(),{language:ee,value:En,relevance:Ir,illegal:!1,_emitter:pt,_top:Pe}}catch(oe){if(oe.message&&oe.message.includes("Illegal"))return{language:ee,value:hr(fe),illegal:!0,relevance:0,_illegalBy:{message:oe.message,index:tr,context:fe.slice(tr-100,tr+100),mode:oe.mode,resultSoFar:En},_emitter:pt};if(Ze)return{language:ee,value:hr(fe),illegal:!1,relevance:0,errorRaised:oe,_emitter:pt,_top:Pe};throw oe}}function F(ee){const fe={value:hr(ee),illegal:!1,relevance:0,_top:he,_emitter:new ue.__emitter(ue)};return fe._emitter.addText(ee),fe}function W(ee,fe){fe=fe||ue.languages||Object.keys(Y);const Se=F(ee),qe=fe.filter(Ue).filter(Qe).map(dt=>j(dt,ee,!1));qe.unshift(Se);const et=qe.sort((dt,_t)=>{if(dt.relevance!==_t.relevance)return _t.relevance-dt.relevance;if(dt.language&&_t.language){if(Ue(dt.language).supersetOf===_t.language)return 1;if(Ue(_t.language).supersetOf===dt.language)return-1}return 0}),[bt,Tt]=et,xt=bt;return xt.secondBest=Tt,xt}function J(ee,fe,Se){const qe=fe&&se[fe]||Se;ee.classList.add("hljs"),ee.classList.add(`language-${qe}`)}function pe(ee){let fe=null;const Se=ut(ee);if(we(Se))return;if(Nt("before:highlightElement",{el:ee,language:Se}),ee.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ee);return}if(ee.children.length>0&&(ue.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ee)),ue.throwUnescapedHTML))throw new St("One of your code blocks includes unescaped HTML.",ee.innerHTML);fe=ee;const qe=fe.textContent,et=Se?M(qe,{language:Se,ignoreIllegals:!0}):W(qe);ee.innerHTML=et.value,ee.dataset.highlighted="yes",J(ee,Se,et.language),ee.result={language:et.language,re:et.relevance,relevance:et.relevance},et.secondBest&&(ee.secondBest={language:et.secondBest.language,relevance:et.secondBest.relevance}),Nt("after:highlightElement",{el:ee,result:et,text:qe})}function ge(ee){ue=Or(ue,ee)}const De=()=>{ke(),st("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Je(){ke(),st("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let rt=!1;function ke(){function ee(){ke()}if(document.readyState==="loading"){rt||window.addEventListener("DOMContentLoaded",ee,!1),rt=!0;return}document.querySelectorAll(ue.cssSelector).forEach(pe)}function Ke(ee,fe){let Se=null;try{Se=fe(L)}catch(qe){if(Ie("Language definition for '{}' could not be registered.".replace("{}",ee)),Ze)Ie(qe);else throw qe;Se=he}Se.name||(Se.name=ee),Y[ee]=Se,Se.rawDefinition=fe.bind(null,L),Se.aliases&&at(Se.aliases,{languageName:ee})}function it(ee){delete Y[ee];for(const fe of Object.keys(se))se[fe]===ee&&delete se[fe]}function Ee(){return Object.keys(Y)}function Ue(ee){return ee=(ee||"").toLowerCase(),Y[ee]||Y[se[ee]]}function at(ee,{languageName:fe}){typeof ee=="string"&&(ee=[ee]),ee.forEach(Se=>{se[Se.toLowerCase()]=fe})}function Qe(ee){const fe=Ue(ee);return fe&&!fe.disableAutodetect}function jt(ee){ee["before:highlightBlock"]&&!ee["before:highlightElement"]&&(ee["before:highlightElement"]=fe=>{ee["before:highlightBlock"](Object.assign({block:fe.el},fe))}),ee["after:highlightBlock"]&&!ee["after:highlightElement"]&&(ee["after:highlightElement"]=fe=>{ee["after:highlightBlock"](Object.assign({block:fe.el},fe))})}function Pt(ee){jt(ee),$e.push(ee)}function kt(ee){const fe=$e.indexOf(ee);fe!==-1&&$e.splice(fe,1)}function Nt(ee,fe){const Se=ee;$e.forEach(function(qe){qe[Se]&&qe[Se](fe)})}function Bt(ee){return st("10.7.0","highlightBlock will be removed entirely in v12.0"),st("10.7.0","Please use highlightElement now."),pe(ee)}Object.assign(L,{highlight:M,highlightAuto:W,highlightAll:ke,highlightElement:pe,highlightBlock:Bt,configure:ge,initHighlighting:De,initHighlightingOnLoad:Je,registerLanguage:Ke,unregisterLanguage:it,listLanguages:Ee,getLanguage:Ue,registerAliases:at,autoDetection:Qe,inherit:Or,addPlugin:Pt,removePlugin:kt}),L.debugMode=function(){Ze=!1},L.safeMode=function(){Ze=!0},L.versionString=kr,L.regex={concat:E,lookahead:w,either:c,optional:$,anyNumberOfTimes:P};for(const ee in ne)typeof ne[ee]=="object"&&t(ne[ee]);return Object.assign(L,ne),L},Jt=Tr({});return Jt.newInstance=()=>Tr({}),In=Jt,Jt.HighlightJS=Jt,Jt.default=Jt,In}var bc=wc();const Fs=_c(bc);var $c=Be("<pre><code><!></code></pre>");function Ec(t,e){const r=Gr(e,["children","$$slots","$$events","$$legacy"]),n=Gr(r,["code","highlighted","languageName","langtag"]);let s=nr(e,"code",8),o=nr(e,"highlighted",8),i=nr(e,"languageName",8,"plaintext"),l=nr(e,"langtag",8,!1);var a=$c();Fo(a,()=>({"data-language":i(),...n,[_r]:{langtag:l()}}),void 0,void 0,void 0,"svelte-4jgeki");var f=de(a);ur(f,1,"",null,{},{hljs:!0});var u=de(f);{var d=P=>{var $=Gt(),E=wt($);To(E,o),Ne(P,$)},w=P=>{var $=Po();nt(()=>We($,s())),Ne(P,$)};ot(u,P=>{o()?P(d):P(w,!1)})}le(f),le(a),Ne(t,a)}function zs(t,e){const r=Gr(e,["children","$$slots","$$events","$$legacy"]),n=Gr(r,["language","code","langtag"]);Ut(e,!1);let s=nr(e,"language",8),o=nr(e,"code",8),i=nr(e,"langtag",8,!1);const l=co();let a=mi("");uo(()=>{te(a)&&l("highlight",{highlighted:te(a)})}),lo(()=>(On(s()),On(o())),()=>{Fs.registerLanguage(s().name,s().register),ht(a,Fs.highlight(o(),{language:s().name}).value)}),fo(),Ei();var f=Gt(),u=wt(f);Ro(u,e,"default",{get highlighted(){return te(a)}},d=>{Ec(d,yo(()=>n,{get languageName(){return On(s()),ho(()=>s().name)},get langtag(){return i()},get highlighted(){return te(a)},get code(){return o()}}))}),Ne(t,f),Ft()}function Sc(t){const e={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},r={match:/[{}[\],:]/,className:"punctuation",relevance:0},n=["true","false","null"],s={scope:"literal",beginKeywords:n.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:n},contains:[e,r,t.QUOTE_STRING_MODE,s,t.C_NUMBER_MODE,t.C_LINE_COMMENT_MODE,t.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}const Bs={name:"json",register:Sc},Ci=lr({}),Ai=lr({});let Jr=0;function Ar(t,e,r=!1,n){let s;const o=++Jr;e.id?s=e.id:s=`${o}`,e.id=s,r&&(s=`${s}-${++Jr}`);const i=Date.now();return Ai.update(l=>(l[s]||(l[s]={timestamp:i,sortKey:o,requestId:n}),l)),Ci.update(l=>{if(!l[s])t==="SEND"?l[s]=[e,{}]:l[s]=[{},e];else{const a=t==="SEND"?0:1;l[s][a]=e}return l}),e}const ji=lr([]);function Cn(t,e){const r={_logType:t,_logId:`${t}-${++Jr}`,_sortKey:Jr,_timestamp:Date.now(),payload:e};ji.update(n=>[r,...n])}var Pc=Be(`<style>body {
|
|
7
7
|
overflow: hidden;
|
|
8
|
-
}</style>`),
|
|
9
|
-
Click "View Details" to see the full JSON data being exchanged.</p></div> <div id="messages" class="max-h-96 overflow-y-auto"><!></div></div></div> <div><div class="bg-white rounded-xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col"><div class="bg-gradient-to-r from-indigo-50 to-purple-50 px-6 py-4 border-b border-gray-200"><div class="flex items-center justify-between"><h3 class="text-lg font-bold text-gray-900 flex items-center"><span class="mr-2">🔍</span> </h3> <button type="button" aria-label="Close activity log details" class="text-gray-400 hover:text-gray-600 transition-colors"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <p class="text-gray-600 text-sm mt-1">Raw JSON data showing the ActivityStreams message exchange with Sockethub</p></div> <div class="flex-1 overflow-auto p-6 space-y-6"><!> <div class="bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200 rounded-lg p-4"><h4 class="font-semibold text-blue-900 mb-3 flex items-center"><span class="mr-2"> </span> </h4> <div class="bg-white rounded border border-blue-200 overflow-hidden"><!></div></div> <!></div> <div class="bg-gray-50 px-6 py-4 border-t border-gray-200 flex justify-end"><button class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-medium">Close</button></div></div></div>`,1);function Gd(t,e){Ut(e,!0);let r=Dt(Pn({})),n=Dt(Pn({})),s=Dt(Pn([])),o=Dt(!1),i=Dt(""),u=Dt(""),a=Dt("ActivityStreams Data Exchange"),f=Dt(void 0);Ri.subscribe(k=>{ht(r,k,!0)}),Ii.subscribe(k=>{ht(n,k,!0)}),Ai.subscribe(k=>{ht(s,k,!0)});const l=Ge(()=>{const k=[];for(const[C,H]of Object.entries(te(r)??{})){const x=te(n)[C];k.push({kind:"activity",id:C,sortKey:(x==null?void 0:x.sortKey)??0,tuple:H,timestamp:(x==null?void 0:x.timestamp)??0})}for(const C of te(s))k.push({kind:"schema",sortKey:C._sortKey,entry:C});return k.sort((C,H)=>H.sortKey-C.sortKey),k});function d(k){return()=>{const{sent:C,response:H}=zo(te(r),te(n),k);ht(a,"ActivityStreams Data Exchange"),ht(o,!0),ht(i,C?JSON.stringify(C,null,2):"",!0),ht(u,H&&Object.keys(H).length>0?JSON.stringify(H,null,2):"",!0);const x=H==null?void 0:H.object;ht(f,Bo(x)?x:void 0,!0)}}function w(k){return()=>{ht(a,`Schema Event: ${k._logType}`),ht(o,!0),ht(i,JSON.stringify(k.payload,null,2),!0),ht(u,""),ht(f,void 0)}}var P=Nc();To("asm1x0",k=>{var C=Gt(),H=wt(C);{var x=ae=>{var ne=Ec();Ne(ae,ne)};ot(H,ae=>{te(o)&&ae(x)})}Ne(k,C)});var $=wt(P),E=Oe(de($),2),m=Oe(de(E),2),c=de(m);{var _=k=>{var C=Sc();Ne(k,C)},p=k=>{var C=Pc();Gn(C,21,()=>te(l),H=>H.kind==="schema"?H.entry._logId:H.id,(H,x)=>{var ae=Gt(),ne=wt(ae);{var ve=R=>{{let V=Ge(()=>w(te(x).entry));gc(R,{get entry(){return te(x).entry},get buttonAction(){return te(V)}})}},N=R=>{var V=Gt(),B=wt(V);{var Q=be=>{var Ve=Gt(),Te=wt(Ve);Gn(Te,17,()=>Object.entries(te(x).tuple[te(x).tuple.length-1]),$i,(je,_e)=>{var xe=Ge(()=>fo(te(_e),2));let Ie=()=>te(xe)[0],yt=()=>te(xe)[1];var st=Gt(),mt=wt(st);{var Et=ct=>{{let $t=Ge(()=>d(`${te(x).id}-${Ie()}`)),ir=Ge(()=>Object.prototype.hasOwnProperty.call(te(x).tuple[0],"@context")),ar=Ge(()=>typeof te(r)[te(x).id][1]<"u"),zt=Ge(()=>`${te(x).id}-${Ie()}`);Ls(ct,{get buttonAction(){return te($t)},get hasSend(){return te(ir)},get hasResponse(){return te(ar)},get id(){return te(zt)},get entry(){return yt()},get timestamp(){return te(x).timestamp}})}};ot(mt,ct=>{yt()&&ct(Et)})}Ne(je,st)}),Ne(be,Ve)},re=be=>{const Ve=Ge(()=>Object.prototype.hasOwnProperty.call(te(x).tuple[0],"@context")),Te=Ge(()=>Object.prototype.hasOwnProperty.call(te(x).tuple[1],"@context"));{let je=Ge(()=>d(te(x).id)),_e=Ge(()=>te(Te)?te(x).tuple[1]:te(x).tuple[0]);Ls(be,{get buttonAction(){return te(je)},get id(){return te(x).id},get hasSend(){return te(Ve)},get hasResponse(){return te(Te)},get entry(){return te(_e)},get timestamp(){return te(x).timestamp}})}};ot(B,be=>{Array.isArray(te(x).tuple[te(x).tuple.length-1])?be(Q):be(re,!1)},!0)}Ne(R,V)};ot(ne,R=>{te(x).kind==="schema"?R(ve):R(N,!1)})}Ne(H,ae)}),le(C),Ne(k,C)};ot(c,k=>{te(l).length===0?k(_):k(p,!1)})}le(m),le(E),le($);var v=Oe($,2),b=de(v),g=de(b),h=de(g),S=de(h),O=Oe(de(S));le(S);var A=Oe(S,2);A.__click=()=>ht(o,!1),le(h),wi(2),le(g);var D=Oe(g,2),q=de(D);{var X=k=>{var C=kc(),H=Oe(de(C),2);Yo(H,{get page(){return te(f)}}),le(C),Ne(k,C)};ot(q,k=>{te(f)&&k(X)})}var G=Oe(q,2),Z=de(G),ce=de(Z),ye=de(ce,!0);le(ce);var Re=Oe(ce);le(Z);var ie=Oe(Z,2),z=de(ie);Fs(z,{get language(){return zs},get code(){return te(i)}}),le(ie),le(G);var T=Oe(G,2);{var U=k=>{var C=Oc(),H=Oe(de(C),2),x=de(H);Fs(x,{get language(){return zs},get code(){return te(u)}}),le(H),le(C),Ne(k,C)};ot(T,k=>{te(u)&&k(U)})}le(D);var I=Oe(D,2),y=de(I);y.__click=()=>ht(o,!1),le(I),le(b),le(v),nt(()=>{ur(v,1,`${te(o)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`),We(O,` ${te(a)??""}`),We(ye,te(u)?"📤":"📋"),We(Re,` ${te(u)?"Sent to Sockethub":"Event Payload"}`)}),Ne(t,P),Ft()}rn(["click"]);var Bs="https://sockethub.org/ns/context/platform/";function Wr(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(Bs)){const r=e.slice(Bs.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}var Tc=Object.create,Rc=Object.getPrototypeOf,Jr=Object.defineProperty,Ci=Object.getOwnPropertyNames,Ic=Object.getOwnPropertyDescriptor,ji=Object.prototype.hasOwnProperty;function Mi(t){return this[t]}var Ac,Pr=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=Ac??(Ac=new WeakMap),o=s.get(t);if(o)return o}r=t!=null?Tc(Rc(t)):{};const i=Jr(r,"default",{value:t,enumerable:!0});if(t&&typeof t=="object"||typeof t=="function")for(let u of Ci(t))ji.call(i,u)||Jr(i,u,{get:Mi.bind(t,u),enumerable:!0});return n&&s.set(t,i),i},Cc=t=>{var e=(xs??(xs=new WeakMap)).get(t),r;if(e)return e;if(e=Jr({},"__esModule",{value:!0}),t&&typeof t=="object"||typeof t=="function")for(var n of Ci(t))ji.call(e,n)||Jr(e,n,{get:Mi.bind(t,n),enumerable:!(r=Ic(t,n))||r.enumerable});return xs.set(t,e),e},xs,K=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),jc=(t,e,r)=>()=>{if(t)try{e=t(t=0)}catch(n){r=[n]}if(r)throw r[0];return e},Qr=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(_){if(super(),!t.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((p,v)=>`${p}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,v)=>(v instanceof r&&(p[v.str]=(p[v.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(c,..._){const p=[c[0]];let v=0;for(;v<_.length;)u(p,_[v]),p.push(c[++v]);return new n(p)}t._=s;var o=new n("+");function i(c,..._){const p=[P(c[0])];let v=0;for(;v<_.length;)p.push(o),u(p,_[v]),p.push(o,P(c[++v]));return a(p),new n(p)}t.str=i;function u(c,_){_ instanceof n?c.push(..._._items):_ instanceof r?c.push(_):c.push(d(_))}t.addCodeArg=u;function a(c){let _=1;for(;_<c.length-1;){if(c[_]===o){const p=f(c[_-1],c[_+1]);if(p!==void 0){c.splice(_-1,3,p);continue}c[_++]="+"}_++}}function f(c,_){if(_==='""')return c;if(c==='""')return _;if(typeof c=="string")return _ instanceof r||c[c.length-1]!=='"'?void 0:typeof _!="string"?`${c.slice(0,-1)}${_}"`:_[0]==='"'?c.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(c instanceof r))return`"${c}${_.slice(1)}`}function l(c,_){return _.emptyStr()?c:c.emptyStr()?_:i`${c}${_}`}t.strConcat=l;function d(c){return typeof c=="number"||typeof c=="boolean"||c===null?c:P(Array.isArray(c)?c.join(","):c)}function w(c){return new n(P(c))}t.stringify=w;function P(c){return JSON.stringify(c).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function $(c){return typeof c=="string"&&t.IDENTIFIER.test(c)?new n(`.${c}`):s`[${c}]`}t.getProperty=$;function E(c){if(typeof c=="string"&&t.IDENTIFIER.test(c))return new n(`${c}`);throw new Error(`CodeGen: invalid export name: ${c}, use explicit $id name mapping`)}t.getEsmExportName=E;function m(c){return new n(c.toString())}t.regexpCode=m}),Hs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Qr();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:f,parent:l}={}){this._names={},this._prefixes=f,this._parent=l}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const l=this._names[f]||this._nameGroup(f);return`${f}${l.index++}`}_nameGroup(f){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class o extends e.Name{constructor(f,l){super(l),this.prefix=f}setValue(f,{property:l,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(l)}[${d}]`}}t.ValueScopeName=o;var i=(0,e._)`\n`;class u extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new o(f,this._newName(f))}value(f,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(f),{prefix:P}=w,$=(d=l.key)!==null&&d!==void 0?d:l.ref;let E=this._values[P];if(E){const _=E.get($);if(_)return _}else E=this._values[P]=new Map;E.set($,w);const m=this._scope[P]||(this._scope[P]=[]),c=m.length;return m[c]=l.ref,w.setValue(l,{property:P,itemIndex:c}),w}getValue(f,l){const d=this._values[f];if(d)return d.get(l)}scopeRefs(f,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,l,d){return this._reduceValues(f,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},l,d)}_reduceValues(f,l,d={},w){let P=e.nil;for(const $ in f){const E=f[$];if(!E)continue;const m=d[$]=d[$]||new Map;E.forEach(c=>{if(m.has(c))return;m.set(c,n.Started);let _=l(c);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${p} ${c} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(c))P=(0,e._)`${P}${_}${this.opts._n}`;else throw new r(c);m.set(c,n.Completed)})}return P}}t.ValueScope=u}),Me=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Qr(),r=Hs(),n=Qr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Hs();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(y,k){return this}}class i extends o{constructor(y,k,C){super(),this.varKind=y,this.name=k,this.rhs=C}render({es5:y,_n:k}){const C=y?r.varKinds.var:this.varKind,H=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${H};`+k}optimizeNames(y,k){if(y[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,y,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends o{constructor(y,k,C){super(),this.lhs=y,this.rhs=k,this.sideEffects=C}render({_n:y}){return`${this.lhs} = ${this.rhs};`+y}optimizeNames(y,k){if(!(this.lhs instanceof e.Name&&!y[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,y,k),this}get names(){const y=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(y,this.rhs)}}class a extends u{constructor(y,k,C,H){super(y,C,H),this.op=k}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class f extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class l extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class d extends o{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class w extends o{constructor(y){super(),this.code=y}render({_n:y}){return`${this.code};`+y}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(y,k){return this.code=G(this.code,y,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends o{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((k,C)=>k+C.render(y),"")}optimizeNodes(){const{nodes:y}=this;let k=y.length;for(;k--;){const C=y[k].optimizeNodes();Array.isArray(C)?y.splice(k,1,...C):C?y[k]=C:y.splice(k,1)}return y.length>0?this:void 0}optimizeNames(y,k){const{nodes:C}=this;let H=C.length;for(;H--;){const x=C[H];x.optimizeNames(y,k)||(Z(y,x.names),C.splice(H,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((y,k)=>q(y,k.names),{})}}class $ extends P{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class E extends P{}class m extends ${}m.kind="else";class c extends ${constructor(y,k){super(k),this.condition=y}render(y){let k=`if(${this.condition})`+super.render(y);return this.else&&(k+="else "+this.else.render(y)),k}optimizeNodes(){super.optimizeNodes();const y=this.condition;if(y===!0)return this.nodes;let k=this.else;if(k){const C=k.optimizeNodes();k=this.else=Array.isArray(C)?new m(C):C}if(k)return y===!1?k instanceof c?k:k.nodes:this.nodes.length?this:new c(ce(y),k instanceof c?[k]:k.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,k){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(y,k),!!(super.optimizeNames(y,k)||this.else))return this.condition=G(this.condition,y,k),this}get names(){const y=super.names;return X(y,this.condition),this.else&&q(y,this.else.names),y}}c.kind="if";class _ extends ${}_.kind="for";class p extends _{constructor(y){super(),this.iteration=y}render(y){return`for(${this.iteration})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iteration=G(this.iteration,y,k),this}get names(){return q(super.names,this.iteration.names)}}class v extends _{constructor(y,k,C,H){super(),this.varKind=y,this.name=k,this.from=C,this.to=H}render(y){const k=y.es5?r.varKinds.var:this.varKind,{name:C,from:H,to:x}=this;return`for(${k} ${C}=${H}; ${C}<${x}; ${C}++)`+super.render(y)}get names(){const y=X(super.names,this.from);return X(y,this.to)}}class b extends _{constructor(y,k,C,H){super(),this.loop=y,this.varKind=k,this.name=C,this.iterable=H}render(y){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iterable=G(this.iterable,y,k),this}get names(){return q(super.names,this.iterable.names)}}class g extends ${constructor(y,k,C){super(),this.name=y,this.args=k,this.async=C}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}g.kind="func";class h extends P{render(y){return"return "+super.render(y)}}h.kind="return";class S extends ${render(y){let k="try"+super.render(y);return this.catch&&(k+=this.catch.render(y)),this.finally&&(k+=this.finally.render(y)),k}optimizeNodes(){var y,k;return super.optimizeNodes(),(y=this.catch)===null||y===void 0||y.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(y,k){var C,H;return super.optimizeNames(y,k),(C=this.catch)===null||C===void 0||C.optimizeNames(y,k),(H=this.finally)===null||H===void 0||H.optimizeNames(y,k),this}get names(){const y=super.names;return this.catch&&q(y,this.catch.names),this.finally&&q(y,this.finally.names),y}}class O extends ${constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}O.kind="catch";class A extends ${render(y){return"finally"+super.render(y)}}A.kind="finally";class D{constructor(y,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
10
|
-
`:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(y){return this._scope.name(y)}scopeName(y){return this._extScope.name(y)}scopeValue(y,k){const C=this._extScope.value(y,k);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(y,k){return this._extScope.getValue(y,k)}scopeRefs(y){return this._extScope.scopeRefs(y,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(y,k,C,H){const x=this._scope.toName(k);return C!==void 0&&H&&(this._constants[x.str]=C),this._leafNode(new i(y,x,C)),x}const(y,k,C){return this._def(r.varKinds.const,y,k,C)}let(y,k,C){return this._def(r.varKinds.let,y,k,C)}var(y,k,C){return this._def(r.varKinds.var,y,k,C)}assign(y,k,C){return this._leafNode(new u(y,k,C))}add(y,k){return this._leafNode(new a(y,t.operators.ADD,k))}code(y){return typeof y=="function"?y():y!==e.nil&&this._leafNode(new w(y)),this}object(...y){const k=["{"];for(const[C,H]of y)k.length>1&&k.push(","),k.push(C),(C!==H||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,H));return k.push("}"),new e._Code(k)}if(y,k,C){if(this._blockNode(new c(y)),k&&C)this.code(k).else().code(C).endIf();else if(k)this.code(k).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new c(y))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(c,m)}_for(y,k){return this._blockNode(y),k&&this.code(k).endFor(),this}for(y,k){return this._for(new p(y),k)}forRange(y,k,C,H,x=this.opts.es5?r.varKinds.var:r.varKinds.let){const ae=this._scope.toName(y);return this._for(new v(x,ae,k,C),()=>H(ae))}forOf(y,k,C,H=r.varKinds.const){const x=this._scope.toName(y);if(this.opts.es5){const ae=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ae}.length`,ne=>{this.var(x,(0,e._)`${ae}[${ne}]`),C(x)})}return this._for(new b("of",H,x,k),()=>C(x))}forIn(y,k,C,H=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,e._)`Object.keys(${k})`,C);const x=this._scope.toName(y);return this._for(new b("in",H,x,k),()=>C(x))}endFor(){return this._endBlockNode(_)}label(y){return this._leafNode(new f(y))}break(y){return this._leafNode(new l(y))}return(y){const k=new h;if(this._blockNode(k),this.code(y),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(h)}try(y,k,C){if(!k&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const H=new S;if(this._blockNode(H),this.code(y),k){const x=this.name("e");this._currNode=H.catch=new O(x),k(x)}return C&&(this._currNode=H.finally=new A,this.code(C)),this._endBlockNode(O,A)}throw(y){return this._leafNode(new d(y))}block(y,k){return this._blockStarts.push(this._nodes.length),y&&this.code(y).endBlock(k),this}endBlock(y){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-k;if(C<0||y!==void 0&&C!==y)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${y} expected`);return this._nodes.length=k,this}func(y,k=e.nil,C,H){return this._blockNode(new g(y,k,C)),H&&this.code(H).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(y=1){for(;y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(y){return this._currNode.nodes.push(y),this}_blockNode(y){this._currNode.nodes.push(y),this._nodes.push(y)}_endBlockNode(y,k){const C=this._currNode;if(C instanceof y||k&&C instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${y.kind}/${k.kind}`:y.kind}"`)}_elseNode(y){const k=this._currNode;if(!(k instanceof c))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=y,this}get _root(){return this._nodes[0]}get _currNode(){const y=this._nodes;return y[y.length-1]}set _currNode(y){const k=this._nodes;k[k.length-1]=y}}t.CodeGen=D;function q(I,y){for(const k in y)I[k]=(I[k]||0)+(y[k]||0);return I}function X(I,y){return y instanceof e._CodeOrName?q(I,y.names):I}function G(I,y,k){if(I instanceof e.Name)return C(I);if(!H(I))return I;return new e._Code(I._items.reduce((x,ae)=>(ae instanceof e.Name&&(ae=C(ae)),ae instanceof e._Code?x.push(...ae._items):x.push(ae),x),[]));function C(x){const ae=k[x.str];return ae===void 0||y[x.str]!==1?x:(delete y[x.str],ae)}function H(x){return x instanceof e._Code&&x._items.some(ae=>ae instanceof e.Name&&y[ae.str]===1&&k[ae.str]!==void 0)}}function Z(I,y){for(const k in y)I[k]=(I[k]||0)-(y[k]||0)}function ce(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,e._)`!${U(I)}`}t.not=ce;var ye=T(t.operators.AND);function Re(...I){return I.reduce(ye)}t.and=Re;var ie=T(t.operators.OR);function z(...I){return I.reduce(ie)}t.or=z;function T(I){return(y,k)=>y===e.nil?k:k===e.nil?y:(0,e._)`${U(y)} ${I} ${U(k)}`}function U(I){return I instanceof e.Name?I:(0,e._)`(${I})`}}),Fe=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Me(),r=Qr();function n(g){const h={};for(const S of g)h[S]=!0;return h}t.toHash=n;function s(g,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(o(g,h),!i(h,g.self.RULES.all))}t.alwaysValidSchema=s;function o(g,h=g.schema){const{opts:S,self:O}=g;if(!S.strictSchema||typeof h=="boolean")return;const A=O.RULES.keywords;for(const D in h)A[D]||b(g,`unknown keyword: "${D}"`)}t.checkUnknownRules=o;function i(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(h[S])return!0;return!1}t.schemaHasRules=i;function u(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(S!=="$ref"&&h.all[S])return!0;return!1}t.schemaHasRulesButRef=u;function a({topSchemaRef:g,schemaPath:h},S,O,A){if(!A){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${g}${h}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return w(decodeURIComponent(g))}t.unescapeFragment=f;function l(g){return encodeURIComponent(d(g))}t.escapeFragment=l;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function P(g,h){if(Array.isArray(g))for(const S of g)h(S);else h(g)}t.eachItem=P;function $({mergeNames:g,mergeToName:h,mergeValues:S,resultToName:O}){return(A,D,q,X)=>{const G=q===void 0?D:q instanceof e.Name?(D instanceof e.Name?g(A,D,q):h(A,D,q),q):D instanceof e.Name?(h(A,q,D),D):S(D,q);return X===e.Name&&!(G instanceof e.Name)?O(A,G):G}}t.mergeEvaluated={props:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>{g.if((0,e._)`${h} === true`,()=>g.assign(S,!0),()=>g.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${h})`))}),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>{h===!0?g.assign(S,!0):(g.assign(S,(0,e._)`${S} || {}`),m(g,S,h))}),mergeValues:(g,h)=>g===!0?!0:{...g,...h},resultToName:E}),items:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>g.assign(S,(0,e._)`${h} === true ? true : ${S} > ${h} ? ${S} : ${h}`)),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>g.assign(S,h===!0?!0:(0,e._)`${S} > ${h} ? ${S} : ${h}`)),mergeValues:(g,h)=>g===!0?!0:Math.max(g,h),resultToName:(g,h)=>g.var("items",h)})};function E(g,h){if(h===!0)return g.var("props",!0);const S=g.var("props",(0,e._)`{}`);return h!==void 0&&m(g,S,h),S}t.evaluatedPropsToName=E;function m(g,h,S){Object.keys(S).forEach(O=>g.assign((0,e._)`${h}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var c={};function _(g,h){return g.scopeValue("func",{ref:h,code:c[h.code]||(c[h.code]=new r._Code(h.code))})}t.useFunc=_;var p;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(p||(t.Type=p={}));function v(g,h,S){if(g instanceof e.Name){const O=h===p.Num;return S?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=v;function b(g,h,S=g.opts.strictSchema){if(S){if(h=`strict mode: ${h}`,S===!0)throw new Error(h);g.self.logger.warn(h)}}t.checkStrictMode=b}),Zt=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),nn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Me(),r=Fe(),n=Zt();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:c})=>c?(0,e.str)`"${m}" keyword must be ${c} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,c=t.keywordError,_,p){const{it:v}=m,{gen:b,compositeRule:g,allErrors:h}=v,S=d(m,c,_);p??(g||h)?a(b,S):f(v,(0,e._)`[${S}]`)}t.reportError=s;function o(m,c=t.keywordError,_){const{it:p}=m,{gen:v,compositeRule:b,allErrors:g}=p,h=d(m,c,_);a(v,h),b||g||f(p,n.default.vErrors)}t.reportExtraError=o;function i(m,c){m.assign(n.default.errors,c),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(c,()=>m.assign((0,e._)`${n.default.vErrors}.length`,c),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function u({gen:m,keyword:c,schemaValue:_,data:p,errsCount:v,it:b}){if(v===void 0)throw new Error("ajv implementation error");const g=m.name("err");m.forRange("i",v,n.default.errors,h=>{m.const(g,(0,e._)`${n.default.vErrors}[${h}]`),m.if((0,e._)`${g}.instancePath === undefined`,()=>m.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,b.errorPath))),m.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${c}`),b.opts.verbose&&(m.assign((0,e._)`${g}.schema`,_),m.assign((0,e._)`${g}.data`,p))})}t.extendErrors=u;function a(m,c){const _=m.const("err",c);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${_}]`),(0,e._)`${n.default.vErrors}.push(${_})`),m.code((0,e._)`${n.default.errors}++`)}function f(m,c){const{gen:_,validateName:p,schemaEnv:v}=m;v.$async?_.throw((0,e._)`new ${m.ValidationError}(${c})`):(_.assign((0,e._)`${p}.errors`,c),_.return(!1))}var l={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(m,c,_){const{createErrors:p}=m.it;return p===!1?(0,e._)`{}`:w(m,c,_)}function w(m,c,_={}){const{gen:p,it:v}=m,b=[P(v,_),$(m,_)];return E(m,c,b),p.object(...b)}function P({errorPath:m},{instancePath:c}){const _=c?(0,e.str)`${m}${(0,r.getErrorPath)(c,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function $({keyword:m,it:{errSchemaPath:c}},{schemaPath:_,parentSchema:p}){let v=p?c:(0,e.str)`${c}/${m}`;return _&&(v=(0,e.str)`${v}${(0,r.getErrorPath)(_,r.Type.Str)}`),[l.schemaPath,v]}function E(m,{params:c,message:_},p){const{keyword:v,data:b,schemaValue:g,it:h}=m,{opts:S,propertyName:O,topSchemaRef:A,schemaPath:D}=h;p.push([l.keyword,v],[l.params,typeof c=="function"?c(m):c||(0,e._)`{}`]),S.messages&&p.push([l.message,typeof _=="function"?_(m):_]),S.verbose&&p.push([l.schema,g],[l.parentSchema,(0,e._)`${A}${D}`],[n.default.data,b]),O&&p.push([l.propertyName,O])}}),Mc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=nn(),r=Me(),n=Zt(),s={message:"boolean schema is false"};function o(a){const{gen:f,schema:l,validateName:d}=a;l===!1?u(a,!1):typeof l=="object"&&l.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=o;function i(a,f){const{gen:l,schema:d}=a;d===!1?(l.var(f,!1),u(a)):l.var(f,!0)}t.boolOrEmptySchema=i;function u(a,f){const{gen:l,data:d}=a,w={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,f)}}),Di=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(o){return typeof o=="string"&&r.has(o)}t.isJSONType=n;function s(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),qi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:o},i){const u=o.RULES.types[i];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,o){return o.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,o){var i;return s[o.keyword]!==void 0||((i=o.definition.implements)===null||i===void 0?void 0:i.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),Xr=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=Di(),r=qi(),n=nn(),s=Me(),o=Fe(),i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i||(t.DataType=i={}));function u(p){const v=a(p.type);if(v.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&v.push("null")}return v}t.getSchemaTypes=u;function a(p){const v=Array.isArray(p)?p:p?[p]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}t.getJSONTypes=a;function f(p,v){const{gen:b,data:g,opts:h}=p,S=d(v,h.coerceTypes),O=v.length>0&&!(S.length===0&&v.length===1&&(0,r.schemaHasRulesForType)(p,v[0]));if(O){const A=E(v,g,h.strictNumbers,i.Wrong);b.if(A,()=>{S.length?w(p,v,S):c(p)})}return O}t.coerceAndCheckDataType=f;var l=new Set(["string","number","integer","boolean","null"]);function d(p,v){return v?p.filter(b=>l.has(b)||v==="array"&&b==="array"):[]}function w(p,v,b){const{gen:g,data:h,opts:S}=p,O=g.let("dataType",(0,s._)`typeof ${h}`),A=g.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>g.assign(h,(0,s._)`${h}[0]`).assign(O,(0,s._)`typeof ${h}`).if(E(v,h,S.strictNumbers),()=>g.assign(A,h))),g.if((0,s._)`${A} !== undefined`);for(const q of b)(l.has(q)||q==="array"&&S.coerceTypes==="array")&&D(q);g.else(),c(p),g.endIf(),g.if((0,s._)`${A} !== undefined`,()=>{g.assign(h,A),P(p,A)});function D(q){switch(q){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(A,(0,s._)`"" + ${h}`).elseIf((0,s._)`${h} === null`).assign(A,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${h} === null
|
|
11
|
-
|| (${O} == "string" && ${h} && ${h} == +${h})`).assign(
|
|
12
|
-
|| (${O} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(
|
|
13
|
-
|| ${O} === "boolean" || ${h} === null`).assign(A,(0,s._)`[${h}]`)}}}function P({gen:p,parentData:v,parentDataProperty:b},g){p.if((0,s._)`${v} !== undefined`,()=>p.assign((0,s._)`${v}[${b}]`,g))}function $(p,v,b,g=i.Correct){const h=g===i.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(p){case"null":return(0,s._)`${v} ${h} null`;case"array":S=(0,s._)`Array.isArray(${v})`;break;case"object":S=(0,s._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":S=O((0,s._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${v} ${h} ${p}`}return g===i.Correct?S:(0,s.not)(S);function O(A=s.nil){return(0,s.and)((0,s._)`typeof ${v} == "number"`,A,b?(0,s._)`isFinite(${v})`:s.nil)}}t.checkDataType=$;function E(p,v,b,g){if(p.length===1)return $(p[0],v,b,g);let h;const S=(0,o.toHash)(p);if(S.array&&S.object){const O=(0,s._)`typeof ${v} != "object"`;h=S.null?O:(0,s._)`!${v} || ${O}`,delete S.null,delete S.array,delete S.object}else h=s.nil;S.number&&delete S.integer;for(const O in S)h=(0,s.and)(h,$(O,v,b,g));return h}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:v})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${v}}`};function c(p){const v=_(p);(0,n.reportError)(v,m)}t.reportTypeError=c;function _(p){const{gen:v,data:b,schema:g}=p,h=(0,o.schemaRefOrVal)(p,g,"type");return{gen:v,keyword:"type",data:b,schema:g.type,schemaCode:h,schemaValue:h,parentSchema:g,params:{},it:p}}}),Dc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Me(),r=Fe();function n(o,i){const{properties:u,items:a}=o.schema;if(i==="object"&&u)for(const f in u)s(o,f,u[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,l)=>s(o,l,f.default))}t.assignDefaults=n;function s(o,i,u){const{gen:a,compositeRule:f,data:l,opts:d}=o;if(u===void 0)return;const w=(0,e._)`${l}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(o,`default is ignored for: ${w}`);return}let P=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${w} === null || ${w} === ""`),a.if(P,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),At=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Me(),r=Fe(),n=Zt(),s=Fe();function o(p,v){const{gen:b,data:g,it:h}=p;b.if(d(b,g,v,h.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${v}`},!0),p.error()})}t.checkReportMissingProp=o;function i({gen:p,data:v,it:{opts:b}},g,h){return(0,e.or)(...g.map(S=>(0,e.and)(d(p,v,S,b.ownProperties),(0,e._)`${h} = ${S}`)))}t.checkMissingProp=i;function u(p,v){p.setParams({missingProperty:v},!0),p.error()}t.reportMissingProp=u;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(p,v,b){return(0,e._)`${a(p)}.call(${v}, ${b})`}t.isOwnProperty=f;function l(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} !== undefined`;return g?(0,e._)`${h} && ${f(p,v,b)}`:h}t.propertyInData=l;function d(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} === undefined`;return g?(0,e.or)(h,(0,e.not)(f(p,v,b))):h}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(v=>v!=="__proto__"):[]}t.allSchemaProperties=w;function P(p,v){return w(v).filter(b=>!(0,r.alwaysValidSchema)(p,v[b]))}t.schemaProperties=P;function $({schemaCode:p,data:v,it:{gen:b,topSchemaRef:g,schemaPath:h,errorPath:S},it:O},A,D,q){const X=q?(0,e._)`${p}, ${v}, ${g}${h}`:v,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&G.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const Z=(0,e._)`${X}, ${b.object(...G)}`;return D!==e.nil?(0,e._)`${A}.call(${D}, ${Z})`:(0,e._)`${A}(${Z})`}t.callValidateCode=$;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:v}},b){const g=v.unicodeRegExp?"u":"",{regExp:h}=v.code,S=h(b,g);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${h.code==="new RegExp"?E:(0,s.useFunc)(p,h)}(${b}, ${g})`})}t.usePattern=m;function c(p){const{gen:v,data:b,keyword:g,it:h}=p,S=v.name("valid");if(h.allErrors){const A=v.let("valid",!0);return O(()=>v.assign(A,!1)),A}return v.var(S,!0),O(()=>v.break()),S;function O(A){const D=v.const("len",(0,e._)`${b}.length`);v.forRange("i",0,D,q=>{p.subschema({keyword:g,dataProp:q,dataPropType:r.Type.Num},S),v.if((0,e.not)(S),A)})}}t.validateArray=c;function _(p){const{gen:v,schema:b,keyword:g,it:h}=p;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(D=>(0,r.alwaysValidSchema)(h,D))&&!h.opts.unevaluated)return;const O=v.let("valid",!1),A=v.name("_valid");v.block(()=>b.forEach((D,q)=>{const X=p.subschema({keyword:g,schemaProp:q,compositeRule:!0},A);v.assign(O,(0,e._)`${O} || ${A}`),p.mergeValidEvaluated(X,A)||v.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),qc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Me(),r=Zt(),n=At(),s=nn();function o(P,$){const{gen:E,keyword:m,schema:c,parentSchema:_,it:p}=P,v=$.macro.call(p.self,c,_,p),b=l(E,m,v);p.opts.validateSchema!==!1&&p.self.validateSchema(v,!0);const g=E.name("valid");P.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:b,compositeRule:!0},g),P.pass(g,()=>P.error(!0))}t.macroKeywordCode=o;function i(P,$){var E;const{gen:m,keyword:c,schema:_,parentSchema:p,$data:v,it:b}=P;f(b,$);const g=!v&&$.compile?$.compile.call(b.self,_,p,b):$.validate,h=l(m,c,g),S=m.let("valid");P.block$data(S,O),P.ok((E=$.valid)!==null&&E!==void 0?E:S);function O(){if($.errors===!1)q(),$.modifying&&u(P),X(()=>P.error());else{const G=$.async?A():D();$.modifying&&u(P),X(()=>a(P,G))}}function A(){const G=m.let("ruleErrs",null);return m.try(()=>q((0,e._)`await `),Z=>m.assign(S,!1).if((0,e._)`${Z} instanceof ${b.ValidationError}`,()=>m.assign(G,(0,e._)`${Z}.errors`),()=>m.throw(Z))),G}function D(){const G=(0,e._)`${h}.errors`;return m.assign(G,null),q(e.nil),G}function q(G=$.async?(0,e._)`await `:e.nil){const Z=b.opts.passContext?r.default.this:r.default.self,ce=!("compile"in $&&!v||$.schema===!1);m.assign(S,(0,e._)`${G}${(0,n.callValidateCode)(P,h,Z,ce)}`,$.modifying)}function X(G){var Z;m.if((0,e.not)((Z=$.valid)!==null&&Z!==void 0?Z:S),G)}}t.funcKeywordCode=i;function u(P){const{gen:$,data:E,it:m}=P;$.if(m.parentData,()=>$.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(P,$){const{gen:E}=P;E.if((0,e._)`Array.isArray(${$})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${$} : ${r.default.vErrors}.concat(${$})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(P)},()=>P.error())}function f({schemaEnv:P},$){if($.async&&!P.$async)throw new Error("async keyword in sync schema")}function l(P,$,E){if(E===void 0)throw new Error(`keyword "${$}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,$,E=!1){return!$.length||$.some(m=>m==="array"?Array.isArray(P):m==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==m||E&&typeof P>"u")}t.validSchemaType=d;function w({schema:P,opts:$,self:E,errSchemaPath:m},c,_){if(Array.isArray(c.keyword)?!c.keyword.includes(_):c.keyword!==_)throw new Error("ajv implementation error");const p=c.dependencies;if(p!=null&&p.some(v=>!Object.prototype.hasOwnProperty.call(P,v)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(c.validateSchema&&!c.validateSchema(P[_])){const b=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(c.validateSchema.errors);if($.validateSchema==="log")E.logger.error(b);else throw new Error(b)}}t.validateKeywordUsage=w}),Lc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Me(),r=Fe();function n(i,{keyword:u,schemaProp:a,schema:f,schemaPath:l,errSchemaPath:d,topSchemaRef:w}){if(u!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const P=i.schema[u];return a===void 0?{schema:P,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${u}`}:{schema:P[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${u}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(l===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:l,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,u,{dataProp:a,dataPropType:f,data:l,dataTypes:d,propertyName:w}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=u;if(a!==void 0){const{errorPath:E,dataPathArr:m,opts:c}=u,_=P.let("data",(0,e._)`${u.data}${(0,e.getProperty)(a)}`,!0);$(_),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,c.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(l!==void 0){const E=l instanceof e.Name?l:P.let("data",l,!0);$(E),w!==void 0&&(i.propertyName=w)}d&&(i.dataTypes=d);function $(E){i.data=E,i.dataLevel=u.dataLevel+1,i.dataTypes=[],u.definedProperties=new Set,i.parentData=u.data,i.dataNames=[...u.dataNames,E]}}t.extendSubschemaData=s;function o(i,{jtdDiscriminator:u,jtdMetadata:a,compositeRule:f,createErrors:l,allErrors:d}){f!==void 0&&(i.compositeRule=f),l!==void 0&&(i.createErrors=l),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=u,i.jtdMetadata=a}t.extendSubschemaMode=o}),sn=K(function(t,e){e.exports=function r(n,s){if(n===s)return!0;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(n.constructor!==s.constructor)return!1;var o,i,u;if(Array.isArray(n)){if(o=n.length,o!=s.length)return!1;for(i=o;i--!==0;)if(!r(n[i],s[i]))return!1;return!0}if(n.constructor===RegExp)return n.source===s.source&&n.flags===s.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===s.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===s.toString();if(u=Object.keys(n),o=u.length,o!==Object.keys(s).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[i]))return!1;for(i=o;i--!==0;){var a=u[i];if(!r(n[a],s[a]))return!1}return!0}return n!==n&&s!==s}}),Li=K(function(t,e){var r=e.exports=function(o,i,u){typeof i=="function"&&(u=i,i={}),u=i.cb||u;var a=typeof u=="function"?u:u.pre||function(){},f=u.post||function(){};n(i,a,f,o,"",o)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(o,i,u,a,f,l,d,w,P,$){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,f,l,d,w,P,$);for(var E in a){var m=a[E];if(Array.isArray(m)){if(E in r.arrayKeywords)for(var c=0;c<m.length;c++)n(o,i,u,m[c],f+"/"+E+"/"+c,l,f,E,a,c)}else if(E in r.propsKeywords){if(m&&typeof m=="object")for(var _ in m)n(o,i,u,m[_],f+"/"+E+"/"+s(_),l,f,E,a,_)}else(E in r.keywords||o.allKeys&&!(E in r.skipKeywords))&&n(o,i,u,m,f+"/"+E,l,f,E,a)}u(a,f,l,d,w,P,$)}}function s(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}}),an=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Fe(),r=sn(),n=Li(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(m,c=!0){return typeof m=="boolean"?!0:c===!0?!u(m):c?a(m)<=c:!1}t.inlineRef=o;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const c in m){if(i.has(c))return!0;const _=m[c];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function a(m){let c=0;for(const _ in m){if(_==="$ref")return 1/0;if(c++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],p=>c+=a(p)),c===1/0))return 1/0}return c}function f(m,c="",_){_!==!1&&(c=w(c));const p=m.parse(c);return l(m,p)}t.getFullPath=f;function l(m,c){return m.serialize(c).split("#")[0]+"#"}t._getFullPath=l;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function P(m,c,_){return _=w(_),m.resolve(c,_)}t.resolveUrl=P;var $=/^[a-z_][-a-z0-9._]*$/i;function E(m,c){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,v=w(m[_]||c),b={"":v},g=f(p,v,!1),h={},S=new Set;return n(m,{allKeys:!0},(D,q,X,G)=>{if(G===void 0)return;const Z=g+q;let ce=b[G];typeof D[_]=="string"&&(ce=ye.call(this,D[_])),Re.call(this,D.$anchor),Re.call(this,D.$dynamicAnchor),b[q]=ce;function ye(ie){const z=this.opts.uriResolver.resolve;if(ie=w(ce?z(ce,ie):ie),S.has(ie))throw A(ie);S.add(ie);let T=this.refs[ie];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(D,T.schema,ie):ie!==w(Z)&&(ie[0]==="#"?(O(D,h[ie],ie),h[ie]=D):this.refs[ie]=Z),ie}function Re(ie){if(typeof ie=="string"){if(!$.test(ie))throw new Error(`invalid anchor "${ie}"`);ye.call(this,`#${ie}`)}}}),h;function O(D,q,X){if(q!==void 0&&!r(D,q))throw A(X)}function A(D){return new Error(`reference "${D}" resolves to more than one schema`)}}t.getSchemaRefs=E}),on=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Mc(),r=Xr(),n=qi(),s=Xr(),o=Dc(),i=qc(),u=Lc(),a=Me(),f=Zt(),l=an(),d=Fe(),w=nn();function P(N){if(g(N)&&(S(N),b(N))){c(N);return}$(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function $({gen:N,validateName:R,schema:V,schemaEnv:B,opts:Q},re){Q.code.es5?N.func(R,(0,a._)`${f.default.data}, ${f.default.valCxt}`,B.$async,()=>{N.code((0,a._)`"use strict"; ${p(V,Q)}`),m(N,Q),N.code(re)}):N.func(R,(0,a._)`${f.default.data}, ${E(Q)}`,B.$async,()=>N.code(p(V,Q)).code(re))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function m(N,R){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function c(N){const{schema:R,opts:V,gen:B}=N;$(N,()=>{V.$comment&&R.$comment&&G(N),D(N),B.let(f.default.vErrors,null),B.let(f.default.errors,0),V.unevaluated&&_(N),O(N),Z(N)})}function _(N){const{gen:R,validateName:V}=N;N.evaluated=R.const("evaluated",(0,a._)`${V}.evaluated`),R.if((0,a._)`${N.evaluated}.dynamicProps`,()=>R.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),R.if((0,a._)`${N.evaluated}.dynamicItems`,()=>R.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function p(N,R){const V=typeof N=="object"&&N[R.schemaId];return V&&(R.code.source||R.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function v(N,R){if(g(N)&&(S(N),b(N))){h(N,R);return}(0,e.boolOrEmptySchema)(N,R)}function b({schema:N,self:R}){if(typeof N=="boolean")return!N;for(const V in N)if(R.RULES.all[V])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function h(N,R){const{schema:V,gen:B,opts:Q}=N;Q.$comment&&V.$comment&&G(N),q(N),X(N);const re=B.const("_errs",f.default.errors);O(N,re),B.var(R,(0,a._)`${re} === ${f.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),A(N)}function O(N,R){if(N.opts.jtd)return ye(N,[],!1,R);const V=(0,r.getSchemaTypes)(N.schema),B=(0,r.coerceAndCheckDataType)(N,V);ye(N,V,!B,R)}function A(N){const{schema:R,errSchemaPath:V,opts:B,self:Q}=N;R.$ref&&B.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(R,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function D(N){const{schema:R,opts:V}=N;R.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function q(N){const R=N.schema[N.opts.schemaId];R&&(N.baseId=(0,l.resolveUrl)(N.opts.uriResolver,N.baseId,R))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:N,schemaEnv:R,schema:V,errSchemaPath:B,opts:Q}){const re=V.$comment;if(Q.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${re})`);else if(typeof Q.$comment=="function"){const be=(0,a.str)`${B}/$comment`,Ve=N.scopeValue("root",{ref:R.root});N.code((0,a._)`${f.default.self}.opts.$comment(${re}, ${be}, ${Ve}.schema)`)}}function Z(N){const{gen:R,schemaEnv:V,validateName:B,ValidationError:Q,opts:re}=N;V.$async?R.if((0,a._)`${f.default.errors} === 0`,()=>R.return(f.default.data),()=>R.throw((0,a._)`new ${Q}(${f.default.vErrors})`)):(R.assign((0,a._)`${B}.errors`,f.default.vErrors),re.unevaluated&&ce(N),R.return((0,a._)`${f.default.errors} === 0`))}function ce({gen:N,evaluated:R,props:V,items:B}){V instanceof a.Name&&N.assign((0,a._)`${R}.props`,V),B instanceof a.Name&&N.assign((0,a._)`${R}.items`,B)}function ye(N,R,V,B){const{gen:Q,schema:re,data:be,allErrors:Ve,opts:Te,self:je}=N,{RULES:_e}=je;if(re.$ref&&(Te.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(re,_e))){Q.block(()=>x(N,"$ref",_e.all.$ref.definition));return}Te.jtd||ie(N,R),Q.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(re,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,be,Te.strictNumbers)),Re(N,Ie),R.length===1&&R[0]===Ie.type&&V&&(Q.else(),(0,s.reportTypeError)(N)),Q.endIf()):Re(N,Ie),Ve||Q.if((0,a._)`${f.default.errors} === ${B||0}`))}}function Re(N,R){const{gen:V,schema:B,opts:{useDefaults:Q}}=N;Q&&(0,o.assignDefaults)(N,R.type),V.block(()=>{for(const re of R.rules)(0,n.shouldUseRule)(B,re)&&x(N,re.keyword,re.definition,R.type)})}function ie(N,R){N.schemaEnv.meta||!N.opts.strictTypes||(z(N,R),N.opts.allowUnionTypes||T(N,R),U(N,N.dataTypes))}function z(N,R){if(R.length){if(!N.dataTypes.length){N.dataTypes=R;return}R.forEach(V=>{y(N.dataTypes,V)||C(N,`type "${V}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,R)}}function T(N,R){R.length>1&&!(R.length===2&&R.includes("null"))&&C(N,"use allowUnionTypes to allow union type keyword")}function U(N,R){const V=N.self.RULES.all;for(const B in V){const Q=V[B];if(typeof Q=="object"&&(0,n.shouldUseRule)(N.schema,Q)){const{type:re}=Q.definition;re.length&&!re.some(be=>I(R,be))&&C(N,`missing type "${re.join(",")}" for keyword "${B}"`)}}}function I(N,R){return N.includes(R)||R==="number"&&N.includes("integer")}function y(N,R){return N.includes(R)||R==="integer"&&N.includes("number")}function k(N,R){const V=[];for(const B of N.dataTypes)y(R,B)?V.push(B):R.includes("integer")&&B==="number"&&V.push("integer");N.dataTypes=V}function C(N,R){const V=N.schemaEnv.baseId+N.errSchemaPath;R+=` at "${V}" (strictTypes)`,(0,d.checkStrictMode)(N,R,N.opts.strictTypes)}class H{constructor(R,V,B){if((0,i.validateKeywordUsage)(R,V,B),this.gen=R.gen,this.allErrors=R.allErrors,this.keyword=B,this.data=R.data,this.schema=R.schema[B],this.$data=V.$data&&R.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(R,this.schema,B,this.$data),this.schemaType=V.schemaType,this.parentSchema=R.schema,this.params={},this.it=R,this.def=V,this.$data)this.schemaCode=R.gen.const("vSchema",ve(this.$data,R));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=R.gen.const("_errs",f.default.errors))}result(R,V,B){this.failResult((0,a.not)(R),V,B)}failResult(R,V,B){this.gen.if(R),B?B():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(R,V){this.failResult((0,a.not)(R),void 0,V)}fail(R){if(R===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(R),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(R){if(!this.$data)return this.fail(R);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),R)})`)}error(R,V,B){if(V){this.setParams(V),this._error(R,B),this.setParams({});return}this._error(R,B)}_error(R,V){(R?w.reportExtraError:w.reportError)(this,this.def.error,V)}$dataError(){(0,w.reportError)(this,this.def.$dataError||w.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,w.resetErrorsCount)(this.gen,this.errsCount)}ok(R){this.allErrors||this.gen.if(R)}setParams(R,V){V?Object.assign(this.params,R):this.params=R}block$data(R,V,B=a.nil){this.gen.block(()=>{this.check$data(R,B),V()})}check$data(R=a.nil,V=a.nil){if(!this.$data)return;const{gen:B,schemaCode:Q,schemaType:re,def:be}=this;B.if((0,a.or)((0,a._)`${Q} === undefined`,V)),R!==a.nil&&B.assign(R,!0),(re.length||be.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),R!==a.nil&&B.assign(R,!1)),B.else()}invalid$data(){const{gen:R,schemaCode:V,schemaType:B,def:Q,it:re}=this;return(0,a.or)(be(),Ve());function be(){if(B.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Te=Array.isArray(B)?B:[B];return(0,a._)`${(0,s.checkDataTypes)(Te,V,re.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ve(){if(Q.validateSchema){const Te=R.scopeValue("validate$data",{ref:Q.validateSchema});return(0,a._)`!${Te}(${V})`}return a.nil}}subschema(R,V){const B=(0,u.getSubschema)(this.it,R);(0,u.extendSubschemaData)(B,this.it,R),(0,u.extendSubschemaMode)(B,R);const Q={...this.it,...B,items:void 0,props:void 0};return v(Q,V),Q}mergeEvaluated(R,V){const{it:B,gen:Q}=this;B.opts.unevaluated&&(B.props!==!0&&R.props!==void 0&&(B.props=d.mergeEvaluated.props(Q,R.props,B.props,V)),B.items!==!0&&R.items!==void 0&&(B.items=d.mergeEvaluated.items(Q,R.items,B.items,V)))}mergeValidEvaluated(R,V){const{it:B,gen:Q}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return Q.if(V,()=>this.mergeEvaluated(R,a.Name)),!0}}t.KeywordCxt=H;function x(N,R,V,B){const Q=new H(N,V,R);"code"in V?V.code(Q,B):Q.$data&&V.validate?(0,i.funcKeywordCode)(Q,V):"macro"in V?(0,i.macroKeywordCode)(Q,V):(V.compile||V.validate)&&(0,i.funcKeywordCode)(Q,V)}var ae=/^\/(?:[^~]|~0|~1)*$/,ne=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:R,dataNames:V,dataPathArr:B}){let Q,re;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!ae.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);Q=N,re=f.default.rootData}else{const je=ne.exec(N);if(!je)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+je[1];if(Q=je[2],Q==="#"){if(_e>=R)throw new Error(Te("property/index",_e));return B[R-_e]}if(_e>R)throw new Error(Te("data",_e));if(re=V[R-_e],!Q)return re}let be=re;const Ve=Q.split("/");for(const je of Ve)je&&(re=(0,a._)`${re}${(0,a.getProperty)((0,d.unescapeJsonPointer)(je))}`,be=(0,a._)`${be} && ${re}`);return be;function Te(je,_e){return`Cannot access ${je} ${_e} levels up, current level is ${R}`}}t.getData=ve}),cs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),cn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=an();class r extends Error{constructor(s,o,i,u){super(u||`can't resolve reference ${i} from id ${o}`),this.missingRef=(0,e.resolveUrl)(s,o,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),us=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Me(),r=cs(),n=Zt(),s=an(),o=Fe(),i=on();class u{constructor(_){var p;this.refs={},this.dynamicAnchors={};let v;typeof _.schema=="object"&&(v=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(v==null?void 0:v[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=v==null?void 0:v.$async,this.refs={}}}t.SchemaEnv=u;function a(c){const _=d.call(this,c);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,c.root.baseId),{es5:v,lines:b}=this.opts.code,{ownProperties:g}=this.opts,h=new e.CodeGen(this.scope,{es5:v,lines:b,ownProperties:g});let S;c.$async&&(S=h.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=h.scopeName("validate");c.validateName=O;const A={gen:h,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===!0?{ref:c.schema,code:(0,e.stringify)(c.schema)}:{ref:c.schema}),validateName:O,ValidationError:S,schema:c.schema,schemaEnv:c,rootId:p,baseId:c.baseId||p,schemaPath:e.nil,errSchemaPath:c.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(c),(0,i.validateFunctionCode)(A),h.optimize(this.opts.code.optimize);const q=h.toString();D=`${h.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(D=this.opts.code.process(D,c));const G=new Function(`${n.default.self}`,`${n.default.scope}`,D)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=c.schema,G.schemaEnv=c,c.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:q,scopeValues:h._values}),this.opts.unevaluated){const{props:Z,items:ce}=A;G.evaluated={props:Z instanceof e.Name?void 0:Z,items:ce instanceof e.Name?void 0:ce,dynamicProps:Z instanceof e.Name,dynamicItems:ce instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return c.validate=G,c}catch(q){throw delete c.validate,delete c.validateName,D&&this.logger.error("Error compiling schema, function code:",D),q}finally{this._compilations.delete(c)}}t.compileSchema=a;function f(c,_,p){var v;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const b=c.refs[p];if(b)return b;let g=P.call(this,c,p);if(g===void 0){const h=(v=c.localRefs)===null||v===void 0?void 0:v[p],{schemaId:S}=this.opts;h&&(g=new u({schema:h,schemaId:S,root:c,baseId:_}))}if(g!==void 0)return c.refs[p]=l.call(this,g)}t.resolveRef=f;function l(c){return(0,s.inlineRef)(c.schema,this.opts.inlineRefs)?c.schema:c.validate?c:a.call(this,c)}function d(c){for(const _ of this._compilations)if(w(_,c))return _}t.getCompilingSchema=d;function w(c,_){return c.schema===_.schema&&c.root===_.root&&c.baseId===_.baseId}function P(c,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||$.call(this,c,_)}function $(c,_){const p=this.opts.uriResolver.parse(_),v=(0,s._getFullPath)(this.opts.uriResolver,p);let b=(0,s.getFullPath)(this.opts.uriResolver,c.baseId,void 0);if(Object.keys(c.schema).length>0&&v===b)return m.call(this,p,c);const g=(0,s.normalizeId)(v),h=this.refs[g]||this.schemas[g];if(typeof h=="string"){const S=$.call(this,c,h);return typeof(S==null?void 0:S.schema)!="object"?void 0:m.call(this,p,S)}if(typeof(h==null?void 0:h.schema)=="object"){if(h.validate||a.call(this,h),g===(0,s.normalizeId)(_)){const{schema:S}=h,{schemaId:O}=this.opts,A=S[O];return A&&(b=(0,s.resolveUrl)(this.opts.uriResolver,b,A)),new u({schema:S,schemaId:O,root:c,baseId:b})}return m.call(this,p,h)}}t.resolveSchema=$;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(c,{baseId:_,schema:p,root:v}){var b;if(((b=c.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const S of c.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,o.unescapeFragment)(S)];if(O===void 0)return;p=O;const A=typeof p=="object"&&p[this.opts.schemaId];!E.has(S)&&A&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,A))}let g;if(typeof p!="boolean"&&p.$ref&&!(0,o.schemaHasRulesButRef)(p,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);g=$.call(this,v,S)}const{schemaId:h}=this.opts;if(g=g||new u({schema:p,schemaId:h,root:v,baseId:_}),g.schema!==g.root.schema)return g}}),Vc=K(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Vi=K(function(t,e){var r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function s($){let E="",m=0,c=0;for(c=0;c<$.length;c++)if(m=$[c].charCodeAt(0),m!==48){if(!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=$[c];break}for(c+=1;c<$.length;c++){if(m=$[c].charCodeAt(0),!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=$[c]}return E}var o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i($){return $.length=0,!0}function u($,E,m){if($.length){const c=s($);if(c!=="")E.push(c);else return m.error=!0,!1;$.length=0}return!0}function a($){let E=0;const m={error:!1,address:"",zone:""},c=[],_=[];let p=!1,v=!1,b=u;for(let g=0;g<$.length;g++){const h=$[g];if(!(h==="["||h==="]"))if(h===":"){if(p===!0&&(v=!0),!b(_,c,m))break;if(++E>7){m.error=!0;break}g>0&&$[g-1]===":"&&(p=!0),c.push(":");continue}else if(h==="%"){if(!b(_,c,m))break;b=i}else{_.push(h);continue}}return _.length&&(b===i?m.zone=_.join(""):v?c.push(_.join("")):c.push(s(_))),m.address=c.join(""),m}function f($){if(l($,":")<2)return{host:$,isIPV6:!1};const E=a($);if(E.error)return{host:$,isIPV6:!1};{let m=E.address,c=E.address;return E.zone&&(m+="%"+E.zone,c+="%25"+E.zone),{host:m,isIPV6:!0,escapedHost:c}}}function l($,E){let m=0;for(let c=0;c<$.length;c++)$[c]===E&&m++;return m}function d($){let E=$;const m=[];let c=-1,_=0;for(;_=E.length;){if(_===1){if(E===".")break;if(E==="/"){m.push("/");break}else{m.push(E);break}}else if(_===2){if(E[0]==="."){if(E[1]===".")break;if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&(E[1]==="."||E[1]==="/")){m.push("/");break}}else if(_===3&&E==="/.."){m.length!==0&&m.pop(),m.push("/");break}if(E[0]==="."){if(E[1]==="."){if(E[2]==="/"){E=E.slice(3);continue}}else if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&E[1]==="."){if(E[2]==="/"){E=E.slice(2);continue}else if(E[2]==="."&&E[3]==="/"){E=E.slice(3),m.length!==0&&m.pop();continue}}if((c=E.indexOf("/",1))===-1){m.push(E);break}else m.push(E.slice(0,c)),E=E.slice(c)}return m.join("")}function w($,E){const m=E!==!0?escape:unescape;return $.scheme!==void 0&&($.scheme=m($.scheme)),$.userinfo!==void 0&&($.userinfo=m($.userinfo)),$.host!==void 0&&($.host=m($.host)),$.path!==void 0&&($.path=m($.path)),$.query!==void 0&&($.query=m($.query)),$.fragment!==void 0&&($.fragment=m($.fragment)),$}function P($){const E=[];if($.userinfo!==void 0&&(E.push($.userinfo),E.push("@")),$.host!==void 0){let m=unescape($.host);if(!n(m)){const c=f(m);c.isIPV6===!0?m=`[${c.escapedHost}]`:m=$.host}E.push(m)}return(typeof $.port=="number"||typeof $.port=="string")&&(E.push(":"),E.push(String($.port))),E.length?E.join(""):void 0}e.exports={nonSimpleDomain:o,recomposeAuthority:P,normalizeComponentEncoding:w,removeDotSegments:d,isIPv4:n,isUUID:r,normalizeIPv6:f,stringArrayToHexStripped:s}}),Uc=K(function(t,e){var{isUUID:r}=Vi(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function o(h){return s.indexOf(h)!==-1}function i(h){return h.secure===!0?!0:h.secure===!1?!1:h.scheme?h.scheme.length===3&&(h.scheme[0]==="w"||h.scheme[0]==="W")&&(h.scheme[1]==="s"||h.scheme[1]==="S")&&(h.scheme[2]==="s"||h.scheme[2]==="S"):!1}function u(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function a(h){const S=String(h.scheme).toLowerCase()==="https";return(h.port===(S?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function f(h){return h.secure=i(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function l(h){if((h.port===(i(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[S,O]=h.resourceName.split("?");h.path=S&&S!=="/"?S:void 0,h.query=O,h.resourceName=void 0}return h.fragment=void 0,h}function d(h,S){if(!h.path)return h.error="URN can not be parsed",h;const O=h.path.match(n);if(O){const A=S.scheme||h.scheme||"urn";h.nid=O[1].toLowerCase(),h.nss=O[2];const D=`${A}:${S.nid||h.nid}`,q=g(D);h.path=void 0,q&&(h=q.parse(h,S))}else h.error=h.error||"URN can not be parsed.";return h}function w(h,S){if(h.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=S.scheme||h.scheme||"urn",A=h.nid.toLowerCase(),D=`${O}:${S.nid||A}`,q=g(D);q&&(h=q.serialize(h,S));const X=h,G=h.nss;return X.path=`${A||S.nid}:${G}`,S.skipEscape=!0,X}function P(h,S){const O=h;return O.uuid=O.nss,O.nss=void 0,!S.tolerant&&(!O.uuid||!r(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function $(h){const S=h;return S.nss=(h.uuid||"").toLowerCase(),S}var E={scheme:"http",domainHost:!0,parse:u,serialize:a},m={scheme:"https",domainHost:E.domainHost,parse:u,serialize:a},c={scheme:"ws",domainHost:!0,parse:f,serialize:l},_={scheme:"wss",domainHost:c.domainHost,parse:c.parse,serialize:c.serialize},p={scheme:"urn",parse:d,serialize:w,skipNormalize:!0},v={scheme:"urn:uuid",parse:P,serialize:$,skipNormalize:!0},b={http:E,https:m,ws:c,wss:_,urn:p,"urn:uuid":v};Object.setPrototypeOf(b,null);function g(h){return h&&(b[h]||b[h.toLowerCase()])||void 0}e.exports={wsIsSecure:i,SCHEMES:b,isValidSchemeName:o,getSchemeHandler:g}}),Fc=K(function(t,e){var{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:s,normalizeComponentEncoding:o,isIPv4:i,nonSimpleDomain:u}=Vi(),{SCHEMES:a,getSchemeHandler:f}=Uc();function l(_,p){return typeof _=="string"?_=$(m(_,p),p):typeof _=="object"&&(_=m($(_,p),p)),_}function d(_,p,v){const b=v?Object.assign({scheme:"null"},v):{scheme:"null"},g=w(m(_,b),m(p,b),b,!0);return b.skipEscape=!0,$(g,b)}function w(_,p,v,b){const g={};return b||(_=m($(_,v),v),p=m($(p,v),v)),v=v||{},!v.tolerant&&p.scheme?(g.scheme=p.scheme,g.userinfo=p.userinfo,g.host=p.host,g.port=p.port,g.path=n(p.path||""),g.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(g.userinfo=p.userinfo,g.host=p.host,g.port=p.port,g.path=n(p.path||""),g.query=p.query):(p.path?(p.path[0]==="/"?g.path=n(p.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?g.path="/"+p.path:_.path?g.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+p.path:g.path=p.path,g.path=n(g.path)),g.query=p.query):(g.path=_.path,p.query!==void 0?g.query=p.query:g.query=_.query),g.userinfo=_.userinfo,g.host=_.host,g.port=_.port),g.scheme=_.scheme),g.fragment=p.fragment,g}function P(_,p,v){return typeof _=="string"?(_=unescape(_),_=$(o(m(_,v),!0),{...v,skipEscape:!0})):typeof _=="object"&&(_=$(o(_,!0),{...v,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=$(o(m(p,v),!0),{...v,skipEscape:!0})):typeof p=="object"&&(p=$(o(p,!0),{...v,skipEscape:!0})),_.toLowerCase()===p.toLowerCase()}function $(_,p){const v={host:_.host,scheme:_.scheme,userinfo:_.userinfo,port:_.port,path:_.path,query:_.query,nid:_.nid,nss:_.nss,uuid:_.uuid,fragment:_.fragment,reference:_.reference,resourceName:_.resourceName,secure:_.secure,error:""},b=Object.assign({},p),g=[],h=f(b.scheme||v.scheme);h&&h.serialize&&h.serialize(v,b),v.path!==void 0&&(b.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),b.reference!=="suffix"&&v.scheme&&g.push(v.scheme,":");const S=s(v);if(S!==void 0&&(b.reference!=="suffix"&&g.push("//"),g.push(S),v.path&&v.path[0]!=="/"&&g.push("/")),v.path!==void 0){let O=v.path;!b.absolutePath&&(!h||!h.absolutePath)&&(O=n(O)),S===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),g.push(O)}return v.query!==void 0&&g.push("?",v.query),v.fragment!==void 0&&g.push("#",v.fragment),g.join("")}var E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(_,p){const v=Object.assign({},p),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let g=!1;v.reference==="suffix"&&(v.scheme?_=v.scheme+":"+_:_="//"+_);const h=_.match(E);if(h){if(b.scheme=h[1],b.userinfo=h[3],b.host=h[4],b.port=parseInt(h[5],10),b.path=h[6]||"",b.query=h[7],b.fragment=h[8],isNaN(b.port)&&(b.port=h[5]),b.host)if(i(b.host)===!1){const A=r(b.host);b.host=A.host.toLowerCase(),g=A.isIPV6}else g=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==b.reference&&(b.error=b.error||"URI is not a "+v.reference+" reference.");const S=f(v.scheme||b.scheme);if(!v.unicodeSupport&&(!S||!S.unicodeSupport)&&b.host&&(v.domainHost||S&&S.domainHost)&&g===!1&&u(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(O){b.error=b.error||"Host's domain name can not be converted to ASCII: "+O}(!S||S&&!S.skipNormalize)&&(_.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),S&&S.parse&&S.parse(b,v)}else b.error=b.error||"URI can not be parsed.";return b}var c={SCHEMES:a,normalize:l,resolve:d,resolveComponent:w,equal:P,serialize:$,parse:m};e.exports=c,e.exports.default=c,e.exports.fastUri=c}),zc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fc();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),Bc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=on();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Me();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=cs(),s=cn(),o=Di(),i=us(),u=Me(),a=an(),f=Xr(),l=Fe(),d=Vc(),w=zc(),P=(z,T)=>new RegExp(z,T);P.code="new RegExp";var $=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},c={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function p(z){var T,U,I,y,k,C,H,x,ae,ne,ve,N,R,V,B,Q,re,be,Ve,Te,je,_e,xe,Ie,yt;const st=z.strict,mt=(T=z.code)===null||T===void 0?void 0:T.optimize,Et=mt===!0||mt===void 0?1:mt||0,ct=(I=(U=z.code)===null||U===void 0?void 0:U.regExp)!==null&&I!==void 0?I:P,$t=(y=z.uriResolver)!==null&&y!==void 0?y:w.default;return{strictSchema:(C=(k=z.strictSchema)!==null&&k!==void 0?k:st)!==null&&C!==void 0?C:!0,strictNumbers:(x=(H=z.strictNumbers)!==null&&H!==void 0?H:st)!==null&&x!==void 0?x:!0,strictTypes:(ne=(ae=z.strictTypes)!==null&&ae!==void 0?ae:st)!==null&&ne!==void 0?ne:"log",strictTuples:(N=(ve=z.strictTuples)!==null&&ve!==void 0?ve:st)!==null&&N!==void 0?N:"log",strictRequired:(V=(R=z.strictRequired)!==null&&R!==void 0?R:st)!==null&&V!==void 0?V:!1,code:z.code?{...z.code,optimize:Et,regExp:ct}:{optimize:Et,regExp:ct},loopRequired:(B=z.loopRequired)!==null&&B!==void 0?B:_,loopEnum:(Q=z.loopEnum)!==null&&Q!==void 0?Q:_,meta:(re=z.meta)!==null&&re!==void 0?re:!0,messages:(be=z.messages)!==null&&be!==void 0?be:!0,inlineRefs:(Ve=z.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Te=z.schemaId)!==null&&Te!==void 0?Te:"$id",addUsedSchema:(je=z.addUsedSchema)!==null&&je!==void 0?je:!0,validateSchema:(_e=z.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=z.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=z.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=z.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:$t}}class v{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...p(T)};const{es5:U,lines:I}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:E,es5:U,lines:I}),this.logger=q(T.logger);const y=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),b.call(this,m,T,"NOT SUPPORTED"),b.call(this,c,T,"DEPRECATED","warn"),this._metaOpts=A.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),h.call(this),T.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:U,schemaId:I}=this.opts;let y=d;I==="id"&&(y={...d},y.id=y.$id,delete y.$id),U&&T&&this.addMetaSchema(y,y[I],!1)}defaultMeta(){const{meta:T,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[U]||T:void 0}validate(T,U){let I;if(typeof T=="string"){if(I=this.getSchema(T),!I)throw new Error(`no schema with key or ref "${T}"`)}else I=this.compile(T);const y=I(U);return"$async"in I||(this.errors=I.errors),y}compile(T,U){const I=this._addSchema(T,U);return I.validate||this._compileSchemaEnv(I)}compileAsync(T,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return y.call(this,T,U);async function y(ne,ve){await k.call(this,ne.$schema);const N=this._addSchema(ne,ve);return N.validate||C.call(this,N)}async function k(ne){ne&&!this.getSchema(ne)&&await y.call(this,{$ref:ne},!0)}async function C(ne){try{return this._compileSchemaEnv(ne)}catch(ve){if(!(ve instanceof s.default))throw ve;return H.call(this,ve),await x.call(this,ve.missingSchema),C.call(this,ne)}}function H({missingSchema:ne,missingRef:ve}){if(this.refs[ne])throw new Error(`AnySchema ${ne} is loaded but ${ve} cannot be resolved`)}async function x(ne){const ve=await ae.call(this,ne);this.refs[ne]||await k.call(this,ve.$schema),this.refs[ne]||this.addSchema(ve,ne,U)}async function ae(ne){const ve=this._loading[ne];if(ve)return ve;try{return await(this._loading[ne]=I(ne))}finally{delete this._loading[ne]}}}addSchema(T,U,I,y=this.opts.validateSchema){if(Array.isArray(T)){for(const C of T)this.addSchema(C,void 0,I,y);return this}let k;if(typeof T=="object"){const{schemaId:C}=this.opts;if(k=T[C],k!==void 0&&typeof k!="string")throw new Error(`schema ${C} must be string`)}return U=(0,a.normalizeId)(U||k),this._checkUnique(U),this.schemas[U]=this._addSchema(T,I,U,y,!0),this}addMetaSchema(T,U,I=this.opts.validateSchema){return this.addSchema(T,U,!0,I),this}validateSchema(T,U){if(typeof T=="boolean")return!0;let I;if(I=T.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(I,T);if(!y&&U){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return y}getSchema(T){let U;for(;typeof(U=g.call(this,T))=="string";)T=U;if(U===void 0){const{schemaId:I}=this.opts,y=new i.SchemaEnv({schema:{},schemaId:I});if(U=i.resolveSchema.call(this,y,T),!U)return;this.refs[T]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=g.call(this,T);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const U=T;this._cache.delete(U);let I=T[this.opts.schemaId];return I&&(I=(0,a.normalizeId)(I),delete this.schemas[I],delete this.refs[I]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const U of T)this.addKeyword(U);return this}addKeyword(T,U){let I;if(typeof T=="string")I=T,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=I);else if(typeof T=="object"&&U===void 0){if(U=T,I=U.keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,I,U),!U)return(0,l.eachItem)(I,k=>Z.call(this,k)),this;ye.call(this,U);const y={...U,type:(0,f.getJSONTypes)(U.type),schemaType:(0,f.getJSONTypes)(U.schemaType)};return(0,l.eachItem)(I,y.type.length===0?k=>Z.call(this,k,y):k=>y.type.forEach(C=>Z.call(this,k,y,C))),this}getKeyword(T){const U=this.RULES.all[T];return typeof U=="object"?U.definition:!!U}removeKeyword(T){const{RULES:U}=this;delete U.keywords[T],delete U.all[T];for(const I of U.rules){const y=I.rules.findIndex(k=>k.keyword===T);y>=0&&I.rules.splice(y,1)}return this}addFormat(T,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[T]=U,this}errorsText(T=this.errors,{separator:U=", ",dataVar:I="data"}={}){return!T||T.length===0?"No errors":T.map(y=>`${I}${y.instancePath} ${y.message}`).reduce((y,k)=>y+U+k)}$dataMetaSchema(T,U){const I=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const y of U){const k=y.split("/").slice(1);let C=T;for(const H of k)C=C[H];for(const H in I){const x=I[H];if(typeof x!="object")continue;const{$data:ae}=x.definition,ne=C[H];ae&&ne&&(C[H]=ie(ne))}}return T}_removeAllSchemas(T,U){for(const I in T){const y=T[I];(!U||U.test(I))&&(typeof y=="string"?delete T[I]:y&&!y.meta&&(this._cache.delete(y.schema),delete T[I]))}}_addSchema(T,U,I,y=this.opts.validateSchema,k=this.opts.addUsedSchema){let C;const{schemaId:H}=this.opts;if(typeof T=="object")C=T[H];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let x=this._cache.get(T);if(x!==void 0)return x;I=(0,a.normalizeId)(C||I);const ae=a.getSchemaRefs.call(this,T,I);return x=new i.SchemaEnv({schema:T,schemaId:H,meta:U,baseId:I,localRefs:ae}),this._cache.set(x.schema,x),k&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=x),y&&this.validateSchema(T,!0),x}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):i.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const U=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,T)}finally{this.opts=U}}}v.ValidationError=n.default,v.MissingRefError=s.default,t.default=v;function b(z,T,U,I="error"){for(const y in z){const k=y;k in T&&this.logger[I](`${U}: option ${y}. ${z[k]}`)}}function g(z){return z=(0,a.normalizeId)(z),this.schemas[z]||this.refs[z]}function h(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const T in z)this.addSchema(z[T],T)}function S(){for(const z in this.opts.formats){const T=this.opts.formats[z];T&&this.addFormat(z,T)}}function O(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in z){const U=z[T];U.keyword||(U.keyword=T),this.addKeyword(U)}}function A(){const z={...this.opts};for(const T of $)delete z[T];return z}var D={log(){},warn(){},error(){}};function q(z){if(z===!1)return D;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(z,T){const{RULES:U}=this;if((0,l.eachItem)(z,I=>{if(U.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!X.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function Z(z,T,U){var I;const y=T==null?void 0:T.post;if(U&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let C=y?k.post:k.rules.find(({type:x})=>x===U);if(C||(C={type:U,rules:[]},k.rules.push(C)),k.keywords[z]=!0,!T)return;const H={keyword:z,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?ce.call(this,C,H,T.before):C.rules.push(H),k.all[z]=H,(I=T.implements)===null||I===void 0||I.forEach(x=>this.addKeyword(x))}function ce(z,T,U){const I=z.rules.findIndex(y=>y.keyword===U);I>=0?z.rules.splice(I,0,T):(z.rules.push(T),this.logger.warn(`rule ${U} is not defined`))}function ye(z){let{metaSchema:T}=z;T!==void 0&&(z.$data&&this.opts.$data&&(T=ie(T)),z.validateSchema=this.compile(T,!0))}var Re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ie(z){return{anyOf:[z,Re]}}}),xc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Hc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=cn(),r=At(),n=Me(),s=Zt(),o=us(),i=Fe(),u={keyword:"$ref",schemaType:"string",code(l){const{gen:d,schema:w,it:P}=l,{baseId:$,schemaEnv:E,validateName:m,opts:c,self:_}=P,{root:p}=E;if((w==="#"||w==="#/")&&$===p.baseId)return b();const v=o.resolveRef.call(_,p,$,w);if(v===void 0)throw new e.default(P.opts.uriResolver,$,w);if(v instanceof o.SchemaEnv)return g(v);return h(v);function b(){if(E===p)return f(l,m,E,E.$async);const S=d.scopeValue("root",{ref:p});return f(l,(0,n._)`${S}.validate`,p,p.$async)}function g(S){const O=a(l,S);f(l,O,S,S.$async)}function h(S){const O=d.scopeValue("schema",c.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),A=d.name("valid"),D=l.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},A);l.mergeEvaluated(D),l.ok(A)}}};function a(l,d){const{gen:w}=l;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(l,d,w,P){const{gen:$,it:E}=l,{allErrors:m,schemaEnv:c,opts:_}=E,p=_.passContext?s.default.this:n.nil;P?v():b();function v(){if(!c.$async)throw new Error("async schema referenced by sync schema");const S=$.let("valid");$.try(()=>{$.code((0,n._)`await ${(0,r.callValidateCode)(l,d,p)}`),h(d),m||$.assign(S,!0)},O=>{$.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>$.throw(O)),g(O),m||$.assign(S,!1)}),l.ok(S)}function b(){l.result((0,r.callValidateCode)(l,d,p),()=>h(d),()=>g(d))}function g(S){const O=(0,n._)`${S}.errors`;$.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),$.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function h(S){var O;if(!E.opts.unevaluated)return;const A=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(E.props=i.mergeEvaluated.props($,A.props,E.props));else{const D=$.var("props",(0,n._)`${S}.evaluated.props`);E.props=i.mergeEvaluated.props($,D,E.props,n.Name)}if(E.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(E.items=i.mergeEvaluated.items($,A.items,E.items));else{const D=$.var("items",(0,n._)`${S}.evaluated.items`);E.items=i.mergeEvaluated.items($,D,E.items,n.Name)}}}t.callRef=f,t.default=u}),Kc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=xc(),r=Hc(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),Gc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:i,schemaCode:u})=>(0,e.str)`must be ${n[i].okStr} ${u}`,params:({keyword:i,schemaCode:u})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${u}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[u].fail} ${f} || isNaN(${a})`)}};t.default=o}),Wc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:o,data:i,schemaCode:u,it:a}=s,f=a.opts.multipleOfPrecision,l=o.let("res"),d=f?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${f}`:(0,e._)`${l} !== parseInt(${l})`;s.fail$data((0,e._)`(${u} === 0 || (${l} = ${i}/${u}, ${d}))`)}};t.default=n}),Jc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,o=0,i;for(;o<n;)s++,i=r.charCodeAt(o++),i>=55296&&i<=56319&&o<n&&(i=r.charCodeAt(o),(i&64512)===56320&&o++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),Qc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=Jc(),s={message({keyword:i,schemaCode:u}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${u} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f,it:l}=i,d=u==="maxLength"?e.operators.GT:e.operators.LT,w=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${d} ${f}`)}};t.default=o}),Xc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Fe(),n=Me(),s={message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schema:l,schemaCode:d,it:w}=i,P=w.opts.unicodeRegExp?"u":"";if(f){const{regExp:$}=w.opts.code,E=$.code==="new RegExp"?(0,n._)`new RegExp`:(0,r.useFunc)(u,$),m=u.let("valid");u.try(()=>u.assign(m,(0,n._)`${E}(${d}, ${P}).test(${a})`),()=>u.assign(m,!1)),i.fail$data((0,n._)`!${m}`)}else{const $=(0,e.usePattern)(i,l);i.fail$data((0,n._)`!${$}.test(${a})`)}}};t.default=o}),Yc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message({keyword:s,schemaCode:o}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:u}=s,a=o==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${u}`)}};t.default=n}),Zc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Me(),n=Fe(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,schema:a,schemaCode:f,data:l,$data:d,it:w}=i,{opts:P}=w;if(!d&&a.length===0)return;const $=a.length>=P.loopRequired;if(w.allErrors?E():m(),P.strictRequired){const p=i.parentSchema.properties,{definedProperties:v}=i.it;for(const b of a)if((p==null?void 0:p[b])===void 0&&!v.has(b)){const g=w.schemaEnv.baseId+w.errSchemaPath,h=`required property "${b}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)(w,h,w.opts.strictRequired)}}function E(){if($||d)i.block$data(r.nil,c);else for(const p of a)(0,e.checkReportMissingProp)(i,p)}function m(){const p=u.let("missing");if($||d){const v=u.let("valid",!0);i.block$data(v,()=>_(p,v)),i.ok(v)}else u.if((0,e.checkMissingProp)(i,a,p)),(0,e.reportMissingProp)(i,p),u.else()}function c(){u.forOf("prop",f,p=>{i.setParams({missingProperty:p}),u.if((0,e.noPropertyInData)(u,l,p,P.ownProperties),()=>i.error())})}function _(p,v){i.setParams({missingProperty:p}),u.forOf(p,f,()=>{u.assign(v,(0,e.propertyInData)(u,l,p,P.ownProperties)),u.if((0,r.not)(v),()=>{i.error(),u.break()})},r.nil)}}};t.default=o}),eu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message({keyword:s,schemaCode:o}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:u}=s,a=o==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${u}`)}};t.default=n}),ls=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=sn();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),tu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Xr(),r=Me(),n=Fe(),s=ls(),o={message:({params:{i:u,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${u} are identical)`,params:({params:{i:u,j:a}})=>(0,r._)`{i: ${u}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:o,code(u){const{gen:a,data:f,$data:l,schema:d,parentSchema:w,schemaCode:P,it:$}=u;if(!l&&!d)return;const E=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(E,c,(0,r._)`${P} === false`),u.ok(E);function c(){const b=a.let("i",(0,r._)`${f}.length`),g=a.let("j");u.setParams({i:b,j:g}),a.assign(E,!0),a.if((0,r._)`${b} > 1`,()=>(_()?p:v)(b,g))}function _(){return m.length>0&&!m.some(b=>b==="object"||b==="array")}function p(b,g){const h=a.name("item"),S=(0,e.checkDataTypes)(m,h,$.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${b}--;`,()=>{a.let(h,(0,r._)`${f}[${b}]`),a.if(S,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${h} == "string"`,(0,r._)`${h} += "_"`),a.if((0,r._)`typeof ${O}[${h}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${h}]`),u.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${h}] = ${b}`)})}function v(b,g){const h=(0,n.useFunc)(a,s.default),S=a.name("outer");a.label(S).for((0,r._)`;${b}--;`,()=>a.for((0,r._)`${g} = ${b}; ${g}--;`,()=>a.if((0,r._)`${h}(${f}[${b}], ${f}[${g}])`,()=>{u.error(),a.assign(E,!1).break(S)})))}}};t.default=i}),ru=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=ls(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},o={keyword:"const",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schemaCode:l,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${a}, ${l})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=o}),nu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=ls(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},o={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schema:l,schemaCode:d,it:w}=i;if(!f&&l.length===0)throw new Error("enum must have non-empty array");const P=l.length>=w.opts.loopEnum;let $;const E=()=>$??($=(0,r.useFunc)(u,n.default));let m;if(P||f)m=u.let("valid"),i.block$data(m,c);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=u.const("vSchema",d);m=(0,e.or)(...l.map((v,b)=>_(p,b)))}i.pass(m);function c(){u.assign(m,!1),u.forOf("v",d,p=>u.if((0,e._)`${E()}(${a}, ${p})`,()=>u.assign(m,!0).break()))}function _(p,v){const b=l[v];return typeof b=="object"&&b!==null?(0,e._)`${E()}(${a}, ${p}[${v}])`:(0,e._)`${a} === ${b}`}}};t.default=o}),su=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Gc(),r=Wc(),n=Qc(),s=Xc(),o=Yc(),i=Zc(),u=eu(),a=tu(),f=ru(),l=nu(),d=[e.default,r.default,n.default,s.default,o.default,i.default,u.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=d}),Ui=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Me(),r=Fe(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:u,it:a}=i,{items:f}=u;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(i,f)}};function o(i,u){const{gen:a,schema:f,data:l,keyword:d,it:w}=i;w.items=!0;const P=a.const("len",(0,e._)`${l}.length`);if(f===!1)i.setParams({len:u.length}),i.pass((0,e._)`${P} <= ${u.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)(w,f)){const E=a.var("valid",(0,e._)`${P} <= ${u.length}`);a.if((0,e.not)(E),()=>$(E)),i.ok(E)}function $(E){a.forRange("i",u.length,P,m=>{i.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=o,t.default=s}),Fi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Me(),r=Fe(),n=At(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:u,it:a}=i;if(Array.isArray(u))return o(i,"additionalItems",u);a.items=!0,!(0,r.alwaysValidSchema)(a,u)&&i.ok((0,n.validateArray)(i))}};function o(i,u,a=i.schema){const{gen:f,parentSchema:l,data:d,keyword:w,it:P}=i;m(l),P.opts.unevaluated&&a.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(f,a.length,P.items));const $=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((c,_)=>{(0,r.alwaysValidSchema)(P,c)||(f.if((0,e._)`${E} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},$)),i.ok($))});function m(c){const{opts:_,errSchemaPath:p}=P,v=a.length,b=v===c.minItems&&(v===c.maxItems||c[u]===!1);if(_.strictTuples&&!b){const g=`"${w}" is ${v}-tuple, but minItems or maxItems/${u} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(P,g,_.strictTuples)}}}t.validateTuple=o,t.default=s}),iu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fi(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),au=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=At(),s=Ui(),o={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:o,code(u){const{schema:a,parentSchema:f,it:l}=u,{prefixItems:d}=f;l.items=!0,!(0,r.alwaysValidSchema)(l,a)&&(d?(0,s.validateAdditionalItems)(u,d):u.ok((0,n.validateArray)(u)))}};t.default=i}),ou=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:({params:{min:o,max:i}})=>i===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${i} valid item(s)`,params:({params:{min:o,max:i}})=>i===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(o){const{gen:i,schema:u,parentSchema:a,data:f,it:l}=o;let d,w;const{minContains:P,maxContains:$}=a;l.opts.next?(d=P===void 0?1:P,w=$):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(o.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,r.alwaysValidSchema)(l,u)){let v=(0,e._)`${E} >= ${d}`;w!==void 0&&(v=(0,e._)`${v} && ${E} <= ${w}`),o.pass(v);return}l.items=!0;const m=i.name("valid");w===void 0&&d===1?_(m,()=>i.if(m,()=>i.break())):d===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${f}.length > 0`,c)):(i.let(m,!1),c()),o.result(m,()=>o.reset());function c(){const v=i.name("_valid"),b=i.let("count",0);_(v,()=>i.if(v,()=>p(b)))}function _(v,b){i.forRange("i",0,E,g=>{o.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},v),b()})}function p(v){i.code((0,e._)`${v}++`),w===void 0?i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${v} > ${w}`,()=>i.assign(m,!1).break()),d===1?i.assign(m,!0):i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0)))}}};t.default=s}),cu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Me(),r=Fe(),n=At();t.error={message:({params:{property:a,depsCount:f,deps:l}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${l} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:l,missingProperty:d}})=>(0,e._)`{property: ${a},
|
|
8
|
+
}</style>`),kc=Be('<div class="p-8 text-center text-gray-500"><div class="text-4xl mb-2">📭</div> <p class="font-medium">No activity yet</p> <p class="text-sm">Activity will appear here when you interact with Sockethub</p></div>'),Oc=Be('<ul class="divide-y divide-gray-100"></ul>'),Nc=Be('<div class="bg-gradient-to-r from-purple-50 to-pink-50 border border-purple-200 rounded-lg p-4"><h4 class="font-semibold text-purple-900 mb-3 flex items-center"><span class="mr-2">🖼️</span> Rendered Preview</h4> <!></div>'),Tc=Be('<div class="bg-gradient-to-r from-green-50 to-emerald-50 border border-green-200 rounded-lg p-4"><h4 class="font-semibold text-green-900 mb-3 flex items-center"><span class="mr-2">📥</span> Response from Sockethub</h4> <div class="bg-white rounded border border-green-200 overflow-hidden"><!></div></div>'),Rc=Be(`<div class="bg-gradient-to-r from-slate-50 to-gray-50 border border-gray-200 rounded-xl p-6 shadow-sm"><div class="flex items-center justify-between mb-4"><div><h3 class="text-xl font-bold text-gray-900 flex items-center"><span class="mr-2">📡</span> Sockethub Activity Log</h3> <p class="text-gray-600 text-sm mt-1">Real-time communication between your browser and Sockethub server</p></div> <div class="flex items-center space-x-4 text-xs"><div class="flex items-center space-x-1"><div class="w-3 h-3 bg-orange-400 rounded-full"></div> <span class="text-gray-600">Pending</span></div> <div class="flex items-center space-x-1"><div class="w-3 h-3 bg-green-500 rounded-full"></div> <span class="text-gray-600">Complete</span></div> <div class="flex items-center space-x-1"><div class="w-3 h-3 bg-indigo-500 rounded-full"></div> <span class="text-gray-600">Schema</span></div></div></div> <div class="bg-white rounded-lg border border-gray-200 shadow-sm"><div class="p-4 border-b border-gray-200 bg-gray-50 rounded-t-lg"><p class="text-sm text-gray-700">💡 <strong>How to read this log:</strong> Each entry shows messages sent to and received from Sockethub.
|
|
9
|
+
Click "View Details" to see the full JSON data being exchanged.</p></div> <div id="messages" class="max-h-96 overflow-y-auto"><!></div></div></div> <div><div class="bg-white rounded-xl shadow-2xl max-w-4xl w-full max-h-[90vh] overflow-hidden flex flex-col"><div class="bg-gradient-to-r from-indigo-50 to-purple-50 px-6 py-4 border-b border-gray-200"><div class="flex items-center justify-between"><h3 class="text-lg font-bold text-gray-900 flex items-center"><span class="mr-2">🔍</span> </h3> <button type="button" aria-label="Close activity log details" class="text-gray-400 hover:text-gray-600 transition-colors"><svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <p class="text-gray-600 text-sm mt-1">Raw JSON data showing the ActivityStreams message exchange with Sockethub</p></div> <div class="flex-1 overflow-auto p-6 space-y-6"><!> <div class="bg-gradient-to-r from-blue-50 to-cyan-50 border border-blue-200 rounded-lg p-4"><h4 class="font-semibold text-blue-900 mb-3 flex items-center"><span class="mr-2"> </span> </h4> <div class="bg-white rounded border border-blue-200 overflow-hidden"><!></div></div> <!></div> <div class="bg-gray-50 px-6 py-4 border-t border-gray-200 flex justify-end"><button class="px-6 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition-colors font-medium">Close</button></div></div></div>`,1);function Xd(t,e){Ut(e,!0);let r=Dt(Nn({})),n=Dt(Nn({})),s=Dt(Nn([])),o=Dt(!1),i=Dt(""),l=Dt(""),a=Dt("ActivityStreams Data Exchange"),f=Dt(void 0);Ci.subscribe(k=>{ht(r,k,!0)}),Ai.subscribe(k=>{ht(n,k,!0)}),ji.subscribe(k=>{ht(s,k,!0)});const u=Ge(()=>{const k=[];for(const[A,H]of Object.entries(te(r)??{})){const x=te(n)[A];k.push({kind:"activity",id:A,sortKey:(x==null?void 0:x.sortKey)??0,tuple:H,timestamp:(x==null?void 0:x.timestamp)??0})}for(const A of te(s))k.push({kind:"schema",sortKey:A._sortKey,entry:A});return k.sort((A,H)=>H.sortKey-A.sortKey),k});function d(k){return()=>{const{sent:A,response:H}=xo(te(r),te(n),k);ht(a,"ActivityStreams Data Exchange"),ht(o,!0),ht(i,A?JSON.stringify(A,null,2):"",!0),ht(l,H&&Object.keys(H).length>0?JSON.stringify(H,null,2):"",!0);const x=H==null?void 0:H.object;ht(f,Ho(x)?x:void 0,!0)}}function w(k){return()=>{ht(a,`Schema Event: ${k._logType}`),ht(o,!0),ht(i,JSON.stringify(k.payload,null,2),!0),ht(l,""),ht(f,void 0)}}var P=Rc();Io("asm1x0",k=>{var A=Gt(),H=wt(A);{var x=ae=>{var ne=Pc();Ne(ae,ne)};ot(H,ae=>{te(o)&&ae(x)})}Ne(k,A)});var $=wt(P),E=Oe(de($),2),m=Oe(de(E),2),c=de(m);{var _=k=>{var A=kc();Ne(k,A)},p=k=>{var A=Oc();Wn(A,21,()=>te(u),H=>H.kind==="schema"?H.entry._logId:H.id,(H,x)=>{var ae=Gt(),ne=wt(ae);{var ve=R=>{{let V=Ge(()=>w(te(x).entry));yc(R,{get entry(){return te(x).entry},get buttonAction(){return te(V)}})}},N=R=>{var V=Gt(),B=wt(V);{var Q=be=>{var Ve=Gt(),Te=wt(Ve);Wn(Te,17,()=>Object.entries(te(x).tuple[te(x).tuple.length-1]),Si,(je,_e)=>{var xe=Ge(()=>po(te(_e),2));let Ie=()=>te(xe)[0],yt=()=>te(xe)[1];var st=Gt(),mt=wt(st);{var Et=ct=>{{let $t=Ge(()=>d(`${te(x).id}-${Ie()}`)),ir=Ge(()=>Object.prototype.hasOwnProperty.call(te(x).tuple[0],"@context")),ar=Ge(()=>typeof te(r)[te(x).id][1]<"u"),zt=Ge(()=>`${te(x).id}-${Ie()}`);Vs(ct,{get buttonAction(){return te($t)},get hasSend(){return te(ir)},get hasResponse(){return te(ar)},get id(){return te(zt)},get entry(){return yt()},get timestamp(){return te(x).timestamp}})}};ot(mt,ct=>{yt()&&ct(Et)})}Ne(je,st)}),Ne(be,Ve)},re=be=>{const Ve=Ge(()=>Object.prototype.hasOwnProperty.call(te(x).tuple[0],"@context")),Te=Ge(()=>Object.prototype.hasOwnProperty.call(te(x).tuple[1],"@context"));{let je=Ge(()=>d(te(x).id)),_e=Ge(()=>te(Te)?te(x).tuple[1]:te(x).tuple[0]);Vs(be,{get buttonAction(){return te(je)},get id(){return te(x).id},get hasSend(){return te(Ve)},get hasResponse(){return te(Te)},get entry(){return te(_e)},get timestamp(){return te(x).timestamp}})}};ot(B,be=>{Array.isArray(te(x).tuple[te(x).tuple.length-1])?be(Q):be(re,!1)},!0)}Ne(R,V)};ot(ne,R=>{te(x).kind==="schema"?R(ve):R(N,!1)})}Ne(H,ae)}),le(A),Ne(k,A)};ot(c,k=>{te(u).length===0?k(_):k(p,!1)})}le(m),le(E),le($);var v=Oe($,2),b=de(v),g=de(b),h=de(g),S=de(h),O=Oe(de(S));le(S);var C=Oe(S,2);C.__click=()=>ht(o,!1),le(h),$i(2),le(g);var D=Oe(g,2),q=de(D);{var X=k=>{var A=Nc(),H=Oe(de(A),2);ec(H,{get page(){return te(f)}}),le(A),Ne(k,A)};ot(q,k=>{te(f)&&k(X)})}var G=Oe(q,2),Z=de(G),ce=de(Z),ye=de(ce,!0);le(ce);var Re=Oe(ce);le(Z);var ie=Oe(Z,2),z=de(ie);zs(z,{get language(){return Bs},get code(){return te(i)}}),le(ie),le(G);var T=Oe(G,2);{var U=k=>{var A=Tc(),H=Oe(de(A),2),x=de(H);zs(x,{get language(){return Bs},get code(){return te(l)}}),le(H),le(A),Ne(k,A)};ot(T,k=>{te(l)&&k(U)})}le(D);var I=Oe(D,2),y=de(I);y.__click=()=>ht(o,!1),le(I),le(b),le(v),nt(()=>{ur(v,1,`${te(o)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`),We(O,` ${te(a)??""}`),We(ye,te(l)?"📤":"📋"),We(Re,` ${te(l)?"Sent to Sockethub":"Event Payload"}`)}),Ne(t,P),Ft()}an(["click"]);var xs="https://sockethub.org/ns/context/platform/";function Qr(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(xs)){const r=e.slice(xs.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}var Ic=Object.create,Cc=Object.getPrototypeOf,Xr=Object.defineProperty,Mi=Object.getOwnPropertyNames,Ac=Object.getOwnPropertyDescriptor,Di=Object.prototype.hasOwnProperty;function qi(t){return this[t]}var jc,Pr=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=jc??(jc=new WeakMap),o=s.get(t);if(o)return o}r=t!=null?Ic(Cc(t)):{};const i=Xr(r,"default",{value:t,enumerable:!0});if(t&&typeof t=="object"||typeof t=="function")for(let l of Mi(t))Di.call(i,l)||Xr(i,l,{get:qi.bind(t,l),enumerable:!0});return n&&s.set(t,i),i},Mc=t=>{var e=(Hs??(Hs=new WeakMap)).get(t),r;if(e)return e;if(e=Xr({},"__esModule",{value:!0}),t&&typeof t=="object"||typeof t=="function")for(var n of Mi(t))Di.call(e,n)||Xr(e,n,{get:qi.bind(t,n),enumerable:!(r=Ac(t,n))||r.enumerable});return Hs.set(t,e),e},Hs,K=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Dc=(t,e,r)=>()=>{if(t)try{e=t(t=0)}catch(n){r=[n]}if(r)throw r[0];return e},Yr=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(_){if(super(),!t.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((p,v)=>`${p}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,v)=>(v instanceof r&&(p[v.str]=(p[v.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(c,..._){const p=[c[0]];let v=0;for(;v<_.length;)l(p,_[v]),p.push(c[++v]);return new n(p)}t._=s;var o=new n("+");function i(c,..._){const p=[P(c[0])];let v=0;for(;v<_.length;)p.push(o),l(p,_[v]),p.push(o,P(c[++v]));return a(p),new n(p)}t.str=i;function l(c,_){_ instanceof n?c.push(..._._items):_ instanceof r?c.push(_):c.push(d(_))}t.addCodeArg=l;function a(c){let _=1;for(;_<c.length-1;){if(c[_]===o){const p=f(c[_-1],c[_+1]);if(p!==void 0){c.splice(_-1,3,p);continue}c[_++]="+"}_++}}function f(c,_){if(_==='""')return c;if(c==='""')return _;if(typeof c=="string")return _ instanceof r||c[c.length-1]!=='"'?void 0:typeof _!="string"?`${c.slice(0,-1)}${_}"`:_[0]==='"'?c.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(c instanceof r))return`"${c}${_.slice(1)}`}function u(c,_){return _.emptyStr()?c:c.emptyStr()?_:i`${c}${_}`}t.strConcat=u;function d(c){return typeof c=="number"||typeof c=="boolean"||c===null?c:P(Array.isArray(c)?c.join(","):c)}function w(c){return new n(P(c))}t.stringify=w;function P(c){return JSON.stringify(c).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function $(c){return typeof c=="string"&&t.IDENTIFIER.test(c)?new n(`.${c}`):s`[${c}]`}t.getProperty=$;function E(c){if(typeof c=="string"&&t.IDENTIFIER.test(c))return new n(`${c}`);throw new Error(`CodeGen: invalid export name: ${c}, use explicit $id name mapping`)}t.getEsmExportName=E;function m(c){return new n(c.toString())}t.regexpCode=m}),Ks=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Yr();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.Completed=1]="Completed"})(n||(t.UsedValueState=n={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:f,parent:u}={}){this._names={},this._prefixes=f,this._parent=u}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const u=this._names[f]||this._nameGroup(f);return`${f}${u.index++}`}_nameGroup(f){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class o extends e.Name{constructor(f,u){super(u),this.prefix=f}setValue(f,{property:u,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(u)}[${d}]`}}t.ValueScopeName=o;var i=(0,e._)`\n`;class l extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new o(f,this._newName(f))}value(f,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(f),{prefix:P}=w,$=(d=u.key)!==null&&d!==void 0?d:u.ref;let E=this._values[P];if(E){const _=E.get($);if(_)return _}else E=this._values[P]=new Map;E.set($,w);const m=this._scope[P]||(this._scope[P]=[]),c=m.length;return m[c]=u.ref,w.setValue(u,{property:P,itemIndex:c}),w}getValue(f,u){const d=this._values[f];if(d)return d.get(u)}scopeRefs(f,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,u,d){return this._reduceValues(f,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},u,d)}_reduceValues(f,u,d={},w){let P=e.nil;for(const $ in f){const E=f[$];if(!E)continue;const m=d[$]=d[$]||new Map;E.forEach(c=>{if(m.has(c))return;m.set(c,n.Started);let _=u(c);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${p} ${c} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(c))P=(0,e._)`${P}${_}${this.opts._n}`;else throw new r(c);m.set(c,n.Completed)})}return P}}t.ValueScope=l}),Me=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Yr(),r=Ks(),n=Yr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Ks();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(y,k){return this}}class i extends o{constructor(y,k,A){super(),this.varKind=y,this.name=k,this.rhs=A}render({es5:y,_n:k}){const A=y?r.varKinds.var:this.varKind,H=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${H};`+k}optimizeNames(y,k){if(y[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,y,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends o{constructor(y,k,A){super(),this.lhs=y,this.rhs=k,this.sideEffects=A}render({_n:y}){return`${this.lhs} = ${this.rhs};`+y}optimizeNames(y,k){if(!(this.lhs instanceof e.Name&&!y[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,y,k),this}get names(){const y=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(y,this.rhs)}}class a extends l{constructor(y,k,A,H){super(y,A,H),this.op=k}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class f extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class u extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class d extends o{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class w extends o{constructor(y){super(),this.code=y}render({_n:y}){return`${this.code};`+y}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(y,k){return this.code=G(this.code,y,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends o{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((k,A)=>k+A.render(y),"")}optimizeNodes(){const{nodes:y}=this;let k=y.length;for(;k--;){const A=y[k].optimizeNodes();Array.isArray(A)?y.splice(k,1,...A):A?y[k]=A:y.splice(k,1)}return y.length>0?this:void 0}optimizeNames(y,k){const{nodes:A}=this;let H=A.length;for(;H--;){const x=A[H];x.optimizeNames(y,k)||(Z(y,x.names),A.splice(H,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((y,k)=>q(y,k.names),{})}}class $ extends P{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class E extends P{}class m extends ${}m.kind="else";class c extends ${constructor(y,k){super(k),this.condition=y}render(y){let k=`if(${this.condition})`+super.render(y);return this.else&&(k+="else "+this.else.render(y)),k}optimizeNodes(){super.optimizeNodes();const y=this.condition;if(y===!0)return this.nodes;let k=this.else;if(k){const A=k.optimizeNodes();k=this.else=Array.isArray(A)?new m(A):A}if(k)return y===!1?k instanceof c?k:k.nodes:this.nodes.length?this:new c(ce(y),k instanceof c?[k]:k.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,k){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(y,k),!!(super.optimizeNames(y,k)||this.else))return this.condition=G(this.condition,y,k),this}get names(){const y=super.names;return X(y,this.condition),this.else&&q(y,this.else.names),y}}c.kind="if";class _ extends ${}_.kind="for";class p extends _{constructor(y){super(),this.iteration=y}render(y){return`for(${this.iteration})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iteration=G(this.iteration,y,k),this}get names(){return q(super.names,this.iteration.names)}}class v extends _{constructor(y,k,A,H){super(),this.varKind=y,this.name=k,this.from=A,this.to=H}render(y){const k=y.es5?r.varKinds.var:this.varKind,{name:A,from:H,to:x}=this;return`for(${k} ${A}=${H}; ${A}<${x}; ${A}++)`+super.render(y)}get names(){const y=X(super.names,this.from);return X(y,this.to)}}class b extends _{constructor(y,k,A,H){super(),this.loop=y,this.varKind=k,this.name=A,this.iterable=H}render(y){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iterable=G(this.iterable,y,k),this}get names(){return q(super.names,this.iterable.names)}}class g extends ${constructor(y,k,A){super(),this.name=y,this.args=k,this.async=A}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}g.kind="func";class h extends P{render(y){return"return "+super.render(y)}}h.kind="return";class S extends ${render(y){let k="try"+super.render(y);return this.catch&&(k+=this.catch.render(y)),this.finally&&(k+=this.finally.render(y)),k}optimizeNodes(){var y,k;return super.optimizeNodes(),(y=this.catch)===null||y===void 0||y.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(y,k){var A,H;return super.optimizeNames(y,k),(A=this.catch)===null||A===void 0||A.optimizeNames(y,k),(H=this.finally)===null||H===void 0||H.optimizeNames(y,k),this}get names(){const y=super.names;return this.catch&&q(y,this.catch.names),this.finally&&q(y,this.finally.names),y}}class O extends ${constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}O.kind="catch";class C extends ${render(y){return"finally"+super.render(y)}}C.kind="finally";class D{constructor(y,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
10
|
+
`:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(y){return this._scope.name(y)}scopeName(y){return this._extScope.name(y)}scopeValue(y,k){const A=this._extScope.value(y,k);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(y,k){return this._extScope.getValue(y,k)}scopeRefs(y){return this._extScope.scopeRefs(y,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(y,k,A,H){const x=this._scope.toName(k);return A!==void 0&&H&&(this._constants[x.str]=A),this._leafNode(new i(y,x,A)),x}const(y,k,A){return this._def(r.varKinds.const,y,k,A)}let(y,k,A){return this._def(r.varKinds.let,y,k,A)}var(y,k,A){return this._def(r.varKinds.var,y,k,A)}assign(y,k,A){return this._leafNode(new l(y,k,A))}add(y,k){return this._leafNode(new a(y,t.operators.ADD,k))}code(y){return typeof y=="function"?y():y!==e.nil&&this._leafNode(new w(y)),this}object(...y){const k=["{"];for(const[A,H]of y)k.length>1&&k.push(","),k.push(A),(A!==H||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,H));return k.push("}"),new e._Code(k)}if(y,k,A){if(this._blockNode(new c(y)),k&&A)this.code(k).else().code(A).endIf();else if(k)this.code(k).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new c(y))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(c,m)}_for(y,k){return this._blockNode(y),k&&this.code(k).endFor(),this}for(y,k){return this._for(new p(y),k)}forRange(y,k,A,H,x=this.opts.es5?r.varKinds.var:r.varKinds.let){const ae=this._scope.toName(y);return this._for(new v(x,ae,k,A),()=>H(ae))}forOf(y,k,A,H=r.varKinds.const){const x=this._scope.toName(y);if(this.opts.es5){const ae=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ae}.length`,ne=>{this.var(x,(0,e._)`${ae}[${ne}]`),A(x)})}return this._for(new b("of",H,x,k),()=>A(x))}forIn(y,k,A,H=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,e._)`Object.keys(${k})`,A);const x=this._scope.toName(y);return this._for(new b("in",H,x,k),()=>A(x))}endFor(){return this._endBlockNode(_)}label(y){return this._leafNode(new f(y))}break(y){return this._leafNode(new u(y))}return(y){const k=new h;if(this._blockNode(k),this.code(y),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(h)}try(y,k,A){if(!k&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const H=new S;if(this._blockNode(H),this.code(y),k){const x=this.name("e");this._currNode=H.catch=new O(x),k(x)}return A&&(this._currNode=H.finally=new C,this.code(A)),this._endBlockNode(O,C)}throw(y){return this._leafNode(new d(y))}block(y,k){return this._blockStarts.push(this._nodes.length),y&&this.code(y).endBlock(k),this}endBlock(y){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-k;if(A<0||y!==void 0&&A!==y)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${y} expected`);return this._nodes.length=k,this}func(y,k=e.nil,A,H){return this._blockNode(new g(y,k,A)),H&&this.code(H).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(y=1){for(;y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(y){return this._currNode.nodes.push(y),this}_blockNode(y){this._currNode.nodes.push(y),this._nodes.push(y)}_endBlockNode(y,k){const A=this._currNode;if(A instanceof y||k&&A instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${y.kind}/${k.kind}`:y.kind}"`)}_elseNode(y){const k=this._currNode;if(!(k instanceof c))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=y,this}get _root(){return this._nodes[0]}get _currNode(){const y=this._nodes;return y[y.length-1]}set _currNode(y){const k=this._nodes;k[k.length-1]=y}}t.CodeGen=D;function q(I,y){for(const k in y)I[k]=(I[k]||0)+(y[k]||0);return I}function X(I,y){return y instanceof e._CodeOrName?q(I,y.names):I}function G(I,y,k){if(I instanceof e.Name)return A(I);if(!H(I))return I;return new e._Code(I._items.reduce((x,ae)=>(ae instanceof e.Name&&(ae=A(ae)),ae instanceof e._Code?x.push(...ae._items):x.push(ae),x),[]));function A(x){const ae=k[x.str];return ae===void 0||y[x.str]!==1?x:(delete y[x.str],ae)}function H(x){return x instanceof e._Code&&x._items.some(ae=>ae instanceof e.Name&&y[ae.str]===1&&k[ae.str]!==void 0)}}function Z(I,y){for(const k in y)I[k]=(I[k]||0)-(y[k]||0)}function ce(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,e._)`!${U(I)}`}t.not=ce;var ye=T(t.operators.AND);function Re(...I){return I.reduce(ye)}t.and=Re;var ie=T(t.operators.OR);function z(...I){return I.reduce(ie)}t.or=z;function T(I){return(y,k)=>y===e.nil?k:k===e.nil?y:(0,e._)`${U(y)} ${I} ${U(k)}`}function U(I){return I instanceof e.Name?I:(0,e._)`(${I})`}}),Fe=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Me(),r=Yr();function n(g){const h={};for(const S of g)h[S]=!0;return h}t.toHash=n;function s(g,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(o(g,h),!i(h,g.self.RULES.all))}t.alwaysValidSchema=s;function o(g,h=g.schema){const{opts:S,self:O}=g;if(!S.strictSchema||typeof h=="boolean")return;const C=O.RULES.keywords;for(const D in h)C[D]||b(g,`unknown keyword: "${D}"`)}t.checkUnknownRules=o;function i(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(h[S])return!0;return!1}t.schemaHasRules=i;function l(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(S!=="$ref"&&h.all[S])return!0;return!1}t.schemaHasRulesButRef=l;function a({topSchemaRef:g,schemaPath:h},S,O,C){if(!C){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${g}${h}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return w(decodeURIComponent(g))}t.unescapeFragment=f;function u(g){return encodeURIComponent(d(g))}t.escapeFragment=u;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function P(g,h){if(Array.isArray(g))for(const S of g)h(S);else h(g)}t.eachItem=P;function $({mergeNames:g,mergeToName:h,mergeValues:S,resultToName:O}){return(C,D,q,X)=>{const G=q===void 0?D:q instanceof e.Name?(D instanceof e.Name?g(C,D,q):h(C,D,q),q):D instanceof e.Name?(h(C,q,D),D):S(D,q);return X===e.Name&&!(G instanceof e.Name)?O(C,G):G}}t.mergeEvaluated={props:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>{g.if((0,e._)`${h} === true`,()=>g.assign(S,!0),()=>g.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${h})`))}),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>{h===!0?g.assign(S,!0):(g.assign(S,(0,e._)`${S} || {}`),m(g,S,h))}),mergeValues:(g,h)=>g===!0?!0:{...g,...h},resultToName:E}),items:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>g.assign(S,(0,e._)`${h} === true ? true : ${S} > ${h} ? ${S} : ${h}`)),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>g.assign(S,h===!0?!0:(0,e._)`${S} > ${h} ? ${S} : ${h}`)),mergeValues:(g,h)=>g===!0?!0:Math.max(g,h),resultToName:(g,h)=>g.var("items",h)})};function E(g,h){if(h===!0)return g.var("props",!0);const S=g.var("props",(0,e._)`{}`);return h!==void 0&&m(g,S,h),S}t.evaluatedPropsToName=E;function m(g,h,S){Object.keys(S).forEach(O=>g.assign((0,e._)`${h}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var c={};function _(g,h){return g.scopeValue("func",{ref:h,code:c[h.code]||(c[h.code]=new r._Code(h.code))})}t.useFunc=_;var p;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(p||(t.Type=p={}));function v(g,h,S){if(g instanceof e.Name){const O=h===p.Num;return S?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=v;function b(g,h,S=g.opts.strictSchema){if(S){if(h=`strict mode: ${h}`,S===!0)throw new Error(h);g.self.logger.warn(h)}}t.checkStrictMode=b}),Zt=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),on=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Me(),r=Fe(),n=Zt();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:c})=>c?(0,e.str)`"${m}" keyword must be ${c} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,c=t.keywordError,_,p){const{it:v}=m,{gen:b,compositeRule:g,allErrors:h}=v,S=d(m,c,_);p??(g||h)?a(b,S):f(v,(0,e._)`[${S}]`)}t.reportError=s;function o(m,c=t.keywordError,_){const{it:p}=m,{gen:v,compositeRule:b,allErrors:g}=p,h=d(m,c,_);a(v,h),b||g||f(p,n.default.vErrors)}t.reportExtraError=o;function i(m,c){m.assign(n.default.errors,c),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(c,()=>m.assign((0,e._)`${n.default.vErrors}.length`,c),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function l({gen:m,keyword:c,schemaValue:_,data:p,errsCount:v,it:b}){if(v===void 0)throw new Error("ajv implementation error");const g=m.name("err");m.forRange("i",v,n.default.errors,h=>{m.const(g,(0,e._)`${n.default.vErrors}[${h}]`),m.if((0,e._)`${g}.instancePath === undefined`,()=>m.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,b.errorPath))),m.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${c}`),b.opts.verbose&&(m.assign((0,e._)`${g}.schema`,_),m.assign((0,e._)`${g}.data`,p))})}t.extendErrors=l;function a(m,c){const _=m.const("err",c);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${_}]`),(0,e._)`${n.default.vErrors}.push(${_})`),m.code((0,e._)`${n.default.errors}++`)}function f(m,c){const{gen:_,validateName:p,schemaEnv:v}=m;v.$async?_.throw((0,e._)`new ${m.ValidationError}(${c})`):(_.assign((0,e._)`${p}.errors`,c),_.return(!1))}var u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(m,c,_){const{createErrors:p}=m.it;return p===!1?(0,e._)`{}`:w(m,c,_)}function w(m,c,_={}){const{gen:p,it:v}=m,b=[P(v,_),$(m,_)];return E(m,c,b),p.object(...b)}function P({errorPath:m},{instancePath:c}){const _=c?(0,e.str)`${m}${(0,r.getErrorPath)(c,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function $({keyword:m,it:{errSchemaPath:c}},{schemaPath:_,parentSchema:p}){let v=p?c:(0,e.str)`${c}/${m}`;return _&&(v=(0,e.str)`${v}${(0,r.getErrorPath)(_,r.Type.Str)}`),[u.schemaPath,v]}function E(m,{params:c,message:_},p){const{keyword:v,data:b,schemaValue:g,it:h}=m,{opts:S,propertyName:O,topSchemaRef:C,schemaPath:D}=h;p.push([u.keyword,v],[u.params,typeof c=="function"?c(m):c||(0,e._)`{}`]),S.messages&&p.push([u.message,typeof _=="function"?_(m):_]),S.verbose&&p.push([u.schema,g],[u.parentSchema,(0,e._)`${C}${D}`],[n.default.data,b]),O&&p.push([u.propertyName,O])}}),qc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=on(),r=Me(),n=Zt(),s={message:"boolean schema is false"};function o(a){const{gen:f,schema:u,validateName:d}=a;u===!1?l(a,!1):typeof u=="object"&&u.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=o;function i(a,f){const{gen:u,schema:d}=a;d===!1?(u.var(f,!1),l(a)):u.var(f,!0)}t.boolOrEmptySchema=i;function l(a,f){const{gen:u,data:d}=a,w={gen:u,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,f)}}),Li=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(o){return typeof o=="string"&&r.has(o)}t.isJSONType=n;function s(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Vi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:o},i){const l=o.RULES.types[i];return l&&l!==!0&&r(s,l)}t.schemaHasRulesForType=e;function r(s,o){return o.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,o){var i;return s[o.keyword]!==void 0||((i=o.definition.implements)===null||i===void 0?void 0:i.some(l=>s[l]!==void 0))}t.shouldUseRule=n}),Zr=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=Li(),r=Vi(),n=on(),s=Me(),o=Fe(),i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i||(t.DataType=i={}));function l(p){const v=a(p.type);if(v.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&v.push("null")}return v}t.getSchemaTypes=l;function a(p){const v=Array.isArray(p)?p:p?[p]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}t.getJSONTypes=a;function f(p,v){const{gen:b,data:g,opts:h}=p,S=d(v,h.coerceTypes),O=v.length>0&&!(S.length===0&&v.length===1&&(0,r.schemaHasRulesForType)(p,v[0]));if(O){const C=E(v,g,h.strictNumbers,i.Wrong);b.if(C,()=>{S.length?w(p,v,S):c(p)})}return O}t.coerceAndCheckDataType=f;var u=new Set(["string","number","integer","boolean","null"]);function d(p,v){return v?p.filter(b=>u.has(b)||v==="array"&&b==="array"):[]}function w(p,v,b){const{gen:g,data:h,opts:S}=p,O=g.let("dataType",(0,s._)`typeof ${h}`),C=g.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>g.assign(h,(0,s._)`${h}[0]`).assign(O,(0,s._)`typeof ${h}`).if(E(v,h,S.strictNumbers),()=>g.assign(C,h))),g.if((0,s._)`${C} !== undefined`);for(const q of b)(u.has(q)||q==="array"&&S.coerceTypes==="array")&&D(q);g.else(),c(p),g.endIf(),g.if((0,s._)`${C} !== undefined`,()=>{g.assign(h,C),P(p,C)});function D(q){switch(q){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,s._)`"" + ${h}`).elseIf((0,s._)`${h} === null`).assign(C,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${h} === null
|
|
11
|
+
|| (${O} == "string" && ${h} && ${h} == +${h})`).assign(C,(0,s._)`+${h}`);return;case"integer":g.elseIf((0,s._)`${O} === "boolean" || ${h} === null
|
|
12
|
+
|| (${O} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(C,(0,s._)`+${h}`);return;case"boolean":g.elseIf((0,s._)`${h} === "false" || ${h} === 0 || ${h} === null`).assign(C,!1).elseIf((0,s._)`${h} === "true" || ${h} === 1`).assign(C,!0);return;case"null":g.elseIf((0,s._)`${h} === "" || ${h} === 0 || ${h} === false`),g.assign(C,null);return;case"array":g.elseIf((0,s._)`${O} === "string" || ${O} === "number"
|
|
13
|
+
|| ${O} === "boolean" || ${h} === null`).assign(C,(0,s._)`[${h}]`)}}}function P({gen:p,parentData:v,parentDataProperty:b},g){p.if((0,s._)`${v} !== undefined`,()=>p.assign((0,s._)`${v}[${b}]`,g))}function $(p,v,b,g=i.Correct){const h=g===i.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(p){case"null":return(0,s._)`${v} ${h} null`;case"array":S=(0,s._)`Array.isArray(${v})`;break;case"object":S=(0,s._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":S=O((0,s._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${v} ${h} ${p}`}return g===i.Correct?S:(0,s.not)(S);function O(C=s.nil){return(0,s.and)((0,s._)`typeof ${v} == "number"`,C,b?(0,s._)`isFinite(${v})`:s.nil)}}t.checkDataType=$;function E(p,v,b,g){if(p.length===1)return $(p[0],v,b,g);let h;const S=(0,o.toHash)(p);if(S.array&&S.object){const O=(0,s._)`typeof ${v} != "object"`;h=S.null?O:(0,s._)`!${v} || ${O}`,delete S.null,delete S.array,delete S.object}else h=s.nil;S.number&&delete S.integer;for(const O in S)h=(0,s.and)(h,$(O,v,b,g));return h}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:v})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${v}}`};function c(p){const v=_(p);(0,n.reportError)(v,m)}t.reportTypeError=c;function _(p){const{gen:v,data:b,schema:g}=p,h=(0,o.schemaRefOrVal)(p,g,"type");return{gen:v,keyword:"type",data:b,schema:g.type,schemaCode:h,schemaValue:h,parentSchema:g,params:{},it:p}}}),Lc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Me(),r=Fe();function n(o,i){const{properties:l,items:a}=o.schema;if(i==="object"&&l)for(const f in l)s(o,f,l[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,u)=>s(o,u,f.default))}t.assignDefaults=n;function s(o,i,l){const{gen:a,compositeRule:f,data:u,opts:d}=o;if(l===void 0)return;const w=(0,e._)`${u}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(o,`default is ignored for: ${w}`);return}let P=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${w} === null || ${w} === ""`),a.if(P,(0,e._)`${w} = ${(0,e.stringify)(l)}`)}}),Ct=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Me(),r=Fe(),n=Zt(),s=Fe();function o(p,v){const{gen:b,data:g,it:h}=p;b.if(d(b,g,v,h.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${v}`},!0),p.error()})}t.checkReportMissingProp=o;function i({gen:p,data:v,it:{opts:b}},g,h){return(0,e.or)(...g.map(S=>(0,e.and)(d(p,v,S,b.ownProperties),(0,e._)`${h} = ${S}`)))}t.checkMissingProp=i;function l(p,v){p.setParams({missingProperty:v},!0),p.error()}t.reportMissingProp=l;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(p,v,b){return(0,e._)`${a(p)}.call(${v}, ${b})`}t.isOwnProperty=f;function u(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} !== undefined`;return g?(0,e._)`${h} && ${f(p,v,b)}`:h}t.propertyInData=u;function d(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} === undefined`;return g?(0,e.or)(h,(0,e.not)(f(p,v,b))):h}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(v=>v!=="__proto__"):[]}t.allSchemaProperties=w;function P(p,v){return w(v).filter(b=>!(0,r.alwaysValidSchema)(p,v[b]))}t.schemaProperties=P;function $({schemaCode:p,data:v,it:{gen:b,topSchemaRef:g,schemaPath:h,errorPath:S},it:O},C,D,q){const X=q?(0,e._)`${p}, ${v}, ${g}${h}`:v,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&G.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const Z=(0,e._)`${X}, ${b.object(...G)}`;return D!==e.nil?(0,e._)`${C}.call(${D}, ${Z})`:(0,e._)`${C}(${Z})`}t.callValidateCode=$;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:v}},b){const g=v.unicodeRegExp?"u":"",{regExp:h}=v.code,S=h(b,g);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${h.code==="new RegExp"?E:(0,s.useFunc)(p,h)}(${b}, ${g})`})}t.usePattern=m;function c(p){const{gen:v,data:b,keyword:g,it:h}=p,S=v.name("valid");if(h.allErrors){const C=v.let("valid",!0);return O(()=>v.assign(C,!1)),C}return v.var(S,!0),O(()=>v.break()),S;function O(C){const D=v.const("len",(0,e._)`${b}.length`);v.forRange("i",0,D,q=>{p.subschema({keyword:g,dataProp:q,dataPropType:r.Type.Num},S),v.if((0,e.not)(S),C)})}}t.validateArray=c;function _(p){const{gen:v,schema:b,keyword:g,it:h}=p;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(D=>(0,r.alwaysValidSchema)(h,D))&&!h.opts.unevaluated)return;const O=v.let("valid",!1),C=v.name("_valid");v.block(()=>b.forEach((D,q)=>{const X=p.subschema({keyword:g,schemaProp:q,compositeRule:!0},C);v.assign(O,(0,e._)`${O} || ${C}`),p.mergeValidEvaluated(X,C)||v.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),Vc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Me(),r=Zt(),n=Ct(),s=on();function o(P,$){const{gen:E,keyword:m,schema:c,parentSchema:_,it:p}=P,v=$.macro.call(p.self,c,_,p),b=u(E,m,v);p.opts.validateSchema!==!1&&p.self.validateSchema(v,!0);const g=E.name("valid");P.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:b,compositeRule:!0},g),P.pass(g,()=>P.error(!0))}t.macroKeywordCode=o;function i(P,$){var E;const{gen:m,keyword:c,schema:_,parentSchema:p,$data:v,it:b}=P;f(b,$);const g=!v&&$.compile?$.compile.call(b.self,_,p,b):$.validate,h=u(m,c,g),S=m.let("valid");P.block$data(S,O),P.ok((E=$.valid)!==null&&E!==void 0?E:S);function O(){if($.errors===!1)q(),$.modifying&&l(P),X(()=>P.error());else{const G=$.async?C():D();$.modifying&&l(P),X(()=>a(P,G))}}function C(){const G=m.let("ruleErrs",null);return m.try(()=>q((0,e._)`await `),Z=>m.assign(S,!1).if((0,e._)`${Z} instanceof ${b.ValidationError}`,()=>m.assign(G,(0,e._)`${Z}.errors`),()=>m.throw(Z))),G}function D(){const G=(0,e._)`${h}.errors`;return m.assign(G,null),q(e.nil),G}function q(G=$.async?(0,e._)`await `:e.nil){const Z=b.opts.passContext?r.default.this:r.default.self,ce=!("compile"in $&&!v||$.schema===!1);m.assign(S,(0,e._)`${G}${(0,n.callValidateCode)(P,h,Z,ce)}`,$.modifying)}function X(G){var Z;m.if((0,e.not)((Z=$.valid)!==null&&Z!==void 0?Z:S),G)}}t.funcKeywordCode=i;function l(P){const{gen:$,data:E,it:m}=P;$.if(m.parentData,()=>$.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(P,$){const{gen:E}=P;E.if((0,e._)`Array.isArray(${$})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${$} : ${r.default.vErrors}.concat(${$})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(P)},()=>P.error())}function f({schemaEnv:P},$){if($.async&&!P.$async)throw new Error("async keyword in sync schema")}function u(P,$,E){if(E===void 0)throw new Error(`keyword "${$}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,$,E=!1){return!$.length||$.some(m=>m==="array"?Array.isArray(P):m==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==m||E&&typeof P>"u")}t.validSchemaType=d;function w({schema:P,opts:$,self:E,errSchemaPath:m},c,_){if(Array.isArray(c.keyword)?!c.keyword.includes(_):c.keyword!==_)throw new Error("ajv implementation error");const p=c.dependencies;if(p!=null&&p.some(v=>!Object.prototype.hasOwnProperty.call(P,v)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(c.validateSchema&&!c.validateSchema(P[_])){const b=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(c.validateSchema.errors);if($.validateSchema==="log")E.logger.error(b);else throw new Error(b)}}t.validateKeywordUsage=w}),Uc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Me(),r=Fe();function n(i,{keyword:l,schemaProp:a,schema:f,schemaPath:u,errSchemaPath:d,topSchemaRef:w}){if(l!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const P=i.schema[l];return a===void 0?{schema:P,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${i.errSchemaPath}/${l}`}:{schema:P[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${l}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(u===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:u,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,l,{dataProp:a,dataPropType:f,data:u,dataTypes:d,propertyName:w}){if(u!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=l;if(a!==void 0){const{errorPath:E,dataPathArr:m,opts:c}=l,_=P.let("data",(0,e._)`${l.data}${(0,e.getProperty)(a)}`,!0);$(_),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,c.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(u!==void 0){const E=u instanceof e.Name?u:P.let("data",u,!0);$(E),w!==void 0&&(i.propertyName=w)}d&&(i.dataTypes=d);function $(E){i.data=E,i.dataLevel=l.dataLevel+1,i.dataTypes=[],l.definedProperties=new Set,i.parentData=l.data,i.dataNames=[...l.dataNames,E]}}t.extendSubschemaData=s;function o(i,{jtdDiscriminator:l,jtdMetadata:a,compositeRule:f,createErrors:u,allErrors:d}){f!==void 0&&(i.compositeRule=f),u!==void 0&&(i.createErrors=u),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=l,i.jtdMetadata=a}t.extendSubschemaMode=o}),cn=K(function(t,e){e.exports=function r(n,s){if(n===s)return!0;if(n&&s&&typeof n=="object"&&typeof s=="object"){if(n.constructor!==s.constructor)return!1;var o,i,l;if(Array.isArray(n)){if(o=n.length,o!=s.length)return!1;for(i=o;i--!==0;)if(!r(n[i],s[i]))return!1;return!0}if(n.constructor===RegExp)return n.source===s.source&&n.flags===s.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===s.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===s.toString();if(l=Object.keys(n),o=l.length,o!==Object.keys(s).length)return!1;for(i=o;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,l[i]))return!1;for(i=o;i--!==0;){var a=l[i];if(!r(n[a],s[a]))return!1}return!0}return n!==n&&s!==s}}),Ui=K(function(t,e){var r=e.exports=function(o,i,l){typeof i=="function"&&(l=i,i={}),l=i.cb||l;var a=typeof l=="function"?l:l.pre||function(){},f=l.post||function(){};n(i,a,f,o,"",o)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function n(o,i,l,a,f,u,d,w,P,$){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,f,u,d,w,P,$);for(var E in a){var m=a[E];if(Array.isArray(m)){if(E in r.arrayKeywords)for(var c=0;c<m.length;c++)n(o,i,l,m[c],f+"/"+E+"/"+c,u,f,E,a,c)}else if(E in r.propsKeywords){if(m&&typeof m=="object")for(var _ in m)n(o,i,l,m[_],f+"/"+E+"/"+s(_),u,f,E,a,_)}else(E in r.keywords||o.allKeys&&!(E in r.skipKeywords))&&n(o,i,l,m,f+"/"+E,u,f,E,a)}l(a,f,u,d,w,P,$)}}function s(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}}),un=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=Fe(),r=cn(),n=Ui(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(m,c=!0){return typeof m=="boolean"?!0:c===!0?!l(m):c?a(m)<=c:!1}t.inlineRef=o;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(m){for(const c in m){if(i.has(c))return!0;const _=m[c];if(Array.isArray(_)&&_.some(l)||typeof _=="object"&&l(_))return!0}return!1}function a(m){let c=0;for(const _ in m){if(_==="$ref")return 1/0;if(c++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],p=>c+=a(p)),c===1/0))return 1/0}return c}function f(m,c="",_){_!==!1&&(c=w(c));const p=m.parse(c);return u(m,p)}t.getFullPath=f;function u(m,c){return m.serialize(c).split("#")[0]+"#"}t._getFullPath=u;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function P(m,c,_){return _=w(_),m.resolve(c,_)}t.resolveUrl=P;var $=/^[a-z_][-a-z0-9._]*$/i;function E(m,c){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,v=w(m[_]||c),b={"":v},g=f(p,v,!1),h={},S=new Set;return n(m,{allKeys:!0},(D,q,X,G)=>{if(G===void 0)return;const Z=g+q;let ce=b[G];typeof D[_]=="string"&&(ce=ye.call(this,D[_])),Re.call(this,D.$anchor),Re.call(this,D.$dynamicAnchor),b[q]=ce;function ye(ie){const z=this.opts.uriResolver.resolve;if(ie=w(ce?z(ce,ie):ie),S.has(ie))throw C(ie);S.add(ie);let T=this.refs[ie];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(D,T.schema,ie):ie!==w(Z)&&(ie[0]==="#"?(O(D,h[ie],ie),h[ie]=D):this.refs[ie]=Z),ie}function Re(ie){if(typeof ie=="string"){if(!$.test(ie))throw new Error(`invalid anchor "${ie}"`);ye.call(this,`#${ie}`)}}}),h;function O(D,q,X){if(q!==void 0&&!r(D,q))throw C(X)}function C(D){return new Error(`reference "${D}" resolves to more than one schema`)}}t.getSchemaRefs=E}),ln=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=qc(),r=Zr(),n=Vi(),s=Zr(),o=Lc(),i=Vc(),l=Uc(),a=Me(),f=Zt(),u=un(),d=Fe(),w=on();function P(N){if(g(N)&&(S(N),b(N))){c(N);return}$(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function $({gen:N,validateName:R,schema:V,schemaEnv:B,opts:Q},re){Q.code.es5?N.func(R,(0,a._)`${f.default.data}, ${f.default.valCxt}`,B.$async,()=>{N.code((0,a._)`"use strict"; ${p(V,Q)}`),m(N,Q),N.code(re)}):N.func(R,(0,a._)`${f.default.data}, ${E(Q)}`,B.$async,()=>N.code(p(V,Q)).code(re))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function m(N,R){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function c(N){const{schema:R,opts:V,gen:B}=N;$(N,()=>{V.$comment&&R.$comment&&G(N),D(N),B.let(f.default.vErrors,null),B.let(f.default.errors,0),V.unevaluated&&_(N),O(N),Z(N)})}function _(N){const{gen:R,validateName:V}=N;N.evaluated=R.const("evaluated",(0,a._)`${V}.evaluated`),R.if((0,a._)`${N.evaluated}.dynamicProps`,()=>R.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),R.if((0,a._)`${N.evaluated}.dynamicItems`,()=>R.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function p(N,R){const V=typeof N=="object"&&N[R.schemaId];return V&&(R.code.source||R.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function v(N,R){if(g(N)&&(S(N),b(N))){h(N,R);return}(0,e.boolOrEmptySchema)(N,R)}function b({schema:N,self:R}){if(typeof N=="boolean")return!N;for(const V in N)if(R.RULES.all[V])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function h(N,R){const{schema:V,gen:B,opts:Q}=N;Q.$comment&&V.$comment&&G(N),q(N),X(N);const re=B.const("_errs",f.default.errors);O(N,re),B.var(R,(0,a._)`${re} === ${f.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),C(N)}function O(N,R){if(N.opts.jtd)return ye(N,[],!1,R);const V=(0,r.getSchemaTypes)(N.schema),B=(0,r.coerceAndCheckDataType)(N,V);ye(N,V,!B,R)}function C(N){const{schema:R,errSchemaPath:V,opts:B,self:Q}=N;R.$ref&&B.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(R,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function D(N){const{schema:R,opts:V}=N;R.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function q(N){const R=N.schema[N.opts.schemaId];R&&(N.baseId=(0,u.resolveUrl)(N.opts.uriResolver,N.baseId,R))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:N,schemaEnv:R,schema:V,errSchemaPath:B,opts:Q}){const re=V.$comment;if(Q.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${re})`);else if(typeof Q.$comment=="function"){const be=(0,a.str)`${B}/$comment`,Ve=N.scopeValue("root",{ref:R.root});N.code((0,a._)`${f.default.self}.opts.$comment(${re}, ${be}, ${Ve}.schema)`)}}function Z(N){const{gen:R,schemaEnv:V,validateName:B,ValidationError:Q,opts:re}=N;V.$async?R.if((0,a._)`${f.default.errors} === 0`,()=>R.return(f.default.data),()=>R.throw((0,a._)`new ${Q}(${f.default.vErrors})`)):(R.assign((0,a._)`${B}.errors`,f.default.vErrors),re.unevaluated&&ce(N),R.return((0,a._)`${f.default.errors} === 0`))}function ce({gen:N,evaluated:R,props:V,items:B}){V instanceof a.Name&&N.assign((0,a._)`${R}.props`,V),B instanceof a.Name&&N.assign((0,a._)`${R}.items`,B)}function ye(N,R,V,B){const{gen:Q,schema:re,data:be,allErrors:Ve,opts:Te,self:je}=N,{RULES:_e}=je;if(re.$ref&&(Te.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(re,_e))){Q.block(()=>x(N,"$ref",_e.all.$ref.definition));return}Te.jtd||ie(N,R),Q.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(re,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,be,Te.strictNumbers)),Re(N,Ie),R.length===1&&R[0]===Ie.type&&V&&(Q.else(),(0,s.reportTypeError)(N)),Q.endIf()):Re(N,Ie),Ve||Q.if((0,a._)`${f.default.errors} === ${B||0}`))}}function Re(N,R){const{gen:V,schema:B,opts:{useDefaults:Q}}=N;Q&&(0,o.assignDefaults)(N,R.type),V.block(()=>{for(const re of R.rules)(0,n.shouldUseRule)(B,re)&&x(N,re.keyword,re.definition,R.type)})}function ie(N,R){N.schemaEnv.meta||!N.opts.strictTypes||(z(N,R),N.opts.allowUnionTypes||T(N,R),U(N,N.dataTypes))}function z(N,R){if(R.length){if(!N.dataTypes.length){N.dataTypes=R;return}R.forEach(V=>{y(N.dataTypes,V)||A(N,`type "${V}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,R)}}function T(N,R){R.length>1&&!(R.length===2&&R.includes("null"))&&A(N,"use allowUnionTypes to allow union type keyword")}function U(N,R){const V=N.self.RULES.all;for(const B in V){const Q=V[B];if(typeof Q=="object"&&(0,n.shouldUseRule)(N.schema,Q)){const{type:re}=Q.definition;re.length&&!re.some(be=>I(R,be))&&A(N,`missing type "${re.join(",")}" for keyword "${B}"`)}}}function I(N,R){return N.includes(R)||R==="number"&&N.includes("integer")}function y(N,R){return N.includes(R)||R==="integer"&&N.includes("number")}function k(N,R){const V=[];for(const B of N.dataTypes)y(R,B)?V.push(B):R.includes("integer")&&B==="number"&&V.push("integer");N.dataTypes=V}function A(N,R){const V=N.schemaEnv.baseId+N.errSchemaPath;R+=` at "${V}" (strictTypes)`,(0,d.checkStrictMode)(N,R,N.opts.strictTypes)}class H{constructor(R,V,B){if((0,i.validateKeywordUsage)(R,V,B),this.gen=R.gen,this.allErrors=R.allErrors,this.keyword=B,this.data=R.data,this.schema=R.schema[B],this.$data=V.$data&&R.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(R,this.schema,B,this.$data),this.schemaType=V.schemaType,this.parentSchema=R.schema,this.params={},this.it=R,this.def=V,this.$data)this.schemaCode=R.gen.const("vSchema",ve(this.$data,R));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=R.gen.const("_errs",f.default.errors))}result(R,V,B){this.failResult((0,a.not)(R),V,B)}failResult(R,V,B){this.gen.if(R),B?B():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(R,V){this.failResult((0,a.not)(R),void 0,V)}fail(R){if(R===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(R),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(R){if(!this.$data)return this.fail(R);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),R)})`)}error(R,V,B){if(V){this.setParams(V),this._error(R,B),this.setParams({});return}this._error(R,B)}_error(R,V){(R?w.reportExtraError:w.reportError)(this,this.def.error,V)}$dataError(){(0,w.reportError)(this,this.def.$dataError||w.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,w.resetErrorsCount)(this.gen,this.errsCount)}ok(R){this.allErrors||this.gen.if(R)}setParams(R,V){V?Object.assign(this.params,R):this.params=R}block$data(R,V,B=a.nil){this.gen.block(()=>{this.check$data(R,B),V()})}check$data(R=a.nil,V=a.nil){if(!this.$data)return;const{gen:B,schemaCode:Q,schemaType:re,def:be}=this;B.if((0,a.or)((0,a._)`${Q} === undefined`,V)),R!==a.nil&&B.assign(R,!0),(re.length||be.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),R!==a.nil&&B.assign(R,!1)),B.else()}invalid$data(){const{gen:R,schemaCode:V,schemaType:B,def:Q,it:re}=this;return(0,a.or)(be(),Ve());function be(){if(B.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Te=Array.isArray(B)?B:[B];return(0,a._)`${(0,s.checkDataTypes)(Te,V,re.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ve(){if(Q.validateSchema){const Te=R.scopeValue("validate$data",{ref:Q.validateSchema});return(0,a._)`!${Te}(${V})`}return a.nil}}subschema(R,V){const B=(0,l.getSubschema)(this.it,R);(0,l.extendSubschemaData)(B,this.it,R),(0,l.extendSubschemaMode)(B,R);const Q={...this.it,...B,items:void 0,props:void 0};return v(Q,V),Q}mergeEvaluated(R,V){const{it:B,gen:Q}=this;B.opts.unevaluated&&(B.props!==!0&&R.props!==void 0&&(B.props=d.mergeEvaluated.props(Q,R.props,B.props,V)),B.items!==!0&&R.items!==void 0&&(B.items=d.mergeEvaluated.items(Q,R.items,B.items,V)))}mergeValidEvaluated(R,V){const{it:B,gen:Q}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return Q.if(V,()=>this.mergeEvaluated(R,a.Name)),!0}}t.KeywordCxt=H;function x(N,R,V,B){const Q=new H(N,V,R);"code"in V?V.code(Q,B):Q.$data&&V.validate?(0,i.funcKeywordCode)(Q,V):"macro"in V?(0,i.macroKeywordCode)(Q,V):(V.compile||V.validate)&&(0,i.funcKeywordCode)(Q,V)}var ae=/^\/(?:[^~]|~0|~1)*$/,ne=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:R,dataNames:V,dataPathArr:B}){let Q,re;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!ae.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);Q=N,re=f.default.rootData}else{const je=ne.exec(N);if(!je)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+je[1];if(Q=je[2],Q==="#"){if(_e>=R)throw new Error(Te("property/index",_e));return B[R-_e]}if(_e>R)throw new Error(Te("data",_e));if(re=V[R-_e],!Q)return re}let be=re;const Ve=Q.split("/");for(const je of Ve)je&&(re=(0,a._)`${re}${(0,a.getProperty)((0,d.unescapeJsonPointer)(je))}`,be=(0,a._)`${be} && ${re}`);return be;function Te(je,_e){return`Cannot access ${je} ${_e} levels up, current level is ${R}`}}t.getData=ve}),us=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),fn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=un();class r extends Error{constructor(s,o,i,l){super(l||`can't resolve reference ${i} from id ${o}`),this.missingRef=(0,e.resolveUrl)(s,o,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),ls=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Me(),r=us(),n=Zt(),s=un(),o=Fe(),i=ln();class l{constructor(_){var p;this.refs={},this.dynamicAnchors={};let v;typeof _.schema=="object"&&(v=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(v==null?void 0:v[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=v==null?void 0:v.$async,this.refs={}}}t.SchemaEnv=l;function a(c){const _=d.call(this,c);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,c.root.baseId),{es5:v,lines:b}=this.opts.code,{ownProperties:g}=this.opts,h=new e.CodeGen(this.scope,{es5:v,lines:b,ownProperties:g});let S;c.$async&&(S=h.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=h.scopeName("validate");c.validateName=O;const C={gen:h,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===!0?{ref:c.schema,code:(0,e.stringify)(c.schema)}:{ref:c.schema}),validateName:O,ValidationError:S,schema:c.schema,schemaEnv:c,rootId:p,baseId:c.baseId||p,schemaPath:e.nil,errSchemaPath:c.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(c),(0,i.validateFunctionCode)(C),h.optimize(this.opts.code.optimize);const q=h.toString();D=`${h.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(D=this.opts.code.process(D,c));const G=new Function(`${n.default.self}`,`${n.default.scope}`,D)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=c.schema,G.schemaEnv=c,c.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:q,scopeValues:h._values}),this.opts.unevaluated){const{props:Z,items:ce}=C;G.evaluated={props:Z instanceof e.Name?void 0:Z,items:ce instanceof e.Name?void 0:ce,dynamicProps:Z instanceof e.Name,dynamicItems:ce instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return c.validate=G,c}catch(q){throw delete c.validate,delete c.validateName,D&&this.logger.error("Error compiling schema, function code:",D),q}finally{this._compilations.delete(c)}}t.compileSchema=a;function f(c,_,p){var v;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const b=c.refs[p];if(b)return b;let g=P.call(this,c,p);if(g===void 0){const h=(v=c.localRefs)===null||v===void 0?void 0:v[p],{schemaId:S}=this.opts;h&&(g=new l({schema:h,schemaId:S,root:c,baseId:_}))}if(g!==void 0)return c.refs[p]=u.call(this,g)}t.resolveRef=f;function u(c){return(0,s.inlineRef)(c.schema,this.opts.inlineRefs)?c.schema:c.validate?c:a.call(this,c)}function d(c){for(const _ of this._compilations)if(w(_,c))return _}t.getCompilingSchema=d;function w(c,_){return c.schema===_.schema&&c.root===_.root&&c.baseId===_.baseId}function P(c,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||$.call(this,c,_)}function $(c,_){const p=this.opts.uriResolver.parse(_),v=(0,s._getFullPath)(this.opts.uriResolver,p);let b=(0,s.getFullPath)(this.opts.uriResolver,c.baseId,void 0);if(Object.keys(c.schema).length>0&&v===b)return m.call(this,p,c);const g=(0,s.normalizeId)(v),h=this.refs[g]||this.schemas[g];if(typeof h=="string"){const S=$.call(this,c,h);return typeof(S==null?void 0:S.schema)!="object"?void 0:m.call(this,p,S)}if(typeof(h==null?void 0:h.schema)=="object"){if(h.validate||a.call(this,h),g===(0,s.normalizeId)(_)){const{schema:S}=h,{schemaId:O}=this.opts,C=S[O];return C&&(b=(0,s.resolveUrl)(this.opts.uriResolver,b,C)),new l({schema:S,schemaId:O,root:c,baseId:b})}return m.call(this,p,h)}}t.resolveSchema=$;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(c,{baseId:_,schema:p,root:v}){var b;if(((b=c.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const S of c.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,o.unescapeFragment)(S)];if(O===void 0)return;p=O;const C=typeof p=="object"&&p[this.opts.schemaId];!E.has(S)&&C&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,C))}let g;if(typeof p!="boolean"&&p.$ref&&!(0,o.schemaHasRulesButRef)(p,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);g=$.call(this,v,S)}const{schemaId:h}=this.opts;if(g=g||new l({schema:p,schemaId:h,root:v,baseId:_}),g.schema!==g.root.schema)return g}}),Fc=K(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),Fi=K(function(t,e){var r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function s($){let E="",m=0,c=0;for(c=0;c<$.length;c++)if(m=$[c].charCodeAt(0),m!==48){if(!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=$[c];break}for(c+=1;c<$.length;c++){if(m=$[c].charCodeAt(0),!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";E+=$[c]}return E}var o=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i($){return $.length=0,!0}function l($,E,m){if($.length){const c=s($);if(c!=="")E.push(c);else return m.error=!0,!1;$.length=0}return!0}function a($){let E=0;const m={error:!1,address:"",zone:""},c=[],_=[];let p=!1,v=!1,b=l;for(let g=0;g<$.length;g++){const h=$[g];if(!(h==="["||h==="]"))if(h===":"){if(p===!0&&(v=!0),!b(_,c,m))break;if(++E>7){m.error=!0;break}g>0&&$[g-1]===":"&&(p=!0),c.push(":");continue}else if(h==="%"){if(!b(_,c,m))break;b=i}else{_.push(h);continue}}return _.length&&(b===i?m.zone=_.join(""):v?c.push(_.join("")):c.push(s(_))),m.address=c.join(""),m}function f($){if(u($,":")<2)return{host:$,isIPV6:!1};const E=a($);if(E.error)return{host:$,isIPV6:!1};{let m=E.address,c=E.address;return E.zone&&(m+="%"+E.zone,c+="%25"+E.zone),{host:m,isIPV6:!0,escapedHost:c}}}function u($,E){let m=0;for(let c=0;c<$.length;c++)$[c]===E&&m++;return m}function d($){let E=$;const m=[];let c=-1,_=0;for(;_=E.length;){if(_===1){if(E===".")break;if(E==="/"){m.push("/");break}else{m.push(E);break}}else if(_===2){if(E[0]==="."){if(E[1]===".")break;if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&(E[1]==="."||E[1]==="/")){m.push("/");break}}else if(_===3&&E==="/.."){m.length!==0&&m.pop(),m.push("/");break}if(E[0]==="."){if(E[1]==="."){if(E[2]==="/"){E=E.slice(3);continue}}else if(E[1]==="/"){E=E.slice(2);continue}}else if(E[0]==="/"&&E[1]==="."){if(E[2]==="/"){E=E.slice(2);continue}else if(E[2]==="."&&E[3]==="/"){E=E.slice(3),m.length!==0&&m.pop();continue}}if((c=E.indexOf("/",1))===-1){m.push(E);break}else m.push(E.slice(0,c)),E=E.slice(c)}return m.join("")}function w($,E){const m=E!==!0?escape:unescape;return $.scheme!==void 0&&($.scheme=m($.scheme)),$.userinfo!==void 0&&($.userinfo=m($.userinfo)),$.host!==void 0&&($.host=m($.host)),$.path!==void 0&&($.path=m($.path)),$.query!==void 0&&($.query=m($.query)),$.fragment!==void 0&&($.fragment=m($.fragment)),$}function P($){const E=[];if($.userinfo!==void 0&&(E.push($.userinfo),E.push("@")),$.host!==void 0){let m=unescape($.host);if(!n(m)){const c=f(m);c.isIPV6===!0?m=`[${c.escapedHost}]`:m=$.host}E.push(m)}return(typeof $.port=="number"||typeof $.port=="string")&&(E.push(":"),E.push(String($.port))),E.length?E.join(""):void 0}e.exports={nonSimpleDomain:o,recomposeAuthority:P,normalizeComponentEncoding:w,removeDotSegments:d,isIPv4:n,isUUID:r,normalizeIPv6:f,stringArrayToHexStripped:s}}),zc=K(function(t,e){var{isUUID:r}=Fi(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function o(h){return s.indexOf(h)!==-1}function i(h){return h.secure===!0?!0:h.secure===!1?!1:h.scheme?h.scheme.length===3&&(h.scheme[0]==="w"||h.scheme[0]==="W")&&(h.scheme[1]==="s"||h.scheme[1]==="S")&&(h.scheme[2]==="s"||h.scheme[2]==="S"):!1}function l(h){return h.host||(h.error=h.error||"HTTP URIs must have a host."),h}function a(h){const S=String(h.scheme).toLowerCase()==="https";return(h.port===(S?443:80)||h.port==="")&&(h.port=void 0),h.path||(h.path="/"),h}function f(h){return h.secure=i(h),h.resourceName=(h.path||"/")+(h.query?"?"+h.query:""),h.path=void 0,h.query=void 0,h}function u(h){if((h.port===(i(h)?443:80)||h.port==="")&&(h.port=void 0),typeof h.secure=="boolean"&&(h.scheme=h.secure?"wss":"ws",h.secure=void 0),h.resourceName){const[S,O]=h.resourceName.split("?");h.path=S&&S!=="/"?S:void 0,h.query=O,h.resourceName=void 0}return h.fragment=void 0,h}function d(h,S){if(!h.path)return h.error="URN can not be parsed",h;const O=h.path.match(n);if(O){const C=S.scheme||h.scheme||"urn";h.nid=O[1].toLowerCase(),h.nss=O[2];const D=`${C}:${S.nid||h.nid}`,q=g(D);h.path=void 0,q&&(h=q.parse(h,S))}else h.error=h.error||"URN can not be parsed.";return h}function w(h,S){if(h.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=S.scheme||h.scheme||"urn",C=h.nid.toLowerCase(),D=`${O}:${S.nid||C}`,q=g(D);q&&(h=q.serialize(h,S));const X=h,G=h.nss;return X.path=`${C||S.nid}:${G}`,S.skipEscape=!0,X}function P(h,S){const O=h;return O.uuid=O.nss,O.nss=void 0,!S.tolerant&&(!O.uuid||!r(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function $(h){const S=h;return S.nss=(h.uuid||"").toLowerCase(),S}var E={scheme:"http",domainHost:!0,parse:l,serialize:a},m={scheme:"https",domainHost:E.domainHost,parse:l,serialize:a},c={scheme:"ws",domainHost:!0,parse:f,serialize:u},_={scheme:"wss",domainHost:c.domainHost,parse:c.parse,serialize:c.serialize},p={scheme:"urn",parse:d,serialize:w,skipNormalize:!0},v={scheme:"urn:uuid",parse:P,serialize:$,skipNormalize:!0},b={http:E,https:m,ws:c,wss:_,urn:p,"urn:uuid":v};Object.setPrototypeOf(b,null);function g(h){return h&&(b[h]||b[h.toLowerCase()])||void 0}e.exports={wsIsSecure:i,SCHEMES:b,isValidSchemeName:o,getSchemeHandler:g}}),Bc=K(function(t,e){var{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:s,normalizeComponentEncoding:o,isIPv4:i,nonSimpleDomain:l}=Fi(),{SCHEMES:a,getSchemeHandler:f}=zc();function u(_,p){return typeof _=="string"?_=$(m(_,p),p):typeof _=="object"&&(_=m($(_,p),p)),_}function d(_,p,v){const b=v?Object.assign({scheme:"null"},v):{scheme:"null"},g=w(m(_,b),m(p,b),b,!0);return b.skipEscape=!0,$(g,b)}function w(_,p,v,b){const g={};return b||(_=m($(_,v),v),p=m($(p,v),v)),v=v||{},!v.tolerant&&p.scheme?(g.scheme=p.scheme,g.userinfo=p.userinfo,g.host=p.host,g.port=p.port,g.path=n(p.path||""),g.query=p.query):(p.userinfo!==void 0||p.host!==void 0||p.port!==void 0?(g.userinfo=p.userinfo,g.host=p.host,g.port=p.port,g.path=n(p.path||""),g.query=p.query):(p.path?(p.path[0]==="/"?g.path=n(p.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?g.path="/"+p.path:_.path?g.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+p.path:g.path=p.path,g.path=n(g.path)),g.query=p.query):(g.path=_.path,p.query!==void 0?g.query=p.query:g.query=_.query),g.userinfo=_.userinfo,g.host=_.host,g.port=_.port),g.scheme=_.scheme),g.fragment=p.fragment,g}function P(_,p,v){return typeof _=="string"?(_=unescape(_),_=$(o(m(_,v),!0),{...v,skipEscape:!0})):typeof _=="object"&&(_=$(o(_,!0),{...v,skipEscape:!0})),typeof p=="string"?(p=unescape(p),p=$(o(m(p,v),!0),{...v,skipEscape:!0})):typeof p=="object"&&(p=$(o(p,!0),{...v,skipEscape:!0})),_.toLowerCase()===p.toLowerCase()}function $(_,p){const v={host:_.host,scheme:_.scheme,userinfo:_.userinfo,port:_.port,path:_.path,query:_.query,nid:_.nid,nss:_.nss,uuid:_.uuid,fragment:_.fragment,reference:_.reference,resourceName:_.resourceName,secure:_.secure,error:""},b=Object.assign({},p),g=[],h=f(b.scheme||v.scheme);h&&h.serialize&&h.serialize(v,b),v.path!==void 0&&(b.skipEscape?v.path=unescape(v.path):(v.path=escape(v.path),v.scheme!==void 0&&(v.path=v.path.split("%3A").join(":")))),b.reference!=="suffix"&&v.scheme&&g.push(v.scheme,":");const S=s(v);if(S!==void 0&&(b.reference!=="suffix"&&g.push("//"),g.push(S),v.path&&v.path[0]!=="/"&&g.push("/")),v.path!==void 0){let O=v.path;!b.absolutePath&&(!h||!h.absolutePath)&&(O=n(O)),S===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),g.push(O)}return v.query!==void 0&&g.push("?",v.query),v.fragment!==void 0&&g.push("#",v.fragment),g.join("")}var E=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(_,p){const v=Object.assign({},p),b={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let g=!1;v.reference==="suffix"&&(v.scheme?_=v.scheme+":"+_:_="//"+_);const h=_.match(E);if(h){if(b.scheme=h[1],b.userinfo=h[3],b.host=h[4],b.port=parseInt(h[5],10),b.path=h[6]||"",b.query=h[7],b.fragment=h[8],isNaN(b.port)&&(b.port=h[5]),b.host)if(i(b.host)===!1){const C=r(b.host);b.host=C.host.toLowerCase(),g=C.isIPV6}else g=!0;b.scheme===void 0&&b.userinfo===void 0&&b.host===void 0&&b.port===void 0&&b.query===void 0&&!b.path?b.reference="same-document":b.scheme===void 0?b.reference="relative":b.fragment===void 0?b.reference="absolute":b.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==b.reference&&(b.error=b.error||"URI is not a "+v.reference+" reference.");const S=f(v.scheme||b.scheme);if(!v.unicodeSupport&&(!S||!S.unicodeSupport)&&b.host&&(v.domainHost||S&&S.domainHost)&&g===!1&&l(b.host))try{b.host=URL.domainToASCII(b.host.toLowerCase())}catch(O){b.error=b.error||"Host's domain name can not be converted to ASCII: "+O}(!S||S&&!S.skipNormalize)&&(_.indexOf("%")!==-1&&(b.scheme!==void 0&&(b.scheme=unescape(b.scheme)),b.host!==void 0&&(b.host=unescape(b.host))),b.path&&(b.path=escape(unescape(b.path))),b.fragment&&(b.fragment=encodeURI(decodeURIComponent(b.fragment)))),S&&S.parse&&S.parse(b,v)}else b.error=b.error||"URI can not be parsed.";return b}var c={SCHEMES:a,normalize:u,resolve:d,resolveComponent:w,equal:P,serialize:$,parse:m};e.exports=c,e.exports.default=c,e.exports.fastUri=c}),xc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Bc();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),Hc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=ln();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Me();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=us(),s=fn(),o=Li(),i=ls(),l=Me(),a=un(),f=Zr(),u=Fe(),d=Fc(),w=xc(),P=(z,T)=>new RegExp(z,T);P.code="new RegExp";var $=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},c={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function p(z){var T,U,I,y,k,A,H,x,ae,ne,ve,N,R,V,B,Q,re,be,Ve,Te,je,_e,xe,Ie,yt;const st=z.strict,mt=(T=z.code)===null||T===void 0?void 0:T.optimize,Et=mt===!0||mt===void 0?1:mt||0,ct=(I=(U=z.code)===null||U===void 0?void 0:U.regExp)!==null&&I!==void 0?I:P,$t=(y=z.uriResolver)!==null&&y!==void 0?y:w.default;return{strictSchema:(A=(k=z.strictSchema)!==null&&k!==void 0?k:st)!==null&&A!==void 0?A:!0,strictNumbers:(x=(H=z.strictNumbers)!==null&&H!==void 0?H:st)!==null&&x!==void 0?x:!0,strictTypes:(ne=(ae=z.strictTypes)!==null&&ae!==void 0?ae:st)!==null&&ne!==void 0?ne:"log",strictTuples:(N=(ve=z.strictTuples)!==null&&ve!==void 0?ve:st)!==null&&N!==void 0?N:"log",strictRequired:(V=(R=z.strictRequired)!==null&&R!==void 0?R:st)!==null&&V!==void 0?V:!1,code:z.code?{...z.code,optimize:Et,regExp:ct}:{optimize:Et,regExp:ct},loopRequired:(B=z.loopRequired)!==null&&B!==void 0?B:_,loopEnum:(Q=z.loopEnum)!==null&&Q!==void 0?Q:_,meta:(re=z.meta)!==null&&re!==void 0?re:!0,messages:(be=z.messages)!==null&&be!==void 0?be:!0,inlineRefs:(Ve=z.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Te=z.schemaId)!==null&&Te!==void 0?Te:"$id",addUsedSchema:(je=z.addUsedSchema)!==null&&je!==void 0?je:!0,validateSchema:(_e=z.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=z.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=z.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=z.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:$t}}class v{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...p(T)};const{es5:U,lines:I}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:E,es5:U,lines:I}),this.logger=q(T.logger);const y=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),b.call(this,m,T,"NOT SUPPORTED"),b.call(this,c,T,"DEPRECATED","warn"),this._metaOpts=C.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),h.call(this),T.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:U,schemaId:I}=this.opts;let y=d;I==="id"&&(y={...d},y.id=y.$id,delete y.$id),U&&T&&this.addMetaSchema(y,y[I],!1)}defaultMeta(){const{meta:T,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[U]||T:void 0}validate(T,U){let I;if(typeof T=="string"){if(I=this.getSchema(T),!I)throw new Error(`no schema with key or ref "${T}"`)}else I=this.compile(T);const y=I(U);return"$async"in I||(this.errors=I.errors),y}compile(T,U){const I=this._addSchema(T,U);return I.validate||this._compileSchemaEnv(I)}compileAsync(T,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return y.call(this,T,U);async function y(ne,ve){await k.call(this,ne.$schema);const N=this._addSchema(ne,ve);return N.validate||A.call(this,N)}async function k(ne){ne&&!this.getSchema(ne)&&await y.call(this,{$ref:ne},!0)}async function A(ne){try{return this._compileSchemaEnv(ne)}catch(ve){if(!(ve instanceof s.default))throw ve;return H.call(this,ve),await x.call(this,ve.missingSchema),A.call(this,ne)}}function H({missingSchema:ne,missingRef:ve}){if(this.refs[ne])throw new Error(`AnySchema ${ne} is loaded but ${ve} cannot be resolved`)}async function x(ne){const ve=await ae.call(this,ne);this.refs[ne]||await k.call(this,ve.$schema),this.refs[ne]||this.addSchema(ve,ne,U)}async function ae(ne){const ve=this._loading[ne];if(ve)return ve;try{return await(this._loading[ne]=I(ne))}finally{delete this._loading[ne]}}}addSchema(T,U,I,y=this.opts.validateSchema){if(Array.isArray(T)){for(const A of T)this.addSchema(A,void 0,I,y);return this}let k;if(typeof T=="object"){const{schemaId:A}=this.opts;if(k=T[A],k!==void 0&&typeof k!="string")throw new Error(`schema ${A} must be string`)}return U=(0,a.normalizeId)(U||k),this._checkUnique(U),this.schemas[U]=this._addSchema(T,I,U,y,!0),this}addMetaSchema(T,U,I=this.opts.validateSchema){return this.addSchema(T,U,!0,I),this}validateSchema(T,U){if(typeof T=="boolean")return!0;let I;if(I=T.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(I,T);if(!y&&U){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return y}getSchema(T){let U;for(;typeof(U=g.call(this,T))=="string";)T=U;if(U===void 0){const{schemaId:I}=this.opts,y=new i.SchemaEnv({schema:{},schemaId:I});if(U=i.resolveSchema.call(this,y,T),!U)return;this.refs[T]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=g.call(this,T);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const U=T;this._cache.delete(U);let I=T[this.opts.schemaId];return I&&(I=(0,a.normalizeId)(I),delete this.schemas[I],delete this.refs[I]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const U of T)this.addKeyword(U);return this}addKeyword(T,U){let I;if(typeof T=="string")I=T,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=I);else if(typeof T=="object"&&U===void 0){if(U=T,I=U.keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,I,U),!U)return(0,u.eachItem)(I,k=>Z.call(this,k)),this;ye.call(this,U);const y={...U,type:(0,f.getJSONTypes)(U.type),schemaType:(0,f.getJSONTypes)(U.schemaType)};return(0,u.eachItem)(I,y.type.length===0?k=>Z.call(this,k,y):k=>y.type.forEach(A=>Z.call(this,k,y,A))),this}getKeyword(T){const U=this.RULES.all[T];return typeof U=="object"?U.definition:!!U}removeKeyword(T){const{RULES:U}=this;delete U.keywords[T],delete U.all[T];for(const I of U.rules){const y=I.rules.findIndex(k=>k.keyword===T);y>=0&&I.rules.splice(y,1)}return this}addFormat(T,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[T]=U,this}errorsText(T=this.errors,{separator:U=", ",dataVar:I="data"}={}){return!T||T.length===0?"No errors":T.map(y=>`${I}${y.instancePath} ${y.message}`).reduce((y,k)=>y+U+k)}$dataMetaSchema(T,U){const I=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const y of U){const k=y.split("/").slice(1);let A=T;for(const H of k)A=A[H];for(const H in I){const x=I[H];if(typeof x!="object")continue;const{$data:ae}=x.definition,ne=A[H];ae&&ne&&(A[H]=ie(ne))}}return T}_removeAllSchemas(T,U){for(const I in T){const y=T[I];(!U||U.test(I))&&(typeof y=="string"?delete T[I]:y&&!y.meta&&(this._cache.delete(y.schema),delete T[I]))}}_addSchema(T,U,I,y=this.opts.validateSchema,k=this.opts.addUsedSchema){let A;const{schemaId:H}=this.opts;if(typeof T=="object")A=T[H];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let x=this._cache.get(T);if(x!==void 0)return x;I=(0,a.normalizeId)(A||I);const ae=a.getSchemaRefs.call(this,T,I);return x=new i.SchemaEnv({schema:T,schemaId:H,meta:U,baseId:I,localRefs:ae}),this._cache.set(x.schema,x),k&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=x),y&&this.validateSchema(T,!0),x}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):i.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const U=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,T)}finally{this.opts=U}}}v.ValidationError=n.default,v.MissingRefError=s.default,t.default=v;function b(z,T,U,I="error"){for(const y in z){const k=y;k in T&&this.logger[I](`${U}: option ${y}. ${z[k]}`)}}function g(z){return z=(0,a.normalizeId)(z),this.schemas[z]||this.refs[z]}function h(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const T in z)this.addSchema(z[T],T)}function S(){for(const z in this.opts.formats){const T=this.opts.formats[z];T&&this.addFormat(z,T)}}function O(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in z){const U=z[T];U.keyword||(U.keyword=T),this.addKeyword(U)}}function C(){const z={...this.opts};for(const T of $)delete z[T];return z}var D={log(){},warn(){},error(){}};function q(z){if(z===!1)return D;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(z,T){const{RULES:U}=this;if((0,u.eachItem)(z,I=>{if(U.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!X.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function Z(z,T,U){var I;const y=T==null?void 0:T.post;if(U&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let A=y?k.post:k.rules.find(({type:x})=>x===U);if(A||(A={type:U,rules:[]},k.rules.push(A)),k.keywords[z]=!0,!T)return;const H={keyword:z,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?ce.call(this,A,H,T.before):A.rules.push(H),k.all[z]=H,(I=T.implements)===null||I===void 0||I.forEach(x=>this.addKeyword(x))}function ce(z,T,U){const I=z.rules.findIndex(y=>y.keyword===U);I>=0?z.rules.splice(I,0,T):(z.rules.push(T),this.logger.warn(`rule ${U} is not defined`))}function ye(z){let{metaSchema:T}=z;T!==void 0&&(z.$data&&this.opts.$data&&(T=ie(T)),z.validateSchema=this.compile(T,!0))}var Re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ie(z){return{anyOf:[z,Re]}}}),Kc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Gc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=fn(),r=Ct(),n=Me(),s=Zt(),o=ls(),i=Fe(),l={keyword:"$ref",schemaType:"string",code(u){const{gen:d,schema:w,it:P}=u,{baseId:$,schemaEnv:E,validateName:m,opts:c,self:_}=P,{root:p}=E;if((w==="#"||w==="#/")&&$===p.baseId)return b();const v=o.resolveRef.call(_,p,$,w);if(v===void 0)throw new e.default(P.opts.uriResolver,$,w);if(v instanceof o.SchemaEnv)return g(v);return h(v);function b(){if(E===p)return f(u,m,E,E.$async);const S=d.scopeValue("root",{ref:p});return f(u,(0,n._)`${S}.validate`,p,p.$async)}function g(S){const O=a(u,S);f(u,O,S,S.$async)}function h(S){const O=d.scopeValue("schema",c.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),C=d.name("valid"),D=u.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},C);u.mergeEvaluated(D),u.ok(C)}}};function a(u,d){const{gen:w}=u;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(u,d,w,P){const{gen:$,it:E}=u,{allErrors:m,schemaEnv:c,opts:_}=E,p=_.passContext?s.default.this:n.nil;P?v():b();function v(){if(!c.$async)throw new Error("async schema referenced by sync schema");const S=$.let("valid");$.try(()=>{$.code((0,n._)`await ${(0,r.callValidateCode)(u,d,p)}`),h(d),m||$.assign(S,!0)},O=>{$.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>$.throw(O)),g(O),m||$.assign(S,!1)}),u.ok(S)}function b(){u.result((0,r.callValidateCode)(u,d,p),()=>h(d),()=>g(d))}function g(S){const O=(0,n._)`${S}.errors`;$.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),$.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function h(S){var O;if(!E.opts.unevaluated)return;const C=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(E.props=i.mergeEvaluated.props($,C.props,E.props));else{const D=$.var("props",(0,n._)`${S}.evaluated.props`);E.props=i.mergeEvaluated.props($,D,E.props,n.Name)}if(E.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(E.items=i.mergeEvaluated.items($,C.items,E.items));else{const D=$.var("items",(0,n._)`${S}.evaluated.items`);E.items=i.mergeEvaluated.items($,D,E.items,n.Name)}}}t.callRef=f,t.default=l}),Wc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Kc(),r=Gc(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),Jc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:i,schemaCode:l})=>(0,e.str)`must be ${n[i].okStr} ${l}`,params:({keyword:i,schemaCode:l})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${l}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:l,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[l].fail} ${f} || isNaN(${a})`)}};t.default=o}),Qc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:o,data:i,schemaCode:l,it:a}=s,f=a.opts.multipleOfPrecision,u=o.let("res"),d=f?(0,e._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${f}`:(0,e._)`${u} !== parseInt(${u})`;s.fail$data((0,e._)`(${l} === 0 || (${u} = ${i}/${l}, ${d}))`)}};t.default=n}),Xc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,o=0,i;for(;o<n;)s++,i=r.charCodeAt(o++),i>=55296&&i<=56319&&o<n&&(i=r.charCodeAt(o),(i&64512)===56320&&o++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),Yc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=Xc(),s={message({keyword:i,schemaCode:l}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${l} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:l,data:a,schemaCode:f,it:u}=i,d=l==="maxLength"?e.operators.GT:e.operators.LT,w=u.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${d} ${f}`)}};t.default=o}),Zc=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Fe(),n=Me(),s={message:({schemaCode:i})=>(0,n.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,n._)`{pattern: ${i}}`},o={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:s,code(i){const{gen:l,data:a,$data:f,schema:u,schemaCode:d,it:w}=i,P=w.opts.unicodeRegExp?"u":"";if(f){const{regExp:$}=w.opts.code,E=$.code==="new RegExp"?(0,n._)`new RegExp`:(0,r.useFunc)(l,$),m=l.let("valid");l.try(()=>l.assign(m,(0,n._)`${E}(${d}, ${P}).test(${a})`),()=>l.assign(m,!1)),i.fail$data((0,n._)`!${m}`)}else{const $=(0,e.usePattern)(i,u);i.fail$data((0,n._)`!${$}.test(${a})`)}}};t.default=o}),eu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message({keyword:s,schemaCode:o}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:l}=s,a=o==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${l}`)}};t.default=n}),tu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Me(),n=Fe(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:l,schema:a,schemaCode:f,data:u,$data:d,it:w}=i,{opts:P}=w;if(!d&&a.length===0)return;const $=a.length>=P.loopRequired;if(w.allErrors?E():m(),P.strictRequired){const p=i.parentSchema.properties,{definedProperties:v}=i.it;for(const b of a)if((p==null?void 0:p[b])===void 0&&!v.has(b)){const g=w.schemaEnv.baseId+w.errSchemaPath,h=`required property "${b}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)(w,h,w.opts.strictRequired)}}function E(){if($||d)i.block$data(r.nil,c);else for(const p of a)(0,e.checkReportMissingProp)(i,p)}function m(){const p=l.let("missing");if($||d){const v=l.let("valid",!0);i.block$data(v,()=>_(p,v)),i.ok(v)}else l.if((0,e.checkMissingProp)(i,a,p)),(0,e.reportMissingProp)(i,p),l.else()}function c(){l.forOf("prop",f,p=>{i.setParams({missingProperty:p}),l.if((0,e.noPropertyInData)(l,u,p,P.ownProperties),()=>i.error())})}function _(p,v){i.setParams({missingProperty:p}),l.forOf(p,f,()=>{l.assign(v,(0,e.propertyInData)(l,u,p,P.ownProperties)),l.if((0,r.not)(v),()=>{i.error(),l.break()})},r.nil)}}};t.default=o}),ru=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message({keyword:s,schemaCode:o}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:l}=s,a=o==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${l}`)}};t.default=n}),fs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=cn();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),nu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Zr(),r=Me(),n=Fe(),s=fs(),o={message:({params:{i:l,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${l} are identical)`,params:({params:{i:l,j:a}})=>(0,r._)`{i: ${l}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:o,code(l){const{gen:a,data:f,$data:u,schema:d,parentSchema:w,schemaCode:P,it:$}=l;if(!u&&!d)return;const E=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];l.block$data(E,c,(0,r._)`${P} === false`),l.ok(E);function c(){const b=a.let("i",(0,r._)`${f}.length`),g=a.let("j");l.setParams({i:b,j:g}),a.assign(E,!0),a.if((0,r._)`${b} > 1`,()=>(_()?p:v)(b,g))}function _(){return m.length>0&&!m.some(b=>b==="object"||b==="array")}function p(b,g){const h=a.name("item"),S=(0,e.checkDataTypes)(m,h,$.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${b}--;`,()=>{a.let(h,(0,r._)`${f}[${b}]`),a.if(S,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${h} == "string"`,(0,r._)`${h} += "_"`),a.if((0,r._)`typeof ${O}[${h}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${h}]`),l.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${h}] = ${b}`)})}function v(b,g){const h=(0,n.useFunc)(a,s.default),S=a.name("outer");a.label(S).for((0,r._)`;${b}--;`,()=>a.for((0,r._)`${g} = ${b}; ${g}--;`,()=>a.if((0,r._)`${h}(${f}[${b}], ${f}[${g}])`,()=>{l.error(),a.assign(E,!1).break(S)})))}}};t.default=i}),su=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=fs(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},o={keyword:"const",$data:!0,error:s,code(i){const{gen:l,data:a,$data:f,schemaCode:u,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(l,n.default)}(${a}, ${u})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=o}),iu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=fs(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},o={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:l,data:a,$data:f,schema:u,schemaCode:d,it:w}=i;if(!f&&u.length===0)throw new Error("enum must have non-empty array");const P=u.length>=w.opts.loopEnum;let $;const E=()=>$??($=(0,r.useFunc)(l,n.default));let m;if(P||f)m=l.let("valid"),i.block$data(m,c);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const p=l.const("vSchema",d);m=(0,e.or)(...u.map((v,b)=>_(p,b)))}i.pass(m);function c(){l.assign(m,!1),l.forOf("v",d,p=>l.if((0,e._)`${E()}(${a}, ${p})`,()=>l.assign(m,!0).break()))}function _(p,v){const b=u[v];return typeof b=="object"&&b!==null?(0,e._)`${E()}(${a}, ${p}[${v}])`:(0,e._)`${a} === ${b}`}}};t.default=o}),au=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Jc(),r=Qc(),n=Yc(),s=Zc(),o=eu(),i=tu(),l=ru(),a=nu(),f=su(),u=iu(),d=[e.default,r.default,n.default,s.default,o.default,i.default,l.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,u.default];t.default=d}),zi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Me(),r=Fe(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:l,it:a}=i,{items:f}=l;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(i,f)}};function o(i,l){const{gen:a,schema:f,data:u,keyword:d,it:w}=i;w.items=!0;const P=a.const("len",(0,e._)`${u}.length`);if(f===!1)i.setParams({len:l.length}),i.pass((0,e._)`${P} <= ${l.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)(w,f)){const E=a.var("valid",(0,e._)`${P} <= ${l.length}`);a.if((0,e.not)(E),()=>$(E)),i.ok(E)}function $(E){a.forRange("i",l.length,P,m=>{i.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=o,t.default=s}),Bi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Me(),r=Fe(),n=Ct(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:l,it:a}=i;if(Array.isArray(l))return o(i,"additionalItems",l);a.items=!0,!(0,r.alwaysValidSchema)(a,l)&&i.ok((0,n.validateArray)(i))}};function o(i,l,a=i.schema){const{gen:f,parentSchema:u,data:d,keyword:w,it:P}=i;m(u),P.opts.unevaluated&&a.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(f,a.length,P.items));const $=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((c,_)=>{(0,r.alwaysValidSchema)(P,c)||(f.if((0,e._)`${E} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},$)),i.ok($))});function m(c){const{opts:_,errSchemaPath:p}=P,v=a.length,b=v===c.minItems&&(v===c.maxItems||c[l]===!1);if(_.strictTuples&&!b){const g=`"${w}" is ${v}-tuple, but minItems or maxItems/${l} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(P,g,_.strictTuples)}}}t.validateTuple=o,t.default=s}),ou=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Bi(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),cu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n=Ct(),s=zi(),o={message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:o,code(l){const{schema:a,parentSchema:f,it:u}=l,{prefixItems:d}=f;u.items=!0,!(0,r.alwaysValidSchema)(u,a)&&(d?(0,s.validateAdditionalItems)(l,d):l.ok((0,n.validateArray)(l)))}};t.default=i}),uu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:({params:{min:o,max:i}})=>i===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${i} valid item(s)`,params:({params:{min:o,max:i}})=>i===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(o){const{gen:i,schema:l,parentSchema:a,data:f,it:u}=o;let d,w;const{minContains:P,maxContains:$}=a;u.opts.next?(d=P===void 0?1:P,w=$):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(o.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,r.alwaysValidSchema)(u,l)){let v=(0,e._)`${E} >= ${d}`;w!==void 0&&(v=(0,e._)`${v} && ${E} <= ${w}`),o.pass(v);return}u.items=!0;const m=i.name("valid");w===void 0&&d===1?_(m,()=>i.if(m,()=>i.break())):d===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${f}.length > 0`,c)):(i.let(m,!1),c()),o.result(m,()=>o.reset());function c(){const v=i.name("_valid"),b=i.let("count",0);_(v,()=>i.if(v,()=>p(b)))}function _(v,b){i.forRange("i",0,E,g=>{o.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},v),b()})}function p(v){i.code((0,e._)`${v}++`),w===void 0?i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${v} > ${w}`,()=>i.assign(m,!1).break()),d===1?i.assign(m,!0):i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0)))}}};t.default=s}),lu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Me(),r=Fe(),n=Ct();t.error={message:({params:{property:a,depsCount:f,deps:u}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${u} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:u,missingProperty:d}})=>(0,e._)`{property: ${a},
|
|
14
14
|
missingProperty: ${d},
|
|
15
15
|
depsCount: ${f},
|
|
16
|
-
deps: ${l}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,l]=o(a);i(a,f),u(a,l)}};function o({schema:a}){const f={},l={};for(const d in a){if(d==="__proto__")continue;const w=Array.isArray(a[d])?f:l;w[d]=a[d]}return[f,l]}function i(a,f=a.schema){const{gen:l,data:d,it:w}=a;if(Object.keys(f).length===0)return;const P=l.let("missing");for(const $ in f){const E=f[$];if(E.length===0)continue;const m=(0,n.propertyInData)(l,d,$,w.opts.ownProperties);a.setParams({property:$,depsCount:E.length,deps:E.join(", ")}),w.allErrors?l.if(m,()=>{for(const c of E)(0,n.checkReportMissingProp)(a,c)}):(l.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,E,P)})`),(0,n.reportMissingProp)(a,P),l.else())}}t.validatePropertyDeps=i;function u(a,f=a.schema){const{gen:l,data:d,keyword:w,it:P}=a,$=l.name("valid");for(const E in f)(0,r.alwaysValidSchema)(P,f[E])||(l.if((0,n.propertyInData)(l,d,E,P.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:E},$);a.mergeValidEvaluated(m,$)},()=>l.var($,!0)),a.ok($))}t.validateSchemaDeps=u,t.default=s}),uu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(o){const{gen:i,schema:u,data:a,it:f}=o;if((0,r.alwaysValidSchema)(f,u))return;const l=i.name("valid");i.forIn("key",a,d=>{o.setParams({propertyName:d}),o.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),i.if((0,e.not)(l),()=>{o.error(!0),f.allErrors||i.break()})}),o.ok(l)}};t.default=s}),zi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Me(),n=Zt(),s=Fe(),o={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:o,code(u){const{gen:a,schema:f,parentSchema:l,data:d,errsCount:w,it:P}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:$,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,f))return;const m=(0,e.allSchemaProperties)(l.properties),c=(0,e.allSchemaProperties)(l.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",d,h=>{!m.length&&!c.length?b(h):a.if(p(h),()=>b(h))})}function p(h){let S;if(m.length>8){const O=(0,s.schemaRefOrVal)(P,l.properties,"properties");S=(0,e.isOwnProperty)(a,O,h)}else m.length?S=(0,r.or)(...m.map(O=>(0,r._)`${h} === ${O}`)):S=r.nil;return c.length&&(S=(0,r.or)(S,...c.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${h})`))),(0,r.not)(S)}function v(h){a.code((0,r._)`delete ${d}[${h}]`)}function b(h){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){v(h);return}if(f===!1){u.setParams({additionalProperty:h}),u.error(),$||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(P,f)){const S=a.name("valid");E.removeAdditional==="failing"?(g(h,S,!1),a.if((0,r.not)(S),()=>{u.reset(),v(h)})):(g(h,S),$||a.if((0,r.not)(S),()=>a.break()))}}function g(h,S,O){const A={keyword:"additionalProperties",dataProp:h,dataPropType:s.Type.Str};O===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(A,S)}}};t.default=i}),lu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=on(),r=At(),n=Fe(),s=zi(),o={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,parentSchema:f,data:l,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);for(const c of w)d.definedProperties.add(c);d.opts.unevaluated&&w.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(u,(0,n.toHash)(w),d.props));const P=w.filter(c=>!(0,n.alwaysValidSchema)(d,a[c]));if(P.length===0)return;const $=u.name("valid");for(const c of P)E(c)?m(c):(u.if((0,r.propertyInData)(u,l,c,d.opts.ownProperties)),m(c),d.allErrors||u.else().var($,!0),u.endIf()),i.it.definedProperties.add(c),i.ok($);function E(c){return d.opts.useDefaults&&!d.compositeRule&&a[c].default!==void 0}function m(c){i.subschema({keyword:"properties",schemaProp:c,dataProp:c},$)}}};t.default=o}),fu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Me(),n=Fe(),s=Fe(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,data:f,parentSchema:l,it:d}=i,{opts:w}=d,P=(0,e.allSchemaProperties)(a),$=P.filter(b=>(0,n.alwaysValidSchema)(d,a[b]));if(P.length===0||$.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&l.properties,m=u.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(u,d.props));const{props:c}=d;_();function _(){for(const b of P)E&&p(b),d.allErrors?v(b):(u.var(m,!0),v(b),u.if(m))}function p(b){for(const g in E)new RegExp(b).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${b} (use allowMatchingProperties)`)}function v(b){u.forIn("key",f,g=>{u.if((0,r._)`${(0,e.usePattern)(i,b)}.test(${g})`,()=>{const h=$.includes(b);h||i.subschema({keyword:"patternProperties",schemaProp:b,dataProp:g,dataPropType:s.Type.Str},m),d.opts.unevaluated&&c!==!0?u.assign((0,r._)`${c}[${g}]`,!0):!h&&!d.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=o}),du=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:o,it:i}=n;if((0,e.alwaysValidSchema)(i,o)){n.fail();return}const u=s.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),n.failResult(u,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),hu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),pu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(o){const{gen:i,schema:u,parentSchema:a,it:f}=o;if(!Array.isArray(u))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const l=u,d=i.let("valid",!1),w=i.let("passing",null),P=i.name("_valid");o.setParams({passing:w}),i.block($),o.result(d,()=>o.reset(),()=>o.error(!0));function $(){l.forEach((E,m)=>{let c;(0,r.alwaysValidSchema)(f,E)?i.var(P,!0):c=o.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},P),m>0&&i.if((0,e._)`${P} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(P,()=>{i.assign(d,!0),i.assign(w,m),c&&o.mergeEvaluated(c,e.Name)})})}}};t.default=s}),mu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:o,it:i}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const u=s.name("valid");o.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const l=n.subschema({keyword:"allOf",schemaProp:f},u);n.ok(u),n.mergeEvaluated(l)})}};t.default=r}),gu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:u,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const l=o(f,"then"),d=o(f,"else");if(!l&&!d)return;const w=u.let("valid",!0),P=u.name("_valid");if($(),i.reset(),l&&d){const m=u.let("ifClause");i.setParams({ifClause:m}),u.if(P,E("then",m),E("else",m))}else l?u.if(P,E("then")):u.if((0,e.not)(P),E("else"));i.pass(w,()=>i.error(!0));function $(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);i.mergeEvaluated(m)}function E(m,c){return()=>{const _=i.subschema({keyword:m},P);u.assign(w,P),i.mergeValidEvaluated(_,w),c?u.assign(c,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function o(i,u){const a=i.schema[u];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),vu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:o}){s.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};t.default=r}),yu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ui(),r=iu(),n=Fi(),s=au(),o=ou(),i=cu(),u=uu(),a=zi(),f=lu(),l=fu(),d=du(),w=hu(),P=pu(),$=mu(),E=gu(),m=vu();function c(_=!1){const p=[d.default,w.default,P.default,$.default,E.default,m.default,u.default,a.default,i.default,f.default,l.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(o.default),p}t.default=c}),_u=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,o){const{gen:i,data:u,$data:a,schema:f,schemaCode:l,it:d}=s,{opts:w,errSchemaPath:P,schemaEnv:$,self:E}=d;if(!w.validateFormats)return;a?m():c();function m(){const _=i.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=i.const("fDef",(0,e._)`${_}[${l}]`),v=i.let("fType"),b=i.let("format");i.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(v,(0,e._)`${p}.type || "string"`).assign(b,(0,e._)`${p}.validate`),()=>i.assign(v,(0,e._)`"string"`).assign(b,p)),s.fail$data((0,e.or)(g(),h()));function g(){return w.strictSchema===!1?e.nil:(0,e._)`${l} && !${b}`}function h(){const S=$.$async?(0,e._)`(${p}.async ? await ${b}(${u}) : ${b}(${u}))`:(0,e._)`${b}(${u})`,O=(0,e._)`(typeof ${b} == "function" ? ${S} : ${b}.test(${u}))`;return(0,e._)`${b} && ${b} !== true && ${v} === ${o} && !${O}`}}function c(){const _=E.formats[f];if(!_){g();return}if(_===!0)return;const[p,v,b]=h(_);p===o&&s.pass(S());function g(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${P}"`}}function h(O){const A=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(f)}`:void 0,D=i.scopeValue("formats",{key:f,ref:O,code:A});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${D}.validate`]:["string",O,D]}function S(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!$.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${u})`}return typeof v=="function"?(0,e._)`${b}(${u})`:(0,e._)`${b}.test(${u})`}}}};t.default=n}),wu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=_u(),r=[e.default];t.default=r}),bu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),$u=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Kc(),r=su(),n=yu(),s=wu(),o=bu(),i=[e.default,r.default,(0,n.default)(),s.default,o.metadataVocabulary,o.contentVocabulary];t.default=i}),Eu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),Su=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Eu(),n=us(),s=cn(),o=Fe(),i={message:({params:{discrError:a,tagName:f}})=>a===r.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:a,tag:f,tagName:l}})=>(0,e._)`{error: ${a}, tag: ${l}, tagValue: ${f}}`},u={keyword:"discriminator",type:"object",schemaType:"object",error:i,code(a){const{gen:f,data:l,schema:d,parentSchema:w,it:P}=a,{oneOf:$}=w;if(!P.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=d.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!$)throw new Error("discriminator: requires oneOf keyword");const m=f.let("valid",!1),c=f.const("tag",(0,e._)`${l}${(0,e.getProperty)(E)}`);f.if((0,e._)`typeof ${c} == "string"`,()=>_(),()=>a.error(!1,{discrError:r.DiscrError.Tag,tag:c,tagName:E})),a.ok(m);function _(){const b=v();f.if(!1);for(const g in b)f.elseIf((0,e._)`${c} === ${g}`),f.assign(m,p(b[g]));f.else(),a.error(!1,{discrError:r.DiscrError.Mapping,tag:c,tagName:E}),f.endIf()}function p(b){const g=f.name("valid"),h=a.subschema({keyword:"oneOf",schemaProp:b},g);return a.mergeEvaluated(h,e.Name),g}function v(){var b;const g={},h=O(w);let S=!0;for(let q=0;q<$.length;q++){let X=$[q];if(X!=null&&X.$ref&&!(0,o.schemaHasRulesButRef)(X,P.self.RULES)){const Z=X.$ref;if(X=n.resolveRef.call(P.self,P.schemaEnv.root,P.baseId,Z),X instanceof n.SchemaEnv&&(X=X.schema),X===void 0)throw new s.default(P.opts.uriResolver,P.baseId,Z)}const G=(b=X==null?void 0:X.properties)===null||b===void 0?void 0:b[E];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);S=S&&(h||O(X)),A(G,q)}if(!S)throw new Error(`discriminator: "${E}" must be required`);return g;function O({required:q}){return Array.isArray(q)&&q.includes(E)}function A(q,X){if(q.const)D(q.const,X);else if(q.enum)for(const G of q.enum)D(G,X);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function D(q,X){if(typeof q!="string"||q in g)throw new Error(`discriminator: "${E}" values must be unique strings`);g[q]=X}}}};t.default=u}),Pu=K(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),Bi=K(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=Bc(),n=$u(),s=Su(),o=Pu(),i=["/properties"],u="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(o,i):o;this.addMetaSchema($,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}t.Ajv=a,e.exports=t=a,e.exports.Ajv=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=on();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var l=Me();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=cs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=cn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),ku=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(O,A){return{validate:O,compare:A}}t.fullFormats={date:e(o,i),time:e(a,f),"date-time":e(d,w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:E,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-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-f]{1,4}:){5}(((:[0-9a-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-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-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-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-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-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-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-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-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-f]{1,4}){1,7})|((:[0-9a-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}))|:)))$/i,regex:S,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:c,int32:{type:"number",validate:v},int64:{type:"number",validate:b},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(O){return O%4===0&&(O%100!==0||O%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(O){const A=n.exec(O);if(!A)return!1;const D=+A[1],q=+A[2],X=+A[3];return q>=1&&q<=12&&X>=1&&X<=(q===2&&r(D)?29:s[q])}function i(O,A){if(O&&A)return O>A?1:O<A?-1:0}var u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function a(O,A){const D=u.exec(O);if(!D)return!1;const q=+D[1],X=+D[2],G=+D[3],Z=D[5];return(q<=23&&X<=59&&G<=59||q===23&&X===59&&G===60)&&(!A||Z!=="")}function f(O,A){if(!(O&&A))return;const D=u.exec(O),q=u.exec(A);if(D&&q)return O=D[1]+D[2]+D[3]+(D[4]||""),A=q[1]+q[2]+q[3]+(q[4]||""),O>A?1:O<A?-1:0}var l=/t|\s/i;function d(O){const A=O.split(l);return A.length===2&&o(A[0])&&a(A[1],!0)}function w(O,A){if(!(O&&A))return;const[D,q]=O.split(l),[X,G]=A.split(l),Z=i(D,X);if(Z!==void 0)return Z||f(q,G)}var P=/\/|:/,$=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function E(O){return P.test(O)&&$.test(O)}var m=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function c(O){return m.lastIndex=0,m.test(O)}var _=-2147483648,p=2**31-1;function v(O){return Number.isInteger(O)&&O<=p&&O>=_}function b(O){return Number.isInteger(O)}function g(){return!0}var h=/[^\\]\\Z/;function S(O){if(h.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}}),Yr=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(_){if(super(),!t.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((p,v)=>`${p}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,v)=>(v instanceof r&&(p[v.str]=(p[v.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(c,..._){const p=[c[0]];let v=0;for(;v<_.length;)u(p,_[v]),p.push(c[++v]);return new n(p)}t._=s;var o=new n("+");function i(c,..._){const p=[P(c[0])];let v=0;for(;v<_.length;)p.push(o),u(p,_[v]),p.push(o,P(c[++v]));return a(p),new n(p)}t.str=i;function u(c,_){_ instanceof n?c.push(..._._items):_ instanceof r?c.push(_):c.push(d(_))}t.addCodeArg=u;function a(c){let _=1;for(;_<c.length-1;){if(c[_]===o){const p=f(c[_-1],c[_+1]);if(p!==void 0){c.splice(_-1,3,p);continue}c[_++]="+"}_++}}function f(c,_){if(_==='""')return c;if(c==='""')return _;if(typeof c=="string")return _ instanceof r||c[c.length-1]!=='"'?void 0:typeof _!="string"?`${c.slice(0,-1)}${_}"`:_[0]==='"'?c.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(c instanceof r))return`"${c}${_.slice(1)}`}function l(c,_){return _.emptyStr()?c:c.emptyStr()?_:i`${c}${_}`}t.strConcat=l;function d(c){return typeof c=="number"||typeof c=="boolean"||c===null?c:P(Array.isArray(c)?c.join(","):c)}function w(c){return new n(P(c))}t.stringify=w;function P(c){return JSON.stringify(c).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function $(c){return typeof c=="string"&&t.IDENTIFIER.test(c)?new n(`.${c}`):s`[${c}]`}t.getProperty=$;function E(c){if(typeof c=="string"&&t.IDENTIFIER.test(c))return new n(`${c}`);throw new Error(`CodeGen: invalid export name: ${c}, use explicit $id name mapping`)}t.getEsmExportName=E;function m(c){return new n(c.toString())}t.regexpCode=m}),Ks=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Yr();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.Completed=1]="Completed"})(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:f,parent:l}={}){this._names={},this._prefixes=f,this._parent=l}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const l=this._names[f]||this._nameGroup(f);return`${f}${l.index++}`}_nameGroup(f){var l,d;if(!((d=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class o extends e.Name{constructor(f,l){super(l),this.prefix=f}setValue(f,{property:l,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(l)}[${d}]`}}t.ValueScopeName=o;var i=(0,e._)`\n`;class u extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new o(f,this._newName(f))}value(f,l){var d;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(f),{prefix:P}=w,$=(d=l.key)!==null&&d!==void 0?d:l.ref;let E=this._values[P];if(E){const _=E.get($);if(_)return _}else E=this._values[P]=new Map;E.set($,w);const m=this._scope[P]||(this._scope[P]=[]),c=m.length;return m[c]=l.ref,w.setValue(l,{property:P,itemIndex:c}),w}getValue(f,l){const d=this._values[f];if(d)return d.get(l)}scopeRefs(f,l=this._values){return this._reduceValues(l,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,l,d){return this._reduceValues(f,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},l,d)}_reduceValues(f,l,d={},w){let P=e.nil;for(const $ in f){const E=f[$];if(!E)continue;const m=d[$]=d[$]||new Map;E.forEach(c=>{if(m.has(c))return;m.set(c,n.Started);let _=l(c);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${p} ${c} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(c))P=(0,e._)`${P}${_}${this.opts._n}`;else throw new r(c);m.set(c,n.Completed)})}return P}}t.ValueScope=u}),Ce=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=Yr(),r=Ks(),n=Yr();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Ks();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(y,k){return this}}class i extends o{constructor(y,k,C){super(),this.varKind=y,this.name=k,this.rhs=C}render({es5:y,_n:k}){const C=y?r.varKinds.var:this.varKind,H=this.rhs===void 0?"":` = ${this.rhs}`;return`${C} ${this.name}${H};`+k}optimizeNames(y,k){if(y[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,y,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class u extends o{constructor(y,k,C){super(),this.lhs=y,this.rhs=k,this.sideEffects=C}render({_n:y}){return`${this.lhs} = ${this.rhs};`+y}optimizeNames(y,k){if(!(this.lhs instanceof e.Name&&!y[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,y,k),this}get names(){const y=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(y,this.rhs)}}class a extends u{constructor(y,k,C,H){super(y,C,H),this.op=k}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class f extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class l extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class d extends o{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class w extends o{constructor(y){super(),this.code=y}render({_n:y}){return`${this.code};`+y}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(y,k){return this.code=G(this.code,y,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends o{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((k,C)=>k+C.render(y),"")}optimizeNodes(){const{nodes:y}=this;let k=y.length;for(;k--;){const C=y[k].optimizeNodes();Array.isArray(C)?y.splice(k,1,...C):C?y[k]=C:y.splice(k,1)}return y.length>0?this:void 0}optimizeNames(y,k){const{nodes:C}=this;let H=C.length;for(;H--;){const x=C[H];x.optimizeNames(y,k)||(Z(y,x.names),C.splice(H,1))}return C.length>0?this:void 0}get names(){return this.nodes.reduce((y,k)=>q(y,k.names),{})}}class $ extends P{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class E extends P{}class m extends ${}m.kind="else";class c extends ${constructor(y,k){super(k),this.condition=y}render(y){let k=`if(${this.condition})`+super.render(y);return this.else&&(k+="else "+this.else.render(y)),k}optimizeNodes(){super.optimizeNodes();const y=this.condition;if(y===!0)return this.nodes;let k=this.else;if(k){const C=k.optimizeNodes();k=this.else=Array.isArray(C)?new m(C):C}if(k)return y===!1?k instanceof c?k:k.nodes:this.nodes.length?this:new c(ce(y),k instanceof c?[k]:k.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,k){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(y,k),!!(super.optimizeNames(y,k)||this.else))return this.condition=G(this.condition,y,k),this}get names(){const y=super.names;return X(y,this.condition),this.else&&q(y,this.else.names),y}}c.kind="if";class _ extends ${}_.kind="for";class p extends _{constructor(y){super(),this.iteration=y}render(y){return`for(${this.iteration})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iteration=G(this.iteration,y,k),this}get names(){return q(super.names,this.iteration.names)}}class v extends _{constructor(y,k,C,H){super(),this.varKind=y,this.name=k,this.from=C,this.to=H}render(y){const k=y.es5?r.varKinds.var:this.varKind,{name:C,from:H,to:x}=this;return`for(${k} ${C}=${H}; ${C}<${x}; ${C}++)`+super.render(y)}get names(){const y=X(super.names,this.from);return X(y,this.to)}}class b extends _{constructor(y,k,C,H){super(),this.loop=y,this.varKind=k,this.name=C,this.iterable=H}render(y){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iterable=G(this.iterable,y,k),this}get names(){return q(super.names,this.iterable.names)}}class g extends ${constructor(y,k,C){super(),this.name=y,this.args=k,this.async=C}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}g.kind="func";class h extends P{render(y){return"return "+super.render(y)}}h.kind="return";class S extends ${render(y){let k="try"+super.render(y);return this.catch&&(k+=this.catch.render(y)),this.finally&&(k+=this.finally.render(y)),k}optimizeNodes(){var y,k;return super.optimizeNodes(),(y=this.catch)===null||y===void 0||y.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(y,k){var C,H;return super.optimizeNames(y,k),(C=this.catch)===null||C===void 0||C.optimizeNames(y,k),(H=this.finally)===null||H===void 0||H.optimizeNames(y,k),this}get names(){const y=super.names;return this.catch&&q(y,this.catch.names),this.finally&&q(y,this.finally.names),y}}class O extends ${constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}O.kind="catch";class A extends ${render(y){return"finally"+super.render(y)}}A.kind="finally";class D{constructor(y,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
17
|
-
`:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(y){return this._scope.name(y)}scopeName(y){return this._extScope.name(y)}scopeValue(y,k){const C=this._extScope.value(y,k);return(this._values[C.prefix]||(this._values[C.prefix]=new Set)).add(C),C}getScopeValue(y,k){return this._extScope.getValue(y,k)}scopeRefs(y){return this._extScope.scopeRefs(y,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(y,k,C,H){const x=this._scope.toName(k);return C!==void 0&&H&&(this._constants[x.str]=C),this._leafNode(new i(y,x,C)),x}const(y,k,C){return this._def(r.varKinds.const,y,k,C)}let(y,k,C){return this._def(r.varKinds.let,y,k,C)}var(y,k,C){return this._def(r.varKinds.var,y,k,C)}assign(y,k,C){return this._leafNode(new u(y,k,C))}add(y,k){return this._leafNode(new a(y,t.operators.ADD,k))}code(y){return typeof y=="function"?y():y!==e.nil&&this._leafNode(new w(y)),this}object(...y){const k=["{"];for(const[C,H]of y)k.length>1&&k.push(","),k.push(C),(C!==H||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,H));return k.push("}"),new e._Code(k)}if(y,k,C){if(this._blockNode(new c(y)),k&&C)this.code(k).else().code(C).endIf();else if(k)this.code(k).endIf();else if(C)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new c(y))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(c,m)}_for(y,k){return this._blockNode(y),k&&this.code(k).endFor(),this}for(y,k){return this._for(new p(y),k)}forRange(y,k,C,H,x=this.opts.es5?r.varKinds.var:r.varKinds.let){const ae=this._scope.toName(y);return this._for(new v(x,ae,k,C),()=>H(ae))}forOf(y,k,C,H=r.varKinds.const){const x=this._scope.toName(y);if(this.opts.es5){const ae=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ae}.length`,ne=>{this.var(x,(0,e._)`${ae}[${ne}]`),C(x)})}return this._for(new b("of",H,x,k),()=>C(x))}forIn(y,k,C,H=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,e._)`Object.keys(${k})`,C);const x=this._scope.toName(y);return this._for(new b("in",H,x,k),()=>C(x))}endFor(){return this._endBlockNode(_)}label(y){return this._leafNode(new f(y))}break(y){return this._leafNode(new l(y))}return(y){const k=new h;if(this._blockNode(k),this.code(y),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(h)}try(y,k,C){if(!k&&!C)throw new Error('CodeGen: "try" without "catch" and "finally"');const H=new S;if(this._blockNode(H),this.code(y),k){const x=this.name("e");this._currNode=H.catch=new O(x),k(x)}return C&&(this._currNode=H.finally=new A,this.code(C)),this._endBlockNode(O,A)}throw(y){return this._leafNode(new d(y))}block(y,k){return this._blockStarts.push(this._nodes.length),y&&this.code(y).endBlock(k),this}endBlock(y){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const C=this._nodes.length-k;if(C<0||y!==void 0&&C!==y)throw new Error(`CodeGen: wrong number of nodes: ${C} vs ${y} expected`);return this._nodes.length=k,this}func(y,k=e.nil,C,H){return this._blockNode(new g(y,k,C)),H&&this.code(H).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(y=1){for(;y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(y){return this._currNode.nodes.push(y),this}_blockNode(y){this._currNode.nodes.push(y),this._nodes.push(y)}_endBlockNode(y,k){const C=this._currNode;if(C instanceof y||k&&C instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${y.kind}/${k.kind}`:y.kind}"`)}_elseNode(y){const k=this._currNode;if(!(k instanceof c))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=y,this}get _root(){return this._nodes[0]}get _currNode(){const y=this._nodes;return y[y.length-1]}set _currNode(y){const k=this._nodes;k[k.length-1]=y}}t.CodeGen=D;function q(I,y){for(const k in y)I[k]=(I[k]||0)+(y[k]||0);return I}function X(I,y){return y instanceof e._CodeOrName?q(I,y.names):I}function G(I,y,k){if(I instanceof e.Name)return C(I);if(!H(I))return I;return new e._Code(I._items.reduce((x,ae)=>(ae instanceof e.Name&&(ae=C(ae)),ae instanceof e._Code?x.push(...ae._items):x.push(ae),x),[]));function C(x){const ae=k[x.str];return ae===void 0||y[x.str]!==1?x:(delete y[x.str],ae)}function H(x){return x instanceof e._Code&&x._items.some(ae=>ae instanceof e.Name&&y[ae.str]===1&&k[ae.str]!==void 0)}}function Z(I,y){for(const k in y)I[k]=(I[k]||0)-(y[k]||0)}function ce(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,e._)`!${U(I)}`}t.not=ce;var ye=T(t.operators.AND);function Re(...I){return I.reduce(ye)}t.and=Re;var ie=T(t.operators.OR);function z(...I){return I.reduce(ie)}t.or=z;function T(I){return(y,k)=>y===e.nil?k:k===e.nil?y:(0,e._)`${U(y)} ${I} ${U(k)}`}function U(I){return I instanceof e.Name?I:(0,e._)`(${I})`}}),ze=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Ce(),r=Yr();function n(g){const h={};for(const S of g)h[S]=!0;return h}t.toHash=n;function s(g,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(o(g,h),!i(h,g.self.RULES.all))}t.alwaysValidSchema=s;function o(g,h=g.schema){const{opts:S,self:O}=g;if(!S.strictSchema||typeof h=="boolean")return;const A=O.RULES.keywords;for(const D in h)A[D]||b(g,`unknown keyword: "${D}"`)}t.checkUnknownRules=o;function i(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(h[S])return!0;return!1}t.schemaHasRules=i;function u(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(S!=="$ref"&&h.all[S])return!0;return!1}t.schemaHasRulesButRef=u;function a({topSchemaRef:g,schemaPath:h},S,O,A){if(!A){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${g}${h}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return w(decodeURIComponent(g))}t.unescapeFragment=f;function l(g){return encodeURIComponent(d(g))}t.escapeFragment=l;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function P(g,h){if(Array.isArray(g))for(const S of g)h(S);else h(g)}t.eachItem=P;function $({mergeNames:g,mergeToName:h,mergeValues:S,resultToName:O}){return(A,D,q,X)=>{const G=q===void 0?D:q instanceof e.Name?(D instanceof e.Name?g(A,D,q):h(A,D,q),q):D instanceof e.Name?(h(A,q,D),D):S(D,q);return X===e.Name&&!(G instanceof e.Name)?O(A,G):G}}t.mergeEvaluated={props:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>{g.if((0,e._)`${h} === true`,()=>g.assign(S,!0),()=>g.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${h})`))}),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>{h===!0?g.assign(S,!0):(g.assign(S,(0,e._)`${S} || {}`),m(g,S,h))}),mergeValues:(g,h)=>g===!0?!0:{...g,...h},resultToName:E}),items:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>g.assign(S,(0,e._)`${h} === true ? true : ${S} > ${h} ? ${S} : ${h}`)),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>g.assign(S,h===!0?!0:(0,e._)`${S} > ${h} ? ${S} : ${h}`)),mergeValues:(g,h)=>g===!0?!0:Math.max(g,h),resultToName:(g,h)=>g.var("items",h)})};function E(g,h){if(h===!0)return g.var("props",!0);const S=g.var("props",(0,e._)`{}`);return h!==void 0&&m(g,S,h),S}t.evaluatedPropsToName=E;function m(g,h,S){Object.keys(S).forEach(O=>g.assign((0,e._)`${h}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var c={};function _(g,h){return g.scopeValue("func",{ref:h,code:c[h.code]||(c[h.code]=new r._Code(h.code))})}t.useFunc=_;var p;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(p=t.Type||(t.Type={}));function v(g,h,S){if(g instanceof e.Name){const O=h===p.Num;return S?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=v;function b(g,h,S=g.opts.strictSchema){if(S){if(h=`strict mode: ${h}`,S===!0)throw new Error(h);g.self.logger.warn(h)}}t.checkStrictMode=b}),er=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),un=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Ce(),r=ze(),n=er();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:c})=>c?(0,e.str)`"${m}" keyword must be ${c} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,c=t.keywordError,_,p){const{it:v}=m,{gen:b,compositeRule:g,allErrors:h}=v,S=d(m,c,_);p??(g||h)?a(b,S):f(v,(0,e._)`[${S}]`)}t.reportError=s;function o(m,c=t.keywordError,_){const{it:p}=m,{gen:v,compositeRule:b,allErrors:g}=p,h=d(m,c,_);a(v,h),b||g||f(p,n.default.vErrors)}t.reportExtraError=o;function i(m,c){m.assign(n.default.errors,c),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(c,()=>m.assign((0,e._)`${n.default.vErrors}.length`,c),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function u({gen:m,keyword:c,schemaValue:_,data:p,errsCount:v,it:b}){if(v===void 0)throw new Error("ajv implementation error");const g=m.name("err");m.forRange("i",v,n.default.errors,h=>{m.const(g,(0,e._)`${n.default.vErrors}[${h}]`),m.if((0,e._)`${g}.instancePath === undefined`,()=>m.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,b.errorPath))),m.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${c}`),b.opts.verbose&&(m.assign((0,e._)`${g}.schema`,_),m.assign((0,e._)`${g}.data`,p))})}t.extendErrors=u;function a(m,c){const _=m.const("err",c);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${_}]`),(0,e._)`${n.default.vErrors}.push(${_})`),m.code((0,e._)`${n.default.errors}++`)}function f(m,c){const{gen:_,validateName:p,schemaEnv:v}=m;v.$async?_.throw((0,e._)`new ${m.ValidationError}(${c})`):(_.assign((0,e._)`${p}.errors`,c),_.return(!1))}var l={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(m,c,_){const{createErrors:p}=m.it;return p===!1?(0,e._)`{}`:w(m,c,_)}function w(m,c,_={}){const{gen:p,it:v}=m,b=[P(v,_),$(m,_)];return E(m,c,b),p.object(...b)}function P({errorPath:m},{instancePath:c}){const _=c?(0,e.str)`${m}${(0,r.getErrorPath)(c,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function $({keyword:m,it:{errSchemaPath:c}},{schemaPath:_,parentSchema:p}){let v=p?c:(0,e.str)`${c}/${m}`;return _&&(v=(0,e.str)`${v}${(0,r.getErrorPath)(_,r.Type.Str)}`),[l.schemaPath,v]}function E(m,{params:c,message:_},p){const{keyword:v,data:b,schemaValue:g,it:h}=m,{opts:S,propertyName:O,topSchemaRef:A,schemaPath:D}=h;p.push([l.keyword,v],[l.params,typeof c=="function"?c(m):c||(0,e._)`{}`]),S.messages&&p.push([l.message,typeof _=="function"?_(m):_]),S.verbose&&p.push([l.schema,g],[l.parentSchema,(0,e._)`${A}${D}`],[n.default.data,b]),O&&p.push([l.propertyName,O])}}),Ou=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=un(),r=Ce(),n=er(),s={message:"boolean schema is false"};function o(a){const{gen:f,schema:l,validateName:d}=a;l===!1?u(a,!1):typeof l=="object"&&l.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=o;function i(a,f){const{gen:l,schema:d}=a;d===!1?(l.var(f,!1),u(a)):l.var(f,!0)}t.boolOrEmptySchema=i;function u(a,f){const{gen:l,data:d}=a,w={gen:l,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,f)}}),xi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(o){return typeof o=="string"&&r.has(o)}t.isJSONType=n;function s(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Hi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:o},i){const u=o.RULES.types[i];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,o){return o.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,o){var i;return s[o.keyword]!==void 0||((i=o.definition.implements)===null||i===void 0?void 0:i.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),Zr=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=xi(),r=Hi(),n=un(),s=Ce(),o=ze(),i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i=t.DataType||(t.DataType={}));function u(p){const v=a(p.type);if(v.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&v.push("null")}return v}t.getSchemaTypes=u;function a(p){const v=Array.isArray(p)?p:p?[p]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}t.getJSONTypes=a;function f(p,v){const{gen:b,data:g,opts:h}=p,S=d(v,h.coerceTypes),O=v.length>0&&!(S.length===0&&v.length===1&&(0,r.schemaHasRulesForType)(p,v[0]));if(O){const A=E(v,g,h.strictNumbers,i.Wrong);b.if(A,()=>{S.length?w(p,v,S):c(p)})}return O}t.coerceAndCheckDataType=f;var l=new Set(["string","number","integer","boolean","null"]);function d(p,v){return v?p.filter(b=>l.has(b)||v==="array"&&b==="array"):[]}function w(p,v,b){const{gen:g,data:h,opts:S}=p,O=g.let("dataType",(0,s._)`typeof ${h}`),A=g.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>g.assign(h,(0,s._)`${h}[0]`).assign(O,(0,s._)`typeof ${h}`).if(E(v,h,S.strictNumbers),()=>g.assign(A,h))),g.if((0,s._)`${A} !== undefined`);for(const q of b)(l.has(q)||q==="array"&&S.coerceTypes==="array")&&D(q);g.else(),c(p),g.endIf(),g.if((0,s._)`${A} !== undefined`,()=>{g.assign(h,A),P(p,A)});function D(q){switch(q){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(A,(0,s._)`"" + ${h}`).elseIf((0,s._)`${h} === null`).assign(A,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${h} === null
|
|
18
|
-
|| (${O} == "string" && ${h} && ${h} == +${h})`).assign(
|
|
19
|
-
|| (${O} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(
|
|
20
|
-
|| ${O} === "boolean" || ${h} === null`).assign(A,(0,s._)`[${h}]`)}}}function P({gen:p,parentData:v,parentDataProperty:b},g){p.if((0,s._)`${v} !== undefined`,()=>p.assign((0,s._)`${v}[${b}]`,g))}function $(p,v,b,g=i.Correct){const h=g===i.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(p){case"null":return(0,s._)`${v} ${h} null`;case"array":S=(0,s._)`Array.isArray(${v})`;break;case"object":S=(0,s._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":S=O((0,s._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${v} ${h} ${p}`}return g===i.Correct?S:(0,s.not)(S);function O(A=s.nil){return(0,s.and)((0,s._)`typeof ${v} == "number"`,A,b?(0,s._)`isFinite(${v})`:s.nil)}}t.checkDataType=$;function E(p,v,b,g){if(p.length===1)return $(p[0],v,b,g);let h;const S=(0,o.toHash)(p);if(S.array&&S.object){const O=(0,s._)`typeof ${v} != "object"`;h=S.null?O:(0,s._)`!${v} || ${O}`,delete S.null,delete S.array,delete S.object}else h=s.nil;S.number&&delete S.integer;for(const O in S)h=(0,s.and)(h,$(O,v,b,g));return h}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:v})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${v}}`};function c(p){const v=_(p);(0,n.reportError)(v,m)}t.reportTypeError=c;function _(p){const{gen:v,data:b,schema:g}=p,h=(0,o.schemaRefOrVal)(p,g,"type");return{gen:v,keyword:"type",data:b,schema:g.type,schemaCode:h,schemaValue:h,parentSchema:g,params:{},it:p}}}),Nu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ce(),r=ze();function n(o,i){const{properties:u,items:a}=o.schema;if(i==="object"&&u)for(const f in u)s(o,f,u[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,l)=>s(o,l,f.default))}t.assignDefaults=n;function s(o,i,u){const{gen:a,compositeRule:f,data:l,opts:d}=o;if(u===void 0)return;const w=(0,e._)`${l}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(o,`default is ignored for: ${w}`);return}let P=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${w} === null || ${w} === ""`),a.if(P,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),Ct=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Ce(),r=ze(),n=er(),s=ze();function o(p,v){const{gen:b,data:g,it:h}=p;b.if(d(b,g,v,h.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${v}`},!0),p.error()})}t.checkReportMissingProp=o;function i({gen:p,data:v,it:{opts:b}},g,h){return(0,e.or)(...g.map(S=>(0,e.and)(d(p,v,S,b.ownProperties),(0,e._)`${h} = ${S}`)))}t.checkMissingProp=i;function u(p,v){p.setParams({missingProperty:v},!0),p.error()}t.reportMissingProp=u;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(p,v,b){return(0,e._)`${a(p)}.call(${v}, ${b})`}t.isOwnProperty=f;function l(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} !== undefined`;return g?(0,e._)`${h} && ${f(p,v,b)}`:h}t.propertyInData=l;function d(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} === undefined`;return g?(0,e.or)(h,(0,e.not)(f(p,v,b))):h}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(v=>v!=="__proto__"):[]}t.allSchemaProperties=w;function P(p,v){return w(v).filter(b=>!(0,r.alwaysValidSchema)(p,v[b]))}t.schemaProperties=P;function $({schemaCode:p,data:v,it:{gen:b,topSchemaRef:g,schemaPath:h,errorPath:S},it:O},A,D,q){const X=q?(0,e._)`${p}, ${v}, ${g}${h}`:v,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&G.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const Z=(0,e._)`${X}, ${b.object(...G)}`;return D!==e.nil?(0,e._)`${A}.call(${D}, ${Z})`:(0,e._)`${A}(${Z})`}t.callValidateCode=$;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:v}},b){const g=v.unicodeRegExp?"u":"",{regExp:h}=v.code,S=h(b,g);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${h.code==="new RegExp"?E:(0,s.useFunc)(p,h)}(${b}, ${g})`})}t.usePattern=m;function c(p){const{gen:v,data:b,keyword:g,it:h}=p,S=v.name("valid");if(h.allErrors){const A=v.let("valid",!0);return O(()=>v.assign(A,!1)),A}return v.var(S,!0),O(()=>v.break()),S;function O(A){const D=v.const("len",(0,e._)`${b}.length`);v.forRange("i",0,D,q=>{p.subschema({keyword:g,dataProp:q,dataPropType:r.Type.Num},S),v.if((0,e.not)(S),A)})}}t.validateArray=c;function _(p){const{gen:v,schema:b,keyword:g,it:h}=p;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(D=>(0,r.alwaysValidSchema)(h,D))&&!h.opts.unevaluated)return;const O=v.let("valid",!1),A=v.name("_valid");v.block(()=>b.forEach((D,q)=>{const X=p.subschema({keyword:g,schemaProp:q,compositeRule:!0},A);v.assign(O,(0,e._)`${O} || ${A}`),p.mergeValidEvaluated(X,A)||v.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),Tu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ce(),r=er(),n=Ct(),s=un();function o(P,$){const{gen:E,keyword:m,schema:c,parentSchema:_,it:p}=P,v=$.macro.call(p.self,c,_,p),b=l(E,m,v);p.opts.validateSchema!==!1&&p.self.validateSchema(v,!0);const g=E.name("valid");P.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:b,compositeRule:!0},g),P.pass(g,()=>P.error(!0))}t.macroKeywordCode=o;function i(P,$){var E;const{gen:m,keyword:c,schema:_,parentSchema:p,$data:v,it:b}=P;f(b,$);const g=!v&&$.compile?$.compile.call(b.self,_,p,b):$.validate,h=l(m,c,g),S=m.let("valid");P.block$data(S,O),P.ok((E=$.valid)!==null&&E!==void 0?E:S);function O(){if($.errors===!1)q(),$.modifying&&u(P),X(()=>P.error());else{const G=$.async?A():D();$.modifying&&u(P),X(()=>a(P,G))}}function A(){const G=m.let("ruleErrs",null);return m.try(()=>q((0,e._)`await `),Z=>m.assign(S,!1).if((0,e._)`${Z} instanceof ${b.ValidationError}`,()=>m.assign(G,(0,e._)`${Z}.errors`),()=>m.throw(Z))),G}function D(){const G=(0,e._)`${h}.errors`;return m.assign(G,null),q(e.nil),G}function q(G=$.async?(0,e._)`await `:e.nil){const Z=b.opts.passContext?r.default.this:r.default.self,ce=!("compile"in $&&!v||$.schema===!1);m.assign(S,(0,e._)`${G}${(0,n.callValidateCode)(P,h,Z,ce)}`,$.modifying)}function X(G){var Z;m.if((0,e.not)((Z=$.valid)!==null&&Z!==void 0?Z:S),G)}}t.funcKeywordCode=i;function u(P){const{gen:$,data:E,it:m}=P;$.if(m.parentData,()=>$.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(P,$){const{gen:E}=P;E.if((0,e._)`Array.isArray(${$})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${$} : ${r.default.vErrors}.concat(${$})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(P)},()=>P.error())}function f({schemaEnv:P},$){if($.async&&!P.$async)throw new Error("async keyword in sync schema")}function l(P,$,E){if(E===void 0)throw new Error(`keyword "${$}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,$,E=!1){return!$.length||$.some(m=>m==="array"?Array.isArray(P):m==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==m||E&&typeof P>"u")}t.validSchemaType=d;function w({schema:P,opts:$,self:E,errSchemaPath:m},c,_){if(Array.isArray(c.keyword)?!c.keyword.includes(_):c.keyword!==_)throw new Error("ajv implementation error");const p=c.dependencies;if(p!=null&&p.some(v=>!Object.prototype.hasOwnProperty.call(P,v)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(c.validateSchema&&!c.validateSchema(P[_])){const b=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(c.validateSchema.errors);if($.validateSchema==="log")E.logger.error(b);else throw new Error(b)}}t.validateKeywordUsage=w}),Ru=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ce(),r=ze();function n(i,{keyword:u,schemaProp:a,schema:f,schemaPath:l,errSchemaPath:d,topSchemaRef:w}){if(u!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const P=i.schema[u];return a===void 0?{schema:P,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${u}`}:{schema:P[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${u}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(l===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:l,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,u,{dataProp:a,dataPropType:f,data:l,dataTypes:d,propertyName:w}){if(l!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=u;if(a!==void 0){const{errorPath:E,dataPathArr:m,opts:c}=u,_=P.let("data",(0,e._)`${u.data}${(0,e.getProperty)(a)}`,!0);$(_),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,c.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(l!==void 0){const E=l instanceof e.Name?l:P.let("data",l,!0);$(E),w!==void 0&&(i.propertyName=w)}d&&(i.dataTypes=d);function $(E){i.data=E,i.dataLevel=u.dataLevel+1,i.dataTypes=[],u.definedProperties=new Set,i.parentData=u.data,i.dataNames=[...u.dataNames,E]}}t.extendSubschemaData=s;function o(i,{jtdDiscriminator:u,jtdMetadata:a,compositeRule:f,createErrors:l,allErrors:d}){f!==void 0&&(i.compositeRule=f),l!==void 0&&(i.createErrors=l),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=u,i.jtdMetadata=a}t.extendSubschemaMode=o}),ln=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=ze(),r=sn(),n=Li(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(m,c=!0){return typeof m=="boolean"?!0:c===!0?!u(m):c?a(m)<=c:!1}t.inlineRef=o;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const c in m){if(i.has(c))return!0;const _=m[c];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function a(m){let c=0;for(const _ in m){if(_==="$ref")return 1/0;if(c++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],p=>c+=a(p)),c===1/0))return 1/0}return c}function f(m,c="",_){_!==!1&&(c=w(c));const p=m.parse(c);return l(m,p)}t.getFullPath=f;function l(m,c){return m.serialize(c).split("#")[0]+"#"}t._getFullPath=l;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function P(m,c,_){return _=w(_),m.resolve(c,_)}t.resolveUrl=P;var $=/^[a-z_][-a-z0-9._]*$/i;function E(m,c){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,v=w(m[_]||c),b={"":v},g=f(p,v,!1),h={},S=new Set;return n(m,{allKeys:!0},(D,q,X,G)=>{if(G===void 0)return;const Z=g+q;let ce=b[G];typeof D[_]=="string"&&(ce=ye.call(this,D[_])),Re.call(this,D.$anchor),Re.call(this,D.$dynamicAnchor),b[q]=ce;function ye(ie){const z=this.opts.uriResolver.resolve;if(ie=w(ce?z(ce,ie):ie),S.has(ie))throw A(ie);S.add(ie);let T=this.refs[ie];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(D,T.schema,ie):ie!==w(Z)&&(ie[0]==="#"?(O(D,h[ie],ie),h[ie]=D):this.refs[ie]=Z),ie}function Re(ie){if(typeof ie=="string"){if(!$.test(ie))throw new Error(`invalid anchor "${ie}"`);ye.call(this,`#${ie}`)}}}),h;function O(D,q,X){if(q!==void 0&&!r(D,q))throw A(X)}function A(D){return new Error(`reference "${D}" resolves to more than one schema`)}}t.getSchemaRefs=E}),fn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Ou(),r=Zr(),n=Hi(),s=Zr(),o=Nu(),i=Tu(),u=Ru(),a=Ce(),f=er(),l=ln(),d=ze(),w=un();function P(N){if(g(N)&&(S(N),b(N))){c(N);return}$(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function $({gen:N,validateName:R,schema:V,schemaEnv:B,opts:Q},re){Q.code.es5?N.func(R,(0,a._)`${f.default.data}, ${f.default.valCxt}`,B.$async,()=>{N.code((0,a._)`"use strict"; ${p(V,Q)}`),m(N,Q),N.code(re)}):N.func(R,(0,a._)`${f.default.data}, ${E(Q)}`,B.$async,()=>N.code(p(V,Q)).code(re))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function m(N,R){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function c(N){const{schema:R,opts:V,gen:B}=N;$(N,()=>{V.$comment&&R.$comment&&G(N),D(N),B.let(f.default.vErrors,null),B.let(f.default.errors,0),V.unevaluated&&_(N),O(N),Z(N)})}function _(N){const{gen:R,validateName:V}=N;N.evaluated=R.const("evaluated",(0,a._)`${V}.evaluated`),R.if((0,a._)`${N.evaluated}.dynamicProps`,()=>R.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),R.if((0,a._)`${N.evaluated}.dynamicItems`,()=>R.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function p(N,R){const V=typeof N=="object"&&N[R.schemaId];return V&&(R.code.source||R.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function v(N,R){if(g(N)&&(S(N),b(N))){h(N,R);return}(0,e.boolOrEmptySchema)(N,R)}function b({schema:N,self:R}){if(typeof N=="boolean")return!N;for(const V in N)if(R.RULES.all[V])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function h(N,R){const{schema:V,gen:B,opts:Q}=N;Q.$comment&&V.$comment&&G(N),q(N),X(N);const re=B.const("_errs",f.default.errors);O(N,re),B.var(R,(0,a._)`${re} === ${f.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),A(N)}function O(N,R){if(N.opts.jtd)return ye(N,[],!1,R);const V=(0,r.getSchemaTypes)(N.schema),B=(0,r.coerceAndCheckDataType)(N,V);ye(N,V,!B,R)}function A(N){const{schema:R,errSchemaPath:V,opts:B,self:Q}=N;R.$ref&&B.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(R,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function D(N){const{schema:R,opts:V}=N;R.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function q(N){const R=N.schema[N.opts.schemaId];R&&(N.baseId=(0,l.resolveUrl)(N.opts.uriResolver,N.baseId,R))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:N,schemaEnv:R,schema:V,errSchemaPath:B,opts:Q}){const re=V.$comment;if(Q.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${re})`);else if(typeof Q.$comment=="function"){const be=(0,a.str)`${B}/$comment`,Ve=N.scopeValue("root",{ref:R.root});N.code((0,a._)`${f.default.self}.opts.$comment(${re}, ${be}, ${Ve}.schema)`)}}function Z(N){const{gen:R,schemaEnv:V,validateName:B,ValidationError:Q,opts:re}=N;V.$async?R.if((0,a._)`${f.default.errors} === 0`,()=>R.return(f.default.data),()=>R.throw((0,a._)`new ${Q}(${f.default.vErrors})`)):(R.assign((0,a._)`${B}.errors`,f.default.vErrors),re.unevaluated&&ce(N),R.return((0,a._)`${f.default.errors} === 0`))}function ce({gen:N,evaluated:R,props:V,items:B}){V instanceof a.Name&&N.assign((0,a._)`${R}.props`,V),B instanceof a.Name&&N.assign((0,a._)`${R}.items`,B)}function ye(N,R,V,B){const{gen:Q,schema:re,data:be,allErrors:Ve,opts:Te,self:je}=N,{RULES:_e}=je;if(re.$ref&&(Te.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(re,_e))){Q.block(()=>x(N,"$ref",_e.all.$ref.definition));return}Te.jtd||ie(N,R),Q.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(re,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,be,Te.strictNumbers)),Re(N,Ie),R.length===1&&R[0]===Ie.type&&V&&(Q.else(),(0,s.reportTypeError)(N)),Q.endIf()):Re(N,Ie),Ve||Q.if((0,a._)`${f.default.errors} === ${B||0}`))}}function Re(N,R){const{gen:V,schema:B,opts:{useDefaults:Q}}=N;Q&&(0,o.assignDefaults)(N,R.type),V.block(()=>{for(const re of R.rules)(0,n.shouldUseRule)(B,re)&&x(N,re.keyword,re.definition,R.type)})}function ie(N,R){N.schemaEnv.meta||!N.opts.strictTypes||(z(N,R),N.opts.allowUnionTypes||T(N,R),U(N,N.dataTypes))}function z(N,R){if(R.length){if(!N.dataTypes.length){N.dataTypes=R;return}R.forEach(V=>{y(N.dataTypes,V)||C(N,`type "${V}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,R)}}function T(N,R){R.length>1&&!(R.length===2&&R.includes("null"))&&C(N,"use allowUnionTypes to allow union type keyword")}function U(N,R){const V=N.self.RULES.all;for(const B in V){const Q=V[B];if(typeof Q=="object"&&(0,n.shouldUseRule)(N.schema,Q)){const{type:re}=Q.definition;re.length&&!re.some(be=>I(R,be))&&C(N,`missing type "${re.join(",")}" for keyword "${B}"`)}}}function I(N,R){return N.includes(R)||R==="number"&&N.includes("integer")}function y(N,R){return N.includes(R)||R==="integer"&&N.includes("number")}function k(N,R){const V=[];for(const B of N.dataTypes)y(R,B)?V.push(B):R.includes("integer")&&B==="number"&&V.push("integer");N.dataTypes=V}function C(N,R){const V=N.schemaEnv.baseId+N.errSchemaPath;R+=` at "${V}" (strictTypes)`,(0,d.checkStrictMode)(N,R,N.opts.strictTypes)}class H{constructor(R,V,B){if((0,i.validateKeywordUsage)(R,V,B),this.gen=R.gen,this.allErrors=R.allErrors,this.keyword=B,this.data=R.data,this.schema=R.schema[B],this.$data=V.$data&&R.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(R,this.schema,B,this.$data),this.schemaType=V.schemaType,this.parentSchema=R.schema,this.params={},this.it=R,this.def=V,this.$data)this.schemaCode=R.gen.const("vSchema",ve(this.$data,R));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=R.gen.const("_errs",f.default.errors))}result(R,V,B){this.failResult((0,a.not)(R),V,B)}failResult(R,V,B){this.gen.if(R),B?B():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(R,V){this.failResult((0,a.not)(R),void 0,V)}fail(R){if(R===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(R),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(R){if(!this.$data)return this.fail(R);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),R)})`)}error(R,V,B){if(V){this.setParams(V),this._error(R,B),this.setParams({});return}this._error(R,B)}_error(R,V){(R?w.reportExtraError:w.reportError)(this,this.def.error,V)}$dataError(){(0,w.reportError)(this,this.def.$dataError||w.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,w.resetErrorsCount)(this.gen,this.errsCount)}ok(R){this.allErrors||this.gen.if(R)}setParams(R,V){V?Object.assign(this.params,R):this.params=R}block$data(R,V,B=a.nil){this.gen.block(()=>{this.check$data(R,B),V()})}check$data(R=a.nil,V=a.nil){if(!this.$data)return;const{gen:B,schemaCode:Q,schemaType:re,def:be}=this;B.if((0,a.or)((0,a._)`${Q} === undefined`,V)),R!==a.nil&&B.assign(R,!0),(re.length||be.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),R!==a.nil&&B.assign(R,!1)),B.else()}invalid$data(){const{gen:R,schemaCode:V,schemaType:B,def:Q,it:re}=this;return(0,a.or)(be(),Ve());function be(){if(B.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Te=Array.isArray(B)?B:[B];return(0,a._)`${(0,s.checkDataTypes)(Te,V,re.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ve(){if(Q.validateSchema){const Te=R.scopeValue("validate$data",{ref:Q.validateSchema});return(0,a._)`!${Te}(${V})`}return a.nil}}subschema(R,V){const B=(0,u.getSubschema)(this.it,R);(0,u.extendSubschemaData)(B,this.it,R),(0,u.extendSubschemaMode)(B,R);const Q={...this.it,...B,items:void 0,props:void 0};return v(Q,V),Q}mergeEvaluated(R,V){const{it:B,gen:Q}=this;B.opts.unevaluated&&(B.props!==!0&&R.props!==void 0&&(B.props=d.mergeEvaluated.props(Q,R.props,B.props,V)),B.items!==!0&&R.items!==void 0&&(B.items=d.mergeEvaluated.items(Q,R.items,B.items,V)))}mergeValidEvaluated(R,V){const{it:B,gen:Q}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return Q.if(V,()=>this.mergeEvaluated(R,a.Name)),!0}}t.KeywordCxt=H;function x(N,R,V,B){const Q=new H(N,V,R);"code"in V?V.code(Q,B):Q.$data&&V.validate?(0,i.funcKeywordCode)(Q,V):"macro"in V?(0,i.macroKeywordCode)(Q,V):(V.compile||V.validate)&&(0,i.funcKeywordCode)(Q,V)}var ae=/^\/(?:[^~]|~0|~1)*$/,ne=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:R,dataNames:V,dataPathArr:B}){let Q,re;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!ae.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);Q=N,re=f.default.rootData}else{const je=ne.exec(N);if(!je)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+je[1];if(Q=je[2],Q==="#"){if(_e>=R)throw new Error(Te("property/index",_e));return B[R-_e]}if(_e>R)throw new Error(Te("data",_e));if(re=V[R-_e],!Q)return re}let be=re;const Ve=Q.split("/");for(const je of Ve)je&&(re=(0,a._)`${re}${(0,a.getProperty)((0,d.unescapeJsonPointer)(je))}`,be=(0,a._)`${be} && ${re}`);return be;function Te(je,_e){return`Cannot access ${je} ${_e} levels up, current level is ${R}`}}t.getData=ve}),fs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),ds=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ln();class r extends Error{constructor(s,o,i,u){super(u||`can't resolve reference ${i} from id ${o}`),this.missingRef=(0,e.resolveUrl)(s,o,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),hs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ce(),r=fs(),n=er(),s=ln(),o=ze(),i=fn();class u{constructor(_){var p;this.refs={},this.dynamicAnchors={};let v;typeof _.schema=="object"&&(v=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(v==null?void 0:v[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=v==null?void 0:v.$async,this.refs={}}}t.SchemaEnv=u;function a(c){const _=d.call(this,c);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,c.root.baseId),{es5:v,lines:b}=this.opts.code,{ownProperties:g}=this.opts,h=new e.CodeGen(this.scope,{es5:v,lines:b,ownProperties:g});let S;c.$async&&(S=h.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=h.scopeName("validate");c.validateName=O;const A={gen:h,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===!0?{ref:c.schema,code:(0,e.stringify)(c.schema)}:{ref:c.schema}),validateName:O,ValidationError:S,schema:c.schema,schemaEnv:c,rootId:p,baseId:c.baseId||p,schemaPath:e.nil,errSchemaPath:c.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(c),(0,i.validateFunctionCode)(A),h.optimize(this.opts.code.optimize);const q=h.toString();D=`${h.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(D=this.opts.code.process(D,c));const G=new Function(`${n.default.self}`,`${n.default.scope}`,D)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=c.schema,G.schemaEnv=c,c.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:q,scopeValues:h._values}),this.opts.unevaluated){const{props:Z,items:ce}=A;G.evaluated={props:Z instanceof e.Name?void 0:Z,items:ce instanceof e.Name?void 0:ce,dynamicProps:Z instanceof e.Name,dynamicItems:ce instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return c.validate=G,c}catch(q){throw delete c.validate,delete c.validateName,D&&this.logger.error("Error compiling schema, function code:",D),q}finally{this._compilations.delete(c)}}t.compileSchema=a;function f(c,_,p){var v;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const b=c.refs[p];if(b)return b;let g=P.call(this,c,p);if(g===void 0){const h=(v=c.localRefs)===null||v===void 0?void 0:v[p],{schemaId:S}=this.opts;h&&(g=new u({schema:h,schemaId:S,root:c,baseId:_}))}if(g!==void 0)return c.refs[p]=l.call(this,g)}t.resolveRef=f;function l(c){return(0,s.inlineRef)(c.schema,this.opts.inlineRefs)?c.schema:c.validate?c:a.call(this,c)}function d(c){for(const _ of this._compilations)if(w(_,c))return _}t.getCompilingSchema=d;function w(c,_){return c.schema===_.schema&&c.root===_.root&&c.baseId===_.baseId}function P(c,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||$.call(this,c,_)}function $(c,_){const p=this.opts.uriResolver.parse(_),v=(0,s._getFullPath)(this.opts.uriResolver,p);let b=(0,s.getFullPath)(this.opts.uriResolver,c.baseId,void 0);if(Object.keys(c.schema).length>0&&v===b)return m.call(this,p,c);const g=(0,s.normalizeId)(v),h=this.refs[g]||this.schemas[g];if(typeof h=="string"){const S=$.call(this,c,h);return typeof(S==null?void 0:S.schema)!="object"?void 0:m.call(this,p,S)}if(typeof(h==null?void 0:h.schema)=="object"){if(h.validate||a.call(this,h),g===(0,s.normalizeId)(_)){const{schema:S}=h,{schemaId:O}=this.opts,A=S[O];return A&&(b=(0,s.resolveUrl)(this.opts.uriResolver,b,A)),new u({schema:S,schemaId:O,root:c,baseId:b})}return m.call(this,p,h)}}t.resolveSchema=$;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(c,{baseId:_,schema:p,root:v}){var b;if(((b=c.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const S of c.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,o.unescapeFragment)(S)];if(O===void 0)return;p=O;const A=typeof p=="object"&&p[this.opts.schemaId];!E.has(S)&&A&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,A))}let g;if(typeof p!="boolean"&&p.$ref&&!(0,o.schemaHasRulesButRef)(p,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);g=$.call(this,v,S)}const{schemaId:h}=this.opts;if(g=g||new u({schema:p,schemaId:h,root:v,baseId:_}),g.schema!==g.root.schema)return g}}),Iu=K(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),ps=K(function(t,e){(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define(["exports"],n):n(r.URI=r.URI||{})})(t,function(r){function n(){for(var M=arguments.length,j=Array(M),F=0;F<M;F++)j[F]=arguments[F];if(j.length>1){j[0]=j[0].slice(0,-1);for(var W=j.length-1,J=1;J<W;++J)j[J]=j[J].slice(1,-1);return j[W]=j[W].slice(1),j.join("")}else return j[0]}function s(M){return"(?:"+M+")"}function o(M){return M===void 0?"undefined":M===null?"null":Object.prototype.toString.call(M).split(" ").pop().split("]").shift().toLowerCase()}function i(M){return M.toUpperCase()}function u(M){return M!=null?M instanceof Array?M:typeof M.length!="number"||M.split||M.setInterval||M.call?[M]:Array.prototype.slice.call(M):[]}function a(M,j){var F=M;if(j)for(var W in j)F[W]=j[W];return F}function f(M){var j="[A-Za-z]",F="[0-9]",W=n(F,"[A-Fa-f]"),J=s(s("%[EFef]"+W+"%"+W+W+"%"+W+W)+"|"+s("%[89A-Fa-f]"+W+"%"+W+W)+"|"+s("%"+W+W)),pe="[\\:\\/\\?\\#\\[\\]\\@]",ge="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",De=n(pe,ge),Je=M?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",rt=M?"[\\uE000-\\uF8FF]":"[]",ke=n(j,F,"[\\-\\.\\_\\~]",Je);s(j+n(j,F,"[\\+\\-\\.]")+"*"),s(s(J+"|"+n(ke,ge,"[\\:]"))+"*");var Ke=s(s("25[0-5]")+"|"+s("2[0-4]"+F)+"|"+s("1"+F+F)+"|"+s("0?[1-9]"+F)+"|0?0?"+F),it=s(Ke+"\\."+Ke+"\\."+Ke+"\\."+Ke),Ee=s(W+"{1,4}"),Ue=s(s(Ee+"\\:"+Ee)+"|"+it),at=s(s(Ee+"\\:")+"{6}"+Ue),Qe=s("\\:\\:"+s(Ee+"\\:")+"{5}"+Ue),jt=s(s(Ee)+"?\\:\\:"+s(Ee+"\\:")+"{4}"+Ue),Pt=s(s(s(Ee+"\\:")+"{0,1}"+Ee)+"?\\:\\:"+s(Ee+"\\:")+"{3}"+Ue),kt=s(s(s(Ee+"\\:")+"{0,2}"+Ee)+"?\\:\\:"+s(Ee+"\\:")+"{2}"+Ue),Nt=s(s(s(Ee+"\\:")+"{0,3}"+Ee)+"?\\:\\:"+Ee+"\\:"+Ue),Bt=s(s(s(Ee+"\\:")+"{0,4}"+Ee)+"?\\:\\:"+Ue),ee=s(s(s(Ee+"\\:")+"{0,5}"+Ee)+"?\\:\\:"+Ee),fe=s(s(s(Ee+"\\:")+"{0,6}"+Ee)+"?\\:\\:"),Se=s([at,Qe,jt,Pt,kt,Nt,Bt,ee,fe].join("|")),qe=s(s(ke+"|"+J)+"+");s("[vV]"+W+"+\\."+n(ke,ge,"[\\:]")+"+"),s(s(J+"|"+n(ke,ge))+"*");var Ze=s(J+"|"+n(ke,ge,"[\\:\\@]"));return s(s(J+"|"+n(ke,ge,"[\\@]"))+"+"),s(s(Ze+"|"+n("[\\/\\?]",rt))+"*"),{NOT_SCHEME:new RegExp(n("[^]",j,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",ke,ge),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",ke,ge),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",ke,ge),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",ke,ge),"g"),NOT_QUERY:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]",rt),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",ke,ge),"g"),UNRESERVED:new RegExp(ke,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",ke,De),"g"),PCT_ENCODED:new RegExp(J,"g"),IPV4ADDRESS:new RegExp("^("+it+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Se+")"+s(s("\\%25|\\%(?!"+W+"{2})")+"("+qe+")")+"?\\]?$")}}var l=f(!1),d=f(!0),w=function(){function M(j,F){var W=[],J=!0,pe=!1,ge=void 0;try{for(var De=j[Symbol.iterator](),Je;!(J=(Je=De.next()).done)&&(W.push(Je.value),!(F&&W.length===F));J=!0);}catch(rt){pe=!0,ge=rt}finally{try{!J&&De.return&&De.return()}finally{if(pe)throw ge}}return W}return function(j,F){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return M(j,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=function(M){if(Array.isArray(M)){for(var j=0,F=Array(M.length);j<M.length;j++)F[j]=M[j];return F}else return Array.from(M)},$=2147483647,E=36,m=1,c=26,_=38,p=700,v=72,b=128,g="-",h=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,A={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=E-m,q=Math.floor,X=String.fromCharCode;function G(M){throw new RangeError(A[M])}function Z(M,j){for(var F=[],W=M.length;W--;)F[W]=j(M[W]);return F}function ce(M,j){var F=M.split("@"),W="";F.length>1&&(W=F[0]+"@",M=F[1]),M=M.replace(O,".");var J=M.split("."),pe=Z(J,j).join(".");return W+pe}function ye(M){for(var j=[],F=0,W=M.length;F<W;){var J=M.charCodeAt(F++);if(J>=55296&&J<=56319&&F<W){var pe=M.charCodeAt(F++);(pe&64512)==56320?j.push(((J&1023)<<10)+(pe&1023)+65536):(j.push(J),F--)}else j.push(J)}return j}var Re=function(j){return String.fromCodePoint.apply(String,P(j))},ie=function(j){return j-48<10?j-22:j-65<26?j-65:j-97<26?j-97:E},z=function(j,F){return j+22+75*(j<26)-((F!=0)<<5)},T=function(j,F,W){var J=0;for(j=W?q(j/p):j>>1,j+=q(j/F);j>D*c>>1;J+=E)j=q(j/D);return q(J+(D+1)*j/(j+_))},U=function(j){var F=[],W=j.length,J=0,pe=b,ge=v,De=j.lastIndexOf(g);De<0&&(De=0);for(var Je=0;Je<De;++Je)j.charCodeAt(Je)>=128&&G("not-basic"),F.push(j.charCodeAt(Je));for(var rt=De>0?De+1:0;rt<W;){for(var ke=J,Ke=1,it=E;;it+=E){rt>=W&&G("invalid-input");var Ee=ie(j.charCodeAt(rt++));(Ee>=E||Ee>q(($-J)/Ke))&&G("overflow"),J+=Ee*Ke;var Ue=it<=ge?m:it>=ge+c?c:it-ge;if(Ee<Ue)break;var at=E-Ue;Ke>q($/at)&&G("overflow"),Ke*=at}var Qe=F.length+1;ge=T(J-ke,Qe,ke==0),q(J/Qe)>$-pe&&G("overflow"),pe+=q(J/Qe),J%=Qe,F.splice(J++,0,pe)}return String.fromCodePoint.apply(String,F)},I=function(j){var F=[];j=ye(j);var W=j.length,J=b,pe=0,ge=v,De=!0,Je=!1,rt=void 0;try{for(var ke=j[Symbol.iterator](),Ke;!(De=(Ke=ke.next()).done);De=!0){var it=Ke.value;it<128&&F.push(X(it))}}catch(Qt){Je=!0,rt=Qt}finally{try{!De&&ke.return&&ke.return()}finally{if(Je)throw rt}}var Ee=F.length,Ue=Ee;for(Ee&&F.push(g);Ue<W;){var at=$,Qe=!0,jt=!1,Pt=void 0;try{for(var kt=j[Symbol.iterator](),Nt;!(Qe=(Nt=kt.next()).done);Qe=!0){var Bt=Nt.value;Bt>=J&&Bt<at&&(at=Bt)}}catch(Qt){jt=!0,Pt=Qt}finally{try{!Qe&&kt.return&&kt.return()}finally{if(jt)throw Pt}}var ee=Ue+1;at-J>q(($-pe)/ee)&&G("overflow"),pe+=(at-J)*ee,J=at;var fe=!0,Se=!1,qe=void 0;try{for(var Ze=j[Symbol.iterator](),bt;!(fe=(bt=Ze.next()).done);fe=!0){var Tt=bt.value;if(Tt<J&&++pe>$&&G("overflow"),Tt==J){for(var xt=pe,dt=E;;dt+=E){var _t=dt<=ge?m:dt>=ge+c?c:dt-ge;if(xt<_t)break;var pr=xt-_t,mr=E-_t;F.push(X(z(_t+pr%mr,0))),xt=q(pr/mr)}F.push(X(z(xt,0))),ge=T(pe,ee,Ue==Ee),pe=0,++Ue}}}catch(Qt){Se=!0,qe=Qt}finally{try{!fe&&Ze.return&&Ze.return()}finally{if(Se)throw qe}}++pe,++J}return F.join("")},y=function(j){return ce(j,function(F){return h.test(F)?U(F.slice(4).toLowerCase()):F})},k=function(j){return ce(j,function(F){return S.test(F)?"xn--"+I(F):F})},C={version:"2.1.0",ucs2:{decode:ye,encode:Re},decode:U,encode:I,toASCII:k,toUnicode:y},H={};function x(M){var j=M.charCodeAt(0),F=void 0;return j<16?F="%0"+j.toString(16).toUpperCase():j<128?F="%"+j.toString(16).toUpperCase():j<2048?F="%"+(j>>6|192).toString(16).toUpperCase()+"%"+(j&63|128).toString(16).toUpperCase():F="%"+(j>>12|224).toString(16).toUpperCase()+"%"+(j>>6&63|128).toString(16).toUpperCase()+"%"+(j&63|128).toString(16).toUpperCase(),F}function ae(M){for(var j="",F=0,W=M.length;F<W;){var J=parseInt(M.substr(F+1,2),16);if(J<128)j+=String.fromCharCode(J),F+=3;else if(J>=194&&J<224){if(W-F>=6){var pe=parseInt(M.substr(F+4,2),16);j+=String.fromCharCode((J&31)<<6|pe&63)}else j+=M.substr(F,6);F+=6}else if(J>=224){if(W-F>=9){var ge=parseInt(M.substr(F+4,2),16),De=parseInt(M.substr(F+7,2),16);j+=String.fromCharCode((J&15)<<12|(ge&63)<<6|De&63)}else j+=M.substr(F,9);F+=9}else j+=M.substr(F,3),F+=3}return j}function ne(M,j){function F(W){var J=ae(W);return J.match(j.UNRESERVED)?J:W}return M.scheme&&(M.scheme=String(M.scheme).replace(j.PCT_ENCODED,F).toLowerCase().replace(j.NOT_SCHEME,"")),M.userinfo!==void 0&&(M.userinfo=String(M.userinfo).replace(j.PCT_ENCODED,F).replace(j.NOT_USERINFO,x).replace(j.PCT_ENCODED,i)),M.host!==void 0&&(M.host=String(M.host).replace(j.PCT_ENCODED,F).toLowerCase().replace(j.NOT_HOST,x).replace(j.PCT_ENCODED,i)),M.path!==void 0&&(M.path=String(M.path).replace(j.PCT_ENCODED,F).replace(M.scheme?j.NOT_PATH:j.NOT_PATH_NOSCHEME,x).replace(j.PCT_ENCODED,i)),M.query!==void 0&&(M.query=String(M.query).replace(j.PCT_ENCODED,F).replace(j.NOT_QUERY,x).replace(j.PCT_ENCODED,i)),M.fragment!==void 0&&(M.fragment=String(M.fragment).replace(j.PCT_ENCODED,F).replace(j.NOT_FRAGMENT,x).replace(j.PCT_ENCODED,i)),M}function ve(M){return M.replace(/^0*(.*)/,"$1")||"0"}function N(M,j){var F=M.match(j.IPV4ADDRESS)||[],W=w(F,2),J=W[1];return J?J.split(".").map(ve).join("."):M}function R(M,j){var F=M.match(j.IPV6ADDRESS)||[],W=w(F,3),J=W[1],pe=W[2];if(J){for(var ge=J.toLowerCase().split("::").reverse(),De=w(ge,2),Je=De[0],rt=De[1],ke=rt?rt.split(":").map(ve):[],Ke=Je.split(":").map(ve),it=j.IPV4ADDRESS.test(Ke[Ke.length-1]),Ee=it?7:8,Ue=Ke.length-Ee,at=Array(Ee),Qe=0;Qe<Ee;++Qe)at[Qe]=ke[Qe]||Ke[Ue+Qe]||"";it&&(at[Ee-1]=N(at[Ee-1],j));var jt=at.reduce(function(ee,fe,Se){if(!fe||fe==="0"){var qe=ee[ee.length-1];qe&&qe.index+qe.length===Se?qe.length++:ee.push({index:Se,length:1})}return ee},[]),Pt=jt.sort(function(ee,fe){return fe.length-ee.length})[0],kt=void 0;if(Pt&&Pt.length>1){var Nt=at.slice(0,Pt.index),Bt=at.slice(Pt.index+Pt.length);kt=Nt.join(":")+"::"+Bt.join(":")}else kt=at.join(":");return pe&&(kt+="%"+pe),kt}else return M}var V=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B="".match(/(){0}/)[1]===void 0;function Q(M){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F={},W=j.iri!==!1?d:l;j.reference==="suffix"&&(M=(j.scheme?j.scheme+":":"")+"//"+M);var J=M.match(V);if(J){B?(F.scheme=J[1],F.userinfo=J[3],F.host=J[4],F.port=parseInt(J[5],10),F.path=J[6]||"",F.query=J[7],F.fragment=J[8],isNaN(F.port)&&(F.port=J[5])):(F.scheme=J[1]||void 0,F.userinfo=M.indexOf("@")!==-1?J[3]:void 0,F.host=M.indexOf("//")!==-1?J[4]:void 0,F.port=parseInt(J[5],10),F.path=J[6]||"",F.query=M.indexOf("?")!==-1?J[7]:void 0,F.fragment=M.indexOf("#")!==-1?J[8]:void 0,isNaN(F.port)&&(F.port=M.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?J[4]:void 0)),F.host&&(F.host=R(N(F.host,W),W)),F.scheme===void 0&&F.userinfo===void 0&&F.host===void 0&&F.port===void 0&&!F.path&&F.query===void 0?F.reference="same-document":F.scheme===void 0?F.reference="relative":F.fragment===void 0?F.reference="absolute":F.reference="uri",j.reference&&j.reference!=="suffix"&&j.reference!==F.reference&&(F.error=F.error||"URI is not a "+j.reference+" reference.");var pe=H[(j.scheme||F.scheme||"").toLowerCase()];if(!j.unicodeSupport&&(!pe||!pe.unicodeSupport)){if(F.host&&(j.domainHost||pe&&pe.domainHost))try{F.host=C.toASCII(F.host.replace(W.PCT_ENCODED,ae).toLowerCase())}catch(ge){F.error=F.error||"Host's domain name can not be converted to ASCII via punycode: "+ge}ne(F,l)}else ne(F,W);pe&&pe.parse&&pe.parse(F,j)}else F.error=F.error||"URI can not be parsed.";return F}function re(M,j){var F=j.iri!==!1?d:l,W=[];return M.userinfo!==void 0&&(W.push(M.userinfo),W.push("@")),M.host!==void 0&&W.push(R(N(String(M.host),F),F).replace(F.IPV6ADDRESS,function(J,pe,ge){return"["+pe+(ge?"%25"+ge:"")+"]"})),(typeof M.port=="number"||typeof M.port=="string")&&(W.push(":"),W.push(String(M.port))),W.length?W.join(""):void 0}var be=/^\.\.?\//,Ve=/^\/\.(\/|$)/,Te=/^\/\.\.(\/|$)/,je=/^\/?(?:.|\n)*?(?=\/|$)/;function _e(M){for(var j=[];M.length;)if(M.match(be))M=M.replace(be,"");else if(M.match(Ve))M=M.replace(Ve,"/");else if(M.match(Te))M=M.replace(Te,"/"),j.pop();else if(M==="."||M==="..")M="";else{var F=M.match(je);if(F){var W=F[0];M=M.slice(W.length),j.push(W)}else throw new Error("Unexpected dot segment condition")}return j.join("")}function xe(M){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=j.iri?d:l,W=[],J=H[(j.scheme||M.scheme||"").toLowerCase()];if(J&&J.serialize&&J.serialize(M,j),M.host&&!F.IPV6ADDRESS.test(M.host)){if(j.domainHost||J&&J.domainHost)try{M.host=j.iri?C.toUnicode(M.host):C.toASCII(M.host.replace(F.PCT_ENCODED,ae).toLowerCase())}catch(De){M.error=M.error||"Host's domain name can not be converted to "+(j.iri?"Unicode":"ASCII")+" via punycode: "+De}}ne(M,F),j.reference!=="suffix"&&M.scheme&&(W.push(M.scheme),W.push(":"));var pe=re(M,j);if(pe!==void 0&&(j.reference!=="suffix"&&W.push("//"),W.push(pe),M.path&&M.path.charAt(0)!=="/"&&W.push("/")),M.path!==void 0){var ge=M.path;!j.absolutePath&&(!J||!J.absolutePath)&&(ge=_e(ge)),pe===void 0&&(ge=ge.replace(/^\/\//,"/%2F")),W.push(ge)}return M.query!==void 0&&(W.push("?"),W.push(M.query)),M.fragment!==void 0&&(W.push("#"),W.push(M.fragment)),W.join("")}function Ie(M,j){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},W=arguments[3],J={};return W||(M=Q(xe(M,F),F),j=Q(xe(j,F),F)),F=F||{},!F.tolerant&&j.scheme?(J.scheme=j.scheme,J.userinfo=j.userinfo,J.host=j.host,J.port=j.port,J.path=_e(j.path||""),J.query=j.query):(j.userinfo!==void 0||j.host!==void 0||j.port!==void 0?(J.userinfo=j.userinfo,J.host=j.host,J.port=j.port,J.path=_e(j.path||""),J.query=j.query):(j.path?(j.path.charAt(0)==="/"?J.path=_e(j.path):((M.userinfo!==void 0||M.host!==void 0||M.port!==void 0)&&!M.path?J.path="/"+j.path:M.path?J.path=M.path.slice(0,M.path.lastIndexOf("/")+1)+j.path:J.path=j.path,J.path=_e(J.path)),J.query=j.query):(J.path=M.path,j.query!==void 0?J.query=j.query:J.query=M.query),J.userinfo=M.userinfo,J.host=M.host,J.port=M.port),J.scheme=M.scheme),J.fragment=j.fragment,J}function yt(M,j,F){var W=a({scheme:"null"},F);return xe(Ie(Q(M,W),Q(j,W),W,!0),W)}function st(M,j){return typeof M=="string"?M=xe(Q(M,j),j):o(M)==="object"&&(M=Q(xe(M,j),j)),M}function mt(M,j,F){return typeof M=="string"?M=xe(Q(M,F),F):o(M)==="object"&&(M=xe(M,F)),typeof j=="string"?j=xe(Q(j,F),F):o(j)==="object"&&(j=xe(j,F)),M===j}function Et(M,j){return M&&M.toString().replace(!j||!j.iri?l.ESCAPE:d.ESCAPE,x)}function ct(M,j){return M&&M.toString().replace(!j||!j.iri?l.PCT_ENCODED:d.PCT_ENCODED,ae)}var $t={scheme:"http",domainHost:!0,parse:function(j,F){return j.host||(j.error=j.error||"HTTP URIs must have a host."),j},serialize:function(j,F){var W=String(j.scheme).toLowerCase()==="https";return(j.port===(W?443:80)||j.port==="")&&(j.port=void 0),j.path||(j.path="/"),j}},ir={scheme:"https",domainHost:$t.domainHost,parse:$t.parse,serialize:$t.serialize};function ar(M){return typeof M.secure=="boolean"?M.secure:String(M.scheme).toLowerCase()==="wss"}var zt={scheme:"ws",domainHost:!0,parse:function(j,F){var W=j;return W.secure=ar(W),W.resourceName=(W.path||"/")+(W.query?"?"+W.query:""),W.path=void 0,W.query=void 0,W},serialize:function(j,F){if((j.port===(ar(j)?443:80)||j.port==="")&&(j.port=void 0),typeof j.secure=="boolean"&&(j.scheme=j.secure?"wss":"ws",j.secure=void 0),j.resourceName){var W=j.resourceName.split("?"),J=w(W,2),pe=J[0],ge=J[1];j.path=pe&&pe!=="/"?pe:void 0,j.query=ge,j.resourceName=void 0}return j.fragment=void 0,j}},dr={scheme:"wss",domainHost:zt.domainHost,parse:zt.parse,serialize:zt.serialize},yn={},kr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",St="[0-9A-Fa-f]",hr=s(s("%[EFef]"+St+"%"+St+St+"%"+St+St)+"|"+s("%[89A-Fa-f]"+St+"%"+St+St)+"|"+s("%"+St+St)),Or="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Nr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",_n=n(Nr,'[\\"\\\\]'),Tr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Jt=new RegExp(kr,"g"),L=new RegExp(hr,"g"),Y=new RegExp(n("[^]",Or,"[\\.]",'[\\"]',_n),"g"),se=new RegExp(n("[^]",kr,Tr),"g"),$e=se;function Ye(M){var j=ae(M);return j.match(Jt)?j:M}var tt={scheme:"mailto",parse:function(j,F){var W=j,J=W.to=W.path?W.path.split(","):[];if(W.path=void 0,W.query){for(var pe=!1,ge={},De=W.query.split("&"),Je=0,rt=De.length;Je<rt;++Je){var ke=De[Je].split("=");switch(ke[0]){case"to":for(var Ke=ke[1].split(","),it=0,Ee=Ke.length;it<Ee;++it)J.push(Ke[it]);break;case"subject":W.subject=ct(ke[1],F);break;case"body":W.body=ct(ke[1],F);break;default:pe=!0,ge[ct(ke[0],F)]=ct(ke[1],F);break}}pe&&(W.headers=ge)}W.query=void 0;for(var Ue=0,at=J.length;Ue<at;++Ue){var Qe=J[Ue].split("@");if(Qe[0]=ct(Qe[0]),F.unicodeSupport)Qe[1]=ct(Qe[1],F).toLowerCase();else try{Qe[1]=C.toASCII(ct(Qe[1],F).toLowerCase())}catch(jt){W.error=W.error||"Email address's domain name can not be converted to ASCII via punycode: "+jt}J[Ue]=Qe.join("@")}return W},serialize:function(j,F){var W=j,J=u(j.to);if(J){for(var pe=0,ge=J.length;pe<ge;++pe){var De=String(J[pe]),Je=De.lastIndexOf("@"),rt=De.slice(0,Je).replace(L,Ye).replace(L,i).replace(Y,x),ke=De.slice(Je+1);try{ke=F.iri?C.toUnicode(ke):C.toASCII(ct(ke,F).toLowerCase())}catch(Ue){W.error=W.error||"Email address's domain name can not be converted to "+(F.iri?"Unicode":"ASCII")+" via punycode: "+Ue}J[pe]=rt+"@"+ke}W.path=J.join(",")}var Ke=j.headers=j.headers||{};j.subject&&(Ke.subject=j.subject),j.body&&(Ke.body=j.body);var it=[];for(var Ee in Ke)Ke[Ee]!==yn[Ee]&&it.push(Ee.replace(L,Ye).replace(L,i).replace(se,x)+"="+Ke[Ee].replace(L,Ye).replace(L,i).replace($e,x));return it.length&&(W.query=it.join("&")),W}},he=/^([^\:]+)\:(.*)/,ue={scheme:"urn",parse:function(j,F){var W=j.path&&j.path.match(he),J=j;if(W){var pe=F.scheme||J.scheme||"urn",ge=W[1].toLowerCase(),De=W[2],Je=pe+":"+(F.nid||ge),rt=H[Je];J.nid=ge,J.nss=De,J.path=void 0,rt&&(J=rt.parse(J,F))}else J.error=J.error||"URN can not be parsed.";return J},serialize:function(j,F){var W=F.scheme||j.scheme||"urn",J=j.nid,pe=W+":"+(F.nid||J),ge=H[pe];ge&&(j=ge.serialize(j,F));var De=j,Je=j.nss;return De.path=(J||F.nid)+":"+Je,De}},we=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ut={scheme:"urn:uuid",parse:function(j,F){var W=j;return W.uuid=W.nss,W.nss=void 0,!F.tolerant&&(!W.uuid||!W.uuid.match(we))&&(W.error=W.error||"UUID is not valid."),W},serialize:function(j,F){var W=j;return W.nss=(j.uuid||"").toLowerCase(),W}};H[$t.scheme]=$t,H[ir.scheme]=ir,H[zt.scheme]=zt,H[dr.scheme]=dr,H[tt.scheme]=tt,H[ue.scheme]=ue,H[ut.scheme]=ut,r.SCHEMES=H,r.pctEncChar=x,r.pctDecChars=ae,r.parse=Q,r.removeDotSegments=_e,r.serialize=xe,r.resolveComponents=Ie,r.resolve=yt,r.normalize=st,r.equal=mt,r.escapeComponent=Et,r.unescapeComponent=ct,Object.defineProperty(r,"__esModule",{value:!0})})}),Au=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ps();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),Cu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=fn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Ce();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=fs(),s=ds(),o=xi(),i=hs(),u=Ce(),a=ln(),f=Zr(),l=ze(),d=Iu(),w=Au(),P=(z,T)=>new RegExp(z,T);P.code="new RegExp";var $=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},c={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function p(z){var T,U,I,y,k,C,H,x,ae,ne,ve,N,R,V,B,Q,re,be,Ve,Te,je,_e,xe,Ie,yt;const st=z.strict,mt=(T=z.code)===null||T===void 0?void 0:T.optimize,Et=mt===!0||mt===void 0?1:mt||0,ct=(I=(U=z.code)===null||U===void 0?void 0:U.regExp)!==null&&I!==void 0?I:P,$t=(y=z.uriResolver)!==null&&y!==void 0?y:w.default;return{strictSchema:(C=(k=z.strictSchema)!==null&&k!==void 0?k:st)!==null&&C!==void 0?C:!0,strictNumbers:(x=(H=z.strictNumbers)!==null&&H!==void 0?H:st)!==null&&x!==void 0?x:!0,strictTypes:(ne=(ae=z.strictTypes)!==null&&ae!==void 0?ae:st)!==null&&ne!==void 0?ne:"log",strictTuples:(N=(ve=z.strictTuples)!==null&&ve!==void 0?ve:st)!==null&&N!==void 0?N:"log",strictRequired:(V=(R=z.strictRequired)!==null&&R!==void 0?R:st)!==null&&V!==void 0?V:!1,code:z.code?{...z.code,optimize:Et,regExp:ct}:{optimize:Et,regExp:ct},loopRequired:(B=z.loopRequired)!==null&&B!==void 0?B:_,loopEnum:(Q=z.loopEnum)!==null&&Q!==void 0?Q:_,meta:(re=z.meta)!==null&&re!==void 0?re:!0,messages:(be=z.messages)!==null&&be!==void 0?be:!0,inlineRefs:(Ve=z.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Te=z.schemaId)!==null&&Te!==void 0?Te:"$id",addUsedSchema:(je=z.addUsedSchema)!==null&&je!==void 0?je:!0,validateSchema:(_e=z.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=z.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=z.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=z.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:$t}}class v{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...p(T)};const{es5:U,lines:I}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:E,es5:U,lines:I}),this.logger=q(T.logger);const y=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),b.call(this,m,T,"NOT SUPPORTED"),b.call(this,c,T,"DEPRECATED","warn"),this._metaOpts=A.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),h.call(this),T.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:U,schemaId:I}=this.opts;let y=d;I==="id"&&(y={...d},y.id=y.$id,delete y.$id),U&&T&&this.addMetaSchema(y,y[I],!1)}defaultMeta(){const{meta:T,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[U]||T:void 0}validate(T,U){let I;if(typeof T=="string"){if(I=this.getSchema(T),!I)throw new Error(`no schema with key or ref "${T}"`)}else I=this.compile(T);const y=I(U);return"$async"in I||(this.errors=I.errors),y}compile(T,U){const I=this._addSchema(T,U);return I.validate||this._compileSchemaEnv(I)}compileAsync(T,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return y.call(this,T,U);async function y(ne,ve){await k.call(this,ne.$schema);const N=this._addSchema(ne,ve);return N.validate||C.call(this,N)}async function k(ne){ne&&!this.getSchema(ne)&&await y.call(this,{$ref:ne},!0)}async function C(ne){try{return this._compileSchemaEnv(ne)}catch(ve){if(!(ve instanceof s.default))throw ve;return H.call(this,ve),await x.call(this,ve.missingSchema),C.call(this,ne)}}function H({missingSchema:ne,missingRef:ve}){if(this.refs[ne])throw new Error(`AnySchema ${ne} is loaded but ${ve} cannot be resolved`)}async function x(ne){const ve=await ae.call(this,ne);this.refs[ne]||await k.call(this,ve.$schema),this.refs[ne]||this.addSchema(ve,ne,U)}async function ae(ne){const ve=this._loading[ne];if(ve)return ve;try{return await(this._loading[ne]=I(ne))}finally{delete this._loading[ne]}}}addSchema(T,U,I,y=this.opts.validateSchema){if(Array.isArray(T)){for(const C of T)this.addSchema(C,void 0,I,y);return this}let k;if(typeof T=="object"){const{schemaId:C}=this.opts;if(k=T[C],k!==void 0&&typeof k!="string")throw new Error(`schema ${C} must be string`)}return U=(0,a.normalizeId)(U||k),this._checkUnique(U),this.schemas[U]=this._addSchema(T,I,U,y,!0),this}addMetaSchema(T,U,I=this.opts.validateSchema){return this.addSchema(T,U,!0,I),this}validateSchema(T,U){if(typeof T=="boolean")return!0;let I;if(I=T.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(I,T);if(!y&&U){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return y}getSchema(T){let U;for(;typeof(U=g.call(this,T))=="string";)T=U;if(U===void 0){const{schemaId:I}=this.opts,y=new i.SchemaEnv({schema:{},schemaId:I});if(U=i.resolveSchema.call(this,y,T),!U)return;this.refs[T]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=g.call(this,T);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const U=T;this._cache.delete(U);let I=T[this.opts.schemaId];return I&&(I=(0,a.normalizeId)(I),delete this.schemas[I],delete this.refs[I]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const U of T)this.addKeyword(U);return this}addKeyword(T,U){let I;if(typeof T=="string")I=T,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=I);else if(typeof T=="object"&&U===void 0){if(U=T,I=U.keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,I,U),!U)return(0,l.eachItem)(I,k=>Z.call(this,k)),this;ye.call(this,U);const y={...U,type:(0,f.getJSONTypes)(U.type),schemaType:(0,f.getJSONTypes)(U.schemaType)};return(0,l.eachItem)(I,y.type.length===0?k=>Z.call(this,k,y):k=>y.type.forEach(C=>Z.call(this,k,y,C))),this}getKeyword(T){const U=this.RULES.all[T];return typeof U=="object"?U.definition:!!U}removeKeyword(T){const{RULES:U}=this;delete U.keywords[T],delete U.all[T];for(const I of U.rules){const y=I.rules.findIndex(k=>k.keyword===T);y>=0&&I.rules.splice(y,1)}return this}addFormat(T,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[T]=U,this}errorsText(T=this.errors,{separator:U=", ",dataVar:I="data"}={}){return!T||T.length===0?"No errors":T.map(y=>`${I}${y.instancePath} ${y.message}`).reduce((y,k)=>y+U+k)}$dataMetaSchema(T,U){const I=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const y of U){const k=y.split("/").slice(1);let C=T;for(const H of k)C=C[H];for(const H in I){const x=I[H];if(typeof x!="object")continue;const{$data:ae}=x.definition,ne=C[H];ae&&ne&&(C[H]=ie(ne))}}return T}_removeAllSchemas(T,U){for(const I in T){const y=T[I];(!U||U.test(I))&&(typeof y=="string"?delete T[I]:y&&!y.meta&&(this._cache.delete(y.schema),delete T[I]))}}_addSchema(T,U,I,y=this.opts.validateSchema,k=this.opts.addUsedSchema){let C;const{schemaId:H}=this.opts;if(typeof T=="object")C=T[H];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let x=this._cache.get(T);if(x!==void 0)return x;I=(0,a.normalizeId)(C||I);const ae=a.getSchemaRefs.call(this,T,I);return x=new i.SchemaEnv({schema:T,schemaId:H,meta:U,baseId:I,localRefs:ae}),this._cache.set(x.schema,x),k&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=x),y&&this.validateSchema(T,!0),x}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):i.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const U=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,T)}finally{this.opts=U}}}t.default=v,v.ValidationError=n.default,v.MissingRefError=s.default;function b(z,T,U,I="error"){for(const y in z){const k=y;k in T&&this.logger[I](`${U}: option ${y}. ${z[k]}`)}}function g(z){return z=(0,a.normalizeId)(z),this.schemas[z]||this.refs[z]}function h(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const T in z)this.addSchema(z[T],T)}function S(){for(const z in this.opts.formats){const T=this.opts.formats[z];T&&this.addFormat(z,T)}}function O(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in z){const U=z[T];U.keyword||(U.keyword=T),this.addKeyword(U)}}function A(){const z={...this.opts};for(const T of $)delete z[T];return z}var D={log(){},warn(){},error(){}};function q(z){if(z===!1)return D;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(z,T){const{RULES:U}=this;if((0,l.eachItem)(z,I=>{if(U.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!X.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function Z(z,T,U){var I;const y=T==null?void 0:T.post;if(U&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let C=y?k.post:k.rules.find(({type:x})=>x===U);if(C||(C={type:U,rules:[]},k.rules.push(C)),k.keywords[z]=!0,!T)return;const H={keyword:z,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?ce.call(this,C,H,T.before):C.rules.push(H),k.all[z]=H,(I=T.implements)===null||I===void 0||I.forEach(x=>this.addKeyword(x))}function ce(z,T,U){const I=z.rules.findIndex(y=>y.keyword===U);I>=0?z.rules.splice(I,0,T):(z.rules.push(T),this.logger.warn(`rule ${U} is not defined`))}function ye(z){let{metaSchema:T}=z;T!==void 0&&(z.$data&&this.opts.$data&&(T=ie(T)),z.validateSchema=this.compile(T,!0))}var Re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ie(z){return{anyOf:[z,Re]}}}),ju=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),Mu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=ds(),r=Ct(),n=Ce(),s=er(),o=hs(),i=ze(),u={keyword:"$ref",schemaType:"string",code(l){const{gen:d,schema:w,it:P}=l,{baseId:$,schemaEnv:E,validateName:m,opts:c,self:_}=P,{root:p}=E;if((w==="#"||w==="#/")&&$===p.baseId)return b();const v=o.resolveRef.call(_,p,$,w);if(v===void 0)throw new e.default(P.opts.uriResolver,$,w);if(v instanceof o.SchemaEnv)return g(v);return h(v);function b(){if(E===p)return f(l,m,E,E.$async);const S=d.scopeValue("root",{ref:p});return f(l,(0,n._)`${S}.validate`,p,p.$async)}function g(S){const O=a(l,S);f(l,O,S,S.$async)}function h(S){const O=d.scopeValue("schema",c.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),A=d.name("valid"),D=l.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},A);l.mergeEvaluated(D),l.ok(A)}}};function a(l,d){const{gen:w}=l;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(l,d,w,P){const{gen:$,it:E}=l,{allErrors:m,schemaEnv:c,opts:_}=E,p=_.passContext?s.default.this:n.nil;P?v():b();function v(){if(!c.$async)throw new Error("async schema referenced by sync schema");const S=$.let("valid");$.try(()=>{$.code((0,n._)`await ${(0,r.callValidateCode)(l,d,p)}`),h(d),m||$.assign(S,!0)},O=>{$.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>$.throw(O)),g(O),m||$.assign(S,!1)}),l.ok(S)}function b(){l.result((0,r.callValidateCode)(l,d,p),()=>h(d),()=>g(d))}function g(S){const O=(0,n._)`${S}.errors`;$.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),$.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function h(S){var O;if(!E.opts.unevaluated)return;const A=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(E.props=i.mergeEvaluated.props($,A.props,E.props));else{const D=$.var("props",(0,n._)`${S}.evaluated.props`);E.props=i.mergeEvaluated.props($,D,E.props,n.Name)}if(E.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(E.items=i.mergeEvaluated.items($,A.items,E.items));else{const D=$.var("items",(0,n._)`${S}.evaluated.items`);E.items=i.mergeEvaluated.items($,D,E.items,n.Name)}}}t.callRef=f,t.default=u}),Du=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ju(),r=Mu(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),qu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:i,schemaCode:u})=>(0,e.str)`must be ${n[i].okStr} ${u}`,params:({keyword:i,schemaCode:u})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${u}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[u].fail} ${f} || isNaN(${a})`)}};t.default=o}),Lu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:o,data:i,schemaCode:u,it:a}=s,f=a.opts.multipleOfPrecision,l=o.let("res"),d=f?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${f}`:(0,e._)`${l} !== parseInt(${l})`;s.fail$data((0,e._)`(${u} === 0 || (${l} = ${i}/${u}, ${d}))`)}};t.default=n}),Vu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,o=0,i;for(;o<n;)s++,i=r.charCodeAt(o++),i>=55296&&i<=56319&&o<n&&(i=r.charCodeAt(o),(i&64512)===56320&&o++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),Uu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n=Vu(),s={message({keyword:i,schemaCode:u}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${u} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:f,it:l}=i,d=u==="maxLength"?e.operators.GT:e.operators.LT,w=l.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${d} ${f}`)}};t.default=o}),Fu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Ce(),n={message:({schemaCode:o})=>(0,r.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,r._)`{pattern: ${o}}`},s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(o){const{data:i,$data:u,schema:a,schemaCode:f,it:l}=o,d=l.opts.unicodeRegExp?"u":"",w=u?(0,r._)`(new RegExp(${f}, ${d}))`:(0,e.usePattern)(o,a);o.fail$data((0,r._)`!${w}.test(${i})`)}};t.default=s}),zu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message({keyword:s,schemaCode:o}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:u}=s,a=o==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${u}`)}};t.default=n}),Bu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Ce(),n=ze(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,schema:a,schemaCode:f,data:l,$data:d,it:w}=i,{opts:P}=w;if(!d&&a.length===0)return;const $=a.length>=P.loopRequired;if(w.allErrors?E():m(),P.strictRequired){const p=i.parentSchema.properties,{definedProperties:v}=i.it;for(const b of a)if((p==null?void 0:p[b])===void 0&&!v.has(b)){const g=w.schemaEnv.baseId+w.errSchemaPath,h=`required property "${b}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)(w,h,w.opts.strictRequired)}}function E(){if($||d)i.block$data(r.nil,c);else for(const p of a)(0,e.checkReportMissingProp)(i,p)}function m(){const p=u.let("missing");if($||d){const v=u.let("valid",!0);i.block$data(v,()=>_(p,v)),i.ok(v)}else u.if((0,e.checkMissingProp)(i,a,p)),(0,e.reportMissingProp)(i,p),u.else()}function c(){u.forOf("prop",f,p=>{i.setParams({missingProperty:p}),u.if((0,e.noPropertyInData)(u,l,p,P.ownProperties),()=>i.error())})}function _(p,v){i.setParams({missingProperty:p}),u.forOf(p,f,()=>{u.assign(v,(0,e.propertyInData)(u,l,p,P.ownProperties)),u.if((0,r.not)(v),()=>{i.error(),u.break()})},r.nil)}}};t.default=o}),xu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message({keyword:s,schemaCode:o}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:u}=s,a=o==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${u}`)}};t.default=n}),ms=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=sn();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),Hu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Zr(),r=Ce(),n=ze(),s=ms(),o={message:({params:{i:u,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${u} are identical)`,params:({params:{i:u,j:a}})=>(0,r._)`{i: ${u}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:o,code(u){const{gen:a,data:f,$data:l,schema:d,parentSchema:w,schemaCode:P,it:$}=u;if(!l&&!d)return;const E=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(E,c,(0,r._)`${P} === false`),u.ok(E);function c(){const b=a.let("i",(0,r._)`${f}.length`),g=a.let("j");u.setParams({i:b,j:g}),a.assign(E,!0),a.if((0,r._)`${b} > 1`,()=>(_()?p:v)(b,g))}function _(){return m.length>0&&!m.some(b=>b==="object"||b==="array")}function p(b,g){const h=a.name("item"),S=(0,e.checkDataTypes)(m,h,$.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${b}--;`,()=>{a.let(h,(0,r._)`${f}[${b}]`),a.if(S,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${h} == "string"`,(0,r._)`${h} += "_"`),a.if((0,r._)`typeof ${O}[${h}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${h}]`),u.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${h}] = ${b}`)})}function v(b,g){const h=(0,n.useFunc)(a,s.default),S=a.name("outer");a.label(S).for((0,r._)`;${b}--;`,()=>a.for((0,r._)`${g} = ${b}; ${g}--;`,()=>a.if((0,r._)`${h}(${f}[${b}], ${f}[${g}])`,()=>{u.error(),a.assign(E,!1).break(S)})))}}};t.default=i}),Ku=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n=ms(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},o={keyword:"const",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schemaCode:l,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${a}, ${l})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=o}),Gu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n=ms(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},o={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,data:a,$data:f,schema:l,schemaCode:d,it:w}=i;if(!f&&l.length===0)throw new Error("enum must have non-empty array");const P=l.length>=w.opts.loopEnum;let $;const E=()=>$??($=(0,r.useFunc)(u,n.default));let m;if(P||f)m=u.let("valid"),i.block$data(m,c);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const p=u.const("vSchema",d);m=(0,e.or)(...l.map((v,b)=>_(p,b)))}i.pass(m);function c(){u.assign(m,!1),u.forOf("v",d,p=>u.if((0,e._)`${E()}(${a}, ${p})`,()=>u.assign(m,!0).break()))}function _(p,v){const b=l[v];return typeof b=="object"&&b!==null?(0,e._)`${E()}(${a}, ${p}[${v}])`:(0,e._)`${a} === ${b}`}}};t.default=o}),Wu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=qu(),r=Lu(),n=Uu(),s=Fu(),o=zu(),i=Bu(),u=xu(),a=Hu(),f=Ku(),l=Gu(),d=[e.default,r.default,n.default,s.default,o.default,i.default,u.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,l.default];t.default=d}),Ki=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ce(),r=ze(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:u,it:a}=i,{items:f}=u;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(i,f)}};function o(i,u){const{gen:a,schema:f,data:l,keyword:d,it:w}=i;w.items=!0;const P=a.const("len",(0,e._)`${l}.length`);if(f===!1)i.setParams({len:u.length}),i.pass((0,e._)`${P} <= ${u.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)(w,f)){const E=a.var("valid",(0,e._)`${P} <= ${u.length}`);a.if((0,e.not)(E),()=>$(E)),i.ok(E)}function $(E){a.forRange("i",u.length,P,m=>{i.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=o,t.default=s}),Gi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ce(),r=ze(),n=Ct(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:u,it:a}=i;if(Array.isArray(u))return o(i,"additionalItems",u);a.items=!0,!(0,r.alwaysValidSchema)(a,u)&&i.ok((0,n.validateArray)(i))}};function o(i,u,a=i.schema){const{gen:f,parentSchema:l,data:d,keyword:w,it:P}=i;m(l),P.opts.unevaluated&&a.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(f,a.length,P.items));const $=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((c,_)=>{(0,r.alwaysValidSchema)(P,c)||(f.if((0,e._)`${E} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},$)),i.ok($))});function m(c){const{opts:_,errSchemaPath:p}=P,v=a.length,b=v===c.minItems&&(v===c.maxItems||c[u]===!1);if(_.strictTuples&&!b){const g=`"${w}" is ${v}-tuple, but minItems or maxItems/${u} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(P,g,_.strictTuples)}}}t.validateTuple=o,t.default=s}),Ju=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Gi(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Qu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n=Ct(),s=Ki(),o={message:({params:{len:u}})=>(0,e.str)`must NOT have more than ${u} items`,params:({params:{len:u}})=>(0,e._)`{limit: ${u}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:o,code(u){const{schema:a,parentSchema:f,it:l}=u,{prefixItems:d}=f;l.items=!0,!(0,r.alwaysValidSchema)(l,a)&&(d?(0,s.validateAdditionalItems)(u,d):u.ok((0,n.validateArray)(u)))}};t.default=i}),Xu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n={message:({params:{min:o,max:i}})=>i===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${i} valid item(s)`,params:({params:{min:o,max:i}})=>i===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(o){const{gen:i,schema:u,parentSchema:a,data:f,it:l}=o;let d,w;const{minContains:P,maxContains:$}=a;l.opts.next?(d=P===void 0?1:P,w=$):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(o.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,r.alwaysValidSchema)(l,u)){let v=(0,e._)`${E} >= ${d}`;w!==void 0&&(v=(0,e._)`${v} && ${E} <= ${w}`),o.pass(v);return}l.items=!0;const m=i.name("valid");w===void 0&&d===1?_(m,()=>i.if(m,()=>i.break())):d===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${f}.length > 0`,c)):(i.let(m,!1),c()),o.result(m,()=>o.reset());function c(){const v=i.name("_valid"),b=i.let("count",0);_(v,()=>i.if(v,()=>p(b)))}function _(v,b){i.forRange("i",0,E,g=>{o.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},v),b()})}function p(v){i.code((0,e._)`${v}++`),w===void 0?i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${v} > ${w}`,()=>i.assign(m,!1).break()),d===1?i.assign(m,!0):i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0)))}}};t.default=s}),Yu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ce(),r=ze(),n=Ct();t.error={message:({params:{property:a,depsCount:f,deps:l}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${l} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:l,missingProperty:d}})=>(0,e._)`{property: ${a},
|
|
16
|
+
deps: ${u}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,u]=o(a);i(a,f),l(a,u)}};function o({schema:a}){const f={},u={};for(const d in a){if(d==="__proto__")continue;const w=Array.isArray(a[d])?f:u;w[d]=a[d]}return[f,u]}function i(a,f=a.schema){const{gen:u,data:d,it:w}=a;if(Object.keys(f).length===0)return;const P=u.let("missing");for(const $ in f){const E=f[$];if(E.length===0)continue;const m=(0,n.propertyInData)(u,d,$,w.opts.ownProperties);a.setParams({property:$,depsCount:E.length,deps:E.join(", ")}),w.allErrors?u.if(m,()=>{for(const c of E)(0,n.checkReportMissingProp)(a,c)}):(u.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,E,P)})`),(0,n.reportMissingProp)(a,P),u.else())}}t.validatePropertyDeps=i;function l(a,f=a.schema){const{gen:u,data:d,keyword:w,it:P}=a,$=u.name("valid");for(const E in f)(0,r.alwaysValidSchema)(P,f[E])||(u.if((0,n.propertyInData)(u,d,E,P.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:E},$);a.mergeValidEvaluated(m,$)},()=>u.var($,!0)),a.ok($))}t.validateSchemaDeps=l,t.default=s}),fu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(o){const{gen:i,schema:l,data:a,it:f}=o;if((0,r.alwaysValidSchema)(f,l))return;const u=i.name("valid");i.forIn("key",a,d=>{o.setParams({propertyName:d}),o.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),i.if((0,e.not)(u),()=>{o.error(!0),f.allErrors||i.break()})}),o.ok(u)}};t.default=s}),xi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Me(),n=Zt(),s=Fe(),o={message:"must NOT have additional properties",params:({params:l})=>(0,r._)`{additionalProperty: ${l.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:o,code(l){const{gen:a,schema:f,parentSchema:u,data:d,errsCount:w,it:P}=l;if(!w)throw new Error("ajv implementation error");const{allErrors:$,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,f))return;const m=(0,e.allSchemaProperties)(u.properties),c=(0,e.allSchemaProperties)(u.patternProperties);_(),l.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",d,h=>{!m.length&&!c.length?b(h):a.if(p(h),()=>b(h))})}function p(h){let S;if(m.length>8){const O=(0,s.schemaRefOrVal)(P,u.properties,"properties");S=(0,e.isOwnProperty)(a,O,h)}else m.length?S=(0,r.or)(...m.map(O=>(0,r._)`${h} === ${O}`)):S=r.nil;return c.length&&(S=(0,r.or)(S,...c.map(O=>(0,r._)`${(0,e.usePattern)(l,O)}.test(${h})`))),(0,r.not)(S)}function v(h){a.code((0,r._)`delete ${d}[${h}]`)}function b(h){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){v(h);return}if(f===!1){l.setParams({additionalProperty:h}),l.error(),$||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(P,f)){const S=a.name("valid");E.removeAdditional==="failing"?(g(h,S,!1),a.if((0,r.not)(S),()=>{l.reset(),v(h)})):(g(h,S),$||a.if((0,r.not)(S),()=>a.break()))}}function g(h,S,O){const C={keyword:"additionalProperties",dataProp:h,dataPropType:s.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(C,S)}}};t.default=i}),du=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ln(),r=Ct(),n=Fe(),s=xi(),o={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:l,schema:a,parentSchema:f,data:u,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);for(const c of w)d.definedProperties.add(c);d.opts.unevaluated&&w.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(l,(0,n.toHash)(w),d.props));const P=w.filter(c=>!(0,n.alwaysValidSchema)(d,a[c]));if(P.length===0)return;const $=l.name("valid");for(const c of P)E(c)?m(c):(l.if((0,r.propertyInData)(l,u,c,d.opts.ownProperties)),m(c),d.allErrors||l.else().var($,!0),l.endIf()),i.it.definedProperties.add(c),i.ok($);function E(c){return d.opts.useDefaults&&!d.compositeRule&&a[c].default!==void 0}function m(c){i.subschema({keyword:"properties",schemaProp:c,dataProp:c},$)}}};t.default=o}),hu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Me(),n=Fe(),s=Fe(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:l,schema:a,data:f,parentSchema:u,it:d}=i,{opts:w}=d,P=(0,e.allSchemaProperties)(a),$=P.filter(b=>(0,n.alwaysValidSchema)(d,a[b]));if(P.length===0||$.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&u.properties,m=l.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(l,d.props));const{props:c}=d;_();function _(){for(const b of P)E&&p(b),d.allErrors?v(b):(l.var(m,!0),v(b),l.if(m))}function p(b){for(const g in E)new RegExp(b).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${b} (use allowMatchingProperties)`)}function v(b){l.forIn("key",f,g=>{l.if((0,r._)`${(0,e.usePattern)(i,b)}.test(${g})`,()=>{const h=$.includes(b);h||i.subschema({keyword:"patternProperties",schemaProp:b,dataProp:g,dataPropType:s.Type.Str},m),d.opts.unevaluated&&c!==!0?l.assign((0,r._)`${c}[${g}]`,!0):!h&&!d.allErrors&&l.if((0,r.not)(m),()=>l.break())})})}}};t.default=o}),pu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:o,it:i}=n;if((0,e.alwaysValidSchema)(i,o)){n.fail();return}const l=s.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),mu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),gu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(o){const{gen:i,schema:l,parentSchema:a,it:f}=o;if(!Array.isArray(l))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const u=l,d=i.let("valid",!1),w=i.let("passing",null),P=i.name("_valid");o.setParams({passing:w}),i.block($),o.result(d,()=>o.reset(),()=>o.error(!0));function $(){u.forEach((E,m)=>{let c;(0,r.alwaysValidSchema)(f,E)?i.var(P,!0):c=o.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},P),m>0&&i.if((0,e._)`${P} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(P,()=>{i.assign(d,!0),i.assign(w,m),c&&o.mergeEvaluated(c,e.Name)})})}}};t.default=s}),vu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:o,it:i}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const l=s.name("valid");o.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const u=n.subschema({keyword:"allOf",schemaProp:f},l);n.ok(l),n.mergeEvaluated(u)})}};t.default=r}),yu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Fe(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:l,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const u=o(f,"then"),d=o(f,"else");if(!u&&!d)return;const w=l.let("valid",!0),P=l.name("_valid");if($(),i.reset(),u&&d){const m=l.let("ifClause");i.setParams({ifClause:m}),l.if(P,E("then",m),E("else",m))}else u?l.if(P,E("then")):l.if((0,e.not)(P),E("else"));i.pass(w,()=>i.error(!0));function $(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);i.mergeEvaluated(m)}function E(m,c){return()=>{const _=i.subschema({keyword:m},P);l.assign(w,P),i.mergeValidEvaluated(_,w),c?l.assign(c,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function o(i,l){const a=i.schema[l];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),_u=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:o}){s.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};t.default=r}),wu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=zi(),r=ou(),n=Bi(),s=cu(),o=uu(),i=lu(),l=fu(),a=xi(),f=du(),u=hu(),d=pu(),w=mu(),P=gu(),$=vu(),E=yu(),m=_u();function c(_=!1){const p=[d.default,w.default,P.default,$.default,E.default,m.default,l.default,a.default,i.default,f.default,u.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(o.default),p}t.default=c}),bu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,o){const{gen:i,data:l,$data:a,schema:f,schemaCode:u,it:d}=s,{opts:w,errSchemaPath:P,schemaEnv:$,self:E}=d;if(!w.validateFormats)return;a?m():c();function m(){const _=i.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=i.const("fDef",(0,e._)`${_}[${u}]`),v=i.let("fType"),b=i.let("format");i.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(v,(0,e._)`${p}.type || "string"`).assign(b,(0,e._)`${p}.validate`),()=>i.assign(v,(0,e._)`"string"`).assign(b,p)),s.fail$data((0,e.or)(g(),h()));function g(){return w.strictSchema===!1?e.nil:(0,e._)`${u} && !${b}`}function h(){const S=$.$async?(0,e._)`(${p}.async ? await ${b}(${l}) : ${b}(${l}))`:(0,e._)`${b}(${l})`,O=(0,e._)`(typeof ${b} == "function" ? ${S} : ${b}.test(${l}))`;return(0,e._)`${b} && ${b} !== true && ${v} === ${o} && !${O}`}}function c(){const _=E.formats[f];if(!_){g();return}if(_===!0)return;const[p,v,b]=h(_);p===o&&s.pass(S());function g(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${P}"`}}function h(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(f)}`:void 0,D=i.scopeValue("formats",{key:f,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${D}.validate`]:["string",O,D]}function S(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!$.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${l})`}return typeof v=="function"?(0,e._)`${b}(${l})`:(0,e._)`${b}.test(${l})`}}}};t.default=n}),$u=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=bu(),r=[e.default];t.default=r}),Eu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),Su=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Wc(),r=au(),n=wu(),s=$u(),o=Eu(),i=[e.default,r.default,(0,n.default)(),s.default,o.metadataVocabulary,o.contentVocabulary];t.default=i}),Pu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0;var e;(function(r){r.Tag="tag",r.Mapping="mapping"})(e||(t.DiscrError=e={}))}),ku=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Me(),r=Pu(),n=ls(),s=fn(),o=Fe(),i={message:({params:{discrError:a,tagName:f}})=>a===r.DiscrError.Tag?`tag "${f}" must be string`:`value of tag "${f}" must be in oneOf`,params:({params:{discrError:a,tag:f,tagName:u}})=>(0,e._)`{error: ${a}, tag: ${u}, tagValue: ${f}}`},l={keyword:"discriminator",type:"object",schemaType:"object",error:i,code(a){const{gen:f,data:u,schema:d,parentSchema:w,it:P}=a,{oneOf:$}=w;if(!P.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=d.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!$)throw new Error("discriminator: requires oneOf keyword");const m=f.let("valid",!1),c=f.const("tag",(0,e._)`${u}${(0,e.getProperty)(E)}`);f.if((0,e._)`typeof ${c} == "string"`,()=>_(),()=>a.error(!1,{discrError:r.DiscrError.Tag,tag:c,tagName:E})),a.ok(m);function _(){const b=v();f.if(!1);for(const g in b)f.elseIf((0,e._)`${c} === ${g}`),f.assign(m,p(b[g]));f.else(),a.error(!1,{discrError:r.DiscrError.Mapping,tag:c,tagName:E}),f.endIf()}function p(b){const g=f.name("valid"),h=a.subschema({keyword:"oneOf",schemaProp:b},g);return a.mergeEvaluated(h,e.Name),g}function v(){var b;const g={},h=O(w);let S=!0;for(let q=0;q<$.length;q++){let X=$[q];if(X!=null&&X.$ref&&!(0,o.schemaHasRulesButRef)(X,P.self.RULES)){const Z=X.$ref;if(X=n.resolveRef.call(P.self,P.schemaEnv.root,P.baseId,Z),X instanceof n.SchemaEnv&&(X=X.schema),X===void 0)throw new s.default(P.opts.uriResolver,P.baseId,Z)}const G=(b=X==null?void 0:X.properties)===null||b===void 0?void 0:b[E];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);S=S&&(h||O(X)),C(G,q)}if(!S)throw new Error(`discriminator: "${E}" must be required`);return g;function O({required:q}){return Array.isArray(q)&&q.includes(E)}function C(q,X){if(q.const)D(q.const,X);else if(q.enum)for(const G of q.enum)D(G,X);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function D(q,X){if(typeof q!="string"||q in g)throw new Error(`discriminator: "${E}" values must be unique strings`);g[q]=X}}}};t.default=l}),Ou=K(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),Hi=K(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;var r=Hc(),n=Su(),s=ku(),o=Ou(),i=["/properties"],l="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(o,i):o;this.addMetaSchema($,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}t.Ajv=a,e.exports=t=a,e.exports.Ajv=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=ln();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var u=Me();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=us();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=fn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),Nu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0;function e(O,C){return{validate:O,compare:C}}t.fullFormats={date:e(o,i),time:e(a,f),"date-time":e(d,w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:E,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-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-f]{1,4}:){5}(((:[0-9a-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-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-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-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-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-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-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-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-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-f]{1,4}){1,7})|((:[0-9a-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}))|:)))$/i,regex:S,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:c,int32:{type:"number",validate:v},int64:{type:"number",validate:b},float:{type:"number",validate:g},double:{type:"number",validate:g},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:e(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,i),time:e(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,f),"date-time":e(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,w),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);function r(O){return O%4===0&&(O%100!==0||O%400===0)}var n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,s=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(O){const C=n.exec(O);if(!C)return!1;const D=+C[1],q=+C[2],X=+C[3];return q>=1&&q<=12&&X>=1&&X<=(q===2&&r(D)?29:s[q])}function i(O,C){if(O&&C)return O>C?1:O<C?-1:0}var l=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function a(O,C){const D=l.exec(O);if(!D)return!1;const q=+D[1],X=+D[2],G=+D[3],Z=D[5];return(q<=23&&X<=59&&G<=59||q===23&&X===59&&G===60)&&(!C||Z!=="")}function f(O,C){if(!(O&&C))return;const D=l.exec(O),q=l.exec(C);if(D&&q)return O=D[1]+D[2]+D[3]+(D[4]||""),C=q[1]+q[2]+q[3]+(q[4]||""),O>C?1:O<C?-1:0}var u=/t|\s/i;function d(O){const C=O.split(u);return C.length===2&&o(C[0])&&a(C[1],!0)}function w(O,C){if(!(O&&C))return;const[D,q]=O.split(u),[X,G]=C.split(u),Z=i(D,X);if(Z!==void 0)return Z||f(q,G)}var P=/\/|:/,$=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function E(O){return P.test(O)&&$.test(O)}var m=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function c(O){return m.lastIndex=0,m.test(O)}var _=-2147483648,p=2**31-1;function v(O){return Number.isInteger(O)&&O<=p&&O>=_}function b(O){return Number.isInteger(O)}function g(){return!0}var h=/[^\\]\\Z/;function S(O){if(h.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}}),en=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class e{}t._CodeOrName=e,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends e{constructor(_){if(super(),!t.IDENTIFIER.test(_))throw new Error("CodeGen: name must be a valid identifier");this.str=_}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=r;class n extends e{constructor(_){super(),this._items=typeof _=="string"?[_]:_}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const _=this._items[0];return _===""||_==='""'}get str(){var _;return(_=this._str)!==null&&_!==void 0?_:this._str=this._items.reduce((p,v)=>`${p}${v}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((p,v)=>(v instanceof r&&(p[v.str]=(p[v.str]||0)+1),p),{})}}t._Code=n,t.nil=new n("");function s(c,..._){const p=[c[0]];let v=0;for(;v<_.length;)l(p,_[v]),p.push(c[++v]);return new n(p)}t._=s;var o=new n("+");function i(c,..._){const p=[P(c[0])];let v=0;for(;v<_.length;)p.push(o),l(p,_[v]),p.push(o,P(c[++v]));return a(p),new n(p)}t.str=i;function l(c,_){_ instanceof n?c.push(..._._items):_ instanceof r?c.push(_):c.push(d(_))}t.addCodeArg=l;function a(c){let _=1;for(;_<c.length-1;){if(c[_]===o){const p=f(c[_-1],c[_+1]);if(p!==void 0){c.splice(_-1,3,p);continue}c[_++]="+"}_++}}function f(c,_){if(_==='""')return c;if(c==='""')return _;if(typeof c=="string")return _ instanceof r||c[c.length-1]!=='"'?void 0:typeof _!="string"?`${c.slice(0,-1)}${_}"`:_[0]==='"'?c.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(c instanceof r))return`"${c}${_.slice(1)}`}function u(c,_){return _.emptyStr()?c:c.emptyStr()?_:i`${c}${_}`}t.strConcat=u;function d(c){return typeof c=="number"||typeof c=="boolean"||c===null?c:P(Array.isArray(c)?c.join(","):c)}function w(c){return new n(P(c))}t.stringify=w;function P(c){return JSON.stringify(c).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=P;function $(c){return typeof c=="string"&&t.IDENTIFIER.test(c)?new n(`.${c}`):s`[${c}]`}t.getProperty=$;function E(c){if(typeof c=="string"&&t.IDENTIFIER.test(c))return new n(`${c}`);throw new Error(`CodeGen: invalid export name: ${c}, use explicit $id name mapping`)}t.getEsmExportName=E;function m(c){return new n(c.toString())}t.regexpCode=m}),Gs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=en();class r extends Error{constructor(f){super(`CodeGen: "code" for ${f} not defined`),this.value=f.value}}var n;(function(a){a[a.Started=0]="Started",a[a.Completed=1]="Completed"})(n=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new e.Name("const"),let:new e.Name("let"),var:new e.Name("var")};class s{constructor({prefixes:f,parent:u}={}){this._names={},this._prefixes=f,this._parent=u}toName(f){return f instanceof e.Name?f:this.name(f)}name(f){return new e.Name(this._newName(f))}_newName(f){const u=this._names[f]||this._nameGroup(f);return`${f}${u.index++}`}_nameGroup(f){var u,d;if(!((d=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||d===void 0)&&d.has(f)||this._prefixes&&!this._prefixes.has(f))throw new Error(`CodeGen: prefix "${f}" is not allowed in this scope`);return this._names[f]={prefix:f,index:0}}}t.Scope=s;class o extends e.Name{constructor(f,u){super(u),this.prefix=f}setValue(f,{property:u,itemIndex:d}){this.value=f,this.scopePath=(0,e._)`.${new e.Name(u)}[${d}]`}}t.ValueScopeName=o;var i=(0,e._)`\n`;class l extends s{constructor(f){super(f),this._values={},this._scope=f.scope,this.opts={...f,_n:f.lines?i:e.nil}}get(){return this._scope}name(f){return new o(f,this._newName(f))}value(f,u){var d;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(f),{prefix:P}=w,$=(d=u.key)!==null&&d!==void 0?d:u.ref;let E=this._values[P];if(E){const _=E.get($);if(_)return _}else E=this._values[P]=new Map;E.set($,w);const m=this._scope[P]||(this._scope[P]=[]),c=m.length;return m[c]=u.ref,w.setValue(u,{property:P,itemIndex:c}),w}getValue(f,u){const d=this._values[f];if(d)return d.get(u)}scopeRefs(f,u=this._values){return this._reduceValues(u,d=>{if(d.scopePath===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return(0,e._)`${f}${d.scopePath}`})}scopeCode(f=this._values,u,d){return this._reduceValues(f,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},u,d)}_reduceValues(f,u,d={},w){let P=e.nil;for(const $ in f){const E=f[$];if(!E)continue;const m=d[$]=d[$]||new Map;E.forEach(c=>{if(m.has(c))return;m.set(c,n.Started);let _=u(c);if(_){const p=this.opts.es5?t.varKinds.var:t.varKinds.const;P=(0,e._)`${P}${p} ${c} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(c))P=(0,e._)`${P}${_}${this.opts._n}`;else throw new r(c);m.set(c,n.Completed)})}return P}}t.ValueScope=l}),Ae=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;var e=en(),r=Gs(),n=en();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return n.Name}});var s=Gs();Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return s.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return s.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return s.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return s.varKinds}}),t.operators={GT:new e._Code(">"),GTE:new e._Code(">="),LT:new e._Code("<"),LTE:new e._Code("<="),EQ:new e._Code("==="),NEQ:new e._Code("!=="),NOT:new e._Code("!"),OR:new e._Code("||"),AND:new e._Code("&&"),ADD:new e._Code("+")};class o{optimizeNodes(){return this}optimizeNames(y,k){return this}}class i extends o{constructor(y,k,A){super(),this.varKind=y,this.name=k,this.rhs=A}render({es5:y,_n:k}){const A=y?r.varKinds.var:this.varKind,H=this.rhs===void 0?"":` = ${this.rhs}`;return`${A} ${this.name}${H};`+k}optimizeNames(y,k){if(y[this.name.str])return this.rhs&&(this.rhs=G(this.rhs,y,k)),this}get names(){return this.rhs instanceof e._CodeOrName?this.rhs.names:{}}}class l extends o{constructor(y,k,A){super(),this.lhs=y,this.rhs=k,this.sideEffects=A}render({_n:y}){return`${this.lhs} = ${this.rhs};`+y}optimizeNames(y,k){if(!(this.lhs instanceof e.Name&&!y[this.lhs.str]&&!this.sideEffects))return this.rhs=G(this.rhs,y,k),this}get names(){const y=this.lhs instanceof e.Name?{}:{...this.lhs.names};return X(y,this.rhs)}}class a extends l{constructor(y,k,A,H){super(y,A,H),this.op=k}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class f extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class u extends o{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class d extends o{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class w extends o{constructor(y){super(),this.code=y}render({_n:y}){return`${this.code};`+y}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(y,k){return this.code=G(this.code,y,k),this}get names(){return this.code instanceof e._CodeOrName?this.code.names:{}}}class P extends o{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((k,A)=>k+A.render(y),"")}optimizeNodes(){const{nodes:y}=this;let k=y.length;for(;k--;){const A=y[k].optimizeNodes();Array.isArray(A)?y.splice(k,1,...A):A?y[k]=A:y.splice(k,1)}return y.length>0?this:void 0}optimizeNames(y,k){const{nodes:A}=this;let H=A.length;for(;H--;){const x=A[H];x.optimizeNames(y,k)||(Z(y,x.names),A.splice(H,1))}return A.length>0?this:void 0}get names(){return this.nodes.reduce((y,k)=>q(y,k.names),{})}}class $ extends P{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class E extends P{}class m extends ${}m.kind="else";class c extends ${constructor(y,k){super(k),this.condition=y}render(y){let k=`if(${this.condition})`+super.render(y);return this.else&&(k+="else "+this.else.render(y)),k}optimizeNodes(){super.optimizeNodes();const y=this.condition;if(y===!0)return this.nodes;let k=this.else;if(k){const A=k.optimizeNodes();k=this.else=Array.isArray(A)?new m(A):A}if(k)return y===!1?k instanceof c?k:k.nodes:this.nodes.length?this:new c(ce(y),k instanceof c?[k]:k.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,k){var A;if(this.else=(A=this.else)===null||A===void 0?void 0:A.optimizeNames(y,k),!!(super.optimizeNames(y,k)||this.else))return this.condition=G(this.condition,y,k),this}get names(){const y=super.names;return X(y,this.condition),this.else&&q(y,this.else.names),y}}c.kind="if";class _ extends ${}_.kind="for";class p extends _{constructor(y){super(),this.iteration=y}render(y){return`for(${this.iteration})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iteration=G(this.iteration,y,k),this}get names(){return q(super.names,this.iteration.names)}}class v extends _{constructor(y,k,A,H){super(),this.varKind=y,this.name=k,this.from=A,this.to=H}render(y){const k=y.es5?r.varKinds.var:this.varKind,{name:A,from:H,to:x}=this;return`for(${k} ${A}=${H}; ${A}<${x}; ${A}++)`+super.render(y)}get names(){const y=X(super.names,this.from);return X(y,this.to)}}class b extends _{constructor(y,k,A,H){super(),this.loop=y,this.varKind=k,this.name=A,this.iterable=H}render(y){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(y)}optimizeNames(y,k){if(super.optimizeNames(y,k))return this.iterable=G(this.iterable,y,k),this}get names(){return q(super.names,this.iterable.names)}}class g extends ${constructor(y,k,A){super(),this.name=y,this.args=k,this.async=A}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}g.kind="func";class h extends P{render(y){return"return "+super.render(y)}}h.kind="return";class S extends ${render(y){let k="try"+super.render(y);return this.catch&&(k+=this.catch.render(y)),this.finally&&(k+=this.finally.render(y)),k}optimizeNodes(){var y,k;return super.optimizeNodes(),(y=this.catch)===null||y===void 0||y.optimizeNodes(),(k=this.finally)===null||k===void 0||k.optimizeNodes(),this}optimizeNames(y,k){var A,H;return super.optimizeNames(y,k),(A=this.catch)===null||A===void 0||A.optimizeNames(y,k),(H=this.finally)===null||H===void 0||H.optimizeNames(y,k),this}get names(){const y=super.names;return this.catch&&q(y,this.catch.names),this.finally&&q(y,this.finally.names),y}}class O extends ${constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}O.kind="catch";class C extends ${render(y){return"finally"+super.render(y)}}C.kind="finally";class D{constructor(y,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
17
|
+
`:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(y){return this._scope.name(y)}scopeName(y){return this._extScope.name(y)}scopeValue(y,k){const A=this._extScope.value(y,k);return(this._values[A.prefix]||(this._values[A.prefix]=new Set)).add(A),A}getScopeValue(y,k){return this._extScope.getValue(y,k)}scopeRefs(y){return this._extScope.scopeRefs(y,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(y,k,A,H){const x=this._scope.toName(k);return A!==void 0&&H&&(this._constants[x.str]=A),this._leafNode(new i(y,x,A)),x}const(y,k,A){return this._def(r.varKinds.const,y,k,A)}let(y,k,A){return this._def(r.varKinds.let,y,k,A)}var(y,k,A){return this._def(r.varKinds.var,y,k,A)}assign(y,k,A){return this._leafNode(new l(y,k,A))}add(y,k){return this._leafNode(new a(y,t.operators.ADD,k))}code(y){return typeof y=="function"?y():y!==e.nil&&this._leafNode(new w(y)),this}object(...y){const k=["{"];for(const[A,H]of y)k.length>1&&k.push(","),k.push(A),(A!==H||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,H));return k.push("}"),new e._Code(k)}if(y,k,A){if(this._blockNode(new c(y)),k&&A)this.code(k).else().code(A).endIf();else if(k)this.code(k).endIf();else if(A)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new c(y))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(c,m)}_for(y,k){return this._blockNode(y),k&&this.code(k).endFor(),this}for(y,k){return this._for(new p(y),k)}forRange(y,k,A,H,x=this.opts.es5?r.varKinds.var:r.varKinds.let){const ae=this._scope.toName(y);return this._for(new v(x,ae,k,A),()=>H(ae))}forOf(y,k,A,H=r.varKinds.const){const x=this._scope.toName(y);if(this.opts.es5){const ae=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ae}.length`,ne=>{this.var(x,(0,e._)`${ae}[${ne}]`),A(x)})}return this._for(new b("of",H,x,k),()=>A(x))}forIn(y,k,A,H=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,e._)`Object.keys(${k})`,A);const x=this._scope.toName(y);return this._for(new b("in",H,x,k),()=>A(x))}endFor(){return this._endBlockNode(_)}label(y){return this._leafNode(new f(y))}break(y){return this._leafNode(new u(y))}return(y){const k=new h;if(this._blockNode(k),this.code(y),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(h)}try(y,k,A){if(!k&&!A)throw new Error('CodeGen: "try" without "catch" and "finally"');const H=new S;if(this._blockNode(H),this.code(y),k){const x=this.name("e");this._currNode=H.catch=new O(x),k(x)}return A&&(this._currNode=H.finally=new C,this.code(A)),this._endBlockNode(O,C)}throw(y){return this._leafNode(new d(y))}block(y,k){return this._blockStarts.push(this._nodes.length),y&&this.code(y).endBlock(k),this}endBlock(y){const k=this._blockStarts.pop();if(k===void 0)throw new Error("CodeGen: not in self-balancing block");const A=this._nodes.length-k;if(A<0||y!==void 0&&A!==y)throw new Error(`CodeGen: wrong number of nodes: ${A} vs ${y} expected`);return this._nodes.length=k,this}func(y,k=e.nil,A,H){return this._blockNode(new g(y,k,A)),H&&this.code(H).endFunc(),this}endFunc(){return this._endBlockNode(g)}optimize(y=1){for(;y-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(y){return this._currNode.nodes.push(y),this}_blockNode(y){this._currNode.nodes.push(y),this._nodes.push(y)}_endBlockNode(y,k){const A=this._currNode;if(A instanceof y||k&&A instanceof k)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${k?`${y.kind}/${k.kind}`:y.kind}"`)}_elseNode(y){const k=this._currNode;if(!(k instanceof c))throw new Error('CodeGen: "else" without "if"');return this._currNode=k.else=y,this}get _root(){return this._nodes[0]}get _currNode(){const y=this._nodes;return y[y.length-1]}set _currNode(y){const k=this._nodes;k[k.length-1]=y}}t.CodeGen=D;function q(I,y){for(const k in y)I[k]=(I[k]||0)+(y[k]||0);return I}function X(I,y){return y instanceof e._CodeOrName?q(I,y.names):I}function G(I,y,k){if(I instanceof e.Name)return A(I);if(!H(I))return I;return new e._Code(I._items.reduce((x,ae)=>(ae instanceof e.Name&&(ae=A(ae)),ae instanceof e._Code?x.push(...ae._items):x.push(ae),x),[]));function A(x){const ae=k[x.str];return ae===void 0||y[x.str]!==1?x:(delete y[x.str],ae)}function H(x){return x instanceof e._Code&&x._items.some(ae=>ae instanceof e.Name&&y[ae.str]===1&&k[ae.str]!==void 0)}}function Z(I,y){for(const k in y)I[k]=(I[k]||0)-(y[k]||0)}function ce(I){return typeof I=="boolean"||typeof I=="number"||I===null?!I:(0,e._)`!${U(I)}`}t.not=ce;var ye=T(t.operators.AND);function Re(...I){return I.reduce(ye)}t.and=Re;var ie=T(t.operators.OR);function z(...I){return I.reduce(ie)}t.or=z;function T(I){return(y,k)=>y===e.nil?k:k===e.nil?y:(0,e._)`${U(y)} ${I} ${U(k)}`}function U(I){return I instanceof e.Name?I:(0,e._)`(${I})`}}),ze=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;var e=Ae(),r=en();function n(g){const h={};for(const S of g)h[S]=!0;return h}t.toHash=n;function s(g,h){return typeof h=="boolean"?h:Object.keys(h).length===0?!0:(o(g,h),!i(h,g.self.RULES.all))}t.alwaysValidSchema=s;function o(g,h=g.schema){const{opts:S,self:O}=g;if(!S.strictSchema||typeof h=="boolean")return;const C=O.RULES.keywords;for(const D in h)C[D]||b(g,`unknown keyword: "${D}"`)}t.checkUnknownRules=o;function i(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(h[S])return!0;return!1}t.schemaHasRules=i;function l(g,h){if(typeof g=="boolean")return!g;for(const S in g)if(S!=="$ref"&&h.all[S])return!0;return!1}t.schemaHasRulesButRef=l;function a({topSchemaRef:g,schemaPath:h},S,O,C){if(!C){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${g}${h}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function f(g){return w(decodeURIComponent(g))}t.unescapeFragment=f;function u(g){return encodeURIComponent(d(g))}t.escapeFragment=u;function d(g){return typeof g=="number"?`${g}`:g.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=d;function w(g){return g.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function P(g,h){if(Array.isArray(g))for(const S of g)h(S);else h(g)}t.eachItem=P;function $({mergeNames:g,mergeToName:h,mergeValues:S,resultToName:O}){return(C,D,q,X)=>{const G=q===void 0?D:q instanceof e.Name?(D instanceof e.Name?g(C,D,q):h(C,D,q),q):D instanceof e.Name?(h(C,q,D),D):S(D,q);return X===e.Name&&!(G instanceof e.Name)?O(C,G):G}}t.mergeEvaluated={props:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>{g.if((0,e._)`${h} === true`,()=>g.assign(S,!0),()=>g.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${h})`))}),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>{h===!0?g.assign(S,!0):(g.assign(S,(0,e._)`${S} || {}`),m(g,S,h))}),mergeValues:(g,h)=>g===!0?!0:{...g,...h},resultToName:E}),items:$({mergeNames:(g,h,S)=>g.if((0,e._)`${S} !== true && ${h} !== undefined`,()=>g.assign(S,(0,e._)`${h} === true ? true : ${S} > ${h} ? ${S} : ${h}`)),mergeToName:(g,h,S)=>g.if((0,e._)`${S} !== true`,()=>g.assign(S,h===!0?!0:(0,e._)`${S} > ${h} ? ${S} : ${h}`)),mergeValues:(g,h)=>g===!0?!0:Math.max(g,h),resultToName:(g,h)=>g.var("items",h)})};function E(g,h){if(h===!0)return g.var("props",!0);const S=g.var("props",(0,e._)`{}`);return h!==void 0&&m(g,S,h),S}t.evaluatedPropsToName=E;function m(g,h,S){Object.keys(S).forEach(O=>g.assign((0,e._)`${h}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var c={};function _(g,h){return g.scopeValue("func",{ref:h,code:c[h.code]||(c[h.code]=new r._Code(h.code))})}t.useFunc=_;var p;(function(g){g[g.Num=0]="Num",g[g.Str=1]="Str"})(p=t.Type||(t.Type={}));function v(g,h,S){if(g instanceof e.Name){const O=h===p.Num;return S?O?(0,e._)`"[" + ${g} + "]"`:(0,e._)`"['" + ${g} + "']"`:O?(0,e._)`"/" + ${g}`:(0,e._)`"/" + ${g}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(g).toString():"/"+d(g)}t.getErrorPath=v;function b(g,h,S=g.opts.strictSchema){if(S){if(h=`strict mode: ${h}`,S===!0)throw new Error(h);g.self.logger.warn(h)}}t.checkStrictMode=b}),er=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};t.default=r}),dn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Ae(),r=ze(),n=er();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:c})=>c?(0,e.str)`"${m}" keyword must be ${c} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,c=t.keywordError,_,p){const{it:v}=m,{gen:b,compositeRule:g,allErrors:h}=v,S=d(m,c,_);p??(g||h)?a(b,S):f(v,(0,e._)`[${S}]`)}t.reportError=s;function o(m,c=t.keywordError,_){const{it:p}=m,{gen:v,compositeRule:b,allErrors:g}=p,h=d(m,c,_);a(v,h),b||g||f(p,n.default.vErrors)}t.reportExtraError=o;function i(m,c){m.assign(n.default.errors,c),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(c,()=>m.assign((0,e._)`${n.default.vErrors}.length`,c),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function l({gen:m,keyword:c,schemaValue:_,data:p,errsCount:v,it:b}){if(v===void 0)throw new Error("ajv implementation error");const g=m.name("err");m.forRange("i",v,n.default.errors,h=>{m.const(g,(0,e._)`${n.default.vErrors}[${h}]`),m.if((0,e._)`${g}.instancePath === undefined`,()=>m.assign((0,e._)`${g}.instancePath`,(0,e.strConcat)(n.default.instancePath,b.errorPath))),m.assign((0,e._)`${g}.schemaPath`,(0,e.str)`${b.errSchemaPath}/${c}`),b.opts.verbose&&(m.assign((0,e._)`${g}.schema`,_),m.assign((0,e._)`${g}.data`,p))})}t.extendErrors=l;function a(m,c){const _=m.const("err",c);m.if((0,e._)`${n.default.vErrors} === null`,()=>m.assign(n.default.vErrors,(0,e._)`[${_}]`),(0,e._)`${n.default.vErrors}.push(${_})`),m.code((0,e._)`${n.default.errors}++`)}function f(m,c){const{gen:_,validateName:p,schemaEnv:v}=m;v.$async?_.throw((0,e._)`new ${m.ValidationError}(${c})`):(_.assign((0,e._)`${p}.errors`,c),_.return(!1))}var u={keyword:new e.Name("keyword"),schemaPath:new e.Name("schemaPath"),params:new e.Name("params"),propertyName:new e.Name("propertyName"),message:new e.Name("message"),schema:new e.Name("schema"),parentSchema:new e.Name("parentSchema")};function d(m,c,_){const{createErrors:p}=m.it;return p===!1?(0,e._)`{}`:w(m,c,_)}function w(m,c,_={}){const{gen:p,it:v}=m,b=[P(v,_),$(m,_)];return E(m,c,b),p.object(...b)}function P({errorPath:m},{instancePath:c}){const _=c?(0,e.str)`${m}${(0,r.getErrorPath)(c,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function $({keyword:m,it:{errSchemaPath:c}},{schemaPath:_,parentSchema:p}){let v=p?c:(0,e.str)`${c}/${m}`;return _&&(v=(0,e.str)`${v}${(0,r.getErrorPath)(_,r.Type.Str)}`),[u.schemaPath,v]}function E(m,{params:c,message:_},p){const{keyword:v,data:b,schemaValue:g,it:h}=m,{opts:S,propertyName:O,topSchemaRef:C,schemaPath:D}=h;p.push([u.keyword,v],[u.params,typeof c=="function"?c(m):c||(0,e._)`{}`]),S.messages&&p.push([u.message,typeof _=="function"?_(m):_]),S.verbose&&p.push([u.schema,g],[u.parentSchema,(0,e._)`${C}${D}`],[n.default.data,b]),O&&p.push([u.propertyName,O])}}),Tu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=dn(),r=Ae(),n=er(),s={message:"boolean schema is false"};function o(a){const{gen:f,schema:u,validateName:d}=a;u===!1?l(a,!1):typeof u=="object"&&u.$async===!0?f.return(n.default.data):(f.assign((0,r._)`${d}.errors`,null),f.return(!0))}t.topBoolOrEmptySchema=o;function i(a,f){const{gen:u,schema:d}=a;d===!1?(u.var(f,!1),l(a)):u.var(f,!0)}t.boolOrEmptySchema=i;function l(a,f){const{gen:u,data:d}=a,w={gen:u,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,f)}}),Ki=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;var e=["string","number","integer","boolean","null","object","array"],r=new Set(e);function n(o){return typeof o=="string"&&r.has(o)}t.isJSONType=n;function s(){const o={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...o,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},o.number,o.string,o.array,o.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),Gi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:o},i){const l=o.RULES.types[i];return l&&l!==!0&&r(s,l)}t.schemaHasRulesForType=e;function r(s,o){return o.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,o){var i;return s[o.keyword]!==void 0||((i=o.definition.implements)===null||i===void 0?void 0:i.some(l=>s[l]!==void 0))}t.shouldUseRule=n}),tn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;var e=Ki(),r=Gi(),n=dn(),s=Ae(),o=ze(),i;(function(p){p[p.Correct=0]="Correct",p[p.Wrong=1]="Wrong"})(i=t.DataType||(t.DataType={}));function l(p){const v=a(p.type);if(v.includes("null")){if(p.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!v.length&&p.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');p.nullable===!0&&v.push("null")}return v}t.getSchemaTypes=l;function a(p){const v=Array.isArray(p)?p:p?[p]:[];if(v.every(e.isJSONType))return v;throw new Error("type must be JSONType or JSONType[]: "+v.join(","))}t.getJSONTypes=a;function f(p,v){const{gen:b,data:g,opts:h}=p,S=d(v,h.coerceTypes),O=v.length>0&&!(S.length===0&&v.length===1&&(0,r.schemaHasRulesForType)(p,v[0]));if(O){const C=E(v,g,h.strictNumbers,i.Wrong);b.if(C,()=>{S.length?w(p,v,S):c(p)})}return O}t.coerceAndCheckDataType=f;var u=new Set(["string","number","integer","boolean","null"]);function d(p,v){return v?p.filter(b=>u.has(b)||v==="array"&&b==="array"):[]}function w(p,v,b){const{gen:g,data:h,opts:S}=p,O=g.let("dataType",(0,s._)`typeof ${h}`),C=g.let("coerced",(0,s._)`undefined`);S.coerceTypes==="array"&&g.if((0,s._)`${O} == 'object' && Array.isArray(${h}) && ${h}.length == 1`,()=>g.assign(h,(0,s._)`${h}[0]`).assign(O,(0,s._)`typeof ${h}`).if(E(v,h,S.strictNumbers),()=>g.assign(C,h))),g.if((0,s._)`${C} !== undefined`);for(const q of b)(u.has(q)||q==="array"&&S.coerceTypes==="array")&&D(q);g.else(),c(p),g.endIf(),g.if((0,s._)`${C} !== undefined`,()=>{g.assign(h,C),P(p,C)});function D(q){switch(q){case"string":g.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,s._)`"" + ${h}`).elseIf((0,s._)`${h} === null`).assign(C,(0,s._)`""`);return;case"number":g.elseIf((0,s._)`${O} == "boolean" || ${h} === null
|
|
18
|
+
|| (${O} == "string" && ${h} && ${h} == +${h})`).assign(C,(0,s._)`+${h}`);return;case"integer":g.elseIf((0,s._)`${O} === "boolean" || ${h} === null
|
|
19
|
+
|| (${O} === "string" && ${h} && ${h} == +${h} && !(${h} % 1))`).assign(C,(0,s._)`+${h}`);return;case"boolean":g.elseIf((0,s._)`${h} === "false" || ${h} === 0 || ${h} === null`).assign(C,!1).elseIf((0,s._)`${h} === "true" || ${h} === 1`).assign(C,!0);return;case"null":g.elseIf((0,s._)`${h} === "" || ${h} === 0 || ${h} === false`),g.assign(C,null);return;case"array":g.elseIf((0,s._)`${O} === "string" || ${O} === "number"
|
|
20
|
+
|| ${O} === "boolean" || ${h} === null`).assign(C,(0,s._)`[${h}]`)}}}function P({gen:p,parentData:v,parentDataProperty:b},g){p.if((0,s._)`${v} !== undefined`,()=>p.assign((0,s._)`${v}[${b}]`,g))}function $(p,v,b,g=i.Correct){const h=g===i.Correct?s.operators.EQ:s.operators.NEQ;let S;switch(p){case"null":return(0,s._)`${v} ${h} null`;case"array":S=(0,s._)`Array.isArray(${v})`;break;case"object":S=(0,s._)`${v} && typeof ${v} == "object" && !Array.isArray(${v})`;break;case"integer":S=O((0,s._)`!(${v} % 1) && !isNaN(${v})`);break;case"number":S=O();break;default:return(0,s._)`typeof ${v} ${h} ${p}`}return g===i.Correct?S:(0,s.not)(S);function O(C=s.nil){return(0,s.and)((0,s._)`typeof ${v} == "number"`,C,b?(0,s._)`isFinite(${v})`:s.nil)}}t.checkDataType=$;function E(p,v,b,g){if(p.length===1)return $(p[0],v,b,g);let h;const S=(0,o.toHash)(p);if(S.array&&S.object){const O=(0,s._)`typeof ${v} != "object"`;h=S.null?O:(0,s._)`!${v} || ${O}`,delete S.null,delete S.array,delete S.object}else h=s.nil;S.number&&delete S.integer;for(const O in S)h=(0,s.and)(h,$(O,v,b,g));return h}t.checkDataTypes=E;var m={message:({schema:p})=>`must be ${p}`,params:({schema:p,schemaValue:v})=>typeof p=="string"?(0,s._)`{type: ${p}}`:(0,s._)`{type: ${v}}`};function c(p){const v=_(p);(0,n.reportError)(v,m)}t.reportTypeError=c;function _(p){const{gen:v,data:b,schema:g}=p,h=(0,o.schemaRefOrVal)(p,g,"type");return{gen:v,keyword:"type",data:b,schema:g.type,schemaCode:h,schemaValue:h,parentSchema:g,params:{},it:p}}}),Ru=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ae(),r=ze();function n(o,i){const{properties:l,items:a}=o.schema;if(i==="object"&&l)for(const f in l)s(o,f,l[f].default);else i==="array"&&Array.isArray(a)&&a.forEach((f,u)=>s(o,u,f.default))}t.assignDefaults=n;function s(o,i,l){const{gen:a,compositeRule:f,data:u,opts:d}=o;if(l===void 0)return;const w=(0,e._)`${u}${(0,e.getProperty)(i)}`;if(f){(0,r.checkStrictMode)(o,`default is ignored for: ${w}`);return}let P=(0,e._)`${w} === undefined`;d.useDefaults==="empty"&&(P=(0,e._)`${P} || ${w} === null || ${w} === ""`),a.if(P,(0,e._)`${w} = ${(0,e.stringify)(l)}`)}}),At=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;var e=Ae(),r=ze(),n=er(),s=ze();function o(p,v){const{gen:b,data:g,it:h}=p;b.if(d(b,g,v,h.opts.ownProperties),()=>{p.setParams({missingProperty:(0,e._)`${v}`},!0),p.error()})}t.checkReportMissingProp=o;function i({gen:p,data:v,it:{opts:b}},g,h){return(0,e.or)(...g.map(S=>(0,e.and)(d(p,v,S,b.ownProperties),(0,e._)`${h} = ${S}`)))}t.checkMissingProp=i;function l(p,v){p.setParams({missingProperty:v},!0),p.error()}t.reportMissingProp=l;function a(p){return p.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function f(p,v,b){return(0,e._)`${a(p)}.call(${v}, ${b})`}t.isOwnProperty=f;function u(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} !== undefined`;return g?(0,e._)`${h} && ${f(p,v,b)}`:h}t.propertyInData=u;function d(p,v,b,g){const h=(0,e._)`${v}${(0,e.getProperty)(b)} === undefined`;return g?(0,e.or)(h,(0,e.not)(f(p,v,b))):h}t.noPropertyInData=d;function w(p){return p?Object.keys(p).filter(v=>v!=="__proto__"):[]}t.allSchemaProperties=w;function P(p,v){return w(v).filter(b=>!(0,r.alwaysValidSchema)(p,v[b]))}t.schemaProperties=P;function $({schemaCode:p,data:v,it:{gen:b,topSchemaRef:g,schemaPath:h,errorPath:S},it:O},C,D,q){const X=q?(0,e._)`${p}, ${v}, ${g}${h}`:v,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,S)],[n.default.parentData,O.parentData],[n.default.parentDataProperty,O.parentDataProperty],[n.default.rootData,n.default.rootData]];O.opts.dynamicRef&&G.push([n.default.dynamicAnchors,n.default.dynamicAnchors]);const Z=(0,e._)`${X}, ${b.object(...G)}`;return D!==e.nil?(0,e._)`${C}.call(${D}, ${Z})`:(0,e._)`${C}(${Z})`}t.callValidateCode=$;var E=(0,e._)`new RegExp`;function m({gen:p,it:{opts:v}},b){const g=v.unicodeRegExp?"u":"",{regExp:h}=v.code,S=h(b,g);return p.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${h.code==="new RegExp"?E:(0,s.useFunc)(p,h)}(${b}, ${g})`})}t.usePattern=m;function c(p){const{gen:v,data:b,keyword:g,it:h}=p,S=v.name("valid");if(h.allErrors){const C=v.let("valid",!0);return O(()=>v.assign(C,!1)),C}return v.var(S,!0),O(()=>v.break()),S;function O(C){const D=v.const("len",(0,e._)`${b}.length`);v.forRange("i",0,D,q=>{p.subschema({keyword:g,dataProp:q,dataPropType:r.Type.Num},S),v.if((0,e.not)(S),C)})}}t.validateArray=c;function _(p){const{gen:v,schema:b,keyword:g,it:h}=p;if(!Array.isArray(b))throw new Error("ajv implementation error");if(b.some(D=>(0,r.alwaysValidSchema)(h,D))&&!h.opts.unevaluated)return;const O=v.let("valid",!1),C=v.name("_valid");v.block(()=>b.forEach((D,q)=>{const X=p.subschema({keyword:g,schemaProp:q,compositeRule:!0},C);v.assign(O,(0,e._)`${O} || ${C}`),p.mergeValidEvaluated(X,C)||v.if((0,e.not)(O))})),p.result(O,()=>p.reset(),()=>p.error(!0))}t.validateUnion=_}),Iu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ae(),r=er(),n=At(),s=dn();function o(P,$){const{gen:E,keyword:m,schema:c,parentSchema:_,it:p}=P,v=$.macro.call(p.self,c,_,p),b=u(E,m,v);p.opts.validateSchema!==!1&&p.self.validateSchema(v,!0);const g=E.name("valid");P.subschema({schema:v,schemaPath:e.nil,errSchemaPath:`${p.errSchemaPath}/${m}`,topSchemaRef:b,compositeRule:!0},g),P.pass(g,()=>P.error(!0))}t.macroKeywordCode=o;function i(P,$){var E;const{gen:m,keyword:c,schema:_,parentSchema:p,$data:v,it:b}=P;f(b,$);const g=!v&&$.compile?$.compile.call(b.self,_,p,b):$.validate,h=u(m,c,g),S=m.let("valid");P.block$data(S,O),P.ok((E=$.valid)!==null&&E!==void 0?E:S);function O(){if($.errors===!1)q(),$.modifying&&l(P),X(()=>P.error());else{const G=$.async?C():D();$.modifying&&l(P),X(()=>a(P,G))}}function C(){const G=m.let("ruleErrs",null);return m.try(()=>q((0,e._)`await `),Z=>m.assign(S,!1).if((0,e._)`${Z} instanceof ${b.ValidationError}`,()=>m.assign(G,(0,e._)`${Z}.errors`),()=>m.throw(Z))),G}function D(){const G=(0,e._)`${h}.errors`;return m.assign(G,null),q(e.nil),G}function q(G=$.async?(0,e._)`await `:e.nil){const Z=b.opts.passContext?r.default.this:r.default.self,ce=!("compile"in $&&!v||$.schema===!1);m.assign(S,(0,e._)`${G}${(0,n.callValidateCode)(P,h,Z,ce)}`,$.modifying)}function X(G){var Z;m.if((0,e.not)((Z=$.valid)!==null&&Z!==void 0?Z:S),G)}}t.funcKeywordCode=i;function l(P){const{gen:$,data:E,it:m}=P;$.if(m.parentData,()=>$.assign(E,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(P,$){const{gen:E}=P;E.if((0,e._)`Array.isArray(${$})`,()=>{E.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${$} : ${r.default.vErrors}.concat(${$})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(P)},()=>P.error())}function f({schemaEnv:P},$){if($.async&&!P.$async)throw new Error("async keyword in sync schema")}function u(P,$,E){if(E===void 0)throw new Error(`keyword "${$}" failed to compile`);return P.scopeValue("keyword",typeof E=="function"?{ref:E}:{ref:E,code:(0,e.stringify)(E)})}function d(P,$,E=!1){return!$.length||$.some(m=>m==="array"?Array.isArray(P):m==="object"?P&&typeof P=="object"&&!Array.isArray(P):typeof P==m||E&&typeof P>"u")}t.validSchemaType=d;function w({schema:P,opts:$,self:E,errSchemaPath:m},c,_){if(Array.isArray(c.keyword)?!c.keyword.includes(_):c.keyword!==_)throw new Error("ajv implementation error");const p=c.dependencies;if(p!=null&&p.some(v=>!Object.prototype.hasOwnProperty.call(P,v)))throw new Error(`parent schema must have dependencies of ${_}: ${p.join(",")}`);if(c.validateSchema&&!c.validateSchema(P[_])){const b=`keyword "${_}" value is invalid at path "${m}": `+E.errorsText(c.validateSchema.errors);if($.validateSchema==="log")E.logger.error(b);else throw new Error(b)}}t.validateKeywordUsage=w}),Cu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ae(),r=ze();function n(i,{keyword:l,schemaProp:a,schema:f,schemaPath:u,errSchemaPath:d,topSchemaRef:w}){if(l!==void 0&&f!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(l!==void 0){const P=i.schema[l];return a===void 0?{schema:P,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}`,errSchemaPath:`${i.errSchemaPath}/${l}`}:{schema:P[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(l)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${l}/${(0,r.escapeFragment)(a)}`}}if(f!==void 0){if(u===void 0||d===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:f,schemaPath:u,topSchemaRef:w,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,l,{dataProp:a,dataPropType:f,data:u,dataTypes:d,propertyName:w}){if(u!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:P}=l;if(a!==void 0){const{errorPath:E,dataPathArr:m,opts:c}=l,_=P.let("data",(0,e._)`${l.data}${(0,e.getProperty)(a)}`,!0);$(_),i.errorPath=(0,e.str)`${E}${(0,r.getErrorPath)(a,f,c.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(u!==void 0){const E=u instanceof e.Name?u:P.let("data",u,!0);$(E),w!==void 0&&(i.propertyName=w)}d&&(i.dataTypes=d);function $(E){i.data=E,i.dataLevel=l.dataLevel+1,i.dataTypes=[],l.definedProperties=new Set,i.parentData=l.data,i.dataNames=[...l.dataNames,E]}}t.extendSubschemaData=s;function o(i,{jtdDiscriminator:l,jtdMetadata:a,compositeRule:f,createErrors:u,allErrors:d}){f!==void 0&&(i.compositeRule=f),u!==void 0&&(i.createErrors=u),d!==void 0&&(i.allErrors=d),i.jtdDiscriminator=l,i.jtdMetadata=a}t.extendSubschemaMode=o}),hn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;var e=ze(),r=cn(),n=Ui(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(m,c=!0){return typeof m=="boolean"?!0:c===!0?!l(m):c?a(m)<=c:!1}t.inlineRef=o;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(m){for(const c in m){if(i.has(c))return!0;const _=m[c];if(Array.isArray(_)&&_.some(l)||typeof _=="object"&&l(_))return!0}return!1}function a(m){let c=0;for(const _ in m){if(_==="$ref")return 1/0;if(c++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],p=>c+=a(p)),c===1/0))return 1/0}return c}function f(m,c="",_){_!==!1&&(c=w(c));const p=m.parse(c);return u(m,p)}t.getFullPath=f;function u(m,c){return m.serialize(c).split("#")[0]+"#"}t._getFullPath=u;var d=/#\/?$/;function w(m){return m?m.replace(d,""):""}t.normalizeId=w;function P(m,c,_){return _=w(_),m.resolve(c,_)}t.resolveUrl=P;var $=/^[a-z_][-a-z0-9._]*$/i;function E(m,c){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:p}=this.opts,v=w(m[_]||c),b={"":v},g=f(p,v,!1),h={},S=new Set;return n(m,{allKeys:!0},(D,q,X,G)=>{if(G===void 0)return;const Z=g+q;let ce=b[G];typeof D[_]=="string"&&(ce=ye.call(this,D[_])),Re.call(this,D.$anchor),Re.call(this,D.$dynamicAnchor),b[q]=ce;function ye(ie){const z=this.opts.uriResolver.resolve;if(ie=w(ce?z(ce,ie):ie),S.has(ie))throw C(ie);S.add(ie);let T=this.refs[ie];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?O(D,T.schema,ie):ie!==w(Z)&&(ie[0]==="#"?(O(D,h[ie],ie),h[ie]=D):this.refs[ie]=Z),ie}function Re(ie){if(typeof ie=="string"){if(!$.test(ie))throw new Error(`invalid anchor "${ie}"`);ye.call(this,`#${ie}`)}}}),h;function O(D,q,X){if(q!==void 0&&!r(D,q))throw C(X)}function C(D){return new Error(`reference "${D}" resolves to more than one schema`)}}t.getSchemaRefs=E}),pn=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Tu(),r=tn(),n=Gi(),s=tn(),o=Ru(),i=Iu(),l=Cu(),a=Ae(),f=er(),u=hn(),d=ze(),w=dn();function P(N){if(g(N)&&(S(N),b(N))){c(N);return}$(N,()=>(0,e.topBoolOrEmptySchema)(N))}t.validateFunctionCode=P;function $({gen:N,validateName:R,schema:V,schemaEnv:B,opts:Q},re){Q.code.es5?N.func(R,(0,a._)`${f.default.data}, ${f.default.valCxt}`,B.$async,()=>{N.code((0,a._)`"use strict"; ${p(V,Q)}`),m(N,Q),N.code(re)}):N.func(R,(0,a._)`${f.default.data}, ${E(Q)}`,B.$async,()=>N.code(p(V,Q)).code(re))}function E(N){return(0,a._)`{${f.default.instancePath}="", ${f.default.parentData}, ${f.default.parentDataProperty}, ${f.default.rootData}=${f.default.data}${N.dynamicRef?(0,a._)`, ${f.default.dynamicAnchors}={}`:a.nil}}={}`}function m(N,R){N.if(f.default.valCxt,()=>{N.var(f.default.instancePath,(0,a._)`${f.default.valCxt}.${f.default.instancePath}`),N.var(f.default.parentData,(0,a._)`${f.default.valCxt}.${f.default.parentData}`),N.var(f.default.parentDataProperty,(0,a._)`${f.default.valCxt}.${f.default.parentDataProperty}`),N.var(f.default.rootData,(0,a._)`${f.default.valCxt}.${f.default.rootData}`),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`${f.default.valCxt}.${f.default.dynamicAnchors}`)},()=>{N.var(f.default.instancePath,(0,a._)`""`),N.var(f.default.parentData,(0,a._)`undefined`),N.var(f.default.parentDataProperty,(0,a._)`undefined`),N.var(f.default.rootData,f.default.data),R.dynamicRef&&N.var(f.default.dynamicAnchors,(0,a._)`{}`)})}function c(N){const{schema:R,opts:V,gen:B}=N;$(N,()=>{V.$comment&&R.$comment&&G(N),D(N),B.let(f.default.vErrors,null),B.let(f.default.errors,0),V.unevaluated&&_(N),O(N),Z(N)})}function _(N){const{gen:R,validateName:V}=N;N.evaluated=R.const("evaluated",(0,a._)`${V}.evaluated`),R.if((0,a._)`${N.evaluated}.dynamicProps`,()=>R.assign((0,a._)`${N.evaluated}.props`,(0,a._)`undefined`)),R.if((0,a._)`${N.evaluated}.dynamicItems`,()=>R.assign((0,a._)`${N.evaluated}.items`,(0,a._)`undefined`))}function p(N,R){const V=typeof N=="object"&&N[R.schemaId];return V&&(R.code.source||R.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function v(N,R){if(g(N)&&(S(N),b(N))){h(N,R);return}(0,e.boolOrEmptySchema)(N,R)}function b({schema:N,self:R}){if(typeof N=="boolean")return!N;for(const V in N)if(R.RULES.all[V])return!0;return!1}function g(N){return typeof N.schema!="boolean"}function h(N,R){const{schema:V,gen:B,opts:Q}=N;Q.$comment&&V.$comment&&G(N),q(N),X(N);const re=B.const("_errs",f.default.errors);O(N,re),B.var(R,(0,a._)`${re} === ${f.default.errors}`)}function S(N){(0,d.checkUnknownRules)(N),C(N)}function O(N,R){if(N.opts.jtd)return ye(N,[],!1,R);const V=(0,r.getSchemaTypes)(N.schema),B=(0,r.coerceAndCheckDataType)(N,V);ye(N,V,!B,R)}function C(N){const{schema:R,errSchemaPath:V,opts:B,self:Q}=N;R.$ref&&B.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(R,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function D(N){const{schema:R,opts:V}=N;R.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,d.checkStrictMode)(N,"default is ignored in the schema root")}function q(N){const R=N.schema[N.opts.schemaId];R&&(N.baseId=(0,u.resolveUrl)(N.opts.uriResolver,N.baseId,R))}function X(N){if(N.schema.$async&&!N.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:N,schemaEnv:R,schema:V,errSchemaPath:B,opts:Q}){const re=V.$comment;if(Q.$comment===!0)N.code((0,a._)`${f.default.self}.logger.log(${re})`);else if(typeof Q.$comment=="function"){const be=(0,a.str)`${B}/$comment`,Ve=N.scopeValue("root",{ref:R.root});N.code((0,a._)`${f.default.self}.opts.$comment(${re}, ${be}, ${Ve}.schema)`)}}function Z(N){const{gen:R,schemaEnv:V,validateName:B,ValidationError:Q,opts:re}=N;V.$async?R.if((0,a._)`${f.default.errors} === 0`,()=>R.return(f.default.data),()=>R.throw((0,a._)`new ${Q}(${f.default.vErrors})`)):(R.assign((0,a._)`${B}.errors`,f.default.vErrors),re.unevaluated&&ce(N),R.return((0,a._)`${f.default.errors} === 0`))}function ce({gen:N,evaluated:R,props:V,items:B}){V instanceof a.Name&&N.assign((0,a._)`${R}.props`,V),B instanceof a.Name&&N.assign((0,a._)`${R}.items`,B)}function ye(N,R,V,B){const{gen:Q,schema:re,data:be,allErrors:Ve,opts:Te,self:je}=N,{RULES:_e}=je;if(re.$ref&&(Te.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(re,_e))){Q.block(()=>x(N,"$ref",_e.all.$ref.definition));return}Te.jtd||ie(N,R),Q.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(re,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,be,Te.strictNumbers)),Re(N,Ie),R.length===1&&R[0]===Ie.type&&V&&(Q.else(),(0,s.reportTypeError)(N)),Q.endIf()):Re(N,Ie),Ve||Q.if((0,a._)`${f.default.errors} === ${B||0}`))}}function Re(N,R){const{gen:V,schema:B,opts:{useDefaults:Q}}=N;Q&&(0,o.assignDefaults)(N,R.type),V.block(()=>{for(const re of R.rules)(0,n.shouldUseRule)(B,re)&&x(N,re.keyword,re.definition,R.type)})}function ie(N,R){N.schemaEnv.meta||!N.opts.strictTypes||(z(N,R),N.opts.allowUnionTypes||T(N,R),U(N,N.dataTypes))}function z(N,R){if(R.length){if(!N.dataTypes.length){N.dataTypes=R;return}R.forEach(V=>{y(N.dataTypes,V)||A(N,`type "${V}" not allowed by context "${N.dataTypes.join(",")}"`)}),k(N,R)}}function T(N,R){R.length>1&&!(R.length===2&&R.includes("null"))&&A(N,"use allowUnionTypes to allow union type keyword")}function U(N,R){const V=N.self.RULES.all;for(const B in V){const Q=V[B];if(typeof Q=="object"&&(0,n.shouldUseRule)(N.schema,Q)){const{type:re}=Q.definition;re.length&&!re.some(be=>I(R,be))&&A(N,`missing type "${re.join(",")}" for keyword "${B}"`)}}}function I(N,R){return N.includes(R)||R==="number"&&N.includes("integer")}function y(N,R){return N.includes(R)||R==="integer"&&N.includes("number")}function k(N,R){const V=[];for(const B of N.dataTypes)y(R,B)?V.push(B):R.includes("integer")&&B==="number"&&V.push("integer");N.dataTypes=V}function A(N,R){const V=N.schemaEnv.baseId+N.errSchemaPath;R+=` at "${V}" (strictTypes)`,(0,d.checkStrictMode)(N,R,N.opts.strictTypes)}class H{constructor(R,V,B){if((0,i.validateKeywordUsage)(R,V,B),this.gen=R.gen,this.allErrors=R.allErrors,this.keyword=B,this.data=R.data,this.schema=R.schema[B],this.$data=V.$data&&R.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(R,this.schema,B,this.$data),this.schemaType=V.schemaType,this.parentSchema=R.schema,this.params={},this.it=R,this.def=V,this.$data)this.schemaCode=R.gen.const("vSchema",ve(this.$data,R));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=R.gen.const("_errs",f.default.errors))}result(R,V,B){this.failResult((0,a.not)(R),V,B)}failResult(R,V,B){this.gen.if(R),B?B():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(R,V){this.failResult((0,a.not)(R),void 0,V)}fail(R){if(R===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(R),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(R){if(!this.$data)return this.fail(R);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),R)})`)}error(R,V,B){if(V){this.setParams(V),this._error(R,B),this.setParams({});return}this._error(R,B)}_error(R,V){(R?w.reportExtraError:w.reportError)(this,this.def.error,V)}$dataError(){(0,w.reportError)(this,this.def.$dataError||w.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,w.resetErrorsCount)(this.gen,this.errsCount)}ok(R){this.allErrors||this.gen.if(R)}setParams(R,V){V?Object.assign(this.params,R):this.params=R}block$data(R,V,B=a.nil){this.gen.block(()=>{this.check$data(R,B),V()})}check$data(R=a.nil,V=a.nil){if(!this.$data)return;const{gen:B,schemaCode:Q,schemaType:re,def:be}=this;B.if((0,a.or)((0,a._)`${Q} === undefined`,V)),R!==a.nil&&B.assign(R,!0),(re.length||be.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),R!==a.nil&&B.assign(R,!1)),B.else()}invalid$data(){const{gen:R,schemaCode:V,schemaType:B,def:Q,it:re}=this;return(0,a.or)(be(),Ve());function be(){if(B.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Te=Array.isArray(B)?B:[B];return(0,a._)`${(0,s.checkDataTypes)(Te,V,re.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ve(){if(Q.validateSchema){const Te=R.scopeValue("validate$data",{ref:Q.validateSchema});return(0,a._)`!${Te}(${V})`}return a.nil}}subschema(R,V){const B=(0,l.getSubschema)(this.it,R);(0,l.extendSubschemaData)(B,this.it,R),(0,l.extendSubschemaMode)(B,R);const Q={...this.it,...B,items:void 0,props:void 0};return v(Q,V),Q}mergeEvaluated(R,V){const{it:B,gen:Q}=this;B.opts.unevaluated&&(B.props!==!0&&R.props!==void 0&&(B.props=d.mergeEvaluated.props(Q,R.props,B.props,V)),B.items!==!0&&R.items!==void 0&&(B.items=d.mergeEvaluated.items(Q,R.items,B.items,V)))}mergeValidEvaluated(R,V){const{it:B,gen:Q}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return Q.if(V,()=>this.mergeEvaluated(R,a.Name)),!0}}t.KeywordCxt=H;function x(N,R,V,B){const Q=new H(N,V,R);"code"in V?V.code(Q,B):Q.$data&&V.validate?(0,i.funcKeywordCode)(Q,V):"macro"in V?(0,i.macroKeywordCode)(Q,V):(V.compile||V.validate)&&(0,i.funcKeywordCode)(Q,V)}var ae=/^\/(?:[^~]|~0|~1)*$/,ne=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(N,{dataLevel:R,dataNames:V,dataPathArr:B}){let Q,re;if(N==="")return f.default.rootData;if(N[0]==="/"){if(!ae.test(N))throw new Error(`Invalid JSON-pointer: ${N}`);Q=N,re=f.default.rootData}else{const je=ne.exec(N);if(!je)throw new Error(`Invalid JSON-pointer: ${N}`);const _e=+je[1];if(Q=je[2],Q==="#"){if(_e>=R)throw new Error(Te("property/index",_e));return B[R-_e]}if(_e>R)throw new Error(Te("data",_e));if(re=V[R-_e],!Q)return re}let be=re;const Ve=Q.split("/");for(const je of Ve)je&&(re=(0,a._)`${re}${(0,a.getProperty)((0,d.unescapeJsonPointer)(je))}`,be=(0,a._)`${be} && ${re}`);return be;function Te(je,_e){return`Cannot access ${je} ${_e} levels up, current level is ${R}`}}t.getData=ve}),ds=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});class e extends Error{constructor(n){super("validation failed"),this.errors=n,this.ajv=this.validation=!0}}t.default=e}),hs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=hn();class r extends Error{constructor(s,o,i,l){super(l||`can't resolve reference ${i} from id ${o}`),this.missingRef=(0,e.resolveUrl)(s,o,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),ps=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ae(),r=ds(),n=er(),s=hn(),o=ze(),i=pn();class l{constructor(_){var p;this.refs={},this.dynamicAnchors={};let v;typeof _.schema=="object"&&(v=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(p=_.baseId)!==null&&p!==void 0?p:(0,s.normalizeId)(v==null?void 0:v[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=v==null?void 0:v.$async,this.refs={}}}t.SchemaEnv=l;function a(c){const _=d.call(this,c);if(_)return _;const p=(0,s.getFullPath)(this.opts.uriResolver,c.root.baseId),{es5:v,lines:b}=this.opts.code,{ownProperties:g}=this.opts,h=new e.CodeGen(this.scope,{es5:v,lines:b,ownProperties:g});let S;c.$async&&(S=h.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=h.scopeName("validate");c.validateName=O;const C={gen:h,allErrors:this.opts.allErrors,data:n.default.data,parentData:n.default.parentData,parentDataProperty:n.default.parentDataProperty,dataNames:[n.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:h.scopeValue("schema",this.opts.code.source===!0?{ref:c.schema,code:(0,e.stringify)(c.schema)}:{ref:c.schema}),validateName:O,ValidationError:S,schema:c.schema,schemaEnv:c,rootId:p,baseId:c.baseId||p,schemaPath:e.nil,errSchemaPath:c.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let D;try{this._compilations.add(c),(0,i.validateFunctionCode)(C),h.optimize(this.opts.code.optimize);const q=h.toString();D=`${h.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(D=this.opts.code.process(D,c));const G=new Function(`${n.default.self}`,`${n.default.scope}`,D)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=c.schema,G.schemaEnv=c,c.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:q,scopeValues:h._values}),this.opts.unevaluated){const{props:Z,items:ce}=C;G.evaluated={props:Z instanceof e.Name?void 0:Z,items:ce instanceof e.Name?void 0:ce,dynamicProps:Z instanceof e.Name,dynamicItems:ce instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return c.validate=G,c}catch(q){throw delete c.validate,delete c.validateName,D&&this.logger.error("Error compiling schema, function code:",D),q}finally{this._compilations.delete(c)}}t.compileSchema=a;function f(c,_,p){var v;p=(0,s.resolveUrl)(this.opts.uriResolver,_,p);const b=c.refs[p];if(b)return b;let g=P.call(this,c,p);if(g===void 0){const h=(v=c.localRefs)===null||v===void 0?void 0:v[p],{schemaId:S}=this.opts;h&&(g=new l({schema:h,schemaId:S,root:c,baseId:_}))}if(g!==void 0)return c.refs[p]=u.call(this,g)}t.resolveRef=f;function u(c){return(0,s.inlineRef)(c.schema,this.opts.inlineRefs)?c.schema:c.validate?c:a.call(this,c)}function d(c){for(const _ of this._compilations)if(w(_,c))return _}t.getCompilingSchema=d;function w(c,_){return c.schema===_.schema&&c.root===_.root&&c.baseId===_.baseId}function P(c,_){let p;for(;typeof(p=this.refs[_])=="string";)_=p;return p||this.schemas[_]||$.call(this,c,_)}function $(c,_){const p=this.opts.uriResolver.parse(_),v=(0,s._getFullPath)(this.opts.uriResolver,p);let b=(0,s.getFullPath)(this.opts.uriResolver,c.baseId,void 0);if(Object.keys(c.schema).length>0&&v===b)return m.call(this,p,c);const g=(0,s.normalizeId)(v),h=this.refs[g]||this.schemas[g];if(typeof h=="string"){const S=$.call(this,c,h);return typeof(S==null?void 0:S.schema)!="object"?void 0:m.call(this,p,S)}if(typeof(h==null?void 0:h.schema)=="object"){if(h.validate||a.call(this,h),g===(0,s.normalizeId)(_)){const{schema:S}=h,{schemaId:O}=this.opts,C=S[O];return C&&(b=(0,s.resolveUrl)(this.opts.uriResolver,b,C)),new l({schema:S,schemaId:O,root:c,baseId:b})}return m.call(this,p,h)}}t.resolveSchema=$;var E=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(c,{baseId:_,schema:p,root:v}){var b;if(((b=c.fragment)===null||b===void 0?void 0:b[0])!=="/")return;for(const S of c.fragment.slice(1).split("/")){if(typeof p=="boolean")return;const O=p[(0,o.unescapeFragment)(S)];if(O===void 0)return;p=O;const C=typeof p=="object"&&p[this.opts.schemaId];!E.has(S)&&C&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,C))}let g;if(typeof p!="boolean"&&p.$ref&&!(0,o.schemaHasRulesButRef)(p,this.RULES)){const S=(0,s.resolveUrl)(this.opts.uriResolver,_,p.$ref);g=$.call(this,v,S)}const{schemaId:h}=this.opts;if(g=g||new l({schema:p,schemaId:h,root:v,baseId:_}),g.schema!==g.root.schema)return g}}),Au=K(function(t,e){e.exports={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1}}),ms=K(function(t,e){(function(r,n){typeof t=="object"&&typeof e<"u"?n(t):typeof define=="function"&&define.amd?define(["exports"],n):n(r.URI=r.URI||{})})(t,function(r){function n(){for(var M=arguments.length,j=Array(M),F=0;F<M;F++)j[F]=arguments[F];if(j.length>1){j[0]=j[0].slice(0,-1);for(var W=j.length-1,J=1;J<W;++J)j[J]=j[J].slice(1,-1);return j[W]=j[W].slice(1),j.join("")}else return j[0]}function s(M){return"(?:"+M+")"}function o(M){return M===void 0?"undefined":M===null?"null":Object.prototype.toString.call(M).split(" ").pop().split("]").shift().toLowerCase()}function i(M){return M.toUpperCase()}function l(M){return M!=null?M instanceof Array?M:typeof M.length!="number"||M.split||M.setInterval||M.call?[M]:Array.prototype.slice.call(M):[]}function a(M,j){var F=M;if(j)for(var W in j)F[W]=j[W];return F}function f(M){var j="[A-Za-z]",F="[0-9]",W=n(F,"[A-Fa-f]"),J=s(s("%[EFef]"+W+"%"+W+W+"%"+W+W)+"|"+s("%[89A-Fa-f]"+W+"%"+W+W)+"|"+s("%"+W+W)),pe="[\\:\\/\\?\\#\\[\\]\\@]",ge="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",De=n(pe,ge),Je=M?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",rt=M?"[\\uE000-\\uF8FF]":"[]",ke=n(j,F,"[\\-\\.\\_\\~]",Je);s(j+n(j,F,"[\\+\\-\\.]")+"*"),s(s(J+"|"+n(ke,ge,"[\\:]"))+"*");var Ke=s(s("25[0-5]")+"|"+s("2[0-4]"+F)+"|"+s("1"+F+F)+"|"+s("0?[1-9]"+F)+"|0?0?"+F),it=s(Ke+"\\."+Ke+"\\."+Ke+"\\."+Ke),Ee=s(W+"{1,4}"),Ue=s(s(Ee+"\\:"+Ee)+"|"+it),at=s(s(Ee+"\\:")+"{6}"+Ue),Qe=s("\\:\\:"+s(Ee+"\\:")+"{5}"+Ue),jt=s(s(Ee)+"?\\:\\:"+s(Ee+"\\:")+"{4}"+Ue),Pt=s(s(s(Ee+"\\:")+"{0,1}"+Ee)+"?\\:\\:"+s(Ee+"\\:")+"{3}"+Ue),kt=s(s(s(Ee+"\\:")+"{0,2}"+Ee)+"?\\:\\:"+s(Ee+"\\:")+"{2}"+Ue),Nt=s(s(s(Ee+"\\:")+"{0,3}"+Ee)+"?\\:\\:"+Ee+"\\:"+Ue),Bt=s(s(s(Ee+"\\:")+"{0,4}"+Ee)+"?\\:\\:"+Ue),ee=s(s(s(Ee+"\\:")+"{0,5}"+Ee)+"?\\:\\:"+Ee),fe=s(s(s(Ee+"\\:")+"{0,6}"+Ee)+"?\\:\\:"),Se=s([at,Qe,jt,Pt,kt,Nt,Bt,ee,fe].join("|")),qe=s(s(ke+"|"+J)+"+");s("[vV]"+W+"+\\."+n(ke,ge,"[\\:]")+"+"),s(s(J+"|"+n(ke,ge))+"*");var et=s(J+"|"+n(ke,ge,"[\\:\\@]"));return s(s(J+"|"+n(ke,ge,"[\\@]"))+"+"),s(s(et+"|"+n("[\\/\\?]",rt))+"*"),{NOT_SCHEME:new RegExp(n("[^]",j,F,"[\\+\\-\\.]"),"g"),NOT_USERINFO:new RegExp(n("[^\\%\\:]",ke,ge),"g"),NOT_HOST:new RegExp(n("[^\\%\\[\\]\\:]",ke,ge),"g"),NOT_PATH:new RegExp(n("[^\\%\\/\\:\\@]",ke,ge),"g"),NOT_PATH_NOSCHEME:new RegExp(n("[^\\%\\/\\@]",ke,ge),"g"),NOT_QUERY:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]",rt),"g"),NOT_FRAGMENT:new RegExp(n("[^\\%]",ke,ge,"[\\:\\@\\/\\?]"),"g"),ESCAPE:new RegExp(n("[^]",ke,ge),"g"),UNRESERVED:new RegExp(ke,"g"),OTHER_CHARS:new RegExp(n("[^\\%]",ke,De),"g"),PCT_ENCODED:new RegExp(J,"g"),IPV4ADDRESS:new RegExp("^("+it+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Se+")"+s(s("\\%25|\\%(?!"+W+"{2})")+"("+qe+")")+"?\\]?$")}}var u=f(!1),d=f(!0),w=function(){function M(j,F){var W=[],J=!0,pe=!1,ge=void 0;try{for(var De=j[Symbol.iterator](),Je;!(J=(Je=De.next()).done)&&(W.push(Je.value),!(F&&W.length===F));J=!0);}catch(rt){pe=!0,ge=rt}finally{try{!J&&De.return&&De.return()}finally{if(pe)throw ge}}return W}return function(j,F){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return M(j,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),P=function(M){if(Array.isArray(M)){for(var j=0,F=Array(M.length);j<M.length;j++)F[j]=M[j];return F}else return Array.from(M)},$=2147483647,E=36,m=1,c=26,_=38,p=700,v=72,b=128,g="-",h=/^xn--/,S=/[^\0-\x7E]/,O=/[\x2E\u3002\uFF0E\uFF61]/g,C={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=E-m,q=Math.floor,X=String.fromCharCode;function G(M){throw new RangeError(C[M])}function Z(M,j){for(var F=[],W=M.length;W--;)F[W]=j(M[W]);return F}function ce(M,j){var F=M.split("@"),W="";F.length>1&&(W=F[0]+"@",M=F[1]),M=M.replace(O,".");var J=M.split("."),pe=Z(J,j).join(".");return W+pe}function ye(M){for(var j=[],F=0,W=M.length;F<W;){var J=M.charCodeAt(F++);if(J>=55296&&J<=56319&&F<W){var pe=M.charCodeAt(F++);(pe&64512)==56320?j.push(((J&1023)<<10)+(pe&1023)+65536):(j.push(J),F--)}else j.push(J)}return j}var Re=function(j){return String.fromCodePoint.apply(String,P(j))},ie=function(j){return j-48<10?j-22:j-65<26?j-65:j-97<26?j-97:E},z=function(j,F){return j+22+75*(j<26)-((F!=0)<<5)},T=function(j,F,W){var J=0;for(j=W?q(j/p):j>>1,j+=q(j/F);j>D*c>>1;J+=E)j=q(j/D);return q(J+(D+1)*j/(j+_))},U=function(j){var F=[],W=j.length,J=0,pe=b,ge=v,De=j.lastIndexOf(g);De<0&&(De=0);for(var Je=0;Je<De;++Je)j.charCodeAt(Je)>=128&&G("not-basic"),F.push(j.charCodeAt(Je));for(var rt=De>0?De+1:0;rt<W;){for(var ke=J,Ke=1,it=E;;it+=E){rt>=W&&G("invalid-input");var Ee=ie(j.charCodeAt(rt++));(Ee>=E||Ee>q(($-J)/Ke))&&G("overflow"),J+=Ee*Ke;var Ue=it<=ge?m:it>=ge+c?c:it-ge;if(Ee<Ue)break;var at=E-Ue;Ke>q($/at)&&G("overflow"),Ke*=at}var Qe=F.length+1;ge=T(J-ke,Qe,ke==0),q(J/Qe)>$-pe&&G("overflow"),pe+=q(J/Qe),J%=Qe,F.splice(J++,0,pe)}return String.fromCodePoint.apply(String,F)},I=function(j){var F=[];j=ye(j);var W=j.length,J=b,pe=0,ge=v,De=!0,Je=!1,rt=void 0;try{for(var ke=j[Symbol.iterator](),Ke;!(De=(Ke=ke.next()).done);De=!0){var it=Ke.value;it<128&&F.push(X(it))}}catch(Qt){Je=!0,rt=Qt}finally{try{!De&&ke.return&&ke.return()}finally{if(Je)throw rt}}var Ee=F.length,Ue=Ee;for(Ee&&F.push(g);Ue<W;){var at=$,Qe=!0,jt=!1,Pt=void 0;try{for(var kt=j[Symbol.iterator](),Nt;!(Qe=(Nt=kt.next()).done);Qe=!0){var Bt=Nt.value;Bt>=J&&Bt<at&&(at=Bt)}}catch(Qt){jt=!0,Pt=Qt}finally{try{!Qe&&kt.return&&kt.return()}finally{if(jt)throw Pt}}var ee=Ue+1;at-J>q(($-pe)/ee)&&G("overflow"),pe+=(at-J)*ee,J=at;var fe=!0,Se=!1,qe=void 0;try{for(var et=j[Symbol.iterator](),bt;!(fe=(bt=et.next()).done);fe=!0){var Tt=bt.value;if(Tt<J&&++pe>$&&G("overflow"),Tt==J){for(var xt=pe,dt=E;;dt+=E){var _t=dt<=ge?m:dt>=ge+c?c:dt-ge;if(xt<_t)break;var pr=xt-_t,mr=E-_t;F.push(X(z(_t+pr%mr,0))),xt=q(pr/mr)}F.push(X(z(xt,0))),ge=T(pe,ee,Ue==Ee),pe=0,++Ue}}}catch(Qt){Se=!0,qe=Qt}finally{try{!fe&&et.return&&et.return()}finally{if(Se)throw qe}}++pe,++J}return F.join("")},y=function(j){return ce(j,function(F){return h.test(F)?U(F.slice(4).toLowerCase()):F})},k=function(j){return ce(j,function(F){return S.test(F)?"xn--"+I(F):F})},A={version:"2.1.0",ucs2:{decode:ye,encode:Re},decode:U,encode:I,toASCII:k,toUnicode:y},H={};function x(M){var j=M.charCodeAt(0),F=void 0;return j<16?F="%0"+j.toString(16).toUpperCase():j<128?F="%"+j.toString(16).toUpperCase():j<2048?F="%"+(j>>6|192).toString(16).toUpperCase()+"%"+(j&63|128).toString(16).toUpperCase():F="%"+(j>>12|224).toString(16).toUpperCase()+"%"+(j>>6&63|128).toString(16).toUpperCase()+"%"+(j&63|128).toString(16).toUpperCase(),F}function ae(M){for(var j="",F=0,W=M.length;F<W;){var J=parseInt(M.substr(F+1,2),16);if(J<128)j+=String.fromCharCode(J),F+=3;else if(J>=194&&J<224){if(W-F>=6){var pe=parseInt(M.substr(F+4,2),16);j+=String.fromCharCode((J&31)<<6|pe&63)}else j+=M.substr(F,6);F+=6}else if(J>=224){if(W-F>=9){var ge=parseInt(M.substr(F+4,2),16),De=parseInt(M.substr(F+7,2),16);j+=String.fromCharCode((J&15)<<12|(ge&63)<<6|De&63)}else j+=M.substr(F,9);F+=9}else j+=M.substr(F,3),F+=3}return j}function ne(M,j){function F(W){var J=ae(W);return J.match(j.UNRESERVED)?J:W}return M.scheme&&(M.scheme=String(M.scheme).replace(j.PCT_ENCODED,F).toLowerCase().replace(j.NOT_SCHEME,"")),M.userinfo!==void 0&&(M.userinfo=String(M.userinfo).replace(j.PCT_ENCODED,F).replace(j.NOT_USERINFO,x).replace(j.PCT_ENCODED,i)),M.host!==void 0&&(M.host=String(M.host).replace(j.PCT_ENCODED,F).toLowerCase().replace(j.NOT_HOST,x).replace(j.PCT_ENCODED,i)),M.path!==void 0&&(M.path=String(M.path).replace(j.PCT_ENCODED,F).replace(M.scheme?j.NOT_PATH:j.NOT_PATH_NOSCHEME,x).replace(j.PCT_ENCODED,i)),M.query!==void 0&&(M.query=String(M.query).replace(j.PCT_ENCODED,F).replace(j.NOT_QUERY,x).replace(j.PCT_ENCODED,i)),M.fragment!==void 0&&(M.fragment=String(M.fragment).replace(j.PCT_ENCODED,F).replace(j.NOT_FRAGMENT,x).replace(j.PCT_ENCODED,i)),M}function ve(M){return M.replace(/^0*(.*)/,"$1")||"0"}function N(M,j){var F=M.match(j.IPV4ADDRESS)||[],W=w(F,2),J=W[1];return J?J.split(".").map(ve).join("."):M}function R(M,j){var F=M.match(j.IPV6ADDRESS)||[],W=w(F,3),J=W[1],pe=W[2];if(J){for(var ge=J.toLowerCase().split("::").reverse(),De=w(ge,2),Je=De[0],rt=De[1],ke=rt?rt.split(":").map(ve):[],Ke=Je.split(":").map(ve),it=j.IPV4ADDRESS.test(Ke[Ke.length-1]),Ee=it?7:8,Ue=Ke.length-Ee,at=Array(Ee),Qe=0;Qe<Ee;++Qe)at[Qe]=ke[Qe]||Ke[Ue+Qe]||"";it&&(at[Ee-1]=N(at[Ee-1],j));var jt=at.reduce(function(ee,fe,Se){if(!fe||fe==="0"){var qe=ee[ee.length-1];qe&&qe.index+qe.length===Se?qe.length++:ee.push({index:Se,length:1})}return ee},[]),Pt=jt.sort(function(ee,fe){return fe.length-ee.length})[0],kt=void 0;if(Pt&&Pt.length>1){var Nt=at.slice(0,Pt.index),Bt=at.slice(Pt.index+Pt.length);kt=Nt.join(":")+"::"+Bt.join(":")}else kt=at.join(":");return pe&&(kt+="%"+pe),kt}else return M}var V=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,B="".match(/(){0}/)[1]===void 0;function Q(M){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F={},W=j.iri!==!1?d:u;j.reference==="suffix"&&(M=(j.scheme?j.scheme+":":"")+"//"+M);var J=M.match(V);if(J){B?(F.scheme=J[1],F.userinfo=J[3],F.host=J[4],F.port=parseInt(J[5],10),F.path=J[6]||"",F.query=J[7],F.fragment=J[8],isNaN(F.port)&&(F.port=J[5])):(F.scheme=J[1]||void 0,F.userinfo=M.indexOf("@")!==-1?J[3]:void 0,F.host=M.indexOf("//")!==-1?J[4]:void 0,F.port=parseInt(J[5],10),F.path=J[6]||"",F.query=M.indexOf("?")!==-1?J[7]:void 0,F.fragment=M.indexOf("#")!==-1?J[8]:void 0,isNaN(F.port)&&(F.port=M.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?J[4]:void 0)),F.host&&(F.host=R(N(F.host,W),W)),F.scheme===void 0&&F.userinfo===void 0&&F.host===void 0&&F.port===void 0&&!F.path&&F.query===void 0?F.reference="same-document":F.scheme===void 0?F.reference="relative":F.fragment===void 0?F.reference="absolute":F.reference="uri",j.reference&&j.reference!=="suffix"&&j.reference!==F.reference&&(F.error=F.error||"URI is not a "+j.reference+" reference.");var pe=H[(j.scheme||F.scheme||"").toLowerCase()];if(!j.unicodeSupport&&(!pe||!pe.unicodeSupport)){if(F.host&&(j.domainHost||pe&&pe.domainHost))try{F.host=A.toASCII(F.host.replace(W.PCT_ENCODED,ae).toLowerCase())}catch(ge){F.error=F.error||"Host's domain name can not be converted to ASCII via punycode: "+ge}ne(F,u)}else ne(F,W);pe&&pe.parse&&pe.parse(F,j)}else F.error=F.error||"URI can not be parsed.";return F}function re(M,j){var F=j.iri!==!1?d:u,W=[];return M.userinfo!==void 0&&(W.push(M.userinfo),W.push("@")),M.host!==void 0&&W.push(R(N(String(M.host),F),F).replace(F.IPV6ADDRESS,function(J,pe,ge){return"["+pe+(ge?"%25"+ge:"")+"]"})),(typeof M.port=="number"||typeof M.port=="string")&&(W.push(":"),W.push(String(M.port))),W.length?W.join(""):void 0}var be=/^\.\.?\//,Ve=/^\/\.(\/|$)/,Te=/^\/\.\.(\/|$)/,je=/^\/?(?:.|\n)*?(?=\/|$)/;function _e(M){for(var j=[];M.length;)if(M.match(be))M=M.replace(be,"");else if(M.match(Ve))M=M.replace(Ve,"/");else if(M.match(Te))M=M.replace(Te,"/"),j.pop();else if(M==="."||M==="..")M="";else{var F=M.match(je);if(F){var W=F[0];M=M.slice(W.length),j.push(W)}else throw new Error("Unexpected dot segment condition")}return j.join("")}function xe(M){var j=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=j.iri?d:u,W=[],J=H[(j.scheme||M.scheme||"").toLowerCase()];if(J&&J.serialize&&J.serialize(M,j),M.host&&!F.IPV6ADDRESS.test(M.host)){if(j.domainHost||J&&J.domainHost)try{M.host=j.iri?A.toUnicode(M.host):A.toASCII(M.host.replace(F.PCT_ENCODED,ae).toLowerCase())}catch(De){M.error=M.error||"Host's domain name can not be converted to "+(j.iri?"Unicode":"ASCII")+" via punycode: "+De}}ne(M,F),j.reference!=="suffix"&&M.scheme&&(W.push(M.scheme),W.push(":"));var pe=re(M,j);if(pe!==void 0&&(j.reference!=="suffix"&&W.push("//"),W.push(pe),M.path&&M.path.charAt(0)!=="/"&&W.push("/")),M.path!==void 0){var ge=M.path;!j.absolutePath&&(!J||!J.absolutePath)&&(ge=_e(ge)),pe===void 0&&(ge=ge.replace(/^\/\//,"/%2F")),W.push(ge)}return M.query!==void 0&&(W.push("?"),W.push(M.query)),M.fragment!==void 0&&(W.push("#"),W.push(M.fragment)),W.join("")}function Ie(M,j){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},W=arguments[3],J={};return W||(M=Q(xe(M,F),F),j=Q(xe(j,F),F)),F=F||{},!F.tolerant&&j.scheme?(J.scheme=j.scheme,J.userinfo=j.userinfo,J.host=j.host,J.port=j.port,J.path=_e(j.path||""),J.query=j.query):(j.userinfo!==void 0||j.host!==void 0||j.port!==void 0?(J.userinfo=j.userinfo,J.host=j.host,J.port=j.port,J.path=_e(j.path||""),J.query=j.query):(j.path?(j.path.charAt(0)==="/"?J.path=_e(j.path):((M.userinfo!==void 0||M.host!==void 0||M.port!==void 0)&&!M.path?J.path="/"+j.path:M.path?J.path=M.path.slice(0,M.path.lastIndexOf("/")+1)+j.path:J.path=j.path,J.path=_e(J.path)),J.query=j.query):(J.path=M.path,j.query!==void 0?J.query=j.query:J.query=M.query),J.userinfo=M.userinfo,J.host=M.host,J.port=M.port),J.scheme=M.scheme),J.fragment=j.fragment,J}function yt(M,j,F){var W=a({scheme:"null"},F);return xe(Ie(Q(M,W),Q(j,W),W,!0),W)}function st(M,j){return typeof M=="string"?M=xe(Q(M,j),j):o(M)==="object"&&(M=Q(xe(M,j),j)),M}function mt(M,j,F){return typeof M=="string"?M=xe(Q(M,F),F):o(M)==="object"&&(M=xe(M,F)),typeof j=="string"?j=xe(Q(j,F),F):o(j)==="object"&&(j=xe(j,F)),M===j}function Et(M,j){return M&&M.toString().replace(!j||!j.iri?u.ESCAPE:d.ESCAPE,x)}function ct(M,j){return M&&M.toString().replace(!j||!j.iri?u.PCT_ENCODED:d.PCT_ENCODED,ae)}var $t={scheme:"http",domainHost:!0,parse:function(j,F){return j.host||(j.error=j.error||"HTTP URIs must have a host."),j},serialize:function(j,F){var W=String(j.scheme).toLowerCase()==="https";return(j.port===(W?443:80)||j.port==="")&&(j.port=void 0),j.path||(j.path="/"),j}},ir={scheme:"https",domainHost:$t.domainHost,parse:$t.parse,serialize:$t.serialize};function ar(M){return typeof M.secure=="boolean"?M.secure:String(M.scheme).toLowerCase()==="wss"}var zt={scheme:"ws",domainHost:!0,parse:function(j,F){var W=j;return W.secure=ar(W),W.resourceName=(W.path||"/")+(W.query?"?"+W.query:""),W.path=void 0,W.query=void 0,W},serialize:function(j,F){if((j.port===(ar(j)?443:80)||j.port==="")&&(j.port=void 0),typeof j.secure=="boolean"&&(j.scheme=j.secure?"wss":"ws",j.secure=void 0),j.resourceName){var W=j.resourceName.split("?"),J=w(W,2),pe=J[0],ge=J[1];j.path=pe&&pe!=="/"?pe:void 0,j.query=ge,j.resourceName=void 0}return j.fragment=void 0,j}},dr={scheme:"wss",domainHost:zt.domainHost,parse:zt.parse,serialize:zt.serialize},bn={},kr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",St="[0-9A-Fa-f]",hr=s(s("%[EFef]"+St+"%"+St+St+"%"+St+St)+"|"+s("%[89A-Fa-f]"+St+"%"+St+St)+"|"+s("%"+St+St)),Or="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Nr="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",$n=n(Nr,'[\\"\\\\]'),Tr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Jt=new RegExp(kr,"g"),L=new RegExp(hr,"g"),Y=new RegExp(n("[^]",Or,"[\\.]",'[\\"]',$n),"g"),se=new RegExp(n("[^]",kr,Tr),"g"),$e=se;function Ze(M){var j=ae(M);return j.match(Jt)?j:M}var tt={scheme:"mailto",parse:function(j,F){var W=j,J=W.to=W.path?W.path.split(","):[];if(W.path=void 0,W.query){for(var pe=!1,ge={},De=W.query.split("&"),Je=0,rt=De.length;Je<rt;++Je){var ke=De[Je].split("=");switch(ke[0]){case"to":for(var Ke=ke[1].split(","),it=0,Ee=Ke.length;it<Ee;++it)J.push(Ke[it]);break;case"subject":W.subject=ct(ke[1],F);break;case"body":W.body=ct(ke[1],F);break;default:pe=!0,ge[ct(ke[0],F)]=ct(ke[1],F);break}}pe&&(W.headers=ge)}W.query=void 0;for(var Ue=0,at=J.length;Ue<at;++Ue){var Qe=J[Ue].split("@");if(Qe[0]=ct(Qe[0]),F.unicodeSupport)Qe[1]=ct(Qe[1],F).toLowerCase();else try{Qe[1]=A.toASCII(ct(Qe[1],F).toLowerCase())}catch(jt){W.error=W.error||"Email address's domain name can not be converted to ASCII via punycode: "+jt}J[Ue]=Qe.join("@")}return W},serialize:function(j,F){var W=j,J=l(j.to);if(J){for(var pe=0,ge=J.length;pe<ge;++pe){var De=String(J[pe]),Je=De.lastIndexOf("@"),rt=De.slice(0,Je).replace(L,Ze).replace(L,i).replace(Y,x),ke=De.slice(Je+1);try{ke=F.iri?A.toUnicode(ke):A.toASCII(ct(ke,F).toLowerCase())}catch(Ue){W.error=W.error||"Email address's domain name can not be converted to "+(F.iri?"Unicode":"ASCII")+" via punycode: "+Ue}J[pe]=rt+"@"+ke}W.path=J.join(",")}var Ke=j.headers=j.headers||{};j.subject&&(Ke.subject=j.subject),j.body&&(Ke.body=j.body);var it=[];for(var Ee in Ke)Ke[Ee]!==bn[Ee]&&it.push(Ee.replace(L,Ze).replace(L,i).replace(se,x)+"="+Ke[Ee].replace(L,Ze).replace(L,i).replace($e,x));return it.length&&(W.query=it.join("&")),W}},he=/^([^\:]+)\:(.*)/,ue={scheme:"urn",parse:function(j,F){var W=j.path&&j.path.match(he),J=j;if(W){var pe=F.scheme||J.scheme||"urn",ge=W[1].toLowerCase(),De=W[2],Je=pe+":"+(F.nid||ge),rt=H[Je];J.nid=ge,J.nss=De,J.path=void 0,rt&&(J=rt.parse(J,F))}else J.error=J.error||"URN can not be parsed.";return J},serialize:function(j,F){var W=F.scheme||j.scheme||"urn",J=j.nid,pe=W+":"+(F.nid||J),ge=H[pe];ge&&(j=ge.serialize(j,F));var De=j,Je=j.nss;return De.path=(J||F.nid)+":"+Je,De}},we=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,ut={scheme:"urn:uuid",parse:function(j,F){var W=j;return W.uuid=W.nss,W.nss=void 0,!F.tolerant&&(!W.uuid||!W.uuid.match(we))&&(W.error=W.error||"UUID is not valid."),W},serialize:function(j,F){var W=j;return W.nss=(j.uuid||"").toLowerCase(),W}};H[$t.scheme]=$t,H[ir.scheme]=ir,H[zt.scheme]=zt,H[dr.scheme]=dr,H[tt.scheme]=tt,H[ue.scheme]=ue,H[ut.scheme]=ut,r.SCHEMES=H,r.pctEncChar=x,r.pctDecChars=ae,r.parse=Q,r.removeDotSegments=_e,r.serialize=xe,r.resolveComponents=Ie,r.resolve=yt,r.normalize=st,r.equal=mt,r.escapeComponent=Et,r.unescapeComponent=ct,Object.defineProperty(r,"__esModule",{value:!0})})}),ju=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ms();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),Mu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=pn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return e.KeywordCxt}});var r=Ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});var n=ds(),s=hs(),o=Ki(),i=ps(),l=Ae(),a=hn(),f=tn(),u=ze(),d=Au(),w=ju(),P=(z,T)=>new RegExp(z,T);P.code="new RegExp";var $=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),m={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},c={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function p(z){var T,U,I,y,k,A,H,x,ae,ne,ve,N,R,V,B,Q,re,be,Ve,Te,je,_e,xe,Ie,yt;const st=z.strict,mt=(T=z.code)===null||T===void 0?void 0:T.optimize,Et=mt===!0||mt===void 0?1:mt||0,ct=(I=(U=z.code)===null||U===void 0?void 0:U.regExp)!==null&&I!==void 0?I:P,$t=(y=z.uriResolver)!==null&&y!==void 0?y:w.default;return{strictSchema:(A=(k=z.strictSchema)!==null&&k!==void 0?k:st)!==null&&A!==void 0?A:!0,strictNumbers:(x=(H=z.strictNumbers)!==null&&H!==void 0?H:st)!==null&&x!==void 0?x:!0,strictTypes:(ne=(ae=z.strictTypes)!==null&&ae!==void 0?ae:st)!==null&&ne!==void 0?ne:"log",strictTuples:(N=(ve=z.strictTuples)!==null&&ve!==void 0?ve:st)!==null&&N!==void 0?N:"log",strictRequired:(V=(R=z.strictRequired)!==null&&R!==void 0?R:st)!==null&&V!==void 0?V:!1,code:z.code?{...z.code,optimize:Et,regExp:ct}:{optimize:Et,regExp:ct},loopRequired:(B=z.loopRequired)!==null&&B!==void 0?B:_,loopEnum:(Q=z.loopEnum)!==null&&Q!==void 0?Q:_,meta:(re=z.meta)!==null&&re!==void 0?re:!0,messages:(be=z.messages)!==null&&be!==void 0?be:!0,inlineRefs:(Ve=z.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Te=z.schemaId)!==null&&Te!==void 0?Te:"$id",addUsedSchema:(je=z.addUsedSchema)!==null&&je!==void 0?je:!0,validateSchema:(_e=z.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=z.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=z.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=z.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:$t}}class v{constructor(T={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,T=this.opts={...T,...p(T)};const{es5:U,lines:I}=this.opts.code;this.scope=new l.ValueScope({scope:{},prefixes:E,es5:U,lines:I}),this.logger=q(T.logger);const y=T.validateFormats;T.validateFormats=!1,this.RULES=(0,o.getRules)(),b.call(this,m,T,"NOT SUPPORTED"),b.call(this,c,T,"DEPRECATED","warn"),this._metaOpts=C.call(this),T.formats&&S.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),T.keywords&&O.call(this,T.keywords),typeof T.meta=="object"&&this.addMetaSchema(T.meta),h.call(this),T.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:T,meta:U,schemaId:I}=this.opts;let y=d;I==="id"&&(y={...d},y.id=y.$id,delete y.$id),U&&T&&this.addMetaSchema(y,y[I],!1)}defaultMeta(){const{meta:T,schemaId:U}=this.opts;return this.opts.defaultMeta=typeof T=="object"?T[U]||T:void 0}validate(T,U){let I;if(typeof T=="string"){if(I=this.getSchema(T),!I)throw new Error(`no schema with key or ref "${T}"`)}else I=this.compile(T);const y=I(U);return"$async"in I||(this.errors=I.errors),y}compile(T,U){const I=this._addSchema(T,U);return I.validate||this._compileSchemaEnv(I)}compileAsync(T,U){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:I}=this.opts;return y.call(this,T,U);async function y(ne,ve){await k.call(this,ne.$schema);const N=this._addSchema(ne,ve);return N.validate||A.call(this,N)}async function k(ne){ne&&!this.getSchema(ne)&&await y.call(this,{$ref:ne},!0)}async function A(ne){try{return this._compileSchemaEnv(ne)}catch(ve){if(!(ve instanceof s.default))throw ve;return H.call(this,ve),await x.call(this,ve.missingSchema),A.call(this,ne)}}function H({missingSchema:ne,missingRef:ve}){if(this.refs[ne])throw new Error(`AnySchema ${ne} is loaded but ${ve} cannot be resolved`)}async function x(ne){const ve=await ae.call(this,ne);this.refs[ne]||await k.call(this,ve.$schema),this.refs[ne]||this.addSchema(ve,ne,U)}async function ae(ne){const ve=this._loading[ne];if(ve)return ve;try{return await(this._loading[ne]=I(ne))}finally{delete this._loading[ne]}}}addSchema(T,U,I,y=this.opts.validateSchema){if(Array.isArray(T)){for(const A of T)this.addSchema(A,void 0,I,y);return this}let k;if(typeof T=="object"){const{schemaId:A}=this.opts;if(k=T[A],k!==void 0&&typeof k!="string")throw new Error(`schema ${A} must be string`)}return U=(0,a.normalizeId)(U||k),this._checkUnique(U),this.schemas[U]=this._addSchema(T,I,U,y,!0),this}addMetaSchema(T,U,I=this.opts.validateSchema){return this.addSchema(T,U,!0,I),this}validateSchema(T,U){if(typeof T=="boolean")return!0;let I;if(I=T.$schema,I!==void 0&&typeof I!="string")throw new Error("$schema must be a string");if(I=I||this.opts.defaultMeta||this.defaultMeta(),!I)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(I,T);if(!y&&U){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return y}getSchema(T){let U;for(;typeof(U=g.call(this,T))=="string";)T=U;if(U===void 0){const{schemaId:I}=this.opts,y=new i.SchemaEnv({schema:{},schemaId:I});if(U=i.resolveSchema.call(this,y,T),!U)return;this.refs[T]=U}return U.validate||this._compileSchemaEnv(U)}removeSchema(T){if(T instanceof RegExp)return this._removeAllSchemas(this.schemas,T),this._removeAllSchemas(this.refs,T),this;switch(typeof T){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const U=g.call(this,T);return typeof U=="object"&&this._cache.delete(U.schema),delete this.schemas[T],delete this.refs[T],this}case"object":{const U=T;this._cache.delete(U);let I=T[this.opts.schemaId];return I&&(I=(0,a.normalizeId)(I),delete this.schemas[I],delete this.refs[I]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(T){for(const U of T)this.addKeyword(U);return this}addKeyword(T,U){let I;if(typeof T=="string")I=T,typeof U=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),U.keyword=I);else if(typeof T=="object"&&U===void 0){if(U=T,I=U.keyword,Array.isArray(I)&&!I.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,I,U),!U)return(0,u.eachItem)(I,k=>Z.call(this,k)),this;ye.call(this,U);const y={...U,type:(0,f.getJSONTypes)(U.type),schemaType:(0,f.getJSONTypes)(U.schemaType)};return(0,u.eachItem)(I,y.type.length===0?k=>Z.call(this,k,y):k=>y.type.forEach(A=>Z.call(this,k,y,A))),this}getKeyword(T){const U=this.RULES.all[T];return typeof U=="object"?U.definition:!!U}removeKeyword(T){const{RULES:U}=this;delete U.keywords[T],delete U.all[T];for(const I of U.rules){const y=I.rules.findIndex(k=>k.keyword===T);y>=0&&I.rules.splice(y,1)}return this}addFormat(T,U){return typeof U=="string"&&(U=new RegExp(U)),this.formats[T]=U,this}errorsText(T=this.errors,{separator:U=", ",dataVar:I="data"}={}){return!T||T.length===0?"No errors":T.map(y=>`${I}${y.instancePath} ${y.message}`).reduce((y,k)=>y+U+k)}$dataMetaSchema(T,U){const I=this.RULES.all;T=JSON.parse(JSON.stringify(T));for(const y of U){const k=y.split("/").slice(1);let A=T;for(const H of k)A=A[H];for(const H in I){const x=I[H];if(typeof x!="object")continue;const{$data:ae}=x.definition,ne=A[H];ae&&ne&&(A[H]=ie(ne))}}return T}_removeAllSchemas(T,U){for(const I in T){const y=T[I];(!U||U.test(I))&&(typeof y=="string"?delete T[I]:y&&!y.meta&&(this._cache.delete(y.schema),delete T[I]))}}_addSchema(T,U,I,y=this.opts.validateSchema,k=this.opts.addUsedSchema){let A;const{schemaId:H}=this.opts;if(typeof T=="object")A=T[H];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof T!="boolean")throw new Error("schema must be object or boolean")}let x=this._cache.get(T);if(x!==void 0)return x;I=(0,a.normalizeId)(A||I);const ae=a.getSchemaRefs.call(this,T,I);return x=new i.SchemaEnv({schema:T,schemaId:H,meta:U,baseId:I,localRefs:ae}),this._cache.set(x.schema,x),k&&!I.startsWith("#")&&(I&&this._checkUnique(I),this.refs[I]=x),y&&this.validateSchema(T,!0),x}_checkUnique(T){if(this.schemas[T]||this.refs[T])throw new Error(`schema with key or id "${T}" already exists`)}_compileSchemaEnv(T){if(T.meta?this._compileMetaSchema(T):i.compileSchema.call(this,T),!T.validate)throw new Error("ajv implementation error");return T.validate}_compileMetaSchema(T){const U=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,T)}finally{this.opts=U}}}t.default=v,v.ValidationError=n.default,v.MissingRefError=s.default;function b(z,T,U,I="error"){for(const y in z){const k=y;k in T&&this.logger[I](`${U}: option ${y}. ${z[k]}`)}}function g(z){return z=(0,a.normalizeId)(z),this.schemas[z]||this.refs[z]}function h(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const T in z)this.addSchema(z[T],T)}function S(){for(const z in this.opts.formats){const T=this.opts.formats[z];T&&this.addFormat(z,T)}}function O(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const T in z){const U=z[T];U.keyword||(U.keyword=T),this.addKeyword(U)}}function C(){const z={...this.opts};for(const T of $)delete z[T];return z}var D={log(){},warn(){},error(){}};function q(z){if(z===!1)return D;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}var X=/^[a-z_$][a-z0-9_$:-]*$/i;function G(z,T){const{RULES:U}=this;if((0,u.eachItem)(z,I=>{if(U.keywords[I])throw new Error(`Keyword ${I} is already defined`);if(!X.test(I))throw new Error(`Keyword ${I} has invalid name`)}),!!T&&T.$data&&!("code"in T||"validate"in T))throw new Error('$data keyword must have "code" or "validate" function')}function Z(z,T,U){var I;const y=T==null?void 0:T.post;if(U&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let A=y?k.post:k.rules.find(({type:x})=>x===U);if(A||(A={type:U,rules:[]},k.rules.push(A)),k.keywords[z]=!0,!T)return;const H={keyword:z,definition:{...T,type:(0,f.getJSONTypes)(T.type),schemaType:(0,f.getJSONTypes)(T.schemaType)}};T.before?ce.call(this,A,H,T.before):A.rules.push(H),k.all[z]=H,(I=T.implements)===null||I===void 0||I.forEach(x=>this.addKeyword(x))}function ce(z,T,U){const I=z.rules.findIndex(y=>y.keyword===U);I>=0?z.rules.splice(I,0,T):(z.rules.push(T),this.logger.warn(`rule ${U} is not defined`))}function ye(z){let{metaSchema:T}=z;T!==void 0&&(z.$data&&this.opts.$data&&(T=ie(T)),z.validateSchema=this.compile(T,!0))}var Re={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function ie(z){return{anyOf:[z,Re]}}}),Du=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=e}),qu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=hs(),r=At(),n=Ae(),s=er(),o=ps(),i=ze(),l={keyword:"$ref",schemaType:"string",code(u){const{gen:d,schema:w,it:P}=u,{baseId:$,schemaEnv:E,validateName:m,opts:c,self:_}=P,{root:p}=E;if((w==="#"||w==="#/")&&$===p.baseId)return b();const v=o.resolveRef.call(_,p,$,w);if(v===void 0)throw new e.default(P.opts.uriResolver,$,w);if(v instanceof o.SchemaEnv)return g(v);return h(v);function b(){if(E===p)return f(u,m,E,E.$async);const S=d.scopeValue("root",{ref:p});return f(u,(0,n._)`${S}.validate`,p,p.$async)}function g(S){const O=a(u,S);f(u,O,S,S.$async)}function h(S){const O=d.scopeValue("schema",c.code.source===!0?{ref:S,code:(0,n.stringify)(S)}:{ref:S}),C=d.name("valid"),D=u.subschema({schema:S,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},C);u.mergeEvaluated(D),u.ok(C)}}};function a(u,d){const{gen:w}=u;return d.validate?w.scopeValue("validate",{ref:d.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:d})}.validate`}t.getValidate=a;function f(u,d,w,P){const{gen:$,it:E}=u,{allErrors:m,schemaEnv:c,opts:_}=E,p=_.passContext?s.default.this:n.nil;P?v():b();function v(){if(!c.$async)throw new Error("async schema referenced by sync schema");const S=$.let("valid");$.try(()=>{$.code((0,n._)`await ${(0,r.callValidateCode)(u,d,p)}`),h(d),m||$.assign(S,!0)},O=>{$.if((0,n._)`!(${O} instanceof ${E.ValidationError})`,()=>$.throw(O)),g(O),m||$.assign(S,!1)}),u.ok(S)}function b(){u.result((0,r.callValidateCode)(u,d,p),()=>h(d),()=>g(d))}function g(S){const O=(0,n._)`${S}.errors`;$.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),$.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function h(S){var O;if(!E.opts.unevaluated)return;const C=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(E.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(E.props=i.mergeEvaluated.props($,C.props,E.props));else{const D=$.var("props",(0,n._)`${S}.evaluated.props`);E.props=i.mergeEvaluated.props($,D,E.props,n.Name)}if(E.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(E.items=i.mergeEvaluated.items($,C.items,E.items));else{const D=$.var("items",(0,n._)`${S}.evaluated.items`);E.items=i.mergeEvaluated.items($,D,E.items,n.Name)}}}t.callRef=f,t.default=l}),Lu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Du(),r=qu(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),Vu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=e.operators,n={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},s={message:({keyword:i,schemaCode:l})=>(0,e.str)`must be ${n[i].okStr} ${l}`,params:({keyword:i,schemaCode:l})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${l}}`},o={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:l,data:a,schemaCode:f}=i;i.fail$data((0,e._)`${a} ${n[l].fail} ${f} || isNaN(${a})`)}};t.default=o}),Uu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r={message:({schemaCode:s})=>(0,e.str)`must be multiple of ${s}`,params:({schemaCode:s})=>(0,e._)`{multipleOf: ${s}}`},n={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:r,code(s){const{gen:o,data:i,schemaCode:l,it:a}=s,f=a.opts.multipleOfPrecision,u=o.let("res"),d=f?(0,e._)`Math.abs(Math.round(${u}) - ${u}) > 1e-${f}`:(0,e._)`${u} !== parseInt(${u})`;s.fail$data((0,e._)`(${l} === 0 || (${u} = ${i}/${l}, ${d}))`)}};t.default=n}),Fu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,o=0,i;for(;o<n;)s++,i=r.charCodeAt(o++),i>=55296&&i<=56319&&o<n&&(i=r.charCodeAt(o),(i&64512)===56320&&o++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),zu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n=Fu(),s={message({keyword:i,schemaCode:l}){const a=i==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${a} than ${l} characters`},params:({schemaCode:i})=>(0,e._)`{limit: ${i}}`},o={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:l,data:a,schemaCode:f,it:u}=i,d=l==="maxLength"?e.operators.GT:e.operators.LT,w=u.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${d} ${f}`)}};t.default=o}),Bu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ae(),n={message:({schemaCode:o})=>(0,r.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,r._)`{pattern: ${o}}`},s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(o){const{data:i,$data:l,schema:a,schemaCode:f,it:u}=o,d=u.opts.unicodeRegExp?"u":"",w=l?(0,r._)`(new RegExp(${f}, ${d}))`:(0,e.usePattern)(o,a);o.fail$data((0,r._)`!${w}.test(${i})`)}};t.default=s}),xu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r={message({keyword:s,schemaCode:o}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:l}=s,a=o==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${l}`)}};t.default=n}),Hu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ae(),n=ze(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},o={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:l,schema:a,schemaCode:f,data:u,$data:d,it:w}=i,{opts:P}=w;if(!d&&a.length===0)return;const $=a.length>=P.loopRequired;if(w.allErrors?E():m(),P.strictRequired){const p=i.parentSchema.properties,{definedProperties:v}=i.it;for(const b of a)if((p==null?void 0:p[b])===void 0&&!v.has(b)){const g=w.schemaEnv.baseId+w.errSchemaPath,h=`required property "${b}" is not defined at "${g}" (strictRequired)`;(0,n.checkStrictMode)(w,h,w.opts.strictRequired)}}function E(){if($||d)i.block$data(r.nil,c);else for(const p of a)(0,e.checkReportMissingProp)(i,p)}function m(){const p=l.let("missing");if($||d){const v=l.let("valid",!0);i.block$data(v,()=>_(p,v)),i.ok(v)}else l.if((0,e.checkMissingProp)(i,a,p)),(0,e.reportMissingProp)(i,p),l.else()}function c(){l.forOf("prop",f,p=>{i.setParams({missingProperty:p}),l.if((0,e.noPropertyInData)(l,u,p,P.ownProperties),()=>i.error())})}function _(p,v){i.setParams({missingProperty:p}),l.forOf(p,f,()=>{l.assign(v,(0,e.propertyInData)(l,u,p,P.ownProperties)),l.if((0,r.not)(v),()=>{i.error(),l.break()})},r.nil)}}};t.default=o}),Ku=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r={message({keyword:s,schemaCode:o}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${o} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:o,data:i,schemaCode:l}=s,a=o==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${l}`)}};t.default=n}),gs=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=cn();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),Gu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=tn(),r=Ae(),n=ze(),s=gs(),o={message:({params:{i:l,j:a}})=>(0,r.str)`must NOT have duplicate items (items ## ${a} and ${l} are identical)`,params:({params:{i:l,j:a}})=>(0,r._)`{i: ${l}, j: ${a}}`},i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:o,code(l){const{gen:a,data:f,$data:u,schema:d,parentSchema:w,schemaCode:P,it:$}=l;if(!u&&!d)return;const E=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];l.block$data(E,c,(0,r._)`${P} === false`),l.ok(E);function c(){const b=a.let("i",(0,r._)`${f}.length`),g=a.let("j");l.setParams({i:b,j:g}),a.assign(E,!0),a.if((0,r._)`${b} > 1`,()=>(_()?p:v)(b,g))}function _(){return m.length>0&&!m.some(b=>b==="object"||b==="array")}function p(b,g){const h=a.name("item"),S=(0,e.checkDataTypes)(m,h,$.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${b}--;`,()=>{a.let(h,(0,r._)`${f}[${b}]`),a.if(S,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${h} == "string"`,(0,r._)`${h} += "_"`),a.if((0,r._)`typeof ${O}[${h}] == "number"`,()=>{a.assign(g,(0,r._)`${O}[${h}]`),l.error(),a.assign(E,!1).break()}).code((0,r._)`${O}[${h}] = ${b}`)})}function v(b,g){const h=(0,n.useFunc)(a,s.default),S=a.name("outer");a.label(S).for((0,r._)`;${b}--;`,()=>a.for((0,r._)`${g} = ${b}; ${g}--;`,()=>a.if((0,r._)`${h}(${f}[${b}], ${f}[${g}])`,()=>{l.error(),a.assign(E,!1).break(S)})))}}};t.default=i}),Wu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n=gs(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},o={keyword:"const",$data:!0,error:s,code(i){const{gen:l,data:a,$data:f,schemaCode:u,schema:d}=i;f||d&&typeof d=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(l,n.default)}(${a}, ${u})`):i.fail((0,e._)`${d} !== ${a}`)}};t.default=o}),Ju=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n=gs(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},o={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:l,data:a,$data:f,schema:u,schemaCode:d,it:w}=i;if(!f&&u.length===0)throw new Error("enum must have non-empty array");const P=u.length>=w.opts.loopEnum;let $;const E=()=>$??($=(0,r.useFunc)(l,n.default));let m;if(P||f)m=l.let("valid"),i.block$data(m,c);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const p=l.const("vSchema",d);m=(0,e.or)(...u.map((v,b)=>_(p,b)))}i.pass(m);function c(){l.assign(m,!1),l.forOf("v",d,p=>l.if((0,e._)`${E()}(${a}, ${p})`,()=>l.assign(m,!0).break()))}function _(p,v){const b=u[v];return typeof b=="object"&&b!==null?(0,e._)`${E()}(${a}, ${p}[${v}])`:(0,e._)`${a} === ${b}`}}};t.default=o}),Qu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Vu(),r=Uu(),n=zu(),s=Bu(),o=xu(),i=Hu(),l=Ku(),a=Gu(),f=Wu(),u=Ju(),d=[e.default,r.default,n.default,s.default,o.default,i.default,l.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},f.default,u.default];t.default=d}),Wi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ae(),r=ze(),n={message:({params:{len:i}})=>(0,e.str)`must NOT have more than ${i} items`,params:({params:{len:i}})=>(0,e._)`{limit: ${i}}`},s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:n,code(i){const{parentSchema:l,it:a}=i,{items:f}=l;if(!Array.isArray(f)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}o(i,f)}};function o(i,l){const{gen:a,schema:f,data:u,keyword:d,it:w}=i;w.items=!0;const P=a.const("len",(0,e._)`${u}.length`);if(f===!1)i.setParams({len:l.length}),i.pass((0,e._)`${P} <= ${l.length}`);else if(typeof f=="object"&&!(0,r.alwaysValidSchema)(w,f)){const E=a.var("valid",(0,e._)`${P} <= ${l.length}`);a.if((0,e.not)(E),()=>$(E)),i.ok(E)}function $(E){a.forRange("i",l.length,P,m=>{i.subschema({keyword:d,dataProp:m,dataPropType:r.Type.Num},E),w.allErrors||a.if((0,e.not)(E),()=>a.break())})}}t.validateAdditionalItems=o,t.default=s}),Ji=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ae(),r=ze(),n=At(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:l,it:a}=i;if(Array.isArray(l))return o(i,"additionalItems",l);a.items=!0,!(0,r.alwaysValidSchema)(a,l)&&i.ok((0,n.validateArray)(i))}};function o(i,l,a=i.schema){const{gen:f,parentSchema:u,data:d,keyword:w,it:P}=i;m(u),P.opts.unevaluated&&a.length&&P.items!==!0&&(P.items=r.mergeEvaluated.items(f,a.length,P.items));const $=f.name("valid"),E=f.const("len",(0,e._)`${d}.length`);a.forEach((c,_)=>{(0,r.alwaysValidSchema)(P,c)||(f.if((0,e._)`${E} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},$)),i.ok($))});function m(c){const{opts:_,errSchemaPath:p}=P,v=a.length,b=v===c.minItems&&(v===c.maxItems||c[l]===!1);if(_.strictTuples&&!b){const g=`"${w}" is ${v}-tuple, but minItems or maxItems/${l} are not specified or different at path "${p}"`;(0,r.checkStrictMode)(P,g,_.strictTuples)}}}t.validateTuple=o,t.default=s}),Xu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ji(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),Yu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n=At(),s=Wi(),o={message:({params:{len:l}})=>(0,e.str)`must NOT have more than ${l} items`,params:({params:{len:l}})=>(0,e._)`{limit: ${l}}`},i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:o,code(l){const{schema:a,parentSchema:f,it:u}=l,{prefixItems:d}=f;u.items=!0,!(0,r.alwaysValidSchema)(u,a)&&(d?(0,s.validateAdditionalItems)(l,d):l.ok((0,n.validateArray)(l)))}};t.default=i}),Zu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n={message:({params:{min:o,max:i}})=>i===void 0?(0,e.str)`must contain at least ${o} valid item(s)`:(0,e.str)`must contain at least ${o} and no more than ${i} valid item(s)`,params:({params:{min:o,max:i}})=>i===void 0?(0,e._)`{minContains: ${o}}`:(0,e._)`{minContains: ${o}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(o){const{gen:i,schema:l,parentSchema:a,data:f,it:u}=o;let d,w;const{minContains:P,maxContains:$}=a;u.opts.next?(d=P===void 0?1:P,w=$):d=1;const E=i.const("len",(0,e._)`${f}.length`);if(o.setParams({min:d,max:w}),w===void 0&&d===0){(0,r.checkStrictMode)(u,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&d>w){(0,r.checkStrictMode)(u,'"minContains" > "maxContains" is always invalid'),o.fail();return}if((0,r.alwaysValidSchema)(u,l)){let v=(0,e._)`${E} >= ${d}`;w!==void 0&&(v=(0,e._)`${v} && ${E} <= ${w}`),o.pass(v);return}u.items=!0;const m=i.name("valid");w===void 0&&d===1?_(m,()=>i.if(m,()=>i.break())):d===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${f}.length > 0`,c)):(i.let(m,!1),c()),o.result(m,()=>o.reset());function c(){const v=i.name("_valid"),b=i.let("count",0);_(v,()=>i.if(v,()=>p(b)))}function _(v,b){i.forRange("i",0,E,g=>{o.subschema({keyword:"contains",dataProp:g,dataPropType:r.Type.Num,compositeRule:!0},v),b()})}function p(v){i.code((0,e._)`${v}++`),w===void 0?i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${v} > ${w}`,()=>i.assign(m,!1).break()),d===1?i.assign(m,!0):i.if((0,e._)`${v} >= ${d}`,()=>i.assign(m,!0)))}}};t.default=s}),el=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ae(),r=ze(),n=At();t.error={message:({params:{property:a,depsCount:f,deps:u}})=>{const d=f===1?"property":"properties";return(0,e.str)`must have ${d} ${u} when property ${a} is present`},params:({params:{property:a,depsCount:f,deps:u,missingProperty:d}})=>(0,e._)`{property: ${a},
|
|
21
21
|
missingProperty: ${d},
|
|
22
22
|
depsCount: ${f},
|
|
23
|
-
deps: ${l}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,l]=o(a);i(a,f),u(a,l)}};function o({schema:a}){const f={},l={};for(const d in a){if(d==="__proto__")continue;const w=Array.isArray(a[d])?f:l;w[d]=a[d]}return[f,l]}function i(a,f=a.schema){const{gen:l,data:d,it:w}=a;if(Object.keys(f).length===0)return;const P=l.let("missing");for(const $ in f){const E=f[$];if(E.length===0)continue;const m=(0,n.propertyInData)(l,d,$,w.opts.ownProperties);a.setParams({property:$,depsCount:E.length,deps:E.join(", ")}),w.allErrors?l.if(m,()=>{for(const c of E)(0,n.checkReportMissingProp)(a,c)}):(l.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,E,P)})`),(0,n.reportMissingProp)(a,P),l.else())}}t.validatePropertyDeps=i;function u(a,f=a.schema){const{gen:l,data:d,keyword:w,it:P}=a,$=l.name("valid");for(const E in f)(0,r.alwaysValidSchema)(P,f[E])||(l.if((0,n.propertyInData)(l,d,E,P.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:E},$);a.mergeValidEvaluated(m,$)},()=>l.var($,!0)),a.ok($))}t.validateSchemaDeps=u,t.default=s}),Zu=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n={message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(o){const{gen:i,schema:u,data:a,it:f}=o;if((0,r.alwaysValidSchema)(f,u))return;const l=i.name("valid");i.forIn("key",a,d=>{o.setParams({propertyName:d}),o.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},l),i.if((0,e.not)(l),()=>{o.error(!0),f.allErrors||i.break()})}),o.ok(l)}};t.default=s}),Wi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Ce(),n=er(),s=ze(),o={message:"must NOT have additional properties",params:({params:u})=>(0,r._)`{additionalProperty: ${u.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:o,code(u){const{gen:a,schema:f,parentSchema:l,data:d,errsCount:w,it:P}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:$,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,f))return;const m=(0,e.allSchemaProperties)(l.properties),c=(0,e.allSchemaProperties)(l.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",d,h=>{!m.length&&!c.length?b(h):a.if(p(h),()=>b(h))})}function p(h){let S;if(m.length>8){const O=(0,s.schemaRefOrVal)(P,l.properties,"properties");S=(0,e.isOwnProperty)(a,O,h)}else m.length?S=(0,r.or)(...m.map(O=>(0,r._)`${h} === ${O}`)):S=r.nil;return c.length&&(S=(0,r.or)(S,...c.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${h})`))),(0,r.not)(S)}function v(h){a.code((0,r._)`delete ${d}[${h}]`)}function b(h){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){v(h);return}if(f===!1){u.setParams({additionalProperty:h}),u.error(),$||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(P,f)){const S=a.name("valid");E.removeAdditional==="failing"?(g(h,S,!1),a.if((0,r.not)(S),()=>{u.reset(),v(h)})):(g(h,S),$||a.if((0,r.not)(S),()=>a.break()))}}function g(h,S,O){const A={keyword:"additionalProperties",dataProp:h,dataPropType:s.Type.Str};O===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(A,S)}}};t.default=i}),el=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=fn(),r=Ct(),n=ze(),s=Wi(),o={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,parentSchema:f,data:l,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);for(const c of w)d.definedProperties.add(c);d.opts.unevaluated&&w.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(u,(0,n.toHash)(w),d.props));const P=w.filter(c=>!(0,n.alwaysValidSchema)(d,a[c]));if(P.length===0)return;const $=u.name("valid");for(const c of P)E(c)?m(c):(u.if((0,r.propertyInData)(u,l,c,d.opts.ownProperties)),m(c),d.allErrors||u.else().var($,!0),u.endIf()),i.it.definedProperties.add(c),i.ok($);function E(c){return d.opts.useDefaults&&!d.compositeRule&&a[c].default!==void 0}function m(c){i.subschema({keyword:"properties",schemaProp:c,dataProp:c},$)}}};t.default=o}),tl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r=Ce(),n=ze(),s=ze(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,data:f,parentSchema:l,it:d}=i,{opts:w}=d,P=(0,e.allSchemaProperties)(a),$=P.filter(b=>(0,n.alwaysValidSchema)(d,a[b]));if(P.length===0||$.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&l.properties,m=u.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(u,d.props));const{props:c}=d;_();function _(){for(const b of P)E&&p(b),d.allErrors?v(b):(u.var(m,!0),v(b),u.if(m))}function p(b){for(const g in E)new RegExp(b).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${b} (use allowMatchingProperties)`)}function v(b){u.forIn("key",f,g=>{u.if((0,r._)`${(0,e.usePattern)(i,b)}.test(${g})`,()=>{const h=$.includes(b);h||i.subschema({keyword:"patternProperties",schemaProp:b,dataProp:g,dataPropType:s.Type.Str},m),d.opts.unevaluated&&c!==!0?u.assign((0,r._)`${c}[${g}]`,!0):!h&&!d.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=o}),rl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:o,it:i}=n;if((0,e.alwaysValidSchema)(i,o)){n.fail();return}const u=s.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),n.failResult(u,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),nl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ct(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),sl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n={message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(o){const{gen:i,schema:u,parentSchema:a,it:f}=o;if(!Array.isArray(u))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const l=u,d=i.let("valid",!1),w=i.let("passing",null),P=i.name("_valid");o.setParams({passing:w}),i.block($),o.result(d,()=>o.reset(),()=>o.error(!0));function $(){l.forEach((E,m)=>{let c;(0,r.alwaysValidSchema)(f,E)?i.var(P,!0):c=o.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},P),m>0&&i.if((0,e._)`${P} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(P,()=>{i.assign(d,!0),i.assign(w,m),c&&o.mergeEvaluated(c,e.Name)})})}}};t.default=s}),il=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:o,it:i}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const u=s.name("valid");o.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const l=n.subschema({keyword:"allOf",schemaProp:f},u);n.ok(u),n.mergeEvaluated(l)})}};t.default=r}),al=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=ze(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:u,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const l=o(f,"then"),d=o(f,"else");if(!l&&!d)return;const w=u.let("valid",!0),P=u.name("_valid");if($(),i.reset(),l&&d){const m=u.let("ifClause");i.setParams({ifClause:m}),u.if(P,E("then",m),E("else",m))}else l?u.if(P,E("then")):u.if((0,e.not)(P),E("else"));i.pass(w,()=>i.error(!0));function $(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);i.mergeEvaluated(m)}function E(m,c){return()=>{const _=i.subschema({keyword:m},P);u.assign(w,P),i.mergeValidEvaluated(_,w),c?u.assign(c,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function o(i,u){const a=i.schema[u];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),ol=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:o}){s.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};t.default=r}),cl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ki(),r=Ju(),n=Gi(),s=Qu(),o=Xu(),i=Yu(),u=Zu(),a=Wi(),f=el(),l=tl(),d=rl(),w=nl(),P=sl(),$=il(),E=al(),m=ol();function c(_=!1){const p=[d.default,w.default,P.default,$.default,E.default,m.default,u.default,a.default,i.default,f.default,l.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(o.default),p}t.default=c}),ul=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,o){const{gen:i,data:u,$data:a,schema:f,schemaCode:l,it:d}=s,{opts:w,errSchemaPath:P,schemaEnv:$,self:E}=d;if(!w.validateFormats)return;a?m():c();function m(){const _=i.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=i.const("fDef",(0,e._)`${_}[${l}]`),v=i.let("fType"),b=i.let("format");i.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(v,(0,e._)`${p}.type || "string"`).assign(b,(0,e._)`${p}.validate`),()=>i.assign(v,(0,e._)`"string"`).assign(b,p)),s.fail$data((0,e.or)(g(),h()));function g(){return w.strictSchema===!1?e.nil:(0,e._)`${l} && !${b}`}function h(){const S=$.$async?(0,e._)`(${p}.async ? await ${b}(${u}) : ${b}(${u}))`:(0,e._)`${b}(${u})`,O=(0,e._)`(typeof ${b} == "function" ? ${S} : ${b}.test(${u}))`;return(0,e._)`${b} && ${b} !== true && ${v} === ${o} && !${O}`}}function c(){const _=E.formats[f];if(!_){g();return}if(_===!0)return;const[p,v,b]=h(_);p===o&&s.pass(S());function g(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${P}"`}}function h(O){const A=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(f)}`:void 0,D=i.scopeValue("formats",{key:f,ref:O,code:A});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${D}.validate`]:["string",O,D]}function S(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!$.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${u})`}return typeof v=="function"?(0,e._)`${b}(${u})`:(0,e._)`${b}.test(${u})`}}}};t.default=n}),ll=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ul(),r=[e.default];t.default=r}),fl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),dl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Du(),r=Wu(),n=cl(),s=ll(),o=fl(),i=[e.default,r.default,(0,n.default)(),s.default,o.metadataVocabulary,o.contentVocabulary];t.default=i}),hl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))}),pl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ce(),r=hl(),n=hs(),s=ze(),o={message:({params:{discrError:u,tagName:a}})=>u===r.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:u,tag:a,tagName:f}})=>(0,e._)`{error: ${u}, tag: ${f}, tagValue: ${a}}`},i={keyword:"discriminator",type:"object",schemaType:"object",error:o,code(u){const{gen:a,data:f,schema:l,parentSchema:d,it:w}=u,{oneOf:P}=d;if(!w.opts.discriminator)throw new Error("discriminator: requires discriminator option");const $=l.propertyName;if(typeof $!="string")throw new Error("discriminator: requires propertyName");if(l.mapping)throw new Error("discriminator: mapping is not supported");if(!P)throw new Error("discriminator: requires oneOf keyword");const E=a.let("valid",!1),m=a.const("tag",(0,e._)`${f}${(0,e.getProperty)($)}`);a.if((0,e._)`typeof ${m} == "string"`,()=>c(),()=>u.error(!1,{discrError:r.DiscrError.Tag,tag:m,tagName:$})),u.ok(E);function c(){const v=p();a.if(!1);for(const b in v)a.elseIf((0,e._)`${m} === ${b}`),a.assign(E,_(v[b]));a.else(),u.error(!1,{discrError:r.DiscrError.Mapping,tag:m,tagName:$}),a.endIf()}function _(v){const b=a.name("valid"),g=u.subschema({keyword:"oneOf",schemaProp:v},b);return u.mergeEvaluated(g,e.Name),b}function p(){var v;const b={},g=S(d);let h=!0;for(let D=0;D<P.length;D++){let q=P[D];q!=null&&q.$ref&&!(0,s.schemaHasRulesButRef)(q,w.self.RULES)&&(q=n.resolveRef.call(w.self,w.schemaEnv.root,w.baseId,q==null?void 0:q.$ref),q instanceof n.SchemaEnv&&(q=q.schema));const X=(v=q==null?void 0:q.properties)===null||v===void 0?void 0:v[$];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${$}"`);h=h&&(g||S(q)),O(X,D)}if(!h)throw new Error(`discriminator: "${$}" must be required`);return b;function S({required:D}){return Array.isArray(D)&&D.includes($)}function O(D,q){if(D.const)A(D.const,q);else if(D.enum)for(const X of D.enum)A(X,q);else throw new Error(`discriminator: "properties/${$}" must have "const" or "enum"`)}function A(D,q){if(typeof D!="string"||D in b)throw new Error(`discriminator: "${$}" values must be unique strings`);b[D]=q}}}};t.default=i}),ml=K(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),gl=K(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=Cu(),n=dl(),s=pl(),o=ml(),i=["/properties"],u="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(o,i):o;this.addMetaSchema($,u,!1),this.refs["http://json-schema.org/schema"]=u}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(u)?u:void 0)}}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=fn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var l=Ce();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var d=fs();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=ds();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),vl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=gl(),r=Ce(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:u,schemaCode:a})=>r.str`should be ${s[u].okStr} ${a}`,params:({keyword:u,schemaCode:a})=>r._`{comparison: ${s[u].okStr}, limit: ${a}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:o,code(u){const{gen:a,data:f,schemaCode:l,keyword:d,it:w}=u,{opts:P,self:$}=w;if(!P.validateFormats)return;const E=new e.KeywordCxt(w,$.RULES.all.format.definition,"format");E.$data?m():c();function m(){const p=a.scopeValue("formats",{ref:$.formats,code:P.code.formats}),v=a.const("fmt",r._`${p}[${E.schemaCode}]`);u.fail$data(r.or(r._`typeof ${v} != "object"`,r._`${v} instanceof RegExp`,r._`typeof ${v}.compare != "function"`,_(v)))}function c(){const p=E.schema,v=$.formats[p];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${d}": format "${p}" does not define "compare" function`);const b=a.scopeValue("formats",{key:p,ref:v,code:P.code.formats?r._`${P.code.formats}${r.getProperty(p)}`:void 0});u.fail$data(_(b))}function _(p){return r._`${p}.compare(${f}, ${l}) ${s[d].fail} 0`}},dependencies:["format"]};var i=u=>(u.addKeyword(t.formatLimitDefinition),u);t.default=i}),yl=K(function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var r=ku(),n=vl(),s=Ce(),o=new s.Name("fullFormats"),i=new s.Name("fastFormats"),u=(f,l={keywords:!0})=>{if(Array.isArray(l))return a(f,l,r.fullFormats,o),f;const[d,w]=l.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,o],P=l.formats||r.formatNames;return a(f,P,d,w),l.keywords&&n.default(f),f};u.get=(f,l="full")=>{const w=(l==="fast"?r.fastFormats:r.fullFormats)[f];if(!w)throw new Error(`Unknown format "${f}"`);return w};function a(f,l,d,w){var P,$;(P=($=f.opts.code).formats)!==null&&P!==void 0||($.formats=s._`require("ajv-formats/dist/formats").${w}`);for(const E of l)f.addFormat(E,d[E])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u}),_l=K(function(t,e){(function(r,n){typeof e=="object"&&e.exports?e.exports=n():r.nearley=n()})(t,function(){function r(l,d,w){return this.id=++r.highestId,this.name=l,this.symbols=d,this.postprocess=w,this}r.highestId=0,r.prototype.toString=function(l){var d=typeof l>"u"?this.symbols.map(f).join(" "):this.symbols.slice(0,l).map(f).join(" ")+" ● "+this.symbols.slice(l).map(f).join(" ");return this.name+" → "+d};function n(l,d,w,P){this.rule=l,this.dot=d,this.reference=w,this.data=[],this.wantedBy=P,this.isComplete=this.dot===l.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(l){var d=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return d.left=this,d.right=l,d.isComplete&&(d.data=d.build(),d.right=void 0),d},n.prototype.build=function(){var l=[],d=this;do l.push(d.right.data),d=d.left;while(d.left);return l.reverse(),l},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,u.fail))};function s(l,d){this.grammar=l,this.index=d,this.states=[],this.wants={},this.scannable=[],this.completed={}}s.prototype.process=function(l){for(var d=this.states,w=this.wants,P=this.completed,$=0;$<d.length;$++){var E=d[$];if(E.isComplete){if(E.finish(),E.data!==u.fail){for(var m=E.wantedBy,c=m.length;c--;){var _=m[c];this.complete(_,E)}if(E.reference===this.index){var p=E.rule.name;(this.completed[p]=this.completed[p]||[]).push(E)}}}else{var p=E.rule.symbols[E.dot];if(typeof p!="string"){this.scannable.push(E);continue}if(w[p]){if(w[p].push(E),P.hasOwnProperty(p))for(var v=P[p],c=0;c<v.length;c++){var b=v[c];this.complete(E,b)}}else w[p]=[E],this.predict(p)}}},s.prototype.predict=function(l){for(var d=this.grammar.byName[l]||[],w=0;w<d.length;w++){var P=d[w],$=this.wants[l],E=new n(P,0,this.index,$);this.states.push(E)}},s.prototype.complete=function(l,d){var w=l.nextState(d);this.states.push(w)};function o(l,d){this.rules=l,this.start=d||this.rules[0].name;var w=this.byName={};this.rules.forEach(function(P){w.hasOwnProperty(P.name)||(w[P.name]=[]),w[P.name].push(P)})}o.fromCompiled=function(P,d){var w=P.Lexer;P.ParserStart&&(d=P.ParserStart,P=P.ParserRules);var P=P.map(function(E){return new r(E.name,E.symbols,E.postprocess)}),$=new o(P,d);return $.lexer=w,$};function i(){this.reset("")}i.prototype.reset=function(l,d){this.buffer=l,this.index=0,this.line=d?d.line:1,this.lastLineBreak=d?-d.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var l=this.buffer[this.index++];return l===`
|
|
24
|
-
`&&(this.line+=1,this.lastLineBreak=this.index),{value:
|
|
23
|
+
deps: ${u}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[f,u]=o(a);i(a,f),l(a,u)}};function o({schema:a}){const f={},u={};for(const d in a){if(d==="__proto__")continue;const w=Array.isArray(a[d])?f:u;w[d]=a[d]}return[f,u]}function i(a,f=a.schema){const{gen:u,data:d,it:w}=a;if(Object.keys(f).length===0)return;const P=u.let("missing");for(const $ in f){const E=f[$];if(E.length===0)continue;const m=(0,n.propertyInData)(u,d,$,w.opts.ownProperties);a.setParams({property:$,depsCount:E.length,deps:E.join(", ")}),w.allErrors?u.if(m,()=>{for(const c of E)(0,n.checkReportMissingProp)(a,c)}):(u.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,E,P)})`),(0,n.reportMissingProp)(a,P),u.else())}}t.validatePropertyDeps=i;function l(a,f=a.schema){const{gen:u,data:d,keyword:w,it:P}=a,$=u.name("valid");for(const E in f)(0,r.alwaysValidSchema)(P,f[E])||(u.if((0,n.propertyInData)(u,d,E,P.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:E},$);a.mergeValidEvaluated(m,$)},()=>u.var($,!0)),a.ok($))}t.validateSchemaDeps=l,t.default=s}),tl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n={message:"property name must be valid",params:({params:o})=>(0,e._)`{propertyName: ${o.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(o){const{gen:i,schema:l,data:a,it:f}=o;if((0,r.alwaysValidSchema)(f,l))return;const u=i.name("valid");i.forIn("key",a,d=>{o.setParams({propertyName:d}),o.subschema({keyword:"propertyNames",data:d,dataTypes:["string"],propertyName:d,compositeRule:!0},u),i.if((0,e.not)(u),()=>{o.error(!0),f.allErrors||i.break()})}),o.ok(u)}};t.default=s}),Qi=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ae(),n=er(),s=ze(),o={message:"must NOT have additional properties",params:({params:l})=>(0,r._)`{additionalProperty: ${l.additionalProperty}}`},i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:o,code(l){const{gen:a,schema:f,parentSchema:u,data:d,errsCount:w,it:P}=l;if(!w)throw new Error("ajv implementation error");const{allErrors:$,opts:E}=P;if(P.props=!0,E.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(P,f))return;const m=(0,e.allSchemaProperties)(u.properties),c=(0,e.allSchemaProperties)(u.patternProperties);_(),l.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",d,h=>{!m.length&&!c.length?b(h):a.if(p(h),()=>b(h))})}function p(h){let S;if(m.length>8){const O=(0,s.schemaRefOrVal)(P,u.properties,"properties");S=(0,e.isOwnProperty)(a,O,h)}else m.length?S=(0,r.or)(...m.map(O=>(0,r._)`${h} === ${O}`)):S=r.nil;return c.length&&(S=(0,r.or)(S,...c.map(O=>(0,r._)`${(0,e.usePattern)(l,O)}.test(${h})`))),(0,r.not)(S)}function v(h){a.code((0,r._)`delete ${d}[${h}]`)}function b(h){if(E.removeAdditional==="all"||E.removeAdditional&&f===!1){v(h);return}if(f===!1){l.setParams({additionalProperty:h}),l.error(),$||a.break();return}if(typeof f=="object"&&!(0,s.alwaysValidSchema)(P,f)){const S=a.name("valid");E.removeAdditional==="failing"?(g(h,S,!1),a.if((0,r.not)(S),()=>{l.reset(),v(h)})):(g(h,S),$||a.if((0,r.not)(S),()=>a.break()))}}function g(h,S,O){const C={keyword:"additionalProperties",dataProp:h,dataPropType:s.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),l.subschema(C,S)}}};t.default=i}),rl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=pn(),r=At(),n=ze(),s=Qi(),o={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:l,schema:a,parentSchema:f,data:u,it:d}=i;d.opts.removeAdditional==="all"&&f.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(d,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);for(const c of w)d.definedProperties.add(c);d.opts.unevaluated&&w.length&&d.props!==!0&&(d.props=n.mergeEvaluated.props(l,(0,n.toHash)(w),d.props));const P=w.filter(c=>!(0,n.alwaysValidSchema)(d,a[c]));if(P.length===0)return;const $=l.name("valid");for(const c of P)E(c)?m(c):(l.if((0,r.propertyInData)(l,u,c,d.opts.ownProperties)),m(c),d.allErrors||l.else().var($,!0),l.endIf()),i.it.definedProperties.add(c),i.ok($);function E(c){return d.opts.useDefaults&&!d.compositeRule&&a[c].default!==void 0}function m(c){i.subschema({keyword:"properties",schemaProp:c,dataProp:c},$)}}};t.default=o}),nl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ae(),n=ze(),s=ze(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:l,schema:a,data:f,parentSchema:u,it:d}=i,{opts:w}=d,P=(0,e.allSchemaProperties)(a),$=P.filter(b=>(0,n.alwaysValidSchema)(d,a[b]));if(P.length===0||$.length===P.length&&(!d.opts.unevaluated||d.props===!0))return;const E=w.strictSchema&&!w.allowMatchingProperties&&u.properties,m=l.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,s.evaluatedPropsToName)(l,d.props));const{props:c}=d;_();function _(){for(const b of P)E&&p(b),d.allErrors?v(b):(l.var(m,!0),v(b),l.if(m))}function p(b){for(const g in E)new RegExp(b).test(g)&&(0,n.checkStrictMode)(d,`property ${g} matches pattern ${b} (use allowMatchingProperties)`)}function v(b){l.forIn("key",f,g=>{l.if((0,r._)`${(0,e.usePattern)(i,b)}.test(${g})`,()=>{const h=$.includes(b);h||i.subschema({keyword:"patternProperties",schemaProp:b,dataProp:g,dataPropType:s.Type.Str},m),d.opts.unevaluated&&c!==!0?l.assign((0,r._)`${c}[${g}]`,!0):!h&&!d.allErrors&&l.if((0,r.not)(m),()=>l.break())})})}}};t.default=o}),sl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:o,it:i}=n;if((0,e.alwaysValidSchema)(i,o)){n.fail();return}const l=s.name("valid");n.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},l),n.failResult(l,()=>n.reset(),()=>n.error())},error:{message:"must NOT be valid"}};t.default=r}),il=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),al=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n={message:"must match exactly one schema in oneOf",params:({params:o})=>(0,e._)`{passingSchemas: ${o.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(o){const{gen:i,schema:l,parentSchema:a,it:f}=o;if(!Array.isArray(l))throw new Error("ajv implementation error");if(f.opts.discriminator&&a.discriminator)return;const u=l,d=i.let("valid",!1),w=i.let("passing",null),P=i.name("_valid");o.setParams({passing:w}),i.block($),o.result(d,()=>o.reset(),()=>o.error(!0));function $(){u.forEach((E,m)=>{let c;(0,r.alwaysValidSchema)(f,E)?i.var(P,!0):c=o.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},P),m>0&&i.if((0,e._)`${P} && ${d}`).assign(d,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(P,()=>{i.assign(d,!0),i.assign(w,m),c&&o.mergeEvaluated(c,e.Name)})})}}};t.default=s}),ol=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:o,it:i}=n;if(!Array.isArray(o))throw new Error("ajv implementation error");const l=s.name("valid");o.forEach((a,f)=>{if((0,e.alwaysValidSchema)(i,a))return;const u=n.subschema({keyword:"allOf",schemaProp:f},l);n.ok(l),n.mergeEvaluated(u)})}};t.default=r}),cl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ze(),n={message:({params:i})=>(0,e.str)`must match "${i.ifClause}" schema`,params:({params:i})=>(0,e._)`{failingKeyword: ${i.ifClause}}`},s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:n,code(i){const{gen:l,parentSchema:a,it:f}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(f,'"if" without "then" and "else" is ignored');const u=o(f,"then"),d=o(f,"else");if(!u&&!d)return;const w=l.let("valid",!0),P=l.name("_valid");if($(),i.reset(),u&&d){const m=l.let("ifClause");i.setParams({ifClause:m}),l.if(P,E("then",m),E("else",m))}else u?l.if(P,E("then")):l.if((0,e.not)(P),E("else"));i.pass(w,()=>i.error(!0));function $(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},P);i.mergeEvaluated(m)}function E(m,c){return()=>{const _=i.subschema({keyword:m},P);l.assign(w,P),i.mergeValidEvaluated(_,w),c?l.assign(c,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function o(i,l){const a=i.schema[l];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),ul=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:o}){s.if===void 0&&(0,e.checkStrictMode)(o,`"${n}" without "if" is ignored`)}};t.default=r}),ll=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Wi(),r=Xu(),n=Ji(),s=Yu(),o=Zu(),i=el(),l=tl(),a=Qi(),f=rl(),u=nl(),d=sl(),w=il(),P=al(),$=ol(),E=cl(),m=ul();function c(_=!1){const p=[d.default,w.default,P.default,$.default,E.default,m.default,l.default,a.default,i.default,f.default,u.default];return _?p.push(r.default,s.default):p.push(e.default,n.default),p.push(o.default),p}t.default=c}),fl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r={message:({schemaCode:s})=>(0,e.str)`must match format "${s}"`,params:({schemaCode:s})=>(0,e._)`{format: ${s}}`},n={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:r,code(s,o){const{gen:i,data:l,$data:a,schema:f,schemaCode:u,it:d}=s,{opts:w,errSchemaPath:P,schemaEnv:$,self:E}=d;if(!w.validateFormats)return;a?m():c();function m(){const _=i.scopeValue("formats",{ref:E.formats,code:w.code.formats}),p=i.const("fDef",(0,e._)`${_}[${u}]`),v=i.let("fType"),b=i.let("format");i.if((0,e._)`typeof ${p} == "object" && !(${p} instanceof RegExp)`,()=>i.assign(v,(0,e._)`${p}.type || "string"`).assign(b,(0,e._)`${p}.validate`),()=>i.assign(v,(0,e._)`"string"`).assign(b,p)),s.fail$data((0,e.or)(g(),h()));function g(){return w.strictSchema===!1?e.nil:(0,e._)`${u} && !${b}`}function h(){const S=$.$async?(0,e._)`(${p}.async ? await ${b}(${l}) : ${b}(${l}))`:(0,e._)`${b}(${l})`,O=(0,e._)`(typeof ${b} == "function" ? ${S} : ${b}.test(${l}))`;return(0,e._)`${b} && ${b} !== true && ${v} === ${o} && !${O}`}}function c(){const _=E.formats[f];if(!_){g();return}if(_===!0)return;const[p,v,b]=h(_);p===o&&s.pass(S());function g(){if(w.strictSchema===!1){E.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${f}" ignored in schema at path "${P}"`}}function h(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(f)}`:void 0,D=i.scopeValue("formats",{key:f,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${D}.validate`]:["string",O,D]}function S(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!$.$async)throw new Error("async format in sync schema");return(0,e._)`await ${b}(${l})`}return typeof v=="function"?(0,e._)`${b}(${l})`:(0,e._)`${b}.test(${l})`}}}};t.default=n}),dl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=fl(),r=[e.default];t.default=r}),hl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]}),pl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Lu(),r=Qu(),n=ll(),s=dl(),o=hl(),i=[e.default,r.default,(0,n.default)(),s.default,o.metadataVocabulary,o.contentVocabulary];t.default=i}),ml=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))}),gl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=ml(),n=ps(),s=ze(),o={message:({params:{discrError:l,tagName:a}})=>l===r.DiscrError.Tag?`tag "${a}" must be string`:`value of tag "${a}" must be in oneOf`,params:({params:{discrError:l,tag:a,tagName:f}})=>(0,e._)`{error: ${l}, tag: ${f}, tagValue: ${a}}`},i={keyword:"discriminator",type:"object",schemaType:"object",error:o,code(l){const{gen:a,data:f,schema:u,parentSchema:d,it:w}=l,{oneOf:P}=d;if(!w.opts.discriminator)throw new Error("discriminator: requires discriminator option");const $=u.propertyName;if(typeof $!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!P)throw new Error("discriminator: requires oneOf keyword");const E=a.let("valid",!1),m=a.const("tag",(0,e._)`${f}${(0,e.getProperty)($)}`);a.if((0,e._)`typeof ${m} == "string"`,()=>c(),()=>l.error(!1,{discrError:r.DiscrError.Tag,tag:m,tagName:$})),l.ok(E);function c(){const v=p();a.if(!1);for(const b in v)a.elseIf((0,e._)`${m} === ${b}`),a.assign(E,_(v[b]));a.else(),l.error(!1,{discrError:r.DiscrError.Mapping,tag:m,tagName:$}),a.endIf()}function _(v){const b=a.name("valid"),g=l.subschema({keyword:"oneOf",schemaProp:v},b);return l.mergeEvaluated(g,e.Name),b}function p(){var v;const b={},g=S(d);let h=!0;for(let D=0;D<P.length;D++){let q=P[D];q!=null&&q.$ref&&!(0,s.schemaHasRulesButRef)(q,w.self.RULES)&&(q=n.resolveRef.call(w.self,w.schemaEnv.root,w.baseId,q==null?void 0:q.$ref),q instanceof n.SchemaEnv&&(q=q.schema));const X=(v=q==null?void 0:q.properties)===null||v===void 0?void 0:v[$];if(typeof X!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${$}"`);h=h&&(g||S(q)),O(X,D)}if(!h)throw new Error(`discriminator: "${$}" must be required`);return b;function S({required:D}){return Array.isArray(D)&&D.includes($)}function O(D,q){if(D.const)C(D.const,q);else if(D.enum)for(const X of D.enum)C(X,q);else throw new Error(`discriminator: "properties/${$}" must have "const" or "enum"`)}function C(D,q){if(typeof D!="string"||D in b)throw new Error(`discriminator: "${$}" values must be unique strings`);b[D]=q}}}};t.default=i}),vl=K(function(t,e){e.exports={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}),yl=K(function(t,e){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var r=Mu(),n=pl(),s=gl(),o=vl(),i=["/properties"],l="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach($=>this.addVocabulary($)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const $=this.opts.$data?this.$dataMetaSchema(o,i):o;this.addMetaSchema($,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.exports=t=a,Object.defineProperty(t,"__esModule",{value:!0}),t.default=a;var f=pn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return f.KeywordCxt}});var u=Ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var d=ds();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return d.default}});var w=hs();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),_l=K(function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=yl(),r=Ae(),n=r.operators,s={formatMaximum:{okStr:"<=",ok:n.LTE,fail:n.GT},formatMinimum:{okStr:">=",ok:n.GTE,fail:n.LT},formatExclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},formatExclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},o={message:({keyword:l,schemaCode:a})=>r.str`should be ${s[l].okStr} ${a}`,params:({keyword:l,schemaCode:a})=>r._`{comparison: ${s[l].okStr}, limit: ${a}}`};t.formatLimitDefinition={keyword:Object.keys(s),type:"string",schemaType:"string",$data:!0,error:o,code(l){const{gen:a,data:f,schemaCode:u,keyword:d,it:w}=l,{opts:P,self:$}=w;if(!P.validateFormats)return;const E=new e.KeywordCxt(w,$.RULES.all.format.definition,"format");E.$data?m():c();function m(){const p=a.scopeValue("formats",{ref:$.formats,code:P.code.formats}),v=a.const("fmt",r._`${p}[${E.schemaCode}]`);l.fail$data(r.or(r._`typeof ${v} != "object"`,r._`${v} instanceof RegExp`,r._`typeof ${v}.compare != "function"`,_(v)))}function c(){const p=E.schema,v=$.formats[p];if(!v||v===!0)return;if(typeof v!="object"||v instanceof RegExp||typeof v.compare!="function")throw new Error(`"${d}": format "${p}" does not define "compare" function`);const b=a.scopeValue("formats",{key:p,ref:v,code:P.code.formats?r._`${P.code.formats}${r.getProperty(p)}`:void 0});l.fail$data(_(b))}function _(p){return r._`${p}.compare(${f}, ${u}) ${s[d].fail} 0`}},dependencies:["format"]};var i=l=>(l.addKeyword(t.formatLimitDefinition),l);t.default=i}),wl=K(function(t,e){Object.defineProperty(t,"__esModule",{value:!0});var r=Nu(),n=_l(),s=Ae(),o=new s.Name("fullFormats"),i=new s.Name("fastFormats"),l=(f,u={keywords:!0})=>{if(Array.isArray(u))return a(f,u,r.fullFormats,o),f;const[d,w]=u.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,o],P=u.formats||r.formatNames;return a(f,P,d,w),u.keywords&&n.default(f),f};l.get=(f,u="full")=>{const w=(u==="fast"?r.fastFormats:r.fullFormats)[f];if(!w)throw new Error(`Unknown format "${f}"`);return w};function a(f,u,d,w){var P,$;(P=($=f.opts.code).formats)!==null&&P!==void 0||($.formats=s._`require("ajv-formats/dist/formats").${w}`);for(const E of u)f.addFormat(E,d[E])}e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l}),bl=K(function(t,e){(function(r,n){typeof e=="object"&&e.exports?e.exports=n():r.nearley=n()})(t,function(){function r(u,d,w){return this.id=++r.highestId,this.name=u,this.symbols=d,this.postprocess=w,this}r.highestId=0,r.prototype.toString=function(u){var d=typeof u>"u"?this.symbols.map(f).join(" "):this.symbols.slice(0,u).map(f).join(" ")+" ● "+this.symbols.slice(u).map(f).join(" ");return this.name+" → "+d};function n(u,d,w,P){this.rule=u,this.dot=d,this.reference=w,this.data=[],this.wantedBy=P,this.isComplete=this.dot===u.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(u){var d=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return d.left=this,d.right=u,d.isComplete&&(d.data=d.build(),d.right=void 0),d},n.prototype.build=function(){var u=[],d=this;do u.push(d.right.data),d=d.left;while(d.left);return u.reverse(),u},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,l.fail))};function s(u,d){this.grammar=u,this.index=d,this.states=[],this.wants={},this.scannable=[],this.completed={}}s.prototype.process=function(u){for(var d=this.states,w=this.wants,P=this.completed,$=0;$<d.length;$++){var E=d[$];if(E.isComplete){if(E.finish(),E.data!==l.fail){for(var m=E.wantedBy,c=m.length;c--;){var _=m[c];this.complete(_,E)}if(E.reference===this.index){var p=E.rule.name;(this.completed[p]=this.completed[p]||[]).push(E)}}}else{var p=E.rule.symbols[E.dot];if(typeof p!="string"){this.scannable.push(E);continue}if(w[p]){if(w[p].push(E),P.hasOwnProperty(p))for(var v=P[p],c=0;c<v.length;c++){var b=v[c];this.complete(E,b)}}else w[p]=[E],this.predict(p)}}},s.prototype.predict=function(u){for(var d=this.grammar.byName[u]||[],w=0;w<d.length;w++){var P=d[w],$=this.wants[u],E=new n(P,0,this.index,$);this.states.push(E)}},s.prototype.complete=function(u,d){var w=u.nextState(d);this.states.push(w)};function o(u,d){this.rules=u,this.start=d||this.rules[0].name;var w=this.byName={};this.rules.forEach(function(P){w.hasOwnProperty(P.name)||(w[P.name]=[]),w[P.name].push(P)})}o.fromCompiled=function(P,d){var w=P.Lexer;P.ParserStart&&(d=P.ParserStart,P=P.ParserRules);var P=P.map(function(E){return new r(E.name,E.symbols,E.postprocess)}),$=new o(P,d);return $.lexer=w,$};function i(){this.reset("")}i.prototype.reset=function(u,d){this.buffer=u,this.index=0,this.line=d?d.line:1,this.lastLineBreak=d?-d.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var u=this.buffer[this.index++];return u===`
|
|
24
|
+
`&&(this.line+=1,this.lastLineBreak=this.index),{value:u}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(u,d){var w=this.buffer;if(typeof w=="string"){var P=w.split(`
|
|
25
25
|
`).slice(Math.max(0,this.line-5),this.line),$=w.indexOf(`
|
|
26
26
|
`,this.index);$===-1&&($=w.length);var E=this.index-this.lastLineBreak,m=String(this.line).length;return d+=" at line "+this.line+" col "+E+`:
|
|
27
27
|
|
|
28
28
|
`,d+=P.map(function(_,p){return c(this.line-P.length+p+1,m)+" "+_},this).join(`
|
|
29
29
|
`),d+=`
|
|
30
30
|
`+c("",m+E)+`^
|
|
31
|
-
`,d}else return d+" at index "+(this.index-1);function c(_,p){var v=String(_);return Array(p-v.length+1).join(" ")+v}};function u
|
|
31
|
+
`,d}else return d+" at index "+(this.index-1);function c(_,p){var v=String(_);return Array(p-v.length+1).join(" ")+v}};function l(u,d,w){if(u instanceof o)var P=u,w=d;else var P=o.fromCompiled(u,d);this.grammar=P,this.options={keepHistory:!1,lexer:P.lexer||new i};for(var $ in w||{})this.options[$]=w[$];this.lexer=this.options.lexer,this.lexerState=void 0;var E=new s(P,0);this.table=[E],E.wants[P.start]=[],E.predict(P.start),E.process(),this.current=0}l.fail={},l.prototype.feed=function(u){var d=this.lexer;d.reset(u,this.lexerState);for(var w;;){try{if(w=d.next(),!w)break}catch(S){var m=new s(this.grammar,this.current+1);this.table.push(m);var P=new Error(this.reportLexerError(S));throw P.offset=this.current,P.token=S.token,P}var $=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var E=this.current+1,m=new s(this.grammar,E);this.table.push(m);for(var c=w.text!==void 0?w.text:w.value,_=d.constructor===i?w.value:w,p=$.scannable,v=p.length;v--;){var b=p[v],g=b.rule.symbols[b.dot];if(g.test?g.test(_):g.type?g.type===w.type:g.literal===c){var h=b.nextState({data:_,token:w,isToken:!0,reference:E-1});m.states.push(h)}}if(m.process(),m.states.length===0){var P=new Error(this.reportError(w));throw P.offset=this.current,P.token=w,P}this.options.keepHistory&&($.lexerState=d.save()),this.current++}return $&&(this.lexerState=d.save()),this.results=this.finish(),this},l.prototype.reportLexerError=function(u){var d,w,P=u.token;return P?(d="input "+JSON.stringify(P.text[0])+" (lexer error)",w=this.lexer.formatError(P,"Syntax error")):(d="input (lexer error)",w=u.message),this.reportErrorCommon(w,d)},l.prototype.reportError=function(u){var d=(u.type?u.type+" token: ":"")+JSON.stringify(u.value!==void 0?u.value:u),w=this.lexer.formatError(u,"Syntax error");return this.reportErrorCommon(w,d)},l.prototype.reportErrorCommon=function(u,d){var w=[];w.push(u);var P=this.table.length-2,$=this.table[P],E=$.states.filter(function(c){var _=c.rule.symbols[c.dot];return _&&typeof _!="string"});if(E.length===0)w.push("Unexpected "+d+`. I did not expect any more input. Here is the state of my parse table:
|
|
32
32
|
`),this.displayStateStack($.states,w);else{w.push("Unexpected "+d+`. Instead, I was expecting to see one of the following:
|
|
33
33
|
`);var m=E.map(function(c){return this.buildFirstStateStack(c,[])||[c]},this);m.forEach(function(c){var _=c[0],p=_.rule.symbols[_.dot],v=this.getSymbolDisplay(p);w.push("A "+v+" based on:"),this.displayStateStack(c,w)},this)}return w.push(""),w.join(`
|
|
34
|
-
`)},u.prototype.displayStateStack=function(l,d){for(var w,P=0,$=0;$<l.length;$++){var E=l[$],m=E.rule.toString(E.dot);m===w?P++:(P>0&&d.push(" ^ "+P+" more lines identical to this"),P=0,d.push(" "+m)),w=m}},u.prototype.getSymbolDisplay=function(l){return a(l)},u.prototype.buildFirstStateStack=function(l,d){if(d.indexOf(l)!==-1)return null;if(l.wantedBy.length===0)return[l];var w=l.wantedBy[0],P=[l].concat(d),$=this.buildFirstStateStack(w,P);return $===null?null:[l].concat($)},u.prototype.save=function(){var l=this.table[this.current];return l.lexerState=this.lexerState,l},u.prototype.restore=function(l){var d=l.index;this.current=d,this.table[d]=l,this.table.splice(d+1),this.lexerState=l.lexerState,this.results=this.finish()},u.prototype.rewind=function(l){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[l])},u.prototype.finish=function(){var l=[],d=this.grammar.start,w=this.table[this.table.length-1];return w.states.forEach(function(P){P.rule.name===d&&P.dot===P.rule.symbols.length&&P.reference===0&&P.data!==u.fail&&l.push(P)}),l.map(function(P){return P.data})};function a(l){var d=typeof l;if(d==="string")return l;if(d==="object"){if(l.literal)return JSON.stringify(l.literal);if(l instanceof RegExp)return"character matching "+l;if(l.type)return l.type+" token";if(l.test)return"token matching "+String(l.test);throw new Error("Unknown symbol type: "+l)}}function f(l){var d=typeof l;if(d==="string")return l;if(d==="object"){if(l.literal)return JSON.stringify(l.literal);if(l instanceof RegExp)return l.toString();if(l.type)return"%"+l.type;if(l.test)return"<"+String(l.test)+">";throw new Error("Unknown symbol type: "+l)}}return{Parser:u,Grammar:o,Rule:r}})}),wl=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(o){return o[0]}var r=o=>[].concat(...o.map(i=>Array.isArray(i)?r(i):i));function n(o){return o?Array.isArray(o)?r(o).join(""):o:""}var s={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:o=>o.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(o){return o.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(o){return o.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:e},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:e},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:o=>o[0].concat([o[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:e},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:o=>o[0].concat([o[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:e},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(o){return{DomainName:n(o[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(o){return{AddressLiteral:n(o[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(o){return{localPart:n(o[0]),domainPart:n(o[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(o){return{DotString:n(o[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(o){return{QuotedString:n(o[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:o=>o[0].concat([o[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:o=>o[0].concat([o[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:e},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(o){return o.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:o=>o[0].concat([o[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:e},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:o=>o.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:o=>o.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:e},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:e},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:e}],ParserStart:"Reverse_path"};t.default=s}),gs=K(function(t){var e=t&&t.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=_l(),n=e(wl());n.default.ParserStart="Mailbox";var s=r.Grammar.fromCompiled(n.default);function o(l){if(l.length>986)throw new Error("address too long");const w=new r.Parser(s);if(w.feed(l),w.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const P=l.lastIndexOf("@"),$=l.substring(P+1);if($[0]!=="["){if($.length>253)throw new Error("domain too long");const E=$.split(".");if(E.length<2)throw new Error("domain not fully qualified");if(E[E.length-1].length<2)throw new Error("top level domain label too short");if(E.sort(function(m,c){return c.length-m.length}),E[0].length>63)throw new Error("domain label too long")}return w.results[0]}t.parse=o;function i(l){return function(){const P=l.indexOf("+");return P===-1?l:l.substr(0,P)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=i;function u(l){var d,w;const P=o(l),$=(d=P.domainPart.AddressLiteral)!==null&&d!==void 0?d:P.domainPart.DomainName.toLowerCase();return`${(w=P.localPart.QuotedString)!==null&&w!==void 0?w:i(P.localPart.DotString)}@${$}`}t.normalize=u;function a(l){return`"${l.substr(1).substr(0,l.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=a;function f(l){var d;const w=o(l),P=(d=w.domainPart.AddressLiteral)!==null&&d!==void 0?d:w.domainPart.DomainName.toLowerCase();return`${w.localPart.QuotedString?a(w.localPart.QuotedString):w.localPart.DotString}@${P}`}t.canonicalize=f}),bl=K(function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},u=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var w=r.call(d,"constructor"),P=d.constructor&&d.constructor.prototype&&r.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!w&&!P)return!1;var $;for($ in d);return typeof $>"u"||r.call(d,$)},a=function(d,w){s&&w.name==="__proto__"?s(d,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):d[w.name]=w.newValue},f=function(d,w){if(w==="__proto__")if(r.call(d,w)){if(o)return o(d,w).value}else return;return d[w]};e.exports=function l(){var d,w,P,$,E,m,c=arguments[0],_=1,p=arguments.length,v=!1;for(typeof c=="boolean"&&(v=c,c=arguments[1]||{},_=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});_<p;++_)if(d=arguments[_],d!=null)for(w in d)P=f(c,w),$=f(d,w),c!==$&&(v&&$&&(u($)||(E=i($)))?(E?(E=!1,m=P&&i(P)?P:[]):m=P&&u(P)?P:{},a(c,{name:w,newValue:l(v,m,$)})):typeof $<"u"&&a(c,{name:w,newValue:$}));return c}}),$l=K(function(t,e){e.exports=[{scheme:"aaa",description:"Diameter Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"aaas",description:"Diameter Protocol with Secure Transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"about",description:"about",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6694"}]},{scheme:"acap",description:"application configuration access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2244"}]},{scheme:"acct",description:"acct",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7565"}]},{scheme:"cap",description:"Calendar Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4324"}]},{scheme:"cid",description:"content identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"coap",description:"coap",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"coaps",description:"coaps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"crid",description:"TV-Anytime Content Reference Identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4078"}]},{scheme:"data",description:"data",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2397"}]},{scheme:"dav",description:"dav",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"dict",description:"dictionary service protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2229"}]},{scheme:"dns",description:"Domain Name System",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4501"}]},{scheme:"example",description:"example",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7595"}]},{scheme:"file",description:"Host-specific file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"ftp",description:"File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"geo",description:"Geographic Locations",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5870"}]},{scheme:"go",description:"go",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3368"}]},{scheme:"gopher",description:"The Gopher Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4266"}]},{scheme:"h323",description:"H.323",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3508"}]},{scheme:"http",description:"Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"https",description:"Hypertext Transfer Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"iax",description:"Inter-Asterisk eXchange Version 2",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5456"}]},{scheme:"icap",description:"Internet Content Adaptation Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3507"}]},{scheme:"im",description:"Instant Messaging",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3860"}]},{scheme:"imap",description:"internet message access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5092"}]},{scheme:"info",description:`Information Assets with Identifiers in Public Namespaces.
|
|
34
|
+
`)},l.prototype.displayStateStack=function(u,d){for(var w,P=0,$=0;$<u.length;$++){var E=u[$],m=E.rule.toString(E.dot);m===w?P++:(P>0&&d.push(" ^ "+P+" more lines identical to this"),P=0,d.push(" "+m)),w=m}},l.prototype.getSymbolDisplay=function(u){return a(u)},l.prototype.buildFirstStateStack=function(u,d){if(d.indexOf(u)!==-1)return null;if(u.wantedBy.length===0)return[u];var w=u.wantedBy[0],P=[u].concat(d),$=this.buildFirstStateStack(w,P);return $===null?null:[u].concat($)},l.prototype.save=function(){var u=this.table[this.current];return u.lexerState=this.lexerState,u},l.prototype.restore=function(u){var d=u.index;this.current=d,this.table[d]=u,this.table.splice(d+1),this.lexerState=u.lexerState,this.results=this.finish()},l.prototype.rewind=function(u){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[u])},l.prototype.finish=function(){var u=[],d=this.grammar.start,w=this.table[this.table.length-1];return w.states.forEach(function(P){P.rule.name===d&&P.dot===P.rule.symbols.length&&P.reference===0&&P.data!==l.fail&&u.push(P)}),u.map(function(P){return P.data})};function a(u){var d=typeof u;if(d==="string")return u;if(d==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return"character matching "+u;if(u.type)return u.type+" token";if(u.test)return"token matching "+String(u.test);throw new Error("Unknown symbol type: "+u)}}function f(u){var d=typeof u;if(d==="string")return u;if(d==="object"){if(u.literal)return JSON.stringify(u.literal);if(u instanceof RegExp)return u.toString();if(u.type)return"%"+u.type;if(u.test)return"<"+String(u.test)+">";throw new Error("Unknown symbol type: "+u)}}return{Parser:l,Grammar:o,Rule:r}})}),$l=K(function(t){Object.defineProperty(t,"__esModule",{value:!0});function e(o){return o[0]}var r=o=>[].concat(...o.map(i=>Array.isArray(i)?r(i):i));function n(o){return o?Array.isArray(o)?r(o).join(""):o:""}var s={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:o=>o.join("")},{name:"Reverse_path",symbols:["Reverse_path$string$1"]},{name:"Forward_path$subexpression$1$subexpression$1",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:"@"}],postprocess:function(o){return o.join("")}},{name:"Forward_path$subexpression$1",symbols:["Forward_path$subexpression$1$subexpression$1","Domain",{literal:">"}]},{name:"Forward_path",symbols:["Forward_path$subexpression$1"]},{name:"Forward_path$subexpression$2",symbols:[{literal:"<"},/[pP]/,/[oO]/,/[sS]/,/[tT]/,/[mM]/,/[aA]/,/[sS]/,/[tT]/,/[eE]/,/[rR]/,{literal:">"}],postprocess:function(o){return o.join("")}},{name:"Forward_path",symbols:["Forward_path$subexpression$2"]},{name:"Forward_path",symbols:["Path"]},{name:"Path$ebnf$1$subexpression$1",symbols:["A_d_l",{literal:":"}]},{name:"Path$ebnf$1",symbols:["Path$ebnf$1$subexpression$1"],postprocess:e},{name:"Path$ebnf$1",symbols:[],postprocess:()=>null},{name:"Path",symbols:[{literal:"<"},"Path$ebnf$1","Mailbox",{literal:">"}]},{name:"A_d_l$ebnf$1",symbols:[]},{name:"A_d_l$ebnf$1$subexpression$1",symbols:[{literal:","},"At_domain"]},{name:"A_d_l$ebnf$1",symbols:["A_d_l$ebnf$1","A_d_l$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"A_d_l",symbols:["At_domain","A_d_l$ebnf$1"]},{name:"At_domain",symbols:[{literal:"@"},"Domain"]},{name:"Domain$ebnf$1",symbols:[]},{name:"Domain$ebnf$1$subexpression$1",symbols:[{literal:"."},"sub_domain"]},{name:"Domain$ebnf$1",symbols:["Domain$ebnf$1","Domain$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"Domain",symbols:["sub_domain","Domain$ebnf$1"]},{name:"sub_domain",symbols:["U_label"]},{name:"Let_dig",symbols:["ALPHA_DIGIT"],postprocess:e},{name:"Ldh_str$ebnf$1",symbols:[]},{name:"Ldh_str$ebnf$1",symbols:["Ldh_str$ebnf$1","ALPHA_DIG_DASH"],postprocess:o=>o[0].concat([o[1]])},{name:"Ldh_str",symbols:["Ldh_str$ebnf$1","Let_dig"]},{name:"U_Let_dig",symbols:["ALPHA_DIGIT_U"],postprocess:e},{name:"U_Ldh_str$ebnf$1",symbols:[]},{name:"U_Ldh_str$ebnf$1",symbols:["U_Ldh_str$ebnf$1","ALPHA_DIG_DASH_U"],postprocess:o=>o[0].concat([o[1]])},{name:"U_Ldh_str",symbols:["U_Ldh_str$ebnf$1","U_Let_dig"]},{name:"U_label$ebnf$1$subexpression$1",symbols:["U_Ldh_str"]},{name:"U_label$ebnf$1",symbols:["U_label$ebnf$1$subexpression$1"],postprocess:e},{name:"U_label$ebnf$1",symbols:[],postprocess:()=>null},{name:"U_label",symbols:["U_Let_dig","U_label$ebnf$1"]},{name:"address_literal$subexpression$1",symbols:["IPv4_address_literal"]},{name:"address_literal$subexpression$1",symbols:["IPv6_address_literal"]},{name:"address_literal$subexpression$1",symbols:["General_address_literal"]},{name:"address_literal",symbols:[{literal:"["},"address_literal$subexpression$1",{literal:"]"}]},{name:"non_local_part",symbols:["Domain"],postprocess:function(o){return{DomainName:n(o[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(o){return{AddressLiteral:n(o[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(o){return{localPart:n(o[0]),domainPart:n(o[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(o){return{DotString:n(o[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(o){return{QuotedString:n(o[0])}}},{name:"Dot_string$ebnf$1",symbols:[]},{name:"Dot_string$ebnf$1$subexpression$1",symbols:[{literal:"."},"Atom"]},{name:"Dot_string$ebnf$1",symbols:["Dot_string$ebnf$1","Dot_string$ebnf$1$subexpression$1"],postprocess:o=>o[0].concat([o[1]])},{name:"Dot_string",symbols:["Atom","Dot_string$ebnf$1"]},{name:"Atom$ebnf$1",symbols:[/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/]},{name:"Atom$ebnf$1",symbols:["Atom$ebnf$1",/[0-9A-Za-z!#$%&'*+\-/=?^_`{|}~\u0080-\uFFFF/]/],postprocess:o=>o[0].concat([o[1]])},{name:"Atom",symbols:["Atom$ebnf$1"]},{name:"Quoted_string$ebnf$1",symbols:[]},{name:"Quoted_string$ebnf$1",symbols:["Quoted_string$ebnf$1","QcontentSMTP"],postprocess:o=>o[0].concat([o[1]])},{name:"Quoted_string",symbols:["DQUOTE","Quoted_string$ebnf$1","DQUOTE"]},{name:"QcontentSMTP",symbols:["qtextSMTP"]},{name:"QcontentSMTP",symbols:["quoted_pairSMTP"]},{name:"quoted_pairSMTP",symbols:[{literal:"\\"},/[\x20-\x7e]/]},{name:"qtextSMTP",symbols:[/[\x20-\x21\x23-\x5b\x5d-\x7e\u0080-\uFFFF]/],postprocess:e},{name:"IPv4_address_literal$macrocall$2",symbols:[{literal:"."},"Snum"]},{name:"IPv4_address_literal$macrocall$1",symbols:["IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2","IPv4_address_literal$macrocall$2"]},{name:"IPv4_address_literal",symbols:["Snum","IPv4_address_literal$macrocall$1"]},{name:"IPv6_address_literal$subexpression$1",symbols:[/[iI]/,/[pP]/,/[vV]/,{literal:"6"},{literal:":"}],postprocess:function(o){return o.join("")}},{name:"IPv6_address_literal",symbols:["IPv6_address_literal$subexpression$1","IPv6_addr"]},{name:"General_address_literal$ebnf$1",symbols:["dcontent"]},{name:"General_address_literal$ebnf$1",symbols:["General_address_literal$ebnf$1","dcontent"],postprocess:o=>o[0].concat([o[1]])},{name:"General_address_literal",symbols:["Standardized_tag",{literal:":"},"General_address_literal$ebnf$1"]},{name:"Standardized_tag",symbols:["Ldh_str"]},{name:"dcontent",symbols:[/[\x21-\x5a\x5e-\x7e]/],postprocess:e},{name:"Snum",symbols:["DIGIT"]},{name:"Snum$subexpression$1",symbols:[/[1-9]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$1"]},{name:"Snum$subexpression$2",symbols:[{literal:"1"},"DIGIT","DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$2"]},{name:"Snum$subexpression$3",symbols:[{literal:"2"},/[0-4]/,"DIGIT"]},{name:"Snum",symbols:["Snum$subexpression$3"]},{name:"Snum$subexpression$4",symbols:[{literal:"2"},{literal:"5"},/[0-5]/]},{name:"Snum",symbols:["Snum$subexpression$4"]},{name:"IPv6_addr",symbols:["IPv6_full"]},{name:"IPv6_addr",symbols:["IPv6_comp"]},{name:"IPv6_addr",symbols:["IPv6v4_full"]},{name:"IPv6_addr",symbols:["IPv6v4_comp"]},{name:"IPv6_hex",symbols:["HEXDIG"]},{name:"IPv6_hex$subexpression$1",symbols:["HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$1"]},{name:"IPv6_hex$subexpression$2",symbols:["HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$2"]},{name:"IPv6_hex$subexpression$3",symbols:["HEXDIG","HEXDIG","HEXDIG","HEXDIG"]},{name:"IPv6_hex",symbols:["IPv6_hex$subexpression$3"]},{name:"IPv6_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_full$macrocall$1",symbols:["IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2","IPv6_full$macrocall$2"]},{name:"IPv6_full",symbols:["IPv6_hex","IPv6_full$macrocall$1"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2","IPv6_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$1",symbols:["IPv6_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:o=>o.join("")},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2","IPv6_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6_comp$ebnf$2$subexpression$1$macrocall$1"]},{name:"IPv6_comp$ebnf$2",symbols:["IPv6_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6_comp",symbols:["IPv6_comp$ebnf$1","IPv6_comp$string$1","IPv6_comp$ebnf$2"]},{name:"IPv6v4_full$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_full$macrocall$1",symbols:["IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2","IPv6v4_full$macrocall$2"]},{name:"IPv6v4_full",symbols:["IPv6_hex","IPv6v4_full$macrocall$1",{literal:":"},"IPv4_address_literal"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$1$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$1$subexpression$1$macrocall$1"]},{name:"IPv6v4_comp$ebnf$1",symbols:["IPv6v4_comp$ebnf$1$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$1",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp$string$1",symbols:[{literal:":"},{literal:":"}],postprocess:o=>o.join("")},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2",symbols:[{literal:":"},"IPv6_hex"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",symbols:["IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$2"]},{name:"IPv6v4_comp$ebnf$2$subexpression$1",symbols:["IPv6_hex","IPv6v4_comp$ebnf$2$subexpression$1$macrocall$1",{literal:":"}]},{name:"IPv6v4_comp$ebnf$2",symbols:["IPv6v4_comp$ebnf$2$subexpression$1"],postprocess:e},{name:"IPv6v4_comp$ebnf$2",symbols:[],postprocess:()=>null},{name:"IPv6v4_comp",symbols:["IPv6v4_comp$ebnf$1","IPv6v4_comp$string$1","IPv6v4_comp$ebnf$2","IPv4_address_literal"]},{name:"DIGIT",symbols:[/[0-9]/],postprocess:e},{name:"ALPHA_DIGIT_U",symbols:[/[0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"ALPHA_DIGIT",symbols:[/[0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH",symbols:[/[-0-9A-Za-z]/],postprocess:e},{name:"ALPHA_DIG_DASH_U",symbols:[/[-0-9A-Za-z\u0080-\uFFFF]/],postprocess:e},{name:"HEXDIG",symbols:[/[0-9A-Fa-f]/],postprocess:e},{name:"DQUOTE",symbols:[{literal:'"'}],postprocess:e}],ParserStart:"Reverse_path"};t.default=s}),vs=K(function(t){var e=t&&t.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=bl(),n=e($l());n.default.ParserStart="Mailbox";var s=r.Grammar.fromCompiled(n.default);function o(u){if(u.length>986)throw new Error("address too long");const w=new r.Parser(s);if(w.feed(u),w.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const P=u.lastIndexOf("@"),$=u.substring(P+1);if($[0]!=="["){if($.length>253)throw new Error("domain too long");const E=$.split(".");if(E.length<2)throw new Error("domain not fully qualified");if(E[E.length-1].length<2)throw new Error("top level domain label too short");if(E.sort(function(m,c){return c.length-m.length}),E[0].length>63)throw new Error("domain label too long")}return w.results[0]}t.parse=o;function i(u){return function(){const P=u.indexOf("+");return P===-1?u:u.substr(0,P)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=i;function l(u){var d,w;const P=o(u),$=(d=P.domainPart.AddressLiteral)!==null&&d!==void 0?d:P.domainPart.DomainName.toLowerCase();return`${(w=P.localPart.QuotedString)!==null&&w!==void 0?w:i(P.localPart.DotString)}@${$}`}t.normalize=l;function a(u){return`"${u.substr(1).substr(0,u.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=a;function f(u){var d;const w=o(u),P=(d=w.domainPart.AddressLiteral)!==null&&d!==void 0?d:w.domainPart.DomainName.toLowerCase();return`${w.localPart.QuotedString?a(w.localPart.QuotedString):w.localPart.DotString}@${P}`}t.canonicalize=f}),El=K(function(t,e){var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,o=Object.getOwnPropertyDescriptor,i=function(d){return typeof Array.isArray=="function"?Array.isArray(d):n.call(d)==="[object Array]"},l=function(d){if(!d||n.call(d)!=="[object Object]")return!1;var w=r.call(d,"constructor"),P=d.constructor&&d.constructor.prototype&&r.call(d.constructor.prototype,"isPrototypeOf");if(d.constructor&&!w&&!P)return!1;var $;for($ in d);return typeof $>"u"||r.call(d,$)},a=function(d,w){s&&w.name==="__proto__"?s(d,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):d[w.name]=w.newValue},f=function(d,w){if(w==="__proto__")if(r.call(d,w)){if(o)return o(d,w).value}else return;return d[w]};e.exports=function u(){var d,w,P,$,E,m,c=arguments[0],_=1,p=arguments.length,v=!1;for(typeof c=="boolean"&&(v=c,c=arguments[1]||{},_=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});_<p;++_)if(d=arguments[_],d!=null)for(w in d)P=f(c,w),$=f(d,w),c!==$&&(v&&$&&(l($)||(E=i($)))?(E?(E=!1,m=P&&i(P)?P:[]):m=P&&l(P)?P:{},a(c,{name:w,newValue:u(v,m,$)})):typeof $<"u"&&a(c,{name:w,newValue:$}));return c}}),Sl=K(function(t,e){e.exports=[{scheme:"aaa",description:"Diameter Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"aaas",description:"Diameter Protocol with Secure Transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6733"}]},{scheme:"about",description:"about",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6694"}]},{scheme:"acap",description:"application configuration access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2244"}]},{scheme:"acct",description:"acct",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7565"}]},{scheme:"cap",description:"Calendar Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4324"}]},{scheme:"cid",description:"content identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"coap",description:"coap",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"coaps",description:"coaps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7252"}]},{scheme:"crid",description:"TV-Anytime Content Reference Identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4078"}]},{scheme:"data",description:"data",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2397"}]},{scheme:"dav",description:"dav",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"dict",description:"dictionary service protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2229"}]},{scheme:"dns",description:"Domain Name System",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4501"}]},{scheme:"example",description:"example",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7595"}]},{scheme:"file",description:"Host-specific file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"ftp",description:"File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"geo",description:"Geographic Locations",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5870"}]},{scheme:"go",description:"go",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3368"}]},{scheme:"gopher",description:"The Gopher Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4266"}]},{scheme:"h323",description:"H.323",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3508"}]},{scheme:"http",description:"Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"https",description:"Hypertext Transfer Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7230"}]},{scheme:"iax",description:"Inter-Asterisk eXchange Version 2",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5456"}]},{scheme:"icap",description:"Internet Content Adaptation Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3507"}]},{scheme:"im",description:"Instant Messaging",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3860"}]},{scheme:"imap",description:"internet message access protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5092"}]},{scheme:"info",description:`Information Assets with Identifiers in Public Namespaces.
|
|
35
35
|
(section 3) defines an "info" registry
|
|
36
36
|
of public namespaces, which is maintained by NISO and can be accessed
|
|
37
|
-
from .`,reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4452"}]},{scheme:"ipp",description:"Internet Printing Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3510"}]},{scheme:"ipps",description:"Internet Printing Protocol over HTTPS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7472"}]},{scheme:"iris",description:"Internet Registry Information Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3981"}]},{scheme:"iris.beep",description:"iris.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3983"}]},{scheme:"iris.lwz",description:"iris.lwz",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4993"}]},{scheme:"iris.xpc",description:"iris.xpc",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"iris.xpcs",description:"iris.xpcs",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"jabber",description:"jabber",reference:[],template:"http://www.iana.org/assignments/uri-schemes/perm/jabber"},{scheme:"ldap",description:"Lightweight Directory Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4516"}]},{scheme:"mailto",description:"Electronic mail address",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6068"}]},{scheme:"mid",description:"message identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"msrp",description:"Message Session Relay Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"msrps",description:"Message Session Relay Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"mtqp",description:"Message Tracking Query Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3887"}]},{scheme:"mupdate",description:"Mailbox Update (MUPDATE) Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3656"}]},{scheme:"news",description:"USENET news",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"nfs",description:"network file system protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2224"}]},{scheme:"ni",description:"ni",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nih",description:"nih",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nntp",description:"USENET news using NNTP access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"opaquelocktoken",description:"opaquelocktokent",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"pkcs11",description:"PKCS#11",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7512"}]},{scheme:"pop",description:"Post Office Protocol v3",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2384"}]},{scheme:"pres",description:"Presence",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3859"}]},{scheme:"reload",description:"reload",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6940"}]},{scheme:"rtsp",description:"Real-time Streaming Protocol (RTSP)",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtsps",description:"Real-time Streaming Protocol (RTSP) over TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtspu",description:"Real-time Streaming Protocol (RTSP) over unreliable datagram transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"}]},{scheme:"service",description:"service location",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2609"}]},{scheme:"session",description:"session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6787"}]},{scheme:"shttp",description:"Secure Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2660"}]},{scheme:"sieve",description:"ManageSieve Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5804"}]},{scheme:"sip",description:"session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sips",description:"secure session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sms",description:"Short Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5724"}]},{scheme:"snmp",description:"Simple Network Management Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4088"}]},{scheme:"soap.beep",description:"soap.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"soap.beeps",description:"soap.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"stun",description:"stun",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"stuns",description:"stuns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"tag",description:"tag",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4151"}]},{scheme:"tel",description:"telephone",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"telnet",description:"Reference to interactive sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4248"}]},{scheme:"tftp",description:"Trivial File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3617"}]},{scheme:"thismessage",description:"multipart/related relative reference resolution",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2557"}],template:"http://www.iana.org/assignments/uri-schemes/perm/thismessage"},{scheme:"tip",description:"Transaction Internet Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2371"}]},{scheme:"tn3270",description:"Interactive 3270 emulation sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6270"}]},{scheme:"turn",description:"turn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"turns",description:"turns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"tv",description:"TV Broadcasts",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2838"}]},{scheme:"urn",description:"Uniform Resource Names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2141"},{type:"registry",href:"http://www.iana.org/assignments/urn-namespaces"}]},{scheme:"vemmi",description:"versatile multimedia interface",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2122"}]},{scheme:"vnc",description:"Remote Framebuffer Protocol",reference:[{type:"draft",href:"http://www.iana.org/go/RFC-warden-appsawg-vnc-scheme-10"}]},{scheme:"ws",description:"WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"wss",description:"Encrypted WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"xcon",description:"xcon",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xcon-userid",description:"xcon-userid",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xmlrpc.beep",description:"xmlrpc.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmlrpc.beeps",description:"xmlrpc.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmpp",description:"Extensible Messaging and Presence Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5122"}]},{scheme:"z39.50r",description:"Z39.50 Retrieval",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]},{scheme:"z39.50s",description:"Z39.50 Session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),El=K(function(t,e){e.exports=[{scheme:"acr",description:"acr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/acr"},{scheme:"adiumxtra",description:"adiumxtra",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/adiumxtra"},{scheme:"afp",description:"afp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/afp"},{scheme:"afs",description:"Andrew File System global file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"aim",description:"aim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aim"},{scheme:"appdata",description:"appdata",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/appdata"},{scheme:"apt",description:"apt",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/apt"},{scheme:"attachment",description:"attachment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/attachment"},{scheme:"aw",description:"aw",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aw"},{scheme:"barion",description:"barion",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/barion"},{scheme:"beshare",description:"beshare",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/beshare"},{scheme:"bitcoin",description:"bitcoin",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bitcoin"},{scheme:"blob",description:"blob",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/blob"},{scheme:"bolo",description:"bolo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bolo"},{scheme:"callto",description:"callto",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/callto"},{scheme:"chrome",description:"chrome",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome"},{scheme:"chrome-extension",description:"chrome-extension",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome-extension"},{scheme:"com-eventbrite-attendee",description:"com-eventbrite-attendee",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/com-eventbrite-attendee"},{scheme:"content",description:"content",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/content"},{scheme:"cvs",description:"cvs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/cvs"},{scheme:"dis",description:"dis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dis"},{scheme:"dlna-playcontainer",description:"dlna-playcontainer",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playcontainer"},{scheme:"dlna-playsingle",description:"dlna-playsingle",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playsingle"},{scheme:"dntp",description:"dntp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dntp"},{scheme:"dtn",description:"DTNRG research and development",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5050"}]},{scheme:"dvb",description:"dvb",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mcroberts-uri-dvb"}]},{scheme:"ed2k",description:"ed2k",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ed2k"},{scheme:"facetime",description:"facetime",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/facetime"},{scheme:"feed",description:"feed",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feed"},{scheme:"feedready",description:"feedready",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feedready"},{scheme:"finger",description:"finger",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/finger"},{scheme:"fish",description:"fish",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/fish"},{scheme:"gg",description:"gg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gg"},{scheme:"git",description:"git",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/git"},{scheme:"gizmoproject",description:"gizmoproject",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gizmoproject"},{scheme:"gtalk",description:"gtalk",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gtalk"},{scheme:"ham",description:"ham",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7046"}]},{scheme:"hcp",description:"hcp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/hcp"},{scheme:"icon",description:"icon",reference:[{type:"draft",href:"http://www.iana.org/go/draft-lafayette-icon-uri-scheme"}]},{scheme:"iotdisco",description:"iotdisco",reference:[{type:"uri",href:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco.pdf"}],template:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco"},{scheme:"ipn",description:"ipn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6260"}]},{scheme:"irc",description:"irc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc"},{scheme:"irc6",description:"irc6",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc6"},{scheme:"ircs",description:"ircs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ircs"},{scheme:"isostore",description:"isostore",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/isostore"},{scheme:"itms",description:"itms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/itms"},{scheme:"jar",description:"jar",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/jar"},{scheme:"jms",description:"Java Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6167"}]},{scheme:"keyparc",description:"keyparc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/keyparc"},{scheme:"lastfm",description:"lastfm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/lastfm"},{scheme:"ldaps",description:"ldaps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ldaps"},{scheme:"magnet",description:"magnet",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/magnet"},{scheme:"maps",description:"maps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/maps"},{scheme:"market",description:"market",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/market"},{scheme:"message",description:"message",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/message"},{scheme:"mms",description:"mms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mms"},{scheme:"ms-access",description:"ms-access",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-access"},{scheme:"ms-drive-to",description:"ms-drive-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-drive-to"},{scheme:"ms-enrollment",description:"ms-enrollment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-enrollment"},{scheme:"ms-excel",description:"ms-excel",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-excel"},{scheme:"ms-getoffice",description:"ms-getoffice",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-getoffice"},{scheme:"ms-help",description:"ms-help",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-help"},{scheme:"ms-infopath",description:"ms-infopath",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-infopath"},{scheme:"ms-media-stream-id",description:"ms-media-stream-id",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-media-stream-id"},{scheme:"ms-powerpoint",description:"ms-powerpoint",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-powerpoint"},{scheme:"ms-project",description:"ms-project",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-project"},{scheme:"ms-publisher",description:"ms-publisher",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-publisher"},{scheme:"ms-search-repair",description:"ms-search-repair",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-search-repair"},{scheme:"ms-secondary-screen-controller",description:"ms-secondary-screen-controller",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-controller"},{scheme:"ms-secondary-screen-setup",description:"ms-secondary-screen-setup",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-setup"},{scheme:"ms-settings",description:"ms-settings",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings"},{scheme:"ms-settings-airplanemode",description:"ms-settings-airplanemode",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-airplanemode"},{scheme:"ms-settings-bluetooth",description:"ms-settings-bluetooth",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-bluetooth"},{scheme:"ms-settings-camera",description:"ms-settings-camera",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-camera"},{scheme:"ms-settings-cellular",description:"ms-settings-cellular",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cellular"},{scheme:"ms-settings-cloudstorage",description:"ms-settings-cloudstorage",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cloudstorage"},{scheme:"ms-settings-connectabledevices",description:"ms-settings-connectabledevices",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-connectabledevices"},{scheme:"ms-settings-displays-topology",description:"ms-settings-displays-topology",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-displays-topology"},{scheme:"ms-settings-emailandaccounts",description:"ms-settings-emailandaccounts",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-emailandaccounts"},{scheme:"ms-settings-language",description:"ms-settings-language",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-language"},{scheme:"ms-settings-location",description:"ms-settings-location",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-location"},{scheme:"ms-settings-lock",description:"ms-settings-lock",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-lock"},{scheme:"ms-settings-nfctransactions",description:"ms-settings-nfctransactions",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-nfctransactions"},{scheme:"ms-settings-notifications",description:"ms-settings-notifications",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-notifications"},{scheme:"ms-settings-power",description:"ms-settings-power",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-power"},{scheme:"ms-settings-privacy",description:"ms-settings-privacy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-privacy"},{scheme:"ms-settings-proximity",description:"ms-settings-proximity",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-proximity"},{scheme:"ms-settings-screenrotation",description:"ms-settings-screenrotation",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-screenrotation"},{scheme:"ms-settings-wifi",description:"ms-settings-wifi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-wifi"},{scheme:"ms-settings-workplace",description:"ms-settings-workplace",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-workplace"},{scheme:"ms-spd",description:"ms-spd",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-spd"},{scheme:"ms-transit-to",description:"ms-transit-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-transit-to"},{scheme:"ms-visio",description:"ms-visio",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-visio"},{scheme:"ms-walk-to",description:"ms-walk-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-walk-to"},{scheme:"ms-word",description:"ms-word",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-word"},{scheme:"msnim",description:"msnim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/msnim"},{scheme:"mumble",description:"mumble",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mumble"},{scheme:"mvn",description:"mvn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mvn"},{scheme:"notes",description:"notes",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/notes"},{scheme:"oid",description:"oid",reference:[{type:"draft",href:"http://www.iana.org/go/draft-larmouth-oid-iri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/oid"},{scheme:"palm",description:"palm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/palm"},{scheme:"paparazzi",description:"paparazzi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/paparazzi"},{scheme:"platform",description:"platform",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/platform"},{scheme:"proxy",description:"proxy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/proxy"},{scheme:"psyc",description:"psyc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/psyc"},{scheme:"query",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/query"},{scheme:"redis",description:"redis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/redis"},{scheme:"rediss",description:"rediss",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rediss"},{scheme:"res",description:"res",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/res"},{scheme:"resource",description:"resource",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/resource"},{scheme:"rmi",description:"rmi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rmi"},{scheme:"rsync",description:"rsync",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5781"}]},{scheme:"rtmfp",description:"rtmfp",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7425"}],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmfp"},{scheme:"rtmp",description:"rtmp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmp"},{scheme:"secondlife",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/secondlife"},{scheme:"sftp",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sftp"},{scheme:"sgn",description:"sgn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sgn"},{scheme:"skype",description:"skype",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/skype"},{scheme:"smb",description:"smb",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/smb"},{scheme:"smtp",description:"smtp",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/smtp"},{scheme:"soldat",description:"soldat",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/soldat"},{scheme:"spotify",description:"spotify",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/spotify"},{scheme:"ssh",description:"ssh",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ssh"},{scheme:"steam",description:"steam",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/steam"},{scheme:"submit",description:"submit",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/submit"},{scheme:"svn",description:"svn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/svn"},{scheme:"teamspeak",description:"teamspeak",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teamspeak"},{scheme:"teliaeid",description:"teliaeid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teliaeid"},{scheme:"things",description:"things",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/things"},{scheme:"tool",description:"tool",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/tool"},{scheme:"udp",description:"udp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/udp"},{scheme:"unreal",description:"unreal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/unreal"},{scheme:"ut2004",description:"ut2004",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ut2004"},{scheme:"v-event",description:"v-event",reference:[{type:"draft",href:"http://www.iana.org/go/draft-menderico-v-event-uri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/v-event"},{scheme:"ventrilo",description:"ventrilo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ventrilo"},{scheme:"view-source",description:"view-source",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/view-source"},{scheme:"webcal",description:"webcal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/webcal"},{scheme:"wpid",description:"wpid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wpid"},{scheme:"wtai",description:"wtai",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wtai"},{scheme:"wyciwyg",description:"wyciwyg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wyciwyg"},{scheme:"xfire",description:"xfire",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xfire"},{scheme:"xri",description:"xri",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xri"},{scheme:"ymsgr",description:"ymsgr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ymsgr"}]}),Sl=K(function(t,e){e.exports=[{scheme:"fax",description:"fax",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"filesystem",description:"filesystem",reference:[],template:"http://www.iana.org/assignments/uri-schemes/historic/filesystem"},{scheme:"mailserver",description:"Access to data available from mail servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6196"}]},{scheme:"modem",description:"modem",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"pack",description:"pack",reference:[{type:"draft",href:"http://www.iana.org/go/draft-shur-pack-uri-scheme"}],template:"http://www.iana.org/assignments/uri-schemes/historic/pack"},{scheme:"prospero",description:"Prospero Directory Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4157"}]},{scheme:"snews",description:"NNTP over SSL/TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"videotex",description:"videotex",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mavrakis-videotex-url-spec"},{type:"rfc",href:"http://www.iana.org/go/rfc2122"},{type:"rfc",href:"http://www.iana.org/go/rfc3986"}],template:"http://www.iana.org/assignments/uri-schemes/historic/videotex"},{scheme:"wais",description:"Wide Area Information Servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4156"}]},{scheme:"z39.50",description:"Z39.50 information access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"},{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Pl=K(function(t,e){e.exports=[{scheme:"android-app"},{scheme:"webpack"},{scheme:"s3",description:"Amazon Web Services S3 bucket"},{scheme:"gs",description:"Google Cloud Storage"},{scheme:"mqtt",description:"Message Queuing Telemetry Transport Protocol"},{scheme:"modbus+tcp",description:"Modbus over TCP"}]}),Ji=K(function(t,e){var r=bl(),n={permanent:$l(),provosional:El(),historical:Sl()},s={};Object.keys(n).forEach(function(o){n[o].forEach(function(i){s[i.scheme]=r(i,{type:o})})}),n.unofficial=Pl().filter(function(o){return!s[o.scheme]}),n.unofficial.forEach(function(o){s[o.scheme]=r(o,{type:"unofficial"})}),e.exports=r(n,{allByName:s})}),kl=K(function(t,e){var{parse:r}=ps(),{addressParser:n}=gs(),s=Ji();function o(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const u=r(i);return!!(u.scheme==="mailto"&&u.to.every(o)||u.reference==="absolute"&&s.allByName[u.scheme])}}),Ol=K(function(t,e){e.exports=/^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/}),Nl=K(function(t,e){var{parse:r}=gs();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),Tl={};function Qi(t){return this[t]}function Rl(t,e){this[t]=jl.bind(null,e)}var Xi,Yi,Sr,vs,en,Il=(t,e,r)=>{var n=e&&typeof e=="object"||typeof e=="function"?vs(e):[];for(let s of n)!en.call(t,s)&&s!=="default"&&Sr(t,s,{get:Qi.bind(e,s),enumerable:!0})},Al,Gs=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=Al??(Al=new WeakMap),o=s.get(t);if(o)return o}r=t!=null?Xi(Yi(t)):{};let i=e||!t||!t.__esModule||!en.call(t,"default")?Sr(r,"default",{value:t,enumerable:!0}):r;if(t&&typeof t=="object"||typeof t=="function")for(let u of vs(t))en.call(i,u)||Sr(i,u,{get:Qi.bind(t,u),enumerable:!0});return n&&s.set(t,i),i},Cl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),jl=t=>t,Ml=(t,e)=>{for(var r in e)Sr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:Rl.bind(e,r)})},In,An,Cn,Dl,ql=jc(()=>{Xi=Object.create,{getPrototypeOf:Yi,defineProperty:Sr,getOwnPropertyNames:vs}=Object,en=Object.prototype.hasOwnProperty,In=Cl(function(t,e){var r=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},i=Math.floor,u=String.fromCharCode;function a(b){throw RangeError(o[b])}function f(b,g){let h=[],S=b.length;for(;S--;)h[S]=g(b[S]);return h}function l(b,g){let h=b.split("@"),S="";h.length>1&&(S=h[0]+"@",b=h[1]),b=b.replace(s,".");let O=b.split("."),A=f(O,g).join(".");return S+A}function d(b){let g=[],h=0,S=b.length;for(;h<S;){let O=b.charCodeAt(h++);if(O>=55296&&O<=56319&&h<S){let A=b.charCodeAt(h++);(A&64512)==56320?g.push(((O&1023)<<10)+(A&1023)+65536):(g.push(O),h--)}else g.push(O)}return g}var w=b=>String.fromCodePoint(...b),P=function(b){return b>=48&&b<58?26+(b-48):b>=65&&b<91?b-65:b>=97&&b<123?b-97:36},$=function(b,g){return b+22+75*(b<26)-((g!=0)<<5)},E=function(b,g,h){let S=0;for(b=h?i(b/700):b>>1,b+=i(b/g);b>455;S+=36)b=i(b/35);return i(S+36*b/(b+38))},m=function(b){let g=[],h=b.length,S=0,O=128,A=72,D=b.lastIndexOf("-");D<0&&(D=0);for(let q=0;q<D;++q)b.charCodeAt(q)>=128&&a("not-basic"),g.push(b.charCodeAt(q));for(let q=D>0?D+1:0;q<h;){let X=S;for(let Z=1,ce=36;;ce+=36){q>=h&&a("invalid-input");let ye=P(b.charCodeAt(q++));ye>=36&&a("invalid-input"),ye>i((2147483647-S)/Z)&&a("overflow"),S+=ye*Z;let Re=ce<=A?1:ce>=A+26?26:ce-A;if(ye<Re)break;let ie=36-Re;Z>i(2147483647/ie)&&a("overflow"),Z*=ie}let G=g.length+1;A=E(S-X,G,X==0),i(S/G)>2147483647-O&&a("overflow"),O+=i(S/G),S%=G,g.splice(S++,0,O)}return String.fromCodePoint(...g)},c=function(b){let g=[];b=d(b);let h=b.length,S=128,O=0,A=72;for(let X of b)X<128&&g.push(u(X));let D=g.length,q=D;for(D&&g.push("-");q<h;){let X=2147483647;for(let Z of b)Z>=S&&Z<X&&(X=Z);let G=q+1;X-S>i((2147483647-O)/G)&&a("overflow"),O+=(X-S)*G,S=X;for(let Z of b)if(Z<S&&++O>2147483647&&a("overflow"),Z===S){let ce=O;for(let ye=36;;ye+=36){let Re=ye<=A?1:ye>=A+26?26:ye-A;if(ce<Re)break;let ie=ce-Re,z=36-Re;g.push(u($(Re+ie%z,0))),ce=i(ie/z)}g.push(u($(ce,0))),A=E(O,G,q===D),O=0,++q}++O,++S}return g.join("")},_=function(b){return l(b,function(g){return r.test(g)?m(g.slice(4).toLowerCase()):g})},p=function(b){return l(b,function(g){return n.test(g)?"xn--"+c(g):g})},v={version:"2.3.1",ucs2:{decode:d,encode:w},decode:m,encode:c,toASCII:p,toUnicode:_};e.exports=v}),An={},Ml(An,{default:()=>Cn.default}),Il(An,Gs(In())),Cn=Gs(In()),Dl=Cn.default}),Ll=K(function(t,e){var{toASCII:r}=(ql(),Cc(Tl)),n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;e.exports=s=>{const o=r(s);return o.replace(/\.$/,"").length<=253&&n.test(o)}}),Vl=K(function(t,e){var{parse:r}=ps(),{addressParser:n}=gs(),s=Ji();function o(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const u=r(i);return u.scheme==="mailto"&&u.to.every(o)||u.reference==="absolute"&&u.path!==void 0&&s.allByName[u.scheme]?!0:u.scheme&&!s.allByName[u.scheme]?!1:u.path!==void 0&&(u.reference==="relative"||u.reference==="same-document"||u.reference==="uri")}}),Ul=K(function(t,e){t.iri=kl(),t.duration=Ol(),t["idn-email"]=Nl(),t["idn-hostname"]=Ll(),t["iri-reference"]=Vl()}),Fl=K(function(t,e){var r=Ul();e.exports=(n,s={})=>{const o=Object.keys(r);let i=o;if(s.formats){if(!Array.isArray(s.formats))throw new Error("options.formats must be an array");i=s.formats}return o.filter(u=>i.includes(u)).forEach(u=>{n.addFormat(u,r[u])}),n}}),zl=K(function(t,e){var r=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function o(f,l,d){this.fn=f,this.context=l,this.once=d||!1}function i(f,l,d,w,P){if(typeof d!="function")throw new TypeError("The listener must be a function");var $=new o(d,w||f,P),E=n?n+l:l;return f._events[E]?f._events[E].fn?f._events[E]=[f._events[E],$]:f._events[E].push($):(f._events[E]=$,f._eventsCount++),f}function u(f,l){--f._eventsCount===0?f._events=new s:delete f._events[l]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var l=[],d,w;if(this._eventsCount===0)return l;for(w in d=this._events)r.call(d,w)&&l.push(n?w.slice(1):w);return Object.getOwnPropertySymbols?l.concat(Object.getOwnPropertySymbols(d)):l},a.prototype.listeners=function(l){var d=n?n+l:l,w=this._events[d];if(!w)return[];if(w.fn)return[w.fn];for(var P=0,$=w.length,E=new Array($);P<$;P++)E[P]=w[P].fn;return E},a.prototype.listenerCount=function(l){var d=n?n+l:l,w=this._events[d];return w?w.fn?1:w.length:0},a.prototype.emit=function(l,d,w,P,$,E){var m=n?n+l:l;if(!this._events[m])return!1;var c=this._events[m],_=arguments.length,p,v;if(c.fn){switch(c.once&&this.removeListener(l,c.fn,void 0,!0),_){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,d),!0;case 3:return c.fn.call(c.context,d,w),!0;case 4:return c.fn.call(c.context,d,w,P),!0;case 5:return c.fn.call(c.context,d,w,P,$),!0;case 6:return c.fn.call(c.context,d,w,P,$,E),!0}for(v=1,p=new Array(_-1);v<_;v++)p[v-1]=arguments[v];c.fn.apply(c.context,p)}else{var b=c.length,g;for(v=0;v<b;v++)switch(c[v].once&&this.removeListener(l,c[v].fn,void 0,!0),_){case 1:c[v].fn.call(c[v].context);break;case 2:c[v].fn.call(c[v].context,d);break;case 3:c[v].fn.call(c[v].context,d,w);break;case 4:c[v].fn.call(c[v].context,d,w,P);break;default:if(!p)for(g=1,p=new Array(_-1);g<_;g++)p[g-1]=arguments[g];c[v].fn.apply(c[v].context,p)}}return!0},a.prototype.on=function(l,d,w){return i(this,l,d,w,!1)},a.prototype.once=function(l,d,w){return i(this,l,d,w,!0)},a.prototype.removeListener=function(l,d,w,P){var $=n?n+l:l;if(!this._events[$])return this;if(!d)return u(this,$),this;var E=this._events[$];if(E.fn)E.fn===d&&(!P||E.once)&&(!w||E.context===w)&&u(this,$);else{for(var m=0,c=[],_=E.length;m<_;m++)(E[m].fn!==d||P&&!E[m].once||w&&E[m].context!==w)&&c.push(E[m]);c.length?this._events[$]=c.length===1?c[0]:c:u(this,$)}return this},a.prototype.removeAllListeners=function(l){var d;return l?(d=n?n+l:l,this._events[d]&&u(this,d)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,typeof e<"u"&&(e.exports=a)}),Bl="https://www.w3.org/ns/activitystreams",xl="https://sockethub.org/ns/context/v1.jsonld",Hl="error",Kl="https://sockethub.org/ns/context/platform/error/v1.jsonld",Gl="sockethub:internal",Wl="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",ys=new Map,Zi=new Map,ea=new Map;function Jl(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function Ql(t){return Jl(t["@context"])}function ta(t,e,r,n){ys.set(e,t),Zi.set(e,r),ea.set(e,n)}function dn(t){const r=Ql(t).filter(n=>ys.has(n));return r.length!==1?null:r[0]}function ra(t){return ys.get(t)}function Xl(t){return Zi.get(t)}function Yl(t){return ea.get(t)}var na={feed:{required:["id","type"],additionalProperties:!0,properties:{type:{enum:["feed"]},id:{type:"string",format:"iri"},name:{type:"string"},description:{type:"string"},author:{type:"string"},favicon:{type:"string"}}},person:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["person"]},name:{type:"string"}}},room:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["room"]},name:{type:"string"}}},service:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["service"]},name:{type:"string"}}},platform:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["platform"]},name:{type:"string"}}},website:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["website"]},name:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},calendar:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["calendar"]},name:{type:"string"},components:{type:"array",items:{enum:["event","task"]}}}},addressBook:{required:["id","type"],additionalProperties:!1,properties:{id:{type:"string",format:"iri"},type:{enum:["addressBook"]}}}},Zl=Object.keys(na),sa=["person","room","service","feed","website","platform"],ia=["person","room","service","feed","website","platform","address","calendar","addressBook"],ef=sa.map(t=>({$ref:`#/definitions/type/${t}`})),tf=ia.map(t=>({$ref:`#/definitions/type/${t}`})),rf={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:Bl}},{contains:{const:xl}}]},nf={type:"string"},sf={$id:"https://sockethub.org/schemas/v/activity-stream.json",description:"Schema for Sockethub Activity Streams",type:"object",required:["@context","type","actor"],additionalProperties:!1,properties:{"@context":rf,id:{type:"string"},type:nf,actor:{type:"object",oneOf:ef},target:{type:"object",oneOf:tf},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:na}},af={version:"3.0.0-beta.1"};function of(t,e){return t.replace("/v/",`/${e}/`)}var cf={$id:"https://sockethub.org/schemas/v/sockethub-config.json"};of(cf.$id,af.version);var uf=Pr(Bi()),Cr,Ws=!1;function hn(){if(Cr===void 0)try{new Function("return true"),Cr=!0}catch{Cr=!1}return Cr}function pn(){Ws||(Ws=!0,console.warn("[@sockethub/schemas] Schema validation is disabled: this environment's Content Security Policy blocks `new Function`, which Ajv needs to compile schemas. The Sockethub server still validates every message."))}var Js={type:"integer",minimum:0},lf={type:"string",minLength:1},Qs={type:"string",pattern:"^/(?![/\\\\])[^\\s\\\\]*$"},ff={$id:"https://sockethub.org/schemas/v/service-descriptor.json",description:"Sockethub service descriptor",type:"object",required:["name","apiVersion","platforms"],additionalProperties:!0,properties:{name:{const:"sockethub"},apiVersion:Js,endpoints:{type:"object",required:["socketIO"],additionalProperties:!0,properties:{socketIO:Qs,httpActions:Qs}},platforms:{type:"array",items:{type:"object",required:["id","apiVersion"],additionalProperties:!0,properties:{id:lf,apiVersion:Js}}}}},jn,Xs;function df(t){return hn()?(jn||(jn=new uf.default({strictTypes:!1,allErrors:!0})),Xs??(Xs=jn.compile(ff)),Xs(t)):(pn(),hf(t))}function hf(t){if(!t||typeof t!="object")return!1;const e=t;if(e.name!=="sockethub"||!Ys(e.apiVersion)||!Array.isArray(e.platforms))return!1;for(const r of e.platforms){if(!r||typeof r!="object")return!1;const n=r;if(typeof n.id!="string"||n.id.length===0||!Ys(n.apiVersion))return!1}if(e.endpoints!==void 0){if(!e.endpoints||typeof e.endpoints!="object")return!1;const r=e.endpoints;if(!Zs(r.socketIO)||r.httpActions!==void 0&&!Zs(r.httpActions))return!1}return!0}function Ys(t){return typeof t=="number"&&Number.isInteger(t)&&t>=0}function Zs(t){return typeof t=="string"&&/^\/(?![/\\])[^\s\\]*$/.test(t)}var pf=Pr(Bi()),mf=Pr(yl()),gf=Pr(Fl());function vf(t){let e=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return t.keyword==="additionalProperties"?e+=`: ${t.params.additionalProperty}`:t.keyword==="enum"&&(e+=`: ${t.params.allowedValues.join(", ")}`),e}var yf=64;function wr(t,e=0){const r=[];if(e>yf)return r;t!=null&&t.type&&r.push(t.type);const n=t;for(const s in n){const o=n[s];o&&typeof o=="object"&&"type"in o&&r.push(...wr(o,e+1))}return r}function _f(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function wf(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function bf(t,e){const r=_f(t),n=wf(t);if(!n)return-1;const s=e[n];return!s||!r||!s.includes(r)?-1:t.instancePath.split("/").length}function $f(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:wr(t)};const e=t;return{actor:wr(e.actor),target:wr(e.target),object:e.object?wr(e.object):[]}}function Ef(t,e,r){const n=$f(t);let s=0,o=-1;for(let i=0;i<e.length;i++){const u=bf(e[i],n);u>o&&(o=u,s=i)}return o>=0?vf(e[s]):Pf(e[e.length-1],r)}function Sf(t,e){if(!(e!=null&&e.excludeTypes)||e.excludeTypes.length===0)return t;const r=new Set(e.excludeTypes);return t.filter(n=>!r.has(n))}function Pf(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],s=n==="actor"?sa:n==="target"?ia:Zl,o=Sf(s,e),i=o.length>0?o:s;r=`${t.instancePath}: ${t.message}: ${i.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var qt="https://sockethub.org/schemas/v0",Jn={},kf={},ei=!1;Jn[`${qt}/activity-stream`]=sf;var Mn;function _s(){if(!hn()){pn();return}if(!Mn){const t=new pf.default({strictTypes:!1,allErrors:!0});mf.default(t),gf.default(t);for(const e in Jn)t.addSchema(Jn[e],e);Mn=t}return Mn}function ti(t,e){ta(t,e,`${qt}/context/${t}/messages`,`${qt}/context/${t}/credentials`);const r=_s();if(!r)return;const n=`${qt}/context/${t}/messages`;r.getSchema(n)||r.addSchema({},n);const s=`${qt}/context/${t}/credentials`;r.getSchema(s)||r.addSchema({},s)}function Of(){ei||(ti(Hl,Kl),ti(Gl,Wl),ei=!0)}Of();function tn(t,e){const r=_s();if(!r)return"";const n=r.getSchema(t);if(!n)return`schema ${t} not found`;if(!n(e)){let o=Ef(e,n.errors,kf);if(Array.isArray(e["@context"])){const i=dn(e);if(i){const u=ra(i);u&&(o=`[${u}] ${o}`)}}return o}return""}function Nf(t){if(!hn())return pn(),"";const e=tn(`${qt}/activity-stream`,t);if(e)return e;const r=dn(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=Xl(r);return n?tn(n,t):`platform context URL ${r} does not have a registered message schema`}function Tf(t){if(!hn())return pn(),"";if(!Array.isArray(t["@context"]))return"credential activity streams must have an @context set";if(t.type!=="credentials")return"credential activity streams must have credentials set as type";const e=tn(`${qt}/activity-stream`,t);if(e)return e;const r=dn(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=Yl(r);return n?tn(n,t):`platform context URL ${r} does not have a registered credentials schema`}function ri(t,e){const r=_s();if(!r)return;const n=`${qt}/context/${e}`;r.getSchema(n)||r.addSchema(t,n)}function Rf(t,e){ta(t,e,`${qt}/context/${t}/messages`,`${qt}/context/${t}/credentials`)}function Qn(t){const e=dn(t);return e?ra(e)??null:null}var ni={actor:"id",target:"id",object:"content"};function If(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function Dn(t){const e={...t};for(const r of Object.keys(ni))r in e&&(e[r]=If(e[r],ni[r]));return e}var Af=Pr(zl()),Cf=Af.default,jf=/^v?(\d+)(?:\.\d+){0,2}(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function qn(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function si(t){return typeof t=="number"&&Number.isSafeInteger(t)&&t>=0}function ii(t){if(!t||typeof t!="object")return;const{apiVersion:e,version:r}=t;if(si(e))return e;if(typeof r=="string"){const n=jf.exec(r.trim()),s=n?Number(n[1]):void 0;if(si(s))return s}}function Mf(t){var i,u;if(!t||typeof t!="object")return;const e=t,r=(i=e.contexts)==null?void 0:i.as,n=(u=e.contexts)==null?void 0:u.sockethub;if(typeof r!="string"||typeof n!="string"||!Array.isArray(e.platforms))return;const s=ii(e);if(s===void 0)return;const o=new Map;for(const a of e.platforms){if(!a||typeof a!="object"||typeof a.id!="string"||typeof a.contextUrl!="string"||typeof a.contextVersion!="string"||typeof a.schemaVersion!="string")continue;const f=ii(a);if(f===void 0)continue;const l=qn(a.schemas)?a.schemas:{};o.set(a.id,{id:a.id,apiVersion:f,contextUrl:a.contextUrl,contextVersion:a.contextVersion,schemaVersion:a.schemaVersion,types:Array.isArray(a.types)?a.types.filter(d=>typeof d=="string"):[],schemas:{credentials:qn(l.credentials)?l.credentials:void 0,messages:qn(l.messages)?l.messages:void 0}})}return{apiVersion:s,asContextUrl:r,sockethubContextUrl:n,platforms:o}}function Df(t){Rf(t.id,t.contextUrl);try{t.schemas.credentials&&ri(t.schemas.credentials,`${t.id}/credentials`),t.schemas.messages&&ri(t.schemas.messages,`${t.id}/messages`)}catch(e){const r=e instanceof Error?e.message:String(e);console.warn(`[SockethubClient] Failed to register schemas for platform ${t.id}: ${r}`)}}class Kt extends Error{constructor(e,r){super(e,r),this.name="DiscoveryError"}}async function qf(t,e={}){let r;try{r=new URL(t)}catch(f){throw new Kt(`Sockethub discovery needs an absolute base URL, got ${JSON.stringify(t)}`,{cause:f})}if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Kt(`Sockethub discovery needs an http(s) base URL, got ${JSON.stringify(t)}`);const n=e.fetch??globalThis.fetch;if(typeof n!="function")throw new Kt("Sockethub discovery needs fetch(); pass one in the options");const s=new AbortController,o=e.discoveryTimeoutMs??1e4,i=setTimeout(()=>s.abort(),o),u=()=>s.signal.aborted;let a;try{let f;try{f=await n(r.href,{headers:{accept:"application/json"},signal:s.signal})}catch(l){const d=u()?`timed out after ${o}ms`:l instanceof Error?l.message:String(l);throw new Kt(`Sockethub discovery failed: could not reach ${r.href} (${d})`,{cause:l})}if(!f.ok)throw new Kt(`Sockethub discovery failed: ${r.href} answered ${f.status}`);try{a=await f.json()}catch(l){throw new Kt(u()?`Sockethub discovery failed: ${r.href} timed out after ${o}ms while sending the descriptor`:`Sockethub discovery failed: ${r.href} did not return JSON; is it a Sockethub server?`,{cause:l})}}finally{clearTimeout(i)}if(!df(a))throw new Kt(`Sockethub discovery failed: ${r.href} did not return a valid service descriptor`);return a}function Lf(t,e){const r=new URL(e,t);if(r.origin!==new URL(t).origin)throw new Kt(`Sockethub discovery failed: endpoint path ${JSON.stringify(e)} resolves to ${r.origin}, not ${t}`);return r.href}async function Vf(t){if(t)return t;const e=globalThis.io;if(typeof e=="function")return e;try{const r=await vo(()=>import("./BRcKhWZZ.js"),[],import.meta.url);if(typeof r.io=="function")return r.io}catch{}throw new Error("SockethubClient.connect() needs socket.io-client: install it, load /socket.io.js, or pass `io` in the options")}function Ln(t){return typeof t=="object"&&t!==null&&"error"in t&&!!t.error}function ws(t){return"actor"in t&&t.actor!==null&&typeof t.actor=="object"&&"id"in t.actor&&typeof t.actor.id=="string"}function ai(t){var e,r;return(t==null?void 0:t.type)==="update"&&((e=t.object)==null?void 0:e.type)==="address"&&ws(t)&&typeof t.target=="object"&&typeof((r=t.target)==null?void 0:r.id)=="string"&&t.target.id!==t.actor.id}function Vn(t){var s;const e=((s=t.actor)==null?void 0:s.id)||t.actor;if(!e)throw new Error(`actor property not present for message type: ${t==null?void 0:t.type}`);const r=t.target?t.target.id||t.target:"";return`${Qn(t)??""}:${e}-${r}`}class Uf{constructor(){et(this,"events",{credentials:new Map,connect:new Map,join:new Map})}recordCredentials(e){e.object&&e.object.type==="credentials"&&this.events.credentials.set(Vn(e),e)}recordMessage(e){const r=Vn(e);e.type==="join"||e.type==="connect"?this.events[e.type].set(r,e):e.type==="leave"?this.events.join.delete(r):e.type==="disconnect"&&this.events.connect.delete(r)}moveActor(e){const r=e.actor.id,n=e.target,s=n.id,o=typeof n.name=="string"?n.name:void 0,i=Qn(e)??"",u=[];for(const a of Object.values(this.events))for(const[f,l]of[...a]){if(!ws(l)||l.actor.id!==r||(Qn(l)??"")!==i)continue;const d={...l,actor:{...l.actor,id:s,...o?{name:o}:{}}};a.delete(f),a.set(Vn(d),d),u.push([r,s])}return u}}class mn{constructor(e,r={},n){et(this,"replayStore",new Uf);et(this,"_socket");et(this,"socket");et(this,"debug",!0);et(this,"descriptor");et(this,"serverOrigin");et(this,"options");et(this,"platformRegistry",new Map);et(this,"asContextUrl");et(this,"sockethubContextUrl");et(this,"apiVersion");et(this,"initState","idle");et(this,"hasReadyOnce",!1);et(this,"initCycle");et(this,"initTokenCounter",0);et(this,"initTimeoutTimer");et(this,"waitingWarningTimer");et(this,"waitingWarningIntervalMs",1e4);et(this,"readyWaiters",[]);et(this,"outboundQueue",[]);et(this,"outboundSequence",0);et(this,"registryFingerprint");et(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.descriptor=n==null?void 0:n.descriptor,this.serverOrigin=n==null?void 0:n.serverOrigin,this.options={initTimeoutMs:r.initTimeoutMs??5e3,maxQueuedOutbound:r.maxQueuedOutbound??1e3,maxQueuedAgeMs:r.maxQueuedAgeMs??3e4,validation:r.validation??"auto"},this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this._socket.connected&&(this.socket.connected=!0,this.socket.id=this._socket.id,this.socket._emit("connect"),this.startInitialization("initial-connect",!0))}endpointUrl(e){var n,s;const r=(s=(n=this.descriptor)==null?void 0:n.endpoints)==null?void 0:s[e];if(!(!this.serverOrigin||!r))return Lf(this.serverOrigin,r)}static async connect(e,r={}){var P;const{io:n,socketOptions:s,fetch:o,discoveryTimeoutMs:i,...u}=r,a=await qf(e,{fetch:o,discoveryTimeoutMs:i}),f=(P=a.endpoints)==null?void 0:P.socketIO;if(!f)throw new Kt(`Sockethub discovery failed: ${e} does not advertise a Socket.IO endpoint (older server?); pass a socket to the constructor instead`);const l=new URL(e).origin,w=(await Vf(n))(l,{...s,path:f});return new mn(w,u,{descriptor:a,serverOrigin:l})}clearCredentials(){this.replayStore.events.credentials.clear()}getRegisteredPlatforms(){return Array.from(this.platformRegistry.values()).map(e=>({...e,types:[...e.types],schemas:{...e.schemas}}))}isSchemasReady(){return this.isReady()}isReady(){return this.initState==="ready"}getInitState(){return this.initState}getRegisteredBaseContexts(){if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");return{as:this.asContextUrl,sockethub:this.sockethubContextUrl}}getPlatformSchema(e,r="messages"){var s,o;const n=e==null?void 0:e.trim();if(n)return(o=(s=this.platformRegistry.get(n))==null?void 0:s.schemas)==null?void 0:o[r]}async waitForSchemas(e=2e3){return await this.ready(e),this.buildPlatformRegistryPayload()}ready(e=this.options.initTimeoutMs){return this.isReady()&&this.latestReadyInfo?Promise.resolve(this.latestReadyInfo):new Promise((r,n)=>{const s={resolve:r,reject:n};e>0&&(s.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(o=>o!==s),n(new Error(`SockethubClient ready() timed out after ${e}ms`))},e)),this.readyWaiters.push(s),this.socket.connected&&this.initState==="idle"&&this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)})}validateActivity(e){return this.options.validation==="off"?"":e.type==="credentials"?Tf(e):Nf(e)}contextFor(e){if(typeof e!="string"||e.trim().length===0)throw new Error("SockethubClient.contextFor(platform) requires a non-empty platform string");if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");const r=e.trim(),n=this.platformRegistry.get(r);if(!n){const s=Array.from(this.platformRegistry.keys()).sort();throw new Error(`unknown platform '${r}'. Registered platforms: ${s.join(", ")}`)}return[this.asContextUrl,this.sockethubContextUrl,n.contextUrl]}createPublicEmitter(){const e=new Cf;return e._emit=e.emit,e.emit=(r,n,s)=>{this.handlePublicEmit(r,n,s)},e.connected=!1,e.disconnect=()=>{this._socket.disconnect()},e.connect=()=>{this._socket.connect()},e}requestSchemaRegistry(){"io"in this._socket&&this._socket.emit("schemas",this.registryFingerprint,r=>{this.handleSchemasPayload(r)})}applyPlatformRegistry(e){const r=Mf(e);if(!r)return;this.apiVersion=r.apiVersion,this.asContextUrl=r.asContextUrl,this.sockethubContextUrl=r.sockethubContextUrl,this.platformRegistry=r.platforms;for(const o of r.platforms.values())Df(o);const n=this.buildPlatformRegistryPayload(),s=e;return this.registryFingerprint=typeof s.fingerprint=="string"?s.fingerprint:void 0,this.socket._emit("schemas",n),n}buildPlatformRegistryPayload(){return{apiVersion:this.apiVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(this.apiVersion===void 0||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,apiVersion:this.apiVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,apiVersion:r.apiVersion,contextUrl:r.contextUrl,contextVersion:r.contextVersion,schemaVersion:r.schemaVersion,types:[...r.types]}))}}resolveReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.resolve(e)}rejectReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.reject(e)}emitInitError(e,r,n){this.socket._emit("init_error",{error:e,phase:r,retrying:n})}emitClientError(e,r,n){if(typeof r=="function"){r({error:n});return}this.socket._emit("client_error",{event:e,error:n})}clearInitTimers(){this.initTimeoutTimer&&(clearTimeout(this.initTimeoutTimer),this.initTimeoutTimer=void 0),this.waitingWarningTimer&&(clearInterval(this.waitingWarningTimer),this.waitingWarningTimer=void 0)}startWaitingWarnings(){this.waitingWarningTimer||(this.waitingWarningTimer=setInterval(()=>{if(this.isReady()||this.initState==="closed"){this.clearInitTimers();return}const e=this.outboundQueue.length,r=this.outboundQueue[0],n=r?((Date.now()-r.enqueuedAt)/1e3).toFixed(1):"0.0";console.warn(`[SockethubClient] Still waiting for schemas; queued outbound messages: ${e}; oldest queued age: ${n}s.`)},this.waitingWarningIntervalMs))}startInitialization(e,r){if(!this.socket.connected||this.initState==="closed")return;const n=++this.initTokenCounter;this.initCycle={token:n,reason:e,startedAt:Date.now(),replayOnReady:r,timedOut:!1},this.initState="initializing",this.clearInitTimers(),this.initTimeoutTimer=setTimeout(()=>{if(!this.initCycle||this.initCycle.token!==n)return;this.initCycle.timedOut=!0,this.initState="init_error";const s=`Initialization timed out after ${this.options.initTimeoutMs}ms waiting for schemas`;console.warn(`[SockethubClient] ${s}; queued outbound messages: ${this.outboundQueue.length}. Waiting for schemas event from server.`),this.emitInitError(s,"timeout",!1),this.startWaitingWarnings()},this.options.initTimeoutMs);try{this.requestSchemaRegistry()}catch(s){this.initState="init_error";const o=s instanceof Error?s.message:String(s);this.emitInitError(o,"schemas-request",!1),this.startWaitingWarnings()}}markReady(e){const r=this.initCycle,n=!!(r!=null&&r.replayOnReady);this.initCycle=void 0,this.clearInitTimers(),this.initState="ready",this.hasReadyOnce=!0;const s=this.buildReadyInfo(e);if(!s){const o=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(o.message,"schemas-apply",!0),this.rejectReadyWaiters(o);return}if(this.socket._emit("ready",s),this.latestReadyInfo=s,this.resolveReadyWaiters(s),n){const{credentials:o,connect:i,join:u}=this.replayStore.events;this.replay("credentials",o),this.replay("message",i),this.replay("message",u)}this.flushOutboundQueue()}handleSchemasPayload(e){if(!e||typeof e!="object")return;if(e.unchanged===!0&&typeof this.registryFingerprint=="string"&&this.platformRegistry.size>0){this.initCycle?this.markReady(this.initCycle.reason):this.initState!=="ready"&&this.markReady("schemas-update");return}const r=e.fingerprint;if(this.initState==="ready"&&!this.initCycle&&r&&r===this.registryFingerprint)return;if(this.initState==="ready"&&!this.initCycle&&(this.initState="initializing"),!this.applyPlatformRegistry(e)){this.initState="init_error",this.emitInitError("Received invalid schemas payload from server","schemas-apply",!0),this.startWaitingWarnings();return}if(this.initCycle){this.markReady(this.initCycle.reason);return}this.markReady("schemas-update")}handlePublicEmit(e,r,n){const s={event:e,content:r,callback:n,enqueuedAt:Date.now(),sequence:this.outboundSequence++};if(!this.isReady()){this.enqueueOutbound(s);return}this.sendOutbound(s)}enqueueOutbound(e){if(this.outboundQueue.push(e),this.outboundQueue.length<=this.options.maxQueuedOutbound)return;const r=this.outboundQueue.shift();r&&this.emitClientError(r.event,r.callback,"SockethubClient queue overflow before ready")}flushOutboundQueue(){if(!this.isReady()||this.outboundQueue.length===0)return;const e=Date.now(),r=this.outboundQueue.sort((n,s)=>n.sequence-s.sequence);this.outboundQueue=[];for(const n of r){if(e-n.enqueuedAt>this.options.maxQueuedAgeMs){this.emitClientError(n.event,n.callback,`SockethubClient queued message expired after ${this.options.maxQueuedAgeMs}ms before initialization`);continue}this.sendOutbound(n)}}sendOutbound(e){let r=e.content;try{if(e.event==="credentials"||e.event==="message"){if(r=Dn(e.content),r&&typeof r=="object"){const s=r;e.event==="credentials"&&!s.type&&(s.type="credentials"),s.actor&&typeof s.actor=="object"&&!s.actor.type&&(s.actor.type="person")}if(this.platformRegistry.size>0){const s=this.validateActivity(r);if(s){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${s}`);return}}}let n=e.callback;e.event==="credentials"?this.replayStore.recordCredentials(r):e.event==="message"&&(this._socket.connected&&this.replayStore.recordMessage(r),n=this.rememberRequestedRename(r,n)),this._socket.emit(e.event,r,n)}catch(n){const s=n instanceof Error?n.message:String(n);this.emitClientError(e.event,e.callback,s)}}log(e,r){this.debug&&console.log(e,r)}registerSocketIOHandlers(){this._socket.on("connect",()=>{this.socket.id=this._socket.id,this.socket.connected=!0,this.socket._emit("connect"),this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)}),this._socket.on("connect_error",e=>{this.socket._emit("connect_error",e)}),this._socket.on("disconnect",e=>{this.socket.connected=!1,this.initState!=="closed"&&(this.initState="idle"),this.clearInitTimers(),this.socket._emit("disconnect",e)}),this._socket.on("schemas",e=>{this.handleSchemasPayload(e)}),this._socket.on("message",e=>{const r=Dn(e);this.followActorRename(r),this.socket._emit("message",r)})}followActorRename(e){Ln(e)||ai(e)&&this.moveReplayState(e)}rememberRequestedRename(e,r){return ai(e)?(...n)=>{const[s,o]=n;s instanceof Error||Ln(s)||Ln(o)||this.moveReplayState(e),typeof r=="function"&&r(...n)}:r}moveReplayState(e){for(const[r,n]of this.replayStore.moveActor(e))this.log(`replay state moved from ${r} to ${n}`)}replay(e,r){for(const n of r.values()){const s=Dn(n);let o=s==null?void 0:s.id;if(ws(s)){const i=s.actor;o=typeof i=="string"?i:i.id}this.log(`replaying ${e} for ${o}`),this._socket.emit(e,s)}}}(t=>{t.SockethubClient=mn})(typeof globalThis=="object"?globalThis:{});const Vt=Object.create(null);Vt.open="0";Vt.close="1";Vt.ping="2";Vt.pong="3";Vt.message="4";Vt.upgrade="5";Vt.noop="6";const Lr=Object.create(null);Object.keys(Vt).forEach(t=>{Lr[Vt[t]]=t});const Xn={type:"error",data:"parser error"},aa=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",oa=typeof ArrayBuffer=="function",ca=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,bs=({type:t,data:e},r,n)=>aa&&e instanceof Blob?r?n(e):oi(e,n):oa&&(e instanceof ArrayBuffer||ca(e))?r?n(e):oi(new Blob([e]),n):n(Vt[t]+(e||"")),oi=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function ci(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Un;function Ff(t,e){if(aa&&t.data instanceof Blob)return t.data.arrayBuffer().then(ci).then(e);if(oa&&(t.data instanceof ArrayBuffer||ca(t.data)))return e(ci(t.data));bs(t,!1,r=>{Un||(Un=new TextEncoder),e(Un.encode(r))})}const ui="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",br=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<ui.length;t++)br[ui.charCodeAt(t)]=t;const zf=t=>{let e=t.length*.75,r=t.length,n,s=0,o,i,u,a;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),l=new Uint8Array(f);for(n=0;n<r;n+=4)o=br[t.charCodeAt(n)],i=br[t.charCodeAt(n+1)],u=br[t.charCodeAt(n+2)],a=br[t.charCodeAt(n+3)],l[s++]=o<<2|i>>4,l[s++]=(i&15)<<4|u>>2,l[s++]=(u&3)<<6|a&63;return f},Bf=typeof ArrayBuffer=="function",$s=(t,e)=>{if(typeof t!="string")return{type:"message",data:ua(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:xf(t.substring(1),e)}:Lr[r]?t.length>1?{type:Lr[r],data:t.substring(1)}:{type:Lr[r]}:Xn},xf=(t,e)=>{if(Bf){const r=zf(t);return ua(r,e)}else return{base64:!0,data:t}},ua=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},la="",Hf=(t,e)=>{const r=t.length,n=new Array(r);let s=0;t.forEach((o,i)=>{bs(o,!1,u=>{n[i]=u,++s===r&&e(n.join(la))})})},Kf=(t,e)=>{const r=t.split(la),n=[];for(let s=0;s<r.length;s++){const o=$s(r[s],e);if(n.push(o),o.type==="error")break}return n};function Gf(){return new TransformStream({transform(t,e){Ff(t,r=>{const n=r.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const o=new DataView(s.buffer);o.setUint8(0,126),o.setUint16(1,n)}else{s=new Uint8Array(9);const o=new DataView(s.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(r)})}})}let Fn;function jr(t){return t.reduce((e,r)=>e+r.length,0)}function Mr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let s=0;s<e;s++)r[s]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function Wf(t,e){Fn||(Fn=new TextDecoder);const r=[];let n=0,s=-1,o=!1;return new TransformStream({transform(i,u){for(r.push(i);;){if(n===0){if(jr(r)<1)break;const a=Mr(r,1);o=(a[0]&128)===128,s=a[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(jr(r)<2)break;const a=Mr(r,2);s=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),n=3}else if(n===2){if(jr(r)<8)break;const a=Mr(r,8),f=new DataView(a.buffer,a.byteOffset,a.length),l=f.getUint32(0);if(l>Math.pow(2,21)-1){u.enqueue(Xn);break}s=l*Math.pow(2,32)+f.getUint32(4),n=3}else{if(jr(r)<s)break;const a=Mr(r,s);u.enqueue($s(o?a:Fn.decode(a),e)),n=0}if(s===0||s>t){u.enqueue(Xn);break}}}})}const fa=4;function ft(t){if(t)return Jf(t)}function Jf(t){for(var e in ft.prototype)t[e]=ft.prototype[e];return t}ft.prototype.on=ft.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ft.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ft.prototype.off=ft.prototype.removeListener=ft.prototype.removeAllListeners=ft.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,s=0;s<r.length;s++)if(n=r[s],n===e||n.fn===e){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ft.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,s=r.length;n<s;++n)r[n].apply(this,e)}return this};ft.prototype.emitReserved=ft.prototype.emit;ft.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ft.prototype.hasListeners=function(t){return!!this.listeners(t).length};const gn=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ot=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Qf="arraybuffer";function da(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const Xf=Ot.setTimeout,Yf=Ot.clearTimeout;function vn(t,e){e.useNativeTimers?(t.setTimeoutFn=Xf.bind(Ot),t.clearTimeoutFn=Yf.bind(Ot)):(t.setTimeoutFn=Ot.setTimeout.bind(Ot),t.clearTimeoutFn=Ot.clearTimeout.bind(Ot))}const Zf=1.33;function ed(t){return typeof t=="string"?td(t):Math.ceil((t.byteLength||t.size)*Zf)}function td(t){let e=0,r=0;for(let n=0,s=t.length;n<s;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function ha(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function rd(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function nd(t){let e={},r=t.split("&");for(let n=0,s=r.length;n<s;n++){let o=r[n].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class sd extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Es extends ft{constructor(e){super(),this.writable=!1,vn(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new sd(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=$s(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=rd(e);return r.length?"?"+r:""}}class id extends Es{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};Kf(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Hf(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=ha()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let pa=!1;try{pa=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const ad=pa;function od(){}class cd extends id{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(s,o)=>{this.onError("xhr post error",s,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class Lt extends ft{constructor(e,r,n){super(),this.createRequest=e,vn(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=da(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var s;n.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Lt.requestsCount++,Lt.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=od,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Lt.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Lt.requestsCount=0;Lt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",li);else if(typeof addEventListener=="function"){const t="onpagehide"in Ot?"pagehide":"unload";addEventListener(t,li,!1)}}function li(){for(let t in Lt.requests)Lt.requests.hasOwnProperty(t)&&Lt.requests[t].abort()}const ud=function(){const t=ma({xdomain:!1});return t&&t.responseType!==null}();class ld extends cd{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=ud&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Lt(ma,this.uri(),e)}}function ma(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||ad))return new XMLHttpRequest}catch{}if(!e)try{return new Ot[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ga=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class fd extends Es{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=ga?{}:da(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],s=r===e.length-1;bs(n,this.supportsBinary,o=>{try{this.doWrite(n,o)}catch{}s&&gn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=ha()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const zn=Ot.WebSocket||Ot.MozWebSocket;class dd extends fd{createSocket(e,r,n){return ga?new zn(e,r,n):r?new zn(e,r):new zn(e)}doWrite(e,r){this.ws.send(r)}}class hd extends Es{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=Wf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),s=Gf();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const o=()=>{n.read().then(({done:u,value:a})=>{u||(this.onPacket(a),o())}).catch(u=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],s=r===e.length-1;this._writer.write(n).then(()=>{s&&gn(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const pd={websocket:dd,webtransport:hd,polling:ld},md=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gd=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Yn(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let s=md.exec(t||""),o={},i=14;for(;i--;)o[gd[i]]=s[i]||"";return r!=-1&&n!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=vd(o,o.path),o.queryKey=yd(o,o.query),o}function vd(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function yd(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,o){s&&(r[s]=o)}),r}const Zn=typeof addEventListener=="function"&&typeof removeEventListener=="function",Vr=[];Zn&&addEventListener("offline",()=>{Vr.forEach(t=>t())},!1);class Yt extends ft{constructor(e,r){if(super(),this.binaryType=Qf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=Yn(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Yn(r.host).host);vn(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const s=n.prototype.name;this.transports.push(s),this._transportsByName[s]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=nd(this.opts.query)),Zn&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Vr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=fa,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Yt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Yt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(r+=ed(s)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,gn(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,s){if(typeof r=="function"&&(s=r,r=void 0),typeof n=="function"&&(s=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const o={type:e,data:r,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(Yt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Zn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Vr.indexOf(this._offlineEventListener);n!==-1&&Vr.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Yt.protocol=fa;class _d extends Yt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;Yt.priorWebsocketSuccess=!1;const s=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Yt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(l(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=r.name,this.emitReserved("upgradeError",w)}}))};function o(){n||(n=!0,l(),r.close(),r=null)}const i=d=>{const w=new Error("probe error: "+d);w.transport=r.name,o(),this.emitReserved("upgradeError",w)};function u(){i("transport closed")}function a(){i("socket closed")}function f(d){r&&d.name!==r.name&&o()}const l=()=>{r.removeListener("open",s),r.removeListener("error",i),r.removeListener("close",u),this.off("close",a),this.off("upgrading",f)};r.once("open",s),r.once("error",i),r.once("close",u),this.once("close",a),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let wd=class extends _d{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>pd[s]).filter(s=>!!s)),super(e,n)}};function bd(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Yn(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+e,n.href=n.protocol+"://"+o+(r&&r.port===n.port?"":":"+n.port),n}const $d=typeof ArrayBuffer=="function",Ed=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,va=Object.prototype.toString,Sd=typeof Blob=="function"||typeof Blob<"u"&&va.call(Blob)==="[object BlobConstructor]",Pd=typeof File=="function"||typeof File<"u"&&va.call(File)==="[object FileConstructor]";function Ss(t){return $d&&(t instanceof ArrayBuffer||Ed(t))||Sd&&t instanceof Blob||Pd&&t instanceof File}function Ur(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(Ur(t[r]))return!0;return!1}if(Ss(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ur(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&Ur(t[r]))return!0;return!1}function kd(t){const e=[],r=t.data,n=t;return n.data=es(r,e),n.attachments=e.length,{packet:n,buffers:e}}function es(t,e){if(!t)return t;if(Ss(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=es(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=es(t[n],e));return r}return t}function Od(t,e){return t.data=ts(t.data,e),delete t.attachments,t}function ts(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=ts(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=ts(t[r],e));return t}const Nd=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Td=5;var Le;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Le||(Le={}));class Rd{constructor(e){this.replacer=e}encode(e){return(e.type===Le.EVENT||e.type===Le.ACK)&&Ur(e)?this.encodeAsBinary({type:e.type===Le.EVENT?Le.BINARY_EVENT:Le.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===Le.BINARY_EVENT||e.type===Le.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=kd(e),n=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(n),s}}function fi(t){return Object.prototype.toString.call(t)==="[object Object]"}class Ps extends ft{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===Le.BINARY_EVENT;n||r.type===Le.BINARY_ACK?(r.type=n?Le.EVENT:Le.ACK,this.reconstructor=new Id(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ss(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(Le[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Le.BINARY_EVENT||n.type===Le.BINARY_ACK){const o=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const i=e.substring(o,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(i)}if(e.charAt(r+1)==="/"){const o=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(o,r)}else n.nsp="/";const s=e.charAt(r+1);if(s!==""&&Number(s)==s){const o=r+1;for(;++r;){const i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(o,r+1))}if(e.charAt(++r)){const o=this.tryParse(e.substr(r));if(Ps.isPayloadValid(n.type,o))n.data=o;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Le.CONNECT:return fi(r);case Le.DISCONNECT:return r===void 0;case Le.CONNECT_ERROR:return typeof r=="string"||fi(r);case Le.EVENT:case Le.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Nd.indexOf(r[0])===-1);case Le.ACK:case Le.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Id{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=Od(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Ad=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ps,Encoder:Rd,get PacketType(){return Le},protocol:Td},Symbol.toStringTag,{value:"Module"}));function Rt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Cd=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ya extends ft{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Rt(e,"open",this.onopen.bind(this)),Rt(e,"packet",this.onpacket.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,s,o;if(Cd.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const i={type:Le.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const l=this.ids++,d=r.pop();this._registerAckCallback(l,d),i.id=l}const u=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,a=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!u||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var n;const s=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(s===void 0){this.acks[e]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let u=0;u<this.sendBuffer.length;u++)this.sendBuffer[u].id===e&&this.sendBuffer.splice(u,1);r.call(this,new Error("operation has timed out"))},s),i=(...u)=>{this.io.clearTimeoutFn(o),r.apply(this,u)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,s)=>{const o=(i,u)=>i?s(i):n(u);o.withError=!0,r.push(o),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...o)=>(this._queue[0],s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...o)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Le.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Le.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Le.EVENT:case Le.BINARY_EVENT:this.onevent(e);break;case Le.ACK:case Le.BINARY_ACK:this.onack(e);break;case Le.DISCONNECT:this.ondisconnect();break;case Le.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...s){n||(n=!0,r.packet({type:Le.ACK,id:e,data:s}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Le.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function fr(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}fr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};fr.prototype.reset=function(){this.attempts=0};fr.prototype.setMin=function(t){this.ms=t};fr.prototype.setMax=function(t){this.max=t};fr.prototype.setJitter=function(t){this.jitter=t};class rs extends ft{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,vn(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new fr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const s=r.parser||Ad;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new wd(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=Rt(r,"open",function(){n.onopen(),e&&e()}),o=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),e?e(u):this.maybeReconnectOnOpen()},i=Rt(r,"error",o);if(this._timeout!==!1){const u=this._timeout,a=this.setTimeoutFn(()=>{s(),o(new Error("timeout")),r.close()},u);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(s),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Rt(e,"ping",this.onping.bind(this)),Rt(e,"data",this.ondata.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(e,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){gn(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new ya(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const vr={};function Fr(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=bd(t,e.path||"/socket.io"),n=r.source,s=r.id,o=r.path,i=vr[s]&&o in vr[s].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let a;return u?a=new rs(n,e):(vr[s]||(vr[s]=new rs(n,e)),a=vr[s]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(Fr,{Manager:rs,Socket:ya,io:Fr,connect:Fr});const Bn={},di=lr(void 0);function Jd(t){return[...t].sort((e,r)=>e.id==="dummy"||r.id==="dummy"?e.id===r.id?0:e.id==="dummy"?-1:1:e.id.localeCompare(r.id))}function jd(t=globalThis.location,e=Bn==null?void 0:Bn.VITE_SOCKETHUB_URL){if(typeof e=="string"&&e.trim()!=="")return e.trim();const r=t==null?void 0:t.origin;return r&&r!=="null"?r:void 0}function Md(t){return t instanceof Error?t.message:String(t)}let vt;const Dd=lr(!1);async function _a(){if(!vt)throw new Error("Sockethub client is not initialized yet");await vt.ready()}async function Qd(t){return await _a(),vt.contextFor(t)}function Xd(t){return{id:t.id,type:t.type,name:t.name??t.id}}async function Yd(t){return await _a(),console.log("sending ->",t),new Promise((e,r)=>{const n=Tn("SEND",t);vt.socket.emit("message",n,s=>{if(console.log("received <-",s),Tn("RESP",s),s.totalItems&&s.items)for(const o of s.items.reverse())Tn("RESP",o,!0,n.id);Ti(s,!0),s.error?r(s.error):e(s)})})}function xn(t){return e=>{const r=t==="connect";Dd.update(()=>r),console.log(`sockethub ${t} [connected: ${r}]`,e||"")}}function qd(t){console.log("handle incoming: ",t),Ti(t,!1)}async function Ld(t){try{vt=await mn.connect(t,{io:Fr,initTimeoutMs:1e4})}catch(e){console.error("sockethub discovery failed",e),di.set({state:"unavailable",reason:Md(e)});return}vt.descriptor&&vt.serverOrigin&&di.set({state:"available",descriptor:vt.descriptor,serverOrigin:vt.serverOrigin}),vt.socket.on("connect",xn("connect")),vt.socket.on("error",xn("error")),vt.socket.on("disconnect",xn("disconnect")),vt.socket.on("message",qd),vt.socket.on("schemas",e=>{console.log("schemas received:",e),Rn("schemas",e)}),vt.socket.on("ready",e=>{console.log("client ready:",e),Rn("ready",e)}),vt.socket.on("init_error",e=>{console.error("client init error:",e),Rn("init_error",e)})}const Hn=jd();Hn&&(console.log("connecting to sockethub via discovery at",Hn),Ld(Hn));export{hd as A,ft as E,Kd as I,Gd as L,Yo as M,id as P,wd as S,dd as W,ld as X,Xd as a,Hd as b,Qd as c,_a as d,Gn as e,vt as f,It as g,Bo as h,$i as i,ur as j,di as k,Jd as l,Lf as m,xd as n,Dd as o,Ao as p,To as q,Do as r,Yd as s,Oo as t,Yn as u,Le as v,vn as w,Ad as x,gn as y,Td as z};
|
|
37
|
+
from .`,reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4452"}]},{scheme:"ipp",description:"Internet Printing Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3510"}]},{scheme:"ipps",description:"Internet Printing Protocol over HTTPS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7472"}]},{scheme:"iris",description:"Internet Registry Information Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3981"}]},{scheme:"iris.beep",description:"iris.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3983"}]},{scheme:"iris.lwz",description:"iris.lwz",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4993"}]},{scheme:"iris.xpc",description:"iris.xpc",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"iris.xpcs",description:"iris.xpcs",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4992"}]},{scheme:"jabber",description:"jabber",reference:[],template:"http://www.iana.org/assignments/uri-schemes/perm/jabber"},{scheme:"ldap",description:"Lightweight Directory Access Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4516"}]},{scheme:"mailto",description:"Electronic mail address",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6068"}]},{scheme:"mid",description:"message identifier",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2392"}]},{scheme:"msrp",description:"Message Session Relay Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"msrps",description:"Message Session Relay Protocol Secure",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4975"}]},{scheme:"mtqp",description:"Message Tracking Query Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3887"}]},{scheme:"mupdate",description:"Mailbox Update (MUPDATE) Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3656"}]},{scheme:"news",description:"USENET news",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"nfs",description:"network file system protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2224"}]},{scheme:"ni",description:"ni",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nih",description:"nih",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6920"}]},{scheme:"nntp",description:"USENET news using NNTP access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"opaquelocktoken",description:"opaquelocktokent",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4918"}]},{scheme:"pkcs11",description:"PKCS#11",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7512"}]},{scheme:"pop",description:"Post Office Protocol v3",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2384"}]},{scheme:"pres",description:"Presence",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3859"}]},{scheme:"reload",description:"reload",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6940"}]},{scheme:"rtsp",description:"Real-time Streaming Protocol (RTSP)",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtsps",description:"Real-time Streaming Protocol (RTSP) over TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"},{type:"draft",href:"http://www.iana.org/go/RFC-ietf-mmusic-rfc2326bis-40"}]},{scheme:"rtspu",description:"Real-time Streaming Protocol (RTSP) over unreliable datagram transport",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2326"}]},{scheme:"service",description:"service location",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2609"}]},{scheme:"session",description:"session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6787"}]},{scheme:"shttp",description:"Secure Hypertext Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2660"}]},{scheme:"sieve",description:"ManageSieve Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5804"}]},{scheme:"sip",description:"session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sips",description:"secure session initiation protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3261"}]},{scheme:"sms",description:"Short Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5724"}]},{scheme:"snmp",description:"Simple Network Management Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4088"}]},{scheme:"soap.beep",description:"soap.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"soap.beeps",description:"soap.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4227"}]},{scheme:"stun",description:"stun",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"stuns",description:"stuns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7064"}]},{scheme:"tag",description:"tag",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4151"}]},{scheme:"tel",description:"telephone",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"telnet",description:"Reference to interactive sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4248"}]},{scheme:"tftp",description:"Trivial File Transfer Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3617"}]},{scheme:"thismessage",description:"multipart/related relative reference resolution",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2557"}],template:"http://www.iana.org/assignments/uri-schemes/perm/thismessage"},{scheme:"tip",description:"Transaction Internet Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2371"}]},{scheme:"tn3270",description:"Interactive 3270 emulation sessions",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6270"}]},{scheme:"turn",description:"turn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"turns",description:"turns",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7065"}]},{scheme:"tv",description:"TV Broadcasts",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2838"}]},{scheme:"urn",description:"Uniform Resource Names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2141"},{type:"registry",href:"http://www.iana.org/assignments/urn-namespaces"}]},{scheme:"vemmi",description:"versatile multimedia interface",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2122"}]},{scheme:"vnc",description:"Remote Framebuffer Protocol",reference:[{type:"draft",href:"http://www.iana.org/go/RFC-warden-appsawg-vnc-scheme-10"}]},{scheme:"ws",description:"WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"wss",description:"Encrypted WebSocket connections",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6455"}]},{scheme:"xcon",description:"xcon",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xcon-userid",description:"xcon-userid",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6501"}]},{scheme:"xmlrpc.beep",description:"xmlrpc.beep",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmlrpc.beeps",description:"xmlrpc.beeps",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc3529"}]},{scheme:"xmpp",description:"Extensible Messaging and Presence Protocol",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5122"}]},{scheme:"z39.50r",description:"Z39.50 Retrieval",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]},{scheme:"z39.50s",description:"Z39.50 Session",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Pl=K(function(t,e){e.exports=[{scheme:"acr",description:"acr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/acr"},{scheme:"adiumxtra",description:"adiumxtra",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/adiumxtra"},{scheme:"afp",description:"afp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/afp"},{scheme:"afs",description:"Andrew File System global file names",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"}]},{scheme:"aim",description:"aim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aim"},{scheme:"appdata",description:"appdata",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/appdata"},{scheme:"apt",description:"apt",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/apt"},{scheme:"attachment",description:"attachment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/attachment"},{scheme:"aw",description:"aw",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/aw"},{scheme:"barion",description:"barion",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/barion"},{scheme:"beshare",description:"beshare",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/beshare"},{scheme:"bitcoin",description:"bitcoin",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bitcoin"},{scheme:"blob",description:"blob",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/blob"},{scheme:"bolo",description:"bolo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/bolo"},{scheme:"callto",description:"callto",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/callto"},{scheme:"chrome",description:"chrome",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome"},{scheme:"chrome-extension",description:"chrome-extension",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/chrome-extension"},{scheme:"com-eventbrite-attendee",description:"com-eventbrite-attendee",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/com-eventbrite-attendee"},{scheme:"content",description:"content",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/content"},{scheme:"cvs",description:"cvs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/cvs"},{scheme:"dis",description:"dis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dis"},{scheme:"dlna-playcontainer",description:"dlna-playcontainer",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playcontainer"},{scheme:"dlna-playsingle",description:"dlna-playsingle",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dlna-playsingle"},{scheme:"dntp",description:"dntp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/dntp"},{scheme:"dtn",description:"DTNRG research and development",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5050"}]},{scheme:"dvb",description:"dvb",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mcroberts-uri-dvb"}]},{scheme:"ed2k",description:"ed2k",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ed2k"},{scheme:"facetime",description:"facetime",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/facetime"},{scheme:"feed",description:"feed",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feed"},{scheme:"feedready",description:"feedready",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/feedready"},{scheme:"finger",description:"finger",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/finger"},{scheme:"fish",description:"fish",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/fish"},{scheme:"gg",description:"gg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gg"},{scheme:"git",description:"git",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/git"},{scheme:"gizmoproject",description:"gizmoproject",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gizmoproject"},{scheme:"gtalk",description:"gtalk",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/gtalk"},{scheme:"ham",description:"ham",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7046"}]},{scheme:"hcp",description:"hcp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/hcp"},{scheme:"icon",description:"icon",reference:[{type:"draft",href:"http://www.iana.org/go/draft-lafayette-icon-uri-scheme"}]},{scheme:"iotdisco",description:"iotdisco",reference:[{type:"uri",href:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco.pdf"}],template:"http://www.iana.org/assignments/uri-schemes/prov/iotdisco"},{scheme:"ipn",description:"ipn",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6260"}]},{scheme:"irc",description:"irc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc"},{scheme:"irc6",description:"irc6",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/irc6"},{scheme:"ircs",description:"ircs",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ircs"},{scheme:"isostore",description:"isostore",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/isostore"},{scheme:"itms",description:"itms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/itms"},{scheme:"jar",description:"jar",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/jar"},{scheme:"jms",description:"Java Message Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6167"}]},{scheme:"keyparc",description:"keyparc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/keyparc"},{scheme:"lastfm",description:"lastfm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/lastfm"},{scheme:"ldaps",description:"ldaps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ldaps"},{scheme:"magnet",description:"magnet",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/magnet"},{scheme:"maps",description:"maps",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/maps"},{scheme:"market",description:"market",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/market"},{scheme:"message",description:"message",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/message"},{scheme:"mms",description:"mms",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mms"},{scheme:"ms-access",description:"ms-access",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-access"},{scheme:"ms-drive-to",description:"ms-drive-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-drive-to"},{scheme:"ms-enrollment",description:"ms-enrollment",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-enrollment"},{scheme:"ms-excel",description:"ms-excel",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-excel"},{scheme:"ms-getoffice",description:"ms-getoffice",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-getoffice"},{scheme:"ms-help",description:"ms-help",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-help"},{scheme:"ms-infopath",description:"ms-infopath",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-infopath"},{scheme:"ms-media-stream-id",description:"ms-media-stream-id",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-media-stream-id"},{scheme:"ms-powerpoint",description:"ms-powerpoint",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-powerpoint"},{scheme:"ms-project",description:"ms-project",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-project"},{scheme:"ms-publisher",description:"ms-publisher",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-publisher"},{scheme:"ms-search-repair",description:"ms-search-repair",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-search-repair"},{scheme:"ms-secondary-screen-controller",description:"ms-secondary-screen-controller",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-controller"},{scheme:"ms-secondary-screen-setup",description:"ms-secondary-screen-setup",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-secondary-screen-setup"},{scheme:"ms-settings",description:"ms-settings",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings"},{scheme:"ms-settings-airplanemode",description:"ms-settings-airplanemode",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-airplanemode"},{scheme:"ms-settings-bluetooth",description:"ms-settings-bluetooth",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-bluetooth"},{scheme:"ms-settings-camera",description:"ms-settings-camera",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-camera"},{scheme:"ms-settings-cellular",description:"ms-settings-cellular",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cellular"},{scheme:"ms-settings-cloudstorage",description:"ms-settings-cloudstorage",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-cloudstorage"},{scheme:"ms-settings-connectabledevices",description:"ms-settings-connectabledevices",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-connectabledevices"},{scheme:"ms-settings-displays-topology",description:"ms-settings-displays-topology",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-displays-topology"},{scheme:"ms-settings-emailandaccounts",description:"ms-settings-emailandaccounts",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-emailandaccounts"},{scheme:"ms-settings-language",description:"ms-settings-language",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-language"},{scheme:"ms-settings-location",description:"ms-settings-location",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-location"},{scheme:"ms-settings-lock",description:"ms-settings-lock",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-lock"},{scheme:"ms-settings-nfctransactions",description:"ms-settings-nfctransactions",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-nfctransactions"},{scheme:"ms-settings-notifications",description:"ms-settings-notifications",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-notifications"},{scheme:"ms-settings-power",description:"ms-settings-power",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-power"},{scheme:"ms-settings-privacy",description:"ms-settings-privacy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-privacy"},{scheme:"ms-settings-proximity",description:"ms-settings-proximity",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-proximity"},{scheme:"ms-settings-screenrotation",description:"ms-settings-screenrotation",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-screenrotation"},{scheme:"ms-settings-wifi",description:"ms-settings-wifi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-wifi"},{scheme:"ms-settings-workplace",description:"ms-settings-workplace",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-settings-workplace"},{scheme:"ms-spd",description:"ms-spd",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-spd"},{scheme:"ms-transit-to",description:"ms-transit-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-transit-to"},{scheme:"ms-visio",description:"ms-visio",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-visio"},{scheme:"ms-walk-to",description:"ms-walk-to",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-walk-to"},{scheme:"ms-word",description:"ms-word",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ms-word"},{scheme:"msnim",description:"msnim",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/msnim"},{scheme:"mumble",description:"mumble",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mumble"},{scheme:"mvn",description:"mvn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/mvn"},{scheme:"notes",description:"notes",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/notes"},{scheme:"oid",description:"oid",reference:[{type:"draft",href:"http://www.iana.org/go/draft-larmouth-oid-iri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/oid"},{scheme:"palm",description:"palm",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/palm"},{scheme:"paparazzi",description:"paparazzi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/paparazzi"},{scheme:"platform",description:"platform",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/platform"},{scheme:"proxy",description:"proxy",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/proxy"},{scheme:"psyc",description:"psyc",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/psyc"},{scheme:"query",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/query"},{scheme:"redis",description:"redis",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/redis"},{scheme:"rediss",description:"rediss",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rediss"},{scheme:"res",description:"res",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/res"},{scheme:"resource",description:"resource",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/resource"},{scheme:"rmi",description:"rmi",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rmi"},{scheme:"rsync",description:"rsync",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5781"}]},{scheme:"rtmfp",description:"rtmfp",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc7425"}],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmfp"},{scheme:"rtmp",description:"rtmp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/rtmp"},{scheme:"secondlife",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/secondlife"},{scheme:"sftp",description:"query",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sftp"},{scheme:"sgn",description:"sgn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/sgn"},{scheme:"skype",description:"skype",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/skype"},{scheme:"smb",description:"smb",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/smb"},{scheme:"smtp",description:"smtp",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/smtp"},{scheme:"soldat",description:"soldat",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/soldat"},{scheme:"spotify",description:"spotify",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/spotify"},{scheme:"ssh",description:"ssh",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ssh"},{scheme:"steam",description:"steam",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/steam"},{scheme:"submit",description:"submit",reference:[{type:"draft",href:"http://www.iana.org/go/draft-melnikov-smime-msa-to-mda"}],template:"http://www.iana.org/assignments/uri-schemes/prov/submit"},{scheme:"svn",description:"svn",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/svn"},{scheme:"teamspeak",description:"teamspeak",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teamspeak"},{scheme:"teliaeid",description:"teliaeid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/teliaeid"},{scheme:"things",description:"things",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/things"},{scheme:"tool",description:"tool",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/tool"},{scheme:"udp",description:"udp",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/udp"},{scheme:"unreal",description:"unreal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/unreal"},{scheme:"ut2004",description:"ut2004",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ut2004"},{scheme:"v-event",description:"v-event",reference:[{type:"draft",href:"http://www.iana.org/go/draft-menderico-v-event-uri"}],template:"http://www.iana.org/assignments/uri-schemes/prov/v-event"},{scheme:"ventrilo",description:"ventrilo",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ventrilo"},{scheme:"view-source",description:"view-source",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/view-source"},{scheme:"webcal",description:"webcal",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/webcal"},{scheme:"wpid",description:"wpid",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wpid"},{scheme:"wtai",description:"wtai",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wtai"},{scheme:"wyciwyg",description:"wyciwyg",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/wyciwyg"},{scheme:"xfire",description:"xfire",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xfire"},{scheme:"xri",description:"xri",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/xri"},{scheme:"ymsgr",description:"ymsgr",reference:[],template:"http://www.iana.org/assignments/uri-schemes/prov/ymsgr"}]}),kl=K(function(t,e){e.exports=[{scheme:"fax",description:"fax",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"filesystem",description:"filesystem",reference:[],template:"http://www.iana.org/assignments/uri-schemes/historic/filesystem"},{scheme:"mailserver",description:"Access to data available from mail servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc6196"}]},{scheme:"modem",description:"modem",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc2806"},{type:"rfc",href:"http://www.iana.org/go/rfc3966"}]},{scheme:"pack",description:"pack",reference:[{type:"draft",href:"http://www.iana.org/go/draft-shur-pack-uri-scheme"}],template:"http://www.iana.org/assignments/uri-schemes/historic/pack"},{scheme:"prospero",description:"Prospero Directory Service",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4157"}]},{scheme:"snews",description:"NNTP over SSL/TLS",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc5538"}]},{scheme:"videotex",description:"videotex",reference:[{type:"draft",href:"http://www.iana.org/go/draft-mavrakis-videotex-url-spec"},{type:"rfc",href:"http://www.iana.org/go/rfc2122"},{type:"rfc",href:"http://www.iana.org/go/rfc3986"}],template:"http://www.iana.org/assignments/uri-schemes/historic/videotex"},{scheme:"wais",description:"Wide Area Information Servers",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc4156"}]},{scheme:"z39.50",description:"Z39.50 information access",reference:[{type:"rfc",href:"http://www.iana.org/go/rfc1738"},{type:"rfc",href:"http://www.iana.org/go/rfc2056"}]}]}),Ol=K(function(t,e){e.exports=[{scheme:"android-app"},{scheme:"webpack"},{scheme:"s3",description:"Amazon Web Services S3 bucket"},{scheme:"gs",description:"Google Cloud Storage"},{scheme:"mqtt",description:"Message Queuing Telemetry Transport Protocol"},{scheme:"modbus+tcp",description:"Modbus over TCP"}]}),Xi=K(function(t,e){var r=El(),n={permanent:Sl(),provosional:Pl(),historical:kl()},s={};Object.keys(n).forEach(function(o){n[o].forEach(function(i){s[i.scheme]=r(i,{type:o})})}),n.unofficial=Ol().filter(function(o){return!s[o.scheme]}),n.unofficial.forEach(function(o){s[o.scheme]=r(o,{type:"unofficial"})}),e.exports=r(n,{allByName:s})}),Nl=K(function(t,e){var{parse:r}=ms(),{addressParser:n}=vs(),s=Xi();function o(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const l=r(i);return!!(l.scheme==="mailto"&&l.to.every(o)||l.reference==="absolute"&&s.allByName[l.scheme])}}),Tl=K(function(t,e){e.exports=/^P(?!$)(\d+(?:\.\d+)?Y)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?W)?(\d+(?:\.\d+)?D)?(T(?=\d)(\d+(?:\.\d+)?H)?(\d+(?:\.\d+)?M)?(\d+(?:\.\d+)?S)?)?$/}),Rl=K(function(t,e){var{parse:r}=vs();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),Il={};function Yi(t){return this[t]}function Cl(t,e){this[t]=Dl.bind(null,e)}var Zi,ea,Sr,ys,rn,Al=(t,e,r)=>{var n=e&&typeof e=="object"||typeof e=="function"?ys(e):[];for(let s of n)!rn.call(t,s)&&s!=="default"&&Sr(t,s,{get:Yi.bind(e,s),enumerable:!0})},jl,Ws=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=jl??(jl=new WeakMap),o=s.get(t);if(o)return o}r=t!=null?Zi(ea(t)):{};let i=e||!t||!t.__esModule||!rn.call(t,"default")?Sr(r,"default",{value:t,enumerable:!0}):r;if(t&&typeof t=="object"||typeof t=="function")for(let l of ys(t))rn.call(i,l)||Sr(i,l,{get:Yi.bind(t,l),enumerable:!0});return n&&s.set(t,i),i},Ml=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Dl=t=>t,ql=(t,e)=>{for(var r in e)Sr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:Cl.bind(e,r)})},An,jn,Mn,Ll,Vl=Dc(()=>{Zi=Object.create,{getPrototypeOf:ea,defineProperty:Sr,getOwnPropertyNames:ys}=Object,rn=Object.prototype.hasOwnProperty,An=Ml(function(t,e){var r=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,o={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},i=Math.floor,l=String.fromCharCode;function a(b){throw RangeError(o[b])}function f(b,g){let h=[],S=b.length;for(;S--;)h[S]=g(b[S]);return h}function u(b,g){let h=b.split("@"),S="";h.length>1&&(S=h[0]+"@",b=h[1]),b=b.replace(s,".");let O=b.split("."),C=f(O,g).join(".");return S+C}function d(b){let g=[],h=0,S=b.length;for(;h<S;){let O=b.charCodeAt(h++);if(O>=55296&&O<=56319&&h<S){let C=b.charCodeAt(h++);(C&64512)==56320?g.push(((O&1023)<<10)+(C&1023)+65536):(g.push(O),h--)}else g.push(O)}return g}var w=b=>String.fromCodePoint(...b),P=function(b){return b>=48&&b<58?26+(b-48):b>=65&&b<91?b-65:b>=97&&b<123?b-97:36},$=function(b,g){return b+22+75*(b<26)-((g!=0)<<5)},E=function(b,g,h){let S=0;for(b=h?i(b/700):b>>1,b+=i(b/g);b>455;S+=36)b=i(b/35);return i(S+36*b/(b+38))},m=function(b){let g=[],h=b.length,S=0,O=128,C=72,D=b.lastIndexOf("-");D<0&&(D=0);for(let q=0;q<D;++q)b.charCodeAt(q)>=128&&a("not-basic"),g.push(b.charCodeAt(q));for(let q=D>0?D+1:0;q<h;){let X=S;for(let Z=1,ce=36;;ce+=36){q>=h&&a("invalid-input");let ye=P(b.charCodeAt(q++));ye>=36&&a("invalid-input"),ye>i((2147483647-S)/Z)&&a("overflow"),S+=ye*Z;let Re=ce<=C?1:ce>=C+26?26:ce-C;if(ye<Re)break;let ie=36-Re;Z>i(2147483647/ie)&&a("overflow"),Z*=ie}let G=g.length+1;C=E(S-X,G,X==0),i(S/G)>2147483647-O&&a("overflow"),O+=i(S/G),S%=G,g.splice(S++,0,O)}return String.fromCodePoint(...g)},c=function(b){let g=[];b=d(b);let h=b.length,S=128,O=0,C=72;for(let X of b)X<128&&g.push(l(X));let D=g.length,q=D;for(D&&g.push("-");q<h;){let X=2147483647;for(let Z of b)Z>=S&&Z<X&&(X=Z);let G=q+1;X-S>i((2147483647-O)/G)&&a("overflow"),O+=(X-S)*G,S=X;for(let Z of b)if(Z<S&&++O>2147483647&&a("overflow"),Z===S){let ce=O;for(let ye=36;;ye+=36){let Re=ye<=C?1:ye>=C+26?26:ye-C;if(ce<Re)break;let ie=ce-Re,z=36-Re;g.push(l($(Re+ie%z,0))),ce=i(ie/z)}g.push(l($(ce,0))),C=E(O,G,q===D),O=0,++q}++O,++S}return g.join("")},_=function(b){return u(b,function(g){return r.test(g)?m(g.slice(4).toLowerCase()):g})},p=function(b){return u(b,function(g){return n.test(g)?"xn--"+c(g):g})},v={version:"2.3.1",ucs2:{decode:d,encode:w},decode:m,encode:c,toASCII:p,toUnicode:_};e.exports=v}),jn={},ql(jn,{default:()=>Mn.default}),Al(jn,Ws(An())),Mn=Ws(An()),Ll=Mn.default}),Ul=K(function(t,e){var{toASCII:r}=(Vl(),Mc(Il)),n=/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i;e.exports=s=>{const o=r(s);return o.replace(/\.$/,"").length<=253&&n.test(o)}}),Fl=K(function(t,e){var{parse:r}=ms(),{addressParser:n}=vs(),s=Xi();function o(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const l=r(i);return l.scheme==="mailto"&&l.to.every(o)||l.reference==="absolute"&&l.path!==void 0&&s.allByName[l.scheme]?!0:l.scheme&&!s.allByName[l.scheme]?!1:l.path!==void 0&&(l.reference==="relative"||l.reference==="same-document"||l.reference==="uri")}}),zl=K(function(t,e){t.iri=Nl(),t.duration=Tl(),t["idn-email"]=Rl(),t["idn-hostname"]=Ul(),t["iri-reference"]=Fl()}),Bl=K(function(t,e){var r=zl();e.exports=(n,s={})=>{const o=Object.keys(r);let i=o;if(s.formats){if(!Array.isArray(s.formats))throw new Error("options.formats must be an array");i=s.formats}return o.filter(l=>i.includes(l)).forEach(l=>{n.addFormat(l,r[l])}),n}}),xl=K(function(t,e){var r=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function o(f,u,d){this.fn=f,this.context=u,this.once=d||!1}function i(f,u,d,w,P){if(typeof d!="function")throw new TypeError("The listener must be a function");var $=new o(d,w||f,P),E=n?n+u:u;return f._events[E]?f._events[E].fn?f._events[E]=[f._events[E],$]:f._events[E].push($):(f._events[E]=$,f._eventsCount++),f}function l(f,u){--f._eventsCount===0?f._events=new s:delete f._events[u]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],d,w;if(this._eventsCount===0)return u;for(w in d=this._events)r.call(d,w)&&u.push(n?w.slice(1):w);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},a.prototype.listeners=function(u){var d=n?n+u:u,w=this._events[d];if(!w)return[];if(w.fn)return[w.fn];for(var P=0,$=w.length,E=new Array($);P<$;P++)E[P]=w[P].fn;return E},a.prototype.listenerCount=function(u){var d=n?n+u:u,w=this._events[d];return w?w.fn?1:w.length:0},a.prototype.emit=function(u,d,w,P,$,E){var m=n?n+u:u;if(!this._events[m])return!1;var c=this._events[m],_=arguments.length,p,v;if(c.fn){switch(c.once&&this.removeListener(u,c.fn,void 0,!0),_){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,d),!0;case 3:return c.fn.call(c.context,d,w),!0;case 4:return c.fn.call(c.context,d,w,P),!0;case 5:return c.fn.call(c.context,d,w,P,$),!0;case 6:return c.fn.call(c.context,d,w,P,$,E),!0}for(v=1,p=new Array(_-1);v<_;v++)p[v-1]=arguments[v];c.fn.apply(c.context,p)}else{var b=c.length,g;for(v=0;v<b;v++)switch(c[v].once&&this.removeListener(u,c[v].fn,void 0,!0),_){case 1:c[v].fn.call(c[v].context);break;case 2:c[v].fn.call(c[v].context,d);break;case 3:c[v].fn.call(c[v].context,d,w);break;case 4:c[v].fn.call(c[v].context,d,w,P);break;default:if(!p)for(g=1,p=new Array(_-1);g<_;g++)p[g-1]=arguments[g];c[v].fn.apply(c[v].context,p)}}return!0},a.prototype.on=function(u,d,w){return i(this,u,d,w,!1)},a.prototype.once=function(u,d,w){return i(this,u,d,w,!0)},a.prototype.removeListener=function(u,d,w,P){var $=n?n+u:u;if(!this._events[$])return this;if(!d)return l(this,$),this;var E=this._events[$];if(E.fn)E.fn===d&&(!P||E.once)&&(!w||E.context===w)&&l(this,$);else{for(var m=0,c=[],_=E.length;m<_;m++)(E[m].fn!==d||P&&!E[m].once||w&&E[m].context!==w)&&c.push(E[m]);c.length?this._events[$]=c.length===1?c[0]:c:l(this,$)}return this},a.prototype.removeAllListeners=function(u){var d;return u?(d=n?n+u:u,this._events[d]&&l(this,d)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,typeof e<"u"&&(e.exports=a)}),Hl="https://www.w3.org/ns/activitystreams",Kl="https://sockethub.org/ns/context/v1.jsonld",Gl="error",Wl="https://sockethub.org/ns/context/platform/error/v1.jsonld",Jl="sockethub:internal",Ql="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",_s=new Map,ta=new Map,ra=new Map;function Xl(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function Yl(t){return Xl(t["@context"])}function na(t,e,r,n){_s.set(e,t),ta.set(e,r),ra.set(e,n)}function mn(t){const r=Yl(t).filter(n=>_s.has(n));return r.length!==1?null:r[0]}function sa(t){return _s.get(t)}function Zl(t){return ta.get(t)}function ef(t){return ra.get(t)}var ia={feed:{required:["id","type"],additionalProperties:!0,properties:{type:{enum:["feed"]},id:{type:"string",format:"iri"},name:{type:"string"},description:{type:"string"},author:{type:"string"},favicon:{type:"string"}}},person:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["person"]},name:{type:"string"}}},room:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["room"]},name:{type:"string"}}},service:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["service"]},name:{type:"string"}}},platform:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string"},type:{enum:["platform"]},name:{type:"string"}}},website:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["website"]},name:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},calendar:{required:["id","type"],additionalProperties:!0,properties:{id:{type:"string",format:"iri"},type:{enum:["calendar"]},name:{type:"string"},components:{type:"array",items:{enum:["event","task"]}}}},addressBook:{required:["id","type"],additionalProperties:!1,properties:{id:{type:"string",format:"iri"},type:{enum:["addressBook"]}}}},tf=Object.keys(ia),aa=["person","room","service","feed","website","platform"],oa=["person","room","service","feed","website","platform","address","calendar","addressBook"],rf=aa.map(t=>({$ref:`#/definitions/type/${t}`})),nf=oa.map(t=>({$ref:`#/definitions/type/${t}`})),sf={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:Hl}},{contains:{const:Kl}}]},af={type:"string"},of={$id:"https://sockethub.org/schemas/v/activity-stream.json",description:"Schema for Sockethub Activity Streams",type:"object",required:["@context","type","actor"],additionalProperties:!1,properties:{"@context":sf,id:{type:"string"},type:af,actor:{type:"object",oneOf:rf},target:{type:"object",oneOf:nf},object:{type:"object"},published:{type:"string",format:"date-time"}},definitions:{type:ia}},cf={version:"3.0.0-beta.3"};function uf(t,e){return t.replace("/v/",`/${e}/`)}var lf={$id:"https://sockethub.org/schemas/v/sockethub-config.json"};uf(lf.$id,cf.version);var ff=Pr(Hi()),jr,Js=!1;function gn(){if(jr===void 0)try{new Function("return true"),jr=!0}catch{jr=!1}return jr}function vn(){Js||(Js=!0,console.warn("[@sockethub/schemas] Schema validation is disabled: this environment's Content Security Policy blocks `new Function`, which Ajv needs to compile schemas. The Sockethub server still validates every message."))}var Qs={type:"integer",minimum:0},df={type:"string",minLength:1},Xs={type:"string",pattern:"^/(?![/\\\\])[^\\s\\\\]*$"},hf={$id:"https://sockethub.org/schemas/v/service-descriptor.json",description:"Sockethub service descriptor",type:"object",required:["name","apiVersion","platforms"],additionalProperties:!0,properties:{name:{const:"sockethub"},apiVersion:Qs,endpoints:{type:"object",required:["socketIO"],additionalProperties:!0,properties:{socketIO:Xs,httpActions:Xs}},platforms:{type:"array",items:{type:"object",required:["id","apiVersion"],additionalProperties:!0,properties:{id:df,apiVersion:Qs}}}}},Dn,Ys;function pf(t){return gn()?(Dn||(Dn=new ff.default({strictTypes:!1,allErrors:!0})),Ys??(Ys=Dn.compile(hf)),Ys(t)):(vn(),mf(t))}function mf(t){if(!t||typeof t!="object")return!1;const e=t;if(e.name!=="sockethub"||!Zs(e.apiVersion)||!Array.isArray(e.platforms))return!1;for(const r of e.platforms){if(!r||typeof r!="object")return!1;const n=r;if(typeof n.id!="string"||n.id.length===0||!Zs(n.apiVersion))return!1}if(e.endpoints!==void 0){if(!e.endpoints||typeof e.endpoints!="object")return!1;const r=e.endpoints;if(!ei(r.socketIO)||r.httpActions!==void 0&&!ei(r.httpActions))return!1}return!0}function Zs(t){return typeof t=="number"&&Number.isInteger(t)&&t>=0}function ei(t){return typeof t=="string"&&/^\/(?![/\\])[^\s\\]*$/.test(t)}var gf=Pr(Hi()),vf=Pr(wl()),yf=Pr(Bl());function _f(t){let e=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return t.keyword==="additionalProperties"?e+=`: ${t.params.additionalProperty}`:t.keyword==="enum"&&(e+=`: ${t.params.allowedValues.join(", ")}`),e}var wf=64;function wr(t,e=0){const r=[];if(e>wf)return r;t!=null&&t.type&&r.push(t.type);const n=t;for(const s in n){const o=n[s];o&&typeof o=="object"&&"type"in o&&r.push(...wr(o,e+1))}return r}function bf(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function $f(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function Ef(t,e){const r=bf(t),n=$f(t);if(!n)return-1;const s=e[n];return!s||!r||!s.includes(r)?-1:t.instancePath.split("/").length}function Sf(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:wr(t)};const e=t;return{actor:wr(e.actor),target:wr(e.target),object:e.object?wr(e.object):[]}}function Pf(t,e,r){const n=Sf(t);let s=0,o=-1;for(let i=0;i<e.length;i++){const l=Ef(e[i],n);l>o&&(o=l,s=i)}return o>=0?_f(e[s]):Of(e[e.length-1],r)}function kf(t,e){if(!(e!=null&&e.excludeTypes)||e.excludeTypes.length===0)return t;const r=new Set(e.excludeTypes);return t.filter(n=>!r.has(n))}function Of(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],s=n==="actor"?aa:n==="target"?oa:tf,o=kf(s,e),i=o.length>0?o:s;r=`${t.instancePath}: ${t.message}: ${i.join(", ")}`}else r=`${t.instancePath?t.instancePath:"activity stream"}: ${t.message}`;return"additionalProperty"in t.params&&(r+=`: ${t.params.additionalProperty}`),r}var qt="https://sockethub.org/schemas/v0",Qn={},Nf={},ti=!1;Qn[`${qt}/activity-stream`]=of;var qn;function ws(){if(!gn()){vn();return}if(!qn){const t=new gf.default({strictTypes:!1,allErrors:!0});vf.default(t),yf.default(t);for(const e in Qn)t.addSchema(Qn[e],e);qn=t}return qn}function ri(t,e){na(t,e,`${qt}/context/${t}/messages`,`${qt}/context/${t}/credentials`);const r=ws();if(!r)return;const n=`${qt}/context/${t}/messages`;r.getSchema(n)||r.addSchema({},n);const s=`${qt}/context/${t}/credentials`;r.getSchema(s)||r.addSchema({},s)}function Tf(){ti||(ri(Gl,Wl),ri(Jl,Ql),ti=!0)}Tf();function nn(t,e){const r=ws();if(!r)return"";const n=r.getSchema(t);if(!n)return`schema ${t} not found`;if(!n(e)){let o=Pf(e,n.errors,Nf);if(Array.isArray(e["@context"])){const i=mn(e);if(i){const l=sa(i);l&&(o=`[${l}] ${o}`)}}return o}return""}function Rf(t){if(!gn())return vn(),"";const e=nn(`${qt}/activity-stream`,t);if(e)return e;const r=mn(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=Zl(r);return n?nn(n,t):`platform context URL ${r} does not have a registered message schema`}function If(t){if(!gn())return vn(),"";if(!Array.isArray(t["@context"]))return"credential activity streams must have an @context set";if(t.type!=="credentials")return"credential activity streams must have credentials set as type";const e=nn(`${qt}/activity-stream`,t);if(e)return e;const r=mn(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=ef(r);return n?nn(n,t):`platform context URL ${r} does not have a registered credentials schema`}function ni(t,e){const r=ws();if(!r)return;const n=`${qt}/context/${e}`;r.removeSchema(n),r.addSchema(t,n)}function Cf(t,e){na(t,e,`${qt}/context/${t}/messages`,`${qt}/context/${t}/credentials`)}function sn(t){const e=mn(t);return e?sa(e)??null:null}var si={actor:"id",target:"id",object:"content"};function Af(t,e){return typeof t=="string"?{[e]:t}:Array.isArray(t)?t.map(r=>typeof r=="string"?{id:r}:r):t}function Vr(t){const e={...t};for(const r of Object.keys(si))r in e&&(e[r]=Af(e[r],si[r]));return e}var jf=Pr(xl()),Mf=jf.default,Df=/^v?(\d+)(?:\.\d+){0,2}(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/;function Ln(t){return!!t&&typeof t=="object"&&!Array.isArray(t)}function ii(t){return typeof t=="number"&&Number.isSafeInteger(t)&&t>=0}function ai(t){if(!t||typeof t!="object")return;const{apiVersion:e,version:r}=t;if(ii(e))return e;if(typeof r=="string"){const n=Df.exec(r.trim()),s=n?Number(n[1]):void 0;if(ii(s))return s}}function qf(t){var i,l;if(!t||typeof t!="object")return;const e=t,r=(i=e.contexts)==null?void 0:i.as,n=(l=e.contexts)==null?void 0:l.sockethub;if(typeof r!="string"||typeof n!="string"||!Array.isArray(e.platforms))return;const s=ai(e);if(s===void 0)return;const o=new Map;for(const a of e.platforms){if(!a||typeof a!="object"||typeof a.id!="string"||typeof a.contextUrl!="string"||typeof a.contextVersion!="string"||typeof a.schemaVersion!="string")continue;const f=ai(a);if(f===void 0)continue;const u=Ln(a.schemas)?a.schemas:{};o.set(a.id,{id:a.id,apiVersion:f,contextUrl:a.contextUrl,contextVersion:a.contextVersion,schemaVersion:a.schemaVersion,types:Array.isArray(a.types)?a.types.filter(d=>typeof d=="string"):[],schemas:{credentials:Ln(u.credentials)?u.credentials:void 0,messages:Ln(u.messages)?u.messages:void 0}})}return{apiVersion:s,asContextUrl:r,sockethubContextUrl:n,platforms:o}}function Lf(t){Cf(t.id,t.contextUrl);try{t.schemas.credentials&&ni(t.schemas.credentials,`${t.id}/credentials`),t.schemas.messages&&ni(t.schemas.messages,`${t.id}/messages`)}catch(e){const r=e instanceof Error?e.message:String(e);console.warn(`[SockethubClient] Failed to register schemas for platform ${t.id}: ${r}`)}}class Kt extends Error{constructor(e,r){super(e,r),this.name="DiscoveryError"}}async function Vf(t,e={}){let r;try{r=new URL(t)}catch(f){throw new Kt(`Sockethub discovery needs an absolute base URL, got ${JSON.stringify(t)}`,{cause:f})}if(r.protocol!=="http:"&&r.protocol!=="https:")throw new Kt(`Sockethub discovery needs an http(s) base URL, got ${JSON.stringify(t)}`);const n=e.fetch??globalThis.fetch;if(typeof n!="function")throw new Kt("Sockethub discovery needs fetch(); pass one in the options");const s=new AbortController,o=e.discoveryTimeoutMs??1e4,i=setTimeout(()=>s.abort(),o),l=()=>s.signal.aborted;let a;try{let f;try{f=await n(r.href,{headers:{accept:"application/json"},signal:s.signal})}catch(u){const d=l()?`timed out after ${o}ms`:u instanceof Error?u.message:String(u);throw new Kt(`Sockethub discovery failed: could not reach ${r.href} (${d})`,{cause:u})}if(!f.ok)throw new Kt(`Sockethub discovery failed: ${r.href} answered ${f.status}`);try{a=await f.json()}catch(u){throw new Kt(l()?`Sockethub discovery failed: ${r.href} timed out after ${o}ms while sending the descriptor`:`Sockethub discovery failed: ${r.href} did not return JSON; is it a Sockethub server?`,{cause:u})}}finally{clearTimeout(i)}if(!pf(a))throw new Kt(`Sockethub discovery failed: ${r.href} did not return a valid service descriptor`);return a}function Uf(t,e){const r=new URL(e,t);if(r.origin!==new URL(t).origin)throw new Kt(`Sockethub discovery failed: endpoint path ${JSON.stringify(e)} resolves to ${r.origin}, not ${t}`);return r.href}async function Ff(t){if(t)return t;const e=globalThis.io;if(typeof e=="function")return e;try{const r=await _o(()=>import("./BHzw4I4G.js"),[],import.meta.url);if(typeof r.io=="function")return r.io}catch{}throw new Error("SockethubClient.connect() needs socket.io-client: install it, load /socket.io.js, or pass `io` in the options")}var oi="https://sockethub.org/ns/context/platform/";function zf(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(oi)){const r=e.slice(oi.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}function Vn(t){return typeof t=="object"&&t!==null&&"error"in t&&!!t.error}function bs(t){return"actor"in t&&t.actor!==null&&typeof t.actor=="object"&&"id"in t.actor&&typeof t.actor.id=="string"}function ci(t){var e,r;return(t==null?void 0:t.type)==="update"&&((e=t.object)==null?void 0:e.type)==="address"&&bs(t)&&typeof t.target=="object"&&typeof((r=t.target)==null?void 0:r.id)=="string"&&t.target.id!==t.actor.id}function Un(t){var s;const e=((s=t.actor)==null?void 0:s.id)||t.actor;if(!e)throw new Error(`actor property not present for message type: ${t==null?void 0:t.type}`);const r=t.target?t.target.id||t.target:"";return`${sn(t)??""}:${e}-${r}`}function Xn(t,e){var n;if(!t||typeof t!="object")return!1;const r=Vr(t);return((n=r.actor)==null?void 0:n.id)===e.actorId&&(sn(r)??zf(r["@context"]))===e.platform}class Bf{constructor(){Ye(this,"events",{credentials:new Map,connect:new Map,join:new Map})}clearCredentials(e){if(!e){this.events.credentials.clear();return}for(const r of Object.values(this.events))for(const[n,s]of r)Xn(s,e)&&r.delete(n)}recordCredentials(e){e.object&&e.object.type==="credentials"&&this.events.credentials.set(Un(e),e)}recordMessage(e){const r=Un(e);e.type==="join"||e.type==="connect"?this.events[e.type].set(r,e):e.type==="leave"?this.events.join.delete(r):e.type==="disconnect"&&this.events.connect.delete(r)}moveActor(e){const r=e.actor.id,n=e.target,s=n.id,o=typeof n.name=="string"?n.name:void 0,i=sn(e)??"",l=[];for(const a of Object.values(this.events))for(const[f,u]of[...a]){if(!bs(u)||u.actor.id!==r||(sn(u)??"")!==i)continue;const d={...u,actor:{...u.actor,id:s,...o?{name:o}:{}}};a.delete(f),a.set(Un(d),d),l.push([r,s])}return l}}class yn{constructor(e,r={},n){Ye(this,"replayStore",new Bf);Ye(this,"_socket");Ye(this,"socket");Ye(this,"debug",!0);Ye(this,"descriptor");Ye(this,"serverOrigin");Ye(this,"options");Ye(this,"platformRegistry",new Map);Ye(this,"asContextUrl");Ye(this,"sockethubContextUrl");Ye(this,"apiVersion");Ye(this,"initState","idle");Ye(this,"hasReadyOnce",!1);Ye(this,"initCycle");Ye(this,"initTokenCounter",0);Ye(this,"initTimeoutTimer");Ye(this,"waitingWarningTimer");Ye(this,"waitingWarningIntervalMs",1e4);Ye(this,"readyWaiters",[]);Ye(this,"outboundQueue",[]);Ye(this,"outboundSequence",0);Ye(this,"pendingScopedClears",[]);Ye(this,"registryFingerprint");Ye(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.descriptor=n==null?void 0:n.descriptor,this.serverOrigin=n==null?void 0:n.serverOrigin,this.options={initTimeoutMs:r.initTimeoutMs??5e3,maxQueuedOutbound:r.maxQueuedOutbound??1e3,maxQueuedAgeMs:r.maxQueuedAgeMs??3e4,validation:r.validation??"auto"},this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this._socket.connected&&(this.socket.connected=!0,this.socket.id=this._socket.id,this.socket._emit("connect"),this.startInitialization("initial-connect",!0))}endpointUrl(e){var n,s;const r=(s=(n=this.descriptor)==null?void 0:n.endpoints)==null?void 0:s[e];if(!(!this.serverOrigin||!r))return Uf(this.serverOrigin,r)}static async connect(e,r={}){var P;const{io:n,socketOptions:s,fetch:o,discoveryTimeoutMs:i,...l}=r,a=await Vf(e,{fetch:o,discoveryTimeoutMs:i}),f=(P=a.endpoints)==null?void 0:P.socketIO;if(!f)throw new Kt(`Sockethub discovery failed: ${e} does not advertise a Socket.IO endpoint (older server?); pass a socket to the constructor instead`);const u=new URL(e).origin,w=(await Ff(n))(u,{...s,path:f});return new yn(w,l,{descriptor:a,serverOrigin:u})}clearCredentials(e){const r=[];this.outboundQueue=this.outboundQueue.filter(n=>n.event==="credentials"&&(!e||Xn(n.content,e))?(r.push(n),!1):!0),this.replayStore.clearCredentials(e),e&&!this.isReady()&&this.pendingScopedClears.push({scope:e,before:this.outboundSequence}),this.emitCancelled(r)}emitCancelled(e){for(const r of e)this.emitClientError(r.event,r.callback,"SockethubClient queued credentials cancelled by clearCredentials")}getRegisteredPlatforms(){return Array.from(this.platformRegistry.values()).map(e=>({...e,types:[...e.types],schemas:{...e.schemas}}))}isSchemasReady(){return this.isReady()}isReady(){return this.initState==="ready"}getInitState(){return this.initState}getRegisteredBaseContexts(){if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");return{as:this.asContextUrl,sockethub:this.sockethubContextUrl}}getPlatformSchema(e,r="messages"){var s,o;const n=e==null?void 0:e.trim();if(n)return(o=(s=this.platformRegistry.get(n))==null?void 0:s.schemas)==null?void 0:o[r]}async waitForSchemas(e=2e3){return await this.ready(e),this.buildPlatformRegistryPayload()}ready(e=this.options.initTimeoutMs){return this.isReady()&&this.latestReadyInfo?Promise.resolve(this.latestReadyInfo):new Promise((r,n)=>{const s={resolve:r,reject:n};e>0&&(s.timer=setTimeout(()=>{this.readyWaiters=this.readyWaiters.filter(o=>o!==s),n(new Error(`SockethubClient ready() timed out after ${e}ms`))},e)),this.readyWaiters.push(s),this.socket.connected&&this.initState==="idle"&&this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)})}validateActivity(e){return this.options.validation==="off"?"":e.type==="credentials"?If(e):Rf(e)}contextFor(e){if(typeof e!="string"||e.trim().length===0)throw new Error("SockethubClient.contextFor(platform) requires a non-empty platform string");if(!this.asContextUrl||!this.sockethubContextUrl)throw new Error("Schema registry not loaded yet. Wait for client ready state after connect.");const r=e.trim(),n=this.platformRegistry.get(r);if(!n){const s=Array.from(this.platformRegistry.keys()).sort();throw new Error(`unknown platform '${r}'. Registered platforms: ${s.join(", ")}`)}return[this.asContextUrl,this.sockethubContextUrl,n.contextUrl]}createPublicEmitter(){const e=new Mf;return e._emit=e.emit,e.emit=(r,n,s)=>{this.handlePublicEmit(r,n,s)},e.connected=!1,e.disconnect=()=>{this._socket.disconnect()},e.connect=()=>{this._socket.connect()},e}requestSchemaRegistry(){"io"in this._socket&&this._socket.emit("schemas",this.registryFingerprint,r=>{this.handleSchemasPayload(r)})}applyPlatformRegistry(e){const r=qf(e);if(!r)return;this.apiVersion=r.apiVersion,this.asContextUrl=r.asContextUrl,this.sockethubContextUrl=r.sockethubContextUrl,this.platformRegistry=r.platforms;for(const o of r.platforms.values())Lf(o);const n=this.buildPlatformRegistryPayload(),s=e;return this.registryFingerprint=typeof s.fingerprint=="string"?s.fingerprint:void 0,this.socket._emit("schemas",n),n}buildPlatformRegistryPayload(){return{apiVersion:this.apiVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(this.apiVersion===void 0||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,apiVersion:this.apiVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,apiVersion:r.apiVersion,contextUrl:r.contextUrl,contextVersion:r.contextVersion,schemaVersion:r.schemaVersion,types:[...r.types]}))}}resolveReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.resolve(e)}rejectReadyWaiters(e){const r=this.readyWaiters;this.readyWaiters=[];for(const n of r)n.timer&&clearTimeout(n.timer),n.reject(e)}emitInitError(e,r,n){this.socket._emit("init_error",{error:e,phase:r,retrying:n})}emitClientError(e,r,n){if(typeof r=="function"){r({error:n});return}this.socket._emit("client_error",{event:e,error:n})}clearInitTimers(){this.initTimeoutTimer&&(clearTimeout(this.initTimeoutTimer),this.initTimeoutTimer=void 0),this.waitingWarningTimer&&(clearInterval(this.waitingWarningTimer),this.waitingWarningTimer=void 0)}startWaitingWarnings(){this.waitingWarningTimer||(this.waitingWarningTimer=setInterval(()=>{if(this.isReady()||this.initState==="closed"){this.clearInitTimers();return}const e=this.outboundQueue.length,r=this.outboundQueue[0],n=r?((Date.now()-r.enqueuedAt)/1e3).toFixed(1):"0.0";console.warn(`[SockethubClient] Still waiting for schemas; queued outbound messages: ${e}; oldest queued age: ${n}s.`)},this.waitingWarningIntervalMs))}startInitialization(e,r){if(!this.socket.connected||this.initState==="closed")return;const n=++this.initTokenCounter;this.initCycle={token:n,reason:e,startedAt:Date.now(),replayOnReady:r,timedOut:!1},this.initState="initializing",this.clearInitTimers(),this.initTimeoutTimer=setTimeout(()=>{if(!this.initCycle||this.initCycle.token!==n)return;this.initCycle.timedOut=!0,this.initState="init_error";const s=`Initialization timed out after ${this.options.initTimeoutMs}ms waiting for schemas`;console.warn(`[SockethubClient] ${s}; queued outbound messages: ${this.outboundQueue.length}. Waiting for schemas event from server.`),this.emitInitError(s,"timeout",!1),this.startWaitingWarnings()},this.options.initTimeoutMs);try{this.requestSchemaRegistry()}catch(s){this.initState="init_error";const o=s instanceof Error?s.message:String(s);this.emitInitError(o,"schemas-request",!1),this.startWaitingWarnings()}}markReady(e){const r=this.initCycle,n=!!(r!=null&&r.replayOnReady);this.initCycle=void 0,this.clearInitTimers(),this.initState="ready",this.hasReadyOnce=!0;const s=this.buildReadyInfo(e);if(!s){const o=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(o.message,"schemas-apply",!0),this.rejectReadyWaiters(o);return}if(this.socket._emit("ready",s),this.latestReadyInfo=s,this.resolveReadyWaiters(s),n){const{credentials:o,connect:i,join:l}=this.replayStore.events;this.replay("credentials",o),this.replay("message",i),this.replay("message",l)}this.flushOutboundQueue()}handleSchemasPayload(e){if(!e||typeof e!="object")return;if(e.unchanged===!0&&typeof this.registryFingerprint=="string"&&this.platformRegistry.size>0){this.initCycle?this.markReady(this.initCycle.reason):this.initState!=="ready"&&this.markReady("schemas-update");return}const r=e.fingerprint;if(this.initState==="ready"&&!this.initCycle&&r&&r===this.registryFingerprint)return;if(this.initState==="ready"&&!this.initCycle&&(this.initState="initializing"),!this.applyPlatformRegistry(e)){this.initState="init_error",this.emitInitError("Received invalid schemas payload from server","schemas-apply",!0),this.startWaitingWarnings();return}if(this.initCycle){this.markReady(this.initCycle.reason);return}this.markReady("schemas-update")}handlePublicEmit(e,r,n){const s={event:e,content:r,callback:n,enqueuedAt:Date.now(),sequence:this.outboundSequence++};if(!this.isReady()){this.enqueueOutbound(s);return}this.sendOutbound(s)}enqueueOutbound(e){if(this.outboundQueue.push(e),this.outboundQueue.length<=this.options.maxQueuedOutbound)return;const r=this.outboundQueue.shift();r&&this.emitClientError(r.event,r.callback,"SockethubClient queue overflow before ready")}flushOutboundQueue(){if(!this.isReady()||this.outboundQueue.length===0)return;const e=Date.now();this.outboundQueue.sort((n,s)=>n.sequence-s.sequence);const r=this.pendingScopedClears;for(this.pendingScopedClears=[];this.outboundQueue.length>0;){const n=this.outboundQueue.shift();if(n.event==="credentials"&&r.some(s=>n.sequence<s.before&&Xn(n.content,s.scope))){this.emitCancelled([n]);continue}if(e-n.enqueuedAt>this.options.maxQueuedAgeMs){this.emitClientError(n.event,n.callback,`SockethubClient queued message expired after ${this.options.maxQueuedAgeMs}ms before initialization`);continue}this.sendOutbound(n)}}sendOutbound(e){let r=e.content;try{if(e.event==="credentials"||e.event==="message"){if(r=Vr(e.content),r&&typeof r=="object"){const s=r;e.event==="credentials"&&!s.type&&(s.type="credentials"),s.actor&&typeof s.actor=="object"&&!s.actor.type&&(s.actor.type="person")}if(this.platformRegistry.size>0){const s=this.validateActivity(r);if(s){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${s}`);return}}}let n=e.callback;e.event==="credentials"?this.replayStore.recordCredentials(r):e.event==="message"&&(this._socket.connected&&this.replayStore.recordMessage(r),n=this.rememberRequestedRename(r,n)),this._socket.emit(e.event,r,n)}catch(n){const s=n instanceof Error?n.message:String(n);this.emitClientError(e.event,e.callback,s)}}log(e,r){this.debug&&console.log(e,r)}registerSocketIOHandlers(){this._socket.on("connect",()=>{this.socket.id=this._socket.id,this.socket.connected=!0,this.socket._emit("connect"),this.startInitialization(this.hasReadyOnce?"reconnect":"initial-connect",!0)}),this._socket.on("connect_error",e=>{this.socket._emit("connect_error",e)}),this._socket.on("disconnect",e=>{this.socket.connected=!1,this.initState!=="closed"&&(this.initState="idle"),this.clearInitTimers(),this.socket._emit("disconnect",e)}),this._socket.on("schemas",e=>{this.handleSchemasPayload(e)}),this._socket.on("message",e=>{const r=Vr(e);this.followActorRename(r),this.socket._emit("message",r)})}followActorRename(e){Vn(e)||ci(e)&&this.moveReplayState(e)}rememberRequestedRename(e,r){return ci(e)?(...n)=>{const[s,o]=n;s instanceof Error||Vn(s)||Vn(o)||this.moveReplayState(e),typeof r=="function"&&r(...n)}:r}moveReplayState(e){for(const[r,n]of this.replayStore.moveActor(e))this.log(`replay state moved from ${r} to ${n}`)}replay(e,r){for(const n of r.values()){const s=Vr(n);let o=s==null?void 0:s.id;if(bs(s)){const i=s.actor;o=typeof i=="string"?i:i.id}this.log(`replaying ${e} for ${o}`),this._socket.emit(e,s)}}}(t=>{t.SockethubClient=yn})(typeof globalThis=="object"?globalThis:{});const Vt=Object.create(null);Vt.open="0";Vt.close="1";Vt.ping="2";Vt.pong="3";Vt.message="4";Vt.upgrade="5";Vt.noop="6";const Ur=Object.create(null);Object.keys(Vt).forEach(t=>{Ur[Vt[t]]=t});const Yn={type:"error",data:"parser error"},ca=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ua=typeof ArrayBuffer=="function",la=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,$s=({type:t,data:e},r,n)=>ca&&e instanceof Blob?r?n(e):ui(e,n):ua&&(e instanceof ArrayBuffer||la(e))?r?n(e):ui(new Blob([e]),n):n(Vt[t]+(e||"")),ui=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function li(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Fn;function xf(t,e){if(ca&&t.data instanceof Blob)return t.data.arrayBuffer().then(li).then(e);if(ua&&(t.data instanceof ArrayBuffer||la(t.data)))return e(li(t.data));$s(t,!1,r=>{Fn||(Fn=new TextEncoder),e(Fn.encode(r))})}const fi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",br=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<fi.length;t++)br[fi.charCodeAt(t)]=t;const Hf=t=>{let e=t.length*.75,r=t.length,n,s=0,o,i,l,a;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const f=new ArrayBuffer(e),u=new Uint8Array(f);for(n=0;n<r;n+=4)o=br[t.charCodeAt(n)],i=br[t.charCodeAt(n+1)],l=br[t.charCodeAt(n+2)],a=br[t.charCodeAt(n+3)],u[s++]=o<<2|i>>4,u[s++]=(i&15)<<4|l>>2,u[s++]=(l&3)<<6|a&63;return f},Kf=typeof ArrayBuffer=="function",Es=(t,e)=>{if(typeof t!="string")return{type:"message",data:fa(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:Gf(t.substring(1),e)}:Ur[r]?t.length>1?{type:Ur[r],data:t.substring(1)}:{type:Ur[r]}:Yn},Gf=(t,e)=>{if(Kf){const r=Hf(t);return fa(r,e)}else return{base64:!0,data:t}},fa=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},da="",Wf=(t,e)=>{const r=t.length,n=new Array(r);let s=0;t.forEach((o,i)=>{$s(o,!1,l=>{n[i]=l,++s===r&&e(n.join(da))})})},Jf=(t,e)=>{const r=t.split(da),n=[];for(let s=0;s<r.length;s++){const o=Es(r[s],e);if(n.push(o),o.type==="error")break}return n};function Qf(){return new TransformStream({transform(t,e){xf(t,r=>{const n=r.length;let s;if(n<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,n);else if(n<65536){s=new Uint8Array(3);const o=new DataView(s.buffer);o.setUint8(0,126),o.setUint16(1,n)}else{s=new Uint8Array(9);const o=new DataView(s.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(r)})}})}let zn;function Mr(t){return t.reduce((e,r)=>e+r.length,0)}function Dr(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let n=0;for(let s=0;s<e;s++)r[s]=t[0][n++],n===t[0].length&&(t.shift(),n=0);return t.length&&n<t[0].length&&(t[0]=t[0].slice(n)),r}function Xf(t,e){zn||(zn=new TextDecoder);const r=[];let n=0,s=-1,o=!1;return new TransformStream({transform(i,l){for(r.push(i);;){if(n===0){if(Mr(r)<1)break;const a=Dr(r,1);o=(a[0]&128)===128,s=a[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(Mr(r)<2)break;const a=Dr(r,2);s=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),n=3}else if(n===2){if(Mr(r)<8)break;const a=Dr(r,8),f=new DataView(a.buffer,a.byteOffset,a.length),u=f.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(Yn);break}s=u*Math.pow(2,32)+f.getUint32(4),n=3}else{if(Mr(r)<s)break;const a=Dr(r,s);l.enqueue(Es(o?a:zn.decode(a),e)),n=0}if(s===0||s>t){l.enqueue(Yn);break}}}})}const ha=4;function ft(t){if(t)return Yf(t)}function Yf(t){for(var e in ft.prototype)t[e]=ft.prototype[e];return t}ft.prototype.on=ft.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};ft.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};ft.prototype.off=ft.prototype.removeListener=ft.prototype.removeAllListeners=ft.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+t];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var n,s=0;s<r.length;s++)if(n=r[s],n===e||n.fn===e){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+t],this};ft.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,s=r.length;n<s;++n)r[n].apply(this,e)}return this};ft.prototype.emitReserved=ft.prototype.emit;ft.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};ft.prototype.hasListeners=function(t){return!!this.listeners(t).length};const _n=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),Ot=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Zf="arraybuffer";function pa(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const ed=Ot.setTimeout,td=Ot.clearTimeout;function wn(t,e){e.useNativeTimers?(t.setTimeoutFn=ed.bind(Ot),t.clearTimeoutFn=td.bind(Ot)):(t.setTimeoutFn=Ot.setTimeout.bind(Ot),t.clearTimeoutFn=Ot.clearTimeout.bind(Ot))}const rd=1.33;function nd(t){return typeof t=="string"?sd(t):Math.ceil((t.byteLength||t.size)*rd)}function sd(t){let e=0,r=0;for(let n=0,s=t.length;n<s;n++)e=t.charCodeAt(n),e<128?r+=1:e<2048?r+=2:e<55296||e>=57344?r+=3:(n++,r+=4);return r}function ma(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function id(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function ad(t){let e={},r=t.split("&");for(let n=0,s=r.length;n<s;n++){let o=r[n].split("=");e[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e}class od extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class Ss extends ft{constructor(e){super(),this.writable=!1,wn(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,r,n){return super.emitReserved("error",new od(e,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const r=Es(e,this.socket.binaryType);this.onPacket(r)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,r={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const r=id(e);return r.length?"?"+r:""}}class cd extends Ss{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const r=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};Jf(e,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,Wf(e,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=ma()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let ga=!1;try{ga=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const ud=ga;function ld(){}class fd extends cd{constructor(e){if(super(e),typeof location<"u"){const r=location.protocol==="https:";let n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,r){const n=this.request({method:"POST",data:e});n.on("success",r),n.on("error",(s,o)=>{this.onError("xhr post error",s,o)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=e}}class Lt extends ft{constructor(e,r,n){super(),this.createRequest=e,wn(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var e;const r=pa(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&n.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var s;n.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Lt.requestsCount++,Lt.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=ld,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Lt.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Lt.requestsCount=0;Lt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",di);else if(typeof addEventListener=="function"){const t="onpagehide"in Ot?"pagehide":"unload";addEventListener(t,di,!1)}}function di(){for(let t in Lt.requests)Lt.requests.hasOwnProperty(t)&&Lt.requests[t].abort()}const dd=function(){const t=va({xdomain:!1});return t&&t.responseType!==null}();class hd extends fd{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=dd&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Lt(va,this.uri(),e)}}function va(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||ud))return new XMLHttpRequest}catch{}if(!e)try{return new Ot[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const ya=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class pd extends Ss{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=ya?{}:pa(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,r,n)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],s=r===e.length-1;$s(n,this.supportsBinary,o=>{try{this.doWrite(n,o)}catch{}s&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=ma()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const Bn=Ot.WebSocket||Ot.MozWebSocket;class md extends pd{createSocket(e,r,n){return ya?new Bn(e,r,n):r?new Bn(e,r):new Bn(e)}doWrite(e,r){this.ws.send(r)}}class gd extends Ss{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const r=Xf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),s=Qf();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const o=()=>{n.read().then(({done:l,value:a})=>{l||(this.onPacket(a),o())}).catch(l=>{})};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this._writer.write(i).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let r=0;r<e.length;r++){const n=e[r],s=r===e.length-1;this._writer.write(n).then(()=>{s&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const vd={websocket:md,webtransport:gd,polling:hd},yd=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,_d=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Zn(t){if(t.length>8e3)throw"URI too long";const e=t,r=t.indexOf("["),n=t.indexOf("]");r!=-1&&n!=-1&&(t=t.substring(0,r)+t.substring(r,n).replace(/:/g,";")+t.substring(n,t.length));let s=yd.exec(t||""),o={},i=14;for(;i--;)o[_d[i]]=s[i]||"";return r!=-1&&n!=-1&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=wd(o,o.path),o.queryKey=bd(o,o.query),o}function wd(t,e){const r=/\/{2,9}/g,n=e.replace(r,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&n.splice(0,1),e.slice(-1)=="/"&&n.splice(n.length-1,1),n}function bd(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,o){s&&(r[s]=o)}),r}const es=typeof addEventListener=="function"&&typeof removeEventListener=="function",Fr=[];es&&addEventListener("offline",()=>{Fr.forEach(t=>t())},!1);class Yt extends ft{constructor(e,r){if(super(),this.binaryType=Zf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(r=e,e=null),e){const n=Zn(e);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=Zn(r.host).host);wn(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{const s=n.prototype.name;this.transports.push(s),this._transportsByName[s]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=ad(this.opts.query)),es&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Fr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=ha,r.transport=e,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Yt.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const r=this.createTransport(e);r.open(),this.setTransport(r)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",Yt.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const r=new Error("server error");r.code=e.data,this._onError(r);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const s=this.writeBuffer[n].data;if(s&&(r+=nd(s)),n>0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,_n(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,r,n){return this._sendPacket("message",e,r,n),this}send(e,r,n){return this._sendPacket("message",e,r,n),this}_sendPacket(e,r,n,s){if(typeof r=="function"&&(s=r,r=void 0),typeof n=="function"&&(s=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const o={type:e,data:r,options:n};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),e()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(e){if(Yt.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),es&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Fr.indexOf(this._offlineEventListener);n!==-1&&Fr.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Yt.protocol=ha;class $d extends Yt{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let r=this.createTransport(e),n=!1;Yt.priorWebsocketSuccess=!1;const s=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Yt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{const w=new Error("probe error");w.transport=r.name,this.emitReserved("upgradeError",w)}}))};function o(){n||(n=!0,u(),r.close(),r=null)}const i=d=>{const w=new Error("probe error: "+d);w.transport=r.name,o(),this.emitReserved("upgradeError",w)};function l(){i("transport closed")}function a(){i("socket closed")}function f(d){r&&d.name!==r.name&&o()}const u=()=>{r.removeListener("open",s),r.removeListener("error",i),r.removeListener("close",l),this.off("close",a),this.off("upgrading",f)};r.once("open",s),r.once("error",i),r.once("close",l),this.once("close",a),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){const r=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&r.push(e[n]);return r}}let Ed=class extends $d{constructor(e,r={}){const n=typeof e=="object"?e:r;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(s=>vd[s]).filter(s=>!!s)),super(e,n)}};function Sd(t,e="",r){let n=t;r=r||typeof location<"u"&&location,t==null&&(t=r.protocol+"//"+r.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=r.protocol+t:t=r.host+t),/^(https?|wss?):\/\//.test(t)||(typeof r<"u"?t=r.protocol+"//"+t:t="https://"+t),n=Zn(t)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+e,n.href=n.protocol+"://"+o+(r&&r.port===n.port?"":":"+n.port),n}const Pd=typeof ArrayBuffer=="function",kd=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,_a=Object.prototype.toString,Od=typeof Blob=="function"||typeof Blob<"u"&&_a.call(Blob)==="[object BlobConstructor]",Nd=typeof File=="function"||typeof File<"u"&&_a.call(File)==="[object FileConstructor]";function Ps(t){return Pd&&(t instanceof ArrayBuffer||kd(t))||Od&&t instanceof Blob||Nd&&t instanceof File}function zr(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let r=0,n=t.length;r<n;r++)if(zr(t[r]))return!0;return!1}if(Ps(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return zr(t.toJSON(),!0);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)&&zr(t[r]))return!0;return!1}function Td(t){const e=[],r=t.data,n=t;return n.data=ts(r,e),n.attachments=e.length,{packet:n,buffers:e}}function ts(t,e){if(!t)return t;if(Ps(t)){const r={_placeholder:!0,num:e.length};return e.push(t),r}else if(Array.isArray(t)){const r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=ts(t[n],e);return r}else if(typeof t=="object"&&!(t instanceof Date)){const r={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=ts(t[n],e));return r}return t}function Rd(t,e){return t.data=rs(t.data,e),delete t.attachments,t}function rs(t,e){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<e.length)return e[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let r=0;r<t.length;r++)t[r]=rs(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=rs(t[r],e));return t}const Id=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Cd=5;var Le;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Le||(Le={}));class Ad{constructor(e){this.replacer=e}encode(e){return(e.type===Le.EVENT||e.type===Le.ACK)&&zr(e)?this.encodeAsBinary({type:e.type===Le.EVENT?Le.BINARY_EVENT:Le.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===Le.BINARY_EVENT||e.type===Le.BINARY_ACK)&&(r+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(r+=e.nsp+","),e.id!=null&&(r+=e.id),e.data!=null&&(r+=JSON.stringify(e.data,this.replacer)),r}encodeAsBinary(e){const r=Td(e),n=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(n),s}}function hi(t){return Object.prototype.toString.call(t)==="[object Object]"}class ks extends ft{constructor(e){super(),this.reviver=e}add(e){let r;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");r=this.decodeString(e);const n=r.type===Le.BINARY_EVENT;n||r.type===Le.BINARY_ACK?(r.type=n?Le.EVENT:Le.ACK,this.reconstructor=new jd(r),r.attachments===0&&super.emitReserved("decoded",r)):super.emitReserved("decoded",r)}else if(Ps(e)||e.base64)if(this.reconstructor)r=this.reconstructor.takeBinaryData(e),r&&(this.reconstructor=null,super.emitReserved("decoded",r));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let r=0;const n={type:Number(e.charAt(0))};if(Le[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Le.BINARY_EVENT||n.type===Le.BINARY_ACK){const o=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const i=e.substring(o,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(i)}if(e.charAt(r+1)==="/"){const o=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(o,r)}else n.nsp="/";const s=e.charAt(r+1);if(s!==""&&Number(s)==s){const o=r+1;for(;++r;){const i=e.charAt(r);if(i==null||Number(i)!=i){--r;break}if(r===e.length)break}n.id=Number(e.substring(o,r+1))}if(e.charAt(++r)){const o=this.tryParse(e.substr(r));if(ks.isPayloadValid(n.type,o))n.data=o;else throw new Error("invalid payload")}return n}tryParse(e){try{return JSON.parse(e,this.reviver)}catch{return!1}}static isPayloadValid(e,r){switch(e){case Le.CONNECT:return hi(r);case Le.DISCONNECT:return r===void 0;case Le.CONNECT_ERROR:return typeof r=="string"||hi(r);case Le.EVENT:case Le.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&Id.indexOf(r[0])===-1);case Le.ACK:case Le.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class jd{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const r=Rd(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Md=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ks,Encoder:Ad,get PacketType(){return Le},protocol:Cd},Symbol.toStringTag,{value:"Module"}));function Rt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const Dd=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class wa extends ft{constructor(e,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[Rt(e,"open",this.onopen.bind(this)),Rt(e,"packet",this.onpacket.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...r){var n,s,o;if(Dd.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(r.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const i={type:Le.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const u=this.ids++,d=r.pop();this._registerAckCallback(u,d),i.id=u}const l=(s=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||s===void 0?void 0:s.writable,a=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!l||(a?(this.notifyOutgoingListeners(i),this.packet(i)):this.sendBuffer.push(i)),this.flags={},this}_registerAckCallback(e,r){var n;const s=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(s===void 0){this.acks[e]=r;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===e&&this.sendBuffer.splice(l,1);r.call(this,new Error("operation has timed out"))},s),i=(...l)=>{this.io.clearTimeoutFn(o),r.apply(this,l)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,s)=>{const o=(i,l)=>i?s(i):n(l);o.withError=!0,r.push(o),this.emit(e,...r)})}_addToQueue(e){let r;typeof e[e.length-1]=="function"&&(r=e.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...o)=>(this._queue[0],s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...o)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const r=this._queue[0];r.pending&&!e||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Le.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(n=>String(n.id)===e)){const n=this.acks[e];delete this.acks[e],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Le.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Le.EVENT:case Le.BINARY_EVENT:this.onevent(e);break;case Le.ACK:case Le.BINARY_ACK:this.onack(e);break;case Le.DISCONNECT:this.ondisconnect();break;case Le.CONNECT_ERROR:this.destroy();const n=new Error(e.data.message);n.data=e.data.data,this.emitReserved("connect_error",n);break}}onevent(e){const r=e.data||[];e.id!=null&&r.push(this.ack(e.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const r=this;let n=!1;return function(...s){n||(n=!0,r.packet({type:Le.ACK,id:e,data:s}))}}onack(e){const r=this.acks[e.id];typeof r=="function"&&(delete this.acks[e.id],r.withError&&e.data.unshift(null),r.apply(this,e.data))}onconnect(e,r){this.id=e,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Le.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(e===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,e.data)}}}function fr(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}fr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=(Math.floor(e*10)&1)==0?t-r:t+r}return Math.min(t,this.max)|0};fr.prototype.reset=function(){this.attempts=0};fr.prototype.setMin=function(t){this.ms=t};fr.prototype.setMax=function(t){this.max=t};fr.prototype.setJitter=function(t){this.jitter=t};class ns extends ft{constructor(e,r){var n;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(r=e,e=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,wn(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new fr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=e;const s=r.parser||Md;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var r;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(r=this.backoff)===null||r===void 0||r.setMin(e),this)}randomizationFactor(e){var r;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(r=this.backoff)===null||r===void 0||r.setJitter(e),this)}reconnectionDelayMax(e){var r;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(r=this.backoff)===null||r===void 0||r.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Ed(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=Rt(r,"open",function(){n.onopen(),e&&e()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),e?e(l):this.maybeReconnectOnOpen()},i=Rt(r,"error",o);if(this._timeout!==!1){const l=this._timeout,a=this.setTimeoutFn(()=>{s(),o(new Error("timeout")),r.close()},l);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}return this.subs.push(s),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Rt(e,"ping",this.onping.bind(this)),Rt(e,"data",this.ondata.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(e,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(r){this.onclose("parse error",r)}}ondecoded(e){_n(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,r){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new wa(this,e,r),this.nsps[e]=n),n}_destroy(e){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active)return;this._close()}_packet(e){const r=this.encoder.encode(e);for(let n=0;n<r.length;n++)this.engine.write(r[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const vr={};function Br(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=Sd(t,e.path||"/socket.io"),n=r.source,s=r.id,o=r.path,i=vr[s]&&o in vr[s].nsps,l=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let a;return l?a=new ns(n,e):(vr[s]||(vr[s]=new ns(n,e)),a=vr[s]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(Br,{Manager:ns,Socket:wa,io:Br,connect:Br});const xn={},pi=lr(void 0);function Zd(t){return[...t].sort((e,r)=>e.id==="dummy"||r.id==="dummy"?e.id===r.id?0:e.id==="dummy"?-1:1:e.id.localeCompare(r.id))}function qd(t=globalThis.location,e=xn==null?void 0:xn.VITE_SOCKETHUB_URL){if(typeof e=="string"&&e.trim()!=="")return e.trim();const r=t==null?void 0:t.origin;return r&&r!=="null"?r:void 0}function Ld(t){return t instanceof Error?t.message:String(t)}function Vd(t,e,r){return new Promise((n,s)=>{if(!t.connected){s(new Error("Sockethub is disconnected. Reconnect and try again."));return}let o=!1;const i=e==="credentials",l=setTimeout(()=>f(new Error(i?"Credential acknowledgement timed out. Try again.":"Message acknowledgement timed out; delivery is unknown. Do not retry automatically.")),i?1e4:3e4),a=()=>f(new Error(i?"Disconnected before credentials were acknowledged. Try again.":"Disconnected before message acknowledgement; delivery is unknown. Do not retry automatically."));function f(u,d){o||(o=!0,clearTimeout(l),t.off("disconnect",a),u?s(u):n(d))}t.on("disconnect",a);try{t.emit(e,r,u=>f(void 0,u))}catch(u){f(u instanceof Error?u:new Error(String(u)))}})}let vt;const Ud=lr(!1);async function ba(){if(!vt)throw new Error("Sockethub client is not initialized yet");await vt.ready()}async function eh(t){return await ba(),vt.contextFor(t)}function th(t){return{id:t.id,type:t.type,name:t.name??t.id}}async function rh(t){await ba(),console.log("sending ->",t);const e=Ar("SEND",t);let r;try{if(r=await Vd(vt.socket,"message",e),!r)throw new Error("Missing message acknowledgement; delivery is unknown.")}catch(n){throw Ar("RESP",{...e,error:n instanceof Error?n.message:String(n)}),n}if(console.log("received <-",r),Ar("RESP",r),r.totalItems&&r.items)for(const n of r.items.reverse())Ar("RESP",n,!0,e.id);if(Ii(r,!0),r.error)throw new Error(r.error);return r}function Hn(t){return e=>{const r=t==="connect";Ud.update(()=>r),console.log(`sockethub ${t} [connected: ${r}]`,e||"")}}function Fd(t){console.log("handle incoming: ",t),Ii(t,!1)}async function zd(t){try{vt=await yn.connect(t,{io:Br,initTimeoutMs:1e4})}catch(e){console.error("sockethub discovery failed",e),pi.set({state:"unavailable",reason:Ld(e)});return}vt.descriptor&&vt.serverOrigin&&pi.set({state:"available",descriptor:vt.descriptor,serverOrigin:vt.serverOrigin}),vt.socket.on("connect",Hn("connect")),vt.socket.on("error",Hn("error")),vt.socket.on("disconnect",Hn("disconnect")),vt.socket.on("message",Fd),vt.socket.on("schemas",e=>{console.log("schemas received:",e),Cn("schemas",e)}),vt.socket.on("ready",e=>{console.log("client ready:",e),Cn("ready",e)}),vt.socket.on("init_error",e=>{console.error("client init error:",e),Cn("init_error",e)})}const Kn=qd();Kn&&(console.log("connecting to sockethub via discovery at",Kn),zd(Kn));export{_n as A,Cd as B,gd as C,ft as E,Qd as I,Xd as L,ec as M,cd as P,Ed as S,md as W,hd as X,ba as a,Jd as b,eh as c,rh as d,Wn as e,It as f,th as g,Ho as h,Si as i,ur as j,pi as k,Zd as l,Uf as m,Vd as n,Wd as o,Qr as p,Ud as q,Lo as r,vt as s,jo as t,Io as u,To as v,Zn as w,Le as x,wn as y,Md as z};
|