1024,I&&(t.dump&&Xw===t.dump.charCodeAt(0)?v+="?":v+="? "),v+=t.dump,I&&(v+=CT(t,e)),ed(t,e+1,E,!0,I)&&(t.dump&&Xw===t.dump.charCodeAt(0)?v+=":":v+=": ",v+=t.dump,a+=v));t.tag=n,t.dump=a||"{}"}function kK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function ed(t,e,r,o,a,n){t.tag=null,t.dump=r,kK(t,r,!1)||kK(t,r,!0);var u=QK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(q6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(H6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(_6e(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(U6e(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&N6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new $w("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function G6e(t,e){var r=[],o=[],a,n;for(wT(t,r,o),a=0,n=o.length;a {var n,u;if(Object.getPrototypeOf(o).toString()==="[object Set]")if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return pr(a,"Unbound coercion result");let A=[...o],p=[...o];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((E,I)=>E!==A[I])?new Set(p):o;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",nI(a.coercion,o,h)]),!0}else{let A=!0;for(let p of o)if(A=t(p,Object.assign({},a))&&A,!A&&a?.errors==null)break;return A}if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return pr(a,"Unbound coercion result");let A={value:o};return r(o,Object.assign(Object.assign({},a),{coercion:Wu(A,"value")}))?(a.coercions.push([(u=a.p)!==null&&u!==void 0?u:".",nI(a.coercion,o,()=>new Set(A.value))]),!0):!1}return pr(a,`Expected a set (got ${qn(o)})`)}})}function fqe(t,e){let r=iD(sD([t,e])),o=oD(e,{keys:t});return Hr({test:(a,n)=>{var u,A,p;if(Object.getPrototypeOf(a).toString()==="[object Map]")if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return pr(n,"Unbound coercion result");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let I=()=>E.some((v,x)=>v[0]!==h[x][0]||v[1]!==h[x][1])?new Map(E):a;return n.coercions.push([(u=n.p)!==null&&u!==void 0?u:".",nI(n.coercion,a,I)]),!0}else{let h=!0;for(let[E,I]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(I,Object.assign(Object.assign({},n),{p:Kp(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return pr(n,"Unbound coercion result");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(A=n.p)!==null&&A!==void 0?A:".",nI(n.coercion,a,()=>new Map(h.value))]),!0):!1:o(a,Object.assign(Object.assign({},n),{coercion:Wu(h,"value")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:".",nI(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return pr(n,`Expected a map (got ${qn(a)})`)}})}function sD(t,{delimiter:e}={}){let r=dz(t.length);return Hr({test:(o,a)=>{var n;if(typeof o=="string"&&typeof e<"u"&&typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return pr(a,"Unbound coercion result");o=o.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)])}if(!Array.isArray(o))return pr(a,`Expected a tuple (got ${qn(o)})`);let u=r(o,Object.assign({},a));for(let A=0,p=o.length;A {var n;if(Array.isArray(o)&&typeof a?.coercions<"u")return typeof a?.coercion>"u"?pr(a,"Unbound coercion result"):r(o,Object.assign(Object.assign({},a),{coercion:void 0}))?(o=Object.fromEntries(o),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)]),!0):!1;if(typeof o!="object"||o===null)return pr(a,`Expected an object (got ${qn(o)})`);let u=Object.keys(o),A=!0;for(let p=0,h=u.length;p `:`[${x}]`)}o.push(...this.arity.leading.map(u=>`<${u}>`)),this.arity.extra===tl?o.push("..."):o.push(...this.arity.extra.map(u=>`[${u}]`)),o.push(...this.arity.trailing.map(u=>`<${u}>`))}return{usage:o.join(" "),options:a}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=yz(),r=un.InitialNode,o=this.usage().usage,a=this.options.filter(A=>A.required).map(A=>A.nameSet);r=Mc(e,el()),zo(e,un.InitialNode,Hn.StartOfInput,r,["setCandidateState",{candidateUsage:o,requiredOptions:a}]);let n=this.arity.proxy?"always":"isNotOptionLike",u=this.paths.length>0?this.paths:[[]];for(let A of u){let p=r;if(A.length>0){let v=Mc(e,el());Cy(e,p,v),this.registerOptions(e,v),p=v}for(let v=0;v {var XJe=Xp(),ZJe=Hl(),$Je=XJe(ZJe,"DataView");Cte.exports=$Je});var Bte=_((kFt,Ite)=>{var eVe=Xp(),tVe=Hl(),rVe=eVe(tVe,"Promise");Ite.exports=rVe});var Pte=_((QFt,vte)=>{var nVe=Xp(),iVe=Hl(),sVe=nVe(iVe,"Set");vte.exports=sVe});var Ste=_((RFt,Dte)=>{var oVe=Xp(),aVe=Hl(),lVe=oVe(aVe,"WeakMap");Dte.exports=lVe});var qI=_((FFt,Tte)=>{var $L=wte(),eN=UD(),tN=Bte(),rN=Pte(),nN=Ste(),Fte=gd(),Hy=qL(),bte="[object Map]",cVe="[object Object]",xte="[object Promise]",kte="[object Set]",Qte="[object WeakMap]",Rte="[object DataView]",uVe=Hy($L),AVe=Hy(eN),fVe=Hy(tN),pVe=Hy(rN),hVe=Hy(nN),dd=Fte;($L&&dd(new $L(new ArrayBuffer(1)))!=Rte||eN&&dd(new eN)!=bte||tN&&dd(tN.resolve())!=xte||rN&&dd(new rN)!=kte||nN&&dd(new nN)!=Qte)&&(dd=function(t){var e=Fte(t),r=e==cVe?t.constructor:void 0,o=r?Hy(r):"";if(o)switch(o){case uVe:return Rte;case AVe:return bte;case fVe:return xte;case pVe:return kte;case hVe:return Qte}return e});Tte.exports=dd});var qte=_((TFt,Hte)=>{var iN=HD(),gVe=jL(),dVe=kee(),mVe=Ete(),Lte=qI(),Nte=ql(),Ote=OI(),yVe=zD(),EVe=1,Mte="[object Arguments]",Ute="[object Array]",XD="[object Object]",CVe=Object.prototype,_te=CVe.hasOwnProperty;function wVe(t,e,r,o,a,n){var u=Nte(t),A=Nte(e),p=u?Ute:Lte(t),h=A?Ute:Lte(e);p=p==Mte?XD:p,h=h==Mte?XD:h;var E=p==XD,I=h==XD,v=p==h;if(v&&Ote(t)){if(!Ote(e))return!1;u=!0,E=!1}if(v&&!E)return n||(n=new iN),u||yVe(t)?gVe(t,e,r,o,a,n):dVe(t,e,p,r,o,a,n);if(!(r&EVe)){var x=E&&_te.call(t,"__wrapped__"),C=I&&_te.call(e,"__wrapped__");if(x||C){var F=x?t.value():t,N=C?e.value():e;return n||(n=new iN),a(F,N,r,o,n)}}return v?(n||(n=new iN),mVe(t,e,r,o,a,n)):!1}Hte.exports=wVe});var Wte=_((LFt,Yte)=>{var IVe=qte(),Gte=Vu();function jte(t,e,r,o,a){return t===e?!0:t==null||e==null||!Gte(t)&&!Gte(e)?t!==t&&e!==e:IVe(t,e,r,o,jte,a)}Yte.exports=jte});var zte=_((NFt,Kte)=>{var BVe=Wte();function vVe(t,e){return BVe(t,e)}Kte.exports=vVe});var sN=_((OFt,Jte)=>{var PVe=Xp(),DVe=function(){try{var t=PVe(Object,"defineProperty");return t({},"",{}),t}catch{}}();Jte.exports=DVe});var ZD=_((MFt,Xte)=>{var Vte=sN();function SVe(t,e,r){e=="__proto__"&&Vte?Vte(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Xte.exports=SVe});var oN=_((UFt,Zte)=>{var bVe=ZD(),xVe=Ty();function kVe(t,e,r){(r!==void 0&&!xVe(t[e],r)||r===void 0&&!(e in t))&&bVe(t,e,r)}Zte.exports=kVe});var ere=_((_Ft,$te)=>{function QVe(t){return function(e,r,o){for(var a=-1,n=Object(e),u=o(e),A=u.length;A--;){var p=u[t?A:++a];if(r(n[p],p,n)===!1)break}return e}}$te.exports=QVe});var rre=_((HFt,tre)=>{var RVe=ere(),FVe=RVe();tre.exports=FVe});var aN=_((GI,qy)=>{var TVe=Hl(),ore=typeof GI=="object"&&GI&&!GI.nodeType&&GI,nre=ore&&typeof qy=="object"&&qy&&!qy.nodeType&&qy,LVe=nre&&nre.exports===ore,ire=LVe?TVe.Buffer:void 0,sre=ire?ire.allocUnsafe:void 0;function NVe(t,e){if(e)return t.slice();var r=t.length,o=sre?sre(r):new t.constructor(r);return t.copy(o),o}qy.exports=NVe});var $D=_((qFt,lre)=>{var are=YL();function OVe(t){var e=new t.constructor(t.byteLength);return new are(e).set(new are(t)),e}lre.exports=OVe});var lN=_((GFt,cre)=>{var MVe=$D();function UVe(t,e){var r=e?MVe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}cre.exports=UVe});var eS=_((jFt,ure)=>{function _Ve(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r>/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w>>S}},"/\\/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w&S}},"\\//2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w|S}},"xor/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w^S}},"rem/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return S?w%S:b.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return S?w-parseInt(w/S)*S:b.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(w,S,y){return Math.max(w,S)}},"min/2":{type_args:null,type_result:null,fn:function(w,S,y){return Math.min(w,S)}}}},directive:{"dynamic/1":function(w,S){var y=S.args[0];if(b.type.is_variable(y))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_compound(y)||y.indicator!=="//2")w.throw_error(b.error.type("predicate_indicator",y,S.indicator));else if(b.type.is_variable(y.args[0])||b.type.is_variable(y.args[1]))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_atom(y.args[0]))w.throw_error(b.error.type("atom",y.args[0],S.indicator));else if(!b.type.is_integer(y.args[1]))w.throw_error(b.error.type("integer",y.args[1],S.indicator));else{var R=S.args[0].args[0].id+"/"+S.args[0].args[1].value;w.session.public_predicates[R]=!0,w.session.rules[R]||(w.session.rules[R]=[])}},"multifile/1":function(w,S){var y=S.args[0];b.type.is_variable(y)?w.throw_error(b.error.instantiation(S.indicator)):!b.type.is_compound(y)||y.indicator!=="//2"?w.throw_error(b.error.type("predicate_indicator",y,S.indicator)):b.type.is_variable(y.args[0])||b.type.is_variable(y.args[1])?w.throw_error(b.error.instantiation(S.indicator)):b.type.is_atom(y.args[0])?b.type.is_integer(y.args[1])?w.session.multifile_predicates[S.args[0].args[0].id+"/"+S.args[0].args[1].value]=!0:w.throw_error(b.error.type("integer",y.args[1],S.indicator)):w.throw_error(b.error.type("atom",y.args[0],S.indicator))},"set_prolog_flag/2":function(w,S){var y=S.args[0],R=S.args[1];b.type.is_variable(y)||b.type.is_variable(R)?w.throw_error(b.error.instantiation(S.indicator)):b.type.is_atom(y)?b.type.is_flag(y)?b.type.is_value_flag(y,R)?b.type.is_modifiable_flag(y)?w.session.flag[y.id]=R:w.throw_error(b.error.permission("modify","flag",y)):w.throw_error(b.error.domain("flag_value",new H("+",[y,R]),S.indicator)):w.throw_error(b.error.domain("prolog_flag",y,S.indicator)):w.throw_error(b.error.type("atom",y,S.indicator))},"use_module/1":function(w,S){var y=S.args[0];if(b.type.is_variable(y))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_term(y))w.throw_error(b.error.type("term",y,S.indicator));else if(b.type.is_module(y)){var R=y.args[0].id;e(w.session.modules,R)===-1&&w.session.modules.push(R)}},"char_conversion/2":function(w,S){var y=S.args[0],R=S.args[1];b.type.is_variable(y)||b.type.is_variable(R)?w.throw_error(b.error.instantiation(S.indicator)):b.type.is_character(y)?b.type.is_character(R)?y.id===R.id?delete w.session.__char_conversion[y.id]:w.session.__char_conversion[y.id]=R.id:w.throw_error(b.error.type("character",R,S.indicator)):w.throw_error(b.error.type("character",y,S.indicator))},"op/3":function(w,S){var y=S.args[0],R=S.args[1],V=S.args[2];if(b.type.is_variable(y)||b.type.is_variable(R)||b.type.is_variable(V))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_integer(y))w.throw_error(b.error.type("integer",y,S.indicator));else if(!b.type.is_atom(R))w.throw_error(b.error.type("atom",R,S.indicator));else if(!b.type.is_atom(V))w.throw_error(b.error.type("atom",V,S.indicator));else if(y.value<0||y.value>1200)w.throw_error(b.error.domain("operator_priority",y,S.indicator));else if(V.id===",")w.throw_error(b.error.permission("modify","operator",V,S.indicator));else if(V.id==="|"&&(y.value<1001||R.id.length!==3))w.throw_error(b.error.permission("modify","operator",V,S.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(R.id)===-1)w.throw_error(b.error.domain("operator_specifier",R,S.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var $ in w.session.__operators)if(!!w.session.__operators.hasOwnProperty($)){var ie=w.session.__operators[$][V.id];ie&&(e(ie,"fx")!==-1&&(X.prefix={priority:$,type:"fx"}),e(ie,"fy")!==-1&&(X.prefix={priority:$,type:"fy"}),e(ie,"xf")!==-1&&(X.postfix={priority:$,type:"xf"}),e(ie,"yf")!==-1&&(X.postfix={priority:$,type:"yf"}),e(ie,"xfx")!==-1&&(X.infix={priority:$,type:"xfx"}),e(ie,"xfy")!==-1&&(X.infix={priority:$,type:"xfy"}),e(ie,"yfx")!==-1&&(X.infix={priority:$,type:"yfx"}))}var be;switch(R.id){case"fy":case"fx":be="prefix";break;case"yf":case"xf":be="postfix";break;default:be="infix";break}if(((X.prefix&&be==="prefix"||X.postfix&&be==="postfix"||X.infix&&be==="infix")&&X[be].type!==R.id||X.infix&&be==="postfix"||X.postfix&&be==="infix")&&y.value!==0)w.throw_error(b.error.permission("create","operator",V,S.indicator));else return X[be]&&(me(w.session.__operators[X[be].priority][V.id],R.id),w.session.__operators[X[be].priority][V.id].length===0&&delete w.session.__operators[X[be].priority][V.id]),y.value>0&&(w.session.__operators[y.value]||(w.session.__operators[y.value.toString()]={}),w.session.__operators[y.value][V.id]||(w.session.__operators[y.value][V.id]=[]),w.session.__operators[y.value][V.id].push(R.id)),!0}}},predicate:{"op/3":function(w,S,y){b.directive["op/3"](w,y)&&w.success(S)},"current_op/3":function(w,S,y){var R=y.args[0],V=y.args[1],X=y.args[2],$=[];for(var ie in w.session.__operators)for(var be in w.session.__operators[ie])for(var Fe=0;Fe