From eaeebba72cb9a85d83bfe2355d9058ceb44bfd7a Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Sat, 3 Apr 2021 19:31:33 +0200 Subject: [PATCH] Basic logging exposed in Javascript Lacks value embedding though --- Makefile | 6 +- .../allocations_familiales/epilogue.catala_fr | 2 +- .../allocations_familiales/prologue.catala_fr | 13 +- .../securite_sociale_D.catala_fr | 12 +- .../tests_allocations_familiales.catala_fr | 21 + french_law_js/allocations_familiales.js | 1 + french_law_js/french_law.js | 5395 +++++++++-------- src/catala/runtime.ml | 18 +- src/catala/surface/desugaring.ml | 18 +- src/catala/surface/name_resolution.ml | 32 +- src/catala/surface/name_resolution.mli | 2 +- src/french_law/api_web.ml | 70 + src/french_law/bench.ml | 9 +- .../law_source/allocations_familiales.ml | 254 +- 14 files changed, 3173 insertions(+), 2680 deletions(-) diff --git a/Makefile b/Makefile index cddca8da..250fd3e8 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ help : Makefile @sed -n 's/^#> //p' $< +ROOT_DIR:=$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))) + ########################################## # Dependencies ########################################## @@ -179,7 +181,7 @@ build_french_law_library: generate_french_law_library format dune build $(FRENCH_LAW_LIB_DIR)/french_law.a run_french_law_library_benchmark: generate_french_law_library - dune exec $(FRENCH_LAW_LIB_DIR)/bench.exe + dune exec --profile release $(FRENCH_LAW_LIB_DIR)/bench.exe run_french_law_library_tests: generate_french_law_library dune exec $(FRENCH_LAW_LIB_DIR)/law_source/unit_tests/run_tests.exe @@ -187,7 +189,7 @@ run_french_law_library_tests: generate_french_law_library #> build_french_law_library_js : Builds the JS version of the OCaml French law library build_french_law_library_js: generate_french_law_library format dune build --profile release $(FRENCH_LAW_LIB_DIR)/api_web.bc.js - cp -f _build/default/$(FRENCH_LAW_LIB_DIR)/api_web.bc.js french_law_js/french_law.js + cp -f $(ROOT_DIR)/_build/default/$(FRENCH_LAW_LIB_DIR)/api_web.bc.js $(ROOT_DIR)/french_law_js/french_law.js ########################################## # Website assets diff --git a/examples/allocations_familiales/epilogue.catala_fr b/examples/allocations_familiales/epilogue.catala_fr index 8d90cd7a..8377de1e 100644 --- a/examples/allocations_familiales/epilogue.catala_fr +++ b/examples/allocations_familiales/epilogue.catala_fr @@ -25,7 +25,7 @@ champ d'application EnfantLePlusÂgé: champ d'application AllocationsFamiliales: - définition montant_initial_majoration de enfant sous condition + définition montant_initial_métropole_majoration de enfant sous condition non (droit_ouvert_majoration de enfant) conséquence égal à 0 € diff --git a/examples/allocations_familiales/prologue.catala_fr b/examples/allocations_familiales/prologue.catala_fr index e48eed77..105814ea 100644 --- a/examples/allocations_familiales/prologue.catala_fr +++ b/examples/allocations_familiales/prologue.catala_fr @@ -107,8 +107,6 @@ déclaration champ d'application AllocationsFamiliales: # Variables liées à la base des allications familiales contexte droit_ouvert_base condition - contexte montant_versé_base contenu argent - contexte montant_avec_garde_alternée_base contenu argent contexte montant_initial_base contenu argent contexte montant_initial_base_premier_enfant contenu argent contexte montant_initial_base_deuxième_enfant contenu argent @@ -116,6 +114,8 @@ déclaration champ d'application AllocationsFamiliales: contexte rapport_enfants_total_moyen contenu décimal contexte nombre_moyen_enfants contenu décimal contexte nombre_total_enfants contenu décimal + contexte montant_avec_garde_alternée_base contenu argent + contexte montant_versé_base contenu argent # Variables liées à l'allocation forfaitaire contexte droit_ouvert_forfaitaire condition dépend de Enfant @@ -123,16 +123,17 @@ déclaration champ d'application AllocationsFamiliales: # Variables liées aux majorations des allocations familiales contexte droit_ouvert_majoration condition dépend de Enfant - contexte montant_versé_majoration contenu argent - contexte montant_avec_garde_alternée_majoration contenu argent dépend de Enfant + contexte montant_initial_métropole_majoration contenu argent dépend de Enfant contexte montant_initial_majoration contenu argent dépend de Enfant + contexte montant_avec_garde_alternée_majoration contenu argent dépend de Enfant + contexte montant_versé_majoration contenu argent # Variables liées au complément dégressif contexte droit_ouvert_complément condition - contexte montant_versé_complément_pour_base_et_majoration contenu argent contexte montant_base_complément_pour_base_et_majoration contenu argent - contexte montant_versé_complément_pour_forfaitaire contenu argent contexte complément_dégressif contenu argent dépend de argent + contexte montant_versé_complément_pour_base_et_majoration contenu argent + contexte montant_versé_complément_pour_forfaitaire contenu argent # Sous-champs d'applications contexte prestations_familiales champ d'application PrestationsFamiliales diff --git a/examples/allocations_familiales/securite_sociale_D.catala_fr b/examples/allocations_familiales/securite_sociale_D.catala_fr index fcab28ee..e911e5ef 100644 --- a/examples/allocations_familiales/securite_sociale_D.catala_fr +++ b/examples/allocations_familiales/securite_sociale_D.catala_fr @@ -51,7 +51,7 @@ prestations familiales ; champ d'application AllocationsFamiliales sous condition ressources_ménage <=€ plafond_I_d521_3: - définition montant_initial_majoration de enfant + définition montant_initial_métropole_majoration de enfant sous condition droit_ouvert_majoration de enfant conséquence égal à @@ -92,7 +92,7 @@ champ d'application AllocationsFamiliales sous condition (ressources_ménage >€ plafond_I_d521_3) et (ressources_ménage <=€ plafond_II_d521_3): - définition montant_initial_majoration de enfant sous condition + définition montant_initial_métropole_majoration de enfant sous condition droit_ouvert_majoration de enfant conséquence égal à prestations_familiales.base_mensuelle *€ 8 % @@ -128,7 +128,7 @@ prestations familiales. champ d'application AllocationsFamiliales sous condition ressources_ménage >€ plafond_II_d521_3: - définition montant_initial_majoration de enfant sous condition + définition montant_initial_métropole_majoration de enfant sous condition droit_ouvert_majoration de enfant conséquence égal à prestations_familiales.base_mensuelle *€ 4 % @@ -354,8 +354,10 @@ champ d'application AllocationsFamiliales : sous condition prestations_familiales.régime_outre_mer_l751_1 conséquence égal à âge_minimum_alinéa_1_l521_3_outre_mer de enfant - définition - montant_initial_majoration de enfant + définition montant_initial_majoration de enfant égal à + montant_initial_métropole_majoration de enfant + + exception définition montant_initial_majoration de enfant sous condition (droit_ouvert_majoration de enfant) et prestations_familiales.régime_outre_mer_l751_1 et diff --git a/examples/allocations_familiales/tests/tests_allocations_familiales.catala_fr b/examples/allocations_familiales/tests/tests_allocations_familiales.catala_fr index 5a7b3a9d..afd3ec4e 100644 --- a/examples/allocations_familiales/tests/tests_allocations_familiales.catala_fr +++ b/examples/allocations_familiales/tests/tests_allocations_familiales.catala_fr @@ -171,5 +171,26 @@ champ d'application Test8: règle f.personne_charge_effective_permanente_est_parent rempli assertion f.montant_versé = 197,74€ +déclaration champ d'application Test9: + contexte f champ d'application InterfaceAllocationsFamiliales +champ d'application Test9: + définition f.enfants égal à [EnfantEntrée { + -- d_identifiant: 0 + -- d_date_de_naissance: |2001-07-27| + -- d_rémuneration_mensuelle: 1258€ + -- d_prise_en_charge: ServicesSociauxAllocationVerséeAuxServicesSociaux + -- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai + };EnfantEntrée { + -- d_identifiant: 1 + -- d_date_de_naissance: |2008-04-27| + -- d_rémuneration_mensuelle: 1766€ + -- d_prise_en_charge: ServicesSociauxAllocationVerséeAuxServicesSociaux + -- d_a_déjà_ouvert_droit_aux_allocations_familiales: vrai + }] + définition f.ressources_ménage égal à 75786 € + définition f.date_courante égal à |2020-05-01| + définition f.résidence égal à Guadeloupe + règle f.personne_charge_effective_permanente_est_parent rempli + assertion f.montant_versé = 0€ ``` diff --git a/french_law_js/allocations_familiales.js b/french_law_js/allocations_familiales.js index bc3dca9c..31e2a89b 100644 --- a/french_law_js/allocations_familiales.js +++ b/french_law_js/allocations_familiales.js @@ -27,6 +27,7 @@ suite personneQuiAssumeLaChargeEffectivePermanenteEstParent: true, personneQuiAssumeLaChargeEffectivePermanenteRemplitConditionsTitreISecuriteSociale: true, }); + Law.resetLog(true); }) .on("cycle", function (event) { console.log(String(event.target)); diff --git a/french_law_js/french_law.js b/french_law_js/french_law.js index c007effc..c5297dc9 100644 --- a/french_law_js/french_law.js +++ b/french_law_js/french_law.js @@ -1,136 +1,136 @@ // Generated by js_of_ocaml 3.9.1 -(function(m){"use strict";var -cd=1582,gc="src/time_Zone.ml",gQ=1e14,gw="Invalid_argument",gx=" is too large for shifting.",gv="0.08",cW="Map.bal",d7=1255,ed="<",by=255,gP=0x800,gu="577500",b8=2019,d6="jsError",aF=0x8000,gt="%ni",cc=146097,g5=43200.,bB=256,ea="ml_z_overflow",gO=0.012,B=86400.,gb="End_of_file",aG=2020,ga="Failure",al=0xff,gs=-45,ej=-12,g4="559500",gr="582700",g3=992015837,o="0",ec=0xf,ei="0.5",ce=128,cS=-48,f$=0xdc00,gq="Sys_blocked_io",g2="fd ",d$="0.0588",v=248,O="camlinternalFormat.ml",gN="Division_by_zero",c8=">",bD=153,g1=1027,f_="Sys_error",gM="x",gp=246,aS=60.,go="%u",gL="%d",gn=3268,f9=32082,bc=1900,gK="buffer.ml",bk="2",b9=127,b_=1024,ag="1",c7="e",cR=120,d5=103,gm=" : flags Open_rdonly and Open_wronly are not compatible",c2=127686388,f8="16",gJ=102,g0="([^/]*)",d4=512,W="-",f7=0x7ff0,ba=803994948,gl=" : file already exists",gI=101,aW=0xffffff,f6="0x",gZ=-43,c6=86400,gY="Out_of_memory",bl=1e7,gX="inf",c1=254,eh="index out of bounds",at=100,c5="_bigarr02",f5="%Li",gH=" : flags Open_text and Open_binary are not compatible",cb="3",gW=0xffffffff,gG="169.",gk=2147483647,bb=0.5,aI=0xffff,c4=417088404,f4="str.ml",gj=12520,gV=400,gi=-46,aa=3600,cQ="_z",gE="Unix.Unix_error",gF="computeAllocationsFamiliales",gD="0.55",gU="infinity",ar=1000,h="",gC="Stack_overflow",d_="^",a$=3600.,gh=86400000,bz=0x3f,gB=-97,gA="Not_found",eg=124,ca=1461,gg="Match_failure",f2=32044,f3=", ",c0="1.",f1="static/",aV=2021,ef=252,aX=".",aU="+",gz=2440588,gT=0xf0,f0="src/date.ml",bC="12.",gf="%li",gy=1026,c3=365,cZ="Invalid integer: ",cY=2440587.5,ee=-32,aR=" ",as=0x80,aH=1023,fZ="Undefined_recursive_module",cV=2299161,d9="nan",gS=969837588,cX="src/calendar_builder.ml",ge=0xe0,gd=0xdfff,aT="/",eb="compare: functional value",gR="Assert_failure",fY="0.16",cU=2400000.5,b$="0.",fX="%i",d8=1073741823,bA=529348384,cT=250;function -sk(d,b,e,c,f){if(c<=b)for(var +(function(p){"use strict";var +ip=219,cV=1582,ho="src/time_Zone.ml",hZ=214,io=1e14,hX="Invalid_argument",hY=" is too large for shifting.",hW="0.08",dJ="Map.bal",im="Arr\xc3\xaat\xc3\xa9 du 14 d\xc3\xa9cembre 2020 relatif au montant des plafonds de ressources de certaines prestations familiales et aux tranches du bar\xc3\xa8me applicable au recouvrement des indus et \xc3\xa0 la saisie des prestations",hn="allocations_familiales",e2=1255,dR="Instructions minist\xc3\xa9rielles",fc="<",b5=255,O="Code de la s\xc3\xa9curit\xc3\xa9 sociale",il=0x800,iM="Article L521-1",hV="577500",cF=2019,e1="jsError",a3=0x8000,hU="%ni",hm="Partie r\xc3\xa9glementaire - D\xc3\xa9crets en Conseil d'Etat",_="droit_ouvert_majoration",cU=146097,iL=43200.,b8=256,e_="ml_z_overflow",ij="Article L521-3",ik=0.012,J=86400.,hl="End_of_file",a4=2020,hk="Failure",hT="Instruction interministerielle no DSS/SD2B/2019/261 du 18 d\xc3\xa9cembre 2019\nrelative \xc3\xa0 la revalorisation au 1er janvier 2020 des plafonds de ressources\nd\xe2\x80\x99attribution de certaines prestations familiales servies en m\xc3\xa9tropole,\nen Guadeloupe, en Guyane, en Martinique, \xc3\xa0 La R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy,\n\xc3\xa0 Saint-Martin et \xc3\xa0 Mayotte",aF=0xff,hj=129,hS=-45,fl=-12,hi=218,fb=204,cT="conditions_hors_\xc3\xa2ge",iK="559500",bH="Article 1",dZ="Titre 5 : Dispositions particuli\xc3\xa8res \xc3\xa0 la Guadeloupe, \xc3\xa0 la Guyane, \xc3\xa0 la Martinique, \xc3\xa0 La R\xc3\xa9union, \xc3\xa0 Saint-Barth\xc3\xa9lemy et \xc3\xa0 Saint-Martin",b4="\xc3\xa2ge_minimum_alin\xc3\xa9a_1_l521_3_m\xc3\xa9tropole",hQ="582700",hR=167,iJ=992015837,hP=274,r="0",dQ="EnfantLePlus\xc3\x82g\xc3\xa9",dI="date_courante",fa=0xf,fk="0.5",b$=128,dE=-48,hh=0xdc00,hO="Sys_blocked_io",iI="fd ",cS="montant_initial_m\xc3\xa9tropole_majoration",e8="Chapitre 2 : Champ d'application",e9="0.0588",B=248,ae="camlinternalFormat.ml",ii="Division_by_zero",dY=">",b_=153,iH=1027,hg="Sys_error",hN="montant_vers\xc3\xa9",ih="x",iG="enfants_\xc3\xa0_charge",aV="Chapitre 5 : Prestations familiales et prestations assimil\xc3\xa9es",hf=317,e0="Article D521-2",hM=193,bR="Article D755-5",eZ="Titre 1 : Champ d'application - G\xc3\xa9n\xc3\xa9ralit\xc3\xa9s",hL=246,bf=60.,hJ="%u",hK="resetLog",ig="%d",e="AllocationsFamiliales",hI=3268,he=32082,bG=1900,hH="./securite_sociale_R.catala_fr",ie="buffer.ml",v="Livre 5 : Prestations familiales et prestations assimil\xc3\xa9es",id=119,bP="2",cI=127,cJ=1024,cR="montant_avec_garde_altern\xc3\xa9e_majoration",ic="version_avril_2008",ay="1",dX="e",dD=120,eY=103,hG=" : flags Open_rdonly and Open_wronly are not compatible",dP=127686388,iF="ressources_m\xc3\xa9nage",hd="16",ib=102,iE="([^/]*)",eX=512,hE="D\xc3\xa9cret n\xc2\xb0 2019-1387 du 18 d\xc3\xa9cembre 2019 portant rel\xc3\xa8vement du salaire minimum de croissance",hF=240,am="-",hc=0x7ff0,bE=803994948,bC="D\xc3\xa9crets divers",hD=" : file already exists",dO=101,iD="smic",hC=184,iC="Article D521-3",bk=0xffffff,hb="0x",iB=-43,N="./securite_sociale_D.catala_fr",dW=86400,iA="Out_of_memory",ha="D\xc3\xa9cret n\xc2\xb0 2020-1598 du 16 d\xc3\xa9cembre 2020 portant rel\xc3\xa8vement du salaire minimum de croissance",bQ=1e7,iz="inf",eW=354,cQ=254,fj="index out of bounds",aO=100,dV="_bigarr02",g$="%Li",ia=" : flags Open_text and Open_binary are not compatible",cP="3",M="Partie r\xc3\xa9glementaire - D\xc3\xa9crets simples",iy=0xffffffff,hB=168,h$="169.",hz=2147483647,hA=208,bF=0.5,aN="Article D521-1",a7=0xffff,h_=188,aM="Livre 7 : R\xc3\xa9gimes divers - Dispositions diverses",dU=417088404,X="input",g_="str.ml",hy=12520,ix=400,hx=-46,g9="personne_charge_effective_permanente_remplit_titre_I",cO="\xc3\xa2ge_minimum_alin\xc3\xa9a_1_l521_3_outre_mer",as=3600,e7="AllocationFamilialesAvril2008",y="Chapitre 1er : Allocations familiales",h9="prestations_familiales",cN="est_enfant_le_plus_\xc3\xa2g\xc3\xa9",hw="retrieveLog",g8="D\xc3\xa9cret n\xc2\xb0 2018-1173 du 19 d\xc3\xa9cembre 2018 portant rel\xc3\xa8vement du salaire minimum de croissance",dC="_z",h7="Unix.Unix_error",h8="computeAllocationsFamiliales",h6="0.55",bn="\xc3\xa2ge_minimum_alin\xc3\xa9a_1_l521_3",iw="infinity",cM="droit_ouvert",aK=1000,hv=224,j="",h5="Stack_overflow",e6="^",bD=3600.,$="Partie l\xc3\xa9gislative",hu=86400000,h4="Interface du programme",fi=264,bB="Titre 5 : D\xc3\xa9partements d'outre-mer",b6=0x3f,h3=-97,h2="Not_found",fh=124,ap="InterfaceAllocationsFamiliales",e5="./epilogue.catala_fr",cL=1461,fg="Article L512-3",aP="./decrets_divers.catala_fr",z="Titre 2 : Prestations g\xc3\xa9n\xc3\xa9rales d'entretien",ht="Match_failure",iv="enfants",g6=32044,g7=", ",dN="1.",g5="static/",iu="personne_charge_effective_permanente_est_parent",bj=2021,it="enfant_le_plus_\xc3\xa2g\xc3\xa9",ff=252,bm=".",cH="montant_initial_majoration",bi="+",h1=2440588,is=0xf0,g4="src/date.ml",b9="12.",P="PrestationsFamiliales",cW=110,eV="\xc3\x89pilogue",hs="%li",h0=1026,bh="prise_en_compte",a5="Article L521-2",dT=365,cG="Smic",dM="Invalid integer: ",dL=2440587.5,fe=-32,be=" ",aL=0x80,a6=1023,g3="Undefined_recursive_module",W="output",aa="./securite_sociale_L.catala_fr",dH=2299161,e4="nan",ir=969837588,dK="src/calendar_builder.ml",hr=0xe0,hq=0xdfff,bl="compl\xc3\xa9ment_d\xc3\xa9gressif",bg="/",e$="compare: functional value",fd="Article L755-12",iq="Assert_failure",aE="droit_ouvert_forfaitaire",g2="0.16",dG=2400000.5,cK="0.",g1="%i",e3=1073741823,b7=529348384,dS="r\xc3\xa9sidence",hp=225,dF=250;function +x6(d,b,e,c,f){if(c<=b)for(var a=1;a<=f;a++)e[c+a]=d[b+a];else for(var a=f;a>=1;a--)e[c+a]=d[b+a];return 0}function -sn(e,f,d){var +x9(e,f,d){var a=new Array(d+1);a[0]=0;for(var b=1,c=f+1;b<=d;b++,c++)a[b]=e[c];return a}function -de(c,b,a){var +d9(c,b,a){var d=String.fromCharCode;if(b==0&&a<=4096&&a==c.length)return d.apply(null,c);var -e=h;for(;0=b.l||b.t==2&&c>=b.c.length)){b.c=d.t==4?de(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else -if(b.t==2&&f==b.c.length){b.c+=d.t==4?de(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else{if(b.t!=4)c9(b);var +bJ(d,e,b,f,c){if(c==0)return 0;if(f==0&&(c>=b.l||b.t==2&&c>=b.c.length)){b.c=d.t==4?d9(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else +if(b.t==2&&f==b.c.length){b.c+=d.t==4?d9(d.c,e,c):e==0&&d.c.length==c?d.c:d.c.substr(e,c);b.t=b.c.length==b.l?0:2}else{if(b.t!=4)d0(b);var g=d.c,h=b.c;if(d.t==4)if(f<=e)for(var a=0;a=0;a--)h[f+a]=g[e+a];else{var i=Math.min(c,g.length-e);for(var a=0;a>=1;if(b==0)return d;a+=a;c++;if(c==9)a.slice(0,1)}}function -bh(a){if(a.t==2)a.c+=bJ(a.l-a.c.length,"\0");else -a.c=de(a.c,0,a.c.length);a.t=0}function -hd(a,b){if(a===b)return 1;a.t&6&&bh(a);b.t&6&&bh(b);return a.c==b.c?1:0}function -s6(b,a){throw[0,b,a]}function -hx(a){if(a.length<24){for(var -b=0;bb9)return false;return true}else +bp(a){return a}function +bK(a,b,c,d,e){bJ(bp(a),b,c,d,e);return 0}function +cg(b,a){if(b==0)return j;if(a.repeat)return a.repeat(b);var +d=j,c=0;for(;;){if(b&1)d+=a;b>>=1;if(b==0)return d;a+=a;c++;if(c==9)a.slice(0,1)}}function +bM(a){if(a.t==2)a.c+=cg(a.l-a.c.length,"\0");else +a.c=d9(a.c,0,a.c.length);a.t=0}function +iW(a,b){if(a===b)return 1;a.t&6&&bM(a);b.t&6&&bM(b);return a.c==b.c?1:0}function +yP(b,a){throw[0,b,a]}function +jd(a){if(a.length<24){for(var +b=0;bcI)return false;return true}else return!/[^\x00-\x7f]/.test(a)}function -eA(e){for(var -k=h,c=h,g,f,i,a,b=0,j=e.length;bd4){c.substr(0,1);k+=c;c=h;k+=e.slice(b,d)}else -c+=e.slice(b,d);if(d==j)break;b=d}a=1;if(++b=0xd7ff&&a<0xe000)a=2}else{a=3;if(++b0x10ffff)a=3}}}}}if(a<4){b-=a;c+="\ufffd"}else -if(a>aI)c+=String.fromCharCode(0xd7c0+(a>>10),f$+(a&0x3FF));else -c+=String.fromCharCode(a);if(c.length>b_){c.substr(0,1);k+=c;c=h}}return k+c}function -aY(c,a,b){this.t=c;this.c=a;this.l=b}aY.prototype.toString=function(){switch(this.t){case -9:return this.c;default:bh(this);case -0:if(hx(this.c)){this.t=9;return this.c}this.t=8;case -8:return this.c}};aY.prototype.toUtf16=function(){var -a=this.toString();if(this.t==9)return a;return eA(a)};aY.prototype.slice=function(){var +fE(e){for(var +k=j,c=j,g,f,h,a,b=0,i=e.length;beX){c.substr(0,1);k+=c;c=j;k+=e.slice(b,d)}else +c+=e.slice(b,d);if(d==i)break;b=d}a=1;if(++b=0xd7ff&&a<0xe000)a=2}else{a=3;if(++b0x10ffff)a=3}}}}}if(a<4){b-=a;c+="\ufffd"}else +if(a>a7)c+=String.fromCharCode(0xd7c0+(a>>10),hh+(a&0x3FF));else +c+=String.fromCharCode(a);if(c.length>cJ){c.substr(0,1);k+=c;c=j}}return k+c}function +bo(c,a,b){this.t=c;this.c=a;this.l=b}bo.prototype.toString=function(){switch(this.t){case +9:return this.c;default:bM(this);case +0:if(jd(this.c)){this.t=9;return this.c}this.t=8;case +8:return this.c}};bo.prototype.toUtf16=function(){var +a=this.toString();if(this.t==9)return a;return fE(a)};bo.prototype.slice=function(){var a=this.t==4?this.c.slice():this.c;return new -aY(this.t,a,this.l)};function -he(a){return new -aY(0,a,a.length)}function -a(a){return he(a)}function -ex(c,b){s6(c,a(b))}var -G=[0];function -H(a){ex(G.Invalid_argument,a)}function -hb(){H(eh)}function -cg(a,b){switch(a.t&6){default:if(b>=a.c.length)return 0;case +bo(this.t,a,this.l)};function +iX(a){return new +bo(0,a,a.length)}function +a(a){return iX(a)}function +fB(c,b){yP(c,a(b))}var +S=[0];function +T(a){fB(S.Invalid_argument,a)}function +iU(){T(fj)}function +cY(a,b){switch(a.t&6){default:if(b>=a.c.length)return 0;case 0:return a.c.charCodeAt(b);case 4:return a.c[b]}}function -bg(b,a){if(a>>>0>=b.l)hb();return cg(b,a)}function -E(a,c,b){b&=al;if(a.t!=4){if(c==a.c.length){a.c+=String.fromCharCode(b);if(c+1==a.l)a.t=0;return 0}c9(a)}a.c[c]=b;return 0}function -av(b,a,c){if(a>>>0>=b.l)hb();return E(b,a,c)}function -a0(c,a){if(c.fun)return a0(c.fun,a);if(typeof +bL(b,a){if(a>>>0>=b.l)iU();return cY(b,a)}function +Q(a,c,b){b&=aF;if(a.t!=4){if(c==a.c.length){a.c+=String.fromCharCode(b);if(c+1==a.l)a.t=0;return 0}d0(a)}a.c[c]=b;return 0}function +aR(b,a,c){if(a>>>0>=b.l)iU();return Q(b,a,c)}function +bq(c,a){if(c.fun)return bq(c.fun,a);if(typeof c!=="function")return c;var b=c.length|0;if(b===0)return c.apply(null,a);var e=a.length|0,d=b-e|0;if(d==0)return c.apply(null,a);else -if(d<0)return a0(c.apply(null,a.slice(0,b)),a.slice(b));else +if(d<0)return bq(c.apply(null,a.slice(0,b)),a.slice(b));else return function(){var e=arguments.length==0?1:arguments.length,d=new Array(a.length+e);for(var b=0;b>>0>=a.length-1)cf();return a}function -ss(a){if(isFinite(a)){if(Math.abs(a)>=2.2250738585072014e-308)return 0;if(a!=0)return 1;return 2}return isNaN(a)?4:3}function -az(a){if((a.t&6)!=0)bh(a);return a.c}var -tl=Math.log2&&Math.log2(1.1235582092889474E+307)==1020;function -tj(a){if(tl)return Math.floor(Math.log2(a));var +b=0;b>>0>=a.length-1)cX();return a}function +yc(a){if(isFinite(a)){if(Math.abs(a)>=2.2250738585072014e-308)return 0;if(a!=0)return 1;return 2}return isNaN(a)?4:3}function +aW(a){if((a.t&6)!=0)bM(a);return a.c}var +y6=Math.log2&&Math.log2(1.1235582092889474E+307)==1020;function +y4(a){if(y6)return Math.floor(Math.log2(a));var b=0;if(a==0)return-Infinity;if(a>=1)while(a>=2){a/=2;b++}else while(a<1){a*=2;b--}return b}function -ep(c){var -a=new(m.Float32Array)(1);a[0]=c;var -b=new(m.Int32Array)(a.buffer);return b[0]|0}var -hn=Math.pow(2,-24);function -dd(a){throw a}function -bH(){dd(G.Division_by_zero)}function -i(b,c,a){this.lo=b&aW;this.mi=c&aW;this.hi=a&aI}i.prototype.caml_custom="_j";i.prototype.copy=function(){return new -i(this.lo,this.mi,this.hi)};i.prototype.ucompare=function(a){if(this.hi>a.hi)return 1;if(this.hia.mi)return 1;if(this.mia.lo)return 1;if(this.loc)return 1;if(ba.mi)return 1;if(this.mia.lo)return 1;if(this.loa.hi)return 1;if(this.hia.mi)return 1;if(this.mia.lo)return 1;if(this.loc)return 1;if(ba.mi)return 1;if(this.mia.lo)return 1;if(this.lo>24),c=-this.hi+(b>>24);return new -i(a,b,c)};i.prototype.add=function(a){var +l(a,b,c)};l.prototype.add=function(a){var b=this.lo+a.lo,c=this.mi+a.mi+(b>>24),d=this.hi+a.hi+(c>>24);return new -i(b,c,d)};i.prototype.sub=function(a){var +l(b,c,d)};l.prototype.sub=function(a){var b=this.lo-a.lo,c=this.mi-a.mi+(b>>24),d=this.hi-a.hi+(c>>24);return new -i(b,c,d)};i.prototype.mul=function(a){var -b=this.lo*a.lo,c=(b*hn|0)+this.mi*a.lo+this.lo*a.mi,d=(c*hn|0)+this.hi*a.lo+this.mi*a.mi+this.lo*a.hi;return new -i(b,c,d)};i.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0};i.prototype.isNeg=function(){return this.hi<<16<0};i.prototype.and=function(a){return new -i(this.lo&a.lo,this.mi&a.mi,this.hi&a.hi)};i.prototype.or=function(a){return new -i(this.lo|a.lo,this.mi|a.mi,this.hi|a.hi)};i.prototype.xor=function(a){return new -i(this.lo^a.lo,this.mi^a.mi,this.hi^a.hi)};i.prototype.shift_left=function(a){a=a&63;if(a==0)return this;if(a<24)return new -i(this.lo<>24-a,this.hi<>24-a);if(a<48)return new -i(0,this.lo<>48-a);return new -i(0,0,this.lo<>a|this.mi<<24-a,this.mi>>a|this.hi<<24-a,this.hi>>a);if(a<48)return new -i(this.mi>>a-24|this.hi<<48-a,this.hi>>a-24,0);return new -i(this.hi>>a-48,0,0)};i.prototype.shift_right=function(a){a=a&63;if(a==0)return this;var +l(b,c,d)};l.prototype.mul=function(a){var +b=this.lo*a.lo,c=(b*i6|0)+this.mi*a.lo+this.lo*a.mi,d=(c*i6|0)+this.hi*a.lo+this.mi*a.mi+this.lo*a.hi;return new +l(b,c,d)};l.prototype.isZero=function(){return(this.lo|this.mi|this.hi)==0};l.prototype.isNeg=function(){return this.hi<<16<0};l.prototype.and=function(a){return new +l(this.lo&a.lo,this.mi&a.mi,this.hi&a.hi)};l.prototype.or=function(a){return new +l(this.lo|a.lo,this.mi|a.mi,this.hi|a.hi)};l.prototype.xor=function(a){return new +l(this.lo^a.lo,this.mi^a.mi,this.hi^a.hi)};l.prototype.shift_left=function(a){a=a&63;if(a==0)return this;if(a<24)return new +l(this.lo<>24-a,this.hi<>24-a);if(a<48)return new +l(0,this.lo<>48-a);return new +l(0,0,this.lo<>a|this.mi<<24-a,this.mi>>a|this.hi<<24-a,this.hi>>a);if(a<48)return new +l(this.mi>>a-24|this.hi<<48-a,this.hi>>a-24,0);return new +l(this.hi>>a-48,0,0)};l.prototype.shift_right=function(a){a=a&63;if(a==0)return this;var c=this.hi<<16>>16;if(a<24)return new -i(this.lo>>a|this.mi<<24-a,this.mi>>a|c<<24-a,this.hi<<16>>a>>>16);var +l(this.lo>>a|this.mi<<24-a,this.mi>>a|c<<24-a,this.hi<<16>>a>>>16);var b=this.hi<<16>>31;if(a<48)return new -i(this.mi>>a-24|this.hi<<48-a,this.hi<<16>>a-24>>16,b&aI);return new -i(this.hi<<16>>a-32,b,b)};i.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23;this.mi=(this.mi<<1|this.lo>>23)&aW;this.lo=this.lo<<1&aW};i.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&aW;this.mi=(this.mi>>>1|this.hi<<23)&aW;this.hi=this.hi>>>1};i.prototype.udivmod=function(e){var +l(this.mi>>a-24|this.hi<<48-a,this.hi<<16>>a-24>>16,b&a7);return new +l(this.hi<<16>>a-32,b,b)};l.prototype.lsl1=function(){this.hi=this.hi<<1|this.mi>>23;this.mi=(this.mi<<1|this.lo>>23)&bk;this.lo=this.lo<<1&bk};l.prototype.lsr1=function(){this.lo=(this.lo>>>1|this.mi<<23)&bk;this.mi=(this.mi>>>1|this.hi<<23)&bk;this.hi=this.hi>>>1};l.prototype.udivmod=function(e){var c=0,b=this.copy(),a=e.copy(),d=new -i(0,0,0);while(b.ucompare(a)>0){c++;a.lsl1()}while(c>=0){c--;d.lsl1();if(b.ucompare(a)>=0){d.lo++;b=b.sub(a)}a.lsr1()}return{quotient:d,modulus:b}};i.prototype.div=function(a){var -b=this;if(a.isZero())bH();var -d=b.hi^a.hi;if(b.hi&aF)b=b.neg();if(a.hi&aF)a=a.neg();var -c=b.udivmod(a).quotient;if(d&aF)c=c.neg();return c};i.prototype.mod=function(b){var -a=this;if(b.isZero())bH();var -d=a.hi;if(a.hi&aF)a=a.neg();if(b.hi&aF)b=b.neg();var -c=a.udivmod(b).modulus;if(d&aF)c=c.neg();return c};i.prototype.toInt=function(){return this.lo|this.mi<<24};i.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo};i.prototype.toArray=function(){return[this.hi>>8,this.hi&al,this.mi>>16,this.mi>>8&al,this.mi&al,this.lo>>16,this.lo>>8&al,this.lo&al]};i.prototype.lo32=function(){return this.lo|(this.mi&al)<<24};i.prototype.hi32=function(){return this.mi>>>8&aI|this.hi<<16};function -ci(b,c,a){return new -i(b,c,a)}function -c$(a){if(!isFinite(a)){if(isNaN(a))return ci(1,0,f7);return a>0?ci(0,0,f7):ci(0,0,0xfff0)}var -f=a==0&&1/a==-Infinity?aF:a>=0?0:aF;if(f)a=-a;var -b=tj(a)+aH;if(b<=0){b=0;a/=Math.pow(2,-gy)}else{a/=Math.pow(2,b-g1);if(a<16){a*=2;b-=1}if(b==0)a/=2}var +l(0,0,0);while(b.ucompare(a)>0){c++;a.lsl1()}while(c>=0){c--;d.lsl1();if(b.ucompare(a)>=0){d.lo++;b=b.sub(a)}a.lsr1()}return{quotient:d,modulus:b}};l.prototype.div=function(a){var +b=this;if(a.isZero())ce();var +d=b.hi^a.hi;if(b.hi&a3)b=b.neg();if(a.hi&a3)a=a.neg();var +c=b.udivmod(a).quotient;if(d&a3)c=c.neg();return c};l.prototype.mod=function(b){var +a=this;if(b.isZero())ce();var +d=a.hi;if(a.hi&a3)a=a.neg();if(b.hi&a3)b=b.neg();var +c=a.udivmod(b).modulus;if(d&a3)c=c.neg();return c};l.prototype.toInt=function(){return this.lo|this.mi<<24};l.prototype.toFloat=function(){return(this.hi<<16)*Math.pow(2,32)+this.mi*Math.pow(2,24)+this.lo};l.prototype.toArray=function(){return[this.hi>>8,this.hi&aF,this.mi>>16,this.mi>>8&aF,this.mi&aF,this.lo>>16,this.lo>>8&aF,this.lo&aF]};l.prototype.lo32=function(){return this.lo|(this.mi&aF)<<24};l.prototype.hi32=function(){return this.mi>>>8&a7|this.hi<<16};function +c0(b,c,a){return new +l(b,c,a)}function +d3(a){if(!isFinite(a)){if(isNaN(a))return c0(1,0,hc);return a>0?c0(0,0,hc):c0(0,0,0xfff0)}var +f=a==0&&1/a==-Infinity?a3:a>=0?0:a3;if(f)a=-a;var +b=y4(a)+a6;if(b<=0){b=0;a/=Math.pow(2,-h0)}else{a/=Math.pow(2,b-iH);if(a<16){a*=2;b-=1}if(b==0)a/=2}var d=Math.pow(2,24),c=a|0;a=(a-c)*d;var e=a|0;a=(a-e)*d;var -g=a|0;c=c&ec|f|b<<4;return ci(g,e,c)}function -ck(a){return a.toArray()}function -ha(c,b,g){c.write(32,b.dims.length);c.write(32,b.kind|b.layout<<8);if(b.caml_custom==c5)for(var -a=0;a>4;if(c==2047)return(f|g|b&ec)==0?b&aF?-Infinity:Infinity:NaN;var -e=Math.pow(2,-24),a=(f*e+g)*e+(b&ec);if(c>0){a+=16;a*=Math.pow(2,c-g1)}else -a*=Math.pow(2,-gy);if(b&aF)a=-a;return a}function -ek(b){var +a(e*iR(c));return d}function +fs(c){var +a=new(p.Int32Array)(1);a[0]=c;var +b=new(p.Float32Array)(a.buffer);return b[0]}function +c1(a){return new +l(a[7]<<0|a[6]<<8|a[5]<<16,a[4]<<0|a[3]<<8|a[2]<<16,a[1]<<0|a[0]<<8)}function +ft(d){var +f=d.lo,g=d.mi,b=d.hi,c=(b&0x7fff)>>4;if(c==2047)return(f|g|b&fa)==0?b&a3?-Infinity:Infinity:NaN;var +e=Math.pow(2,-24),a=(f*e+g)*e+(b&fa);if(c>0){a+=16;a*=Math.pow(2,c-iH)}else +a*=Math.pow(2,-h0);if(b&a3)a=-a;return a}function +fm(b){var d=b.length,c=1;for(var -a=0;a>>24&al|(a&aI)<<8,a>>>16&aI)}function -es(a){return a.hi32()}function -et(a){return a.lo32()}var -sp=c5;function -bd(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}bd.prototype.caml_custom=sp;bd.prototype.offset=function(b){var +a=0;a>>24&aF|(a&a7)<<8,a>>>16&a7)}function +fu(a){return a.hi32()}function +fv(a){return a.lo32()}var +x$=dV;function +bI(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}bI.prototype.caml_custom=x$;bI.prototype.offset=function(b){var c=0;if(typeof b==="number")b=[b];if(!(b instanceof -Array))H("bigarray.js: invalid offset");if(this.dims.length!=b.length)H("Bigarray.get/set: bad number of dimensions");if(this.layout==0)for(var -a=0;a=this.dims[a])cf();c=c*this.dims[a]+b[a]}else +Array))T("bigarray.js: invalid offset");if(this.dims.length!=b.length)T("Bigarray.get/set: bad number of dimensions");if(this.layout==0)for(var +a=0;a=this.dims[a])cX();c=c*this.dims[a]+b[a]}else for(var -a=this.dims.length-1;a>=0;a--){if(b[a]<1||b[a]>this.dims[a])cf();c=c*this.dims[a]+(b[a]-1)}return c};bd.prototype.get=function(a){switch(this.kind){case +a=this.dims.length-1;a>=0;a--){if(b[a]<1||b[a]>this.dims[a])cX();c=c*this.dims[a]+(b[a]-1)}return c};bI.prototype.get=function(a){switch(this.kind){case 7:var -d=this.data[a*2+0],b=this.data[a*2+1];return hm(d,b);case +d=this.data[a*2+0],b=this.data[a*2+1];return i5(d,b);case 10:case 11:var -e=this.data[a*2+0],c=this.data[a*2+1];return[c1,e,c];default:return this.data[a]}};bd.prototype.set=function(a,b){switch(this.kind){case -7:this.data[a*2+0]=et(b);this.data[a*2+1]=es(b);break;case +e=this.data[a*2+0],c=this.data[a*2+1];return[cQ,e,c];default:return this.data[a]}};bI.prototype.set=function(a,b){switch(this.kind){case +7:this.data[a*2+0]=fv(b);this.data[a*2+1]=fu(b);break;case 10:case -11:this.data[a*2+0]=b[1];this.data[a*2+1]=b[2];break;default:this.data[a]=b;break}return 0};bd.prototype.fill=function(b){switch(this.kind){case +11:this.data[a*2+0]=b[1];this.data[a*2+1]=b[2];break;default:this.data[a]=b;break}return 0};bI.prototype.fill=function(b){switch(this.kind){case 7:var -c=et(b),e=es(b);if(c==e)this.data.fill(c);else +c=fv(b),e=fu(b);if(c==e)this.data.fill(c);else for(var a=0;ab.data[a])return 1}break}return 0};function -bE(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}bE.prototype=new -bd();bE.prototype.offset=function(a){if(typeof +ca(c,d,b,a){this.kind=c;this.layout=d;this.dims=b;this.data=a}ca.prototype=new +bI();ca.prototype.offset=function(a){if(typeof a!=="number")if(a instanceof Array&&a.length==1)a=a[0];else -H("Ml_Bigarray_c_1_1.offset");if(a<0||a>=this.dims[0])cf();return a};bE.prototype.get=function(a){return this.data[a]};bE.prototype.set=function(a,b){this.data[a]=b;return 0};bE.prototype.fill=function(a){this.data.fill(a);return 0};function -g8(c,d,a,b){var -e=g_(c);if(ek(a)*e!=b.length)H("length doesn't match dims");if(d==0&&a.length==1&&e==1)return new -bE(c,d,a,b);return new -bd(c,d,a,b)}function -bm(a){ex(G.Failure,a)}function -g9(b,v,r){var -i=b.read32s();if(i<0||i>16)bm("input_value: wrong number of bigarray dimensions");var -p=b.read32s(),j=p&al,o=p>>8&1,h=[];if(r==c5)for(var +T("Ml_Bigarray_c_1_1.offset");if(a<0||a>=this.dims[0])cX();return a};ca.prototype.get=function(a){return this.data[a]};ca.prototype.set=function(a,b){this.data[a]=b;return 0};ca.prototype.fill=function(a){this.data.fill(a);return 0};function +iP(c,d,a,b){var +e=iR(c);if(fm(a)*e!=b.length)T("length doesn't match dims");if(d==0&&a.length==1&&e==1)return new +ca(c,d,a,b);return new +bI(c,d,a,b)}function +bS(a){fB(S.Failure,a)}function +iQ(b,v,r){var +i=b.read32s();if(i<0||i>16)bS("input_value: wrong number of bigarray dimensions");var +p=b.read32s(),j=p&aF,o=p>>8&1,h=[];if(r==dV)for(var a=0;a>>32-15;a=aM(a,0x1b873593);b^=a;b=b<<13|b>>>32-13;return(b+(b<<2)|0)+(0xe6546b64|0)|0}function -sz(a,b){a=S(a,et(b));a=S(a,es(b));return a}function -en(a,b){return sz(a,c$(b))}function -g$(c){var -b=ek(c.dims),d=0;switch(c.kind){case +l=ft(c1(e));g.set(a,[cQ,m,l])}break}v[0]=(4+i)*4;return iP(j,o,h,f)}function +iO(a,b,c){return a.compare(b,c)}function +a$(a,b){return Math.imul(a,b)}function +ai(b,a){a=a$(a,0xcc9e2d51|0);a=a<<15|a>>>32-15;a=a$(a,0x1b873593);b^=a;b=b<<13|b>>>32-13;return(b+(b<<2)|0)+(0xe6546b64|0)|0}function +yj(a,b){a=ai(a,fv(b));a=ai(a,fu(b));return a}function +fp(a,b){return yj(a,d3(b))}function +iS(c){var +b=fm(c.dims),d=0;switch(c.kind){case 2:case 3:case -12:if(b>bB)b=bB;var -e=0,a=0;for(a=0;a+4<=c.data.length;a+=4){e=c.data[a+0]|c.data[a+1]<<8|c.data[a+2]<<16|c.data[a+3]<<24;d=S(d,e)}e=0;switch(b&3){case +12:if(b>b8)b=b8;var +e=0,a=0;for(a=0;a+4<=c.data.length;a+=4){e=c.data[a+0]|c.data[a+1]<<8|c.data[a+2]<<16|c.data[a+3]<<24;d=ai(d,e)}e=0;switch(b&3){case 3:e=c.data[a+2]<<16;case 2:e|=c.data[a+1]<<8;case -1:e|=c.data[a+0];d=S(d,e)}break;case +1:e|=c.data[a+0];d=ai(d,e)}break;case 4:case -5:if(b>ce)b=ce;var -e=0,a=0;for(a=0;a+2<=c.data.length;a+=2){e=c.data[a+0]|c.data[a+1]<<16;d=S(d,e)}if((b&1)!=0)d=S(d,c.data[a]);break;case +5:if(b>b$)b=b$;var +e=0,a=0;for(a=0;a+2<=c.data.length;a+=2){e=c.data[a+0]|c.data[a+1]<<16;d=ai(d,e)}if((b&1)!=0)d=ai(d,c.data[a]);break;case 6:if(b>64)b=64;for(var -a=0;a64)b=64;for(var -a=0;a32)b=32;b*=2;for(var -a=0;a64)b=64;for(var -a=0;a32)b=32;for(var -a=0;a0?b(c,f,e):b(f,c,e);if(e&&a!=a)return d;if(+a!=+a)return+a;if((a|0)!=0)return a|0}return d}function -cl(a){return a +c3(a){return a instanceof -aY}function -db(a){return cl(a)}function -hh(a){if(typeof -a==="number")return ar;else -if(cl(a))return ef;else -if(db(a))return 1252;else +bo}function +d5(a){return c3(a)}function +i0(a){if(typeof +a==="number")return aK;else +if(c3(a))return ff;else +if(d5(a))return 1252;else if(a instanceof -Array&&a[0]===a[0]>>>0&&a[0]<=by){var -b=a[0]|0;return b==c1?0:b}else +Array&&a[0]===a[0]>>>0&&a[0]<=b5){var +b=a[0]|0;return b==cQ?0:b}else if(a instanceof -String)return gj;else +String)return hy;else if(typeof -a=="string")return gj;else +a=="string")return hy;else if(a instanceof -Number)return ar;else -if(a&&a.caml_custom)return d7;else +Number)return aK;else +if(a&&a.caml_custom)return e2;else if(a&&a.compare)return 1256;else if(typeof a=="function")return 1247;else if(typeof a=="symbol")return 1251;return 1001}function -da(a,b){if(ab.c?1:0}function -ey(a,b){return hc(a,b)}function -bF(a,b,d){var +d4(a,b){if(ab.c?1:0}function +fC(a,b){return iV(a,b)}function +cb(a,b,d){var e=[];for(;;){if(!(d&&a===b)){var -f=hh(a);if(f==cT){a=a[1];continue}var -g=hh(b);if(g==cT){b=b[1];continue}if(f!==g){if(f==ar){if(g==d7)return hg(a,b,-1,d);return-1}if(g==ar){if(f==d7)return hg(b,a,1,d);return 1}return fb)return 1;if(a!=b){if(!d)return NaN;if(a==a)return 1;if(b==b)return-1}break;case 1251:if(a!==b){if(!d)return NaN;return 1}break;case 1252:var -a=az(a),b=az(b);if(a!==b){if(ab)return 1}break;case +a=aW(a),b=aW(b);if(a!==b){if(ab)return 1}break;case 12520:var a=a.toString(),b=b.toString();if(a!==b){if(ab)return 1}break;case 246:case 254:default:if(a.length!=b.length)return a.length1)e.push(a,b,1);break}}if(e.length==0)return 0;var h=e.pop();b=e.pop();a=e.pop();if(h+10)if(c==0&&(b>=a.l||a.t==2&&b>=a.c.length))if(d==0){a.c=h;a.t=2}else{a.c=bJ(b,String.fromCharCode(d));a.t=b==a.l?0:2}else{if(a.t!=4)c9(a);for(b+=c;c31)H("format_int: format too long");var -a={justify:aU,signstyle:W,filler:aR,alternate:false,base:0,signedconv:false,width:0,uppercase:false,sign:1,prec:-1,conv:"f"};for(var +iY(a,b){return cb(a,b,true)}function +R(a){if(a<0)T("Bytes.create");return new +bo(a?2:9,j,a)}function +i2(b,a){if(a==0)ce();return b/a|0}function +m(a,b){return+(cb(a,b,false)==0)}function +yd(a,c,b,d){if(b>0)if(c==0&&(b>=a.l||a.t==2&&b>=a.c.length))if(d==0){a.c=j;a.t=2}else{a.c=cg(b,String.fromCharCode(d));a.t=b==a.l?0:2}else{if(a.t!=4)d0(a);for(b+=c;c31)T("format_int: format too long");var +a={justify:bi,signstyle:am,filler:be,alternate:false,base:0,signedconv:false,width:0,uppercase:false,sign:1,prec:-1,conv:"f"};for(var c=0;c=0&&b<=9){a.width=a.width*10+b;c++}c--;break;case".":a.prec=0;c++;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.prec=a.prec*10+b;c++}c--;case"d":case"i":a.signedconv=true;case"u":a.base=10;break;case"x":a.base=16;break;case"X":a.base=16;a.uppercase=true;break;case"o":a.base=8;break;case"e":case"f":case"g":a.signedconv=true;a.conv=b;break;case"E":case"F":case"G":a.signedconv=true;a.uppercase=true;a.conv=b.toLowerCase();break}}return a}function -em(b,f){if(b.uppercase)f=f.toUpperCase();var -e=f.length;if(b.signedconv&&(b.sign<0||b.signstyle!=W))e++;if(b.alternate){if(b.base==8)e+=1;if(b.base==16)e+=2}var -c=h;if(b.justify==aU&&b.filler==aR)for(var -d=e;d=0&&b<=9){a.width=a.width*10+b;c++}c--;break;case".":a.prec=0;c++;while(b=d.charCodeAt(c)-48,b>=0&&b<=9){a.prec=a.prec*10+b;c++}c--;case"d":case"i":a.signedconv=true;case"u":a.base=10;break;case"x":a.base=16;break;case"X":a.base=16;a.uppercase=true;break;case"o":a.base=8;break;case"e":case"f":case"g":a.signedconv=true;a.conv=b;break;case"E":case"F":case"G":a.signedconv=true;a.uppercase=true;a.conv=b.toLowerCase();break}}return a}function +fo(b,f){if(b.uppercase)f=f.toUpperCase();var +e=f.length;if(b.signedconv&&(b.sign<0||b.signstyle!=am))e++;if(b.alternate){if(b.base==8)e+=1;if(b.base==16)e+=2}var +c=j;if(b.justify==bi&&b.filler==be)for(var +d=e;d20){c-=20;a/=Math.pow(10,c);a+=new -Array(c+1).join(o);if(b>0)a=a+aX+new -Array(b+1).join(o);return a}else +c=parseInt(a.toString().split(bi)[1]);if(c>20){c-=20;a/=Math.pow(10,c);a+=new +Array(c+1).join(r);if(b>0)a=a+bm+new +Array(b+1).join(r);return a}else return a.toFixed(b)}}var -a,e=ew(i),d=e.prec<0?6:e.prec;if(c<0||c==0&&1/c==-Infinity){e.sign=-1;c=-c}if(isNaN(c)){a=d9;e.filler=aR}else -if(!isFinite(c)){a=gX;e.filler=aR}else +a,e=fA(i),d=e.prec<0?6:e.prec;if(c<0||c==0&&1/c==-Infinity){e.sign=-1;c=-c}if(isNaN(c)){a=e4;e.filler=be}else +if(!isFinite(c)){a=iz;e.filler=be}else switch(e.conv){case"e":var -a=c.toExponential(d),b=a.length;if(a.charAt(b-3)==c7)a=a.slice(0,b-1)+o+a.slice(b-1);break;case"f":a=j(c,d);break;case"g":d=d?d:1;a=c.toExponential(d-1);var -h=a.indexOf(c7),g=+a.slice(h+1);if(g<-4||c>=1e21||c.toFixed(0).length>d){var -b=h-1;while(a.charAt(b)==o)b--;if(a.charAt(b)==aX)b--;a=a.slice(0,b+1)+a.slice(h);b=a.length;if(a.charAt(b-3)==c7)a=a.slice(0,b-1)+o+a.slice(b-1);break}else{var +a=c.toExponential(d),b=a.length;if(a.charAt(b-3)==dX)a=a.slice(0,b-1)+r+a.slice(b-1);break;case"f":a=j(c,d);break;case"g":d=d?d:1;a=c.toExponential(d-1);var +h=a.indexOf(dX),g=+a.slice(h+1);if(g<-4||c>=1e21||c.toFixed(0).length>d){var +b=h-1;while(a.charAt(b)==r)b--;if(a.charAt(b)==bm)b--;a=a.slice(0,b+1)+a.slice(h);b=a.length;if(a.charAt(b-3)==dX)a=a.slice(0,b-1)+r+a.slice(b-1);break}else{var f=d;if(g<0){f-=g+1;a=c.toFixed(f)}else while(a=c.toFixed(f),a.length>d+1)f--;if(f){var -b=a.length-1;while(a.charAt(b)==o)b--;if(a.charAt(b)==aX)b--;a=a.slice(0,b+1)}}break}return em(e,a)}function -c_(e,c){if(az(e)==gL)return a(h+c);var -b=ew(e);if(c<0)if(b.signedconv){b.sign=-1;c=-c}else +b=a.length-1;while(a.charAt(b)==r)b--;if(a.charAt(b)==bm)b--;a=a.slice(0,b+1)}}break}return fo(e,a)}function +d1(e,c){if(aW(e)==ig)return a(j+c);var +b=fA(e);if(c<0)if(b.signedconv){b.sign=-1;c=-c}else c>>>=0;var -d=c.toString(b.base);if(b.prec>=0){b.filler=aR;var -f=b.prec-d.length;if(f>0)d=bJ(f,o)+d}return em(b,d)}var -hu=0;function -P(){return hu++}function -hp(a){return a.toUtf16()}if(m.process&&m.process.cwd)var -ch=m.process.cwd().replace(/\\/g,aT);else +d=c.toString(b.base);if(b.prec>=0){b.filler=be;var +f=b.prec-d.length;if(f>0)d=cg(f,r)+d}return fo(b,d)}var +ja=0;function +af(){return ja++}function +cd(a){return a.toUtf16()}if(p.process&&p.process.cwd)var +cZ=p.process.cwd().replace(/\\/g,bg);else var -ch="/static";if(ch.slice(-1)!==aT)ch+=aT;function -sU(a){a=hp(a);if(a.charCodeAt(0)!=47)a=ch+a;var -d=a.split(aT),b=[];for(var -c=0;c1)b.pop();break;case".":break;case"":if(b.length==0)b.push(h);break;default:b.push(d[c]);break}b.orig=a;return b}function -sq(a){return new -aY(4,a,a.length)}function -td(e){for(var -f=h,b=f,a,i,c=0,g=e.length;cd4){b.substr(0,1);f+=b;b=h;f+=e.slice(c,d)}else -b+=e.slice(c,d);if(d==g)break;c=d}if(a>6);b+=String.fromCharCode(as|a&bz)}else -if(a<0xd800||a>=gd)b+=String.fromCharCode(ge|a>>12,as|a>>6&bz,as|a&bz);else -if(a>=0xdbff||c+1==g||(i=e.charCodeAt(c+1))gd)b+="\xef\xbf\xbd";else{c++;a=(a<<10)+i-0x35fdc00;b+=String.fromCharCode(gT|a>>18,as|a>>12&bz,as|a>>6&bz,as|a&bz)}if(b.length>b_){b.substr(0,1);f+=b;b=h}}return f+b}function -sr(a){var -b=9;if(!hx(a))b=8,a=td(a);return new -aY(b,a,a.length)}function -aA(a){return sr(a)}function -C(a){ex(G.Sys_error,a)}function -s4(a){a=az(a);C(a+": No such file or directory")}function -am(a){return a.l}function -g6(){}function -R(a){this.data=a}R.prototype=new -g6();R.prototype.truncate=function(a){var -b=this.data;this.data=F(a|0);be(b,0,this.data,0,a)};R.prototype.length=function(){return am(this.data)};R.prototype.write=function(b,d,g,a){var +cZ="/static";if(cZ.slice(-1)!==bg)cZ+=bg;function +yD(a){a=cd(a);if(a.charCodeAt(0)!=47)a=cZ+a;var +d=a.split(bg),b=[];for(var +c=0;c1)b.pop();break;case".":break;case"":if(b.length==0)b.push(j);break;default:b.push(d[c]);break}b.orig=a;return b}function +ya(a){return new +bo(4,a,a.length)}function +yY(e){for(var +f=j,b=f,a,h,c=0,g=e.length;ceX){b.substr(0,1);f+=b;b=j;f+=e.slice(c,d)}else +b+=e.slice(c,d);if(d==g)break;c=d}if(a>6);b+=String.fromCharCode(aL|a&b6)}else +if(a<0xd800||a>=hq)b+=String.fromCharCode(hr|a>>12,aL|a>>6&b6,aL|a&b6);else +if(a>=0xdbff||c+1==g||(h=e.charCodeAt(c+1))hq)b+="\xef\xbf\xbd";else{c++;a=(a<<10)+h-0x35fdc00;b+=String.fromCharCode(is|a>>18,aL|a>>12&b6,aL|a>>6&b6,aL|a&b6)}if(b.length>cJ){b.substr(0,1);f+=b;b=j}}return f+b}function +yb(a){var +b=9;if(!jd(a))b=8,a=yY(a);return new +bo(b,a,a.length)}function +aX(a){return yb(a)}function +K(a){fB(S.Sys_error,a)}function +yN(a){a=aW(a);K(a+": No such file or directory")}function +aG(a){return a.l}function +iN(){}function +ah(a){this.data=a}ah.prototype=new +iN();ah.prototype.truncate=function(a){var +b=this.data;this.data=R(a|0);bJ(b,0,this.data,0,a)};ah.prototype.length=function(){return aG(this.data)};ah.prototype.write=function(b,d,g,a){var c=this.length();if(b+a>=c){var -e=F(b+a),f=this.data;this.data=e;be(f,0,this.data,0,c)}bf(d,g,this.data,b,a);return 0};R.prototype.read=function(c,a,d,b){var -e=this.length();be(this.data,c,a,d,b);return 0};R.prototype.read_one=function(a){return bg(this.data,a)};R.prototype.close=function(){};R.prototype.constructor=R;function -au(b,a){this.content={};this.root=b;this.lookupFun=a}au.prototype.nm=function(a){return this.root+a};au.prototype.lookup=function(b){if(!this.content[b]&&this.lookupFun){var +e=R(b+a),f=this.data;this.data=e;bJ(f,0,this.data,0,c)}bK(d,g,this.data,b,a);return 0};ah.prototype.read=function(c,a,d,b){var +e=this.length();bJ(this.data,c,a,d,b);return 0};ah.prototype.read_one=function(a){return bL(this.data,a)};ah.prototype.close=function(){};ah.prototype.constructor=ah;function +aQ(b,a){this.content={};this.root=b;this.lookupFun=a}aQ.prototype.nm=function(a){return this.root+a};aQ.prototype.lookup=function(b){if(!this.content[b]&&this.lookupFun){var c=this.lookupFun(a(this.root),a(b));if(c!==0)this.content[b]=new -R(aZ(c[1]))}};au.prototype.exists=function(a){if(a==h)return 1;var -c=a+aT,d=new -RegExp(d_+c);for(var +ah(bp(c[1]))}};aQ.prototype.exists=function(a){if(a==j)return 1;var +c=a+bg,d=new +RegExp(e6+c);for(var b in -this.content)if(b.match(d))return 1;this.lookup(a);return this.content[a]?1:0};au.prototype.readdir=function(c){var -f=c==h?h:c+aT,g=new -RegExp(d_+f+g0),d={},b=[];for(var +this.content)if(b.match(d))return 1;this.lookup(a);return this.content[a]?1:0};aQ.prototype.readdir=function(c){var +f=c==j?j:c+bg,g=new +RegExp(e6+f+iE),d={},b=[];for(var e in this.content){var -a=e.match(g);if(a&&!d[a[1]]){d[a[1]]=true;b.push(a[1])}}return b};au.prototype.is_dir=function(a){var -d=a==h?h:a+aT,e=new -RegExp(d_+d+g0),f=[];for(var +a=e.match(g);if(a&&!d[a[1]]){d[a[1]]=true;b.push(a[1])}}return b};aQ.prototype.is_dir=function(a){var +d=a==j?j:a+bg,e=new +RegExp(e6+d+iE),f=[];for(var c in this.content){var -b=c.match(e);if(b)return 1}return 0};au.prototype.unlink=function(a){var +b=c.match(e);if(b)return 1}return 0};aQ.prototype.unlink=function(a){var b=this.content[a]?true:false;delete -this.content[a];return b};au.prototype.open=function(a,b){if(b.rdonly&&b.wronly)C(this.nm(a)+gm);if(b.text&&b.binary)C(this.nm(a)+gH);this.lookup(a);if(this.content[a]){if(this.is_dir(a))C(this.nm(a)+" : is a directory");if(b.create&&b.excl)C(this.nm(a)+gl);var +this.content[a];return b};aQ.prototype.open=function(a,b){if(b.rdonly&&b.wronly)K(this.nm(a)+hG);if(b.text&&b.binary)K(this.nm(a)+ia);this.lookup(a);if(this.content[a]){if(this.is_dir(a))K(this.nm(a)+" : is a directory");if(b.create&&b.excl)K(this.nm(a)+hD);var c=this.content[a];if(b.truncate)c.truncate();return c}else if(b.create){this.content[a]=new -R(F(0));return this.content[a]}else -s4(this.nm(a))};au.prototype.register=function(b,a){if(this.content[b])C(this.nm(b)+gl);if(cl(a))this.content[b]=new -R(a);if(db(a))this.content[b]=new -R(aZ(a));else +ah(R(0));return this.content[a]}else +yN(this.nm(a))};aQ.prototype.register=function(b,a){if(this.content[b])K(this.nm(b)+hD);if(c3(a))this.content[b]=new +ah(a);if(d5(a))this.content[b]=new +ah(bp(a));else if(a instanceof Array)this.content[b]=new -R(sq(a));else +ah(ya(a));else if(typeof a==="string")this.content[b]=new -R(he(a));else +ah(iX(a));else if(a.toString){var -c=aZ(aA(a.toString()));this.content[b]=new -R(c)}else -C(this.nm(b)+" : registering file with invalid content type")};au.prototype.constructor=au;function -q(a){return am(a)}function -bK(b,a){return cg(b,a)}function -sm(d){var -c=q(d),b=new -Array(c),a=0;for(;a=0)}function -eo(d,b){var -e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b.charCodeAt(a)|b.charCodeAt(a+1)<<8|b.charCodeAt(a+2)<<16|b.charCodeAt(a+3)<<24;d=S(d,c)}c=0;switch(e&3){case +b=="string"?a(b):b,d=ji(c);if(!d.device.register)bS("cannot register file");d.device.register(d.rest,b);return 0}function +ye(){var +b=p.caml_fs_tmp;if(b)for(var +a=0;a>1|1;if(h=0)}function +fq(d,b){var +e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b.charCodeAt(a)|b.charCodeAt(a+1)<<8|b.charCodeAt(a+2)<<16|b.charCodeAt(a+3)<<24;d=ai(d,c)}c=0;switch(e&3){case 3:c=b.charCodeAt(a+2)<<16;case 2:c|=b.charCodeAt(a+1)<<8;case -1:c|=b.charCodeAt(a);d=S(d,c)}d^=e;return d}function -sA(a,b){return eo(a,az(b))}function -sx(d,b){var -e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b[a]|b[a+1]<<8|b[a+2]<<16|b[a+3]<<24;d=S(d,c)}c=0;switch(e&3){case +1:c|=b.charCodeAt(a);d=ai(d,c)}d^=e;return d}function +yk(a,b){return fq(a,aW(b))}function +yh(d,b){var +e=b.length,a,c;for(a=0;a+4<=e;a+=4){c=b[a]|b[a+1]<<8|b[a+2]<<16|b[a+3]<<24;d=ai(d,c)}c=0;switch(e&3){case 3:c=b[a+2]<<16;case 2:c|=b[a+1]<<8;case -1:c|=b[a];d=S(d,c)}d^=e;return d}function -sw(a,b){switch(b.t&6){default:bh(b);case -0:a=eo(a,b.c);break;case -2:a=sx(a,b.c)}return a}function -sy(a){a^=a>>>16;a=aM(a,0x85ebca6b|0);a^=a>>>13;a=aM(a,0xc2b2ae35|0);a^=a>>>16;return a}function -sv(j,l,n,m){var -f,g,h,d,c,b,a,e,i;d=l;if(d<0||d>bB)d=bB;c=j;b=n;f=[m];g=0;h=1;while(g0){a=f[g++];if(a&&a.caml_custom){if(bG[a.caml_custom]&&bG[a.caml_custom].hash){var -k=bG[a.caml_custom].hash(a);b=S(b,k);c--}}else +1:c|=b[a];d=ai(d,c)}d^=e;return d}function +yg(a,b){switch(b.t&6){default:bM(b);case +0:a=fq(a,b.c);break;case +2:a=yh(a,b.c)}return a}function +yi(a){a^=a>>>16;a=a$(a,0x85ebca6b|0);a^=a>>>13;a=a$(a,0xc2b2ae35|0);a^=a>>>16;return a}function +yf(j,l,n,m){var +f,g,h,d,c,b,a,e,i;d=l;if(d<0||d>b8)d=b8;c=j;b=n;f=[m];g=0;h=1;while(g0){a=f[g++];if(a&&a.caml_custom){if(cc[a.caml_custom]&&cc[a.caml_custom].hash){var +k=cc[a.caml_custom].hash(a);b=ai(b,k);c--}}else if(a instanceof Array&&a[0]===(a[0]|0))switch(a[0]){case -248:b=S(b,a[2]);c--;break;case +248:b=ai(b,a[2]);c--;break;case 250:f[--g]=a[1];break;default:var -o=a.length-1<<10|a[0];b=S(b,o);for(e=1,i=a.length;e=d)break;f[h++]=a[e]}break}else -if(cl(a)){b=sw(b,a);c--}else -if(db(a)){b=sA(b,a);c--}else +o=a.length-1<<10|a[0];b=ai(b,o);for(e=1,i=a.length;e=d)break;f[h++]=a[e]}break}else +if(c3(a)){b=yg(b,a);c--}else +if(d5(a)){b=yk(b,a);c--}else if(typeof -a==="string"){b=eo(b,a);c--}else -if(a===(a|0)){b=S(b,a+a+1);c--}else -if(a===+a){b=en(b,a);c--}}b=sy(b);return b&0x3FFFFFFF}function -sB(a,c,l){if(!isFinite(a)){if(isNaN(a))return aA(d9);return aA(a>0?gU:"-infinity")}var -j=a==0&&1/a==-Infinity?1:a>=0?0:1;if(j)a=-a;var +a==="string"){b=fq(b,a);c--}else +if(a===(a|0)){b=ai(b,a+a+1);c--}else +if(a===+a){b=fp(b,a);c--}}b=yi(b);return b&0x3FFFFFFF}function +yl(a,c,l){if(!isFinite(a)){if(isNaN(a))return aX(e4);return aX(a>0?iw:"-infinity")}var +i=a==0&&1/a==-Infinity?1:a>=0?0:1;if(i)a=-a;var d=0;if(a==0);else if(a<1)while(a<1&&d>-1022){a*=2;d--}else while(a>=2){a/=2;d++}var -k=d<0?h:aU,e=h;if(j)e=W;else +k=d<0?j:bi,e=j;if(i)e=am;else switch(l){case -43:e=aU;break;case -32:e=aR;break;default:break}if(c>=0&&c<13){var +43:e=bi;break;case +32:e=be;break;default:break}if(c>=0&&c<13){var g=Math.pow(2,c*4);a=Math.round(a*g)/g}var b=a.toString(16);if(c>=0){var -i=b.indexOf(aX);if(i<0)b+=aX+bJ(c,o);else{var -f=i+1+c;if(b.length>24&aW,a>>31&aI)}function -sM(a){return a.toInt()}function -sG(a){return+a.isNeg()}function -sJ(a){return a.neg()}function -sE(g,c){var -a=ew(g);if(a.signedconv&&sG(c)){a.sign=-1;c=sJ(c)}var -b=h,i=sK(a.base),f="0123456789abcdef";do{var -e=c.udivmod(i);c=e.quotient;b=f.charAt(sM(e.modulus))+b}while(!sH(c));if(a.prec>=0){a.filler=aR;var -d=a.prec-b.length;if(d>0)b=bJ(d,o)+b}return em(a,b)}function -sL(a,b){return a.or(b)}function -ho(a){return a.toFloat()}function -sO(){return typeof -module!=="undefined"&&module&&module.exports?module.exports:m}function -sP(c){var +h=b.indexOf(bm);if(h<0)b+=bm+cg(c,r);else{var +f=h+1+c;if(b.length>24&bk,a>>31&a7)}function +yw(a){return a.toInt()}function +yq(a){return+a.isNeg()}function +yt(a){return a.neg()}function +yo(g,c){var +a=fA(g);if(a.signedconv&&yq(c)){a.sign=-1;c=yt(c)}var +b=j,h=yu(a.base),f="0123456789abcdef";do{var +e=c.udivmod(h);c=e.quotient;b=f.charAt(yw(e.modulus))+b}while(!yr(c));if(a.prec>=0){a.filler=be;var +d=a.prec-b.length;if(d>0)b=cg(d,r)+b}return fo(a,b)}function +yv(a,b){return a.or(b)}function +i7(a){return a.toFloat()}function +yy(){return typeof +module!=="undefined"&&module&&module.exports?module.exports:p}function +fw(a){return a.slice(1)}function +yz(c){var d=c.length,b=new Array(d+1);b[0]=0;for(var a=0;a0){var c=new Array(b);for(var -a=0;aaH){a-=aH;b*=Math.pow(2,aH);if(a>aH){a-=aH;b*=Math.pow(2,aH)}}if(a<-aH){a+=aH;b*=Math.pow(2,-aH)}b*=Math.pow(2,a);return b}function -sT(a,b){return+(bF(a,b,false)<=0)}function -eu(a,b){return+(bF(a,b,false)<0)}function -a1(a,d){if(a<0)cf();var +a=0;aa6){a-=a6;b*=Math.pow(2,a6);if(a>a6){a-=a6;b*=Math.pow(2,a6)}}if(a<-a6){a+=a6;b*=Math.pow(2,-a6)}b*=Math.pow(2,a);return b}function +yC(a,b){return+(cb(a,b,false)<=0)}function +fy(a,b){return+(cb(a,b,false)<0)}function +br(a,d){if(a<0)cX();var a=a+1|0,b=new Array(a);b[0]=0;for(var c=1;c>>32-b,c)}function g(c,b,d,e,h,f,g){return a(b&d|~b&e,c,b,h,f,g)}function @@ -661,14 +669,14 @@ h(d,b,e,c,h,f,g){return a(b&c|e&~c,d,b,h,f,g)}function i(c,b,d,e,h,f,g){return a(b^d^e,c,b,h,f,g)}function j(c,b,d,e,h,f,g){return a(d^(b|~e),c,b,h,f,g)}function k(f,n){var -e=n;f[e>>2]|=as<<8*(e&3);for(e=(e&~0x3)+8;(e&0x3F)<60;e+=4)f[(e>>2)-1]=0;f[(e>>2)-1]=n<<3;f[e>>2]=n>>29&0x1FFFFFFF;var +e=n;f[e>>2]|=aL<<8*(e&3);for(e=(e&~0x3)+8;(e&0x3F)<60;e+=4)f[(e>>2)-1]=0;f[(e>>2)-1]=n<<3;f[e>>2]=n>>29&0x1FFFFFFF;var k=[0x67452301,0xEFCDAB89,0x98BADCFE,0x10325476];for(e=0;e>8*m&0xFF;return o}return function(h,g,f){var -e=[];switch(h.t&6){default:bh(h);case +e=[];switch(h.t&6){default:bM(h);case 0:var d=h.c;for(var a=0;a>2]=d.charCodeAt(b)|d.charCodeAt(b+1)<<8|d.charCodeAt(b+2)<<16|d.charC 4:var c=h.c;for(var a=0;a>2]=c[b]|c[b+1]<<8|c[b+2]<<16|c[b+3]<<24}for(;a>2]|=c[a+g]<<8*(a&3)}return s_(k(e,f))}}();function -sW(c,b,a){return sV(aZ(c),b,a)}var -aL=new +b=a+g;e[a>>2]=c[b]|c[b+1]<<8|c[b+2]<<16|c[b+3]<<24}for(;a>2]|=c[a+g]<<8*(a&3)}return yT(k(e,f))}}();function +yF(c,b,a){return yE(bp(c),b,a)}var +a_=new Array();function -ev(c){var -a=aL[c];if(!a.opened)C("Cannot flush a closed channel");if(!a.buffer||a.buffer==h)return 0;if(a.fd&&G.fds[a.fd]&&G.fds[a.fd].output){var -b=G.fds[a.fd].output;switch(b.length){case -2:b(c,a.buffer);break;default:b(a.buffer)}}a.buffer=h;return 0}function -hw(e,f){var -b=aL[e],d=a(f),c=q(d);b.file.write(b.offset,d,0,c);b.offset+=c;return 0}function -th(a){var -a=eA(a),b=m;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stderr.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var +fz(c){var +a=a_[c];if(!a.opened)K("Cannot flush a closed channel");if(!a.buffer||a.buffer==j)return 0;if(a.fd&&S.fds[a.fd]&&S.fds[a.fd].output){var +b=S.fds[a.fd].output;switch(b.length){case +2:b(c,a.buffer);break;default:b(a.buffer)}}a.buffer=j;return 0}function +jc(e,f){var +b=a_[e],d=a(f),c=t(d);b.file.write(b.offset,d,0,c);b.offset+=c;return 0}function +y2(a){var +a=fE(a),b=p;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stderr.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var c=b.console;c&&c.error&&c.error(a)}}function -ti(a){var -a=eA(a),b=m;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stdout.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var +y3(a){var +a=fE(a),b=p;if(b.process&&b.process.stdout&&b.process.stdout.write)b.process.stdout.write(a);else{if(a.charCodeAt(a.length-1)==10)a=a.substr(0,a.length-1);var c=b.console;c&&c.log&&c.log(a)}}function -dg(c,e,d,a){if(G.fds===undefined)G.fds=new +d$(c,e,d,a){if(S.fds===undefined)S.fds=new Array();a=a?a:{};var -b={};b.file=d;b.offset=a.append?d.length():0;b.flags=a;b.output=e;G.fds[c]=b;if(!G.fd_last_idx||c>G.fd_last_idx)G.fd_last_idx=c;return c}function -ty(c,b,g){var +b={};b.file=d;b.offset=a.append?d.length():0;b.flags=a;b.output=e;S.fds[c]=b;if(!S.fd_last_idx||c>S.fd_last_idx)S.fd_last_idx=c;return c}function +zh(c,b,g){var a={};while(b){switch(b[1]){case 0:a.rdonly=1;break;case 1:a.wronly=1;break;case @@ -705,91 +713,91 @@ a={};while(b){switch(b[1]){case 5:a.excl=1;break;case 6:a.binary=1;break;case 7:a.text=1;break;case -8:a.nonblock=1;break}b=b[2]}if(a.rdonly&&a.wronly)C(az(c)+gm);if(a.text&&a.binary)C(az(c)+gH);var -d=hC(c),e=d.device.open(d.rest,a),f=G.fd_last_idx?G.fd_last_idx:0;return dg(f+1,hw,e,a)}dg(0,hw,new -R(F(0)));dg(1,ti,new -R(F(0)));dg(2,th,new -R(F(0)));function -sX(c){var -b=G.fds[c];if(b.flags.wronly)C(g2+c+" is writeonly");var -a={file:b.file,offset:b.offset,fd:c,opened:true,out:false,refill:null};aL[a.fd]=a;return a.fd}function -hq(c){var -b=G.fds[c];if(b.flags.rdonly)C(g2+c+" is readonly");var -a={file:b.file,offset:b.offset,fd:c,opened:true,out:true,buffer:h};aL[a.fd]=a;return a.fd}function -sY(){var +8:a.nonblock=1;break}b=b[2]}if(a.rdonly&&a.wronly)K(aW(c)+hG);if(a.text&&a.binary)K(aW(c)+ia);var +d=ji(c),e=d.device.open(d.rest,a),f=S.fd_last_idx?S.fd_last_idx:0;return d$(f+1,jc,e,a)}d$(0,jc,new +ah(R(0)));d$(1,y3,new +ah(R(0)));d$(2,y2,new +ah(R(0)));function +yG(c){var +b=S.fds[c];if(b.flags.wronly)K(iI+c+" is writeonly");var +a={file:b.file,offset:b.offset,fd:c,opened:true,out:false,refill:null};a_[a.fd]=a;return a.fd}function +i8(c){var +b=S.fds[c];if(b.flags.rdonly)K(iI+c+" is readonly");var +a={file:b.file,offset:b.offset,fd:c,opened:true,out:true,buffer:j};a_[a.fd]=a;return a.fd}function +yH(){var b=0;for(var -a=0;a>>0)return a[0];else -if(cl(a))return ef;else -if(db(a))return ef;else +if(c3(a))return ff;else +if(d5(a))return ff;else if(a instanceof Function||typeof a=="function")return 247;else -if(a&&a.caml_custom)return by;else -return ar}function -aw(b,c,a){if(a&&m.toplevelReloc)b=m.toplevelReloc(a);G[b+1]=c;if(a)G[a]=c}var -hr={};function -s7(a,b){hr[az(a)]=b;return 0}function -s8(a){a[2]=hu++;return a}function -ez(a,b){return hd(a,b)}function -s9(){H(eh)}function -l(b,a){if(a>>>0>=q(b))s9();return bK(b,a)}function -I(a,b){return 1-ez(a,b)}function -s$(){return[0,a("js_of_ocaml")]}function -ta(){return 0x7FFFFFFF/4|0}function -tb(){return[0,a("Unix"),32,0]}function -s5(){dd(G.Not_found)}function -df(c){var -a=m,b=hp(c);if(a.process&&a.process.env&&a.process.env[b]!=undefined)return aA(a.process.env[b]);if(m.jsoo_static_env&&m.jsoo_static_env[b])return aA(m.jsoo_static_env[b]);s5()}function -tc(){var +if(a&&a.caml_custom)return b5;else +return aK}function +aS(b,c,a){if(a&&p.toplevelReloc)b=p.toplevelReloc(a);S[b+1]=c;if(a)S[a]=c}var +i9={};function +yQ(a,b){i9[aW(a)]=b;return 0}function +yR(a){a[2]=ja++;return a}function +fD(a,b){return iW(a,b)}function +yS(){T(fj)}function +o(b,a){if(a>>>0>=t(b))yS();return ch(b,a)}function +U(a,b){return 1-fD(a,b)}function +yU(){return[0,a("js_of_ocaml")]}function +yV(){return 0x7FFFFFFF/4|0}function +yW(){return[0,a("Unix"),32,0]}function +yO(){d8(S.Not_found)}function +d_(c){var +a=p,b=cd(c);if(a.process&&a.process.env&&a.process.env[b]!=undefined)return aX(a.process.env[b]);if(p.jsoo_static_env&&p.jsoo_static_env[b])return aX(p.jsoo_static_env[b]);yO()}function +yX(){var a=new -Date().getTime(),b=a^gW*Math.random();return[0,b]}function -cm(a){var +Date().getTime(),b=a^iy*Math.random();return[0,b]}function +c4(a){var b=1;while(a&&a.joo_tramp){a=a.joo_tramp.apply(null,a.joo_args);b++}return a}function -M(b,a){return{joo_tramp:b,joo_args:a}}function -hv(a){return a}function -dc(a){return hr[a]}function +ac(b,a){return{joo_tramp:b,joo_args:a}}function +jb(a){return a}function +d7(a){return i9[a]}function d(a){if(a instanceof -Array)return a;if(m.RangeError&&a +Array)return a;if(p.RangeError&&a instanceof -m.RangeError&&a.message&&a.message.match(/maximum call stack/i))return hv(G.Stack_overflow);if(m.InternalError&&a +p.RangeError&&a.message&&a.message.match(/maximum call stack/i))return jb(S.Stack_overflow);if(p.InternalError&&a instanceof -m.InternalError&&a.message&&a.message.match(/too much recursion/i))return hv(G.Stack_overflow);if(a +p.InternalError&&a.message&&a.message.match(/too much recursion/i))return jb(S.Stack_overflow);if(a instanceof -m.Error&&dc(d6))return[0,dc(d6),a];return[0,G.Failure,aA(String(a))]}var -g=function(B){"use strict";var -f=bl,ac=7,v=9007199254740992,J=s(v),O="0123456789abcdefghijklmnopqrstuvwxyz",i=m.BigInt,H=typeof -i==="function";function +p.Error&&d7(e1))return[0,d7(e1),a];return[0,S.Failure,aX(String(a))]}var +k=function(B){"use strict";var +f=bQ,ab=7,v=9007199254740992,J=s(v),O="0123456789abcdefghijklmnopqrstuvwxyz",g=p.BigInt,H=typeof +g==="function";function d(a,b,c,f){if(typeof a==="undefined")return d[0];if(typeof -b!=="undefined")return+b===10&&!c?e(a):ah(a,b,c,f);return e(a)}function -a(b,a){this.value=b;this.sign=a;this.isSmall=false;this.caml_custom=cQ}a.prototype=Object.create(d.prototype);function -b(a){this.value=a;this.sign=a<0;this.isSmall=true;this.caml_custom=cQ}b.prototype=Object.create(d.prototype);function -c(a){this.value=a;this.caml_custom=cQ}c.prototype=Object.create(d.prototype);function -r(a){return-v=0)c=z(e,f);else{c=z(f,e);d=!d}c=n(c);if(typeof +aj(e,f,d){var +c;if(o(e,f)>=0)c=z(e,f);else{c=z(f,e);d=!d}c=n(c);if(typeof c==="number"){if(d)c=-c;return new b(c)}return new a(c,d)}function @@ -831,7 +839,7 @@ c==="number"){if(k)c=-c;return new b(c)}return new a(c,k)}a.prototype.subtract=function(d){var a=e(d);if(this.sign!==a.sign)return this.add(a.negate());var -b=this.value,c=a.value;if(a.isSmall)return G(b,Math.abs(c),this.sign);return al(b,c,this.sign)};a.prototype.minus=a.prototype.subtract;b.prototype.subtract=function(f){var +b=this.value,c=a.value;if(a.isSmall)return G(b,Math.abs(c),this.sign);return aj(b,c,this.sign)};a.prototype.minus=a.prototype.subtract;b.prototype.subtract=function(f){var c=e(f),a=this.value;if(a<0!==c.sign)return this.add(c.negate());var d=c.value;if(c.isSmall)return new b(a-d);return G(d,Math.abs(a),a>=0)};b.prototype.minus=b.prototype.subtract;c.prototype.subtract=function(a){return new @@ -849,36 +857,36 @@ b=0;b0){e[b++]=a%c;a=Math.floor(a/c)}return e}function -Z(c,b){var +Y(c,b){var a=[];while(b-->0)a.push(0);return a.concat(c)}function E(b,c){var a=Math.max(b.length,c.length);if(a<=30)return N(b,c);a=Math.ceil(a/2);var -f=b.slice(a),d=b.slice(0,a),i=c.slice(a),h=c.slice(0,a),e=E(d,h),g=E(f,i),k=E(w(d,f),w(h,i)),j=w(w(e,Z(z(z(k,e),g),a)),Z(g,2*a));t(j);return j}function -am(a,b){return-(gO*a)-gO*b+0.000015*a*b>0}a.prototype.multiply=function(j){var +f=b.slice(a),d=b.slice(0,a),i=c.slice(a),h=c.slice(0,a),e=E(d,h),g=E(f,i),k=E(w(d,f),w(h,i)),j=w(w(e,Y(z(z(k,e),g),a)),Y(g,2*a));t(j);return j}function +ak(a,b){return-(ik*a)-ik*b+0.000015*a*b>0}a.prototype.multiply=function(j){var h=e(j),c=this.value,b=h.value,i=this.sign!==h.sign,g;if(h.isSmall){if(b===0)return d[0];if(b===1)return this;if(b===-1)return this.negate();g=Math.abs(b);if(g=0;d--){j=g-1;if(b[d+h]!==l)j=Math.floor((b[d+h]*g+b[d+h-1])/l);c=0;e=0;m=i.length;for(a=0;ah)d=(d+1)*i;c=Math.ceil(d/m);do{j=x(b,c);if(p(j,a)<=0)break;c--}while(c);e.push(c);a=z(a,j)}e.reverse();return[n(e),n(a)]}function +ad(k,b){var +l=k.length,h=b.length,e=[],a=[],i=f,c,g,d,m,j;while(l){a.unshift(k[--l]);t(a);if(o(a,b)<0){e.push(0);continue}g=a.length;d=a[g-1]*i+a[g-2];m=b[h-1]*i+b[h-2];if(g>h)d=(d+1)*i;c=Math.ceil(d/m);do{j=x(b,c);if(o(j,a)<=0)break;c--}while(c);e.push(c);a=z(a,j)}e.reverse();return[n(e),n(a)]}function Q(i,e){var g=i.length,h=D(g),j=f,a,d,b,c;b=0;for(a=g-1;a>=0;--a){c=b*j+i[a];d=u(c/e);b=c-d*e;h[a]=d|0}return[h,b|0]}function -k(h,w){var +i(h,w){var m,j=e(w);if(H)return[new c(h.value/j.value),new c(h.value%j.value)];var @@ -887,14 +895,14 @@ Error("Cannot divide by zero");if(h.isSmall){if(j.isSmall)return[new b(u(l/i)),new b(l%i)];return[d[0],h]}if(j.isSmall){if(i===1)return[h,d[0]];if(i==-1)return[h.negate(),d[0]];var q=Math.abs(i);if(qc.length?1:-1;for(var +o(b,c){if(b.length!==c.length)return b.length>c.length?1:-1;for(var a=b.length-1;a>=0;a--)if(b[a]!==c[a])return b[a]>c[a]?1:-1;return 0}a.prototype.compareAbs=function(d){var -a=e(d),b=this.value,c=a.value;if(a.isSmall)return 1;return p(b,c)};b.prototype.compareAbs=function(d){var +a=e(d),b=this.value,c=a.value;if(a.isSmall)return 1;return o(b,c)};b.prototype.compareAbs=function(d){var c=e(d),b=Math.abs(this.value),a=c.value;if(c.isSmall){a=Math.abs(a);return b===a?0:b>a?1:-1}return-1};c.prototype.compareAbs=function(c){var a=this.value,b=e(c).value;a=a>=0?a:-a;b=b>=0?b:-b;return a===b?0:a>b?1:-1};a.prototype.compare=function(b){if(b===Infinity)return-1;if(b===-Infinity)return 1;var -a=e(b),c=this.value,d=a.value;if(this.sign!==a.sign)return a.sign?1:-1;if(a.isSmall)return this.sign?-1:1;return p(c,d)*(this.sign?-1:1)};a.prototype.compareTo=a.prototype.compare;b.prototype.compare=function(c){if(c===Infinity)return-1;if(c===-Infinity)return 1;var +a=e(b),c=this.value,d=a.value;if(this.sign!==a.sign)return a.sign?1:-1;if(a.isSmall)return this.sign?-1:1;return o(c,d)*(this.sign?-1:1)};a.prototype.compareTo=a.prototype.compare;b.prototype.compare=function(c){if(c===Infinity)return-1;if(c===-Infinity)return 1;var b=e(c),a=this.value,d=b.value;if(b.isSmall)return a==d?0:a>d?1:-1;if(a<0!==b.sign)return a<0?-1:1;return a<0?1:-1};b.prototype.compareTo=b.prototype.compare;c.prototype.compare=function(a){if(a===Infinity)return-1;if(a===-Infinity)return 1;var -b=this.value,c=e(a).value;return b===c?0:b>c?1:-1};c.prototype.compareTo=c.prototype.compare;a.prototype.equals=function(a){return this.compare(a)===0};c.prototype.eq=c.prototype.equals=b.prototype.eq=b.prototype.equals=a.prototype.eq=a.prototype.equals;a.prototype.notEquals=function(a){return this.compare(a)!==0};c.prototype.neq=c.prototype.notEquals=b.prototype.neq=b.prototype.notEquals=a.prototype.neq=a.prototype.notEquals;a.prototype.greater=function(a){return this.compare(a)>0};c.prototype.gt=c.prototype.greater=b.prototype.gt=b.prototype.greater=a.prototype.gt=a.prototype.greater;a.prototype.lesser=function(a){return this.compare(a)<0};c.prototype.lt=c.prototype.lesser=b.prototype.lt=b.prototype.lesser=a.prototype.lt=a.prototype.lesser;a.prototype.greaterOrEquals=function(a){return this.compare(a)>=0};c.prototype.geq=c.prototype.greaterOrEquals=b.prototype.geq=b.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals;a.prototype.lesserOrEquals=function(a){return this.compare(a)<=0};c.prototype.leq=c.prototype.lesserOrEquals=b.prototype.leq=b.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals;a.prototype.isEven=function(){return(this.value[0]&1)===0};b.prototype.isEven=function(){return(this.value&1)===0};c.prototype.isEven=function(){return(this.value&i(1))===i(0)};a.prototype.isOdd=function(){return(this.value[0]&1)===1};b.prototype.isOdd=function(){return(this.value&1)===1};c.prototype.isOdd=function(){return(this.value&i(1))===i(1)};a.prototype.isPositive=function(){return!this.sign};b.prototype.isPositive=function(){return this.value>0};c.prototype.isPositive=b.prototype.isPositive;a.prototype.isNegative=function(){return this.sign};b.prototype.isNegative=function(){return this.value<0};c.prototype.isNegative=b.prototype.isNegative;a.prototype.isUnit=function(){return false};b.prototype.isUnit=function(){return Math.abs(this.value)===1};c.prototype.isUnit=function(){return this.abs().value===i(1)};a.prototype.isZero=function(){return false};b.prototype.isZero=function(){return this.value===0};c.prototype.isZero=function(){return this.value===i(0)};a.prototype.isDivisibleBy=function(b){var +b=this.value,c=e(a).value;return b===c?0:b>c?1:-1};c.prototype.compareTo=c.prototype.compare;a.prototype.equals=function(a){return this.compare(a)===0};c.prototype.eq=c.prototype.equals=b.prototype.eq=b.prototype.equals=a.prototype.eq=a.prototype.equals;a.prototype.notEquals=function(a){return this.compare(a)!==0};c.prototype.neq=c.prototype.notEquals=b.prototype.neq=b.prototype.notEquals=a.prototype.neq=a.prototype.notEquals;a.prototype.greater=function(a){return this.compare(a)>0};c.prototype.gt=c.prototype.greater=b.prototype.gt=b.prototype.greater=a.prototype.gt=a.prototype.greater;a.prototype.lesser=function(a){return this.compare(a)<0};c.prototype.lt=c.prototype.lesser=b.prototype.lt=b.prototype.lesser=a.prototype.lt=a.prototype.lesser;a.prototype.greaterOrEquals=function(a){return this.compare(a)>=0};c.prototype.geq=c.prototype.greaterOrEquals=b.prototype.geq=b.prototype.greaterOrEquals=a.prototype.geq=a.prototype.greaterOrEquals;a.prototype.lesserOrEquals=function(a){return this.compare(a)<=0};c.prototype.leq=c.prototype.lesserOrEquals=b.prototype.leq=b.prototype.lesserOrEquals=a.prototype.leq=a.prototype.lesserOrEquals;a.prototype.isEven=function(){return(this.value[0]&1)===0};b.prototype.isEven=function(){return(this.value&1)===0};c.prototype.isEven=function(){return(this.value&g(1))===g(0)};a.prototype.isOdd=function(){return(this.value[0]&1)===1};b.prototype.isOdd=function(){return(this.value&1)===1};c.prototype.isOdd=function(){return(this.value&g(1))===g(1)};a.prototype.isPositive=function(){return!this.sign};b.prototype.isPositive=function(){return this.value>0};c.prototype.isPositive=b.prototype.isPositive;a.prototype.isNegative=function(){return this.sign};b.prototype.isNegative=function(){return this.value<0};c.prototype.isNegative=b.prototype.isNegative;a.prototype.isUnit=function(){return false};b.prototype.isUnit=function(){return Math.abs(this.value)===1};c.prototype.isUnit=function(){return this.abs().value===g(1)};a.prototype.isZero=function(){return false};b.prototype.isZero=function(){return this.value===0};c.prototype.isZero=function(){return this.value===g(0)};a.prototype.isDivisibleBy=function(b){var a=e(b);if(a.isZero())return false;if(a.isUnit())return true;if(a.compareAbs(2)===0)return this.isEven();return this.mod(a).isZero()};c.prototype.isDivisibleBy=b.prototype.isDivisibleBy=a.prototype.isDivisibleBy;function T(b){var a=b.abs();if(a.isUnit())return false;if(a.equals(2)||a.equals(3)||a.equals(5))return true;if(a.isEven()||a.isDivisibleBy(3)||a.isDivisibleBy(5))return false;if(a.lesser(49))return true}function L(d,e){var -h=d.prev(),c=h,i=0,f,j,b,a;while(c.isEven())c=c.divide(2),i++;next:for(b=0;b-v)return new b(c-1);return new a(J,true)};c.prototype.prev=function(){return new -c(this.value-i(1))};var -j=[1];while(2*j[j.length-1]<=f)j.push(2*j[j.length-1]);var -y=j.length,l=j[y-1];function -_(a){return Math.abs(a)<=f}a.prototype.shiftLeft=function(c){var -a=e(c).toJSNumber();if(!_(a))throw new -Error(String(a)+gx);if(a<0)return this.shiftRight(-a);var -b=this;if(b.isZero())return b;while(a>=y){b=b.multiply(l);a-=y-1}return b.multiply(j[a])};c.prototype.shiftLeft=b.prototype.shiftLeft=a.prototype.shiftLeft;a.prototype.shiftRight=function(d){var -a,b=e(d).toJSNumber();if(!_(b))throw new -Error(String(b)+gx);if(b<0)return this.shiftLeft(-b);var -c=this;while(b>=y){if(c.isZero()||c.isNegative()&&c.isUnit())return c;a=k(c,l);c=a[1].isNegative()?a[0].prev():a[0];b-=y-1}a=k(c,j[b]);return a[1].isNegative()?a[0].prev():a[0]};c.prototype.shiftRight=b.prototype.shiftRight=a.prototype.shiftRight;function -K(i,a,r){a=e(a);var -n=i.isNegative(),q=a.isNegative(),m=n?i.not():i,p=q?a.not():a,b=0,c=0,j=null,o=null,f=[];while(!m.isZero()||!p.isZero()){j=k(m,l);b=j[1].toJSNumber();if(n)b=l-1-b;o=k(p,l);c=o[1].toJSNumber();if(q)c=l-1-c;m=j[0];p=o[0];f.push(r(b,c))}var -h=r(n?1:0,q?1:0)!==0?g(-1):g(0);for(var -d=f.length-1;d>=0;d-=1)h=h.multiply(l).add(g(f[d]));return h}a.prototype.not=function(){return this.negate().prev()};c.prototype.not=b.prototype.not=a.prototype.not;a.prototype.and=function(a){return K(this,a,function(a,b){return a&b})};c.prototype.and=b.prototype.and=a.prototype.and;a.prototype.or=function(a){return K(this,a,function(a,b){return a|b})};c.prototype.or=b.prototype.or=a.prototype.or;a.prototype.xor=function(a){return K(this,a,function(a,b){return a^b})};c.prototype.xor=b.prototype.xor=a.prototype.xor;var -I=1<<30,ab=(f&-f)*(f&-f)|I;function +c(this.value-g(1))};var +h=[1];while(2*h[h.length-1]<=f)h.push(2*h[h.length-1]);var +y=h.length,l=h[y-1];function +Z(a){return Math.abs(a)<=f}a.prototype.shiftLeft=function(c){var +a=e(c).toJSNumber();if(!Z(a))throw new +Error(String(a)+hY);if(a<0)return this.shiftRight(-a);var +b=this;if(b.isZero())return b;while(a>=y){b=b.multiply(l);a-=y-1}return b.multiply(h[a])};c.prototype.shiftLeft=b.prototype.shiftLeft=a.prototype.shiftLeft;a.prototype.shiftRight=function(d){var +a,b=e(d).toJSNumber();if(!Z(b))throw new +Error(String(b)+hY);if(b<0)return this.shiftLeft(-b);var +c=this;while(b>=y){if(c.isZero()||c.isNegative()&&c.isUnit())return c;a=i(c,l);c=a[1].isNegative()?a[0].prev():a[0];b-=y-1}a=i(c,h[b]);return a[1].isNegative()?a[0].prev():a[0]};c.prototype.shiftRight=b.prototype.shiftRight=a.prototype.shiftRight;function +K(h,a,r){a=e(a);var +n=h.isNegative(),q=a.isNegative(),m=n?h.not():h,p=q?a.not():a,b=0,c=0,j=null,o=null,f=[];while(!m.isZero()||!p.isZero()){j=i(m,l);b=j[1].toJSNumber();if(n)b=l-1-b;o=i(p,l);c=o[1].toJSNumber();if(q)c=l-1-c;m=j[0];p=o[0];f.push(r(b,c))}var +g=r(n?1:0,q?1:0)!==0?k(-1):k(0);for(var +d=f.length-1;d>=0;d-=1)g=g.multiply(l).add(k(f[d]));return g}a.prototype.not=function(){return this.negate().prev()};c.prototype.not=b.prototype.not=a.prototype.not;a.prototype.and=function(a){return K(this,a,function(a,b){return a&b})};c.prototype.and=b.prototype.and=a.prototype.and;a.prototype.or=function(a){return K(this,a,function(a,b){return a|b})};c.prototype.or=b.prototype.or=a.prototype.or;a.prototype.xor=function(a){return K(this,a,function(a,b){return a^b})};c.prototype.xor=b.prototype.xor=a.prototype.xor;var +I=1<<30,aa=(f&-f)*(f&-f)|I;function F(c){var a=c.value,b=typeof a==="number"?a|I:typeof -a==="bigint"?a|i(I):a[0]+a[1]*f|ab;return b&-b}function +a==="bigint"?a|g(I):a[0]+a[1]*f|aa;return b&-b}function S(b,a){if(a.compareTo(b)<=0){var -f=S(b,a.square(a)),d=f.p,c=f.e,e=d.multiply(a);return e.compareTo(b)<=0?{p:e,e:c*2+1}:{p:d,e:c*2}}return{p:g(1),e:0}}a.prototype.bitLength=function(){var -a=this;if(a.compareTo(g(0))<0)a=a.negate().subtract(g(1));if(a.compareTo(g(0))===0)return g(0);return g(S(a,g(2)).e).add(g(1))};c.prototype.bitLength=b.prototype.bitLength=a.prototype.bitLength;function +f=S(b,a.square(a)),d=f.p,c=f.e,e=d.multiply(a);return e.compareTo(b)<=0?{p:e,e:c*2+1}:{p:d,e:c*2}}return{p:k(1),e:0}}a.prototype.bitLength=function(){var +a=this;if(a.compareTo(k(0))<0)a=a.negate().subtract(k(1));if(a.compareTo(k(0))===0)return k(0);return k(S(a,k(2)).e).add(k(1))};c.prototype.bitLength=b.prototype.bitLength=a.prototype.bitLength;function U(a,b){a=e(a);b=e(b);return a.greater(b)?a:b}function M(a,b){a=e(a);b=e(b);return a.lesser(b)?a:b}function R(a,b){a=e(a).abs();b=e(b).abs();if(a.equals(b))return a;if(a.isZero())return b;if(b.isZero())return a;var c=d[1],f,g;while(a.isEven()&&b.isEven()){f=M(F(a),F(b));a=a.divide(f);b=b.divide(f);c=c.multiply(f)}while(a.isEven())a=a.divide(F(a));do{while(b.isEven())b=b.divide(F(b));if(a.greater(b)){g=b;b=a;a=g}b=b.subtract(a)}while(!b.isZero());return c.isUnit()?a:a.multiply(c)}function -af(a,b){a=e(a).abs();b=e(b).abs();return a.divide(R(a,b)).multiply(b)}function -aj(a,b){a=e(a);b=e(b);var +ae(a,b){a=e(a).abs();b=e(b).abs();return a.divide(R(a,b)).multiply(b)}function +ah(a,b){a=e(a);b=e(b);var g=M(a,b),n=U(a,b),h=n.subtract(g).add(1);if(h.isSmall)return g.add(Math.floor(Math.random()*h));var j=A(h,f).value,l=[],k=true;for(var c=0;c=i){if(c===ag&&i===1)continue;throw new -Error(c+" is not a valid digit in base "+g+aX)}}g=e(g);var -h=[],j=b[0]===W;for(a=j?1:0;a=i){if(c===ay&&i===1)continue;throw new +Error(c+" is not a valid digit in base "+g+bm)}}g=e(g);var +h=[],j=b[0]===am;for(a=j?1:0;a=0;a--){b=b.add(e[a].times(c));c=c.times(f)}return g?b.negate():b}function -ak(b,a){a=a||O;if(b=0){e=c.divmod(b);c=e.quotient;var -d=e.remainder;if(d.isNegative()){d=b.minus(d).abs();c=c.next()}h.push(d.toJSNumber())}h.push(c.toJSNumber());return{value:h.reverse(),isNegative:f}}function -aa(d,c,b){var -a=A(d,c);return(a.isNegative?W:h)+a.value.map(function(a){return ak(a,b)}).join(h)}a.prototype.toArray=function(a){return A(this,a)};b.prototype.toArray=function(a){return A(this,a)};c.prototype.toArray=function(a){return A(this,a)};a.prototype.toString=function(a,f){if(a===B)a=10;if(a!==10)return aa(this,a,f);var -d=this.value,c=d.length,e=String(d[--c]),i="0000000",b;while(--c>=0){b=String(d[c]);e+=i.slice(b.length)+b}var -g=this.sign?W:h;return g+e};b.prototype.toString=function(a,b){if(a===B)a=10;if(a!=10)return aa(this,a,b);return String(this.value)};c.prototype.toString=b.prototype.toString;c.prototype.toJSON=a.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()};a.prototype.valueOf=function(){return parseInt(this.toString(),10)};a.prototype.toJSNumber=a.prototype.valueOf;b.prototype.valueOf=function(){return this.value};b.prototype.toJSNumber=b.prototype.valueOf;c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function -Y(d){if(r(+d)){var +g=[],c=a,e;while(c.isNegative()||c.compareAbs(b)>=0){e=c.divmod(b);c=e.quotient;var +d=e.remainder;if(d.isNegative()){d=b.minus(d).abs();c=c.next()}g.push(d.toJSNumber())}g.push(c.toJSNumber());return{value:g.reverse(),isNegative:f}}function +$(d,c,b){var +a=A(d,c);return(a.isNegative?am:j)+a.value.map(function(a){return ai(a,b)}).join(j)}a.prototype.toArray=function(a){return A(this,a)};b.prototype.toArray=function(a){return A(this,a)};c.prototype.toArray=function(a){return A(this,a)};a.prototype.toString=function(a,f){if(a===B)a=10;if(a!==10)return $(this,a,f);var +d=this.value,c=d.length,e=String(d[--c]),h="0000000",b;while(--c>=0){b=String(d[c]);e+=h.slice(b.length)+b}var +g=this.sign?am:j;return g+e};b.prototype.toString=function(a,b){if(a===B)a=10;if(a!=10)return $(this,a,b);return String(this.value)};c.prototype.toString=b.prototype.toString;c.prototype.toJSON=a.prototype.toJSON=b.prototype.toJSON=function(){return this.toString()};a.prototype.valueOf=function(){return parseInt(this.toString(),10)};a.prototype.toJSNumber=a.prototype.valueOf;b.prototype.valueOf=function(){return this.value};b.prototype.toJSNumber=b.prototype.valueOf;c.prototype.valueOf=c.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};function +X(d){if(q(+d)){var l=+d;if(l===u(l))return H?new -c(i(l)):new +c(g(l)):new b(l);throw new -Error(cZ+d)}var -p=d[0]===W;if(p)d=d.slice(1);var -g=d.split(/e/i);if(g.length>2)throw new -Error(cZ+g.join(c7));if(g.length===2){var -e=g[1];if(e[0]===aU)e=e.slice(1);e=+e;if(e!==u(e)||!r(e))throw new -Error(cZ+e+" is not a valid exponent.");var -f=g[0],h=f.indexOf(aX);if(h>=0){e-=f.length-h-1;f=f.slice(0,h)+f.slice(h+1)}if(e<0)throw new +Error(dM+d)}var +o=d[0]===am;if(o)d=d.slice(1);var +h=d.split(/e/i);if(h.length>2)throw new +Error(dM+h.join(dX));if(h.length===2){var +e=h[1];if(e[0]===bi)e=e.slice(1);e=+e;if(e!==u(e)||!q(e))throw new +Error(dM+e+" is not a valid exponent.");var +f=h[0],i=f.indexOf(bm);if(i>=0){e-=f.length-i-1;f=f.slice(0,i)+f.slice(i+1)}if(e<0)throw new Error("Cannot include negative exponent part for integers");f+=new -Array(e+1).join(o);d=f}var -q=/^([0-9][0-9]*)$/.test(d);if(!q)throw new -Error(cZ+d);if(H)return new -c(i(p?W+d:d));var -n=[],j=d.length,m=ac,k=j-m;while(j>0){n.push(+d.slice(k,j));k-=m;if(k<0)k=0;j-=m}t(n);return new -a(n,p)}function -ai(a){if(H)return new -c(i(a));if(r(a)){if(a!==u(a))throw new +Array(e+1).join(r);d=f}var +p=/^([0-9][0-9]*)$/.test(d);if(!p)throw new +Error(dM+d);if(H)return new +c(g(o?am+d:d));var +n=[],j=d.length,m=ab,k=j-m;while(j>0){n.push(+d.slice(k,j));k-=m;if(k<0)k=0;j-=m}t(n);return new +a(n,o)}function +ag(a){if(H)return new +c(g(a));if(q(a)){if(a!==u(a))throw new Error(a+" is not an integer.");return new -b(a)}return Y(a.toString())}function +b(a)}return X(a.toString())}function e(a){if(typeof -a==="number")return ai(a);if(typeof -a==="string")return Y(a);if(typeof +a==="number")return ag(a);if(typeof +a==="string")return X(a);if(typeof a==="bigint")return new c(a);return a}for(var -q=0;q0)d[-q]=e(-q)}d.one=d[1];d.zero=d[0];d.minusOne=d[-1];d.max=U;d.min=M;d.gcd=R;d.lcm=af;d.isInstance=function(d){return d +m=0;m0)d[-m]=e(-m)}d.one=d[1];d.zero=d[0];d.minusOne=d[-1];d.max=U;d.min=M;d.gcd=R;d.lcm=ae;d.isInstance=function(d){return d instanceof a||d instanceof b||d instanceof -c};d.randBetween=aj;d.fromArray=function(b,a,c){return X(b.map(e),e(a||10),c)};return d}();function -ax(a){var -b=a.toJSNumber()|0;if(a.equals(g(b)))return b;return a}function -J(a,b){return ax(g(a).add(g(b)))}function -bL(a,b){return g(a).compare(g(b))}function -hy(b,a){a=g(a);if(a.equals(g(0)))bH();return ax(g(b).divide(g(a)))}function -tt(b,a){a=g(a);if(a.equals(g(0)))bH();return ax(g(b).mod(a))}function -tm(a,b){return[0,hy(a,b),tt(a,b)]}function -hz(a,b){return hy(a,b)}function -tn(a,b){return g(a).equals(g(b))}function -tp(a,b){return ax(g.gcd(g(a),g(b)).abs())}function -te(c,e,h){e=g(e);var +c};d.randBetween=ah;d.fromArray=function(b,a,c){return W(b.map(e),e(a||10),c)};return d}();function +aT(a){var +b=a.toJSNumber()|0;if(a.equals(k(b)))return b;return a}function +V(a,b){return aT(k(a).add(k(b)))}function +ci(a,b){return k(a).compare(k(b))}function +je(b,a){a=k(a);if(a.equals(k(0)))ce();return aT(k(b).divide(k(a)))}function +zc(b,a){a=k(a);if(a.equals(k(0)))ce();return aT(k(b).mod(a))}function +y7(a,b){return[0,je(a,b),zc(a,b)]}function +jf(a,b){return je(a,b)}function +y8(a,b){return k(a).equals(k(b))}function +y_(a,b){return aT(k.gcd(k(a),k(b)).abs())}function +yZ(c,e,g){e=k(e);var a=e.toArray(Math.pow(2,32));c.write(8,a.isNegative?1:0);var f=a.value.length,d=f*4;c.write(32,d);for(var -b=f-1;b>=0;b--){c.write(8,a.value[b]>>>0&al);c.write(8,a.value[b]>>>8&al);c.write(8,a.value[b]>>>16&al);c.write(8,a.value[b]>>>24&al)}h[0]=4*(1+((d+3)/4|0));h[1]=8*(1+((d+7)/8|0))}function -tf(b,h){var +b=f-1;b>=0;b--){c.write(8,a.value[b]>>>0&aF);c.write(8,a.value[b]>>>8&aF);c.write(8,a.value[b]>>>16&aF);c.write(8,a.value[b]>>>24&aF)}g[0]=4*(1+((d+3)/4|0));g[1]=8*(1+((d+7)/8|0))}function +y0(b,g){var e;switch(b.read8u()){case 1:e=true;break;case -0:e=false;break;default:bm("input_value: z (malformed input)")}var -f=b.read32u(),c=g(0);for(var +0:e=false;break;default:bS("input_value: z (malformed input)")}var +f=b.read32u(),c=k(0);for(var d=0;d>>0);c=a.shiftLeft(d*32).add(c)}if(e)c=c.negate();h[0]=f+4;return ax(c)}function -tq(d){var -b=g(d).toArray(Math.pow(2,32)),a=0;for(var -c=0;c>>0);c=a.shiftLeft(d*32).add(c)}if(e)c=c.negate();g[0]=f+4;return aT(c)}function +y$(d){var +b=k(d).toArray(Math.pow(2,32)),a=0;for(var +c=0;c=48&&a<=57)return a-48;if(a>=97&&a<=gJ)return a-97+10;if(a>=65&&a<=70)return a-65+10}var -e=0;if(a[e]==W)e++;for(;e=c)H("Z.of_substring_base: invalid digit")}return ax(g(a,c))}function -bp(d,a,b,c){a=az(a);if(b!=0||c!=a.length){if(a.length-b=0?1:0}function -hB(a){a=g(a);if(!to(a))dd(dc(ea));var -b=g(gW),d=a.and(b).toJSNumber(),c=a.shiftRight(32).and(b).toJSNumber(),e=hm(d,c);return e}function -dh(){return new -Date().getTime()/ar}function -bO(e){var +if(d==ih||d=="X")c=16;else +if(d=="b"||d=="B")c=2;if(c!=10){a=a.substring(b+1);if(g==-1)a=am+a}}}}if(a[0]==bi)a=a.substring(1);a=a.replace(/^0+/,j);if(a==am||a==j)a=r;function +h(a){if(a>=48&&a<=57)return a-48;if(a>=97&&a<=ib)return a-97+10;if(a>=65&&a<=70)return a-65+10}var +e=0;if(a[e]==am)e++;for(;e=c)T("Z.of_substring_base: invalid digit")}return aT(k(a,c))}function +bV(d,a,b,c){a=aW(a);if(b!=0||c!=a.length){if(a.length-b=0?1:0}function +jh(a){a=k(a);if(!y9(a))d8(d7(e_));var +b=k(iy),d=a.and(b).toJSNumber(),c=a.shiftRight(32).and(b).toJSNumber(),e=i5(d,c);return e}function +ea(){return new +Date().getTime()/aK}function +cl(e){var a=new -Date(e*ar),b=a.getTime(),d=new -Date(Date.UTC(a.getUTCFullYear(),0,1)).getTime(),c=Math.floor((b-d)/gh);return[0,a.getUTCSeconds(),a.getUTCMinutes(),a.getUTCHours(),a.getUTCDate(),a.getUTCMonth(),a.getUTCFullYear()-bc,a.getUTCDay(),c,false|0]}function -di(){return 0}function -tx(h){var +Date(e*aK),b=a.getTime(),d=new +Date(Date.UTC(a.getUTCFullYear(),0,1)).getTime(),c=Math.floor((b-d)/hu);return[0,a.getUTCSeconds(),a.getUTCMinutes(),a.getUTCHours(),a.getUTCDate(),a.getUTCMonth(),a.getUTCFullYear()-bG,a.getUTCDay(),c,false|0]}function +eb(){return 0}function +zg(h){var a=new -Date(h*ar),b=a.getTime(),e=new -Date(a.getFullYear(),0,1).getTime(),c=Math.floor((b-e)/gh),d=new +Date(h*aK),b=a.getTime(),e=new +Date(a.getFullYear(),0,1).getTime(),c=Math.floor((b-e)/hu),d=new Date(a.getFullYear(),0,1),f=new -Date(a.getFullYear(),6,1),g=Math.max(d.getTimezoneOffset(),f.getTimezoneOffset());return[0,a.getSeconds(),a.getMinutes(),a.getHours(),a.getDate(),a.getMonth(),a.getFullYear()-bc,a.getDay(),c,a.getTimezoneOffset()>>0){if(!(25<(b+b9|0)>>>0))c=1}else -if(23!==b)c=1;return c?a+32|0:a}var -eH=tb(0)[1],eI=ta(0),bP=(4*eI|0)-1|0;P(0);var -hU=s$(0);function -dk(d){var -a=d,b=0;for(;;){if(a){var -c=[0,a[1],b],a=a[2],b=c;continue}return b}}typeof -hU==="number";function -aB(a,c){var -b=F(a);st(b,0,a,c);return b}function -eJ(a){var -b=am(a),c=F(b);be(a,0,c,0,b);return c}function -cs(a){return Y(eJ(a))}function -eK(c,b,a){if(0<=b&&0<=a&&!((am(c)-a|0)>>0){if(!(25<(b+cI|0)>>>0))c=1}else +if(23!==b)c=1;return c?a+32|0:a}var +fL=yW(0)[1],fM=yV(0),cm=(4*fM|0)-1|0;af(0);var +jA=yU(0);function +c_(d){var +a=d,b=0;for(;;){if(a){var +c=[0,a[1],b],a=a[2],b=c;continue}return b}}typeof +jA==="number";function +c$(c,a){if(a){var +d=a[2],e=b(c,a[1]);return[0,e,c$(c,d)]}return 0}function +aY(a,c){var +b=R(a);yd(b,0,a,c);return b}function +fN(a){var +b=aG(a),c=R(b);bJ(a,0,c,0,b);return c}function +da(a){return an(fN(a))}function +fO(c,b,a){if(0<=b&&0<=a&&!((aG(c)-a|0)>>0))e=1}else +f=0;if(1>>0))e=1}else if(65<=d)e=1}else{var -f=0;if(32!==d)if(43<=d)switch(d+gZ|0){case +f=0;if(32!==d)if(43<=d)switch(d+iB|0){case 5:if(a<(c+2|0)&&1>>0){if(33<(n-61|0)>>>0)p=1}else +n=ch(k,j)+fe|0,p=0;if(59>>0){if(33<(n-61|0)>>>0)p=1}else if(2===n)p=1;if(!p){var j=j+1|0;continue}var -e=aZ(k),a=[0,0],s=am(e)-1|0,x=0;if(!(s<0)){var +e=bp(k),a=[0,0],r=aG(e)-1|0,x=0;if(!(r<0)){var i=x;for(;;){var -f=cg(e,i),g=0;if(32<=f){var -l=f-34|0,r=0;if(58>>0){if(93<=l)r=1}else -if(56<(l-1|0)>>>0){g=1;r=1}if(!r){var +f=cY(e,i),g=0;if(32<=f){var +l=f-34|0,q=0;if(58>>0){if(93<=l)q=1}else +if(56<(l-1|0)>>>0){g=1;q=1}if(!q){var m=1;g=2}}else if(11<=f){if(13===f)g=1}else if(8<=f)g=1;switch(g){case @@ -1952,41 +1968,41 @@ if(8<=f)g=1;switch(g){case m=4;break;case 1:var m=2;break}a[1]=a[1]+m|0;var -A=i+1|0;if(s!==i){var -i=A;continue}break}}if(a[1]===am(e))var -u=eJ(e);else{var -b=F(a[1]);a[1]=0;var -t=am(e)-1|0,y=0;if(!(t<0)){var +A=i+1|0;if(r!==i){var +i=A;continue}break}}if(a[1]===aG(e))var +u=fN(e);else{var +b=R(a[1]);a[1]=0;var +s=aG(e)-1|0,y=0;if(!(s<0)){var h=y;for(;;){var -c=cg(e,h),d=0;if(35<=c)if(92===c)d=2;else -if(b9<=c)d=1;else +c=cY(e,h),d=0;if(35<=c)if(92===c)d=2;else +if(cI<=c)d=1;else d=3;else if(32<=c)if(34<=c)d=2;else d=3;else if(14<=c)d=1;else switch(c){case -8:E(b,a[1],92);a[1]++;E(b,a[1],98);break;case -9:E(b,a[1],92);a[1]++;E(b,a[1],116);break;case -10:E(b,a[1],92);a[1]++;E(b,a[1],110);break;case -13:E(b,a[1],92);a[1]++;E(b,a[1],114);break;default:d=1}switch(d){case -1:E(b,a[1],92);a[1]++;E(b,a[1],48+(c/at|0)|0);a[1]++;E(b,a[1],48+((c/10|0)%10|0)|0);a[1]++;E(b,a[1],48+(c%10|0)|0);break;case -2:E(b,a[1],92);a[1]++;E(b,a[1],c);break;case -3:E(b,a[1],c);break}a[1]++;var -z=h+1|0;if(t!==h){var +8:Q(b,a[1],92);a[1]++;Q(b,a[1],98);break;case +9:Q(b,a[1],92);a[1]++;Q(b,a[1],116);break;case +10:Q(b,a[1],92);a[1]++;Q(b,a[1],cW);break;case +13:Q(b,a[1],92);a[1]++;Q(b,a[1],114);break;default:d=1}switch(d){case +1:Q(b,a[1],92);a[1]++;Q(b,a[1],48+(c/aO|0)|0);a[1]++;Q(b,a[1],48+((c/10|0)%10|0)|0);a[1]++;Q(b,a[1],48+(c%10|0)|0);break;case +2:Q(b,a[1],92);a[1]++;Q(b,a[1],c);break;case +3:Q(b,a[1],c);break}a[1]++;var +z=h+1|0;if(s!==h){var h=z;continue}break}}var u=b}var -o=Y(u)}var -v=q(o),w=aB(v+2|0,34);bf(o,0,w,1,v);return Y(w)}}function -eX(d,f){var -g=cr(f),e=eY?eY[1]:70;switch(d[2]){case +o=an(u)}var +v=t(o),w=aY(v+2|0,34);bK(o,0,w,1,v);return an(w)}}function +f1(d,f){var +g=c9(f),e=f2?f2[1]:70;switch(d[2]){case 0:var -b=gJ;break;case +b=ib;break;case 1:var -b=gI;break;case +b=dO;break;case 2:var b=69;break;case 3:var -b=d5;break;case +b=eY;break;case 4:var b=71;break;case 5:var @@ -1996,210 +2012,210 @@ b=104;break;case 7:var b=72;break;default:var b=70}var -c=eU(16);bu(c,37);switch(d[1]){case +c=fY(16);b0(c,37);switch(d[1]){case 0:break;case -1:bu(c,43);break;default:bu(c,32)}if(8<=d[2])bu(c,35);bu(c,46);T(c,a(h+g));bu(c,b);return eW(c)}function -cw(m,a){if(13<=m){var -g=[0,0],h=q(a)-1|0,n=0;if(!(h<0)){var -c=n;for(;;){if(!(9<(bK(a,c)+cS|0)>>>0))g[1]++;var -r=c+1|0;if(h!==c){var -c=r;continue}break}}var -i=g[1],j=F(q(a)+((i-1|0)/3|0)|0),k=[0,0],d=function(a){av(j,k[1],a);k[1]++;return 0},e=[0,((i-1|0)%3|0)+1|0],l=q(a)-1|0,o=0;if(!(l<0)){var +1:b0(c,43);break;default:b0(c,32)}if(8<=d[2])b0(c,35);b0(c,46);aj(c,a(j+g));b0(c,b);return f0(c)}function +dg(m,a){if(13<=m){var +g=[0,0],h=t(a)-1|0,n=0;if(!(h<0)){var +c=n;for(;;){if(!(9<(ch(a,c)+dE|0)>>>0))g[1]++;var +q=c+1|0;if(h!==c){var +c=q;continue}break}}var +i=g[1],j=R(t(a)+((i-1|0)/3|0)|0),k=[0,0],d=function(a){aR(j,k[1],a);k[1]++;return 0},e=[0,((i-1|0)%3|0)+1|0],l=t(a)-1|0,o=0;if(!(l<0)){var b=o;for(;;){var -f=bK(a,b);if(9<(f+cS|0)>>>0)d(f);else{if(0===e[1]){d(95);e[1]=3}e[1]+=-1;d(f)}var +f=ch(a,b);if(9<(f+dE|0)>>>0)d(f);else{if(0===e[1]){d(95);e[1]=3}e[1]+=-1;d(f)}var p=b+1|0;if(l!==b){var -b=p;continue}break}}return Y(j)}return a}function -jQ(b,c){switch(b){case +b=p;continue}break}}return an(j)}return a}function +lu(b,c){switch(b){case 1:var -a=i3;break;case +a=kH;break;case 2:var -a=i4;break;case +a=kI;break;case 4:var -a=i6;break;case +a=kK;break;case 5:var -a=i7;break;case +a=kL;break;case 6:var -a=i8;break;case +a=kM;break;case 7:var -a=i9;break;case +a=kN;break;case 8:var -a=i_;break;case +a=kO;break;case 9:var -a=i$;break;case +a=kP;break;case 10:var -a=ja;break;case +a=kQ;break;case 11:var -a=jb;break;case +a=kR;break;case 0:case 13:var -a=i2;break;case +a=kG;break;case 3:case 14:var -a=i5;break;default:var -a=jc}return cw(b,c_(a,c))}function -jR(b,c){switch(b){case +a=kJ;break;default:var +a=kS}return dg(b,d1(a,c))}function +lv(b,c){switch(b){case 1:var -a=jr;break;case +a=k7;break;case 2:var -a=js;break;case +a=k8;break;case 4:var -a=ju;break;case +a=k_;break;case 5:var -a=jv;break;case +a=k$;break;case 6:var -a=jw;break;case +a=la;break;case 7:var -a=jx;break;case +a=lb;break;case 8:var -a=jy;break;case +a=lc;break;case 9:var -a=jz;break;case +a=ld;break;case 10:var -a=jA;break;case +a=le;break;case 11:var -a=jB;break;case +a=lf;break;case 0:case 13:var -a=jq;break;case +a=k6;break;case 3:case 14:var -a=jt;break;default:var -a=jC}return cw(b,c_(a,c))}function -jS(b,c){switch(b){case +a=k9;break;default:var +a=lg}return dg(b,d1(a,c))}function +lw(b,c){switch(b){case 1:var -a=jE;break;case +a=li;break;case 2:var -a=jF;break;case +a=lj;break;case 4:var -a=jH;break;case +a=ll;break;case 5:var -a=jI;break;case +a=lm;break;case 6:var -a=jJ;break;case +a=ln;break;case 7:var -a=jK;break;case +a=lo;break;case 8:var -a=jL;break;case +a=lp;break;case 9:var -a=jM;break;case +a=lq;break;case 10:var -a=jN;break;case +a=lr;break;case 11:var -a=jO;break;case +a=ls;break;case 0:case 13:var -a=jD;break;case +a=lh;break;case 3:case 14:var -a=jG;break;default:var -a=jP}return cw(b,c_(a,c))}function -jT(b,c){switch(b){case +a=lk;break;default:var +a=lt}return dg(b,d1(a,c))}function +lx(b,c){switch(b){case 1:var -a=je;break;case +a=kU;break;case 2:var -a=jf;break;case +a=kV;break;case 4:var -a=jh;break;case +a=kX;break;case 5:var -a=ji;break;case +a=kY;break;case 6:var -a=jj;break;case +a=kZ;break;case 7:var -a=jk;break;case +a=k0;break;case 8:var -a=jl;break;case +a=k1;break;case 9:var -a=jm;break;case +a=k2;break;case 10:var -a=jn;break;case +a=k3;break;case 11:var -a=jo;break;case +a=k4;break;case 0:case 13:var -a=jd;break;case +a=kT;break;case 3:case 14:var -a=jg;break;default:var -a=jp}return cw(b,sE(a,c))}function -aO(c,i,b){function +a=kW;break;default:var +a=k5}return dg(b,yo(a,c))}function +bb(c,i,b){function j(d){switch(c[1]){case 0:var a=45;break;case 1:var a=43;break;default:var -a=32}return sB(b,i,a)}function -s(c){var -a=ss(b);return 3===a?b<0.?jV:jW:4<=a?jX:c}switch(c[2]){case +a=32}return yl(b,i,a)}function +r(c){var +a=yc(b);return 3===a?b<0.?lz:lA:4<=a?lB:c}switch(c[2]){case 5:var -e=hk(eX(c,i),b),d=0,w=q(e);for(;;){if(d===w)var -r=0;else{var -k=l(e,d)+gi|0,m=0;if(23>>0){if(55===k)m=1}else -if(21<(k-1|0)>>>0)m=1;if(!m){var +e=i3(f1(c,i),b),d=0,w=t(e);for(;;){if(d===w)var +q=0;else{var +k=o(e,d)+hx|0,l=0;if(23>>0){if(55===k)l=1}else +if(21<(k-1|0)>>>0)l=1;if(!l){var d=d+1|0;continue}var -r=1}var -x=r?e:a3(e,jU);return s(x)}case +q=1}var +x=q?e:bt(e,ly);return r(x)}case 6:return j(0);case 7:var -h=aZ(j(0)),f=am(h);if(0===f)var +h=bp(j(0)),f=aG(h);if(0===f)var p=h;else{var -n=F(f),o=f-1|0,t=0;if(!(o<0)){var -a=t;for(;;){var -g=cg(h,a),u=25<(g+gB|0)>>>0?g:g+ee|0;E(n,a,u);var -v=a+1|0;if(o!==a){var +m=R(f),n=f-1|0,s=0;if(!(n<0)){var +a=s;for(;;){var +g=cY(h,a),u=25<(g+h3|0)>>>0?g:g+fe|0;Q(m,a,u);var +v=a+1|0;if(n!==a){var a=v;continue}break}}var -p=n}return Y(p);case -8:return s(j(0));default:return hk(eX(c,i),b)}}function -b7(f,H,G,C){var -b=H,a=G,d=C;for(;;)if(typeof -d==="number")return c(b,a);else +p=m}return an(p);case +8:return r(j(0));default:return i3(f1(c,i),b)}}function +cE(e,D,B,z){var +c=D,a=B,d=z;for(;;)if(typeof +d==="number")return b(c,a);else switch(d[0]){case 0:var -I=d[1];return function(c){return t(b,[5,a,c],I)};case +E=d[1];return function(b){return x(c,[5,a,b],E)};case 1:var -J=d[1];return function(c){var -e=0;if(40<=c)if(92===c)var -d=hO;else -if(b9<=c)e=1;else +F=d[1];return function(b){var +e=0;if(40<=b)if(92===b)var +d=ju;else +if(cI<=b)e=1;else e=2;else -if(32<=c)if(39<=c)var -d=hP;else +if(32<=b)if(39<=b)var +d=jv;else e=2;else -if(14<=c)e=1;else -switch(c){case +if(14<=b)e=1;else +switch(b){case 8:var -d=hQ;break;case +d=jw;break;case 9:var -d=hR;break;case +d=jx;break;case 10:var -d=hS;break;case +d=jy;break;case 13:var -d=hT;break;default:e=1}switch(e){case +d=jz;break;default:e=1}switch(e){case 1:var -f=F(4);E(f,0,92);E(f,1,48+(c/at|0)|0);E(f,2,48+((c/10|0)%10|0)|0);E(f,3,48+(c%10|0)|0);var -d=Y(f);break;case +f=R(4);Q(f,0,92);Q(f,1,48+(b/aO|0)|0);Q(f,2,48+((b/10|0)%10|0)|0);Q(f,3,48+(b%10|0)|0);var +d=an(f);break;case 2:var -g=F(1);E(g,0,c);var -d=Y(g);break}var -h=q(d),i=aB(h+2|0,39);bf(d,0,i,1,h);return t(b,[4,a,Y(i)],J)};case +g=R(1);Q(g,0,b);var +d=an(g);break}var +h=t(d),i=aY(h+2|0,39);bK(d,0,i,1,h);return x(c,[4,a,an(i)],F)};case 2:var -K=d[2],N=d[1];return ds(b,a,K,N,function(a){return a});case -3:return ds(b,a,d[2],d[1],i1);case -4:return cx(b,a,d[4],d[2],d[3],jQ,d[1]);case -5:return cx(b,a,d[4],d[2],d[3],jR,d[1]);case -6:return cx(b,a,d[4],d[2],d[3],jS,d[1]);case -7:return cx(b,a,d[4],d[2],d[3],jT,d[1]);case +G=d[2],H=d[1];return ei(c,a,G,H,function(a){return a});case +3:return ei(c,a,d[2],d[1],kF);case +4:return dh(c,a,d[4],d[2],d[3],lu,d[1]);case +5:return dh(c,a,d[4],d[2],d[3],lv,d[1]);case +6:return dh(c,a,d[4],d[2],d[3],lw,d[1]);case +7:return dh(c,a,d[4],d[2],d[3],lx,d[1]);case 8:var i=d[4],j=d[3],k=d[2],h=d[1];if(typeof k==="number"){if(typeof -j==="number")return j?function(d,c){return t(b,[4,a,aO(h,d,c)],i)}:function(c){return t(b,[4,a,aO(h,dq(h),c)],i)};var -af=j[1];return function(c){return t(b,[4,a,aO(h,af,c)],i)}}else{if(0===k[0]){var +j==="number")return j?function(d,b){return x(c,[4,a,bb(h,d,b)],i)}:function(b){return x(c,[4,a,bb(h,eg(h),b)],i)};var +ab=j[1];return function(b){return x(c,[4,a,bb(h,ab,b)],i)}}else{if(0===k[0]){var n=k[2],o=k[1];if(typeof -j==="number")return j?function(d,c){return t(b,[4,a,ac(o,n,aO(h,d,c))],i)}:function(c){return t(b,[4,a,ac(o,n,aO(h,dq(h),c))],i)};var -ag=j[1];return function(c){return t(b,[4,a,ac(o,n,aO(h,ag,c))],i)}}var +j==="number")return j?function(d,b){return x(c,[4,a,au(o,n,bb(h,d,b))],i)}:function(b){return x(c,[4,a,au(o,n,bb(h,eg(h),b))],i)};var +ad=j[1];return function(b){return x(c,[4,a,au(o,n,bb(h,ad,b))],i)}}var p=k[1];if(typeof -j==="number")return j?function(e,d,c){return t(b,[4,a,ac(p,e,aO(h,d,c))],i)}:function(d,c){return t(b,[4,a,ac(p,d,aO(h,dq(h),c))],i)};var -ah=j[1];return function(d,c){return t(b,[4,a,ac(p,d,aO(h,ah,c))],i)}}case -9:return ds(b,a,d[2],d[1],hF);case +j==="number")return j?function(e,d,b){return x(c,[4,a,au(p,e,bb(h,d,b))],i)}:function(d,b){return x(c,[4,a,au(p,d,bb(h,eg(h),b))],i)};var +ae=j[1];return function(d,b){return x(c,[4,a,au(p,d,bb(h,ae,b))],i)}}case +9:return ei(c,a,d[2],d[1],jl);case 10:var a=[7,a],d=d[1];continue;case 11:var @@ -2207,102 +2223,102 @@ a=[2,a,d[1]],d=d[2];continue;case 12:var a=[3,a,d[1]],d=d[2];continue;case 13:var -O=d[3],P=d[2],s=eU(16);dr(s,P);var -B=eW(s);return function(c){return t(b,[4,a,B],O)};case +J=d[3],K=d[2],q=fY(16);eh(q,K);var +y=f0(q);return function(b){return x(c,[4,a,y],J)};case 14:var -R=d[3],S=d[2];return function(d){var -e=d[1],c=w(e,D(L(S)));if(typeof -c[2]==="number")return t(b,a,A(c[1],R));throw Q};case +M=d[3],N=d[2];return function(d){var +e=d[1],b=C(e,L(Z(N)));if(typeof +b[2]==="number")return x(c,a,I(b[1],M));throw ag};case 15:var -T=d[1];return function(d,c){return t(b,[6,a,function(a){return e(d,a,c)}],T)};case +O=d[1];return function(d,b){return x(c,[6,a,function(a){return g(d,a,b)}],O)};case 16:var -U=d[1];return function(c){return t(b,[6,a,c],U)};case +P=d[1];return function(b){return x(c,[6,a,b],P)};case 17:var a=[0,a,d[1]],d=d[2];continue;case 18:var m=d[1];if(0===m[0]){var -V=d[2],W=m[1][1],X=0,b=function(b,c,d){return function(a){return t(c,[1,b,[0,a]],d)}}(a,b,V),a=X,d=W;continue}var -Z=d[2],_=m[1][1],$=0,b=function(b,c,d){return function(a){return t(c,[1,b,[1,a]],d)}}(a,b,Z),a=$,d=_;continue;case -19:throw[0,r,jZ];case +S=d[2],T=m[1][1],U=0,c=function(b,c,d){return function(a){return x(c,[1,b,[0,a]],d)}}(a,c,S),a=U,d=T;continue}var +V=d[2],W=m[1][1],X=0,c=function(b,c,d){return function(a){return x(c,[1,b,[1,a]],d)}}(a,c,V),a=X,d=W;continue;case +19:throw[0,u,lD];case 20:var -aa=d[3],ab=[8,a,j0];return function(a){return t(b,ab,aa)};case +Y=d[3],_=[8,a,lE];return function(a){return x(c,_,Y)};case 21:var -ad=d[2];return function(c){return t(b,[4,a,c_(j1,c)],ad)};case +$=d[2];return function(b){return x(c,[4,a,d1(lF,b)],$)};case 22:var -ae=d[1];return function(c){return t(b,[5,a,c],ae)};case +aa=d[1];return function(b){return x(c,[5,a,b],aa)};case 23:var -g=d[2],l=d[1];if(typeof +f=d[2],l=d[1];if(typeof l==="number")switch(l){case -0:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -1:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -2:throw[0,r,j2];default:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g])}else +0:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +1:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +2:throw[0,u,lG];default:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f])}else switch(l[0]){case -0:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -1:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -2:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -3:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -4:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -5:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -6:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -7:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case -8:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);case +0:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +1:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +2:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +3:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +4:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +5:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +6:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +7:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case +8:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);case 9:var -z=l[2];return f<50?d1(f+1|0,b,a,z,g):M(d1,[0,b,a,z,g]);case -10:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g]);default:return f<50?u(f+1|0,b,a,g):M(u,[0,b,a,g])}default:var -v=d[3],x=d[1],y=c(d[2],0);return f<50?d0(f+1|0,b,a,v,x,y):M(d0,[0,b,a,v,x,y])}}function -d1(e,d,c,a,b){if(typeof -a==="number")return e<50?u(e+1|0,d,c,b):M(u,[0,d,c,b]);else +w=l[2];return e<50?eS(e+1|0,c,a,w,f):ac(eS,[0,c,a,w,f]);case +10:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f]);default:return e<50?A(e+1|0,c,a,f):ac(A,[0,c,a,f])}default:var +r=d[3],s=d[1],v=b(d[2],0);return e<50?eR(e+1|0,c,a,r,s,v):ac(eR,[0,c,a,r,s,v])}}function +eS(e,d,c,a,b){if(typeof +a==="number")return e<50?A(e+1|0,d,c,b):ac(A,[0,d,c,b]);else switch(a[0]){case 0:var -f=a[1];return function(a){return ai(d,c,f,b)};case +f=a[1];return function(a){return aA(d,c,f,b)};case 1:var -g=a[1];return function(a){return ai(d,c,g,b)};case +g=a[1];return function(a){return aA(d,c,g,b)};case 2:var -h=a[1];return function(a){return ai(d,c,h,b)};case +h=a[1];return function(a){return aA(d,c,h,b)};case 3:var -i=a[1];return function(a){return ai(d,c,i,b)};case +i=a[1];return function(a){return aA(d,c,i,b)};case 4:var -j=a[1];return function(a){return ai(d,c,j,b)};case +j=a[1];return function(a){return aA(d,c,j,b)};case 5:var -k=a[1];return function(a){return ai(d,c,k,b)};case +k=a[1];return function(a){return aA(d,c,k,b)};case 6:var -l=a[1];return function(a){return ai(d,c,l,b)};case +l=a[1];return function(a){return aA(d,c,l,b)};case 7:var -m=a[1];return function(a){return ai(d,c,m,b)};case +m=a[1];return function(a){return aA(d,c,m,b)};case 8:var -n=a[2];return function(a){return ai(d,c,n,b)};case +n=a[2];return function(a){return aA(d,c,n,b)};case 9:var -o=a[3],p=a[2],q=N(L(a[1]),p);return function(a){return ai(d,c,Z(q,o),b)};case +o=a[3],p=a[2],q=ad(Z(a[1]),p);return function(a){return aA(d,c,ao(q,o),b)};case 10:var -s=a[1];return function(e,a){return ai(d,c,s,b)};case +r=a[1];return function(e,a){return aA(d,c,r,b)};case 11:var -t=a[1];return function(a){return ai(d,c,t,b)};case +s=a[1];return function(a){return aA(d,c,s,b)};case 12:var -v=a[1];return function(a){return ai(d,c,v,b)};case -13:throw[0,r,j3];default:throw[0,r,j4]}}function -u(d,b,e,a){var -c=[8,e,j5];return d<50?b7(d+1|0,b,c,a):M(b7,[0,b,c,a])}function -d0(h,b,f,a,e,d){if(e){var -i=e[1];return function(e){return jY(b,f,a,i,c(d,e))}}var -g=[4,f,d];return h<50?b7(h+1|0,b,g,a):M(b7,[0,b,g,a])}function -t(a,b,c){return cm(b7(0,a,b,c))}function -ai(a,b,c,d){return cm(d1(0,a,b,c,d))}function -jY(a,b,c,d,e){return cm(d0(0,a,b,c,d,e))}function -ds(f,e,d,a,b){if(typeof -a==="number")return function(a){return t(f,[4,e,c(b,a)],d)};else{if(0===a[0]){var -g=a[2],h=a[1];return function(a){return t(f,[4,e,ac(h,g,c(b,a))],d)}}var -i=a[1];return function(g,a){return t(f,[4,e,ac(i,g,c(b,a))],d)}}}function -cx(g,f,d,h,c,b,a){if(typeof +t=a[1];return function(a){return aA(d,c,t,b)};case +13:throw[0,u,lH];default:throw[0,u,lI]}}function +A(d,b,e,a){var +c=[8,e,lJ];return d<50?cE(d+1|0,b,c,a):ac(cE,[0,b,c,a])}function +eR(h,c,f,a,e,d){if(e){var +i=e[1];return function(e){return lC(c,f,a,i,b(d,e))}}var +g=[4,f,d];return h<50?cE(h+1|0,c,g,a):ac(cE,[0,c,g,a])}function +x(a,b,c){return c4(cE(0,a,b,c))}function +aA(a,b,c,d){return c4(eS(0,a,b,c,d))}function +lC(a,b,c,d,e){return c4(eR(0,a,b,c,d,e))}function +ei(f,e,d,a,c){if(typeof +a==="number")return function(a){return x(f,[4,e,b(c,a)],d)};else{if(0===a[0]){var +g=a[2],h=a[1];return function(a){return x(f,[4,e,au(h,g,b(c,a))],d)}}var +i=a[1];return function(g,a){return x(f,[4,e,au(i,g,b(c,a))],d)}}}function +dh(f,e,d,h,c,b,a){if(typeof h==="number"){if(typeof -c==="number")return c?function(h,c){return t(g,[4,f,bv(h,e(b,a,c))],d)}:function(c){return t(g,[4,f,e(b,a,c)],d)};var -l=c[1];return function(c){return t(g,[4,f,bv(l,e(b,a,c))],d)}}else{if(0===h[0]){var +c==="number")return c?function(h,c){return x(f,[4,e,b1(h,g(b,a,c))],d)}:function(c){return x(f,[4,e,g(b,a,c)],d)};var +l=c[1];return function(c){return x(f,[4,e,b1(l,g(b,a,c))],d)}}else{if(0===h[0]){var i=h[2],j=h[1];if(typeof -c==="number")return c?function(h,c){return t(g,[4,f,ac(j,i,bv(h,e(b,a,c)))],d)}:function(c){return t(g,[4,f,ac(j,i,e(b,a,c))],d)};var -m=c[1];return function(c){return t(g,[4,f,ac(j,i,bv(m,e(b,a,c)))],d)}}var +c==="number")return c?function(h,c){return x(f,[4,e,au(j,i,b1(h,g(b,a,c)))],d)}:function(c){return x(f,[4,e,au(j,i,g(b,a,c))],d)};var +m=c[1];return function(c){return x(f,[4,e,au(j,i,b1(m,g(b,a,c)))],d)}}var k=h[1];if(typeof -c==="number")return c?function(i,h,c){return t(g,[4,f,ac(k,i,bv(h,e(b,a,c)))],d)}:function(h,c){return t(g,[4,f,ac(k,h,e(b,a,c))],d)};var -n=c[1];return function(h,c){return t(g,[4,f,ac(k,h,bv(n,e(b,a,c)))],d)}}}function -a4(b,h){var +c==="number")return c?function(i,h,c){return x(f,[4,e,au(k,i,b1(h,g(b,a,c)))],d)}:function(h,c){return x(f,[4,e,au(k,h,g(b,a,c))],d)};var +n=c[1];return function(h,c){return x(f,[4,e,au(k,h,b1(n,g(b,a,c)))],d)}}}function +bu(c,h){var a=h;for(;;)if(typeof a==="number")return 0;else switch(a[0]){case @@ -2310,123 +2326,123 @@ switch(a[0]){case e=a[2],i=a[1];if(typeof e==="number")switch(e){case 0:var -d=ik;break;case +d=j1;break;case 1:var -d=il;break;case +d=j2;break;case 2:var -d=im;break;case +d=j3;break;case 3:var -d=io;break;case +d=j4;break;case 4:var -d=ip;break;case +d=j5;break;case 5:var -d=iq;break;default:var -d=ir}else +d=j6;break;default:var +d=j7}else switch(e[0]){case 0:var d=e[1];break;case 1:var d=e[1];break;default:var -d=a3(is,eN(1,e[1]))}a4(b,i);return bS(b,d);case +d=bt(j8,fR(1,e[1]))}bu(c,i);return cp(c,d);case 1:var f=a[2],g=a[1];if(0===f[0]){var -j=f[1];a4(b,g);bS(b,j6);var +j=f[1];bu(c,g);cp(c,lK);var a=j;continue}var -k=f[1];a4(b,g);bS(b,j7);var +k=f[1];bu(c,g);cp(c,lL);var a=k;continue;case 6:var -n=a[2];a4(b,a[1]);return bS(b,c(n,0));case +n=a[2];bu(c,a[1]);return cp(c,b(n,0));case 7:var a=a[1];continue;case 8:var -o=a[2];a4(b,a[1]);return K(o);case +o=a[2];bu(c,a[1]);return Y(o);case 2:case 4:var -l=a[2];a4(b,a[1]);return bS(b,l);default:var -m=a[2];a4(b,a[1]);return eT(b,m)}}function -eZ(b){var -a=b[1];return t(function(b){var -a=dn(64);a4(a,b);return eS(a)},0,a)}var -e0=[0,0];function -dt(a){e0[1]=[0,a,e0[1]];return 0}try{var -sj=df(si),e2=sj}catch(a){a=d(a);if(a!==V)throw a;try{var -sh=df(sg),e1=sh}catch(a){a=d(a);if(a!==V)throw a;var -e1=j9}var -e2=e1}var -j_=h0(e2,82),cy=[gp,function(z){var -o=tc(0),c=[0,a1(55,0),0],j=0===o.length-1?[0,0]:o,k=j.length-1,b=0;for(;;){X(c[1],b)[1+b]=b;var +l=a[2];bu(c,a[1]);return cp(c,l);default:var +m=a[2];bu(c,a[1]);return fX(c,m)}}function +f3(b){var +a=b[1];return x(function(b){var +a=ee(64);bu(a,b);return fW(a)},0,a)}var +f4=[0,0];function +ej(a){f4[1]=[0,a,f4[1]];return 0}try{var +x5=d_(x4),f6=x5}catch(a){a=d(a);if(a!==al)throw a;try{var +x3=d_(x2),f5=x3}catch(a){a=d(a);if(a!==al)throw a;var +f5=lN}var +f6=f5}var +lO=jG(f6,82),di=[hL,function(z){var +n=yX(0),c=[0,br(55,0),0],i=0===n.length-1?[0,0]:n,k=i.length-1,b=0;for(;;){ab(c[1],b)[1+b]=b;var y=b+1|0;if(54!==b){var b=y;continue}var -g=[0,j8],m=54+cq(55,k)|0,u=0;if(!(m<0)){var +g=[0,lM],l=54+c8(55,k)|0,u=0;if(!(l<0)){var d=u;for(;;){var -e=d%55|0,n=s1(d,k),v=X(j,n)[1+n],i=a3(g[1],a(h+v));g[1]=sW(i,0,q(i));var -f=g[1],p=l(f,3)<<24,r=l(f,2)<<16,s=l(f,1)<<8,t=((l(f,0)+s|0)+r|0)+p|0,w=(X(c[1],e)[1+e]^t)&d8;X(c[1],e)[1+e]=w;var -x=d+1|0;if(m!==d){var +e=d%55|0,m=yK(d,k),v=ab(i,m)[1+m],h=bt(g[1],a(j+v));g[1]=yF(h,0,t(h));var +f=g[1],p=o(f,3)<<24,q=o(f,2)<<16,r=o(f,1)<<8,s=((o(f,0)+r|0)+q|0)+p|0,w=(ab(c[1],e)[1+e]^s)&e3;ab(c[1],e)[1+e]=w;var +x=d+1|0;if(l!==d){var d=x;continue}break}}c[2]=0;return c}}];function -j$(h,k){var -l=h?h[1]:j_,b=16;for(;;){if(!(k<=b)&&!(eI<(b*2|0))){var +lP(h,k){var +l=h?h[1]:lO,b=16;for(;;){if(!(k<=b)&&!(fM<(b*2|0))){var b=b*2|0;continue}if(l){var -i=ht(cy),a=cT===i?cy[1]:gp===i?ie(cy):cy;a[2]=(a[2]+1|0)%55|0;var -c=a[2],d=X(a[1],c)[1+c],e=(a[2]+24|0)%55|0,f=(X(a[1],e)[1+e]+(d^(d>>>25|0)&31)|0)&d8,g=a[2];X(a[1],g)[1+g]=f;var +i=i$(di),a=dF===i?di[1]:hL===i?jW(di):di;a[2]=(a[2]+1|0)%55|0;var +c=a[2],d=ab(a[1],c)[1+c],e=(a[2]+24|0)%55|0,f=(ab(a[1],e)[1+e]+(d^(d>>>25|0)&31)|0)&e3,g=a[2];ab(a[1],g)[1+g]=f;var j=f}else var -j=0;return[0,0,a1(b,0),j,b]}}function -aC(a){return sv(10,at,0,a)}var -e5=[v,ka,P(0)],e3=0,e4=-1;function -cz(a,b){a[13]=a[13]+b[3]|0;return eR(b,a[28])}var -e6=1000000010;function -du(b,a){return y(b[17],a,0,q(a))}function -dv(a){return c(a[19],0)}function -e7(a,c,b){a[9]=a[9]-c|0;du(a,b);a[11]=0;return 0}function -cA(c,a){var -b=I(a,kb);return b?e7(c,q(a),a):b}function -bw(a,b,f){var -g=b[3],h=b[2];cA(a,b[1]);dv(a);a[11]=1;var -d=(a[6]-f|0)+h|0,e=a[8],i=sT(e,d)?e:d;a[10]=i;a[9]=a[6]-a[10]|0;c(a[21],a[10]);return cA(a,g)}function -e8(b,a){return bw(b,kc,a)}function -bU(a,b){var -d=b[2],e=b[3];cA(a,b[1]);a[9]=a[9]-d|0;c(a[20],d);return cA(a,e)}function -e9(a){for(;;){var -s=a[28][2],O=s?[0,s[1]]:0;if(O){var -p=O[1],r=p[1],b=p[2],ac=0<=r?1:0,aa=p[3],ab=a[13]-a[12]|0,P=ac||(a[9]<=ab?1:0);if(P){var +j=0;return[0,0,br(b,0),j,b]}}function +aZ(a){return yf(10,aO,0,a)}var +f9=[B,lQ,af(0)],f7=0,f8=-1;function +dj(a,b){a[13]=a[13]+b[3]|0;return fV(b,a[28])}var +f_=1000000010;function +ek(b,a){return E(b[17],a,0,t(a))}function +el(a){return b(a[19],0)}function +f$(a,c,b){a[9]=a[9]-c|0;ek(a,b);a[11]=0;return 0}function +dk(c,a){var +b=U(a,lR);return b?f$(c,t(a),a):b}function +b2(a,c,f){var +g=c[3],h=c[2];dk(a,c[1]);el(a);a[11]=1;var +d=(a[6]-f|0)+h|0,e=a[8],i=yC(e,d)?e:d;a[10]=i;a[9]=a[6]-a[10]|0;b(a[21],a[10]);return dk(a,g)}function +ga(b,a){return b2(b,lS,a)}function +cr(a,c){var +d=c[2],e=c[3];dk(a,c[1]);a[9]=a[9]-d|0;b(a[20],d);return dk(a,e)}function +gb(a){for(;;){var +r=a[28][2],O=r?[0,r[1]]:0;if(O){var +p=O[1],q=p[1],c=p[2],ac=0<=q?1:0,aa=p[3],ab=a[13]-a[12]|0,P=ac||(a[9]<=ab?1:0);if(P){var g=a[28],m=g[2];if(m){if(m[2]){var Q=m[2];g[1]=g[1]-1|0;g[2]=Q}else -dm(g);var -l=0<=r?r:e6;if(typeof -b==="number")switch(b){case +ed(g);var +l=0<=q?q:f_;if(typeof +c==="number")switch(c){case 0:var -y=bt(a[3]);if(y){var +y=bZ(a[3]);if(y){var z=y[1][1],A=function(b,a){if(a){var -c=a[1],d=a[2];return eu(b,c)?[0,b,a]:[0,c,A(b,d)]}return[0,b,0]};z[1]=A(a[6]-a[9]|0,z[1])}break;case -1:bs(a[2]);break;case -2:bs(a[3]);break;case +c=a[1],d=a[2];return fy(b,c)?[0,b,a]:[0,c,A(b,d)]}return[0,b,0]};z[1]=A(a[6]-a[9]|0,z[1])}break;case +1:bY(a[2]);break;case +2:bY(a[3]);break;case 3:var -B=bt(a[2]);if(B)e8(a,B[1][2]);else -dv(a);break;case +B=bZ(a[2]);if(B)ga(a,B[1][2]);else +el(a);break;case 4:if(a[10]!==(a[6]-a[9]|0)){var e=a[28],h=e[2];if(h){var -t=h[1];if(h[2]){var +s=h[1];if(h[2]){var R=h[2];e[1]=e[1]-1|0;e[2]=R;var -i=[0,t]}else{dm(e);var -i=[0,t]}}else +i=[0,s]}else{ed(e);var +i=[0,s]}}else var i=0;if(i){var x=i[1],T=x[1];a[12]=a[12]-x[3]|0;a[9]=a[9]+T|0}}break;default:var -C=bs(a[5]);if(C)du(a,c(a[25],C[1]))}else -switch(b[0]){case -0:e7(a,l,b[1]);break;case +C=bY(a[5]);if(C)ek(a,b(a[25],C[1]))}else +switch(c[0]){case +0:f$(a,l,c[1]);break;case 1:var -d=b[2],j=b[1],D=d[1],U=d[2],E=bt(a[2]);if(E){var +d=c[2],j=c[1],D=d[1],U=d[2],E=bZ(a[2]);if(E){var F=E[1],f=F[2];switch(F[1]){case -0:bU(a,j);break;case -1:bw(a,d,f);break;case -2:bw(a,d,f);break;case -3:if(a[9]<(l+q(D)|0))bw(a,d,f);else -bU(a,j);break;case -4:if(a[11]||!(a[9]<(l+q(D)|0)||((a[6]-f|0)+U|0)>>0))e8(a,w)}else -dv(a)}var -_=a[9]-Z|0,$=1===M?1:a[9]>>0))ga(a,w)}else +el(a)}var +_=a[9]-Z|0,$=1===M?1:a[9]>>3|0,bq(bg(b,a>>>3|0)|1<<(a&7)))}function -cD(b){var -a=dA(0);bV(a,b);return a}function -cE(c){var -b=F(32),a=0;for(;;){av(b,a,bq(bg(c,a)^by));var +h=d[1],a=b(f3(nx),h);return[0,E(f3(mt),a,g,f)]}return 0});eb(ny);eb(nz);try{eb(xZ)}catch(a){a=d(a);if(a[1]!==c7)throw a}try{eb(xY)}catch(a){a=d(a);if(a[1]!==c7)throw a}lP(0,7);function +nA(b,a){return db(b,0,a)}function +nB(b,a){return db(b,a,t(b)-a|0)}var +bc=aY(32,b5);function +er(a){return aY(32,0)}function +cs(b,a){return aR(b,a>>>3|0,bW(bL(b,a>>>3|0)|1<<(a&7)))}function +dp(b){var +a=er(0);cs(a,b);return a}function +dq(c){var +b=R(32),a=0;for(;;){aR(b,a,bW(bL(c,a)^b5));var d=a+1|0;if(31!==a){var a=d;continue}return b}}function -dB(d,c){var -b=F(32),a=0;for(;;){var -e=bg(c,a);av(b,a,bq(bg(d,a)|e));var +es(d,c){var +b=R(32),a=0;for(;;){var +e=bL(c,a);aR(b,a,bW(bL(d,a)|e));var f=a+1|0;if(31!==a){var a=f;continue}return b}}function -lZ(c,b){try{var +nC(c,b){try{var a=0;for(;;){var -f=bg(b,a);if(0!==(bg(c,a)&f))throw eD;var +f=bL(b,a);if(0!==(bL(c,a)&f))throw fH;var g=a+1|0;if(31!==a){var a=g;continue}var -e=1;return e}}catch(a){a=d(a);if(a===eD)return 0;throw a}}function -fj(f,e){var +e=1;return e}}catch(a){a=d(a);if(a===fH)return 0;throw a}}function +gn(f,e){var a=0;for(;;){var -d=bg(e,a);if(0!==d){var -b=0;for(;;){if(0!==(d&1<>>0){if(!(25<(b+b9|0)>>>0))d=1}else +c=er(0);gn(function(a){cs(c,fK(a));var +b=a-224|0,d=0;if(30>>0){if(!(25<(b+cI|0)>>>0))d=1}else if(23!==b)d=1;var -e=d?a+ee|0:a;return bV(c,e)},b);var +e=d?a+fe|0:a;return cs(c,e)},b);var d=c}else var d=b;var -h=f?cE(d):d;return cs(h)}throw[0,r,mc]}var -fn=F(bB),b6=0;for(;;){av(fn,b6,eG(bq(b6)));var -sb=b6+1|0;if(by!==b6){var -b6=sb;continue}cs(fn);var -cH=cu([0,ey]),fo=function(a){var -b=eS(a[1]);a[1][2]=0;var -c=q(b);if(0===c)return 0;if(1===c){var -d=a[2];a[2]=[0,[0,l(b,0)],d];return 0}a[2]=[0,[1,b],a[2]];return 0},mg=cE(cD(10)),dG=j,dH=hf,mm=function(b){var -g=q(b),D=[0,1];function -G(f){var -d=dA(0),a=f;for(;;){if(g<=a)a2(mk);if(93===l(b,a)&&f>>0)if(9<=t)var -j=[0,[9,k+cS|0],f+1|0];else -m=1;else -if(t)m=2;else{var -I=D[1];D[1]++;var -v=E(f+1|0),p=v[2],A=0,J=v[1];if((p+1|0)>>0)if(9<=s)var +j=[0,[9,k+dE|0],g+1|0];else +l=1;else +if(s)l=2;else{var +I=C[1];C[1]++;var +v=D(g+1|0),p=v[2],A=0,J=v[1];if((p+1|0)>>0)){if(s){var +c=e[1],d=e[2];for(;;){if(!(f<=d)){var +r=o(b,d)-42|0;if(!(1>>0)){if(r){var c=[6,c],d=d+1|0;continue}var -c=[5,c],d=d+1|0;continue}if(21===s){var +c=[5,c],d=d+1|0;continue}if(21===r){var c=[7,c],d=d+1|0;continue}}var B=0;if(typeof -c!=="number"&&0===c[0]){eT(h[1],c[1]);B=1}if(!B){fo(h);h[2]=[0,c,h[2]]}var -a=d;continue a}}}fo(h);return[0,[3,dk(h[2])],a]}}function -E(f){var -d=F(f),c=d[1],a=d[2];for(;;){if((a+2|0)<=g&&92===l(b,a)&&eg===l(b,a+1|0)){var +c!=="number"&&0===c[0]){fX(h[1],c[1]);B=1}if(!B){gs(h);h[2]=[0,c,h[2]]}var +a=d;continue a}}}gs(h);return[0,[3,c_(h[2])],a]}}function +D(g){var +d=F(g),c=d[1],a=d[2];for(;;){if((a+2|0)<=f&&92===o(b,a)&&fh===o(b,a+1|0)){var e=F(a+2|0),c=[4,c,e[1]],a=e[2];continue}return[0,c,a]}}var -H=E(0),Q=H[1],I=H[2]===g?Q:a2(ml),h=[0,a1(32,0)],c=[0,0],n=[0,cH[1]],o=[0,0],j=[0,1],p=[0,0],u=0;function +H=D(0),P=H[1],I=H[2]===f?P:bs(n0),h=[0,br(32,0)],c=[0,0],m=[0,dt[1]],n=[0,0],j=[0,1],p=[0,0],s=0;function a(f,e){if(h[1].length-1<=c[1]){var a=[0,h[1].length-1];for(;;){if(a[1]<=c[1]){a[1]=a[1]*2|0;continue}var -b=a1(a[1],0);eQ(h[1],0,b,0,h[1].length-1);h[1]=b;break}}var -g=fm(f,e),d=c[1];X(h[1],d)[1+d]=g;c[1]++;return 0}function +b=br(a[1],0);fU(h[1],0,b,0,h[1].length-1);h[1]=b;break}}var +g=gq(f,e),d=c[1];ab(h[1],d)[1+d]=g;c[1]++;return 0}function k(d){var -b=c[1];a(cF,0);return b}function -m(a,c,b){var -d=fm(c,dD(b,a));X(h[1],a)[1+a]=d;return 0}function +b=c[1];a(dr,0);return b}function +l(a,c,b){var +d=gq(c,eu(b,a));ab(h[1],a)[1+a]=d;return 0}function i(b){try{var -a=e(cH[28],b,n[1]);return a}catch(a){a=d(a);if(a===V){var -c=o[1];n[1]=y(cH[4],b,c,n[1]);o[1]++;return c}throw a}}function -w(b){if(dE(b)){var -a=p[1];if(64<=a)a2(md);p[1]++;return a}return-1}function -s(b,a){return lZ(b,a)}function -f(b){if(typeof +a=g(dt[28],b,m[1]);return a}catch(a){a=d(a);if(a===al){var +c=n[1];m[1]=E(dt[4],b,c,m[1]);n[1]++;return c}throw a}}function +w(b){if(ev(b)){var +a=p[1];if(64<=a)bs(nS);p[1]++;return a}return-1}function +q(b,a){return nC(b,a)}function +e(b){if(typeof b==="number")switch(b){case -0:return a(l2,0);case -1:return a(l3,0);default:return a(l4,0)}else +0:return a(nF,0);case +1:return a(nG,0);default:return a(nH,0)}else switch(b[0]){case -0:return a(cF,b[1]);case +0:return a(dr,b[1]);case 1:var -e=b[1],o=q(e);if(0===o)return 0;if(1===o)return a(cF,l(e,0));try{var -p=eP(e,0);f([1,lX(e,p)]);a(cF,0);var -x=f([1,lY(e,p+1|0)]);return x}catch(b){b=d(b);if(b===V)return a(l0,i(e));throw b}case +f=b[1],n=t(f);if(0===n)return 0;if(1===n)return a(dr,o(f,0));try{var +p=fT(f,0);e([1,nA(f,p)]);a(dr,0);var +x=e([1,nB(f,p+1|0)]);return x}catch(b){b=d(b);if(b===al)return a(nD,i(f));throw b}case 2:var -r=b[1],y=b[2]?cE(r):r;return a(l1,i(cs(y)));case -3:return L(b[1]);case +q=b[1],y=b[2]?dq(q):q;return a(nE,i(da(y)));case +3:return K(b[1]);case 4:var -z=b[2],A=b[1],B=k(0);f(A);var -C=k(0),D=c[1];f(z);var -E=c[1];m(B,cG,D);return m(C,dC,E);case +z=b[2],A=b[1],B=k(0);e(A);var +C=k(0),D=c[1];e(z);var +E=c[1];l(B,ds,D);return l(C,et,E);case 5:var -s=b[1],g=w(s),t=k(0);if(0<=g)a(fk,g);f(s);if(0<=g)a(fl,g);a(dC,dD(t,c[1]));return m(t,cG,c[1]);case +r=b[1],g=w(r),s=k(0);if(0<=g)a(go,g);e(r);if(0<=g)a(gp,g);a(et,eu(s,c[1]));return l(s,ds,c[1]);case 6:var -u=b[1],h=w(u),F=c[1];f(u);if(0<=h)a(fl,h);var -G=k(0);if(0<=h)a(fk,h);a(dC,dD(F,c[1]));return m(G,cG,c[1]);case +u=b[1],h=w(u),F=c[1];e(u);if(0<=h)a(gp,h);var +G=k(0);if(0<=h)a(go,h);a(et,eu(F,c[1]));return l(G,ds,c[1]);case 7:var -H=b[1],I=k(0);f(H);return m(I,cG,c[1]);case +H=b[1],I=k(0);e(H);return l(I,ds,c[1]);case 8:var -n=b[1],J=b[2];a(l5,n);f(J);a(l6,n);j[1]=cq(j[1],n+1|0);return 0;default:var -v=b[1];a(l7,v);j[1]=cq(j[1],v+1|0);return 0}}function -L(o){var +m=b[1],J=b[2];a(nI,m);e(J);a(nJ,m);j[1]=c8(j[1],m+1|0);return 0;default:var +v=b[1];a(nK,v);j[1]=c8(j[1],v+1|0);return 0}}function +K(o){var b=o;for(;;){if(b){var c=b[1];if(typeof c!=="number")switch(c[0]){case @@ -2892,15 +2912,15 @@ d==="number")l=1;else switch(d[0]){case 0:case 2:var -h=b[2],q=bW(h);if(s(a5(d),q)){a(l_,i(dF(u,d)));var +h=b[2],r=ct(h);if(q(bv(d),r)){a(nN,i(ew(s,d)));var b=h;continue}break;default:l=1}break;case 6:var -e=c[1],m=0;if(typeof -e==="number")m=1;else -switch(e[0]){case +f=c[1],m=0;if(typeof +f==="number")m=1;else +switch(f[0]){case 0:case 2:var -j=b[2],r=bW(j);if(s(a5(e),r)){a(l$,i(dF(u,e)));var +j=b[2],t=ct(j);if(q(bv(f),t)){a(nO,i(ew(s,f)));var b=j;continue}break;default:m=1}break;case 7:var g=c[1],n=0;if(typeof @@ -2908,862 +2928,1167 @@ g==="number")n=1;else switch(g[0]){case 0:case 2:var -k=b[2],t=bW(k);if(s(a5(g),t)){a(l9,i(dF(u,g)));var +k=b[2],u=ct(k);if(q(bv(g),u)){a(nM,i(ew(s,g)));var b=k;continue}break;default:n=1}break}var -p=b[2];f(c);var -b=p;continue}return 0}}f(I);a(l8,0);var -x=a5(I);if(hd(x,aP))var -z=-1;else{var -v=aB(bB,0);fj(function(a){return av(v,a,1)},x);var -z=i(cs(v))}var -A=a1(o[1],me),M=n[1];function -N(b,a){X(A,a)[1+a]=b;return 0}e(cH[12],N,M);var -t=c[1],B=h[1],J=0,O=p[1],P=j[1];if(0<=t&&!((B.length-1-t|0)<0)){var -C=sn(B,0,t);J=1}if(!J)var -C=K(h1);return[0,C,A,mf,P,O,z]},cI=function(b,a){return Math.abs(b-a)<0.001?1:0},dI=function(b,a){return cI(b,a)?0:b>>0))switch(b){case +f=b(a[14],d),g=b(a[1][4],f)/J;return i(b(c[18],e)+g)-bF}function +s(e,b){var +d=k(e),f=g(a[26],d[2],b[2]);return l(g(c[38],d[1],b[1]),f)}function +an(b,a){return s(b,q(a))}function +ao(h,e){var +b=k(h),d=k(e),i=g(a[27],b[2],d[2]);return f([0,g(c[39],b[1],d[1]),i])}function +ap(h,e){var +b=k(h),d=k(e),i=g(a[27],b[2],d[2]);return f([0,g(c[40],b[1],d[1]),i])}function +aq(i,b){var +e=k(i),f=e[2],h=e[1],d=0;if(b7<=b){if(bE===b)d=1}else +if(dP<=b)d=1;return d?l(h,g(a[29],f,b)):l(g(c[42],h,b),f)}return[0,c,a,m,v,o,w,x,y,n,i,h,B,C,D,F,G,H,I,z,A,K,L,M,du,ez,aZ,R,S,T,U,V,O,N,Q,P,t,d,j,[0,e,ac,ad,q,af,ae,aZ,p,W,X,Y,Z,_,$,aa,ab,ah,ai,ag,aj,ak,al,am],s,ao,ap,an,aq,function(i,b){var +e=k(i),f=e[2],h=e[1],d=0;if(b7<=b){if(bE===b)d=1}else +if(dP<=b)d=1;return d?l(h,g(a[30],f,b)):l(g(c[43],h,b),f)}]},gP=function(a){return gO(a1,a)}(oF),ql=gP[1],qm=gP[2];(function(a){return gN(ql,a)}(qm));var +qn=function(a){return gO(a1,a)}(gA)[1];(function(a){return gN(qn,a)}(gA));n1(qo);var +qq=[B,qp,af(0)];za(0);en(qr,qq);var +ar=az(0),cB=az(1),qs=az(-1),gQ=function(a){return bV(0,a,0,t(a))},qt=function(b,a){return bV(b,a,0,t(a))},cC=function(a,b){if(a!==ar&&b!==cB){var +c=y_(a,b);if(c===cB)return[0,a,b];var +d=jf(b,c);return[0,jf(a,c),d]}return[0,a,cB]},gR=function(b,a){var +c=cj(a);return 0===c?[0,az(cj(b)),ar]:0>>0))switch(b){case 0:return 2;case -1:break;default:return 1}return 3}return a[1]===$?0:4},oS=function(a){return[0,co(a[1]),a[2]]},dU=function(b,a){if(b[2]!==$&&a[2]!==$)return b5(bi(b[1],a[1]),bi(b[2],a[2]));return[0,ah(aM(bM(b[1]),bM(a[1]))),$]},dV=function(a){switch(a){case +1:break;default:return 1}return 3}return a[1]===ar?0:4},qv=function(a){return[0,c6(a[1]),a[2]]},eL=function(b,a){if(b[2]!==ar&&a[2]!==ar)return cC(bN(b[1],a[1]),bN(b[2],a[2]));return[0,az(a$(cj(b[1]),cj(a[1]))),ar]},eM=function(a){switch(a){case 0:return 2;case 1:return 8;case -2:return 10;default:return 16}},dW=function(f,e,d,b){var -a=e;for(;;){if(d<=a)return 0;if(c(b,l(f,a)))return[0,a];var -a=a+1|0;continue}},oU=function(a){if(I(a,oV)){if(I(a,oW)){if(!I(a,oX))return fQ;if(I(a,oY)){if(I(a,oZ))try{var -m=eP(a,47),aa=bp(0,a,m+1|0,(q(a)-m|0)-1|0),ab=fN(bp(0,a,0,m),aa);return ab}catch(m){m=d(m);if(m===V){var -j=q(a),A=0;if(j<1)var +2:return 10;default:return 16}},eN=function(f,e,d,c){var +a=e;for(;;){if(d<=a)return 0;if(b(c,o(f,a)))return[0,a];var +a=a+1|0;continue}},qx=function(a){if(U(a,qy)){if(U(a,qz)){if(!U(a,qA))return gU;if(U(a,qB)){if(U(a,qC))try{var +l=fT(a,47),$=bV(0,a,l+1|0,(t(a)-l|0)-1|0),aa=gR(bV(0,a,0,l),$);return aa}catch(l){l=d(l);if(l===al){var +j=t(a),A=0;if(j<1)var v=[0,0,A];else{var -R=l(a,0)+gZ|0,U=0;if(!(2>>0)){var -W=0;switch(R){case +P=o(a,0)+iB|0,S=0;if(!(2

