1024,w&&(t.dump&&dw===t.dump.charCodeAt(0)?D+="?":D+="? "),D+=t.dump,w&&(D+=ZT(t,e)),ng(t,e+1,E,!0,w)&&(t.dump&&dw===t.dump.charCodeAt(0)?D+=":":D+=": ",D+=t.dump,a+=D));t.tag=n,t.dump=a||"{}"}function hV(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 ng(t,e,r,o,a,n){t.tag=null,t.dump=r,hV(t,r,!1)||hV(t,r,!0);var u=gV.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?(b6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(S6e(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?(P6e(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(D6e(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&w6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new yw("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function x6e(t,e){var r=[],o=[],a,n;for($T(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 gr(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,w)=>E!==A[w])?new Set(p):o;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",ww(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 gr(a,"Unbound coercion result");let A={value:o};return r(o,Object.assign(Object.assign({},a),{coercion:Vu(A,"value")}))?(a.coercions.push([(u=a.p)!==null&&u!==void 0?u:".",ww(a.coercion,o,()=>new Set(A.value))]),!0):!1}return gr(a,`Expected a set (got ${Vn(o)})`)}})}function Z6e(t,e){let r=FP(RP([t,e])),o=TP(e,{keys:t});return qr({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 gr(n,"Unbound coercion result");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let w=()=>E.some((D,x)=>D[0]!==h[x][0]||D[1]!==h[x][1])?new Map(E):a;return n.coercions.push([(u=n.p)!==null&&u!==void 0?u:".",ww(n.coercion,a,w)]),!0}else{let h=!0;for(let[E,w]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(w,Object.assign(Object.assign({},n),{p:Jp(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return gr(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:".",ww(n.coercion,a,()=>new Map(h.value))]),!0):!1:o(a,Object.assign(Object.assign({},n),{coercion:Vu(h,"value")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:".",ww(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return gr(n,`Expected a map (got ${Vn(a)})`)}})}function RP(t,{delimiter:e}={}){let r=eJ(t.length);return qr({test:(o,a)=>{var n;if(typeof o=="string"&&typeof e<"u"&&typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return gr(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 gr(a,`Expected a tuple (got ${Vn(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"?gr(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 gr(a,`Expected an object (got ${Vn(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===ol?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=rJ(),r=pn.InitialNode,o=this.usage().usage,a=this.options.filter(A=>A.required).map(A=>A.nameSet);r=jc(e,sl()),Ko(e,pn.InitialNode,Kn.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 D=jc(e,sl());bm(e,p,D),this.registerOptions(e,D),p=D}for(let D=0;D {var OJe=$p(),MJe=ql(),UJe=OJe(MJe,"DataView");ire.exports=UJe});var are=_((cRt,ore)=>{var _Je=$p(),HJe=ql(),qJe=_Je(HJe,"Promise");ore.exports=qJe});var cre=_((uRt,lre)=>{var jJe=$p(),GJe=ql(),WJe=jJe(GJe,"Set");lre.exports=WJe});var Are=_((ARt,ure)=>{var YJe=$p(),KJe=ql(),VJe=YJe(KJe,"WeakMap");ure.exports=VJe});var a1=_((fRt,yre)=>{var RL=sre(),TL=gS(),NL=are(),LL=cre(),OL=Are(),mre=mg(),Ym=BL(),fre="[object Map]",JJe="[object Object]",pre="[object Promise]",hre="[object Set]",gre="[object WeakMap]",dre="[object DataView]",zJe=Ym(RL),XJe=Ym(TL),ZJe=Ym(NL),$Je=Ym(LL),eze=Ym(OL),yg=mre;(RL&&yg(new RL(new ArrayBuffer(1)))!=dre||TL&&yg(new TL)!=fre||NL&&yg(NL.resolve())!=pre||LL&&yg(new LL)!=hre||OL&&yg(new OL)!=gre)&&(yg=function(t){var e=mre(t),r=e==JJe?t.constructor:void 0,o=r?Ym(r):"";if(o)switch(o){case zJe:return dre;case XJe:return fre;case ZJe:return pre;case $Je:return hre;case eze:return gre}return e});yre.exports=yg});var Pre=_((pRt,Dre)=>{var ML=mS(),tze=vL(),rze=hte(),nze=nre(),Ere=a1(),Cre=jl(),Ire=r1(),ize=vS(),sze=1,wre="[object Arguments]",Bre="[object Array]",SS="[object Object]",oze=Object.prototype,vre=oze.hasOwnProperty;function aze(t,e,r,o,a,n){var u=Cre(t),A=Cre(e),p=u?Bre:Ere(t),h=A?Bre:Ere(e);p=p==wre?SS:p,h=h==wre?SS:h;var E=p==SS,w=h==SS,D=p==h;if(D&&Ire(t)){if(!Ire(e))return!1;u=!0,E=!1}if(D&&!E)return n||(n=new ML),u||ize(t)?tze(t,e,r,o,a,n):rze(t,e,p,r,o,a,n);if(!(r&sze)){var x=E&&vre.call(t,"__wrapped__"),C=w&&vre.call(e,"__wrapped__");if(x||C){var T=x?t.value():t,L=C?e.value():e;return n||(n=new ML),a(T,L,r,o,n)}}return D?(n||(n=new ML),nze(t,e,r,o,a,n)):!1}Dre.exports=aze});var kre=_((hRt,xre)=>{var lze=Pre(),Sre=Zu();function bre(t,e,r,o,a){return t===e?!0:t==null||e==null||!Sre(t)&&!Sre(e)?t!==t&&e!==e:lze(t,e,r,o,bre,a)}xre.exports=bre});var Fre=_((gRt,Qre)=>{var cze=kre();function uze(t,e){return cze(t,e)}Qre.exports=uze});var UL=_((dRt,Rre)=>{var Aze=$p(),fze=function(){try{var t=Aze(Object,"defineProperty");return t({},"",{}),t}catch{}}();Rre.exports=fze});var bS=_((mRt,Nre)=>{var Tre=UL();function pze(t,e,r){e=="__proto__"&&Tre?Tre(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Nre.exports=pze});var _L=_((yRt,Lre)=>{var hze=bS(),gze=Um();function dze(t,e,r){(r!==void 0&&!gze(t[e],r)||r===void 0&&!(e in t))&&hze(t,e,r)}Lre.exports=dze});var Mre=_((ERt,Ore)=>{function mze(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}}Ore.exports=mze});var _re=_((CRt,Ure)=>{var yze=Mre(),Eze=yze();Ure.exports=Eze});var HL=_((l1,Km)=>{var Cze=ql(),Gre=typeof l1=="object"&&l1&&!l1.nodeType&&l1,Hre=Gre&&typeof Km=="object"&&Km&&!Km.nodeType&&Km,Ize=Hre&&Hre.exports===Gre,qre=Ize?Cze.Buffer:void 0,jre=qre?qre.allocUnsafe:void 0;function wze(t,e){if(e)return t.slice();var r=t.length,o=jre?jre(r):new t.constructor(r);return t.copy(o),o}Km.exports=wze});var xS=_((IRt,Yre)=>{var Wre=DL();function Bze(t){var e=new t.constructor(t.byteLength);return new Wre(e).set(new Wre(t)),e}Yre.exports=Bze});var qL=_((wRt,Kre)=>{var vze=xS();function Dze(t,e){var r=e?vze(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}Kre.exports=Dze});var kS=_((BRt,Vre)=>{function Pze(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r>/2":{type_args:!1,type_result:!1,fn:function(I,S,y){return I>>S}},"/\\/2":{type_args:!1,type_result:!1,fn:function(I,S,y){return I&S}},"\\//2":{type_args:!1,type_result:!1,fn:function(I,S,y){return I|S}},"xor/2":{type_args:!1,type_result:!1,fn:function(I,S,y){return I^S}},"rem/2":{type_args:!1,type_result:!1,fn:function(I,S,y){return S?I%S:b.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(I,S,y){return S?I-parseInt(I/S)*S:b.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(I,S,y){return Math.max(I,S)}},"min/2":{type_args:null,type_result:null,fn:function(I,S,y){return Math.min(I,S)}}}},directive:{"dynamic/1":function(I,S){var y=S.args[0];if(b.type.is_variable(y))I.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_compound(y)||y.indicator!=="//2")I.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]))I.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_atom(y.args[0]))I.throw_error(b.error.type("atom",y.args[0],S.indicator));else if(!b.type.is_integer(y.args[1]))I.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;I.session.public_predicates[R]=!0,I.session.rules[R]||(I.session.rules[R]=[])}},"multifile/1":function(I,S){var y=S.args[0];b.type.is_variable(y)?I.throw_error(b.error.instantiation(S.indicator)):!b.type.is_compound(y)||y.indicator!=="//2"?I.throw_error(b.error.type("predicate_indicator",y,S.indicator)):b.type.is_variable(y.args[0])||b.type.is_variable(y.args[1])?I.throw_error(b.error.instantiation(S.indicator)):b.type.is_atom(y.args[0])?b.type.is_integer(y.args[1])?I.session.multifile_predicates[S.args[0].args[0].id+"/"+S.args[0].args[1].value]=!0:I.throw_error(b.error.type("integer",y.args[1],S.indicator)):I.throw_error(b.error.type("atom",y.args[0],S.indicator))},"set_prolog_flag/2":function(I,S){var y=S.args[0],R=S.args[1];b.type.is_variable(y)||b.type.is_variable(R)?I.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)?I.session.flag[y.id]=R:I.throw_error(b.error.permission("modify","flag",y)):I.throw_error(b.error.domain("flag_value",new q("+",[y,R]),S.indicator)):I.throw_error(b.error.domain("prolog_flag",y,S.indicator)):I.throw_error(b.error.type("atom",y,S.indicator))},"use_module/1":function(I,S){var y=S.args[0];if(b.type.is_variable(y))I.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_term(y))I.throw_error(b.error.type("term",y,S.indicator));else if(b.type.is_module(y)){var R=y.args[0].id;e(I.session.modules,R)===-1&&I.session.modules.push(R)}},"char_conversion/2":function(I,S){var y=S.args[0],R=S.args[1];b.type.is_variable(y)||b.type.is_variable(R)?I.throw_error(b.error.instantiation(S.indicator)):b.type.is_character(y)?b.type.is_character(R)?y.id===R.id?delete I.session.__char_conversion[y.id]:I.session.__char_conversion[y.id]=R.id:I.throw_error(b.error.type("character",R,S.indicator)):I.throw_error(b.error.type("character",y,S.indicator))},"op/3":function(I,S){var y=S.args[0],R=S.args[1],z=S.args[2];if(b.type.is_variable(y)||b.type.is_variable(R)||b.type.is_variable(z))I.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_integer(y))I.throw_error(b.error.type("integer",y,S.indicator));else if(!b.type.is_atom(R))I.throw_error(b.error.type("atom",R,S.indicator));else if(!b.type.is_atom(z))I.throw_error(b.error.type("atom",z,S.indicator));else if(y.value<0||y.value>1200)I.throw_error(b.error.domain("operator_priority",y,S.indicator));else if(z.id===",")I.throw_error(b.error.permission("modify","operator",z,S.indicator));else if(z.id==="|"&&(y.value<1001||R.id.length!==3))I.throw_error(b.error.permission("modify","operator",z,S.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(R.id)===-1)I.throw_error(b.error.domain("operator_specifier",R,S.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var $ in I.session.__operators)if(I.session.__operators.hasOwnProperty($)){var se=I.session.__operators[$][z.id];se&&(e(se,"fx")!==-1&&(X.prefix={priority:$,type:"fx"}),e(se,"fy")!==-1&&(X.prefix={priority:$,type:"fy"}),e(se,"xf")!==-1&&(X.postfix={priority:$,type:"xf"}),e(se,"yf")!==-1&&(X.postfix={priority:$,type:"yf"}),e(se,"xfx")!==-1&&(X.infix={priority:$,type:"xfx"}),e(se,"xfy")!==-1&&(X.infix={priority:$,type:"xfy"}),e(se,"yfx")!==-1&&(X.infix={priority:$,type:"yfx"}))}var xe;switch(R.id){case"fy":case"fx":xe="prefix";break;case"yf":case"xf":xe="postfix";break;default:xe="infix";break}if(((X.prefix&&xe==="prefix"||X.postfix&&xe==="postfix"||X.infix&&xe==="infix")&&X[xe].type!==R.id||X.infix&&xe==="postfix"||X.postfix&&xe==="infix")&&y.value!==0)I.throw_error(b.error.permission("create","operator",z,S.indicator));else return X[xe]&&(me(I.session.__operators[X[xe].priority][z.id],R.id),I.session.__operators[X[xe].priority][z.id].length===0&&delete I.session.__operators[X[xe].priority][z.id]),y.value>0&&(I.session.__operators[y.value]||(I.session.__operators[y.value.toString()]={}),I.session.__operators[y.value][z.id]||(I.session.__operators[y.value][z.id]=[]),I.session.__operators[y.value][z.id].push(R.id)),!0}}},predicate:{"op/3":function(I,S,y){b.directive["op/3"](I,y)&&I.success(S)},"current_op/3":function(I,S,y){var R=y.args[0],z=y.args[1],X=y.args[2],$=[];for(var se in I.session.__operators)for(var xe in I.session.__operators[se])for(var Fe=0;Fe