@sockethub/examples 1.0.0-alpha.11 → 1.0.0-alpha.12
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.DWIWvKCl.css +1 -0
- package/build/_app/immutable/chunks/{DJd_9GSN.js → B1Dg8LdY.js} +1 -1
- package/build/_app/immutable/chunks/{DxLbbUVu.js → BFNCz1gq.js} +1 -1
- package/build/_app/immutable/chunks/CihmTBhe.js +66 -0
- package/build/_app/immutable/chunks/{DvzjJQ_P.js → DOKWDPrU.js} +1 -1
- package/build/_app/immutable/chunks/{D34JQ8ay.js → Dcal-xrT.js} +1 -1
- package/build/_app/immutable/chunks/FDiY3NYw.js +1 -0
- package/build/_app/immutable/chunks/UKP-Z6jI.js +1 -0
- package/build/_app/immutable/entry/{app.24uSP5jR.js → app.C9H-zozU.js} +2 -2
- package/build/_app/immutable/entry/start.vRxtmFzd.js +1 -0
- package/build/_app/immutable/nodes/{0.CRxtfUZO.js → 0.DcZ2dsmt.js} +1 -1
- package/build/_app/immutable/nodes/{1.CjzaWbdc.js → 1.C6aP9uS2.js} +1 -1
- package/build/_app/immutable/nodes/{2.Dzi-FWBZ.js → 2.BPwYaw3N.js} +1 -1
- package/build/_app/immutable/nodes/3.BGd6WCa1.js +1 -0
- package/build/_app/immutable/nodes/4.G9Lcgqeg.js +1 -0
- package/build/_app/immutable/nodes/5.B4MUA0zQ.js +1 -0
- package/build/_app/immutable/nodes/6.BSB3XMkK.js +1 -0
- package/build/_app/immutable/nodes/7.IHPDEcKQ.js +1 -0
- package/build/_app/version.json +1 -1
- package/build/dummy.html +7 -7
- package/build/feeds.html +7 -7
- package/build/index.html +7 -7
- package/build/irc.html +7 -7
- package/build/metadata.html +7 -7
- package/build/sockethub-logo.svg +11 -9
- package/build/xmpp.html +7 -7
- package/package.json +3 -3
- package/build/_app/immutable/assets/0.JUA-HkH6.css +0 -1
- package/build/_app/immutable/chunks/B48xiOwQ.js +0 -1
- package/build/_app/immutable/chunks/DRqIvF0-.js +0 -1
- package/build/_app/immutable/chunks/Duf23zEt.js +0 -23
- package/build/_app/immutable/entry/start.odGQGxrg.js +0 -1
- package/build/_app/immutable/nodes/3.WM6k04_L.js +0 -1
- package/build/_app/immutable/nodes/4.C0mUcLdq.js +0 -1
- package/build/_app/immutable/nodes/5.JU4p_B8j.js +0 -1
- package/build/_app/immutable/nodes/6.BjGCqlQt.js +0 -1
- package/build/_app/immutable/nodes/7.HL4NrxY9.js +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
var sa=Object.defineProperty;var ia=(t,e,r)=>e in t?sa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var nt=(t,e,r)=>ia(t,typeof e!="symbol"?e+"":e,r);import{j as vs,k as aa,f as st,a as Ue,s as et,c as zt,t as Hs,d as Hn}from"./DqdrLdzV.js";import"./BnKTx64M.js";import{y as jr,L as Ks,R as ar,A as Pt,aQ as nr,M as Fr,g as oe,a1 as oa,O as ca,P as la,Q as _s,S as vr,B as tr,ay as Kn,b2 as ua,aJ as ws,q as fa,b4 as xt,z as Tn,D as da,X as bs,V as Gs,b0 as Gn,ae as ha,b5 as pa,b6 as ma,b7 as ga,v as Ws,x as Js,b8 as gn,aY as zr,a$ as ya,w as va,b9 as Qs,ai as _a,ba as wa,t as ut,W as ba,bb as $a,b3 as Ea,aZ as Sa,bc as Pa,p as Bt,s as qe,c as me,r as he,n as Xs,a as Ht,u as ct,f as gt,bd as ka,be as Oa,b as _t,m as yn,e as Ta,d as er,$ as $s,ag as Na}from"./Ciq9INsC.js";import{w as $r,g as Ra,c as Ia,a as Aa}from"./CARmnL8B.js";import{b as Ca,s as ja,i as dt,l as xr,p as rr,d as Ma}from"./Cf7Xaqef.js";import{s as Da,a as _r,d as qa,C as La}from"./P3PHXZz3.js";import{i as Ys}from"./B-2myMF5.js";function Zs(t,e){return e}function Ua(t,e,r){for(var n=[],s=e.length,l,i=e.length,u=0;u<s;u++){let f=e[u];Js(f,()=>{if(l){if(l.pending.delete(f),l.done.add(f),l.pending.size===0){var w=t.outrogroups;Nn(Gn(l.done)),w.delete(l),w.size===0&&(t.outrogroups=null)}}else i-=1},!1)}if(i===0){var a=n.length===0&&r!==null;if(a){var d=r,c=d.parentNode;ya(c),c.append(d),t.items.clear()}Nn(e,!a)}else l={pending:new Set(e),done:new Set},(t.outrogroups??(t.outrogroups=new Set)).add(l)}function Nn(t,e=!0){for(var r=0;r<t.length;r++)va(t[r],e)}var Es;function Rn(t,e,r,n,s,l=null){var i=t,u=new Map,a=(e&Qs)!==0;if(a){var d=t;i=Pt?ar(nr(d)):d.appendChild(jr())}Pt&&Fr();var c=null,f=oa(()=>{var o=r();return ha(o)?o:o==null?[]:Gn(o)}),w,S=!0;function E(){m.fallback=c,Va(m,w,i,e,n),c!==null&&(w.length===0?(c.f&xt)===0?Ws(c):(c.f^=xt,mr(c,null,i)):Js(c,()=>{c=null}))}var b=Ks(()=>{w=oe(f);var o=w.length;let _=!1;if(Pt){var h=ca(i)===la;h!==(o===0)&&(i=_s(),ar(i),vr(!1),_=!0)}for(var g=new Set,$=fa,v=da(),p=0;p<o;p+=1){Pt&&tr.nodeType===Kn&&tr.data===ua&&(i=tr,_=!0,vr(!1));var P=w[p],O=n(P,p),C=S?null:u.get(O);C?(C.v&&ws(C.v,P),C.i&&ws(C.i,p),v&&$.skipped_effects.delete(C.e)):(C=Fa(u,S?i:Es??(Es=jr()),P,O,p,s,e,r),S||(C.e.f|=xt),u.set(O,C)),g.add(O)}if(o===0&&l&&!c&&(S?c=Tn(()=>l(i)):(c=Tn(()=>l(Es??(Es=jr()))),c.f|=xt)),Pt&&o>0&&ar(_s()),!S)if(v){for(const[U,q]of u)g.has(U)||$.skipped_effects.add(q.e);$.oncommit(E),$.ondiscard(()=>{})}else E();_&&vr(!0),oe(f)}),m={effect:b,items:u,outrogroups:null,fallback:c};S=!1,Pt&&(i=tr)}function Va(t,e,r,n,s){var C,U,q,J,G,ee,fe,we,Oe;var l=(n&wa)!==0,i=e.length,u=t.items,a=t.effect.first,d,c=null,f,w=[],S=[],E,b,m,o;if(l)for(o=0;o<i;o+=1)E=e[o],b=s(E,o),m=u.get(b).e,(m.f&xt)===0&&((U=(C=m.nodes)==null?void 0:C.a)==null||U.measure(),(f??(f=new Set)).add(m));for(o=0;o<i;o+=1){if(E=e[o],b=s(E,o),m=u.get(b).e,t.outrogroups!==null)for(const se of t.outrogroups)se.pending.delete(m),se.done.delete(m);if((m.f&xt)!==0)if(m.f^=xt,m===a)mr(m,null,r);else{var _=c?c.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),Wt(t,c,m),Wt(t,m,_),mr(m,_,r),c=m,w=[],S=[],a=c.next;continue}if((m.f&gn)!==0&&(Ws(m),l&&((J=(q=m.nodes)==null?void 0:q.a)==null||J.unfix(),(f??(f=new Set)).delete(m))),m!==a){if(d!==void 0&&d.has(m)){if(w.length<S.length){var h=S[0],g;c=h.prev;var $=w[0],v=w[w.length-1];for(g=0;g<w.length;g+=1)mr(w[g],h,r);for(g=0;g<S.length;g+=1)d.delete(S[g]);Wt(t,$.prev,v.next),Wt(t,c,$),Wt(t,v,h),a=h,c=v,o-=1,w=[],S=[]}else d.delete(m),mr(m,a,r),Wt(t,m.prev,m.next),Wt(t,m,c===null?t.effect.first:c.next),Wt(t,c,m),c=m;continue}for(w=[],S=[];a!==null&&a!==m;)(d??(d=new Set)).add(a),S.push(a),a=a.next;if(a===null)continue}(m.f&xt)===0&&w.push(m),c=m,a=m.next}if(t.outrogroups!==null){for(const se of t.outrogroups)se.pending.size===0&&(Nn(Gn(se.done)),(G=t.outrogroups)==null||G.delete(se));t.outrogroups.size===0&&(t.outrogroups=null)}if(a!==null||d!==void 0){var p=[];if(d!==void 0)for(m of d)(m.f&gn)===0&&p.push(m);for(;a!==null;)(a.f&gn)===0&&a!==t.fallback&&p.push(a),a=a.next;var P=p.length;if(P>0){var O=(n&Qs)!==0&&i===0?r:null;if(l){for(o=0;o<P;o+=1)(fe=(ee=p[o].nodes)==null?void 0:ee.a)==null||fe.measure();for(o=0;o<P;o+=1)(Oe=(we=p[o].nodes)==null?void 0:we.a)==null||Oe.fix()}Ua(t,p,O)}}l&&_a(()=>{var se,x;if(f!==void 0)for(m of f)(x=(se=m.nodes)==null?void 0:se.a)==null||x.apply()})}function Fa(t,e,r,n,s,l,i,u){var a=(i&pa)!==0?(i&ma)===0?Gs(r,!1,!1):bs(r):null,d=(i&ga)!==0?bs(s):null;return{v:a,i:d,e:Tn(()=>(l(e,a??r,d??s,u),()=>{t.delete(n)}))}}function mr(t,e,r){if(t.nodes)for(var n=t.nodes.start,s=t.nodes.end,l=e&&(e.f&xt)===0?e.nodes.start:r;n!==null;){var i=zr(n);if(l.before(n),n===s)return;n=i}}function Wt(t,e,r){e===null?t.effect.first=r:e.next=r,r===null?t.effect.last=e:r.prev=e}function ei(t,e,r=!1,n=!1,s=!1){var l=t,i="";ut(()=>{var u=ba;if(i===(i=e()??"")){Pt&&Fr();return}if(u.nodes!==null&&($a(u.nodes.start,u.nodes.end),u.nodes=null),i!==""){if(Pt){tr.data;for(var a=Fr(),d=a;a!==null&&(a.nodeType!==Kn||a.data!=="");)d=a,a=zr(a);if(a===null)throw Ea(),Sa;vs(tr,d),l=ar(a);return}var c=i+"";r?c=`<svg>${c}</svg>`:n&&(c=`<math>${c}</math>`);var f=aa(c);if((r||n)&&(f=nr(f)),vs(nr(f),f.lastChild),r||n)for(;nr(f);)l.before(nr(f));else l.before(f)}})}function za(t,e,r,n,s){var u;Pt&&Fr();var l=(u=e.$$slots)==null?void 0:u[r],i=!1;l===!0&&(l=e.children,i=!0),l===void 0?s!==null&&s(t):l(t,i?()=>n:n)}function xa(t,e){let r=null,n=Pt;var s;if(Pt){r=tr;for(var l=nr(document.head);l!==null&&(l.nodeType!==Kn||l.data!==t);)l=zr(l);if(l===null)vr(!1);else{var i=zr(l);l.remove(),ar(i)}}Pt||(s=document.head.appendChild(jr()));try{Ks(()=>e(s),Pa)}finally{n&&(vr(!0),ar(r))}}const In=$r([]),Ir=new Map;function ti(t,e=!1){var r,n,s;if(console.log("displayMessage called:",{type:t.type,platform:Hr(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 l=typeof t.actor=="string"?t.actor:((s=t.actor)==null?void 0:s.name)||"",i=t.object.content||"",u=`${l}:${i}`,a=Date.now(),d=Ir.get(u);if(d&&a-d<2e3){console.log("Skipping duplicate message:",u);return}Ir.set(u,a);for(const[c,f]of Ir)a-f>5e3&&Ir.delete(c);In.set([...Ra(In),[l,i]]),console.log("Message displayed:",{actorName:l,content:i,isResponse:e,platform:Hr(t["@context"])})}}var Ba=st("<li> </li>"),Ha=st('<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 xf(t,e){Bt(e,!1);const r=()=>Ca(In,"$messages",n),[n,s]=ja();Ys();var l=Ha(),i=qe(me(l),2),u=me(i);Rn(u,5,r,Zs,(a,d)=>{var c=Ba(),f=me(c);he(c),ut(()=>et(f,`${oe(d)[0]??""}: ${oe(d)[1]??""}`)),Ue(a,c)}),he(u),Xs(2),he(i),he(l),Ue(t,l),Ht(),s()}var Ka=st("<span> </span>");function Wn(t,e){Bt(e,!0);const r=ct(()=>Hr(e.entry["@context"]));var n=Ka(),s=me(n);he(n),ut(()=>et(s,`[${oe(r)??"unknown"??""}:${e.entry.type??""}]`)),Ue(t,n),Ht()}var Ga=st("<!> <span> </span> <span> </span>",1);function Wa(t,e){Bt(e,!0);var r=Ga(),n=gt(r);Wn(n,{get entry(){return e.entry}});var s=qe(n,2),l=me(s);he(s);var i=qe(s,2),u=me(i,!0);he(i),ut(()=>{var a,d,c;et(l,`#${e.id??""}
|
|
2
|
+
${(typeof e.entry.actor=="string"?e.entry.actor:((a=e.entry.actor)==null?void 0:a.name)||((d=e.entry.actor)==null?void 0:d.id))??""}:`),et(u,((c=e.entry.object)==null?void 0:c.content)||"")}),Ue(t,r),Ht()}var Ja=st('<span class="font-medium">📰 Fetched feed:</span> <span> </span> <span class="text-gray-500"> </span>',1),Qa=st("<span> </span>"),Xa=st('<span class="text-gray-500 text-xs italic"> </span>'),Ya=st('<span class="text-gray-500"> </span> <!> <span><a rel="noreferrer" target="_blank" class="text-blue-600 hover:text-blue-800 underline"><!></a></span> <!>',1),Za=st("<!> <!>",1);function eo(t,e){var c,f,w;Bt(e,!0);const r=e.entry.totalItems!==void 0,n=r?e.entry.summary:(c=e.entry.object)==null?void 0:c.url,s=typeof e.entry.actor=="string"?e.entry.actor:((f=e.entry.actor)==null?void 0:f.name)||((w=e.entry.actor)==null?void 0:w.id);var l=Za(),i=gt(l);Wn(i,{get entry(){return e.entry}});var u=qe(i,2);{var a=S=>{var E=Ja(),b=qe(gt(E),2),m=me(b,!0);he(b);var o=qe(b,2),_=me(o);he(o),ut(()=>{et(m,n),et(_,`(${e.entry.totalItems??""} ${e.entry.totalItems===1?"item":"items"})`)}),Ue(S,E)},d=S=>{var E=Ya(),b=gt(E),m=me(b);he(b);var o=qe(b,2);{var _=C=>{var U=Qa(),q=me(U);he(U),ut(()=>et(q,`${s??""}:`)),Ue(C,U)};dt(o,C=>{s&&C(_)})}var h=qe(o,2),g=me(h),$=me(g);{var v=C=>{var U=zt(),q=gt(U);ei(q,()=>{var J;return(J=e.entry.object)==null?void 0:J.title}),Ue(C,U)},p=C=>{var U=Hs();ut(()=>{var q,J;return et(U,(q=e.entry.object)!=null&&q.title||typeof e.entry.target=="string"?e.entry.target:(J=e.entry.target)==null?void 0:J.id)}),Ue(C,U)};dt($,C=>{var U;((U=e.entry.object)==null?void 0:U.contentType)==="html"?C(v):C(p,!1)})}he(g),he(h);var P=qe(h,2);{var O=C=>{var U=Xa(),q=me(U,!0);he(U),ut(J=>et(q,J),[()=>{var J;return(J=e.entry.object)==null?void 0:J.published.split("T")[0]}]),Ue(C,U)};dt(P,C=>{var U;(U=e.entry.object)!=null&&U.published&&C(O)})}ut(()=>{var C;et(m,`#${e.id??""}`),Da(g,"href",(C=e.entry.object)==null?void 0:C.url)}),Ue(S,E)};dt(u,S=>{r?S(a):S(d,!1)})}Ue(t,l),Ht()}var to=st("<!> <span> </span>",1);function ro(t,e){Bt(e,!0);var r=to(),n=gt(r);Wn(n,{get entry(){return e.entry}});var s=qe(n,2),l=me(s);he(s),ut(()=>{var i,u;return et(l,`#${e.id??""}
|
|
3
|
+
${(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))??""}`)}),Ue(t,r),Ht()}var no=st('<span class="px-2 py-1 bg-blue-100 text-blue-800 text-xs font-medium rounded-full"> </span>'),so=st('<span class="px-2 py-1 bg-purple-100 text-purple-800 text-xs font-medium rounded-full"> </span>'),io=st('<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>'),ao=st('<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 Ss(t,e){Bt(e,!0);const r=ct(()=>Hr(e.entry["@context"])),n=ct(()=>e.timestamp?new Date(e.timestamp).toLocaleTimeString():""),s=ct(()=>e.hasSend&&e.hasResponse?"Sent → Response OK":e.hasSend?"Sent → Awaiting response":""),l=ct(()=>e.hasSend&&e.hasResponse?"bg-green-500":e.hasSend?"bg-orange-400":"bg-green-500");var i=ao(),u=me(i),a=me(u),d=me(a),c=qe(d,2),f=me(c,!0);he(c),he(a);var w=qe(a,2),S=me(w),E=me(S),b=me(E),m=me(b,!0);he(b);var o=qe(b,2);{var _=q=>{var J=no(),G=me(J,!0);he(J),ut(ee=>et(G,ee),[()=>oe(r).toUpperCase()]),Ue(q,J)};dt(o,q=>{oe(r)&&q(_)})}var h=qe(o,2);{var g=q=>{var J=so(),G=me(J,!0);he(J),ut(()=>et(G,e.entry.type)),Ue(q,J)};dt(h,q=>{e.entry.type&&q(g)})}he(E);var $=qe(E,2);$.__click=function(...q){var J;(J=e.buttonAction)==null||J.apply(this,q)},he(S);var v=qe(S,2),p=me(v);{var P=q=>{Wa(q,{get id(){return e.id},get entry(){return e.entry}})},O=q=>{var J=zt(),G=gt(J);{var ee=we=>{eo(we,{get id(){return e.id},get entry(){return e.entry}})},fe=we=>{ro(we,{get id(){return e.id},get entry(){return e.entry}})};dt(G,we=>{oe(r)==="feeds"?we(ee):we(fe,!1)},!0)}Ue(q,J)};dt(p,q=>{oe(r)==="dummy"?q(P):q(O,!1)})}he(v);var C=qe(v,2);{var U=q=>{var J=io(),G=me(J),ee=qe(me(G),4),fe=me(ee,!0);he(ee),he(G),he(J),ut(()=>et(fe,e.entry.error)),Ue(q,J)};dt(C,q=>{e.entry.error&&q(U)})}he(w),he(u),he(i),ut(()=>{_r(d,1,`w-3 h-3 ${oe(l)??""} rounded-full`),et(f,oe(n)||`#${e.id}`),et(m,oe(s))}),Ue(t,i),Ht()}Hn(["click"]);var oo=st('<div class="mt-2 p-2 bg-red-50 border border-red-200 rounded-lg"><span class="text-red-700 text-xs"> </span></div>'),co=st('<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 lo(t,e){Bt(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=ct(()=>r[e.entry._logType]??r.schemas);function s(p){if(!p||typeof p!="object")return"";const P=p;if(e.entry._logType==="schemas"){const C=(Array.isArray(P.platforms)?P.platforms:[]).map(q=>q==null?void 0:q.id).filter(Boolean);return`v${typeof P.version=="string"?P.version:""} — ${C.length} platform${C.length!==1?"s":""}: ${C.join(", ")}`}if(e.entry._logType==="ready"){const O=typeof P.reason=="string"?P.reason:"",C=typeof P.sockethubVersion=="string"?P.sockethubVersion:"",U=Array.isArray(P.platforms)?P.platforms.length:0;return`${O} — Sockethub v${C}, ${U} platform${U!==1?"s":""}`}if(e.entry._logType==="init_error"){const O=typeof P.error=="string"?P.error:"unknown",C=typeof P.phase=="string"?P.phase:"",U=P.retrying?" (retrying)":"";return`${C}: ${O}${U}`}return JSON.stringify(p).slice(0,120)}const l=ct(()=>s(e.entry.payload)),i=ct(()=>new Date(e.entry._timestamp).toLocaleTimeString());var u=co(),a=me(u),d=me(a),c=me(d),f=qe(c,2),w=me(f,!0);he(f),he(d);var S=qe(d,2),E=me(S),b=me(E),m=me(b),o=me(m,!0);he(m),he(b);var _=qe(b,2);_.__click=function(...p){var P;(P=e.buttonAction)==null||P.apply(this,p)},he(E);var h=qe(E,2),g=me(h,!0);he(h);var $=qe(h,2);{var v=p=>{var P=oo(),O=me(P),C=me(O,!0);he(O),he(P),ut(()=>{var U;return et(C,((U=e.entry.payload)==null?void 0:U.error)??"")}),Ue(p,P)};dt($,p=>{e.entry._logType==="init_error"&&p(v)})}he(S),he(a),he(u),ut(()=>{_r(c,1,`w-3 h-3 ${e.entry._logType==="init_error"?"bg-red-500":"bg-indigo-500"} rounded-full`),et(w,oe(i)),_r(m,1,`px-2 py-1 ${oe(n).bg??""} ${oe(n).color??""} text-xs font-semibold rounded-full`),et(o,oe(n).label),et(g,oe(l))}),Ue(t,u),Ht()}Hn(["click"]);function uo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var vn,Ps;function fo(){if(Ps)return vn;Ps=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 ne=L[Y],be=typeof ne;(be==="object"||be==="function")&&!Object.isFrozen(ne)&&t(ne)}),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 ne=Object.create(null);for(const be in L)ne[be]=L[be];return Y.forEach(function(be){for(const Je in be)ne[Je]=be[Je]}),ne}const s="</span>",l=L=>!!L.scope,i=(L,{prefix:Y})=>{if(L.startsWith("language:"))return L.replace("language:","language-");if(L.includes(".")){const ne=L.split(".");return[`${Y}${ne.shift()}`,...ne.map((be,Je)=>`${be}${"_".repeat(Je+1)}`)].join(" ")}return`${Y}${L}`};class u{constructor(Y,ne){this.buffer="",this.classPrefix=ne.classPrefix,Y.walk(this)}addText(Y){this.buffer+=r(Y)}openNode(Y){if(!l(Y))return;const ne=i(Y.scope,{prefix:this.classPrefix});this.span(ne)}closeNode(Y){l(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 d{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 ne=a({scope:Y});this.add(ne),this.stack.push(ne)}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,ne){return typeof ne=="string"?Y.addText(ne):ne.children&&(Y.openNode(ne),ne.children.forEach(be=>this._walk(Y,be)),Y.closeNode(ne)),Y}static _collapse(Y){typeof Y!="string"&&Y.children&&(Y.children.every(ne=>typeof ne=="string")?Y.children=[Y.children.join("")]:Y.children.forEach(ne=>{d._collapse(ne)}))}}class c extends d{constructor(Y){super(),this.options=Y}addText(Y){Y!==""&&this.add(Y)}startScope(Y){this.openNode(Y)}endScope(){this.closeNode()}__addSublanguage(Y,ne){const be=Y.root;ne&&(be.scope=`language:${ne}`),this.add(be)}toHTML(){return new u(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function f(L){return L?typeof L=="string"?L:L.source:null}function w(L){return b("(?=",L,")")}function S(L){return b("(?:",L,")*")}function E(L){return b("(?:",L,")?")}function b(...L){return L.map(ne=>f(ne)).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 o(...L){return"("+(m(L).capture?"":"?:")+L.map(be=>f(be)).join("|")+")"}function _(L){return new RegExp(L.toString()+"|").exec("").length-1}function h(L,Y){const ne=L&&L.exec(Y);return ne&&ne.index===0}const g=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(L,{joinWith:Y}){let ne=0;return L.map(be=>{ne+=1;const Je=ne;let Ye=f(be),ue="";for(;Ye.length>0;){const ce=g.exec(Ye);if(!ce){ue+=Ye;break}ue+=Ye.substring(0,ce.index),Ye=Ye.substring(ce.index+ce[0].length),ce[0][0]==="\\"&&ce[1]?ue+="\\"+String(Number(ce[1])+Je):(ue+=ce[0],ce[0]==="("&&ne++)}return ue}).map(be=>`(${be})`).join(Y)}const v=/\b\B/,p="[a-zA-Z]\\w*",P="[a-zA-Z_]\\w*",O="\\b\\d+(\\.\\d+)?",C="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",U="\\b(0b[01]+)",q="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",J=(L={})=>{const Y=/^#![ ]*\//;return L.binary&&(L.begin=b(Y,/.*\b/,L.binary,/\b.*/)),n({scope:"meta",begin:Y,end:/$/,relevance:0,"on:begin":(ne,be)=>{ne.index!==0&&be.ignoreMatch()}},L)},G={begin:"\\\\[\\s\\S]",relevance:0},ee={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[G]},fe={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[G]},we={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/},Oe=function(L,Y,ne={}){const be=n({scope:"comment",begin:L,end:Y,contains:[]},ne);be.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 Je=o("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 be.contains.push({begin:b(/[ ]+/,"(",Je,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),be},se=Oe("//","$"),x=Oe("/\\*","\\*/"),N=Oe("#","$"),M={scope:"number",begin:O,relevance:0},R={scope:"number",begin:C,relevance:0},y={scope:"number",begin:U,relevance:0},k={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[G,{begin:/\[/,end:/\]/,relevance:0,contains:[G]}]},j={scope:"title",begin:p,relevance:0},W={scope:"title",begin:P,relevance:0},X={begin:"\\.\\s*"+P,relevance:0};var re=Object.freeze({__proto__:null,APOS_STRING_MODE:ee,BACKSLASH_ESCAPE:G,BINARY_NUMBER_MODE:y,BINARY_NUMBER_RE:U,COMMENT:Oe,C_BLOCK_COMMENT_MODE:x,C_LINE_COMMENT_MODE:se,C_NUMBER_MODE:R,C_NUMBER_RE:C,END_SAME_AS_BEGIN:function(L){return Object.assign(L,{"on:begin":(Y,ne)=>{ne.data._beginMatch=Y[1]},"on:end":(Y,ne)=>{ne.data._beginMatch!==Y[1]&&ne.ignoreMatch()}})},HASH_COMMENT_MODE:N,IDENT_RE:p,MATCH_NOTHING_RE:v,METHOD_GUARD:X,NUMBER_MODE:M,NUMBER_RE:O,PHRASAL_WORDS_MODE:we,QUOTE_STRING_MODE:fe,REGEXP_MODE:k,RE_STARTERS_RE:q,SHEBANG:J,TITLE_MODE:j,UNDERSCORE_IDENT_RE:P,UNDERSCORE_TITLE_MODE:W});function ye(L,Y){L.input[L.index-1]==="."&&Y.ignoreMatch()}function T(L,Y){L.className!==void 0&&(L.scope=L.className,delete L.className)}function I(L,Y){Y&&L.beginKeywords&&(L.begin="\\b("+L.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",L.__beforeBegin=ye,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=o(...L.illegal))}function z(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 te=(L,Y)=>{if(!L.beforeMatch)return;if(L.starts)throw new Error("beforeMatch cannot be used with starts");const ne=Object.assign({},L);Object.keys(L).forEach(be=>{delete L[be]}),L.keywords=ne.keywords,L.begin=b(ne.beforeMatch,w(ne.begin)),L.starts={relevance:0,contains:[Object.assign(ne,{endsParent:!0})]},L.relevance=0,delete ne.beforeMatch},Ee=["of","and","for","in","not","or","if","then","parent","list","value"],Ve="keyword";function Re(L,Y,ne=Ve){const be=Object.create(null);return typeof L=="string"?Je(ne,L.split(" ")):Array.isArray(L)?Je(ne,L):Object.keys(L).forEach(function(Ye){Object.assign(be,Re(L[Ye],Y,Ye))}),be;function Je(Ye,ue){Y&&(ue=ue.map(ce=>ce.toLowerCase())),ue.forEach(function(ce){const ve=ce.split("|");be[ve[0]]=[Ye,Ce(ve[0],ve[1])]})}}function Ce(L,Y){return Y?Number(Y):_e(L)?0:1}function _e(L){return Ee.includes(L.toLowerCase())}const xe={},Ie=L=>{console.error(L)},yt=(L,...Y)=>{console.log(`WARN: ${L}`,...Y)},Xe=(L,Y)=>{xe[`${L}/${Y}`]||(console.log(`Deprecated as of ${L}. ${Y}`),xe[`${L}/${Y}`]=!0)},ht=new Error;function bt(L,Y,{key:ne}){let be=0;const Je=L[ne],Ye={},ue={};for(let ce=1;ce<=Y.length;ce++)ue[ce+be]=Je[ce],Ye[ce+be]=!0,be+=_(Y[ce-1]);L[ne]=ue,L[ne]._emit=Ye,L[ne]._multi=!0}function ot(L){if(Array.isArray(L.begin)){if(L.skip||L.excludeBegin||L.returnBegin)throw Ie("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ht;if(typeof L.beginScope!="object"||L.beginScope===null)throw Ie("beginScope must be object"),ht;bt(L,L.begin,{key:"beginScope"}),L.begin=$(L.begin,{joinWith:""})}}function wt(L){if(Array.isArray(L.end)){if(L.skip||L.excludeEnd||L.returnEnd)throw Ie("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ht;if(typeof L.endScope!="object"||L.endScope===null)throw Ie("endScope must be object"),ht;bt(L,L.end,{key:"endScope"}),L.end=$(L.end,{joinWith:""})}}function Er(L){L.scope&&typeof L.scope=="object"&&L.scope!==null&&(L.beginScope=L.scope,delete L.scope)}function Sr(L){Er(L),typeof L.beginScope=="string"&&(L.beginScope={_wrap:L.beginScope}),typeof L.endScope=="string"&&(L.endScope={_wrap:L.endScope}),ot(L),wt(L)}function Yt(L){function Y(ue,ce){return new RegExp(f(ue),"m"+(L.case_insensitive?"i":"")+(L.unicodeRegex?"u":"")+(ce?"g":""))}class ne{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ce,ve){ve.position=this.position++,this.matchIndexes[this.matchAt]=ve,this.regexes.push([ve,ce]),this.matchAt+=_(ce)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ce=this.regexes.map(ve=>ve[1]);this.matcherRe=Y($(ce,{joinWith:"|"}),!0),this.lastIndex=0}exec(ce){this.matcherRe.lastIndex=this.lastIndex;const ve=this.matcherRe.exec(ce);if(!ve)return null;const it=ve.findIndex((A,F)=>F>0&&A!==void 0),D=this.matchIndexes[it];return ve.splice(0,it),Object.assign(ve,D)}}class be{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ce){if(this.multiRegexes[ce])return this.multiRegexes[ce];const ve=new ne;return this.rules.slice(ce).forEach(([it,D])=>ve.addRule(it,D)),ve.compile(),this.multiRegexes[ce]=ve,ve}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ce,ve){this.rules.push([ce,ve]),ve.type==="begin"&&this.count++}exec(ce){const ve=this.getMatcher(this.regexIndex);ve.lastIndex=this.lastIndex;let it=ve.exec(ce);if(this.resumingScanAtSamePosition()&&!(it&&it.index===this.lastIndex)){const D=this.getMatcher(0);D.lastIndex=this.lastIndex+1,it=D.exec(ce)}return it&&(this.regexIndex+=it.position+1,this.regexIndex===this.count&&this.considerAll()),it}}function Je(ue){const ce=new be;return ue.contains.forEach(ve=>ce.addRule(ve.begin,{rule:ve,type:"begin"})),ue.terminatorEnd&&ce.addRule(ue.terminatorEnd,{type:"end"}),ue.illegal&&ce.addRule(ue.illegal,{type:"illegal"}),ce}function Ye(ue,ce){const ve=ue;if(ue.isCompiled)return ve;[T,z,Sr,te].forEach(D=>D(ue,ce)),L.compilerExtensions.forEach(D=>D(ue,ce)),ue.__beforeBegin=null,[I,V,Q].forEach(D=>D(ue,ce)),ue.isCompiled=!0;let it=null;return typeof ue.keywords=="object"&&ue.keywords.$pattern&&(ue.keywords=Object.assign({},ue.keywords),it=ue.keywords.$pattern,delete ue.keywords.$pattern),it=it||/\w+/,ue.keywords&&(ue.keywords=Re(ue.keywords,L.case_insensitive)),ve.keywordPatternRe=Y(it,!0),ce&&(ue.begin||(ue.begin=/\B|\b/),ve.beginRe=Y(ve.begin),!ue.end&&!ue.endsWithParent&&(ue.end=/\B|\b/),ue.end&&(ve.endRe=Y(ve.end)),ve.terminatorEnd=f(ve.end)||"",ue.endsWithParent&&ce.terminatorEnd&&(ve.terminatorEnd+=(ue.end?"|":"")+ce.terminatorEnd)),ue.illegal&&(ve.illegalRe=Y(ue.illegal)),ue.contains||(ue.contains=[]),ue.contains=[].concat(...ue.contains.map(function(D){return fn(D==="self"?ue:D)})),ue.contains.forEach(function(D){Ye(D,ve)}),ue.starts&&Ye(ue.starts,ce),ve.matcher=Je(ve),ve}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||{}),Ye(L)}function ur(L){return L?L.endsWithParent||ur(L.starts):!1}function fn(L){return L.variants&&!L.cachedVariants&&(L.cachedVariants=L.variants.map(function(Y){return n(L,{variants:null},Y)})),L.cachedVariants?L.cachedVariants:ur(L)?n(L,{starts:L.starts?n(L.starts):null}):Object.isFrozen(L)?n(L):L}var Pr="11.11.1";class $t extends Error{constructor(Y,ne){super(Y),this.name="HTMLInjectionError",this.html=ne}}const fr=r,kr=n,Or=Symbol("nomatch"),dn=7,Tr=function(L){const Y=Object.create(null),ne=Object.create(null),be=[];let Je=!0;const Ye="Could not find the language '{}', did you forget to load/include a language module?",ue={disableAutodetect:!0,name:"Plain text",contains:[]};let ce={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:c};function ve(Z){return ce.noHighlightRe.test(Z)}function it(Z){let le=Z.className+" ";le+=Z.parentNode?Z.parentNode.className:"";const Se=ce.languageDetectRe.exec(le);if(Se){const Me=Le(Se[1]);return Me||(yt(Ye.replace("{}",Se[1])),yt("Falling back to no-highlight mode for this block.",Z)),Me?Se[1]:"no-highlight"}return le.split(/\s+/).find(Me=>ve(Me)||Le(Me))}function D(Z,le,Se){let Me="",Qe="";typeof le=="object"?(Me=Z,Se=le.ignoreIllegals,Qe=le.language):(Xe("10.7.0","highlight(lang, code, ...args) has been deprecated."),Xe("10.7.0",`Please use highlight(code, options) instead.
|
|
4
|
+
https://github.com/highlightjs/highlight.js/issues/2277`),Qe=Z,Me=le),Se===void 0&&(Se=!0);const vt={code:Me,language:Qe};Ot("before:highlight",vt);const Tt=vt.result?vt.result:A(vt.language,vt.code,Se);return Tt.code=vt.code,Ot("after:highlight",Tt),Tt}function A(Z,le,Se,Me){const Qe=Object.create(null);function vt(ae,pe){return ae.keywords[pe]}function Tt(){if(!Pe.keywords){ft.addText(We);return}let ae=0;Pe.keywordPatternRe.lastIndex=0;let pe=Pe.keywordPatternRe.exec(We),Te="";for(;pe;){Te+=We.substring(ae,pe.index);const Be=jt.case_insensitive?pe[0].toLowerCase():pe[0],pt=vt(Pe,Be);if(pt){const[Vt,ra]=pt;if(ft.addText(Te),Te="",Qe[Be]=(Qe[Be]||0)+1,Qe[Be]<=dn&&(Rr+=ra),Vt.startsWith("_"))Te+=pe[0];else{const na=jt.classNameAliases[Vt]||Vt;mt(pe[0],na)}}else Te+=pe[0];ae=Pe.keywordPatternRe.lastIndex,pe=Pe.keywordPatternRe.exec(We)}Te+=We.substring(ae),ft.addText(Te)}function Ut(){if(We==="")return;let ae=null;if(typeof Pe.subLanguage=="string"){if(!Y[Pe.subLanguage]){ft.addText(We);return}ae=A(Pe.subLanguage,We,!0,ys[Pe.subLanguage]),ys[Pe.subLanguage]=ae._top}else ae=H(We,Pe.subLanguage.length?Pe.subLanguage:null);Pe.relevance>0&&(Rr+=ae.relevance),ft.__addSublanguage(ae._emitter,ae.language)}function lt(){Pe.subLanguage!=null?Ut():Tt(),We=""}function mt(ae,pe){ae!==""&&(ft.startScope(pe),ft.addText(ae),ft.endScope())}function dr(ae,pe){let Te=1;const Be=pe.length-1;for(;Te<=Be;){if(!ae._emit[Te]){Te++;continue}const pt=jt.classNameAliases[ae[Te]]||ae[Te],Vt=pe[Te];pt?mt(Vt,pt):(We=Vt,Tt(),We=""),Te++}}function hr(ae,pe){return ae.scope&&typeof ae.scope=="string"&&ft.openNode(jt.classNameAliases[ae.scope]||ae.scope),ae.beginScope&&(ae.beginScope._wrap?(mt(We,jt.classNameAliases[ae.beginScope._wrap]||ae.beginScope._wrap),We=""):ae.beginScope._multi&&(dr(ae.beginScope,pe),We="")),Pe=Object.create(ae,{parent:{value:Pe}}),Pe}function Gt(ae,pe,Te){let Be=h(ae.endRe,Te);if(Be){if(ae["on:end"]){const pt=new e(ae);ae["on:end"](pe,pt),pt.isMatchIgnored&&(Be=!1)}if(Be){for(;ae.endsParent&&ae.parent;)ae=ae.parent;return ae}}if(ae.endsWithParent)return Gt(ae.parent,pe,Te)}function Xi(ae){return Pe.matcher.regexIndex===0?(We+=ae[0],1):(mn=!0,0)}function Yi(ae){const pe=ae[0],Te=ae.rule,Be=new e(Te),pt=[Te.__beforeBegin,Te["on:begin"]];for(const Vt of pt)if(Vt&&(Vt(ae,Be),Be.isMatchIgnored))return Xi(pe);return Te.skip?We+=pe:(Te.excludeBegin&&(We+=pe),lt(),!Te.returnBegin&&!Te.excludeBegin&&(We=pe)),hr(Te,ae),Te.returnBegin?0:pe.length}function Zi(ae){const pe=ae[0],Te=le.substring(ae.index),Be=Gt(Pe,ae,Te);if(!Be)return Or;const pt=Pe;Pe.endScope&&Pe.endScope._wrap?(lt(),mt(pe,Pe.endScope._wrap)):Pe.endScope&&Pe.endScope._multi?(lt(),dr(Pe.endScope,ae)):pt.skip?We+=pe:(pt.returnEnd||pt.excludeEnd||(We+=pe),lt(),pt.excludeEnd&&(We=pe));do Pe.scope&&ft.closeNode(),!Pe.skip&&!Pe.subLanguage&&(Rr+=Pe.relevance),Pe=Pe.parent;while(Pe!==Be.parent);return Be.starts&&hr(Be.starts,ae),pt.returnEnd?0:pe.length}function ea(){const ae=[];for(let pe=Pe;pe!==jt;pe=pe.parent)pe.scope&&ae.unshift(pe.scope);ae.forEach(pe=>ft.openNode(pe))}let Nr={};function gs(ae,pe){const Te=pe&&pe[0];if(We+=ae,Te==null)return lt(),0;if(Nr.type==="begin"&&pe.type==="end"&&Nr.index===pe.index&&Te===""){if(We+=le.slice(pe.index,pe.index+1),!Je){const Be=new Error(`0 width match regex (${Z})`);throw Be.languageName=Z,Be.badRule=Nr.rule,Be}return 1}if(Nr=pe,pe.type==="begin")return Yi(pe);if(pe.type==="illegal"&&!Se){const Be=new Error('Illegal lexeme "'+Te+'" for mode "'+(Pe.scope||"<unnamed>")+'"');throw Be.mode=Pe,Be}else if(pe.type==="end"){const Be=Zi(pe);if(Be!==Or)return Be}if(pe.type==="illegal"&&Te==="")return We+=`
|
|
5
|
+
`,1;if(pn>1e5&&pn>pe.index*3)throw new Error("potential infinite loop, way more iterations than matches");return We+=Te,Te.length}const jt=Le(Z);if(!jt)throw Ie(Ye.replace("{}",Z)),new Error('Unknown language: "'+Z+'"');const ta=Yt(jt);let hn="",Pe=Me||ta;const ys={},ft=new ce.__emitter(ce);ea();let We="",Rr=0,Zt=0,pn=0,mn=!1;try{if(jt.__emitTokens)jt.__emitTokens(le,ft);else{for(Pe.matcher.considerAll();;){pn++,mn?mn=!1:Pe.matcher.considerAll(),Pe.matcher.lastIndex=Zt;const ae=Pe.matcher.exec(le);if(!ae)break;const pe=le.substring(Zt,ae.index),Te=gs(pe,ae);Zt=ae.index+Te}gs(le.substring(Zt))}return ft.finalize(),hn=ft.toHTML(),{language:Z,value:hn,relevance:Rr,illegal:!1,_emitter:ft,_top:Pe}}catch(ae){if(ae.message&&ae.message.includes("Illegal"))return{language:Z,value:fr(le),illegal:!0,relevance:0,_illegalBy:{message:ae.message,index:Zt,context:le.slice(Zt-100,Zt+100),mode:ae.mode,resultSoFar:hn},_emitter:ft};if(Je)return{language:Z,value:fr(le),illegal:!1,relevance:0,errorRaised:ae,_emitter:ft,_top:Pe};throw ae}}function F(Z){const le={value:fr(Z),illegal:!1,relevance:0,_top:ue,_emitter:new ce.__emitter(ce)};return le._emitter.addText(Z),le}function H(Z,le){le=le||ce.languages||Object.keys(Y);const Se=F(Z),Me=le.filter(Le).filter(Ge).map(lt=>A(lt,Z,!1));Me.unshift(Se);const Qe=Me.sort((lt,mt)=>{if(lt.relevance!==mt.relevance)return mt.relevance-lt.relevance;if(lt.language&&mt.language){if(Le(lt.language).supersetOf===mt.language)return 1;if(Le(mt.language).supersetOf===lt.language)return-1}return 0}),[vt,Tt]=Qe,Ut=vt;return Ut.secondBest=Tt,Ut}function K(Z,le,Se){const Me=le&&ne[le]||Se;Z.classList.add("hljs"),Z.classList.add(`language-${Me}`)}function de(Z){let le=null;const Se=it(Z);if(ve(Se))return;if(Ot("before:highlightElement",{el:Z,language:Se}),Z.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",Z);return}if(Z.children.length>0&&(ce.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(Z)),ce.throwUnescapedHTML))throw new $t("One of your code blocks includes unescaped HTML.",Z.innerHTML);le=Z;const Me=le.textContent,Qe=Se?D(Me,{language:Se,ignoreIllegals:!0}):H(Me);Z.innerHTML=Qe.value,Z.dataset.highlighted="yes",K(Z,Se,Qe.language),Z.result={language:Qe.language,re:Qe.relevance,relevance:Qe.relevance},Qe.secondBest&&(Z.secondBest={language:Qe.secondBest.language,relevance:Qe.secondBest.relevance}),Ot("after:highlightElement",{el:Z,result:Qe,text:Me})}function ge(Z){ce=kr(ce,Z)}const je=()=>{ke(),Xe("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ke(){ke(),Xe("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Ze=!1;function ke(){function Z(){ke()}if(document.readyState==="loading"){Ze||window.addEventListener("DOMContentLoaded",Z,!1),Ze=!0;return}document.querySelectorAll(ce.cssSelector).forEach(de)}function He(Z,le){let Se=null;try{Se=le(L)}catch(Me){if(Ie("Language definition for '{}' could not be registered.".replace("{}",Z)),Je)Ie(Me);else throw Me;Se=ue}Se.name||(Se.name=Z),Y[Z]=Se,Se.rawDefinition=le.bind(null,L),Se.aliases&&rt(Se.aliases,{languageName:Z})}function tt(Z){delete Y[Z];for(const le of Object.keys(ne))ne[le]===Z&&delete ne[le]}function $e(){return Object.keys(Y)}function Le(Z){return Z=(Z||"").toLowerCase(),Y[Z]||Y[ne[Z]]}function rt(Z,{languageName:le}){typeof Z=="string"&&(Z=[Z]),Z.forEach(Se=>{ne[Se.toLowerCase()]=le})}function Ge(Z){const le=Le(Z);return le&&!le.disableAutodetect}function Ct(Z){Z["before:highlightBlock"]&&!Z["before:highlightElement"]&&(Z["before:highlightElement"]=le=>{Z["before:highlightBlock"](Object.assign({block:le.el},le))}),Z["after:highlightBlock"]&&!Z["after:highlightElement"]&&(Z["after:highlightElement"]=le=>{Z["after:highlightBlock"](Object.assign({block:le.el},le))})}function Et(Z){Ct(Z),be.push(Z)}function St(Z){const le=be.indexOf(Z);le!==-1&&be.splice(le,1)}function Ot(Z,le){const Se=Z;be.forEach(function(Me){Me[Se]&&Me[Se](le)})}function Lt(Z){return Xe("10.7.0","highlightBlock will be removed entirely in v12.0"),Xe("10.7.0","Please use highlightElement now."),de(Z)}Object.assign(L,{highlight:D,highlightAuto:H,highlightAll:ke,highlightElement:de,highlightBlock:Lt,configure:ge,initHighlighting:je,initHighlightingOnLoad:Ke,registerLanguage:He,unregisterLanguage:tt,listLanguages:$e,getLanguage:Le,registerAliases:rt,autoDetection:Ge,inherit:kr,addPlugin:Et,removePlugin:St}),L.debugMode=function(){Je=!1},L.safeMode=function(){Je=!0},L.versionString=Pr,L.regex={concat:b,lookahead:w,either:o,optional:E,anyNumberOfTimes:S};for(const Z in re)typeof re[Z]=="object"&&t(re[Z]);return Object.assign(L,re),L},Kt=Tr({});return Kt.newInstance=()=>Tr({}),vn=Kt,Kt.HighlightJS=Kt,Kt.default=Kt,vn}var ho=fo();const ks=uo(ho);var po=st("<pre><code><!></code></pre>");function mo(t,e){const r=xr(e,["children","$$slots","$$events","$$legacy"]),n=xr(r,["code","highlighted","languageName","langtag"]);let s=rr(e,"code",8),l=rr(e,"highlighted",8),i=rr(e,"languageName",8,"plaintext"),u=rr(e,"langtag",8,!1);var a=po();qa(a,()=>({"data-language":i(),...n,[La]:{langtag:u()}}),void 0,void 0,void 0,"svelte-4jgeki");var d=me(a);_r(d,1,"",null,{},{hljs:!0});var c=me(d);{var f=S=>{var E=zt(),b=gt(E);ei(b,l),Ue(S,E)},w=S=>{var E=Hs();ut(()=>et(E,s())),Ue(S,E)};dt(c,S=>{l()?S(f):S(w,!1)})}he(d),he(a),Ue(t,a)}function Os(t,e){const r=xr(e,["children","$$slots","$$events","$$legacy"]),n=xr(r,["language","code","langtag"]);Bt(e,!1);let s=rr(e,"language",8),l=rr(e,"code",8),i=rr(e,"langtag",8,!1);const u=Ia();let a=Gs("");Aa(()=>{oe(a)&&u("highlight",{highlighted:oe(a)})}),ka(()=>(yn(s()),yn(l())),()=>{ks.registerLanguage(s().name,s().register),_t(a,ks.highlight(l(),{language:s().name}).value)}),Oa(),Ys();var d=zt(),c=gt(d);za(c,e,"default",{get highlighted(){return oe(a)}},f=>{mo(f,Ma(()=>n,{get languageName(){return yn(s()),Ta(()=>s().name)},get langtag(){return i()},get highlighted(){return oe(a)},get code(){return l()}}))}),Ue(t,d),Ht()}function go(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 Ts={name:"json",register:go},ri=$r({}),ni=$r({});let Br=0;function _n(t,e,r=!1){let n;const s=++Br;e.id?n=e.id:n=`${s}`,e.id=n,r&&(n=`${n}-${++Br}`);const l=Date.now();return ni.update(i=>(i[n]||(i[n]={timestamp:l,sortKey:s}),i)),ri.update(i=>{if(!i[n])t==="SEND"?i[n]=[e,{}]:i[n]=[{},e];else{const u=t==="SEND"?0:1;i[n][u]=e}return i}),e}const si=$r([]);function wn(t,e){const r={_logType:t,_logId:`${t}-${++Br}`,_sortKey:Br,_timestamp:Date.now(),payload:e};si.update(n=>[r,...n])}var yo=st(`<style>body {
|
|
6
|
+
overflow: hidden;
|
|
7
|
+
}</style>`),vo=st('<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>'),_o=st('<ul class="divide-y divide-gray-100"></ul>'),wo=st('<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>'),bo=st(`<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.
|
|
8
|
+
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 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 Bf(t,e){Bt(e,!0);let r=er(void 0),n=er($s({})),s=er($s([])),l=er(!1),i=er(""),u=er(""),a=er("ActivityStreams Data Exchange");ri.subscribe(M=>{_t(r,M,!0)}),ni.subscribe(M=>{_t(n,M,!0)}),si.subscribe(M=>{_t(s,M,!0)});const d=ct(()=>{const M=[];for(const[R,y]of Object.entries(oe(r)??{})){const k=oe(n)[R];M.push({kind:"activity",id:R,sortKey:(k==null?void 0:k.sortKey)??0,tuple:y,timestamp:(k==null?void 0:k.timestamp)??0})}for(const R of oe(s))M.push({kind:"schema",sortKey:R._sortKey,entry:R});return M.sort((R,y)=>y.sortKey-R.sortKey),M});function c(M){return()=>{var j;let R=M,y=M;M.includes("-")&&(R=M.split("-")[0]),console.log(`indexSend:${R} indexResp:${y}`),console.log("logs: ",oe(r)),_t(a,"ActivityStreams Data Exchange"),_t(l,!0),_t(i,JSON.stringify(oe(r)[R][0],null,2),!0);const k=(j=oe(r)[y])==null?void 0:j[1];_t(u,k&&Object.keys(k).length>0?JSON.stringify(k,null,2):"",!0)}}function f(M){return()=>{_t(a,`Schema Event: ${M._logType}`),_t(l,!0),_t(i,JSON.stringify(M.payload,null,2),!0),_t(u,"")}}var w=bo();xa("asm1x0",M=>{var R=zt(),y=gt(R);{var k=j=>{var W=yo();Ue(j,W)};dt(y,j=>{oe(l)&&j(k)})}Ue(M,R)});var S=gt(w),E=qe(me(S),2),b=qe(me(E),2),m=me(b);{var o=M=>{var R=vo();Ue(M,R)},_=M=>{var R=_o();Rn(R,21,()=>oe(d),y=>y.kind==="schema"?y.entry._logId:y.id,(y,k)=>{var j=zt(),W=gt(j);{var X=re=>{{let ye=ct(()=>f(oe(k).entry));lo(re,{get entry(){return oe(k).entry},get buttonAction(){return oe(ye)}})}},ie=re=>{var ye=zt(),T=gt(ye);{var I=z=>{var Q=zt(),te=gt(Q);Rn(te,17,()=>Object.entries(oe(k).tuple[oe(k).tuple.length-1]),Zs,(Ee,Ve)=>{var Re=ct(()=>Na(oe(Ve),2));let Ce=()=>oe(Re)[0],_e=()=>oe(Re)[1];var xe=zt(),Ie=gt(xe);{var yt=Xe=>{{let ht=ct(()=>c(`${oe(k).id}-${Ce()}`)),bt=ct(()=>Object.prototype.hasOwnProperty.call(oe(k).tuple[0],"@context")),ot=ct(()=>typeof oe(r)[oe(k).id][1]<"u"),wt=ct(()=>`${oe(k).id}-${Ce()}`);Ss(Xe,{get buttonAction(){return oe(ht)},get hasSend(){return oe(bt)},get hasResponse(){return oe(ot)},get id(){return oe(wt)},get entry(){return _e()},get timestamp(){return oe(k).timestamp}})}};dt(Ie,Xe=>{_e()&&Xe(yt)})}Ue(Ee,xe)}),Ue(z,Q)},V=z=>{const Q=ct(()=>Object.prototype.hasOwnProperty.call(oe(k).tuple[0],"@context")),te=ct(()=>Object.prototype.hasOwnProperty.call(oe(k).tuple[1],"@context"));{let Ee=ct(()=>c(oe(k).id)),Ve=ct(()=>oe(te)?oe(k).tuple[1]:oe(k).tuple[0]);Ss(z,{get buttonAction(){return oe(Ee)},get id(){return oe(k).id},get hasSend(){return oe(Q)},get hasResponse(){return oe(te)},get entry(){return oe(Ve)},get timestamp(){return oe(k).timestamp}})}};dt(T,z=>{Array.isArray(oe(k).tuple[oe(k).tuple.length-1])?z(I):z(V,!1)},!0)}Ue(re,ye)};dt(W,re=>{oe(k).kind==="schema"?re(X):re(ie,!1)})}Ue(y,j)}),he(R),Ue(M,R)};dt(m,M=>{oe(d).length===0?M(o):M(_,!1)})}he(b),he(E),he(S);var h=qe(S,2),g=me(h),$=me(g),v=me($),p=me(v),P=qe(me(p));he(p);var O=qe(p,2);O.__click=()=>_t(l,!1),he(v),Xs(2),he($);var C=qe($,2),U=me(C),q=me(U),J=me(q),G=me(J,!0);he(J);var ee=qe(J);he(q);var fe=qe(q,2),we=me(fe);Os(we,{get language(){return Ts},get code(){return oe(i)}}),he(fe),he(U);var Oe=qe(U,2);{var se=M=>{var R=wo(),y=qe(me(R),2),k=me(y);Os(k,{get language(){return Ts},get code(){return oe(u)}}),he(y),he(R),Ue(M,R)};dt(Oe,M=>{oe(u)&&M(se)})}he(C);var x=qe(C,2),N=me(x);N.__click=()=>_t(l,!1),he(x),he(g),he(h),ut(()=>{_r(h,1,`${oe(l)?"flex items-center justify-center":"hidden"} bg-black bg-opacity-50 fixed top-0 left-0 w-full h-full z-50 p-4`),et(P,` ${oe(a)??""}`),et(G,oe(u)?"📤":"📋"),et(ee,` ${oe(u)?"Sent to Sockethub":"Event Payload"}`)}),Ue(t,w),Ht()}Hn(["click"]);var $o=Object.create,Eo=Object.getPrototypeOf,Ns=Object.defineProperty,So=Object.getOwnPropertyNames,Po=Object.prototype.hasOwnProperty;function ko(t){return this[t]}var Oo,To=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=Oo??(Oo=new WeakMap),l=s.get(t);if(l)return l}r=t!=null?$o(Eo(t)):{};const i=Ns(r,"default",{value:t,enumerable:!0});for(let u of So(t))Po.call(i,u)||Ns(i,u,{get:ko.bind(t,u),enumerable:!0});return n&&s.set(t,i),i},No=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ro=No((t,e)=>{var r=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function l(d,c,f){this.fn=d,this.context=c,this.once=f||!1}function i(d,c,f,w,S){if(typeof f!="function")throw new TypeError("The listener must be a function");var E=new l(f,w||d,S),b=n?n+c:c;return d._events[b]?d._events[b].fn?d._events[b]=[d._events[b],E]:d._events[b].push(E):(d._events[b]=E,d._eventsCount++),d}function u(d,c){--d._eventsCount===0?d._events=new s:delete d._events[c]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],f,w;if(this._eventsCount===0)return c;for(w in f=this._events)r.call(f,w)&&c.push(n?w.slice(1):w);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},a.prototype.listeners=function(c){var f=n?n+c:c,w=this._events[f];if(!w)return[];if(w.fn)return[w.fn];for(var S=0,E=w.length,b=new Array(E);S<E;S++)b[S]=w[S].fn;return b},a.prototype.listenerCount=function(c){var f=n?n+c:c,w=this._events[f];return w?w.fn?1:w.length:0},a.prototype.emit=function(c,f,w,S,E,b){var m=n?n+c:c;if(!this._events[m])return!1;var o=this._events[m],_=arguments.length,h,g;if(o.fn){switch(o.once&&this.removeListener(c,o.fn,void 0,!0),_){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,f),!0;case 3:return o.fn.call(o.context,f,w),!0;case 4:return o.fn.call(o.context,f,w,S),!0;case 5:return o.fn.call(o.context,f,w,S,E),!0;case 6:return o.fn.call(o.context,f,w,S,E,b),!0}for(g=1,h=new Array(_-1);g<_;g++)h[g-1]=arguments[g];o.fn.apply(o.context,h)}else{var $=o.length,v;for(g=0;g<$;g++)switch(o[g].once&&this.removeListener(c,o[g].fn,void 0,!0),_){case 1:o[g].fn.call(o[g].context);break;case 2:o[g].fn.call(o[g].context,f);break;case 3:o[g].fn.call(o[g].context,f,w);break;case 4:o[g].fn.call(o[g].context,f,w,S);break;default:if(!h)for(v=1,h=new Array(_-1);v<_;v++)h[v-1]=arguments[v];o[g].fn.apply(o[g].context,h)}}return!0},a.prototype.on=function(c,f,w){return i(this,c,f,w,!1)},a.prototype.once=function(c,f,w){return i(this,c,f,w,!0)},a.prototype.removeListener=function(c,f,w,S){var E=n?n+c:c;if(!this._events[E])return this;if(!f)return u(this,E),this;var b=this._events[E];if(b.fn)b.fn===f&&(!S||b.once)&&(!w||b.context===w)&&u(this,E);else{for(var m=0,o=[],_=b.length;m<_;m++)(b[m].fn!==f||S&&!b[m].once||w&&b[m].context!==w)&&o.push(b[m]);o.length?this._events[E]=o.length===1?o[0]:o:u(this,E)}return this},a.prototype.removeAllListeners=function(c){var f;return c?(f=n?n+c:c,this._events[f]&&u(this,f)):(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)}),Io="https://www.w3.org/ns/activitystreams",Ao="https://sockethub.org/ns/context/v1.jsonld",An="https://sockethub.org/ns/context/platform/",Co=To(Ro()),jo=Co.default;/*!
|
|
9
|
+
* activity-streams
|
|
10
|
+
* https://github.com/silverbucket/activity-streams
|
|
11
|
+
*
|
|
12
|
+
* Developed and Maintained by:
|
|
13
|
+
* Nick Jennings <nick@silverbucket.net>
|
|
14
|
+
*
|
|
15
|
+
* activity-streams is released under the MIT (see LICENSE).
|
|
16
|
+
*
|
|
17
|
+
* You don't have to do anything special to choose one license or the other
|
|
18
|
+
* and you don't have to notify anyone which license you are using.
|
|
19
|
+
* Please see the corresponding license file for details of these licenses.
|
|
20
|
+
* You are free to use, modify and distribute this software, but all copyright
|
|
21
|
+
* information must remain.
|
|
22
|
+
*
|
|
23
|
+
*/var or=new jo,Mr={stream:["@context","id","type","platform","actor","target","object","published","error"],object:["id","type","context","alias","attachedTo","attachment","attributedTo","attributedWith","condition","content","contentMap","context","contextOf","name","endTime","generator","generatorOf","group","icon","image","inReplyTo","members","memberOf","message","location","locationOf","objectOf","originOf","presence","preview","previewOf","provider","providerOf","published","rating","relationship","resultOf","replies","role","scope","scopeOf","startTime","status","summary","topic","tag","tagOf","targetOf","title","titleMap","updated","url","xmpp:stanza-id"]},Rs={actor:{primary:"id",props:Mr},target:{primary:"id",props:Mr},object:{primary:"content",props:Mr}},sr=new Map,ii={},Cn=!1,jn=!0,ai=[];function Mo(t,e){const r=ii[t];return Array.isArray(r)&&r.includes(e)}function Mn(t,e,r=!1){if(e===null)throw new Error(`ActivityStreams validation failed: the "${t}" property is null. Example: { id: "user@example.com", type: "person" }`);if(e===void 0)throw new Error(`ActivityStreams validation failed: the "${t}" property is undefined. Example: { id: "user@example.com", type: "person" }`);if(typeof e=="string")throw new Error(`ActivityStreams validation failed: the "${t}" property received string "${e}" but expected an object. Use: { id: "${e}", type: "person" }`);if(typeof e!="object"||Array.isArray(e)){const u=Array.isArray(e)?"array":typeof e,a=String(e);throw new Error(`ActivityStreams validation failed: the "${t}" property must be an object, received ${u} (${a}). Example: { id: "user@example.com", type: "person" }`)}if(r&&!e.id)throw new Error(`ActivityStreams validation failed: the "${t}" property requires an 'id' property. Example: { id: "user@example.com", type: "person" }`);const s=e,l=Mr[t],i=Object.keys(s).filter(u=>!l.includes(u));for(const u of i){const a=e;if(!Mo(a.type,u)&&!ai.includes(a.type)){console.log(a);const d=typeof a[u]=="string"?`"${a[u]}"`:String(a[u]),c=`ActivityStreams validation failed: property "${u}" with value ${d} is not allowed on the "${t}" object of type "${a.type}".`;if(Cn)throw new Error(c);jn&&console.warn(c)}}}function Do(t){const e={},r=t;for(const n of Object.keys(r)){const s=r[n];if(typeof s=="string")e[n]=sr.get(s)||s;else if(Array.isArray(s)){const l=[];for(const i of s)typeof i=="string"&&l.push(sr.get(i)||i);e[n]=l}else e[n]=s}for(const n of Object.keys(Rs)){const s=e[n];if(typeof s=="string"){const l=Rs[n].primary;e[n]={[l]:s}}}return e}function qo(t){Mn("stream",t),typeof t.object=="object"&&Mn("object",t.object);const e=Do(t);return or.emit("activity-stream",e),e}var Lo={create:t=>{Mn("object",t,!0);const e=t;return sr.set(e.id,e),or.emit("activity-object-create",e),e},delete:t=>{const e=sr.delete(t);return e&&or.emit("activity-object-delete",t),e},get:(t,e)=>{let r=sr.get(t);if(!r){if(!e)return t;r={id:t}}return r},list:()=>sr.keys()};function Uo(t={}){ai=(t==null?void 0:t.specialObjs)||[],Cn=typeof t.failOnUnknownObjectProperties=="boolean"?t.failOnUnknownObjectProperties:Cn,jn=typeof t.warnOnUnknownObjectProperties=="boolean"?t.warnOnUnknownObjectProperties:jn;const e=t.customProps||{};for(const r of Object.keys(e))ii[r]=e[r];return{Stream:qo,Object:Lo,on:(r,n)=>or.on(r,n),once:(r,n)=>or.once(r,n),off:(r,n)=>or.off(r,n)}}(t=>{t.ASFactor=Uo})(typeof globalThis=="object"?globalThis:{});function Vo(t){const e=t.startsWith("https://")?t:`${An}${t}/v1.jsonld`;return[Io,Ao,e]}function Hr(t){if(Array.isArray(t)){for(const e of t)if(typeof e=="string"&&e.startsWith(An)){const r=e.slice(An.length),n=r.indexOf("/");if(n>0)return r.slice(0,n)}}}var Fo=Object.create,zo=Object.getPrototypeOf,wr=Object.defineProperty,oi=Object.getOwnPropertyNames,xo=Object.getOwnPropertyDescriptor,ci=Object.prototype.hasOwnProperty;function li(t){return this[t]}var Bo,Yr=(t,e,r)=>{var n=t!=null&&typeof t=="object";if(n){var s=Bo??(Bo=new WeakMap),l=s.get(t);if(l)return l}r=t!=null?Fo(zo(t)):{};const i=wr(r,"default",{value:t,enumerable:!0});for(let u of oi(t))ci.call(i,u)||wr(i,u,{get:li.bind(t,u),enumerable:!0});return n&&s.set(t,i),i},Ho=t=>{var e=(Is??(Is=new WeakMap)).get(t),r;if(e)return e;if(e=wr({},"__esModule",{value:!0}),t&&typeof t=="object"||typeof t=="function")for(var n of oi(t))ci.call(e,n)||wr(e,n,{get:li.bind(t,n),enumerable:!(r=xo(t,n))||r.enumerable});return Is.set(t,e),e},Is,B=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Ko=t=>t;function Go(t,e){this[t]=Ko.bind(null,e)}var Wo=(t,e)=>{for(var r in e)wr(t,r,{get:e[r],enumerable:!0,configurable:!0,set:Go.bind(e,r)})},Jo=(t,e)=>()=>(t&&(e=t(t=0)),e),Qo=B((t,e)=>{var r=Object.prototype.hasOwnProperty,n="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(n=!1));function l(d,c,f){this.fn=d,this.context=c,this.once=f||!1}function i(d,c,f,w,S){if(typeof f!="function")throw new TypeError("The listener must be a function");var E=new l(f,w||d,S),b=n?n+c:c;return d._events[b]?d._events[b].fn?d._events[b]=[d._events[b],E]:d._events[b].push(E):(d._events[b]=E,d._eventsCount++),d}function u(d,c){--d._eventsCount===0?d._events=new s:delete d._events[c]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],f,w;if(this._eventsCount===0)return c;for(w in f=this._events)r.call(f,w)&&c.push(n?w.slice(1):w);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(f)):c},a.prototype.listeners=function(c){var f=n?n+c:c,w=this._events[f];if(!w)return[];if(w.fn)return[w.fn];for(var S=0,E=w.length,b=new Array(E);S<E;S++)b[S]=w[S].fn;return b},a.prototype.listenerCount=function(c){var f=n?n+c:c,w=this._events[f];return w?w.fn?1:w.length:0},a.prototype.emit=function(c,f,w,S,E,b){var m=n?n+c:c;if(!this._events[m])return!1;var o=this._events[m],_=arguments.length,h,g;if(o.fn){switch(o.once&&this.removeListener(c,o.fn,void 0,!0),_){case 1:return o.fn.call(o.context),!0;case 2:return o.fn.call(o.context,f),!0;case 3:return o.fn.call(o.context,f,w),!0;case 4:return o.fn.call(o.context,f,w,S),!0;case 5:return o.fn.call(o.context,f,w,S,E),!0;case 6:return o.fn.call(o.context,f,w,S,E,b),!0}for(g=1,h=new Array(_-1);g<_;g++)h[g-1]=arguments[g];o.fn.apply(o.context,h)}else{var $=o.length,v;for(g=0;g<$;g++)switch(o[g].once&&this.removeListener(c,o[g].fn,void 0,!0),_){case 1:o[g].fn.call(o[g].context);break;case 2:o[g].fn.call(o[g].context,f);break;case 3:o[g].fn.call(o[g].context,f,w);break;case 4:o[g].fn.call(o[g].context,f,w,S);break;default:if(!h)for(v=1,h=new Array(_-1);v<_;v++)h[v-1]=arguments[v];o[g].fn.apply(o[g].context,h)}}return!0},a.prototype.on=function(c,f,w){return i(this,c,f,w,!1)},a.prototype.once=function(c,f,w){return i(this,c,f,w,!0)},a.prototype.removeListener=function(c,f,w,S){var E=n?n+c:c;if(!this._events[E])return this;if(!f)return u(this,E),this;var b=this._events[E];if(b.fn)b.fn===f&&(!S||b.once)&&(!w||b.context===w)&&u(this,E);else{for(var m=0,o=[],_=b.length;m<_;m++)(b[m].fn!==f||S&&!b[m].once||w&&b[m].context!==w)&&o.push(b[m]);o.length?this._events[E]=o.length===1?o[0]:o:u(this,E)}return this},a.prototype.removeAllListeners=function(c){var f;return c?(f=n?n+c:c,this._events[f]&&u(this,f)):(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)}),Kr=B(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((h,g)=>`${h}${g}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((h,g)=>(g instanceof r&&(h[g.str]=(h[g.str]||0)+1),h),{})}}t._Code=n,t.nil=new n("");function s(o,..._){const h=[o[0]];let g=0;for(;g<_.length;)u(h,_[g]),h.push(o[++g]);return new n(h)}t._=s;var l=new n("+");function i(o,..._){const h=[S(o[0])];let g=0;for(;g<_.length;)h.push(l),u(h,_[g]),h.push(l,S(o[++g]));return a(h),new n(h)}t.str=i;function u(o,_){_ instanceof n?o.push(..._._items):_ instanceof r?o.push(_):o.push(f(_))}t.addCodeArg=u;function a(o){let _=1;for(;_<o.length-1;){if(o[_]===l){const h=d(o[_-1],o[_+1]);if(h!==void 0){o.splice(_-1,3,h);continue}o[_++]="+"}_++}}function d(o,_){if(_==='""')return o;if(o==='""')return _;if(typeof o=="string")return _ instanceof r||o[o.length-1]!=='"'?void 0:typeof _!="string"?`${o.slice(0,-1)}${_}"`:_[0]==='"'?o.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(o instanceof r))return`"${o}${_.slice(1)}`}function c(o,_){return _.emptyStr()?o:o.emptyStr()?_:i`${o}${_}`}t.strConcat=c;function f(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:S(Array.isArray(o)?o.join(","):o)}function w(o){return new n(S(o))}t.stringify=w;function S(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=S;function E(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=E;function b(o){if(typeof o=="string"&&t.IDENTIFIER.test(o))return new n(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}t.getEsmExportName=b;function m(o){return new n(o.toString())}t.regexpCode=m}),As=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Kr();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.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:d,parent:c}={}){this._names={},this._prefixes=d,this._parent=c}toName(d){return d instanceof e.Name?d:this.name(d)}name(d){return new e.Name(this._newName(d))}_newName(d){const c=this._names[d]||this._nameGroup(d);return`${d}${c.index++}`}_nameGroup(d){var c,f;if(!((f=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||f===void 0)&&f.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}t.Scope=s;class l extends e.Name{constructor(d,c){super(c),this.prefix=d}setValue(d,{property:c,itemIndex:f}){this.value=d,this.scopePath=(0,e._)`.${new e.Name(c)}[${f}]`}}t.ValueScopeName=l;var i=(0,e._)`\n`;class u extends s{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?i:e.nil}}get(){return this._scope}name(d){return new l(d,this._newName(d))}value(d,c){var f;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(d),{prefix:S}=w,E=(f=c.key)!==null&&f!==void 0?f:c.ref;let b=this._values[S];if(b){const _=b.get(E);if(_)return _}else b=this._values[S]=new Map;b.set(E,w);const m=this._scope[S]||(this._scope[S]=[]),o=m.length;return m[o]=c.ref,w.setValue(c,{property:S,itemIndex:o}),w}getValue(d,c){const f=this._values[d];if(f)return f.get(c)}scopeRefs(d,c=this._values){return this._reduceValues(c,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e._)`${d}${f.scopePath}`})}scopeCode(d=this._values,c,f){return this._reduceValues(d,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},c,f)}_reduceValues(d,c,f={},w){let S=e.nil;for(const E in d){const b=d[E];if(!b)continue;const m=f[E]=f[E]||new Map;b.forEach(o=>{if(m.has(o))return;m.set(o,n.Started);let _=c(o);if(_){const h=this.opts.es5?t.varKinds.var:t.varKinds.const;S=(0,e._)`${S}${h} ${o} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(o))S=(0,e._)`${S}${_}${this.opts._n}`;else throw new r(o);m.set(o,n.Completed)})}return S}}t.ValueScope=u}),Ae=B(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=Kr(),r=As(),n=Kr();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=As();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 l{optimizeNodes(){return this}optimizeNames(y,k){return this}}class i extends l{constructor(y,k,j){super(),this.varKind=y,this.name=k,this.rhs=j}render({es5:y,_n:k}){const j=y?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${j} ${this.name}${W};`+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 l{constructor(y,k,j){super(),this.lhs=y,this.rhs=k,this.sideEffects=j}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 J(y,this.rhs)}}class a extends u{constructor(y,k,j,W){super(y,j,W),this.op=k}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class d extends l{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class c extends l{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class f extends l{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class w extends l{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 S extends l{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((k,j)=>k+j.render(y),"")}optimizeNodes(){const{nodes:y}=this;let k=y.length;for(;k--;){const j=y[k].optimizeNodes();Array.isArray(j)?y.splice(k,1,...j):j?y[k]=j:y.splice(k,1)}return y.length>0?this:void 0}optimizeNames(y,k){const{nodes:j}=this;let W=j.length;for(;W--;){const X=j[W];X.optimizeNames(y,k)||(ee(y,X.names),j.splice(W,1))}return j.length>0?this:void 0}get names(){return this.nodes.reduce((y,k)=>q(y,k.names),{})}}class E extends S{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class b extends S{}class m extends E{}m.kind="else";class o extends E{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 j=k.optimizeNodes();k=this.else=Array.isArray(j)?new m(j):j}if(k)return y===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(fe(y),k instanceof o?[k]:k.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,k){var j;if(this.else=(j=this.else)===null||j===void 0?void 0:j.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 J(y,this.condition),this.else&&q(y,this.else.names),y}}o.kind="if";class _ extends E{}_.kind="for";class h 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 g extends _{constructor(y,k,j,W){super(),this.varKind=y,this.name=k,this.from=j,this.to=W}render(y){const k=y.es5?r.varKinds.var:this.varKind,{name:j,from:W,to:X}=this;return`for(${k} ${j}=${W}; ${j}<${X}; ${j}++)`+super.render(y)}get names(){const y=J(super.names,this.from);return J(y,this.to)}}class $ extends _{constructor(y,k,j,W){super(),this.loop=y,this.varKind=k,this.name=j,this.iterable=W}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 v extends E{constructor(y,k,j){super(),this.name=y,this.args=k,this.async=j}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}v.kind="func";class p extends S{render(y){return"return "+super.render(y)}}p.kind="return";class P extends E{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 j,W;return super.optimizeNames(y,k),(j=this.catch)===null||j===void 0||j.optimizeNames(y,k),(W=this.finally)===null||W===void 0||W.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 E{constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}O.kind="catch";class C extends E{render(y){return"finally"+super.render(y)}}C.kind="finally";class U{constructor(y,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
24
|
+
`:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new b]}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 j=this._extScope.value(y,k);return(this._values[j.prefix]||(this._values[j.prefix]=new Set)).add(j),j}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,j,W){const X=this._scope.toName(k);return j!==void 0&&W&&(this._constants[X.str]=j),this._leafNode(new i(y,X,j)),X}const(y,k,j){return this._def(r.varKinds.const,y,k,j)}let(y,k,j){return this._def(r.varKinds.let,y,k,j)}var(y,k,j){return this._def(r.varKinds.var,y,k,j)}assign(y,k,j){return this._leafNode(new u(y,k,j))}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[j,W]of y)k.length>1&&k.push(","),k.push(j),(j!==W||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,W));return k.push("}"),new e._Code(k)}if(y,k,j){if(this._blockNode(new o(y)),k&&j)this.code(k).else().code(j).endIf();else if(k)this.code(k).endIf();else if(j)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new o(y))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(o,m)}_for(y,k){return this._blockNode(y),k&&this.code(k).endFor(),this}for(y,k){return this._for(new h(y),k)}forRange(y,k,j,W,X=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(y);return this._for(new g(X,ie,k,j),()=>W(ie))}forOf(y,k,j,W=r.varKinds.const){const X=this._scope.toName(y);if(this.opts.es5){const ie=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ie}.length`,re=>{this.var(X,(0,e._)`${ie}[${re}]`),j(X)})}return this._for(new $("of",W,X,k),()=>j(X))}forIn(y,k,j,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,e._)`Object.keys(${k})`,j);const X=this._scope.toName(y);return this._for(new $("in",W,X,k),()=>j(X))}endFor(){return this._endBlockNode(_)}label(y){return this._leafNode(new d(y))}break(y){return this._leafNode(new c(y))}return(y){const k=new p;if(this._blockNode(k),this.code(y),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(p)}try(y,k,j){if(!k&&!j)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new P;if(this._blockNode(W),this.code(y),k){const X=this.name("e");this._currNode=W.catch=new O(X),k(X)}return j&&(this._currNode=W.finally=new C,this.code(j)),this._endBlockNode(O,C)}throw(y){return this._leafNode(new f(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 j=this._nodes.length-k;if(j<0||y!==void 0&&j!==y)throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${y} expected`);return this._nodes.length=k,this}func(y,k=e.nil,j,W){return this._blockNode(new v(y,k,j)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(v)}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 j=this._currNode;if(j instanceof y||k&&j 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 o))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=U;function q(R,y){for(const k in y)R[k]=(R[k]||0)+(y[k]||0);return R}function J(R,y){return y instanceof e._CodeOrName?q(R,y.names):R}function G(R,y,k){if(R instanceof e.Name)return j(R);if(!W(R))return R;return new e._Code(R._items.reduce((X,ie)=>(ie instanceof e.Name&&(ie=j(ie)),ie instanceof e._Code?X.push(...ie._items):X.push(ie),X),[]));function j(X){const ie=k[X.str];return ie===void 0||y[X.str]!==1?X:(delete y[X.str],ie)}function W(X){return X instanceof e._Code&&X._items.some(ie=>ie instanceof e.Name&&y[ie.str]===1&&k[ie.str]!==void 0)}}function ee(R,y){for(const k in y)R[k]=(R[k]||0)-(y[k]||0)}function fe(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${M(R)}`}t.not=fe;var we=N(t.operators.AND);function Oe(...R){return R.reduce(we)}t.and=Oe;var se=N(t.operators.OR);function x(...R){return R.reduce(se)}t.or=x;function N(R){return(y,k)=>y===e.nil?k:k===e.nil?y:(0,e._)`${M(y)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),Fe=B(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=Kr();function n(v){const p={};for(const P of v)p[P]=!0;return p}t.toHash=n;function s(v,p){return typeof p=="boolean"?p:Object.keys(p).length===0?!0:(l(v,p),!i(p,v.self.RULES.all))}t.alwaysValidSchema=s;function l(v,p=v.schema){const{opts:P,self:O}=v;if(!P.strictSchema||typeof p=="boolean")return;const C=O.RULES.keywords;for(const U in p)C[U]||$(v,`unknown keyword: "${U}"`)}t.checkUnknownRules=l;function i(v,p){if(typeof v=="boolean")return!v;for(const P in v)if(p[P])return!0;return!1}t.schemaHasRules=i;function u(v,p){if(typeof v=="boolean")return!v;for(const P in v)if(P!=="$ref"&&p.all[P])return!0;return!1}t.schemaHasRulesButRef=u;function a({topSchemaRef:v,schemaPath:p},P,O,C){if(!C){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${v}${p}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function d(v){return w(decodeURIComponent(v))}t.unescapeFragment=d;function c(v){return encodeURIComponent(f(v))}t.escapeFragment=c;function f(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=f;function w(v){return v.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function S(v,p){if(Array.isArray(v))for(const P of v)p(P);else p(v)}t.eachItem=S;function E({mergeNames:v,mergeToName:p,mergeValues:P,resultToName:O}){return(C,U,q,J)=>{const G=q===void 0?U:q instanceof e.Name?(U instanceof e.Name?v(C,U,q):p(C,U,q),q):U instanceof e.Name?(p(C,q,U),U):P(U,q);return J===e.Name&&!(G instanceof e.Name)?O(C,G):G}}t.mergeEvaluated={props:E({mergeNames:(v,p,P)=>v.if((0,e._)`${P} !== true && ${p} !== undefined`,()=>{v.if((0,e._)`${p} === true`,()=>v.assign(P,!0),()=>v.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${p})`))}),mergeToName:(v,p,P)=>v.if((0,e._)`${P} !== true`,()=>{p===!0?v.assign(P,!0):(v.assign(P,(0,e._)`${P} || {}`),m(v,P,p))}),mergeValues:(v,p)=>v===!0?!0:{...v,...p},resultToName:b}),items:E({mergeNames:(v,p,P)=>v.if((0,e._)`${P} !== true && ${p} !== undefined`,()=>v.assign(P,(0,e._)`${p} === true ? true : ${P} > ${p} ? ${P} : ${p}`)),mergeToName:(v,p,P)=>v.if((0,e._)`${P} !== true`,()=>v.assign(P,p===!0?!0:(0,e._)`${P} > ${p} ? ${P} : ${p}`)),mergeValues:(v,p)=>v===!0?!0:Math.max(v,p),resultToName:(v,p)=>v.var("items",p)})};function b(v,p){if(p===!0)return v.var("props",!0);const P=v.var("props",(0,e._)`{}`);return p!==void 0&&m(v,P,p),P}t.evaluatedPropsToName=b;function m(v,p,P){Object.keys(P).forEach(O=>v.assign((0,e._)`${p}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var o={};function _(v,p){return v.scopeValue("func",{ref:p,code:o[p.code]||(o[p.code]=new r._Code(p.code))})}t.useFunc=_;var h;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(h||(t.Type=h={}));function g(v,p,P){if(v instanceof e.Name){const O=p===h.Num;return P?O?(0,e._)`"[" + ${v} + "]"`:(0,e._)`"['" + ${v} + "']"`:O?(0,e._)`"/" + ${v}`:(0,e._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(v).toString():"/"+f(v)}t.getErrorPath=g;function $(v,p,P=v.opts.strictSchema){if(P){if(p=`strict mode: ${p}`,P===!0)throw new Error(p);v.self.logger.warn(p)}}t.checkStrictMode=$}),Qt=B(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}),Zr=B(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=Fe(),n=Qt();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:o})=>o?(0,e.str)`"${m}" keyword must be ${o} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,o=t.keywordError,_,h){const{it:g}=m,{gen:$,compositeRule:v,allErrors:p}=g,P=f(m,o,_);h??(v||p)?a($,P):d(g,(0,e._)`[${P}]`)}t.reportError=s;function l(m,o=t.keywordError,_){const{it:h}=m,{gen:g,compositeRule:$,allErrors:v}=h,p=f(m,o,_);a(g,p),$||v||d(h,n.default.vErrors)}t.reportExtraError=l;function i(m,o){m.assign(n.default.errors,o),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(o,()=>m.assign((0,e._)`${n.default.vErrors}.length`,o),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function u({gen:m,keyword:o,schemaValue:_,data:h,errsCount:g,it:$}){if(g===void 0)throw new Error("ajv implementation error");const v=m.name("err");m.forRange("i",g,n.default.errors,p=>{m.const(v,(0,e._)`${n.default.vErrors}[${p}]`),m.if((0,e._)`${v}.instancePath === undefined`,()=>m.assign((0,e._)`${v}.instancePath`,(0,e.strConcat)(n.default.instancePath,$.errorPath))),m.assign((0,e._)`${v}.schemaPath`,(0,e.str)`${$.errSchemaPath}/${o}`),$.opts.verbose&&(m.assign((0,e._)`${v}.schema`,_),m.assign((0,e._)`${v}.data`,h))})}t.extendErrors=u;function a(m,o){const _=m.const("err",o);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 d(m,o){const{gen:_,validateName:h,schemaEnv:g}=m;g.$async?_.throw((0,e._)`new ${m.ValidationError}(${o})`):(_.assign((0,e._)`${h}.errors`,o),_.return(!1))}var c={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 f(m,o,_){const{createErrors:h}=m.it;return h===!1?(0,e._)`{}`:w(m,o,_)}function w(m,o,_={}){const{gen:h,it:g}=m,$=[S(g,_),E(m,_)];return b(m,o,$),h.object(...$)}function S({errorPath:m},{instancePath:o}){const _=o?(0,e.str)`${m}${(0,r.getErrorPath)(o,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function E({keyword:m,it:{errSchemaPath:o}},{schemaPath:_,parentSchema:h}){let g=h?o:(0,e.str)`${o}/${m}`;return _&&(g=(0,e.str)`${g}${(0,r.getErrorPath)(_,r.Type.Str)}`),[c.schemaPath,g]}function b(m,{params:o,message:_},h){const{keyword:g,data:$,schemaValue:v,it:p}=m,{opts:P,propertyName:O,topSchemaRef:C,schemaPath:U}=p;h.push([c.keyword,g],[c.params,typeof o=="function"?o(m):o||(0,e._)`{}`]),P.messages&&h.push([c.message,typeof _=="function"?_(m):_]),P.verbose&&h.push([c.schema,v],[c.parentSchema,(0,e._)`${C}${U}`],[n.default.data,$]),O&&h.push([c.propertyName,O])}}),Xo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=Zr(),r=Ae(),n=Qt(),s={message:"boolean schema is false"};function l(a){const{gen:d,schema:c,validateName:f}=a;c===!1?u(a,!1):typeof c=="object"&&c.$async===!0?d.return(n.default.data):(d.assign((0,r._)`${f}.errors`,null),d.return(!0))}t.topBoolOrEmptySchema=l;function i(a,d){const{gen:c,schema:f}=a;f===!1?(c.var(d,!1),u(a)):c.var(d,!0)}t.boolOrEmptySchema=i;function u(a,d){const{gen:c,data:f}=a,w={gen:c,keyword:"false schema",data:f,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,d)}}),ui=B(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(l){return typeof l=="string"&&r.has(l)}t.isJSONType=n;function s(){const l={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...l,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},l.number,l.string,l.array,l.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),fi=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:l},i){const u=l.RULES.types[i];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,l){return l.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,l){var i;return s[l.keyword]!==void 0||((i=l.definition.implements)===null||i===void 0?void 0:i.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),Gr=B(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=ui(),r=fi(),n=Zr(),s=Ae(),l=Fe(),i;(function(h){h[h.Correct=0]="Correct",h[h.Wrong=1]="Wrong"})(i||(t.DataType=i={}));function u(h){const g=a(h.type);if(g.includes("null")){if(h.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!g.length&&h.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');h.nullable===!0&&g.push("null")}return g}t.getSchemaTypes=u;function a(h){const g=Array.isArray(h)?h:h?[h]:[];if(g.every(e.isJSONType))return g;throw new Error("type must be JSONType or JSONType[]: "+g.join(","))}t.getJSONTypes=a;function d(h,g){const{gen:$,data:v,opts:p}=h,P=f(g,p.coerceTypes),O=g.length>0&&!(P.length===0&&g.length===1&&(0,r.schemaHasRulesForType)(h,g[0]));if(O){const C=b(g,v,p.strictNumbers,i.Wrong);$.if(C,()=>{P.length?w(h,g,P):o(h)})}return O}t.coerceAndCheckDataType=d;var c=new Set(["string","number","integer","boolean","null"]);function f(h,g){return g?h.filter($=>c.has($)||g==="array"&&$==="array"):[]}function w(h,g,$){const{gen:v,data:p,opts:P}=h,O=v.let("dataType",(0,s._)`typeof ${p}`),C=v.let("coerced",(0,s._)`undefined`);P.coerceTypes==="array"&&v.if((0,s._)`${O} == 'object' && Array.isArray(${p}) && ${p}.length == 1`,()=>v.assign(p,(0,s._)`${p}[0]`).assign(O,(0,s._)`typeof ${p}`).if(b(g,p,P.strictNumbers),()=>v.assign(C,p))),v.if((0,s._)`${C} !== undefined`);for(const q of $)(c.has(q)||q==="array"&&P.coerceTypes==="array")&&U(q);v.else(),o(h),v.endIf(),v.if((0,s._)`${C} !== undefined`,()=>{v.assign(p,C),S(h,C)});function U(q){switch(q){case"string":v.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,s._)`"" + ${p}`).elseIf((0,s._)`${p} === null`).assign(C,(0,s._)`""`);return;case"number":v.elseIf((0,s._)`${O} == "boolean" || ${p} === null
|
|
25
|
+
|| (${O} == "string" && ${p} && ${p} == +${p})`).assign(C,(0,s._)`+${p}`);return;case"integer":v.elseIf((0,s._)`${O} === "boolean" || ${p} === null
|
|
26
|
+
|| (${O} === "string" && ${p} && ${p} == +${p} && !(${p} % 1))`).assign(C,(0,s._)`+${p}`);return;case"boolean":v.elseIf((0,s._)`${p} === "false" || ${p} === 0 || ${p} === null`).assign(C,!1).elseIf((0,s._)`${p} === "true" || ${p} === 1`).assign(C,!0);return;case"null":v.elseIf((0,s._)`${p} === "" || ${p} === 0 || ${p} === false`),v.assign(C,null);return;case"array":v.elseIf((0,s._)`${O} === "string" || ${O} === "number"
|
|
27
|
+
|| ${O} === "boolean" || ${p} === null`).assign(C,(0,s._)`[${p}]`)}}}function S({gen:h,parentData:g,parentDataProperty:$},v){h.if((0,s._)`${g} !== undefined`,()=>h.assign((0,s._)`${g}[${$}]`,v))}function E(h,g,$,v=i.Correct){const p=v===i.Correct?s.operators.EQ:s.operators.NEQ;let P;switch(h){case"null":return(0,s._)`${g} ${p} null`;case"array":P=(0,s._)`Array.isArray(${g})`;break;case"object":P=(0,s._)`${g} && typeof ${g} == "object" && !Array.isArray(${g})`;break;case"integer":P=O((0,s._)`!(${g} % 1) && !isNaN(${g})`);break;case"number":P=O();break;default:return(0,s._)`typeof ${g} ${p} ${h}`}return v===i.Correct?P:(0,s.not)(P);function O(C=s.nil){return(0,s.and)((0,s._)`typeof ${g} == "number"`,C,$?(0,s._)`isFinite(${g})`:s.nil)}}t.checkDataType=E;function b(h,g,$,v){if(h.length===1)return E(h[0],g,$,v);let p;const P=(0,l.toHash)(h);if(P.array&&P.object){const O=(0,s._)`typeof ${g} != "object"`;p=P.null?O:(0,s._)`!${g} || ${O}`,delete P.null,delete P.array,delete P.object}else p=s.nil;P.number&&delete P.integer;for(const O in P)p=(0,s.and)(p,E(O,g,$,v));return p}t.checkDataTypes=b;var m={message:({schema:h})=>`must be ${h}`,params:({schema:h,schemaValue:g})=>typeof h=="string"?(0,s._)`{type: ${h}}`:(0,s._)`{type: ${g}}`};function o(h){const g=_(h);(0,n.reportError)(g,m)}t.reportTypeError=o;function _(h){const{gen:g,data:$,schema:v}=h,p=(0,l.schemaRefOrVal)(h,v,"type");return{gen:g,keyword:"type",data:$,schema:v.type,schemaCode:p,schemaValue:p,parentSchema:v,params:{},it:h}}}),Yo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ae(),r=Fe();function n(l,i){const{properties:u,items:a}=l.schema;if(i==="object"&&u)for(const d in u)s(l,d,u[d].default);else i==="array"&&Array.isArray(a)&&a.forEach((d,c)=>s(l,c,d.default))}t.assignDefaults=n;function s(l,i,u){const{gen:a,compositeRule:d,data:c,opts:f}=l;if(u===void 0)return;const w=(0,e._)`${c}${(0,e.getProperty)(i)}`;if(d){(0,r.checkStrictMode)(l,`default is ignored for: ${w}`);return}let S=(0,e._)`${w} === undefined`;f.useDefaults==="empty"&&(S=(0,e._)`${S} || ${w} === null || ${w} === ""`),a.if(S,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),It=B(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=Fe(),n=Qt(),s=Fe();function l(h,g){const{gen:$,data:v,it:p}=h;$.if(f($,v,g,p.opts.ownProperties),()=>{h.setParams({missingProperty:(0,e._)`${g}`},!0),h.error()})}t.checkReportMissingProp=l;function i({gen:h,data:g,it:{opts:$}},v,p){return(0,e.or)(...v.map(P=>(0,e.and)(f(h,g,P,$.ownProperties),(0,e._)`${p} = ${P}`)))}t.checkMissingProp=i;function u(h,g){h.setParams({missingProperty:g},!0),h.error()}t.reportMissingProp=u;function a(h){return h.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function d(h,g,$){return(0,e._)`${a(h)}.call(${g}, ${$})`}t.isOwnProperty=d;function c(h,g,$,v){const p=(0,e._)`${g}${(0,e.getProperty)($)} !== undefined`;return v?(0,e._)`${p} && ${d(h,g,$)}`:p}t.propertyInData=c;function f(h,g,$,v){const p=(0,e._)`${g}${(0,e.getProperty)($)} === undefined`;return v?(0,e.or)(p,(0,e.not)(d(h,g,$))):p}t.noPropertyInData=f;function w(h){return h?Object.keys(h).filter(g=>g!=="__proto__"):[]}t.allSchemaProperties=w;function S(h,g){return w(g).filter($=>!(0,r.alwaysValidSchema)(h,g[$]))}t.schemaProperties=S;function E({schemaCode:h,data:g,it:{gen:$,topSchemaRef:v,schemaPath:p,errorPath:P},it:O},C,U,q){const J=q?(0,e._)`${h}, ${g}, ${v}${p}`:g,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,P)],[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 ee=(0,e._)`${J}, ${$.object(...G)}`;return U!==e.nil?(0,e._)`${C}.call(${U}, ${ee})`:(0,e._)`${C}(${ee})`}t.callValidateCode=E;var b=(0,e._)`new RegExp`;function m({gen:h,it:{opts:g}},$){const v=g.unicodeRegExp?"u":"",{regExp:p}=g.code,P=p($,v);return h.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,e._)`${p.code==="new RegExp"?b:(0,s.useFunc)(h,p)}(${$}, ${v})`})}t.usePattern=m;function o(h){const{gen:g,data:$,keyword:v,it:p}=h,P=g.name("valid");if(p.allErrors){const C=g.let("valid",!0);return O(()=>g.assign(C,!1)),C}return g.var(P,!0),O(()=>g.break()),P;function O(C){const U=g.const("len",(0,e._)`${$}.length`);g.forRange("i",0,U,q=>{h.subschema({keyword:v,dataProp:q,dataPropType:r.Type.Num},P),g.if((0,e.not)(P),C)})}}t.validateArray=o;function _(h){const{gen:g,schema:$,keyword:v,it:p}=h;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(U=>(0,r.alwaysValidSchema)(p,U))&&!p.opts.unevaluated)return;const O=g.let("valid",!1),C=g.name("_valid");g.block(()=>$.forEach((U,q)=>{const J=h.subschema({keyword:v,schemaProp:q,compositeRule:!0},C);g.assign(O,(0,e._)`${O} || ${C}`),h.mergeValidEvaluated(J,C)||g.if((0,e.not)(O))})),h.result(O,()=>h.reset(),()=>h.error(!0))}t.validateUnion=_}),Zo=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ae(),r=Qt(),n=It(),s=Zr();function l(S,E){const{gen:b,keyword:m,schema:o,parentSchema:_,it:h}=S,g=E.macro.call(h.self,o,_,h),$=c(b,m,g);h.opts.validateSchema!==!1&&h.self.validateSchema(g,!0);const v=b.name("valid");S.subschema({schema:g,schemaPath:e.nil,errSchemaPath:`${h.errSchemaPath}/${m}`,topSchemaRef:$,compositeRule:!0},v),S.pass(v,()=>S.error(!0))}t.macroKeywordCode=l;function i(S,E){var b;const{gen:m,keyword:o,schema:_,parentSchema:h,$data:g,it:$}=S;d($,E);const v=!g&&E.compile?E.compile.call($.self,_,h,$):E.validate,p=c(m,o,v),P=m.let("valid");S.block$data(P,O),S.ok((b=E.valid)!==null&&b!==void 0?b:P);function O(){if(E.errors===!1)q(),E.modifying&&u(S),J(()=>S.error());else{const G=E.async?C():U();E.modifying&&u(S),J(()=>a(S,G))}}function C(){const G=m.let("ruleErrs",null);return m.try(()=>q((0,e._)`await `),ee=>m.assign(P,!1).if((0,e._)`${ee} instanceof ${$.ValidationError}`,()=>m.assign(G,(0,e._)`${ee}.errors`),()=>m.throw(ee))),G}function U(){const G=(0,e._)`${p}.errors`;return m.assign(G,null),q(e.nil),G}function q(G=E.async?(0,e._)`await `:e.nil){const ee=$.opts.passContext?r.default.this:r.default.self,fe=!("compile"in E&&!g||E.schema===!1);m.assign(P,(0,e._)`${G}${(0,n.callValidateCode)(S,p,ee,fe)}`,E.modifying)}function J(G){var ee;m.if((0,e.not)((ee=E.valid)!==null&&ee!==void 0?ee:P),G)}}t.funcKeywordCode=i;function u(S){const{gen:E,data:b,it:m}=S;E.if(m.parentData,()=>E.assign(b,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(S,E){const{gen:b}=S;b.if((0,e._)`Array.isArray(${E})`,()=>{b.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${E} : ${r.default.vErrors}.concat(${E})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(S)},()=>S.error())}function d({schemaEnv:S},E){if(E.async&&!S.$async)throw new Error("async keyword in sync schema")}function c(S,E,b){if(b===void 0)throw new Error(`keyword "${E}" failed to compile`);return S.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function f(S,E,b=!1){return!E.length||E.some(m=>m==="array"?Array.isArray(S):m==="object"?S&&typeof S=="object"&&!Array.isArray(S):typeof S==m||b&&typeof S>"u")}t.validSchemaType=f;function w({schema:S,opts:E,self:b,errSchemaPath:m},o,_){if(Array.isArray(o.keyword)?!o.keyword.includes(_):o.keyword!==_)throw new Error("ajv implementation error");const h=o.dependencies;if(h!=null&&h.some(g=>!Object.prototype.hasOwnProperty.call(S,g)))throw new Error(`parent schema must have dependencies of ${_}: ${h.join(",")}`);if(o.validateSchema&&!o.validateSchema(S[_])){const $=`keyword "${_}" value is invalid at path "${m}": `+b.errorsText(o.validateSchema.errors);if(E.validateSchema==="log")b.logger.error($);else throw new Error($)}}t.validateKeywordUsage=w}),ec=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ae(),r=Fe();function n(i,{keyword:u,schemaProp:a,schema:d,schemaPath:c,errSchemaPath:f,topSchemaRef:w}){if(u!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const S=i.schema[u];return a===void 0?{schema:S,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${u}`}:{schema:S[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${u}/${(0,r.escapeFragment)(a)}`}}if(d!==void 0){if(c===void 0||f===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:c,topSchemaRef:w,errSchemaPath:f}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,u,{dataProp:a,dataPropType:d,data:c,dataTypes:f,propertyName:w}){if(c!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:S}=u;if(a!==void 0){const{errorPath:b,dataPathArr:m,opts:o}=u,_=S.let("data",(0,e._)`${u.data}${(0,e.getProperty)(a)}`,!0);E(_),i.errorPath=(0,e.str)`${b}${(0,r.getErrorPath)(a,d,o.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(c!==void 0){const b=c instanceof e.Name?c:S.let("data",c,!0);E(b),w!==void 0&&(i.propertyName=w)}f&&(i.dataTypes=f);function E(b){i.data=b,i.dataLevel=u.dataLevel+1,i.dataTypes=[],u.definedProperties=new Set,i.parentData=u.data,i.dataNames=[...u.dataNames,b]}}t.extendSubschemaData=s;function l(i,{jtdDiscriminator:u,jtdMetadata:a,compositeRule:d,createErrors:c,allErrors:f}){d!==void 0&&(i.compositeRule=d),c!==void 0&&(i.createErrors=c),f!==void 0&&(i.allErrors=f),i.jtdDiscriminator=u,i.jtdMetadata=a}t.extendSubschemaMode=l}),en=B((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 l,i,u;if(Array.isArray(n)){if(l=n.length,l!=s.length)return!1;for(i=l;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),l=u.length,l!==Object.keys(s).length)return!1;for(i=l;i--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[i]))return!1;for(i=l;i--!==0;){var a=u[i];if(!r(n[a],s[a]))return!1}return!0}return n!==n&&s!==s}}),di=B((t,e)=>{var r=e.exports=function(l,i,u){typeof i=="function"&&(u=i,i={}),u=i.cb||u;var a=typeof u=="function"?u:u.pre||function(){},d=u.post||function(){};n(i,a,d,l,"",l)};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(l,i,u,a,d,c,f,w,S,E){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,d,c,f,w,S,E);for(var b in a){var m=a[b];if(Array.isArray(m)){if(b in r.arrayKeywords)for(var o=0;o<m.length;o++)n(l,i,u,m[o],d+"/"+b+"/"+o,c,d,b,a,o)}else if(b in r.propsKeywords){if(m&&typeof m=="object")for(var _ in m)n(l,i,u,m[_],d+"/"+b+"/"+s(_),c,d,b,a,_)}else(b in r.keywords||l.allKeys&&!(b in r.skipKeywords))&&n(l,i,u,m,d+"/"+b,c,d,b,a)}u(a,d,c,f,w,S,E)}}function s(l){return l.replace(/~/g,"~0").replace(/\//g,"~1")}}),tn=B(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=en(),n=di(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function l(m,o=!0){return typeof m=="boolean"?!0:o===!0?!u(m):o?a(m)<=o:!1}t.inlineRef=l;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const o in m){if(i.has(o))return!0;const _=m[o];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function a(m){let o=0;for(const _ in m){if(_==="$ref")return 1/0;if(o++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],h=>o+=a(h)),o===1/0))return 1/0}return o}function d(m,o="",_){_!==!1&&(o=w(o));const h=m.parse(o);return c(m,h)}t.getFullPath=d;function c(m,o){return m.serialize(o).split("#")[0]+"#"}t._getFullPath=c;var f=/#\/?$/;function w(m){return m?m.replace(f,""):""}t.normalizeId=w;function S(m,o,_){return _=w(_),m.resolve(o,_)}t.resolveUrl=S;var E=/^[a-z_][-a-z0-9._]*$/i;function b(m,o){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:h}=this.opts,g=w(m[_]||o),$={"":g},v=d(h,g,!1),p={},P=new Set;return n(m,{allKeys:!0},(U,q,J,G)=>{if(G===void 0)return;const ee=v+q;let fe=$[G];typeof U[_]=="string"&&(fe=we.call(this,U[_])),Oe.call(this,U.$anchor),Oe.call(this,U.$dynamicAnchor),$[q]=fe;function we(se){const x=this.opts.uriResolver.resolve;if(se=w(fe?x(fe,se):se),P.has(se))throw C(se);P.add(se);let N=this.refs[se];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?O(U,N.schema,se):se!==w(ee)&&(se[0]==="#"?(O(U,p[se],se),p[se]=U):this.refs[se]=ee),se}function Oe(se){if(typeof se=="string"){if(!E.test(se))throw new Error(`invalid anchor "${se}"`);we.call(this,`#${se}`)}}}),p;function O(U,q,J){if(q!==void 0&&!r(U,q))throw C(J)}function C(U){return new Error(`reference "${U}" resolves to more than one schema`)}}t.getSchemaRefs=b}),rn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Xo(),r=Gr(),n=fi(),s=Gr(),l=Yo(),i=Zo(),u=ec(),a=Ae(),d=Qt(),c=tn(),f=Fe(),w=Zr();function S(T){if(v(T)&&(P(T),$(T))){o(T);return}E(T,()=>(0,e.topBoolOrEmptySchema)(T))}t.validateFunctionCode=S;function E({gen:T,validateName:I,schema:V,schemaEnv:z,opts:Q},te){Q.code.es5?T.func(I,(0,a._)`${d.default.data}, ${d.default.valCxt}`,z.$async,()=>{T.code((0,a._)`"use strict"; ${h(V,Q)}`),m(T,Q),T.code(te)}):T.func(I,(0,a._)`${d.default.data}, ${b(Q)}`,z.$async,()=>T.code(h(V,Q)).code(te))}function b(T){return(0,a._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${T.dynamicRef?(0,a._)`, ${d.default.dynamicAnchors}={}`:a.nil}}={}`}function m(T,I){T.if(d.default.valCxt,()=>{T.var(d.default.instancePath,(0,a._)`${d.default.valCxt}.${d.default.instancePath}`),T.var(d.default.parentData,(0,a._)`${d.default.valCxt}.${d.default.parentData}`),T.var(d.default.parentDataProperty,(0,a._)`${d.default.valCxt}.${d.default.parentDataProperty}`),T.var(d.default.rootData,(0,a._)`${d.default.valCxt}.${d.default.rootData}`),I.dynamicRef&&T.var(d.default.dynamicAnchors,(0,a._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{T.var(d.default.instancePath,(0,a._)`""`),T.var(d.default.parentData,(0,a._)`undefined`),T.var(d.default.parentDataProperty,(0,a._)`undefined`),T.var(d.default.rootData,d.default.data),I.dynamicRef&&T.var(d.default.dynamicAnchors,(0,a._)`{}`)})}function o(T){const{schema:I,opts:V,gen:z}=T;E(T,()=>{V.$comment&&I.$comment&&G(T),U(T),z.let(d.default.vErrors,null),z.let(d.default.errors,0),V.unevaluated&&_(T),O(T),ee(T)})}function _(T){const{gen:I,validateName:V}=T;T.evaluated=I.const("evaluated",(0,a._)`${V}.evaluated`),I.if((0,a._)`${T.evaluated}.dynamicProps`,()=>I.assign((0,a._)`${T.evaluated}.props`,(0,a._)`undefined`)),I.if((0,a._)`${T.evaluated}.dynamicItems`,()=>I.assign((0,a._)`${T.evaluated}.items`,(0,a._)`undefined`))}function h(T,I){const V=typeof T=="object"&&T[I.schemaId];return V&&(I.code.source||I.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function g(T,I){if(v(T)&&(P(T),$(T))){p(T,I);return}(0,e.boolOrEmptySchema)(T,I)}function $({schema:T,self:I}){if(typeof T=="boolean")return!T;for(const V in T)if(I.RULES.all[V])return!0;return!1}function v(T){return typeof T.schema!="boolean"}function p(T,I){const{schema:V,gen:z,opts:Q}=T;Q.$comment&&V.$comment&&G(T),q(T),J(T);const te=z.const("_errs",d.default.errors);O(T,te),z.var(I,(0,a._)`${te} === ${d.default.errors}`)}function P(T){(0,f.checkUnknownRules)(T),C(T)}function O(T,I){if(T.opts.jtd)return we(T,[],!1,I);const V=(0,r.getSchemaTypes)(T.schema),z=(0,r.coerceAndCheckDataType)(T,V);we(T,V,!z,I)}function C(T){const{schema:I,errSchemaPath:V,opts:z,self:Q}=T;I.$ref&&z.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(I,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function U(T){const{schema:I,opts:V}=T;I.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,f.checkStrictMode)(T,"default is ignored in the schema root")}function q(T){const I=T.schema[T.opts.schemaId];I&&(T.baseId=(0,c.resolveUrl)(T.opts.uriResolver,T.baseId,I))}function J(T){if(T.schema.$async&&!T.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:T,schemaEnv:I,schema:V,errSchemaPath:z,opts:Q}){const te=V.$comment;if(Q.$comment===!0)T.code((0,a._)`${d.default.self}.logger.log(${te})`);else if(typeof Q.$comment=="function"){const Ee=(0,a.str)`${z}/$comment`,Ve=T.scopeValue("root",{ref:I.root});T.code((0,a._)`${d.default.self}.opts.$comment(${te}, ${Ee}, ${Ve}.schema)`)}}function ee(T){const{gen:I,schemaEnv:V,validateName:z,ValidationError:Q,opts:te}=T;V.$async?I.if((0,a._)`${d.default.errors} === 0`,()=>I.return(d.default.data),()=>I.throw((0,a._)`new ${Q}(${d.default.vErrors})`)):(I.assign((0,a._)`${z}.errors`,d.default.vErrors),te.unevaluated&&fe(T),I.return((0,a._)`${d.default.errors} === 0`))}function fe({gen:T,evaluated:I,props:V,items:z}){V instanceof a.Name&&T.assign((0,a._)`${I}.props`,V),z instanceof a.Name&&T.assign((0,a._)`${I}.items`,z)}function we(T,I,V,z){const{gen:Q,schema:te,data:Ee,allErrors:Ve,opts:Re,self:Ce}=T,{RULES:_e}=Ce;if(te.$ref&&(Re.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(te,_e))){Q.block(()=>X(T,"$ref",_e.all.$ref.definition));return}Re.jtd||se(T,I),Q.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(te,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,Ee,Re.strictNumbers)),Oe(T,Ie),I.length===1&&I[0]===Ie.type&&V&&(Q.else(),(0,s.reportTypeError)(T)),Q.endIf()):Oe(T,Ie),Ve||Q.if((0,a._)`${d.default.errors} === ${z||0}`))}}function Oe(T,I){const{gen:V,schema:z,opts:{useDefaults:Q}}=T;Q&&(0,l.assignDefaults)(T,I.type),V.block(()=>{for(const te of I.rules)(0,n.shouldUseRule)(z,te)&&X(T,te.keyword,te.definition,I.type)})}function se(T,I){T.schemaEnv.meta||!T.opts.strictTypes||(x(T,I),T.opts.allowUnionTypes||N(T,I),M(T,T.dataTypes))}function x(T,I){if(I.length){if(!T.dataTypes.length){T.dataTypes=I;return}I.forEach(V=>{y(T.dataTypes,V)||j(T,`type "${V}" not allowed by context "${T.dataTypes.join(",")}"`)}),k(T,I)}}function N(T,I){I.length>1&&!(I.length===2&&I.includes("null"))&&j(T,"use allowUnionTypes to allow union type keyword")}function M(T,I){const V=T.self.RULES.all;for(const z in V){const Q=V[z];if(typeof Q=="object"&&(0,n.shouldUseRule)(T.schema,Q)){const{type:te}=Q.definition;te.length&&!te.some(Ee=>R(I,Ee))&&j(T,`missing type "${te.join(",")}" for keyword "${z}"`)}}}function R(T,I){return T.includes(I)||I==="number"&&T.includes("integer")}function y(T,I){return T.includes(I)||I==="integer"&&T.includes("number")}function k(T,I){const V=[];for(const z of T.dataTypes)y(I,z)?V.push(z):I.includes("integer")&&z==="number"&&V.push("integer");T.dataTypes=V}function j(T,I){const V=T.schemaEnv.baseId+T.errSchemaPath;I+=` at "${V}" (strictTypes)`,(0,f.checkStrictMode)(T,I,T.opts.strictTypes)}class W{constructor(I,V,z){if((0,i.validateKeywordUsage)(I,V,z),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=z,this.data=I.data,this.schema=I.schema[z],this.$data=V.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(I,this.schema,z,this.$data),this.schemaType=V.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=V,this.$data)this.schemaCode=I.gen.const("vSchema",ye(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=I.gen.const("_errs",d.default.errors))}result(I,V,z){this.failResult((0,a.not)(I),V,z)}failResult(I,V,z){this.gen.if(I),z?z():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,V){this.failResult((0,a.not)(I),void 0,V)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),I)})`)}error(I,V,z){if(V){this.setParams(V),this._error(I,z),this.setParams({});return}this._error(I,z)}_error(I,V){(I?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(I){this.allErrors||this.gen.if(I)}setParams(I,V){V?Object.assign(this.params,I):this.params=I}block$data(I,V,z=a.nil){this.gen.block(()=>{this.check$data(I,z),V()})}check$data(I=a.nil,V=a.nil){if(!this.$data)return;const{gen:z,schemaCode:Q,schemaType:te,def:Ee}=this;z.if((0,a.or)((0,a._)`${Q} === undefined`,V)),I!==a.nil&&z.assign(I,!0),(te.length||Ee.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),I!==a.nil&&z.assign(I,!1)),z.else()}invalid$data(){const{gen:I,schemaCode:V,schemaType:z,def:Q,it:te}=this;return(0,a.or)(Ee(),Ve());function Ee(){if(z.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Re=Array.isArray(z)?z:[z];return(0,a._)`${(0,s.checkDataTypes)(Re,V,te.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ve(){if(Q.validateSchema){const Re=I.scopeValue("validate$data",{ref:Q.validateSchema});return(0,a._)`!${Re}(${V})`}return a.nil}}subschema(I,V){const z=(0,u.getSubschema)(this.it,I);(0,u.extendSubschemaData)(z,this.it,I),(0,u.extendSubschemaMode)(z,I);const Q={...this.it,...z,items:void 0,props:void 0};return g(Q,V),Q}mergeEvaluated(I,V){const{it:z,gen:Q}=this;z.opts.unevaluated&&(z.props!==!0&&I.props!==void 0&&(z.props=f.mergeEvaluated.props(Q,I.props,z.props,V)),z.items!==!0&&I.items!==void 0&&(z.items=f.mergeEvaluated.items(Q,I.items,z.items,V)))}mergeValidEvaluated(I,V){const{it:z,gen:Q}=this;if(z.opts.unevaluated&&(z.props!==!0||z.items!==!0))return Q.if(V,()=>this.mergeEvaluated(I,a.Name)),!0}}t.KeywordCxt=W;function X(T,I,V,z){const Q=new W(T,V,I);"code"in V?V.code(Q,z):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 ie=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(T,{dataLevel:I,dataNames:V,dataPathArr:z}){let Q,te;if(T==="")return d.default.rootData;if(T[0]==="/"){if(!ie.test(T))throw new Error(`Invalid JSON-pointer: ${T}`);Q=T,te=d.default.rootData}else{const Ce=re.exec(T);if(!Ce)throw new Error(`Invalid JSON-pointer: ${T}`);const _e=+Ce[1];if(Q=Ce[2],Q==="#"){if(_e>=I)throw new Error(Re("property/index",_e));return z[I-_e]}if(_e>I)throw new Error(Re("data",_e));if(te=V[I-_e],!Q)return te}let Ee=te;const Ve=Q.split("/");for(const Ce of Ve)Ce&&(te=(0,a._)`${te}${(0,a.getProperty)((0,f.unescapeJsonPointer)(Ce))}`,Ee=(0,a._)`${Ee} && ${te}`);return Ee;function Re(Ce,_e){return`Cannot access ${Ce} ${_e} levels up, current level is ${I}`}}t.getData=ye}),Jn=B(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}),nn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=tn();class r extends Error{constructor(s,l,i,u){super(u||`can't resolve reference ${i} from id ${l}`),this.missingRef=(0,e.resolveUrl)(s,l,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),Qn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ae(),r=Jn(),n=Qt(),s=tn(),l=Fe(),i=rn();class u{constructor(_){var h;this.refs={},this.dynamicAnchors={};let g;typeof _.schema=="object"&&(g=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(h=_.baseId)!==null&&h!==void 0?h:(0,s.normalizeId)(g==null?void 0:g[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=g==null?void 0:g.$async,this.refs={}}}t.SchemaEnv=u;function a(o){const _=f.call(this,o);if(_)return _;const h=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:g,lines:$}=this.opts.code,{ownProperties:v}=this.opts,p=new e.CodeGen(this.scope,{es5:g,lines:$,ownProperties:v});let P;o.$async&&(P=p.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=p.scopeName("validate");o.validateName=O;const C={gen:p,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:p.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:P,schema:o.schema,schemaEnv:o,rootId:h,baseId:o.baseId||h,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(o),(0,i.validateFunctionCode)(C),p.optimize(this.opts.code.optimize);const q=p.toString();U=`${p.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(U=this.opts.code.process(U,o));const G=new Function(`${n.default.self}`,`${n.default.scope}`,U)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=o.schema,G.schemaEnv=o,o.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:q,scopeValues:p._values}),this.opts.unevaluated){const{props:ee,items:fe}=C;G.evaluated={props:ee instanceof e.Name?void 0:ee,items:fe instanceof e.Name?void 0:fe,dynamicProps:ee instanceof e.Name,dynamicItems:fe instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return o.validate=G,o}catch(q){throw delete o.validate,delete o.validateName,U&&this.logger.error("Error compiling schema, function code:",U),q}finally{this._compilations.delete(o)}}t.compileSchema=a;function d(o,_,h){var g;h=(0,s.resolveUrl)(this.opts.uriResolver,_,h);const $=o.refs[h];if($)return $;let v=S.call(this,o,h);if(v===void 0){const p=(g=o.localRefs)===null||g===void 0?void 0:g[h],{schemaId:P}=this.opts;p&&(v=new u({schema:p,schemaId:P,root:o,baseId:_}))}if(v!==void 0)return o.refs[h]=c.call(this,v)}t.resolveRef=d;function c(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:a.call(this,o)}function f(o){for(const _ of this._compilations)if(w(_,o))return _}t.getCompilingSchema=f;function w(o,_){return o.schema===_.schema&&o.root===_.root&&o.baseId===_.baseId}function S(o,_){let h;for(;typeof(h=this.refs[_])=="string";)_=h;return h||this.schemas[_]||E.call(this,o,_)}function E(o,_){const h=this.opts.uriResolver.parse(_),g=(0,s._getFullPath)(this.opts.uriResolver,h);let $=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&g===$)return m.call(this,h,o);const v=(0,s.normalizeId)(g),p=this.refs[v]||this.schemas[v];if(typeof p=="string"){const P=E.call(this,o,p);return typeof(P==null?void 0:P.schema)!="object"?void 0:m.call(this,h,P)}if(typeof(p==null?void 0:p.schema)=="object"){if(p.validate||a.call(this,p),v===(0,s.normalizeId)(_)){const{schema:P}=p,{schemaId:O}=this.opts,C=P[O];return C&&($=(0,s.resolveUrl)(this.opts.uriResolver,$,C)),new u({schema:P,schemaId:O,root:o,baseId:$})}return m.call(this,h,p)}}t.resolveSchema=E;var b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(o,{baseId:_,schema:h,root:g}){var $;if((($=o.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const P of o.fragment.slice(1).split("/")){if(typeof h=="boolean")return;const O=h[(0,l.unescapeFragment)(P)];if(O===void 0)return;h=O;const C=typeof h=="object"&&h[this.opts.schemaId];!b.has(P)&&C&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,C))}let v;if(typeof h!="boolean"&&h.$ref&&!(0,l.schemaHasRulesButRef)(h,this.RULES)){const P=(0,s.resolveUrl)(this.opts.uriResolver,_,h.$ref);v=E.call(this,g,P)}const{schemaId:p}=this.opts;if(v=v||new u({schema:h,schemaId:p,root:g,baseId:_}),v.schema!==v.root.schema)return v}}),tc=B((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}}),hi=B((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(E){let b="",m=0,o=0;for(o=0;o<E.length;o++)if(m=E[o].charCodeAt(0),m!==48){if(!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";b+=E[o];break}for(o+=1;o<E.length;o++){if(m=E[o].charCodeAt(0),!(m>=48&&m<=57||m>=65&&m<=70||m>=97&&m<=102))return"";b+=E[o]}return b}var l=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(E){return E.length=0,!0}function u(E,b,m){if(E.length){const o=s(E);if(o!=="")b.push(o);else return m.error=!0,!1;E.length=0}return!0}function a(E){let b=0;const m={error:!1,address:"",zone:""},o=[],_=[];let h=!1,g=!1,$=u;for(let v=0;v<E.length;v++){const p=E[v];if(!(p==="["||p==="]"))if(p===":"){if(h===!0&&(g=!0),!$(_,o,m))break;if(++b>7){m.error=!0;break}v>0&&E[v-1]===":"&&(h=!0),o.push(":");continue}else if(p==="%"){if(!$(_,o,m))break;$=i}else{_.push(p);continue}}return _.length&&($===i?m.zone=_.join(""):g?o.push(_.join("")):o.push(s(_))),m.address=o.join(""),m}function d(E){if(c(E,":")<2)return{host:E,isIPV6:!1};const b=a(E);if(b.error)return{host:E,isIPV6:!1};{let m=b.address,o=b.address;return b.zone&&(m+="%"+b.zone,o+="%25"+b.zone),{host:m,isIPV6:!0,escapedHost:o}}}function c(E,b){let m=0;for(let o=0;o<E.length;o++)E[o]===b&&m++;return m}function f(E){let b=E;const m=[];let o=-1,_=0;for(;_=b.length;){if(_===1){if(b===".")break;if(b==="/"){m.push("/");break}else{m.push(b);break}}else if(_===2){if(b[0]==="."){if(b[1]===".")break;if(b[1]==="/"){b=b.slice(2);continue}}else if(b[0]==="/"&&(b[1]==="."||b[1]==="/")){m.push("/");break}}else if(_===3&&b==="/.."){m.length!==0&&m.pop(),m.push("/");break}if(b[0]==="."){if(b[1]==="."){if(b[2]==="/"){b=b.slice(3);continue}}else if(b[1]==="/"){b=b.slice(2);continue}}else if(b[0]==="/"&&b[1]==="."){if(b[2]==="/"){b=b.slice(2);continue}else if(b[2]==="."&&b[3]==="/"){b=b.slice(3),m.length!==0&&m.pop();continue}}if((o=b.indexOf("/",1))===-1){m.push(b);break}else m.push(b.slice(0,o)),b=b.slice(o)}return m.join("")}function w(E,b){const m=b!==!0?escape:unescape;return E.scheme!==void 0&&(E.scheme=m(E.scheme)),E.userinfo!==void 0&&(E.userinfo=m(E.userinfo)),E.host!==void 0&&(E.host=m(E.host)),E.path!==void 0&&(E.path=m(E.path)),E.query!==void 0&&(E.query=m(E.query)),E.fragment!==void 0&&(E.fragment=m(E.fragment)),E}function S(E){const b=[];if(E.userinfo!==void 0&&(b.push(E.userinfo),b.push("@")),E.host!==void 0){let m=unescape(E.host);if(!n(m)){const o=d(m);o.isIPV6===!0?m=`[${o.escapedHost}]`:m=E.host}b.push(m)}return(typeof E.port=="number"||typeof E.port=="string")&&(b.push(":"),b.push(String(E.port))),b.length?b.join(""):void 0}e.exports={nonSimpleDomain:l,recomposeAuthority:S,normalizeComponentEncoding:w,removeDotSegments:f,isIPv4:n,isUUID:r,normalizeIPv6:d,stringArrayToHexStripped:s}}),rc=B((t,e)=>{var{isUUID:r}=hi(),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function l(p){return s.indexOf(p)!==-1}function i(p){return p.secure===!0?!0:p.secure===!1?!1:p.scheme?p.scheme.length===3&&(p.scheme[0]==="w"||p.scheme[0]==="W")&&(p.scheme[1]==="s"||p.scheme[1]==="S")&&(p.scheme[2]==="s"||p.scheme[2]==="S"):!1}function u(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function a(p){const P=String(p.scheme).toLowerCase()==="https";return(p.port===(P?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function d(p){return p.secure=i(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function c(p){if((p.port===(i(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[P,O]=p.resourceName.split("?");p.path=P&&P!=="/"?P:void 0,p.query=O,p.resourceName=void 0}return p.fragment=void 0,p}function f(p,P){if(!p.path)return p.error="URN can not be parsed",p;const O=p.path.match(n);if(O){const C=P.scheme||p.scheme||"urn";p.nid=O[1].toLowerCase(),p.nss=O[2];const U=`${C}:${P.nid||p.nid}`,q=v(U);p.path=void 0,q&&(p=q.parse(p,P))}else p.error=p.error||"URN can not be parsed.";return p}function w(p,P){if(p.nid===void 0)throw new Error("URN without nid cannot be serialized");const O=P.scheme||p.scheme||"urn",C=p.nid.toLowerCase(),U=`${O}:${P.nid||C}`,q=v(U);q&&(p=q.serialize(p,P));const J=p,G=p.nss;return J.path=`${C||P.nid}:${G}`,P.skipEscape=!0,J}function S(p,P){const O=p;return O.uuid=O.nss,O.nss=void 0,!P.tolerant&&(!O.uuid||!r(O.uuid))&&(O.error=O.error||"UUID is not valid."),O}function E(p){const P=p;return P.nss=(p.uuid||"").toLowerCase(),P}var b={scheme:"http",domainHost:!0,parse:u,serialize:a},m={scheme:"https",domainHost:b.domainHost,parse:u,serialize:a},o={scheme:"ws",domainHost:!0,parse:d,serialize:c},_={scheme:"wss",domainHost:o.domainHost,parse:o.parse,serialize:o.serialize},h={scheme:"urn",parse:f,serialize:w,skipNormalize:!0},g={scheme:"urn:uuid",parse:S,serialize:E,skipNormalize:!0},$={http:b,https:m,ws:o,wss:_,urn:h,"urn:uuid":g};Object.setPrototypeOf($,null);function v(p){return p&&($[p]||$[p.toLowerCase()])||void 0}e.exports={wsIsSecure:i,SCHEMES:$,isValidSchemeName:l,getSchemeHandler:v}}),nc=B((t,e)=>{var{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:s,normalizeComponentEncoding:l,isIPv4:i,nonSimpleDomain:u}=hi(),{SCHEMES:a,getSchemeHandler:d}=rc();function c(_,h){return typeof _=="string"?_=E(m(_,h),h):typeof _=="object"&&(_=m(E(_,h),h)),_}function f(_,h,g){const $=g?Object.assign({scheme:"null"},g):{scheme:"null"},v=w(m(_,$),m(h,$),$,!0);return $.skipEscape=!0,E(v,$)}function w(_,h,g,$){const v={};return $||(_=m(E(_,g),g),h=m(E(h,g),g)),g=g||{},!g.tolerant&&h.scheme?(v.scheme=h.scheme,v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=n(h.path||""),v.query=h.query):(h.userinfo!==void 0||h.host!==void 0||h.port!==void 0?(v.userinfo=h.userinfo,v.host=h.host,v.port=h.port,v.path=n(h.path||""),v.query=h.query):(h.path?(h.path[0]==="/"?v.path=n(h.path):((_.userinfo!==void 0||_.host!==void 0||_.port!==void 0)&&!_.path?v.path="/"+h.path:_.path?v.path=_.path.slice(0,_.path.lastIndexOf("/")+1)+h.path:v.path=h.path,v.path=n(v.path)),v.query=h.query):(v.path=_.path,h.query!==void 0?v.query=h.query:v.query=_.query),v.userinfo=_.userinfo,v.host=_.host,v.port=_.port),v.scheme=_.scheme),v.fragment=h.fragment,v}function S(_,h,g){return typeof _=="string"?(_=unescape(_),_=E(l(m(_,g),!0),{...g,skipEscape:!0})):typeof _=="object"&&(_=E(l(_,!0),{...g,skipEscape:!0})),typeof h=="string"?(h=unescape(h),h=E(l(m(h,g),!0),{...g,skipEscape:!0})):typeof h=="object"&&(h=E(l(h,!0),{...g,skipEscape:!0})),_.toLowerCase()===h.toLowerCase()}function E(_,h){const g={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:""},$=Object.assign({},h),v=[],p=d($.scheme||g.scheme);p&&p.serialize&&p.serialize(g,$),g.path!==void 0&&($.skipEscape?g.path=unescape(g.path):(g.path=escape(g.path),g.scheme!==void 0&&(g.path=g.path.split("%3A").join(":")))),$.reference!=="suffix"&&g.scheme&&v.push(g.scheme,":");const P=s(g);if(P!==void 0&&($.reference!=="suffix"&&v.push("//"),v.push(P),g.path&&g.path[0]!=="/"&&v.push("/")),g.path!==void 0){let O=g.path;!$.absolutePath&&(!p||!p.absolutePath)&&(O=n(O)),P===void 0&&O[0]==="/"&&O[1]==="/"&&(O="/%2F"+O.slice(2)),v.push(O)}return g.query!==void 0&&v.push("?",g.query),g.fragment!==void 0&&v.push("#",g.fragment),v.join("")}var b=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function m(_,h){const g=Object.assign({},h),$={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let v=!1;g.reference==="suffix"&&(g.scheme?_=g.scheme+":"+_:_="//"+_);const p=_.match(b);if(p){if($.scheme=p[1],$.userinfo=p[3],$.host=p[4],$.port=parseInt(p[5],10),$.path=p[6]||"",$.query=p[7],$.fragment=p[8],isNaN($.port)&&($.port=p[5]),$.host)if(i($.host)===!1){const C=r($.host);$.host=C.host.toLowerCase(),v=C.isIPV6}else v=!0;$.scheme===void 0&&$.userinfo===void 0&&$.host===void 0&&$.port===void 0&&$.query===void 0&&!$.path?$.reference="same-document":$.scheme===void 0?$.reference="relative":$.fragment===void 0?$.reference="absolute":$.reference="uri",g.reference&&g.reference!=="suffix"&&g.reference!==$.reference&&($.error=$.error||"URI is not a "+g.reference+" reference.");const P=d(g.scheme||$.scheme);if(!g.unicodeSupport&&(!P||!P.unicodeSupport)&&$.host&&(g.domainHost||P&&P.domainHost)&&v===!1&&u($.host))try{$.host=URL.domainToASCII($.host.toLowerCase())}catch(O){$.error=$.error||"Host's domain name can not be converted to ASCII: "+O}(!P||P&&!P.skipNormalize)&&(_.indexOf("%")!==-1&&($.scheme!==void 0&&($.scheme=unescape($.scheme)),$.host!==void 0&&($.host=unescape($.host))),$.path&&($.path=escape(unescape($.path))),$.fragment&&($.fragment=encodeURI(decodeURIComponent($.fragment)))),P&&P.parse&&P.parse($,g)}else $.error=$.error||"URI can not be parsed.";return $}var o={SCHEMES:a,normalize:c,resolve:f,resolveComponent:w,equal:S,serialize:E,parse:m};e.exports=o,e.exports.default=o,e.exports.fastUri=o}),sc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=nc();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),ic=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var e=rn();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=Jn(),s=nn(),l=ui(),i=Qn(),u=Ae(),a=tn(),d=Gr(),c=Fe(),f=tc(),w=sc(),S=(x,N)=>new RegExp(x,N);S.code="new RegExp";var E=["removeAdditional","useDefaults","coerceTypes"],b=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."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function h(x){var N,M,R,y,k,j,W,X,ie,re,ye,T,I,V,z,Q,te,Ee,Ve,Re,Ce,_e,xe,Ie,yt;const Xe=x.strict,ht=(N=x.code)===null||N===void 0?void 0:N.optimize,bt=ht===!0||ht===void 0?1:ht||0,ot=(R=(M=x.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:S,wt=(y=x.uriResolver)!==null&&y!==void 0?y:w.default;return{strictSchema:(j=(k=x.strictSchema)!==null&&k!==void 0?k:Xe)!==null&&j!==void 0?j:!0,strictNumbers:(X=(W=x.strictNumbers)!==null&&W!==void 0?W:Xe)!==null&&X!==void 0?X:!0,strictTypes:(re=(ie=x.strictTypes)!==null&&ie!==void 0?ie:Xe)!==null&&re!==void 0?re:"log",strictTuples:(T=(ye=x.strictTuples)!==null&&ye!==void 0?ye:Xe)!==null&&T!==void 0?T:"log",strictRequired:(V=(I=x.strictRequired)!==null&&I!==void 0?I:Xe)!==null&&V!==void 0?V:!1,code:x.code?{...x.code,optimize:bt,regExp:ot}:{optimize:bt,regExp:ot},loopRequired:(z=x.loopRequired)!==null&&z!==void 0?z:_,loopEnum:(Q=x.loopEnum)!==null&&Q!==void 0?Q:_,meta:(te=x.meta)!==null&&te!==void 0?te:!0,messages:(Ee=x.messages)!==null&&Ee!==void 0?Ee:!0,inlineRefs:(Ve=x.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Re=x.schemaId)!==null&&Re!==void 0?Re:"$id",addUsedSchema:(Ce=x.addUsedSchema)!==null&&Ce!==void 0?Ce:!0,validateSchema:(_e=x.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=x.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=x.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=x.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:wt}}class g{constructor(N={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts={...N,...h(N)};const{es5:M,lines:R}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:b,es5:M,lines:R}),this.logger=q(N.logger);const y=N.validateFormats;N.validateFormats=!1,this.RULES=(0,l.getRules)(),$.call(this,m,N,"NOT SUPPORTED"),$.call(this,o,N,"DEPRECATED","warn"),this._metaOpts=C.call(this),N.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&O.call(this,N.keywords),typeof N.meta=="object"&&this.addMetaSchema(N.meta),p.call(this),N.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:N,meta:M,schemaId:R}=this.opts;let y=f;R==="id"&&(y={...f},y.id=y.$id,delete y.$id),M&&N&&this.addMetaSchema(y,y[R],!1)}defaultMeta(){const{meta:N,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof N=="object"?N[M]||N:void 0}validate(N,M){let R;if(typeof N=="string"){if(R=this.getSchema(N),!R)throw new Error(`no schema with key or ref "${N}"`)}else R=this.compile(N);const y=R(M);return"$async"in R||(this.errors=R.errors),y}compile(N,M){const R=this._addSchema(N,M);return R.validate||this._compileSchemaEnv(R)}compileAsync(N,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return y.call(this,N,M);async function y(re,ye){await k.call(this,re.$schema);const T=this._addSchema(re,ye);return T.validate||j.call(this,T)}async function k(re){re&&!this.getSchema(re)&&await y.call(this,{$ref:re},!0)}async function j(re){try{return this._compileSchemaEnv(re)}catch(ye){if(!(ye instanceof s.default))throw ye;return W.call(this,ye),await X.call(this,ye.missingSchema),j.call(this,re)}}function W({missingSchema:re,missingRef:ye}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${ye} cannot be resolved`)}async function X(re){const ye=await ie.call(this,re);this.refs[re]||await k.call(this,ye.$schema),this.refs[re]||this.addSchema(ye,re,M)}async function ie(re){const ye=this._loading[re];if(ye)return ye;try{return await(this._loading[re]=R(re))}finally{delete this._loading[re]}}}addSchema(N,M,R,y=this.opts.validateSchema){if(Array.isArray(N)){for(const j of N)this.addSchema(j,void 0,R,y);return this}let k;if(typeof N=="object"){const{schemaId:j}=this.opts;if(k=N[j],k!==void 0&&typeof k!="string")throw new Error(`schema ${j} must be string`)}return M=(0,a.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(N,R,M,y,!0),this}addMetaSchema(N,M,R=this.opts.validateSchema){return this.addSchema(N,M,!0,R),this}validateSchema(N,M){if(typeof N=="boolean")return!0;let R;if(R=N.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(R,N);if(!y&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return y}getSchema(N){let M;for(;typeof(M=v.call(this,N))=="string";)N=M;if(M===void 0){const{schemaId:R}=this.opts,y=new i.SchemaEnv({schema:{},schemaId:R});if(M=i.resolveSchema.call(this,y,N),!M)return;this.refs[N]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(typeof N){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=v.call(this,N);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[N],delete this.refs[N],this}case"object":{const M=N;this._cache.delete(M);let R=N[this.opts.schemaId];return R&&(R=(0,a.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(N){for(const M of N)this.addKeyword(M);return this}addKeyword(N,M){let R;if(typeof N=="string")R=N,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=R);else if(typeof N=="object"&&M===void 0){if(M=N,R=M.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,R,M),!M)return(0,c.eachItem)(R,k=>ee.call(this,k)),this;we.call(this,M);const y={...M,type:(0,d.getJSONTypes)(M.type),schemaType:(0,d.getJSONTypes)(M.schemaType)};return(0,c.eachItem)(R,y.type.length===0?k=>ee.call(this,k,y):k=>y.type.forEach(j=>ee.call(this,k,y,j))),this}getKeyword(N){const M=this.RULES.all[N];return typeof M=="object"?M.definition:!!M}removeKeyword(N){const{RULES:M}=this;delete M.keywords[N],delete M.all[N];for(const R of M.rules){const y=R.rules.findIndex(k=>k.keyword===N);y>=0&&R.rules.splice(y,1)}return this}addFormat(N,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[N]=M,this}errorsText(N=this.errors,{separator:M=", ",dataVar:R="data"}={}){return!N||N.length===0?"No errors":N.map(y=>`${R}${y.instancePath} ${y.message}`).reduce((y,k)=>y+M+k)}$dataMetaSchema(N,M){const R=this.RULES.all;N=JSON.parse(JSON.stringify(N));for(const y of M){const k=y.split("/").slice(1);let j=N;for(const W of k)j=j[W];for(const W in R){const X=R[W];if(typeof X!="object")continue;const{$data:ie}=X.definition,re=j[W];ie&&re&&(j[W]=se(re))}}return N}_removeAllSchemas(N,M){for(const R in N){const y=N[R];(!M||M.test(R))&&(typeof y=="string"?delete N[R]:y&&!y.meta&&(this._cache.delete(y.schema),delete N[R]))}}_addSchema(N,M,R,y=this.opts.validateSchema,k=this.opts.addUsedSchema){let j;const{schemaId:W}=this.opts;if(typeof N=="object")j=N[W];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof N!="boolean")throw new Error("schema must be object or boolean")}let X=this._cache.get(N);if(X!==void 0)return X;R=(0,a.normalizeId)(j||R);const ie=a.getSchemaRefs.call(this,N,R);return X=new i.SchemaEnv({schema:N,schemaId:W,meta:M,baseId:R,localRefs:ie}),this._cache.set(X.schema,X),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=X),y&&this.validateSchema(N,!0),X}_checkUnique(N){if(this.schemas[N]||this.refs[N])throw new Error(`schema with key or id "${N}" already exists`)}_compileSchemaEnv(N){if(N.meta?this._compileMetaSchema(N):i.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}_compileMetaSchema(N){const M=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,N)}finally{this.opts=M}}}g.ValidationError=n.default,g.MissingRefError=s.default,t.default=g;function $(x,N,M,R="error"){for(const y in x){const k=y;k in N&&this.logger[R](`${M}: option ${y}. ${x[k]}`)}}function v(x){return x=(0,a.normalizeId)(x),this.schemas[x]||this.refs[x]}function p(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const N in x)this.addSchema(x[N],N)}function P(){for(const x in this.opts.formats){const N=this.opts.formats[x];N&&this.addFormat(x,N)}}function O(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const N in x){const M=x[N];M.keyword||(M.keyword=N),this.addKeyword(M)}}function C(){const x={...this.opts};for(const N of E)delete x[N];return x}var U={log(){},warn(){},error(){}};function q(x){if(x===!1)return U;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}var J=/^[a-z_$][a-z0-9_$:-]*$/i;function G(x,N){const{RULES:M}=this;if((0,c.eachItem)(x,R=>{if(M.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!J.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!N&&N.$data&&!("code"in N||"validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function ee(x,N,M){var R;const y=N==null?void 0:N.post;if(M&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let j=y?k.post:k.rules.find(({type:X})=>X===M);if(j||(j={type:M,rules:[]},k.rules.push(j)),k.keywords[x]=!0,!N)return;const W={keyword:x,definition:{...N,type:(0,d.getJSONTypes)(N.type),schemaType:(0,d.getJSONTypes)(N.schemaType)}};N.before?fe.call(this,j,W,N.before):j.rules.push(W),k.all[x]=W,(R=N.implements)===null||R===void 0||R.forEach(X=>this.addKeyword(X))}function fe(x,N,M){const R=x.rules.findIndex(y=>y.keyword===M);R>=0?x.rules.splice(R,0,N):(x.rules.push(N),this.logger.warn(`rule ${M} is not defined`))}function we(x){let{metaSchema:N}=x;N!==void 0&&(x.$data&&this.opts.$data&&(N=se(N)),x.validateSchema=this.compile(N,!0))}var Oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(x){return{anyOf:[x,Oe]}}}),ac=B(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}),oc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=nn(),r=It(),n=Ae(),s=Qt(),l=Qn(),i=Fe(),u={keyword:"$ref",schemaType:"string",code(c){const{gen:f,schema:w,it:S}=c,{baseId:E,schemaEnv:b,validateName:m,opts:o,self:_}=S,{root:h}=b;if((w==="#"||w==="#/")&&E===h.baseId)return $();const g=l.resolveRef.call(_,h,E,w);if(g===void 0)throw new e.default(S.opts.uriResolver,E,w);if(g instanceof l.SchemaEnv)return v(g);return p(g);function $(){if(b===h)return d(c,m,b,b.$async);const P=f.scopeValue("root",{ref:h});return d(c,(0,n._)`${P}.validate`,h,h.$async)}function v(P){const O=a(c,P);d(c,O,P,P.$async)}function p(P){const O=f.scopeValue("schema",o.code.source===!0?{ref:P,code:(0,n.stringify)(P)}:{ref:P}),C=f.name("valid"),U=c.subschema({schema:P,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},C);c.mergeEvaluated(U),c.ok(C)}}};function a(c,f){const{gen:w}=c;return f.validate?w.scopeValue("validate",{ref:f.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:f})}.validate`}t.getValidate=a;function d(c,f,w,S){const{gen:E,it:b}=c,{allErrors:m,schemaEnv:o,opts:_}=b,h=_.passContext?s.default.this:n.nil;S?g():$();function g(){if(!o.$async)throw new Error("async schema referenced by sync schema");const P=E.let("valid");E.try(()=>{E.code((0,n._)`await ${(0,r.callValidateCode)(c,f,h)}`),p(f),m||E.assign(P,!0)},O=>{E.if((0,n._)`!(${O} instanceof ${b.ValidationError})`,()=>E.throw(O)),v(O),m||E.assign(P,!1)}),c.ok(P)}function $(){c.result((0,r.callValidateCode)(c,f,h),()=>p(f),()=>v(f))}function v(P){const O=(0,n._)`${P}.errors`;E.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),E.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function p(P){var O;if(!b.opts.unevaluated)return;const C=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(b.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(b.props=i.mergeEvaluated.props(E,C.props,b.props));else{const U=E.var("props",(0,n._)`${P}.evaluated.props`);b.props=i.mergeEvaluated.props(E,U,b.props,n.Name)}if(b.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(b.items=i.mergeEvaluated.items(E,C.items,b.items));else{const U=E.var("items",(0,n._)`${P}.evaluated.items`);b.items=i.mergeEvaluated.items(E,U,b.items,n.Name)}}}t.callRef=d,t.default=u}),cc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ac(),r=oc(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),lc=B(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:u})=>(0,e.str)`must be ${n[i].okStr} ${u}`,params:({keyword:i,schemaCode:u})=>(0,e._)`{comparison: ${n[i].okStr}, limit: ${u}}`},l={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:d}=i;i.fail$data((0,e._)`${a} ${n[u].fail} ${d} || isNaN(${a})`)}};t.default=l}),uc=B(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:l,data:i,schemaCode:u,it:a}=s,d=a.opts.multipleOfPrecision,c=l.let("res"),f=d?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${d}`:(0,e._)`${c} !== parseInt(${c})`;s.fail$data((0,e._)`(${u} === 0 || (${c} = ${i}/${u}, ${f}))`)}};t.default=n}),fc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,l=0,i;for(;l<n;)s++,i=r.charCodeAt(l++),i>=55296&&i<=56319&&l<n&&(i=r.charCodeAt(l),(i&64512)===56320&&l++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),dc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Fe(),n=fc(),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}}`},l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:d,it:c}=i,f=u==="maxLength"?e.operators.GT:e.operators.LT,w=c.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${f} ${d}`)}};t.default=l}),hc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ae(),n={message:({schemaCode:l})=>(0,r.str)`must match pattern "${l}"`,params:({schemaCode:l})=>(0,r._)`{pattern: ${l}}`},s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(l){const{data:i,$data:u,schema:a,schemaCode:d,it:c}=l,f=c.opts.unicodeRegExp?"u":"",w=u?(0,r._)`(new RegExp(${d}, ${f}))`:(0,e.usePattern)(l,a);l.fail$data((0,r._)`!${w}.test(${i})`)}};t.default=s}),pc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r={message({keyword:s,schemaCode:l}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:u}=s,a=l==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${u}`)}};t.default=n}),mc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ae(),n=Fe(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,schema:a,schemaCode:d,data:c,$data:f,it:w}=i,{opts:S}=w;if(!f&&a.length===0)return;const E=a.length>=S.loopRequired;if(w.allErrors?b():m(),S.strictRequired){const h=i.parentSchema.properties,{definedProperties:g}=i.it;for(const $ of a)if((h==null?void 0:h[$])===void 0&&!g.has($)){const v=w.schemaEnv.baseId+w.errSchemaPath,p=`required property "${$}" is not defined at "${v}" (strictRequired)`;(0,n.checkStrictMode)(w,p,w.opts.strictRequired)}}function b(){if(E||f)i.block$data(r.nil,o);else for(const h of a)(0,e.checkReportMissingProp)(i,h)}function m(){const h=u.let("missing");if(E||f){const g=u.let("valid",!0);i.block$data(g,()=>_(h,g)),i.ok(g)}else u.if((0,e.checkMissingProp)(i,a,h)),(0,e.reportMissingProp)(i,h),u.else()}function o(){u.forOf("prop",d,h=>{i.setParams({missingProperty:h}),u.if((0,e.noPropertyInData)(u,c,h,S.ownProperties),()=>i.error())})}function _(h,g){i.setParams({missingProperty:h}),u.forOf(h,d,()=>{u.assign(g,(0,e.propertyInData)(u,c,h,S.ownProperties)),u.if((0,r.not)(g),()=>{i.error(),u.break()})},r.nil)}}};t.default=l}),gc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r={message({keyword:s,schemaCode:l}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:u}=s,a=l==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${u}`)}};t.default=n}),Xn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=en();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),yc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Gr(),r=Ae(),n=Fe(),s=Xn(),l={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:l,code(u){const{gen:a,data:d,$data:c,schema:f,parentSchema:w,schemaCode:S,it:E}=u;if(!c&&!f)return;const b=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(b,o,(0,r._)`${S} === false`),u.ok(b);function o(){const $=a.let("i",(0,r._)`${d}.length`),v=a.let("j");u.setParams({i:$,j:v}),a.assign(b,!0),a.if((0,r._)`${$} > 1`,()=>(_()?h:g)($,v))}function _(){return m.length>0&&!m.some($=>$==="object"||$==="array")}function h($,v){const p=a.name("item"),P=(0,e.checkDataTypes)(m,p,E.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${$}--;`,()=>{a.let(p,(0,r._)`${d}[${$}]`),a.if(P,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${p} == "string"`,(0,r._)`${p} += "_"`),a.if((0,r._)`typeof ${O}[${p}] == "number"`,()=>{a.assign(v,(0,r._)`${O}[${p}]`),u.error(),a.assign(b,!1).break()}).code((0,r._)`${O}[${p}] = ${$}`)})}function g($,v){const p=(0,n.useFunc)(a,s.default),P=a.name("outer");a.label(P).for((0,r._)`;${$}--;`,()=>a.for((0,r._)`${v} = ${$}; ${v}--;`,()=>a.if((0,r._)`${p}(${d}[${$}], ${d}[${v}])`,()=>{u.error(),a.assign(b,!1).break(P)})))}}};t.default=i}),vc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Fe(),n=Xn(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},l={keyword:"const",$data:!0,error:s,code(i){const{gen:u,data:a,$data:d,schemaCode:c,schema:f}=i;d||f&&typeof f=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${a}, ${c})`):i.fail((0,e._)`${f} !== ${a}`)}};t.default=l}),_c=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Fe(),n=Xn(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},l={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,data:a,$data:d,schema:c,schemaCode:f,it:w}=i;if(!d&&c.length===0)throw new Error("enum must have non-empty array");const S=c.length>=w.opts.loopEnum;let E;const b=()=>E??(E=(0,r.useFunc)(u,n.default));let m;if(S||d)m=u.let("valid"),i.block$data(m,o);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const h=u.const("vSchema",f);m=(0,e.or)(...c.map((g,$)=>_(h,$)))}i.pass(m);function o(){u.assign(m,!1),u.forOf("v",f,h=>u.if((0,e._)`${b()}(${a}, ${h})`,()=>u.assign(m,!0).break()))}function _(h,g){const $=c[g];return typeof $=="object"&&$!==null?(0,e._)`${b()}(${a}, ${h}[${g}])`:(0,e._)`${a} === ${$}`}}};t.default=l}),wc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=lc(),r=uc(),n=dc(),s=hc(),l=pc(),i=mc(),u=gc(),a=yc(),d=vc(),c=_c(),f=[e.default,r.default,n.default,s.default,l.default,i.default,u.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,c.default];t.default=f}),pi=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ae(),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:d}=u;if(!Array.isArray(d)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}l(i,d)}};function l(i,u){const{gen:a,schema:d,data:c,keyword:f,it:w}=i;w.items=!0;const S=a.const("len",(0,e._)`${c}.length`);if(d===!1)i.setParams({len:u.length}),i.pass((0,e._)`${S} <= ${u.length}`);else if(typeof d=="object"&&!(0,r.alwaysValidSchema)(w,d)){const b=a.var("valid",(0,e._)`${S} <= ${u.length}`);a.if((0,e.not)(b),()=>E(b)),i.ok(b)}function E(b){a.forRange("i",u.length,S,m=>{i.subschema({keyword:f,dataProp:m,dataPropType:r.Type.Num},b),w.allErrors||a.if((0,e.not)(b),()=>a.break())})}}t.validateAdditionalItems=l,t.default=s}),mi=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ae(),r=Fe(),n=It(),s={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(i){const{schema:u,it:a}=i;if(Array.isArray(u))return l(i,"additionalItems",u);a.items=!0,!(0,r.alwaysValidSchema)(a,u)&&i.ok((0,n.validateArray)(i))}};function l(i,u,a=i.schema){const{gen:d,parentSchema:c,data:f,keyword:w,it:S}=i;m(c),S.opts.unevaluated&&a.length&&S.items!==!0&&(S.items=r.mergeEvaluated.items(d,a.length,S.items));const E=d.name("valid"),b=d.const("len",(0,e._)`${f}.length`);a.forEach((o,_)=>{(0,r.alwaysValidSchema)(S,o)||(d.if((0,e._)`${b} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},E)),i.ok(E))});function m(o){const{opts:_,errSchemaPath:h}=S,g=a.length,$=g===o.minItems&&(g===o.maxItems||o[u]===!1);if(_.strictTuples&&!$){const v=`"${w}" is ${g}-tuple, but minItems or maxItems/${u} are not specified or different at path "${h}"`;(0,r.checkStrictMode)(S,v,_.strictTuples)}}}t.validateTuple=l,t.default=s}),bc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=mi(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),$c=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Fe(),n=It(),s=pi(),l={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:l,code(u){const{schema:a,parentSchema:d,it:c}=u,{prefixItems:f}=d;c.items=!0,!(0,r.alwaysValidSchema)(c,a)&&(f?(0,s.validateAdditionalItems)(u,f):u.ok((0,n.validateArray)(u)))}};t.default=i}),Ec=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Fe(),n={message:({params:{min:l,max:i}})=>i===void 0?(0,e.str)`must contain at least ${l} valid item(s)`:(0,e.str)`must contain at least ${l} and no more than ${i} valid item(s)`,params:({params:{min:l,max:i}})=>i===void 0?(0,e._)`{minContains: ${l}}`:(0,e._)`{minContains: ${l}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(l){const{gen:i,schema:u,parentSchema:a,data:d,it:c}=l;let f,w;const{minContains:S,maxContains:E}=a;c.opts.next?(f=S===void 0?1:S,w=E):f=1;const b=i.const("len",(0,e._)`${d}.length`);if(l.setParams({min:f,max:w}),w===void 0&&f===0){(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&f>w){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),l.fail();return}if((0,r.alwaysValidSchema)(c,u)){let g=(0,e._)`${b} >= ${f}`;w!==void 0&&(g=(0,e._)`${g} && ${b} <= ${w}`),l.pass(g);return}c.items=!0;const m=i.name("valid");w===void 0&&f===1?_(m,()=>i.if(m,()=>i.break())):f===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${d}.length > 0`,o)):(i.let(m,!1),o()),l.result(m,()=>l.reset());function o(){const g=i.name("_valid"),$=i.let("count",0);_(g,()=>i.if(g,()=>h($)))}function _(g,$){i.forRange("i",0,b,v=>{l.subschema({keyword:"contains",dataProp:v,dataPropType:r.Type.Num,compositeRule:!0},g),$()})}function h(g){i.code((0,e._)`${g}++`),w===void 0?i.if((0,e._)`${g} >= ${f}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${g} > ${w}`,()=>i.assign(m,!1).break()),f===1?i.assign(m,!0):i.if((0,e._)`${g} >= ${f}`,()=>i.assign(m,!0)))}}};t.default=s}),Sc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ae(),r=Fe(),n=It();t.error={message:({params:{property:a,depsCount:d,deps:c}})=>{const f=d===1?"property":"properties";return(0,e.str)`must have ${f} ${c} when property ${a} is present`},params:({params:{property:a,depsCount:d,deps:c,missingProperty:f}})=>(0,e._)`{property: ${a},
|
|
28
|
+
missingProperty: ${f},
|
|
29
|
+
depsCount: ${d},
|
|
30
|
+
deps: ${c}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[d,c]=l(a);i(a,d),u(a,c)}};function l({schema:a}){const d={},c={};for(const f in a){if(f==="__proto__")continue;const w=Array.isArray(a[f])?d:c;w[f]=a[f]}return[d,c]}function i(a,d=a.schema){const{gen:c,data:f,it:w}=a;if(Object.keys(d).length===0)return;const S=c.let("missing");for(const E in d){const b=d[E];if(b.length===0)continue;const m=(0,n.propertyInData)(c,f,E,w.opts.ownProperties);a.setParams({property:E,depsCount:b.length,deps:b.join(", ")}),w.allErrors?c.if(m,()=>{for(const o of b)(0,n.checkReportMissingProp)(a,o)}):(c.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,b,S)})`),(0,n.reportMissingProp)(a,S),c.else())}}t.validatePropertyDeps=i;function u(a,d=a.schema){const{gen:c,data:f,keyword:w,it:S}=a,E=c.name("valid");for(const b in d)(0,r.alwaysValidSchema)(S,d[b])||(c.if((0,n.propertyInData)(c,f,b,S.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:b},E);a.mergeValidEvaluated(m,E)},()=>c.var(E,!0)),a.ok(E))}t.validateSchemaDeps=u,t.default=s}),Pc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Fe(),n={message:"property name must be valid",params:({params:l})=>(0,e._)`{propertyName: ${l.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(l){const{gen:i,schema:u,data:a,it:d}=l;if((0,r.alwaysValidSchema)(d,u))return;const c=i.name("valid");i.forIn("key",a,f=>{l.setParams({propertyName:f}),l.subschema({keyword:"propertyNames",data:f,dataTypes:["string"],propertyName:f,compositeRule:!0},c),i.if((0,e.not)(c),()=>{l.error(!0),d.allErrors||i.break()})}),l.ok(c)}};t.default=s}),gi=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ae(),n=Qt(),s=Fe(),l={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:l,code(u){const{gen:a,schema:d,parentSchema:c,data:f,errsCount:w,it:S}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:E,opts:b}=S;if(S.props=!0,b.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(S,d))return;const m=(0,e.allSchemaProperties)(c.properties),o=(0,e.allSchemaProperties)(c.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",f,p=>{!m.length&&!o.length?$(p):a.if(h(p),()=>$(p))})}function h(p){let P;if(m.length>8){const O=(0,s.schemaRefOrVal)(S,c.properties,"properties");P=(0,e.isOwnProperty)(a,O,p)}else m.length?P=(0,r.or)(...m.map(O=>(0,r._)`${p} === ${O}`)):P=r.nil;return o.length&&(P=(0,r.or)(P,...o.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${p})`))),(0,r.not)(P)}function g(p){a.code((0,r._)`delete ${f}[${p}]`)}function $(p){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){g(p);return}if(d===!1){u.setParams({additionalProperty:p}),u.error(),E||a.break();return}if(typeof d=="object"&&!(0,s.alwaysValidSchema)(S,d)){const P=a.name("valid");b.removeAdditional==="failing"?(v(p,P,!1),a.if((0,r.not)(P),()=>{u.reset(),g(p)})):(v(p,P),E||a.if((0,r.not)(P),()=>a.break()))}}function v(p,P,O){const C={keyword:"additionalProperties",dataProp:p,dataPropType:s.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(C,P)}}};t.default=i}),kc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=rn(),r=It(),n=Fe(),s=gi(),l={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,parentSchema:d,data:c,it:f}=i;f.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(f,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);for(const o of w)f.definedProperties.add(o);f.opts.unevaluated&&w.length&&f.props!==!0&&(f.props=n.mergeEvaluated.props(u,(0,n.toHash)(w),f.props));const S=w.filter(o=>!(0,n.alwaysValidSchema)(f,a[o]));if(S.length===0)return;const E=u.name("valid");for(const o of S)b(o)?m(o):(u.if((0,r.propertyInData)(u,c,o,f.opts.ownProperties)),m(o),f.allErrors||u.else().var(E,!0),u.endIf()),i.it.definedProperties.add(o),i.ok(E);function b(o){return f.opts.useDefaults&&!f.compositeRule&&a[o].default!==void 0}function m(o){i.subschema({keyword:"properties",schemaProp:o,dataProp:o},E)}}};t.default=l}),Oc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r=Ae(),n=Fe(),s=Fe(),l={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,data:d,parentSchema:c,it:f}=i,{opts:w}=f,S=(0,e.allSchemaProperties)(a),E=S.filter($=>(0,n.alwaysValidSchema)(f,a[$]));if(S.length===0||E.length===S.length&&(!f.opts.unevaluated||f.props===!0))return;const b=w.strictSchema&&!w.allowMatchingProperties&&c.properties,m=u.name("valid");f.props!==!0&&!(f.props instanceof r.Name)&&(f.props=(0,s.evaluatedPropsToName)(u,f.props));const{props:o}=f;_();function _(){for(const $ of S)b&&h($),f.allErrors?g($):(u.var(m,!0),g($),u.if(m))}function h($){for(const v in b)new RegExp($).test(v)&&(0,n.checkStrictMode)(f,`property ${v} matches pattern ${$} (use allowMatchingProperties)`)}function g($){u.forIn("key",d,v=>{u.if((0,r._)`${(0,e.usePattern)(i,$)}.test(${v})`,()=>{const p=E.includes($);p||i.subschema({keyword:"patternProperties",schemaProp:$,dataProp:v,dataPropType:s.Type.Str},m),f.opts.unevaluated&&o!==!0?u.assign((0,r._)`${o}[${v}]`,!0):!p&&!f.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=l}),Tc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:l,it:i}=n;if((0,e.alwaysValidSchema)(i,l)){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}),Nc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=It(),r={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.validateUnion,error:{message:"must match a schema in anyOf"}};t.default=r}),Rc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Fe(),n={message:"must match exactly one schema in oneOf",params:({params:l})=>(0,e._)`{passingSchemas: ${l.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(l){const{gen:i,schema:u,parentSchema:a,it:d}=l;if(!Array.isArray(u))throw new Error("ajv implementation error");if(d.opts.discriminator&&a.discriminator)return;const c=u,f=i.let("valid",!1),w=i.let("passing",null),S=i.name("_valid");l.setParams({passing:w}),i.block(E),l.result(f,()=>l.reset(),()=>l.error(!0));function E(){c.forEach((b,m)=>{let o;(0,r.alwaysValidSchema)(d,b)?i.var(S,!0):o=l.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},S),m>0&&i.if((0,e._)`${S} && ${f}`).assign(f,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(S,()=>{i.assign(f,!0),i.assign(w,m),o&&l.mergeEvaluated(o,e.Name)})})}}};t.default=s}),Ic=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:l,it:i}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");const u=s.name("valid");l.forEach((a,d)=>{if((0,e.alwaysValidSchema)(i,a))return;const c=n.subschema({keyword:"allOf",schemaProp:d},u);n.ok(u),n.mergeEvaluated(c)})}};t.default=r}),Ac=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),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:d}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const c=l(d,"then"),f=l(d,"else");if(!c&&!f)return;const w=u.let("valid",!0),S=u.name("_valid");if(E(),i.reset(),c&&f){const m=u.let("ifClause");i.setParams({ifClause:m}),u.if(S,b("then",m),b("else",m))}else c?u.if(S,b("then")):u.if((0,e.not)(S),b("else"));i.pass(w,()=>i.error(!0));function E(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},S);i.mergeEvaluated(m)}function b(m,o){return()=>{const _=i.subschema({keyword:m},S);u.assign(w,S),i.mergeValidEvaluated(_,w),o?u.assign(o,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function l(i,u){const a=i.schema[u];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),Cc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Fe(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:l}){s.if===void 0&&(0,e.checkStrictMode)(l,`"${n}" without "if" is ignored`)}};t.default=r}),jc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=pi(),r=bc(),n=mi(),s=$c(),l=Ec(),i=Sc(),u=Pc(),a=gi(),d=kc(),c=Oc(),f=Tc(),w=Nc(),S=Rc(),E=Ic(),b=Ac(),m=Cc();function o(_=!1){const h=[f.default,w.default,S.default,E.default,b.default,m.default,u.default,a.default,i.default,d.default,c.default];return _?h.push(r.default,s.default):h.push(e.default,n.default),h.push(l.default),h}t.default=o}),Mc=B(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,l){const{gen:i,data:u,$data:a,schema:d,schemaCode:c,it:f}=s,{opts:w,errSchemaPath:S,schemaEnv:E,self:b}=f;if(!w.validateFormats)return;a?m():o();function m(){const _=i.scopeValue("formats",{ref:b.formats,code:w.code.formats}),h=i.const("fDef",(0,e._)`${_}[${c}]`),g=i.let("fType"),$=i.let("format");i.if((0,e._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>i.assign(g,(0,e._)`${h}.type || "string"`).assign($,(0,e._)`${h}.validate`),()=>i.assign(g,(0,e._)`"string"`).assign($,h)),s.fail$data((0,e.or)(v(),p()));function v(){return w.strictSchema===!1?e.nil:(0,e._)`${c} && !${$}`}function p(){const P=E.$async?(0,e._)`(${h}.async ? await ${$}(${u}) : ${$}(${u}))`:(0,e._)`${$}(${u})`,O=(0,e._)`(typeof ${$} == "function" ? ${P} : ${$}.test(${u}))`;return(0,e._)`${$} && ${$} !== true && ${g} === ${l} && !${O}`}}function o(){const _=b.formats[d];if(!_){v();return}if(_===!0)return;const[h,g,$]=p(_);h===l&&s.pass(P());function v(){if(w.strictSchema===!1){b.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${d}" ignored in schema at path "${S}"`}}function p(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(d)}`:void 0,U=i.scopeValue("formats",{key:d,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${U}.validate`]:["string",O,U]}function P(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!E.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${u})`}return typeof g=="function"?(0,e._)`${$}(${u})`:(0,e._)`${$}.test(${u})`}}}};t.default=n}),Dc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Mc(),r=[e.default];t.default=r}),qc=B(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"]}),Lc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=cc(),r=wc(),n=jc(),s=Dc(),l=qc(),i=[e.default,r.default,(0,n.default)(),s.default,l.metadataVocabulary,l.contentVocabulary];t.default=i}),Uc=B(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={}))}),Vc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ae(),r=Uc(),n=Qn(),s=nn(),l=Fe(),i={message:({params:{discrError:a,tagName:d}})=>a===r.DiscrError.Tag?`tag "${d}" must be string`:`value of tag "${d}" must be in oneOf`,params:({params:{discrError:a,tag:d,tagName:c}})=>(0,e._)`{error: ${a}, tag: ${c}, tagValue: ${d}}`},u={keyword:"discriminator",type:"object",schemaType:"object",error:i,code(a){const{gen:d,data:c,schema:f,parentSchema:w,it:S}=a,{oneOf:E}=w;if(!S.opts.discriminator)throw new Error("discriminator: requires discriminator option");const b=f.propertyName;if(typeof b!="string")throw new Error("discriminator: requires propertyName");if(f.mapping)throw new Error("discriminator: mapping is not supported");if(!E)throw new Error("discriminator: requires oneOf keyword");const m=d.let("valid",!1),o=d.const("tag",(0,e._)`${c}${(0,e.getProperty)(b)}`);d.if((0,e._)`typeof ${o} == "string"`,()=>_(),()=>a.error(!1,{discrError:r.DiscrError.Tag,tag:o,tagName:b})),a.ok(m);function _(){const $=g();d.if(!1);for(const v in $)d.elseIf((0,e._)`${o} === ${v}`),d.assign(m,h($[v]));d.else(),a.error(!1,{discrError:r.DiscrError.Mapping,tag:o,tagName:b}),d.endIf()}function h($){const v=d.name("valid"),p=a.subschema({keyword:"oneOf",schemaProp:$},v);return a.mergeEvaluated(p,e.Name),v}function g(){var $;const v={},p=O(w);let P=!0;for(let q=0;q<E.length;q++){let J=E[q];if(J!=null&&J.$ref&&!(0,l.schemaHasRulesButRef)(J,S.self.RULES)){const ee=J.$ref;if(J=n.resolveRef.call(S.self,S.schemaEnv.root,S.baseId,ee),J instanceof n.SchemaEnv&&(J=J.schema),J===void 0)throw new s.default(S.opts.uriResolver,S.baseId,ee)}const G=($=J==null?void 0:J.properties)===null||$===void 0?void 0:$[b];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${b}"`);P=P&&(p||O(J)),C(G,q)}if(!P)throw new Error(`discriminator: "${b}" must be required`);return v;function O({required:q}){return Array.isArray(q)&&q.includes(b)}function C(q,J){if(q.const)U(q.const,J);else if(q.enum)for(const G of q.enum)U(G,J);else throw new Error(`discriminator: "properties/${b}" must have "const" or "enum"`)}function U(q,J){if(typeof q!="string"||q in v)throw new Error(`discriminator: "${b}" values must be unique strings`);v[q]=J}}}};t.default=u}),Fc=B((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}}),zc=B((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=ic(),n=Lc(),s=Vc(),l=Fc(),i=["/properties"],u="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(l,i):l;this.addMetaSchema(E,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 d=rn();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=Ae();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=Jn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var w=nn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),xc=B(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(l,i),time:e(a,d),"date-time":e(f,w),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:b,"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:P,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:o,int32:{type:"number",validate:g},int64:{type:"number",validate:$},float:{type:"number",validate:v},double:{type:"number",validate:v},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,d),"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 l(O){const C=n.exec(O);if(!C)return!1;const U=+C[1],q=+C[2],J=+C[3];return q>=1&&q<=12&&J>=1&&J<=(q===2&&r(U)?29:s[q])}function i(O,C){if(O&&C)return O>C?1:O<C?-1:0}var u=/^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;function a(O,C){const U=u.exec(O);if(!U)return!1;const q=+U[1],J=+U[2],G=+U[3],ee=U[5];return(q<=23&&J<=59&&G<=59||q===23&&J===59&&G===60)&&(!C||ee!=="")}function d(O,C){if(!(O&&C))return;const U=u.exec(O),q=u.exec(C);if(U&&q)return O=U[1]+U[2]+U[3]+(U[4]||""),C=q[1]+q[2]+q[3]+(q[4]||""),O>C?1:O<C?-1:0}var c=/t|\s/i;function f(O){const C=O.split(c);return C.length===2&&l(C[0])&&a(C[1],!0)}function w(O,C){if(!(O&&C))return;const[U,q]=O.split(c),[J,G]=C.split(c),ee=i(U,J);if(ee!==void 0)return ee||d(q,G)}var S=/\/|:/,E=/^(?:[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 b(O){return S.test(O)&&E.test(O)}var m=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function o(O){return m.lastIndex=0,m.test(O)}var _=-2147483648,h=2**31-1;function g(O){return Number.isInteger(O)&&O<=h&&O>=_}function $(O){return Number.isInteger(O)}function v(){return!0}var p=/[^\\]\\Z/;function P(O){if(p.test(O))return!1;try{return new RegExp(O),!0}catch{return!1}}}),Wr=B(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((h,g)=>`${h}${g}`,"")}get names(){var _;return(_=this._names)!==null&&_!==void 0?_:this._names=this._items.reduce((h,g)=>(g instanceof r&&(h[g.str]=(h[g.str]||0)+1),h),{})}}t._Code=n,t.nil=new n("");function s(o,..._){const h=[o[0]];let g=0;for(;g<_.length;)u(h,_[g]),h.push(o[++g]);return new n(h)}t._=s;var l=new n("+");function i(o,..._){const h=[S(o[0])];let g=0;for(;g<_.length;)h.push(l),u(h,_[g]),h.push(l,S(o[++g]));return a(h),new n(h)}t.str=i;function u(o,_){_ instanceof n?o.push(..._._items):_ instanceof r?o.push(_):o.push(f(_))}t.addCodeArg=u;function a(o){let _=1;for(;_<o.length-1;){if(o[_]===l){const h=d(o[_-1],o[_+1]);if(h!==void 0){o.splice(_-1,3,h);continue}o[_++]="+"}_++}}function d(o,_){if(_==='""')return o;if(o==='""')return _;if(typeof o=="string")return _ instanceof r||o[o.length-1]!=='"'?void 0:typeof _!="string"?`${o.slice(0,-1)}${_}"`:_[0]==='"'?o.slice(0,-1)+_.slice(1):void 0;if(typeof _=="string"&&_[0]==='"'&&!(o instanceof r))return`"${o}${_.slice(1)}`}function c(o,_){return _.emptyStr()?o:o.emptyStr()?_:i`${o}${_}`}t.strConcat=c;function f(o){return typeof o=="number"||typeof o=="boolean"||o===null?o:S(Array.isArray(o)?o.join(","):o)}function w(o){return new n(S(o))}t.stringify=w;function S(o){return JSON.stringify(o).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.safeStringify=S;function E(o){return typeof o=="string"&&t.IDENTIFIER.test(o)?new n(`.${o}`):s`[${o}]`}t.getProperty=E;function b(o){if(typeof o=="string"&&t.IDENTIFIER.test(o))return new n(`${o}`);throw new Error(`CodeGen: invalid export name: ${o}, use explicit $id name mapping`)}t.getEsmExportName=b;function m(o){return new n(o.toString())}t.regexpCode=m}),Cs=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;var e=Wr();class r extends Error{constructor(d){super(`CodeGen: "code" for ${d} not defined`),this.value=d.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:d,parent:c}={}){this._names={},this._prefixes=d,this._parent=c}toName(d){return d instanceof e.Name?d:this.name(d)}name(d){return new e.Name(this._newName(d))}_newName(d){const c=this._names[d]||this._nameGroup(d);return`${d}${c.index++}`}_nameGroup(d){var c,f;if(!((f=(c=this._parent)===null||c===void 0?void 0:c._prefixes)===null||f===void 0)&&f.has(d)||this._prefixes&&!this._prefixes.has(d))throw new Error(`CodeGen: prefix "${d}" is not allowed in this scope`);return this._names[d]={prefix:d,index:0}}}t.Scope=s;class l extends e.Name{constructor(d,c){super(c),this.prefix=d}setValue(d,{property:c,itemIndex:f}){this.value=d,this.scopePath=(0,e._)`.${new e.Name(c)}[${f}]`}}t.ValueScopeName=l;var i=(0,e._)`\n`;class u extends s{constructor(d){super(d),this._values={},this._scope=d.scope,this.opts={...d,_n:d.lines?i:e.nil}}get(){return this._scope}name(d){return new l(d,this._newName(d))}value(d,c){var f;if(c.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const w=this.toName(d),{prefix:S}=w,E=(f=c.key)!==null&&f!==void 0?f:c.ref;let b=this._values[S];if(b){const _=b.get(E);if(_)return _}else b=this._values[S]=new Map;b.set(E,w);const m=this._scope[S]||(this._scope[S]=[]),o=m.length;return m[o]=c.ref,w.setValue(c,{property:S,itemIndex:o}),w}getValue(d,c){const f=this._values[d];if(f)return f.get(c)}scopeRefs(d,c=this._values){return this._reduceValues(c,f=>{if(f.scopePath===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return(0,e._)`${d}${f.scopePath}`})}scopeCode(d=this._values,c,f){return this._reduceValues(d,w=>{if(w.value===void 0)throw new Error(`CodeGen: name "${w}" has no value`);return w.value.code},c,f)}_reduceValues(d,c,f={},w){let S=e.nil;for(const E in d){const b=d[E];if(!b)continue;const m=f[E]=f[E]||new Map;b.forEach(o=>{if(m.has(o))return;m.set(o,n.Started);let _=c(o);if(_){const h=this.opts.es5?t.varKinds.var:t.varKinds.const;S=(0,e._)`${S}${h} ${o} = ${_};${this.opts._n}`}else if(_=w==null?void 0:w(o))S=(0,e._)`${S}${_}${this.opts._n}`;else throw new r(o);m.set(o,n.Completed)})}return S}}t.ValueScope=u}),Ne=B(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=Wr(),r=Cs(),n=Wr();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=Cs();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 l{optimizeNodes(){return this}optimizeNames(y,k){return this}}class i extends l{constructor(y,k,j){super(),this.varKind=y,this.name=k,this.rhs=j}render({es5:y,_n:k}){const j=y?r.varKinds.var:this.varKind,W=this.rhs===void 0?"":` = ${this.rhs}`;return`${j} ${this.name}${W};`+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 l{constructor(y,k,j){super(),this.lhs=y,this.rhs=k,this.sideEffects=j}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 J(y,this.rhs)}}class a extends u{constructor(y,k,j,W){super(y,j,W),this.op=k}render({_n:y}){return`${this.lhs} ${this.op}= ${this.rhs};`+y}}class d extends l{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`${this.label}:`+y}}class c extends l{constructor(y){super(),this.label=y,this.names={}}render({_n:y}){return`break${this.label?` ${this.label}`:""};`+y}}class f extends l{constructor(y){super(),this.error=y}render({_n:y}){return`throw ${this.error};`+y}get names(){return this.error.names}}class w extends l{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 S extends l{constructor(y=[]){super(),this.nodes=y}render(y){return this.nodes.reduce((k,j)=>k+j.render(y),"")}optimizeNodes(){const{nodes:y}=this;let k=y.length;for(;k--;){const j=y[k].optimizeNodes();Array.isArray(j)?y.splice(k,1,...j):j?y[k]=j:y.splice(k,1)}return y.length>0?this:void 0}optimizeNames(y,k){const{nodes:j}=this;let W=j.length;for(;W--;){const X=j[W];X.optimizeNames(y,k)||(ee(y,X.names),j.splice(W,1))}return j.length>0?this:void 0}get names(){return this.nodes.reduce((y,k)=>q(y,k.names),{})}}class E extends S{render(y){return"{"+y._n+super.render(y)+"}"+y._n}}class b extends S{}class m extends E{}m.kind="else";class o extends E{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 j=k.optimizeNodes();k=this.else=Array.isArray(j)?new m(j):j}if(k)return y===!1?k instanceof o?k:k.nodes:this.nodes.length?this:new o(fe(y),k instanceof o?[k]:k.nodes);if(!(y===!1||!this.nodes.length))return this}optimizeNames(y,k){var j;if(this.else=(j=this.else)===null||j===void 0?void 0:j.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 J(y,this.condition),this.else&&q(y,this.else.names),y}}o.kind="if";class _ extends E{}_.kind="for";class h 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 g extends _{constructor(y,k,j,W){super(),this.varKind=y,this.name=k,this.from=j,this.to=W}render(y){const k=y.es5?r.varKinds.var:this.varKind,{name:j,from:W,to:X}=this;return`for(${k} ${j}=${W}; ${j}<${X}; ${j}++)`+super.render(y)}get names(){const y=J(super.names,this.from);return J(y,this.to)}}class $ extends _{constructor(y,k,j,W){super(),this.loop=y,this.varKind=k,this.name=j,this.iterable=W}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 v extends E{constructor(y,k,j){super(),this.name=y,this.args=k,this.async=j}render(y){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(y)}}v.kind="func";class p extends S{render(y){return"return "+super.render(y)}}p.kind="return";class P extends E{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 j,W;return super.optimizeNames(y,k),(j=this.catch)===null||j===void 0||j.optimizeNames(y,k),(W=this.finally)===null||W===void 0||W.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 E{constructor(y){super(),this.error=y}render(y){return`catch(${this.error})`+super.render(y)}}O.kind="catch";class C extends E{render(y){return"finally"+super.render(y)}}C.kind="finally";class U{constructor(y,k={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...k,_n:k.lines?`
|
|
31
|
+
`:""},this._extScope=y,this._scope=new r.Scope({parent:y}),this._nodes=[new b]}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 j=this._extScope.value(y,k);return(this._values[j.prefix]||(this._values[j.prefix]=new Set)).add(j),j}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,j,W){const X=this._scope.toName(k);return j!==void 0&&W&&(this._constants[X.str]=j),this._leafNode(new i(y,X,j)),X}const(y,k,j){return this._def(r.varKinds.const,y,k,j)}let(y,k,j){return this._def(r.varKinds.let,y,k,j)}var(y,k,j){return this._def(r.varKinds.var,y,k,j)}assign(y,k,j){return this._leafNode(new u(y,k,j))}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[j,W]of y)k.length>1&&k.push(","),k.push(j),(j!==W||this.opts.es5)&&(k.push(":"),(0,e.addCodeArg)(k,W));return k.push("}"),new e._Code(k)}if(y,k,j){if(this._blockNode(new o(y)),k&&j)this.code(k).else().code(j).endIf();else if(k)this.code(k).endIf();else if(j)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(y){return this._elseNode(new o(y))}else(){return this._elseNode(new m)}endIf(){return this._endBlockNode(o,m)}_for(y,k){return this._blockNode(y),k&&this.code(k).endFor(),this}for(y,k){return this._for(new h(y),k)}forRange(y,k,j,W,X=this.opts.es5?r.varKinds.var:r.varKinds.let){const ie=this._scope.toName(y);return this._for(new g(X,ie,k,j),()=>W(ie))}forOf(y,k,j,W=r.varKinds.const){const X=this._scope.toName(y);if(this.opts.es5){const ie=k instanceof e.Name?k:this.var("_arr",k);return this.forRange("_i",0,(0,e._)`${ie}.length`,re=>{this.var(X,(0,e._)`${ie}[${re}]`),j(X)})}return this._for(new $("of",W,X,k),()=>j(X))}forIn(y,k,j,W=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(y,(0,e._)`Object.keys(${k})`,j);const X=this._scope.toName(y);return this._for(new $("in",W,X,k),()=>j(X))}endFor(){return this._endBlockNode(_)}label(y){return this._leafNode(new d(y))}break(y){return this._leafNode(new c(y))}return(y){const k=new p;if(this._blockNode(k),this.code(y),k.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(p)}try(y,k,j){if(!k&&!j)throw new Error('CodeGen: "try" without "catch" and "finally"');const W=new P;if(this._blockNode(W),this.code(y),k){const X=this.name("e");this._currNode=W.catch=new O(X),k(X)}return j&&(this._currNode=W.finally=new C,this.code(j)),this._endBlockNode(O,C)}throw(y){return this._leafNode(new f(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 j=this._nodes.length-k;if(j<0||y!==void 0&&j!==y)throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${y} expected`);return this._nodes.length=k,this}func(y,k=e.nil,j,W){return this._blockNode(new v(y,k,j)),W&&this.code(W).endFunc(),this}endFunc(){return this._endBlockNode(v)}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 j=this._currNode;if(j instanceof y||k&&j 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 o))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=U;function q(R,y){for(const k in y)R[k]=(R[k]||0)+(y[k]||0);return R}function J(R,y){return y instanceof e._CodeOrName?q(R,y.names):R}function G(R,y,k){if(R instanceof e.Name)return j(R);if(!W(R))return R;return new e._Code(R._items.reduce((X,ie)=>(ie instanceof e.Name&&(ie=j(ie)),ie instanceof e._Code?X.push(...ie._items):X.push(ie),X),[]));function j(X){const ie=k[X.str];return ie===void 0||y[X.str]!==1?X:(delete y[X.str],ie)}function W(X){return X instanceof e._Code&&X._items.some(ie=>ie instanceof e.Name&&y[ie.str]===1&&k[ie.str]!==void 0)}}function ee(R,y){for(const k in y)R[k]=(R[k]||0)-(y[k]||0)}function fe(R){return typeof R=="boolean"||typeof R=="number"||R===null?!R:(0,e._)`!${M(R)}`}t.not=fe;var we=N(t.operators.AND);function Oe(...R){return R.reduce(we)}t.and=Oe;var se=N(t.operators.OR);function x(...R){return R.reduce(se)}t.or=x;function N(R){return(y,k)=>y===e.nil?k:k===e.nil?y:(0,e._)`${M(y)} ${R} ${M(k)}`}function M(R){return R instanceof e.Name?R:(0,e._)`(${R})`}}),ze=B(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=Ne(),r=Wr();function n(v){const p={};for(const P of v)p[P]=!0;return p}t.toHash=n;function s(v,p){return typeof p=="boolean"?p:Object.keys(p).length===0?!0:(l(v,p),!i(p,v.self.RULES.all))}t.alwaysValidSchema=s;function l(v,p=v.schema){const{opts:P,self:O}=v;if(!P.strictSchema||typeof p=="boolean")return;const C=O.RULES.keywords;for(const U in p)C[U]||$(v,`unknown keyword: "${U}"`)}t.checkUnknownRules=l;function i(v,p){if(typeof v=="boolean")return!v;for(const P in v)if(p[P])return!0;return!1}t.schemaHasRules=i;function u(v,p){if(typeof v=="boolean")return!v;for(const P in v)if(P!=="$ref"&&p.all[P])return!0;return!1}t.schemaHasRulesButRef=u;function a({topSchemaRef:v,schemaPath:p},P,O,C){if(!C){if(typeof P=="number"||typeof P=="boolean")return P;if(typeof P=="string")return(0,e._)`${P}`}return(0,e._)`${v}${p}${(0,e.getProperty)(O)}`}t.schemaRefOrVal=a;function d(v){return w(decodeURIComponent(v))}t.unescapeFragment=d;function c(v){return encodeURIComponent(f(v))}t.escapeFragment=c;function f(v){return typeof v=="number"?`${v}`:v.replace(/~/g,"~0").replace(/\//g,"~1")}t.escapeJsonPointer=f;function w(v){return v.replace(/~1/g,"/").replace(/~0/g,"~")}t.unescapeJsonPointer=w;function S(v,p){if(Array.isArray(v))for(const P of v)p(P);else p(v)}t.eachItem=S;function E({mergeNames:v,mergeToName:p,mergeValues:P,resultToName:O}){return(C,U,q,J)=>{const G=q===void 0?U:q instanceof e.Name?(U instanceof e.Name?v(C,U,q):p(C,U,q),q):U instanceof e.Name?(p(C,q,U),U):P(U,q);return J===e.Name&&!(G instanceof e.Name)?O(C,G):G}}t.mergeEvaluated={props:E({mergeNames:(v,p,P)=>v.if((0,e._)`${P} !== true && ${p} !== undefined`,()=>{v.if((0,e._)`${p} === true`,()=>v.assign(P,!0),()=>v.assign(P,(0,e._)`${P} || {}`).code((0,e._)`Object.assign(${P}, ${p})`))}),mergeToName:(v,p,P)=>v.if((0,e._)`${P} !== true`,()=>{p===!0?v.assign(P,!0):(v.assign(P,(0,e._)`${P} || {}`),m(v,P,p))}),mergeValues:(v,p)=>v===!0?!0:{...v,...p},resultToName:b}),items:E({mergeNames:(v,p,P)=>v.if((0,e._)`${P} !== true && ${p} !== undefined`,()=>v.assign(P,(0,e._)`${p} === true ? true : ${P} > ${p} ? ${P} : ${p}`)),mergeToName:(v,p,P)=>v.if((0,e._)`${P} !== true`,()=>v.assign(P,p===!0?!0:(0,e._)`${P} > ${p} ? ${P} : ${p}`)),mergeValues:(v,p)=>v===!0?!0:Math.max(v,p),resultToName:(v,p)=>v.var("items",p)})};function b(v,p){if(p===!0)return v.var("props",!0);const P=v.var("props",(0,e._)`{}`);return p!==void 0&&m(v,P,p),P}t.evaluatedPropsToName=b;function m(v,p,P){Object.keys(P).forEach(O=>v.assign((0,e._)`${p}${(0,e.getProperty)(O)}`,!0))}t.setEvaluated=m;var o={};function _(v,p){return v.scopeValue("func",{ref:p,code:o[p.code]||(o[p.code]=new r._Code(p.code))})}t.useFunc=_;var h;(function(v){v[v.Num=0]="Num",v[v.Str=1]="Str"})(h=t.Type||(t.Type={}));function g(v,p,P){if(v instanceof e.Name){const O=p===h.Num;return P?O?(0,e._)`"[" + ${v} + "]"`:(0,e._)`"['" + ${v} + "']"`:O?(0,e._)`"/" + ${v}`:(0,e._)`"/" + ${v}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return P?(0,e.getProperty)(v).toString():"/"+f(v)}t.getErrorPath=g;function $(v,p,P=v.opts.strictSchema){if(P){if(p=`strict mode: ${p}`,P===!0)throw new Error(p);v.self.logger.warn(p)}}t.checkStrictMode=$}),Xt=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),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}),sn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;var e=Ne(),r=ze(),n=Xt();t.keywordError={message:({keyword:m})=>(0,e.str)`must pass "${m}" keyword validation`},t.keyword$DataError={message:({keyword:m,schemaType:o})=>o?(0,e.str)`"${m}" keyword must be ${o} ($data)`:(0,e.str)`"${m}" keyword is invalid ($data)`};function s(m,o=t.keywordError,_,h){const{it:g}=m,{gen:$,compositeRule:v,allErrors:p}=g,P=f(m,o,_);h??(v||p)?a($,P):d(g,(0,e._)`[${P}]`)}t.reportError=s;function l(m,o=t.keywordError,_){const{it:h}=m,{gen:g,compositeRule:$,allErrors:v}=h,p=f(m,o,_);a(g,p),$||v||d(h,n.default.vErrors)}t.reportExtraError=l;function i(m,o){m.assign(n.default.errors,o),m.if((0,e._)`${n.default.vErrors} !== null`,()=>m.if(o,()=>m.assign((0,e._)`${n.default.vErrors}.length`,o),()=>m.assign(n.default.vErrors,null)))}t.resetErrorsCount=i;function u({gen:m,keyword:o,schemaValue:_,data:h,errsCount:g,it:$}){if(g===void 0)throw new Error("ajv implementation error");const v=m.name("err");m.forRange("i",g,n.default.errors,p=>{m.const(v,(0,e._)`${n.default.vErrors}[${p}]`),m.if((0,e._)`${v}.instancePath === undefined`,()=>m.assign((0,e._)`${v}.instancePath`,(0,e.strConcat)(n.default.instancePath,$.errorPath))),m.assign((0,e._)`${v}.schemaPath`,(0,e.str)`${$.errSchemaPath}/${o}`),$.opts.verbose&&(m.assign((0,e._)`${v}.schema`,_),m.assign((0,e._)`${v}.data`,h))})}t.extendErrors=u;function a(m,o){const _=m.const("err",o);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 d(m,o){const{gen:_,validateName:h,schemaEnv:g}=m;g.$async?_.throw((0,e._)`new ${m.ValidationError}(${o})`):(_.assign((0,e._)`${h}.errors`,o),_.return(!1))}var c={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 f(m,o,_){const{createErrors:h}=m.it;return h===!1?(0,e._)`{}`:w(m,o,_)}function w(m,o,_={}){const{gen:h,it:g}=m,$=[S(g,_),E(m,_)];return b(m,o,$),h.object(...$)}function S({errorPath:m},{instancePath:o}){const _=o?(0,e.str)`${m}${(0,r.getErrorPath)(o,r.Type.Str)}`:m;return[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,_)]}function E({keyword:m,it:{errSchemaPath:o}},{schemaPath:_,parentSchema:h}){let g=h?o:(0,e.str)`${o}/${m}`;return _&&(g=(0,e.str)`${g}${(0,r.getErrorPath)(_,r.Type.Str)}`),[c.schemaPath,g]}function b(m,{params:o,message:_},h){const{keyword:g,data:$,schemaValue:v,it:p}=m,{opts:P,propertyName:O,topSchemaRef:C,schemaPath:U}=p;h.push([c.keyword,g],[c.params,typeof o=="function"?o(m):o||(0,e._)`{}`]),P.messages&&h.push([c.message,typeof _=="function"?_(m):_]),P.verbose&&h.push([c.schema,v],[c.parentSchema,(0,e._)`${C}${U}`],[n.default.data,$]),O&&h.push([c.propertyName,O])}}),Bc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;var e=sn(),r=Ne(),n=Xt(),s={message:"boolean schema is false"};function l(a){const{gen:d,schema:c,validateName:f}=a;c===!1?u(a,!1):typeof c=="object"&&c.$async===!0?d.return(n.default.data):(d.assign((0,r._)`${f}.errors`,null),d.return(!0))}t.topBoolOrEmptySchema=l;function i(a,d){const{gen:c,schema:f}=a;f===!1?(c.var(d,!1),u(a)):c.var(d,!0)}t.boolOrEmptySchema=i;function u(a,d){const{gen:c,data:f}=a,w={gen:c,keyword:"false schema",data:f,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:a};(0,e.reportError)(w,s,void 0,d)}}),yi=B(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(l){return typeof l=="string"&&r.has(l)}t.isJSONType=n;function s(){const l={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...l,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},l.number,l.string,l.array,l.object],post:{rules:[]},all:{},keywords:{}}}t.getRules=s}),vi=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0;function e({schema:s,self:l},i){const u=l.RULES.types[i];return u&&u!==!0&&r(s,u)}t.schemaHasRulesForType=e;function r(s,l){return l.rules.some(i=>n(s,i))}t.shouldUseGroup=r;function n(s,l){var i;return s[l.keyword]!==void 0||((i=l.definition.implements)===null||i===void 0?void 0:i.some(u=>s[u]!==void 0))}t.shouldUseRule=n}),Jr=B(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=yi(),r=vi(),n=sn(),s=Ne(),l=ze(),i;(function(h){h[h.Correct=0]="Correct",h[h.Wrong=1]="Wrong"})(i=t.DataType||(t.DataType={}));function u(h){const g=a(h.type);if(g.includes("null")){if(h.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!g.length&&h.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');h.nullable===!0&&g.push("null")}return g}t.getSchemaTypes=u;function a(h){const g=Array.isArray(h)?h:h?[h]:[];if(g.every(e.isJSONType))return g;throw new Error("type must be JSONType or JSONType[]: "+g.join(","))}t.getJSONTypes=a;function d(h,g){const{gen:$,data:v,opts:p}=h,P=f(g,p.coerceTypes),O=g.length>0&&!(P.length===0&&g.length===1&&(0,r.schemaHasRulesForType)(h,g[0]));if(O){const C=b(g,v,p.strictNumbers,i.Wrong);$.if(C,()=>{P.length?w(h,g,P):o(h)})}return O}t.coerceAndCheckDataType=d;var c=new Set(["string","number","integer","boolean","null"]);function f(h,g){return g?h.filter($=>c.has($)||g==="array"&&$==="array"):[]}function w(h,g,$){const{gen:v,data:p,opts:P}=h,O=v.let("dataType",(0,s._)`typeof ${p}`),C=v.let("coerced",(0,s._)`undefined`);P.coerceTypes==="array"&&v.if((0,s._)`${O} == 'object' && Array.isArray(${p}) && ${p}.length == 1`,()=>v.assign(p,(0,s._)`${p}[0]`).assign(O,(0,s._)`typeof ${p}`).if(b(g,p,P.strictNumbers),()=>v.assign(C,p))),v.if((0,s._)`${C} !== undefined`);for(const q of $)(c.has(q)||q==="array"&&P.coerceTypes==="array")&&U(q);v.else(),o(h),v.endIf(),v.if((0,s._)`${C} !== undefined`,()=>{v.assign(p,C),S(h,C)});function U(q){switch(q){case"string":v.elseIf((0,s._)`${O} == "number" || ${O} == "boolean"`).assign(C,(0,s._)`"" + ${p}`).elseIf((0,s._)`${p} === null`).assign(C,(0,s._)`""`);return;case"number":v.elseIf((0,s._)`${O} == "boolean" || ${p} === null
|
|
32
|
+
|| (${O} == "string" && ${p} && ${p} == +${p})`).assign(C,(0,s._)`+${p}`);return;case"integer":v.elseIf((0,s._)`${O} === "boolean" || ${p} === null
|
|
33
|
+
|| (${O} === "string" && ${p} && ${p} == +${p} && !(${p} % 1))`).assign(C,(0,s._)`+${p}`);return;case"boolean":v.elseIf((0,s._)`${p} === "false" || ${p} === 0 || ${p} === null`).assign(C,!1).elseIf((0,s._)`${p} === "true" || ${p} === 1`).assign(C,!0);return;case"null":v.elseIf((0,s._)`${p} === "" || ${p} === 0 || ${p} === false`),v.assign(C,null);return;case"array":v.elseIf((0,s._)`${O} === "string" || ${O} === "number"
|
|
34
|
+
|| ${O} === "boolean" || ${p} === null`).assign(C,(0,s._)`[${p}]`)}}}function S({gen:h,parentData:g,parentDataProperty:$},v){h.if((0,s._)`${g} !== undefined`,()=>h.assign((0,s._)`${g}[${$}]`,v))}function E(h,g,$,v=i.Correct){const p=v===i.Correct?s.operators.EQ:s.operators.NEQ;let P;switch(h){case"null":return(0,s._)`${g} ${p} null`;case"array":P=(0,s._)`Array.isArray(${g})`;break;case"object":P=(0,s._)`${g} && typeof ${g} == "object" && !Array.isArray(${g})`;break;case"integer":P=O((0,s._)`!(${g} % 1) && !isNaN(${g})`);break;case"number":P=O();break;default:return(0,s._)`typeof ${g} ${p} ${h}`}return v===i.Correct?P:(0,s.not)(P);function O(C=s.nil){return(0,s.and)((0,s._)`typeof ${g} == "number"`,C,$?(0,s._)`isFinite(${g})`:s.nil)}}t.checkDataType=E;function b(h,g,$,v){if(h.length===1)return E(h[0],g,$,v);let p;const P=(0,l.toHash)(h);if(P.array&&P.object){const O=(0,s._)`typeof ${g} != "object"`;p=P.null?O:(0,s._)`!${g} || ${O}`,delete P.null,delete P.array,delete P.object}else p=s.nil;P.number&&delete P.integer;for(const O in P)p=(0,s.and)(p,E(O,g,$,v));return p}t.checkDataTypes=b;var m={message:({schema:h})=>`must be ${h}`,params:({schema:h,schemaValue:g})=>typeof h=="string"?(0,s._)`{type: ${h}}`:(0,s._)`{type: ${g}}`};function o(h){const g=_(h);(0,n.reportError)(g,m)}t.reportTypeError=o;function _(h){const{gen:g,data:$,schema:v}=h,p=(0,l.schemaRefOrVal)(h,v,"type");return{gen:g,keyword:"type",data:$,schema:v.type,schemaCode:p,schemaValue:p,parentSchema:v,params:{},it:h}}}),Hc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;var e=Ne(),r=ze();function n(l,i){const{properties:u,items:a}=l.schema;if(i==="object"&&u)for(const d in u)s(l,d,u[d].default);else i==="array"&&Array.isArray(a)&&a.forEach((d,c)=>s(l,c,d.default))}t.assignDefaults=n;function s(l,i,u){const{gen:a,compositeRule:d,data:c,opts:f}=l;if(u===void 0)return;const w=(0,e._)`${c}${(0,e.getProperty)(i)}`;if(d){(0,r.checkStrictMode)(l,`default is ignored for: ${w}`);return}let S=(0,e._)`${w} === undefined`;f.useDefaults==="empty"&&(S=(0,e._)`${S} || ${w} === null || ${w} === ""`),a.if(S,(0,e._)`${w} = ${(0,e.stringify)(u)}`)}}),At=B(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=Ne(),r=ze(),n=Xt(),s=ze();function l(h,g){const{gen:$,data:v,it:p}=h;$.if(f($,v,g,p.opts.ownProperties),()=>{h.setParams({missingProperty:(0,e._)`${g}`},!0),h.error()})}t.checkReportMissingProp=l;function i({gen:h,data:g,it:{opts:$}},v,p){return(0,e.or)(...v.map(P=>(0,e.and)(f(h,g,P,$.ownProperties),(0,e._)`${p} = ${P}`)))}t.checkMissingProp=i;function u(h,g){h.setParams({missingProperty:g},!0),h.error()}t.reportMissingProp=u;function a(h){return h.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}t.hasPropFunc=a;function d(h,g,$){return(0,e._)`${a(h)}.call(${g}, ${$})`}t.isOwnProperty=d;function c(h,g,$,v){const p=(0,e._)`${g}${(0,e.getProperty)($)} !== undefined`;return v?(0,e._)`${p} && ${d(h,g,$)}`:p}t.propertyInData=c;function f(h,g,$,v){const p=(0,e._)`${g}${(0,e.getProperty)($)} === undefined`;return v?(0,e.or)(p,(0,e.not)(d(h,g,$))):p}t.noPropertyInData=f;function w(h){return h?Object.keys(h).filter(g=>g!=="__proto__"):[]}t.allSchemaProperties=w;function S(h,g){return w(g).filter($=>!(0,r.alwaysValidSchema)(h,g[$]))}t.schemaProperties=S;function E({schemaCode:h,data:g,it:{gen:$,topSchemaRef:v,schemaPath:p,errorPath:P},it:O},C,U,q){const J=q?(0,e._)`${h}, ${g}, ${v}${p}`:g,G=[[n.default.instancePath,(0,e.strConcat)(n.default.instancePath,P)],[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 ee=(0,e._)`${J}, ${$.object(...G)}`;return U!==e.nil?(0,e._)`${C}.call(${U}, ${ee})`:(0,e._)`${C}(${ee})`}t.callValidateCode=E;var b=(0,e._)`new RegExp`;function m({gen:h,it:{opts:g}},$){const v=g.unicodeRegExp?"u":"",{regExp:p}=g.code,P=p($,v);return h.scopeValue("pattern",{key:P.toString(),ref:P,code:(0,e._)`${p.code==="new RegExp"?b:(0,s.useFunc)(h,p)}(${$}, ${v})`})}t.usePattern=m;function o(h){const{gen:g,data:$,keyword:v,it:p}=h,P=g.name("valid");if(p.allErrors){const C=g.let("valid",!0);return O(()=>g.assign(C,!1)),C}return g.var(P,!0),O(()=>g.break()),P;function O(C){const U=g.const("len",(0,e._)`${$}.length`);g.forRange("i",0,U,q=>{h.subschema({keyword:v,dataProp:q,dataPropType:r.Type.Num},P),g.if((0,e.not)(P),C)})}}t.validateArray=o;function _(h){const{gen:g,schema:$,keyword:v,it:p}=h;if(!Array.isArray($))throw new Error("ajv implementation error");if($.some(U=>(0,r.alwaysValidSchema)(p,U))&&!p.opts.unevaluated)return;const O=g.let("valid",!1),C=g.name("_valid");g.block(()=>$.forEach((U,q)=>{const J=h.subschema({keyword:v,schemaProp:q,compositeRule:!0},C);g.assign(O,(0,e._)`${O} || ${C}`),h.mergeValidEvaluated(J,C)||g.if((0,e.not)(O))})),h.result(O,()=>h.reset(),()=>h.error(!0))}t.validateUnion=_}),Kc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;var e=Ne(),r=Xt(),n=At(),s=sn();function l(S,E){const{gen:b,keyword:m,schema:o,parentSchema:_,it:h}=S,g=E.macro.call(h.self,o,_,h),$=c(b,m,g);h.opts.validateSchema!==!1&&h.self.validateSchema(g,!0);const v=b.name("valid");S.subschema({schema:g,schemaPath:e.nil,errSchemaPath:`${h.errSchemaPath}/${m}`,topSchemaRef:$,compositeRule:!0},v),S.pass(v,()=>S.error(!0))}t.macroKeywordCode=l;function i(S,E){var b;const{gen:m,keyword:o,schema:_,parentSchema:h,$data:g,it:$}=S;d($,E);const v=!g&&E.compile?E.compile.call($.self,_,h,$):E.validate,p=c(m,o,v),P=m.let("valid");S.block$data(P,O),S.ok((b=E.valid)!==null&&b!==void 0?b:P);function O(){if(E.errors===!1)q(),E.modifying&&u(S),J(()=>S.error());else{const G=E.async?C():U();E.modifying&&u(S),J(()=>a(S,G))}}function C(){const G=m.let("ruleErrs",null);return m.try(()=>q((0,e._)`await `),ee=>m.assign(P,!1).if((0,e._)`${ee} instanceof ${$.ValidationError}`,()=>m.assign(G,(0,e._)`${ee}.errors`),()=>m.throw(ee))),G}function U(){const G=(0,e._)`${p}.errors`;return m.assign(G,null),q(e.nil),G}function q(G=E.async?(0,e._)`await `:e.nil){const ee=$.opts.passContext?r.default.this:r.default.self,fe=!("compile"in E&&!g||E.schema===!1);m.assign(P,(0,e._)`${G}${(0,n.callValidateCode)(S,p,ee,fe)}`,E.modifying)}function J(G){var ee;m.if((0,e.not)((ee=E.valid)!==null&&ee!==void 0?ee:P),G)}}t.funcKeywordCode=i;function u(S){const{gen:E,data:b,it:m}=S;E.if(m.parentData,()=>E.assign(b,(0,e._)`${m.parentData}[${m.parentDataProperty}]`))}function a(S,E){const{gen:b}=S;b.if((0,e._)`Array.isArray(${E})`,()=>{b.assign(r.default.vErrors,(0,e._)`${r.default.vErrors} === null ? ${E} : ${r.default.vErrors}.concat(${E})`).assign(r.default.errors,(0,e._)`${r.default.vErrors}.length`),(0,s.extendErrors)(S)},()=>S.error())}function d({schemaEnv:S},E){if(E.async&&!S.$async)throw new Error("async keyword in sync schema")}function c(S,E,b){if(b===void 0)throw new Error(`keyword "${E}" failed to compile`);return S.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,e.stringify)(b)})}function f(S,E,b=!1){return!E.length||E.some(m=>m==="array"?Array.isArray(S):m==="object"?S&&typeof S=="object"&&!Array.isArray(S):typeof S==m||b&&typeof S>"u")}t.validSchemaType=f;function w({schema:S,opts:E,self:b,errSchemaPath:m},o,_){if(Array.isArray(o.keyword)?!o.keyword.includes(_):o.keyword!==_)throw new Error("ajv implementation error");const h=o.dependencies;if(h!=null&&h.some(g=>!Object.prototype.hasOwnProperty.call(S,g)))throw new Error(`parent schema must have dependencies of ${_}: ${h.join(",")}`);if(o.validateSchema&&!o.validateSchema(S[_])){const $=`keyword "${_}" value is invalid at path "${m}": `+b.errorsText(o.validateSchema.errors);if(E.validateSchema==="log")b.logger.error($);else throw new Error($)}}t.validateKeywordUsage=w}),Gc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;var e=Ne(),r=ze();function n(i,{keyword:u,schemaProp:a,schema:d,schemaPath:c,errSchemaPath:f,topSchemaRef:w}){if(u!==void 0&&d!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(u!==void 0){const S=i.schema[u];return a===void 0?{schema:S,schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}`,errSchemaPath:`${i.errSchemaPath}/${u}`}:{schema:S[a],schemaPath:(0,e._)`${i.schemaPath}${(0,e.getProperty)(u)}${(0,e.getProperty)(a)}`,errSchemaPath:`${i.errSchemaPath}/${u}/${(0,r.escapeFragment)(a)}`}}if(d!==void 0){if(c===void 0||f===void 0||w===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:d,schemaPath:c,topSchemaRef:w,errSchemaPath:f}}throw new Error('either "keyword" or "schema" must be passed')}t.getSubschema=n;function s(i,u,{dataProp:a,dataPropType:d,data:c,dataTypes:f,propertyName:w}){if(c!==void 0&&a!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:S}=u;if(a!==void 0){const{errorPath:b,dataPathArr:m,opts:o}=u,_=S.let("data",(0,e._)`${u.data}${(0,e.getProperty)(a)}`,!0);E(_),i.errorPath=(0,e.str)`${b}${(0,r.getErrorPath)(a,d,o.jsPropertySyntax)}`,i.parentDataProperty=(0,e._)`${a}`,i.dataPathArr=[...m,i.parentDataProperty]}if(c!==void 0){const b=c instanceof e.Name?c:S.let("data",c,!0);E(b),w!==void 0&&(i.propertyName=w)}f&&(i.dataTypes=f);function E(b){i.data=b,i.dataLevel=u.dataLevel+1,i.dataTypes=[],u.definedProperties=new Set,i.parentData=u.data,i.dataNames=[...u.dataNames,b]}}t.extendSubschemaData=s;function l(i,{jtdDiscriminator:u,jtdMetadata:a,compositeRule:d,createErrors:c,allErrors:f}){d!==void 0&&(i.compositeRule=d),c!==void 0&&(i.createErrors=c),f!==void 0&&(i.allErrors=f),i.jtdDiscriminator=u,i.jtdMetadata=a}t.extendSubschemaMode=l}),an=B(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=en(),n=di(),s=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function l(m,o=!0){return typeof m=="boolean"?!0:o===!0?!u(m):o?a(m)<=o:!1}t.inlineRef=l;var i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function u(m){for(const o in m){if(i.has(o))return!0;const _=m[o];if(Array.isArray(_)&&_.some(u)||typeof _=="object"&&u(_))return!0}return!1}function a(m){let o=0;for(const _ in m){if(_==="$ref")return 1/0;if(o++,!s.has(_)&&(typeof m[_]=="object"&&(0,e.eachItem)(m[_],h=>o+=a(h)),o===1/0))return 1/0}return o}function d(m,o="",_){_!==!1&&(o=w(o));const h=m.parse(o);return c(m,h)}t.getFullPath=d;function c(m,o){return m.serialize(o).split("#")[0]+"#"}t._getFullPath=c;var f=/#\/?$/;function w(m){return m?m.replace(f,""):""}t.normalizeId=w;function S(m,o,_){return _=w(_),m.resolve(o,_)}t.resolveUrl=S;var E=/^[a-z_][-a-z0-9._]*$/i;function b(m,o){if(typeof m=="boolean")return{};const{schemaId:_,uriResolver:h}=this.opts,g=w(m[_]||o),$={"":g},v=d(h,g,!1),p={},P=new Set;return n(m,{allKeys:!0},(U,q,J,G)=>{if(G===void 0)return;const ee=v+q;let fe=$[G];typeof U[_]=="string"&&(fe=we.call(this,U[_])),Oe.call(this,U.$anchor),Oe.call(this,U.$dynamicAnchor),$[q]=fe;function we(se){const x=this.opts.uriResolver.resolve;if(se=w(fe?x(fe,se):se),P.has(se))throw C(se);P.add(se);let N=this.refs[se];return typeof N=="string"&&(N=this.refs[N]),typeof N=="object"?O(U,N.schema,se):se!==w(ee)&&(se[0]==="#"?(O(U,p[se],se),p[se]=U):this.refs[se]=ee),se}function Oe(se){if(typeof se=="string"){if(!E.test(se))throw new Error(`invalid anchor "${se}"`);we.call(this,`#${se}`)}}}),p;function O(U,q,J){if(q!==void 0&&!r(U,q))throw C(J)}function C(U){return new Error(`reference "${U}" resolves to more than one schema`)}}t.getSchemaRefs=b}),on=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;var e=Bc(),r=Jr(),n=vi(),s=Jr(),l=Hc(),i=Kc(),u=Gc(),a=Ne(),d=Xt(),c=an(),f=ze(),w=sn();function S(T){if(v(T)&&(P(T),$(T))){o(T);return}E(T,()=>(0,e.topBoolOrEmptySchema)(T))}t.validateFunctionCode=S;function E({gen:T,validateName:I,schema:V,schemaEnv:z,opts:Q},te){Q.code.es5?T.func(I,(0,a._)`${d.default.data}, ${d.default.valCxt}`,z.$async,()=>{T.code((0,a._)`"use strict"; ${h(V,Q)}`),m(T,Q),T.code(te)}):T.func(I,(0,a._)`${d.default.data}, ${b(Q)}`,z.$async,()=>T.code(h(V,Q)).code(te))}function b(T){return(0,a._)`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${T.dynamicRef?(0,a._)`, ${d.default.dynamicAnchors}={}`:a.nil}}={}`}function m(T,I){T.if(d.default.valCxt,()=>{T.var(d.default.instancePath,(0,a._)`${d.default.valCxt}.${d.default.instancePath}`),T.var(d.default.parentData,(0,a._)`${d.default.valCxt}.${d.default.parentData}`),T.var(d.default.parentDataProperty,(0,a._)`${d.default.valCxt}.${d.default.parentDataProperty}`),T.var(d.default.rootData,(0,a._)`${d.default.valCxt}.${d.default.rootData}`),I.dynamicRef&&T.var(d.default.dynamicAnchors,(0,a._)`${d.default.valCxt}.${d.default.dynamicAnchors}`)},()=>{T.var(d.default.instancePath,(0,a._)`""`),T.var(d.default.parentData,(0,a._)`undefined`),T.var(d.default.parentDataProperty,(0,a._)`undefined`),T.var(d.default.rootData,d.default.data),I.dynamicRef&&T.var(d.default.dynamicAnchors,(0,a._)`{}`)})}function o(T){const{schema:I,opts:V,gen:z}=T;E(T,()=>{V.$comment&&I.$comment&&G(T),U(T),z.let(d.default.vErrors,null),z.let(d.default.errors,0),V.unevaluated&&_(T),O(T),ee(T)})}function _(T){const{gen:I,validateName:V}=T;T.evaluated=I.const("evaluated",(0,a._)`${V}.evaluated`),I.if((0,a._)`${T.evaluated}.dynamicProps`,()=>I.assign((0,a._)`${T.evaluated}.props`,(0,a._)`undefined`)),I.if((0,a._)`${T.evaluated}.dynamicItems`,()=>I.assign((0,a._)`${T.evaluated}.items`,(0,a._)`undefined`))}function h(T,I){const V=typeof T=="object"&&T[I.schemaId];return V&&(I.code.source||I.code.process)?(0,a._)`/*# sourceURL=${V} */`:a.nil}function g(T,I){if(v(T)&&(P(T),$(T))){p(T,I);return}(0,e.boolOrEmptySchema)(T,I)}function $({schema:T,self:I}){if(typeof T=="boolean")return!T;for(const V in T)if(I.RULES.all[V])return!0;return!1}function v(T){return typeof T.schema!="boolean"}function p(T,I){const{schema:V,gen:z,opts:Q}=T;Q.$comment&&V.$comment&&G(T),q(T),J(T);const te=z.const("_errs",d.default.errors);O(T,te),z.var(I,(0,a._)`${te} === ${d.default.errors}`)}function P(T){(0,f.checkUnknownRules)(T),C(T)}function O(T,I){if(T.opts.jtd)return we(T,[],!1,I);const V=(0,r.getSchemaTypes)(T.schema),z=(0,r.coerceAndCheckDataType)(T,V);we(T,V,!z,I)}function C(T){const{schema:I,errSchemaPath:V,opts:z,self:Q}=T;I.$ref&&z.ignoreKeywordsWithRef&&(0,f.schemaHasRulesButRef)(I,Q.RULES)&&Q.logger.warn(`$ref: keywords ignored in schema at path "${V}"`)}function U(T){const{schema:I,opts:V}=T;I.default!==void 0&&V.useDefaults&&V.strictSchema&&(0,f.checkStrictMode)(T,"default is ignored in the schema root")}function q(T){const I=T.schema[T.opts.schemaId];I&&(T.baseId=(0,c.resolveUrl)(T.opts.uriResolver,T.baseId,I))}function J(T){if(T.schema.$async&&!T.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:T,schemaEnv:I,schema:V,errSchemaPath:z,opts:Q}){const te=V.$comment;if(Q.$comment===!0)T.code((0,a._)`${d.default.self}.logger.log(${te})`);else if(typeof Q.$comment=="function"){const Ee=(0,a.str)`${z}/$comment`,Ve=T.scopeValue("root",{ref:I.root});T.code((0,a._)`${d.default.self}.opts.$comment(${te}, ${Ee}, ${Ve}.schema)`)}}function ee(T){const{gen:I,schemaEnv:V,validateName:z,ValidationError:Q,opts:te}=T;V.$async?I.if((0,a._)`${d.default.errors} === 0`,()=>I.return(d.default.data),()=>I.throw((0,a._)`new ${Q}(${d.default.vErrors})`)):(I.assign((0,a._)`${z}.errors`,d.default.vErrors),te.unevaluated&&fe(T),I.return((0,a._)`${d.default.errors} === 0`))}function fe({gen:T,evaluated:I,props:V,items:z}){V instanceof a.Name&&T.assign((0,a._)`${I}.props`,V),z instanceof a.Name&&T.assign((0,a._)`${I}.items`,z)}function we(T,I,V,z){const{gen:Q,schema:te,data:Ee,allErrors:Ve,opts:Re,self:Ce}=T,{RULES:_e}=Ce;if(te.$ref&&(Re.ignoreKeywordsWithRef||!(0,f.schemaHasRulesButRef)(te,_e))){Q.block(()=>X(T,"$ref",_e.all.$ref.definition));return}Re.jtd||se(T,I),Q.block(()=>{for(const Ie of _e.rules)xe(Ie);xe(_e.post)});function xe(Ie){(0,n.shouldUseGroup)(te,Ie)&&(Ie.type?(Q.if((0,s.checkDataType)(Ie.type,Ee,Re.strictNumbers)),Oe(T,Ie),I.length===1&&I[0]===Ie.type&&V&&(Q.else(),(0,s.reportTypeError)(T)),Q.endIf()):Oe(T,Ie),Ve||Q.if((0,a._)`${d.default.errors} === ${z||0}`))}}function Oe(T,I){const{gen:V,schema:z,opts:{useDefaults:Q}}=T;Q&&(0,l.assignDefaults)(T,I.type),V.block(()=>{for(const te of I.rules)(0,n.shouldUseRule)(z,te)&&X(T,te.keyword,te.definition,I.type)})}function se(T,I){T.schemaEnv.meta||!T.opts.strictTypes||(x(T,I),T.opts.allowUnionTypes||N(T,I),M(T,T.dataTypes))}function x(T,I){if(I.length){if(!T.dataTypes.length){T.dataTypes=I;return}I.forEach(V=>{y(T.dataTypes,V)||j(T,`type "${V}" not allowed by context "${T.dataTypes.join(",")}"`)}),k(T,I)}}function N(T,I){I.length>1&&!(I.length===2&&I.includes("null"))&&j(T,"use allowUnionTypes to allow union type keyword")}function M(T,I){const V=T.self.RULES.all;for(const z in V){const Q=V[z];if(typeof Q=="object"&&(0,n.shouldUseRule)(T.schema,Q)){const{type:te}=Q.definition;te.length&&!te.some(Ee=>R(I,Ee))&&j(T,`missing type "${te.join(",")}" for keyword "${z}"`)}}}function R(T,I){return T.includes(I)||I==="number"&&T.includes("integer")}function y(T,I){return T.includes(I)||I==="integer"&&T.includes("number")}function k(T,I){const V=[];for(const z of T.dataTypes)y(I,z)?V.push(z):I.includes("integer")&&z==="number"&&V.push("integer");T.dataTypes=V}function j(T,I){const V=T.schemaEnv.baseId+T.errSchemaPath;I+=` at "${V}" (strictTypes)`,(0,f.checkStrictMode)(T,I,T.opts.strictTypes)}class W{constructor(I,V,z){if((0,i.validateKeywordUsage)(I,V,z),this.gen=I.gen,this.allErrors=I.allErrors,this.keyword=z,this.data=I.data,this.schema=I.schema[z],this.$data=V.$data&&I.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,f.schemaRefOrVal)(I,this.schema,z,this.$data),this.schemaType=V.schemaType,this.parentSchema=I.schema,this.params={},this.it=I,this.def=V,this.$data)this.schemaCode=I.gen.const("vSchema",ye(this.$data,I));else if(this.schemaCode=this.schemaValue,!(0,i.validSchemaType)(this.schema,V.schemaType,V.allowUndefined))throw new Error(`${z} value must be ${JSON.stringify(V.schemaType)}`);("code"in V?V.trackErrors:V.errors!==!1)&&(this.errsCount=I.gen.const("_errs",d.default.errors))}result(I,V,z){this.failResult((0,a.not)(I),V,z)}failResult(I,V,z){this.gen.if(I),z?z():this.error(),V?(this.gen.else(),V(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(I,V){this.failResult((0,a.not)(I),void 0,V)}fail(I){if(I===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(I),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(I){if(!this.$data)return this.fail(I);const{schemaCode:V}=this;this.fail((0,a._)`${V} !== undefined && (${(0,a.or)(this.invalid$data(),I)})`)}error(I,V,z){if(V){this.setParams(V),this._error(I,z),this.setParams({});return}this._error(I,z)}_error(I,V){(I?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(I){this.allErrors||this.gen.if(I)}setParams(I,V){V?Object.assign(this.params,I):this.params=I}block$data(I,V,z=a.nil){this.gen.block(()=>{this.check$data(I,z),V()})}check$data(I=a.nil,V=a.nil){if(!this.$data)return;const{gen:z,schemaCode:Q,schemaType:te,def:Ee}=this;z.if((0,a.or)((0,a._)`${Q} === undefined`,V)),I!==a.nil&&z.assign(I,!0),(te.length||Ee.validateSchema)&&(z.elseIf(this.invalid$data()),this.$dataError(),I!==a.nil&&z.assign(I,!1)),z.else()}invalid$data(){const{gen:I,schemaCode:V,schemaType:z,def:Q,it:te}=this;return(0,a.or)(Ee(),Ve());function Ee(){if(z.length){if(!(V instanceof a.Name))throw new Error("ajv implementation error");const Re=Array.isArray(z)?z:[z];return(0,a._)`${(0,s.checkDataTypes)(Re,V,te.opts.strictNumbers,s.DataType.Wrong)}`}return a.nil}function Ve(){if(Q.validateSchema){const Re=I.scopeValue("validate$data",{ref:Q.validateSchema});return(0,a._)`!${Re}(${V})`}return a.nil}}subschema(I,V){const z=(0,u.getSubschema)(this.it,I);(0,u.extendSubschemaData)(z,this.it,I),(0,u.extendSubschemaMode)(z,I);const Q={...this.it,...z,items:void 0,props:void 0};return g(Q,V),Q}mergeEvaluated(I,V){const{it:z,gen:Q}=this;z.opts.unevaluated&&(z.props!==!0&&I.props!==void 0&&(z.props=f.mergeEvaluated.props(Q,I.props,z.props,V)),z.items!==!0&&I.items!==void 0&&(z.items=f.mergeEvaluated.items(Q,I.items,z.items,V)))}mergeValidEvaluated(I,V){const{it:z,gen:Q}=this;if(z.opts.unevaluated&&(z.props!==!0||z.items!==!0))return Q.if(V,()=>this.mergeEvaluated(I,a.Name)),!0}}t.KeywordCxt=W;function X(T,I,V,z){const Q=new W(T,V,I);"code"in V?V.code(Q,z):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 ie=/^\/(?:[^~]|~0|~1)*$/,re=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ye(T,{dataLevel:I,dataNames:V,dataPathArr:z}){let Q,te;if(T==="")return d.default.rootData;if(T[0]==="/"){if(!ie.test(T))throw new Error(`Invalid JSON-pointer: ${T}`);Q=T,te=d.default.rootData}else{const Ce=re.exec(T);if(!Ce)throw new Error(`Invalid JSON-pointer: ${T}`);const _e=+Ce[1];if(Q=Ce[2],Q==="#"){if(_e>=I)throw new Error(Re("property/index",_e));return z[I-_e]}if(_e>I)throw new Error(Re("data",_e));if(te=V[I-_e],!Q)return te}let Ee=te;const Ve=Q.split("/");for(const Ce of Ve)Ce&&(te=(0,a._)`${te}${(0,a.getProperty)((0,f.unescapeJsonPointer)(Ce))}`,Ee=(0,a._)`${Ee} && ${te}`);return Ee;function Re(Ce,_e){return`Cannot access ${Ce} ${_e} levels up, current level is ${I}`}}t.getData=ye}),Yn=B(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}),Zn=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=an();class r extends Error{constructor(s,l,i,u){super(u||`can't resolve reference ${i} from id ${l}`),this.missingRef=(0,e.resolveUrl)(s,l,i),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(s,this.missingRef))}}t.default=r}),es=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;var e=Ne(),r=Yn(),n=Xt(),s=an(),l=ze(),i=on();class u{constructor(_){var h;this.refs={},this.dynamicAnchors={};let g;typeof _.schema=="object"&&(g=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(h=_.baseId)!==null&&h!==void 0?h:(0,s.normalizeId)(g==null?void 0:g[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=g==null?void 0:g.$async,this.refs={}}}t.SchemaEnv=u;function a(o){const _=f.call(this,o);if(_)return _;const h=(0,s.getFullPath)(this.opts.uriResolver,o.root.baseId),{es5:g,lines:$}=this.opts.code,{ownProperties:v}=this.opts,p=new e.CodeGen(this.scope,{es5:g,lines:$,ownProperties:v});let P;o.$async&&(P=p.scopeValue("Error",{ref:r.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const O=p.scopeName("validate");o.validateName=O;const C={gen:p,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:p.scopeValue("schema",this.opts.code.source===!0?{ref:o.schema,code:(0,e.stringify)(o.schema)}:{ref:o.schema}),validateName:O,ValidationError:P,schema:o.schema,schemaEnv:o,rootId:h,baseId:o.baseId||h,schemaPath:e.nil,errSchemaPath:o.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let U;try{this._compilations.add(o),(0,i.validateFunctionCode)(C),p.optimize(this.opts.code.optimize);const q=p.toString();U=`${p.scopeRefs(n.default.scope)}return ${q}`,this.opts.code.process&&(U=this.opts.code.process(U,o));const G=new Function(`${n.default.self}`,`${n.default.scope}`,U)(this,this.scope.get());if(this.scope.value(O,{ref:G}),G.errors=null,G.schema=o.schema,G.schemaEnv=o,o.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:O,validateCode:q,scopeValues:p._values}),this.opts.unevaluated){const{props:ee,items:fe}=C;G.evaluated={props:ee instanceof e.Name?void 0:ee,items:fe instanceof e.Name?void 0:fe,dynamicProps:ee instanceof e.Name,dynamicItems:fe instanceof e.Name},G.source&&(G.source.evaluated=(0,e.stringify)(G.evaluated))}return o.validate=G,o}catch(q){throw delete o.validate,delete o.validateName,U&&this.logger.error("Error compiling schema, function code:",U),q}finally{this._compilations.delete(o)}}t.compileSchema=a;function d(o,_,h){var g;h=(0,s.resolveUrl)(this.opts.uriResolver,_,h);const $=o.refs[h];if($)return $;let v=S.call(this,o,h);if(v===void 0){const p=(g=o.localRefs)===null||g===void 0?void 0:g[h],{schemaId:P}=this.opts;p&&(v=new u({schema:p,schemaId:P,root:o,baseId:_}))}if(v!==void 0)return o.refs[h]=c.call(this,v)}t.resolveRef=d;function c(o){return(0,s.inlineRef)(o.schema,this.opts.inlineRefs)?o.schema:o.validate?o:a.call(this,o)}function f(o){for(const _ of this._compilations)if(w(_,o))return _}t.getCompilingSchema=f;function w(o,_){return o.schema===_.schema&&o.root===_.root&&o.baseId===_.baseId}function S(o,_){let h;for(;typeof(h=this.refs[_])=="string";)_=h;return h||this.schemas[_]||E.call(this,o,_)}function E(o,_){const h=this.opts.uriResolver.parse(_),g=(0,s._getFullPath)(this.opts.uriResolver,h);let $=(0,s.getFullPath)(this.opts.uriResolver,o.baseId,void 0);if(Object.keys(o.schema).length>0&&g===$)return m.call(this,h,o);const v=(0,s.normalizeId)(g),p=this.refs[v]||this.schemas[v];if(typeof p=="string"){const P=E.call(this,o,p);return typeof(P==null?void 0:P.schema)!="object"?void 0:m.call(this,h,P)}if(typeof(p==null?void 0:p.schema)=="object"){if(p.validate||a.call(this,p),v===(0,s.normalizeId)(_)){const{schema:P}=p,{schemaId:O}=this.opts,C=P[O];return C&&($=(0,s.resolveUrl)(this.opts.uriResolver,$,C)),new u({schema:P,schemaId:O,root:o,baseId:$})}return m.call(this,h,p)}}t.resolveSchema=E;var b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(o,{baseId:_,schema:h,root:g}){var $;if((($=o.fragment)===null||$===void 0?void 0:$[0])!=="/")return;for(const P of o.fragment.slice(1).split("/")){if(typeof h=="boolean")return;const O=h[(0,l.unescapeFragment)(P)];if(O===void 0)return;h=O;const C=typeof h=="object"&&h[this.opts.schemaId];!b.has(P)&&C&&(_=(0,s.resolveUrl)(this.opts.uriResolver,_,C))}let v;if(typeof h!="boolean"&&h.$ref&&!(0,l.schemaHasRulesButRef)(h,this.RULES)){const P=(0,s.resolveUrl)(this.opts.uriResolver,_,h.$ref);v=E.call(this,g,P)}const{schemaId:p}=this.opts;if(v=v||new u({schema:h,schemaId:p,root:g,baseId:_}),v.schema!==v.root.schema)return v}}),Wc=B((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}}),ts=B((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 D=arguments.length,A=Array(D),F=0;F<D;F++)A[F]=arguments[F];if(A.length>1){A[0]=A[0].slice(0,-1);for(var H=A.length-1,K=1;K<H;++K)A[K]=A[K].slice(1,-1);return A[H]=A[H].slice(1),A.join("")}else return A[0]}function s(D){return"(?:"+D+")"}function l(D){return D===void 0?"undefined":D===null?"null":Object.prototype.toString.call(D).split(" ").pop().split("]").shift().toLowerCase()}function i(D){return D.toUpperCase()}function u(D){return D!=null?D instanceof Array?D:typeof D.length!="number"||D.split||D.setInterval||D.call?[D]:Array.prototype.slice.call(D):[]}function a(D,A){var F=D;if(A)for(var H in A)F[H]=A[H];return F}function d(D){var A="[A-Za-z]",F="[0-9]",H=n(F,"[A-Fa-f]"),K=s(s("%[EFef]"+H+"%"+H+H+"%"+H+H)+"|"+s("%[89A-Fa-f]"+H+"%"+H+H)+"|"+s("%"+H+H)),de="[\\:\\/\\?\\#\\[\\]\\@]",ge="[\\!\\$\\&\\'\\(\\)\\*\\+\\,\\;\\=]",je=n(de,ge),Ke=D?"[\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]":"[]",Ze=D?"[\\uE000-\\uF8FF]":"[]",ke=n(A,F,"[\\-\\.\\_\\~]",Ke);s(A+n(A,F,"[\\+\\-\\.]")+"*"),s(s(K+"|"+n(ke,ge,"[\\:]"))+"*");var He=s(s("25[0-5]")+"|"+s("2[0-4]"+F)+"|"+s("1"+F+F)+"|"+s("0?[1-9]"+F)+"|0?0?"+F),tt=s(He+"\\."+He+"\\."+He+"\\."+He),$e=s(H+"{1,4}"),Le=s(s($e+"\\:"+$e)+"|"+tt),rt=s(s($e+"\\:")+"{6}"+Le),Ge=s("\\:\\:"+s($e+"\\:")+"{5}"+Le),Ct=s(s($e)+"?\\:\\:"+s($e+"\\:")+"{4}"+Le),Et=s(s(s($e+"\\:")+"{0,1}"+$e)+"?\\:\\:"+s($e+"\\:")+"{3}"+Le),St=s(s(s($e+"\\:")+"{0,2}"+$e)+"?\\:\\:"+s($e+"\\:")+"{2}"+Le),Ot=s(s(s($e+"\\:")+"{0,3}"+$e)+"?\\:\\:"+$e+"\\:"+Le),Lt=s(s(s($e+"\\:")+"{0,4}"+$e)+"?\\:\\:"+Le),Z=s(s(s($e+"\\:")+"{0,5}"+$e)+"?\\:\\:"+$e),le=s(s(s($e+"\\:")+"{0,6}"+$e)+"?\\:\\:"),Se=s([rt,Ge,Ct,Et,St,Ot,Lt,Z,le].join("|")),Me=s(s(ke+"|"+K)+"+");s("[vV]"+H+"+\\."+n(ke,ge,"[\\:]")+"+"),s(s(K+"|"+n(ke,ge))+"*");var Qe=s(K+"|"+n(ke,ge,"[\\:\\@]"));return s(s(K+"|"+n(ke,ge,"[\\@]"))+"+"),s(s(Qe+"|"+n("[\\/\\?]",Ze))+"*"),{NOT_SCHEME:new RegExp(n("[^]",A,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,"[\\:\\@\\/\\?]",Ze),"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,je),"g"),PCT_ENCODED:new RegExp(K,"g"),IPV4ADDRESS:new RegExp("^("+tt+")$"),IPV6ADDRESS:new RegExp("^\\[?("+Se+")"+s(s("\\%25|\\%(?!"+H+"{2})")+"("+Me+")")+"?\\]?$")}}var c=d(!1),f=d(!0),w=function(){function D(A,F){var H=[],K=!0,de=!1,ge=void 0;try{for(var je=A[Symbol.iterator](),Ke;!(K=(Ke=je.next()).done)&&(H.push(Ke.value),!(F&&H.length===F));K=!0);}catch(Ze){de=!0,ge=Ze}finally{try{!K&&je.return&&je.return()}finally{if(de)throw ge}}return H}return function(A,F){if(Array.isArray(A))return A;if(Symbol.iterator in Object(A))return D(A,F);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),S=function(D){if(Array.isArray(D)){for(var A=0,F=Array(D.length);A<D.length;A++)F[A]=D[A];return F}else return Array.from(D)},E=2147483647,b=36,m=1,o=26,_=38,h=700,g=72,$=128,v="-",p=/^xn--/,P=/[^\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"},U=b-m,q=Math.floor,J=String.fromCharCode;function G(D){throw new RangeError(C[D])}function ee(D,A){for(var F=[],H=D.length;H--;)F[H]=A(D[H]);return F}function fe(D,A){var F=D.split("@"),H="";F.length>1&&(H=F[0]+"@",D=F[1]),D=D.replace(O,".");var K=D.split("."),de=ee(K,A).join(".");return H+de}function we(D){for(var A=[],F=0,H=D.length;F<H;){var K=D.charCodeAt(F++);if(K>=55296&&K<=56319&&F<H){var de=D.charCodeAt(F++);(de&64512)==56320?A.push(((K&1023)<<10)+(de&1023)+65536):(A.push(K),F--)}else A.push(K)}return A}var Oe=function(A){return String.fromCodePoint.apply(String,S(A))},se=function(A){return A-48<10?A-22:A-65<26?A-65:A-97<26?A-97:b},x=function(A,F){return A+22+75*(A<26)-((F!=0)<<5)},N=function(A,F,H){var K=0;for(A=H?q(A/h):A>>1,A+=q(A/F);A>U*o>>1;K+=b)A=q(A/U);return q(K+(U+1)*A/(A+_))},M=function(A){var F=[],H=A.length,K=0,de=$,ge=g,je=A.lastIndexOf(v);je<0&&(je=0);for(var Ke=0;Ke<je;++Ke)A.charCodeAt(Ke)>=128&&G("not-basic"),F.push(A.charCodeAt(Ke));for(var Ze=je>0?je+1:0;Ze<H;){for(var ke=K,He=1,tt=b;;tt+=b){Ze>=H&&G("invalid-input");var $e=se(A.charCodeAt(Ze++));($e>=b||$e>q((E-K)/He))&&G("overflow"),K+=$e*He;var Le=tt<=ge?m:tt>=ge+o?o:tt-ge;if($e<Le)break;var rt=b-Le;He>q(E/rt)&&G("overflow"),He*=rt}var Ge=F.length+1;ge=N(K-ke,Ge,ke==0),q(K/Ge)>E-de&&G("overflow"),de+=q(K/Ge),K%=Ge,F.splice(K++,0,de)}return String.fromCodePoint.apply(String,F)},R=function(A){var F=[];A=we(A);var H=A.length,K=$,de=0,ge=g,je=!0,Ke=!1,Ze=void 0;try{for(var ke=A[Symbol.iterator](),He;!(je=(He=ke.next()).done);je=!0){var tt=He.value;tt<128&&F.push(J(tt))}}catch(Gt){Ke=!0,Ze=Gt}finally{try{!je&&ke.return&&ke.return()}finally{if(Ke)throw Ze}}var $e=F.length,Le=$e;for($e&&F.push(v);Le<H;){var rt=E,Ge=!0,Ct=!1,Et=void 0;try{for(var St=A[Symbol.iterator](),Ot;!(Ge=(Ot=St.next()).done);Ge=!0){var Lt=Ot.value;Lt>=K&&Lt<rt&&(rt=Lt)}}catch(Gt){Ct=!0,Et=Gt}finally{try{!Ge&&St.return&&St.return()}finally{if(Ct)throw Et}}var Z=Le+1;rt-K>q((E-de)/Z)&&G("overflow"),de+=(rt-K)*Z,K=rt;var le=!0,Se=!1,Me=void 0;try{for(var Qe=A[Symbol.iterator](),vt;!(le=(vt=Qe.next()).done);le=!0){var Tt=vt.value;if(Tt<K&&++de>E&&G("overflow"),Tt==K){for(var Ut=de,lt=b;;lt+=b){var mt=lt<=ge?m:lt>=ge+o?o:lt-ge;if(Ut<mt)break;var dr=Ut-mt,hr=b-mt;F.push(J(x(mt+dr%hr,0))),Ut=q(dr/hr)}F.push(J(x(Ut,0))),ge=N(de,Z,Le==$e),de=0,++Le}}}catch(Gt){Se=!0,Me=Gt}finally{try{!le&&Qe.return&&Qe.return()}finally{if(Se)throw Me}}++de,++K}return F.join("")},y=function(A){return fe(A,function(F){return p.test(F)?M(F.slice(4).toLowerCase()):F})},k=function(A){return fe(A,function(F){return P.test(F)?"xn--"+R(F):F})},j={version:"2.1.0",ucs2:{decode:we,encode:Oe},decode:M,encode:R,toASCII:k,toUnicode:y},W={};function X(D){var A=D.charCodeAt(0),F=void 0;return A<16?F="%0"+A.toString(16).toUpperCase():A<128?F="%"+A.toString(16).toUpperCase():A<2048?F="%"+(A>>6|192).toString(16).toUpperCase()+"%"+(A&63|128).toString(16).toUpperCase():F="%"+(A>>12|224).toString(16).toUpperCase()+"%"+(A>>6&63|128).toString(16).toUpperCase()+"%"+(A&63|128).toString(16).toUpperCase(),F}function ie(D){for(var A="",F=0,H=D.length;F<H;){var K=parseInt(D.substr(F+1,2),16);if(K<128)A+=String.fromCharCode(K),F+=3;else if(K>=194&&K<224){if(H-F>=6){var de=parseInt(D.substr(F+4,2),16);A+=String.fromCharCode((K&31)<<6|de&63)}else A+=D.substr(F,6);F+=6}else if(K>=224){if(H-F>=9){var ge=parseInt(D.substr(F+4,2),16),je=parseInt(D.substr(F+7,2),16);A+=String.fromCharCode((K&15)<<12|(ge&63)<<6|je&63)}else A+=D.substr(F,9);F+=9}else A+=D.substr(F,3),F+=3}return A}function re(D,A){function F(H){var K=ie(H);return K.match(A.UNRESERVED)?K:H}return D.scheme&&(D.scheme=String(D.scheme).replace(A.PCT_ENCODED,F).toLowerCase().replace(A.NOT_SCHEME,"")),D.userinfo!==void 0&&(D.userinfo=String(D.userinfo).replace(A.PCT_ENCODED,F).replace(A.NOT_USERINFO,X).replace(A.PCT_ENCODED,i)),D.host!==void 0&&(D.host=String(D.host).replace(A.PCT_ENCODED,F).toLowerCase().replace(A.NOT_HOST,X).replace(A.PCT_ENCODED,i)),D.path!==void 0&&(D.path=String(D.path).replace(A.PCT_ENCODED,F).replace(D.scheme?A.NOT_PATH:A.NOT_PATH_NOSCHEME,X).replace(A.PCT_ENCODED,i)),D.query!==void 0&&(D.query=String(D.query).replace(A.PCT_ENCODED,F).replace(A.NOT_QUERY,X).replace(A.PCT_ENCODED,i)),D.fragment!==void 0&&(D.fragment=String(D.fragment).replace(A.PCT_ENCODED,F).replace(A.NOT_FRAGMENT,X).replace(A.PCT_ENCODED,i)),D}function ye(D){return D.replace(/^0*(.*)/,"$1")||"0"}function T(D,A){var F=D.match(A.IPV4ADDRESS)||[],H=w(F,2),K=H[1];return K?K.split(".").map(ye).join("."):D}function I(D,A){var F=D.match(A.IPV6ADDRESS)||[],H=w(F,3),K=H[1],de=H[2];if(K){for(var ge=K.toLowerCase().split("::").reverse(),je=w(ge,2),Ke=je[0],Ze=je[1],ke=Ze?Ze.split(":").map(ye):[],He=Ke.split(":").map(ye),tt=A.IPV4ADDRESS.test(He[He.length-1]),$e=tt?7:8,Le=He.length-$e,rt=Array($e),Ge=0;Ge<$e;++Ge)rt[Ge]=ke[Ge]||He[Le+Ge]||"";tt&&(rt[$e-1]=T(rt[$e-1],A));var Ct=rt.reduce(function(Z,le,Se){if(!le||le==="0"){var Me=Z[Z.length-1];Me&&Me.index+Me.length===Se?Me.length++:Z.push({index:Se,length:1})}return Z},[]),Et=Ct.sort(function(Z,le){return le.length-Z.length})[0],St=void 0;if(Et&&Et.length>1){var Ot=rt.slice(0,Et.index),Lt=rt.slice(Et.index+Et.length);St=Ot.join(":")+"::"+Lt.join(":")}else St=rt.join(":");return de&&(St+="%"+de),St}else return D}var V=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,z="".match(/(){0}/)[1]===void 0;function Q(D){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F={},H=A.iri!==!1?f:c;A.reference==="suffix"&&(D=(A.scheme?A.scheme+":":"")+"//"+D);var K=D.match(V);if(K){z?(F.scheme=K[1],F.userinfo=K[3],F.host=K[4],F.port=parseInt(K[5],10),F.path=K[6]||"",F.query=K[7],F.fragment=K[8],isNaN(F.port)&&(F.port=K[5])):(F.scheme=K[1]||void 0,F.userinfo=D.indexOf("@")!==-1?K[3]:void 0,F.host=D.indexOf("//")!==-1?K[4]:void 0,F.port=parseInt(K[5],10),F.path=K[6]||"",F.query=D.indexOf("?")!==-1?K[7]:void 0,F.fragment=D.indexOf("#")!==-1?K[8]:void 0,isNaN(F.port)&&(F.port=D.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?K[4]:void 0)),F.host&&(F.host=I(T(F.host,H),H)),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",A.reference&&A.reference!=="suffix"&&A.reference!==F.reference&&(F.error=F.error||"URI is not a "+A.reference+" reference.");var de=W[(A.scheme||F.scheme||"").toLowerCase()];if(!A.unicodeSupport&&(!de||!de.unicodeSupport)){if(F.host&&(A.domainHost||de&&de.domainHost))try{F.host=j.toASCII(F.host.replace(H.PCT_ENCODED,ie).toLowerCase())}catch(ge){F.error=F.error||"Host's domain name can not be converted to ASCII via punycode: "+ge}re(F,c)}else re(F,H);de&&de.parse&&de.parse(F,A)}else F.error=F.error||"URI can not be parsed.";return F}function te(D,A){var F=A.iri!==!1?f:c,H=[];return D.userinfo!==void 0&&(H.push(D.userinfo),H.push("@")),D.host!==void 0&&H.push(I(T(String(D.host),F),F).replace(F.IPV6ADDRESS,function(K,de,ge){return"["+de+(ge?"%25"+ge:"")+"]"})),(typeof D.port=="number"||typeof D.port=="string")&&(H.push(":"),H.push(String(D.port))),H.length?H.join(""):void 0}var Ee=/^\.\.?\//,Ve=/^\/\.(\/|$)/,Re=/^\/\.\.(\/|$)/,Ce=/^\/?(?:.|\n)*?(?=\/|$)/;function _e(D){for(var A=[];D.length;)if(D.match(Ee))D=D.replace(Ee,"");else if(D.match(Ve))D=D.replace(Ve,"/");else if(D.match(Re))D=D.replace(Re,"/"),A.pop();else if(D==="."||D==="..")D="";else{var F=D.match(Ce);if(F){var H=F[0];D=D.slice(H.length),A.push(H)}else throw new Error("Unexpected dot segment condition")}return A.join("")}function xe(D){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},F=A.iri?f:c,H=[],K=W[(A.scheme||D.scheme||"").toLowerCase()];if(K&&K.serialize&&K.serialize(D,A),D.host&&!F.IPV6ADDRESS.test(D.host)){if(A.domainHost||K&&K.domainHost)try{D.host=A.iri?j.toUnicode(D.host):j.toASCII(D.host.replace(F.PCT_ENCODED,ie).toLowerCase())}catch(je){D.error=D.error||"Host's domain name can not be converted to "+(A.iri?"Unicode":"ASCII")+" via punycode: "+je}}re(D,F),A.reference!=="suffix"&&D.scheme&&(H.push(D.scheme),H.push(":"));var de=te(D,A);if(de!==void 0&&(A.reference!=="suffix"&&H.push("//"),H.push(de),D.path&&D.path.charAt(0)!=="/"&&H.push("/")),D.path!==void 0){var ge=D.path;!A.absolutePath&&(!K||!K.absolutePath)&&(ge=_e(ge)),de===void 0&&(ge=ge.replace(/^\/\//,"/%2F")),H.push(ge)}return D.query!==void 0&&(H.push("?"),H.push(D.query)),D.fragment!==void 0&&(H.push("#"),H.push(D.fragment)),H.join("")}function Ie(D,A){var F=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},H=arguments[3],K={};return H||(D=Q(xe(D,F),F),A=Q(xe(A,F),F)),F=F||{},!F.tolerant&&A.scheme?(K.scheme=A.scheme,K.userinfo=A.userinfo,K.host=A.host,K.port=A.port,K.path=_e(A.path||""),K.query=A.query):(A.userinfo!==void 0||A.host!==void 0||A.port!==void 0?(K.userinfo=A.userinfo,K.host=A.host,K.port=A.port,K.path=_e(A.path||""),K.query=A.query):(A.path?(A.path.charAt(0)==="/"?K.path=_e(A.path):((D.userinfo!==void 0||D.host!==void 0||D.port!==void 0)&&!D.path?K.path="/"+A.path:D.path?K.path=D.path.slice(0,D.path.lastIndexOf("/")+1)+A.path:K.path=A.path,K.path=_e(K.path)),K.query=A.query):(K.path=D.path,A.query!==void 0?K.query=A.query:K.query=D.query),K.userinfo=D.userinfo,K.host=D.host,K.port=D.port),K.scheme=D.scheme),K.fragment=A.fragment,K}function yt(D,A,F){var H=a({scheme:"null"},F);return xe(Ie(Q(D,H),Q(A,H),H,!0),H)}function Xe(D,A){return typeof D=="string"?D=xe(Q(D,A),A):l(D)==="object"&&(D=Q(xe(D,A),A)),D}function ht(D,A,F){return typeof D=="string"?D=xe(Q(D,F),F):l(D)==="object"&&(D=xe(D,F)),typeof A=="string"?A=xe(Q(A,F),F):l(A)==="object"&&(A=xe(A,F)),D===A}function bt(D,A){return D&&D.toString().replace(!A||!A.iri?c.ESCAPE:f.ESCAPE,X)}function ot(D,A){return D&&D.toString().replace(!A||!A.iri?c.PCT_ENCODED:f.PCT_ENCODED,ie)}var wt={scheme:"http",domainHost:!0,parse:function(A,F){return A.host||(A.error=A.error||"HTTP URIs must have a host."),A},serialize:function(A,F){var H=String(A.scheme).toLowerCase()==="https";return(A.port===(H?443:80)||A.port==="")&&(A.port=void 0),A.path||(A.path="/"),A}},Er={scheme:"https",domainHost:wt.domainHost,parse:wt.parse,serialize:wt.serialize};function Sr(D){return typeof D.secure=="boolean"?D.secure:String(D.scheme).toLowerCase()==="wss"}var Yt={scheme:"ws",domainHost:!0,parse:function(A,F){var H=A;return H.secure=Sr(H),H.resourceName=(H.path||"/")+(H.query?"?"+H.query:""),H.path=void 0,H.query=void 0,H},serialize:function(A,F){if((A.port===(Sr(A)?443:80)||A.port==="")&&(A.port=void 0),typeof A.secure=="boolean"&&(A.scheme=A.secure?"wss":"ws",A.secure=void 0),A.resourceName){var H=A.resourceName.split("?"),K=w(H,2),de=K[0],ge=K[1];A.path=de&&de!=="/"?de:void 0,A.query=ge,A.resourceName=void 0}return A.fragment=void 0,A}},ur={scheme:"wss",domainHost:Yt.domainHost,parse:Yt.parse,serialize:Yt.serialize},fn={},Pr="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",$t="[0-9A-Fa-f]",fr=s(s("%[EFef]"+$t+"%"+$t+$t+"%"+$t+$t)+"|"+s("%[89A-Fa-f]"+$t+"%"+$t+$t)+"|"+s("%"+$t+$t)),kr="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",Or="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",dn=n(Or,'[\\"\\\\]'),Tr="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Kt=new RegExp(Pr,"g"),L=new RegExp(fr,"g"),Y=new RegExp(n("[^]",kr,"[\\.]",'[\\"]',dn),"g"),ne=new RegExp(n("[^]",Pr,Tr),"g"),be=ne;function Je(D){var A=ie(D);return A.match(Kt)?A:D}var Ye={scheme:"mailto",parse:function(A,F){var H=A,K=H.to=H.path?H.path.split(","):[];if(H.path=void 0,H.query){for(var de=!1,ge={},je=H.query.split("&"),Ke=0,Ze=je.length;Ke<Ze;++Ke){var ke=je[Ke].split("=");switch(ke[0]){case"to":for(var He=ke[1].split(","),tt=0,$e=He.length;tt<$e;++tt)K.push(He[tt]);break;case"subject":H.subject=ot(ke[1],F);break;case"body":H.body=ot(ke[1],F);break;default:de=!0,ge[ot(ke[0],F)]=ot(ke[1],F);break}}de&&(H.headers=ge)}H.query=void 0;for(var Le=0,rt=K.length;Le<rt;++Le){var Ge=K[Le].split("@");if(Ge[0]=ot(Ge[0]),F.unicodeSupport)Ge[1]=ot(Ge[1],F).toLowerCase();else try{Ge[1]=j.toASCII(ot(Ge[1],F).toLowerCase())}catch(Ct){H.error=H.error||"Email address's domain name can not be converted to ASCII via punycode: "+Ct}K[Le]=Ge.join("@")}return H},serialize:function(A,F){var H=A,K=u(A.to);if(K){for(var de=0,ge=K.length;de<ge;++de){var je=String(K[de]),Ke=je.lastIndexOf("@"),Ze=je.slice(0,Ke).replace(L,Je).replace(L,i).replace(Y,X),ke=je.slice(Ke+1);try{ke=F.iri?j.toUnicode(ke):j.toASCII(ot(ke,F).toLowerCase())}catch(Le){H.error=H.error||"Email address's domain name can not be converted to "+(F.iri?"Unicode":"ASCII")+" via punycode: "+Le}K[de]=Ze+"@"+ke}H.path=K.join(",")}var He=A.headers=A.headers||{};A.subject&&(He.subject=A.subject),A.body&&(He.body=A.body);var tt=[];for(var $e in He)He[$e]!==fn[$e]&&tt.push($e.replace(L,Je).replace(L,i).replace(ne,X)+"="+He[$e].replace(L,Je).replace(L,i).replace(be,X));return tt.length&&(H.query=tt.join("&")),H}},ue=/^([^\:]+)\:(.*)/,ce={scheme:"urn",parse:function(A,F){var H=A.path&&A.path.match(ue),K=A;if(H){var de=F.scheme||K.scheme||"urn",ge=H[1].toLowerCase(),je=H[2],Ke=de+":"+(F.nid||ge),Ze=W[Ke];K.nid=ge,K.nss=je,K.path=void 0,Ze&&(K=Ze.parse(K,F))}else K.error=K.error||"URN can not be parsed.";return K},serialize:function(A,F){var H=F.scheme||A.scheme||"urn",K=A.nid,de=H+":"+(F.nid||K),ge=W[de];ge&&(A=ge.serialize(A,F));var je=A,Ke=A.nss;return je.path=(K||F.nid)+":"+Ke,je}},ve=/^[0-9A-Fa-f]{8}(?:\-[0-9A-Fa-f]{4}){3}\-[0-9A-Fa-f]{12}$/,it={scheme:"urn:uuid",parse:function(A,F){var H=A;return H.uuid=H.nss,H.nss=void 0,!F.tolerant&&(!H.uuid||!H.uuid.match(ve))&&(H.error=H.error||"UUID is not valid."),H},serialize:function(A,F){var H=A;return H.nss=(A.uuid||"").toLowerCase(),H}};W[wt.scheme]=wt,W[Er.scheme]=Er,W[Yt.scheme]=Yt,W[ur.scheme]=ur,W[Ye.scheme]=Ye,W[ce.scheme]=ce,W[it.scheme]=it,r.SCHEMES=W,r.pctEncChar=X,r.pctDecChars=ie,r.parse=Q,r.removeDotSegments=_e,r.serialize=xe,r.resolveComponents=Ie,r.resolve=yt,r.normalize=Xe,r.equal=ht,r.escapeComponent=bt,r.unescapeComponent=ot,Object.defineProperty(r,"__esModule",{value:!0})})}),Jc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ts();e.code='require("ajv/dist/runtime/uri").default',t.default=e}),Qc=B(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=Ne();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=Yn(),s=Zn(),l=yi(),i=es(),u=Ne(),a=an(),d=Jr(),c=ze(),f=Wc(),w=Jc(),S=(x,N)=>new RegExp(x,N);S.code="new RegExp";var E=["removeAdditional","useDefaults","coerceTypes"],b=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."},o={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},_=200;function h(x){var N,M,R,y,k,j,W,X,ie,re,ye,T,I,V,z,Q,te,Ee,Ve,Re,Ce,_e,xe,Ie,yt;const Xe=x.strict,ht=(N=x.code)===null||N===void 0?void 0:N.optimize,bt=ht===!0||ht===void 0?1:ht||0,ot=(R=(M=x.code)===null||M===void 0?void 0:M.regExp)!==null&&R!==void 0?R:S,wt=(y=x.uriResolver)!==null&&y!==void 0?y:w.default;return{strictSchema:(j=(k=x.strictSchema)!==null&&k!==void 0?k:Xe)!==null&&j!==void 0?j:!0,strictNumbers:(X=(W=x.strictNumbers)!==null&&W!==void 0?W:Xe)!==null&&X!==void 0?X:!0,strictTypes:(re=(ie=x.strictTypes)!==null&&ie!==void 0?ie:Xe)!==null&&re!==void 0?re:"log",strictTuples:(T=(ye=x.strictTuples)!==null&&ye!==void 0?ye:Xe)!==null&&T!==void 0?T:"log",strictRequired:(V=(I=x.strictRequired)!==null&&I!==void 0?I:Xe)!==null&&V!==void 0?V:!1,code:x.code?{...x.code,optimize:bt,regExp:ot}:{optimize:bt,regExp:ot},loopRequired:(z=x.loopRequired)!==null&&z!==void 0?z:_,loopEnum:(Q=x.loopEnum)!==null&&Q!==void 0?Q:_,meta:(te=x.meta)!==null&&te!==void 0?te:!0,messages:(Ee=x.messages)!==null&&Ee!==void 0?Ee:!0,inlineRefs:(Ve=x.inlineRefs)!==null&&Ve!==void 0?Ve:!0,schemaId:(Re=x.schemaId)!==null&&Re!==void 0?Re:"$id",addUsedSchema:(Ce=x.addUsedSchema)!==null&&Ce!==void 0?Ce:!0,validateSchema:(_e=x.validateSchema)!==null&&_e!==void 0?_e:!0,validateFormats:(xe=x.validateFormats)!==null&&xe!==void 0?xe:!0,unicodeRegExp:(Ie=x.unicodeRegExp)!==null&&Ie!==void 0?Ie:!0,int32range:(yt=x.int32range)!==null&&yt!==void 0?yt:!0,uriResolver:wt}}class g{constructor(N={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,N=this.opts={...N,...h(N)};const{es5:M,lines:R}=this.opts.code;this.scope=new u.ValueScope({scope:{},prefixes:b,es5:M,lines:R}),this.logger=q(N.logger);const y=N.validateFormats;N.validateFormats=!1,this.RULES=(0,l.getRules)(),$.call(this,m,N,"NOT SUPPORTED"),$.call(this,o,N,"DEPRECATED","warn"),this._metaOpts=C.call(this),N.formats&&P.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),N.keywords&&O.call(this,N.keywords),typeof N.meta=="object"&&this.addMetaSchema(N.meta),p.call(this),N.validateFormats=y}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:N,meta:M,schemaId:R}=this.opts;let y=f;R==="id"&&(y={...f},y.id=y.$id,delete y.$id),M&&N&&this.addMetaSchema(y,y[R],!1)}defaultMeta(){const{meta:N,schemaId:M}=this.opts;return this.opts.defaultMeta=typeof N=="object"?N[M]||N:void 0}validate(N,M){let R;if(typeof N=="string"){if(R=this.getSchema(N),!R)throw new Error(`no schema with key or ref "${N}"`)}else R=this.compile(N);const y=R(M);return"$async"in R||(this.errors=R.errors),y}compile(N,M){const R=this._addSchema(N,M);return R.validate||this._compileSchemaEnv(R)}compileAsync(N,M){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:R}=this.opts;return y.call(this,N,M);async function y(re,ye){await k.call(this,re.$schema);const T=this._addSchema(re,ye);return T.validate||j.call(this,T)}async function k(re){re&&!this.getSchema(re)&&await y.call(this,{$ref:re},!0)}async function j(re){try{return this._compileSchemaEnv(re)}catch(ye){if(!(ye instanceof s.default))throw ye;return W.call(this,ye),await X.call(this,ye.missingSchema),j.call(this,re)}}function W({missingSchema:re,missingRef:ye}){if(this.refs[re])throw new Error(`AnySchema ${re} is loaded but ${ye} cannot be resolved`)}async function X(re){const ye=await ie.call(this,re);this.refs[re]||await k.call(this,ye.$schema),this.refs[re]||this.addSchema(ye,re,M)}async function ie(re){const ye=this._loading[re];if(ye)return ye;try{return await(this._loading[re]=R(re))}finally{delete this._loading[re]}}}addSchema(N,M,R,y=this.opts.validateSchema){if(Array.isArray(N)){for(const j of N)this.addSchema(j,void 0,R,y);return this}let k;if(typeof N=="object"){const{schemaId:j}=this.opts;if(k=N[j],k!==void 0&&typeof k!="string")throw new Error(`schema ${j} must be string`)}return M=(0,a.normalizeId)(M||k),this._checkUnique(M),this.schemas[M]=this._addSchema(N,R,M,y,!0),this}addMetaSchema(N,M,R=this.opts.validateSchema){return this.addSchema(N,M,!0,R),this}validateSchema(N,M){if(typeof N=="boolean")return!0;let R;if(R=N.$schema,R!==void 0&&typeof R!="string")throw new Error("$schema must be a string");if(R=R||this.opts.defaultMeta||this.defaultMeta(),!R)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const y=this.validate(R,N);if(!y&&M){const k="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(k);else throw new Error(k)}return y}getSchema(N){let M;for(;typeof(M=v.call(this,N))=="string";)N=M;if(M===void 0){const{schemaId:R}=this.opts,y=new i.SchemaEnv({schema:{},schemaId:R});if(M=i.resolveSchema.call(this,y,N),!M)return;this.refs[N]=M}return M.validate||this._compileSchemaEnv(M)}removeSchema(N){if(N instanceof RegExp)return this._removeAllSchemas(this.schemas,N),this._removeAllSchemas(this.refs,N),this;switch(typeof N){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const M=v.call(this,N);return typeof M=="object"&&this._cache.delete(M.schema),delete this.schemas[N],delete this.refs[N],this}case"object":{const M=N;this._cache.delete(M);let R=N[this.opts.schemaId];return R&&(R=(0,a.normalizeId)(R),delete this.schemas[R],delete this.refs[R]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(N){for(const M of N)this.addKeyword(M);return this}addKeyword(N,M){let R;if(typeof N=="string")R=N,typeof M=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),M.keyword=R);else if(typeof N=="object"&&M===void 0){if(M=N,R=M.keyword,Array.isArray(R)&&!R.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(G.call(this,R,M),!M)return(0,c.eachItem)(R,k=>ee.call(this,k)),this;we.call(this,M);const y={...M,type:(0,d.getJSONTypes)(M.type),schemaType:(0,d.getJSONTypes)(M.schemaType)};return(0,c.eachItem)(R,y.type.length===0?k=>ee.call(this,k,y):k=>y.type.forEach(j=>ee.call(this,k,y,j))),this}getKeyword(N){const M=this.RULES.all[N];return typeof M=="object"?M.definition:!!M}removeKeyword(N){const{RULES:M}=this;delete M.keywords[N],delete M.all[N];for(const R of M.rules){const y=R.rules.findIndex(k=>k.keyword===N);y>=0&&R.rules.splice(y,1)}return this}addFormat(N,M){return typeof M=="string"&&(M=new RegExp(M)),this.formats[N]=M,this}errorsText(N=this.errors,{separator:M=", ",dataVar:R="data"}={}){return!N||N.length===0?"No errors":N.map(y=>`${R}${y.instancePath} ${y.message}`).reduce((y,k)=>y+M+k)}$dataMetaSchema(N,M){const R=this.RULES.all;N=JSON.parse(JSON.stringify(N));for(const y of M){const k=y.split("/").slice(1);let j=N;for(const W of k)j=j[W];for(const W in R){const X=R[W];if(typeof X!="object")continue;const{$data:ie}=X.definition,re=j[W];ie&&re&&(j[W]=se(re))}}return N}_removeAllSchemas(N,M){for(const R in N){const y=N[R];(!M||M.test(R))&&(typeof y=="string"?delete N[R]:y&&!y.meta&&(this._cache.delete(y.schema),delete N[R]))}}_addSchema(N,M,R,y=this.opts.validateSchema,k=this.opts.addUsedSchema){let j;const{schemaId:W}=this.opts;if(typeof N=="object")j=N[W];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof N!="boolean")throw new Error("schema must be object or boolean")}let X=this._cache.get(N);if(X!==void 0)return X;R=(0,a.normalizeId)(j||R);const ie=a.getSchemaRefs.call(this,N,R);return X=new i.SchemaEnv({schema:N,schemaId:W,meta:M,baseId:R,localRefs:ie}),this._cache.set(X.schema,X),k&&!R.startsWith("#")&&(R&&this._checkUnique(R),this.refs[R]=X),y&&this.validateSchema(N,!0),X}_checkUnique(N){if(this.schemas[N]||this.refs[N])throw new Error(`schema with key or id "${N}" already exists`)}_compileSchemaEnv(N){if(N.meta?this._compileMetaSchema(N):i.compileSchema.call(this,N),!N.validate)throw new Error("ajv implementation error");return N.validate}_compileMetaSchema(N){const M=this.opts;this.opts=this._metaOpts;try{i.compileSchema.call(this,N)}finally{this.opts=M}}}t.default=g,g.ValidationError=n.default,g.MissingRefError=s.default;function $(x,N,M,R="error"){for(const y in x){const k=y;k in N&&this.logger[R](`${M}: option ${y}. ${x[k]}`)}}function v(x){return x=(0,a.normalizeId)(x),this.schemas[x]||this.refs[x]}function p(){const x=this.opts.schemas;if(x)if(Array.isArray(x))this.addSchema(x);else for(const N in x)this.addSchema(x[N],N)}function P(){for(const x in this.opts.formats){const N=this.opts.formats[x];N&&this.addFormat(x,N)}}function O(x){if(Array.isArray(x)){this.addVocabulary(x);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const N in x){const M=x[N];M.keyword||(M.keyword=N),this.addKeyword(M)}}function C(){const x={...this.opts};for(const N of E)delete x[N];return x}var U={log(){},warn(){},error(){}};function q(x){if(x===!1)return U;if(x===void 0)return console;if(x.log&&x.warn&&x.error)return x;throw new Error("logger must implement log, warn and error methods")}var J=/^[a-z_$][a-z0-9_$:-]*$/i;function G(x,N){const{RULES:M}=this;if((0,c.eachItem)(x,R=>{if(M.keywords[R])throw new Error(`Keyword ${R} is already defined`);if(!J.test(R))throw new Error(`Keyword ${R} has invalid name`)}),!!N&&N.$data&&!("code"in N||"validate"in N))throw new Error('$data keyword must have "code" or "validate" function')}function ee(x,N,M){var R;const y=N==null?void 0:N.post;if(M&&y)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:k}=this;let j=y?k.post:k.rules.find(({type:X})=>X===M);if(j||(j={type:M,rules:[]},k.rules.push(j)),k.keywords[x]=!0,!N)return;const W={keyword:x,definition:{...N,type:(0,d.getJSONTypes)(N.type),schemaType:(0,d.getJSONTypes)(N.schemaType)}};N.before?fe.call(this,j,W,N.before):j.rules.push(W),k.all[x]=W,(R=N.implements)===null||R===void 0||R.forEach(X=>this.addKeyword(X))}function fe(x,N,M){const R=x.rules.findIndex(y=>y.keyword===M);R>=0?x.rules.splice(R,0,N):(x.rules.push(N),this.logger.warn(`rule ${M} is not defined`))}function we(x){let{metaSchema:N}=x;N!==void 0&&(x.$data&&this.opts.$data&&(N=se(N)),x.validateSchema=this.compile(N,!0))}var Oe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function se(x){return{anyOf:[x,Oe]}}}),Xc=B(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}),Yc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;var e=Zn(),r=At(),n=Ne(),s=Xt(),l=es(),i=ze(),u={keyword:"$ref",schemaType:"string",code(c){const{gen:f,schema:w,it:S}=c,{baseId:E,schemaEnv:b,validateName:m,opts:o,self:_}=S,{root:h}=b;if((w==="#"||w==="#/")&&E===h.baseId)return $();const g=l.resolveRef.call(_,h,E,w);if(g===void 0)throw new e.default(S.opts.uriResolver,E,w);if(g instanceof l.SchemaEnv)return v(g);return p(g);function $(){if(b===h)return d(c,m,b,b.$async);const P=f.scopeValue("root",{ref:h});return d(c,(0,n._)`${P}.validate`,h,h.$async)}function v(P){const O=a(c,P);d(c,O,P,P.$async)}function p(P){const O=f.scopeValue("schema",o.code.source===!0?{ref:P,code:(0,n.stringify)(P)}:{ref:P}),C=f.name("valid"),U=c.subschema({schema:P,dataTypes:[],schemaPath:n.nil,topSchemaRef:O,errSchemaPath:w},C);c.mergeEvaluated(U),c.ok(C)}}};function a(c,f){const{gen:w}=c;return f.validate?w.scopeValue("validate",{ref:f.validate}):(0,n._)`${w.scopeValue("wrapper",{ref:f})}.validate`}t.getValidate=a;function d(c,f,w,S){const{gen:E,it:b}=c,{allErrors:m,schemaEnv:o,opts:_}=b,h=_.passContext?s.default.this:n.nil;S?g():$();function g(){if(!o.$async)throw new Error("async schema referenced by sync schema");const P=E.let("valid");E.try(()=>{E.code((0,n._)`await ${(0,r.callValidateCode)(c,f,h)}`),p(f),m||E.assign(P,!0)},O=>{E.if((0,n._)`!(${O} instanceof ${b.ValidationError})`,()=>E.throw(O)),v(O),m||E.assign(P,!1)}),c.ok(P)}function $(){c.result((0,r.callValidateCode)(c,f,h),()=>p(f),()=>v(f))}function v(P){const O=(0,n._)`${P}.errors`;E.assign(s.default.vErrors,(0,n._)`${s.default.vErrors} === null ? ${O} : ${s.default.vErrors}.concat(${O})`),E.assign(s.default.errors,(0,n._)`${s.default.vErrors}.length`)}function p(P){var O;if(!b.opts.unevaluated)return;const C=(O=w==null?void 0:w.validate)===null||O===void 0?void 0:O.evaluated;if(b.props!==!0)if(C&&!C.dynamicProps)C.props!==void 0&&(b.props=i.mergeEvaluated.props(E,C.props,b.props));else{const U=E.var("props",(0,n._)`${P}.evaluated.props`);b.props=i.mergeEvaluated.props(E,U,b.props,n.Name)}if(b.items!==!0)if(C&&!C.dynamicItems)C.items!==void 0&&(b.items=i.mergeEvaluated.items(E,C.items,b.items));else{const U=E.var("items",(0,n._)`${P}.evaluated.items`);b.items=i.mergeEvaluated.items(E,U,b.items,n.Name)}}}t.callRef=d,t.default=u}),Zc=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Xc(),r=Yc(),n=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,r.default];t.default=n}),el=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),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}}`},l={keyword:Object.keys(n),type:"number",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:d}=i;i.fail$data((0,e._)`${a} ${n[u].fail} ${d} || isNaN(${a})`)}};t.default=l}),tl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),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:l,data:i,schemaCode:u,it:a}=s,d=a.opts.multipleOfPrecision,c=l.let("res"),f=d?(0,e._)`Math.abs(Math.round(${c}) - ${c}) > 1e-${d}`:(0,e._)`${c} !== parseInt(${c})`;s.fail$data((0,e._)`(${u} === 0 || (${c} = ${i}/${u}, ${f}))`)}};t.default=n}),rl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(r){const n=r.length;let s=0,l=0,i;for(;l<n;)s++,i=r.charCodeAt(l++),i>=55296&&i<=56319&&l<n&&(i=r.charCodeAt(l),(i&64512)===56320&&l++);return s}t.default=e,e.code='require("ajv/dist/runtime/ucs2length").default'}),nl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=rl(),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}}`},l={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:s,code(i){const{keyword:u,data:a,schemaCode:d,it:c}=i,f=u==="maxLength"?e.operators.GT:e.operators.LT,w=c.opts.unicode===!1?(0,e._)`${a}.length`:(0,e._)`${(0,r.useFunc)(i.gen,n.default)}(${a})`;i.fail$data((0,e._)`${w} ${f} ${d}`)}};t.default=l}),sl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ne(),n={message:({schemaCode:l})=>(0,r.str)`must match pattern "${l}"`,params:({schemaCode:l})=>(0,r._)`{pattern: ${l}}`},s={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:n,code(l){const{data:i,$data:u,schema:a,schemaCode:d,it:c}=l,f=c.opts.unicodeRegExp?"u":"",w=u?(0,r._)`(new RegExp(${d}, ${f}))`:(0,e.usePattern)(l,a);l.fail$data((0,r._)`!${w}.test(${i})`)}};t.default=s}),il=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r={message({keyword:s,schemaCode:l}){const i=s==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} properties`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:u}=s,a=l==="maxProperties"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`Object.keys(${i}).length ${a} ${u}`)}};t.default=n}),al=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ne(),n=ze(),s={message:({params:{missingProperty:i}})=>(0,r.str)`must have required property '${i}'`,params:({params:{missingProperty:i}})=>(0,r._)`{missingProperty: ${i}}`},l={keyword:"required",type:"object",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,schema:a,schemaCode:d,data:c,$data:f,it:w}=i,{opts:S}=w;if(!f&&a.length===0)return;const E=a.length>=S.loopRequired;if(w.allErrors?b():m(),S.strictRequired){const h=i.parentSchema.properties,{definedProperties:g}=i.it;for(const $ of a)if((h==null?void 0:h[$])===void 0&&!g.has($)){const v=w.schemaEnv.baseId+w.errSchemaPath,p=`required property "${$}" is not defined at "${v}" (strictRequired)`;(0,n.checkStrictMode)(w,p,w.opts.strictRequired)}}function b(){if(E||f)i.block$data(r.nil,o);else for(const h of a)(0,e.checkReportMissingProp)(i,h)}function m(){const h=u.let("missing");if(E||f){const g=u.let("valid",!0);i.block$data(g,()=>_(h,g)),i.ok(g)}else u.if((0,e.checkMissingProp)(i,a,h)),(0,e.reportMissingProp)(i,h),u.else()}function o(){u.forOf("prop",d,h=>{i.setParams({missingProperty:h}),u.if((0,e.noPropertyInData)(u,c,h,S.ownProperties),()=>i.error())})}function _(h,g){i.setParams({missingProperty:h}),u.forOf(h,d,()=>{u.assign(g,(0,e.propertyInData)(u,c,h,S.ownProperties)),u.if((0,r.not)(g),()=>{i.error(),u.break()})},r.nil)}}};t.default=l}),ol=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r={message({keyword:s,schemaCode:l}){const i=s==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${i} than ${l} items`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},n={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:r,code(s){const{keyword:l,data:i,schemaCode:u}=s,a=l==="maxItems"?e.operators.GT:e.operators.LT;s.fail$data((0,e._)`${i}.length ${a} ${u}`)}};t.default=n}),rs=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=en();e.code='require("ajv/dist/runtime/equal").default',t.default=e}),cl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Jr(),r=Ne(),n=ze(),s=rs(),l={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:l,code(u){const{gen:a,data:d,$data:c,schema:f,parentSchema:w,schemaCode:S,it:E}=u;if(!c&&!f)return;const b=a.let("valid"),m=w.items?(0,e.getSchemaTypes)(w.items):[];u.block$data(b,o,(0,r._)`${S} === false`),u.ok(b);function o(){const $=a.let("i",(0,r._)`${d}.length`),v=a.let("j");u.setParams({i:$,j:v}),a.assign(b,!0),a.if((0,r._)`${$} > 1`,()=>(_()?h:g)($,v))}function _(){return m.length>0&&!m.some($=>$==="object"||$==="array")}function h($,v){const p=a.name("item"),P=(0,e.checkDataTypes)(m,p,E.opts.strictNumbers,e.DataType.Wrong),O=a.const("indices",(0,r._)`{}`);a.for((0,r._)`;${$}--;`,()=>{a.let(p,(0,r._)`${d}[${$}]`),a.if(P,(0,r._)`continue`),m.length>1&&a.if((0,r._)`typeof ${p} == "string"`,(0,r._)`${p} += "_"`),a.if((0,r._)`typeof ${O}[${p}] == "number"`,()=>{a.assign(v,(0,r._)`${O}[${p}]`),u.error(),a.assign(b,!1).break()}).code((0,r._)`${O}[${p}] = ${$}`)})}function g($,v){const p=(0,n.useFunc)(a,s.default),P=a.name("outer");a.label(P).for((0,r._)`;${$}--;`,()=>a.for((0,r._)`${v} = ${$}; ${v}--;`,()=>a.if((0,r._)`${p}(${d}[${$}], ${d}[${v}])`,()=>{u.error(),a.assign(b,!1).break(P)})))}}};t.default=i}),ll=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=rs(),s={message:"must be equal to constant",params:({schemaCode:i})=>(0,e._)`{allowedValue: ${i}}`},l={keyword:"const",$data:!0,error:s,code(i){const{gen:u,data:a,$data:d,schemaCode:c,schema:f}=i;d||f&&typeof f=="object"?i.fail$data((0,e._)`!${(0,r.useFunc)(u,n.default)}(${a}, ${c})`):i.fail((0,e._)`${f} !== ${a}`)}};t.default=l}),ul=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=rs(),s={message:"must be equal to one of the allowed values",params:({schemaCode:i})=>(0,e._)`{allowedValues: ${i}}`},l={keyword:"enum",schemaType:"array",$data:!0,error:s,code(i){const{gen:u,data:a,$data:d,schema:c,schemaCode:f,it:w}=i;if(!d&&c.length===0)throw new Error("enum must have non-empty array");const S=c.length>=w.opts.loopEnum;let E;const b=()=>E??(E=(0,r.useFunc)(u,n.default));let m;if(S||d)m=u.let("valid"),i.block$data(m,o);else{if(!Array.isArray(c))throw new Error("ajv implementation error");const h=u.const("vSchema",f);m=(0,e.or)(...c.map((g,$)=>_(h,$)))}i.pass(m);function o(){u.assign(m,!1),u.forOf("v",f,h=>u.if((0,e._)`${b()}(${a}, ${h})`,()=>u.assign(m,!0).break()))}function _(h,g){const $=c[g];return typeof $=="object"&&$!==null?(0,e._)`${b()}(${a}, ${h}[${g}])`:(0,e._)`${a} === ${$}`}}};t.default=l}),fl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=el(),r=tl(),n=nl(),s=sl(),l=il(),i=al(),u=ol(),a=cl(),d=ll(),c=ul(),f=[e.default,r.default,n.default,s.default,l.default,i.default,u.default,a.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,c.default];t.default=f}),_i=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;var e=Ne(),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:d}=u;if(!Array.isArray(d)){(0,r.checkStrictMode)(a,'"additionalItems" is ignored when "items" is not an array of schemas');return}l(i,d)}};function l(i,u){const{gen:a,schema:d,data:c,keyword:f,it:w}=i;w.items=!0;const S=a.const("len",(0,e._)`${c}.length`);if(d===!1)i.setParams({len:u.length}),i.pass((0,e._)`${S} <= ${u.length}`);else if(typeof d=="object"&&!(0,r.alwaysValidSchema)(w,d)){const b=a.var("valid",(0,e._)`${S} <= ${u.length}`);a.if((0,e.not)(b),()=>E(b)),i.ok(b)}function E(b){a.forRange("i",u.length,S,m=>{i.subschema({keyword:f,dataProp:m,dataPropType:r.Type.Num},b),w.allErrors||a.if((0,e.not)(b),()=>a.break())})}}t.validateAdditionalItems=l,t.default=s}),wi=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;var e=Ne(),r=ze(),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 l(i,"additionalItems",u);a.items=!0,!(0,r.alwaysValidSchema)(a,u)&&i.ok((0,n.validateArray)(i))}};function l(i,u,a=i.schema){const{gen:d,parentSchema:c,data:f,keyword:w,it:S}=i;m(c),S.opts.unevaluated&&a.length&&S.items!==!0&&(S.items=r.mergeEvaluated.items(d,a.length,S.items));const E=d.name("valid"),b=d.const("len",(0,e._)`${f}.length`);a.forEach((o,_)=>{(0,r.alwaysValidSchema)(S,o)||(d.if((0,e._)`${b} > ${_}`,()=>i.subschema({keyword:w,schemaProp:_,dataProp:_},E)),i.ok(E))});function m(o){const{opts:_,errSchemaPath:h}=S,g=a.length,$=g===o.minItems&&(g===o.maxItems||o[u]===!1);if(_.strictTuples&&!$){const v=`"${w}" is ${g}-tuple, but minItems or maxItems/${u} are not specified or different at path "${h}"`;(0,r.checkStrictMode)(S,v,_.strictTuples)}}}t.validateTuple=l,t.default=s}),dl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=wi(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:n=>(0,e.validateTuple)(n,"items")};t.default=r}),hl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n=At(),s=_i(),l={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:l,code(u){const{schema:a,parentSchema:d,it:c}=u,{prefixItems:f}=d;c.items=!0,!(0,r.alwaysValidSchema)(c,a)&&(f?(0,s.validateAdditionalItems)(u,f):u.ok((0,n.validateArray)(u)))}};t.default=i}),pl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n={message:({params:{min:l,max:i}})=>i===void 0?(0,e.str)`must contain at least ${l} valid item(s)`:(0,e.str)`must contain at least ${l} and no more than ${i} valid item(s)`,params:({params:{min:l,max:i}})=>i===void 0?(0,e._)`{minContains: ${l}}`:(0,e._)`{minContains: ${l}, maxContains: ${i}}`},s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:n,code(l){const{gen:i,schema:u,parentSchema:a,data:d,it:c}=l;let f,w;const{minContains:S,maxContains:E}=a;c.opts.next?(f=S===void 0?1:S,w=E):f=1;const b=i.const("len",(0,e._)`${d}.length`);if(l.setParams({min:f,max:w}),w===void 0&&f===0){(0,r.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(w!==void 0&&f>w){(0,r.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),l.fail();return}if((0,r.alwaysValidSchema)(c,u)){let g=(0,e._)`${b} >= ${f}`;w!==void 0&&(g=(0,e._)`${g} && ${b} <= ${w}`),l.pass(g);return}c.items=!0;const m=i.name("valid");w===void 0&&f===1?_(m,()=>i.if(m,()=>i.break())):f===0?(i.let(m,!0),w!==void 0&&i.if((0,e._)`${d}.length > 0`,o)):(i.let(m,!1),o()),l.result(m,()=>l.reset());function o(){const g=i.name("_valid"),$=i.let("count",0);_(g,()=>i.if(g,()=>h($)))}function _(g,$){i.forRange("i",0,b,v=>{l.subschema({keyword:"contains",dataProp:v,dataPropType:r.Type.Num,compositeRule:!0},g),$()})}function h(g){i.code((0,e._)`${g}++`),w===void 0?i.if((0,e._)`${g} >= ${f}`,()=>i.assign(m,!0).break()):(i.if((0,e._)`${g} > ${w}`,()=>i.assign(m,!1).break()),f===1?i.assign(m,!0):i.if((0,e._)`${g} >= ${f}`,()=>i.assign(m,!0)))}}};t.default=s}),ml=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;var e=Ne(),r=ze(),n=At();t.error={message:({params:{property:a,depsCount:d,deps:c}})=>{const f=d===1?"property":"properties";return(0,e.str)`must have ${f} ${c} when property ${a} is present`},params:({params:{property:a,depsCount:d,deps:c,missingProperty:f}})=>(0,e._)`{property: ${a},
|
|
35
|
+
missingProperty: ${f},
|
|
36
|
+
depsCount: ${d},
|
|
37
|
+
deps: ${c}}`};var s={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(a){const[d,c]=l(a);i(a,d),u(a,c)}};function l({schema:a}){const d={},c={};for(const f in a){if(f==="__proto__")continue;const w=Array.isArray(a[f])?d:c;w[f]=a[f]}return[d,c]}function i(a,d=a.schema){const{gen:c,data:f,it:w}=a;if(Object.keys(d).length===0)return;const S=c.let("missing");for(const E in d){const b=d[E];if(b.length===0)continue;const m=(0,n.propertyInData)(c,f,E,w.opts.ownProperties);a.setParams({property:E,depsCount:b.length,deps:b.join(", ")}),w.allErrors?c.if(m,()=>{for(const o of b)(0,n.checkReportMissingProp)(a,o)}):(c.if((0,e._)`${m} && (${(0,n.checkMissingProp)(a,b,S)})`),(0,n.reportMissingProp)(a,S),c.else())}}t.validatePropertyDeps=i;function u(a,d=a.schema){const{gen:c,data:f,keyword:w,it:S}=a,E=c.name("valid");for(const b in d)(0,r.alwaysValidSchema)(S,d[b])||(c.if((0,n.propertyInData)(c,f,b,S.opts.ownProperties),()=>{const m=a.subschema({keyword:w,schemaProp:b},E);a.mergeValidEvaluated(m,E)},()=>c.var(E,!0)),a.ok(E))}t.validateSchemaDeps=u,t.default=s}),gl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n={message:"property name must be valid",params:({params:l})=>(0,e._)`{propertyName: ${l.propertyName}}`},s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:n,code(l){const{gen:i,schema:u,data:a,it:d}=l;if((0,r.alwaysValidSchema)(d,u))return;const c=i.name("valid");i.forIn("key",a,f=>{l.setParams({propertyName:f}),l.subschema({keyword:"propertyNames",data:f,dataTypes:["string"],propertyName:f,compositeRule:!0},c),i.if((0,e.not)(c),()=>{l.error(!0),d.allErrors||i.break()})}),l.ok(c)}};t.default=s}),bi=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ne(),n=Xt(),s=ze(),l={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:l,code(u){const{gen:a,schema:d,parentSchema:c,data:f,errsCount:w,it:S}=u;if(!w)throw new Error("ajv implementation error");const{allErrors:E,opts:b}=S;if(S.props=!0,b.removeAdditional!=="all"&&(0,s.alwaysValidSchema)(S,d))return;const m=(0,e.allSchemaProperties)(c.properties),o=(0,e.allSchemaProperties)(c.patternProperties);_(),u.ok((0,r._)`${w} === ${n.default.errors}`);function _(){a.forIn("key",f,p=>{!m.length&&!o.length?$(p):a.if(h(p),()=>$(p))})}function h(p){let P;if(m.length>8){const O=(0,s.schemaRefOrVal)(S,c.properties,"properties");P=(0,e.isOwnProperty)(a,O,p)}else m.length?P=(0,r.or)(...m.map(O=>(0,r._)`${p} === ${O}`)):P=r.nil;return o.length&&(P=(0,r.or)(P,...o.map(O=>(0,r._)`${(0,e.usePattern)(u,O)}.test(${p})`))),(0,r.not)(P)}function g(p){a.code((0,r._)`delete ${f}[${p}]`)}function $(p){if(b.removeAdditional==="all"||b.removeAdditional&&d===!1){g(p);return}if(d===!1){u.setParams({additionalProperty:p}),u.error(),E||a.break();return}if(typeof d=="object"&&!(0,s.alwaysValidSchema)(S,d)){const P=a.name("valid");b.removeAdditional==="failing"?(v(p,P,!1),a.if((0,r.not)(P),()=>{u.reset(),g(p)})):(v(p,P),E||a.if((0,r.not)(P),()=>a.break()))}}function v(p,P,O){const C={keyword:"additionalProperties",dataProp:p,dataPropType:s.Type.Str};O===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),u.subschema(C,P)}}};t.default=i}),yl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=on(),r=At(),n=ze(),s=bi(),l={keyword:"properties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,parentSchema:d,data:c,it:f}=i;f.opts.removeAdditional==="all"&&d.additionalProperties===void 0&&s.default.code(new e.KeywordCxt(f,s.default,"additionalProperties"));const w=(0,r.allSchemaProperties)(a);for(const o of w)f.definedProperties.add(o);f.opts.unevaluated&&w.length&&f.props!==!0&&(f.props=n.mergeEvaluated.props(u,(0,n.toHash)(w),f.props));const S=w.filter(o=>!(0,n.alwaysValidSchema)(f,a[o]));if(S.length===0)return;const E=u.name("valid");for(const o of S)b(o)?m(o):(u.if((0,r.propertyInData)(u,c,o,f.opts.ownProperties)),m(o),f.allErrors||u.else().var(E,!0),u.endIf()),i.it.definedProperties.add(o),i.ok(E);function b(o){return f.opts.useDefaults&&!f.compositeRule&&a[o].default!==void 0}function m(o){i.subschema({keyword:"properties",schemaProp:o,dataProp:o},E)}}};t.default=l}),vl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=At(),r=Ne(),n=ze(),s=ze(),l={keyword:"patternProperties",type:"object",schemaType:"object",code(i){const{gen:u,schema:a,data:d,parentSchema:c,it:f}=i,{opts:w}=f,S=(0,e.allSchemaProperties)(a),E=S.filter($=>(0,n.alwaysValidSchema)(f,a[$]));if(S.length===0||E.length===S.length&&(!f.opts.unevaluated||f.props===!0))return;const b=w.strictSchema&&!w.allowMatchingProperties&&c.properties,m=u.name("valid");f.props!==!0&&!(f.props instanceof r.Name)&&(f.props=(0,s.evaluatedPropsToName)(u,f.props));const{props:o}=f;_();function _(){for(const $ of S)b&&h($),f.allErrors?g($):(u.var(m,!0),g($),u.if(m))}function h($){for(const v in b)new RegExp($).test(v)&&(0,n.checkStrictMode)(f,`property ${v} matches pattern ${$} (use allowMatchingProperties)`)}function g($){u.forIn("key",d,v=>{u.if((0,r._)`${(0,e.usePattern)(i,$)}.test(${v})`,()=>{const p=E.includes($);p||i.subschema({keyword:"patternProperties",schemaProp:$,dataProp:v,dataPropType:s.Type.Str},m),f.opts.unevaluated&&o!==!0?u.assign((0,r._)`${o}[${v}]`,!0):!p&&!f.allErrors&&u.if((0,r.not)(m),()=>u.break())})})}}};t.default=l}),_l=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(n){const{gen:s,schema:l,it:i}=n;if((0,e.alwaysValidSchema)(i,l)){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}),wl=B(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}),bl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=ze(),n={message:"must match exactly one schema in oneOf",params:({params:l})=>(0,e._)`{passingSchemas: ${l.passing}}`},s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:n,code(l){const{gen:i,schema:u,parentSchema:a,it:d}=l;if(!Array.isArray(u))throw new Error("ajv implementation error");if(d.opts.discriminator&&a.discriminator)return;const c=u,f=i.let("valid",!1),w=i.let("passing",null),S=i.name("_valid");l.setParams({passing:w}),i.block(E),l.result(f,()=>l.reset(),()=>l.error(!0));function E(){c.forEach((b,m)=>{let o;(0,r.alwaysValidSchema)(d,b)?i.var(S,!0):o=l.subschema({keyword:"oneOf",schemaProp:m,compositeRule:!0},S),m>0&&i.if((0,e._)`${S} && ${f}`).assign(f,!1).assign(w,(0,e._)`[${w}, ${m}]`).else(),i.if(S,()=>{i.assign(f,!0),i.assign(w,m),o&&l.mergeEvaluated(o,e.Name)})})}}};t.default=s}),$l=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:"allOf",schemaType:"array",code(n){const{gen:s,schema:l,it:i}=n;if(!Array.isArray(l))throw new Error("ajv implementation error");const u=s.name("valid");l.forEach((a,d)=>{if((0,e.alwaysValidSchema)(i,a))return;const c=n.subschema({keyword:"allOf",schemaProp:d},u);n.ok(u),n.mergeEvaluated(c)})}};t.default=r}),El=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),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:d}=i;a.then===void 0&&a.else===void 0&&(0,r.checkStrictMode)(d,'"if" without "then" and "else" is ignored');const c=l(d,"then"),f=l(d,"else");if(!c&&!f)return;const w=u.let("valid",!0),S=u.name("_valid");if(E(),i.reset(),c&&f){const m=u.let("ifClause");i.setParams({ifClause:m}),u.if(S,b("then",m),b("else",m))}else c?u.if(S,b("then")):u.if((0,e.not)(S),b("else"));i.pass(w,()=>i.error(!0));function E(){const m=i.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},S);i.mergeEvaluated(m)}function b(m,o){return()=>{const _=i.subschema({keyword:m},S);u.assign(w,S),i.mergeValidEvaluated(_,w),o?u.assign(o,(0,e._)`${m}`):i.setParams({ifClause:m})}}}};function l(i,u){const a=i.schema[u];return a!==void 0&&!(0,r.alwaysValidSchema)(i,a)}t.default=s}),Sl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=ze(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:n,parentSchema:s,it:l}){s.if===void 0&&(0,e.checkStrictMode)(l,`"${n}" without "if" is ignored`)}};t.default=r}),Pl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=_i(),r=dl(),n=wi(),s=hl(),l=pl(),i=ml(),u=gl(),a=bi(),d=yl(),c=vl(),f=_l(),w=wl(),S=bl(),E=$l(),b=El(),m=Sl();function o(_=!1){const h=[f.default,w.default,S.default,E.default,b.default,m.default,u.default,a.default,i.default,d.default,c.default];return _?h.push(r.default,s.default):h.push(e.default,n.default),h.push(l.default),h}t.default=o}),kl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),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,l){const{gen:i,data:u,$data:a,schema:d,schemaCode:c,it:f}=s,{opts:w,errSchemaPath:S,schemaEnv:E,self:b}=f;if(!w.validateFormats)return;a?m():o();function m(){const _=i.scopeValue("formats",{ref:b.formats,code:w.code.formats}),h=i.const("fDef",(0,e._)`${_}[${c}]`),g=i.let("fType"),$=i.let("format");i.if((0,e._)`typeof ${h} == "object" && !(${h} instanceof RegExp)`,()=>i.assign(g,(0,e._)`${h}.type || "string"`).assign($,(0,e._)`${h}.validate`),()=>i.assign(g,(0,e._)`"string"`).assign($,h)),s.fail$data((0,e.or)(v(),p()));function v(){return w.strictSchema===!1?e.nil:(0,e._)`${c} && !${$}`}function p(){const P=E.$async?(0,e._)`(${h}.async ? await ${$}(${u}) : ${$}(${u}))`:(0,e._)`${$}(${u})`,O=(0,e._)`(typeof ${$} == "function" ? ${P} : ${$}.test(${u}))`;return(0,e._)`${$} && ${$} !== true && ${g} === ${l} && !${O}`}}function o(){const _=b.formats[d];if(!_){v();return}if(_===!0)return;const[h,g,$]=p(_);h===l&&s.pass(P());function v(){if(w.strictSchema===!1){b.logger.warn(O());return}throw new Error(O());function O(){return`unknown format "${d}" ignored in schema at path "${S}"`}}function p(O){const C=O instanceof RegExp?(0,e.regexpCode)(O):w.code.formats?(0,e._)`${w.code.formats}${(0,e.getProperty)(d)}`:void 0,U=i.scopeValue("formats",{key:d,ref:O,code:C});return typeof O=="object"&&!(O instanceof RegExp)?[O.type||"string",O.validate,(0,e._)`${U}.validate`]:["string",O,U]}function P(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!E.$async)throw new Error("async format in sync schema");return(0,e._)`await ${$}(${u})`}return typeof g=="function"?(0,e._)`${$}(${u})`:(0,e._)`${$}.test(${u})`}}}};t.default=n}),Ol=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=kl(),r=[e.default];t.default=r}),Tl=B(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"]}),Nl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Zc(),r=fl(),n=Pl(),s=Ol(),l=Tl(),i=[e.default,r.default,(0,n.default)(),s.default,l.metadataVocabulary,l.contentVocabulary];t.default=i}),Rl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(t.DiscrError||(t.DiscrError={}))}),Il=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});var e=Ne(),r=Rl(),n=es(),s=ze(),l={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:d}})=>(0,e._)`{error: ${u}, tag: ${d}, tagValue: ${a}}`},i={keyword:"discriminator",type:"object",schemaType:"object",error:l,code(u){const{gen:a,data:d,schema:c,parentSchema:f,it:w}=u,{oneOf:S}=f;if(!w.opts.discriminator)throw new Error("discriminator: requires discriminator option");const E=c.propertyName;if(typeof E!="string")throw new Error("discriminator: requires propertyName");if(c.mapping)throw new Error("discriminator: mapping is not supported");if(!S)throw new Error("discriminator: requires oneOf keyword");const b=a.let("valid",!1),m=a.const("tag",(0,e._)`${d}${(0,e.getProperty)(E)}`);a.if((0,e._)`typeof ${m} == "string"`,()=>o(),()=>u.error(!1,{discrError:r.DiscrError.Tag,tag:m,tagName:E})),u.ok(b);function o(){const g=h();a.if(!1);for(const $ in g)a.elseIf((0,e._)`${m} === ${$}`),a.assign(b,_(g[$]));a.else(),u.error(!1,{discrError:r.DiscrError.Mapping,tag:m,tagName:E}),a.endIf()}function _(g){const $=a.name("valid"),v=u.subschema({keyword:"oneOf",schemaProp:g},$);return u.mergeEvaluated(v,e.Name),$}function h(){var g;const $={},v=P(f);let p=!0;for(let U=0;U<S.length;U++){let q=S[U];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 J=(g=q==null?void 0:q.properties)===null||g===void 0?void 0:g[E];if(typeof J!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${E}"`);p=p&&(v||P(q)),O(J,U)}if(!p)throw new Error(`discriminator: "${E}" must be required`);return $;function P({required:U}){return Array.isArray(U)&&U.includes(E)}function O(U,q){if(U.const)C(U.const,q);else if(U.enum)for(const J of U.enum)C(J,q);else throw new Error(`discriminator: "properties/${E}" must have "const" or "enum"`)}function C(U,q){if(typeof U!="string"||U in $)throw new Error(`discriminator: "${E}" values must be unique strings`);$[U]=q}}}};t.default=i}),Al=B((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}}),Cl=B((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=Qc(),n=Nl(),s=Il(),l=Al(),i=["/properties"],u="http://json-schema.org/draft-07/schema";class a extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(E=>this.addVocabulary(E)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const E=this.opts.$data?this.$dataMetaSchema(l,i):l;this.addMetaSchema(E,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 d=on();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var c=Ne();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return c._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return c.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return c.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return c.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return c.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return c.CodeGen}});var f=Yn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var w=Zn();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return w.default}})}),jl=B(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;var e=Cl(),r=Ne(),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}},l={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:l,code(u){const{gen:a,data:d,schemaCode:c,keyword:f,it:w}=u,{opts:S,self:E}=w;if(!S.validateFormats)return;const b=new e.KeywordCxt(w,E.RULES.all.format.definition,"format");b.$data?m():o();function m(){const h=a.scopeValue("formats",{ref:E.formats,code:S.code.formats}),g=a.const("fmt",r._`${h}[${b.schemaCode}]`);u.fail$data(r.or(r._`typeof ${g} != "object"`,r._`${g} instanceof RegExp`,r._`typeof ${g}.compare != "function"`,_(g)))}function o(){const h=b.schema,g=E.formats[h];if(!g||g===!0)return;if(typeof g!="object"||g instanceof RegExp||typeof g.compare!="function")throw new Error(`"${f}": format "${h}" does not define "compare" function`);const $=a.scopeValue("formats",{key:h,ref:g,code:S.code.formats?r._`${S.code.formats}${r.getProperty(h)}`:void 0});u.fail$data(_($))}function _(h){return r._`${h}.compare(${d}, ${c}) ${s[f].fail} 0`}},dependencies:["format"]};var i=u=>(u.addKeyword(t.formatLimitDefinition),u);t.default=i}),Ml=B((t,e)=>{Object.defineProperty(t,"__esModule",{value:!0});var r=xc(),n=jl(),s=Ne(),l=new s.Name("fullFormats"),i=new s.Name("fastFormats"),u=(d,c={keywords:!0})=>{if(Array.isArray(c))return a(d,c,r.fullFormats,l),d;const[f,w]=c.mode==="fast"?[r.fastFormats,i]:[r.fullFormats,l],S=c.formats||r.formatNames;return a(d,S,f,w),c.keywords&&n.default(d),d};u.get=(d,c="full")=>{const w=(c==="fast"?r.fastFormats:r.fullFormats)[d];if(!w)throw new Error(`Unknown format "${d}"`);return w};function a(d,c,f,w){var S,E;(S=(E=d.opts.code).formats)!==null&&S!==void 0||(E.formats=s._`require("ajv-formats/dist/formats").${w}`);for(const b of c)d.addFormat(b,f[b])}e.exports=t=u,Object.defineProperty(t,"__esModule",{value:!0}),t.default=u}),Dl=B((t,e)=>{(function(r,n){typeof e=="object"&&e.exports?e.exports=n():r.nearley=n()})(t,function(){function r(c,f,w){return this.id=++r.highestId,this.name=c,this.symbols=f,this.postprocess=w,this}r.highestId=0,r.prototype.toString=function(c){var f=typeof c>"u"?this.symbols.map(d).join(" "):this.symbols.slice(0,c).map(d).join(" ")+" ● "+this.symbols.slice(c).map(d).join(" ");return this.name+" → "+f};function n(c,f,w,S){this.rule=c,this.dot=f,this.reference=w,this.data=[],this.wantedBy=S,this.isComplete=this.dot===c.symbols.length}n.prototype.toString=function(){return"{"+this.rule.toString(this.dot)+"}, from: "+(this.reference||0)},n.prototype.nextState=function(c){var f=new n(this.rule,this.dot+1,this.reference,this.wantedBy);return f.left=this,f.right=c,f.isComplete&&(f.data=f.build(),f.right=void 0),f},n.prototype.build=function(){var c=[],f=this;do c.push(f.right.data),f=f.left;while(f.left);return c.reverse(),c},n.prototype.finish=function(){this.rule.postprocess&&(this.data=this.rule.postprocess(this.data,this.reference,u.fail))};function s(c,f){this.grammar=c,this.index=f,this.states=[],this.wants={},this.scannable=[],this.completed={}}s.prototype.process=function(c){for(var f=this.states,w=this.wants,S=this.completed,E=0;E<f.length;E++){var b=f[E];if(b.isComplete){if(b.finish(),b.data!==u.fail){for(var m=b.wantedBy,o=m.length;o--;){var _=m[o];this.complete(_,b)}if(b.reference===this.index){var h=b.rule.name;(this.completed[h]=this.completed[h]||[]).push(b)}}}else{var h=b.rule.symbols[b.dot];if(typeof h!="string"){this.scannable.push(b);continue}if(w[h]){if(w[h].push(b),S.hasOwnProperty(h))for(var g=S[h],o=0;o<g.length;o++){var $=g[o];this.complete(b,$)}}else w[h]=[b],this.predict(h)}}},s.prototype.predict=function(c){for(var f=this.grammar.byName[c]||[],w=0;w<f.length;w++){var S=f[w],E=this.wants[c],b=new n(S,0,this.index,E);this.states.push(b)}},s.prototype.complete=function(c,f){var w=c.nextState(f);this.states.push(w)};function l(c,f){this.rules=c,this.start=f||this.rules[0].name;var w=this.byName={};this.rules.forEach(function(S){w.hasOwnProperty(S.name)||(w[S.name]=[]),w[S.name].push(S)})}l.fromCompiled=function(S,f){var w=S.Lexer;S.ParserStart&&(f=S.ParserStart,S=S.ParserRules);var S=S.map(function(b){return new r(b.name,b.symbols,b.postprocess)}),E=new l(S,f);return E.lexer=w,E};function i(){this.reset("")}i.prototype.reset=function(c,f){this.buffer=c,this.index=0,this.line=f?f.line:1,this.lastLineBreak=f?-f.col:0},i.prototype.next=function(){if(this.index<this.buffer.length){var c=this.buffer[this.index++];return c===`
|
|
38
|
+
`&&(this.line+=1,this.lastLineBreak=this.index),{value:c}}},i.prototype.save=function(){return{line:this.line,col:this.index-this.lastLineBreak}},i.prototype.formatError=function(c,f){var w=this.buffer;if(typeof w=="string"){var S=w.split(`
|
|
39
|
+
`).slice(Math.max(0,this.line-5),this.line),E=w.indexOf(`
|
|
40
|
+
`,this.index);E===-1&&(E=w.length);var b=this.index-this.lastLineBreak,m=String(this.line).length;return f+=" at line "+this.line+" col "+b+`:
|
|
41
|
+
|
|
42
|
+
`,f+=S.map(function(_,h){return o(this.line-S.length+h+1,m)+" "+_},this).join(`
|
|
43
|
+
`),f+=`
|
|
44
|
+
`+o("",m+b)+`^
|
|
45
|
+
`,f}else return f+" at index "+(this.index-1);function o(_,h){var g=String(_);return Array(h-g.length+1).join(" ")+g}};function u(c,f,w){if(c instanceof l)var S=c,w=f;else var S=l.fromCompiled(c,f);this.grammar=S,this.options={keepHistory:!1,lexer:S.lexer||new i};for(var E in w||{})this.options[E]=w[E];this.lexer=this.options.lexer,this.lexerState=void 0;var b=new s(S,0);this.table=[b],b.wants[S.start]=[],b.predict(S.start),b.process(),this.current=0}u.fail={},u.prototype.feed=function(c){var f=this.lexer;f.reset(c,this.lexerState);for(var w;;){try{if(w=f.next(),!w)break}catch(P){var m=new s(this.grammar,this.current+1);this.table.push(m);var S=new Error(this.reportLexerError(P));throw S.offset=this.current,S.token=P.token,S}var E=this.table[this.current];this.options.keepHistory||delete this.table[this.current-1];var b=this.current+1,m=new s(this.grammar,b);this.table.push(m);for(var o=w.text!==void 0?w.text:w.value,_=f.constructor===i?w.value:w,h=E.scannable,g=h.length;g--;){var $=h[g],v=$.rule.symbols[$.dot];if(v.test?v.test(_):v.type?v.type===w.type:v.literal===o){var p=$.nextState({data:_,token:w,isToken:!0,reference:b-1});m.states.push(p)}}if(m.process(),m.states.length===0){var S=new Error(this.reportError(w));throw S.offset=this.current,S.token=w,S}this.options.keepHistory&&(E.lexerState=f.save()),this.current++}return E&&(this.lexerState=f.save()),this.results=this.finish(),this},u.prototype.reportLexerError=function(c){var f,w,S=c.token;return S?(f="input "+JSON.stringify(S.text[0])+" (lexer error)",w=this.lexer.formatError(S,"Syntax error")):(f="input (lexer error)",w=c.message),this.reportErrorCommon(w,f)},u.prototype.reportError=function(c){var f=(c.type?c.type+" token: ":"")+JSON.stringify(c.value!==void 0?c.value:c),w=this.lexer.formatError(c,"Syntax error");return this.reportErrorCommon(w,f)},u.prototype.reportErrorCommon=function(c,f){var w=[];w.push(c);var S=this.table.length-2,E=this.table[S],b=E.states.filter(function(o){var _=o.rule.symbols[o.dot];return _&&typeof _!="string"});if(b.length===0)w.push("Unexpected "+f+`. I did not expect any more input. Here is the state of my parse table:
|
|
46
|
+
`),this.displayStateStack(E.states,w);else{w.push("Unexpected "+f+`. Instead, I was expecting to see one of the following:
|
|
47
|
+
`);var m=b.map(function(o){return this.buildFirstStateStack(o,[])||[o]},this);m.forEach(function(o){var _=o[0],h=_.rule.symbols[_.dot],g=this.getSymbolDisplay(h);w.push("A "+g+" based on:"),this.displayStateStack(o,w)},this)}return w.push(""),w.join(`
|
|
48
|
+
`)},u.prototype.displayStateStack=function(c,f){for(var w,S=0,E=0;E<c.length;E++){var b=c[E],m=b.rule.toString(b.dot);m===w?S++:(S>0&&f.push(" ^ "+S+" more lines identical to this"),S=0,f.push(" "+m)),w=m}},u.prototype.getSymbolDisplay=function(c){return a(c)},u.prototype.buildFirstStateStack=function(c,f){if(f.indexOf(c)!==-1)return null;if(c.wantedBy.length===0)return[c];var w=c.wantedBy[0],S=[c].concat(f),E=this.buildFirstStateStack(w,S);return E===null?null:[c].concat(E)},u.prototype.save=function(){var c=this.table[this.current];return c.lexerState=this.lexerState,c},u.prototype.restore=function(c){var f=c.index;this.current=f,this.table[f]=c,this.table.splice(f+1),this.lexerState=c.lexerState,this.results=this.finish()},u.prototype.rewind=function(c){if(!this.options.keepHistory)throw new Error("set option `keepHistory` to enable rewinding");this.restore(this.table[c])},u.prototype.finish=function(){var c=[],f=this.grammar.start,w=this.table[this.table.length-1];return w.states.forEach(function(S){S.rule.name===f&&S.dot===S.rule.symbols.length&&S.reference===0&&S.data!==u.fail&&c.push(S)}),c.map(function(S){return S.data})};function a(c){var f=typeof c;if(f==="string")return c;if(f==="object"){if(c.literal)return JSON.stringify(c.literal);if(c instanceof RegExp)return"character matching "+c;if(c.type)return c.type+" token";if(c.test)return"token matching "+String(c.test);throw new Error("Unknown symbol type: "+c)}}function d(c){var f=typeof c;if(f==="string")return c;if(f==="object"){if(c.literal)return JSON.stringify(c.literal);if(c instanceof RegExp)return c.toString();if(c.type)return"%"+c.type;if(c.test)return"<"+String(c.test)+">";throw new Error("Unknown symbol type: "+c)}}return{Parser:u,Grammar:l,Rule:r}})}),ql=B(t=>{Object.defineProperty(t,"__esModule",{value:!0});function e(l){return l[0]}var r=l=>[].concat(...l.map(i=>Array.isArray(i)?r(i):i));function n(l){return l?Array.isArray(l)?r(l).join(""):l:""}var s={Lexer:void 0,ParserRules:[{name:"Reverse_path",symbols:["Path"]},{name:"Reverse_path$string$1",symbols:[{literal:"<"},{literal:">"}],postprocess:l=>l.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(l){return l.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(l){return l.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:l=>l[0].concat([l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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(l){return{DomainName:n(l[0])}}},{name:"non_local_part",symbols:["address_literal"],postprocess:function(l){return{AddressLiteral:n(l[0])}}},{name:"Mailbox",symbols:["Local_part",{literal:"@"},"non_local_part"],postprocess:function(l){return{localPart:n(l[0]),domainPart:n(l[2])}}},{name:"Local_part",symbols:["Dot_string"],postprocess:function(l){return{DotString:n(l[0])}}},{name:"Local_part",symbols:["Quoted_string"],postprocess:function(l){return{QuotedString:n(l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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:l=>l[0].concat([l[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(l){return l.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:l=>l[0].concat([l[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:l=>l.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:l=>l.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}),ns=B(t=>{var e=t&&t.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(t,"__esModule",{value:!0}),t.canonicalize=t.canonicalize_quoted_string=t.normalize=t.normalize_dot_string=t.parse=void 0;var r=Dl(),n=e(ql());n.default.ParserStart="Mailbox";var s=r.Grammar.fromCompiled(n.default);function l(c){if(c.length>986)throw new Error("address too long");const w=new r.Parser(s);if(w.feed(c),w.results.length!==1)throw new Error("address parsing failed: ambiguous grammar");const S=c.lastIndexOf("@"),E=c.substring(S+1);if(E[0]!=="["){if(E.length>253)throw new Error("domain too long");const b=E.split(".");if(b.length<2)throw new Error("domain not fully qualified");if(b[b.length-1].length<2)throw new Error("top level domain label too short");if(b.sort(function(m,o){return o.length-m.length}),b[0].length>63)throw new Error("domain label too long")}return w.results[0]}t.parse=l;function i(c){return function(){const S=c.indexOf("+");return S===-1?c:c.substr(0,S)}().replace(/\./g,"").toLowerCase()}t.normalize_dot_string=i;function u(c){var f,w;const S=l(c),E=(f=S.domainPart.AddressLiteral)!==null&&f!==void 0?f:S.domainPart.DomainName.toLowerCase();return`${(w=S.localPart.QuotedString)!==null&&w!==void 0?w:i(S.localPart.DotString)}@${E}`}t.normalize=u;function a(c){return`"${c.substr(1).substr(0,c.length-2).replace(/(?:\\(.))/g,"$1").replace(/(?:(["\\]))/g,"\\$1")}"`}t.canonicalize_quoted_string=a;function d(c){var f;const w=l(c),S=(f=w.domainPart.AddressLiteral)!==null&&f!==void 0?f:w.domainPart.DomainName.toLowerCase();return`${w.localPart.QuotedString?a(w.localPart.QuotedString):w.localPart.DotString}@${S}`}t.canonicalize=d}),Ll=B((t,e)=>{var r=Object.prototype.hasOwnProperty,n=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):n.call(f)==="[object Array]"},u=function(f){if(!f||n.call(f)!=="[object Object]")return!1;var w=r.call(f,"constructor"),S=f.constructor&&f.constructor.prototype&&r.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!w&&!S)return!1;var E;for(E in f);return typeof E>"u"||r.call(f,E)},a=function(f,w){s&&w.name==="__proto__"?s(f,w.name,{enumerable:!0,configurable:!0,value:w.newValue,writable:!0}):f[w.name]=w.newValue},d=function(f,w){if(w==="__proto__")if(r.call(f,w)){if(l)return l(f,w).value}else return;return f[w]};e.exports=function c(){var f,w,S,E,b,m,o=arguments[0],_=1,h=arguments.length,g=!1;for(typeof o=="boolean"&&(g=o,o=arguments[1]||{},_=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});_<h;++_)if(f=arguments[_],f!=null)for(w in f)S=d(o,w),E=d(f,w),o!==E&&(g&&E&&(u(E)||(b=i(E)))?(b?(b=!1,m=S&&i(S)?S:[]):m=S&&u(S)?S:{},a(o,{name:w,newValue:c(g,m,E)})):typeof E<"u"&&a(o,{name:w,newValue:E}));return o}}),Ul=B((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.
|
|
49
|
+
(section 3) defines an "info" registry
|
|
50
|
+
of public namespaces, which is maintained by NISO and can be accessed
|
|
51
|
+
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"}]}]}),Vl=B((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"}]}),Fl=B((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"}]}]}),zl=B((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"}]}),$i=B((t,e)=>{var r=Ll(),n={permanent:Ul(),provosional:Vl(),historical:Fl()},s={};Object.keys(n).forEach(function(l){n[l].forEach(function(i){s[i.scheme]=r(i,{type:l})})}),n.unofficial=zl().filter(function(l){return!s[l.scheme]}),n.unofficial.forEach(function(l){s[l.scheme]=r(l,{type:"unofficial"})}),e.exports=r(n,{allByName:s})}),xl=B((t,e)=>{var{parse:r}=ts(),{addressParser:n}=ns(),s=$i();function l(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const u=r(i);return!!(u.scheme==="mailto"&&u.to.every(l)||u.reference==="absolute"&&s.allByName[u.scheme])}}),Bl=B((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)?)?$/}),Hl=B((t,e)=>{var{parse:r}=ns();e.exports=n=>{try{return r(n),!0}catch{return!1}}}),Ei={};Wo(Ei,{default:()=>ki});var Si,Pi,br,ss,is,Kl=(t,e,r)=>{for(let n of ss(e))!is.call(t,n)&&n!=="default"&&br(t,n,{get:()=>e[n],enumerable:!0})},js=(t,e,r)=>{r=t!=null?Si(Pi(t)):{};let n=br(r,"default",{value:t,enumerable:!0});for(let s of ss(t))is.call(n,s)||br(n,s,{get:()=>t[s],enumerable:!0});return n},Gl=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),Wl=(t,e)=>{for(var r in e)br(t,r,{get:e[r],enumerable:!0,configurable:!0,set:n=>e[r]=()=>n})},bn,$n,En,ki,Jl=Jo(()=>{Si=Object.create,{getPrototypeOf:Pi,defineProperty:br,getOwnPropertyNames:ss}=Object,is=Object.prototype.hasOwnProperty,bn=Gl((t,e)=>{var r=/^xn--/,n=/[^\0-\x7F]/,s=/[\x2E\u3002\uFF0E\uFF61]/g,l={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($){throw RangeError(l[$])}function d($,v){let p=[],P=$.length;for(;P--;)p[P]=v($[P]);return p}function c($,v){let p=$.split("@"),P="";p.length>1&&(P=p[0]+"@",$=p[1]),$=$.replace(s,".");let O=$.split("."),C=d(O,v).join(".");return P+C}function f($){let v=[],p=0,P=$.length;for(;p<P;){let O=$.charCodeAt(p++);if(O>=55296&&O<=56319&&p<P){let C=$.charCodeAt(p++);(C&64512)==56320?v.push(((O&1023)<<10)+(C&1023)+65536):(v.push(O),p--)}else v.push(O)}return v}var w=$=>String.fromCodePoint(...$),S=function($){return $>=48&&$<58?26+($-48):$>=65&&$<91?$-65:$>=97&&$<123?$-97:36},E=function($,v){return $+22+75*($<26)-((v!=0)<<5)},b=function($,v,p){let P=0;for($=p?i($/700):$>>1,$+=i($/v);$>455;P+=36)$=i($/35);return i(P+36*$/($+38))},m=function($){let v=[],p=$.length,P=0,O=128,C=72,U=$.lastIndexOf("-");U<0&&(U=0);for(let q=0;q<U;++q)$.charCodeAt(q)>=128&&a("not-basic"),v.push($.charCodeAt(q));for(let q=U>0?U+1:0;q<p;){let J=P;for(let ee=1,fe=36;;fe+=36){q>=p&&a("invalid-input");let we=S($.charCodeAt(q++));we>=36&&a("invalid-input"),we>i((2147483647-P)/ee)&&a("overflow"),P+=we*ee;let Oe=fe<=C?1:fe>=C+26?26:fe-C;if(we<Oe)break;let se=36-Oe;ee>i(2147483647/se)&&a("overflow"),ee*=se}let G=v.length+1;C=b(P-J,G,J==0),i(P/G)>2147483647-O&&a("overflow"),O+=i(P/G),P%=G,v.splice(P++,0,O)}return String.fromCodePoint(...v)},o=function($){let v=[];$=f($);let p=$.length,P=128,O=0,C=72;for(let J of $)J<128&&v.push(u(J));let U=v.length,q=U;for(U&&v.push("-");q<p;){let J=2147483647;for(let ee of $)ee>=P&&ee<J&&(J=ee);let G=q+1;J-P>i((2147483647-O)/G)&&a("overflow"),O+=(J-P)*G,P=J;for(let ee of $)if(ee<P&&++O>2147483647&&a("overflow"),ee===P){let fe=O;for(let we=36;;we+=36){let Oe=we<=C?1:we>=C+26?26:we-C;if(fe<Oe)break;let se=fe-Oe,x=36-Oe;v.push(u(E(Oe+se%x,0))),fe=i(se/x)}v.push(u(E(fe,0))),C=b(O,G,q===U),O=0,++q}++O,++P}return v.join("")},_=function($){return c($,function(v){return r.test(v)?m(v.slice(4).toLowerCase()):v})},h=function($){return c($,function(v){return n.test(v)?"xn--"+o(v):v})},g={version:"2.3.1",ucs2:{decode:f,encode:w},decode:m,encode:o,toASCII:h,toUnicode:_};e.exports=g}),$n={},Wl($n,{default:()=>En.default}),Kl($n,js(bn())),En=js(bn()),ki=En.default}),Ql=B((t,e)=>{var{toASCII:r}=(Jl(),Ho(Ei)),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 l=r(s);return l.replace(/\.$/,"").length<=253&&n.test(l)}}),Xl=B((t,e)=>{var{parse:r}=ts(),{addressParser:n}=ns(),s=$i();function l(i){try{return n(i),!0}catch{return!1}}e.exports=i=>{const u=r(i);return u.scheme==="mailto"&&u.to.every(l)||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")}}),Yl=B((t,e)=>{t.iri=xl(),t.duration=Bl(),t["idn-email"]=Hl(),t["idn-hostname"]=Ql(),t["iri-reference"]=Xl()}),Zl=B((t,e)=>{var r=Yl();e.exports=(n,s={})=>{const l=Object.keys(r);let i=l;if(s.formats){if(!Array.isArray(s.formats))throw new Error("options.formats must be an array");i=s.formats}return l.filter(u=>i.includes(u)).forEach(u=>{n.addFormat(u,r[u])}),n}}),eu=Yr(Qo()),Oi=eu.default;/*!
|
|
52
|
+
* activity-streams
|
|
53
|
+
* https://github.com/silverbucket/activity-streams
|
|
54
|
+
*
|
|
55
|
+
* Developed and Maintained by:
|
|
56
|
+
* Nick Jennings <nick@silverbucket.net>
|
|
57
|
+
*
|
|
58
|
+
* activity-streams is released under the MIT (see LICENSE).
|
|
59
|
+
*
|
|
60
|
+
* You don't have to do anything special to choose one license or the other
|
|
61
|
+
* and you don't have to notify anyone which license you are using.
|
|
62
|
+
* Please see the corresponding license file for details of these licenses.
|
|
63
|
+
* You are free to use, modify and distribute this software, but all copyright
|
|
64
|
+
* information must remain.
|
|
65
|
+
*
|
|
66
|
+
*/var cr=new Oi,Dr={stream:["@context","id","type","platform","actor","target","object","published","error"],object:["id","type","context","alias","attachedTo","attachment","attributedTo","attributedWith","condition","content","contentMap","context","contextOf","name","endTime","generator","generatorOf","group","icon","image","inReplyTo","members","memberOf","message","location","locationOf","objectOf","originOf","presence","preview","previewOf","provider","providerOf","published","rating","relationship","resultOf","replies","role","scope","scopeOf","startTime","status","summary","topic","tag","tagOf","targetOf","title","titleMap","updated","url","xmpp:stanza-id"]},Ms={actor:{primary:"id",props:Dr},target:{primary:"id",props:Dr},object:{primary:"content",props:Dr}},ir=new Map,Ti={},Dn=!1,qn=!0,Ni=[];function tu(t,e){const r=Ti[t];return Array.isArray(r)&&r.includes(e)}function Ln(t,e,r=!1){if(e===null)throw new Error(`ActivityStreams validation failed: the "${t}" property is null. Example: { id: "user@example.com", type: "person" }`);if(e===void 0)throw new Error(`ActivityStreams validation failed: the "${t}" property is undefined. Example: { id: "user@example.com", type: "person" }`);if(typeof e=="string")throw new Error(`ActivityStreams validation failed: the "${t}" property received string "${e}" but expected an object. Use: { id: "${e}", type: "person" }`);if(typeof e!="object"||Array.isArray(e)){const u=Array.isArray(e)?"array":typeof e,a=String(e);throw new Error(`ActivityStreams validation failed: the "${t}" property must be an object, received ${u} (${a}). Example: { id: "user@example.com", type: "person" }`)}if(r&&!e.id)throw new Error(`ActivityStreams validation failed: the "${t}" property requires an 'id' property. Example: { id: "user@example.com", type: "person" }`);const s=e,l=Dr[t],i=Object.keys(s).filter(u=>!l.includes(u));for(const u of i){const a=e;if(!tu(a.type,u)&&!Ni.includes(a.type)){console.log(a);const d=typeof a[u]=="string"?`"${a[u]}"`:String(a[u]),c=`ActivityStreams validation failed: property "${u}" with value ${d} is not allowed on the "${t}" object of type "${a.type}".`;if(Dn)throw new Error(c);qn&&console.warn(c)}}}function ru(t){const e={},r=t;for(const n of Object.keys(r)){const s=r[n];if(typeof s=="string")e[n]=ir.get(s)||s;else if(Array.isArray(s)){const l=[];for(const i of s)typeof i=="string"&&l.push(ir.get(i)||i);e[n]=l}else e[n]=s}for(const n of Object.keys(Ms)){const s=e[n];if(typeof s=="string"){const l=Ms[n].primary;e[n]={[l]:s}}}return e}function nu(t){Ln("stream",t),typeof t.object=="object"&&Ln("object",t.object);const e=ru(t);return cr.emit("activity-stream",e),e}var su={create:t=>{Ln("object",t,!0);const e=t;return ir.set(e.id,e),cr.emit("activity-object-create",e),e},delete:t=>{const e=ir.delete(t);return e&&cr.emit("activity-object-delete",t),e},get:(t,e)=>{let r=ir.get(t);if(!r){if(!e)return t;r={id:t}}return r},list:()=>ir.keys()};function Ri(t={}){Ni=(t==null?void 0:t.specialObjs)||[],Dn=typeof t.failOnUnknownObjectProperties=="boolean"?t.failOnUnknownObjectProperties:Dn,qn=typeof t.warnOnUnknownObjectProperties=="boolean"?t.warnOnUnknownObjectProperties:qn;const e=t.customProps||{};for(const r of Object.keys(e))Ti[r]=e[r];return{Stream:nu,Object:su,on:(r,n)=>cr.on(r,n),once:(r,n)=>cr.once(r,n),off:(r,n)=>cr.off(r,n)}}(t=>{t.ASFactor=Ri})(typeof globalThis=="object"?globalThis:{});var iu="https://www.w3.org/ns/activitystreams",au="https://sockethub.org/ns/context/v1.jsonld",ou="error",cu="https://sockethub.org/ns/context/platform/error/v1.jsonld",lu="sockethub:internal",uu="https://sockethub.org/ns/context/platform/sockethub:internal/v1.jsonld",as=new Map,Ii=new Map,Ai=new Map;function fu(t){return Array.isArray(t)?t.filter(e=>typeof e=="string"):[]}function du(t){return fu(t["@context"])}function Ci(t,e,r,n){as.set(e,t),Ii.set(e,r),Ai.set(e,n)}function os(t){const r=du(t).filter(n=>as.has(n));return r.length!==1?null:r[0]}function hu(t){return as.get(t)}function pu(t){return Ii.get(t)}function mu(t){return Ai.get(t)}var cs=[],ji={},ls={credentials:{required:["type"],additionalProperties:!0,properties:{type:{enum:["credentials"]}}},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"}}},message:{required:["type","content"],additionalProperties:!0,properties:{type:{enum:["message"]},id:{type:"string"},name:{type:"string"},content:{type:"string"}}},me:{required:["type","content"],additionalProperties:!0,properties:{type:{enum:["me"]},content:{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"}}},attendance:{required:["type"],additionalProperties:!1,properties:{type:{enum:["attendance"]},members:{type:"array",items:{type:"string"}}}},presence:{required:["type"],additionalProperties:!1,properties:{type:{enum:["presence"]},presence:{enum:["away","chat","dnd","xa","offline","online"]},role:{enum:["owner","member","participant","admin"]},content:{type:"string"}}},relationship:{required:["type","relationship"],additionalProperties:!1,properties:{type:{enum:["relationship"]},relationship:{enum:["role"]},subject:{type:"object",oneOf:[{$ref:"#/definitions/type/presence"}]},object:{type:"object",oneOf:cs}}},topic:{required:["type"],additionalProperties:!1,properties:{type:{enum:["topic"]},content:{type:"string"}}},address:{required:["type"],additionalProperties:!1,properties:{type:{enum:["address"]}}},heartbeat:{required:["type","timestamp"],additionalProperties:!1,properties:{type:{enum:["heartbeat"]},timestamp:{type:"number"}}}},us=Object.keys(ls),Mi=["person","room","service","feed","website","platform"],Di=["person","room","service","feed","website","platform","address"],gu=Mi.map(t=>({$ref:`#/definitions/type/${t}`})),yu=Di.map(t=>({$ref:`#/definitions/type/${t}`}));for(const t of us)t!=="credentials"&&(cs.push({$ref:`#/definitions/type/${t}`}),ji[t]=ls[t]);var vu={$id:"https://sockethub.org/schemas/v/activity-object.json",description:"Schema for Sockethub Activity Objects",type:"object",required:["object"],properties:{object:{type:"object",oneOf:cs}},definitions:{type:ji}},qi=[];for(const t of us)qi.push({$ref:`#/definitions/type/${t}`});var _u={type:"array",minItems:3,maxItems:3,items:{type:"string"},allOf:[{contains:{const:iu}},{contains:{const:au}}]},wu={type:"string"},bu={$id:"https://sockethub.org/schemas/v/activity-stream.json",description:"Schema for Sockethub Activity Streams",type:"object",required:["@context","type","actor"],properties:{"@context":_u,id:{type:"string"},type:wu,actor:{type:"object",oneOf:gu},target:{type:"object",oneOf:yu},object:{type:"object",oneOf:qi},published:{type:"string",format:"date-time"}},definitions:{type:ls}},$u=Yr(zc()),Eu=Yr(Ml()),Su=Yr(Zl());function Pu(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}function gr(t){const e=[];t!=null&&t.type&&e.push(t.type);const r=t;for(const n in r){const s=r[n];s&&typeof s=="object"&&"type"in s&&e.push(...gr(s))}return e}function ku(t){const e=t.schemaPath.match(/#\/\w+\/\w+\/([\w-]+)\//);return e?e[1]:void 0}function Ou(t){const e=t.instancePath.match(/\/(\w+)/);return e?e[1]:void 0}function Tu(t,e){const r=ku(t),n=Ou(t);if(!n)return-1;const s=e[n];return!s||!r||!s.includes(r)?-1:t.instancePath.split("/").length}function Nu(t){if(!Array.isArray(t["@context"]))return{actor:[],target:[],object:gr(t)};const e=t;return{actor:gr(e.actor),target:gr(e.target),object:e.object?gr(e.object):[]}}function Ru(t,e,r){const n=Nu(t);let s=0,l=-1;for(let i=0;i<e.length;i++){const u=Tu(e[i],n);u>l&&(l=u,s=i)}return l>=0?Pu(e[s]):Au(e[e.length-1],r)}function Iu(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 Au(t,e){let r;if(t.keyword==="oneOf"){const n=t.instancePath.split("/")[1],s=n==="actor"?Mi:n==="target"?Di:us,l=Iu(s,e),i=l.length>0?l: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 Mt=new $u.default({strictTypes:!1,allErrors:!0});Eu.default(Mt);Su.default(Mt);var Rt="https://sockethub.org/schemas/v0",Qr={},Cu={},Ds=!1;Qr[`${Rt}/activity-stream`]=bu;Qr[`${Rt}/activity-object`]=vu;for(const t in Qr)Mt.addSchema(Qr[t],t);function qs(t,e){Ci(t,e,`${Rt}/context/${t}/messages`,`${Rt}/context/${t}/credentials`);const r=`${Rt}/context/${t}/messages`;Mt.getSchema(r)||Mt.addSchema({},r);const n=`${Rt}/context/${t}/credentials`;Mt.getSchema(n)||Mt.addSchema({},n)}function ju(){Ds||(qs(ou,cu),qs(lu,uu),Ds=!0)}ju();function Xr(t,e,r=!1){const n=Mt.getSchema(t);if(!n)return`schema ${t} not found`;let s;if(r?s=n({object:e}):s=n(e),!s){let l=Ru(e,n.errors,Cu);if(Array.isArray(e["@context"])){const i=os(e);if(i){const u=hu(i);u&&(l=`[${u}] ${l}`)}}return l}return""}function Mu(t){const e=Xr(`${Rt}/activity-stream`,t);if(e)return e;const r=os(t);if(!r)return"activity streams must have exactly one registered platform context URL in @context";const n=pu(r);return n?Xr(n,t):`platform context URL ${r} does not have a registered message schema`}function Du(t){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=Xr(`${Rt}/activity-stream`,t);if(e)return e;const r=os(t);if(!r)return"credential activity streams must have exactly one registered platform context URL in @context";const n=mu(r);return n?Xr(n,t):`platform context URL ${r} does not have a registered credentials schema`}function Ls(t,e){const r=`${Rt}/context/${e}`;Mt.getSchema(r)||Mt.addSchema(t,r)}function qu(t,e){Ci(t,e,`${Rt}/context/${t}/messages`,`${Rt}/context/${t}/credentials`)}class cn{constructor(e,r={}){nt(this,"events",{credentials:new Map,"activity-object":new Map,connect:new Map,join:new Map});nt(this,"_socket");nt(this,"ActivityStreams");nt(this,"socket");nt(this,"debug",!0);nt(this,"options");nt(this,"platformRegistry",new Map);nt(this,"asContextUrl");nt(this,"sockethubContextUrl");nt(this,"sockethubVersion");nt(this,"initState","idle");nt(this,"hasReadyOnce",!1);nt(this,"initCycle");nt(this,"initTokenCounter",0);nt(this,"initTimeoutTimer");nt(this,"waitingWarningTimer");nt(this,"waitingWarningIntervalMs",1e4);nt(this,"readyWaiters",[]);nt(this,"outboundQueue",[]);nt(this,"outboundSequence",0);nt(this,"registryFingerprint");nt(this,"latestReadyInfo");if(!e)throw new Error("SockethubClient requires a socket.io instance");this._socket=e,this.options={initTimeoutMs:r.initTimeoutMs??5e3,maxQueuedOutbound:r.maxQueuedOutbound??1e3,maxQueuedAgeMs:r.maxQueuedAgeMs??3e4},this.socket=this.createPublicEmitter(),this.registerSocketIOHandlers(),this.initActivityStreams(),this.ActivityStreams.on("activity-object-create",n=>{this.socket.emit("activity-object",n,s=>{if(s&&typeof s.error=="string"){console.error("failed to create activity-object ",s.error);return}this.eventActivityObject(n)})}),e.on("activity-object",n=>{this.ActivityStreams.Object.create(n)}),this._socket.connected&&(this.socket.connected=!0,this.socket.id=this._socket.id,this.socket._emit("connect"),this.startInitialization("initial-connect",!0))}initActivityStreams(){this.ActivityStreams=Ri({specialObjs:["credentials"]})}clearCredentials(){this.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,l;const n=e==null?void 0:e.trim();if(n)return(l=(s=this.platformRegistry.get(n))==null?void 0:s.schemas)==null?void 0:l[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(l=>l!==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 e.type==="credentials"?Du(e):Mu(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 Oi;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",r=>{this.handleSchemasPayload(r)})}applyPlatformRegistry(e){var i,u,a,d;if(!e||typeof e!="object")return;const r=e,n=(i=r.contexts)==null?void 0:i.as,s=(u=r.contexts)==null?void 0:u.sockethub;if(typeof n!="string"||typeof s!="string"||!Array.isArray(r.platforms))return;this.sockethubVersion=typeof r.version=="string"?r.version:"unknown",this.asContextUrl=n,this.sockethubContextUrl=s,this.platformRegistry.clear();for(const c of r.platforms)if(!(!c||typeof c!="object"||typeof c.id!="string"||typeof c.version!="string"||typeof c.contextUrl!="string")){this.platformRegistry.set(c.id,{...c,version:c.version,types:Array.isArray(c.types)?c.types:[],schemas:c.schemas||{}}),qu(c.id,c.contextUrl);try{const f=(a=c.schemas)==null?void 0:a.credentials;f&&typeof f=="object"&&!Array.isArray(f)&&Ls(f,`${c.id}/credentials`);const w=(d=c.schemas)==null?void 0:d.messages;w&&typeof w=="object"&&!Array.isArray(w)&&Ls(w,`${c.id}/messages`)}catch(f){const w=f instanceof Error?f.message:String(f);console.warn(`[SockethubClient] Failed to register schemas for platform ${c.id}: ${w}`)}}const l=this.buildPlatformRegistryPayload();return this.registryFingerprint=this.computePayloadFingerprint(l),this.socket._emit("schemas",l),l}eventActivityObject(e){e.id&&this.events["activity-object"].set(e.id,e)}eventCredentials(e){if(e.object&&e.object.type==="credentials"){const r=e.actor.id||e.actor;this.events.credentials.set(r,e)}}eventMessage(e){if(!this._socket.connected)return;const r=cn.getKey(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)}static getKey(e){var s;const r=((s=e.actor)==null?void 0:s.id)||e.actor;if(!r)throw new Error(`actor property not present for message type: ${e==null?void 0:e.type}`);const n=e.target?e.target.id||e.target:"";return`${r}-${n}`}buildPlatformRegistryPayload(){return{version:this.sockethubVersion,contexts:this.asContextUrl&&this.sockethubContextUrl?{as:this.asContextUrl,sockethub:this.sockethubContextUrl}:void 0,platforms:this.getRegisteredPlatforms()}}buildReadyInfo(e){if(!(!this.sockethubVersion||!this.asContextUrl||!this.sockethubContextUrl))return{state:"ready",reason:e,sockethubVersion:this.sockethubVersion,contexts:{as:this.asContextUrl,sockethub:this.sockethubContextUrl},platforms:this.getRegisteredPlatforms().map(r=>({id:r.id,version:r.version,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 l=s instanceof Error?s.message:String(s);this.emitInitError(l,"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 l=new Error("Failed to build ready payload");this.initState="init_error",this.emitInitError(l.message,"schemas-apply",!0),this.rejectReadyWaiters(l);return}this.socket._emit("ready",s),this.latestReadyInfo=s,this.resolveReadyWaiters(s),n&&(this.replay("activity-object",this.events["activity-object"]),this.replay("credentials",this.events.credentials),this.replay("message",this.events.connect),this.replay("message",this.events.join)),this.flushOutboundQueue()}computePayloadFingerprint(e){var s,l;if(!e||typeof e!="object")return;const r=e;if(typeof((s=r.contexts)==null?void 0:s.as)!="string"||typeof((l=r.contexts)==null?void 0:l.sockethub)!="string"||!Array.isArray(r.platforms))return;const n=r.platforms.map(i=>({id:i.id,version:i.version,contextUrl:i.contextUrl,contextVersion:i.contextVersion,schemaVersion:i.schemaVersion})).sort((i,u)=>i.id.localeCompare(u.id));return JSON.stringify({version:r.version,contexts:r.contexts,platforms:n})}handleSchemasPayload(e){if(!e||typeof e!="object")return;const r=this.computePayloadFingerprint(e);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=this.ActivityStreams.Stream(e.content),r&&typeof r=="object"){const n=r;!n["@context"]&&typeof n.platform=="string"&&n.platform.trim().length>0&&(n["@context"]=this.contextFor(n.platform)),e.event==="credentials"&&!n.type&&(n.type="credentials"),n.actor&&typeof n.actor=="object"&&!n.actor.type&&(n.actor.type="person")}if(this.platformRegistry.size>0){const n=this.validateActivity(r);if(n){this.emitClientError(e.event,e.callback,`SockethubClient validation failed: ${n}`);return}}}if(e.event==="credentials"?this.eventCredentials(r):e.event==="message"&&this.eventMessage(r),e.event==="activity-object"){const n=e.callback,s=r;this._socket.emit(e.event,r,l=>{l&&typeof l.error=="string"?s.id&&this.events["activity-object"].delete(s.id):this.eventActivityObject(s),typeof n=="function"&&n(l)})}else this._socket.emit(e.event,r,e.callback)}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=>{this.socket._emit("message",this.ActivityStreams.Stream(e))})}hasActorId(e){return"actor"in e&&e.actor!==null&&typeof e.actor=="object"&&"id"in e.actor&&typeof e.actor.id=="string"}replay(e,r){for(const n of r.values()){if(e==="activity-object"){const u=n,a=u==null?void 0:u.id;this.log(`replaying ${e} for ${a}`),this._socket.emit(e,u);continue}const l=this.ActivityStreams.Stream(n);let i=l==null?void 0:l.id;if(this.hasActorId(l)){const u=l.actor;i=typeof u=="string"?u:u.id}this.log(`replaying ${e} for ${i}`),this._socket.emit(e,l)}}}(t=>{t.SockethubClient=cn})(typeof globalThis=="object"?globalThis:{});const qt=Object.create(null);qt.open="0";qt.close="1";qt.ping="2";qt.pong="3";qt.message="4";qt.upgrade="5";qt.noop="6";const qr=Object.create(null);Object.keys(qt).forEach(t=>{qr[qt[t]]=t});const Un={type:"error",data:"parser error"},Li=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ui=typeof ArrayBuffer=="function",Vi=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,fs=({type:t,data:e},r,n)=>Li&&e instanceof Blob?r?n(e):Us(e,n):Ui&&(e instanceof ArrayBuffer||Vi(e))?r?n(e):Us(new Blob([e]),n):n(qt[t]+(e||"")),Us=(t,e)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];e("b"+(n||""))},r.readAsDataURL(t)};function Vs(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let Sn;function Lu(t,e){if(Li&&t.data instanceof Blob)return t.data.arrayBuffer().then(Vs).then(e);if(Ui&&(t.data instanceof ArrayBuffer||Vi(t.data)))return e(Vs(t.data));fs(t,!1,r=>{Sn||(Sn=new TextEncoder),e(Sn.encode(r))})}const Fs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",yr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Fs.length;t++)yr[Fs.charCodeAt(t)]=t;const Uu=t=>{let e=t.length*.75,r=t.length,n,s=0,l,i,u,a;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const d=new ArrayBuffer(e),c=new Uint8Array(d);for(n=0;n<r;n+=4)l=yr[t.charCodeAt(n)],i=yr[t.charCodeAt(n+1)],u=yr[t.charCodeAt(n+2)],a=yr[t.charCodeAt(n+3)],c[s++]=l<<2|i>>4,c[s++]=(i&15)<<4|u>>2,c[s++]=(u&3)<<6|a&63;return d},Vu=typeof ArrayBuffer=="function",ds=(t,e)=>{if(typeof t!="string")return{type:"message",data:Fi(t,e)};const r=t.charAt(0);return r==="b"?{type:"message",data:Fu(t.substring(1),e)}:qr[r]?t.length>1?{type:qr[r],data:t.substring(1)}:{type:qr[r]}:Un},Fu=(t,e)=>{if(Vu){const r=Uu(t);return Fi(r,e)}else return{base64:!0,data:t}},Fi=(t,e)=>{switch(e){case"blob":return t instanceof Blob?t:new Blob([t]);case"arraybuffer":default:return t instanceof ArrayBuffer?t:t.buffer}},zi="",zu=(t,e)=>{const r=t.length,n=new Array(r);let s=0;t.forEach((l,i)=>{fs(l,!1,u=>{n[i]=u,++s===r&&e(n.join(zi))})})},xu=(t,e)=>{const r=t.split(zi),n=[];for(let s=0;s<r.length;s++){const l=ds(r[s],e);if(n.push(l),l.type==="error")break}return n};function Bu(){return new TransformStream({transform(t,e){Lu(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 l=new DataView(s.buffer);l.setUint8(0,126),l.setUint16(1,n)}else{s=new Uint8Array(9);const l=new DataView(s.buffer);l.setUint8(0,127),l.setBigUint64(1,BigInt(n))}t.data&&typeof t.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(r)})}})}let Pn;function Ar(t){return t.reduce((e,r)=>e+r.length,0)}function Cr(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 Hu(t,e){Pn||(Pn=new TextDecoder);const r=[];let n=0,s=-1,l=!1;return new TransformStream({transform(i,u){for(r.push(i);;){if(n===0){if(Ar(r)<1)break;const a=Cr(r,1);l=(a[0]&128)===128,s=a[0]&127,s<126?n=3:s===126?n=1:n=2}else if(n===1){if(Ar(r)<2)break;const a=Cr(r,2);s=new DataView(a.buffer,a.byteOffset,a.length).getUint16(0),n=3}else if(n===2){if(Ar(r)<8)break;const a=Cr(r,8),d=new DataView(a.buffer,a.byteOffset,a.length),c=d.getUint32(0);if(c>Math.pow(2,21)-1){u.enqueue(Un);break}s=c*Math.pow(2,32)+d.getUint32(4),n=3}else{if(Ar(r)<s)break;const a=Cr(r,s);u.enqueue(ds(l?a:Pn.decode(a),e)),n=0}if(s===0||s>t){u.enqueue(Un);break}}}})}const xi=4;function at(t){if(t)return Ku(t)}function Ku(t){for(var e in at.prototype)t[e]=at.prototype[e];return t}at.prototype.on=at.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this};at.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this};at.prototype.off=at.prototype.removeListener=at.prototype.removeAllListeners=at.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};at.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};at.prototype.emitReserved=at.prototype.emit;at.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};at.prototype.hasListeners=function(t){return!!this.listeners(t).length};const ln=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,r)=>r(e,0),kt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Gu="arraybuffer";function Bi(t,...e){return e.reduce((r,n)=>(t.hasOwnProperty(n)&&(r[n]=t[n]),r),{})}const Wu=kt.setTimeout,Ju=kt.clearTimeout;function un(t,e){e.useNativeTimers?(t.setTimeoutFn=Wu.bind(kt),t.clearTimeoutFn=Ju.bind(kt)):(t.setTimeoutFn=kt.setTimeout.bind(kt),t.clearTimeoutFn=kt.clearTimeout.bind(kt))}const Qu=1.33;function Xu(t){return typeof t=="string"?Yu(t):Math.ceil((t.byteLength||t.size)*Qu)}function Yu(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 Hi(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Zu(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}function ef(t){let e={},r=t.split("&");for(let n=0,s=r.length;n<s;n++){let l=r[n].split("=");e[decodeURIComponent(l[0])]=decodeURIComponent(l[1])}return e}class tf extends Error{constructor(e,r,n){super(e),this.description=r,this.context=n,this.type="TransportError"}}class hs extends at{constructor(e){super(),this.writable=!1,un(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 tf(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=ds(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=Zu(e);return r.length?"?"+r:""}}class rf extends hs{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)};xu(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,zu(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]=Hi()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(e,r)}}let Ki=!1;try{Ki=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const nf=Ki;function sf(){}class af extends rf{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,l)=>{this.onError("xhr post error",s,l)})}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 Dt extends at{constructor(e,r,n){super(),this.createRequest=e,un(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=Bi(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=Dt.requestsCount++,Dt.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=sf,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Dt.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()}}Dt.requestsCount=0;Dt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",zs);else if(typeof addEventListener=="function"){const t="onpagehide"in kt?"pagehide":"unload";addEventListener(t,zs,!1)}}function zs(){for(let t in Dt.requests)Dt.requests.hasOwnProperty(t)&&Dt.requests[t].abort()}const of=function(){const t=Gi({xdomain:!1});return t&&t.responseType!==null}();class cf extends af{constructor(e){super(e);const r=e&&e.forceBase64;this.supportsBinary=of&&!r}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new Dt(Gi,this.uri(),e)}}function Gi(t){const e=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||nf))return new XMLHttpRequest}catch{}if(!e)try{return new kt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Wi=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class lf extends hs{get name(){return"websocket"}doOpen(){const e=this.uri(),r=this.opts.protocols,n=Wi?{}:Bi(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;fs(n,this.supportsBinary,l=>{try{this.doWrite(n,l)}catch{}s&&ln(()=>{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]=Hi()),this.supportsBinary||(r.b64=1),this.createUri(e,r)}}const kn=kt.WebSocket||kt.MozWebSocket;class uf extends lf{createSocket(e,r,n){return Wi?new kn(e,r,n):r?new kn(e,r):new kn(e)}doWrite(e,r){this.ws.send(r)}}class ff extends hs{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=Hu(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=e.readable.pipeThrough(r).getReader(),s=Bu();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const l=()=>{n.read().then(({done:u,value:a})=>{u||(this.onPacket(a),l())}).catch(u=>{})};l();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&&ln(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const df={websocket:uf,webtransport:ff,polling:cf},hf=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Vn(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=hf.exec(t||""),l={},i=14;for(;i--;)l[pf[i]]=s[i]||"";return r!=-1&&n!=-1&&(l.source=e,l.host=l.host.substring(1,l.host.length-1).replace(/;/g,":"),l.authority=l.authority.replace("[","").replace("]","").replace(/;/g,":"),l.ipv6uri=!0),l.pathNames=mf(l,l.path),l.queryKey=gf(l,l.query),l}function mf(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 gf(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,s,l){s&&(r[s]=l)}),r}const Fn=typeof addEventListener=="function"&&typeof removeEventListener=="function",Lr=[];Fn&&addEventListener("offline",()=>{Lr.forEach(t=>t())},!1);class Jt extends at{constructor(e,r){if(super(),this.binaryType=Gu,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=Vn(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=Vn(r.host).host);un(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=ef(this.opts.query)),Fn&&(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"})},Lr.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const r=Object.assign({},this.opts.query);r.EIO=xi,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&&Jt.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",Jt.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+=Xu(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,ln(()=>{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 l={type:e,data:r,options:n};this.emitReserved("packetCreate",l),this.writeBuffer.push(l),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(Jt.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(),Fn&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=Lr.indexOf(this._offlineEventListener);n!==-1&&Lr.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,r),this.writeBuffer=[],this._prevBufferLen=0}}}Jt.protocol=xi;class yf extends Jt{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;Jt.priorWebsocketSuccess=!1;const s=()=>{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",f=>{if(!n)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Jt.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(c(),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 l(){n||(n=!0,c(),r.close(),r=null)}const i=f=>{const w=new Error("probe error: "+f);w.transport=r.name,l(),this.emitReserved("upgradeError",w)};function u(){i("transport closed")}function a(){i("socket closed")}function d(f){r&&f.name!==r.name&&l()}const c=()=>{r.removeListener("open",s),r.removeListener("error",i),r.removeListener("close",u),this.off("close",a),this.off("upgrading",d)};r.once("open",s),r.once("error",i),r.once("close",u),this.once("close",a),this.once("upgrading",d),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 vf=class extends yf{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=>df[s]).filter(s=>!!s)),super(e,n)}};function _f(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=Vn(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 l=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+l+":"+n.port+e,n.href=n.protocol+"://"+l+(r&&r.port===n.port?"":":"+n.port),n}const wf=typeof ArrayBuffer=="function",bf=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,Ji=Object.prototype.toString,$f=typeof Blob=="function"||typeof Blob<"u"&&Ji.call(Blob)==="[object BlobConstructor]",Ef=typeof File=="function"||typeof File<"u"&&Ji.call(File)==="[object FileConstructor]";function ps(t){return wf&&(t instanceof ArrayBuffer||bf(t))||$f&&t instanceof Blob||Ef&&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(ps(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 Sf(t){const e=[],r=t.data,n=t;return n.data=zn(r,e),n.attachments=e.length,{packet:n,buffers:e}}function zn(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]=zn(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]=zn(t[n],e));return r}return t}function Pf(t,e){return t.data=xn(t.data,e),delete t.attachments,t}function xn(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]=xn(t[r],e);else if(typeof t=="object")for(const r in t)Object.prototype.hasOwnProperty.call(t,r)&&(t[r]=xn(t[r],e));return t}const kf=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Of=5;var De;(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"})(De||(De={}));class Tf{constructor(e){this.replacer=e}encode(e){return(e.type===De.EVENT||e.type===De.ACK)&&Ur(e)?this.encodeAsBinary({type:e.type===De.EVENT?De.BINARY_EVENT:De.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let r=""+e.type;return(e.type===De.BINARY_EVENT||e.type===De.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=Sf(e),n=this.encodeAsString(r.packet),s=r.buffers;return s.unshift(n),s}}function xs(t){return Object.prototype.toString.call(t)==="[object Object]"}class ms extends at{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===De.BINARY_EVENT;n||r.type===De.BINARY_ACK?(r.type=n?De.EVENT:De.ACK,this.reconstructor=new Nf(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(De[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===De.BINARY_EVENT||n.type===De.BINARY_ACK){const l=r+1;for(;e.charAt(++r)!=="-"&&r!=e.length;);const i=e.substring(l,r);if(i!=Number(i)||e.charAt(r)!=="-")throw new Error("Illegal attachments");n.attachments=Number(i)}if(e.charAt(r+1)==="/"){const l=r+1;for(;++r&&!(e.charAt(r)===","||r===e.length););n.nsp=e.substring(l,r)}else n.nsp="/";const s=e.charAt(r+1);if(s!==""&&Number(s)==s){const l=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(l,r+1))}if(e.charAt(++r)){const l=this.tryParse(e.substr(r));if(ms.isPayloadValid(n.type,l))n.data=l;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 De.CONNECT:return xs(r);case De.DISCONNECT:return r===void 0;case De.CONNECT_ERROR:return typeof r=="string"||xs(r);case De.EVENT:case De.BINARY_EVENT:return Array.isArray(r)&&(typeof r[0]=="number"||typeof r[0]=="string"&&kf.indexOf(r[0])===-1);case De.ACK:case De.BINARY_ACK:return Array.isArray(r)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Nf{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=Pf(this.reconPack,this.buffers);return this.finishedReconstruction(),r}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Rf=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ms,Encoder:Tf,get PacketType(){return De},protocol:Of},Symbol.toStringTag,{value:"Module"}));function Nt(t,e,r){return t.on(e,r),function(){t.off(e,r)}}const If=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Qi extends at{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=[Nt(e,"open",this.onopen.bind(this)),Nt(e,"packet",this.onpacket.bind(this)),Nt(e,"error",this.onerror.bind(this)),Nt(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,l;if(If.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:De.EVENT,data:r};if(i.options={},i.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const c=this.ids++,f=r.pop();this._registerAckCallback(c,f),i.id=c}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&&!(!((l=this.io.engine)===null||l===void 0)&&l._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 l=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(l),r.apply(this,u)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...r){return new Promise((n,s)=>{const l=(i,u)=>i?s(i):n(u);l.withError=!0,r.push(l),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,...l)=>(this._queue[0],s!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(s)):(this._queue.shift(),r&&r(null,...l)),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:De.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 De.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 De.EVENT:case De.BINARY_EVENT:this.onevent(e);break;case De.ACK:case De.BINARY_ACK:this.onack(e);break;case De.DISCONNECT:this.ondisconnect();break;case De.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:De.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:De.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 lr(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}lr.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};lr.prototype.reset=function(){this.attempts=0};lr.prototype.setMin=function(t){this.ms=t};lr.prototype.setMax=function(t){this.max=t};lr.prototype.setJitter=function(t){this.jitter=t};class Bn extends at{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,un(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 lr({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||Rf;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 vf(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const s=Nt(r,"open",function(){n.onopen(),e&&e()}),l=u=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",u),e?e(u):this.maybeReconnectOnOpen()},i=Nt(r,"error",l);if(this._timeout!==!1){const u=this._timeout,a=this.setTimeoutFn(()=>{s(),l(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(Nt(e,"ping",this.onping.bind(this)),Nt(e,"data",this.ondata.bind(this)),Nt(e,"error",this.onerror.bind(this)),Nt(e,"close",this.onclose.bind(this)),Nt(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){ln(()=>{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 Qi(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 pr={};function Vr(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const r=_f(t,e.path||"/socket.io"),n=r.source,s=r.id,l=r.path,i=pr[s]&&l in pr[s].nsps,u=e.forceNew||e["force new connection"]||e.multiplex===!1||i;let a;return u?a=new Bn(n,e):(pr[s]||(pr[s]=new Bn(n,e)),a=pr[s]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(Vr,{Manager:Bn,Socket:Qi,io:Vr,connect:Vr});let Ft;const Af=$r(!1),Cf={sockethub:{port:10550,host:"localhost",path:"/sockethub"},public:{protocol:"http",host:"localhost",port:10550,path:"/"}};function Kf(t){return Vo(t)}async function Gf(t){return console.log("sending ->",t),new Promise((e,r)=>{Ft.socket.emit("message",_n("SEND",t),n=>{if(console.log("received <-",n),_n("RESP",n),n.totalItems&&n.items)for(const s of n.items.reverse())_n("RESP",s,!0);ti(n,!0),n.error?r(n.error):e(n)})})}function On(t){return e=>{const r=t==="connect";Af.update(()=>r),console.log(`sockethub ${t} [connected: ${r}]`,e||"")}}function jf(t){console.log("handle incoming: ",t),ti(t,!1)}function Bs(t=Cf){Ft=new cn(Vr(`${t.public.protocol}://${t.public.host}:${t.public.port}`,{path:t.sockethub.path})),Ft.socket.on("connect",On("connect")),Ft.socket.on("error",On("error")),Ft.socket.on("disconnect",On("disconnect")),Ft.socket.on("message",jf),Ft.socket.on("schemas",e=>{console.log("schemas received:",e),wn("schemas",e)}),Ft.socket.on("ready",e=>{console.log("client ready:",e),wn("ready",e)}),Ft.socket.on("init_error",e=>{console.error("client init error:",e),wn("init_error",e)})}typeof globalThis=="object"&&"window"in globalThis&&(console.log("connecting to sockethub"),fetch("/config.json").then(async t=>{const e=await t.json();Bs(e)}).catch(()=>{Bs()}));export{xf as I,Bf as L,Ft as a,Af as b,Kf as c,ei as d,Rn as e,xa as h,Zs as i,Gf as s};
|