>>0)){var +T=0;switch(P){case 0:var -T=[0,0,1];break;case -1:W=1;break;default:var -T=[0,1,1]}if(!W){var -S=T;U=1}}if(!U)var -S=[0,0,A];var -v=S}var +R=[0,0,1];break;case +1:T=1;break;default:var +R=[0,1,1]}if(!T){var +Q=R;S=1}}if(!S)var +Q=[0,0,A];var +v=Q}var c=v[2];if(j<(c+2|0))var w=[0,2,c];else{var -$=l(a,c),h=l(a,c+1|0),u=0;if(48===$){var +_=o(a,c),h=o(a,c+1|0),s=0;if(48===_){var i=0;if(89<=h){if(98===h)i=2;else if(111===h)i=1;else -if(cR!==h){u=1;i=3}}else +if(dD!==h){s=1;i=3}}else if(66===h)i=2;else if(79===h)i=1;else -if(!(88<=h)){u=1;i=3}switch(i){case +if(!(88<=h)){s=1;i=3}switch(i){case 3:break;case 0:var -t=[0,3,c+2|0];break;case +r=[0,3,c+2|0];break;case 1:var -t=[0,1,c+2|0];break;default:var -t=[0,0,c+2|0]}}else -u=1;if(u)var -t=[0,2,c];var -w=t}var -e=w[2],b=w[1],X=2===b?function(a){if(69!==a&&gI!==a)return 0;return 1}:3<=b?function(a){if(80!==a&&112!==a)return 0;return 1}:function(a){return 0},B=dW(a,e,j,X);if(B)var -C=B[1],D=C+1|0,f=C,E=tw(bp(10,a,D,j-D|0));else +r=[0,1,c+2|0];break;default:var +r=[0,0,c+2|0]}}else +s=1;if(s)var +r=[0,2,c];var +w=r}var +e=w[2],b=w[1],V=2===b?function(a){if(69!==a&&dO!==a)return 0;return 1}:3<=b?function(a){if(80!==a&&112!==a)return 0;return 1}:function(a){return 0},B=eN(a,e,j,V);if(B)var +C=B[1],D=C+1|0,f=C,E=zf(bV(10,a,D,j-D|0));else var f=j,E=0;if(2<=b){var -F=dW(a,e,f,function(a){return 46===a?1:0});if(F){var +F=eN(a,e,f,function(a){return 46===a?1:0});if(F){var x=F[1];if(2===b)var -G=1;else{if(!(3<=b))throw[0,r,o1];var +G=1;else{if(!(3<=b))throw[0,u,qE];var G=4}var -J=x+1|0,L=f-1|0,H=0;if(L rule_name + | None | Some (Name_resolution.Ambiguous _) -> rule_name | Some (Name_resolution.Unique x) -> x in let parent_rule = @@ -888,7 +888,7 @@ let process_def (precond : Scopelang.Ast.expr Pos.marked Bindlib.box option) Some (match Desugared.Ast.ScopeDefMap.find_opt def_key scope_ctxt.default_rulemap with (* This should have been caught previously by check_unlabeled_exception *) - | None | Some Name_resolution.Ambiguous -> assert false + | None | Some (Name_resolution.Ambiguous _) -> assert false | Some (Name_resolution.Unique name) -> Pos.same_pos_as name def.Ast.definition_name) | ExceptionToLabel label -> Some @@ -996,10 +996,11 @@ let check_unlabeled_exception (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_r | None -> Errors.raise_spanned_error "This exception does not have a corresponding definition" (Pos.get_position item) - | Some Ambiguous -> - Errors.raise_spanned_error + | Some (Ambiguous pos) -> + Errors.raise_multispanned_error "This exception can refer to several definitions. Try using labels to disambiguate" - (Pos.get_position item) + ([ (Some "Ambiguous exception", Pos.get_position item) ] + @ List.map (fun p -> (Some "Candidate definition", p)) pos) | Some (Unique _) -> ())) | Ast.Definition def -> ( match def.definition_exception_to with @@ -1014,10 +1015,11 @@ let check_unlabeled_exception (scope : Scopelang.Ast.ScopeName.t) (ctxt : Name_r | None -> Errors.raise_spanned_error "This exception does not have a corresponding definition" (Pos.get_position item) - | Some Ambiguous -> - Errors.raise_spanned_error + | Some (Ambiguous pos) -> + Errors.raise_multispanned_error "This exception can refer to several definitions. Try using labels to disambiguate" - (Pos.get_position item) + ([ (Some "Ambiguous exception", Pos.get_position item) ] + @ List.map (fun p -> (Some "Candidate definition", p)) pos) | Some (Unique _) -> ())) | _ -> () diff --git a/src/catala/surface/name_resolution.ml b/src/catala/surface/name_resolution.ml index fe788772..575810be 100644 --- a/src/catala/surface/name_resolution.ml +++ b/src/catala/surface/name_resolution.ml @@ -23,7 +23,7 @@ type ident = string type typ = Scopelang.Ast.typ -type unique_rulename = Ambiguous | Unique of Desugared.Ast.RuleName.t +type unique_rulename = Ambiguous of Pos.t list | Unique of Desugared.Ast.RuleName.t type scope_context = { var_idmap : Scopelang.Ast.ScopeVar.t Desugared.Ast.IdentMap.t; (** Scope variables *) @@ -501,12 +501,23 @@ let process_rule (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (r : Ast. let rulemap = match Desugared.Ast.ScopeDefMap.find_opt def_key scope_ctxt.default_rulemap with (* There was already a default definition for this key. If we need it, it is ambiguous *) - | Some _ -> Desugared.Ast.ScopeDefMap.add def_key Ambiguous scope_ctxt.default_rulemap + | Some old -> + Desugared.Ast.ScopeDefMap.add def_key + (Ambiguous + ([ Pos.get_position r.rule_name ] + @ + match old with + | Ambiguous old -> old + | Unique n -> [ Pos.get_position (Desugared.Ast.RuleName.get_info n) ])) + scope_ctxt.default_rulemap (* No definition has been set yet for this key *) | None -> ( match r.Ast.rule_label with (* This default definition has a label. This is not allowed for unlabeled exceptions *) - | Some _ -> Desugared.Ast.ScopeDefMap.add def_key Ambiguous scope_ctxt.default_rulemap + | Some _ -> + Desugared.Ast.ScopeDefMap.add def_key + (Ambiguous [ Pos.get_position r.rule_name ]) + scope_ctxt.default_rulemap (* This is a possible default definition for this key. We create and store a fresh rulename *) | None -> @@ -564,12 +575,23 @@ let process_definition (ctxt : context) (s_name : Scopelang.Ast.ScopeName.t) (d let rulemap = match Desugared.Ast.ScopeDefMap.find_opt def_key scope_ctxt.default_rulemap with (* There was already a default definition for this key. If we need it, it is ambiguous *) - | Some _ -> Desugared.Ast.ScopeDefMap.add def_key Ambiguous scope_ctxt.default_rulemap + | Some old -> + Desugared.Ast.ScopeDefMap.add def_key + (Ambiguous + ([ Pos.get_position d.definition_name ] + @ + match old with + | Ambiguous old -> old + | Unique n -> [ Pos.get_position (Desugared.Ast.RuleName.get_info n) ])) + scope_ctxt.default_rulemap (* No definition has been set yet for this key *) | None -> ( match d.Ast.definition_label with (* This default definition has a label. This is not allowed for unlabeled exceptions *) - | Some _ -> Desugared.Ast.ScopeDefMap.add def_key Ambiguous scope_ctxt.default_rulemap + | Some _ -> + Desugared.Ast.ScopeDefMap.add def_key + (Ambiguous [ Pos.get_position d.definition_name ]) + scope_ctxt.default_rulemap (* This is a possible default definition for this key. We create and store a fresh rulename *) | None -> diff --git a/src/catala/surface/name_resolution.mli b/src/catala/surface/name_resolution.mli index 8b87a3ff..5990d563 100644 --- a/src/catala/surface/name_resolution.mli +++ b/src/catala/surface/name_resolution.mli @@ -23,7 +23,7 @@ type ident = string type typ = Scopelang.Ast.typ -type unique_rulename = Ambiguous | Unique of Desugared.Ast.RuleName.t +type unique_rulename = Ambiguous of Pos.t list | Unique of Desugared.Ast.RuleName.t type scope_context = { var_idmap : Scopelang.Ast.ScopeVar.t Desugared.Ast.IdentMap.t; (** Scope variables *) diff --git a/src/french_law/api_web.ml b/src/french_law/api_web.ml index 9fac85c9..ea16bea6 100644 --- a/src/french_law/api_web.ml +++ b/src/french_law/api_web.ml @@ -57,9 +57,79 @@ class type allocations_familiales_input = bool Js.t Js.readonly_prop end +class type source_position = + object + method fileName : Js.js_string Js.t Js.prop + + method startLine : int Js.prop + + method endLine : int Js.prop + + method startColumn : int Js.prop + + method endColumn : int Js.prop + + method lawHeadings : Js.js_string Js.t Js.js_array Js.t Js.prop + end + +class type log_event = + object + method eventType : Js.js_string Js.t Js.prop + + method information : Js.js_string Js.t Js.js_array Js.t Js.prop + + method sourcePosition : source_position Js.t Js.optdef Js.prop + end + let _ = Js.export_all (object%js + method resetLog () : unit = reset_log () + + method retrieveLog () : log_event Js.t Js.js_array Js.t = + Js.array + (Array.of_list + (List.map + (fun evt -> + object%js + val mutable eventType = + Js.string + (match evt with + | BeginCall _ -> "Begin call" + | EndCall _ -> "End call" + | VariableDefinition _ -> "Variable definition" + | DecisionTaken _ -> "Decision taken") + + val mutable information = + Js.array + (Array.of_list + (match evt with + | BeginCall info | EndCall info | VariableDefinition info -> + List.map Js.string info + | DecisionTaken _ -> [])) + + val mutable sourcePosition = + match evt with + | DecisionTaken pos -> + Js.def + (object%js + val mutable fileName = Js.string pos.filename + + val mutable startLine = pos.start_line + + val mutable endLine = pos.end_line + + val mutable startColumn = pos.start_column + + val mutable endColumn = pos.end_column + + val mutable lawHeadings = + Js.array (Array.of_list (List.map Js.string pos.law_headings)) + end) + | _ -> Js.undefined + end) + (retrieve_log ()))) + method computeAllocationsFamiliales (input : allocations_familiales_input Js.t) : float = let result = AF.interface_allocations_familiales diff --git a/src/french_law/bench.ml b/src/french_law/bench.ml index c078bf5a..556385db 100644 --- a/src/french_law/bench.ml +++ b/src/french_law/bench.ml @@ -72,9 +72,12 @@ let run_test () = incr num_successful; total_amount := Float.add !total_amount amount with - | NoValueProvided -> - Format.printf - "No value provided somewhere!\n%a\nincome: %d\ncurrent_date: %s\nresidence: %a\n" + | (NoValueProvided | ConflictError) as err -> + Format.printf "%s\n%a\nincome: %d\ncurrent_date: %s\nresidence: %a\n" + (match err with + | NoValueProvided -> "No value provided somewhere!" + | ConflictError -> "Conflict error!" + | _ -> failwith "impossible") (Format.pp_print_list (fun fmt child -> Format.fprintf fmt "Child %d:\n income: %.2f\n birth date: %s\n prise en charge: %a" (integer_to_int child.AF.d_identifiant) diff --git a/src/french_law/law_source/allocations_familiales.ml b/src/french_law/law_source/allocations_familiales.ml index dd65bbea..ae78ae5b 100644 --- a/src/french_law/law_source/allocations_familiales.ml +++ b/src/french_law/law_source/allocations_familiales.ml @@ -110,8 +110,6 @@ type allocations_familiales_out = { versement_out : enfant -> versement_allocations; montant_verse_out : money; droit_ouvert_base_out : bool; - montant_verse_base_out : money; - montant_avec_garde_alternee_base_out : money; montant_initial_base_out : money; montant_initial_base_premier_enfant_out : money; montant_initial_base_deuxieme_enfant_out : money; @@ -119,17 +117,20 @@ type allocations_familiales_out = { rapport_enfants_total_moyen_out : decimal; nombre_moyen_enfants_out : decimal; nombre_total_enfants_out : decimal; + montant_avec_garde_alternee_base_out : money; + montant_verse_base_out : money; droit_ouvert_forfaitaire_out : enfant -> bool; montant_verse_forfaitaire_out : money; droit_ouvert_majoration_out : enfant -> bool; - montant_verse_majoration_out : money; - montant_avec_garde_alternee_majoration_out : enfant -> money; + montant_initial_metropole_majoration_out : enfant -> money; montant_initial_majoration_out : enfant -> money; + montant_avec_garde_alternee_majoration_out : enfant -> money; + montant_verse_majoration_out : money; droit_ouvert_complement_out : bool; - montant_verse_complement_pour_base_et_majoration_out : money; montant_base_complement_pour_base_et_majoration_out : money; - montant_verse_complement_pour_forfaitaire_out : money; complement_degressif_out : money -> money; + montant_verse_complement_pour_base_et_majoration_out : money; + montant_verse_complement_pour_forfaitaire_out : money; nombre_enfants_l521_1_out : integer; age_minimum_alinea_1_l521_3_out : enfant -> integer; age_minimum_alinea_1_l521_3_metropole_out : enfant -> integer; @@ -152,8 +153,6 @@ type allocations_familiales_in = { versement_in : unit -> enfant -> versement_allocations; montant_verse_in : unit -> money; droit_ouvert_base_in : unit -> bool; - montant_verse_base_in : unit -> money; - montant_avec_garde_alternee_base_in : unit -> money; montant_initial_base_in : unit -> money; montant_initial_base_premier_enfant_in : unit -> money; montant_initial_base_deuxieme_enfant_in : unit -> money; @@ -161,17 +160,20 @@ type allocations_familiales_in = { rapport_enfants_total_moyen_in : unit -> decimal; nombre_moyen_enfants_in : unit -> decimal; nombre_total_enfants_in : unit -> decimal; + montant_avec_garde_alternee_base_in : unit -> money; + montant_verse_base_in : unit -> money; droit_ouvert_forfaitaire_in : unit -> enfant -> bool; montant_verse_forfaitaire_in : unit -> money; droit_ouvert_majoration_in : unit -> enfant -> bool; - montant_verse_majoration_in : unit -> money; - montant_avec_garde_alternee_majoration_in : unit -> enfant -> money; + montant_initial_metropole_majoration_in : unit -> enfant -> money; montant_initial_majoration_in : unit -> enfant -> money; + montant_avec_garde_alternee_majoration_in : unit -> enfant -> money; + montant_verse_majoration_in : unit -> money; droit_ouvert_complement_in : unit -> bool; - montant_verse_complement_pour_base_et_majoration_in : unit -> money; montant_base_complement_pour_base_et_majoration_in : unit -> money; - montant_verse_complement_pour_forfaitaire_in : unit -> money; complement_degressif_in : unit -> money -> money; + montant_verse_complement_pour_base_et_majoration_in : unit -> money; + montant_verse_complement_pour_forfaitaire_in : unit -> money; nombre_enfants_l521_1_in : unit -> integer; age_minimum_alinea_1_l521_3_in : unit -> enfant -> integer; age_minimum_alinea_1_l521_3_metropole_in : unit -> enfant -> integer; @@ -792,10 +794,6 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i in let montant_verse_ : unit -> money = allocations_familiales_in.montant_verse_in in let droit_ouvert_base_ : unit -> bool = allocations_familiales_in.droit_ouvert_base_in in - let montant_verse_base_ : unit -> money = allocations_familiales_in.montant_verse_base_in in - let montant_avec_garde_alternee_base_ : unit -> money = - allocations_familiales_in.montant_avec_garde_alternee_base_in - in let montant_initial_base_ : unit -> money = allocations_familiales_in.montant_initial_base_in in let montant_initial_base_premier_enfant_ : unit -> money = allocations_familiales_in.montant_initial_base_premier_enfant_in @@ -811,6 +809,10 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i in let nombre_moyen_enfants_ : unit -> decimal = allocations_familiales_in.nombre_moyen_enfants_in in let nombre_total_enfants_ : unit -> decimal = allocations_familiales_in.nombre_total_enfants_in in + let montant_avec_garde_alternee_base_ : unit -> money = + allocations_familiales_in.montant_avec_garde_alternee_base_in + in + let montant_verse_base_ : unit -> money = allocations_familiales_in.montant_verse_base_in in let droit_ouvert_forfaitaire_ : unit -> enfant -> bool = allocations_familiales_in.droit_ouvert_forfaitaire_in in @@ -820,30 +822,33 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i let droit_ouvert_majoration_ : unit -> enfant -> bool = allocations_familiales_in.droit_ouvert_majoration_in in - let montant_verse_majoration_ : unit -> money = - allocations_familiales_in.montant_verse_majoration_in - in - let montant_avec_garde_alternee_majoration_ : unit -> enfant -> money = - allocations_familiales_in.montant_avec_garde_alternee_majoration_in + let montant_initial_metropole_majoration_ : unit -> enfant -> money = + allocations_familiales_in.montant_initial_metropole_majoration_in in let montant_initial_majoration_ : unit -> enfant -> money = allocations_familiales_in.montant_initial_majoration_in in + let montant_avec_garde_alternee_majoration_ : unit -> enfant -> money = + allocations_familiales_in.montant_avec_garde_alternee_majoration_in + in + let montant_verse_majoration_ : unit -> money = + allocations_familiales_in.montant_verse_majoration_in + in let droit_ouvert_complement_ : unit -> bool = allocations_familiales_in.droit_ouvert_complement_in in - let montant_verse_complement_pour_base_et_majoration_ : unit -> money = - allocations_familiales_in.montant_verse_complement_pour_base_et_majoration_in - in let montant_base_complement_pour_base_et_majoration_ : unit -> money = allocations_familiales_in.montant_base_complement_pour_base_et_majoration_in in - let montant_verse_complement_pour_forfaitaire_ : unit -> money = - allocations_familiales_in.montant_verse_complement_pour_forfaitaire_in - in let complement_degressif_ : unit -> money -> money = allocations_familiales_in.complement_degressif_in in + let montant_verse_complement_pour_base_et_majoration_ : unit -> money = + allocations_familiales_in.montant_verse_complement_pour_base_et_majoration_in + in + let montant_verse_complement_pour_forfaitaire_ : unit -> money = + allocations_familiales_in.montant_verse_complement_pour_forfaitaire_in + in let nombre_enfants_l521_1_ : unit -> integer = allocations_familiales_in.nombre_enfants_l521_1_in in @@ -2542,11 +2547,11 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i else nombre_moyen_enfants_ /& nombre_total_enfants_ with EmptyError -> raise NoValueProvided) in - let montant_initial_majoration_ : enfant -> money = + let montant_initial_metropole_majoration_ : enfant -> money = log_variable_definition - [ "AllocationsFamiliales"; "montant_initial_majoration" ] + [ "AllocationsFamiliales"; "montant_initial_métropole_majoration" ] (try - try montant_initial_majoration_ () + try montant_initial_metropole_majoration_ () with EmptyError -> ( fun (param_ : enfant) -> try @@ -2580,43 +2585,6 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i param_))))) then money_of_cents_string "0" else raise EmptyError); - (fun (_ : _) -> - if - log_decision_taken - { - filename = "./securite_sociale_D.catala_fr"; - start_line = 360; - start_column = 5; - end_line = 362; - end_column = 71; - law_headings = - [ - "Article D755-5"; - "Chapitre 5 : Prestations familiales et prestations assimilées"; - "Titre 5 : Départements d'outre-mer"; - "Livre 7 : Régimes divers - Dispositions diverses"; - "Partie réglementaire - Décrets simples"; - ]; - } - (log_end_call - [ "AllocationsFamiliales"; "droit_ouvert_majoration" ] - (log_variable_definition - [ "AllocationsFamiliales"; "droit_ouvert_majoration"; "output" ] - (log_begin_call - [ "AllocationsFamiliales"; "droit_ouvert_majoration" ] - droit_ouvert_majoration_ - (log_variable_definition - [ "AllocationsFamiliales"; "droit_ouvert_majoration"; "input" ] - param_))) - && prestations_familiales_dot_regime_outre_mer_l751_1_ - && array_length enfants_a_charge_droit_ouvert_prestation_familiale_ - = integer_of_string "1") - then - prestations_familiales_dot_base_mensuelle_ - *$ - if param_.age >=! integer_of_string "16" then decimal_of_string "0.0567" - else decimal_of_string "0.0369" - else raise EmptyError); (fun (_ : _) -> if log_decision_taken @@ -2786,6 +2754,77 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i else money_of_cents_string "0" with EmptyError -> raise NoValueProvided) in + let montant_initial_majoration_ : enfant -> money = + log_variable_definition + [ "AllocationsFamiliales"; "montant_initial_majoration" ] + (try + try montant_initial_majoration_ () + with EmptyError -> ( + fun (param_ : enfant) -> + try + try + if + log_decision_taken + { + filename = "./securite_sociale_D.catala_fr"; + start_line = 362; + start_column = 5; + end_line = 364; + end_column = 71; + law_headings = + [ + "Article D755-5"; + "Chapitre 5 : Prestations familiales et prestations assimilées"; + "Titre 5 : Départements d'outre-mer"; + "Livre 7 : Régimes divers - Dispositions diverses"; + "Partie réglementaire - Décrets simples"; + ]; + } + (log_end_call + [ "AllocationsFamiliales"; "droit_ouvert_majoration" ] + (log_variable_definition + [ "AllocationsFamiliales"; "droit_ouvert_majoration"; "output" ] + (log_begin_call + [ "AllocationsFamiliales"; "droit_ouvert_majoration" ] + droit_ouvert_majoration_ + (log_variable_definition + [ "AllocationsFamiliales"; "droit_ouvert_majoration"; "input" ] + param_))) + && prestations_familiales_dot_regime_outre_mer_l751_1_ + && array_length enfants_a_charge_droit_ouvert_prestation_familiale_ + = integer_of_string "1") + then + prestations_familiales_dot_base_mensuelle_ + *$ + if param_.age >=! integer_of_string "16" then decimal_of_string "0.0567" + else decimal_of_string "0.0369" + else raise EmptyError + with EmptyError -> + log_end_call + [ "AllocationsFamiliales"; "montant_initial_métropole_majoration" ] + (log_variable_definition + [ "AllocationsFamiliales"; "montant_initial_métropole_majoration"; "output" ] + (log_begin_call + [ "AllocationsFamiliales"; "montant_initial_métropole_majoration" ] + montant_initial_metropole_majoration_ + (log_variable_definition + [ + "AllocationsFamiliales"; + "montant_initial_métropole_majoration"; + "input"; + ] + param_))) + with EmptyError -> raise NoValueProvided) + with EmptyError -> raise NoValueProvided) + in + let montant_avec_garde_alternee_base_ : money = + log_variable_definition + [ "AllocationsFamiliales"; "montant_avec_garde_alternée_base" ] + (try + try montant_avec_garde_alternee_base_ () + with EmptyError -> montant_initial_base_ *$ rapport_enfants_total_moyen_ + with EmptyError -> raise NoValueProvided) + in let montant_avec_garde_alternee_majoration_ : enfant -> money = log_variable_definition [ "AllocationsFamiliales"; "montant_avec_garde_alternée_majoration" ] @@ -2823,12 +2862,14 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i with EmptyError -> raise NoValueProvided) with EmptyError -> raise NoValueProvided) in - let montant_avec_garde_alternee_base_ : money = + let montant_verse_base_ : money = log_variable_definition - [ "AllocationsFamiliales"; "montant_avec_garde_alternée_base" ] + [ "AllocationsFamiliales"; "montant_versé_base" ] (try - try montant_avec_garde_alternee_base_ () - with EmptyError -> montant_initial_base_ *$ rapport_enfants_total_moyen_ + try montant_verse_base_ () + with EmptyError -> + if droit_ouvert_base_ then montant_avec_garde_alternee_base_ + else money_of_cents_string "0" with EmptyError -> raise NoValueProvided) in let montant_verse_majoration_ : money = @@ -2863,16 +2904,6 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i else money_of_cents_string "0" with EmptyError -> raise NoValueProvided) in - let montant_verse_base_ : money = - log_variable_definition - [ "AllocationsFamiliales"; "montant_versé_base" ] - (try - try montant_verse_base_ () - with EmptyError -> - if droit_ouvert_base_ then montant_avec_garde_alternee_base_ - else money_of_cents_string "0" - with EmptyError -> raise NoValueProvided) - in let montant_base_complement_pour_base_et_majoration_ : money = log_variable_definition [ "AllocationsFamiliales"; "montant_base_complément_pour_base_et_majoration" ] @@ -2939,8 +2970,6 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i versement_out = versement_; montant_verse_out = montant_verse_; droit_ouvert_base_out = droit_ouvert_base_; - montant_verse_base_out = montant_verse_base_; - montant_avec_garde_alternee_base_out = montant_avec_garde_alternee_base_; montant_initial_base_out = montant_initial_base_; montant_initial_base_premier_enfant_out = montant_initial_base_premier_enfant_; montant_initial_base_deuxieme_enfant_out = montant_initial_base_deuxieme_enfant_; @@ -2949,19 +2978,22 @@ let allocations_familiales (allocations_familiales_in : allocations_familiales_i rapport_enfants_total_moyen_out = rapport_enfants_total_moyen_; nombre_moyen_enfants_out = nombre_moyen_enfants_; nombre_total_enfants_out = nombre_total_enfants_; + montant_avec_garde_alternee_base_out = montant_avec_garde_alternee_base_; + montant_verse_base_out = montant_verse_base_; droit_ouvert_forfaitaire_out = droit_ouvert_forfaitaire_; montant_verse_forfaitaire_out = montant_verse_forfaitaire_; droit_ouvert_majoration_out = droit_ouvert_majoration_; - montant_verse_majoration_out = montant_verse_majoration_; - montant_avec_garde_alternee_majoration_out = montant_avec_garde_alternee_majoration_; + montant_initial_metropole_majoration_out = montant_initial_metropole_majoration_; montant_initial_majoration_out = montant_initial_majoration_; + montant_avec_garde_alternee_majoration_out = montant_avec_garde_alternee_majoration_; + montant_verse_majoration_out = montant_verse_majoration_; droit_ouvert_complement_out = droit_ouvert_complement_; - montant_verse_complement_pour_base_et_majoration_out = - montant_verse_complement_pour_base_et_majoration_; montant_base_complement_pour_base_et_majoration_out = montant_base_complement_pour_base_et_majoration_; - montant_verse_complement_pour_forfaitaire_out = montant_verse_complement_pour_forfaitaire_; complement_degressif_out = complement_degressif_; + montant_verse_complement_pour_base_et_majoration_out = + montant_verse_complement_pour_base_et_majoration_; + montant_verse_complement_pour_forfaitaire_out = montant_verse_complement_pour_forfaitaire_; nombre_enfants_l521_1_out = nombre_enfants_l521_1_; age_minimum_alinea_1_l521_3_out = age_minimum_alinea_1_l521_3_; age_minimum_alinea_1_l521_3_metropole_out = age_minimum_alinea_1_l521_3_metropole_; @@ -3143,8 +3175,6 @@ let interface_allocations_familiales versement_in = (fun (_ : unit) -> raise EmptyError); montant_verse_in = (fun (_ : unit) -> raise EmptyError); droit_ouvert_base_in = (fun (_ : unit) -> raise EmptyError); - montant_verse_base_in = (fun (_ : unit) -> raise EmptyError); - montant_avec_garde_alternee_base_in = (fun (_ : unit) -> raise EmptyError); montant_initial_base_in = (fun (_ : unit) -> raise EmptyError); montant_initial_base_premier_enfant_in = (fun (_ : unit) -> raise EmptyError); montant_initial_base_deuxieme_enfant_in = (fun (_ : unit) -> raise EmptyError); @@ -3152,18 +3182,21 @@ let interface_allocations_familiales rapport_enfants_total_moyen_in = (fun (_ : unit) -> raise EmptyError); nombre_moyen_enfants_in = (fun (_ : unit) -> raise EmptyError); nombre_total_enfants_in = (fun (_ : unit) -> raise EmptyError); + montant_avec_garde_alternee_base_in = (fun (_ : unit) -> raise EmptyError); + montant_verse_base_in = (fun (_ : unit) -> raise EmptyError); droit_ouvert_forfaitaire_in = (fun (_ : unit) -> raise EmptyError); montant_verse_forfaitaire_in = (fun (_ : unit) -> raise EmptyError); droit_ouvert_majoration_in = (fun (_ : unit) -> raise EmptyError); - montant_verse_majoration_in = (fun (_ : unit) -> raise EmptyError); - montant_avec_garde_alternee_majoration_in = (fun (_ : unit) -> raise EmptyError); + montant_initial_metropole_majoration_in = (fun (_ : unit) -> raise EmptyError); montant_initial_majoration_in = (fun (_ : unit) -> raise EmptyError); + montant_avec_garde_alternee_majoration_in = (fun (_ : unit) -> raise EmptyError); + montant_verse_majoration_in = (fun (_ : unit) -> raise EmptyError); droit_ouvert_complement_in = (fun (_ : unit) -> raise EmptyError); + montant_base_complement_pour_base_et_majoration_in = (fun (_ : unit) -> raise EmptyError); + complement_degressif_in = (fun (_ : unit) -> raise EmptyError); montant_verse_complement_pour_base_et_majoration_in = (fun (_ : unit) -> raise EmptyError); - montant_base_complement_pour_base_et_majoration_in = (fun (_ : unit) -> raise EmptyError); montant_verse_complement_pour_forfaitaire_in = (fun (_ : unit) -> raise EmptyError); - complement_degressif_in = (fun (_ : unit) -> raise EmptyError); nombre_enfants_l521_1_in = (fun (_ : unit) -> raise EmptyError); age_minimum_alinea_1_l521_3_in = (fun (_ : unit) -> raise EmptyError); age_minimum_alinea_1_l521_3_metropole_in = (fun (_ : unit) -> raise EmptyError); @@ -3196,10 +3229,6 @@ let interface_allocations_familiales in let allocations_familiales_dot_montant_verse_ : money = result_.montant_verse_out in let allocations_familiales_dot_droit_ouvert_base_ : bool = result_.droit_ouvert_base_out in - let allocations_familiales_dot_montant_verse_base_ : money = result_.montant_verse_base_out in - let allocations_familiales_dot_montant_avec_garde_alternee_base_ : money = - result_.montant_avec_garde_alternee_base_out - in let allocations_familiales_dot_montant_initial_base_ : money = result_.montant_initial_base_out in let allocations_familiales_dot_montant_initial_base_premier_enfant_ : money = result_.montant_initial_base_premier_enfant_out @@ -3219,6 +3248,10 @@ let interface_allocations_familiales let allocations_familiales_dot_nombre_total_enfants_ : decimal = result_.nombre_total_enfants_out in + let allocations_familiales_dot_montant_avec_garde_alternee_base_ : money = + result_.montant_avec_garde_alternee_base_out + in + let allocations_familiales_dot_montant_verse_base_ : money = result_.montant_verse_base_out in let allocations_familiales_dot_droit_ouvert_forfaitaire_ : enfant -> bool = result_.droit_ouvert_forfaitaire_out in @@ -3228,30 +3261,33 @@ let interface_allocations_familiales let allocations_familiales_dot_droit_ouvert_majoration_ : enfant -> bool = result_.droit_ouvert_majoration_out in - let allocations_familiales_dot_montant_verse_majoration_ : money = - result_.montant_verse_majoration_out - in - let allocations_familiales_dot_montant_avec_garde_alternee_majoration_ : enfant -> money = - result_.montant_avec_garde_alternee_majoration_out + let allocations_familiales_dot_montant_initial_metropole_majoration_ : enfant -> money = + result_.montant_initial_metropole_majoration_out in let allocations_familiales_dot_montant_initial_majoration_ : enfant -> money = result_.montant_initial_majoration_out in + let allocations_familiales_dot_montant_avec_garde_alternee_majoration_ : enfant -> money = + result_.montant_avec_garde_alternee_majoration_out + in + let allocations_familiales_dot_montant_verse_majoration_ : money = + result_.montant_verse_majoration_out + in let allocations_familiales_dot_droit_ouvert_complement_ : bool = result_.droit_ouvert_complement_out in - let allocations_familiales_dot_montant_verse_complement_pour_base_et_majoration_ : money = - result_.montant_verse_complement_pour_base_et_majoration_out - in let allocations_familiales_dot_montant_base_complement_pour_base_et_majoration_ : money = result_.montant_base_complement_pour_base_et_majoration_out in - let allocations_familiales_dot_montant_verse_complement_pour_forfaitaire_ : money = - result_.montant_verse_complement_pour_forfaitaire_out - in let allocations_familiales_dot_complement_degressif_ : money -> money = result_.complement_degressif_out in + let allocations_familiales_dot_montant_verse_complement_pour_base_et_majoration_ : money = + result_.montant_verse_complement_pour_base_et_majoration_out + in + let allocations_familiales_dot_montant_verse_complement_pour_forfaitaire_ : money = + result_.montant_verse_complement_pour_forfaitaire_out + in let allocations_familiales_dot_nombre_enfants_l521_1_ : integer = result_.nombre_enfants_l521_1_out in