diff --git a/shared/static/wasm/sx/deps.sxbc b/shared/static/wasm/sx/deps.sxbc index 7fc35614..233dec8e 100644 --- a/shared/static/wasm/sx/deps.sxbc +++ b/shared/static/wasm/sx/deps.sxbc @@ -1,3 +1,3 @@ (sxbc 1 "809ddd596ff4bc3c" (code - :constants ("scan-refs" {:upvalue-count 0 :arity 1 :constants ("list" "scan-refs-walk") :bytecode (52 0 0 0 17 1 20 1 0 16 0 16 1 48 2 5 16 1 50)} "scan-refs-walk" {:upvalue-count 0 :arity 2 :constants ("type-of" "symbol" "=" "symbol-name" "starts-with?" "~" "not" "contains?" "append!" "list" "for-each" {:upvalue-count 1 :arity 1 :constants ("scan-refs-walk") :bytecode (20 0 0 16 0 18 0 49 2 50)} "dict" {:upvalue-count 2 :arity 1 :constants ("scan-refs-walk" "dict-get") :bytecode (20 0 0 18 0 16 0 52 1 0 2 18 1 49 2 50)} "keys") :bytecode (16 0 52 0 0 1 6 1 1 0 52 2 0 2 33 55 0 5 16 0 52 3 0 1 17 2 16 2 1 5 0 52 4 0 2 33 30 0 16 1 16 2 52 7 0 2 52 6 0 1 33 11 0 16 1 16 2 52 8 0 2 32 1 0 2 32 1 0 2 32 60 0 6 1 9 0 52 2 0 2 33 15 0 5 51 11 0 1 1 16 0 52 10 0 2 32 34 0 6 1 12 0 52 2 0 2 33 21 0 5 51 13 0 1 0 1 1 16 0 52 14 0 1 52 10 0 2 32 2 0 5 2 50)} "transitive-deps-walk" {:upvalue-count 0 :arity 3 :constants ("not" "contains?" "append!" "env-get" "=" "type-of" "component" "island" "for-each" {:upvalue-count 2 :arity 1 :constants ("transitive-deps-walk") :bytecode (20 0 0 16 0 18 0 18 1 49 3 50)} "scan-refs" "component-body" "macro" "macro-body") :bytecode (16 1 16 0 52 1 0 2 52 0 0 1 33 124 0 16 1 16 0 52 2 0 2 5 16 2 16 0 52 3 0 2 17 3 16 3 52 5 0 1 1 6 0 52 4 0 2 6 34 14 0 5 16 3 52 5 0 1 1 7 0 52 4 0 2 33 25 0 51 9 0 1 1 1 2 20 10 0 16 3 52 11 0 1 48 1 52 8 0 2 32 43 0 16 3 52 5 0 1 1 12 0 52 4 0 2 33 26 0 51 9 0 1 1 1 2 20 10 0 20 13 0 16 3 48 1 48 1 52 8 0 2 32 1 0 2 32 1 0 2 50)} "transitive-deps" {:upvalue-count 0 :arity 2 :constants ("list" "starts-with?" "~" "str" "transitive-deps-walk" "filter" {:upvalue-count 1 :arity 1 :constants ("not" "=") :bytecode (16 0 18 0 52 1 0 2 52 0 0 1 50)}) :bytecode (52 0 0 0 17 2 16 0 1 2 0 52 1 0 2 33 5 0 16 0 32 9 0 1 2 0 16 0 52 3 0 2 17 3 20 4 0 16 3 16 2 16 1 48 3 5 51 6 0 1 3 16 2 52 5 0 2 50)} "compute-all-deps" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("env-get" "=" "type-of" "component" "island" "component-set-deps!" "transitive-deps") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 1 3 0 52 1 0 2 6 34 14 0 5 16 1 52 2 0 1 1 4 0 52 1 0 2 33 19 0 20 5 0 16 1 20 6 0 16 0 18 0 48 2 49 2 32 1 0 2 50)} "env-components") :bytecode (51 1 0 1 0 20 2 0 16 0 48 1 52 0 0 2 50)} "scan-components-from-source" {:upvalue-count 0 :arity 1 :constants ("regex-find-all" "\\(~([a-zA-Z_][a-zA-Z0-9_\\-:/]*)" "map" {:upvalue-count 0 :arity 1 :constants ("str" "~") :bytecode (1 1 0 16 0 52 0 0 2 50)}) :bytecode (20 0 0 1 1 0 16 0 48 2 17 1 51 3 0 16 1 52 2 0 2 50)} "components-needed" {:upvalue-count 0 :arity 2 :constants ("scan-components-from-source" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("not" "contains?" "append!" "env-get" "=" "type-of" "component" "empty?" "component-deps" "transitive-deps" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)}) :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 5 18 1 16 0 52 3 0 2 17 1 16 1 52 5 0 1 1 6 0 52 4 0 2 6 33 16 0 5 20 8 0 16 1 48 1 52 7 0 1 52 0 0 1 33 10 0 20 8 0 16 1 48 1 32 9 0 20 9 0 16 0 18 1 48 2 17 2 51 11 0 0 0 16 2 52 10 0 2 50)}) :bytecode (20 0 0 16 0 48 1 17 2 52 1 0 0 17 3 51 3 0 1 3 1 1 16 2 52 2 0 2 5 16 3 50)} "page-component-bundle" {:upvalue-count 0 :arity 2 :constants ("components-needed") :bytecode (20 0 0 16 0 16 1 49 2 50)} "page-css-classes" {:upvalue-count 0 :arity 2 :constants ("components-needed" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("env-get" "=" "type-of" "component" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "component-css-classes") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 1 3 0 52 1 0 2 33 19 0 51 5 0 0 1 20 6 0 16 1 48 1 52 4 0 2 32 1 0 2 50)} {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "scan-css-classes") :bytecode (20 0 0 16 0 16 1 48 2 17 2 52 1 0 0 17 3 51 3 0 1 1 1 3 16 2 52 2 0 2 5 51 4 0 1 3 20 5 0 16 0 48 1 52 2 0 2 5 16 3 50)} "scan-io-refs-walk" {:upvalue-count 0 :arity 3 :constants ("type-of" "symbol" "=" "symbol-name" "contains?" "not" "append!" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("scan-io-refs-walk") :bytecode (20 0 0 16 0 18 0 18 1 49 3 50)} "dict" {:upvalue-count 3 :arity 1 :constants ("scan-io-refs-walk" "dict-get") :bytecode (20 0 0 18 0 16 0 52 1 0 2 18 1 18 2 49 3 50)} "keys") :bytecode (16 0 52 0 0 1 6 1 1 0 52 2 0 2 33 54 0 5 16 0 52 3 0 1 17 3 16 1 16 3 52 4 0 2 33 30 0 16 2 16 3 52 4 0 2 52 5 0 1 33 11 0 16 2 16 3 52 6 0 2 32 1 0 2 32 1 0 2 32 64 0 6 1 7 0 52 2 0 2 33 17 0 5 51 9 0 1 1 1 2 16 0 52 8 0 2 32 36 0 6 1 10 0 52 2 0 2 33 23 0 5 51 11 0 1 0 1 1 1 2 16 0 52 12 0 1 52 8 0 2 32 2 0 5 2 50)} "scan-io-refs" {:upvalue-count 0 :arity 2 :constants ("list" "scan-io-refs-walk") :bytecode (52 0 0 0 17 2 20 1 0 16 0 16 1 16 2 48 3 5 16 2 50)} "transitive-io-refs-walk" {:upvalue-count 0 :arity 5 :constants ("not" "contains?" "append!" "env-get" "=" "type-of" "component" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "scan-io-refs" "component-body" {:upvalue-count 4 :arity 1 :constants ("transitive-io-refs-walk") :bytecode (20 0 0 16 0 18 0 18 1 18 2 18 3 49 5 50)} "scan-refs" "macro" "macro-body") :bytecode (16 1 16 0 52 1 0 2 52 0 0 1 33 161 0 16 1 16 0 52 2 0 2 5 16 3 16 0 52 3 0 2 17 5 16 5 52 5 0 1 1 6 0 52 4 0 2 33 52 0 51 8 0 1 2 20 9 0 16 5 52 10 0 1 16 4 48 2 52 7 0 2 5 51 11 0 1 1 1 2 1 3 1 4 20 12 0 16 5 52 10 0 1 48 1 52 7 0 2 32 71 0 16 5 52 5 0 1 1 13 0 52 4 0 2 33 54 0 51 8 0 1 2 20 9 0 20 14 0 16 5 48 1 16 4 48 2 52 7 0 2 5 51 11 0 1 1 1 2 1 3 1 4 20 12 0 20 14 0 16 5 48 1 48 1 52 7 0 2 32 1 0 2 32 1 0 2 50)} "transitive-io-refs" {:upvalue-count 0 :arity 3 :constants ("list" "starts-with?" "~" "str" "transitive-io-refs-walk") :bytecode (52 0 0 0 17 3 52 0 0 0 17 4 16 0 1 2 0 52 1 0 2 33 5 0 16 0 32 9 0 1 2 0 16 0 52 3 0 2 17 5 20 4 0 16 5 16 4 16 3 16 1 16 2 48 5 5 16 3 50)} "compute-all-io-refs" {:upvalue-count 0 :arity 2 :constants ("for-each" {:upvalue-count 2 :arity 1 :constants ("env-get" "=" "type-of" "component" "component-set-io-refs!" "transitive-io-refs") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 1 3 0 52 1 0 2 33 21 0 20 4 0 16 1 20 5 0 16 0 18 0 18 1 48 3 49 2 32 1 0 2 50)} "env-components") :bytecode (51 1 0 1 0 1 1 20 2 0 16 0 48 1 52 0 0 2 50)} "component-io-refs-cached" {:upvalue-count 0 :arity 3 :constants ("starts-with?" "~" "str" "env-get" "=" "type-of" "component" "not" "nil?" "component-io-refs" "empty?" "transitive-io-refs") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 9 0 1 1 0 16 0 52 2 0 2 17 3 16 1 16 3 52 3 0 2 17 4 16 4 52 5 0 1 1 6 0 52 4 0 2 6 33 36 0 5 20 9 0 16 4 48 1 52 8 0 1 52 7 0 1 6 33 16 0 5 20 9 0 16 4 48 1 52 10 0 1 52 7 0 1 33 10 0 20 9 0 16 4 49 1 32 11 0 20 11 0 16 0 16 1 16 2 49 3 50)} "component-pure?" {:upvalue-count 0 :arity 3 :constants ("starts-with?" "~" "str" "env-has?" "env-get" "=" "type-of" "component" "not" "nil?" "component-io-refs" "empty?" "transitive-io-refs") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 9 0 1 1 0 16 0 52 2 0 2 17 3 16 1 16 3 52 3 0 2 33 11 0 16 1 16 3 52 4 0 2 32 1 0 2 17 4 16 4 52 6 0 1 1 7 0 52 5 0 2 6 33 36 0 5 20 10 0 16 4 48 1 52 9 0 1 52 8 0 1 6 33 16 0 5 20 10 0 16 4 48 1 52 11 0 1 52 8 0 1 33 4 0 4 32 15 0 20 12 0 16 0 16 1 16 2 48 3 52 11 0 1 50)} "render-target" {:upvalue-count 0 :arity 3 :constants ("starts-with?" "~" "str" "env-has?" "env-get" "not" "=" "type-of" "component" "server" "component-affinity" "client" "component-pure?") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 9 0 1 1 0 16 0 52 2 0 2 17 3 16 1 16 3 52 3 0 2 33 11 0 16 1 16 3 52 4 0 2 32 1 0 2 17 4 16 4 52 7 0 1 1 8 0 52 6 0 2 52 5 0 1 33 6 0 1 9 0 32 71 0 16 4 52 10 0 1 17 5 16 5 1 9 0 52 6 0 2 33 6 0 1 9 0 32 45 0 16 5 1 11 0 52 6 0 2 33 6 0 1 11 0 32 27 0 20 12 0 16 0 16 1 16 2 48 3 52 5 0 1 33 6 0 1 9 0 32 3 0 1 11 0 50)} "page-render-plan" {:upvalue-count 0 :arity 3 :constants ("components-needed" "dict" "list" "for-each" {:upvalue-count 6 :arity 1 :constants ("render-target" "dict-set!" "=" "server" "append!" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "component-io-refs-cached") :bytecode (20 0 0 16 0 18 0 18 1 48 3 17 1 18 2 16 0 16 1 52 1 0 3 5 16 1 1 3 0 52 2 0 2 33 32 0 18 3 16 0 52 4 0 2 5 51 6 0 0 4 20 7 0 16 0 18 0 18 1 48 3 52 5 0 2 32 8 0 18 5 16 0 52 4 0 2 50)} "io-deps" "server" "components" "client") :bytecode (20 0 0 16 0 16 1 48 2 17 3 52 1 0 0 17 4 52 2 0 0 17 5 52 2 0 0 17 6 52 2 0 0 17 7 51 4 0 1 1 1 2 1 4 1 5 1 7 1 6 16 3 52 3 0 2 5 1 5 0 16 7 1 6 0 16 5 1 7 0 16 4 1 8 0 16 6 65 4 0 50)} "env-components" {:upvalue-count 0 :arity 1 :constants ("filter" {:upvalue-count 1 :arity 1 :constants ("env-get" "component?" "macro?") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 1 0 1 6 34 7 0 5 16 1 52 2 0 1 50)} "keys") :bytecode (51 1 0 1 0 16 0 52 2 0 1 52 0 0 2 50)} {:library (web deps) :op "import"}) :bytecode (51 1 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 1 38 0 112 50))) + :constants ("scan-refs" {:upvalue-count 0 :arity 1 :constants ("list" "scan-refs-walk") :bytecode (52 0 0 0 17 1 20 1 0 16 0 16 1 48 2 5 16 1 50)} "scan-refs-walk" {:upvalue-count 0 :arity 2 :constants ("type-of" "symbol" "=" "symbol-name" "starts-with?" "~" "not" "contains?" "append!" "list" "for-each" {:upvalue-count 1 :arity 1 :constants ("scan-refs-walk") :bytecode (20 0 0 16 0 18 0 49 2 50)} "dict" {:upvalue-count 2 :arity 1 :constants ("scan-refs-walk" "dict-get") :bytecode (20 0 0 18 0 16 0 52 1 0 2 18 1 49 2 50)} "keys") :bytecode (16 0 52 0 0 1 6 1 1 0 52 2 0 2 33 55 0 5 16 0 52 3 0 1 17 2 16 2 1 5 0 52 4 0 2 33 30 0 16 1 16 2 52 7 0 2 52 6 0 1 33 11 0 16 1 16 2 52 8 0 2 32 1 0 2 32 1 0 2 32 60 0 6 1 9 0 52 2 0 2 33 15 0 5 51 11 0 1 1 16 0 52 10 0 2 32 34 0 6 1 12 0 52 2 0 2 33 21 0 5 51 13 0 1 0 1 1 16 0 52 14 0 1 52 10 0 2 32 2 0 5 2 50)} "transitive-deps-walk" {:upvalue-count 0 :arity 3 :constants ("not" "contains?" "append!" "env-get" "=" "type-of" "component" "island" "for-each" {:upvalue-count 2 :arity 1 :constants ("transitive-deps-walk") :bytecode (20 0 0 16 0 18 0 18 1 49 3 50)} "scan-refs" "component-body" "macro" "macro-body") :bytecode (16 1 16 0 52 1 0 2 52 0 0 1 33 124 0 16 1 16 0 52 2 0 2 5 16 2 16 0 52 3 0 2 17 3 16 3 52 5 0 1 1 6 0 52 4 0 2 6 34 14 0 5 16 3 52 5 0 1 1 7 0 52 4 0 2 33 25 0 51 9 0 1 1 1 2 20 10 0 16 3 52 11 0 1 48 1 52 8 0 2 32 43 0 16 3 52 5 0 1 1 12 0 52 4 0 2 33 26 0 51 9 0 1 1 1 2 20 10 0 20 13 0 16 3 48 1 48 1 52 8 0 2 32 1 0 2 32 1 0 2 50)} "transitive-deps" {:upvalue-count 0 :arity 2 :constants ("list" "starts-with?" "~" "str" "transitive-deps-walk" "filter" {:upvalue-count 1 :arity 1 :constants ("not" "=") :bytecode (16 0 18 0 52 1 0 2 52 0 0 1 50)}) :bytecode (52 0 0 0 17 2 16 0 1 2 0 52 1 0 2 33 5 0 16 0 32 9 0 1 2 0 16 0 52 3 0 2 17 3 20 4 0 16 3 16 2 16 1 48 3 5 51 6 0 1 3 16 2 52 5 0 2 50)} "compute-all-deps" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("env-get" "=" "type-of" "component" "island" "component-set-deps!" "transitive-deps") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 1 3 0 52 1 0 2 6 34 14 0 5 16 1 52 2 0 1 1 4 0 52 1 0 2 33 19 0 20 5 0 16 1 20 6 0 16 0 18 0 48 2 49 2 32 1 0 2 50)} "env-components") :bytecode (51 1 0 1 0 20 2 0 16 0 48 1 52 0 0 2 50)} "scan-components-from-source" {:upvalue-count 0 :arity 1 :constants ("regex-find-all" "\\(~([a-zA-Z_][a-zA-Z0-9_\\-:/]*)" "map" {:upvalue-count 0 :arity 1 :constants ("str" "~") :bytecode (1 1 0 16 0 52 0 0 2 50)}) :bytecode (1 1 0 16 0 52 0 0 2 17 1 51 3 0 16 1 52 2 0 2 50)} "components-needed" {:upvalue-count 0 :arity 2 :constants ("scan-components-from-source" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("not" "contains?" "append!" "env-get" "=" "type-of" "component" "empty?" "component-deps" "transitive-deps" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)}) :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 5 18 1 16 0 52 3 0 2 17 1 16 1 52 5 0 1 1 6 0 52 4 0 2 6 33 16 0 5 20 8 0 16 1 48 1 52 7 0 1 52 0 0 1 33 10 0 20 8 0 16 1 48 1 32 9 0 20 9 0 16 0 18 1 48 2 17 2 51 11 0 0 0 16 2 52 10 0 2 50)}) :bytecode (20 0 0 16 0 48 1 17 2 52 1 0 0 17 3 51 3 0 1 3 1 1 16 2 52 2 0 2 5 16 3 50)} "page-component-bundle" {:upvalue-count 0 :arity 2 :constants ("components-needed") :bytecode (20 0 0 16 0 16 1 49 2 50)} "page-css-classes" {:upvalue-count 0 :arity 2 :constants ("components-needed" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("env-get" "=" "type-of" "component" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "component-css-classes") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 1 3 0 52 1 0 2 33 19 0 51 5 0 0 1 20 6 0 16 1 48 1 52 4 0 2 32 1 0 2 50)} {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "scan-css-classes") :bytecode (20 0 0 16 0 16 1 48 2 17 2 52 1 0 0 17 3 51 3 0 1 1 1 3 16 2 52 2 0 2 5 51 4 0 1 3 20 5 0 16 0 48 1 52 2 0 2 5 16 3 50)} "scan-io-refs-walk" {:upvalue-count 0 :arity 3 :constants ("type-of" "symbol" "=" "symbol-name" "contains?" "not" "append!" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("scan-io-refs-walk") :bytecode (20 0 0 16 0 18 0 18 1 49 3 50)} "dict" {:upvalue-count 3 :arity 1 :constants ("scan-io-refs-walk" "dict-get") :bytecode (20 0 0 18 0 16 0 52 1 0 2 18 1 18 2 49 3 50)} "keys") :bytecode (16 0 52 0 0 1 6 1 1 0 52 2 0 2 33 54 0 5 16 0 52 3 0 1 17 3 16 1 16 3 52 4 0 2 33 30 0 16 2 16 3 52 4 0 2 52 5 0 1 33 11 0 16 2 16 3 52 6 0 2 32 1 0 2 32 1 0 2 32 64 0 6 1 7 0 52 2 0 2 33 17 0 5 51 9 0 1 1 1 2 16 0 52 8 0 2 32 36 0 6 1 10 0 52 2 0 2 33 23 0 5 51 11 0 1 0 1 1 1 2 16 0 52 12 0 1 52 8 0 2 32 2 0 5 2 50)} "scan-io-refs" {:upvalue-count 0 :arity 2 :constants ("list" "scan-io-refs-walk") :bytecode (52 0 0 0 17 2 20 1 0 16 0 16 1 16 2 48 3 5 16 2 50)} "transitive-io-refs-walk" {:upvalue-count 0 :arity 5 :constants ("not" "contains?" "append!" "env-get" "=" "type-of" "component" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "scan-io-refs" "component-body" {:upvalue-count 4 :arity 1 :constants ("transitive-io-refs-walk") :bytecode (20 0 0 16 0 18 0 18 1 18 2 18 3 49 5 50)} "scan-refs" "macro" "macro-body") :bytecode (16 1 16 0 52 1 0 2 52 0 0 1 33 161 0 16 1 16 0 52 2 0 2 5 16 3 16 0 52 3 0 2 17 5 16 5 52 5 0 1 1 6 0 52 4 0 2 33 52 0 51 8 0 1 2 20 9 0 16 5 52 10 0 1 16 4 48 2 52 7 0 2 5 51 11 0 1 1 1 2 1 3 1 4 20 12 0 16 5 52 10 0 1 48 1 52 7 0 2 32 71 0 16 5 52 5 0 1 1 13 0 52 4 0 2 33 54 0 51 8 0 1 2 20 9 0 20 14 0 16 5 48 1 16 4 48 2 52 7 0 2 5 51 11 0 1 1 1 2 1 3 1 4 20 12 0 20 14 0 16 5 48 1 48 1 52 7 0 2 32 1 0 2 32 1 0 2 50)} "transitive-io-refs" {:upvalue-count 0 :arity 3 :constants ("list" "starts-with?" "~" "str" "transitive-io-refs-walk") :bytecode (52 0 0 0 17 3 52 0 0 0 17 4 16 0 1 2 0 52 1 0 2 33 5 0 16 0 32 9 0 1 2 0 16 0 52 3 0 2 17 5 20 4 0 16 5 16 4 16 3 16 1 16 2 48 5 5 16 3 50)} "compute-all-io-refs" {:upvalue-count 0 :arity 2 :constants ("for-each" {:upvalue-count 2 :arity 1 :constants ("env-get" "=" "type-of" "component" "component-set-io-refs!" "transitive-io-refs") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 1 3 0 52 1 0 2 33 21 0 20 4 0 16 1 20 5 0 16 0 18 0 18 1 48 3 49 2 32 1 0 2 50)} "env-components") :bytecode (51 1 0 1 0 1 1 20 2 0 16 0 48 1 52 0 0 2 50)} "component-io-refs-cached" {:upvalue-count 0 :arity 3 :constants ("starts-with?" "~" "str" "env-get" "=" "type-of" "component" "not" "nil?" "component-io-refs" "empty?" "transitive-io-refs") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 9 0 1 1 0 16 0 52 2 0 2 17 3 16 1 16 3 52 3 0 2 17 4 16 4 52 5 0 1 1 6 0 52 4 0 2 6 33 36 0 5 20 9 0 16 4 48 1 52 8 0 1 52 7 0 1 6 33 16 0 5 20 9 0 16 4 48 1 52 10 0 1 52 7 0 1 33 10 0 20 9 0 16 4 49 1 32 11 0 20 11 0 16 0 16 1 16 2 49 3 50)} "component-pure?" {:upvalue-count 0 :arity 3 :constants ("starts-with?" "~" "str" "env-has?" "env-get" "=" "type-of" "component" "not" "nil?" "component-io-refs" "empty?" "transitive-io-refs") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 9 0 1 1 0 16 0 52 2 0 2 17 3 16 1 16 3 52 3 0 2 33 11 0 16 1 16 3 52 4 0 2 32 1 0 2 17 4 16 4 52 6 0 1 1 7 0 52 5 0 2 6 33 36 0 5 20 10 0 16 4 48 1 52 9 0 1 52 8 0 1 6 33 16 0 5 20 10 0 16 4 48 1 52 11 0 1 52 8 0 1 33 4 0 4 32 15 0 20 12 0 16 0 16 1 16 2 48 3 52 11 0 1 50)} "render-target" {:upvalue-count 0 :arity 3 :constants ("starts-with?" "~" "str" "env-has?" "env-get" "not" "=" "type-of" "component" "server" "component-affinity" "client" "component-pure?") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 9 0 1 1 0 16 0 52 2 0 2 17 3 16 1 16 3 52 3 0 2 33 11 0 16 1 16 3 52 4 0 2 32 1 0 2 17 4 16 4 52 7 0 1 1 8 0 52 6 0 2 52 5 0 1 33 6 0 1 9 0 32 71 0 16 4 52 10 0 1 17 5 16 5 1 9 0 52 6 0 2 33 6 0 1 9 0 32 45 0 16 5 1 11 0 52 6 0 2 33 6 0 1 11 0 32 27 0 20 12 0 16 0 16 1 16 2 48 3 52 5 0 1 33 6 0 1 9 0 32 3 0 1 11 0 50)} "page-render-plan" {:upvalue-count 0 :arity 3 :constants ("components-needed" "dict" "list" "for-each" {:upvalue-count 6 :arity 1 :constants ("render-target" "dict-set!" "=" "server" "append!" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "append!") :bytecode (18 0 16 0 52 1 0 2 52 0 0 1 33 11 0 18 0 16 0 52 2 0 2 32 1 0 2 50)} "component-io-refs-cached") :bytecode (20 0 0 16 0 18 0 18 1 48 3 17 1 18 2 16 0 16 1 52 1 0 3 5 16 1 1 3 0 52 2 0 2 33 32 0 18 3 16 0 52 4 0 2 5 51 6 0 0 4 20 7 0 16 0 18 0 18 1 48 3 52 5 0 2 32 8 0 18 5 16 0 52 4 0 2 50)} "io-deps" "server" "components" "client") :bytecode (20 0 0 16 0 16 1 48 2 17 3 52 1 0 0 17 4 52 2 0 0 17 5 52 2 0 0 17 6 52 2 0 0 17 7 51 4 0 1 1 1 2 1 4 1 5 1 7 1 6 16 3 52 3 0 2 5 1 5 0 16 7 1 6 0 16 5 1 7 0 16 4 1 8 0 16 6 65 4 0 50)} "env-components" {:upvalue-count 0 :arity 1 :constants ("filter" {:upvalue-count 1 :arity 1 :constants ("env-get" "component?" "macro?") :bytecode (18 0 16 0 52 0 0 2 17 1 16 1 52 1 0 1 6 34 7 0 5 16 1 52 2 0 1 50)} "keys") :bytecode (51 1 0 1 0 16 0 52 2 0 1 52 0 0 2 50)} {:library (web deps) :op "import"}) :bytecode (51 1 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 1 38 0 112 50))) diff --git a/shared/static/wasm/sx/orchestration.sx b/shared/static/wasm/sx/orchestration.sx index 92db27c0..54d55654 100644 --- a/shared/static/wasm/sx/orchestration.sx +++ b/shared/static/wasm/sx/orchestration.sx @@ -6,7 +6,8 @@ (import (web adapter-dom)) (import (web engine)) -(define-library (web orchestration) +(define-library + (web orchestration) (export _preload-cache dispatch-trigger-events @@ -68,1210 +69,1148 @@ handle-popstate engine-init) (begin - -(define _preload-cache (dict)) - -(define - dispatch-trigger-events - :effects (mutation io) - (fn - (el (header-val :as string)) - (when - header-val - (let - ((parsed (try-parse-json header-val))) - (if - parsed - (for-each - (fn ((key :as string)) (dom-dispatch el key (get parsed key))) - (keys parsed)) - (for-each - (fn - ((name :as string)) - (let - ((trimmed (trim name))) - (when - (not (empty? trimmed)) - (dom-dispatch el trimmed (dict))))) - (split header-val ","))))))) - -(define - execute-request - :effects (mutation io) - (fn - (el (verbInfo :as dict) (extraParams :as dict)) - (let - ((info (or (get-verb-info el) verbInfo))) - (if - (nil? info) - (promise-resolve nil) - (let - ((verb (get info "method")) (url (get info "url"))) - (if - (let - ((media (dom-get-attr el "sx-media"))) - (and media (not (browser-media-matches? media)))) - (promise-resolve nil) - (if - (let - ((confirm-msg (dom-get-attr el "sx-confirm"))) - (and confirm-msg (not (browser-confirm confirm-msg)))) - (promise-resolve nil) - (let - ((prompt-msg (dom-get-attr el "sx-prompt")) - (prompt-val - (if prompt-msg (browser-prompt prompt-msg) nil))) - (if - (and prompt-msg (nil? prompt-val)) - (promise-resolve nil) - (if - (or - (nil? verb) - (nil? url) - (not (validate-for-request el))) - (promise-resolve nil) - (do-fetch - el - verb - verb - url - (if - prompt-val - (assoc - (or extraParams (dict)) - "SX-Prompt" - prompt-val) - extraParams)))))))))))) - -(define - do-fetch - :effects (mutation io) - (fn - (el - (verb :as string) - (method :as string) - (url :as string) - (extraParams :as dict)) - (let - ((sync (dom-get-attr el "sx-sync"))) - (when (= sync "replace") (abort-previous el)) - (let - ((target-el (resolve-target el))) + (define _preload-cache (dict)) + (define + dispatch-trigger-events + :effects (mutation io) + (fn + (el (header-val :as string)) (when - (and target-el (not (identical? el target-el))) - (abort-previous-target target-el))) - (let - ((ctrl (new-abort-controller))) - (track-controller el ctrl) - (let - ((target-el (resolve-target el))) - (when target-el (track-controller-target target-el ctrl))) - (let - ((body-info (build-request-body el method url)) - (final-url (get body-info "url")) - (body (get body-info "body")) - (ct (get body-info "content-type")) - (headers (build-request-headers el (loaded-component-names))) - (csrf (csrf-token))) - (when - extraParams - (for-each - (fn - ((k :as string)) - (dict-set! headers k (get extraParams k))) - (keys extraParams))) - (when ct (dict-set! headers "Content-Type" ct)) - (when csrf (dict-set! headers "X-CSRFToken" csrf)) + header-val (let - ((cached (preload-cache-get _preload-cache final-url)) - (optimistic-state (apply-optimistic el)) - (indicator (show-indicator el)) - (disabled-elts (disable-elements el))) - (dom-add-class el "sx-request") - (dom-set-attr el "aria-busy" "true") - (dom-dispatch - el - "sx:beforeRequest" - (dict "url" final-url "method" method)) - (fetch-request - (dict - "url" - final-url - "method" - method - "headers" - headers - "body" - body - "signal" - (controller-signal ctrl) - "cross-origin" - (cross-origin? final-url) - "preloaded" - cached) - (fn - ((resp-ok :as boolean) - (status :as number) - get-header - (text :as string)) - (do - (clear-loading-state el indicator disabled-elts) - (revert-optimistic optimistic-state) - (if - (not resp-ok) - (do - (dom-dispatch - el - "sx:responseError" - (dict "status" status "text" text)) - (if - (and text (> (len text) 0)) - (handle-fetch-success - el - final-url - verb - extraParams - get-header - text) - (handle-retry el verb method final-url extraParams))) - (do - (dom-dispatch - el - "sx:afterRequest" - (dict "status" status)) - (handle-fetch-success - el - final-url - verb - extraParams - get-header - text))))) - (fn - (err) - (do - (clear-loading-state el indicator disabled-elts) - (revert-optimistic optimistic-state) - (when - (not (abort-error? err)) - (log-warn - (str "sx:fetch error " method " " final-url " — " err)) - (dom-dispatch el "sx:requestError" (dict "error" err)))))))))))) - -(define - handle-fetch-success - :effects (mutation io) - (fn - (el - (url :as string) - (verb :as string) - (extraParams :as dict) - get-header - (text :as string)) - (let - ((resp-headers (process-response-headers get-header))) - (dispatch-trigger-events el (get resp-headers "trigger")) - (process-cache-directives el resp-headers text) - (cond - (get resp-headers "redirect") - (browser-navigate (get resp-headers "redirect")) - (get resp-headers "refresh") - (browser-reload) - (get resp-headers "location") - (fetch-location (get resp-headers "location")) - :else (let - ((target-el (if (get resp-headers "retarget") (dom-query (get resp-headers "retarget")) (resolve-target el))) - (swap-spec - (parse-swap-spec - (or (get resp-headers "reswap") (dom-get-attr el "sx-swap")) - (dom-has-class? (dom-body) "sx-transitions"))) - (swap-style (get swap-spec "style")) - (use-transition (get swap-spec "transition")) - (ct (or (get resp-headers "content-type") ""))) - (if - (contains? ct "text/sx") - (handle-sx-response el target-el text swap-style use-transition) - (handle-html-response el target-el text swap-style use-transition)) - (dispatch-trigger-events el (get resp-headers "trigger-swap")) - (handle-history el url resp-headers) - (set-timeout - (fn - () - (when - (get resp-headers "trigger-settle") - (dispatch-trigger-events - el - (get resp-headers "trigger-settle"))) - (process-settle-hooks el)) - 20) - (dom-dispatch - el - "sx:afterSwap" - (dict "target" target-el "swap" swap-style))))))) - -(define - flush-collected-styles - :effects (mutation io) - (fn - () - (let - ((rules (collected "cssx"))) - (when - (not (empty? rules)) - (clear-collected! "cssx") - (let - ((el (dom-create-element "style" nil))) - (dom-set-attr el "data-sx-css" "true") - (dom-set-prop el "textContent" (join "" rules)) - (dom-append-to-head el)))))) - -(define - handle-sx-response - :effects (mutation io) - (fn - (el - target - (text :as string) - (swap-style :as string) - (use-transition :as boolean)) - (let - ((cleaned (strip-component-scripts text))) - (let - ((final (extract-response-css cleaned))) - (let - ((trimmed (trim final))) - (when - (not (empty? trimmed)) - (let - ((rendered (sx-render trimmed)) - (container (dom-create-element "div" nil))) - (dom-append container rendered) - (process-oob-swaps - container + ((parsed (try-parse-json header-val))) + (if + parsed + (for-each (fn - (t oob (s :as string)) - (dispose-islands-in t) - (swap-dom-nodes - t - (if (= s "innerHTML") (children-to-fragment oob) oob) - s) - (post-swap t))) - (hoist-head-elements container) - (let - ((select-sel (dom-get-attr el "sx-select"))) + ((key :as string)) + (dom-dispatch el key (get parsed key))) + (keys parsed)) + (for-each + (fn + ((name :as string)) + (let + ((trimmed (trim name))) + (when + (not (empty? trimmed)) + (dom-dispatch el trimmed (dict))))) + (split header-val ","))))))) + (define + execute-request + :effects (mutation io) + (fn + (el (verbInfo :as dict) (extraParams :as dict)) + (let + ((info (or (get-verb-info el) verbInfo))) + (if + (nil? info) + (promise-resolve nil) + (let + ((verb (get info "method")) (url (get info "url"))) + (if (let - ((content (if select-sel (select-from-container container select-sel) (children-to-fragment container)))) - (dispose-islands-in target) + ((media (dom-get-attr el "sx-media"))) + (and media (not (browser-media-matches? media)))) + (promise-resolve nil) + (if + (let + ((confirm-msg (dom-get-attr el "sx-confirm"))) + (and confirm-msg (not (browser-confirm confirm-msg)))) + (promise-resolve nil) + (let + ((prompt-msg (dom-get-attr el "sx-prompt")) + (prompt-val + (if prompt-msg (browser-prompt prompt-msg) nil))) + (if + (and prompt-msg (nil? prompt-val)) + (promise-resolve nil) + (if + (or + (nil? verb) + (nil? url) + (not (validate-for-request el))) + (promise-resolve nil) + (do-fetch + el + verb + verb + url + (if + prompt-val + (assoc + (or extraParams (dict)) + "SX-Prompt" + prompt-val) + extraParams)))))))))))) + (define + do-fetch + :effects (mutation io) + (fn + (el + (verb :as string) + (method :as string) + (url :as string) + (extraParams :as dict)) + (let + ((sync (dom-get-attr el "sx-sync"))) + (when (= sync "replace") (abort-previous el)) + (let + ((target-el (resolve-target el))) + (when + (and target-el (not (identical? el target-el))) + (abort-previous-target target-el))) + (let + ((ctrl (new-abort-controller))) + (track-controller el ctrl) + (let + ((target-el (resolve-target el))) + (when target-el (track-controller-target target-el ctrl))) + (let + ((body-info (build-request-body el method url)) + (final-url (get body-info "url")) + (body (get body-info "body")) + (ct (get body-info "content-type")) + (headers (build-request-headers el (loaded-component-names))) + (csrf (csrf-token))) + (when + extraParams + (for-each + (fn + ((k :as string)) + (dict-set! headers k (get extraParams k))) + (keys extraParams))) + (when ct (dict-set! headers "Content-Type" ct)) + (when csrf (dict-set! headers "X-CSRFToken" csrf)) + (let + ((cached (preload-cache-get _preload-cache final-url)) + (optimistic-state (apply-optimistic el)) + (indicator (show-indicator el)) + (disabled-elts (disable-elements el))) + (dom-add-class el "sx-request") + (dom-set-attr el "aria-busy" "true") + (dom-dispatch + el + "sx:beforeRequest" + (dict "url" final-url "method" method)) + (fetch-request + (dict + "url" + final-url + "method" + method + "headers" + headers + "body" + body + "signal" + (controller-signal ctrl) + "cross-origin" + (cross-origin? final-url) + "preloaded" + cached) + (fn + ((resp-ok :as boolean) + (status :as number) + get-header + (text :as string)) + (do + (clear-loading-state el indicator disabled-elts) + (revert-optimistic optimistic-state) + (if + (not resp-ok) + (do + (dom-dispatch + el + "sx:responseError" + (dict "status" status "text" text)) + (if + (and text (> (len text) 0)) + (handle-fetch-success + el + final-url + verb + extraParams + get-header + text) + (handle-retry el verb method final-url extraParams))) + (do + (dom-dispatch + el + "sx:afterRequest" + (dict "status" status)) + (handle-fetch-success + el + final-url + verb + extraParams + get-header + text))))) + (fn + (err) + (do + (clear-loading-state el indicator disabled-elts) + (revert-optimistic optimistic-state) + (when + (not (abort-error? err)) + (log-warn + (str + "sx:fetch error " + method + " " + final-url + " — " + err)) + (dom-dispatch el "sx:requestError" (dict "error" err)))))))))))) + (define + handle-fetch-success + :effects (mutation io) + (fn + (el + (url :as string) + (verb :as string) + (extraParams :as dict) + get-header + (text :as string)) + (let + ((resp-headers (process-response-headers get-header))) + (dispatch-trigger-events el (get resp-headers "trigger")) + (process-cache-directives el resp-headers text) + (cond + (get resp-headers "redirect") + (browser-navigate (get resp-headers "redirect")) + (get resp-headers "refresh") + (browser-reload) + (get resp-headers "location") + (fetch-location (get resp-headers "location")) + :else (let + ((target-el (if (get resp-headers "retarget") (dom-query (get resp-headers "retarget")) (resolve-target el))) + (swap-spec + (parse-swap-spec + (or + (get resp-headers "reswap") + (dom-get-attr el "sx-swap")) + (dom-has-class? (dom-body) "sx-transitions"))) + (swap-style (get swap-spec "style")) + (use-transition (get swap-spec "transition")) + (ct (or (get resp-headers "content-type") ""))) + (if + (contains? ct "text/sx") + (handle-sx-response + el + target-el + text + swap-style + use-transition) + (handle-html-response + el + target-el + text + swap-style + use-transition)) + (dispatch-trigger-events el (get resp-headers "trigger-swap")) + (handle-history el url resp-headers) + (set-timeout + (fn + () + (when + (get resp-headers "trigger-settle") + (dispatch-trigger-events + el + (get resp-headers "trigger-settle"))) + (process-settle-hooks el)) + 20) + (dom-dispatch + el + "sx:afterSwap" + (dict "target" target-el "swap" swap-style))))))) + (define + flush-collected-styles + :effects (mutation io) + (fn + () + (let + ((rules (collected "cssx"))) + (when + (not (empty? rules)) + (clear-collected! "cssx") + (let + ((el (dom-create-element "style" nil))) + (dom-set-attr el "data-sx-css" "true") + (dom-set-prop el "textContent" (join "" rules)) + (dom-append-to-head el)))))) + (define + handle-sx-response + :effects (mutation io) + (fn + (el + target + (text :as string) + (swap-style :as string) + (use-transition :as boolean)) + (let + ((cleaned (strip-component-scripts text))) + (let + ((final (extract-response-css cleaned))) + (let + ((trimmed (trim final))) + (when + (not (empty? trimmed)) + (let + ((rendered (sx-render trimmed)) + (container (dom-create-element "div" nil))) + (dom-append container rendered) + (process-oob-swaps + container + (fn + (t oob (s :as string)) + (dispose-islands-in t) + (swap-dom-nodes + t + (if (= s "innerHTML") (children-to-fragment oob) oob) + s) + (post-swap t))) + (hoist-head-elements container) + (let + ((select-sel (dom-get-attr el "sx-select"))) + (let + ((content (if select-sel (select-from-container container select-sel) (children-to-fragment container)))) + (dispose-islands-in target) + (with-transition + use-transition + (fn + () + (let + ((swap-result (swap-dom-nodes target content swap-style))) + (post-swap + (if + (= swap-style "outerHTML") + (dom-parent (or swap-result target)) + (or swap-result target))))))))))))))) + (define + handle-html-response + :effects (mutation io) + (fn + (el + target + (text :as string) + (swap-style :as string) + (use-transition :as boolean)) + (let + ((doc (dom-parse-html-document text))) + (when + doc + (let + ((select-sel (dom-get-attr el "sx-select"))) + (dispose-islands-in target) + (if + select-sel + (let + ((container (dom-create-element "div" nil))) + (dom-set-inner-html container (dom-body-inner-html doc)) + (process-oob-swaps + container + (fn + (t oob (s :as string)) + (dispose-islands-in t) + (swap-dom-nodes t oob s) + (post-swap t))) + (hoist-head-elements container) + (let + ((html (select-from-container container select-sel))) + (with-transition + use-transition + (fn + () + (let + ((swap-root (swap-dom-nodes target html swap-style))) + (log-info + (str + "swap-root: " + (if swap-root (dom-tag-name swap-root) "nil") + " target: " + (dom-tag-name target))) + (post-swap (or swap-root target))))))) + (let + ((container (dom-create-element "div" nil))) + (dom-set-inner-html container (dom-body-inner-html doc)) + (process-oob-swaps + container + (fn + (t oob (s :as string)) + (dispose-islands-in t) + (swap-dom-nodes t oob s) + (post-swap t))) + (hoist-head-elements container) (with-transition use-transition (fn () - (let - ((swap-result (swap-dom-nodes target content swap-style))) - (post-swap - (if - (= swap-style "outerHTML") - (dom-parent (or swap-result target)) - (or swap-result target))))))))))))))) - -(define - handle-html-response - :effects (mutation io) - (fn - (el - target - (text :as string) - (swap-style :as string) - (use-transition :as boolean)) - (let - ((doc (dom-parse-html-document text))) - (when - doc - (let - ((select-sel (dom-get-attr el "sx-select"))) - (dispose-islands-in target) - (if - select-sel - (let - ((container (dom-create-element "div" nil))) - (dom-set-inner-html container (dom-body-inner-html doc)) - (process-oob-swaps - container - (fn - (t oob (s :as string)) - (dispose-islands-in t) - (swap-dom-nodes t oob s) - (post-swap t))) - (hoist-head-elements container) - (let - ((html (select-from-container container select-sel))) - (with-transition - use-transition - (fn - () - (let - ((swap-root (swap-dom-nodes target html swap-style))) - (log-info - (str - "swap-root: " - (if swap-root (dom-tag-name swap-root) "nil") - " target: " - (dom-tag-name target))) - (post-swap (or swap-root target))))))) - (let - ((container (dom-create-element "div" nil))) - (dom-set-inner-html container (dom-body-inner-html doc)) - (process-oob-swaps - container - (fn - (t oob (s :as string)) - (dispose-islands-in t) - (swap-dom-nodes t oob s) - (post-swap t))) - (hoist-head-elements container) - (with-transition - use-transition - (fn - () - (swap-dom-nodes - target - (children-to-fragment container) - swap-style) - (post-swap target)))))))))) - -(define - handle-retry - :effects (mutation io) - (fn - (el - (verb :as string) - (method :as string) - (url :as string) - (extraParams :as dict)) - (let - ((retry-attr (dom-get-attr el "sx-retry")) - (spec (parse-retry-spec retry-attr))) - (when - spec - (let - ((current-ms (or (dom-get-attr el "data-sx-retry-ms") (get spec "start-ms")))) - (let - ((ms (parse-int current-ms (get spec "start-ms")))) - (dom-set-attr - el - "data-sx-retry-ms" - (str (next-retry-ms ms (get spec "cap-ms")))) - (set-timeout - (fn () (do-fetch el verb method url extraParams)) - ms))))))) - -(define - bind-triggers - :effects (mutation io) - (fn - (el (verbInfo :as dict)) - (let - ((triggers (or (parse-trigger-spec (dom-get-attr el "sx-trigger")) (default-trigger (dom-tag-name el))))) - (for-each - (fn - ((trigger :as dict)) - (let - ((kind (classify-trigger trigger)) - (mods (get trigger "modifiers"))) - (cond - (= kind "poll") - (let - ((interval-id nil)) - (set! - interval-id - (set-interval - (fn - () - (if - (host-get el "isConnected") - (execute-request el nil nil) - (do - (clear-interval interval-id) - (log-info "poll stopped: element removed")))) - (get mods "interval")))) - (= kind "intersect") - (observe-intersection - el - (fn () (execute-request el nil nil)) - true - (get mods "delay")) - (= kind "load") - (set-timeout - (fn () (execute-request el nil nil)) - (or (get mods "delay") 0)) - (= kind "revealed") - (observe-intersection - el - (fn () (execute-request el nil nil)) - false - (get mods "delay")) - (= kind "event") - (bind-event el (get trigger "event") mods verbInfo)))) - triggers)))) - -(define - bind-event - :effects (mutation io) - (fn - (el (event-name :as string) (mods :as dict) (verbInfo :as dict)) - (let - ((timer nil) - (last-val nil) - (listen-target - (let - ((from-sel (get mods "from"))) - (cond - (nil? from-sel) - el - (= from-sel "body") - (dom-body) - (= from-sel "document") - (dom-document) - (= from-sel "window") - (dom-window) - :else (dom-query from-sel))))) - (when - listen-target - (dom-add-listener - listen-target - event-name - (fn - (e) - (let - ((should-fire (if (get mods "filter") (let ((f (get mods "filter"))) (let ((key-match (index-of f "key=='"))) (if (>= key-match 0) (let ((key-char (slice f (+ key-match 5) (+ key-match 6)))) (and (= (host-get e "key") key-char) (not (dom-matches? (host-get e "target") "input,textarea,select")))) true))) true))) - (when - (get mods "changed") - (let - ((val element-value)) - (if - (= val last-val) - (set! should-fire false) - (set! last-val val)))) - (when - (and - should-fire - (not (and (= event-name "click") (event-modifier-key? e)))) - (when - (or - (= event-name "submit") - (and (= event-name "click") (dom-has-attr? el "href"))) - (prevent-default e)) - (let - ((live-info (get-verb-info el)) - (is-get-link - (and - (= event-name "click") - (= (get live-info "method") "GET") - (dom-has-attr? el "href") - (not (get mods "delay")))) - (client-routed false)) - (when - is-get-link - (set! - client-routed - (try-client-route - (url-pathname (get live-info "url")) - (dom-get-attr el "sx-target")))) - (if - client-routed - (do - (save-scroll-position) - (browser-push-state (get live-info "url")) - (browser-scroll-to 0 0)) - (do - (when - is-get-link - (log-info - (str "sx:route server fetch " (get live-info "url")))) - (if - (get mods "delay") - (do - (clear-timeout timer) - (set! - timer - (set-timeout - (fn () (execute-request el nil nil)) - (get mods "delay")))) - (execute-request el nil nil)))))))) - (if (get mods "once") (dict "once" true) nil)))))) - -(define - post-swap - :effects (mutation io) - (fn - (root) - (log-info (str "post-swap: root=" (if root (dom-tag-name root) "nil"))) - (activate-scripts root) - (sx-process-scripts root) - (sx-hydrate root) - (sx-hydrate-islands root) - (run-post-render-hooks) - (flush-collected-styles) - (process-elements root))) - -(define - process-settle-hooks - :effects (mutation io) - (fn - (el) - (let - ((settle-expr (dom-get-attr el "sx-on-settle"))) - (when - (and settle-expr (not (empty? settle-expr))) - (let - ((exprs (sx-parse settle-expr))) - (for-each (fn (expr) (cek-eval expr)) exprs)))))) - -(define - activate-scripts - :effects (mutation io) - (fn - (root) - (when - root - (let - ((scripts (dom-query-all root "script"))) - (for-each - (fn - (dead) - (when - (and - (not (dom-has-attr? dead "data-components")) - (not (dom-has-attr? dead "data-sx-activated"))) - (let - ((live (create-script-clone dead))) - (dom-set-attr live "data-sx-activated" "true") - (dom-replace-child (dom-parent dead) live dead)))) - scripts))))) - -(define - process-oob-swaps - :effects (mutation io) - (fn - (container (swap-fn :as lambda)) - (let - ((oobs (find-oob-swaps container))) - (for-each - (fn - ((oob :as dict)) - (let - ((target-id (get oob "target-id")) - (target (dom-query-by-id target-id)) - (oob-el (get oob "element")) - (swap-type (get oob "swap-type"))) - (when - (dom-parent oob-el) - (dom-remove-child (dom-parent oob-el) oob-el)) - (when target (swap-fn target oob-el swap-type)))) - oobs)))) - -(define - hoist-head-elements - :effects (mutation io) - (fn - (container) - (for-each + (swap-dom-nodes + target + (children-to-fragment container) + swap-style) + (post-swap target)))))))))) + (define + handle-retry + :effects (mutation io) (fn - (style) - (when - (dom-parent style) - (dom-remove-child (dom-parent style) style)) - (dom-append-to-head style)) - (dom-query-all container "style[data-sx-css]")) - (for-each - (fn - (link) - (when (dom-parent link) (dom-remove-child (dom-parent link) link)) - (dom-append-to-head link)) - (dom-query-all container "link[rel=\"stylesheet\"]")))) - -(define - process-boosted - :effects (mutation io) - (fn - (root) - (for-each - (fn (container) (boost-descendants container)) - (dom-query-all (or root (dom-body)) "[sx-boost]")))) - -(define - boost-descendants - :effects (mutation io) - (fn - (container) - (let - ((boost-target (dom-get-attr container "sx-boost"))) - (for-each - (fn - (link) - (when - (and - (not (is-processed? link "boost")) - (should-boost-link? link)) - (mark-processed! link "boost") - (when - (and - (not (dom-has-attr? link "sx-target")) - boost-target - (not (= boost-target "true"))) - (dom-set-attr link "sx-target" boost-target)) - (when - (not (dom-has-attr? link "sx-swap")) - (dom-set-attr link "sx-swap" "innerHTML")) - (when - (not (dom-has-attr? link "sx-push-url")) - (dom-set-attr link "sx-push-url" "true")) - (bind-client-route-link link (dom-get-attr link "href")))) - (dom-query-all container "a[href]")) - (for-each - (fn - (form) - (when - (and - (not (is-processed? form "boost")) - (should-boost-form? form)) - (mark-processed! form "boost") - (let - ((method (upper (or (dom-get-attr form "method") "GET"))) - (action - (or (dom-get-attr form "action") (browser-location-href)))) - (when - (and - (not (dom-has-attr? form "sx-target")) - boost-target - (not (= boost-target "true"))) - (dom-set-attr form "sx-target" boost-target)) - (when - (not (dom-has-attr? form "sx-swap")) - (dom-set-attr form "sx-swap" "innerHTML")) - (bind-boost-form form method action)))) - (dom-query-all container "form"))))) - -(define _page-data-cache (dict)) - -(define _page-data-cache-ttl 30000) - -(define - page-data-cache-key - :effects () - (fn - ((page-name :as string) (params :as dict)) - (let - ((base page-name)) - (if - (or (nil? params) (empty? (keys params))) - base + (el + (verb :as string) + (method :as string) + (url :as string) + (extraParams :as dict)) (let - ((parts (list))) + ((retry-attr (dom-get-attr el "sx-retry")) + (spec (parse-retry-spec retry-attr))) + (when + spec + (let + ((current-ms (or (dom-get-attr el "data-sx-retry-ms") (get spec "start-ms")))) + (let + ((ms (parse-int current-ms (get spec "start-ms")))) + (dom-set-attr + el + "data-sx-retry-ms" + (str (next-retry-ms ms (get spec "cap-ms")))) + (set-timeout + (fn () (do-fetch el verb method url extraParams)) + ms))))))) + (define + bind-triggers + :effects (mutation io) + (fn + (el (verbInfo :as dict)) + (let + ((triggers (or (parse-trigger-spec (dom-get-attr el "sx-trigger")) (default-trigger (dom-tag-name el))))) (for-each (fn - ((k :as string)) - (append! parts (str k "=" (get params k)))) - (keys params)) - (str base ":" (join "&" parts))))))) - -(define - page-data-cache-get - :effects (mutation io) - (fn - ((cache-key :as string)) - (let - ((entry (get _page-data-cache cache-key))) - (if - (nil? entry) - nil - (if - (> (- (now-ms) (get entry "ts")) _page-data-cache-ttl) - (do (dict-set! _page-data-cache cache-key nil) nil) - (get entry "data")))))) - -(define - page-data-cache-set - :effects (mutation io) - (fn - ((cache-key :as string) data) - (dict-set! _page-data-cache cache-key {:data data :ts (now-ms)}))) - -(define - invalidate-page-cache - :effects (mutation io) - (fn - ((page-name :as string)) - (for-each + ((trigger :as dict)) + (let + ((kind (classify-trigger trigger)) + (mods (get trigger "modifiers"))) + (cond + (= kind "poll") + (let + ((interval-id nil)) + (set! + interval-id + (set-interval + (fn + () + (if + (host-get el "isConnected") + (execute-request el nil nil) + (do + (clear-interval interval-id) + (log-info "poll stopped: element removed")))) + (get mods "interval")))) + (= kind "intersect") + (observe-intersection + el + (fn () (execute-request el nil nil)) + true + (get mods "delay")) + (= kind "load") + (set-timeout + (fn () (execute-request el nil nil)) + (or (get mods "delay") 0)) + (= kind "revealed") + (observe-intersection + el + (fn () (execute-request el nil nil)) + false + (get mods "delay")) + (= kind "event") + (bind-event el (get trigger "event") mods verbInfo)))) + triggers)))) + (define + bind-event + :effects (mutation io) (fn - ((k :as string)) + (el (event-name :as string) (mods :as dict) (verbInfo :as dict)) + (let + ((timer nil) + (last-val nil) + (listen-target + (let + ((from-sel (get mods "from"))) + (cond + (nil? from-sel) + el + (= from-sel "body") + (dom-body) + (= from-sel "document") + (dom-document) + (= from-sel "window") + (dom-window) + :else (dom-query from-sel))))) + (when + listen-target + (dom-add-listener + listen-target + event-name + (fn + (e) + (let + ((should-fire (if (get mods "filter") (let ((f (get mods "filter"))) (let ((key-match (index-of f "key=='"))) (if (>= key-match 0) (let ((key-char (slice f (+ key-match 5) (+ key-match 6)))) (and (= (host-get e "key") key-char) (not (dom-matches? (host-get e "target") "input,textarea,select")))) true))) true))) + (when + (get mods "changed") + (let + ((val element-value)) + (if + (= val last-val) + (set! should-fire false) + (set! last-val val)))) + (when + (and + should-fire + (not + (and (= event-name "click") (event-modifier-key? e)))) + (when + (or + (= event-name "submit") + (and + (= event-name "click") + (dom-has-attr? el "href"))) + (prevent-default e)) + (let + ((live-info (get-verb-info el)) + (is-get-link + (and + (= event-name "click") + (= (get live-info "method") "GET") + (dom-has-attr? el "href") + (not (get mods "delay")))) + (client-routed false)) + (when + is-get-link + (set! + client-routed + (try-client-route + (url-pathname (get live-info "url")) + (dom-get-attr el "sx-target")))) + (if + client-routed + (do + (save-scroll-position) + (browser-push-state (get live-info "url")) + (browser-scroll-to 0 0)) + (do + (when + is-get-link + (log-info + (str + "sx:route server fetch " + (get live-info "url")))) + (if + (get mods "delay") + (do + (clear-timeout timer) + (set! + timer + (set-timeout + (fn () (execute-request el nil nil)) + (get mods "delay")))) + (execute-request el nil nil)))))))) + (if (get mods "once") (dict "once" true) nil)))))) + (define + post-swap + :effects (mutation io) + (fn + (root) + (log-info + (str "post-swap: root=" (if root (dom-tag-name root) "nil"))) + (activate-scripts root) + (sx-process-scripts root) + (sx-hydrate root) + (sx-hydrate-islands root) + (run-post-render-hooks) + (flush-collected-styles) + (process-elements root))) + (define + process-settle-hooks + :effects (mutation io) + (fn + (el) + (let + ((settle-expr (dom-get-attr el "sx-on-settle"))) + (when + (and settle-expr (not (empty? settle-expr))) + (let + ((exprs (sx-parse settle-expr))) + (for-each (fn (expr) (cek-eval expr)) exprs)))))) + (define + activate-scripts + :effects (mutation io) + (fn + (root) (when - (or (= k page-name) (starts-with? k (str page-name ":"))) - (dict-set! _page-data-cache k nil))) - (keys _page-data-cache)) - (sw-post-message {:type "invalidate" :page page-name}) - (log-info (str "sx:cache invalidate " page-name)))) - -(define - invalidate-all-page-cache - :effects (mutation io) - (fn - () - (set! _page-data-cache (dict)) - (sw-post-message {:type "invalidate" :page "*"}) - (log-info "sx:cache invalidate *"))) - -(define - update-page-cache - :effects (mutation io) - (fn - ((page-name :as string) data) - (let - ((cache-key (page-data-cache-key page-name (dict)))) - (page-data-cache-set cache-key data) - (log-info (str "sx:cache update " page-name))))) - -(define - process-cache-directives - :effects (mutation io) - (fn - (el (resp-headers :as dict) (response-text :as string)) - (let - ((el-invalidate (dom-get-attr el "sx-cache-invalidate"))) - (when - el-invalidate - (if - (= el-invalidate "*") - (invalidate-all-page-cache) - (invalidate-page-cache el-invalidate)))) - (let - ((hdr-invalidate (get resp-headers "cache-invalidate"))) - (when - hdr-invalidate - (if - (= hdr-invalidate "*") - (invalidate-all-page-cache) - (invalidate-page-cache hdr-invalidate)))) - (let - ((hdr-update (get resp-headers "cache-update"))) - (when - hdr-update - (let - ((data (parse-sx-data response-text))) - (when data (update-page-cache hdr-update data))))))) - -(define _optimistic-snapshots (dict)) - -(define - optimistic-cache-update - :effects (mutation) - (fn - ((cache-key :as string) (mutator :as lambda)) - (let - ((cached (page-data-cache-get cache-key))) - (when - cached - (let - ((predicted (mutator cached))) - (dict-set! _optimistic-snapshots cache-key cached) - (page-data-cache-set cache-key predicted) - predicted))))) - -(define - optimistic-cache-revert - :effects (mutation) - (fn - ((cache-key :as string)) - (let - ((snapshot (get _optimistic-snapshots cache-key))) - (when - snapshot - (page-data-cache-set cache-key snapshot) - (dict-delete! _optimistic-snapshots cache-key) - snapshot)))) - -(define - optimistic-cache-confirm - :effects (mutation) - (fn - ((cache-key :as string)) - (dict-delete! _optimistic-snapshots cache-key))) - -(define - submit-mutation - :effects (mutation io) - (fn - ((page-name :as string) - (params :as dict) - (action-name :as string) - payload - (mutator-fn :as lambda) - (on-complete :as lambda)) - (let - ((cache-key (page-data-cache-key page-name params)) - (predicted (optimistic-cache-update cache-key mutator-fn))) - (when predicted (try-rerender-page page-name params predicted)) - (execute-action - action-name - payload - (fn - (result) - (when result (page-data-cache-set cache-key result)) - (optimistic-cache-confirm cache-key) - (when result (try-rerender-page page-name params result)) - (log-info (str "sx:optimistic confirmed " page-name)) - (when on-complete (on-complete "confirmed"))) - (fn - ((error :as string)) + root (let - ((reverted (optimistic-cache-revert cache-key))) - (when reverted (try-rerender-page page-name params reverted)) - (log-warn (str "sx:optimistic reverted " page-name ": " error)) - (when on-complete (on-complete "reverted")))))))) - -(define _is-online true) - -(define _offline-queue (list)) - -(define offline-is-online? :effects (io) (fn () _is-online)) - -(define - offline-set-online! - :effects (mutation) - (fn ((val :as boolean)) (set! _is-online val))) - -(define - offline-queue-mutation - :effects (mutation io) - (fn - ((action-name :as string) - payload - (page-name :as string) - (params :as dict) - (mutator-fn :as lambda)) - (let - ((cache-key (page-data-cache-key page-name params)) - (entry - (dict - "action" - action-name - "payload" - payload - "page" - page-name - "params" - params - "timestamp" - (now-ms) - "status" - "pending"))) - (append! _offline-queue entry) - (let - ((predicted (optimistic-cache-update cache-key mutator-fn))) - (when predicted (try-rerender-page page-name params predicted))) - (log-info - (str - "sx:offline queued " - action-name - " (" - (len _offline-queue) - " pending)")) - entry))) - -(define - offline-sync - :effects (mutation io) - (fn - () - (let - ((pending (filter (fn ((e :as dict)) (= (get e "status") "pending")) _offline-queue))) - (when - (not (empty? pending)) - (log-info (str "sx:offline syncing " (len pending) " mutations")) + ((scripts (dom-query-all root "script"))) + (for-each + (fn + (dead) + (when + (and + (not (dom-has-attr? dead "data-components")) + (not (dom-has-attr? dead "data-sx-activated"))) + (let + ((live (create-script-clone dead))) + (dom-set-attr live "data-sx-activated" "true") + (dom-replace-child (dom-parent dead) live dead)))) + scripts))))) + (define + process-oob-swaps + :effects (mutation io) + (fn + (container (swap-fn :as lambda)) + (let + ((oobs (find-oob-swaps container))) + (for-each + (fn + ((oob :as dict)) + (let + ((target-id (get oob "target-id")) + (target (dom-query-by-id target-id)) + (oob-el (get oob "element")) + (swap-type (get oob "swap-type"))) + (when + (dom-parent oob-el) + (dom-remove-child (dom-parent oob-el) oob-el)) + (when target (swap-fn target oob-el swap-type)))) + oobs)))) + (define + hoist-head-elements + :effects (mutation io) + (fn + (container) (for-each (fn - ((entry :as dict)) - (execute-action - (get entry "action") - (get entry "payload") - (fn - (result) - (dict-set! entry "status" "synced") - (log-info (str "sx:offline synced " (get entry "action")))) - (fn - ((error :as string)) - (dict-set! entry "status" "failed") - (log-warn - (str - "sx:offline sync failed " - (get entry "action") - ": " - error))))) - pending))))) - -(define - offline-pending-count - :effects (io) - (fn - () - (len - (filter - (fn ((e :as dict)) (= (get e "status") "pending")) - _offline-queue)))) - -(define - offline-aware-mutation - :effects (mutation io) - (fn - ((page-name :as string) - (params :as dict) - (action-name :as string) - payload - (mutator-fn :as lambda) - (on-complete :as lambda)) - (if - _is-online - (submit-mutation - page-name - params - action-name - payload - mutator-fn - on-complete) - (do - (offline-queue-mutation - action-name - payload - page-name - params - mutator-fn) - (when on-complete (on-complete "queued")))))) - -(define - current-page-layout - :effects (io) - (fn - () - (let - ((pathname (url-pathname (browser-location-href))) - (match (find-matching-route pathname _page-routes))) - (if (nil? match) "" (or (get match "layout") ""))))) - -(define - swap-rendered-content - :effects (mutation io) - (fn - (target rendered (pathname :as string)) - (let - ((container (dom-create-element "div" nil))) - (dom-append container rendered) - (process-oob-swaps - container - (fn - (t oob (s :as string)) - (dispose-islands-in t) - (swap-dom-nodes - t - (if (= s "innerHTML") (children-to-fragment oob) oob) - s) - (post-swap t))) - (let - ((target-id (dom-get-attr target "id"))) + (style) + (when + (dom-parent style) + (dom-remove-child (dom-parent style) style)) + (dom-append-to-head style)) + (dom-query-all container "style[data-sx-css]")) + (for-each + (fn + (link) + (when + (dom-parent link) + (dom-remove-child (dom-parent link) link)) + (dom-append-to-head link)) + (dom-query-all container "link[rel=\"stylesheet\"]")))) + (define + process-boosted + :effects (mutation io) + (fn + (root) + (for-each + (fn (container) (boost-descendants container)) + (dom-query-all (or root (dom-body)) "[sx-boost]")))) + (define + boost-descendants + :effects (mutation io) + (fn + (container) (let - ((inner (if target-id (dom-query container (str "#" target-id)) nil))) + ((boost-target (dom-get-attr container "sx-boost"))) + (for-each + (fn + (link) + (when + (and + (not (is-processed? link "boost")) + (should-boost-link? link)) + (mark-processed! link "boost") + (when + (and + (not (dom-has-attr? link "sx-target")) + boost-target + (not (= boost-target "true"))) + (dom-set-attr link "sx-target" boost-target)) + (when + (not (dom-has-attr? link "sx-swap")) + (dom-set-attr link "sx-swap" "innerHTML")) + (when + (not (dom-has-attr? link "sx-push-url")) + (dom-set-attr link "sx-push-url" "true")) + (bind-client-route-link link (dom-get-attr link "href")))) + (dom-query-all container "a[href]")) + (for-each + (fn + (form) + (when + (and + (not (is-processed? form "boost")) + (should-boost-form? form)) + (mark-processed! form "boost") + (let + ((method (upper (or (dom-get-attr form "method") "GET"))) + (action + (or + (dom-get-attr form "action") + (browser-location-href)))) + (when + (and + (not (dom-has-attr? form "sx-target")) + boost-target + (not (= boost-target "true"))) + (dom-set-attr form "sx-target" boost-target)) + (when + (not (dom-has-attr? form "sx-swap")) + (dom-set-attr form "sx-swap" "innerHTML")) + (bind-boost-form form method action)))) + (dom-query-all container "form"))))) + (define _page-data-cache (dict)) + (define _page-data-cache-ttl 30000) + (define + page-data-cache-key + :effects () + (fn + ((page-name :as string) (params :as dict)) + (let + ((base page-name)) + (if + (or (nil? params) (empty? (keys params))) + base + (let + ((parts (list))) + (for-each + (fn + ((k :as string)) + (append! parts (str k "=" (get params k)))) + (keys params)) + (str base ":" (join "&" parts))))))) + (define + page-data-cache-get + :effects (mutation io) + (fn + ((cache-key :as string)) + (let + ((entry (get _page-data-cache cache-key))) + (if + (nil? entry) + nil + (if + (> (- (now-ms) (get entry "ts")) _page-data-cache-ttl) + (do (dict-set! _page-data-cache cache-key nil) nil) + (get entry "data")))))) + (define + page-data-cache-set + :effects (mutation io) + (fn + ((cache-key :as string) data) + (dict-set! _page-data-cache cache-key {:data data :ts (now-ms)}))) + (define + invalidate-page-cache + :effects (mutation io) + (fn + ((page-name :as string)) + (for-each + (fn + ((k :as string)) + (when + (or (= k page-name) (starts-with? k (str page-name ":"))) + (dict-set! _page-data-cache k nil))) + (keys _page-data-cache)) + (sw-post-message {:type "invalidate" :page page-name}) + (log-info (str "sx:cache invalidate " page-name)))) + (define + invalidate-all-page-cache + :effects (mutation io) + (fn + () + (set! _page-data-cache (dict)) + (sw-post-message {:type "invalidate" :page "*"}) + (log-info "sx:cache invalidate *"))) + (define + update-page-cache + :effects (mutation io) + (fn + ((page-name :as string) data) + (let + ((cache-key (page-data-cache-key page-name (dict)))) + (page-data-cache-set cache-key data) + (log-info (str "sx:cache update " page-name))))) + (define + process-cache-directives + :effects (mutation io) + (fn + (el (resp-headers :as dict) (response-text :as string)) + (let + ((el-invalidate (dom-get-attr el "sx-cache-invalidate"))) + (when + el-invalidate + (if + (= el-invalidate "*") + (invalidate-all-page-cache) + (invalidate-page-cache el-invalidate)))) + (let + ((hdr-invalidate (get resp-headers "cache-invalidate"))) + (when + hdr-invalidate + (if + (= hdr-invalidate "*") + (invalidate-all-page-cache) + (invalidate-page-cache hdr-invalidate)))) + (let + ((hdr-update (get resp-headers "cache-update"))) + (when + hdr-update + (let + ((data (parse-sx-data response-text))) + (when data (update-page-cache hdr-update data))))))) + (define _optimistic-snapshots (dict)) + (define + optimistic-cache-update + :effects (mutation) + (fn + ((cache-key :as string) (mutator :as lambda)) + (let + ((cached (page-data-cache-get cache-key))) + (when + cached + (let + ((predicted (mutator cached))) + (dict-set! _optimistic-snapshots cache-key cached) + (page-data-cache-set cache-key predicted) + predicted))))) + (define + optimistic-cache-revert + :effects (mutation) + (fn + ((cache-key :as string)) + (let + ((snapshot (get _optimistic-snapshots cache-key))) + (when + snapshot + (page-data-cache-set cache-key snapshot) + (dict-delete! _optimistic-snapshots cache-key) + snapshot)))) + (define + optimistic-cache-confirm + :effects (mutation) + (fn + ((cache-key :as string)) + (dict-delete! _optimistic-snapshots cache-key))) + (define + submit-mutation + :effects (mutation io) + (fn + ((page-name :as string) + (params :as dict) + (action-name :as string) + payload + (mutator-fn :as lambda) + (on-complete :as lambda)) + (let + ((cache-key (page-data-cache-key page-name params)) + (predicted (optimistic-cache-update cache-key mutator-fn))) + (when predicted (try-rerender-page page-name params predicted)) + (execute-action + action-name + payload + (fn + (result) + (when result (page-data-cache-set cache-key result)) + (optimistic-cache-confirm cache-key) + (when result (try-rerender-page page-name params result)) + (log-info (str "sx:optimistic confirmed " page-name)) + (when on-complete (on-complete "confirmed"))) + (fn + ((error :as string)) + (let + ((reverted (optimistic-cache-revert cache-key))) + (when reverted (try-rerender-page page-name params reverted)) + (log-warn + (str "sx:optimistic reverted " page-name ": " error)) + (when on-complete (on-complete "reverted")))))))) + (define _is-online true) + (define _offline-queue (list)) + (define offline-is-online? :effects (io) (fn () _is-online)) + (define + offline-set-online! + :effects (mutation) + (fn ((val :as boolean)) (set! _is-online val))) + (define + offline-queue-mutation + :effects (mutation io) + (fn + ((action-name :as string) + payload + (page-name :as string) + (params :as dict) + (mutator-fn :as lambda)) + (let + ((cache-key (page-data-cache-key page-name params)) + (entry + (dict + "action" + action-name + "payload" + payload + "page" + page-name + "params" + params + "timestamp" + (now-ms) + "status" + "pending"))) + (append! _offline-queue entry) (let - ((content (if inner (children-to-fragment inner) (children-to-fragment container)))) - (dispose-islands-in target) - (dom-set-text-content target "") - (dom-append target content) - (hoist-head-elements-full target) - (process-elements target) - (sx-hydrate-elements target) - (sx-hydrate-islands target) - (run-post-render-hooks) - (dom-dispatch target "sx:clientRoute" (dict "pathname" pathname)) - (log-info (str "sx:route client " pathname)))))))) - -(define - resolve-route-target - :effects (io) - (fn - ((target-sel :as string)) - (if - (and target-sel (not (= target-sel "true"))) - (dom-query target-sel) - nil))) - -(define - deps-satisfied? - :effects (io) - (fn - ((match :as dict)) - (let - ((deps (get match "deps")) (loaded (loaded-component-names))) - (if - (or (nil? deps) (empty? deps)) - true - (every? (fn ((dep :as string)) (contains? loaded dep)) deps))))) - -(define - try-client-route - :effects (mutation io) - (fn - ((pathname :as string) (target-sel :as string)) - (let - ((match (find-matching-route pathname _page-routes))) - (if - (nil? match) - (do + ((predicted (optimistic-cache-update cache-key mutator-fn))) + (when predicted (try-rerender-page page-name params predicted))) (log-info (str - "sx:route no match (" - (len _page-routes) - " routes) " - pathname)) - false) + "sx:offline queued " + action-name + " (" + (len _offline-queue) + " pending)")) + entry))) + (define + offline-sync + :effects (mutation io) + (fn + () (let - ((target-layout (or (get match "layout") "")) - (cur-layout (current-page-layout))) + ((pending (filter (fn ((e :as dict)) (= (get e "status") "pending")) _offline-queue))) + (when + (not (empty? pending)) + (log-info (str "sx:offline syncing " (len pending) " mutations")) + (for-each + (fn + ((entry :as dict)) + (execute-action + (get entry "action") + (get entry "payload") + (fn + (result) + (dict-set! entry "status" "synced") + (log-info + (str "sx:offline synced " (get entry "action")))) + (fn + ((error :as string)) + (dict-set! entry "status" "failed") + (log-warn + (str + "sx:offline sync failed " + (get entry "action") + ": " + error))))) + pending))))) + (define + offline-pending-count + :effects (io) + (fn + () + (len + (filter + (fn ((e :as dict)) (= (get e "status") "pending")) + _offline-queue)))) + (define + offline-aware-mutation + :effects (mutation io) + (fn + ((page-name :as string) + (params :as dict) + (action-name :as string) + payload + (mutator-fn :as lambda) + (on-complete :as lambda)) + (if + _is-online + (submit-mutation + page-name + params + action-name + payload + mutator-fn + on-complete) + (do + (offline-queue-mutation + action-name + payload + page-name + params + mutator-fn) + (when on-complete (on-complete "queued")))))) + (define + current-page-layout + :effects (io) + (fn + () + (let + ((pathname (url-pathname (browser-location-href))) + (match (find-matching-route pathname _page-routes))) + (if (nil? match) "" (or (get match "layout") ""))))) + (define + swap-rendered-content + :effects (mutation io) + (fn + (target rendered (pathname :as string)) + (let + ((container (dom-create-element "div" nil))) + (dom-append container rendered) + (process-oob-swaps + container + (fn + (t oob (s :as string)) + (dispose-islands-in t) + (swap-dom-nodes + t + (if (= s "innerHTML") (children-to-fragment oob) oob) + s) + (post-swap t))) + (let + ((target-id (dom-get-attr target "id"))) + (let + ((inner (if target-id (dom-query container (str "#" target-id)) nil))) + (let + ((content (if inner (children-to-fragment inner) (children-to-fragment container)))) + (dispose-islands-in target) + (dom-set-text-content target "") + (dom-append target content) + (hoist-head-elements-full target) + (process-elements target) + (sx-hydrate-elements target) + (sx-hydrate-islands target) + (run-post-render-hooks) + (dom-dispatch + target + "sx:clientRoute" + (dict "pathname" pathname)) + (log-info (str "sx:route client " pathname)))))))) + (define + resolve-route-target + :effects (io) + (fn + ((target-sel :as string)) + (if + (and target-sel (not (= target-sel "true"))) + (dom-query target-sel) + nil))) + (define + deps-satisfied? + :effects (io) + (fn + ((match :as dict)) + (let + ((deps (get match "deps")) (loaded (loaded-component-names))) (if - (not (= target-layout cur-layout)) + (nil? deps) + false + (if + (empty? deps) + true + (every? (fn ((dep :as string)) (contains? loaded dep)) deps)))))) + (define + try-client-route + :effects (mutation io) + (fn + ((pathname :as string) (target-sel :as string)) + (let + ((match (find-matching-route pathname _page-routes))) + (if + (nil? match) (do (log-info (str - "sx:route server (layout: " - cur-layout - " -> " - target-layout - ") " + "sx:route no match (" + (len _page-routes) + " routes) " pathname)) false) (let - ((content-src (get match "content")) - (closure (or (get match "closure") {})) - (params (get match "params")) - (page-name (get match "name"))) + ((target-layout (or (get match "layout") "")) + (cur-layout (current-page-layout))) (if - (or (nil? content-src) (empty? content-src)) + (not (= target-layout cur-layout)) (do - (log-warn (str "sx:route no content for " pathname)) + (log-info + (str + "sx:route server (layout: " + cur-layout + " -> " + target-layout + ") " + pathname)) false) (let - ((target (resolve-route-target target-sel))) + ((content-src (get match "content")) + (closure (or (get match "closure") {})) + (params (get match "params")) + (page-name (get match "name"))) (if - (nil? target) + (or (nil? content-src) (empty? content-src)) (do - (log-warn - (str "sx:route target not found: " target-sel)) + (log-warn (str "sx:route no content for " pathname)) false) - (if - (not (deps-satisfied? match)) - (do - (log-info (str "sx:route deps miss for " page-name)) - false) - (let - ((io-deps (get match "io-deps")) - (has-io (and io-deps (not (empty? io-deps)))) - (render-plan (get match "render-plan"))) - (when - render-plan - (let - ((srv (or (get render-plan "server") (list))) - (cli (or (get render-plan "client") (list)))) - (log-info - (str - "sx:route plan " - page-name - " — " - (len srv) - " server, " - (len cli) - " client")))) - (when has-io (register-io-deps io-deps)) + (let + ((target (resolve-route-target target-sel))) + (if + (nil? target) + (do + (log-warn + (str "sx:route target not found: " target-sel)) + false) (if - (get match "stream") + (not (deps-satisfied? match)) (do - (log-info (str "sx:route streaming " pathname)) - (fetch-streaming - target - pathname - (build-request-headers - target - (loaded-component-names))) - true) - (if - (get match "has-data") - (let - ((cache-key (page-data-cache-key page-name params)) - (cached (page-data-cache-get cache-key))) + (log-info + (str "sx:route deps miss for " page-name)) + false) + (let + ((io-deps (get match "io-deps")) + (has-io (and io-deps (not (empty? io-deps)))) + (render-plan (get match "render-plan"))) + (when + render-plan + (let + ((srv (or (get render-plan "server") (list))) + (cli + (or (get render-plan "client") (list)))) + (log-info + (str + "sx:route plan " + page-name + " — " + (len srv) + " server, " + (len cli) + " client")))) + (when has-io (register-io-deps io-deps)) + (if + (get match "stream") + (do + (log-info + (str "sx:route streaming " pathname)) + (fetch-streaming + target + pathname + (build-request-headers + target + (loaded-component-names))) + true) (if - cached + (get match "has-data") (let - ((env (merge closure params cached))) + ((cache-key (page-data-cache-key page-name params)) + (cached (page-data-cache-get cache-key))) (if - has-io - (do - (log-info - (str - "sx:route client+cache+async " - pathname)) - (try-async-eval-content - content-src - env - (fn - (rendered) - (if - (nil? rendered) - (do - (log-warn - (str - "sx:route cache+async eval failed for " - pathname - " — server fallback")) - (fetch-and-restore - target - pathname - (build-request-headers - target - (loaded-component-names)) - 0)) - (swap-rendered-content - target - rendered - pathname)))) - true) + cached (let - ((rendered (try-eval-content content-src env))) + ((env (merge closure params cached))) (if - (nil? rendered) - (do - (log-warn - (str - "sx:route cached eval failed for " - pathname)) - false) + has-io (do (log-info (str - "sx:route client+cache " + "sx:route client+cache+async " pathname)) - (swap-rendered-content - target - rendered - pathname) - true))))) - (do - (log-info - (str "sx:route client+data " pathname)) - (resolve-page-data - page-name - params - (fn - ((data :as dict)) - (page-data-cache-set cache-key data) - (let - ((env (merge closure params data))) - (if - has-io (try-async-eval-content content-src env @@ -1282,7 +1221,7 @@ (do (log-warn (str - "sx:route data+async eval failed for " + "sx:route cache+async eval failed for " pathname " — server fallback")) (fetch-and-restore @@ -1296,350 +1235,404 @@ target rendered pathname)))) - (let - ((rendered (try-eval-content content-src env))) - (if - (nil? rendered) - (do - (log-warn - (str - "sx:route data eval failed for " - pathname - " — server fallback")) - (fetch-and-restore - target - pathname - (build-request-headers - target - (loaded-component-names)) - 0)) + true) + (let + ((rendered (try-eval-content content-src env))) + (if + (nil? rendered) + (do + (log-warn + (str + "sx:route cached eval failed for " + pathname)) + false) + (do + (log-info + (str + "sx:route client+cache " + pathname)) (swap-rendered-content target rendered - pathname))))))) - true))) - (if - has-io - (do - (log-info - (str "sx:route client+async " pathname)) - (try-async-eval-content - content-src - (merge closure params) - (fn - (rendered) + pathname) + true))))) + (do + (log-info + (str "sx:route client+data " pathname)) + (resolve-page-data + page-name + params + (fn + ((data :as dict)) + (page-data-cache-set cache-key data) + (let + ((env (merge closure params data))) + (if + has-io + (try-async-eval-content + content-src + env + (fn + (rendered) + (if + (nil? rendered) + (do + (log-warn + (str + "sx:route data+async eval failed for " + pathname + " — server fallback")) + (fetch-and-restore + target + pathname + (build-request-headers + target + (loaded-component-names)) + 0)) + (swap-rendered-content + target + rendered + pathname)))) + (let + ((rendered (try-eval-content content-src env))) + (if + (nil? rendered) + (do + (log-warn + (str + "sx:route data eval failed for " + pathname + " — server fallback")) + (fetch-and-restore + target + pathname + (build-request-headers + target + (loaded-component-names)) + 0)) + (swap-rendered-content + target + rendered + pathname))))))) + true))) + (if + has-io + (do + (log-info + (str "sx:route client+async " pathname)) + (try-async-eval-content + content-src + (merge closure params) + (fn + (rendered) + (if + (nil? rendered) + (do + (log-warn + (str + "sx:route async eval failed for " + pathname + " — server fallback")) + (fetch-and-restore + target + pathname + (build-request-headers + target + (loaded-component-names)) + 0)) + (swap-rendered-content + target + rendered + pathname)))) + true) + (let + ((env (merge closure params)) + (rendered + (try-eval-content content-src env))) (if (nil? rendered) (do - (log-warn + (log-info (str - "sx:route async eval failed for " - pathname - " — server fallback")) - (fetch-and-restore + "sx:route server (eval failed) " + pathname)) + false) + (do + (swap-rendered-content target - pathname - (build-request-headers - target - (loaded-component-names)) - 0)) - (swap-rendered-content - target - rendered - pathname)))) - true) - (let - ((env (merge closure params)) - (rendered - (try-eval-content content-src env))) - (if - (nil? rendered) - (do - (log-info - (str - "sx:route server (eval failed) " - pathname)) - false) - (do - (swap-rendered-content - target - rendered - pathname) - true)))))))))))))))))) - -(define - bind-client-route-link - :effects (mutation io) - (fn - (link (href :as string)) - (bind-client-route-click link href (fn () (bind-boost-link link href))))) - -(define - process-sse - :effects (mutation io) - (fn - (root) - (for-each + rendered + pathname) + true)))))))))))))))))) + (define + bind-client-route-link + :effects (mutation io) (fn - (el) - (when - (not (is-processed? el "sse")) - (mark-processed! el "sse") - (bind-sse el))) - (dom-query-all (or root (dom-body)) "[sx-sse]")))) - -(define - bind-sse - :effects (mutation io) - (fn - (el) - (let - ((url (dom-get-attr el "sx-sse"))) - (when - url - (let - ((source (event-source-connect url el)) - (event-name (parse-sse-swap el))) - (event-source-listen - source - event-name - (fn ((data :as string)) (bind-sse-swap el data)))))))) - -(define - bind-sse-swap - :effects (mutation io) - (fn - (el (data :as string)) - (let - ((target (resolve-target el)) - (swap-spec - (parse-swap-spec - (dom-get-attr el "sx-swap") - (dom-has-class? (dom-body) "sx-transitions"))) - (swap-style (get swap-spec "style")) - (use-transition (get swap-spec "transition")) - (trimmed (trim data))) - (when - (not (empty? trimmed)) - (dispose-islands-in target) - (if - (starts-with? trimmed "(") - (let - ((rendered (sx-render trimmed)) - (container (dom-create-element "div" nil))) - (dom-append container rendered) - (with-transition - use-transition - (fn - () - (swap-dom-nodes - target - (children-to-fragment container) - swap-style) - (post-swap target)))) - (with-transition - use-transition - (fn - () - (swap-html-string target trimmed swap-style) - (post-swap target)))))))) - -(define - bind-inline-handlers - :effects (mutation io) - (fn - (root) - (for-each + (link (href :as string)) + (bind-client-route-click + link + href + (fn () (bind-boost-link link href))))) + (define + process-sse + :effects (mutation io) (fn - (el) + (root) (for-each (fn - ((attr :as list)) + (el) + (when + (not (is-processed? el "sse")) + (mark-processed! el "sse") + (bind-sse el))) + (dom-query-all (or root (dom-body)) "[sx-sse]")))) + (define + bind-sse + :effects (mutation io) + (fn + (el) + (let + ((url (dom-get-attr el "sx-sse"))) + (when + url (let - ((name (first attr)) (body (nth attr 1))) - (when - (starts-with? name "sx-on:") + ((source (event-source-connect url el)) + (event-name (parse-sse-swap el))) + (event-source-listen + source + event-name + (fn ((data :as string)) (bind-sse-swap el data)))))))) + (define + bind-sse-swap + :effects (mutation io) + (fn + (el (data :as string)) + (let + ((target (resolve-target el)) + (swap-spec + (parse-swap-spec + (dom-get-attr el "sx-swap") + (dom-has-class? (dom-body) "sx-transitions"))) + (swap-style (get swap-spec "style")) + (use-transition (get swap-spec "transition")) + (trimmed (trim data))) + (when + (not (empty? trimmed)) + (dispose-islands-in target) + (if + (starts-with? trimmed "(") + (let + ((rendered (sx-render trimmed)) + (container (dom-create-element "div" nil))) + (dom-append container rendered) + (with-transition + use-transition + (fn + () + (swap-dom-nodes + target + (children-to-fragment container) + swap-style) + (post-swap target)))) + (with-transition + use-transition + (fn + () + (swap-html-string target trimmed swap-style) + (post-swap target)))))))) + (define + bind-inline-handlers + :effects (mutation io) + (fn + (root) + (for-each + (fn + (el) + (for-each + (fn + ((attr :as list)) (let - ((event-name (let ((raw (slice name 6))) (if (or (starts-with? raw "after") (starts-with? raw "before")) (str "sx:" raw) raw)))) + ((name (first attr)) (body (nth attr 1))) (when - (not (is-processed? el (str "on:" event-name))) - (mark-processed! el (str "on:" event-name)) + (starts-with? name "sx-on:") + (let + ((event-name (let ((raw (slice name 6))) (if (or (starts-with? raw "after") (starts-with? raw "before")) (str "sx:" raw) raw)))) + (when + (not (is-processed? el (str "on:" event-name))) + (mark-processed! el (str "on:" event-name)) + (dom-on + el + event-name + (if + (contains? body ".") + (fn + (e) + (host-call + (host-call + (dom-window) + "Function" + "event" + body) + "call" + el + e)) + (let + ((exprs (parse body))) + (fn + (e) + (let + ((handler-env (make-env))) + (env-bind! handler-env "event" e) + (env-bind! handler-env "this" el) + (env-bind! + handler-env + "detail" + (event-detail e)) + (for-each + (fn (expr) (eval-expr expr handler-env)) + exprs))))))))))) + (dom-attr-list el))) + (dom-query-all (or root (dom-body)) "[sx-on\\:]")))) + (define + bind-preload-for + :effects (mutation io) + (fn + (el) + (let + ((preload-attr (dom-get-attr el "sx-preload"))) + (when + preload-attr + (let + ((events (if (= preload-attr "mousedown") (list "mousedown" "touchstart") (list "mouseover"))) + (debounce-ms (if (= preload-attr "mousedown") 0 100))) + (bind-preload + el + events + debounce-ms + (fn + () + (let + ((info (get-verb-info el))) + (when + info + (do-preload + (get info "url") + (build-request-headers el (loaded-component-names)))))))))))) + (define + do-preload + :effects (mutation io) + (fn + ((url :as string) (headers :as dict)) + (when + (nil? (preload-cache-get _preload-cache url)) + (fetch-preload url headers _preload-cache)))) + (define + VERB_SELECTOR + (str "[sx-get],[sx-post],[sx-put],[sx-delete],[sx-patch]")) + (define + process-elements + :effects (mutation io) + (fn + (root) + (let + ((els (dom-query-all (or root (dom-body)) VERB_SELECTOR))) + (for-each + (fn + (el) + (when + (not (is-processed? el "verb")) + (process-one el) + (mark-processed! el "verb"))) + els)) + (process-boosted root) + (process-sse root) + (bind-inline-handlers root) + (process-emit-elements root))) + (define + process-one + :effects (mutation io) + (fn + (el) + (let + ((verb-info (get-verb-info el))) + (when + verb-info + (when + (not (dom-has-attr? el "sx-disable")) + (do (bind-triggers el verb-info) (bind-preload-for el)) + (bind-preload-for el)))))) + (define + process-emit-elements + :effects (mutation io) + (fn + (root) + (let + ((els (dom-query-all (or root (dom-body)) "[data-sx-emit]"))) + (for-each + (fn + (el) + (when + (not (is-processed? el "emit")) + (mark-processed! el "emit") + (let + ((event-name (dom-get-attr el "data-sx-emit"))) + (when + event-name (dom-on el - event-name - (if - (contains? body ".") - (fn - (e) - (host-call - (host-call (dom-window) "Function" "event" body) - "call" - el - e)) + "click" + (fn + (e) (let - ((exprs (parse body))) - (fn - (e) - (let - ((handler-env (make-env))) - (env-bind! handler-env "event" e) - (env-bind! handler-env "this" el) - (env-bind! - handler-env - "detail" - (event-detail e)) - (for-each - (fn (expr) (eval-expr expr handler-env)) - exprs))))))))))) - (dom-attr-list el))) - (dom-query-all (or root (dom-body)) "[sx-on\\:]")))) - -(define - bind-preload-for - :effects (mutation io) - (fn - (el) - (let - ((preload-attr (dom-get-attr el "sx-preload"))) - (when - preload-attr + ((detail-json (dom-get-attr el "data-sx-emit-detail")) + (detail + (if + detail-json + (json-parse detail-json) + (dict)))) + (dom-dispatch el event-name detail)))))))) + els)))) + (define + save-scroll-position + :effects (io) + (fn + () (let - ((events (if (= preload-attr "mousedown") (list "mousedown" "touchstart") (list "mouseover"))) - (debounce-ms (if (= preload-attr "mousedown") 0 100))) - (bind-preload - el - events - debounce-ms - (fn - () - (let - ((info (get-verb-info el))) - (when - info - (do-preload - (get info "url") - (build-request-headers el (loaded-component-names)))))))))))) - -(define - do-preload - :effects (mutation io) - (fn - ((url :as string) (headers :as dict)) - (when - (nil? (preload-cache-get _preload-cache url)) - (fetch-preload url headers _preload-cache)))) - -(define - VERB_SELECTOR - (str "[sx-get],[sx-post],[sx-put],[sx-delete],[sx-patch]")) - -(define - process-elements - :effects (mutation io) - (fn - (root) - (let - ((els (dom-query-all (or root (dom-body)) VERB_SELECTOR))) - (for-each - (fn - (el) - (when - (not (is-processed? el "verb")) - (process-one el) - (mark-processed! el "verb"))) - els)) - (process-boosted root) - (process-sse root) - (bind-inline-handlers root) - (process-emit-elements root))) - -(define - process-one - :effects (mutation io) - (fn - (el) - (let - ((verb-info (get-verb-info el))) - (when - verb-info - (when - (not (dom-has-attr? el "sx-disable")) - (do (bind-triggers el verb-info) (bind-preload-for el)) - (bind-preload-for el)))))) - -(define - process-emit-elements - :effects (mutation io) - (fn - (root) - (let - ((els (dom-query-all (or root (dom-body)) "[data-sx-emit]"))) - (for-each - (fn - (el) - (when - (not (is-processed? el "emit")) - (mark-processed! el "emit") - (let - ((event-name (dom-get-attr el "data-sx-emit"))) - (when - event-name - (dom-on - el - "click" - (fn - (e) - (let - ((detail-json (dom-get-attr el "data-sx-emit-detail")) - (detail - (if detail-json (json-parse detail-json) (dict)))) - (dom-dispatch el event-name detail)))))))) - els)))) - -(define - save-scroll-position - :effects (io) - (fn - () - (let - ((scrollY (host-get (dom-window) "scrollY"))) - (browser-replace-state - (dict "scrollY" scrollY) - "" - (browser-location-href))))) - -(define - handle-popstate - :effects (mutation io) - (fn - (scrollY) - (let - ((url (browser-location-href)) - (boost-el (dom-query "[sx-boost]")) - (target-sel - (if - boost-el - (let - ((attr (dom-get-attr boost-el "sx-boost"))) - (if (and attr (not (= attr "true"))) attr "#sx-content")) - "#sx-content")) - (target (dom-query target-sel)) - (pathname (url-pathname url))) - (when - target + ((scrollY (host-get (dom-window) "scrollY"))) + (browser-replace-state + (dict "scrollY" scrollY) + "" + (browser-location-href))))) + (define + handle-popstate + :effects (mutation io) + (fn + (scrollY) (let - ((headers (dict "SX-Request" "true"))) - (fetch-and-restore target url headers scrollY)))))) - -(define - engine-init - :effects (mutation io) - (fn - () - (do (sx-process-scripts nil) (sx-hydrate nil) (process-elements nil)))) - - -)) ;; end define-library + ((url (browser-location-href)) + (boost-el (dom-query "[sx-boost]")) + (target-sel + (if + boost-el + (let + ((attr (dom-get-attr boost-el "sx-boost"))) + (if (and attr (not (= attr "true"))) attr "#sx-content")) + "#sx-content")) + (target (dom-query target-sel)) + (pathname (url-pathname url))) + (when + target + (let + ((headers (dict "SX-Request" "true"))) + (fetch-and-restore target url headers scrollY)))))) + (define + engine-init + :effects (mutation io) + (fn + () + (do + (sx-process-scripts nil) + (sx-hydrate nil) + (process-elements nil)))))) ;; end define-library ;; Re-export to global namespace for backward compatibility (import (web orchestration)) diff --git a/shared/static/wasm/sx/orchestration.sxbc b/shared/static/wasm/sx/orchestration.sxbc index 809f09c9..7f355785 100644 --- a/shared/static/wasm/sx/orchestration.sxbc +++ b/shared/static/wasm/sx/orchestration.sxbc @@ -1,3 +1,3 @@ -(sxbc 1 "7456ec353c908476" +(sxbc 1 "40c2f6350d94a6ef" (code - :constants ({:library (web boot-helpers) :op "import"} {:library (sx dom) :op "import"} {:library (sx browser) :op "import"} {:library (web adapter-dom) :op "import"} {:library (web engine) :op "import"} "_preload-cache" "dict" "dispatch-trigger-events" {:upvalue-count 0 :arity 2 :constants ("try-parse-json" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-dispatch" "get") :bytecode (20 0 0 18 0 16 0 18 1 16 0 52 1 0 2 49 3 50)} "keys" {:upvalue-count 1 :arity 1 :constants ("trim" "not" "empty?" "dom-dispatch" "dict") :bytecode (16 0 52 0 0 1 17 1 16 1 52 2 0 1 52 1 0 1 33 16 0 20 3 0 18 0 16 1 52 4 0 0 49 3 32 1 0 2 50)} "split" ",") :bytecode (16 1 33 55 0 20 0 0 16 1 48 1 17 2 16 2 33 20 0 51 2 0 1 0 1 2 16 2 52 3 0 1 52 1 0 2 32 18 0 51 4 0 1 0 16 1 1 6 0 52 5 0 2 52 1 0 2 32 1 0 2 50)} "execute-request" {:upvalue-count 0 :arity 3 :constants ("get-verb-info" "nil?" "promise-resolve" "get" "method" "url" "dom-get-attr" "sx-media" "not" "browser-media-matches?" "sx-confirm" "browser-confirm" "sx-prompt" "browser-prompt" "validate-for-request" "do-fetch" "assoc" "dict" "SX-Prompt") :bytecode (20 0 0 16 0 48 1 6 34 3 0 5 16 1 17 3 16 3 52 1 0 1 33 9 0 20 2 0 2 49 1 32 249 0 16 3 1 4 0 52 3 0 2 17 4 16 3 1 5 0 52 3 0 2 17 5 20 6 0 16 0 1 7 0 48 2 17 6 16 6 6 33 12 0 5 20 9 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 185 0 20 6 0 16 0 1 10 0 48 2 17 6 16 6 6 33 12 0 5 20 11 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 143 0 20 6 0 16 0 1 12 0 48 2 17 6 16 6 33 10 0 20 13 0 16 6 48 1 32 1 0 2 17 7 16 6 6 33 7 0 5 16 7 52 1 0 1 33 9 0 20 2 0 2 49 1 32 88 0 16 4 52 1 0 1 6 34 23 0 5 16 5 52 1 0 1 6 34 12 0 5 20 14 0 16 0 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 43 0 20 15 0 16 0 16 4 16 4 16 5 16 7 33 23 0 16 2 6 34 5 0 5 52 17 0 0 1 18 0 16 7 52 16 0 3 32 2 0 16 2 49 5 50)} "do-fetch" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-sync" "=" "replace" "abort-previous" "resolve-target" "not" "identical?" "abort-previous-target" "new-abort-controller" "track-controller" "track-controller-target" "build-request-body" "get" "url" "body" "content-type" "build-request-headers" "loaded-component-names" "csrf-token" "for-each" {:upvalue-count 2 :arity 1 :constants ("dict-set!" "get") :bytecode (18 0 16 0 18 1 16 0 52 1 0 2 52 0 0 3 50)} "keys" "dict-set!" "Content-Type" "X-CSRFToken" "preload-cache-get" "_preload-cache" "apply-optimistic" "show-indicator" "disable-elements" "dom-add-class" "sx-request" "dom-set-attr" "aria-busy" "true" "dom-dispatch" "sx:beforeRequest" "dict" "method" "fetch-request" "headers" "signal" "controller-signal" "cross-origin" "cross-origin?" "preloaded" {:upvalue-count 8 :arity 4 :constants ("clear-loading-state" "revert-optimistic" "not" "dom-dispatch" "sx:responseError" "dict" "status" "text" ">" "len" 0 "handle-fetch-success" "handle-retry" "sx:afterRequest") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 16 0 52 2 0 1 33 86 0 20 3 0 18 0 1 4 0 1 6 0 16 1 1 7 0 16 3 52 5 0 4 48 3 5 16 3 6 33 14 0 5 16 3 52 9 0 1 1 10 0 52 8 0 2 33 20 0 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 32 15 0 20 12 0 18 0 18 5 18 7 18 4 18 6 49 5 32 37 0 20 3 0 18 0 1 13 0 1 6 0 16 1 52 5 0 2 48 3 5 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 50)} {:upvalue-count 6 :arity 1 :constants ("clear-loading-state" "revert-optimistic" "not" "abort-error?" "log-warn" "str" "sx:fetch error " " " " — " "dom-dispatch" "sx:requestError" "dict" "error") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 20 3 0 16 0 48 1 52 2 0 1 33 47 0 20 4 0 1 6 0 18 4 1 7 0 18 5 1 8 0 16 0 52 5 0 6 48 1 5 20 9 0 18 0 1 10 0 1 12 0 16 0 52 11 0 2 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 16 5 1 3 0 52 2 0 2 33 10 0 20 4 0 16 0 48 1 32 1 0 2 5 20 5 0 16 0 48 1 17 6 16 6 6 33 13 0 5 16 0 16 6 52 7 0 2 52 6 0 1 33 10 0 20 8 0 16 6 48 1 32 1 0 2 5 20 9 0 48 0 17 6 20 10 0 16 0 16 6 48 2 5 20 5 0 16 0 48 1 17 7 16 7 33 12 0 20 11 0 16 7 16 6 48 2 32 1 0 2 5 20 12 0 16 0 16 2 16 3 48 3 17 7 16 7 1 14 0 52 13 0 2 17 8 16 7 1 15 0 52 13 0 2 17 9 16 7 1 16 0 52 13 0 2 17 10 20 17 0 16 0 20 18 0 48 0 48 2 17 11 20 19 0 48 0 17 12 16 4 33 20 0 51 21 0 1 11 1 4 16 4 52 22 0 1 52 20 0 2 32 1 0 2 5 16 10 33 14 0 16 11 1 24 0 16 10 52 23 0 3 32 1 0 2 5 16 12 33 14 0 16 11 1 25 0 16 12 52 23 0 3 32 1 0 2 5 20 26 0 20 27 0 16 8 48 2 17 13 20 28 0 16 0 48 1 17 14 20 29 0 16 0 48 1 17 15 20 30 0 16 0 48 1 17 16 20 31 0 16 0 1 32 0 48 2 5 20 33 0 16 0 1 34 0 1 35 0 48 3 5 20 36 0 16 0 1 37 0 1 14 0 16 8 1 39 0 16 2 52 38 0 4 48 3 5 20 40 0 1 14 0 16 8 1 39 0 16 2 1 41 0 16 11 1 15 0 16 9 1 42 0 20 43 0 16 6 48 1 1 44 0 20 45 0 16 8 48 1 1 46 0 16 13 52 38 0 14 51 47 0 1 0 1 15 1 16 1 14 1 8 1 1 1 4 1 2 51 48 0 1 0 1 15 1 16 1 14 1 2 1 8 49 3 50)} "handle-fetch-success" {:upvalue-count 0 :arity 6 :constants ("process-response-headers" "dispatch-trigger-events" "get" "trigger" "process-cache-directives" "redirect" "browser-navigate" "refresh" "browser-reload" "location" "fetch-location" "retarget" "dom-query" "resolve-target" "parse-swap-spec" "reswap" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "style" "transition" "content-type" "" "contains?" "text/sx" "handle-sx-response" "handle-html-response" "trigger-swap" "handle-history" "set-timeout" {:upvalue-count 2 :arity 0 :constants ("get" "trigger-settle" "dispatch-trigger-events" "process-settle-hooks") :bytecode (18 0 1 1 0 52 0 0 2 33 19 0 20 2 0 18 1 18 0 1 1 0 52 0 0 2 48 2 32 1 0 2 5 20 3 0 18 1 49 1 50)} 20 "dom-dispatch" "sx:afterSwap" "dict" "target" "swap") :bytecode (20 0 0 16 4 48 1 17 6 20 1 0 16 0 16 6 1 3 0 52 2 0 2 48 2 5 20 4 0 16 0 16 6 16 5 48 3 5 16 6 1 5 0 52 2 0 2 33 17 0 20 6 0 16 6 1 5 0 52 2 0 2 49 1 32 31 1 16 6 1 7 0 52 2 0 2 33 8 0 20 8 0 49 0 32 11 1 16 6 1 9 0 52 2 0 2 33 17 0 20 10 0 16 6 1 9 0 52 2 0 2 49 1 32 238 0 16 6 1 11 0 52 2 0 2 33 17 0 20 12 0 16 6 1 11 0 52 2 0 2 48 1 32 7 0 20 13 0 16 0 48 1 17 7 20 14 0 16 6 1 15 0 52 2 0 2 6 34 11 0 5 20 16 0 16 0 1 17 0 48 2 20 18 0 20 19 0 48 0 1 20 0 48 2 48 2 17 8 16 8 1 21 0 52 2 0 2 17 9 16 8 1 22 0 52 2 0 2 17 10 16 6 1 23 0 52 2 0 2 6 34 4 0 5 1 24 0 17 11 16 11 1 26 0 52 25 0 2 33 18 0 20 27 0 16 0 16 7 16 5 16 9 16 10 48 5 32 15 0 20 28 0 16 0 16 7 16 5 16 9 16 10 48 5 5 20 1 0 16 0 16 6 1 29 0 52 2 0 2 48 2 5 20 30 0 16 0 16 1 16 6 48 3 5 20 31 0 51 32 0 1 6 1 0 1 33 0 48 2 5 20 34 0 16 0 1 35 0 1 37 0 16 7 1 38 0 16 9 52 36 0 4 49 3 50)} "flush-collected-styles" {:upvalue-count 0 :arity 0 :constants ("collected" "cssx" "not" "empty?" "clear-collected!" "dom-create-element" "style" "dom-set-attr" "data-sx-css" "true" "dom-set-prop" "textContent" "join" "" "dom-append-to-head") :bytecode (1 1 0 52 0 0 1 17 0 16 0 52 3 0 1 52 2 0 1 33 63 0 1 1 0 52 4 0 1 5 20 5 0 1 6 0 2 48 2 17 1 20 7 0 16 1 1 8 0 1 9 0 48 3 5 20 10 0 16 1 1 11 0 1 13 0 16 0 52 12 0 2 48 3 5 20 14 0 16 1 49 1 32 1 0 2 50)} "handle-sx-response" {:upvalue-count 0 :arity 5 :constants ("strip-component-scripts" "extract-response-css" "trim" "not" "empty?" "sx-render" "dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "hoist-head-elements" "dom-get-attr" "sx-select" "select-from-container" "children-to-fragment" "dispose-islands-in" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "post-swap" "=" "outerHTML" "dom-parent") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 18 2 1 3 0 52 2 0 2 33 17 0 20 4 0 16 0 6 34 3 0 5 18 0 48 1 32 9 0 16 0 6 34 3 0 5 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 20 1 0 16 5 48 1 17 6 16 6 52 2 0 1 17 7 16 7 52 4 0 1 52 3 0 1 33 114 0 20 5 0 16 7 48 1 17 8 20 6 0 1 7 0 2 48 2 17 9 20 8 0 16 9 16 8 48 2 5 20 9 0 16 9 51 10 0 48 2 5 20 11 0 16 9 48 1 5 20 12 0 16 0 1 13 0 48 2 17 10 16 10 33 12 0 20 14 0 16 9 16 10 48 2 32 7 0 20 15 0 16 9 48 1 17 11 20 16 0 16 1 48 1 5 20 17 0 16 4 51 18 0 1 1 1 11 1 3 49 2 32 1 0 2 50)} "handle-html-response" {:upvalue-count 0 :arity 5 :constants ("dom-parse-html-document" "dom-get-attr" "sx-select" "dispose-islands-in" "dom-create-element" "div" "dom-set-inner-html" "dom-body-inner-html" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 1 16 2 48 3 5 20 2 0 16 0 49 1 50)} "hoist-head-elements" "select-from-container" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "log-info" "str" "swap-root: " "dom-tag-name" "nil" " target: " "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 1 3 0 16 0 33 10 0 20 4 0 16 0 48 1 32 3 0 1 5 0 1 6 0 20 4 0 18 0 48 1 52 2 0 4 48 1 5 20 7 0 16 0 6 34 3 0 5 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 16 5 33 164 0 20 1 0 16 0 1 2 0 48 2 17 6 20 3 0 16 1 48 1 5 16 6 33 75 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 11 0 16 7 16 6 48 2 17 8 20 12 0 16 4 51 13 0 1 1 1 8 1 3 49 2 32 61 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 12 0 16 4 51 14 0 1 1 1 7 1 3 49 2 32 1 0 2 50)} "handle-retry" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-retry" "parse-retry-spec" "data-sx-retry-ms" "get" "start-ms" "parse-int" "dom-set-attr" "str" "next-retry-ms" "cap-ms" "set-timeout" {:upvalue-count 5 :arity 0 :constants ("do-fetch") :bytecode (20 0 0 18 0 18 1 18 2 18 3 18 4 49 5 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 20 2 0 16 5 48 1 17 6 16 6 33 97 0 20 0 0 16 0 1 3 0 48 2 6 34 10 0 5 16 6 1 5 0 52 4 0 2 17 7 16 7 16 6 1 5 0 52 4 0 2 52 6 0 2 17 8 20 7 0 16 0 1 3 0 20 9 0 16 8 16 6 1 10 0 52 4 0 2 48 2 52 8 0 1 48 3 5 20 11 0 51 12 0 1 0 1 1 1 2 1 3 1 4 16 8 49 2 32 1 0 2 50)} "bind-triggers" {:upvalue-count 0 :arity 2 :constants ("parse-trigger-spec" "dom-get-attr" "sx-trigger" "default-trigger" "dom-tag-name" "for-each" {:upvalue-count 2 :arity 1 :constants ("classify-trigger" "get" "modifiers" "=" "poll" "set-interval" {:upvalue-count 2 :arity 0 :constants ("host-get" "isConnected" "execute-request" "clear-interval" "log-info" "poll stopped: element removed") :bytecode (20 0 0 18 0 1 1 0 48 2 33 12 0 20 2 0 18 0 2 2 49 3 32 16 0 20 3 0 18 1 48 1 5 20 4 0 1 5 0 49 1 50)} "interval" "intersect" "observe-intersection" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "delay" "load" "set-timeout" 0 "revealed" "event" "bind-event") :bytecode (20 0 0 16 0 48 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 29 0 2 17 3 20 5 0 51 6 0 0 0 1 3 16 2 1 7 0 52 1 0 2 48 2 17 3 32 152 0 16 1 1 8 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 3 16 2 1 11 0 52 1 0 2 49 4 32 115 0 16 1 1 12 0 52 3 0 2 33 30 0 20 13 0 51 10 0 0 0 16 2 1 11 0 52 1 0 2 6 34 4 0 5 1 14 0 49 2 32 73 0 16 1 1 15 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 4 16 2 1 11 0 52 1 0 2 49 4 32 36 0 16 1 1 16 0 52 3 0 2 33 23 0 20 17 0 18 0 16 0 1 16 0 52 1 0 2 16 2 18 1 49 4 32 1 0 2 50)}) :bytecode (20 0 0 20 1 0 16 0 1 2 0 48 2 48 1 6 34 13 0 5 20 3 0 20 4 0 16 0 48 1 48 1 17 2 51 6 0 1 0 1 1 16 2 52 5 0 2 50)} "bind-event" {:upvalue-count 0 :arity 4 :constants ("get" "from" "nil?" "=" "body" "dom-body" "document" "dom-document" "window" "dom-window" "dom-query" "dom-add-listener" {:upvalue-count 5 :arity 1 :constants ("get" "filter" "index-of" "key=='" ">=" 0 "slice" "+" 5 6 "=" "host-get" "key" "not" "dom-matches?" "target" "input,textarea,select" "changed" "element-value" "click" "event-modifier-key?" "submit" "dom-has-attr?" "href" "prevent-default" "get-verb-info" "method" "GET" "delay" "try-client-route" "url-pathname" "url" "dom-get-attr" "sx-target" "save-scroll-position" "browser-push-state" "browser-scroll-to" "log-info" "str" "sx:route server fetch " "clear-timeout" "set-timeout" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "execute-request") :bytecode (18 0 1 1 0 52 0 0 2 33 110 0 18 0 1 1 0 52 0 0 2 17 2 16 2 1 3 0 52 2 0 2 17 3 16 3 1 5 0 52 4 0 2 33 72 0 16 2 16 3 1 8 0 52 7 0 2 16 3 1 9 0 52 7 0 2 52 6 0 3 17 4 20 11 0 16 0 1 12 0 48 2 16 4 52 10 0 2 6 33 23 0 5 20 14 0 20 11 0 16 0 1 15 0 48 2 1 16 0 48 2 52 13 0 1 32 1 0 3 32 1 0 3 17 1 18 0 1 17 0 52 0 0 2 33 29 0 20 18 0 17 2 16 2 18 1 52 10 0 2 33 6 0 4 17 1 32 4 0 16 2 19 1 32 1 0 2 5 16 1 6 33 26 0 5 18 2 1 19 0 52 10 0 2 6 33 8 0 5 20 20 0 16 0 48 1 52 13 0 1 33 42 1 18 2 1 21 0 52 10 0 2 6 34 25 0 5 18 2 1 19 0 52 10 0 2 6 33 11 0 5 20 22 0 18 3 1 23 0 48 2 33 10 0 20 24 0 16 0 48 1 32 1 0 2 5 20 25 0 18 3 48 1 17 2 18 2 1 19 0 52 10 0 2 6 33 50 0 5 16 2 1 26 0 52 0 0 2 1 27 0 52 10 0 2 6 33 29 0 5 20 22 0 18 3 1 23 0 48 2 6 33 14 0 5 18 0 1 28 0 52 0 0 2 52 13 0 1 17 3 4 17 4 16 3 33 34 0 20 29 0 20 30 0 16 2 1 31 0 52 0 0 2 48 1 20 32 0 18 3 1 33 0 48 2 48 2 17 4 32 1 0 2 5 16 4 33 35 0 20 34 0 48 0 5 20 35 0 16 2 1 31 0 52 0 0 2 48 1 5 20 36 0 1 5 0 1 5 0 49 2 32 84 0 16 3 33 24 0 20 37 0 1 39 0 16 2 1 31 0 52 0 0 2 52 38 0 2 48 1 32 1 0 2 5 18 0 1 28 0 52 0 0 2 33 32 0 20 40 0 18 4 48 1 5 20 41 0 51 42 0 0 3 18 0 1 28 0 52 0 0 2 48 2 19 4 32 9 0 20 43 0 18 3 2 2 49 3 32 1 0 2 50)} "once" "dict") :bytecode (2 17 4 2 17 5 16 2 1 1 0 52 0 0 2 17 7 16 7 52 2 0 1 33 5 0 16 0 32 67 0 16 7 1 4 0 52 3 0 2 33 8 0 20 5 0 48 0 32 47 0 16 7 1 6 0 52 3 0 2 33 8 0 20 7 0 48 0 32 27 0 16 7 1 8 0 52 3 0 2 33 8 0 20 9 0 48 0 32 7 0 20 10 0 16 7 48 1 17 6 16 6 33 49 0 20 11 0 16 6 16 1 51 12 0 1 2 1 5 1 1 1 0 1 4 16 2 1 13 0 52 0 0 2 33 11 0 1 13 0 3 52 14 0 2 32 1 0 2 49 4 32 1 0 2 50)} "post-swap" {:upvalue-count 0 :arity 1 :constants ("log-info" "str" "post-swap: root=" "dom-tag-name" "nil" "activate-scripts" "sx-process-scripts" "sx-hydrate" "sx-hydrate-islands" "run-post-render-hooks" "flush-collected-styles" "process-elements") :bytecode (20 0 0 1 2 0 16 0 33 10 0 20 3 0 16 0 48 1 32 3 0 1 4 0 52 1 0 2 48 1 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 48 1 5 20 9 0 48 0 5 20 10 0 48 0 5 20 11 0 16 0 49 1 50)} "process-settle-hooks" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-on-settle" "not" "empty?" "sx-parse" "for-each" {:upvalue-count 0 :arity 1 :constants ("cek-eval") :bytecode (20 0 0 16 0 49 1 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 6 33 11 0 5 16 1 52 3 0 1 52 2 0 1 33 21 0 20 4 0 16 1 48 1 17 2 51 6 0 16 2 52 5 0 2 32 1 0 2 50)} "activate-scripts" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "script" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "dom-has-attr?" "data-components" "data-sx-activated" "create-script-clone" "dom-set-attr" "true" "dom-replace-child" "dom-parent") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 15 0 5 20 1 0 16 0 1 3 0 48 2 52 0 0 1 33 42 0 20 4 0 16 0 48 1 17 1 20 5 0 16 1 1 3 0 1 6 0 48 3 5 20 7 0 20 8 0 16 0 48 1 16 1 16 0 49 3 32 1 0 2 50)}) :bytecode (16 0 33 24 0 20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 16 1 52 2 0 2 32 1 0 2 50)} "process-oob-swaps" {:upvalue-count 0 :arity 2 :constants ("find-oob-swaps" "for-each" {:upvalue-count 1 :arity 1 :constants ("get" "target-id" "dom-query-by-id" "element" "swap-type" "dom-parent" "dom-remove-child") :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 16 1 48 1 17 2 16 0 1 3 0 52 0 0 2 17 3 16 0 1 4 0 52 0 0 2 17 4 20 5 0 16 3 48 1 33 17 0 20 6 0 20 5 0 16 3 48 1 16 3 48 2 32 1 0 2 5 16 2 33 13 0 18 0 16 2 16 3 16 4 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 48 1 17 2 51 2 0 1 1 16 2 52 1 0 2 50)} "hoist-head-elements" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("dom-parent" "dom-remove-child" "dom-append-to-head") :bytecode (20 0 0 16 0 48 1 33 17 0 20 1 0 20 0 0 16 0 48 1 16 0 48 2 32 1 0 2 5 20 2 0 16 0 49 1 50)} "dom-query-all" "style[data-sx-css]" "link[rel=\"stylesheet\"]") :bytecode (51 1 0 20 2 0 16 0 1 3 0 48 2 52 0 0 2 5 51 1 0 20 2 0 16 0 1 4 0 48 2 52 0 0 2 50)} "process-boosted" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("boost-descendants") :bytecode (20 0 0 16 0 49 1 50)} "dom-query-all" "dom-body" "[sx-boost]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "boost-descendants" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-boost" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-link?" "mark-processed!" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "sx-push-url" "bind-client-route-link" "dom-get-attr" "href") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 160 0 20 4 0 16 0 1 2 0 48 2 5 20 5 0 16 0 1 6 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 8 0 52 7 0 2 52 0 0 1 33 15 0 20 9 0 16 0 1 6 0 18 0 48 3 32 1 0 2 5 20 5 0 16 0 1 10 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 10 0 1 11 0 48 3 32 1 0 2 5 20 5 0 16 0 1 12 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 12 0 1 8 0 48 3 32 1 0 2 5 20 13 0 16 0 20 14 0 16 0 1 15 0 48 2 49 2 32 1 0 2 50)} "dom-query-all" "a[href]" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-form?" "mark-processed!" "upper" "dom-get-attr" "method" "GET" "action" "browser-location-href" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "bind-boost-form") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 165 0 20 4 0 16 0 1 2 0 48 2 5 20 6 0 16 0 1 7 0 48 2 6 34 4 0 5 1 8 0 52 5 0 1 17 1 20 6 0 16 0 1 9 0 48 2 6 34 6 0 5 20 10 0 48 0 17 2 20 11 0 16 0 1 12 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 14 0 52 13 0 2 52 0 0 1 33 15 0 20 15 0 16 0 1 12 0 18 0 48 3 32 1 0 2 5 20 11 0 16 0 1 16 0 48 2 52 0 0 1 33 16 0 20 15 0 16 0 1 16 0 1 17 0 48 3 32 1 0 2 5 20 18 0 16 0 16 1 16 2 49 3 32 1 0 2 50)} "form") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 1 1 20 4 0 16 0 1 5 0 48 2 52 2 0 2 5 51 6 0 1 1 20 4 0 16 0 1 7 0 48 2 52 2 0 2 50)} "_page-data-cache" "_page-data-cache-ttl" 30000 "page-data-cache-key" {:upvalue-count 0 :arity 2 :constants ("nil?" "empty?" "keys" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("append!" "str" "=" "get") :bytecode (18 0 16 0 1 2 0 18 1 16 0 52 3 0 2 52 1 0 3 52 0 0 2 50)} "str" ":" "join" "&") :bytecode (16 0 17 2 16 1 52 0 0 1 6 34 11 0 5 16 1 52 2 0 1 52 1 0 1 33 5 0 16 2 32 42 0 52 3 0 0 17 3 51 5 0 1 3 1 1 16 1 52 2 0 1 52 4 0 2 5 16 2 1 7 0 1 9 0 16 3 52 8 0 2 52 6 0 3 50)} "page-data-cache-get" {:upvalue-count 0 :arity 1 :constants ("get" "_page-data-cache" "nil?" ">" "-" "now-ms" "ts" "_page-data-cache-ttl" "dict-set!" "data") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 33 4 0 2 32 52 0 20 5 0 48 0 16 1 1 6 0 52 0 0 2 52 4 0 2 20 7 0 52 3 0 2 33 15 0 20 1 0 16 0 2 52 8 0 3 5 2 32 9 0 16 1 1 9 0 52 0 0 2 50)} "page-data-cache-set" {:upvalue-count 0 :arity 2 :constants ("dict-set!" "_page-data-cache" "data" "ts" "now-ms") :bytecode (20 1 0 16 0 1 2 0 16 1 1 3 0 20 4 0 48 0 65 2 0 52 0 0 3 50)} "invalidate-page-cache" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("=" "starts-with?" "str" ":" "dict-set!" "_page-data-cache") :bytecode (16 0 18 0 52 0 0 2 6 34 16 0 5 16 0 18 0 1 3 0 52 2 0 2 52 1 0 2 33 13 0 20 5 0 16 0 2 52 4 0 3 32 1 0 2 50)} "keys" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "log-info" "str" "sx:cache invalidate ") :bytecode (51 1 0 1 0 20 3 0 52 2 0 1 52 0 0 2 5 20 4 0 1 5 0 1 6 0 1 7 0 16 0 65 2 0 48 1 5 20 8 0 1 10 0 16 0 52 9 0 2 49 1 50)} "invalidate-all-page-cache" {:upvalue-count 0 :arity 0 :constants ("dict" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "*" "log-info" "sx:cache invalidate *") :bytecode (52 0 0 0 21 1 0 5 20 2 0 1 3 0 1 4 0 1 5 0 1 6 0 65 2 0 48 1 5 20 7 0 1 8 0 49 1 50)} "update-page-cache" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-key" "dict" "page-data-cache-set" "log-info" "str" "sx:cache update ") :bytecode (20 0 0 16 0 52 1 0 0 48 2 17 2 20 2 0 16 2 16 1 48 2 5 20 3 0 1 5 0 16 0 52 4 0 2 49 1 50)} "process-cache-directives" {:upvalue-count 0 :arity 3 :constants ("dom-get-attr" "sx-cache-invalidate" "=" "*" "invalidate-all-page-cache" "invalidate-page-cache" "get" "cache-invalidate" "cache-update" "parse-sx-data" "update-page-cache") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 7 0 52 6 0 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 8 0 52 6 0 2 17 3 16 3 33 30 0 20 9 0 16 2 48 1 17 4 16 4 33 12 0 20 10 0 16 3 16 4 49 2 32 1 0 2 32 1 0 2 50)} "_optimistic-snapshots" "optimistic-cache-update" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-get" "dict-set!" "_optimistic-snapshots" "page-data-cache-set") :bytecode (20 0 0 16 0 48 1 17 2 16 2 33 35 0 16 1 16 2 48 1 17 3 20 2 0 16 0 16 2 52 1 0 3 5 20 3 0 16 0 16 3 48 2 5 16 3 32 1 0 2 50)} "optimistic-cache-revert" {:upvalue-count 0 :arity 1 :constants ("get" "_optimistic-snapshots" "page-data-cache-set" "dict-delete!") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 33 25 0 20 2 0 16 0 16 1 48 2 5 20 1 0 16 0 52 3 0 2 5 16 1 32 1 0 2 50)} "optimistic-cache-confirm" {:upvalue-count 0 :arity 1 :constants ("dict-delete!" "_optimistic-snapshots") :bytecode (20 1 0 16 0 52 0 0 2 50)} "submit-mutation" {:upvalue-count 0 :arity 6 :constants ("page-data-cache-key" "optimistic-cache-update" "try-rerender-page" "execute-action" {:upvalue-count 4 :arity 1 :constants ("page-data-cache-set" "optimistic-cache-confirm" "try-rerender-page" "log-info" "str" "sx:optimistic confirmed " "confirmed") :bytecode (16 0 33 12 0 20 0 0 18 0 16 0 48 2 32 1 0 2 5 20 1 0 18 0 48 1 5 16 0 33 14 0 20 2 0 18 1 18 2 16 0 48 3 32 1 0 2 5 20 3 0 1 5 0 18 1 52 4 0 2 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)} {:upvalue-count 4 :arity 1 :constants ("optimistic-cache-revert" "try-rerender-page" "log-warn" "str" "sx:optimistic reverted " ": " "reverted") :bytecode (20 0 0 18 0 48 1 17 1 16 1 33 14 0 20 1 0 18 1 18 2 16 1 48 3 32 1 0 2 5 20 2 0 1 4 0 18 1 1 5 0 16 0 52 3 0 4 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)}) :bytecode (20 0 0 16 0 16 1 48 2 17 6 20 1 0 16 6 16 4 48 2 17 7 16 7 33 14 0 20 2 0 16 0 16 1 16 7 48 3 32 1 0 2 5 20 3 0 16 2 16 3 51 4 0 1 6 1 0 1 1 1 5 51 5 0 1 6 1 0 1 1 1 5 49 4 50)} "_is-online" "_offline-queue" "list" "offline-is-online?" {:upvalue-count 0 :arity 0 :constants ("_is-online") :bytecode (20 0 0 50)} "offline-set-online!" {:upvalue-count 0 :arity 1 :constants ("_is-online") :bytecode (16 0 21 0 0 50)} "offline-queue-mutation" {:upvalue-count 0 :arity 5 :constants ("page-data-cache-key" "dict" "action" "payload" "page" "params" "timestamp" "now-ms" "status" "pending" "append!" "_offline-queue" "optimistic-cache-update" "try-rerender-page" "log-info" "str" "sx:offline queued " " (" "len" " pending)") :bytecode (20 0 0 16 2 16 3 48 2 17 5 1 2 0 16 0 1 3 0 16 1 1 4 0 16 2 1 5 0 16 3 1 6 0 20 7 0 48 0 1 8 0 1 9 0 52 1 0 12 17 6 20 11 0 16 6 52 10 0 2 5 20 12 0 16 5 16 4 48 2 17 7 16 7 33 14 0 20 13 0 16 2 16 3 16 7 48 3 32 1 0 2 5 20 14 0 1 16 0 16 0 1 17 0 20 11 0 52 18 0 1 1 19 0 52 15 0 5 48 1 5 16 6 50)} "offline-sync" {:upvalue-count 0 :arity 0 :constants ("filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue" "not" "empty?" "log-info" "str" "sx:offline syncing " "len" " mutations" "for-each" {:upvalue-count 0 :arity 1 :constants ("execute-action" "get" "action" "payload" {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "synced" "log-info" "str" "sx:offline synced " "get" "action") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 52 4 0 2 49 1 50)} {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "failed" "log-warn" "str" "sx:offline sync failed " "get" "action" ": ") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 1 8 0 16 0 52 4 0 4 49 1 50)}) :bytecode (20 0 0 16 0 1 2 0 52 1 0 2 16 0 1 3 0 52 1 0 2 51 4 0 1 0 51 5 0 1 0 49 4 50)}) :bytecode (51 1 0 20 2 0 52 0 0 2 17 0 16 0 52 4 0 1 52 3 0 1 33 34 0 20 5 0 1 7 0 16 0 52 8 0 1 1 9 0 52 6 0 3 48 1 5 51 11 0 16 0 52 10 0 2 32 1 0 2 50)} "offline-pending-count" {:upvalue-count 0 :arity 0 :constants ("len" "filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue") :bytecode (51 2 0 20 3 0 52 1 0 2 52 0 0 1 50)} "offline-aware-mutation" {:upvalue-count 0 :arity 6 :constants ("_is-online" "submit-mutation" "offline-queue-mutation" "queued") :bytecode (20 0 0 33 20 0 20 1 0 16 0 16 1 16 2 16 3 16 4 16 5 49 6 32 32 0 20 2 0 16 2 16 3 16 0 16 1 16 4 48 5 5 16 5 33 10 0 16 5 1 3 0 49 1 32 1 0 2 50)} "current-page-layout" {:upvalue-count 0 :arity 0 :constants ("url-pathname" "browser-location-href" "find-matching-route" "_page-routes" "nil?" "" "get" "layout") :bytecode (20 0 0 20 1 0 48 0 48 1 17 0 20 2 0 16 0 20 3 0 48 2 17 1 16 1 52 4 0 1 33 6 0 1 5 0 32 17 0 16 1 1 7 0 52 6 0 2 6 34 4 0 5 1 5 0 50)} "swap-rendered-content" {:upvalue-count 0 :arity 3 :constants ("dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "dom-get-attr" "id" "dom-query" "str" "#" "children-to-fragment" "dispose-islands-in" "dom-set-text-content" "" "hoist-head-elements-full" "process-elements" "sx-hydrate-elements" "sx-hydrate-islands" "run-post-render-hooks" "dom-dispatch" "sx:clientRoute" "dict" "pathname" "log-info" "sx:route client ") :bytecode (20 0 0 1 1 0 2 48 2 17 3 20 2 0 16 3 16 1 48 2 5 20 3 0 16 3 51 4 0 48 2 5 20 5 0 16 0 1 6 0 48 2 17 4 16 4 33 19 0 20 7 0 16 3 1 9 0 16 4 52 8 0 2 48 2 32 1 0 2 17 5 16 5 33 10 0 20 10 0 16 5 48 1 32 7 0 20 10 0 16 3 48 1 17 6 20 11 0 16 0 48 1 5 20 12 0 16 0 1 13 0 48 2 5 20 2 0 16 0 16 6 48 2 5 20 14 0 16 0 48 1 5 20 15 0 16 0 48 1 5 20 16 0 16 0 48 1 5 20 17 0 16 0 48 1 5 20 18 0 48 0 5 20 19 0 16 0 1 20 0 1 22 0 16 2 52 21 0 2 48 3 5 20 23 0 1 24 0 16 2 52 8 0 2 49 1 50)} "resolve-route-target" {:upvalue-count 0 :arity 1 :constants ("not" "=" "true" "dom-query") :bytecode (16 0 6 33 14 0 5 16 0 1 2 0 52 1 0 2 52 0 0 1 33 10 0 20 3 0 16 0 49 1 32 1 0 2 50)} "deps-satisfied?" {:upvalue-count 0 :arity 1 :constants ("get" "deps" "loaded-component-names" "nil?" "empty?" "every?" {:upvalue-count 1 :arity 1 :constants ("contains?") :bytecode (18 0 16 0 52 0 0 2 50)}) :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 48 0 17 2 16 1 52 3 0 1 6 34 7 0 5 16 1 52 4 0 1 33 4 0 3 32 11 0 51 6 0 1 2 16 1 52 5 0 2 50)} "try-client-route" {:upvalue-count 0 :arity 2 :constants ("find-matching-route" "_page-routes" "nil?" "log-info" "str" "sx:route no match (" "len" " routes) " "get" "layout" "" "current-page-layout" "not" "=" "sx:route server (layout: " " -> " ") " "content" "closure" "params" "name" "empty?" "log-warn" "sx:route no content for " "resolve-route-target" "sx:route target not found: " "deps-satisfied?" "sx:route deps miss for " "io-deps" "render-plan" "server" "list" "client" "sx:route plan " " — " " server, " " client" "register-io-deps" "stream" "sx:route streaming " "fetch-streaming" "build-request-headers" "loaded-component-names" "has-data" "page-data-cache-key" "page-data-cache-get" "merge" "sx:route client+cache+async " "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route cache+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 45 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 48 2 1 8 0 49 4 32 11 0 20 9 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "sx:route cached eval failed for " "sx:route client+cache " "swap-rendered-content" "sx:route client+data " "resolve-page-data" {:upvalue-count 7 :arity 1 :constants ("page-data-cache-set" "merge" "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route data+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 45 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 48 2 1 8 0 49 4 32 11 0 20 9 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "nil?" "log-warn" "str" "sx:route data eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (20 0 0 18 0 16 0 48 2 5 18 1 18 2 16 0 52 1 0 3 17 1 18 3 33 19 0 20 2 0 18 4 16 1 51 3 0 0 5 0 6 49 3 32 76 0 20 4 0 18 4 16 1 48 2 17 2 16 2 52 5 0 1 33 45 0 20 6 0 1 8 0 18 5 1 9 0 52 7 0 3 48 1 5 20 10 0 18 6 18 5 20 11 0 18 6 20 12 0 48 0 48 2 1 13 0 49 4 32 11 0 20 14 0 18 6 16 2 18 5 49 3 50)} "sx:route client+async " {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 45 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 48 2 1 8 0 49 4 32 11 0 20 9 0 18 1 16 0 18 0 49 3 50)} "sx:route server (eval failed) ") :bytecode (20 0 0 16 0 20 1 0 48 2 17 2 16 2 52 2 0 1 33 29 0 20 3 0 1 5 0 20 1 0 52 6 0 1 1 7 0 16 0 52 4 0 4 48 1 5 4 32 230 2 16 2 1 9 0 52 8 0 2 6 34 4 0 5 1 10 0 17 3 20 11 0 48 0 17 4 16 3 16 4 52 13 0 2 52 12 0 1 33 29 0 20 3 0 1 14 0 16 4 1 15 0 16 3 1 16 0 16 0 52 4 0 6 48 1 5 4 32 160 2 16 2 1 17 0 52 8 0 2 17 5 16 2 1 18 0 52 8 0 2 6 34 4 0 5 65 0 0 17 6 16 2 1 19 0 52 8 0 2 17 7 16 2 1 20 0 52 8 0 2 17 8 16 5 52 2 0 1 6 34 7 0 5 16 5 52 21 0 1 33 19 0 20 22 0 1 23 0 16 0 52 4 0 2 48 1 5 4 32 69 2 20 24 0 16 1 48 1 17 9 16 9 52 2 0 1 33 19 0 20 22 0 1 25 0 16 1 52 4 0 2 48 1 5 4 32 32 2 20 26 0 16 2 48 1 52 12 0 1 33 19 0 20 3 0 1 27 0 16 8 52 4 0 2 48 1 5 4 32 255 1 16 2 1 28 0 52 8 0 2 17 10 16 10 6 33 11 0 5 16 10 52 21 0 1 52 12 0 1 17 11 16 2 1 29 0 52 8 0 2 17 12 16 12 33 78 0 16 12 1 30 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 13 16 12 1 32 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 14 20 3 0 1 33 0 16 8 1 34 0 16 13 52 6 0 1 1 35 0 16 14 52 6 0 1 1 36 0 52 4 0 7 48 1 32 1 0 2 5 16 11 33 10 0 20 37 0 16 10 48 1 32 1 0 2 5 16 2 1 38 0 52 8 0 2 33 41 0 20 3 0 1 39 0 16 0 52 4 0 2 48 1 5 20 40 0 16 9 16 0 20 41 0 16 9 20 42 0 48 0 48 2 48 3 5 3 32 59 1 16 2 1 43 0 52 8 0 2 33 194 0 20 44 0 16 8 16 7 48 2 17 13 20 45 0 16 13 48 1 17 14 16 14 33 123 0 16 6 16 7 16 14 52 46 0 3 17 15 16 11 33 36 0 20 3 0 1 47 0 16 0 52 4 0 2 48 1 5 20 48 0 16 5 16 15 51 49 0 1 0 1 9 48 3 5 3 32 67 0 20 50 0 16 5 16 15 48 2 17 16 16 16 52 2 0 1 33 19 0 20 22 0 1 51 0 16 0 52 4 0 2 48 1 5 4 32 28 0 20 3 0 1 52 0 16 0 52 4 0 2 48 1 5 20 53 0 16 9 16 16 16 0 48 3 5 3 32 43 0 20 3 0 1 54 0 16 0 52 4 0 2 48 1 5 20 55 0 16 8 16 7 51 56 0 1 13 1 6 1 7 1 11 1 5 1 0 1 9 48 3 5 3 32 109 0 16 11 33 42 0 20 3 0 1 57 0 16 0 52 4 0 2 48 1 5 20 48 0 16 5 16 6 16 7 52 46 0 2 51 58 0 1 0 1 9 48 3 5 3 32 62 0 16 6 16 7 52 46 0 2 17 13 20 50 0 16 5 16 13 48 2 17 14 16 14 52 2 0 1 33 19 0 20 3 0 1 59 0 16 0 52 4 0 2 48 1 5 4 32 13 0 20 53 0 16 9 16 14 16 0 48 3 5 3 50)} "bind-client-route-link" {:upvalue-count 0 :arity 2 :constants ("bind-client-route-click" {:upvalue-count 2 :arity 0 :constants ("bind-boost-link") :bytecode (20 0 0 18 0 18 1 49 2 50)}) :bytecode (20 0 0 16 0 16 1 51 1 0 1 0 1 1 49 3 50)} "process-sse" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "sse" "mark-processed!" "bind-sse") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 49 1 32 1 0 2 50)} "dom-query-all" "dom-body" "[sx-sse]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-sse" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-sse" "event-source-connect" "parse-sse-swap" "event-source-listen" {:upvalue-count 1 :arity 1 :constants ("bind-sse-swap") :bytecode (20 0 0 18 0 16 0 49 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 37 0 20 2 0 16 1 16 0 48 2 17 2 20 3 0 16 0 48 1 17 3 20 4 0 16 2 16 3 51 5 0 1 0 49 3 32 1 0 2 50)} "bind-sse-swap" {:upvalue-count 0 :arity 2 :constants ("resolve-target" "parse-swap-spec" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "get" "style" "transition" "trim" "not" "empty?" "dispose-islands-in" "starts-with?" "(" "sx-render" "dom-create-element" "div" "dom-append" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-html-string" "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 0 49 1 50)}) :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 20 2 0 16 0 1 3 0 48 2 20 4 0 20 5 0 48 0 1 6 0 48 2 48 2 17 3 16 3 1 8 0 52 7 0 2 17 4 16 3 1 9 0 52 7 0 2 17 5 16 1 52 10 0 1 17 6 16 6 52 12 0 1 52 11 0 1 33 88 0 20 13 0 16 2 48 1 5 16 6 1 15 0 52 14 0 2 33 49 0 20 16 0 16 6 48 1 17 7 20 17 0 1 18 0 2 48 2 17 8 20 19 0 16 8 16 7 48 2 5 20 20 0 16 5 51 21 0 1 2 1 8 1 4 49 2 32 16 0 20 20 0 16 5 51 22 0 1 2 1 6 1 4 49 2 32 1 0 2 50)} "bind-inline-handlers" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("first" "nth" 1 "starts-with?" "sx-on:" "slice" 6 "after" "before" "str" "sx:" "not" "is-processed?" "on:" "mark-processed!" "dom-on" "contains?" "." {:upvalue-count 2 :arity 1 :constants ("host-call" "dom-window" "Function" "event" "call") :bytecode (20 0 0 20 0 0 20 1 0 48 0 1 2 0 1 3 0 18 0 48 4 1 4 0 18 1 16 0 49 4 50)} "parse" {:upvalue-count 2 :arity 1 :constants ("make-env" "env-bind!" "event" "this" "detail" "event-detail" "for-each" {:upvalue-count 1 :arity 1 :constants ("eval-expr") :bytecode (16 0 18 0 52 0 0 2 50)}) :bytecode (20 0 0 48 0 17 1 16 1 1 2 0 16 0 52 1 0 3 5 16 1 1 3 0 18 0 52 1 0 3 5 16 1 1 4 0 20 5 0 16 0 48 1 52 1 0 3 5 51 7 0 1 1 18 1 52 6 0 2 50)}) :bytecode (16 0 52 0 0 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 146 0 16 1 1 6 0 52 5 0 2 17 4 16 4 1 7 0 52 3 0 2 6 34 10 0 5 16 4 1 8 0 52 3 0 2 33 12 0 1 10 0 16 4 52 9 0 2 32 2 0 16 4 17 3 20 12 0 18 0 1 13 0 16 3 52 9 0 2 48 2 52 11 0 1 33 66 0 20 14 0 18 0 1 13 0 16 3 52 9 0 2 48 2 5 20 15 0 18 0 16 3 16 2 1 17 0 52 16 0 2 33 10 0 51 18 0 1 2 0 0 32 15 0 16 2 52 19 0 1 17 4 51 20 0 0 0 1 4 49 3 32 1 0 2 32 1 0 2 50)} "dom-attr-list") :bytecode (51 1 0 1 0 20 2 0 16 0 48 1 52 0 0 2 50)} "dom-query-all" "dom-body" "[sx-on\\:]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-preload-for" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-preload" "=" "mousedown" "list" "touchstart" "mouseover" 0 100 "bind-preload" {:upvalue-count 1 :arity 0 :constants ("get-verb-info" "do-preload" "get" "url" "build-request-headers" "loaded-component-names") :bytecode (20 0 0 18 0 48 1 17 0 16 0 33 29 0 20 1 0 16 0 1 3 0 52 2 0 2 20 4 0 18 0 20 5 0 48 0 48 2 49 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 76 0 16 1 1 3 0 52 2 0 2 33 13 0 1 3 0 1 5 0 52 4 0 2 32 7 0 1 6 0 52 4 0 1 17 2 16 1 1 3 0 52 2 0 2 33 6 0 1 7 0 32 3 0 1 8 0 17 3 20 9 0 16 0 16 2 16 3 51 10 0 1 0 49 4 32 1 0 2 50)} "do-preload" {:upvalue-count 0 :arity 2 :constants ("nil?" "preload-cache-get" "_preload-cache" "fetch-preload") :bytecode (20 1 0 20 2 0 16 0 48 2 52 0 0 1 33 15 0 20 3 0 16 0 16 1 20 2 0 49 3 32 1 0 2 50)} "VERB_SELECTOR" "str" "[sx-get],[sx-post],[sx-put],[sx-delete],[sx-patch]" "process-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "VERB_SELECTOR" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "verb" "process-one" "mark-processed!") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 48 1 5 20 4 0 16 0 1 2 0 49 2 32 1 0 2 50)} "process-boosted" "process-sse" "bind-inline-handlers" "process-emit-elements") :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 20 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 49 1 50)} "process-one" {:upvalue-count 0 :arity 1 :constants ("get-verb-info" "not" "dom-has-attr?" "sx-disable" "bind-triggers" "bind-preload-for") :bytecode (20 0 0 16 0 48 1 17 1 16 1 33 49 0 20 2 0 16 0 1 3 0 48 2 52 1 0 1 33 28 0 20 4 0 16 0 16 1 48 2 5 20 5 0 16 0 48 1 5 20 5 0 16 0 49 1 32 1 0 2 32 1 0 2 50)} "process-emit-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "[data-sx-emit]" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "emit" "mark-processed!" "dom-get-attr" "data-sx-emit" "dom-on" "click" {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "data-sx-emit-detail" "json-parse" "dict" "dom-dispatch") :bytecode (20 0 0 18 0 1 1 0 48 2 17 1 16 1 33 10 0 20 2 0 16 1 48 1 32 4 0 52 3 0 0 17 2 20 4 0 18 0 18 1 16 2 49 3 50)}) :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 52 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 1 5 0 48 2 17 1 16 1 33 20 0 20 6 0 16 0 1 7 0 51 8 0 1 0 1 1 49 3 32 1 0 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 1 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 50)} "save-scroll-position" {:upvalue-count 0 :arity 0 :constants ("host-get" "dom-window" "scrollY" "browser-replace-state" "dict" "" "browser-location-href") :bytecode (20 0 0 20 1 0 48 0 1 2 0 48 2 17 0 20 3 0 1 2 0 16 0 52 4 0 2 1 5 0 20 6 0 48 0 49 3 50)} "handle-popstate" {:upvalue-count 0 :arity 1 :constants ("browser-location-href" "dom-query" "[sx-boost]" "dom-get-attr" "sx-boost" "not" "=" "true" "#sx-content" "url-pathname" "dict" "SX-Request" "fetch-and-restore") :bytecode (20 0 0 48 0 17 1 20 1 0 1 2 0 48 1 17 2 16 2 33 46 0 20 3 0 16 2 1 4 0 48 2 17 4 16 4 6 33 14 0 5 16 4 1 7 0 52 6 0 2 52 5 0 1 33 5 0 16 4 32 3 0 1 8 0 32 3 0 1 8 0 17 3 20 1 0 16 3 48 1 17 4 20 9 0 16 1 48 1 17 5 16 4 33 28 0 1 11 0 1 7 0 52 10 0 2 17 6 20 12 0 16 4 16 1 16 6 16 0 49 4 32 1 0 2 50)} "engine-init" {:upvalue-count 0 :arity 0 :constants ("sx-process-scripts" "sx-hydrate" "process-elements") :bytecode (20 0 0 2 48 1 5 20 1 0 2 48 1 5 20 2 0 2 49 1 50)} {:library (web orchestration) :op "import"}) :bytecode (1 0 0 112 5 1 1 0 112 5 1 2 0 112 5 1 3 0 112 5 1 4 0 112 5 52 6 0 0 128 5 0 5 51 8 0 128 7 0 5 51 10 0 128 9 0 5 51 12 0 128 11 0 5 51 14 0 128 13 0 5 51 16 0 128 15 0 5 51 18 0 128 17 0 5 51 20 0 128 19 0 5 51 22 0 128 21 0 5 51 24 0 128 23 0 5 51 26 0 128 25 0 5 51 28 0 128 27 0 5 51 30 0 128 29 0 5 51 32 0 128 31 0 5 51 34 0 128 33 0 5 51 36 0 128 35 0 5 51 38 0 128 37 0 5 51 40 0 128 39 0 5 52 6 0 0 128 41 0 5 1 43 0 128 42 0 5 51 45 0 128 44 0 5 51 47 0 128 46 0 5 51 49 0 128 48 0 5 51 51 0 128 50 0 5 51 53 0 128 52 0 5 51 55 0 128 54 0 5 51 57 0 128 56 0 5 52 6 0 0 128 58 0 5 51 60 0 128 59 0 5 51 62 0 128 61 0 5 51 64 0 128 63 0 5 51 66 0 128 65 0 5 3 128 67 0 5 52 69 0 0 128 68 0 5 51 71 0 128 70 0 5 51 73 0 128 72 0 5 51 75 0 128 74 0 5 51 77 0 128 76 0 5 51 79 0 128 78 0 5 51 81 0 128 80 0 5 51 83 0 128 82 0 5 51 85 0 128 84 0 5 51 87 0 128 86 0 5 51 89 0 128 88 0 5 51 91 0 128 90 0 5 51 93 0 128 92 0 5 51 95 0 128 94 0 5 51 97 0 128 96 0 5 51 99 0 128 98 0 5 51 101 0 128 100 0 5 51 103 0 128 102 0 5 51 105 0 128 104 0 5 1 108 0 52 107 0 1 128 106 0 5 51 110 0 128 109 0 5 51 112 0 128 111 0 5 51 114 0 128 113 0 5 51 116 0 128 115 0 5 51 118 0 128 117 0 5 51 120 0 128 119 0 5 1 121 0 112 50))) + :constants ({:library (web boot-helpers) :op "import"} {:library (sx dom) :op "import"} {:library (sx browser) :op "import"} {:library (web adapter-dom) :op "import"} {:library (web engine) :op "import"} "_preload-cache" "dict" "dispatch-trigger-events" {:upvalue-count 0 :arity 2 :constants ("try-parse-json" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-dispatch" "get") :bytecode (20 0 0 18 0 16 0 18 1 16 0 52 1 0 2 49 3 50)} "keys" {:upvalue-count 1 :arity 1 :constants ("trim" "not" "empty?" "dom-dispatch" "dict") :bytecode (16 0 52 0 0 1 17 1 16 1 52 2 0 1 52 1 0 1 33 16 0 20 3 0 18 0 16 1 52 4 0 0 49 3 32 1 0 2 50)} "split" ",") :bytecode (16 1 33 55 0 20 0 0 16 1 48 1 17 2 16 2 33 20 0 51 2 0 1 0 1 2 16 2 52 3 0 1 52 1 0 2 32 18 0 51 4 0 1 0 16 1 1 6 0 52 5 0 2 52 1 0 2 32 1 0 2 50)} "execute-request" {:upvalue-count 0 :arity 3 :constants ("get-verb-info" "nil?" "promise-resolve" "get" "method" "url" "dom-get-attr" "sx-media" "not" "browser-media-matches?" "sx-confirm" "browser-confirm" "sx-prompt" "browser-prompt" "validate-for-request" "do-fetch" "assoc" "dict" "SX-Prompt") :bytecode (20 0 0 16 0 48 1 6 34 3 0 5 16 1 17 3 16 3 52 1 0 1 33 9 0 20 2 0 2 49 1 32 249 0 16 3 1 4 0 52 3 0 2 17 4 16 3 1 5 0 52 3 0 2 17 5 20 6 0 16 0 1 7 0 48 2 17 6 16 6 6 33 12 0 5 20 9 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 185 0 20 6 0 16 0 1 10 0 48 2 17 6 16 6 6 33 12 0 5 20 11 0 16 6 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 143 0 20 6 0 16 0 1 12 0 48 2 17 6 16 6 33 10 0 20 13 0 16 6 48 1 32 1 0 2 17 7 16 6 6 33 7 0 5 16 7 52 1 0 1 33 9 0 20 2 0 2 49 1 32 88 0 16 4 52 1 0 1 6 34 23 0 5 16 5 52 1 0 1 6 34 12 0 5 20 14 0 16 0 48 1 52 8 0 1 33 9 0 20 2 0 2 49 1 32 43 0 20 15 0 16 0 16 4 16 4 16 5 16 7 33 23 0 16 2 6 34 5 0 5 52 17 0 0 1 18 0 16 7 52 16 0 3 32 2 0 16 2 49 5 50)} "do-fetch" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-sync" "=" "replace" "abort-previous" "resolve-target" "not" "identical?" "abort-previous-target" "new-abort-controller" "track-controller" "track-controller-target" "build-request-body" "get" "url" "body" "content-type" "build-request-headers" "loaded-component-names" "csrf-token" "for-each" {:upvalue-count 2 :arity 1 :constants ("dict-set!" "get") :bytecode (18 0 16 0 18 1 16 0 52 1 0 2 52 0 0 3 50)} "keys" "dict-set!" "Content-Type" "X-CSRFToken" "preload-cache-get" "_preload-cache" "apply-optimistic" "show-indicator" "disable-elements" "dom-add-class" "sx-request" "dom-set-attr" "aria-busy" "true" "dom-dispatch" "sx:beforeRequest" "dict" "method" "fetch-request" "headers" "signal" "controller-signal" "cross-origin" "cross-origin?" "preloaded" {:upvalue-count 8 :arity 4 :constants ("clear-loading-state" "revert-optimistic" "not" "dom-dispatch" "sx:responseError" "dict" "status" "text" ">" "len" 0 "handle-fetch-success" "handle-retry" "sx:afterRequest") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 16 0 52 2 0 1 33 86 0 20 3 0 18 0 1 4 0 1 6 0 16 1 1 7 0 16 3 52 5 0 4 48 3 5 16 3 6 33 14 0 5 16 3 52 9 0 1 1 10 0 52 8 0 2 33 20 0 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 32 15 0 20 12 0 18 0 18 5 18 7 18 4 18 6 49 5 32 37 0 20 3 0 18 0 1 13 0 1 6 0 16 1 52 5 0 2 48 3 5 20 11 0 18 0 18 4 18 5 18 6 16 2 16 3 49 6 50)} {:upvalue-count 6 :arity 1 :constants ("clear-loading-state" "revert-optimistic" "not" "abort-error?" "log-warn" "str" "sx:fetch error " " " " — " "dom-dispatch" "sx:requestError" "dict" "error") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 3 48 1 5 20 3 0 16 0 48 1 52 2 0 1 33 47 0 20 4 0 1 6 0 18 4 1 7 0 18 5 1 8 0 16 0 52 5 0 6 48 1 5 20 9 0 18 0 1 10 0 1 12 0 16 0 52 11 0 2 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 16 5 1 3 0 52 2 0 2 33 10 0 20 4 0 16 0 48 1 32 1 0 2 5 20 5 0 16 0 48 1 17 6 16 6 6 33 13 0 5 16 0 16 6 52 7 0 2 52 6 0 1 33 10 0 20 8 0 16 6 48 1 32 1 0 2 5 20 9 0 48 0 17 6 20 10 0 16 0 16 6 48 2 5 20 5 0 16 0 48 1 17 7 16 7 33 12 0 20 11 0 16 7 16 6 48 2 32 1 0 2 5 20 12 0 16 0 16 2 16 3 48 3 17 7 16 7 1 14 0 52 13 0 2 17 8 16 7 1 15 0 52 13 0 2 17 9 16 7 1 16 0 52 13 0 2 17 10 20 17 0 16 0 20 18 0 48 0 48 2 17 11 20 19 0 48 0 17 12 16 4 33 20 0 51 21 0 1 11 1 4 16 4 52 22 0 1 52 20 0 2 32 1 0 2 5 16 10 33 14 0 16 11 1 24 0 16 10 52 23 0 3 32 1 0 2 5 16 12 33 14 0 16 11 1 25 0 16 12 52 23 0 3 32 1 0 2 5 20 26 0 20 27 0 16 8 48 2 17 13 20 28 0 16 0 48 1 17 14 20 29 0 16 0 48 1 17 15 20 30 0 16 0 48 1 17 16 20 31 0 16 0 1 32 0 48 2 5 20 33 0 16 0 1 34 0 1 35 0 48 3 5 20 36 0 16 0 1 37 0 1 14 0 16 8 1 39 0 16 2 52 38 0 4 48 3 5 20 40 0 1 14 0 16 8 1 39 0 16 2 1 41 0 16 11 1 15 0 16 9 1 42 0 20 43 0 16 6 48 1 1 44 0 20 45 0 16 8 48 1 1 46 0 16 13 52 38 0 14 51 47 0 1 0 1 15 1 16 1 14 1 8 1 1 1 4 1 2 51 48 0 1 0 1 15 1 16 1 14 1 2 1 8 49 3 50)} "handle-fetch-success" {:upvalue-count 0 :arity 6 :constants ("process-response-headers" "dispatch-trigger-events" "get" "trigger" "process-cache-directives" "redirect" "browser-navigate" "refresh" "browser-reload" "location" "fetch-location" "retarget" "dom-query" "resolve-target" "parse-swap-spec" "reswap" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "style" "transition" "content-type" "" "contains?" "text/sx" "handle-sx-response" "handle-html-response" "trigger-swap" "handle-history" "set-timeout" {:upvalue-count 2 :arity 0 :constants ("get" "trigger-settle" "dispatch-trigger-events" "process-settle-hooks") :bytecode (18 0 1 1 0 52 0 0 2 33 19 0 20 2 0 18 1 18 0 1 1 0 52 0 0 2 48 2 32 1 0 2 5 20 3 0 18 1 49 1 50)} 20 "dom-dispatch" "sx:afterSwap" "dict" "target" "swap") :bytecode (20 0 0 16 4 48 1 17 6 20 1 0 16 0 16 6 1 3 0 52 2 0 2 48 2 5 20 4 0 16 0 16 6 16 5 48 3 5 16 6 1 5 0 52 2 0 2 33 17 0 20 6 0 16 6 1 5 0 52 2 0 2 49 1 32 31 1 16 6 1 7 0 52 2 0 2 33 8 0 20 8 0 49 0 32 11 1 16 6 1 9 0 52 2 0 2 33 17 0 20 10 0 16 6 1 9 0 52 2 0 2 49 1 32 238 0 16 6 1 11 0 52 2 0 2 33 17 0 20 12 0 16 6 1 11 0 52 2 0 2 48 1 32 7 0 20 13 0 16 0 48 1 17 7 20 14 0 16 6 1 15 0 52 2 0 2 6 34 11 0 5 20 16 0 16 0 1 17 0 48 2 20 18 0 20 19 0 48 0 1 20 0 48 2 48 2 17 8 16 8 1 21 0 52 2 0 2 17 9 16 8 1 22 0 52 2 0 2 17 10 16 6 1 23 0 52 2 0 2 6 34 4 0 5 1 24 0 17 11 16 11 1 26 0 52 25 0 2 33 18 0 20 27 0 16 0 16 7 16 5 16 9 16 10 48 5 32 15 0 20 28 0 16 0 16 7 16 5 16 9 16 10 48 5 5 20 1 0 16 0 16 6 1 29 0 52 2 0 2 48 2 5 20 30 0 16 0 16 1 16 6 48 3 5 20 31 0 51 32 0 1 6 1 0 1 33 0 48 2 5 20 34 0 16 0 1 35 0 1 37 0 16 7 1 38 0 16 9 52 36 0 4 49 3 50)} "flush-collected-styles" {:upvalue-count 0 :arity 0 :constants ("collected" "cssx" "not" "empty?" "clear-collected!" "dom-create-element" "style" "dom-set-attr" "data-sx-css" "true" "dom-set-prop" "textContent" "join" "" "dom-append-to-head") :bytecode (1 1 0 52 0 0 1 17 0 16 0 52 3 0 1 52 2 0 1 33 63 0 1 1 0 52 4 0 1 5 20 5 0 1 6 0 2 48 2 17 1 20 7 0 16 1 1 8 0 1 9 0 48 3 5 20 10 0 16 1 1 11 0 1 13 0 16 0 52 12 0 2 48 3 5 20 14 0 16 1 49 1 32 1 0 2 50)} "handle-sx-response" {:upvalue-count 0 :arity 5 :constants ("strip-component-scripts" "extract-response-css" "trim" "not" "empty?" "sx-render" "dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "hoist-head-elements" "dom-get-attr" "sx-select" "select-from-container" "children-to-fragment" "dispose-islands-in" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "post-swap" "=" "outerHTML" "dom-parent") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 18 2 1 3 0 52 2 0 2 33 17 0 20 4 0 16 0 6 34 3 0 5 18 0 48 1 32 9 0 16 0 6 34 3 0 5 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 20 1 0 16 5 48 1 17 6 16 6 52 2 0 1 17 7 16 7 52 4 0 1 52 3 0 1 33 114 0 20 5 0 16 7 48 1 17 8 20 6 0 1 7 0 2 48 2 17 9 20 8 0 16 9 16 8 48 2 5 20 9 0 16 9 51 10 0 48 2 5 20 11 0 16 9 48 1 5 20 12 0 16 0 1 13 0 48 2 17 10 16 10 33 12 0 20 14 0 16 9 16 10 48 2 32 7 0 20 15 0 16 9 48 1 17 11 20 16 0 16 1 48 1 5 20 17 0 16 4 51 18 0 1 1 1 11 1 3 49 2 32 1 0 2 50)} "handle-html-response" {:upvalue-count 0 :arity 5 :constants ("dom-parse-html-document" "dom-get-attr" "sx-select" "dispose-islands-in" "dom-create-element" "div" "dom-set-inner-html" "dom-body-inner-html" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 1 16 2 48 3 5 20 2 0 16 0 49 1 50)} "hoist-head-elements" "select-from-container" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "log-info" "str" "swap-root: " "dom-tag-name" "nil" " target: " "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 17 0 20 1 0 1 3 0 16 0 33 10 0 20 4 0 16 0 48 1 32 3 0 1 5 0 1 6 0 20 4 0 18 0 48 1 52 2 0 4 48 1 5 20 7 0 16 0 6 34 3 0 5 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)}) :bytecode (20 0 0 16 2 48 1 17 5 16 5 33 164 0 20 1 0 16 0 1 2 0 48 2 17 6 20 3 0 16 1 48 1 5 16 6 33 75 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 11 0 16 7 16 6 48 2 17 8 20 12 0 16 4 51 13 0 1 1 1 8 1 3 49 2 32 61 0 20 4 0 1 5 0 2 48 2 17 7 20 6 0 16 7 20 7 0 16 5 48 1 48 2 5 20 8 0 16 7 51 9 0 48 2 5 20 10 0 16 7 48 1 5 20 12 0 16 4 51 14 0 1 1 1 7 1 3 49 2 32 1 0 2 50)} "handle-retry" {:upvalue-count 0 :arity 5 :constants ("dom-get-attr" "sx-retry" "parse-retry-spec" "data-sx-retry-ms" "get" "start-ms" "parse-int" "dom-set-attr" "str" "next-retry-ms" "cap-ms" "set-timeout" {:upvalue-count 5 :arity 0 :constants ("do-fetch") :bytecode (20 0 0 18 0 18 1 18 2 18 3 18 4 49 5 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 5 20 2 0 16 5 48 1 17 6 16 6 33 97 0 20 0 0 16 0 1 3 0 48 2 6 34 10 0 5 16 6 1 5 0 52 4 0 2 17 7 16 7 16 6 1 5 0 52 4 0 2 52 6 0 2 17 8 20 7 0 16 0 1 3 0 20 9 0 16 8 16 6 1 10 0 52 4 0 2 48 2 52 8 0 1 48 3 5 20 11 0 51 12 0 1 0 1 1 1 2 1 3 1 4 16 8 49 2 32 1 0 2 50)} "bind-triggers" {:upvalue-count 0 :arity 2 :constants ("parse-trigger-spec" "dom-get-attr" "sx-trigger" "default-trigger" "dom-tag-name" "for-each" {:upvalue-count 2 :arity 1 :constants ("classify-trigger" "get" "modifiers" "=" "poll" "set-interval" {:upvalue-count 2 :arity 0 :constants ("host-get" "isConnected" "execute-request" "clear-interval" "log-info" "poll stopped: element removed") :bytecode (20 0 0 18 0 1 1 0 48 2 33 12 0 20 2 0 18 0 2 2 49 3 32 16 0 20 3 0 18 1 48 1 5 20 4 0 1 5 0 49 1 50)} "interval" "intersect" "observe-intersection" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "delay" "load" "set-timeout" 0 "revealed" "event" "bind-event") :bytecode (20 0 0 16 0 48 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 29 0 2 17 3 20 5 0 51 6 0 0 0 1 3 16 2 1 7 0 52 1 0 2 48 2 17 3 32 152 0 16 1 1 8 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 3 16 2 1 11 0 52 1 0 2 49 4 32 115 0 16 1 1 12 0 52 3 0 2 33 30 0 20 13 0 51 10 0 0 0 16 2 1 11 0 52 1 0 2 6 34 4 0 5 1 14 0 49 2 32 73 0 16 1 1 15 0 52 3 0 2 33 25 0 20 9 0 18 0 51 10 0 0 0 4 16 2 1 11 0 52 1 0 2 49 4 32 36 0 16 1 1 16 0 52 3 0 2 33 23 0 20 17 0 18 0 16 0 1 16 0 52 1 0 2 16 2 18 1 49 4 32 1 0 2 50)}) :bytecode (20 0 0 20 1 0 16 0 1 2 0 48 2 48 1 6 34 13 0 5 20 3 0 20 4 0 16 0 48 1 48 1 17 2 51 6 0 1 0 1 1 16 2 52 5 0 2 50)} "bind-event" {:upvalue-count 0 :arity 4 :constants ("get" "from" "nil?" "=" "body" "dom-body" "document" "dom-document" "window" "dom-window" "dom-query" "dom-add-listener" {:upvalue-count 5 :arity 1 :constants ("get" "filter" "index-of" "key=='" ">=" 0 "slice" "+" 5 6 "=" "host-get" "key" "not" "dom-matches?" "target" "input,textarea,select" "changed" "element-value" "click" "event-modifier-key?" "submit" "dom-has-attr?" "href" "prevent-default" "get-verb-info" "method" "GET" "delay" "try-client-route" "url-pathname" "url" "dom-get-attr" "sx-target" "save-scroll-position" "browser-push-state" "browser-scroll-to" "log-info" "str" "sx:route server fetch " "clear-timeout" "set-timeout" {:upvalue-count 1 :arity 0 :constants ("execute-request") :bytecode (20 0 0 18 0 2 2 49 3 50)} "execute-request") :bytecode (18 0 1 1 0 52 0 0 2 33 110 0 18 0 1 1 0 52 0 0 2 17 2 16 2 1 3 0 52 2 0 2 17 3 16 3 1 5 0 52 4 0 2 33 72 0 16 2 16 3 1 8 0 52 7 0 2 16 3 1 9 0 52 7 0 2 52 6 0 3 17 4 20 11 0 16 0 1 12 0 48 2 16 4 52 10 0 2 6 33 23 0 5 20 14 0 20 11 0 16 0 1 15 0 48 2 1 16 0 48 2 52 13 0 1 32 1 0 3 32 1 0 3 17 1 18 0 1 17 0 52 0 0 2 33 29 0 20 18 0 17 2 16 2 18 1 52 10 0 2 33 6 0 4 17 1 32 4 0 16 2 19 1 32 1 0 2 5 16 1 6 33 26 0 5 18 2 1 19 0 52 10 0 2 6 33 8 0 5 20 20 0 16 0 48 1 52 13 0 1 33 42 1 18 2 1 21 0 52 10 0 2 6 34 25 0 5 18 2 1 19 0 52 10 0 2 6 33 11 0 5 20 22 0 18 3 1 23 0 48 2 33 10 0 20 24 0 16 0 48 1 32 1 0 2 5 20 25 0 18 3 48 1 17 2 18 2 1 19 0 52 10 0 2 6 33 50 0 5 16 2 1 26 0 52 0 0 2 1 27 0 52 10 0 2 6 33 29 0 5 20 22 0 18 3 1 23 0 48 2 6 33 14 0 5 18 0 1 28 0 52 0 0 2 52 13 0 1 17 3 4 17 4 16 3 33 34 0 20 29 0 20 30 0 16 2 1 31 0 52 0 0 2 48 1 20 32 0 18 3 1 33 0 48 2 48 2 17 4 32 1 0 2 5 16 4 33 35 0 20 34 0 48 0 5 20 35 0 16 2 1 31 0 52 0 0 2 48 1 5 20 36 0 1 5 0 1 5 0 49 2 32 84 0 16 3 33 24 0 20 37 0 1 39 0 16 2 1 31 0 52 0 0 2 52 38 0 2 48 1 32 1 0 2 5 18 0 1 28 0 52 0 0 2 33 32 0 20 40 0 18 4 48 1 5 20 41 0 51 42 0 0 3 18 0 1 28 0 52 0 0 2 48 2 19 4 32 9 0 20 43 0 18 3 2 2 49 3 32 1 0 2 50)} "once" "dict") :bytecode (2 17 4 2 17 5 16 2 1 1 0 52 0 0 2 17 7 16 7 52 2 0 1 33 5 0 16 0 32 67 0 16 7 1 4 0 52 3 0 2 33 8 0 20 5 0 48 0 32 47 0 16 7 1 6 0 52 3 0 2 33 8 0 20 7 0 48 0 32 27 0 16 7 1 8 0 52 3 0 2 33 8 0 20 9 0 48 0 32 7 0 20 10 0 16 7 48 1 17 6 16 6 33 49 0 20 11 0 16 6 16 1 51 12 0 1 2 1 5 1 1 1 0 1 4 16 2 1 13 0 52 0 0 2 33 11 0 1 13 0 3 52 14 0 2 32 1 0 2 49 4 32 1 0 2 50)} "post-swap" {:upvalue-count 0 :arity 1 :constants ("log-info" "str" "post-swap: root=" "dom-tag-name" "nil" "activate-scripts" "sx-process-scripts" "sx-hydrate" "sx-hydrate-islands" "run-post-render-hooks" "flush-collected-styles" "process-elements") :bytecode (20 0 0 1 2 0 16 0 33 10 0 20 3 0 16 0 48 1 32 3 0 1 4 0 52 1 0 2 48 1 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 48 1 5 20 9 0 48 0 5 20 10 0 48 0 5 20 11 0 16 0 49 1 50)} "process-settle-hooks" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-on-settle" "not" "empty?" "sx-parse" "for-each" {:upvalue-count 0 :arity 1 :constants ("cek-eval") :bytecode (20 0 0 16 0 49 1 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 6 33 11 0 5 16 1 52 3 0 1 52 2 0 1 33 21 0 20 4 0 16 1 48 1 17 2 51 6 0 16 2 52 5 0 2 32 1 0 2 50)} "activate-scripts" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "script" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "dom-has-attr?" "data-components" "data-sx-activated" "create-script-clone" "dom-set-attr" "true" "dom-replace-child" "dom-parent") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 15 0 5 20 1 0 16 0 1 3 0 48 2 52 0 0 1 33 42 0 20 4 0 16 0 48 1 17 1 20 5 0 16 1 1 3 0 1 6 0 48 3 5 20 7 0 20 8 0 16 0 48 1 16 1 16 0 49 3 32 1 0 2 50)}) :bytecode (16 0 33 24 0 20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 16 1 52 2 0 2 32 1 0 2 50)} "process-oob-swaps" {:upvalue-count 0 :arity 2 :constants ("find-oob-swaps" "for-each" {:upvalue-count 1 :arity 1 :constants ("get" "target-id" "dom-query-by-id" "element" "swap-type" "dom-parent" "dom-remove-child") :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 16 1 48 1 17 2 16 0 1 3 0 52 0 0 2 17 3 16 0 1 4 0 52 0 0 2 17 4 20 5 0 16 3 48 1 33 17 0 20 6 0 20 5 0 16 3 48 1 16 3 48 2 32 1 0 2 5 16 2 33 13 0 18 0 16 2 16 3 16 4 49 3 32 1 0 2 50)}) :bytecode (20 0 0 16 0 48 1 17 2 51 2 0 1 1 16 2 52 1 0 2 50)} "hoist-head-elements" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("dom-parent" "dom-remove-child" "dom-append-to-head") :bytecode (20 0 0 16 0 48 1 33 17 0 20 1 0 20 0 0 16 0 48 1 16 0 48 2 32 1 0 2 5 20 2 0 16 0 49 1 50)} "dom-query-all" "style[data-sx-css]" "link[rel=\"stylesheet\"]") :bytecode (51 1 0 20 2 0 16 0 1 3 0 48 2 52 0 0 2 5 51 1 0 20 2 0 16 0 1 4 0 48 2 52 0 0 2 50)} "process-boosted" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("boost-descendants") :bytecode (20 0 0 16 0 49 1 50)} "dom-query-all" "dom-body" "[sx-boost]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "boost-descendants" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-boost" "for-each" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-link?" "mark-processed!" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "sx-push-url" "bind-client-route-link" "dom-get-attr" "href") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 160 0 20 4 0 16 0 1 2 0 48 2 5 20 5 0 16 0 1 6 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 8 0 52 7 0 2 52 0 0 1 33 15 0 20 9 0 16 0 1 6 0 18 0 48 3 32 1 0 2 5 20 5 0 16 0 1 10 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 10 0 1 11 0 48 3 32 1 0 2 5 20 5 0 16 0 1 12 0 48 2 52 0 0 1 33 16 0 20 9 0 16 0 1 12 0 1 8 0 48 3 32 1 0 2 5 20 13 0 16 0 20 14 0 16 0 1 15 0 48 2 49 2 32 1 0 2 50)} "dom-query-all" "a[href]" {:upvalue-count 1 :arity 1 :constants ("not" "is-processed?" "boost" "should-boost-form?" "mark-processed!" "upper" "dom-get-attr" "method" "GET" "action" "browser-location-href" "dom-has-attr?" "sx-target" "=" "true" "dom-set-attr" "sx-swap" "innerHTML" "bind-boost-form") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 8 0 5 20 3 0 16 0 48 1 33 165 0 20 4 0 16 0 1 2 0 48 2 5 20 6 0 16 0 1 7 0 48 2 6 34 4 0 5 1 8 0 52 5 0 1 17 1 20 6 0 16 0 1 9 0 48 2 6 34 6 0 5 20 10 0 48 0 17 2 20 11 0 16 0 1 12 0 48 2 52 0 0 1 6 33 21 0 5 18 0 6 33 14 0 5 18 0 1 14 0 52 13 0 2 52 0 0 1 33 15 0 20 15 0 16 0 1 12 0 18 0 48 3 32 1 0 2 5 20 11 0 16 0 1 16 0 48 2 52 0 0 1 33 16 0 20 15 0 16 0 1 16 0 1 17 0 48 3 32 1 0 2 5 20 18 0 16 0 16 1 16 2 49 3 32 1 0 2 50)} "form") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 1 1 20 4 0 16 0 1 5 0 48 2 52 2 0 2 5 51 6 0 1 1 20 4 0 16 0 1 7 0 48 2 52 2 0 2 50)} "_page-data-cache" "_page-data-cache-ttl" 30000 "page-data-cache-key" {:upvalue-count 0 :arity 2 :constants ("nil?" "empty?" "keys" "list" "for-each" {:upvalue-count 2 :arity 1 :constants ("append!" "str" "=" "get") :bytecode (18 0 16 0 1 2 0 18 1 16 0 52 3 0 2 52 1 0 3 52 0 0 2 50)} "str" ":" "join" "&") :bytecode (16 0 17 2 16 1 52 0 0 1 6 34 11 0 5 16 1 52 2 0 1 52 1 0 1 33 5 0 16 2 32 42 0 52 3 0 0 17 3 51 5 0 1 3 1 1 16 1 52 2 0 1 52 4 0 2 5 16 2 1 7 0 1 9 0 16 3 52 8 0 2 52 6 0 3 50)} "page-data-cache-get" {:upvalue-count 0 :arity 1 :constants ("get" "_page-data-cache" "nil?" ">" "-" "now-ms" "ts" "_page-data-cache-ttl" "dict-set!" "data") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 52 2 0 1 33 4 0 2 32 52 0 20 5 0 48 0 16 1 1 6 0 52 0 0 2 52 4 0 2 20 7 0 52 3 0 2 33 15 0 20 1 0 16 0 2 52 8 0 3 5 2 32 9 0 16 1 1 9 0 52 0 0 2 50)} "page-data-cache-set" {:upvalue-count 0 :arity 2 :constants ("dict-set!" "_page-data-cache" "data" "ts" "now-ms") :bytecode (20 1 0 16 0 1 2 0 16 1 1 3 0 20 4 0 48 0 65 2 0 52 0 0 3 50)} "invalidate-page-cache" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("=" "starts-with?" "str" ":" "dict-set!" "_page-data-cache") :bytecode (16 0 18 0 52 0 0 2 6 34 16 0 5 16 0 18 0 1 3 0 52 2 0 2 52 1 0 2 33 13 0 20 5 0 16 0 2 52 4 0 3 32 1 0 2 50)} "keys" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "log-info" "str" "sx:cache invalidate ") :bytecode (51 1 0 1 0 20 3 0 52 2 0 1 52 0 0 2 5 20 4 0 1 5 0 1 6 0 1 7 0 16 0 65 2 0 48 1 5 20 8 0 1 10 0 16 0 52 9 0 2 49 1 50)} "invalidate-all-page-cache" {:upvalue-count 0 :arity 0 :constants ("dict" "_page-data-cache" "sw-post-message" "type" "invalidate" "page" "*" "log-info" "sx:cache invalidate *") :bytecode (52 0 0 0 21 1 0 5 20 2 0 1 3 0 1 4 0 1 5 0 1 6 0 65 2 0 48 1 5 20 7 0 1 8 0 49 1 50)} "update-page-cache" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-key" "dict" "page-data-cache-set" "log-info" "str" "sx:cache update ") :bytecode (20 0 0 16 0 52 1 0 0 48 2 17 2 20 2 0 16 2 16 1 48 2 5 20 3 0 1 5 0 16 0 52 4 0 2 49 1 50)} "process-cache-directives" {:upvalue-count 0 :arity 3 :constants ("dom-get-attr" "sx-cache-invalidate" "=" "*" "invalidate-all-page-cache" "invalidate-page-cache" "get" "cache-invalidate" "cache-update" "parse-sx-data" "update-page-cache") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 7 0 52 6 0 2 17 3 16 3 33 30 0 16 3 1 3 0 52 2 0 2 33 8 0 20 4 0 48 0 32 7 0 20 5 0 16 3 48 1 32 1 0 2 5 16 1 1 8 0 52 6 0 2 17 3 16 3 33 30 0 20 9 0 16 2 48 1 17 4 16 4 33 12 0 20 10 0 16 3 16 4 49 2 32 1 0 2 32 1 0 2 50)} "_optimistic-snapshots" "optimistic-cache-update" {:upvalue-count 0 :arity 2 :constants ("page-data-cache-get" "dict-set!" "_optimistic-snapshots" "page-data-cache-set") :bytecode (20 0 0 16 0 48 1 17 2 16 2 33 35 0 16 1 16 2 48 1 17 3 20 2 0 16 0 16 2 52 1 0 3 5 20 3 0 16 0 16 3 48 2 5 16 3 32 1 0 2 50)} "optimistic-cache-revert" {:upvalue-count 0 :arity 1 :constants ("get" "_optimistic-snapshots" "page-data-cache-set" "dict-delete!") :bytecode (20 1 0 16 0 52 0 0 2 17 1 16 1 33 25 0 20 2 0 16 0 16 1 48 2 5 20 1 0 16 0 52 3 0 2 5 16 1 32 1 0 2 50)} "optimistic-cache-confirm" {:upvalue-count 0 :arity 1 :constants ("dict-delete!" "_optimistic-snapshots") :bytecode (20 1 0 16 0 52 0 0 2 50)} "submit-mutation" {:upvalue-count 0 :arity 6 :constants ("page-data-cache-key" "optimistic-cache-update" "try-rerender-page" "execute-action" {:upvalue-count 4 :arity 1 :constants ("page-data-cache-set" "optimistic-cache-confirm" "try-rerender-page" "log-info" "str" "sx:optimistic confirmed " "confirmed") :bytecode (16 0 33 12 0 20 0 0 18 0 16 0 48 2 32 1 0 2 5 20 1 0 18 0 48 1 5 16 0 33 14 0 20 2 0 18 1 18 2 16 0 48 3 32 1 0 2 5 20 3 0 1 5 0 18 1 52 4 0 2 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)} {:upvalue-count 4 :arity 1 :constants ("optimistic-cache-revert" "try-rerender-page" "log-warn" "str" "sx:optimistic reverted " ": " "reverted") :bytecode (20 0 0 18 0 48 1 17 1 16 1 33 14 0 20 1 0 18 1 18 2 16 1 48 3 32 1 0 2 5 20 2 0 1 4 0 18 1 1 5 0 16 0 52 3 0 4 48 1 5 18 3 33 10 0 18 3 1 6 0 49 1 32 1 0 2 50)}) :bytecode (20 0 0 16 0 16 1 48 2 17 6 20 1 0 16 6 16 4 48 2 17 7 16 7 33 14 0 20 2 0 16 0 16 1 16 7 48 3 32 1 0 2 5 20 3 0 16 2 16 3 51 4 0 1 6 1 0 1 1 1 5 51 5 0 1 6 1 0 1 1 1 5 49 4 50)} "_is-online" "_offline-queue" "list" "offline-is-online?" {:upvalue-count 0 :arity 0 :constants ("_is-online") :bytecode (20 0 0 50)} "offline-set-online!" {:upvalue-count 0 :arity 1 :constants ("_is-online") :bytecode (16 0 21 0 0 50)} "offline-queue-mutation" {:upvalue-count 0 :arity 5 :constants ("page-data-cache-key" "dict" "action" "payload" "page" "params" "timestamp" "now-ms" "status" "pending" "append!" "_offline-queue" "optimistic-cache-update" "try-rerender-page" "log-info" "str" "sx:offline queued " " (" "len" " pending)") :bytecode (20 0 0 16 2 16 3 48 2 17 5 1 2 0 16 0 1 3 0 16 1 1 4 0 16 2 1 5 0 16 3 1 6 0 20 7 0 48 0 1 8 0 1 9 0 52 1 0 12 17 6 20 11 0 16 6 52 10 0 2 5 20 12 0 16 5 16 4 48 2 17 7 16 7 33 14 0 20 13 0 16 2 16 3 16 7 48 3 32 1 0 2 5 20 14 0 1 16 0 16 0 1 17 0 20 11 0 52 18 0 1 1 19 0 52 15 0 5 48 1 5 16 6 50)} "offline-sync" {:upvalue-count 0 :arity 0 :constants ("filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue" "not" "empty?" "log-info" "str" "sx:offline syncing " "len" " mutations" "for-each" {:upvalue-count 0 :arity 1 :constants ("execute-action" "get" "action" "payload" {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "synced" "log-info" "str" "sx:offline synced " "get" "action") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 52 4 0 2 49 1 50)} {:upvalue-count 1 :arity 1 :constants ("dict-set!" "status" "failed" "log-warn" "str" "sx:offline sync failed " "get" "action" ": ") :bytecode (18 0 1 1 0 1 2 0 52 0 0 3 5 20 3 0 1 5 0 18 0 1 7 0 52 6 0 2 1 8 0 16 0 52 4 0 4 49 1 50)}) :bytecode (20 0 0 16 0 1 2 0 52 1 0 2 16 0 1 3 0 52 1 0 2 51 4 0 1 0 51 5 0 1 0 49 4 50)}) :bytecode (51 1 0 20 2 0 52 0 0 2 17 0 16 0 52 4 0 1 52 3 0 1 33 34 0 20 5 0 1 7 0 16 0 52 8 0 1 1 9 0 52 6 0 3 48 1 5 51 11 0 16 0 52 10 0 2 32 1 0 2 50)} "offline-pending-count" {:upvalue-count 0 :arity 0 :constants ("len" "filter" {:upvalue-count 0 :arity 1 :constants ("=" "get" "status" "pending") :bytecode (16 0 1 2 0 52 1 0 2 1 3 0 52 0 0 2 50)} "_offline-queue") :bytecode (51 2 0 20 3 0 52 1 0 2 52 0 0 1 50)} "offline-aware-mutation" {:upvalue-count 0 :arity 6 :constants ("_is-online" "submit-mutation" "offline-queue-mutation" "queued") :bytecode (20 0 0 33 20 0 20 1 0 16 0 16 1 16 2 16 3 16 4 16 5 49 6 32 32 0 20 2 0 16 2 16 3 16 0 16 1 16 4 48 5 5 16 5 33 10 0 16 5 1 3 0 49 1 32 1 0 2 50)} "current-page-layout" {:upvalue-count 0 :arity 0 :constants ("url-pathname" "browser-location-href" "find-matching-route" "_page-routes" "nil?" "" "get" "layout") :bytecode (20 0 0 20 1 0 48 0 48 1 17 0 20 2 0 16 0 20 3 0 48 2 17 1 16 1 52 4 0 1 33 6 0 1 5 0 32 17 0 16 1 1 7 0 52 6 0 2 6 34 4 0 5 1 5 0 50)} "swap-rendered-content" {:upvalue-count 0 :arity 3 :constants ("dom-create-element" "div" "dom-append" "process-oob-swaps" {:upvalue-count 0 :arity 3 :constants ("dispose-islands-in" "swap-dom-nodes" "=" "innerHTML" "children-to-fragment" "post-swap") :bytecode (20 0 0 16 0 48 1 5 20 1 0 16 0 16 2 1 3 0 52 2 0 2 33 10 0 20 4 0 16 1 48 1 32 2 0 16 1 16 2 48 3 5 20 5 0 16 0 49 1 50)} "dom-get-attr" "id" "dom-query" "str" "#" "children-to-fragment" "dispose-islands-in" "dom-set-text-content" "" "hoist-head-elements-full" "process-elements" "sx-hydrate-elements" "sx-hydrate-islands" "run-post-render-hooks" "dom-dispatch" "sx:clientRoute" "dict" "pathname" "log-info" "sx:route client ") :bytecode (20 0 0 1 1 0 2 48 2 17 3 20 2 0 16 3 16 1 48 2 5 20 3 0 16 3 51 4 0 48 2 5 20 5 0 16 0 1 6 0 48 2 17 4 16 4 33 19 0 20 7 0 16 3 1 9 0 16 4 52 8 0 2 48 2 32 1 0 2 17 5 16 5 33 10 0 20 10 0 16 5 48 1 32 7 0 20 10 0 16 3 48 1 17 6 20 11 0 16 0 48 1 5 20 12 0 16 0 1 13 0 48 2 5 20 2 0 16 0 16 6 48 2 5 20 14 0 16 0 48 1 5 20 15 0 16 0 48 1 5 20 16 0 16 0 48 1 5 20 17 0 16 0 48 1 5 20 18 0 48 0 5 20 19 0 16 0 1 20 0 1 22 0 16 2 52 21 0 2 48 3 5 20 23 0 1 24 0 16 2 52 8 0 2 49 1 50)} "resolve-route-target" {:upvalue-count 0 :arity 1 :constants ("not" "=" "true" "dom-query") :bytecode (16 0 6 33 14 0 5 16 0 1 2 0 52 1 0 2 52 0 0 1 33 10 0 20 3 0 16 0 49 1 32 1 0 2 50)} "deps-satisfied?" {:upvalue-count 0 :arity 1 :constants ("get" "deps" "loaded-component-names" "nil?" "empty?" "every?" {:upvalue-count 1 :arity 1 :constants ("contains?") :bytecode (18 0 16 0 52 0 0 2 50)}) :bytecode (16 0 1 1 0 52 0 0 2 17 1 20 2 0 48 0 17 2 16 1 52 3 0 1 33 4 0 4 32 24 0 16 1 52 4 0 1 33 4 0 3 32 11 0 51 6 0 1 2 16 1 52 5 0 2 50)} "try-client-route" {:upvalue-count 0 :arity 2 :constants ("find-matching-route" "_page-routes" "nil?" "log-info" "str" "sx:route no match (" "len" " routes) " "get" "layout" "" "current-page-layout" "not" "=" "sx:route server (layout: " " -> " ") " "content" "closure" "params" "name" "empty?" "log-warn" "sx:route no content for " "resolve-route-target" "sx:route target not found: " "deps-satisfied?" "sx:route deps miss for " "io-deps" "render-plan" "server" "list" "client" "sx:route plan " " — " " server, " " client" "register-io-deps" "stream" "sx:route streaming " "fetch-streaming" "build-request-headers" "loaded-component-names" "has-data" "page-data-cache-key" "page-data-cache-get" "merge" "sx:route client+cache+async " "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route cache+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 45 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 48 2 1 8 0 49 4 32 11 0 20 9 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "sx:route cached eval failed for " "sx:route client+cache " "swap-rendered-content" "sx:route client+data " "resolve-page-data" {:upvalue-count 7 :arity 1 :constants ("page-data-cache-set" "merge" "try-async-eval-content" {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route data+async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 45 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 48 2 1 8 0 49 4 32 11 0 20 9 0 18 1 16 0 18 0 49 3 50)} "try-eval-content" "nil?" "log-warn" "str" "sx:route data eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (20 0 0 18 0 16 0 48 2 5 18 1 18 2 16 0 52 1 0 3 17 1 18 3 33 19 0 20 2 0 18 4 16 1 51 3 0 0 5 0 6 49 3 32 76 0 20 4 0 18 4 16 1 48 2 17 2 16 2 52 5 0 1 33 45 0 20 6 0 1 8 0 18 5 1 9 0 52 7 0 3 48 1 5 20 10 0 18 6 18 5 20 11 0 18 6 20 12 0 48 0 48 2 1 13 0 49 4 32 11 0 20 14 0 18 6 16 2 18 5 49 3 50)} "sx:route client+async " {:upvalue-count 2 :arity 1 :constants ("nil?" "log-warn" "str" "sx:route async eval failed for " " — server fallback" "fetch-and-restore" "build-request-headers" "loaded-component-names" 0 "swap-rendered-content") :bytecode (16 0 52 0 0 1 33 45 0 20 1 0 1 3 0 18 0 1 4 0 52 2 0 3 48 1 5 20 5 0 18 1 18 0 20 6 0 18 1 20 7 0 48 0 48 2 1 8 0 49 4 32 11 0 20 9 0 18 1 16 0 18 0 49 3 50)} "sx:route server (eval failed) ") :bytecode (20 0 0 16 0 20 1 0 48 2 17 2 16 2 52 2 0 1 33 29 0 20 3 0 1 5 0 20 1 0 52 6 0 1 1 7 0 16 0 52 4 0 4 48 1 5 4 32 230 2 16 2 1 9 0 52 8 0 2 6 34 4 0 5 1 10 0 17 3 20 11 0 48 0 17 4 16 3 16 4 52 13 0 2 52 12 0 1 33 29 0 20 3 0 1 14 0 16 4 1 15 0 16 3 1 16 0 16 0 52 4 0 6 48 1 5 4 32 160 2 16 2 1 17 0 52 8 0 2 17 5 16 2 1 18 0 52 8 0 2 6 34 4 0 5 65 0 0 17 6 16 2 1 19 0 52 8 0 2 17 7 16 2 1 20 0 52 8 0 2 17 8 16 5 52 2 0 1 6 34 7 0 5 16 5 52 21 0 1 33 19 0 20 22 0 1 23 0 16 0 52 4 0 2 48 1 5 4 32 69 2 20 24 0 16 1 48 1 17 9 16 9 52 2 0 1 33 19 0 20 22 0 1 25 0 16 1 52 4 0 2 48 1 5 4 32 32 2 20 26 0 16 2 48 1 52 12 0 1 33 19 0 20 3 0 1 27 0 16 8 52 4 0 2 48 1 5 4 32 255 1 16 2 1 28 0 52 8 0 2 17 10 16 10 6 33 11 0 5 16 10 52 21 0 1 52 12 0 1 17 11 16 2 1 29 0 52 8 0 2 17 12 16 12 33 78 0 16 12 1 30 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 13 16 12 1 32 0 52 8 0 2 6 34 5 0 5 52 31 0 0 17 14 20 3 0 1 33 0 16 8 1 34 0 16 13 52 6 0 1 1 35 0 16 14 52 6 0 1 1 36 0 52 4 0 7 48 1 32 1 0 2 5 16 11 33 10 0 20 37 0 16 10 48 1 32 1 0 2 5 16 2 1 38 0 52 8 0 2 33 41 0 20 3 0 1 39 0 16 0 52 4 0 2 48 1 5 20 40 0 16 9 16 0 20 41 0 16 9 20 42 0 48 0 48 2 48 3 5 3 32 59 1 16 2 1 43 0 52 8 0 2 33 194 0 20 44 0 16 8 16 7 48 2 17 13 20 45 0 16 13 48 1 17 14 16 14 33 123 0 16 6 16 7 16 14 52 46 0 3 17 15 16 11 33 36 0 20 3 0 1 47 0 16 0 52 4 0 2 48 1 5 20 48 0 16 5 16 15 51 49 0 1 0 1 9 48 3 5 3 32 67 0 20 50 0 16 5 16 15 48 2 17 16 16 16 52 2 0 1 33 19 0 20 22 0 1 51 0 16 0 52 4 0 2 48 1 5 4 32 28 0 20 3 0 1 52 0 16 0 52 4 0 2 48 1 5 20 53 0 16 9 16 16 16 0 48 3 5 3 32 43 0 20 3 0 1 54 0 16 0 52 4 0 2 48 1 5 20 55 0 16 8 16 7 51 56 0 1 13 1 6 1 7 1 11 1 5 1 0 1 9 48 3 5 3 32 109 0 16 11 33 42 0 20 3 0 1 57 0 16 0 52 4 0 2 48 1 5 20 48 0 16 5 16 6 16 7 52 46 0 2 51 58 0 1 0 1 9 48 3 5 3 32 62 0 16 6 16 7 52 46 0 2 17 13 20 50 0 16 5 16 13 48 2 17 14 16 14 52 2 0 1 33 19 0 20 3 0 1 59 0 16 0 52 4 0 2 48 1 5 4 32 13 0 20 53 0 16 9 16 14 16 0 48 3 5 3 50)} "bind-client-route-link" {:upvalue-count 0 :arity 2 :constants ("bind-client-route-click" {:upvalue-count 2 :arity 0 :constants ("bind-boost-link") :bytecode (20 0 0 18 0 18 1 49 2 50)}) :bytecode (20 0 0 16 0 16 1 51 1 0 1 0 1 1 49 3 50)} "process-sse" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "sse" "mark-processed!" "bind-sse") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 49 1 32 1 0 2 50)} "dom-query-all" "dom-body" "[sx-sse]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-sse" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-sse" "event-source-connect" "parse-sse-swap" "event-source-listen" {:upvalue-count 1 :arity 1 :constants ("bind-sse-swap") :bytecode (20 0 0 18 0 16 0 49 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 37 0 20 2 0 16 1 16 0 48 2 17 2 20 3 0 16 0 48 1 17 3 20 4 0 16 2 16 3 51 5 0 1 0 49 3 32 1 0 2 50)} "bind-sse-swap" {:upvalue-count 0 :arity 2 :constants ("resolve-target" "parse-swap-spec" "dom-get-attr" "sx-swap" "dom-has-class?" "dom-body" "sx-transitions" "get" "style" "transition" "trim" "not" "empty?" "dispose-islands-in" "starts-with?" "(" "sx-render" "dom-create-element" "div" "dom-append" "with-transition" {:upvalue-count 3 :arity 0 :constants ("swap-dom-nodes" "children-to-fragment" "post-swap") :bytecode (20 0 0 18 0 20 1 0 18 1 48 1 18 2 48 3 5 20 2 0 18 0 49 1 50)} {:upvalue-count 3 :arity 0 :constants ("swap-html-string" "post-swap") :bytecode (20 0 0 18 0 18 1 18 2 48 3 5 20 1 0 18 0 49 1 50)}) :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 20 2 0 16 0 1 3 0 48 2 20 4 0 20 5 0 48 0 1 6 0 48 2 48 2 17 3 16 3 1 8 0 52 7 0 2 17 4 16 3 1 9 0 52 7 0 2 17 5 16 1 52 10 0 1 17 6 16 6 52 12 0 1 52 11 0 1 33 88 0 20 13 0 16 2 48 1 5 16 6 1 15 0 52 14 0 2 33 49 0 20 16 0 16 6 48 1 17 7 20 17 0 1 18 0 2 48 2 17 8 20 19 0 16 8 16 7 48 2 5 20 20 0 16 5 51 21 0 1 2 1 8 1 4 49 2 32 16 0 20 20 0 16 5 51 22 0 1 2 1 6 1 4 49 2 32 1 0 2 50)} "bind-inline-handlers" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 0 :arity 1 :constants ("for-each" {:upvalue-count 1 :arity 1 :constants ("first" "nth" 1 "starts-with?" "sx-on:" "slice" 6 "after" "before" "str" "sx:" "not" "is-processed?" "on:" "mark-processed!" "dom-on" "contains?" "." {:upvalue-count 2 :arity 1 :constants ("host-call" "dom-window" "Function" "event" "call") :bytecode (20 0 0 20 0 0 20 1 0 48 0 1 2 0 1 3 0 18 0 48 4 1 4 0 18 1 16 0 49 4 50)} "parse" {:upvalue-count 2 :arity 1 :constants ("make-env" "env-bind!" "event" "this" "detail" "event-detail" "for-each" {:upvalue-count 1 :arity 1 :constants ("eval-expr") :bytecode (16 0 18 0 52 0 0 2 50)}) :bytecode (20 0 0 48 0 17 1 16 1 1 2 0 16 0 52 1 0 3 5 16 1 1 3 0 18 0 52 1 0 3 5 16 1 1 4 0 20 5 0 16 0 48 1 52 1 0 3 5 51 7 0 1 1 18 1 52 6 0 2 50)}) :bytecode (16 0 52 0 0 1 17 1 16 0 1 2 0 52 1 0 2 17 2 16 1 1 4 0 52 3 0 2 33 146 0 16 1 1 6 0 52 5 0 2 17 4 16 4 1 7 0 52 3 0 2 6 34 10 0 5 16 4 1 8 0 52 3 0 2 33 12 0 1 10 0 16 4 52 9 0 2 32 2 0 16 4 17 3 20 12 0 18 0 1 13 0 16 3 52 9 0 2 48 2 52 11 0 1 33 66 0 20 14 0 18 0 1 13 0 16 3 52 9 0 2 48 2 5 20 15 0 18 0 16 3 16 2 1 17 0 52 16 0 2 33 10 0 51 18 0 1 2 0 0 32 15 0 16 2 52 19 0 1 17 4 51 20 0 0 0 1 4 49 3 32 1 0 2 32 1 0 2 50)} "dom-attr-list") :bytecode (51 1 0 1 0 20 2 0 16 0 48 1 52 0 0 2 50)} "dom-query-all" "dom-body" "[sx-on\\:]") :bytecode (51 1 0 20 2 0 16 0 6 34 6 0 5 20 3 0 48 0 1 4 0 48 2 52 0 0 2 50)} "bind-preload-for" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-preload" "=" "mousedown" "list" "touchstart" "mouseover" 0 100 "bind-preload" {:upvalue-count 1 :arity 0 :constants ("get-verb-info" "do-preload" "get" "url" "build-request-headers" "loaded-component-names") :bytecode (20 0 0 18 0 48 1 17 0 16 0 33 29 0 20 1 0 16 0 1 3 0 52 2 0 2 20 4 0 18 0 20 5 0 48 0 48 2 49 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 76 0 16 1 1 3 0 52 2 0 2 33 13 0 1 3 0 1 5 0 52 4 0 2 32 7 0 1 6 0 52 4 0 1 17 2 16 1 1 3 0 52 2 0 2 33 6 0 1 7 0 32 3 0 1 8 0 17 3 20 9 0 16 0 16 2 16 3 51 10 0 1 0 49 4 32 1 0 2 50)} "do-preload" {:upvalue-count 0 :arity 2 :constants ("nil?" "preload-cache-get" "_preload-cache" "fetch-preload") :bytecode (20 1 0 20 2 0 16 0 48 2 52 0 0 1 33 15 0 20 3 0 16 0 16 1 20 2 0 49 3 32 1 0 2 50)} "VERB_SELECTOR" "str" "[sx-get],[sx-post],[sx-put],[sx-delete],[sx-patch]" "process-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "VERB_SELECTOR" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "verb" "process-one" "mark-processed!") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 21 0 20 3 0 16 0 48 1 5 20 4 0 16 0 1 2 0 49 2 32 1 0 2 50)} "process-boosted" "process-sse" "bind-inline-handlers" "process-emit-elements") :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 20 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 5 20 5 0 16 0 48 1 5 20 6 0 16 0 48 1 5 20 7 0 16 0 48 1 5 20 8 0 16 0 49 1 50)} "process-one" {:upvalue-count 0 :arity 1 :constants ("get-verb-info" "not" "dom-has-attr?" "sx-disable" "bind-triggers" "bind-preload-for") :bytecode (20 0 0 16 0 48 1 17 1 16 1 33 49 0 20 2 0 16 0 1 3 0 48 2 52 1 0 1 33 28 0 20 4 0 16 0 16 1 48 2 5 20 5 0 16 0 48 1 5 20 5 0 16 0 49 1 32 1 0 2 32 1 0 2 50)} "process-emit-elements" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "dom-body" "[data-sx-emit]" "for-each" {:upvalue-count 0 :arity 1 :constants ("not" "is-processed?" "emit" "mark-processed!" "dom-get-attr" "data-sx-emit" "dom-on" "click" {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "data-sx-emit-detail" "json-parse" "dict" "dom-dispatch") :bytecode (20 0 0 18 0 1 1 0 48 2 17 1 16 1 33 10 0 20 2 0 16 1 48 1 32 4 0 52 3 0 0 17 2 20 4 0 18 0 18 1 16 2 49 3 50)}) :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 33 52 0 20 3 0 16 0 1 2 0 48 2 5 20 4 0 16 0 1 5 0 48 2 17 1 16 1 33 20 0 20 6 0 16 0 1 7 0 51 8 0 1 0 1 1 49 3 32 1 0 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 6 34 6 0 5 20 1 0 48 0 1 2 0 48 2 17 1 51 4 0 16 1 52 3 0 2 50)} "save-scroll-position" {:upvalue-count 0 :arity 0 :constants ("host-get" "dom-window" "scrollY" "browser-replace-state" "dict" "" "browser-location-href") :bytecode (20 0 0 20 1 0 48 0 1 2 0 48 2 17 0 20 3 0 1 2 0 16 0 52 4 0 2 1 5 0 20 6 0 48 0 49 3 50)} "handle-popstate" {:upvalue-count 0 :arity 1 :constants ("browser-location-href" "dom-query" "[sx-boost]" "dom-get-attr" "sx-boost" "not" "=" "true" "#sx-content" "url-pathname" "dict" "SX-Request" "fetch-and-restore") :bytecode (20 0 0 48 0 17 1 20 1 0 1 2 0 48 1 17 2 16 2 33 46 0 20 3 0 16 2 1 4 0 48 2 17 4 16 4 6 33 14 0 5 16 4 1 7 0 52 6 0 2 52 5 0 1 33 5 0 16 4 32 3 0 1 8 0 32 3 0 1 8 0 17 3 20 1 0 16 3 48 1 17 4 20 9 0 16 1 48 1 17 5 16 4 33 28 0 1 11 0 1 7 0 52 10 0 2 17 6 20 12 0 16 4 16 1 16 6 16 0 49 4 32 1 0 2 50)} "engine-init" {:upvalue-count 0 :arity 0 :constants ("sx-process-scripts" "sx-hydrate" "process-elements") :bytecode (20 0 0 2 48 1 5 20 1 0 2 48 1 5 20 2 0 2 49 1 50)} {:library (web orchestration) :op "import"}) :bytecode (1 0 0 112 5 1 1 0 112 5 1 2 0 112 5 1 3 0 112 5 1 4 0 112 5 52 6 0 0 128 5 0 5 51 8 0 128 7 0 5 51 10 0 128 9 0 5 51 12 0 128 11 0 5 51 14 0 128 13 0 5 51 16 0 128 15 0 5 51 18 0 128 17 0 5 51 20 0 128 19 0 5 51 22 0 128 21 0 5 51 24 0 128 23 0 5 51 26 0 128 25 0 5 51 28 0 128 27 0 5 51 30 0 128 29 0 5 51 32 0 128 31 0 5 51 34 0 128 33 0 5 51 36 0 128 35 0 5 51 38 0 128 37 0 5 51 40 0 128 39 0 5 52 6 0 0 128 41 0 5 1 43 0 128 42 0 5 51 45 0 128 44 0 5 51 47 0 128 46 0 5 51 49 0 128 48 0 5 51 51 0 128 50 0 5 51 53 0 128 52 0 5 51 55 0 128 54 0 5 51 57 0 128 56 0 5 52 6 0 0 128 58 0 5 51 60 0 128 59 0 5 51 62 0 128 61 0 5 51 64 0 128 63 0 5 51 66 0 128 65 0 5 3 128 67 0 5 52 69 0 0 128 68 0 5 51 71 0 128 70 0 5 51 73 0 128 72 0 5 51 75 0 128 74 0 5 51 77 0 128 76 0 5 51 79 0 128 78 0 5 51 81 0 128 80 0 5 51 83 0 128 82 0 5 51 85 0 128 84 0 5 51 87 0 128 86 0 5 51 89 0 128 88 0 5 51 91 0 128 90 0 5 51 93 0 128 92 0 5 51 95 0 128 94 0 5 51 97 0 128 96 0 5 51 99 0 128 98 0 5 51 101 0 128 100 0 5 51 103 0 128 102 0 5 51 105 0 128 104 0 5 1 108 0 52 107 0 1 128 106 0 5 51 110 0 128 109 0 5 51 112 0 128 111 0 5 51 114 0 128 113 0 5 51 116 0 128 115 0 5 51 118 0 128 117 0 5 51 120 0 128 119 0 5 1 121 0 112 50))) diff --git a/shared/static/wasm/sx/router.sx b/shared/static/wasm/sx/router.sx index 2b8311d6..0527791b 100644 --- a/shared/static/wasm/sx/router.sx +++ b/shared/static/wasm/sx/router.sx @@ -18,7 +18,8 @@ ;; "/docs/" → ("docs") -(define-library (web router) +(define-library + (web router) (export split-path-segments make-route-segment @@ -57,671 +58,503 @@ auto-quote-unknowns prepare-url-expr) (begin - -(define split-path-segments :effects [] - (fn ((path :as string)) - (let ((trimmed (if (starts-with? path "/") (slice path 1) path))) - (let ((trimmed2 (if (and (not (empty? trimmed)) - (ends-with? trimmed "/")) - (slice trimmed 0 (- (len trimmed) 1)) - trimmed))) - (if (empty? trimmed2) + (define + split-path-segments + :effects () + (fn + ((path :as string)) + (let + ((trimmed (if (starts-with? path "/") (slice path 1) path))) + (let + ((trimmed2 (if (and (not (empty? trimmed)) (ends-with? trimmed "/")) (slice trimmed 0 (- (len trimmed) 1)) trimmed))) + (if (empty? trimmed2) (list) (split trimmed2 "/")))))) + (define + make-route-segment + :effects () + (fn + ((seg :as string)) + (if + (and (starts-with? seg "<") (ends-with? seg ">")) + (let + ((param-name (slice seg 1 (- (len seg) 1)))) + (let + ((d {})) + (dict-set! d "type" "param") + (dict-set! d "value" param-name) + d)) + (let + ((d {})) + (dict-set! d "type" "literal") + (dict-set! d "value" seg) + d)))) + (define + parse-route-pattern + :effects () + (fn + ((pattern :as string)) + (let + ((segments (split-path-segments pattern))) + (map make-route-segment segments)))) + (define + match-route-segments + :effects () + (fn + ((path-segs :as list) (parsed-segs :as list)) + (if + (not (= (len path-segs) (len parsed-segs))) + nil + (let + ((params {}) (matched true)) + (for-each-indexed + (fn + ((i :as number) (parsed-seg :as dict)) + (when + matched + (let + ((path-seg (nth path-segs i)) + (seg-type (get parsed-seg "type"))) + (cond + (= seg-type "literal") + (when + (not (= path-seg (get parsed-seg "value"))) + (set! matched false)) + (= seg-type "param") + (dict-set! params (get parsed-seg "value") path-seg) + :else (set! matched false))))) + parsed-segs) + (if matched params nil))))) + (define + match-route + :effects () + (fn + ((path :as string) (pattern :as string)) + (let + ((path-segs (split-path-segments path)) + (parsed-segs (parse-route-pattern pattern))) + (match-route-segments path-segs parsed-segs)))) + (define + find-matching-route + :effects () + (fn + ((path :as string) (routes :as list)) + (let + ((match-path (let ((paren-idx (index-of path "/("))) (if (> paren-idx 0) (or (sx-url-to-path (slice path paren-idx (len path))) path) (if (starts-with? path "/(") (or (sx-url-to-path path) path) path))))) + (let + ((path-segs (split-path-segments match-path)) (result nil)) + (for-each + (fn + ((route :as dict)) + (when + (nil? result) + (let + ((params (match-route-segments path-segs (get route "parsed")))) + (when + (not (nil? params)) + (let + ((matched (merge route {}))) + (dict-set! matched "params" params) + (set! result matched)))))) + routes) + result)))) + (define + _fn-to-segment + :effects () + (fn + ((name :as string)) + (case + name + "doc" + "docs" + "spec" + "specs" + "bootstrapper" + "bootstrappers" + "test" + "testing" + "example" + "examples" + "protocol" + "protocols" + "essay" + "essays" + "plan" + "plans" + "reference-detail" + "reference" + :else name))) + (define + sx-url-to-path + :effects () + (fn + ((url :as string)) + (if + (not (and (starts-with? url "/(") (ends-with? url ")"))) + nil + (let + ((inner (slice url 2 (- (len url) 1)))) + (let + ((s (replace (replace (replace inner "." "/") "(" "") ")" ""))) + (let + ((segs (filter (fn (s) (not (empty? s))) (split s "/")))) + (str "/" (join "/" (map _fn-to-segment segs))))))))) + (define + _count-leading-dots + :effects () + (fn + ((s :as string)) + (if + (empty? s) + 0 + (if + (starts-with? s ".") + (+ 1 (_count-leading-dots (slice s 1))) + 0)))) + (define + _strip-trailing-close + :effects () + (fn + ((s :as string)) + (if + (ends-with? s ")") + (_strip-trailing-close (slice s 0 (- (len s) 1))) + s))) + (define + _index-of-safe + :effects () + (fn + ((s :as string) (needle :as string)) + (let + ((idx (index-of s needle))) + (if (or (nil? idx) (< idx 0)) nil idx)))) + (define + _last-index-of + :effects () + (fn + ((s :as string) (needle :as string)) + (let + ((idx (_index-of-safe s needle))) + (if + (nil? idx) + nil + (let + ((rest-idx (_last-index-of (slice s (+ idx 1)) needle))) + (if (nil? rest-idx) idx (+ (+ idx 1) rest-idx))))))) + (define + _pop-sx-url-level + :effects () + (fn + ((url :as string)) + (let + ((stripped (_strip-trailing-close url)) + (close-count (- (len url) (len (_strip-trailing-close url))))) + (if + (<= close-count 1) + "/" + (let + ((last-dp (_last-index-of stripped ".("))) + (if + (nil? last-dp) + "/" + (str + (slice stripped 0 last-dp) + (slice url (- (len url) (- close-count 1)))))))))) + (define + _pop-sx-url-levels + :effects () + (fn + ((url :as string) (n :as number)) + (if + (<= n 0) + url + (_pop-sx-url-levels (_pop-sx-url-level url) (- n 1))))) + (define + _split-pos-kw + :effects () + (fn + ((tokens :as list) (i :as number) (pos :as list) (kw :as list)) + (if + (>= i (len tokens)) + {:positional (join "." pos) :keywords kw} + (let + ((tok (nth tokens i))) + (if + (starts-with? tok ":") + (let + ((val (if (< (+ i 1) (len tokens)) (nth tokens (+ i 1)) ""))) + (_split-pos-kw + tokens + (+ i 2) + pos + (append kw (list (list tok val))))) + (_split-pos-kw tokens (+ i 1) (append pos (list tok)) kw)))))) + (define + _parse-relative-body + :effects () + (fn + ((body :as string)) + (if + (empty? body) + {:positional "" :keywords (list)} + (_split-pos-kw (split body ".") 0 (list) (list))))) + (define + _extract-innermost + :effects () + (fn + ((url :as string)) + (let + ((stripped (_strip-trailing-close url)) + (suffix (slice url (len (_strip-trailing-close url))))) + (let + ((last-dp (_last-index-of stripped ".("))) + (if (nil? last-dp) {:before "/(" :content (slice stripped 2) :suffix suffix} {:before (slice stripped 0 (+ last-dp 2)) :content (slice stripped (+ last-dp 2)) :suffix suffix}))))) + (define + _find-kw-in-tokens + :effects () + (fn + ((tokens :as list) (i :as number) (kw :as string)) + (if + (>= i (len tokens)) + nil + (if + (and (= (nth tokens i) kw) (< (+ i 1) (len tokens))) + (nth tokens (+ i 1)) + (_find-kw-in-tokens tokens (+ i 1) kw))))) + (define + _find-keyword-value + :effects () + (fn + ((content :as string) (kw :as string)) + (_find-kw-in-tokens (split content ".") 0 kw))) + (define + _replace-kw-in-tokens + :effects () + (fn + ((tokens :as list) + (i :as number) + (kw :as string) + (value :as string)) + (if + (>= i (len tokens)) (list) - (split trimmed2 "/")))))) - - -;; -------------------------------------------------------------------------- -;; 2. Parse Flask-style route pattern into segment descriptors -;; -------------------------------------------------------------------------- -;; "/docs/" → ({"type" "literal" "value" "docs"} -;; {"type" "param" "value" "slug"}) - -(define make-route-segment :effects [] - (fn ((seg :as string)) - (if (and (starts-with? seg "<") (ends-with? seg ">")) - (let ((param-name (slice seg 1 (- (len seg) 1)))) - (let ((d {})) - (dict-set! d "type" "param") - (dict-set! d "value" param-name) - d)) - (let ((d {})) - (dict-set! d "type" "literal") - (dict-set! d "value" seg) - d)))) - -(define parse-route-pattern :effects [] - (fn ((pattern :as string)) - (let ((segments (split-path-segments pattern))) - (map make-route-segment segments)))) - - -;; -------------------------------------------------------------------------- -;; 3. Match path segments against parsed pattern -;; -------------------------------------------------------------------------- -;; Returns params dict if match, nil if no match. - -(define match-route-segments :effects [] - (fn ((path-segs :as list) (parsed-segs :as list)) - (if (not (= (len path-segs) (len parsed-segs))) - nil - (let ((params {}) - (matched true)) - (for-each-indexed - (fn ((i :as number) (parsed-seg :as dict)) - (when matched - (let ((path-seg (nth path-segs i)) - (seg-type (get parsed-seg "type"))) - (cond - (= seg-type "literal") - (when (not (= path-seg (get parsed-seg "value"))) - (set! matched false)) - (= seg-type "param") - (dict-set! params (get parsed-seg "value") path-seg) - :else - (set! matched false))))) - parsed-segs) - (if matched params nil))))) - - -;; -------------------------------------------------------------------------- -;; 4. Public API: match a URL path against a pattern string -;; -------------------------------------------------------------------------- -;; Returns params dict (may be empty for exact matches) or nil. - -(define match-route :effects [] - (fn ((path :as string) (pattern :as string)) - (let ((path-segs (split-path-segments path)) - (parsed-segs (parse-route-pattern pattern))) - (match-route-segments path-segs parsed-segs)))) - - -;; -------------------------------------------------------------------------- -;; 5. Search a list of route entries for first match -;; -------------------------------------------------------------------------- -;; Each entry: {"pattern" "/docs/" "parsed" [...] "name" "docs-page" ...} -;; Returns matching entry with "params" added, or nil. - -(define find-matching-route :effects [] - (fn ((path :as string) (routes :as list)) - ;; If path is an SX expression URL, convert to old-style for matching. - (let ((match-path (if (starts-with? path "/(") - (or (sx-url-to-path path) path) - path))) - (let ((path-segs (split-path-segments match-path)) - (result nil)) - (for-each - (fn ((route :as dict)) - (when (nil? result) - (let ((params (match-route-segments path-segs (get route "parsed")))) - (when (not (nil? params)) - (let ((matched (merge route {}))) - (dict-set! matched "params" params) - (set! result matched)))))) - routes) - result)))) - - -;; -------------------------------------------------------------------------- -;; 6. SX expression URL → old-style path conversion -;; -------------------------------------------------------------------------- -;; Converts /(language.(doc.introduction)) → /language/docs/introduction -;; so client-side routing can match SX URLs against Flask-style patterns. - -(define _fn-to-segment :effects [] - (fn ((name :as string)) - (case name - "doc" "docs" - "spec" "specs" - "bootstrapper" "bootstrappers" - "test" "testing" - "example" "examples" - "protocol" "protocols" - "essay" "essays" - "plan" "plans" - "reference-detail" "reference" - :else name))) - -(define sx-url-to-path :effects [] - (fn ((url :as string)) - ;; Convert an SX expression URL to an old-style slash path. - ;; "/(language.(doc.introduction))" → "/language/docs/introduction" - ;; Returns nil for non-SX URLs (those not starting with "/(" ). - (if (not (and (starts-with? url "/(") (ends-with? url ")"))) - nil - (let ((inner (slice url 2 (- (len url) 1)))) - ;; "language.(doc.introduction)" → dots to slashes, strip parens - (let ((s (replace (replace (replace inner "." "/") "(" "") ")" ""))) - ;; "language/doc/introduction" → split, map names, rejoin - (let ((segs (filter (fn (s) (not (empty? s))) (split s "/")))) - (str "/" (join "/" (map _fn-to-segment segs))))))))) - - -;; -------------------------------------------------------------------------- -;; 7. Relative SX URL resolution -;; -------------------------------------------------------------------------- -;; Resolves relative SX URLs against the current absolute URL. -;; This is a macro in the deepest sense: SX transforming SX into SX. -;; The URL is code. Relative resolution is code transformation. -;; -;; Relative URLs start with ( or . : -;; (.slug) → append slug as argument to innermost call -;; (..section) → up 1: replace innermost with new nested call -;; (...section) → up 2: replace 2 innermost levels -;; -;; Bare-dot shorthand (parens optional): -;; .slug → same as (.slug) -;; .. → same as (..) — go up one level -;; ... → same as (...) — go up two levels -;; .:page.4 → same as (.:page.4) — set keyword -;; -;; Dot count semantics (parallels filesystem . and ..): -;; 1 dot = current level (append argument / modify keyword) -;; 2 dots = up 1 level (sibling call) -;; 3 dots = up 2 levels -;; N dots = up N-1 levels -;; -;; Keyword operations (set, delta): -;; (.:page.4) → set :page to 4 at current level -;; (.:page.+1) → increment :page by 1 (delta) -;; (.:page.-1) → decrement :page by 1 (delta) -;; (.slug.:page.1) → append slug AND set :page=1 -;; -;; Examples (current = "/(geography.(hypermedia.(example)))"): -;; (.progress-bar) → /(geography.(hypermedia.(example.progress-bar))) -;; (..reactive.demo) → /(geography.(hypermedia.(reactive.demo))) -;; (...marshes) → /(geography.(marshes)) -;; (..) → /(geography.(hypermedia)) -;; (...) → /(geography) -;; -;; Keyword examples (current = "/(language.(spec.(explore.signals.:page.3)))"): -;; (.:page.4) → /(language.(spec.(explore.signals.:page.4))) -;; (.:page.+1) → /(language.(spec.(explore.signals.:page.4))) -;; (.:page.-1) → /(language.(spec.(explore.signals.:page.2))) -;; (..eval) → /(language.(spec.(eval))) -;; (..eval.:page.1) → /(language.(spec.(eval.:page.1))) - -(define _count-leading-dots :effects [] - (fn ((s :as string)) - (if (empty? s) - 0 - (if (starts-with? s ".") - (+ 1 (_count-leading-dots (slice s 1))) - 0)))) - -(define _strip-trailing-close :effects [] - (fn ((s :as string)) - ;; Strip trailing ) characters: "/(a.(b.(c" from "/(a.(b.(c)))" - (if (ends-with? s ")") - (_strip-trailing-close (slice s 0 (- (len s) 1))) - s))) - -(define _index-of-safe :effects [] - (fn ((s :as string) (needle :as string)) - ;; Wrapper around index-of that normalizes -1 to nil. - ;; (index-of returns -1 on some platforms, nil on others.) - (let ((idx (index-of s needle))) - (if (or (nil? idx) (< idx 0)) nil idx)))) - -(define _last-index-of :effects [] - (fn ((s :as string) (needle :as string)) - ;; Find the last occurrence of needle in s. Returns nil if not found. - (let ((idx (_index-of-safe s needle))) - (if (nil? idx) - nil - (let ((rest-idx (_last-index-of (slice s (+ idx 1)) needle))) - (if (nil? rest-idx) - idx - (+ (+ idx 1) rest-idx))))))) - -(define _pop-sx-url-level :effects [] - (fn ((url :as string)) - ;; Remove the innermost nesting level from an absolute SX URL. - ;; "/(a.(b.(c)))" → "/(a.(b))" - ;; "/(a.(b))" → "/(a)" - ;; "/(a)" → "/" - (let ((stripped (_strip-trailing-close url)) - (close-count (- (len url) (len (_strip-trailing-close url))))) - (if (<= close-count 1) - "/" ;; at root, popping goes to bare root - (let ((last-dp (_last-index-of stripped ".("))) - (if (nil? last-dp) - "/" ;; single-level URL, pop to root - ;; Remove from .( to end of stripped, drop one closing paren - (str (slice stripped 0 last-dp) - (slice url (- (len url) (- close-count 1)))))))))) - -(define _pop-sx-url-levels :effects [] - (fn ((url :as string) (n :as number)) - (if (<= n 0) - url - (_pop-sx-url-levels (_pop-sx-url-level url) (- n 1))))) - - -;; -------------------------------------------------------------------------- -;; 8. Relative URL body parsing — positional vs keyword tokens -;; -------------------------------------------------------------------------- -;; Body "slug.:page.4" → positional "slug", keywords ((:page 4)) -;; Body ":page.+1" → positional "", keywords ((:page +1)) - -(define _split-pos-kw :effects [] - (fn ((tokens :as list) (i :as number) (pos :as list) (kw :as list)) - ;; Walk tokens: non-: tokens are positional, : tokens consume next as value - (if (>= i (len tokens)) - {"positional" (join "." pos) "keywords" kw} - (let ((tok (nth tokens i))) - (if (starts-with? tok ":") - ;; Keyword: take this + next token as a pair - (let ((val (if (< (+ i 1) (len tokens)) - (nth tokens (+ i 1)) - ""))) - (_split-pos-kw tokens (+ i 2) pos - (append kw (list (list tok val))))) - ;; Positional token - (_split-pos-kw tokens (+ i 1) - (append pos (list tok)) - kw)))))) - -(define _parse-relative-body :effects [] - (fn ((body :as string)) - ;; Returns {"positional" "keywords" } - (if (empty? body) - {"positional" "" "keywords" (list)} - (_split-pos-kw (split body ".") 0 (list) (list))))) - - -;; -------------------------------------------------------------------------- -;; 9. Keyword operations on URL expressions -;; -------------------------------------------------------------------------- -;; Extract, find, and modify keyword arguments in the innermost expression. - -(define _extract-innermost :effects [] - (fn ((url :as string)) - ;; Returns {"before" ... "content" ... "suffix" ...} - ;; where before + content + suffix = url - ;; content = the innermost expression's dot-separated tokens - (let ((stripped (_strip-trailing-close url)) - (suffix (slice url (len (_strip-trailing-close url))))) - (let ((last-dp (_last-index-of stripped ".("))) - (if (nil? last-dp) - ;; Single-level: /(content) - {"before" "/(" - "content" (slice stripped 2) - "suffix" suffix} - ;; Multi-level: .../.(content)...) - {"before" (slice stripped 0 (+ last-dp 2)) - "content" (slice stripped (+ last-dp 2)) - "suffix" suffix}))))) - -(define _find-kw-in-tokens :effects [] - (fn ((tokens :as list) (i :as number) (kw :as string)) - ;; Find value of keyword kw in token list. Returns nil if not found. - (if (>= i (len tokens)) - nil - (if (and (= (nth tokens i) kw) - (< (+ i 1) (len tokens))) - (nth tokens (+ i 1)) - (_find-kw-in-tokens tokens (+ i 1) kw))))) - -(define _find-keyword-value :effects [] - (fn ((content :as string) (kw :as string)) - ;; Find keyword's value in dot-separated content string. - ;; "explore.signals.:page.3" ":page" → "3" - (_find-kw-in-tokens (split content ".") 0 kw))) - -(define _replace-kw-in-tokens :effects [] - (fn ((tokens :as list) (i :as number) (kw :as string) (value :as string)) - ;; Replace keyword's value in token list. Returns new token list. - (if (>= i (len tokens)) - (list) - (if (and (= (nth tokens i) kw) - (< (+ i 1) (len tokens))) - ;; Found — keep keyword, replace value, concat rest - (append (list kw value) - (_replace-kw-in-tokens tokens (+ i 2) kw value)) - ;; Not this keyword — keep token, continue - (cons (nth tokens i) + (if + (and (= (nth tokens i) kw) (< (+ i 1) (len tokens))) + (append + (list kw value) + (_replace-kw-in-tokens tokens (+ i 2) kw value)) + (cons + (nth tokens i) (_replace-kw-in-tokens tokens (+ i 1) kw value)))))) - -(define _set-keyword-in-content :effects [] - (fn ((content :as string) (kw :as string) (value :as string)) - ;; Set or replace keyword value in dot-separated content. - ;; "a.b.:page.3" ":page" "4" → "a.b.:page.4" - ;; "a.b" ":page" "1" → "a.b.:page.1" - (let ((current (_find-keyword-value content kw))) - (if (nil? current) - ;; Not found — append - (str content "." kw "." value) - ;; Found — replace - (join "." (_replace-kw-in-tokens (split content ".") 0 kw value)))))) - -(define _is-delta-value? :effects [] - (fn ((s :as string)) - ;; "+1", "-2", "+10" are deltas. "-" alone is not. - (and (not (empty? s)) - (> (len s) 1) - (or (starts-with? s "+") (starts-with? s "-"))))) - -(define _apply-delta :effects [] - (fn ((current-str :as string) (delta-str :as string)) - ;; Apply numeric delta to current value string. - ;; "3" "+1" → "4", "3" "-1" → "2" - (let ((cur (parse-int current-str nil)) - (delta (parse-int delta-str nil))) - (if (or (nil? cur) (nil? delta)) - delta-str ;; fallback: use delta as literal value - (str (+ cur delta)))))) - -(define _apply-kw-pairs :effects [] - (fn ((content :as string) (kw-pairs :as list)) - ;; Apply keyword modifications to content, one at a time. - (if (empty? kw-pairs) - content - (let ((pair (first kw-pairs)) - (kw (first pair)) - (raw-val (nth pair 1))) - (let ((actual-val - (if (_is-delta-value? raw-val) - (let ((current (_find-keyword-value content kw))) - (if (nil? current) - raw-val ;; no current value, treat delta as literal - (_apply-delta current raw-val))) - raw-val))) - (_apply-kw-pairs - (_set-keyword-in-content content kw actual-val) - (rest kw-pairs))))))) - -(define _apply-keywords-to-url :effects [] - (fn ((url :as string) (kw-pairs :as list)) - ;; Apply keyword modifications to the innermost expression of a URL. - (if (empty? kw-pairs) - url - (let ((parts (_extract-innermost url))) - (let ((new-content (_apply-kw-pairs (get parts "content") kw-pairs))) - (str (get parts "before") new-content (get parts "suffix"))))))) - - -;; -------------------------------------------------------------------------- -;; 10. Public API: resolve-relative-url (structural + keywords) -;; -------------------------------------------------------------------------- - -(define _normalize-relative :effects [] - (fn ((url :as string)) - ;; Normalize bare-dot shorthand to paren form. - ;; ".." → "(..)" - ;; ".slug" → "(.slug)" - ;; ".:page.4" → "(.:page.4)" - ;; "(.slug)" → "(.slug)" (already canonical) - (if (starts-with? url "(") - url - (str "(" url ")")))) - -(define resolve-relative-url :effects [] - (fn ((current :as string) (relative :as string)) - ;; current: absolute SX URL "/(geography.(hypermedia.(example)))" - ;; relative: relative SX URL "(.progress-bar)" or ".." or ".:page.+1" - ;; Returns: absolute SX URL - (let ((canonical (_normalize-relative relative))) - (let ((rel-inner (slice canonical 1 (- (len canonical) 1)))) - (let ((dots (_count-leading-dots rel-inner)) - (body (slice rel-inner (_count-leading-dots rel-inner)))) - (if (= dots 0) - current ;; no dots — not a relative URL - ;; Parse body into positional part + keyword pairs - (let ((parsed (_parse-relative-body body)) - (pos-body (get parsed "positional")) - (kw-pairs (get parsed "keywords"))) - ;; Step 1: structural navigation - (let ((after-nav - (if (= dots 1) - ;; One dot = current level - (if (empty? pos-body) - current ;; no positional → stay here (keyword-only) - ;; Append positional part at current level - (let ((stripped (_strip-trailing-close current)) - (suffix (slice current (len (_strip-trailing-close current))))) - (str stripped "." pos-body suffix))) - ;; Two+ dots = pop (dots-1) levels - (let ((base (_pop-sx-url-levels current (- dots 1)))) - (if (empty? pos-body) - base ;; no positional → just pop (cd ..) - (if (= base "/") - (str "/(" pos-body ")") - (let ((stripped (_strip-trailing-close base)) - (suffix (slice base (len (_strip-trailing-close base))))) - (str stripped ".(" pos-body ")" suffix)))))))) - ;; Step 2: apply keyword modifications - (_apply-keywords-to-url after-nav kw-pairs))))))))) - -;; Check if a URL is relative (starts with ( but not /( , or starts with .) -(define relative-sx-url? :effects [] - (fn ((url :as string)) - (or (and (starts-with? url "(") - (not (starts-with? url "/("))) - (starts-with? url ".")))) - - -;; -------------------------------------------------------------------------- -;; 11. URL special forms (! prefix) -;; -------------------------------------------------------------------------- -;; Special forms are meta-operations on URL expressions. -;; Distinguished by `!` prefix to avoid name collisions with sections/pages. -;; -;; Known forms: -;; !source — show defcomp source code -;; !inspect — deps, CSS footprint, render plan, IO -;; !diff — side-by-side comparison of two expressions -;; !search — grep within a page/spec -;; !raw — skip ~sx-doc wrapping, return raw content -;; !json — return content as JSON data -;; -;; URL examples: -;; /(!source.(~essay-sx-sucks)) -;; /(!inspect.(language.(doc.primitives))) -;; /(!diff.(language.(spec.signals)).(language.(spec.eval))) -;; /(!search."define".:in.(language.(spec.signals))) -;; /(!raw.(~some-component)) -;; /(!json.(language.(doc.primitives))) - -(define _url-special-forms :effects [] - (fn () - ;; Returns the set of known URL special form names. - (list "!source" "!inspect" "!diff" "!search" "!raw" "!json"))) - -(define url-special-form? :effects [] - (fn ((name :as string)) - ;; Check if a name is a URL special form (starts with ! and is known). - (and (starts-with? name "!") - (contains? (_url-special-forms) name)))) - -(define parse-sx-url :effects [] - (fn ((url :as string)) - ;; Parse an SX URL into a structured descriptor. - ;; Returns a dict with: - ;; "type" — "home" | "absolute" | "relative" | "special-form" | "direct-component" - ;; "form" — special form name (for special-form type), e.g. "!source" - ;; "inner" — inner URL expression string (without the special form wrapper) - ;; "raw" — original URL string - ;; - ;; Examples: - ;; "/" → {"type" "home" "raw" "/"} - ;; "/(language.(doc.intro))" → {"type" "absolute" "raw" ...} - ;; "(.slug)" → {"type" "relative" "raw" ...} - ;; "..slug" → {"type" "relative" "raw" ...} - ;; "/(!source.(~essay))" → {"type" "special-form" "form" "!source" "inner" "(~essay)" "raw" ...} - ;; "/(~essay-sx-sucks)" → {"type" "direct-component" "name" "~essay-sx-sucks" "raw" ...} - (cond - (= url "/") - {"type" "home" "raw" url} - (relative-sx-url? url) - {"type" "relative" "raw" url} - (and (starts-with? url "/(!") - (ends-with? url ")")) - ;; Special form: /(!source.(~essay)) or /(!diff.a.b) - ;; Extract the form name (first dot-separated token after /() - (let ((inner (slice url 2 (- (len url) 1)))) - ;; inner = "!source.(~essay)" or "!diff.(a).(b)" - (let ((dot-pos (_index-of-safe inner ".")) + (define + _set-keyword-in-content + :effects () + (fn + ((content :as string) (kw :as string) (value :as string)) + (let + ((current (_find-keyword-value content kw))) + (if + (nil? current) + (str content "." kw "." value) + (join "." (_replace-kw-in-tokens (split content ".") 0 kw value)))))) + (define + _is-delta-value? + :effects () + (fn + ((s :as string)) + (and + (not (empty? s)) + (> (len s) 1) + (or (starts-with? s "+") (starts-with? s "-"))))) + (define + _apply-delta + :effects () + (fn + ((current-str :as string) (delta-str :as string)) + (let + ((cur (parse-int current-str nil)) + (delta (parse-int delta-str nil))) + (if (or (nil? cur) (nil? delta)) delta-str (str (+ cur delta)))))) + (define + _apply-kw-pairs + :effects () + (fn + ((content :as string) (kw-pairs :as list)) + (if + (empty? kw-pairs) + content + (let + ((pair (first kw-pairs)) + (kw (first pair)) + (raw-val (nth pair 1))) + (let + ((actual-val (if (_is-delta-value? raw-val) (let ((current (_find-keyword-value content kw))) (if (nil? current) raw-val (_apply-delta current raw-val))) raw-val))) + (_apply-kw-pairs + (_set-keyword-in-content content kw actual-val) + (rest kw-pairs))))))) + (define + _apply-keywords-to-url + :effects () + (fn + ((url :as string) (kw-pairs :as list)) + (if + (empty? kw-pairs) + url + (let + ((parts (_extract-innermost url))) + (let + ((new-content (_apply-kw-pairs (get parts "content") kw-pairs))) + (str (get parts "before") new-content (get parts "suffix"))))))) + (define + _normalize-relative + :effects () + (fn + ((url :as string)) + (if (starts-with? url "(") url (str "(" url ")")))) + (define + resolve-relative-url + :effects () + (fn + ((current :as string) (relative :as string)) + (let + ((canonical (_normalize-relative relative))) + (let + ((rel-inner (slice canonical 1 (- (len canonical) 1)))) + (let + ((dots (_count-leading-dots rel-inner)) + (body (slice rel-inner (_count-leading-dots rel-inner)))) + (if + (= dots 0) + current + (let + ((parsed (_parse-relative-body body)) + (pos-body (get parsed "positional")) + (kw-pairs (get parsed "keywords"))) + (let + ((after-nav (if (= dots 1) (if (empty? pos-body) current (let ((stripped (_strip-trailing-close current)) (suffix (slice current (len (_strip-trailing-close current))))) (str stripped "." pos-body suffix))) (let ((base (_pop-sx-url-levels current (- dots 1)))) (if (empty? pos-body) base (if (= base "/") (str "/(" pos-body ")") (let ((stripped (_strip-trailing-close base)) (suffix (slice base (len (_strip-trailing-close base))))) (str stripped ".(" pos-body ")" suffix)))))))) + (_apply-keywords-to-url after-nav kw-pairs))))))))) + (define + relative-sx-url? + :effects () + (fn + ((url :as string)) + (or + (and (starts-with? url "(") (not (starts-with? url "/("))) + (starts-with? url ".")))) + (define + _url-special-forms + :effects () + (fn () (list "!source" "!inspect" "!diff" "!search" "!raw" "!json"))) + (define + url-special-form? + :effects () + (fn + ((name :as string)) + (and (starts-with? name "!") (contains? (_url-special-forms) name)))) + (define + parse-sx-url + :effects () + (fn + ((url :as string)) + (cond + (= url "/") + {:raw url :type "home"} + (relative-sx-url? url) + {:raw url :type "relative"} + (and (starts-with? url "/(!") (ends-with? url ")")) + (let + ((inner (slice url 2 (- (len url) 1)))) + (let + ((dot-pos (_index-of-safe inner ".")) (paren-pos (_index-of-safe inner "("))) - ;; Form name ends at first . or ( (whichever comes first) - (let ((end-pos (cond - (and (nil? dot-pos) (nil? paren-pos)) (len inner) - (nil? dot-pos) paren-pos - (nil? paren-pos) dot-pos - :else (min dot-pos paren-pos)))) - (let ((form-name (slice inner 0 end-pos)) + (let + ((end-pos (cond (and (nil? dot-pos) (nil? paren-pos)) (len inner) (nil? dot-pos) paren-pos (nil? paren-pos) dot-pos :else (min dot-pos paren-pos)))) + (let + ((form-name (slice inner 0 end-pos)) (rest-part (slice inner end-pos))) - ;; rest-part starts with "." → strip leading dot - (let ((inner-expr (if (starts-with? rest-part ".") - (slice rest-part 1) - rest-part))) - {"type" "special-form" - "form" form-name - "inner" inner-expr - "raw" url}))))) - (and (starts-with? url "/(~") - (ends-with? url ")")) - ;; Direct component: /(~essay-sx-sucks) - (let ((name (slice url 2 (- (len url) 1)))) - {"type" "direct-component" "name" name "raw" url}) - (and (starts-with? url "/(") - (ends-with? url ")")) - {"type" "absolute" "raw" url} - :else - {"type" "path" "raw" url}))) - -(define url-special-form-name :effects [] - (fn ((url :as string)) - ;; Extract the special form name from a URL, or nil if not a special form. - ;; "/(!source.(~essay))" → "!source" - ;; "/(language.(doc))" → nil - (let ((parsed (parse-sx-url url))) - (if (= (get parsed "type") "special-form") - (get parsed "form") - nil)))) - -(define url-special-form-inner :effects [] - (fn ((url :as string)) - ;; Extract the inner expression from a special form URL, or nil. - ;; "/(!source.(~essay))" → "(~essay)" - ;; "/(!diff.(a).(b))" → "(a).(b)" - (let ((parsed (parse-sx-url url))) - (if (= (get parsed "type") "special-form") - (get parsed "inner") - nil)))) - - -;; -------------------------------------------------------------------------- -;; 12. URL expression evaluation -;; -------------------------------------------------------------------------- -;; A URL is an expression. The system is the environment. -;; eval(url, env) — that's it. -;; -;; The only URL-specific pre-processing: -;; 1. Surface syntax → AST (dots to spaces, parse as SX) -;; 2. Auto-quote unknowns (symbols not in env become strings) -;; -;; After that, it's standard eval. The host wires these into its route -;; handlers (Python catch-all, JS client-side navigation). The same -;; functions serve both. - -(define url-to-expr :effects [] - (fn ((url-path :as string)) - ;; Convert a URL path to an SX expression (AST). - ;; - ;; "/sx/(language.(doc.introduction))" → (language (doc introduction)) - ;; "/(language.(doc.introduction))" → (language (doc introduction)) - ;; "/" → (list) ; empty — home - ;; - ;; Steps: - ;; 1. Strip URL prefix ("/sx/" or "/") — host passes the path after prefix - ;; 2. Dots → spaces (URL-safe whitespace encoding) - ;; 3. Parse as SX expression - ;; - ;; The caller is responsible for stripping any app-level prefix. - ;; This function receives the raw expression portion: "(language.(doc.intro))" - ;; or "/" for home. - (if (or (= url-path "/") (empty? url-path)) - (list) - (let ((trimmed (if (starts-with? url-path "/") - (slice url-path 1) - url-path))) - ;; Dots → spaces - (let ((sx-source (replace trimmed "." " "))) - ;; Parse — returns list of expressions, take the first - (let ((exprs (sx-parse sx-source))) - (if (empty? exprs) - (list) - (first exprs)))))))) - - -(define auto-quote-unknowns :effects [] - (fn ((expr :as list) (env :as dict)) - ;; Walk an AST and replace symbols not in env with their name as a string. - ;; This makes URL slugs work without quoting: - ;; (language (doc introduction)) ; introduction is not a function - ;; → (language (doc "introduction")) - ;; - ;; Rules: - ;; - List head (call position) stays as-is — it's a function name - ;; - Tail symbols: if in env, keep as symbol; otherwise, string - ;; - Keywords, strings, numbers, nested lists: pass through - ;; - Non-list expressions: pass through unchanged - (if (not (list? expr)) - expr - (if (empty? expr) - expr - ;; Head stays as symbol (function position), quote the rest - (cons (first expr) - (map (fn (child) - (cond - ;; Nested list — recurse - (list? child) - (auto-quote-unknowns child env) - ;; Symbol — check env - (= (type-of child) "symbol") - (let ((name (symbol-name child))) - (if (or (env-has? env name) - ;; Keep keywords, component refs, special forms - (starts-with? name ":") - (starts-with? name "~") - (starts-with? name "!")) - child - name)) ;; unknown → string - ;; Everything else passes through - :else child)) - (rest expr))))))) - - -(define prepare-url-expr :effects [] - (fn ((url-path :as string) (env :as dict)) - ;; Full pipeline: URL path → ready-to-eval AST. - ;; - ;; "(language.(doc.introduction))" + env - ;; → (language (doc "introduction")) - ;; - ;; The result can be fed directly to eval: - ;; (eval (prepare-url-expr path env) env) - (let ((expr (url-to-expr url-path))) - (if (empty? expr) - expr - (auto-quote-unknowns expr env))))) - - -;; -------------------------------------------------------------------------- -;; Platform interface -;; -------------------------------------------------------------------------- -;; Pure primitives used: -;; split, slice, starts-with?, ends-with?, len, empty?, replace, -;; map, filter, for-each, for-each-indexed, nth, get, dict-set!, merge, -;; list, nil?, not, =, case, join, str, index-of, and, or, cons, -;; first, rest, append, parse-int, contains?, min, cond, -;; symbol?, symbol-name, list?, env-has?, type-of -;; -;; From parser.sx: sx-parse, sx-serialize -;; -------------------------------------------------------------------------- - - -)) ;; end define-library + (let + ((inner-expr (if (starts-with? rest-part ".") (slice rest-part 1) rest-part))) + {:raw url :type "special-form" :inner inner-expr :form form-name}))))) + (and (starts-with? url "/(~") (ends-with? url ")")) + (let ((name (slice url 2 (- (len url) 1)))) {:raw url :type "direct-component" :name name}) + (and (starts-with? url "/(") (ends-with? url ")")) + {:raw url :type "absolute"} + :else {:raw url :type "path"}))) + (define + url-special-form-name + :effects () + (fn + ((url :as string)) + (let + ((parsed (parse-sx-url url))) + (if + (= (get parsed "type") "special-form") + (get parsed "form") + nil)))) + (define + url-special-form-inner + :effects () + (fn + ((url :as string)) + (let + ((parsed (parse-sx-url url))) + (if + (= (get parsed "type") "special-form") + (get parsed "inner") + nil)))) + (define + url-to-expr + :effects () + (fn + ((url-path :as string)) + (if + (or (= url-path "/") (empty? url-path)) + (list) + (let + ((trimmed (if (starts-with? url-path "/") (slice url-path 1) url-path))) + (let + ((sx-source (replace trimmed "." " "))) + (let + ((exprs (sx-parse sx-source))) + (if (empty? exprs) (list) (first exprs)))))))) + (define + auto-quote-unknowns + :effects () + (fn + ((expr :as list) (env :as dict)) + (if + (not (list? expr)) + expr + (if + (empty? expr) + expr + (cons + (first expr) + (map + (fn + (child) + (cond + (list? child) + (auto-quote-unknowns child env) + (= (type-of child) "symbol") + (let + ((name (symbol-name child))) + (if + (or + (env-has? env name) + (starts-with? name ":") + (starts-with? name "~") + (starts-with? name "!")) + child + name)) + :else child)) + (rest expr))))))) + (define + prepare-url-expr + :effects () + (fn + ((url-path :as string) (env :as dict)) + (let + ((expr (url-to-expr url-path))) + (if (empty? expr) expr (auto-quote-unknowns expr env))))))) ;; end define-library ;; Re-export to global namespace for backward compatibility (import (web router)) diff --git a/shared/static/wasm/sx/router.sxbc b/shared/static/wasm/sx/router.sxbc index 0026be78..29f204fc 100644 --- a/shared/static/wasm/sx/router.sxbc +++ b/shared/static/wasm/sx/router.sxbc @@ -1,3 +1,3 @@ -(sxbc 1 "1680d7d100c72a5f" +(sxbc 1 "1943df0157712c44" (code - :constants ("split-path-segments" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "/" "slice" 1 "not" "empty?" "ends-with?" 0 "-" "len" "list" "split") :bytecode (16 0 1 1 0 52 0 0 2 33 12 0 16 0 1 3 0 52 2 0 2 32 2 0 16 0 17 1 16 1 52 5 0 1 52 4 0 1 6 33 10 0 5 16 1 1 1 0 52 6 0 2 33 25 0 16 1 1 7 0 16 1 52 9 0 1 1 3 0 52 8 0 2 52 2 0 3 32 2 0 16 1 17 2 16 2 52 5 0 1 33 7 0 52 10 0 0 32 9 0 16 2 1 1 0 52 11 0 2 50)} "make-route-segment" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "<" "ends-with?" ">" "slice" 1 "-" "len" "dict-set!" "type" "param" "value" "literal") :bytecode (16 0 1 1 0 52 0 0 2 6 33 10 0 5 16 0 1 3 0 52 2 0 2 33 59 0 16 0 1 5 0 16 0 52 7 0 1 1 5 0 52 6 0 2 52 4 0 3 17 1 65 0 0 17 2 16 2 1 9 0 1 10 0 52 8 0 3 5 16 2 1 11 0 16 1 52 8 0 3 5 16 2 32 32 0 65 0 0 17 1 16 1 1 9 0 1 12 0 52 8 0 3 5 16 1 1 11 0 16 0 52 8 0 3 5 16 1 50)} "parse-route-pattern" {:upvalue-count 0 :arity 1 :constants ("split-path-segments" "map" "make-route-segment") :bytecode (20 0 0 16 0 48 1 17 1 20 2 0 16 1 52 1 0 2 50)} "match-route-segments" {:upvalue-count 0 :arity 2 :constants ("not" "=" "len" "for-each-indexed" {:upvalue-count 3 :arity 2 :constants ("nth" "get" "type" "=" "literal" "not" "value" "param" "dict-set!") :bytecode (18 0 33 103 0 18 1 16 0 52 0 0 2 17 2 16 1 1 2 0 52 1 0 2 17 3 16 3 1 4 0 52 3 0 2 33 32 0 16 2 16 1 1 6 0 52 1 0 2 52 3 0 2 52 5 0 1 33 6 0 4 19 0 32 1 0 2 32 35 0 16 3 1 7 0 52 3 0 2 33 20 0 18 2 16 1 1 6 0 52 1 0 2 16 2 52 8 0 3 32 3 0 4 19 0 32 1 0 2 50)}) :bytecode (16 0 52 2 0 1 16 1 52 2 0 1 52 1 0 2 52 0 0 1 33 4 0 2 32 35 0 65 0 0 17 2 3 17 3 51 4 0 1 3 1 0 1 2 16 1 52 3 0 2 5 16 3 33 5 0 16 2 32 1 0 2 50)} "match-route" {:upvalue-count 0 :arity 2 :constants ("split-path-segments" "parse-route-pattern" "match-route-segments") :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 16 1 48 1 17 3 20 2 0 16 2 16 3 49 2 50)} "find-matching-route" {:upvalue-count 0 :arity 2 :constants ("starts-with?" "/(" "sx-url-to-path" "split-path-segments" "for-each" {:upvalue-count 2 :arity 1 :constants ("nil?" "match-route-segments" "get" "parsed" "not" "merge" "dict-set!" "params") :bytecode (18 0 52 0 0 1 33 65 0 20 1 0 18 1 16 0 1 3 0 52 2 0 2 48 2 17 1 16 1 52 0 0 1 52 4 0 1 33 30 0 16 0 65 0 0 52 5 0 2 17 2 16 2 1 7 0 16 1 52 6 0 3 5 16 2 19 0 32 1 0 2 32 1 0 2 50)}) :bytecode (16 0 1 1 0 52 0 0 2 33 17 0 20 2 0 16 0 48 1 6 34 3 0 5 16 0 32 2 0 16 0 17 2 20 3 0 16 2 48 1 17 3 2 17 4 51 5 0 1 4 1 3 16 1 52 4 0 2 5 16 4 50)} "_fn-to-segment" {:upvalue-count 0 :arity 1 :constants ("doc" "=" "docs" "spec" "specs" "bootstrapper" "bootstrappers" "test" "testing" "example" "examples" "protocol" "protocols" "essay" "essays" "plan" "plans" "reference-detail" "reference") :bytecode (16 0 6 1 0 0 52 1 0 2 33 7 0 5 1 2 0 32 147 0 6 1 3 0 52 1 0 2 33 7 0 5 1 4 0 32 129 0 6 1 5 0 52 1 0 2 33 7 0 5 1 6 0 32 111 0 6 1 7 0 52 1 0 2 33 7 0 5 1 8 0 32 93 0 6 1 9 0 52 1 0 2 33 7 0 5 1 10 0 32 75 0 6 1 11 0 52 1 0 2 33 7 0 5 1 12 0 32 57 0 6 1 13 0 52 1 0 2 33 7 0 5 1 14 0 32 39 0 6 1 15 0 52 1 0 2 33 7 0 5 1 16 0 32 21 0 6 1 17 0 52 1 0 2 33 7 0 5 1 18 0 32 3 0 5 16 0 50)} "sx-url-to-path" {:upvalue-count 0 :arity 1 :constants ("not" "starts-with?" "/(" "ends-with?" ")" "slice" 2 "-" "len" 1 "replace" "." "/" "(" "" "filter" {:upvalue-count 0 :arity 1 :constants ("not" "empty?") :bytecode (16 0 52 1 0 1 52 0 0 1 50)} "split" "str" "join" "map" "_fn-to-segment") :bytecode (16 0 1 2 0 52 1 0 2 6 33 10 0 5 16 0 1 4 0 52 3 0 2 52 0 0 1 33 4 0 2 32 99 0 16 0 1 6 0 16 0 52 8 0 1 1 9 0 52 7 0 2 52 5 0 3 17 1 16 1 1 11 0 1 12 0 52 10 0 3 1 13 0 1 14 0 52 10 0 3 1 4 0 1 14 0 52 10 0 3 17 2 51 16 0 16 2 1 12 0 52 17 0 2 52 15 0 2 17 3 1 12 0 1 12 0 20 21 0 16 3 52 20 0 2 52 19 0 2 52 18 0 2 50)} "_count-leading-dots" {:upvalue-count 0 :arity 1 :constants ("empty?" 0 "starts-with?" "." "+" 1 "_count-leading-dots" "slice") :bytecode (16 0 52 0 0 1 33 6 0 1 1 0 32 39 0 16 0 1 3 0 52 2 0 2 33 24 0 1 5 0 20 6 0 16 0 1 5 0 52 7 0 2 48 1 52 4 0 2 32 3 0 1 1 0 50)} "_strip-trailing-close" {:upvalue-count 0 :arity 1 :constants ("ends-with?" ")" "_strip-trailing-close" "slice" 0 "-" "len" 1) :bytecode (16 0 1 1 0 52 0 0 2 33 30 0 20 2 0 16 0 1 4 0 16 0 52 6 0 1 1 7 0 52 5 0 2 52 3 0 3 49 1 32 2 0 16 0 50)} "_index-of-safe" {:upvalue-count 0 :arity 2 :constants ("index-of" "nil?" "<" 0) :bytecode (16 0 16 1 52 0 0 2 17 2 16 2 52 1 0 1 6 34 10 0 5 16 2 1 3 0 52 2 0 2 33 4 0 2 32 2 0 16 2 50)} "_last-index-of" {:upvalue-count 0 :arity 2 :constants ("_index-of-safe" "nil?" "_last-index-of" "slice" "+" 1) :bytecode (20 0 0 16 0 16 1 48 2 17 2 16 2 52 1 0 1 33 4 0 2 32 53 0 20 2 0 16 0 16 2 1 5 0 52 4 0 2 52 3 0 2 16 1 48 2 17 3 16 3 52 1 0 1 33 5 0 16 2 32 15 0 16 2 1 5 0 52 4 0 2 16 3 52 4 0 2 50)} "_pop-sx-url-level" {:upvalue-count 0 :arity 1 :constants ("_strip-trailing-close" "-" "len" "<=" 1 "/" "_last-index-of" ".(" "nil?" "str" "slice" 0) :bytecode (20 0 0 16 0 48 1 17 1 16 0 52 2 0 1 20 0 0 16 0 48 1 52 2 0 1 52 1 0 2 17 2 16 2 1 4 0 52 3 0 2 33 6 0 1 5 0 32 67 0 20 6 0 16 1 1 7 0 48 2 17 3 16 3 52 8 0 1 33 6 0 1 5 0 32 40 0 16 1 1 11 0 16 3 52 10 0 3 16 0 16 0 52 2 0 1 16 2 1 4 0 52 1 0 2 52 1 0 2 52 10 0 2 52 9 0 2 50)} "_pop-sx-url-levels" {:upvalue-count 0 :arity 2 :constants ("<=" 0 "_pop-sx-url-levels" "_pop-sx-url-level" "-" 1) :bytecode (16 1 1 1 0 52 0 0 2 33 5 0 16 0 32 21 0 20 2 0 20 3 0 16 0 48 1 16 1 1 5 0 52 4 0 2 49 2 50)} "_split-pos-kw" {:upvalue-count 0 :arity 4 :constants (">=" "len" "positional" "join" "." "keywords" "nth" "starts-with?" ":" "<" "+" 1 "" "_split-pos-kw" 2 "append" "list") :bytecode (16 1 16 0 52 1 0 1 52 0 0 2 33 23 0 1 2 0 1 4 0 16 2 52 3 0 2 1 5 0 16 3 65 2 0 32 136 0 16 0 16 1 52 6 0 2 17 4 16 4 1 8 0 52 7 0 2 33 84 0 16 1 1 11 0 52 10 0 2 16 0 52 1 0 1 52 9 0 2 33 18 0 16 0 16 1 1 11 0 52 10 0 2 52 6 0 2 32 3 0 1 12 0 17 5 20 13 0 16 0 16 1 1 14 0 52 10 0 2 16 2 16 3 16 4 16 5 52 16 0 2 52 16 0 1 52 15 0 2 49 4 32 30 0 20 13 0 16 0 16 1 1 11 0 52 10 0 2 16 2 16 4 52 16 0 1 52 15 0 2 16 3 49 4 50)} "_parse-relative-body" {:upvalue-count 0 :arity 1 :constants ("empty?" "positional" "" "keywords" "list" "_split-pos-kw" "split" "." 0) :bytecode (16 0 52 0 0 1 33 19 0 1 1 0 1 2 0 1 3 0 52 4 0 0 65 2 0 32 25 0 20 5 0 16 0 1 7 0 52 6 0 2 1 8 0 52 4 0 0 52 4 0 0 49 4 50)} "_extract-innermost" {:upvalue-count 0 :arity 1 :constants ("_strip-trailing-close" "slice" "len" "_last-index-of" ".(" "nil?" "before" "/(" "content" 2 "suffix" 0 "+") :bytecode (20 0 0 16 0 48 1 17 1 16 0 20 0 0 16 0 48 1 52 2 0 1 52 1 0 2 17 2 20 3 0 16 1 1 4 0 48 2 17 3 16 3 52 5 0 1 33 29 0 1 6 0 1 7 0 1 8 0 16 1 1 9 0 52 1 0 2 1 10 0 16 2 65 3 0 32 47 0 1 6 0 16 1 1 11 0 16 3 1 9 0 52 12 0 2 52 1 0 3 1 8 0 16 1 16 3 1 9 0 52 12 0 2 52 1 0 2 1 10 0 16 2 65 3 0 50)} "_find-kw-in-tokens" {:upvalue-count 0 :arity 3 :constants (">=" "len" "=" "nth" "<" "+" 1 "_find-kw-in-tokens") :bytecode (16 1 16 0 52 1 0 1 52 0 0 2 33 4 0 2 32 77 0 16 0 16 1 52 3 0 2 16 2 52 2 0 2 6 33 20 0 5 16 1 1 6 0 52 5 0 2 16 0 52 1 0 1 52 4 0 2 33 18 0 16 0 16 1 1 6 0 52 5 0 2 52 3 0 2 32 18 0 20 7 0 16 0 16 1 1 6 0 52 5 0 2 16 2 49 3 50)} "_find-keyword-value" {:upvalue-count 0 :arity 2 :constants ("_find-kw-in-tokens" "split" "." 0) :bytecode (20 0 0 16 0 1 2 0 52 1 0 2 1 3 0 16 1 49 3 50)} "_replace-kw-in-tokens" {:upvalue-count 0 :arity 4 :constants (">=" "len" "list" "=" "nth" "<" "+" 1 "append" "_replace-kw-in-tokens" 2 "cons") :bytecode (16 1 16 0 52 1 0 1 52 0 0 2 33 7 0 52 2 0 0 32 108 0 16 0 16 1 52 4 0 2 16 2 52 3 0 2 6 33 20 0 5 16 1 1 7 0 52 6 0 2 16 0 52 1 0 1 52 5 0 2 33 35 0 16 2 16 3 52 2 0 2 20 9 0 16 0 16 1 1 10 0 52 6 0 2 16 2 16 3 48 4 52 8 0 2 32 32 0 16 0 16 1 52 4 0 2 20 9 0 16 0 16 1 1 7 0 52 6 0 2 16 2 16 3 48 4 52 11 0 2 50)} "_set-keyword-in-content" {:upvalue-count 0 :arity 3 :constants ("_find-keyword-value" "nil?" "str" "." "join" "_replace-kw-in-tokens" "split" 0) :bytecode (20 0 0 16 0 16 1 48 2 17 3 16 3 52 1 0 1 33 19 0 16 0 1 3 0 16 1 1 3 0 16 2 52 2 0 5 32 28 0 1 3 0 20 5 0 16 0 1 3 0 52 6 0 2 1 7 0 16 1 16 2 48 4 52 4 0 2 50)} "_is-delta-value?" {:upvalue-count 0 :arity 1 :constants ("not" "empty?" ">" "len" 1 "starts-with?" "+" "-") :bytecode (16 0 52 1 0 1 52 0 0 1 6 33 42 0 5 16 0 52 3 0 1 1 4 0 52 2 0 2 6 33 24 0 5 16 0 1 6 0 52 5 0 2 6 34 10 0 5 16 0 1 7 0 52 5 0 2 50)} "_apply-delta" {:upvalue-count 0 :arity 2 :constants ("parse-int" "nil?" "str" "+") :bytecode (16 0 2 52 0 0 2 17 2 16 1 2 52 0 0 2 17 3 16 2 52 1 0 1 6 34 7 0 5 16 3 52 1 0 1 33 5 0 16 1 32 12 0 16 2 16 3 52 3 0 2 52 2 0 1 50)} "_apply-kw-pairs" {:upvalue-count 0 :arity 2 :constants ("empty?" "first" "nth" 1 "_is-delta-value?" "_find-keyword-value" "nil?" "_apply-delta" "_apply-kw-pairs" "_set-keyword-in-content" "rest") :bytecode (16 1 52 0 0 1 33 5 0 16 0 32 100 0 16 1 52 1 0 1 17 2 16 2 52 1 0 1 17 3 16 2 1 3 0 52 2 0 2 17 4 20 4 0 16 4 48 1 33 37 0 20 5 0 16 0 16 3 48 2 17 6 16 6 52 6 0 1 33 5 0 16 4 32 9 0 20 7 0 16 6 16 4 48 2 32 2 0 16 4 17 5 20 8 0 20 9 0 16 0 16 3 16 5 48 3 16 1 52 10 0 1 49 2 50)} "_apply-keywords-to-url" {:upvalue-count 0 :arity 2 :constants ("empty?" "_extract-innermost" "_apply-kw-pairs" "get" "content" "str" "before" "suffix") :bytecode (16 1 52 0 0 1 33 5 0 16 0 32 51 0 20 1 0 16 0 48 1 17 2 20 2 0 16 2 1 4 0 52 3 0 2 16 1 48 2 17 3 16 2 1 6 0 52 3 0 2 16 3 16 2 1 7 0 52 3 0 2 52 5 0 3 50)} "_normalize-relative" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "(" "str" ")") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 12 0 1 1 0 16 0 1 3 0 52 2 0 3 50)} "resolve-relative-url" {:upvalue-count 0 :arity 2 :constants ("_normalize-relative" "slice" 1 "-" "len" "_count-leading-dots" "=" 0 "_parse-relative-body" "get" "positional" "keywords" "empty?" "_strip-trailing-close" "str" "." "_pop-sx-url-levels" "/" "/(" ")" ".(" "_apply-keywords-to-url") :bytecode (20 0 0 16 1 48 1 17 2 16 2 1 2 0 16 2 52 4 0 1 1 2 0 52 3 0 2 52 1 0 3 17 3 20 5 0 16 3 48 1 17 4 16 3 20 5 0 16 3 48 1 52 1 0 2 17 5 16 4 1 7 0 52 6 0 2 33 5 0 16 0 32 215 0 20 8 0 16 5 48 1 17 6 16 6 1 10 0 52 9 0 2 17 7 16 6 1 11 0 52 9 0 2 17 8 16 4 1 2 0 52 6 0 2 33 58 0 16 7 52 12 0 1 33 5 0 16 0 32 41 0 20 13 0 16 0 48 1 17 10 16 0 20 13 0 16 0 48 1 52 4 0 1 52 1 0 2 17 11 16 10 1 15 0 16 7 16 11 52 14 0 4 32 103 0 20 16 0 16 0 16 4 1 2 0 52 3 0 2 48 2 17 10 16 7 52 12 0 1 33 5 0 16 10 32 71 0 16 10 1 17 0 52 6 0 2 33 15 0 1 18 0 16 7 1 19 0 52 14 0 3 32 44 0 20 13 0 16 10 48 1 17 11 16 10 20 13 0 16 10 48 1 52 4 0 1 52 1 0 2 17 12 16 11 1 20 0 16 7 1 19 0 16 12 52 14 0 5 17 9 20 21 0 16 9 16 8 49 2 50)} "relative-sx-url?" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "(" "not" "/(" ".") :bytecode (16 0 1 1 0 52 0 0 2 6 33 14 0 5 16 0 1 3 0 52 0 0 2 52 2 0 1 6 34 10 0 5 16 0 1 4 0 52 0 0 2 50)} "_url-special-forms" {:upvalue-count 0 :arity 0 :constants ("list" "!source" "!inspect" "!diff" "!search" "!raw" "!json") :bytecode (1 1 0 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 52 0 0 6 50)} "url-special-form?" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "!" "contains?" "_url-special-forms") :bytecode (16 0 1 1 0 52 0 0 2 6 33 12 0 5 20 3 0 48 0 16 0 52 2 0 2 50)} "parse-sx-url" {:upvalue-count 0 :arity 1 :constants ("=" "/" "raw" "type" "home" "relative-sx-url?" "relative" "starts-with?" "/(!" "ends-with?" ")" "slice" 2 "-" "len" 1 "_index-of-safe" "." "(" "nil?" "min" 0 "special-form" "inner" "form" "/(~" "direct-component" "name" "/(" "absolute" "path") :bytecode (16 0 1 1 0 52 0 0 2 33 17 0 1 2 0 16 0 1 3 0 1 4 0 65 2 0 32 119 1 20 5 0 16 0 48 1 33 17 0 1 2 0 16 0 1 3 0 1 6 0 65 2 0 32 92 1 16 0 1 8 0 52 7 0 2 6 33 10 0 5 16 0 1 10 0 52 9 0 2 33 193 0 16 0 1 12 0 16 0 52 14 0 1 1 15 0 52 13 0 2 52 11 0 3 17 1 20 16 0 16 1 1 17 0 48 2 17 2 20 16 0 16 1 1 18 0 48 2 17 3 16 2 52 19 0 1 6 33 7 0 5 16 3 52 19 0 1 33 9 0 16 1 52 14 0 1 32 36 0 16 2 52 19 0 1 33 5 0 16 3 32 22 0 16 3 52 19 0 1 33 5 0 16 2 32 8 0 16 2 16 3 52 20 0 2 17 4 16 1 1 21 0 16 4 52 11 0 3 17 5 16 1 16 4 52 11 0 2 17 6 16 6 1 17 0 52 7 0 2 33 12 0 16 6 1 15 0 52 11 0 2 32 2 0 16 6 17 7 1 2 0 16 0 1 3 0 1 22 0 1 23 0 16 7 1 24 0 16 5 65 4 0 32 129 0 16 0 1 25 0 52 7 0 2 6 33 10 0 5 16 0 1 10 0 52 9 0 2 33 46 0 16 0 1 12 0 16 0 52 14 0 1 1 15 0 52 13 0 2 52 11 0 3 17 1 1 2 0 16 0 1 3 0 1 26 0 1 27 0 16 1 65 3 0 32 57 0 16 0 1 28 0 52 7 0 2 6 33 10 0 5 16 0 1 10 0 52 9 0 2 33 17 0 1 2 0 16 0 1 3 0 1 29 0 65 2 0 32 14 0 1 2 0 16 0 1 3 0 1 30 0 65 2 0 50)} "url-special-form-name" {:upvalue-count 0 :arity 1 :constants ("parse-sx-url" "=" "get" "type" "special-form" "form") :bytecode (20 0 0 16 0 48 1 17 1 16 1 1 3 0 52 2 0 2 1 4 0 52 1 0 2 33 12 0 16 1 1 5 0 52 2 0 2 32 1 0 2 50)} "url-special-form-inner" {:upvalue-count 0 :arity 1 :constants ("parse-sx-url" "=" "get" "type" "special-form" "inner") :bytecode (20 0 0 16 0 48 1 17 1 16 1 1 3 0 52 2 0 2 1 4 0 52 1 0 2 33 12 0 16 1 1 5 0 52 2 0 2 32 1 0 2 50)} "url-to-expr" {:upvalue-count 0 :arity 1 :constants ("=" "/" "empty?" "list" "starts-with?" "slice" 1 "replace" "." " " "sx-parse" "first") :bytecode (16 0 1 1 0 52 0 0 2 6 34 7 0 5 16 0 52 2 0 1 33 7 0 52 3 0 0 32 73 0 16 0 1 1 0 52 4 0 2 33 12 0 16 0 1 6 0 52 5 0 2 32 2 0 16 0 17 1 16 1 1 8 0 1 9 0 52 7 0 3 17 2 20 10 0 16 2 48 1 17 3 16 3 52 2 0 1 33 7 0 52 3 0 0 32 6 0 16 3 52 11 0 1 50)} "auto-quote-unknowns" {:upvalue-count 0 :arity 2 :constants ("not" "list?" "empty?" "cons" "first" "map" {:upvalue-count 1 :arity 1 :constants ("list?" "auto-quote-unknowns" "=" "type-of" "symbol" "symbol-name" "env-has?" "starts-with?" ":" "~" "!") :bytecode (16 0 52 0 0 1 33 12 0 20 1 0 16 0 18 0 49 2 32 89 0 16 0 52 3 0 1 1 4 0 52 2 0 2 33 71 0 16 0 52 5 0 1 17 1 18 0 16 1 52 6 0 2 6 34 38 0 5 16 1 1 8 0 52 7 0 2 6 34 24 0 5 16 1 1 9 0 52 7 0 2 6 34 10 0 5 16 1 1 10 0 52 7 0 2 33 5 0 16 0 32 2 0 16 1 32 2 0 16 0 50)} "rest") :bytecode (16 0 52 1 0 1 52 0 0 1 33 5 0 16 0 32 39 0 16 0 52 2 0 1 33 5 0 16 0 32 25 0 16 0 52 4 0 1 51 6 0 1 1 16 0 52 7 0 1 52 5 0 2 52 3 0 2 50)} "prepare-url-expr" {:upvalue-count 0 :arity 2 :constants ("url-to-expr" "empty?" "auto-quote-unknowns") :bytecode (20 0 0 16 0 48 1 17 2 16 2 52 1 0 1 33 5 0 16 2 32 9 0 20 2 0 16 2 16 1 49 2 50)} {:library (web router) :op "import"}) :bytecode (51 1 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 51 39 0 128 38 0 5 51 41 0 128 40 0 5 51 43 0 128 42 0 5 51 45 0 128 44 0 5 51 47 0 128 46 0 5 51 49 0 128 48 0 5 51 51 0 128 50 0 5 51 53 0 128 52 0 5 51 55 0 128 54 0 5 51 57 0 128 56 0 5 51 59 0 128 58 0 5 51 61 0 128 60 0 5 51 63 0 128 62 0 5 51 65 0 128 64 0 5 51 67 0 128 66 0 5 51 69 0 128 68 0 5 51 71 0 128 70 0 5 1 72 0 112 50))) + :constants ("split-path-segments" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "/" "slice" 1 "not" "empty?" "ends-with?" 0 "-" "len" "list" "split") :bytecode (16 0 1 1 0 52 0 0 2 33 12 0 16 0 1 3 0 52 2 0 2 32 2 0 16 0 17 1 16 1 52 5 0 1 52 4 0 1 6 33 10 0 5 16 1 1 1 0 52 6 0 2 33 25 0 16 1 1 7 0 16 1 52 9 0 1 1 3 0 52 8 0 2 52 2 0 3 32 2 0 16 1 17 2 16 2 52 5 0 1 33 7 0 52 10 0 0 32 9 0 16 2 1 1 0 52 11 0 2 50)} "make-route-segment" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "<" "ends-with?" ">" "slice" 1 "-" "len" "dict-set!" "type" "param" "value" "literal") :bytecode (16 0 1 1 0 52 0 0 2 6 33 10 0 5 16 0 1 3 0 52 2 0 2 33 59 0 16 0 1 5 0 16 0 52 7 0 1 1 5 0 52 6 0 2 52 4 0 3 17 1 65 0 0 17 2 16 2 1 9 0 1 10 0 52 8 0 3 5 16 2 1 11 0 16 1 52 8 0 3 5 16 2 32 32 0 65 0 0 17 1 16 1 1 9 0 1 12 0 52 8 0 3 5 16 1 1 11 0 16 0 52 8 0 3 5 16 1 50)} "parse-route-pattern" {:upvalue-count 0 :arity 1 :constants ("split-path-segments" "map" "make-route-segment") :bytecode (20 0 0 16 0 48 1 17 1 20 2 0 16 1 52 1 0 2 50)} "match-route-segments" {:upvalue-count 0 :arity 2 :constants ("not" "=" "len" "for-each-indexed" {:upvalue-count 3 :arity 2 :constants ("nth" "get" "type" "=" "literal" "not" "value" "param" "dict-set!") :bytecode (18 0 33 103 0 18 1 16 0 52 0 0 2 17 2 16 1 1 2 0 52 1 0 2 17 3 16 3 1 4 0 52 3 0 2 33 32 0 16 2 16 1 1 6 0 52 1 0 2 52 3 0 2 52 5 0 1 33 6 0 4 19 0 32 1 0 2 32 35 0 16 3 1 7 0 52 3 0 2 33 20 0 18 2 16 1 1 6 0 52 1 0 2 16 2 52 8 0 3 32 3 0 4 19 0 32 1 0 2 50)}) :bytecode (16 0 52 2 0 1 16 1 52 2 0 1 52 1 0 2 52 0 0 1 33 4 0 2 32 35 0 65 0 0 17 2 3 17 3 51 4 0 1 3 1 0 1 2 16 1 52 3 0 2 5 16 3 33 5 0 16 2 32 1 0 2 50)} "match-route" {:upvalue-count 0 :arity 2 :constants ("split-path-segments" "parse-route-pattern" "match-route-segments") :bytecode (20 0 0 16 0 48 1 17 2 20 1 0 16 1 48 1 17 3 20 2 0 16 2 16 3 49 2 50)} "find-matching-route" {:upvalue-count 0 :arity 2 :constants ("index-of" "/(" ">" 0 "sx-url-to-path" "slice" "len" "starts-with?" "split-path-segments" "for-each" {:upvalue-count 2 :arity 1 :constants ("nil?" "match-route-segments" "get" "parsed" "not" "merge" "dict-set!" "params") :bytecode (18 0 52 0 0 1 33 65 0 20 1 0 18 1 16 0 1 3 0 52 2 0 2 48 2 17 1 16 1 52 0 0 1 52 4 0 1 33 30 0 16 0 65 0 0 52 5 0 2 17 2 16 2 1 7 0 16 1 52 6 0 3 5 16 2 19 0 32 1 0 2 32 1 0 2 50)}) :bytecode (16 0 1 1 0 52 0 0 2 17 3 16 3 1 3 0 52 2 0 2 33 29 0 20 4 0 16 0 16 3 16 0 52 6 0 1 52 5 0 3 48 1 6 34 3 0 5 16 0 32 31 0 16 0 1 1 0 52 7 0 2 33 17 0 20 4 0 16 0 48 1 6 34 3 0 5 16 0 32 2 0 16 0 17 2 20 8 0 16 2 48 1 17 3 2 17 4 51 10 0 1 4 1 3 16 1 52 9 0 2 5 16 4 50)} "_fn-to-segment" {:upvalue-count 0 :arity 1 :constants ("doc" "=" "docs" "spec" "specs" "bootstrapper" "bootstrappers" "test" "testing" "example" "examples" "protocol" "protocols" "essay" "essays" "plan" "plans" "reference-detail" "reference") :bytecode (16 0 6 1 0 0 52 1 0 2 33 7 0 5 1 2 0 32 147 0 6 1 3 0 52 1 0 2 33 7 0 5 1 4 0 32 129 0 6 1 5 0 52 1 0 2 33 7 0 5 1 6 0 32 111 0 6 1 7 0 52 1 0 2 33 7 0 5 1 8 0 32 93 0 6 1 9 0 52 1 0 2 33 7 0 5 1 10 0 32 75 0 6 1 11 0 52 1 0 2 33 7 0 5 1 12 0 32 57 0 6 1 13 0 52 1 0 2 33 7 0 5 1 14 0 32 39 0 6 1 15 0 52 1 0 2 33 7 0 5 1 16 0 32 21 0 6 1 17 0 52 1 0 2 33 7 0 5 1 18 0 32 3 0 5 16 0 50)} "sx-url-to-path" {:upvalue-count 0 :arity 1 :constants ("not" "starts-with?" "/(" "ends-with?" ")" "slice" 2 "-" "len" 1 "replace" "." "/" "(" "" "filter" {:upvalue-count 0 :arity 1 :constants ("not" "empty?") :bytecode (16 0 52 1 0 1 52 0 0 1 50)} "split" "str" "join" "map" "_fn-to-segment") :bytecode (16 0 1 2 0 52 1 0 2 6 33 10 0 5 16 0 1 4 0 52 3 0 2 52 0 0 1 33 4 0 2 32 99 0 16 0 1 6 0 16 0 52 8 0 1 1 9 0 52 7 0 2 52 5 0 3 17 1 16 1 1 11 0 1 12 0 52 10 0 3 1 13 0 1 14 0 52 10 0 3 1 4 0 1 14 0 52 10 0 3 17 2 51 16 0 16 2 1 12 0 52 17 0 2 52 15 0 2 17 3 1 12 0 1 12 0 20 21 0 16 3 52 20 0 2 52 19 0 2 52 18 0 2 50)} "_count-leading-dots" {:upvalue-count 0 :arity 1 :constants ("empty?" 0 "starts-with?" "." "+" 1 "_count-leading-dots" "slice") :bytecode (16 0 52 0 0 1 33 6 0 1 1 0 32 39 0 16 0 1 3 0 52 2 0 2 33 24 0 1 5 0 20 6 0 16 0 1 5 0 52 7 0 2 48 1 52 4 0 2 32 3 0 1 1 0 50)} "_strip-trailing-close" {:upvalue-count 0 :arity 1 :constants ("ends-with?" ")" "_strip-trailing-close" "slice" 0 "-" "len" 1) :bytecode (16 0 1 1 0 52 0 0 2 33 30 0 20 2 0 16 0 1 4 0 16 0 52 6 0 1 1 7 0 52 5 0 2 52 3 0 3 49 1 32 2 0 16 0 50)} "_index-of-safe" {:upvalue-count 0 :arity 2 :constants ("index-of" "nil?" "<" 0) :bytecode (16 0 16 1 52 0 0 2 17 2 16 2 52 1 0 1 6 34 10 0 5 16 2 1 3 0 52 2 0 2 33 4 0 2 32 2 0 16 2 50)} "_last-index-of" {:upvalue-count 0 :arity 2 :constants ("_index-of-safe" "nil?" "_last-index-of" "slice" "+" 1) :bytecode (20 0 0 16 0 16 1 48 2 17 2 16 2 52 1 0 1 33 4 0 2 32 53 0 20 2 0 16 0 16 2 1 5 0 52 4 0 2 52 3 0 2 16 1 48 2 17 3 16 3 52 1 0 1 33 5 0 16 2 32 15 0 16 2 1 5 0 52 4 0 2 16 3 52 4 0 2 50)} "_pop-sx-url-level" {:upvalue-count 0 :arity 1 :constants ("_strip-trailing-close" "-" "len" "<=" 1 "/" "_last-index-of" ".(" "nil?" "str" "slice" 0) :bytecode (20 0 0 16 0 48 1 17 1 16 0 52 2 0 1 20 0 0 16 0 48 1 52 2 0 1 52 1 0 2 17 2 16 2 1 4 0 52 3 0 2 33 6 0 1 5 0 32 67 0 20 6 0 16 1 1 7 0 48 2 17 3 16 3 52 8 0 1 33 6 0 1 5 0 32 40 0 16 1 1 11 0 16 3 52 10 0 3 16 0 16 0 52 2 0 1 16 2 1 4 0 52 1 0 2 52 1 0 2 52 10 0 2 52 9 0 2 50)} "_pop-sx-url-levels" {:upvalue-count 0 :arity 2 :constants ("<=" 0 "_pop-sx-url-levels" "_pop-sx-url-level" "-" 1) :bytecode (16 1 1 1 0 52 0 0 2 33 5 0 16 0 32 21 0 20 2 0 20 3 0 16 0 48 1 16 1 1 5 0 52 4 0 2 49 2 50)} "_split-pos-kw" {:upvalue-count 0 :arity 4 :constants (">=" "len" "positional" "join" "." "keywords" "nth" "starts-with?" ":" "<" "+" 1 "" "_split-pos-kw" 2 "append" "list") :bytecode (16 1 16 0 52 1 0 1 52 0 0 2 33 23 0 1 2 0 1 4 0 16 2 52 3 0 2 1 5 0 16 3 65 2 0 32 136 0 16 0 16 1 52 6 0 2 17 4 16 4 1 8 0 52 7 0 2 33 84 0 16 1 1 11 0 52 10 0 2 16 0 52 1 0 1 52 9 0 2 33 18 0 16 0 16 1 1 11 0 52 10 0 2 52 6 0 2 32 3 0 1 12 0 17 5 20 13 0 16 0 16 1 1 14 0 52 10 0 2 16 2 16 3 16 4 16 5 52 16 0 2 52 16 0 1 52 15 0 2 49 4 32 30 0 20 13 0 16 0 16 1 1 11 0 52 10 0 2 16 2 16 4 52 16 0 1 52 15 0 2 16 3 49 4 50)} "_parse-relative-body" {:upvalue-count 0 :arity 1 :constants ("empty?" "positional" "" "keywords" "list" "_split-pos-kw" "split" "." 0) :bytecode (16 0 52 0 0 1 33 19 0 1 1 0 1 2 0 1 3 0 52 4 0 0 65 2 0 32 25 0 20 5 0 16 0 1 7 0 52 6 0 2 1 8 0 52 4 0 0 52 4 0 0 49 4 50)} "_extract-innermost" {:upvalue-count 0 :arity 1 :constants ("_strip-trailing-close" "slice" "len" "_last-index-of" ".(" "nil?" "before" "/(" "content" 2 "suffix" 0 "+") :bytecode (20 0 0 16 0 48 1 17 1 16 0 20 0 0 16 0 48 1 52 2 0 1 52 1 0 2 17 2 20 3 0 16 1 1 4 0 48 2 17 3 16 3 52 5 0 1 33 29 0 1 6 0 1 7 0 1 8 0 16 1 1 9 0 52 1 0 2 1 10 0 16 2 65 3 0 32 47 0 1 6 0 16 1 1 11 0 16 3 1 9 0 52 12 0 2 52 1 0 3 1 8 0 16 1 16 3 1 9 0 52 12 0 2 52 1 0 2 1 10 0 16 2 65 3 0 50)} "_find-kw-in-tokens" {:upvalue-count 0 :arity 3 :constants (">=" "len" "=" "nth" "<" "+" 1 "_find-kw-in-tokens") :bytecode (16 1 16 0 52 1 0 1 52 0 0 2 33 4 0 2 32 77 0 16 0 16 1 52 3 0 2 16 2 52 2 0 2 6 33 20 0 5 16 1 1 6 0 52 5 0 2 16 0 52 1 0 1 52 4 0 2 33 18 0 16 0 16 1 1 6 0 52 5 0 2 52 3 0 2 32 18 0 20 7 0 16 0 16 1 1 6 0 52 5 0 2 16 2 49 3 50)} "_find-keyword-value" {:upvalue-count 0 :arity 2 :constants ("_find-kw-in-tokens" "split" "." 0) :bytecode (20 0 0 16 0 1 2 0 52 1 0 2 1 3 0 16 1 49 3 50)} "_replace-kw-in-tokens" {:upvalue-count 0 :arity 4 :constants (">=" "len" "list" "=" "nth" "<" "+" 1 "append" "_replace-kw-in-tokens" 2 "cons") :bytecode (16 1 16 0 52 1 0 1 52 0 0 2 33 7 0 52 2 0 0 32 108 0 16 0 16 1 52 4 0 2 16 2 52 3 0 2 6 33 20 0 5 16 1 1 7 0 52 6 0 2 16 0 52 1 0 1 52 5 0 2 33 35 0 16 2 16 3 52 2 0 2 20 9 0 16 0 16 1 1 10 0 52 6 0 2 16 2 16 3 48 4 52 8 0 2 32 32 0 16 0 16 1 52 4 0 2 20 9 0 16 0 16 1 1 7 0 52 6 0 2 16 2 16 3 48 4 52 11 0 2 50)} "_set-keyword-in-content" {:upvalue-count 0 :arity 3 :constants ("_find-keyword-value" "nil?" "str" "." "join" "_replace-kw-in-tokens" "split" 0) :bytecode (20 0 0 16 0 16 1 48 2 17 3 16 3 52 1 0 1 33 19 0 16 0 1 3 0 16 1 1 3 0 16 2 52 2 0 5 32 28 0 1 3 0 20 5 0 16 0 1 3 0 52 6 0 2 1 7 0 16 1 16 2 48 4 52 4 0 2 50)} "_is-delta-value?" {:upvalue-count 0 :arity 1 :constants ("not" "empty?" ">" "len" 1 "starts-with?" "+" "-") :bytecode (16 0 52 1 0 1 52 0 0 1 6 33 42 0 5 16 0 52 3 0 1 1 4 0 52 2 0 2 6 33 24 0 5 16 0 1 6 0 52 5 0 2 6 34 10 0 5 16 0 1 7 0 52 5 0 2 50)} "_apply-delta" {:upvalue-count 0 :arity 2 :constants ("parse-int" "nil?" "str" "+") :bytecode (16 0 2 52 0 0 2 17 2 16 1 2 52 0 0 2 17 3 16 2 52 1 0 1 6 34 7 0 5 16 3 52 1 0 1 33 5 0 16 1 32 12 0 16 2 16 3 52 3 0 2 52 2 0 1 50)} "_apply-kw-pairs" {:upvalue-count 0 :arity 2 :constants ("empty?" "first" "nth" 1 "_is-delta-value?" "_find-keyword-value" "nil?" "_apply-delta" "_apply-kw-pairs" "_set-keyword-in-content" "rest") :bytecode (16 1 52 0 0 1 33 5 0 16 0 32 100 0 16 1 52 1 0 1 17 2 16 2 52 1 0 1 17 3 16 2 1 3 0 52 2 0 2 17 4 20 4 0 16 4 48 1 33 37 0 20 5 0 16 0 16 3 48 2 17 6 16 6 52 6 0 1 33 5 0 16 4 32 9 0 20 7 0 16 6 16 4 48 2 32 2 0 16 4 17 5 20 8 0 20 9 0 16 0 16 3 16 5 48 3 16 1 52 10 0 1 49 2 50)} "_apply-keywords-to-url" {:upvalue-count 0 :arity 2 :constants ("empty?" "_extract-innermost" "_apply-kw-pairs" "get" "content" "str" "before" "suffix") :bytecode (16 1 52 0 0 1 33 5 0 16 0 32 51 0 20 1 0 16 0 48 1 17 2 20 2 0 16 2 1 4 0 52 3 0 2 16 1 48 2 17 3 16 2 1 6 0 52 3 0 2 16 3 16 2 1 7 0 52 3 0 2 52 5 0 3 50)} "_normalize-relative" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "(" "str" ")") :bytecode (16 0 1 1 0 52 0 0 2 33 5 0 16 0 32 12 0 1 1 0 16 0 1 3 0 52 2 0 3 50)} "resolve-relative-url" {:upvalue-count 0 :arity 2 :constants ("_normalize-relative" "slice" 1 "-" "len" "_count-leading-dots" "=" 0 "_parse-relative-body" "get" "positional" "keywords" "empty?" "_strip-trailing-close" "str" "." "_pop-sx-url-levels" "/" "/(" ")" ".(" "_apply-keywords-to-url") :bytecode (20 0 0 16 1 48 1 17 2 16 2 1 2 0 16 2 52 4 0 1 1 2 0 52 3 0 2 52 1 0 3 17 3 20 5 0 16 3 48 1 17 4 16 3 20 5 0 16 3 48 1 52 1 0 2 17 5 16 4 1 7 0 52 6 0 2 33 5 0 16 0 32 215 0 20 8 0 16 5 48 1 17 6 16 6 1 10 0 52 9 0 2 17 7 16 6 1 11 0 52 9 0 2 17 8 16 4 1 2 0 52 6 0 2 33 58 0 16 7 52 12 0 1 33 5 0 16 0 32 41 0 20 13 0 16 0 48 1 17 10 16 0 20 13 0 16 0 48 1 52 4 0 1 52 1 0 2 17 11 16 10 1 15 0 16 7 16 11 52 14 0 4 32 103 0 20 16 0 16 0 16 4 1 2 0 52 3 0 2 48 2 17 10 16 7 52 12 0 1 33 5 0 16 10 32 71 0 16 10 1 17 0 52 6 0 2 33 15 0 1 18 0 16 7 1 19 0 52 14 0 3 32 44 0 20 13 0 16 10 48 1 17 11 16 10 20 13 0 16 10 48 1 52 4 0 1 52 1 0 2 17 12 16 11 1 20 0 16 7 1 19 0 16 12 52 14 0 5 17 9 20 21 0 16 9 16 8 49 2 50)} "relative-sx-url?" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "(" "not" "/(" ".") :bytecode (16 0 1 1 0 52 0 0 2 6 33 14 0 5 16 0 1 3 0 52 0 0 2 52 2 0 1 6 34 10 0 5 16 0 1 4 0 52 0 0 2 50)} "_url-special-forms" {:upvalue-count 0 :arity 0 :constants ("list" "!source" "!inspect" "!diff" "!search" "!raw" "!json") :bytecode (1 1 0 1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 52 0 0 6 50)} "url-special-form?" {:upvalue-count 0 :arity 1 :constants ("starts-with?" "!" "contains?" "_url-special-forms") :bytecode (16 0 1 1 0 52 0 0 2 6 33 12 0 5 20 3 0 48 0 16 0 52 2 0 2 50)} "parse-sx-url" {:upvalue-count 0 :arity 1 :constants ("=" "/" "raw" "type" "home" "relative-sx-url?" "relative" "starts-with?" "/(!" "ends-with?" ")" "slice" 2 "-" "len" 1 "_index-of-safe" "." "(" "nil?" "min" 0 "special-form" "inner" "form" "/(~" "direct-component" "name" "/(" "absolute" "path") :bytecode (16 0 1 1 0 52 0 0 2 33 17 0 1 2 0 16 0 1 3 0 1 4 0 65 2 0 32 119 1 20 5 0 16 0 48 1 33 17 0 1 2 0 16 0 1 3 0 1 6 0 65 2 0 32 92 1 16 0 1 8 0 52 7 0 2 6 33 10 0 5 16 0 1 10 0 52 9 0 2 33 193 0 16 0 1 12 0 16 0 52 14 0 1 1 15 0 52 13 0 2 52 11 0 3 17 1 20 16 0 16 1 1 17 0 48 2 17 2 20 16 0 16 1 1 18 0 48 2 17 3 16 2 52 19 0 1 6 33 7 0 5 16 3 52 19 0 1 33 9 0 16 1 52 14 0 1 32 36 0 16 2 52 19 0 1 33 5 0 16 3 32 22 0 16 3 52 19 0 1 33 5 0 16 2 32 8 0 16 2 16 3 52 20 0 2 17 4 16 1 1 21 0 16 4 52 11 0 3 17 5 16 1 16 4 52 11 0 2 17 6 16 6 1 17 0 52 7 0 2 33 12 0 16 6 1 15 0 52 11 0 2 32 2 0 16 6 17 7 1 2 0 16 0 1 3 0 1 22 0 1 23 0 16 7 1 24 0 16 5 65 4 0 32 129 0 16 0 1 25 0 52 7 0 2 6 33 10 0 5 16 0 1 10 0 52 9 0 2 33 46 0 16 0 1 12 0 16 0 52 14 0 1 1 15 0 52 13 0 2 52 11 0 3 17 1 1 2 0 16 0 1 3 0 1 26 0 1 27 0 16 1 65 3 0 32 57 0 16 0 1 28 0 52 7 0 2 6 33 10 0 5 16 0 1 10 0 52 9 0 2 33 17 0 1 2 0 16 0 1 3 0 1 29 0 65 2 0 32 14 0 1 2 0 16 0 1 3 0 1 30 0 65 2 0 50)} "url-special-form-name" {:upvalue-count 0 :arity 1 :constants ("parse-sx-url" "=" "get" "type" "special-form" "form") :bytecode (20 0 0 16 0 48 1 17 1 16 1 1 3 0 52 2 0 2 1 4 0 52 1 0 2 33 12 0 16 1 1 5 0 52 2 0 2 32 1 0 2 50)} "url-special-form-inner" {:upvalue-count 0 :arity 1 :constants ("parse-sx-url" "=" "get" "type" "special-form" "inner") :bytecode (20 0 0 16 0 48 1 17 1 16 1 1 3 0 52 2 0 2 1 4 0 52 1 0 2 33 12 0 16 1 1 5 0 52 2 0 2 32 1 0 2 50)} "url-to-expr" {:upvalue-count 0 :arity 1 :constants ("=" "/" "empty?" "list" "starts-with?" "slice" 1 "replace" "." " " "sx-parse" "first") :bytecode (16 0 1 1 0 52 0 0 2 6 34 7 0 5 16 0 52 2 0 1 33 7 0 52 3 0 0 32 73 0 16 0 1 1 0 52 4 0 2 33 12 0 16 0 1 6 0 52 5 0 2 32 2 0 16 0 17 1 16 1 1 8 0 1 9 0 52 7 0 3 17 2 20 10 0 16 2 48 1 17 3 16 3 52 2 0 1 33 7 0 52 3 0 0 32 6 0 16 3 52 11 0 1 50)} "auto-quote-unknowns" {:upvalue-count 0 :arity 2 :constants ("not" "list?" "empty?" "cons" "first" "map" {:upvalue-count 1 :arity 1 :constants ("list?" "auto-quote-unknowns" "=" "type-of" "symbol" "symbol-name" "env-has?" "starts-with?" ":" "~" "!") :bytecode (16 0 52 0 0 1 33 12 0 20 1 0 16 0 18 0 49 2 32 89 0 16 0 52 3 0 1 1 4 0 52 2 0 2 33 71 0 16 0 52 5 0 1 17 1 18 0 16 1 52 6 0 2 6 34 38 0 5 16 1 1 8 0 52 7 0 2 6 34 24 0 5 16 1 1 9 0 52 7 0 2 6 34 10 0 5 16 1 1 10 0 52 7 0 2 33 5 0 16 0 32 2 0 16 1 32 2 0 16 0 50)} "rest") :bytecode (16 0 52 1 0 1 52 0 0 1 33 5 0 16 0 32 39 0 16 0 52 2 0 1 33 5 0 16 0 32 25 0 16 0 52 4 0 1 51 6 0 1 1 16 0 52 7 0 1 52 5 0 2 52 3 0 2 50)} "prepare-url-expr" {:upvalue-count 0 :arity 2 :constants ("url-to-expr" "empty?" "auto-quote-unknowns") :bytecode (20 0 0 16 0 48 1 17 2 16 2 52 1 0 1 33 5 0 16 2 32 9 0 20 2 0 16 2 16 1 49 2 50)} {:library (web router) :op "import"}) :bytecode (51 1 0 128 0 0 5 51 3 0 128 2 0 5 51 5 0 128 4 0 5 51 7 0 128 6 0 5 51 9 0 128 8 0 5 51 11 0 128 10 0 5 51 13 0 128 12 0 5 51 15 0 128 14 0 5 51 17 0 128 16 0 5 51 19 0 128 18 0 5 51 21 0 128 20 0 5 51 23 0 128 22 0 5 51 25 0 128 24 0 5 51 27 0 128 26 0 5 51 29 0 128 28 0 5 51 31 0 128 30 0 5 51 33 0 128 32 0 5 51 35 0 128 34 0 5 51 37 0 128 36 0 5 51 39 0 128 38 0 5 51 41 0 128 40 0 5 51 43 0 128 42 0 5 51 45 0 128 44 0 5 51 47 0 128 46 0 5 51 49 0 128 48 0 5 51 51 0 128 50 0 5 51 53 0 128 52 0 5 51 55 0 128 54 0 5 51 57 0 128 56 0 5 51 59 0 128 58 0 5 51 61 0 128 60 0 5 51 63 0 128 62 0 5 51 65 0 128 64 0 5 51 67 0 128 66 0 5 51 69 0 128 68 0 5 51 71 0 128 70 0 5 1 72 0 112 50))) diff --git a/shared/static/wasm/sx_browser.bc.js b/shared/static/wasm/sx_browser.bc.js index d7c24d87..134bd4fe 100644 --- a/shared/static/wasm/sx_browser.bc.js +++ b/shared/static/wasm/sx_browser.bc.js @@ -9304,8 +9304,8 @@ (globalThis)); (function(a){"use strict";var -i=a.jsoo_runtime,c=i.caml_get_global_data(),dl="caml_unix_stat_64",dk="unix_lseek",l="caml_unix_inchannel_of_filedescr",dj="caml_unix_stat",di="caml_unix_write_bigarray",eI="caml_nativeint_format",a7="caml_int64_of_nativeint",dh="caml_unix_closedir",a6="caml_unix_getgrnam",b7="caml_unix_truncate",b6="caml_unix_getcwd",eE="caml_unix_readlink",eF="caml_floatarray_set",a4="caml_fill_bytes",a3="unix_error_message",b5="win_inchannel_of_filedescr",a2="caml_unix_time",b2="caml_unix_write",de="unix_lstat",eC="unix_open",dc="unix_rename",eB="caml_unix_chmod",aY="unix_access",aW="caml_unix_lseek",aX="unix_fsync",db="caml_unix_findnext",aU="caml_weak_get_copy",h="caml_array_set",da="caml_unix_opendir",eA="caml_unix_lookup_file",aT="caml_unix_getegid",ez="caml_unix_getgid",b0="caml_js_from_nativeint",aP="caml_unix_gmtime",aQ="caml_signbit_float",ex="caml_unix_close",ew="caml_js_from_int32",ev="caml_int64_to_int",bW="caml_check_bound_gen",p="caml_format_int",c8="unix_link",bS="unix_mkdir",aM="unix_rewinddir",aN="unix_read",c5="caml_unix_unlink",aJ="unix_getgid",c3="caml_unix_error_message",es="caml_unix_findclose",aF="caml_unix_lseek_64",eq="caml_array_get_float",bO="win_outchannel_of_filedescr",c0="caml_unix_fstat",bN="caml_unix_geteuid",cY="unix_lstat_64",aD="unix_inchannel_of_filedescr",bI="unix_getpwnam",bJ="unix_geteuid",aC="caml_unix_getuid",cX="caml_unix_utimes",el="caml_unix_getpwuid",em="unix_getpwuid",o="caml_check_bound",ek="unix_ftruncate_64",aA="unix_isatty",bH="caml_unix_times",cV="caml_unix_exit",ej="unix_exit",ax="caml_unix_single_write",bG="caml_ephe_blit_key",cT="caml_nativeint_of_string",aw="unix_write",cR="caml_unix_ftruncate_64",cS="unix_close",ei="caml_js_to_int32",k="caml_sys_getcwd",cQ="caml_unix_readdir",bF="win_findclose",ar="%int_mul",cO="caml_int32_format",ee="caml_weak_blit",cM="caml_unix_localtime",cN="unix_times",ed="caml_array_set_addr",cL="caml_unix_inet_addr_of_string",ec="unix_ftruncate",cK="caml_weak_check",eb="caml_unix_symlink",ao="unix_outchannel_of_filedescr",al="caml_unix_has_symlink",cJ="unix_mktime",s="caml_int64_to_int32",bC="unix_fstat",d_="caml_unix_link",ak="caml_unix_fchmod",bA="unix_symlink",aj="unix_localtime",d9="unix_chdir",ai="unix_getgrgid",ah="caml_int32_compare",ag="caml_unix_mkdir",d6="win_startup",d5="caml_int32_bswap",af="caml_weak_get",d4="unix_readlink",ad="caml_unix_rmdir",e="caml_array_get",ac="caml_unix_lstat_64",ab="unix_inet_addr_of_string",bw="caml_unix_gettimeofday",r="caml_unix_outchannel_of_filedescr",bv="unix_stat",cE="caml_unix_chdir",$="unix_closedir",aa="win_cleanup",bu="caml_nativeint_bswap",Y="caml_unix_mktime",Z="caml_ephe_get_key",_="%int_mod",bt="unix_stat_64",cC="unix_getegid",cD="caml_unix_access",cA="caml_unix_isatty",X="caml_int32_mul",cz="caml_nativeint_compare",q="caml_int64_of_int32",V="caml_unix_fsync",d0="win_findnext",R="caml_nativeint_mul",dZ="unix_single_write",Q="caml_int32_mod",n="caml_js_from_float",cx="unix_truncate_64",cw="caml_ephe_check_key",dX="unix_opendir",bs="caml_array_set_float",dW="caml_ephe_get_key_copy",O="unix_getuid",d="caml_mul",N="caml_fill_string",g="caml_div",cr="caml_int64_of_int",dU="caml_unix_read_bigarray",M="unix_getgrnam",dS="win_findfirst",dR="caml_unix_startup",bp="caml_unix_filedescr_of_fd",dQ="caml_unix_ftruncate",f="caml_mod",cq="caml_check_bound_float",bn="unix_utimes",bo="caml_unix_getgrgid",dO="caml_int64_to_nativeint",bm="unix_time",dN="unix_fstat_64",J="caml_unix_fstat_64",co="unix_truncate",bk="unix_gmtime",bj="caml_unix_cleanup",dL="unix_getcwd",dK="unix_readdir",j="caml_sys_exit",H="caml_channel_descriptor",bf="unix_lseek_64",t="caml_int_compare",G="caml_array_get_addr",dD="unix_chmod",dE="caml_unix_lstat",dC="caml_js_to_nativeint",F="caml_int32_div",ci="caml_unix_findfirst",E="caml_unix_truncate_64",D="caml_unix_rewinddir",C="unix_has_symlink",m="caml_int_of_string",dz="caml_unix_rename",be="win_filedescr_of_channel",B="unix_gettimeofday",dy="win_handle_fd",b="caml_unix_getpwnam",cd="caml_int32_of_string",dw="caml_nativeint_mod",w="unix_rmdir",ca="caml_unix_read",cb="unix_read_bigarray",dr="caml_floatarray_get",v="unix_unlink",a$="caml_unix_open",dp="caml_signbit",u="unix_fchmod",a9="caml_nativeint_div",dn="%int_div";c.aliases=i.caml_list_of_js_array([[0,bW,o],[0,ev,s],[0,dn,g],[0,ew,n],[0,dS,ci],[0,a9,g],[0,u,ak],[0,M,b],[0,ao,r],[0,cr,q],[0,b0,n],[0,dp,aQ],[0,cK,cw],[0,N,a4],[0,v,c5],[0,ec,dQ],[0,dr,e],[0,ed,h],[0,O,aC],[0,cb,dU],[0,w,ad],[0,cN,bH],[0,ee,bG],[0,cO,p],[0,eA,di],[0,bs,h],[0,ar,d],[0,dX,da],[0,bF,es],[0,cd,m],[0,dw,f],[0,cx,E],[0,Q,f],[0,aU,dW],[0,R,d],[0,dZ,ax],[0,cS,ex],[0,aX,V],[0,aw,b2],[0,cT,m],[0,aY,cD],[0,dy,bp],[0,d0,db],[0,B,bw],[0,be,H],[0,ej,j],[0,cz,t],[0,X,d],[0,cV,j],[0,C,al],[0,dc,dz],[0,aA,cA],[0,ek,cR],[0,cC,aT],[0,de,dE],[0,eC,a$],[0,F,g],[0,em,b],[0,el,b],[0,bt,dl],[0,dC,ei],[0,_,f],[0,bu,d5],[0,bJ,bN],[0,bI,b],[0,aa,bj],[0,$,dh],[0,b5,l],[0,dD,eB],[0,bv,dj],[0,G,e],[0,aD,l],[0,ab,cL],[0,cY,ac],[0,eF,h],[0,b6,k],[0,bO,r],[0,eq,e],[0,d4,eE],[0,af,Z],[0,a6,b],[0,bf,aF],[0,d6,dR],[0,dK,cQ],[0,aJ,ez],[0,c3,a3],[0,ah,t],[0,dL,k],[0,bk,aP],[0,a7,q],[0,ai,b],[0,co,b7],[0,d9,cE],[0,aj,cM],[0,eI,p],[0,dN,J],[0,bA,eb],[0,bm,a2],[0,dO,s],[0,aN,ca],[0,aM,D],[0,bS,ag],[0,bo,b],[0,c8,d_],[0,bn,cX],[0,cq,o],[0,bC,c0],[0,dk,aW],[0,cJ,Y]]);c.prim_count=952;var -a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg="Stdlib__Out_channel",eG="Match_failure",a5="Stdlib__Gc",eD="Stdlib__Unit",b4="Jsoo_runtime__Runtime_version",b3="Stdlib__Map",a1="Sx_vm",dd="Stdlib__Parsing",a0="Stdlib__Effect",b1=108,aZ="Stdlib__String",aV="Stdlib__BytesLabels",c$="Stdlib__Condition",c_="Stdlib__Filename",aS="Stdlib__In_channel",c9="Not_found",aR="CamlinternalLazy",ey="Sx_vm_ref",bZ="Division_by_zero",bY="Js_of_ocaml__Effect_js",aO=117,bX=104,eu="Js_of_ocaml__",bV="Stdlib__Either",bU=109,bT="Js_of_ocaml__MutationObserver",bR="Js_of_ocaml__Json",c7="Stdlib__Callback",aL="Stdlib__Lexing",bQ="Undefined_recursive_module",c6="Stdlib__Printf",et=111,aK="Stdlib__Bool",c4="Stdlib__Int",c2="Stdlib__MoreLabels",aH=103,aI="Sx_render",c1="Sys_error",aG=100,bP="Js_of_ocaml__Dom_events",er="Stdlib__Digest",cZ=101,aE="Sx_compiler",bM="Js_of_ocaml__PerformanceObserver",bL="Stdlib__Queue",ep=110,bK="Stdlib__Set",eo="Stdlib__Stack",en="Js_of_ocaml__File",cW="Stdlib__Complex",aB="Jsoo_runtime__",cU="Jsoo_runtime",ay="Js_of_ocaml__WebSockets",az="Stdlib__Nativeint",av=113,cP="Sys_blocked_io",au="Stdlib__Random",eh="Js_of_ocaml__ResizeObserver",eg="Sx_runtime",ef="Js_of_ocaml",as=106,at="Stdlib__Marshal",aq="Js_of_ocaml__Console",bE="Sx_primitives",bD="Stdlib__Ephemeron",ap="CamlinternalMod",an="Js_of_ocaml__Js",am="Js_of_ocaml__Url",ea="Stdlib__Fun",d$="Stdlib__Char",bB=116,cI="Dune__exe__Sx_browser",d8="CamlinternalFormatBasics",cH="Stdlib__Weak",bz=105,cG="Stdlib__Format",d7="Stdlib__StdLabels",cF="Stdlib__Int64",by="Js_of_ocaml__Dom_html",ae="Stdlib__ArrayLabels",bx="Stdlib__Bigarray",cB="Js_of_ocaml__IntersectionObserver",W=115,d1=122,d2="Stdlib",d3="Stdlib__StringLabels",U="Stdlib__Atomic",T="Sx_cst",S="Stdlib__ListLabels",cy="Stdlib__Seq",dY="Js_of_ocaml__CSS",cv="Js_of_ocaml__XmlHttpRequest",P="Stdlib__Uchar",cu="Stdlib__Arg",ct="Js_of_ocaml__Form",cs="Stdlib__Scanf",dV=112,dT="Js_of_ocaml__Intl",br=107,bq="Stdlib__Printexc",L="Js_of_ocaml__Sys_js",dP="Js_of_ocaml__Import",cp="Js_of_ocaml__Geolocation",K="Js_of_ocaml__Worker",bl="Stdlib__Dynarray",dM="Assert_failure",bh=118,bi=121,bg=120,cn="Stdlib__Array",I="Js_of_ocaml__EventSource",cm="Stdlib__Obj",dJ="Stdlib__Hashtbl",dH="Stdlib__Domain",dI="Stdlib__Option",dG=124,dF="Std_exit",cl="Sx_ref",cj="Invalid_argument",ck="Stack_overflow",ch="End_of_file",cg="Js_of_ocaml__WebGL",dB="Sx_types",dA="Failure",A="Js_of_ocaml__Jstable",dx="Stdlib__Lazy",bd="Stdlib__Semaphore",cf="Out_of_memory",z="Js_of_ocaml__Lib_version",y="Js_of_ocaml__Regexp",ce="Js_of_ocaml__Dom",x="Stdlib__Bytes",bc="Stdlib__Sys",dv="CamlinternalOO",cc="Stdlib__Int32",du="Stdlib__Oo",bb=123,ds=119,dt="Stdlib__Mutex",ba="Stdlib__List",a_="Sx_parser",dq="Stdlib__Float",b$="CamlinternalFormat",dm="Js_of_ocaml__Typed_array",b_="Stdlib__Result";c.symbols=[0,[0,bQ,11],[0,c1,10],[0,cP,9],[0,ey,86],[0,a1,85],[0,dB,79],[0,eg,83],[0,aI,87],[0,cl,84],[0,bE,82],[0,a_,81],[0,T,80],[0,aE,88],[0,cH,62],[0,eD,31],[0,P,26],[0,b9,17],[0,bc,15],[0,d3,75],[0,aZ,30],[0,d7,77],[0,eo,42],[0,bK,40],[0,cy,21],[0,bd,47],[0,cs,64],[0,b_,23],[0,au,60],[0,bL,43],[0,c6,50],[0,bq,53],[0,dd,39],[0,dg,57],[0,dI,22],[0,du,67],[0,cm,16],[0,az,37],[0,dt,45],[0,c2,76],[0,at,32],[0,b3,41],[0,S,73],[0,ba,27],[0,aL,38],[0,dx,20],[0,cF,36],[0,cc,35],[0,c4,28],[0,aS,56],[0,dJ,61],[0,a5,55],[0,ea,54],[0,cG,63],[0,dq,34],[0,c_,70],[0,bD,69],[0,bV,14],[0,a0,78],[0,bl,51],[0,dH,48],[0,er,58],[0,c$,46],[0,cW,71],[0,d$,25],[0,c7,65],[0,aV,74],[0,x,29],[0,eH,44],[0,aK,24],[0,bx,59],[0,U,18],[0,ae,72],[0,cn,33],[0,cu,52],[0,d2,13],[0,dF,dG],[0,ck,8],[0,cf,7],[0,c9,6],[0,eG,5],[0,b4,90],[0,aB,89],[0,cU,91],[0,cv,aG],[0,K,cZ],[0,ay,a8],[0,cg,aH],[0,am,bz],[0,dm,96],[0,L,br],[0,eh,b1],[0,y,bX],[0,bM,bU],[0,bT,ep],[0,z,as],[0,A,et],[0,bR,dV],[0,an,94],[0,dT,bi],[0,cB,bg],[0,dP,93],[0,cp,ds],[0,ct,99],[0,en,97],[0,I,bh],[0,bY,aO],[0,df,bB],[0,by,98],[0,bP,W],[0,ce,95],[0,aq,b8],[0,dY,av],[0,eu,92],[0,ef,d1],[0,cj,4],[0,dA,3],[0,ch,2],[0,cI,bb],[0,bZ,1],[0,dv,66],[0,ap,68],[0,aR,19],[0,d8,12],[0,b$,49],[0,dM,0]];c.sections=[0,[0,125,[0,[0,[0,[0,[0,[0,[0,0,[0,dM],0,[0,0,[0,b$],49,0,1],2],[0,d8],12,0,3],[0,aR],19,[0,[0,[0,0,[0,ap],68,0,1],[0,dv],66,0,2],[0,bZ],1,[0,[0,0,[0,cI],bb,0,1],[0,ch],2,0,2],3],4],[0,dA],3,[0,[0,[0,0,[0,cj],4,[0,0,[0,ef],d1,0,1],2],[0,eu],92,[0,0,[0,dY],av,[0,0,[0,aq],b8,0,1],2],3],[0,ce],95,[0,[0,[0,0,[0,bP],W,0,1],[0,by],98,0,2],[0,df],bB,[0,[0,0,[0,bY],aO,[0,0,[0,I],bh,0,1],2],[0,en],97,[0,0,[0,ct],99,[0,0,[0,cp],ds,0,1],2],3],4],5],6],[0,dP],93,[0,[0,[0,[0,[0,0,[0,cB],bg,[0,0,[0,dT],bi,0,1],2],[0,an],94,[0,[0,0,[0,bR],dV,0,1],[0,A],et,0,2],3],[0,z],as,[0,[0,0,[0,bT],ep,0,1],[0,bM],bU,0,2],4],[0,y],bX,[0,[0,0,[0,eh],b1,0,1],[0,L],br,0,2],5],[0,dm],96,[0,[0,[0,[0,[0,0,[0,am],bz,0,1],[0,cg],aH,0,2],[0,ay],a8,0,3],[0,K],cZ,[0,0,[0,cv],aG,0,1],4],[0,cU],91,[0,[0,0,[0,aB],89,[0,0,[0,b4],90,0,1],2],[0,eG],5,[0,[0,0,[0,c9],6,0,1],[0,cf],7,[0,0,[0,ck],8,[0,0,[0,dF],dG,0,1],2],3],4],5],6],7],[0,d2],13,[0,[0,[0,[0,0,[0,cu],52,0,1],[0,cn],33,[0,0,[0,ae],72,0,1],2],[0,U],18,[0,0,[0,bx],59,0,1],3],[0,aK],24,[0,[0,[0,0,[0,eH],44,0,1],[0,x],29,[0,[0,0,[0,aV],74,0,1],[0,c7],65,0,2],3],[0,d$],25,[0,[0,0,[0,cW],71,0,1],[0,c$],46,[0,[0,0,[0,er],58,0,1],[0,dH],48,[0,0,[0,bl],51,[0,0,[0,a0],78,0,1],2],3],4],5],6],8],[0,bV],14,[0,[0,[0,[0,[0,[0,0,[0,bD],69,[0,0,[0,c_],70,0,1],2],[0,dq],34,[0,0,[0,cG],63,0,1],3],[0,ea],54,[0,0,[0,a5],55,[0,[0,0,[0,dJ],61,0,1],[0,aS],56,0,2],3],4],[0,c4],28,[0,0,[0,cc],35,[0,0,[0,cF],36,0,1],2],5],[0,dx],20,[0,[0,[0,0,[0,aL],38,0,1],[0,ba],27,[0,[0,0,[0,S],73,0,1],[0,b3],41,0,2],3],[0,at],32,[0,[0,[0,0,[0,c2],76,0,1],[0,dt],45,0,2],[0,az],37,0,3],4],6],[0,cm],16,[0,[0,[0,[0,[0,[0,0,[0,du],67,0,1],[0,dI],22,[0,0,[0,dg],57,0,1],2],[0,dd],39,[0,[0,0,[0,bq],53,0,1],[0,c6],50,0,2],3],[0,bL],43,[0,[0,0,[0,au],60,0,1],[0,b_],23,[0,[0,0,[0,cs],64,0,1],[0,bd],47,0,2],3],4],[0,cy],21,[0,[0,0,[0,bK],40,[0,0,[0,eo],42,[0,0,[0,d7],77,0,1],2],3],[0,aZ],30,[0,0,[0,d3],75,0,1],4],5],[0,bc],15,[0,[0,[0,[0,0,[0,b9],17,0,1],[0,P],26,[0,0,[0,eD],31,0,1],2],[0,cH],62,[0,[0,0,[0,aE],88,0,1],[0,T],80,0,2],3],[0,a_],81,[0,[0,[0,0,[0,bE],82,[0,0,[0,cl],84,[0,0,[0,aI],87,0,1],2],3],[0,eg],83,[0,0,[0,dB],79,[0,0,[0,a1],85,[0,0,[0,ey],86,0,1],2],3],4],[0,cP],9,[0,0,[0,c1],10,[0,0,[0,bQ],11,0,1],2],5],6],7],8],9]],0,i.caml_list_of_js_array(["%caml_format_int_special","%direct_int_div","%direct_int_mod","%direct_int_mul","%direct_obj_tag","%int_add","%int_and","%int_asr",dn,"%int_lsl","%int_lsr",_,ar,"%int_neg","%int_or","%int_sub","%int_xor","JsStringReader","MlBytes","MlChanid","MlFakeDevice","MlFakeFd","MlFakeFd_out","MlFakeFile","MlFile","MlInt64","MlMutex","MlNat","MlNodeDevice","MlNodeFd","MlObjectTable","Ml_Bigarray","Ml_Bigarray_c_1_1","UInt8ArrayReader","add_nat","bigstring_of_array_buffer","bigstring_of_typed_array","bigstring_to_array_buffer","bigstring_to_typed_array","blake2b","blit_nat","caml_MD5Final","caml_MD5Init","caml_MD5Transform","caml_MD5Update","caml_abs_float","caml_acos_float","caml_acosh_float","caml_add_float","caml_alloc_dummy","caml_alloc_dummy_float","caml_alloc_dummy_infix","caml_alloc_stack","caml_argv","caml_array_append","caml_array_blit","caml_array_bound_error","caml_array_concat","caml_array_fill",e,G,eq,"caml_array_make","caml_array_of_bytes","caml_array_of_string",h,ed,bs,"caml_array_sub","caml_array_unsafe_get","caml_array_unsafe_get_float","caml_array_unsafe_set","caml_array_unsafe_set_addr","caml_array_unsafe_set_float","caml_asin_float","caml_asinh_float","caml_atan2_float","caml_atan_float","caml_atanh_float","caml_atomic_cas","caml_atomic_exchange","caml_atomic_fetch_add","caml_atomic_load","caml_atomic_make_contended","caml_ba_blit","caml_ba_change_layout","caml_ba_compare","caml_ba_create","caml_ba_create_buffer","caml_ba_create_from","caml_ba_create_unsafe","caml_ba_custom_name","caml_ba_deserialize","caml_ba_dim","caml_ba_dim_1","caml_ba_dim_2","caml_ba_dim_3","caml_ba_fill","caml_ba_from_typed_array","caml_ba_get_1","caml_ba_get_2","caml_ba_get_3","caml_ba_get_generic","caml_ba_get_size","caml_ba_get_size_per_element","caml_ba_hash","caml_ba_init","caml_ba_kind","caml_ba_kind_of_typed_array","caml_ba_layout","caml_ba_map_file","caml_ba_map_file_bytecode","caml_ba_num_dims","caml_ba_reshape","caml_ba_serialize","caml_ba_set_1","caml_ba_set_2","caml_ba_set_3","caml_ba_set_generic","caml_ba_slice","caml_ba_sub","caml_ba_to_typed_array","caml_ba_uint8_get16","caml_ba_uint8_get32","caml_ba_uint8_get64","caml_ba_uint8_set16","caml_ba_uint8_set32","caml_ba_uint8_set64","caml_backtrace_status","caml_bigstring_blit_ba_to_ba","caml_bigstring_blit_ba_to_bytes","caml_bigstring_blit_bytes_to_ba","caml_bigstring_blit_string_to_ba","caml_bigstring_memcmp","caml_blake2_create","caml_blake2_final","caml_blake2_string","caml_blake2_update","caml_blit_bytes","caml_blit_string","caml_bswap16","caml_build_symbols","caml_bytes_bound_error","caml_bytes_compare","caml_bytes_equal","caml_bytes_get","caml_bytes_get16","caml_bytes_get32","caml_bytes_get64","caml_bytes_greaterequal","caml_bytes_greaterthan","caml_bytes_lessequal","caml_bytes_lessthan","caml_bytes_notequal","caml_bytes_of_array","caml_bytes_of_jsbytes","caml_bytes_of_string","caml_bytes_of_uint8_array","caml_bytes_of_utf16_jsstring","caml_bytes_set","caml_bytes_set16","caml_bytes_set32","caml_bytes_set64","caml_bytes_unsafe_get","caml_bytes_unsafe_set","caml_call_gen","caml_callback","caml_cbrt_float","caml_ceil_float",H,o,cq,bW,"caml_classify_float","caml_compare","caml_compare_val","caml_compare_val_get_custom","caml_compare_val_number_custom","caml_compare_val_tag","caml_continuation_use_and_update_handler_noexc","caml_continuation_use_noexc","caml_convert_bytes_to_array","caml_convert_raw_backtrace","caml_convert_raw_backtrace_slot","caml_convert_string_to_bytes","caml_copysign_float","caml_cos_float","caml_cosh_float","caml_create_bytes","caml_create_file","caml_create_string","caml_current_dir","caml_custom_event_index","caml_custom_identifier","caml_custom_ops","caml_decompress_input",g,"caml_div_float","caml_domain_dls","caml_domain_dls_compare_and_set","caml_domain_dls_get","caml_domain_dls_set","caml_domain_id","caml_domain_spawn","caml_ephe_blit_data",bG,"caml_ephe_check_data",cw,"caml_ephe_create","caml_ephe_data_offset","caml_ephe_get_data","caml_ephe_get_data_copy",Z,dW,"caml_ephe_key_offset","caml_ephe_none","caml_ephe_set_data","caml_ephe_set_data_opt","caml_ephe_set_key","caml_ephe_unset_data","caml_ephe_unset_key","caml_eq_float","caml_equal","caml_erf_float","caml_erfc_float","caml_executable_name","caml_exn_with_js_backtrace","caml_exp2_float","caml_exp_float","caml_expm1_float","caml_failwith","caml_fatal_uncaught_exception",a4,N,"caml_final_register","caml_final_register_called_without_value","caml_final_release","caml_finish_formatting","caml_float_compare","caml_float_of_bytes","caml_float_of_int","caml_float_of_string","caml_floatarray_blit","caml_floatarray_create",dr,eF,"caml_floatarray_unsafe_get","caml_floatarray_unsafe_set","caml_floor_float","caml_fma_float","caml_fmod_float","caml_format_exception","caml_format_float",p,"caml_fresh_oo_id","caml_frexp_float","caml_fs_init","caml_gc_compaction","caml_gc_counters","caml_gc_full_major","caml_gc_get","caml_gc_major","caml_gc_major_slice","caml_gc_minor","caml_gc_minor_words","caml_gc_quick_stat","caml_gc_set","caml_gc_stat","caml_ge_float","caml_get_cached_method","caml_get_continuation_callstack","caml_get_current_callstack","caml_get_exception_backtrace","caml_get_exception_raw_backtrace","caml_get_global_data","caml_get_minor_free","caml_get_public_method","caml_get_root","caml_global_data","caml_gr_arc_aux","caml_gr_blit_image","caml_gr_clear_graph","caml_gr_close_graph","caml_gr_close_subwindow","caml_gr_create_image","caml_gr_current_x","caml_gr_current_y","caml_gr_display_mode","caml_gr_doc_of_state","caml_gr_draw_arc","caml_gr_draw_char","caml_gr_draw_image","caml_gr_draw_rect","caml_gr_draw_str","caml_gr_draw_string","caml_gr_dump_image","caml_gr_fill_arc","caml_gr_fill_poly","caml_gr_fill_rect","caml_gr_lineto","caml_gr_make_image","caml_gr_moveto","caml_gr_open_graph","caml_gr_open_subwindow","caml_gr_plot","caml_gr_point_color","caml_gr_remember_mode","caml_gr_resize_window","caml_gr_set_color","caml_gr_set_font","caml_gr_set_line_width","caml_gr_set_text_size","caml_gr_set_window_title","caml_gr_sigio_handler","caml_gr_sigio_signal","caml_gr_size_x","caml_gr_size_y","caml_gr_state","caml_gr_state_create","caml_gr_state_get","caml_gr_state_init","caml_gr_state_set","caml_gr_synchronize","caml_gr_text_size","caml_gr_wait_event","caml_gr_window_id","caml_greaterequal","caml_greaterthan","caml_gt_float","caml_hash","caml_hash_mix_bigstring","caml_hash_mix_bytes","caml_hash_mix_bytes_arr","caml_hash_mix_final","caml_hash_mix_float","caml_hash_mix_float16","caml_hash_mix_float32","caml_hash_mix_int","caml_hash_mix_int64","caml_hash_mix_jsbytes","caml_hash_mix_string","caml_hash_nat","caml_hexstring_of_float","caml_hypot_float","caml_input_value","caml_input_value_from_bytes","caml_input_value_from_reader","caml_input_value_to_outside_heap","caml_install_signal_handler","caml_int32_add","caml_int32_and","caml_int32_bits_of_float",d5,ah,F,"caml_int32_float_of_bits",cO,Q,X,"caml_int32_neg","caml_int32_of_float","caml_int32_of_int",cd,"caml_int32_or","caml_int32_shift_left","caml_int32_shift_right","caml_int32_shift_right_unsigned","caml_int32_sub","caml_int32_to_float","caml_int32_to_int","caml_int32_unmarshal","caml_int32_xor","caml_int64_add","caml_int64_and","caml_int64_bits_of_float","caml_int64_bswap","caml_int64_compare","caml_int64_create_lo_hi","caml_int64_create_lo_mi_hi","caml_int64_div","caml_int64_float_of_bits","caml_int64_format","caml_int64_hash","caml_int64_hi32","caml_int64_is_negative","caml_int64_is_zero","caml_int64_lo32","caml_int64_marshal","caml_int64_mod","caml_int64_mul","caml_int64_neg","caml_int64_of_bytes","caml_int64_of_float",cr,q,a7,"caml_int64_of_string","caml_int64_offset","caml_int64_or","caml_int64_shift_left","caml_int64_shift_right","caml_int64_shift_right_unsigned","caml_int64_sub","caml_int64_to_bytes","caml_int64_to_float",ev,s,dO,"caml_int64_ult","caml_int64_unmarshal","caml_int64_xor",t,"caml_int_of_float",m,"caml_invalid_argument","caml_io_buffer_size","caml_is_continuation_tag","caml_is_js","caml_is_ml_bytes","caml_is_ml_string","caml_is_printable","caml_is_special_exception","caml_js_call","caml_js_delete","caml_js_equals","caml_js_error_of_exception","caml_js_error_option_of_exception","caml_js_eval_string","caml_js_expr","caml_js_from_array","caml_js_from_bool",n,ew,b0,"caml_js_from_string","caml_js_fun_call","caml_js_function_arity","caml_js_get","caml_js_get_console","caml_js_html_entities","caml_js_html_escape","caml_js_instanceof","caml_js_meth_call","caml_js_new","caml_js_object","caml_js_pure_expr","caml_js_set","caml_js_strict_equals","caml_js_to_array","caml_js_to_bool","caml_js_to_byte_string","caml_js_to_float",ei,dC,"caml_js_to_string","caml_js_typeof","caml_js_var","caml_js_wrap_callback","caml_js_wrap_callback_arguments","caml_js_wrap_callback_strict","caml_js_wrap_callback_unsafe","caml_js_wrap_meth_callback","caml_js_wrap_meth_callback_arguments","caml_js_wrap_meth_callback_strict","caml_js_wrap_meth_callback_unsafe","caml_jsbytes_of_string","caml_jsoo_flags_effects","caml_jsoo_flags_use_js_string","caml_jsstring_of_string","caml_lazy_make_forward","caml_lazy_read_result","caml_lazy_reset_to_lazy","caml_lazy_update_to_forcing","caml_lazy_update_to_forward","caml_ldexp_float","caml_le_float","caml_lessequal","caml_lessthan","caml_lex_array","caml_lex_engine","caml_list_mount_point","caml_list_of_js_array","caml_list_to_js_array","caml_log10_float","caml_log1p_float","caml_log2_float","caml_log_float","caml_lt_float","caml_lxm_M","caml_lxm_daba","caml_lxm_next","caml_make_float_vect","caml_make_path","caml_make_vect","caml_marshal_constants","caml_marshal_data_size","caml_marshal_header_size","caml_maybe_attach_backtrace","caml_maybe_print_stats","caml_md5_bytes","caml_md5_chan","caml_md5_string","caml_memprof_discard","caml_memprof_start","caml_memprof_stop","caml_method_cache","caml_ml_bytes_content","caml_ml_bytes_length","caml_ml_channel_get","caml_ml_channel_redirect","caml_ml_channel_restore","caml_ml_channel_size","caml_ml_channel_size_64","caml_ml_channels","caml_ml_close_channel","caml_ml_condition_broadcast","caml_ml_condition_new","caml_ml_condition_signal","caml_ml_condition_wait","caml_ml_debug_info_status","caml_ml_domain_cpu_relax","caml_ml_domain_id","caml_ml_enable_runtime_warnings","caml_ml_flush","caml_ml_input","caml_ml_input_bigarray","caml_ml_input_block","caml_ml_input_char","caml_ml_input_int","caml_ml_input_scan_line","caml_ml_is_binary_mode","caml_ml_is_buffered","caml_ml_mutex_lock","caml_ml_mutex_new","caml_ml_mutex_try_lock","caml_ml_mutex_unlock","caml_ml_open_descriptor_in","caml_ml_open_descriptor_in_with_flags","caml_ml_open_descriptor_out","caml_ml_open_descriptor_out_with_flags","caml_ml_out_channels_list","caml_ml_output","caml_ml_output_bigarray","caml_ml_output_bytes","caml_ml_output_char","caml_ml_output_int","caml_ml_output_ta","caml_ml_pos_in","caml_ml_pos_in_64","caml_ml_pos_out","caml_ml_pos_out_64","caml_ml_runtime_events_are_active","caml_ml_runtime_events_pause","caml_ml_runtime_events_resume","caml_ml_runtime_events_start","caml_ml_runtime_warnings_enabled","caml_ml_seek_in","caml_ml_seek_in_64","caml_ml_seek_out","caml_ml_seek_out_64","caml_ml_set_binary_mode","caml_ml_set_buffered","caml_ml_set_channel_name","caml_ml_set_channel_output","caml_ml_set_channel_refill","caml_ml_string_length",f,"caml_modf_float","caml_mount_autoload",d,"caml_mul_float","caml_named_value","caml_named_values","caml_nativeint_add","caml_nativeint_and",bu,cz,a9,eI,dw,R,"caml_nativeint_neg","caml_nativeint_of_float","caml_nativeint_of_int","caml_nativeint_of_int32",cT,"caml_nativeint_or","caml_nativeint_shift_left","caml_nativeint_shift_right","caml_nativeint_shift_right_unsigned","caml_nativeint_sub","caml_nativeint_to_float","caml_nativeint_to_int","caml_nativeint_to_int32","caml_nativeint_unmarshal","caml_nativeint_xor","caml_neg_float","caml_neq_float","caml_new_lex_engine","caml_new_string","caml_nextafter_float","caml_notequal","caml_obj_add_offset","caml_obj_block","caml_obj_compare_and_swap","caml_obj_dup","caml_obj_is_shared","caml_obj_raw_field","caml_obj_reachable_words","caml_obj_set_raw_field","caml_obj_tag","caml_obj_update_tag","caml_obj_with_tag","caml_ojs_new_arr","caml_oo_cache_id","caml_oo_last_id","caml_output_val","caml_output_value","caml_output_value_to_buffer","caml_output_value_to_bytes","caml_output_value_to_string","caml_packFloat16","caml_parse_digit","caml_parse_engine","caml_parse_format","caml_parse_sign_and_base","caml_parser_trace","caml_pos_in","caml_pos_out","caml_power_float","caml_pure_js_expr","caml_raise_constant","caml_raise_end_of_file","caml_raise_no_such_file","caml_raise_nodejs_error","caml_raise_not_found","caml_raise_sys_error","caml_raise_system_error","caml_raise_with_arg","caml_raise_with_args","caml_raise_with_string","caml_raise_zero_divide","caml_raw_backtrace_length","caml_raw_backtrace_next_slot","caml_raw_backtrace_slot","caml_read_file_content","caml_recommended_domain_count","caml_record_backtrace","caml_record_backtrace_env_flag","caml_record_backtrace_runtime_flag","caml_refill","caml_register_global","caml_register_named_value","caml_restore_raw_backtrace","caml_root","caml_round_float","caml_runtime_events_create_cursor","caml_runtime_events_free_cursor","caml_runtime_events_read_poll","caml_runtime_events_user_register","caml_runtime_events_user_resolve","caml_runtime_events_user_write","caml_runtime_parameters","caml_runtime_variant","caml_runtime_warnings","caml_seek_in","caml_seek_out","caml_set_oo_id","caml_set_parser_trace","caml_set_static_env",dp,aQ,"caml_sin_float","caml_sinh_float","caml_sqrt_float","caml_str_repeat","caml_strerror","caml_string_bound_error","caml_string_compare","caml_string_concat","caml_string_equal","caml_string_get","caml_string_get16","caml_string_get32","caml_string_get64","caml_string_greaterequal","caml_string_greaterthan","caml_string_hash","caml_string_lessequal","caml_string_lessthan","caml_string_notequal","caml_string_of_array","caml_string_of_bytes","caml_string_of_jsbytes","caml_string_of_jsstring","caml_string_of_uint8_array","caml_string_set","caml_string_unsafe_get","caml_sub_float","caml_sub_uint8_array_to_jsbytes","caml_subarray_to_jsbytes","caml_sys_argv","caml_sys_chdir","caml_sys_close","caml_sys_const_backend_type","caml_sys_const_big_endian","caml_sys_const_int_size","caml_sys_const_max_wosize","caml_sys_const_naked_pointers_checked","caml_sys_const_ostype_cygwin","caml_sys_const_ostype_unix","caml_sys_const_ostype_win32","caml_sys_const_word_size","caml_sys_executable_name",j,"caml_sys_fds","caml_sys_file_exists","caml_sys_get_argv","caml_sys_get_config",k,"caml_sys_getenv","caml_sys_is_directory","caml_sys_is_regular_file","caml_sys_isatty","caml_sys_mkdir","caml_sys_modify_argv","caml_sys_open","caml_sys_open_for_node","caml_sys_random_seed","caml_sys_read_directory","caml_sys_remove","caml_sys_rename","caml_sys_rmdir","caml_sys_system_command","caml_sys_time","caml_sys_time_include_children","caml_sys_unsafe_getenv","caml_tan_float","caml_tanh_float","caml_throw_js_exception","caml_to_js_string","caml_trailing_slash","caml_trampoline","caml_trampoline_return","caml_trunc_float","caml_uint8_array_of_bytes","caml_uint8_array_of_string",cD,cE,eB,bj,ex,dh,c3,cV,ak,bp,es,ci,db,c0,J,V,dQ,cR,b6,aT,bN,ez,bo,a6,b,el,bw,aC,aP,al,l,cL,cA,d_,cM,eA,aW,aF,dE,ac,ag,Y,a$,da,r,ca,dU,cQ,eE,dz,D,ad,ax,dR,dj,dl,eb,a2,bH,b7,E,c5,cX,b2,di,"caml_unmount","caml_unpackFloat16","caml_update_dummy",ee,cK,"caml_weak_create",af,aU,"caml_weak_set","caml_wrap_exception","caml_xdg_defaults","caml_xmlhttprequest_create","caml_zstd_initialize","compare_digits_nat","compare_nat","complement_nat","create_nat","decr_nat","deserialize_nat","div_digit_nat","div_helper","div_nat","fs_node_supported","incr_nat","initialize_nat","is_digit_int","is_digit_normalized","is_digit_odd","is_digit_zero","jsoo_create_file","jsoo_create_file_extern","jsoo_dataview","jsoo_effect_not_supported","jsoo_is_ascii","jsoo_is_win32","jsoo_mount_point","jsoo_static_env","jsoo_sys_getenv","jsoo_text_decoder","jsoo_text_decoder_buff","jsoo_text_encoder","jsoo_toplevel_reloc","land_digit_nat","length_nat","lor_digit_nat","lxor_digit_nat","make_unix_err_args","mult_digit_nat","mult_nat","nat_of_array","nth_digit_nat","nth_digit_nat_native","num_digits_nat","num_leading_zero_bits_in_digit","ocaml_stats_from_node_stats","os_type","path_is_absolute","re_match","re_partial_match","re_replacement_text","re_search_backward","re_search_forward","re_string_match","resolve_fs_device","serialize_nat","set_digit_nat","set_digit_nat_native","set_to_zero_nat","shift_left_nat","shift_right_nat","square_nat","sub_nat",aY,d9,dD,cS,$,"unix_error",a3,ej,u,bC,dN,aX,ec,ek,dL,cC,bJ,aJ,ai,M,bI,em,B,O,bk,C,aD,ab,aA,c8,aj,dk,bf,de,cY,bS,cJ,eC,dX,ao,aN,cb,dK,d4,dc,aM,w,dZ,bv,bt,bA,bm,cN,co,cx,v,bn,aw,aa,be,bF,dS,d0,dy,b5,bO,d6,"zstd_decompress"]),0];return}(globalThis)); +i=a.jsoo_runtime,c=i.caml_get_global_data(),d4="caml_unix_stat_64",d3="unix_lseek",l="caml_unix_inchannel_of_filedescr",d1="caml_unix_stat",d0="caml_unix_write_bigarray",fG="caml_nativeint_format",bg="caml_int64_of_nativeint",dZ="caml_unix_closedir",bf="caml_unix_getgrnam",cz="caml_unix_truncate",cy="caml_unix_getcwd",fC="caml_unix_readlink",fD="caml_floatarray_set",bd="caml_fill_bytes",bc="unix_error_message",cw="win_inchannel_of_filedescr",bb="caml_unix_time",ct="caml_unix_write",dW="unix_lstat",fy="unix_open",dU="unix_rename",fx="caml_unix_chmod",a9="unix_access",a7="caml_unix_lseek",a8="unix_fsync",dT="caml_unix_findnext",a5="caml_weak_get_copy",h="caml_array_set",dS="caml_unix_opendir",fv="caml_unix_lookup_file",a4="caml_unix_getegid",fu="caml_unix_getgid",cp="caml_js_from_nativeint",a0="caml_unix_gmtime",a1="caml_signbit_float",fs="caml_unix_close",fr="caml_js_from_int32",fq="caml_int64_to_int",ck="caml_check_bound_gen",p="caml_format_int",dM="unix_link",cg="unix_mkdir",aX="unix_rewinddir",aY="unix_read",dI="caml_unix_unlink",aU="unix_getgid",dG="caml_unix_error_message",fm="caml_unix_findclose",aP="caml_unix_lseek_64",fk="caml_array_get_float",cc="win_outchannel_of_filedescr",dD="caml_unix_fstat",ca="caml_unix_geteuid",dB="unix_lstat_64",aN="unix_inchannel_of_filedescr",b7="unix_getpwnam",b8="unix_geteuid",aM="caml_unix_getuid",dA="caml_unix_utimes",fe="caml_unix_getpwuid",ff="unix_getpwuid",o="caml_check_bound",fd="unix_ftruncate_64",aJ="unix_isatty",b5="caml_unix_times",dy="caml_unix_exit",fc="unix_exit",aG="caml_unix_single_write",b4="caml_ephe_blit_key",dw="caml_nativeint_of_string",aF="unix_write",du="caml_unix_ftruncate_64",dv="unix_close",e$="caml_js_to_int32",k="caml_sys_getcwd",dt="caml_unix_readdir",b1="win_findclose",az="%int_mul",dr="caml_int32_format",e6="caml_weak_blit",dp="caml_unix_localtime",dq="unix_times",e5="caml_array_set_addr",dn="caml_unix_inet_addr_of_string",e4="unix_ftruncate",dm="caml_weak_check",e3="caml_unix_symlink",aw="unix_outchannel_of_filedescr",at="caml_unix_has_symlink",dj="unix_mktime",s="caml_int64_to_int32",bX="unix_fstat",eZ="caml_unix_link",as="caml_unix_fchmod",bU="unix_symlink",ar="unix_localtime",eX="unix_chdir",aq="unix_getgrgid",ao="caml_int32_compare",an="caml_unix_mkdir",eU="win_startup",eT="caml_int32_bswap",am="caml_weak_get",eR="unix_readlink",ak="caml_unix_rmdir",e="caml_array_get",aj="caml_unix_lstat_64",ai="unix_inet_addr_of_string",bN="caml_unix_gettimeofday",r="caml_unix_outchannel_of_filedescr",bK="unix_stat",dd="caml_unix_chdir",ag="unix_closedir",ah="win_cleanup",bJ="caml_nativeint_bswap",ad="caml_unix_mktime",ae="caml_ephe_get_key",af="%int_mod",bI="unix_stat_64",c$="unix_getegid",da="caml_unix_access",c9="caml_unix_isatty",ac="caml_int32_mul",c8="caml_nativeint_compare",q="caml_int64_of_int32",aa="caml_unix_fsync",eM="win_findnext",Y="caml_nativeint_mul",eL="unix_single_write",X="caml_int32_mod",n="caml_js_from_float",c4="unix_truncate_64",c3="caml_ephe_check_key",eJ="unix_opendir",bH="caml_array_set_float",eH="caml_ephe_get_key_copy",T="unix_getuid",d="caml_mul",S="caml_fill_string",g="caml_div",cY="caml_int64_of_int",eE="caml_unix_read_bigarray",R="unix_getgrnam",eC="win_findfirst",eB="caml_unix_startup",bE="caml_unix_filedescr_of_fd",eA="caml_unix_ftruncate",f="caml_mod",cX="caml_check_bound_float",bC="unix_utimes",bD="caml_unix_getgrgid",ey="caml_int64_to_nativeint",bB="unix_time",ex="unix_fstat_64",N="caml_unix_fstat_64",cU="unix_truncate",bz="unix_gmtime",by="caml_unix_cleanup",eu="unix_getcwd",et="unix_readdir",j="caml_sys_exit",J="caml_channel_descriptor",bu="unix_lseek_64",t="caml_int_compare",I="caml_array_get_addr",el="unix_chmod",em="caml_unix_lstat",ek="caml_js_to_nativeint",H="caml_int32_div",cN="caml_unix_findfirst",G="caml_unix_truncate_64",F="caml_unix_rewinddir",E="unix_has_symlink",m="caml_int_of_string",eh="caml_unix_rename",bs="win_filedescr_of_channel",D="unix_gettimeofday",eg="win_handle_fd",b="caml_unix_getpwnam",cI="caml_int32_of_string",ee="caml_nativeint_mod",x="unix_rmdir",cF="caml_unix_read",cG="unix_read_bigarray",d9="caml_floatarray_get",w="unix_unlink",bm="caml_unix_open",d7="caml_signbit",v="unix_fchmod",bk="caml_nativeint_div",d6="%int_div";c.aliases=i.caml_list_of_js_array([[0,ck,o],[0,fq,s],[0,d6,g],[0,fr,n],[0,eC,cN],[0,bk,g],[0,v,as],[0,R,b],[0,aw,r],[0,cY,q],[0,cp,n],[0,d7,a1],[0,dm,c3],[0,S,bd],[0,w,dI],[0,e4,eA],[0,d9,e],[0,e5,h],[0,T,aM],[0,cG,eE],[0,x,ak],[0,dq,b5],[0,e6,b4],[0,dr,p],[0,fv,d0],[0,bH,h],[0,az,d],[0,eJ,dS],[0,b1,fm],[0,cI,m],[0,ee,f],[0,c4,G],[0,X,f],[0,a5,eH],[0,Y,d],[0,eL,aG],[0,dv,fs],[0,a8,aa],[0,aF,ct],[0,dw,m],[0,a9,da],[0,eg,bE],[0,eM,dT],[0,D,bN],[0,bs,J],[0,fc,j],[0,c8,t],[0,ac,d],[0,dy,j],[0,E,at],[0,dU,eh],[0,aJ,c9],[0,fd,du],[0,c$,a4],[0,dW,em],[0,fy,bm],[0,H,g],[0,ff,b],[0,fe,b],[0,bI,d4],[0,ek,e$],[0,af,f],[0,bJ,eT],[0,b8,ca],[0,b7,b],[0,ah,by],[0,ag,dZ],[0,cw,l],[0,el,fx],[0,bK,d1],[0,I,e],[0,aN,l],[0,ai,dn],[0,dB,aj],[0,fD,h],[0,cy,k],[0,cc,r],[0,fk,e],[0,eR,fC],[0,am,ae],[0,bf,b],[0,bu,aP],[0,eU,eB],[0,et,dt],[0,aU,fu],[0,dG,bc],[0,ao,t],[0,eu,k],[0,bz,a0],[0,bg,q],[0,aq,b],[0,cU,cz],[0,eX,dd],[0,ar,dp],[0,fG,p],[0,ex,N],[0,bU,e3],[0,bB,bb],[0,ey,s],[0,aY,cF],[0,aX,F],[0,cg,an],[0,bD,b],[0,dM,eZ],[0,bC,dA],[0,cX,o],[0,bX,dD],[0,d3,a7],[0,dj,ad]]);c.prim_count=952;var +d2=133,bi=102,bh="Re__Hash_set",cA="Stdlib__Type",cB=114,fF="Stdlib__Buffer",dX="Js_of_ocaml__Dom_svg",dY="Stdlib__Out_channel",fE="Match_failure",be="Stdlib__Gc",fA="Re__Compile",fB="Stdlib__Unit",cx="Re__Posix_class",fz=136,cv="Jsoo_runtime__Runtime_version",cu="Stdlib__Map",ba="Sx_vm",dV="Stdlib__Parsing",a$="Stdlib__Effect",cs=108,a_="Stdlib__String",fw="Re_pcre",a6="Stdlib__BytesLabels",dR="Stdlib__Condition",cr=148,dQ="Stdlib__Filename",a3="Stdlib__In_channel",dO="Not_found",dP="Re__Fmt",cq=154,a2="CamlinternalLazy",ft="Sx_vm_ref",co="Division_by_zero",cn="Js_of_ocaml__Effect_js",cm="Re__Glob",dN="Re__Parse_buffer",aZ=117,cl=104,fp="Js_of_ocaml__",cj="Stdlib__Either",ci=109,ch="Js_of_ocaml__MutationObserver",cf="Js_of_ocaml__Json",dL="Stdlib__Callback",dK=155,aW="Stdlib__Lexing",ce="Undefined_recursive_module",dJ="Stdlib__Printf",fo=111,aV="Stdlib__Bool",dH="Stdlib__Int",fn=153,dF="Stdlib__MoreLabels",aR=127,aS=103,aT="Sx_render",dE="Sys_error",aQ=100,cd="Js_of_ocaml__Dom_events",fl="Stdlib__Digest",dC=101,cb=151,aO="Sx_compiler",b$="Js_of_ocaml__PerformanceObserver",fj="Re__View",b_="Stdlib__Queue",fi=110,b9="Stdlib__Set",fh="Stdlib__Stack",fg="Js_of_ocaml__File",dz="Stdlib__Complex",aL="Re__Dyn",aK="Jsoo_runtime__",b6="Re__Import",dx="Jsoo_runtime",fb=130,aH="Js_of_ocaml__WebSockets",aI="Stdlib__Nativeint",fa=128,aE=113,b3=146,b2="Re__Dense_map",ds="Sys_blocked_io",aD="Stdlib__Random",e_="Js_of_ocaml__ResizeObserver",e9="Sx_runtime",aC=135,b0=144,e8="Js_of_ocaml",aA=106,aB="Stdlib__Marshal",ay="Js_of_ocaml__Console",e7=140,bZ="Sx_primitives",bY="Stdlib__Ephemeron",ax="CamlinternalMod",dl="Re__Color_map",av="Js_of_ocaml__Js",au="Js_of_ocaml__Url",e2="Stdlib__Fun",e1="Stdlib__Char",dk=125,e0="Re__Category",bV=138,bW=116,eY=126,ap="Re__Ast",di="Dune__exe__Sx_browser",dh=150,eW="CamlinternalFormatBasics",dg="Stdlib__Weak",bT=105,df="Stdlib__Format",eV="Stdlib__StdLabels",de="Stdlib__Int64",eS="Re__Search",bS="Js_of_ocaml__Dom_html",al="Stdlib__ArrayLabels",bR=129,eQ="Re__Cset",bQ="Stdlib__Bigarray",bO=137,bP="Re__Core",bL=132,bM="Re__Emacs",dc="Re__Automata",db="Re__Pmark",c_="Js_of_ocaml__IntersectionObserver",ab=115,c7=131,eN=122,eO="Stdlib",eP="Stdlib__StringLabels",$="Stdlib__Atomic",_="Sx_cst",c6="Re__",Z="Stdlib__ListLabels",c5="Stdlib__Seq",eK="Js_of_ocaml__CSS",W=134,c2="Js_of_ocaml__XmlHttpRequest",eI="Re__Bit_vector",V="Stdlib__Uchar",U=152,c1="Stdlib__Arg",c0="Js_of_ocaml__Form",cZ="Stdlib__Scanf",eG=112,eF="Re__Slice",eD="Js_of_ocaml__Intl",bG=107,bF="Stdlib__Printexc",Q="Js_of_ocaml__Sys_js",ez="Js_of_ocaml__Import",P="Re",cV=147,cW="Js_of_ocaml__Geolocation",ew="Re__Perl",O="Js_of_ocaml__Worker",bA="Stdlib__Dynarray",ev="Assert_failure",M="Re__Pcre",L=141,bw=121,bx=118,bv=120,cT="Stdlib__Array",K="Js_of_ocaml__EventSource",cS="Stdlib__Obj",es="Stdlib__Hashtbl",eq="Stdlib__Domain",er="Stdlib__Option",ep=124,eo="Std_exit",en=149,cR="Re__Group",cQ="Sx_ref",bt=145,cO="Invalid_argument",cP="Stack_overflow",cM="End_of_file",cL="Js_of_ocaml__WebGL",ej="Sx_types",ei="Failure",C="Js_of_ocaml__Jstable",ef="Stdlib__Lazy",br="Stdlib__Semaphore",cK="Out_of_memory",B="Js_of_ocaml__Lib_version",A="Js_of_ocaml__Regexp",cJ="Js_of_ocaml__Dom",z="Stdlib__Bytes",bq="Stdlib__Sys",ed=143,ec="CamlinternalOO",bp="Re__Posix",cH="Stdlib__Int32",eb="Stdlib__Oo",bo=123,y="Re__Replace",d_="Re__Mark_infos",d$="Stdlib__Mutex",ea=119,bn="Stdlib__List",cE=139,bl="Sx_parser",d8="Stdlib__Float",bj=142,cD="CamlinternalFormat",u="Re__Str",d5="Js_of_ocaml__Typed_array",cC="Stdlib__Result";c.symbols=[0,[0,ce,11],[0,dE,10],[0,ds,9],[0,ft,aZ],[0,ba,bW],[0,ej,fi],[0,e9,cB],[0,aT,bx],[0,cQ,ab],[0,bZ,aE],[0,bl,eG],[0,_,fo],[0,aO,ea],[0,dg,62],[0,fB,31],[0,V,26],[0,cA,17],[0,bq,15],[0,eP,75],[0,a_,30],[0,eV,77],[0,fh,42],[0,b9,40],[0,c5,21],[0,br,47],[0,cZ,64],[0,cC,23],[0,aD,60],[0,b_,43],[0,dJ,50],[0,bF,53],[0,dV,39],[0,dY,57],[0,er,22],[0,eb,67],[0,cS,16],[0,aI,37],[0,d$,45],[0,dF,76],[0,aB,32],[0,cu,41],[0,Z,73],[0,bn,27],[0,aW,38],[0,ef,20],[0,de,36],[0,cH,35],[0,dH,28],[0,a3,56],[0,es,61],[0,be,55],[0,e2,54],[0,df,63],[0,d8,34],[0,dQ,70],[0,bY,69],[0,cj,14],[0,a$,78],[0,bA,51],[0,eq,48],[0,fl,58],[0,dR,46],[0,dz,71],[0,e1,25],[0,dL,65],[0,a6,74],[0,z,29],[0,fF,44],[0,aV,24],[0,bQ,59],[0,$,18],[0,al,72],[0,cT,33],[0,c1,52],[0,eO,13],[0,eo,dK],[0,cP,8],[0,fw,ci],[0,fj,93],[0,u,dC],[0,eF,95],[0,eS,97],[0,y,bi],[0,cx,cl],[0,bp,bG],[0,db,89],[0,ew,bT],[0,M,aA],[0,dN,99],[0,d_,88],[0,b6,85],[0,bh,87],[0,cR,94],[0,cm,aS],[0,dP,80],[0,bM,aQ],[0,aL,82],[0,b2,84],[0,eQ,86],[0,bP,98],[0,fA,96],[0,dl,91],[0,e0,83],[0,eI,81],[0,dc,90],[0,ap,92],[0,c6,79],[0,P,cs],[0,cK,7],[0,dO,6],[0,fE,5],[0,cv,bw],[0,aK,bv],[0,dx,eN],[0,c2,c7],[0,O,bL],[0,aH,d2],[0,cL,W],[0,au,fz],[0,d5,aR],[0,Q,bV],[0,e_,cE],[0,A,aC],[0,b$,e7],[0,ch,L],[0,B,bO],[0,C,bj],[0,cf,ed],[0,av,dk],[0,eD,U],[0,c_,cb],[0,ez,ep],[0,cW,dh],[0,c0,fb],[0,fg,fa],[0,K,en],[0,cn,cr],[0,dX,cV],[0,bS,bR],[0,cd,b3],[0,cJ,eY],[0,ay,bt],[0,eK,b0],[0,fp,bo],[0,e8,fn],[0,cO,4],[0,ei,3],[0,cM,2],[0,di,cq],[0,co,1],[0,ec,66],[0,ax,68],[0,a2,19],[0,eW,12],[0,cD,49],[0,ev,0]];c.sections=[0,[0,156,[0,[0,[0,[0,[0,[0,[0,0,[0,ev],0,[0,0,[0,cD],49,0,1],2],[0,eW],12,0,3],[0,a2],19,[0,[0,[0,0,[0,ax],68,0,1],[0,ec],66,0,2],[0,co],1,[0,[0,0,[0,di],cq,0,1],[0,cM],2,0,2],3],4],[0,ei],3,[0,[0,[0,0,[0,cO],4,[0,0,[0,e8],fn,0,1],2],[0,fp],bo,[0,0,[0,eK],b0,[0,0,[0,ay],bt,0,1],2],3],[0,cJ],eY,[0,[0,[0,0,[0,cd],b3,0,1],[0,bS],bR,0,2],[0,dX],cV,[0,[0,0,[0,cn],cr,[0,0,[0,K],en,0,1],2],[0,fg],fa,[0,0,[0,c0],fb,[0,0,[0,cW],dh,0,1],2],3],4],5],6],[0,ez],ep,[0,[0,[0,[0,[0,[0,0,[0,c_],cb,[0,0,[0,eD],U,0,1],2],[0,av],dk,[0,[0,0,[0,cf],ed,0,1],[0,C],bj,0,2],3],[0,B],bO,[0,[0,0,[0,ch],L,0,1],[0,b$],e7,0,2],4],[0,A],aC,[0,[0,0,[0,e_],cE,0,1],[0,Q],bV,0,2],5],[0,d5],aR,[0,[0,[0,[0,0,[0,au],fz,0,1],[0,cL],W,0,2],[0,aH],d2,0,3],[0,O],bL,[0,0,[0,c2],c7,0,1],4],6],[0,dx],eN,[0,[0,[0,0,[0,aK],bv,[0,0,[0,cv],bw,0,1],2],[0,fE],5,[0,0,[0,dO],6,0,1],3],[0,cK],7,[0,[0,0,[0,P],cs,0,1],[0,c6],79,[0,[0,0,[0,ap],92,0,1],[0,dc],90,0,2],3],4],7],8],[0,eI],81,[0,[0,[0,[0,[0,0,[0,e0],83,0,1],[0,dl],91,[0,0,[0,fA],96,[0,0,[0,bP],98,0,1],2],3],[0,eQ],86,[0,0,[0,b2],84,0,1],4],[0,aL],82,[0,[0,[0,0,[0,bM],aQ,0,1],[0,dP],80,[0,[0,[0,0,[0,cm],aS,0,1],[0,cR],94,0,2],[0,bh],87,0,3],4],[0,b6],85,[0,[0,[0,0,[0,d_],88,0,1],[0,dN],99,[0,[0,0,[0,M],aA,0,1],[0,ew],bT,0,2],3],[0,db],89,[0,[0,[0,[0,0,[0,bp],bG,0,1],[0,cx],cl,0,2],[0,y],bi,[0,0,[0,eS],97,0,1],3],[0,eF],95,[0,[0,0,[0,u],dC,0,1],[0,fj],93,[0,[0,0,[0,fw],ci,0,1],[0,cP],8,[0,0,[0,eo],dK,0,1],2],3],4],5],6],7],[0,eO],13,[0,[0,[0,[0,0,[0,c1],52,0,1],[0,cT],33,[0,0,[0,al],72,0,1],2],[0,$],18,[0,0,[0,bQ],59,0,1],3],[0,aV],24,[0,[0,[0,0,[0,fF],44,0,1],[0,z],29,[0,[0,0,[0,a6],74,0,1],[0,dL],65,0,2],3],[0,e1],25,[0,[0,0,[0,dz],71,0,1],[0,dR],46,[0,[0,0,[0,fl],58,0,1],[0,eq],48,[0,0,[0,bA],51,[0,0,[0,a$],78,0,1],2],3],4],5],6],8],9],[0,cj],14,[0,[0,[0,[0,[0,[0,0,[0,bY],69,[0,0,[0,dQ],70,0,1],2],[0,d8],34,[0,0,[0,df],63,0,1],3],[0,e2],54,[0,0,[0,be],55,[0,[0,0,[0,es],61,0,1],[0,a3],56,0,2],3],4],[0,dH],28,[0,0,[0,cH],35,[0,0,[0,de],36,0,1],2],5],[0,ef],20,[0,[0,[0,0,[0,aW],38,0,1],[0,bn],27,[0,[0,0,[0,Z],73,0,1],[0,cu],41,0,2],3],[0,aB],32,[0,[0,[0,0,[0,dF],76,0,1],[0,d$],45,0,2],[0,aI],37,0,3],4],6],[0,cS],16,[0,[0,[0,[0,[0,[0,0,[0,eb],67,0,1],[0,er],22,[0,0,[0,dY],57,0,1],2],[0,dV],39,[0,[0,0,[0,bF],53,0,1],[0,dJ],50,0,2],3],[0,b_],43,[0,[0,0,[0,aD],60,0,1],[0,cC],23,[0,[0,0,[0,cZ],64,0,1],[0,br],47,0,2],3],4],[0,c5],21,[0,[0,0,[0,b9],40,[0,0,[0,fh],42,[0,0,[0,eV],77,0,1],2],3],[0,a_],30,[0,0,[0,eP],75,0,1],4],5],[0,bq],15,[0,[0,[0,[0,0,[0,cA],17,0,1],[0,V],26,[0,0,[0,fB],31,0,1],2],[0,dg],62,[0,[0,0,[0,aO],ea,0,1],[0,_],fo,0,2],3],[0,bl],eG,[0,[0,[0,0,[0,bZ],aE,[0,0,[0,cQ],ab,[0,0,[0,aT],bx,0,1],2],3],[0,e9],cB,[0,0,[0,ej],fi,[0,0,[0,ba],bW,[0,0,[0,ft],aZ,0,1],2],3],4],[0,ds],9,[0,0,[0,dE],10,[0,0,[0,ce],11,0,1],2],5],6],7],8],10]],0,i.caml_list_of_js_array(["%caml_format_int_special","%direct_int_div","%direct_int_mod","%direct_int_mul","%direct_obj_tag","%int_add","%int_and","%int_asr",d6,"%int_lsl","%int_lsr",af,az,"%int_neg","%int_or","%int_sub","%int_xor","JsStringReader","MlBytes","MlChanid","MlFakeDevice","MlFakeFd","MlFakeFd_out","MlFakeFile","MlFile","MlInt64","MlMutex","MlNat","MlNodeDevice","MlNodeFd","MlObjectTable","Ml_Bigarray","Ml_Bigarray_c_1_1","UInt8ArrayReader","add_nat","bigstring_of_array_buffer","bigstring_of_typed_array","bigstring_to_array_buffer","bigstring_to_typed_array","blake2b","blit_nat","caml_MD5Final","caml_MD5Init","caml_MD5Transform","caml_MD5Update","caml_abs_float","caml_acos_float","caml_acosh_float","caml_add_float","caml_alloc_dummy","caml_alloc_dummy_float","caml_alloc_dummy_infix","caml_alloc_stack","caml_argv","caml_array_append","caml_array_blit","caml_array_bound_error","caml_array_concat","caml_array_fill",e,I,fk,"caml_array_make","caml_array_of_bytes","caml_array_of_string",h,e5,bH,"caml_array_sub","caml_array_unsafe_get","caml_array_unsafe_get_float","caml_array_unsafe_set","caml_array_unsafe_set_addr","caml_array_unsafe_set_float","caml_asin_float","caml_asinh_float","caml_atan2_float","caml_atan_float","caml_atanh_float","caml_atomic_cas","caml_atomic_exchange","caml_atomic_fetch_add","caml_atomic_load","caml_atomic_make_contended","caml_ba_blit","caml_ba_change_layout","caml_ba_compare","caml_ba_create","caml_ba_create_buffer","caml_ba_create_from","caml_ba_create_unsafe","caml_ba_custom_name","caml_ba_deserialize","caml_ba_dim","caml_ba_dim_1","caml_ba_dim_2","caml_ba_dim_3","caml_ba_fill","caml_ba_from_typed_array","caml_ba_get_1","caml_ba_get_2","caml_ba_get_3","caml_ba_get_generic","caml_ba_get_size","caml_ba_get_size_per_element","caml_ba_hash","caml_ba_init","caml_ba_kind","caml_ba_kind_of_typed_array","caml_ba_layout","caml_ba_map_file","caml_ba_map_file_bytecode","caml_ba_num_dims","caml_ba_reshape","caml_ba_serialize","caml_ba_set_1","caml_ba_set_2","caml_ba_set_3","caml_ba_set_generic","caml_ba_slice","caml_ba_sub","caml_ba_to_typed_array","caml_ba_uint8_get16","caml_ba_uint8_get32","caml_ba_uint8_get64","caml_ba_uint8_set16","caml_ba_uint8_set32","caml_ba_uint8_set64","caml_backtrace_status","caml_bigstring_blit_ba_to_ba","caml_bigstring_blit_ba_to_bytes","caml_bigstring_blit_bytes_to_ba","caml_bigstring_blit_string_to_ba","caml_bigstring_memcmp","caml_blake2_create","caml_blake2_final","caml_blake2_string","caml_blake2_update","caml_blit_bytes","caml_blit_string","caml_bswap16","caml_build_symbols","caml_bytes_bound_error","caml_bytes_compare","caml_bytes_equal","caml_bytes_get","caml_bytes_get16","caml_bytes_get32","caml_bytes_get64","caml_bytes_greaterequal","caml_bytes_greaterthan","caml_bytes_lessequal","caml_bytes_lessthan","caml_bytes_notequal","caml_bytes_of_array","caml_bytes_of_jsbytes","caml_bytes_of_string","caml_bytes_of_uint8_array","caml_bytes_of_utf16_jsstring","caml_bytes_set","caml_bytes_set16","caml_bytes_set32","caml_bytes_set64","caml_bytes_unsafe_get","caml_bytes_unsafe_set","caml_call_gen","caml_callback","caml_cbrt_float","caml_ceil_float",J,o,cX,ck,"caml_classify_float","caml_compare","caml_compare_val","caml_compare_val_get_custom","caml_compare_val_number_custom","caml_compare_val_tag","caml_continuation_use_and_update_handler_noexc","caml_continuation_use_noexc","caml_convert_bytes_to_array","caml_convert_raw_backtrace","caml_convert_raw_backtrace_slot","caml_convert_string_to_bytes","caml_copysign_float","caml_cos_float","caml_cosh_float","caml_create_bytes","caml_create_file","caml_create_string","caml_current_dir","caml_custom_event_index","caml_custom_identifier","caml_custom_ops","caml_decompress_input",g,"caml_div_float","caml_domain_dls","caml_domain_dls_compare_and_set","caml_domain_dls_get","caml_domain_dls_set","caml_domain_id","caml_domain_spawn","caml_ephe_blit_data",b4,"caml_ephe_check_data",c3,"caml_ephe_create","caml_ephe_data_offset","caml_ephe_get_data","caml_ephe_get_data_copy",ae,eH,"caml_ephe_key_offset","caml_ephe_none","caml_ephe_set_data","caml_ephe_set_data_opt","caml_ephe_set_key","caml_ephe_unset_data","caml_ephe_unset_key","caml_eq_float","caml_equal","caml_erf_float","caml_erfc_float","caml_executable_name","caml_exn_with_js_backtrace","caml_exp2_float","caml_exp_float","caml_expm1_float","caml_failwith","caml_fatal_uncaught_exception",bd,S,"caml_final_register","caml_final_register_called_without_value","caml_final_release","caml_finish_formatting","caml_float_compare","caml_float_of_bytes","caml_float_of_int","caml_float_of_string","caml_floatarray_blit","caml_floatarray_create",d9,fD,"caml_floatarray_unsafe_get","caml_floatarray_unsafe_set","caml_floor_float","caml_fma_float","caml_fmod_float","caml_format_exception","caml_format_float",p,"caml_fresh_oo_id","caml_frexp_float","caml_fs_init","caml_gc_compaction","caml_gc_counters","caml_gc_full_major","caml_gc_get","caml_gc_major","caml_gc_major_slice","caml_gc_minor","caml_gc_minor_words","caml_gc_quick_stat","caml_gc_set","caml_gc_stat","caml_ge_float","caml_get_cached_method","caml_get_continuation_callstack","caml_get_current_callstack","caml_get_exception_backtrace","caml_get_exception_raw_backtrace","caml_get_global_data","caml_get_minor_free","caml_get_public_method","caml_get_root","caml_global_data","caml_gr_arc_aux","caml_gr_blit_image","caml_gr_clear_graph","caml_gr_close_graph","caml_gr_close_subwindow","caml_gr_create_image","caml_gr_current_x","caml_gr_current_y","caml_gr_display_mode","caml_gr_doc_of_state","caml_gr_draw_arc","caml_gr_draw_char","caml_gr_draw_image","caml_gr_draw_rect","caml_gr_draw_str","caml_gr_draw_string","caml_gr_dump_image","caml_gr_fill_arc","caml_gr_fill_poly","caml_gr_fill_rect","caml_gr_lineto","caml_gr_make_image","caml_gr_moveto","caml_gr_open_graph","caml_gr_open_subwindow","caml_gr_plot","caml_gr_point_color","caml_gr_remember_mode","caml_gr_resize_window","caml_gr_set_color","caml_gr_set_font","caml_gr_set_line_width","caml_gr_set_text_size","caml_gr_set_window_title","caml_gr_sigio_handler","caml_gr_sigio_signal","caml_gr_size_x","caml_gr_size_y","caml_gr_state","caml_gr_state_create","caml_gr_state_get","caml_gr_state_init","caml_gr_state_set","caml_gr_synchronize","caml_gr_text_size","caml_gr_wait_event","caml_gr_window_id","caml_greaterequal","caml_greaterthan","caml_gt_float","caml_hash","caml_hash_mix_bigstring","caml_hash_mix_bytes","caml_hash_mix_bytes_arr","caml_hash_mix_final","caml_hash_mix_float","caml_hash_mix_float16","caml_hash_mix_float32","caml_hash_mix_int","caml_hash_mix_int64","caml_hash_mix_jsbytes","caml_hash_mix_string","caml_hash_nat","caml_hexstring_of_float","caml_hypot_float","caml_input_value","caml_input_value_from_bytes","caml_input_value_from_reader","caml_input_value_to_outside_heap","caml_install_signal_handler","caml_int32_add","caml_int32_and","caml_int32_bits_of_float",eT,ao,H,"caml_int32_float_of_bits",dr,X,ac,"caml_int32_neg","caml_int32_of_float","caml_int32_of_int",cI,"caml_int32_or","caml_int32_shift_left","caml_int32_shift_right","caml_int32_shift_right_unsigned","caml_int32_sub","caml_int32_to_float","caml_int32_to_int","caml_int32_unmarshal","caml_int32_xor","caml_int64_add","caml_int64_and","caml_int64_bits_of_float","caml_int64_bswap","caml_int64_compare","caml_int64_create_lo_hi","caml_int64_create_lo_mi_hi","caml_int64_div","caml_int64_float_of_bits","caml_int64_format","caml_int64_hash","caml_int64_hi32","caml_int64_is_negative","caml_int64_is_zero","caml_int64_lo32","caml_int64_marshal","caml_int64_mod","caml_int64_mul","caml_int64_neg","caml_int64_of_bytes","caml_int64_of_float",cY,q,bg,"caml_int64_of_string","caml_int64_offset","caml_int64_or","caml_int64_shift_left","caml_int64_shift_right","caml_int64_shift_right_unsigned","caml_int64_sub","caml_int64_to_bytes","caml_int64_to_float",fq,s,ey,"caml_int64_ult","caml_int64_unmarshal","caml_int64_xor",t,"caml_int_of_float",m,"caml_invalid_argument","caml_io_buffer_size","caml_is_continuation_tag","caml_is_js","caml_is_ml_bytes","caml_is_ml_string","caml_is_printable","caml_is_special_exception","caml_js_call","caml_js_delete","caml_js_equals","caml_js_error_of_exception","caml_js_error_option_of_exception","caml_js_eval_string","caml_js_expr","caml_js_from_array","caml_js_from_bool",n,fr,cp,"caml_js_from_string","caml_js_fun_call","caml_js_function_arity","caml_js_get","caml_js_get_console","caml_js_html_entities","caml_js_html_escape","caml_js_instanceof","caml_js_meth_call","caml_js_new","caml_js_object","caml_js_pure_expr","caml_js_set","caml_js_strict_equals","caml_js_to_array","caml_js_to_bool","caml_js_to_byte_string","caml_js_to_float",e$,ek,"caml_js_to_string","caml_js_typeof","caml_js_var","caml_js_wrap_callback","caml_js_wrap_callback_arguments","caml_js_wrap_callback_strict","caml_js_wrap_callback_unsafe","caml_js_wrap_meth_callback","caml_js_wrap_meth_callback_arguments","caml_js_wrap_meth_callback_strict","caml_js_wrap_meth_callback_unsafe","caml_jsbytes_of_string","caml_jsoo_flags_effects","caml_jsoo_flags_use_js_string","caml_jsstring_of_string","caml_lazy_make_forward","caml_lazy_read_result","caml_lazy_reset_to_lazy","caml_lazy_update_to_forcing","caml_lazy_update_to_forward","caml_ldexp_float","caml_le_float","caml_lessequal","caml_lessthan","caml_lex_array","caml_lex_engine","caml_list_mount_point","caml_list_of_js_array","caml_list_to_js_array","caml_log10_float","caml_log1p_float","caml_log2_float","caml_log_float","caml_lt_float","caml_lxm_M","caml_lxm_daba","caml_lxm_next","caml_make_float_vect","caml_make_path","caml_make_vect","caml_marshal_constants","caml_marshal_data_size","caml_marshal_header_size","caml_maybe_attach_backtrace","caml_maybe_print_stats","caml_md5_bytes","caml_md5_chan","caml_md5_string","caml_memprof_discard","caml_memprof_start","caml_memprof_stop","caml_method_cache","caml_ml_bytes_content","caml_ml_bytes_length","caml_ml_channel_get","caml_ml_channel_redirect","caml_ml_channel_restore","caml_ml_channel_size","caml_ml_channel_size_64","caml_ml_channels","caml_ml_close_channel","caml_ml_condition_broadcast","caml_ml_condition_new","caml_ml_condition_signal","caml_ml_condition_wait","caml_ml_debug_info_status","caml_ml_domain_cpu_relax","caml_ml_domain_id","caml_ml_enable_runtime_warnings","caml_ml_flush","caml_ml_input","caml_ml_input_bigarray","caml_ml_input_block","caml_ml_input_char","caml_ml_input_int","caml_ml_input_scan_line","caml_ml_is_binary_mode","caml_ml_is_buffered","caml_ml_mutex_lock","caml_ml_mutex_new","caml_ml_mutex_try_lock","caml_ml_mutex_unlock","caml_ml_open_descriptor_in","caml_ml_open_descriptor_in_with_flags","caml_ml_open_descriptor_out","caml_ml_open_descriptor_out_with_flags","caml_ml_out_channels_list","caml_ml_output","caml_ml_output_bigarray","caml_ml_output_bytes","caml_ml_output_char","caml_ml_output_int","caml_ml_output_ta","caml_ml_pos_in","caml_ml_pos_in_64","caml_ml_pos_out","caml_ml_pos_out_64","caml_ml_runtime_events_are_active","caml_ml_runtime_events_pause","caml_ml_runtime_events_resume","caml_ml_runtime_events_start","caml_ml_runtime_warnings_enabled","caml_ml_seek_in","caml_ml_seek_in_64","caml_ml_seek_out","caml_ml_seek_out_64","caml_ml_set_binary_mode","caml_ml_set_buffered","caml_ml_set_channel_name","caml_ml_set_channel_output","caml_ml_set_channel_refill","caml_ml_string_length",f,"caml_modf_float","caml_mount_autoload",d,"caml_mul_float","caml_named_value","caml_named_values","caml_nativeint_add","caml_nativeint_and",bJ,c8,bk,fG,ee,Y,"caml_nativeint_neg","caml_nativeint_of_float","caml_nativeint_of_int","caml_nativeint_of_int32",dw,"caml_nativeint_or","caml_nativeint_shift_left","caml_nativeint_shift_right","caml_nativeint_shift_right_unsigned","caml_nativeint_sub","caml_nativeint_to_float","caml_nativeint_to_int","caml_nativeint_to_int32","caml_nativeint_unmarshal","caml_nativeint_xor","caml_neg_float","caml_neq_float","caml_new_lex_engine","caml_new_string","caml_nextafter_float","caml_notequal","caml_obj_add_offset","caml_obj_block","caml_obj_compare_and_swap","caml_obj_dup","caml_obj_is_shared","caml_obj_raw_field","caml_obj_reachable_words","caml_obj_set_raw_field","caml_obj_tag","caml_obj_update_tag","caml_obj_with_tag","caml_ojs_new_arr","caml_oo_cache_id","caml_oo_last_id","caml_output_val","caml_output_value","caml_output_value_to_buffer","caml_output_value_to_bytes","caml_output_value_to_string","caml_packFloat16","caml_parse_digit","caml_parse_engine","caml_parse_format","caml_parse_sign_and_base","caml_parser_trace","caml_pos_in","caml_pos_out","caml_power_float","caml_pure_js_expr","caml_raise_constant","caml_raise_end_of_file","caml_raise_no_such_file","caml_raise_nodejs_error","caml_raise_not_found","caml_raise_sys_error","caml_raise_system_error","caml_raise_with_arg","caml_raise_with_args","caml_raise_with_string","caml_raise_zero_divide","caml_raw_backtrace_length","caml_raw_backtrace_next_slot","caml_raw_backtrace_slot","caml_read_file_content","caml_recommended_domain_count","caml_record_backtrace","caml_record_backtrace_env_flag","caml_record_backtrace_runtime_flag","caml_refill","caml_register_global","caml_register_named_value","caml_restore_raw_backtrace","caml_root","caml_round_float","caml_runtime_events_create_cursor","caml_runtime_events_free_cursor","caml_runtime_events_read_poll","caml_runtime_events_user_register","caml_runtime_events_user_resolve","caml_runtime_events_user_write","caml_runtime_parameters","caml_runtime_variant","caml_runtime_warnings","caml_seek_in","caml_seek_out","caml_set_oo_id","caml_set_parser_trace","caml_set_static_env",d7,a1,"caml_sin_float","caml_sinh_float","caml_sqrt_float","caml_str_repeat","caml_strerror","caml_string_bound_error","caml_string_compare","caml_string_concat","caml_string_equal","caml_string_get","caml_string_get16","caml_string_get32","caml_string_get64","caml_string_greaterequal","caml_string_greaterthan","caml_string_hash","caml_string_lessequal","caml_string_lessthan","caml_string_notequal","caml_string_of_array","caml_string_of_bytes","caml_string_of_jsbytes","caml_string_of_jsstring","caml_string_of_uint8_array","caml_string_set","caml_string_unsafe_get","caml_sub_float","caml_sub_uint8_array_to_jsbytes","caml_subarray_to_jsbytes","caml_sys_argv","caml_sys_chdir","caml_sys_close","caml_sys_const_backend_type","caml_sys_const_big_endian","caml_sys_const_int_size","caml_sys_const_max_wosize","caml_sys_const_naked_pointers_checked","caml_sys_const_ostype_cygwin","caml_sys_const_ostype_unix","caml_sys_const_ostype_win32","caml_sys_const_word_size","caml_sys_executable_name",j,"caml_sys_fds","caml_sys_file_exists","caml_sys_get_argv","caml_sys_get_config",k,"caml_sys_getenv","caml_sys_is_directory","caml_sys_is_regular_file","caml_sys_isatty","caml_sys_mkdir","caml_sys_modify_argv","caml_sys_open","caml_sys_open_for_node","caml_sys_random_seed","caml_sys_read_directory","caml_sys_remove","caml_sys_rename","caml_sys_rmdir","caml_sys_system_command","caml_sys_time","caml_sys_time_include_children","caml_sys_unsafe_getenv","caml_tan_float","caml_tanh_float","caml_throw_js_exception","caml_to_js_string","caml_trailing_slash","caml_trampoline","caml_trampoline_return","caml_trunc_float","caml_uint8_array_of_bytes","caml_uint8_array_of_string",da,dd,fx,by,fs,dZ,dG,dy,as,bE,fm,cN,dT,dD,N,aa,eA,du,cy,a4,ca,fu,bD,bf,b,fe,bN,aM,a0,at,l,dn,c9,eZ,dp,fv,a7,aP,em,aj,an,ad,bm,dS,r,cF,eE,dt,fC,eh,F,ak,aG,eB,d1,d4,e3,bb,b5,cz,G,dI,dA,ct,d0,"caml_unmount","caml_unpackFloat16","caml_update_dummy",e6,dm,"caml_weak_create",am,a5,"caml_weak_set","caml_wrap_exception","caml_xdg_defaults","caml_xmlhttprequest_create","caml_zstd_initialize","compare_digits_nat","compare_nat","complement_nat","create_nat","decr_nat","deserialize_nat","div_digit_nat","div_helper","div_nat","fs_node_supported","incr_nat","initialize_nat","is_digit_int","is_digit_normalized","is_digit_odd","is_digit_zero","jsoo_create_file","jsoo_create_file_extern","jsoo_dataview","jsoo_effect_not_supported","jsoo_is_ascii","jsoo_is_win32","jsoo_mount_point","jsoo_static_env","jsoo_sys_getenv","jsoo_text_decoder","jsoo_text_decoder_buff","jsoo_text_encoder","jsoo_toplevel_reloc","land_digit_nat","length_nat","lor_digit_nat","lxor_digit_nat","make_unix_err_args","mult_digit_nat","mult_nat","nat_of_array","nth_digit_nat","nth_digit_nat_native","num_digits_nat","num_leading_zero_bits_in_digit","ocaml_stats_from_node_stats","os_type","path_is_absolute","re_match","re_partial_match","re_replacement_text","re_search_backward","re_search_forward","re_string_match","resolve_fs_device","serialize_nat","set_digit_nat","set_digit_nat_native","set_to_zero_nat","shift_left_nat","shift_right_nat","square_nat","sub_nat",a9,eX,el,dv,ag,"unix_error",bc,fc,v,bX,ex,a8,e4,fd,eu,c$,b8,aU,aq,R,b7,ff,D,T,bz,E,aN,ai,aJ,dM,ar,d3,bu,dW,dB,cg,dj,fy,eJ,aw,aY,cG,et,eR,dU,aX,x,eL,bK,bI,bU,bB,dq,cU,c4,w,bC,aF,ah,bs,b1,eC,eM,eg,cw,cc,eU,"zstd_decompress"]),0];return}(globalThis)); //# 4 "../.js/default/stdlib/stdlib.cma.js" //# shape: CamlinternalFormatBasics:[F(2),F(1),F(2)] @@ -16282,6 +16282,1862 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); +//# 7778 "../.js/default/stdlib/stdlib.cma.js" +//# shape: Stdlib__Set:[F(1)*] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_List = global_data.Stdlib__List, + Assert_failure = global_data.Assert_failure, + a = [0, 0, 0, 0], + b = [0, 0, 0], + c = [0, "set.ml", 571, 18], + Stdlib_Set = + [0, + function(Ord){ + function height(param){ + if(! param) return 0; + var h = param[4]; + return h; + } + function create(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + var a = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, a]; + } + function bal(l, v, r){ + if(l) var h = l[4], hl = h; else var hl = 0; + if(r) var h$0 = r[4], hr = h$0; else var hr = 0; + var cst_Set_bal = "Set.bal"; + if((hr + 2 | 0) < hl){ + if(! l) return Stdlib[1].call(null, cst_Set_bal); + var lr = l[3], lv = l[2], ll = l[1], a = height(lr); + if(a <= height(ll)) return create(ll, lv, create(lr, v, r)); + if(! lr) return Stdlib[1].call(null, cst_Set_bal); + var lrr = lr[3], lrv = lr[2], lrl = lr[1], b = create(lrr, v, r); + return create(create(ll, lv, lrl), lrv, b); + } + if((hl + 2 | 0) >= hr){ + var e = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, v, r, e]; + } + if(! r) return Stdlib[1].call(null, cst_Set_bal); + var rr = r[3], rv = r[2], rl = r[1], c = height(rl); + if(c <= height(rr)) return create(create(l, v, rl), rv, rr); + if(! rl) return Stdlib[1].call(null, cst_Set_bal); + var rlr = rl[3], rlv = rl[2], rll = rl[1], d = create(rlr, rv, rr); + return create(create(l, v, rll), rlv, d); + } + function add(x, t){ + if(! t) return [0, 0, x, 0, 1]; + var r = t[3], v = t[2], l = t[1], c = caml_call2(Ord[1], x, v); + if(0 === c) return t; + if(0 <= c){var rr = add(x, r); return r === rr ? t : bal(l, v, rr);} + var ll = add(x, l); + return l === ll ? t : bal(ll, v, r); + } + function singleton(x){return [0, 0, x, 0, 1];} + function add_min_element(x, param){ + if(! param) return singleton(x); + var r = param[3], v = param[2], l = param[1]; + return bal(add_min_element(x, l), v, r); + } + function add_max_element(x, param){ + if(! param) return singleton(x); + var r = param[3], v = param[2], l = param[1]; + return bal(l, v, add_max_element(x, r)); + } + function join(l, v, r){ + if(! l) return add_min_element(v, r); + if(! r) return add_max_element(v, l); + var + rh = r[4], + rr = r[3], + rv = r[2], + rl = r[1], + lh = l[4], + lr = l[3], + lv = l[2], + ll = l[1]; + return (rh + 2 | 0) < lh + ? bal(ll, lv, join(lr, v, r)) + : (lh + + 2 + | 0) + < rh + ? bal(join(l, v, rl), rv, rr) + : create(l, v, r); + } + function min_elt(param$0){ + var param = param$0; + for(;;){ + if(! param) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var l = param[1]; + if(! l){var v = param[2]; return v;} + param = l; + } + } + function min_elt_opt(param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var l = param[1]; + if(! l){var v = param[2]; return [0, v];} + param = l; + } + } + function max_elt(param$0){ + var param = param$0; + for(;;){ + if(! param) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + if(! param[3]){var v = param[2]; return v;} + var r = param[3]; + param = r; + } + } + function max_elt_opt(param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + if(! param[3]){var v = param[2]; return [0, v];} + var r = param[3]; + param = r; + } + } + function remove_min_elt(param){ + if(! param) return Stdlib[1].call(null, "Set.remove_min_elt"); + var l = param[1]; + if(l){ + var r = param[3], v = param[2]; + return bal(remove_min_elt(l), v, r); + } + var r$0 = param[3]; + return r$0; + } + function concat(t1, t2){ + if(! t1) return t2; + if(! t2) return t1; + var a = remove_min_elt(t2); + return join(t1, min_elt(t2), a); + } + function split(x, param){ + if(! param) return a; + var + r = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return [0, l, 1, r]; + if(0 <= c){ + var + match = split(x, r), + rr = match[3], + pres = match[2], + lr = match[1]; + return [0, join(l, v, lr), pres, rr]; + } + var + match$0 = split(x, l), + rl = match$0[3], + pres$0 = match$0[2], + ll = match$0[1]; + return [0, ll, pres$0, join(rl, v, r)]; + } + function is_empty(param){return param ? 0 : 1;} + function mem(x, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var + r = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v), + a = 0 === c ? 1 : 0; + if(a) return a; + param = 0 <= c ? r : l; + } + } + function remove(x, t){ + if(! t) return 0; + var t2 = t[3], v = t[2], t1 = t[1], c = caml_call2(Ord[1], x, v); + if(0 === c){ + if(! t1) return t2; + if(! t2) return t1; + var a = remove_min_elt(t2); + return bal(t1, min_elt(t2), a); + } + if(0 <= c){ + var rr = remove(x, t2); + return t2 === rr ? t : bal(t1, v, rr); + } + var ll = remove(x, t1); + return t1 === ll ? t : bal(ll, v, t2); + } + function union(s1, s2){ + if(! s1) return s2; + if(! s2) return s1; + var + h2 = s2[4], + r2 = s2[3], + v2 = s2[2], + l2 = s2[1], + h1 = s1[4], + r1 = s1[3], + v1 = s1[2], + l1 = s1[1]; + if(h2 <= h1){ + if(1 === h2) return add(v2, s1); + var + match = split(v1, s2), + r2$0 = match[3], + l2$0 = match[1], + a = union(r1, r2$0); + return join(union(l1, l2$0), v1, a); + } + if(1 === h1) return add(v1, s2); + var + match$0 = split(v2, s1), + r1$0 = match$0[3], + l1$0 = match$0[1], + b = union(r1$0, r2); + return join(union(l1$0, l2), v2, b); + } + function inter(s1, s2){ + if(! s1) return 0; + if(! s2) return 0; + var r1 = s1[3], v1 = s1[2], l1 = s1[1], a = split(v1, s2), l2 = a[1]; + if(a[2]){ + var r2 = a[3], b = inter(r1, r2); + return join(inter(l1, l2), v1, b); + } + var r2$0 = a[3], c = inter(r1, r2$0); + return concat(inter(l1, l2), c); + } + function split_bis(x, param){ + if(! param) return [0, 0, function(param){return 0;}]; + var + r = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return 0; + if(0 <= c){ + var match = split_bis(x, r); + if(! match) return 0; + var rr = match[2], lr = match[1]; + return [0, join(l, v, lr), rr]; + } + var match$0 = split_bis(x, l); + if(! match$0) return 0; + var rl = match$0[2], ll = match$0[1]; + return [0, ll, function(param){return join(rl(0), v, r);}]; + } + function disjoint(s1$0, s2$1){ + var s1 = s1$0, s2 = s2$1; + for(;;){ + if(s1 && s2){ + var r1 = s1[3], v1 = s1[2], l1 = s1[1]; + if(s1 === s2) return 0; + var match = split_bis(v1, s2); + if(! match) return 0; + var r2 = match[2], l2 = match[1], a = disjoint(l1, l2); + if(! a) return a; + var s2$0 = r2(0); + s1 = r1; + s2 = s2$0; + continue; + } + return 1; + } + } + function diff(s1, s2){ + if(! s1) return 0; + if(! s2) return s1; + var r1 = s1[3], v1 = s1[2], l1 = s1[1], a = split(v1, s2), l2 = a[1]; + if(a[2]){ + var r2 = a[3], b = diff(r1, r2); + return concat(diff(l1, l2), b); + } + var r2$0 = a[3], c = diff(r1, r2$0); + return join(diff(l1, l2), v1, c); + } + function cons_enum(s$0, e$1){ + var s = s$0, e = e$1; + for(;;){ + if(! s) return e; + var r = s[3], v = s[2], l = s[1], e$0 = [0, v, r, e]; + s = l; + e = e$0; + } + } + function compare(s1, s2){ + var + e2$2 = cons_enum(s2, 0), + e1$2 = cons_enum(s1, 0), + e1 = e1$2, + e2 = e2$2; + for(;;){ + if(! e1) return e2 ? -1 : 0; + if(! e2) return 1; + var + e2$0 = e2[3], + r2 = e2[2], + v2 = e2[1], + e1$0 = e1[3], + r1 = e1[2], + v1 = e1[1], + c = caml_call2(Ord[1], v1, v2); + if(0 !== c) return c; + var e2$1 = cons_enum(r2, e2$0), e1$1 = cons_enum(r1, e1$0); + e1 = e1$1; + e2 = e2$1; + } + } + function equal(s1, s2){return 0 === compare(s1, s2) ? 1 : 0;} + function subset(s1$0, s2$0){ + var s1 = s1$0, s2 = s2$0; + for(;;){ + if(! s1) return 1; + if(! s2) return 0; + var + r2 = s2[3], + v2 = s2[2], + l2 = s2[1], + r1 = s1[3], + v1 = s1[2], + l1 = s1[1], + c = caml_call2(Ord[1], v1, v2); + if(0 === c){ + var a = subset(l1, l2); + if(! a) return a; + s1 = r1; + s2 = r2; + } + else if(0 <= c){ + var b = subset([0, 0, v1, r1, 0], r2); + if(! b) return b; + s1 = l1; + } + else{ + var d = subset([0, l1, v1, 0, 0], l2); + if(! d) return d; + s1 = r1; + } + } + } + function iter(f, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var r = param[3], v = param[2], l = param[1]; + iter(f, l); + caml_call1(f, v); + param = r; + } + } + function fold(f, s$0, accu$1){ + var s = s$0, accu = accu$1; + for(;;){ + if(! s) return accu; + var + r = s[3], + v = s[2], + l = s[1], + accu$0 = caml_call2(f, v, fold(f, l, accu)); + s = r; + accu = accu$0; + } + } + function for_all(p, param$0){ + var param = param$0; + for(;;){ + if(! param) return 1; + var r = param[3], v = param[2], l = param[1], a = caml_call1(p, v); + if(a){ + var b = for_all(p, l); + if(b){param = r; continue;} + var c = b; + } + else + var c = a; + return c; + } + } + function exists(p, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var r = param[3], v = param[2], l = param[1], a = caml_call1(p, v); + if(a) + var b = a; + else{var c = exists(p, l); if(! c){param = r; continue;} var b = c;} + return b; + } + } + function filter(p, t){ + if(! t) return 0; + var + r = t[3], + v = t[2], + l = t[1], + l$0 = filter(p, l), + pv = caml_call1(p, v), + r$0 = filter(p, r); + if(! pv) return concat(l$0, r$0); + if(l === l$0 && r === r$0) return t; + return join(l$0, v, r$0); + } + function partition(p, param){ + if(! param) return b; + var + r = param[3], + v = param[2], + l = param[1], + match = partition(p, l), + lf = match[2], + lt = match[1], + pv = caml_call1(p, v), + match$0 = partition(p, r), + rf = match$0[2], + rt = match$0[1]; + if(pv){var a = concat(lf, rf); return [0, join(lt, v, rt), a];} + var c = join(lf, v, rf); + return [0, concat(lt, rt), c]; + } + function cardinal(param){ + if(! param) return 0; + var r = param[3], l = param[1], a = cardinal(r); + return (cardinal(l) + 1 | 0) + a | 0; + } + function elements_aux(accu$1, param$0){ + var accu = accu$1, param = param$0; + for(;;){ + if(! param) return accu; + var + r = param[3], + v = param[2], + l = param[1], + accu$0 = [0, v, elements_aux(accu, r)]; + accu = accu$0; + param = l; + } + } + function elements(s){return elements_aux(0, s);} + function find(x, param$0){ + var param = param$0; + for(;;){ + if(! param) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var + r = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return v; + param = 0 <= c ? r : l; + } + } + function find_first(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var r$0 = param$0[3], v0$1 = param$0[2], l$0 = param$0[1]; + if(caml_call1(f, v0$1)){var v0 = v0$1, param = l$0; break;} + param$0 = r$0; + } + for(;;){ + if(! param) return v0; + var r = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){v0 = v0$0; param = l;} else param = r; + } + } + function find_first_opt(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) return 0; + var r$0 = param$0[3], v0$1 = param$0[2], l$0 = param$0[1]; + if(caml_call1(f, v0$1)){var v0 = v0$1, param = l$0; break;} + param$0 = r$0; + } + for(;;){ + if(! param) return [0, v0]; + var r = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){v0 = v0$0; param = l;} else param = r; + } + } + function find_last(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var r$0 = param$0[3], v0$1 = param$0[2], l$0 = param$0[1]; + if(caml_call1(f, v0$1)){var v0 = v0$1, param = r$0; break;} + param$0 = l$0; + } + for(;;){ + if(! param) return v0; + var r = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){v0 = v0$0; param = r;} else param = l; + } + } + function find_last_opt(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) return 0; + var r$0 = param$0[3], v0$1 = param$0[2], l$0 = param$0[1]; + if(caml_call1(f, v0$1)){var v0 = v0$1, param = r$0; break;} + param$0 = l$0; + } + for(;;){ + if(! param) return [0, v0]; + var r = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){v0 = v0$0; param = r;} else param = l; + } + } + function find_opt(x, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var + r = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return [0, v]; + param = 0 <= c ? r : l; + } + } + function try_join(l, v, r){ + a: + { + if(0 !== l){ + var b = max_elt(l); + if(0 <= caml_call2(Ord[1], b, v)) break a; + } + if(0 !== r){ + var a = min_elt(r); + if(0 <= caml_call2(Ord[1], v, a)) break a; + } + return join(l, v, r); + } + return union(l, add(v, r)); + } + function map(f, t){ + if(! t) return 0; + var + r = t[3], + v = t[2], + l = t[1], + l$0 = map(f, l), + v$0 = caml_call1(f, v), + r$0 = map(f, r); + if(l === l$0 && v === v$0 && r === r$0) return t; + return try_join(l$0, v$0, r$0); + } + function filter_map(f, t){ + if(! t) return 0; + var + r = t[3], + v = t[2], + l = t[1], + t1 = filter_map(f, l), + v$0 = caml_call1(f, v), + t2 = filter_map(f, r); + if(v$0){ + var v$1 = v$0[1]; + if(l === t1 && v === v$1 && r === t2) return t; + return try_join(t1, v$1, t2); + } + if(! t1) return t2; + if(! t2) return t1; + var a = remove_min_elt(t2); + return try_join(t1, min_elt(t2), a); + } + var empty = 0; + function of_list(l){ + if(! l) return empty; + var match = l[2], x0 = l[1]; + if(! match) return singleton(x0); + var match$0 = match[2], x1 = match[1]; + if(! match$0) return add(x1, singleton(x0)); + var match$1 = match$0[2], x2 = match$0[1]; + if(! match$1) return add(x2, add(x1, singleton(x0))); + var match$2 = match$1[2], x3 = match$1[1]; + if(! match$2) return add(x3, add(x2, add(x1, singleton(x0)))); + if(match$2[2]){ + var + l$0 = Stdlib_List[62].call(null, Ord[1], l), + sub = + function(n, l){ + if(3 >= n >>> 0) + switch(n){ + case 0: + return [0, 0, l]; + case 1: + if(l){ + var l$3 = l[2], x0 = l[1]; + return [0, [0, 0, x0, 0, 1], l$3]; + } + break; + case 2: + if(l){ + var match$1 = l[2]; + if(match$1){ + var l$4 = match$1[2], x1 = match$1[1], x0$0 = l[1]; + return [0, [0, [0, 0, x0$0, 0, 1], x1, 0, 2], l$4]; + } + } + break; + default: + if(l){ + var a = l[2]; + if(a){ + var match$2 = a[2]; + if(match$2){ + var + l$5 = match$2[2], + x2 = match$2[1], + x1$0 = a[1], + x0$1 = l[1]; + return [0, + [0, [0, 0, x0$1, 0, 1], x1$0, [0, 0, x2, 0, 1], 2], + l$5]; + } + } + } + } + var + nl = n / 2 | 0, + match = sub(nl, l), + l$0 = match[2], + left = match[1]; + if(! l$0) + throw caml_maybe_attach_backtrace([0, Assert_failure, c], 1); + var + l$1 = l$0[2], + mid = l$0[1], + match$0 = sub((n - nl | 0) - 1 | 0, l$1), + l$2 = match$0[2], + right = match$0[1]; + return [0, create(left, mid, right), l$2]; + }; + return sub(Stdlib_List[1].call(null, l$0), l$0)[1]; + } + var x4 = match$2[1]; + return add(x4, add(x3, add(x2, add(x1, singleton(x0))))); + } + function add_seq(i, m){ + return Stdlib_Seq[5].call + (null, function(s, x){return add(x, s);}, m, i); + } + function of_seq(i){return add_seq(i, empty);} + function seq_of_enum(c, param){ + if(! c) return 0; + var rest = c[3], t = c[2], x = c[1], a = cons_enum(t, rest); + return [0, x, function(b){return seq_of_enum(a, b);}]; + } + function to_seq(c){ + var a = cons_enum(c, 0); + return function(b){return seq_of_enum(a, b);}; + } + function snoc_enum(s$0, e$1){ + var s = s$0, e = e$1; + for(;;){ + if(! s) return e; + var r = s[3], v = s[2], l = s[1], e$0 = [0, v, l, e]; + s = r; + e = e$0; + } + } + function rev_seq_of_enum(c, param){ + if(! c) return 0; + var rest = c[3], t = c[2], x = c[1], a = snoc_enum(t, rest); + return [0, x, function(b){return rev_seq_of_enum(a, b);}]; + } + function to_rev_seq(c){ + var a = snoc_enum(c, 0); + return function(b){return rev_seq_of_enum(a, b);}; + } + function to_seq_from(low, s){ + a: + { + var s$0 = s, c = 0; + for(;;){ + if(! s$0){var a = c; break a;} + var + r = s$0[3], + v = s$0[2], + l = s$0[1], + n = caml_call2(Ord[1], v, low); + if(0 === n) break; + if(0 <= n){var c$0 = [0, v, r, c]; s$0 = l; c = c$0;} else s$0 = r; + } + var a = [0, v, r, c]; + } + return function(b){return seq_of_enum(a, b);}; + } + return [0, + empty, + add, + singleton, + remove, + union, + inter, + disjoint, + diff, + cardinal, + elements, + min_elt, + min_elt_opt, + max_elt, + max_elt_opt, + min_elt, + min_elt_opt, + find, + find_opt, + find_first, + find_first_opt, + find_last, + find_last_opt, + iter, + fold, + map, + filter, + filter_map, + partition, + split, + is_empty, + mem, + equal, + compare, + subset, + for_all, + exists, + elements, + of_list, + to_seq_from, + to_seq, + to_rev_seq, + add_seq, + of_seq]; + }]; + runtime.caml_register_global(12, Stdlib_Set, "Stdlib__Set"); + return; + } + (globalThis)); + +//# 8540 "../.js/default/stdlib/stdlib.cma.js" +//# shape: Stdlib__Map:[F(1)*] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Assert_failure = global_data.Assert_failure, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_List = global_data.Stdlib__List, + a = [0, 0, 0, 0], + b = [0, "map.ml", 408, 10], + c = [0, 0, 0], + Stdlib_Map = + [0, + function(Ord){ + function height(param){ + if(! param) return 0; + var h = param[5]; + return h; + } + function create(l, x, d, r){ + var + hl = height(l), + hr = height(r), + a = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, x, d, r, a]; + } + function singleton(x, d){return [0, 0, x, d, 0, 1];} + function bal(l, x, d, r){ + if(l) var h = l[5], hl = h; else var hl = 0; + if(r) var h$0 = r[5], hr = h$0; else var hr = 0; + var cst_Map_bal = "Map.bal"; + if((hr + 2 | 0) < hl){ + if(! l) return Stdlib[1].call(null, cst_Map_bal); + var lr = l[4], ld = l[3], lv = l[2], ll = l[1], a = height(lr); + if(a <= height(ll)) return create(ll, lv, ld, create(lr, x, d, r)); + if(! lr) return Stdlib[1].call(null, cst_Map_bal); + var + lrr = lr[4], + lrd = lr[3], + lrv = lr[2], + lrl = lr[1], + b = create(lrr, x, d, r); + return create(create(ll, lv, ld, lrl), lrv, lrd, b); + } + if((hl + 2 | 0) >= hr){ + var f = hr <= hl ? hl + 1 | 0 : hr + 1 | 0; + return [0, l, x, d, r, f]; + } + if(! r) return Stdlib[1].call(null, cst_Map_bal); + var rr = r[4], rd = r[3], rv = r[2], rl = r[1], c = height(rl); + if(c <= height(rr)) return create(create(l, x, d, rl), rv, rd, rr); + if(! rl) return Stdlib[1].call(null, cst_Map_bal); + var + rlr = rl[4], + rld = rl[3], + rlv = rl[2], + rll = rl[1], + e = create(rlr, rv, rd, rr); + return create(create(l, x, d, rll), rlv, rld, e); + } + function is_empty(param){return param ? 0 : 1;} + function add(x, data, m){ + if(! m) return [0, 0, x, data, 0, 1]; + var + h = m[5], + r = m[4], + d = m[3], + v = m[2], + l = m[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return d === data ? m : [0, l, x, data, r, h]; + if(0 <= c){ + var rr = add(x, data, r); + return r === rr ? m : bal(l, v, d, rr); + } + var ll = add(x, data, l); + return l === ll ? m : bal(ll, v, d, r); + } + function find(x, param$0){ + var param = param$0; + for(;;){ + if(! param) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return d; + param = 0 <= c ? r : l; + } + } + function find_first(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var + r$0 = param$0[4], + d0$1 = param$0[3], + v0$1 = param$0[2], + l$0 = param$0[1]; + if(caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = l$0; + break; + } + param$0 = r$0; + } + for(;;){ + if(! param) return [0, v0, d0]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){ + v0 = v0$0; + d0 = d0$0; + param = l; + } + else + param = r; + } + } + function find_first_opt(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) return 0; + var + r$0 = param$0[4], + d0$1 = param$0[3], + v0$1 = param$0[2], + l$0 = param$0[1]; + if(caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = l$0; + break; + } + param$0 = r$0; + } + for(;;){ + if(! param) return [0, [0, v0, d0]]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){ + v0 = v0$0; + d0 = d0$0; + param = l; + } + else + param = r; + } + } + function find_last(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var + r$0 = param$0[4], + d0$1 = param$0[3], + v0$1 = param$0[2], + l$0 = param$0[1]; + if(caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = r$0; + break; + } + param$0 = l$0; + } + for(;;){ + if(! param) return [0, v0, d0]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){ + v0 = v0$0; + d0 = d0$0; + param = r; + } + else + param = l; + } + } + function find_last_opt(f, param$1){ + var param$0 = param$1; + for(;;){ + if(! param$0) return 0; + var + r$0 = param$0[4], + d0$1 = param$0[3], + v0$1 = param$0[2], + l$0 = param$0[1]; + if(caml_call1(f, v0$1)){ + var v0 = v0$1, d0 = d0$1, param = r$0; + break; + } + param$0 = l$0; + } + for(;;){ + if(! param) return [0, [0, v0, d0]]; + var r = param[4], d0$0 = param[3], v0$0 = param[2], l = param[1]; + if(caml_call1(f, v0$0)){ + v0 = v0$0; + d0 = d0$0; + param = r; + } + else + param = l; + } + } + function find_opt(x, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return [0, d]; + param = 0 <= c ? r : l; + } + } + function mem(x, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var + r = param[4], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v), + a = 0 === c ? 1 : 0; + if(a) return a; + param = 0 <= c ? r : l; + } + } + function min_binding(param$0){ + var param = param$0; + for(;;){ + if(! param) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var l = param[1]; + if(! l){var d = param[3], v = param[2]; return [0, v, d];} + param = l; + } + } + function min_binding_opt(param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var l = param[1]; + if(! l){var d = param[3], v = param[2]; return [0, [0, v, d]];} + param = l; + } + } + function max_binding(param$0){ + var param = param$0; + for(;;){ + if(! param) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + if(! param[4]){var d = param[3], v = param[2]; return [0, v, d];} + var r = param[4]; + param = r; + } + } + function max_binding_opt(param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + if(! param[4]){ + var d = param[3], v = param[2]; + return [0, [0, v, d]]; + } + var r = param[4]; + param = r; + } + } + function remove_min_binding(param){ + if(! param) return Stdlib[1].call(null, "Map.remove_min_elt"); + var l = param[1]; + if(l){ + var r = param[4], d = param[3], v = param[2]; + return bal(remove_min_binding(l), v, d, r); + } + var r$0 = param[4]; + return r$0; + } + function d(t1, t2){ + if(! t1) return t2; + if(! t2) return t1; + var match = min_binding(t2), d = match[2], x = match[1]; + return bal(t1, x, d, remove_min_binding(t2)); + } + function remove(x, m){ + if(! m) return 0; + var + r = m[4], + d$0 = m[3], + v = m[2], + l = m[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return d(l, r); + if(0 <= c){ + var rr = remove(x, r); + return r === rr ? m : bal(l, v, d$0, rr); + } + var ll = remove(x, l); + return l === ll ? m : bal(ll, v, d$0, r); + } + function update(x, f, m){ + if(! m){ + var match$0 = caml_call1(f, 0); + if(! match$0) return 0; + var data$0 = match$0[1]; + return [0, 0, x, data$0, 0, 1]; + } + var + h = m[5], + r = m[4], + d$0 = m[3], + v = m[2], + l = m[1], + c = caml_call2(Ord[1], x, v); + if(0 === c){ + var match = caml_call1(f, [0, d$0]); + if(! match) return d(l, r); + var data = match[1]; + return d$0 === data ? m : [0, l, x, data, r, h]; + } + if(0 <= c){ + var rr = update(x, f, r); + return r === rr ? m : bal(l, v, d$0, rr); + } + var ll = update(x, f, l); + return l === ll ? m : bal(ll, v, d$0, r); + } + function add_to_list(x, data, m){ + function add(param){ + if(! param) return [0, [0, data, 0]]; + var l = param[1]; + return [0, [0, data, l]]; + } + return update(x, add, m); + } + function iter(f, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var r = param[4], d = param[3], v = param[2], l = param[1]; + iter(f, l); + caml_call2(f, v, d); + param = r; + } + } + function map(f, param){ + if(! param) return 0; + var + h = param[5], + r = param[4], + d = param[3], + v = param[2], + l = param[1], + l$0 = map(f, l), + d$0 = caml_call1(f, d), + r$0 = map(f, r); + return [0, l$0, v, d$0, r$0, h]; + } + function mapi(f, param){ + if(! param) return 0; + var + h = param[5], + r = param[4], + d = param[3], + v = param[2], + l = param[1], + l$0 = mapi(f, l), + d$0 = caml_call2(f, v, d), + r$0 = mapi(f, r); + return [0, l$0, v, d$0, r$0, h]; + } + function fold(f, m$0, accu$1){ + var m = m$0, accu = accu$1; + for(;;){ + if(! m) return accu; + var + r = m[4], + d = m[3], + v = m[2], + l = m[1], + accu$0 = caml_call3(f, v, d, fold(f, l, accu)); + m = r; + accu = accu$0; + } + } + function for_all(p, param$0){ + var param = param$0; + for(;;){ + if(! param) return 1; + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + a = caml_call2(p, v, d); + if(a){ + var b = for_all(p, l); + if(b){param = r; continue;} + var c = b; + } + else + var c = a; + return c; + } + } + function exists(p, param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + a = caml_call2(p, v, d); + if(a) + var b = a; + else{var c = exists(p, l); if(! c){param = r; continue;} var b = c;} + return b; + } + } + function add_min_binding(k, x, param){ + if(! param) return singleton(k, x); + var r = param[4], d = param[3], v = param[2], l = param[1]; + return bal(add_min_binding(k, x, l), v, d, r); + } + function add_max_binding(k, x, param){ + if(! param) return singleton(k, x); + var r = param[4], d = param[3], v = param[2], l = param[1]; + return bal(l, v, d, add_max_binding(k, x, r)); + } + function join(l, v, d, r){ + if(! l) return add_min_binding(v, d, r); + if(! r) return add_max_binding(v, d, l); + var + rh = r[5], + rr = r[4], + rd = r[3], + rv = r[2], + rl = r[1], + lh = l[5], + lr = l[4], + ld = l[3], + lv = l[2], + ll = l[1]; + return (rh + 2 | 0) < lh + ? bal(ll, lv, ld, join(lr, v, d, r)) + : (lh + + 2 + | 0) + < rh + ? bal(join(l, v, d, rl), rv, rd, rr) + : create(l, v, d, r); + } + function concat(t1, t2){ + if(! t1) return t2; + if(! t2) return t1; + var match = min_binding(t2), d = match[2], x = match[1]; + return join(t1, x, d, remove_min_binding(t2)); + } + function concat_or_join(t1, v, d, t2){ + if(! d) return concat(t1, t2); + var d$0 = d[1]; + return join(t1, v, d$0, t2); + } + function split(x, param){ + if(! param) return a; + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + c = caml_call2(Ord[1], x, v); + if(0 === c) return [0, l, [0, d], r]; + if(0 <= c){ + var + match = split(x, r), + rr = match[3], + pres = match[2], + lr = match[1]; + return [0, join(l, v, d, lr), pres, rr]; + } + var + match$0 = split(x, l), + rl = match$0[3], + pres$0 = match$0[2], + ll = match$0[1]; + return [0, ll, pres$0, join(rl, v, d, r)]; + } + function merge(f, s1, s2){ + if(s1){ + var h1 = s1[5], r1 = s1[4], d1 = s1[3], v1 = s1[2], l1 = s1[1]; + if(height(s2) <= h1){ + var + match = split(v1, s2), + r2 = match[3], + d2 = match[2], + l2 = match[1], + a = merge(f, r1, r2), + c = caml_call3(f, v1, [0, d1], d2); + return concat_or_join(merge(f, l1, l2), v1, c, a); + } + } + else if(! s2) return 0; + if(! s2) + throw caml_maybe_attach_backtrace([0, Assert_failure, b], 1); + var + r2$0 = s2[4], + d2$0 = s2[3], + v2 = s2[2], + l2$0 = s2[1], + match$0 = split(v2, s1), + r1$0 = match$0[3], + d1$0 = match$0[2], + l1$0 = match$0[1], + d = merge(f, r1$0, r2$0), + e = caml_call3(f, v2, d1$0, [0, d2$0]); + return concat_or_join(merge(f, l1$0, l2$0), v2, e, d); + } + function union(f, s1, s2){ + if(s1){ + if(s2){ + var + h2 = s2[5], + r2 = s2[4], + d2 = s2[3], + v2 = s2[2], + l2 = s2[1], + h1 = s1[5], + r1 = s1[4], + d1 = s1[3], + v1 = s1[2], + l1 = s1[1]; + if(h2 <= h1){ + var + match = split(v1, s2), + r2$0 = match[3], + d2$0 = match[2], + l2$0 = match[1], + l = union(f, l1, l2$0), + r = union(f, r1, r2$0); + if(! d2$0) return join(l, v1, d1, r); + var d2$1 = d2$0[1]; + return concat_or_join(l, v1, caml_call3(f, v1, d1, d2$1), r); + } + var + match$0 = split(v2, s1), + r1$0 = match$0[3], + d1$0 = match$0[2], + l1$0 = match$0[1], + l$0 = union(f, l1$0, l2), + r$0 = union(f, r1$0, r2); + if(! d1$0) return join(l$0, v2, d2, r$0); + var d1$1 = d1$0[1]; + return concat_or_join(l$0, v2, caml_call3(f, v2, d1$1, d2), r$0); + } + var s = s1; + } + else + var s = s2; + return s; + } + function filter(p, m){ + if(! m) return 0; + var + r = m[4], + d = m[3], + v = m[2], + l = m[1], + l$0 = filter(p, l), + pvd = caml_call2(p, v, d), + r$0 = filter(p, r); + if(! pvd) return concat(l$0, r$0); + if(l === l$0 && r === r$0) return m; + return join(l$0, v, d, r$0); + } + function filter_map(f, param){ + if(! param) return 0; + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + l$0 = filter_map(f, l), + fvd = caml_call2(f, v, d), + r$0 = filter_map(f, r); + if(! fvd) return concat(l$0, r$0); + var d$0 = fvd[1]; + return join(l$0, v, d$0, r$0); + } + function partition(p, param){ + if(! param) return c; + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + match = partition(p, l), + lf = match[2], + lt = match[1], + pvd = caml_call2(p, v, d), + match$0 = partition(p, r), + rf = match$0[2], + rt = match$0[1]; + if(pvd){var a = concat(lf, rf); return [0, join(lt, v, d, rt), a];} + var b = join(lf, v, d, rf); + return [0, concat(lt, rt), b]; + } + function cons_enum(m$0, e$1){ + var m = m$0, e = e$1; + for(;;){ + if(! m) return e; + var r = m[4], d = m[3], v = m[2], l = m[1], e$0 = [0, v, d, r, e]; + m = l; + e = e$0; + } + } + function compare(cmp, m1, m2){ + var + e2$2 = cons_enum(m2, 0), + e1$2 = cons_enum(m1, 0), + e1 = e1$2, + e2 = e2$2; + for(;;){ + if(! e1) return e2 ? -1 : 0; + if(! e2) return 1; + var + e2$0 = e2[4], + r2 = e2[3], + d2 = e2[2], + v2 = e2[1], + e1$0 = e1[4], + r1 = e1[3], + d1 = e1[2], + v1 = e1[1], + c = caml_call2(Ord[1], v1, v2); + if(0 !== c) return c; + var c$0 = caml_call2(cmp, d1, d2); + if(0 !== c$0) return c$0; + var e2$1 = cons_enum(r2, e2$0), e1$1 = cons_enum(r1, e1$0); + e1 = e1$1; + e2 = e2$1; + } + } + function equal(cmp, m1, m2){ + var + e2$2 = cons_enum(m2, 0), + e1$2 = cons_enum(m1, 0), + e1 = e1$2, + e2 = e2$2; + for(;;){ + if(! e1) return e2 ? 0 : 1; + if(! e2) return 0; + var + e2$0 = e2[4], + r2 = e2[3], + d2 = e2[2], + v2 = e2[1], + e1$0 = e1[4], + r1 = e1[3], + d1 = e1[2], + v1 = e1[1], + a = 0 === caml_call2(Ord[1], v1, v2) ? 1 : 0; + if(a){ + var b = caml_call2(cmp, d1, d2); + if(b){ + var e2$1 = cons_enum(r2, e2$0), e1$1 = cons_enum(r1, e1$0); + e1 = e1$1; + e2 = e2$1; + continue; + } + var c = b; + } + else + var c = a; + return c; + } + } + function cardinal(param){ + if(! param) return 0; + var r = param[4], l = param[1], a = cardinal(r); + return (cardinal(l) + 1 | 0) + a | 0; + } + function bindings_aux(accu$1, param$0){ + var accu = accu$1, param = param$0; + for(;;){ + if(! param) return accu; + var + r = param[4], + d = param[3], + v = param[2], + l = param[1], + accu$0 = [0, [0, v, d], bindings_aux(accu, r)]; + accu = accu$0; + param = l; + } + } + function bindings(s){return bindings_aux(0, s);} + var empty = 0; + function of_list(bs){ + return Stdlib_List[26].call + (null, + function(m, param){ + var v = param[2], k = param[1]; + return add(k, v, m); + }, + empty, + bs); + } + function add_seq(i, m){ + return Stdlib_Seq[5].call + (null, + function(m, param){ + var v = param[2], k = param[1]; + return add(k, v, m); + }, + m, + i); + } + function of_seq(i){return add_seq(i, empty);} + function seq_of_enum(c, param){ + if(! c) return 0; + var + rest = c[4], + t = c[3], + v = c[2], + k = c[1], + a = cons_enum(t, rest); + return [0, [0, k, v], function(b){return seq_of_enum(a, b);}]; + } + function to_seq(m){ + var a = cons_enum(m, 0); + return function(b){return seq_of_enum(a, b);}; + } + function snoc_enum(s$0, e$1){ + var s = s$0, e = e$1; + for(;;){ + if(! s) return e; + var r = s[4], d = s[3], v = s[2], l = s[1], e$0 = [0, v, d, l, e]; + s = r; + e = e$0; + } + } + function rev_seq_of_enum(c, param){ + if(! c) return 0; + var + rest = c[4], + t = c[3], + v = c[2], + k = c[1], + a = snoc_enum(t, rest); + return [0, [0, k, v], function(b){return rev_seq_of_enum(a, b);}]; + } + function to_rev_seq(c){ + var a = snoc_enum(c, 0); + return function(b){return rev_seq_of_enum(a, b);}; + } + function to_seq_from(low, m){ + a: + { + var m$0 = m, c = 0; + for(;;){ + if(! m$0){var a = c; break a;} + var + r = m$0[4], + d = m$0[3], + v = m$0[2], + l = m$0[1], + n = caml_call2(Ord[1], v, low); + if(0 === n) break; + if(0 <= n){ + var c$0 = [0, v, d, r, c]; + m$0 = l; + c = c$0; + } + else + m$0 = r; + } + var a = [0, v, d, r, c]; + } + return function(b){return seq_of_enum(a, b);}; + } + return [0, + empty, + add, + add_to_list, + update, + singleton, + remove, + merge, + union, + cardinal, + bindings, + min_binding, + min_binding_opt, + max_binding, + max_binding_opt, + min_binding, + min_binding_opt, + find, + find_opt, + find_first, + find_first_opt, + find_last, + find_last_opt, + iter, + fold, + map, + mapi, + filter, + filter_map, + partition, + split, + is_empty, + mem, + equal, + compare, + for_all, + exists, + bindings, + of_list, + to_seq, + to_rev_seq, + to_seq_from, + add_seq, + of_seq]; + }]; + runtime.caml_register_global(12, Stdlib_Map, "Stdlib__Map"); + return; + } + (globalThis)); + +//# 9393 "../.js/default/stdlib/stdlib.cma.js" +//# shape: Stdlib__Stack:[N,F(1)*,F(2),F(1),F(1),F(1),F(1),F(1)*,F(1),F(1)*,F(1)*,F(1)*,F(2),F(3),F(1)*,F(2),F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + global_data = runtime.caml_get_global_data(), + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_List = global_data.Stdlib__List, + Empty = [248, "Stdlib.Stack.Empty", runtime.caml_fresh_oo_id(0)]; + function create(param){return [0, 0, 0];} + function clear(s){s[1] = 0; s[2] = 0; return 0;} + function copy(s){return [0, s[1], s[2]];} + function push(x, s){s[1] = [0, x, s[1]]; s[2] = s[2] + 1 | 0; return 0;} + function pop(s){ + var match = s[1]; + if(! match) throw caml_maybe_attach_backtrace(Empty, 1); + var tl = match[2], hd = match[1]; + s[1] = tl; + s[2] = s[2] - 1 | 0; + return hd; + } + function pop_opt(s){ + var match = s[1]; + if(! match) return 0; + var tl = match[2], hd = match[1]; + s[1] = tl; + s[2] = s[2] - 1 | 0; + return [0, hd]; + } + function drop(s){ + var match = s[1]; + if(! match) throw caml_maybe_attach_backtrace(Empty, 1); + var tl = match[2]; + s[1] = tl; + s[2] = s[2] - 1 | 0; + return 0; + } + function top(s){ + var match = s[1]; + if(! match) throw caml_maybe_attach_backtrace(Empty, 1); + var hd = match[1]; + return hd; + } + function top_opt(s){ + var match = s[1]; + if(! match) return 0; + var hd = match[1]; + return [0, hd]; + } + function is_empty(s){return 0 === s[1] ? 1 : 0;} + function length(s){return s[2];} + function iter(f, s){return Stdlib_List[18].call(null, f, s[1]);} + function fold(f, acc, s){return Stdlib_List[26].call(null, f, acc, s[1]);} + function to_seq(s){return Stdlib_List[64].call(null, s[1]);} + function add_seq(q, i){ + return Stdlib_Seq[4].call(null, function(x){return push(x, q);}, i); + } + function of_seq(g){var s = create(0); add_seq(s, g); return s;} + runtime.caml_register_global + (3, + [0, + Empty, + create, + push, + pop, + pop_opt, + drop, + top, + top_opt, + clear, + copy, + is_empty, + length, + iter, + fold, + to_seq, + add_seq, + of_seq], + "Stdlib__Stack"); + return; + } + (globalThis)); + +//# 9480 "../.js/default/stdlib/stdlib.cma.js" +//# shape: Stdlib__Queue:[N,F(1)*,F(2),F(2),F(1),F(1),F(1),F(1),F(1)*,F(1),F(1),F(1),F(1)*,F(1)*,F(2),F(3),F(2),F(1)*->F(1)*,F(2),F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + Stdlib_Seq = runtime.caml_get_global_data().Stdlib__Seq, + Empty = [248, "Stdlib.Queue.Empty", runtime.caml_fresh_oo_id(0)]; + function create(param){return [0, 0, 0, 0];} + function clear(q){q[1] = 0; q[2] = 0; q[3] = 0; return 0;} + function add(x, q){ + var cell = [0, x, 0], match = q[3]; + return match + ? (q[1] = q[1] + 1 | 0, match[2] = cell, q[3] = cell, 0) + : (q[1] = 1, q[2] = cell, q[3] = cell, 0); + } + function peek(q){ + var match = q[2]; + if(! match) throw caml_maybe_attach_backtrace(Empty, 1); + var content = match[1]; + return content; + } + function peek_opt(q){ + var match = q[2]; + if(! match) return 0; + var content = match[1]; + return [0, content]; + } + function take(q){ + var match = q[2]; + if(! match) throw caml_maybe_attach_backtrace(Empty, 1); + var content = match[1]; + if(match[2]){ + var next = match[2]; + q[1] = q[1] - 1 | 0; + q[2] = next; + return content; + } + clear(q); + return content; + } + function take_opt(q){ + var match = q[2]; + if(! match) return 0; + var content = match[1]; + if(match[2]){ + var next = match[2]; + q[1] = q[1] - 1 | 0; + q[2] = next; + return [0, content]; + } + clear(q); + return [0, content]; + } + function copy(q){ + var cell$0 = q[2], q_res = [0, q[1], 0, 0], prev = 0, cell = cell$0; + for(;;){ + if(! cell){q_res[3] = prev; return q_res;} + var content = cell[1], next = cell[2], prev$0 = [0, content, 0]; + if(prev){ + prev[2] = prev$0; + prev = prev$0; + cell = next; + } + else{q_res[2] = prev$0; prev = prev$0; cell = next;} + } + } + function is_empty(q){return 0 === q[1] ? 1 : 0;} + function length(q){return q[1];} + function iter(f, q){ + var cell$0 = q[2], cell = cell$0; + for(;;){ + if(! cell) return 0; + var content = cell[1], next = cell[2]; + caml_call1(f, content); + cell = next; + } + } + function fold(f, accu$1, q){ + var cell$0 = q[2], accu = accu$1, cell = cell$0; + for(;;){ + if(! cell) return accu; + var + content = cell[1], + next = cell[2], + accu$0 = caml_call2(f, accu, content); + accu = accu$0; + cell = next; + } + } + function transfer(q1, q2){ + var a = 0 < q1[1] ? 1 : 0; + if(! a) return a; + var match = q2[3]; + return match + ? (q2 + [1] + = q2[1] + q1[1] | 0, + match[2] = q1[2], + q2[3] = q1[3], + clear(q1)) + : (q2[1] = q1[1], q2[2] = q1[2], q2[3] = q1[3], clear(q1)); + } + function to_seq(q){ + function aux(c, param){ + if(! c) return 0; + var x = c[1], next = c[2]; + return [0, x, function(a){return aux(next, a);}]; + } + var a = q[2]; + return function(b){return aux(a, b);}; + } + function add_seq(q, i){ + return Stdlib_Seq[4].call(null, function(x){return add(x, q);}, i); + } + function of_seq(g){var q = create(0); add_seq(q, g); return q;} + runtime.caml_register_global + (2, + [0, + Empty, + create, + add, + add, + take, + take_opt, + take, + peek, + peek_opt, + peek, + clear, + copy, + is_empty, + length, + iter, + fold, + transfer, + to_seq, + add_seq, + of_seq], + "Stdlib__Queue"); + return; + } + (globalThis)); + //# 9638 "../.js/default/stdlib/stdlib.cma.js" //# shape: Stdlib__Buffer:[F(1)*,F(1),F(1),F(3),F(5),F(2),F(1)*,F(1),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(4),F(4),F(3),F(2),F(3),F(1)*->F(1),F(1)*->F(1),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2)] (function @@ -24714,6 +26570,1651 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); +//# 20272 "../.js/default/stdlib/stdlib.cma.js" +//# shape: Stdlib__Format:[F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2)*,F(2),F(1),F(2),F(1),F(3),F(2),F(3),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),N,F(2),F(1),F(2)*,F(1),F(2),F(1),F(2)*,F(1),F(1)*,F(3),F(2),F(3),F(2),F(2),F(1),F(2)*,F(1),F(2),F(1),F(2)*,F(1),F(2)*,F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(3),F(2),F(2),F(1),F(2)*,F(1),N,F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2),F(1),F(2)*,F(1),F(2)*,F(1),F(2),F(1),F(3),F(2),F(2)*,F(1),F(2),F(1),F(2)*,F(1),F(2),F(1),F(2)*,F(1),F(1),F(1),N,F(1),N,F(1),F(1),N,F(1),N,F(1),F(1),F(2),F(2),F(1),F(1)*,F(1),F(1),F(1),F(2),F(1),F(5),F(4),F(4),F(4),F(2),F(4),F(4),F(4),F(1)*->F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(3),F(2),F(3),F(2),F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + dummy = 0, + global_data = runtime.caml_get_global_data(), + Stdlib_Queue = global_data.Stdlib__Queue, + CamlinternalFormat = global_data.CamlinternalFormat, + Stdlib = global_data.Stdlib, + Stdlib_String = global_data.Stdlib__String, + Stdlib_Domain = global_data.Stdlib__Domain, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_List = global_data.Stdlib__List, + Stdlib_Stack = global_data.Stdlib__Stack, + Stdlib_Int = global_data.Stdlib__Int, + Stdlib_Bytes = global_data.Stdlib__Bytes; + function id(x){return x;} + var + String_tag = + [248, "Stdlib.Format.String_tag", runtime.caml_fresh_oo_id(0)]; + function pp_enqueue(state, token){ + state[13] = state[13] + token[3] | 0; + return Stdlib_Queue[3].call(null, token, state[28]); + } + function pp_output_string(state, s){ + return caml_call3(state[17], s, 0, caml_ml_string_length(s)); + } + function pp_output_newline(state){return caml_call1(state[19], 0);} + function format_pp_text(state, size, text){ + state[9] = state[9] - size | 0; + pp_output_string(state, text); + state[11] = 0; + } + var cst$0 = ""; + function format_string(state, s){ + var a = s !== cst$0 ? 1 : 0; + return a ? format_pp_text(state, caml_ml_string_length(s), s) : a; + } + function break_new_line(state, param, width){ + var after = param[3], offset = param[2], before = param[1]; + format_string(state, before); + pp_output_newline(state); + state[11] = 1; + var + indent = (state[6] - width | 0) + offset | 0, + real_indent = Stdlib_Int[10].call(null, state[8], indent); + state[10] = real_indent; + state[9] = state[6] - state[10] | 0; + var n = state[10]; + caml_call1(state[21], n); + return format_string(state, after); + } + function break_same_line(state, param){ + var after = param[3], width = param[2], before = param[1]; + format_string(state, before); + state[9] = state[9] - width | 0; + caml_call1(state[20], width); + return format_string(state, after); + } + var a = [0, cst$0, 0, cst$0]; + function format_pp_token(state, size$0, param){ + if(typeof param === "number") + switch(param){ + case 0: + var match$3 = Stdlib_Stack[8].call(null, state[3]); + if(! match$3) return; + var + tabs = match$3[1][1], + add_tab = + function(n, ls){ + if(! ls) return [0, n, 0]; + var l = ls[2], x = ls[1]; + return runtime.caml_lessthan(n, x) + ? [0, n, ls] + : [0, x, add_tab(n, l)]; + }; + tabs[1] = add_tab(state[6] - state[9] | 0, tabs[1]); + return; + case 1: + Stdlib_Stack[5].call(null, state[2]); return; + case 2: + Stdlib_Stack[5].call(null, state[3]); return; + case 3: + var match$4 = Stdlib_Stack[8].call(null, state[2]); + if(! match$4) return pp_output_newline(state); + var width$0 = match$4[1][2]; + return break_new_line(state, a, width$0); + case 4: + var b = state[10] !== (state[6] - state[9] | 0) ? 1 : 0; + if(! b) return b; + var match$1 = Stdlib_Queue[6].call(null, state[28]); + if(! match$1) return; + var match$2 = match$1[1], size = match$2[1], length = match$2[3]; + state[12] = state[12] - length | 0; + state[9] = state[9] + size | 0; + return; + default: + var match$5 = Stdlib_Stack[5].call(null, state[5]); + if(! match$5) return; + var tag_name = match$5[1], marker = caml_call1(state[25], tag_name); + return pp_output_string(state, marker); + } + switch(param[0]){ + case 0: + var s = param[1]; return format_pp_text(state, size$0, s); + case 1: + var + breaks = param[2], + fits = param[1], + off = breaks[2], + before = breaks[1], + match$6 = Stdlib_Stack[8].call(null, state[2]); + if(! match$6) return; + var + match$7 = match$6[1], + width$1 = match$7[2], + box_type$0 = match$7[1]; + switch(box_type$0){ + case 3: + return state[9] < (size$0 + caml_ml_string_length(before) | 0) + ? break_new_line(state, breaks, width$1) + : break_same_line(state, fits); + case 4: + return state[11] + ? break_same_line(state, fits) + : state + [9] + < (size$0 + caml_ml_string_length(before) | 0) + ? break_new_line(state, breaks, width$1) + : ((state + [6] + - width$1 + | 0) + + off + | 0) + < state[10] + ? break_new_line(state, breaks, width$1) + : break_same_line(state, fits); + case 0: + case 5: + return break_same_line(state, fits); + default: return break_new_line(state, breaks, width$1); + } + case 2: + var + off$0 = param[2], + n = param[1], + insertion_point = state[6] - state[9] | 0, + match$8 = Stdlib_Stack[8].call(null, state[3]); + if(! match$8) return; + var tabs$0 = match$8[1][1], match$9 = tabs$0[1]; + if(match$9){ + var first = match$9[1], param$0 = tabs$0[1]; + for(;;){ + if(! param$0){var tab = first; break;} + var tail = param$0[2], head = param$0[1]; + if(insertion_point <= head){var tab = head; break;} + param$0 = tail; + } + } + else + var tab = insertion_point; + var offset = tab - insertion_point | 0; + return 0 <= offset + ? break_same_line(state, [0, cst$0, offset + n | 0, cst$0]) + : break_new_line + (state, [0, cst$0, tab + off$0 | 0, cst$0], state[6]); + case 3: + var + ty = param[2], + off$1 = param[1], + insertion_point$0 = state[6] - state[9] | 0; + if(state[8] < insertion_point$0){ + var match = Stdlib_Stack[8].call(null, state[2]); + if(match){ + var match$0 = match[1], width = match$0[2], box_type = match$0[1]; + if(state[9] < width && 3 >= box_type - 1 >>> 0) + break_new_line(state, a, width); + } + else + pp_output_newline(state); + } + var + width$2 = state[9] - off$1 | 0, + box_type$1 = 1 === ty ? 1 : state[9] < size$0 ? ty : 5; + return Stdlib_Stack[3].call(null, [0, box_type$1, width$2], state[2]); + case 4: + var tbox = param[1]; return Stdlib_Stack[3].call(null, tbox, state[3]); + default: + var + tag_name$0 = param[1], + marker$0 = caml_call1(state[24], tag_name$0); + pp_output_string(state, marker$0); + return Stdlib_Stack[3].call(null, tag_name$0, state[5]); + } + } + var pp_infinity = 1000000010; + function advance_left(state){ + for(;;){ + var match = Stdlib_Queue[9].call(null, state[28]); + if(! match) return 0; + var + match$0 = match[1], + size = match$0[1], + length = match$0[3], + token = match$0[2], + pending_count = state[13] - state[12] | 0, + b = 0 <= size ? 1 : 0, + a = b || (state[9] <= pending_count ? 1 : 0); + if(! a) return a; + Stdlib_Queue[5].call(null, state[28]); + var size$0 = 0 <= size ? size : pp_infinity; + format_pp_token(state, size$0, token); + state[12] = length + state[12] | 0; + } + } + function enqueue_advance(state, tok){ + pp_enqueue(state, tok); + return advance_left(state); + } + function enqueue_string_as(state, size, s){ + return enqueue_advance(state, [0, size, [0, s], size]); + } + var unknown = -1, b = [0, cst$0]; + function initialize_scan_stack(stack){ + Stdlib_Stack[9].call(null, stack); + return Stdlib_Stack[3].call(null, [0, -1, [0, unknown, b, 0]], stack); + } + function set_size(state, ty){ + var match = Stdlib_Stack[8].call(null, state[1]); + if(! match) return; + var + match$0 = match[1], + queue_elem = match$0[2], + left_total = match$0[1], + size = queue_elem[1]; + if(left_total < state[12]) return initialize_scan_stack(state[1]); + var match$1 = queue_elem[2]; + if(typeof match$1 !== "number") + switch(match$1[0]){ + case 3: + if(1 - ty){ + var x$0 = state[13] + size | 0; + queue_elem[1] = x$0; + Stdlib_Stack[5].call(null, state[1]); + } + return; + case 1: + case 2: + if(ty){ + var x = state[13] + size | 0; + queue_elem[1] = x; + Stdlib_Stack[5].call(null, state[1]); + } + return; + } + } + function scan_push(state, b, token){ + pp_enqueue(state, token); + if(b) set_size(state, 1); + var elem = [0, state[13], token]; + return Stdlib_Stack[3].call(null, elem, state[1]); + } + function pp_open_box_gen(state, indent, br_ty){ + state[14] = state[14] + 1 | 0; + if(state[14] < state[15]){ + var size = - state[13] | 0, elem = [0, size, [3, indent, br_ty], 0]; + return scan_push(state, 0, elem); + } + var a = state[14] === state[15] ? 1 : 0; + if(! a) return a; + var s = state[16], x = caml_ml_string_length(s); + return enqueue_string_as(state, x, s); + } + var zero = 0; + function pp_close_box(state, param){ + var a = 1 < state[14] ? 1 : 0; + if(a){ + if(state[14] < state[15]){ + pp_enqueue(state, [0, zero, 1, 0]); + set_size(state, 1); + set_size(state, 0); + } + state[14] = state[14] - 1 | 0; + var b = 0; + } + else + var b = a; + return b; + } + function pp_open_stag(state, tag_name){ + if(state[22]){ + Stdlib_Stack[3].call(null, tag_name, state[4]); + caml_call1(state[26], tag_name); + } + var a = state[23]; + if(! a) return a; + var token = [5, tag_name]; + return pp_enqueue(state, [0, zero, token, 0]); + } + function pp_close_stag(state, param){ + if(state[23]) pp_enqueue(state, [0, zero, 5, 0]); + var a = state[22]; + if(a){ + var match = Stdlib_Stack[5].call(null, state[4]); + if(match){ + var tag_name = match[1]; + return caml_call1(state[27], tag_name); + } + var b = 0; + } + else + var b = a; + return b; + } + function pp_set_print_tags(state, b){state[22] = b; return 0;} + function pp_set_mark_tags(state, b){state[23] = b; return 0;} + function pp_get_print_tags(state, param){return state[22];} + function pp_get_mark_tags(state, param){return state[23];} + function pp_set_tags(state, b){ + pp_set_print_tags(state, b); + return pp_set_mark_tags(state, b); + } + function pp_get_formatter_stag_function(state, param){ + return [0, state[24], state[25], state[26], state[27]]; + } + function pp_set_formatter_stag_function(state, param){ + var pct = param[4], pot = param[3], mct = param[2], mot = param[1]; + state[24] = mot; + state[25] = mct; + state[26] = pot; + state[27] = pct; + return 0; + } + function pp_rinit(state){ + state[12] = 1; + state[13] = 1; + Stdlib_Queue[11].call(null, state[28]); + initialize_scan_stack(state[1]); + Stdlib_Stack[9].call(null, state[2]); + Stdlib_Stack[9].call(null, state[3]); + Stdlib_Stack[9].call(null, state[4]); + Stdlib_Stack[9].call(null, state[5]); + state[10] = 0; + state[14] = 0; + state[9] = state[6]; + return pp_open_box_gen(state, 0, 3); + } + function pp_flush_queue(state, end_with_newline){ + Stdlib_Stack[13].call + (null, function(param){return pp_close_stag(state, 0);}, state[4]); + for(;;){ + if(1 >= state[14]){ + state[13] = pp_infinity; + advance_left(state); + if(end_with_newline) pp_output_newline(state); + return pp_rinit(state); + } + pp_close_box(state, 0); + } + } + function pp_print_as_size(state, size, s){ + var a = state[14] < state[15] ? 1 : 0; + return a ? enqueue_string_as(state, size, s) : a; + } + function pp_print_as(state, isize, s){ + return pp_print_as_size(state, isize, s); + } + function pp_print_string(state, s){ + var isize = caml_ml_string_length(s); + return pp_print_as_size(state, isize, s); + } + function pp_print_bytes(state, s){ + var + s$0 = Stdlib_Bytes[6].call(null, s), + isize = runtime.caml_ml_bytes_length(s); + return pp_print_as_size(state, isize, s$0); + } + function pp_print_int(state, i){ + return pp_print_string(state, Stdlib_Int[12].call(null, i)); + } + function pp_print_float(state, f){ + return pp_print_string(state, Stdlib[35].call(null, f)); + } + function pp_print_bool(state, b){ + return pp_print_string(state, Stdlib[30].call(null, b)); + } + function pp_print_char(state, c){ + var s = Stdlib_String[1].call(null, 1, c); + return pp_print_as_size(state, 1, s); + } + function pp_print_nothing(state, param){return 0;} + function pp_open_hbox(state, param){return pp_open_box_gen(state, 0, 0);} + function pp_open_vbox(state, indent){ + return pp_open_box_gen(state, indent, 1); + } + function pp_open_hvbox(state, indent){ + return pp_open_box_gen(state, indent, 2); + } + function pp_open_hovbox(state, indent){ + return pp_open_box_gen(state, indent, 3); + } + function pp_open_box(state, indent){ + return pp_open_box_gen(state, indent, 4); + } + function pp_print_newline(state, param){ + pp_flush_queue(state, 1); + return caml_call1(state[18], 0); + } + function pp_print_flush(state, param){ + pp_flush_queue(state, 0); + return caml_call1(state[18], 0); + } + function pp_force_newline(state, param){ + var a = state[14] < state[15] ? 1 : 0; + return a ? enqueue_advance(state, [0, zero, 3, 0]) : a; + } + function pp_print_if_newline(state, param){ + var a = state[14] < state[15] ? 1 : 0; + return a ? enqueue_advance(state, [0, zero, 4, 0]) : a; + } + function pp_print_custom_break(state, fits, breaks){ + var + after = fits[3], + width = fits[2], + before = fits[1], + a = state[14] < state[15] ? 1 : 0; + if(! a) return a; + var + size = - state[13] | 0, + token = [1, fits, breaks], + length = + (caml_ml_string_length(before) + width | 0) + + caml_ml_string_length(after) + | 0; + return scan_push(state, 1, [0, size, token, length]); + } + function pp_print_break(state, width, offset){ + return pp_print_custom_break + (state, [0, cst$0, width, cst$0], [0, cst$0, offset, cst$0]); + } + function pp_print_space(state, param){return pp_print_break(state, 1, 0);} + function pp_print_cut(state, param){return pp_print_break(state, 0, 0);} + function pp_open_tbox(state, param){ + state[14] = state[14] + 1 | 0; + var a = state[14] < state[15] ? 1 : 0; + if(! a) return a; + return enqueue_advance(state, [0, zero, [4, [0, [0, 0]]], 0]); + } + function pp_close_tbox(state, param){ + var b = 1 < state[14] ? 1 : 0; + if(b){ + var c = state[14] < state[15] ? 1 : 0; + if(c){ + enqueue_advance(state, [0, zero, 2, 0]); + state[14] = state[14] - 1 | 0; + var a = 0; + } + else + var a = c; + } + else + var a = b; + return a; + } + function pp_print_tbreak(state, width, offset){ + var a = state[14] < state[15] ? 1 : 0; + if(! a) return a; + var size = - state[13] | 0, elem = [0, size, [2, width, offset], width]; + return scan_push(state, 1, elem); + } + function pp_print_tab(state, param){return pp_print_tbreak(state, 0, 0);} + function pp_set_tab(state, param){ + var a = state[14] < state[15] ? 1 : 0; + if(! a) return a; + return enqueue_advance(state, [0, zero, 0, 0]); + } + function pp_set_max_boxes(state, n){ + var a = 1 < n ? 1 : 0, b = a ? (state[15] = n, 0) : a; + return b; + } + function pp_get_max_boxes(state, param){return state[15];} + function pp_over_max_boxes(state, param){return state[14] === state[15] ? 1 : 0; + } + function pp_set_ellipsis_text(state, s){state[16] = s; return 0;} + function pp_get_ellipsis_text(state, param){return state[16];} + function pp_limit(n){return n < 1000000010 ? n : 1000000009;} + function pp_set_max_indent(state, n$0){ + var b = 1 < n$0 ? 1 : 0; + if(! b) return b; + var n$1 = state[6] - n$0 | 0, a = 1 <= n$1 ? 1 : 0; + if(! a) return a; + var n = pp_limit(n$1); + state[7] = n; + state[8] = state[6] - state[7] | 0; + return pp_rinit(state); + } + function pp_get_max_indent(state, param){return state[8];} + function pp_set_margin(state, n){ + var a = 1 <= n ? 1 : 0; + if(! a) return a; + var n$0 = pp_limit(n); + state[6] = n$0; + if(state[8] <= state[6]) + var new_max_indent = state[8]; + else + var + b = Stdlib_Int[11].call(null, state[6] - state[7] | 0, state[6] / 2 | 0), + new_max_indent = Stdlib_Int[11].call(null, b, 1); + return pp_set_max_indent(state, new_max_indent); + } + var + c = [1, "margin <= max_indent"], + d = [1, "margin >= pp_infinity"], + e = [0, 0], + f = [1, "max_indent < 2"]; + function validate_geometry(param){ + var margin = param[2], max_indent = param[1]; + return 2 <= max_indent + ? margin <= max_indent ? c : 1000000010 <= margin ? d : e + : f; + } + function check_geometry(geometry){ + return 0 === validate_geometry(geometry)[0] ? 1 : 0; + } + function pp_get_margin(state, param){return state[6];} + function pp_set_full_geometry(state, param){ + var margin = param[2], max_indent = param[1]; + pp_set_margin(state, margin); + pp_set_max_indent(state, max_indent); + return 0; + } + function pp_set_geometry(state, max_indent, margin){ + var + geometry = [0, max_indent, margin], + match = validate_geometry(geometry); + if(0 === match[0]) return pp_set_full_geometry(state, geometry); + var + msg = match[1], + a = Stdlib[28].call(null, "Format.pp_set_geometry: ", msg); + throw caml_maybe_attach_backtrace([0, Stdlib[6], a], 1); + } + function pp_safe_set_geometry(state, max_indent, margin){ + var geometry = [0, max_indent, margin]; + return 0 === validate_geometry(geometry)[0] + ? pp_set_full_geometry(state, geometry) + : 0; + } + function pp_get_geometry(state, param){return [0, state[8], state[6]];} + function pp_update_geometry(state, update){ + var geometry = pp_get_geometry(state, 0); + return pp_set_full_geometry(state, caml_call1(update, geometry)); + } + function pp_set_formatter_out_functions(state, param){ + var j = param[5], i = param[4], h = param[3], g = param[2], f = param[1]; + state[17] = f; + state[18] = g; + state[19] = h; + state[20] = i; + state[21] = j; + return 0; + } + function pp_get_formatter_out_functions(state, param){ + return [0, state[17], state[18], state[19], state[20], state[21]]; + } + function pp_set_formatter_output_functi(state, f, g){state[17] = f; state[18] = g; return 0; + } + function pp_get_formatter_output_functi(state, param){return [0, state[17], state[18]]; + } + function display_newline(state, param){ + return caml_call3(state[17], "\n", 0, 1); + } + var blank_line = Stdlib_String[1].call(null, 80, 32); + function display_blanks(state, n$1){ + var n = n$1; + for(;;){ + var a = 0 < n ? 1 : 0; + if(! a) return a; + if(80 >= n) return caml_call3(state[17], blank_line, 0, n); + caml_call3(state[17], blank_line, 0, 80); + var n$0 = n - 80 | 0; + n = n$0; + } + } + function pp_set_formatter_out_channel(state, oc){ + var a = Stdlib[69]; + state[17] = function(b, c, d){return a(oc, b, c, d);}; + state[18] = function(param){return Stdlib[63].call(null, oc);}; + state[19] = function(a){return display_newline(state, a);}; + state[20] = function(a){return display_blanks(state, a);}; + state[21] = function(a){return display_blanks(state, a);}; + return 0; + } + var cst = ">"; + function default_pp_mark_open_tag(param){ + if(param[1] !== String_tag) return cst$0; + var s = param[2], a = Stdlib[28].call(null, s, cst); + return Stdlib[28].call(null, "<", a); + } + function default_pp_mark_close_tag(param){ + if(param[1] !== String_tag) return cst$0; + var s = param[2], a = Stdlib[28].call(null, s, cst); + return Stdlib[28].call(null, "<\/", a); + } + function default_pp_print_open_tag(a){return 0;} + function default_pp_print_close_tag(a){return 0;} + var g = [3, 0, 3]; + function pp_make_formatter(f, g$0, h, i, j){ + var + pp_queue = Stdlib_Queue[2].call(null, 0), + sys_tok = [0, unknown, g, 0]; + Stdlib_Queue[3].call(null, sys_tok, pp_queue); + var scan_stack = Stdlib_Stack[2].call(null, 0); + initialize_scan_stack(scan_stack); + Stdlib_Stack[3].call(null, [0, 1, sys_tok], scan_stack); + var + a = Stdlib[19], + b = Stdlib_Stack[2].call(null, 0), + c = Stdlib_Stack[2].call(null, 0), + d = Stdlib_Stack[2].call(null, 0), + pp_margin = 78; + return [0, + scan_stack, + Stdlib_Stack[2].call(null, 0), + d, + c, + b, + pp_margin, + 10, + 68, + pp_margin, + 0, + 1, + 1, + 1, + 1, + a, + ".", + f, + g$0, + h, + i, + j, + 0, + 0, + default_pp_mark_open_tag, + default_pp_mark_close_tag, + default_pp_print_open_tag, + default_pp_print_close_tag, + pp_queue]; + } + function formatter_of_out_functions(out_funs){ + return pp_make_formatter + (out_funs[1], out_funs[2], out_funs[3], out_funs[4], out_funs[5]); + } + function make_formatter(output, flush){ + var + ppf = + pp_make_formatter + (output, + flush, + function(a){return 0;}, + function(a){return 0;}, + function(a){return 0;}); + ppf[19] = function(a){return display_newline(ppf, a);}; + ppf[20] = function(a){return display_blanks(ppf, a);}; + ppf[21] = function(a){return display_blanks(ppf, a);}; + return ppf; + } + function formatter_of_out_channel(oc){ + var a = Stdlib[69]; + return make_formatter + (function(b, c, d){return a(oc, b, c, d);}, + function(param){return Stdlib[63].call(null, oc);}); + } + function formatter_of_buffer(b){ + var a = Stdlib_Buffer[18]; + return make_formatter + (function(c, d, e){return a(b, c, d, e);}, function(a){return 0;}); + } + var pp_buffer_size = 512; + function pp_make_buffer(param){ + return Stdlib_Buffer[1].call(null, pp_buffer_size); + } + var + stdbuf = pp_make_buffer(0), + std_formatter = formatter_of_out_channel(Stdlib[39]), + err_formatter = formatter_of_out_channel(Stdlib[40]), + str_formatter = formatter_of_buffer(stdbuf), + stdbuf_key = caml_call2(Stdlib_Domain[10][1], 0, pp_make_buffer); + caml_call2(Stdlib_Domain[10][3], stdbuf_key, stdbuf); + var + str_formatter_key = + caml_call2 + (Stdlib_Domain[10][1], + 0, + function(param){ + return formatter_of_buffer + (caml_call1(Stdlib_Domain[10][2], stdbuf_key)); + }); + caml_call2(Stdlib_Domain[10][3], str_formatter_key, str_formatter); + function buffered_out_string(key, str, ofs, len){ + var a = caml_call1(Stdlib_Domain[10][2], key); + return Stdlib_Buffer[18].call(null, a, str, ofs, len); + } + function buffered_out_flush(oc, key, param){ + var + buf = caml_call1(Stdlib_Domain[10][2], key), + len = Stdlib_Buffer[7].call(null, buf), + str = Stdlib_Buffer[2].call(null, buf); + Stdlib[69].call(null, oc, str, 0, len); + Stdlib[63].call(null, oc); + return Stdlib_Buffer[8].call(null, buf); + } + var + std_buf_key = + caml_call2 + (Stdlib_Domain[10][1], + 0, + function(param){return Stdlib_Buffer[1].call(null, pp_buffer_size);}), + err_buf_key = + caml_call2 + (Stdlib_Domain[10][1], + 0, + function(param){return Stdlib_Buffer[1].call(null, pp_buffer_size);}), + std_formatter_key = + caml_call2 + (Stdlib_Domain[10][1], + 0, + function(param){ + var + a = Stdlib[39], + ppf = + pp_make_formatter + (function(a, b, c){ + return buffered_out_string(std_buf_key, a, b, c); + }, + function(b){return buffered_out_flush(a, std_buf_key, b);}, + function(a){return 0;}, + function(a){return 0;}, + function(a){return 0;}); + ppf[19] = function(a){return display_newline(ppf, a);}; + ppf[20] = function(a){return display_blanks(ppf, a);}; + ppf[21] = function(a){return display_blanks(ppf, a);}; + Stdlib_Domain[6].call + (null, function(a){return pp_print_flush(ppf, a);}); + return ppf; + }); + caml_call2(Stdlib_Domain[10][3], std_formatter_key, std_formatter); + var + err_formatter_key = + caml_call2 + (Stdlib_Domain[10][1], + 0, + function(param){ + var + a = Stdlib[40], + ppf = + pp_make_formatter + (function(a, b, c){ + return buffered_out_string(err_buf_key, a, b, c); + }, + function(b){return buffered_out_flush(a, err_buf_key, b);}, + function(a){return 0;}, + function(a){return 0;}, + function(a){return 0;}); + ppf[19] = function(a){return display_newline(ppf, a);}; + ppf[20] = function(a){return display_blanks(ppf, a);}; + ppf[21] = function(a){return display_blanks(ppf, a);}; + Stdlib_Domain[6].call + (null, function(a){return pp_print_flush(ppf, a);}); + return ppf; + }); + caml_call2(Stdlib_Domain[10][3], err_formatter_key, err_formatter); + function get_std_formatter(param){ + return caml_call1(Stdlib_Domain[10][2], std_formatter_key); + } + function get_err_formatter(param){ + return caml_call1(Stdlib_Domain[10][2], err_formatter_key); + } + function get_str_formatter(param){ + return caml_call1(Stdlib_Domain[10][2], str_formatter_key); + } + function get_stdbuf(param){ + return caml_call1(Stdlib_Domain[10][2], stdbuf_key); + } + function flush_buffer_formatter(buf, ppf){ + pp_flush_queue(ppf, 0); + var s = Stdlib_Buffer[2].call(null, buf); + Stdlib_Buffer[9].call(null, buf); + return s; + } + function flush_str_formatter(param){ + var + stdbuf = caml_call1(Stdlib_Domain[10][2], stdbuf_key), + str_formatter = caml_call1(Stdlib_Domain[10][2], str_formatter_key); + return flush_buffer_formatter(stdbuf, str_formatter); + } + function make_synchronized_formatter(output, flush){ + return caml_call2 + (Stdlib_Domain[10][1], + 0, + function(param){ + var + buf = Stdlib_Buffer[1].call(null, pp_buffer_size), + a = Stdlib_Buffer[18]; + function output$0(b, c, d){return a(buf, b, c, d);} + function flush$0(param){ + var a = Stdlib_Buffer[7].call(null, buf); + caml_call3(output, Stdlib_Buffer[2].call(null, buf), 0, a); + Stdlib_Buffer[8].call(null, buf); + return caml_call1(flush, 0); + } + return make_formatter(output$0, flush$0); + }); + } + function synchronized_formatter_of_out_(oc){ + var a = Stdlib[69]; + return make_synchronized_formatter + (function(b, c, d){return a(oc, b, c, d);}, + function(param){return Stdlib[63].call(null, oc);}); + } + function make_symbolic_output_buffer(param){return [0, 0];} + function clear_symbolic_output_buffer(sob){sob[1] = 0; return 0;} + function get_symbolic_output_buffer(sob){ + return Stdlib_List[10].call(null, sob[1]); + } + function flush_symbolic_output_buffer(sob){ + var items = get_symbolic_output_buffer(sob); + clear_symbolic_output_buffer(sob); + return items; + } + function add_symbolic_output_item(sob, item){sob[1] = [0, item, sob[1]]; return 0; + } + function formatter_of_symbolic_output_b(sob){ + function f(s, i, n){ + return add_symbolic_output_item + (sob, [0, Stdlib_String[16].call(null, s, i, n)]); + } + function g(param){return add_symbolic_output_item(sob, 0);} + function h(param){return add_symbolic_output_item(sob, 1);} + function i(n){return add_symbolic_output_item(sob, [1, n]);} + function j(n){return add_symbolic_output_item(sob, [2, n]);} + return pp_make_formatter(f, g, h, i, j); + } + function open_hbox(v){ + return pp_open_hbox + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function open_vbox(v){ + return pp_open_vbox + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function open_hvbox(v){ + return pp_open_hvbox + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function open_hovbox(v){ + return pp_open_hovbox + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function open_box(v){ + return pp_open_box(caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function close_box(v){ + return pp_close_box + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function open_stag(v){ + return pp_open_stag + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function close_stag(v){ + return pp_close_stag + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_as(isize, w){ + var state = caml_call1(Stdlib_Domain[10][2], std_formatter_key); + return pp_print_as_size(state, isize, w); + } + function print_string(v){ + return pp_print_string + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_bytes(v){ + return pp_print_bytes + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_int(v){ + return pp_print_int + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_float(v){ + return pp_print_float + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_char(v){ + return pp_print_char + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_bool(v){ + return pp_print_bool + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_break(v, w){ + return pp_print_break + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v, w); + } + function print_cut(v){ + return pp_print_cut + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_space(v){ + return pp_print_space + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function force_newline(v){ + return pp_force_newline + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_flush(v){ + return pp_print_flush + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_newline(v){ + return pp_print_newline + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_if_newline(v){ + return pp_print_if_newline + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function open_tbox(v){ + return pp_open_tbox + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function close_tbox(v){ + return pp_close_tbox + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_tbreak(v, w){ + return pp_print_tbreak + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v, w); + } + function set_tab(v){ + return pp_set_tab(caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function print_tab(v){ + return pp_print_tab + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function set_margin(v){ + return pp_set_margin + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_margin(v){ + var state = caml_call1(Stdlib_Domain[10][2], std_formatter_key); + return state[6]; + } + function set_max_indent(v){ + return pp_set_max_indent + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_max_indent(v){ + var state = caml_call1(Stdlib_Domain[10][2], std_formatter_key); + return state[8]; + } + function set_geometry(max_indent, margin){ + return pp_set_geometry + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), + max_indent, + margin); + } + function safe_set_geometry(max_indent, margin){ + return pp_safe_set_geometry + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), + max_indent, + margin); + } + function get_geometry(v){ + return pp_get_geometry + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function update_geometry(v){ + return pp_update_geometry + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function set_max_boxes(v){ + return pp_set_max_boxes + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_max_boxes(v){ + var state = caml_call1(Stdlib_Domain[10][2], std_formatter_key); + return state[15]; + } + function over_max_boxes(v){ + return pp_over_max_boxes + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function set_ellipsis_text(v){ + return pp_set_ellipsis_text + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_ellipsis_text(v){ + var state = caml_call1(Stdlib_Domain[10][2], std_formatter_key); + return state[16]; + } + function set_formatter_out_channel(v){ + return pp_set_formatter_out_channel + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function set_formatter_out_functions(v){ + return pp_set_formatter_out_functions + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_formatter_out_functions(v){ + return pp_get_formatter_out_functions + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function set_formatter_output_functions(v, w){ + return pp_set_formatter_output_functi + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v, w); + } + function get_formatter_output_functions(v){ + return pp_get_formatter_output_functi + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function set_formatter_stag_functions(v){ + return pp_set_formatter_stag_function + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_formatter_stag_functions(v){ + return pp_get_formatter_stag_function + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function set_print_tags(v){ + return pp_set_print_tags + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_print_tags(v){ + var state = caml_call1(Stdlib_Domain[10][2], std_formatter_key); + return state[22]; + } + function set_mark_tags(v){ + return pp_set_mark_tags + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function get_mark_tags(v){ + var state = caml_call1(Stdlib_Domain[10][2], std_formatter_key); + return state[23]; + } + function set_tags(v){ + return pp_set_tags(caml_call1(Stdlib_Domain[10][2], std_formatter_key), v); + } + function pp_print_iter(opt, iter, pp_v, ppf, v){ + var pp_sep = opt ? opt[1] : pp_print_cut, is_first = [0, 1]; + function pp_v$0(v){ + if(is_first[1]) is_first[1] = 0; else caml_call2(pp_sep, ppf, 0); + return caml_call2(pp_v, ppf, v); + } + return caml_call2(iter, pp_v$0, v); + } + function pp_print_list(opt, pp_v, ppf, v){ + var pp_sep = opt ? opt[1] : pp_print_cut; + return pp_print_iter([0, pp_sep], Stdlib_List[18], pp_v, ppf, v); + } + function pp_print_array(opt, pp_v, ppf, v){ + var pp_sep = opt ? opt[1] : pp_print_cut; + return pp_print_iter([0, pp_sep], Stdlib_Array[12], pp_v, ppf, v); + } + function pp_print_seq(opt, pp_v, ppf, seq){ + var pp_sep = opt ? opt[1] : pp_print_cut; + return pp_print_iter([0, pp_sep], Stdlib_Seq[4], pp_v, ppf, seq); + } + function pp_print_text(ppf, s){ + var len = caml_ml_string_length(s), left = [0, 0], right = [0, 0]; + function flush(param){ + pp_print_string + (ppf, Stdlib_String[16].call(null, s, left[1], right[1] - left[1] | 0)); + right[1]++; + left[1] = right[1]; + return 0; + } + for(;;){ + if(right[1] === len){ + var a = left[1] !== len ? 1 : 0; + return a ? flush(0) : a; + } + var match = runtime.caml_string_get(s, right[1]); + if(10 === match){ + flush(0); + pp_force_newline(ppf, 0); + } + else if(32 === match){flush(0); pp_print_space(ppf, 0);} else right[1]++; + } + } + function pp_print_option(opt, pp_v, ppf, param){ + var none = opt ? opt[1] : function(a, param){return 0;}; + if(! param) return caml_call2(none, ppf, 0); + var v = param[1]; + return caml_call2(pp_v, ppf, v); + } + function pp_print_result(ok, error, ppf, param){ + if(0 === param[0]){var v = param[1]; return caml_call2(ok, ppf, v);} + var e = param[1]; + return caml_call2(error, ppf, e); + } + function pp_print_either(left, right, ppf, param){ + if(0 === param[0]){var l = param[1]; return caml_call2(left, ppf, l);} + var r = param[1]; + return caml_call2(right, ppf, r); + } + function compute_tag(output, tag_acc){ + var buf = Stdlib_Buffer[1].call(null, 16), ppf = formatter_of_buffer(buf); + caml_call2(output, ppf, tag_acc); + pp_print_flush(ppf, 0); + var len = Stdlib_Buffer[7].call(null, buf); + return 2 <= len + ? Stdlib_Buffer[4].call(null, buf, 1, len - 2 | 0) + : Stdlib_Buffer[2].call(null, buf); + } + function output_formatting_lit(ppf, fmting_lit){ + if(typeof fmting_lit === "number") + switch(fmting_lit){ + case 0: + return pp_close_box(ppf, 0); + case 1: + return pp_close_stag(ppf, 0); + case 2: + return pp_print_flush(ppf, 0); + case 3: + return pp_force_newline(ppf, 0); + case 4: + return pp_print_newline(ppf, 0); + case 5: + return pp_print_char(ppf, 64); + default: return pp_print_char(ppf, 37); + } + switch(fmting_lit[0]){ + case 0: + var offset = fmting_lit[3], width = fmting_lit[2]; + return pp_print_break(ppf, width, offset); + case 1: + return 0; + default: + var c = fmting_lit[1]; + pp_print_char(ppf, 64); + return pp_print_char(ppf, c); + } + } + function output_acc(ppf, acc){ + if(typeof acc === "number") return 0; + a: + { + b: + { + c: + { + switch(acc[0]){ + case 0: + var f = acc[2], p = acc[1]; + output_acc(ppf, p); + return output_formatting_lit(ppf, f); + case 1: + var match = acc[2], p$0 = acc[1]; + if(0 === match[0]){ + var acc$0 = match[1]; + output_acc(ppf, p$0); + return pp_open_stag + (ppf, [0, String_tag, compute_tag(output_acc, acc$0)]); + } + var acc$1 = match[1]; + output_acc(ppf, p$0); + var + k = compute_tag(output_acc, acc$1), + match$0 = CamlinternalFormat[20].call(null, k), + bty = match$0[2], + indent = match$0[1]; + return pp_open_box_gen(ppf, indent, bty); + case 2: + var a = acc[1]; + if(typeof a !== "number" && 0 === a[0]){ + var g = a[2]; + if(typeof g !== "number" && 1 === g[0]){ + var s$0 = acc[2], size = g[2], p$2 = a[1]; + break a; + } + } + var s = acc[2], p$1 = a; + break b; + case 3: + var b = acc[1]; + if(typeof b !== "number" && 0 === b[0]){ + var h = b[2]; + if(typeof h !== "number" && 1 === h[0]){ + var c$0 = acc[2], size$0 = h[2], p$4 = b[1]; + break c; + } + } + var c = acc[2], p$3 = b; + break; + case 4: + var d = acc[1]; + if(typeof d !== "number" && 0 === d[0]){ + var i = d[2]; + if(typeof i !== "number" && 1 === i[0]){ + var s$0 = acc[2], size = i[2], p$2 = d[1]; + break a; + } + } + var s = acc[2], p$1 = d; + break b; + case 5: + var e = acc[1]; + if(typeof e !== "number" && 0 === e[0]){ + var j = e[2]; + if(typeof j !== "number" && 1 === j[0]){ + var c$0 = acc[2], size$0 = j[2], p$4 = e[1]; + break c; + } + } + var c = acc[2], p$3 = e; + break; + case 6: + var f$0 = acc[2], p$5 = acc[1]; + output_acc(ppf, p$5); + return caml_call1(f$0, ppf); + case 7: + var p$6 = acc[1]; + output_acc(ppf, p$6); + return pp_print_flush(ppf, 0); + default: + var msg = acc[2], p$7 = acc[1]; + output_acc(ppf, p$7); + return Stdlib[1].call(null, msg); + } + output_acc(ppf, p$3); + return pp_print_char(ppf, c); + } + output_acc(ppf, p$4); + return pp_print_as_size + (ppf, size$0, Stdlib_String[1].call(null, 1, c$0)); + } + output_acc(ppf, p$1); + return pp_print_string(ppf, s); + } + output_acc(ppf, p$2); + return pp_print_as_size(ppf, size, s$0); + } + function strput_acc(ppf, acc){ + if(typeof acc === "number") return 0; + a: + { + b: + { + c: + { + switch(acc[0]){ + case 0: + var f = acc[2], p = acc[1]; + strput_acc(ppf, p); + return output_formatting_lit(ppf, f); + case 1: + var match = acc[2], p$0 = acc[1]; + if(0 === match[0]){ + var acc$0 = match[1]; + strput_acc(ppf, p$0); + return pp_open_stag + (ppf, [0, String_tag, compute_tag(strput_acc, acc$0)]); + } + var acc$1 = match[1]; + strput_acc(ppf, p$0); + var + k = compute_tag(strput_acc, acc$1), + match$0 = CamlinternalFormat[20].call(null, k), + bty = match$0[2], + indent = match$0[1]; + return pp_open_box_gen(ppf, indent, bty); + case 2: + var a = acc[1]; + if(typeof a !== "number" && 0 === a[0]){ + var g = a[2]; + if(typeof g !== "number" && 1 === g[0]){ + var s$0 = acc[2], size = g[2], p$2 = a[1]; + break a; + } + } + var s = acc[2], p$1 = a; + break b; + case 3: + var b = acc[1]; + if(typeof b !== "number" && 0 === b[0]){ + var h = b[2]; + if(typeof h !== "number" && 1 === h[0]){ + var c$0 = acc[2], size$0 = h[2], p$4 = b[1]; + break c; + } + } + var c = acc[2], p$3 = b; + break; + case 4: + var d = acc[1]; + if(typeof d !== "number" && 0 === d[0]){ + var i = d[2]; + if(typeof i !== "number" && 1 === i[0]){ + var s$0 = acc[2], size = i[2], p$2 = d[1]; + break a; + } + } + var s = acc[2], p$1 = d; + break b; + case 5: + var e = acc[1]; + if(typeof e !== "number" && 0 === e[0]){ + var j = e[2]; + if(typeof j !== "number" && 1 === j[0]){ + var c$0 = acc[2], size$0 = j[2], p$4 = e[1]; + break c; + } + } + var c = acc[2], p$3 = e; + break; + case 6: + var p$5 = acc[1]; + if(typeof p$5 !== "number" && 0 === p$5[0]){ + var match$1 = p$5[2]; + if(typeof match$1 !== "number" && 1 === match$1[0]){ + var f$1 = acc[2], size$1 = match$1[2], p$6 = p$5[1]; + strput_acc(ppf, p$6); + return pp_print_as_size(ppf, size$1, caml_call1(f$1, 0)); + } + } + var f$0 = acc[2]; + strput_acc(ppf, p$5); + return pp_print_string(ppf, caml_call1(f$0, 0)); + case 7: + var p$7 = acc[1]; + strput_acc(ppf, p$7); + return pp_print_flush(ppf, 0); + default: + var msg = acc[2], p$8 = acc[1]; + strput_acc(ppf, p$8); + return Stdlib[1].call(null, msg); + } + strput_acc(ppf, p$3); + return pp_print_char(ppf, c); + } + strput_acc(ppf, p$4); + return pp_print_as_size + (ppf, size$0, Stdlib_String[1].call(null, 1, c$0)); + } + strput_acc(ppf, p$1); + return pp_print_string(ppf, s); + } + strput_acc(ppf, p$2); + return pp_print_as_size(ppf, size, s$0); + } + function kfprintf(k, ppf, param){ + var fmt = param[1]; + return CamlinternalFormat[7].call + (null, + function(acc){output_acc(ppf, acc); return caml_call1(k, ppf);}, + 0, + fmt); + } + function ikfprintf(k, ppf, param){ + var fmt = param[1]; + return CamlinternalFormat[8].call(null, k, ppf, fmt); + } + function ifprintf(ppf, param){ + var fmt = param[1]; + return CamlinternalFormat[8].call(null, function(a){return 0;}, 0, fmt); + } + function fprintf(ppf){ + function a(a){return 0;} + return function(b){return kfprintf(a, ppf, b);}; + } + function printf(param){ + var fmt = param[1]; + return CamlinternalFormat[7].call + (null, + function(acc){ + return output_acc + (caml_call1(Stdlib_Domain[10][2], std_formatter_key), acc); + }, + 0, + fmt); + } + function eprintf(param){ + var fmt = param[1]; + return CamlinternalFormat[7].call + (null, + function(acc){ + return output_acc + (caml_call1(Stdlib_Domain[10][2], err_formatter_key), acc); + }, + 0, + fmt); + } + function kdprintf(k, param){ + var fmt = param[1]; + return CamlinternalFormat[7].call + (null, + function(acc){ + return caml_call1 + (k, function(ppf){return output_acc(ppf, acc);}); + }, + 0, + fmt); + } + function dprintf(fmt){return kdprintf(function(i){return i;}, fmt);} + function ksprintf(k, param){ + var fmt = param[1], b = pp_make_buffer(0), ppf = formatter_of_buffer(b); + function k$0(acc){ + strput_acc(ppf, acc); + return caml_call1(k, flush_buffer_formatter(b, ppf)); + } + return CamlinternalFormat[7].call(null, k$0, 0, fmt); + } + function sprintf(fmt){return ksprintf(id, fmt);} + function kasprintf(k, param){ + var fmt = param[1], b = pp_make_buffer(0), ppf = formatter_of_buffer(b); + function k$0(acc){ + output_acc(ppf, acc); + return caml_call1(k, flush_buffer_formatter(b, ppf)); + } + return CamlinternalFormat[7].call(null, k$0, 0, fmt); + } + function asprintf(fmt){return kasprintf(id, fmt);} + function flush_standard_formatters(param){ + pp_print_flush(caml_call1(Stdlib_Domain[10][2], std_formatter_key), 0); + return pp_print_flush + (caml_call1(Stdlib_Domain[10][2], err_formatter_key), 0); + } + Stdlib[100].call(null, flush_standard_formatters); + Stdlib_Domain[5].call + (null, + function(param){ + flush_standard_formatters(0); + var + fs = pp_get_formatter_out_functions(std_formatter, 0), + a = Stdlib[39]; + pp_set_formatter_out_functions + (std_formatter, + [0, + function(a, b, c){return buffered_out_string(std_buf_key, a, b, c);}, + function(b){return buffered_out_flush(a, std_buf_key, b);}, + fs[3], + fs[4], + fs[5]]); + var + fs$0 = pp_get_formatter_out_functions(err_formatter, 0), + b = Stdlib[40]; + return pp_set_formatter_out_functions + (err_formatter, + [0, + function(a, b, c){ + return buffered_out_string(err_buf_key, a, b, c); + }, + function(a){return buffered_out_flush(b, err_buf_key, a);}, + fs$0[3], + fs$0[4], + fs$0[5]]); + }); + runtime.caml_register_global + (38, + [0, + pp_open_box, + open_box, + pp_close_box, + close_box, + pp_open_hbox, + open_hbox, + pp_open_vbox, + open_vbox, + pp_open_hvbox, + open_hvbox, + pp_open_hovbox, + open_hovbox, + pp_print_string, + print_string, + pp_print_bytes, + print_bytes, + pp_print_as, + print_as, + pp_print_int, + print_int, + pp_print_float, + print_float, + pp_print_char, + print_char, + pp_print_bool, + print_bool, + pp_print_nothing, + pp_print_space, + print_space, + pp_print_cut, + print_cut, + pp_print_break, + print_break, + pp_print_custom_break, + pp_force_newline, + force_newline, + pp_print_if_newline, + print_if_newline, + pp_print_flush, + print_flush, + pp_print_newline, + print_newline, + pp_infinity, + pp_set_margin, + set_margin, + pp_get_margin, + get_margin, + pp_set_max_indent, + set_max_indent, + pp_get_max_indent, + get_max_indent, + check_geometry, + pp_set_geometry, + set_geometry, + pp_safe_set_geometry, + safe_set_geometry, + pp_update_geometry, + update_geometry, + pp_get_geometry, + get_geometry, + pp_set_max_boxes, + set_max_boxes, + pp_get_max_boxes, + get_max_boxes, + pp_over_max_boxes, + over_max_boxes, + pp_open_tbox, + open_tbox, + pp_close_tbox, + close_tbox, + pp_set_tab, + set_tab, + pp_print_tab, + print_tab, + pp_print_tbreak, + print_tbreak, + pp_set_ellipsis_text, + set_ellipsis_text, + pp_get_ellipsis_text, + get_ellipsis_text, + String_tag, + pp_open_stag, + open_stag, + pp_close_stag, + close_stag, + pp_set_tags, + set_tags, + pp_set_print_tags, + set_print_tags, + pp_set_mark_tags, + set_mark_tags, + pp_get_print_tags, + get_print_tags, + pp_get_mark_tags, + get_mark_tags, + pp_set_formatter_out_channel, + set_formatter_out_channel, + pp_set_formatter_output_functi, + set_formatter_output_functions, + pp_get_formatter_output_functi, + get_formatter_output_functions, + pp_set_formatter_out_functions, + set_formatter_out_functions, + pp_get_formatter_out_functions, + get_formatter_out_functions, + pp_set_formatter_stag_function, + set_formatter_stag_functions, + pp_get_formatter_stag_function, + get_formatter_stag_functions, + formatter_of_out_channel, + synchronized_formatter_of_out_, + std_formatter, + get_std_formatter, + err_formatter, + get_err_formatter, + formatter_of_buffer, + stdbuf, + get_stdbuf, + str_formatter, + get_str_formatter, + flush_str_formatter, + make_formatter, + make_synchronized_formatter, + formatter_of_out_functions, + make_symbolic_output_buffer, + clear_symbolic_output_buffer, + get_symbolic_output_buffer, + flush_symbolic_output_buffer, + add_symbolic_output_item, + formatter_of_symbolic_output_b, + pp_print_iter, + pp_print_list, + pp_print_array, + pp_print_seq, + pp_print_text, + pp_print_option, + pp_print_result, + pp_print_either, + fprintf, + printf, + eprintf, + sprintf, + asprintf, + dprintf, + ifprintf, + kfprintf, + kdprintf, + ikfprintf, + ksprintf, + kasprintf], + "Stdlib__Format"); + return; + } + (globalThis)); + //# 23582 "../.js/default/stdlib/stdlib.cma.js" //# shape: Stdlib__Callback:[F(2),F(2)] (function @@ -24737,6 +28238,6397 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); +//# 26283 "../.js/default/stdlib/stdlib.cma.js" +//# shape: Stdlib__ListLabels:[F(1),F(2),F(2),F(1)*,F(2)*,F(1),F(1),F(2),F(2),F(1),F(2),F(2),F(2),F(1),F(1),F(3),F(3),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(3),F(3),F(3),F(3),F(3),F(3),F(4),F(4),F(2),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(1)*->F(1),F(2),F(1)*->F(1),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(2),F(2),F(3),F(1)*->F(1)*,F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + Stdlib_List = runtime.caml_get_global_data().Stdlib__List, + length = Stdlib_List[1], + compare_lengths = Stdlib_List[2], + compare_length_with = Stdlib_List[3], + is_empty = Stdlib_List[4], + cons = Stdlib_List[5], + hd = Stdlib_List[6], + tl = Stdlib_List[7], + nth = Stdlib_List[8], + nth_opt = Stdlib_List[9], + rev = Stdlib_List[10], + init = Stdlib_List[11], + append = Stdlib_List[12], + rev_append = Stdlib_List[13], + concat = Stdlib_List[14], + flatten = Stdlib_List[15], + equal = Stdlib_List[16], + compare = Stdlib_List[17], + iter = Stdlib_List[18], + iteri = Stdlib_List[19], + map = Stdlib_List[20], + mapi = Stdlib_List[21], + rev_map = Stdlib_List[22], + filter_map = Stdlib_List[23], + concat_map = Stdlib_List[24], + fold_left_map = Stdlib_List[25], + fold_left = Stdlib_List[26], + fold_right = Stdlib_List[27], + iter2 = Stdlib_List[28], + map2 = Stdlib_List[29], + rev_map2 = Stdlib_List[30], + fold_left2 = Stdlib_List[31], + fold_right2 = Stdlib_List[32], + for_all = Stdlib_List[33], + exists = Stdlib_List[34], + for_all2 = Stdlib_List[35], + exists2 = Stdlib_List[36], + mem = Stdlib_List[37], + memq = Stdlib_List[38], + find = Stdlib_List[39], + find_opt = Stdlib_List[40], + find_index = Stdlib_List[41], + find_map = Stdlib_List[42], + find_mapi = Stdlib_List[43], + filter = Stdlib_List[44], + find_all = Stdlib_List[45], + filteri = Stdlib_List[46], + partition = Stdlib_List[47], + partition_map = Stdlib_List[48], + assoc = Stdlib_List[49], + assoc_opt = Stdlib_List[50], + assq = Stdlib_List[51], + assq_opt = Stdlib_List[52], + mem_assoc = Stdlib_List[53], + mem_assq = Stdlib_List[54], + remove_assoc = Stdlib_List[55], + remove_assq = Stdlib_List[56], + split = Stdlib_List[57], + combine = Stdlib_List[58], + sort = Stdlib_List[59], + stable_sort = Stdlib_List[60], + fast_sort = Stdlib_List[61], + sort_uniq = Stdlib_List[62], + merge = Stdlib_List[63], + to_seq = Stdlib_List[64], + of_seq = Stdlib_List[65]; + runtime.caml_register_global + (1, + [0, + length, + compare_lengths, + compare_length_with, + is_empty, + cons, + hd, + tl, + nth, + nth_opt, + rev, + init, + append, + rev_append, + concat, + flatten, + equal, + compare, + iter, + iteri, + map, + mapi, + rev_map, + filter_map, + concat_map, + fold_left_map, + fold_left, + fold_right, + iter2, + map2, + rev_map2, + fold_left2, + fold_right2, + for_all, + exists, + for_all2, + exists2, + mem, + memq, + find, + find_opt, + find_index, + find_map, + find_mapi, + filter, + find_all, + filteri, + partition, + partition_map, + assoc, + assoc_opt, + assq, + assq_opt, + mem_assoc, + mem_assq, + remove_assoc, + remove_assq, + split, + combine, + sort, + stable_sort, + fast_sort, + sort_uniq, + merge, + to_seq, + of_seq], + "Stdlib__ListLabels"); + return; + } + (globalThis)); + +//# 16 "../.js/default/re/re.cma.js" +//# shape: Re__Fmt:[F(4),F(2),F(2),F(3),F(2),F(2),F(2),F(4),F(5),F(4),F(2),F(4),F(3),F(2),F(2)] +(function + (globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib_Format = global_data.Stdlib__Format, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_Bytes = global_data.Stdlib__Bytes, + Stdlib_Array = global_data.Stdlib__Array, + pp_print_string = Stdlib_Format[13], + pp_print_int = Stdlib_Format[19], + pp_print_space = Stdlib_Format[28], + pp_print_list = Stdlib_Format[132], + fprintf = Stdlib_Format[139]; + function array(pp_sep, f, fmt, arr){ + return pp_print_list(pp_sep, f, fmt, Stdlib_Array[10].call(null, arr)); + } + var + cst_3 = "<3>", + cst = "@ ", + a = + [0, + [18, + [1, [0, [11, cst_3, 0], cst_3]], + [12, 40, [2, 0, [17, [0, cst, 1, 0], [15, [12, 41, [17, 0, 0]]]]]]], + "@[<3>(%s@ %a)@]"]; + function sexp(fmt, s, pp, x){return caml_call3(fprintf(fmt)(a), s, pp, x);} + var cst_S = "%S", b = [0, [3, 0, 0], cst_S]; + function bytes(fmt, t){ + var a = Stdlib_Bytes[6].call(null, t); + return caml_call1(Stdlib_Format[139].call(null, fmt)(b), a); + } + function pair(pp1, pp2, fmt, param){ + var v2 = param[2], v1 = param[1]; + caml_call2(pp1, fmt, v1); + pp_print_space(fmt, 0); + return caml_call2(pp2, fmt, v2); + } + function triple(pp1, pp2, pp3, fmt, param){ + var v3 = param[3], v2 = param[2], v1 = param[1]; + caml_call2(pp1, fmt, v1); + pp_print_space(fmt, 0); + caml_call2(pp2, fmt, v2); + pp_print_space(fmt, 0); + return caml_call2(pp3, fmt, v3); + } + var c = [0, [15, 0], "%a"]; + function opt(f, fmt, x){ + if(! x) return pp_print_string(fmt, ""); + var x$0 = x[1]; + return caml_call2(fprintf(fmt)(c), f, x$0); + } + var d = [0, [17, [0, cst, 1, 0], [4, 0, 0, 0, 0]], "@ %d"]; + function optint(fmt, param){ + if(! param) return 0; + var i = param[1]; + return caml_call1(fprintf(fmt)(d), i); + } + var e = [0, [0, 0], "%c"]; + function char(fmt, c){ + return caml_call1(Stdlib_Format[139].call(null, fmt)(e), c); + } + var bool = Stdlib_Format[25]; + function lit(s, fmt, param){return pp_print_string(fmt, s);} + function to_to_string(pp, x){ + var + b = Stdlib_Buffer[1].call(null, 16), + fmt = Stdlib_Format[116].call(null, b); + caml_call2(pp, fmt, x); + return Stdlib_Buffer[2].call(null, b); + } + var f = [0, [3, 0, 0], cst_S]; + function quoted_string(fmt, s){ + return caml_call1(Stdlib_Format[139].call(null, fmt)(f), s); + } + runtime.caml_register_global + (11, + [0, + sexp, + pp_print_string, + optint, + opt, + char, + bool, + pp_print_int, + pair, + triple, + pp_print_list, + bytes, + array, + lit, + to_to_string, + quoted_string], + "Re__Fmt"); + return; + } + (globalThis)); + +//# 133 "../.js/default/re/re.cma.js" +//# shape: Re__Bit_vector:[F(1)*,F(3),F(1),F(2),F(1),F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_bytes_unsafe_get = runtime.caml_bytes_unsafe_get; + function caml_call4(f, a0, a1, a2, a3){ + return (f.l >= 0 ? f.l : f.l = f.length) === 4 + ? f(a0, a1, a2, a3) + : runtime.caml_call_gen(f, [a0, a1, a2, a3]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Fmt = global_data.Re__Fmt, + Stdlib_Format = global_data.Stdlib__Format, + Stdlib_Bytes = global_data.Stdlib__Bytes, + Stdlib = global_data.Stdlib, + Stdlib_Char = global_data.Stdlib__Char; + function length(t){return t[1];} + function set(v, n, b){ + var a = n < 0, d = a || v[1] <= n; + if(d) Stdlib[1].call(null, "Bit_vector.set"); + var + i = n >>> 3 | 0, + s = v[2], + c = caml_bytes_unsafe_get(s, i), + mask = 1 << (n & 7), + x = b ? c | mask : c & Stdlib[21].call(null, mask), + s$0 = v[2]; + runtime.caml_bytes_unsafe_set(s$0, i, Stdlib_Char[1].call(null, x)); + return 0; + } + function get(v, n){ + var a = n < 0, b = a || v[1] <= n; + if(b) Stdlib[1].call(null, "Bit_vector.get"); + var i = n >>> 3 | 0, s = v[2]; + return 0 < (caml_bytes_unsafe_get(s, i) & 1 << (n & 7)) ? 1 : 0; + } + function reset_zero(t){ + return Stdlib_Bytes[10].call + (null, t[2], 0, runtime.caml_ml_bytes_length(t[2]), 0); + } + function create_zero(len){ + var + r = len & 7, + q = len >>> 3 | 0, + len$0 = 0 === r ? q : q + 1 | 0, + bits = Stdlib_Bytes[1].call(null, len$0, 0); + return [0, len, bits]; + } + var a = [0, [15, [17, 4, [15, [17, 4, 0]]]], "%a@.%a@."]; + function pp(fmt, param){ + var bits = param[2], len = param[1]; + function len$0(fmt, param){ + return Re_Fmt[1].call(null, fmt, "len", Re_Fmt[7], len); + } + function bits$0(fmt, param){ + return Re_Fmt[1].call(null, fmt, "bits", Re_Fmt[11], bits); + } + return caml_call4 + (Stdlib_Format[139].call(null, fmt)(a), len$0, 0, bits$0, 0); + } + runtime.caml_register_global + (10, [0, length, set, create_zero, get, reset_zero, pp], "Re__Bit_vector"); + return; + } + (globalThis)); + +//# 203 "../.js/default/re/re.cma.js" +//# shape: Re__Dyn:[F(2)*,F(1)*,F(1)*,F(2)*,F(1)*,F(1)*,F(1)*,F(3),F(2)] +(function + (globalThis){ + "use strict"; + var runtime = globalThis.jsoo_runtime; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function variant(x, y){return [5, x, y];} + function list(x){return [4, x];} + function int(x){return [0, x];} + function pair(x, y){return [1, [0, x, [0, y, 0]]];} + function record(fields){return [6, fields];} + function enum$(x){return [2, x];} + function string(s){return [3, s];} + function result(ok, err, param){ + if(0 === param[0]){ + var s = param[1], y = [0, caml_call1(ok, s), 0]; + return [5, "Ok", y]; + } + var e = param[1], y$0 = [0, caml_call1(err, e), 0]; + return [5, "Error", y$0]; + } + function option(f, param){ + if(! param) return [2, "None"]; + var s = param[1], y = [0, caml_call1(f, s), 0]; + return [5, "Some", y]; + } + runtime.caml_register_global + (4, + [0, variant, list, int, pair, record, enum$, string, result, option], + "Re__Dyn"); + return; + } + (globalThis)); + +//# 243 "../.js/default/re/re.cma.js" +//# shape: Re__Category:[F(2)*,F(1)*,N,N,N,N,N,N,N,F(1)*,F(2)*,F(2)*,F(2)*,F(2),F(1)*] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + Stdlib_Format = global_data.Stdlib__Format, + Re_Dyn = global_data.Re__Dyn; + function equal(x, y){return x === y ? 1 : 0;} + var compare = runtime.caml_int_compare; + function to_int(x){return x;} + var pp = Stdlib_Format[19]; + function intersect(x, y){return 0 !== (x & y) ? 1 : 0;} + function symbol(x, y){return x | y;} + var to_dyn = Re_Dyn[3], letter = 2, not_letter = 4; + function from_char(param){ + a: + { + if(170 <= param) + if(187 <= param){ + var a = param - 192 | 0; + if(54 < a >>> 0){if(56 > a) break a;} else if(23 === a) break a; + } + else{var c = param - 171 | 0; if(14 >= c >>> 0 && 10 !== c) break a;} + else if(65 <= param){ + var b = param - 91 | 0; + if(5 < b >>> 0){if(32 <= b) break a;} else if(4 !== b) break a; + } + else{ + if(48 > param){if(10 === param) return 12; break a;} + if(58 <= param) break a; + } + return letter; + } + return not_letter; + } + runtime.caml_register_global + (2, + [0, + symbol, + from_char, + -1, + 1, + letter, + not_letter, + 8, + 16, + 32, + to_int, + equal, + compare, + intersect, + pp, + to_dyn], + "Re__Category"); + return; + } + (globalThis)); + +//# 305 "../.js/default/re/re.cma.js" +//# shape: Re__Dense_map:[F(2)->F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + Stdlib_Array = runtime.caml_get_global_data().Stdlib__Array; + function make(size, f){ + var cache = Stdlib_Array[1].call(null, size, f); + return function(i){return runtime.caml_check_bound(cache, i)[i + 1];}; + } + runtime.caml_register_global(1, [0, make], "Re__Dense_map"); + return; + } + (globalThis)); + +//# 323 "../.js/default/re/re.cma.js" +//# shape: Re__Import:[[F(2),F(2)],[F(2)*],F(2)*,N,F(2)*,F(2)*,F(2)*,F(2)*,F(2)*,[N,N,N,F(1)*,N,N,F(1)*,F(2)*,F(2)*,F(2)*,F(2)*,F(1)*,F(2)*,F(1)*]] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(); + global_data.Stdlib__Hashtbl; + var + Stdlib_Int = global_data.Stdlib__Int, + equal = runtime.caml_equal, + compare = runtime.caml_compare; + function equal$0(b, a){return b === a ? 1 : 0;} + var symbol = Stdlib_Int[8]; + function symbol$0(x, y){return x < y ? 1 : 0;} + function symbol$1(x, y){return y < x ? 1 : 0;} + var + min = Stdlib_Int[10], + max = Stdlib_Int[11], + compare$0 = Stdlib_Int[9], + zero = Stdlib_Int[1], + one = Stdlib_Int[2], + minus_one = Stdlib_Int[3], + abs = Stdlib_Int[4], + max_int = Stdlib_Int[5], + min_int = Stdlib_Int[6], + lognot = Stdlib_Int[7], + equal$1 = Stdlib_Int[8], + compare$1 = Stdlib_Int[9], + min$0 = Stdlib_Int[10], + max$0 = Stdlib_Int[11], + to_string = Stdlib_Int[12], + seeded_hash = Stdlib_Int[13], + hash = Stdlib_Int[14]; + runtime.caml_register_global + (3, + [0, + [0, equal, compare], + [0, equal$0], + symbol, + [0, 874682015, 0], + symbol$0, + symbol$1, + min, + max, + compare$0, + [0, + zero, + one, + minus_one, + abs, + max_int, + min_int, + lognot, + equal$1, + compare$1, + min$0, + max$0, + to_string, + seeded_hash, + hash]], + "Re__Import"); + return; + } + (globalThis)); + +//# 391 "../.js/default/re/re.cma.js" +//# shape: Re__Cset:[F(2)*,F(1)*,F(1)*,F(1),F(1)*,N,F(2),F(2),F(2),F(1),F(1),F(2),F(2),N,N,F(2),F(2),F(1),N,N,N,N,N,N,F(2),F(1),N,N,N,N,N,N,N,N,N,N,N,N,F(1)*->F(1),F(1)*,F(3),F(1),F(2),N,N,F(1),F(1)*,F(3),F(1),F(2),F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Import = global_data.Re__Import, + Stdlib = global_data.Stdlib, + Assert_failure = global_data.Assert_failure, + Stdlib_ListLabels = global_data.Stdlib__ListLabels, + Re_Dyn = global_data.Re__Dyn, + Re_Fmt = global_data.Re__Fmt, + Stdlib_Format = global_data.Stdlib__Format, + Stdlib_Char = global_data.Stdlib__Char, + Re_Dense_map = global_data.Re__Dense_map, + Stdlib_Map = global_data.Stdlib__Map, + equal_c = Re_Import[10][8]; + function to_int(x){return x;} + function of_int(x){return x;} + function to_char(t){return Stdlib_Char[1].call(null, t);} + function of_char(c){return c;} + function compare_pair(a, param){ + var + y = param[2], + x = param[1], + y$0 = a[2], + x$0 = a[1], + x$1 = Re_Import[10][9].call(null, x$0, x); + return 0 === x$1 ? Re_Import[10][9].call(null, y$0, y) : x$1; + } + function equal_pair(b, param){ + var + y = param[2], + x = param[1], + y$0 = b[2], + x$0 = b[1], + a = Re_Import[10][8].call(null, x$0, x); + return a ? Re_Import[10][8].call(null, y$0, y) : a; + } + function equal(x, y){ + return Stdlib_ListLabels[16].call(null, equal_pair, x, y); + } + function compare(x, y){ + return Stdlib_ListLabels[17].call(null, compare_pair, x, y); + } + function union(l$3, l$4){ + var l$0 = l$3, l = l$4; + for(;;){ + if(! l) return l$0; + if(! l$0) return l; + var + r = l[2], + a = l[1], + c2 = a[2], + c1 = a[1], + r$0 = l$0[2], + match = l$0[1], + c2$0 = match[2], + c1$0 = match[1]; + if(Re_Import[5].call(null, c2$0 + 1 | 0, c1)) + return [0, [0, c1$0, c2$0], union(r$0, l)]; + if(Re_Import[5].call(null, c2 + 1 | 0, c1$0)) + return [0, [0, c1, c2], union(l$0, r)]; + if(Re_Import[5].call(null, c2$0, c2)){ + var l$1 = [0, [0, Re_Import[7].call(null, c1$0, c1), c2], r]; + l$0 = r$0; + l = l$1; + } + else{ + var l$2 = [0, [0, Re_Import[7].call(null, c1$0, c1), c2$0], r$0]; + l$0 = l$2; + l = r; + } + } + } + function inter(l$1, l$2){ + var l$0 = l$1, l = l$2; + for(;;){ + if(! l) return 0; + if(! l$0) return 0; + var + r = l[2], + a = l[1], + c2 = a[2], + c1 = a[1], + r$0 = l$0[2], + match = l$0[1], + c2$0 = match[2], + c1$0 = match[1]; + if(Re_Import[5].call(null, c2$0, c1)) + l$0 = r$0; + else{ + if(! Re_Import[5].call(null, c2, c1$0)){ + if(Re_Import[5].call(null, c2$0, c2)){ + var b = inter(r$0, l); + return [0, [0, Re_Import[8].call(null, c1$0, c1), c2$0], b]; + } + var c = inter(l$0, r); + return [0, [0, Re_Import[8].call(null, c1$0, c1), c2], c]; + } + l = r; + } + } + } + function diff(l$1, l$2){ + var l$0 = l$1, l = l$2; + for(;;){ + if(! l) return l$0; + if(! l$0) return 0; + var + r = l[2], + a = l[1], + c2 = a[2], + c1 = a[1], + r$0 = l$0[2], + match = l$0[1], + c2$0 = match[2], + c1$0 = match[1]; + if(Re_Import[5].call(null, c2$0, c1)) + return [0, [0, c1$0, c2$0], diff(r$0, l)]; + if(Re_Import[5].call(null, c2, c1$0)) + l = r; + else{ + var + r$1 = + Re_Import[5].call(null, c2, c2$0) + ? [0, [0, c2 + 1 | 0, c2$0], r$0] + : r$0; + if(Re_Import[5].call(null, c1$0, c1)) + return [0, [0, c1$0, c1 - 1 | 0], diff(r$1, r)]; + l$0 = r$1; + l = r; + } + } + } + function single(c){return [0, [0, c, c], 0];} + var single$0 = Re_Dense_map[1].call(null, 257, single); + function csingle(i){return caml_call1(single$0, i);} + function add(c, l){return union(caml_call1(single$0, c), l);} + function offset(o, l){ + if(! l) return 0; + var r = l[2], match = l[1], c2 = match[2], c1 = match[1]; + return [0, [0, c1 + o | 0, c2 + o | 0], offset(o, r)]; + } + var empty = 0; + function union_all(ts){ + return Stdlib_ListLabels[26].call(null, union, empty, ts); + } + var cany = [0, [0, 0, 255], 0]; + function intersect_all(ts){ + return Stdlib_ListLabels[26].call(null, inter, cany, ts); + } + function mem(c, s$0){ + var s = s$0; + for(;;){ + if(! s) return 0; + var rem = s[2], match = s[1], c2 = match[2], c1 = match[1]; + if(c <= c2) return c1 <= c ? 1 : 0; + s = rem; + } + } + function hash_rec(param){ + if(! param) return 0; + var r = param[2], match = param[1], j = match[2], i = match[1]; + return (i + (13 * j | 0) | 0) + (257 * hash_rec(r) | 0) | 0; + } + function hash(l){return hash_rec(l) & 1073741823;} + var + a = [0, [4, 0, 0, 0, 0], "%d"], + b = [0, [4, 0, 0, 0, [12, 45, [4, 0, 0, 0, 0]]], "%d-%d"]; + function print_one(ch, param){ + var c2 = param[2], c1 = param[1]; + return Re_Import[10][8].call(null, c1, c2) + ? caml_call1(Stdlib_Format[139].call(null, ch)(a), c1) + : caml_call2(Stdlib_Format[139].call(null, ch)(b), c1, c2); + } + function pp(ts){ + var + a = Re_Fmt[13], + b = [0, function(b, c){return a(", ", b, c);}], + c = Re_Fmt[10]; + return function(a){return c(b, print_one, ts, a);}; + } + function to_dyn(t){ + if(t && ! t[2]){ + var match = t[1], y = match[2], x = match[1]; + if(Re_Import[10][8].call(null, x, y)) return Re_Dyn[3].call(null, x); + } + var + a = + Stdlib_ListLabels[20].call + (null, + function(param){ + var + y = param[2], + x = param[1], + a = Re_Dyn[3].call(null, y), + b = Re_Dyn[3].call(null, x); + return Re_Dyn[4].call(null, b, a); + }, + t); + return Re_Dyn[2].call(null, a); + } + function iter(t$0, f){ + var t = t$0; + for(;;){ + if(! t) return 0; + var xs = t[2], match = t[1], y = match[2], x = match[1]; + caml_call2(f, x, y); + t = xs; + } + } + function one_char(param){ + if(param && ! param[2]){ + var match = param[1], j = match[2], i = match[1]; + if(Re_Import[10][8].call(null, i, j)) return [0, i]; + } + return 0; + } + function compare$0(a, param){ + var + v = param[2], + j = param[1], + u = a[2], + i = a[1], + c = Re_Import[10][9].call(null, i, j); + return 0 === c ? compare(u, v) : c; + } + var CSetMap = Stdlib_Map[1].call(null, [0, compare$0]); + function fold_right(t, init, f){ + return Stdlib_ListLabels[27].call + (null, + function(param, acc){ + var y = param[2], x = param[1]; + return caml_call3(f, x, y, acc); + }, + t, + init); + } + function is_empty(param){return param ? 0 : 1;} + var c = [0, "lib/cset.ml", 182, 9]; + function prepend(s$0, x$0, l){ + var s = s$0; + for(;;){ + if(! s) return l; + if(! l) return 0; + var b = l[1], a = b[1]; + if(a && ! a[2]){ + var + x = b[2], + e = a[1], + d = e[2], + d$0 = e[1], + r = s[2], + match = s[1], + c$0 = match[2], + c$1 = match[1]; + if(! Re_Import[5].call(null, c$0, d$0)) break; + s = r; + continue; + } + throw caml_maybe_attach_backtrace([0, Assert_failure, c], 1); + } + var r$0 = l[2]; + if(c$1 > d$0) + return Re_Import[6].call(null, c$1, d) + ? [0, [0, [0, [0, d$0, d], 0], x], prepend(s, x$0, r$0)] + : [0, + [0, [0, [0, d$0, c$1 - 1 | 0], 0], x], + prepend(s, x$0, [0, [0, [0, [0, c$1, d], 0], x], r$0])]; + if(Re_Import[5].call(null, c$0, d)){ + var f = prepend(r, x$0, [0, [0, [0, [0, c$0 + 1 | 0, d], 0], x], r$0]); + return [0, [0, [0, [0, d$0, c$0], 0], Stdlib[37].call(null, x$0, x)], f]; + } + var g = prepend(s, x$0, r$0); + return [0, [0, [0, [0, d$0, d], 0], Stdlib[37].call(null, x$0, x)], g]; + } + function pick(param){ + if(! param) return Stdlib[1].call(null, "Re_cset.pick"); + var x = param[1][1]; + return x; + } + function cseq(c$0, c){ + return runtime.caml_lessequal(c$0, c) + ? [0, [0, c$0, c], 0] + : [0, [0, c, c$0], 0]; + } + var + d = [0, cseq(216, 222), 0], + e = [0, cseq(192, 214), d], + upper = union_all([0, cseq(65, 90), e]), + clower = offset(32, upper), + cdigit = cseq(48, 57), + ascii = cseq(0, 127); + function cadd(c, s){return add(c, s);} + var + space = add(32, cseq(9, 13)), + f = [0, cseq(65, 70), 0], + xdigit = union_all([0, cdigit, [0, cseq(97, 102), f]]), + g = union(clower, upper), + calpha = + Stdlib_ListLabels[27].call + (null, cadd, [0, 170, [0, 181, [0, 186, [0, 223, [0, 255, 0]]]]], g), + calnum = union(calpha, cdigit); + function case_insens(s){ + var a = [0, offset(-32, inter(s, clower)), 0]; + return union_all([0, s, [0, offset(32, inter(s, upper)), a]]); + } + var + cword = add(95, calnum), + notnl = diff(cany, caml_call1(single$0, 10)), + nl = caml_call1(single$0, 10); + function set(str){ + var a = runtime.caml_ml_string_length(str) - 1 | 0; + if(a < 0) + var s$0 = empty; + else{ + var s = empty, i = 0; + for(;;){ + var + i$0 = runtime.caml_string_get(str, i), + b = union(caml_call1(single$0, i$0), s), + c = i + 1 | 0; + if(a === i){var s$0 = b; break;} + s = b; + i = c; + } + } + return s$0; + } + var + blank = set("\t "), + h = [0, cseq(248, 255), 0], + i = [0, cseq(223, 246), h], + j = [0, caml_call1(single$0, 181), i], + lower = union_all([0, cseq(97, 122), j]), + k = [0, caml_call1(single$0, 186), 0], + alpha = + union_all([0, lower, [0, upper, [0, caml_call1(single$0, 170), k]]]), + alnum = union_all([0, alpha, [0, cdigit, 0]]), + wordc = union_all([0, alnum, [0, caml_call1(single$0, 95), 0]]), + l = [0, cseq(127, 159), 0], + cntrl = union_all([0, cseq(0, 31), l]), + m = [0, cseq(160, 255), 0], + graph = union_all([0, cseq(33, 126), m]), + n = [0, cseq(160, 255), 0], + print = union_all([0, cseq(32, 126), n]), + o = [0, caml_call1(single$0, 247), 0], + p = [0, caml_call1(single$0, 215), o], + q = [0, cseq(187, 191), p], + r = [0, cseq(182, 185), q], + s = [0, cseq(171, 180), r], + t = [0, cseq(160, 169), s], + u = [0, cseq(123, 126), t], + v = [0, cseq(91, 96), u], + w = [0, cseq(58, 64), v], + punct = union_all([0, cseq(33, 47), w]); + runtime.caml_register_global + (18, + [0, + equal_c, + to_int, + of_int, + to_char, + of_char, + -1, + equal, + iter, + union, + union_all, + intersect_all, + inter, + diff, + empty, + single$0, + add, + mem, + case_insens, + cdigit, + calpha, + cword, + notnl, + ascii, + nl, + cseq, + set, + blank, + space, + xdigit, + lower, + upper, + alpha, + alnum, + wordc, + cntrl, + graph, + print, + punct, + pp, + one_char, + fold_right, + hash, + compare, + CSetMap, + cany, + csingle, + is_empty, + prepend, + pick, + offset, + to_dyn], + "Re__Cset"); + return; + } + (globalThis)); + +//# 827 "../.js/default/re/re.cma.js" +//# shape: Re__Hash_set:[F(1)*,F(1),F(2),F(2),F(1),F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_bytes_length = runtime.caml_ml_bytes_length; + function caml_call4(f, a0, a1, a2, a3){ + return (f.l >= 0 ? f.l : f.l = f.length) === 4 + ? f(a0, a1, a2, a3) + : runtime.caml_call_gen(f, [a0, a1, a2, a3]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Fmt = global_data.Re__Fmt, + Re_Import = global_data.Re__Import, + Stdlib_ListLabels = global_data.Stdlib__ListLabels, + Stdlib_Array = global_data.Stdlib__Array, + Stdlib_Format = global_data.Stdlib__Format, + Stdlib_Option = global_data.Stdlib__Option, + Stdlib_Bytes = global_data.Stdlib__Bytes, + Assert_failure = global_data.Assert_failure; + function length(t){return caml_ml_bytes_length(t) / 8 | 0;} + function unsafe_get(t, i){ + return runtime.caml_int64_to_int32 + (Stdlib_Bytes[70].call(null, t, i * 8 | 0)); + } + function unsafe_set(t, i, x){ + return Stdlib_Bytes[84].call + (null, t, i * 8 | 0, runtime.caml_int64_of_int32(x)); + } + function make_absent(len){ + return Stdlib_Bytes[1].call(null, len * 8 | 0, 255); + } + function init(t$0){ + if(Stdlib_Option[10].call(null, t$0[1])){ + var t = runtime.caml_create_bytes(0), a = length(t) - 1 | 0; + if(a >= 0){ + var i = 0; + for(;;){ + unsafe_set(t, i, -1); + var b = i + 1 | 0; + if(a === i) break; + i = b; + } + } + t$0[1] = Stdlib_Option[2].call(null, [0, t, 0]); + } + return Stdlib_Option[4].call(null, t$0[1]); + } + var x = make_absent(1), b = unsafe_get(x, 0), absent = -1; + if(! Re_Import[3].call(null, b, absent)) + throw caml_maybe_attach_backtrace + ([0, Assert_failure, [0, "lib/hash_set.ml", 60, 2]], 1); + function create(param){return [0, 0];} + function index_of_offset(slots, index, i){ + var i$0 = index + i[1] | 0; + return slots <= i$0 ? i$0 - slots | 0 : i$0; + } + function clear(t){ + var match = t[1]; + if(! match) return 0; + var t$0 = match[1]; + t$0[2] = 0; + var t$1 = t$0[1]; + return Stdlib_Bytes[10].call(null, t$1, 0, caml_ml_bytes_length(t$1), 255); + } + function a(t, x){ + var + hash = Re_Import[10][14].call(null, x), + slots = length(t[1]), + index = hash & (slots - 1 | 0), + inserting = 1, + i = [0, 0]; + for(;;){ + if(! inserting){t[2] = t[2] + 1 | 0; return 0;} + var idx = index_of_offset(slots, index, i), elem = unsafe_get(t[1], idx); + if(Re_Import[3].call(null, elem, absent)){unsafe_set(t[1], idx, x); inserting = 0; + } + else + i[1]++; + } + } + function add(t, x){ + var + t$0 = init(t), + slots = length(t$0[1]), + c = Re_Import[3].call(null, slots, 0); + if(c) + var b = c; + else{ + var d = Re_Import[6].call(null, t$0[2], 0); + if(d) + var + f = runtime.caml_div(slots, t$0[2]), + b = Re_Import[5].call(null, f, 2); + else + var b = d; + } + if(b){ + var + old_table = t$0[1], + slots$0 = length(old_table), + g = Re_Import[3].call(null, slots$0, 0) ? 1 : slots$0 << 1, + table = make_absent(g); + t$0[1] = table; + var e = slots$0 - 1 | 0; + if(e >= 0){ + var i = 0; + for(;;){ + var elem = unsafe_get(old_table, i); + if(elem !== -1) a(t$0, elem); + var h = i + 1 | 0; + if(e === i) break; + i = h; + } + } + } + return a(t$0, x); + } + function is_empty(t){ + var t$0 = t[1]; + if(Stdlib_Option[10].call(null, t$0)) return 1; + var t$1 = Stdlib_Option[4].call(null, t$0); + return Re_Import[3].call(null, t$1[2], 0); + } + function mem(t, x){ + var t$0 = t[1]; + if(! Stdlib_Option[10].call(null, t$0)){ + var a = Stdlib_Option[4].call(null, t$0)[2]; + if(! Re_Import[3].call(null, a, 0)){ + var + t$1 = Stdlib_Option[4].call(null, t$0), + hash = Re_Import[10][14].call(null, x), + slots = length(t$1[1]), + index = hash & (slots - 1 | 0), + found = 0, + i = [0, 0]; + for(;;){ + if(! found && Re_Import[5].call(null, i[1], slots)){ + var + idx = index_of_offset(slots, index, i), + elem = unsafe_get(t$1[1], idx); + if(Re_Import[10][8].call(null, elem, x)){found = 1; continue;} + if(Re_Import[10][8].call(null, elem, absent)){i[1] = slots; continue;} + i[1]++; + continue; + } + return found; + } + } + } + return 0; + } + var c = [0, [15, [17, 4, [15, [17, 4, 0]]]], "%a@.%a@."]; + function pp(fmt, t){ + var + match = init(t), + table = match[1], + size = match[2], + a = length(table) - 1 | 0, + init$0 = 0; + if(a < 0) + var init$2 = init$0; + else{ + var init$1 = init$0, i = 0; + for(;;){ + var + i$0 = unsafe_get(table, i), + b = Re_Import[3].call(null, i$0, absent) ? init$1 : [0, i$0, init$1], + d = i + 1 | 0; + if(a === i){var init$2 = b; break;} + init$1 = b; + i = d; + } + } + var + e = Stdlib_ListLabels[10].call(null, init$2), + table$0 = Stdlib_Array[11].call(null, e); + function table$1(fmt, param){ + var a = Re_Fmt[7], b = Re_Fmt[12]; + return Re_Fmt[1].call + (null, + fmt, + "table", + function(c, d){return b(0, a, c, d);}, + table$0); + } + function size$0(fmt, param){ + return Re_Fmt[1].call(null, fmt, "size", Re_Fmt[7], size); + } + return caml_call4 + (Stdlib_Format[139].call(null, fmt)(c), table$1, 0, size$0, 0); + } + runtime.caml_register_global + (12, [0, create, is_empty, add, mem, clear, pp], "Re__Hash_set"); + return; + } + (globalThis)); + +//# 1030 "../.js/default/re/re.cma.js" +//# shape: Re__Mark_infos:[F(1),F(2),F(2),F(2),[F(1)*,F(1)*],F(2),F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound; + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Import = global_data.Re__Import, + Stdlib_ListLabels = global_data.Stdlib__ListLabels; + function make(marks){ + var + len = + 1 + + + Stdlib_ListLabels[26].call + (null, + function(ma, param){ + var i = param[1]; + return Re_Import[8].call(null, ma, i); + }, + -1, + marks) + | 0, + t = runtime.caml_make_vect(len, -1); + function set(param){ + var v = param[2], i = param[1]; + caml_check_bound(t, i)[i + 1] = v; + return 0; + } + Stdlib_ListLabels[18].call(null, set, marks); + return t; + } + function test(t, i){ + if(t.length - 1 <= (2 * i | 0)) return 0; + var a = 2 * i | 0; + return -1 !== caml_check_bound(t, a)[a + 1] ? 1 : 0; + } + function is_present(t){return 0 <= t ? 1 : 0;} + function get_no_check(t){return t;} + function start_offset(t, i){ + var start_i = 2 * i | 0; + return t.length - 1 <= (start_i + 1 | 0) + ? -1 + : caml_check_bound(t, start_i)[start_i + 1]; + } + function stop_offset(t, i){ + var stop_i = (2 * i | 0) + 1 | 0; + return t.length - 1 <= stop_i + ? -1 + : caml_check_bound(t, stop_i)[stop_i + 1]; + } + function offset(t, i){ + var start_i = 2 * i | 0, stop_i = start_i + 1 | 0; + if(t.length - 1 <= stop_i) return 0; + var start = caml_check_bound(t, start_i)[start_i + 1]; + if(Re_Import[3].call(null, start, -1)) return 0; + var stop = caml_check_bound(t, stop_i)[stop_i + 1]; + return [0, [0, start, stop]]; + } + function iteri(t, f){ + var a = ((t.length - 1) / 2 | 0) - 1 | 0; + if(a >= 0){ + var i = 0; + for(;;){ + var idx = 2 * i | 0, start = caml_check_bound(t, idx)[idx + 1]; + if(-1 !== start){ + var b = idx + 1 | 0, stop = caml_check_bound(t, b)[b + 1]; + caml_call3(f, i, start, stop); + } + var c = i + 1 | 0; + if(a === i) break; + i = c; + } + } + return 0; + } + runtime.caml_register_global + (2, + [0, + make, + offset, + test, + iteri, + [0, is_present, get_no_check], + start_offset, + stop_offset], + "Re__Mark_infos"); + return; + } + (globalThis)); + +//# 1130 "../.js/default/re/re.cma.js" +//# shape: Re__Pmark:[F(2)*,F(2)*,F(1),F(2),F(1)*,N] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(); + global_data.Stdlib__List; + var + Stdlib_Atomic = global_data.Stdlib__Atomic, + Stdlib_Format = global_data.Stdlib__Format, + Stdlib_Set = global_data.Stdlib__Set, + Re_Dyn = global_data.Re__Dyn; + function equal(x, y){return x === y ? 1 : 0;} + var compare = runtime.caml_int_compare, r = Stdlib_Atomic[1].call(null, 1); + function gen(param){return Stdlib_Atomic[7].call(null, r, 1);} + var + pp = Stdlib_Format[19], + Set = Stdlib_Set[1].call(null, [0, compare]), + empty = Set[1], + add = Set[2], + singleton = Set[3], + remove = Set[4], + union = Set[5], + inter = Set[6], + disjoint = Set[7], + diff = Set[8], + cardinal = Set[9], + elements = Set[10], + min_elt = Set[11], + min_elt_opt = Set[12], + max_elt = Set[13], + max_elt_opt = Set[14], + choose = Set[15], + choose_opt = Set[16], + find = Set[17], + find_opt = Set[18], + find_first = Set[19], + find_first_opt = Set[20], + find_last = Set[21], + find_last_opt = Set[22], + iter = Set[23], + fold = Set[24], + map = Set[25], + filter = Set[26], + filter_map = Set[27], + partition = Set[28], + split = Set[29], + is_empty = Set[30], + mem = Set[31], + equal$0 = Set[32], + compare$0 = Set[33], + subset = Set[34], + for_all = Set[35], + exists = Set[36], + to_list = Set[37], + of_list = Set[38], + to_seq_from = Set[39], + to_seq = Set[40], + to_rev_seq = Set[41], + add_seq = Set[42], + of_seq = Set[43], + to_dyn = Re_Dyn[3]; + runtime.caml_register_global + (5, + [0, + equal, + compare, + gen, + pp, + to_dyn, + [0, + empty, + add, + singleton, + remove, + union, + inter, + disjoint, + diff, + cardinal, + elements, + min_elt, + min_elt_opt, + max_elt, + max_elt_opt, + choose, + choose_opt, + find, + find_opt, + find_first, + find_first_opt, + find_last, + find_last_opt, + iter, + fold, + map, + filter, + filter_map, + partition, + split, + is_empty, + mem, + equal$0, + compare$0, + subset, + for_all, + exists, + of_list, + to_seq_from, + to_seq, + to_rev_seq, + add_seq, + of_seq, + to_list]], + "Re__Pmark"); + return; + } + (globalThis)); + +//# 1252 "../.js/default/re/re.cma.js" +//# shape: Re__Automata:[N,N,N,F(1)*,F(2),N,F(2),F(1),F(2),F(4),F(1),F(4),F(2),F(2),F(3),F(2),F(2),F(2),N,[],N,N,F(4)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_trampoline = runtime.caml_trampoline, + caml_trampoline_return = runtime.caml_trampoline_return, + caml_wrap_exception = runtime.caml_wrap_exception; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call4(f, a0, a1, a2, a3){ + return (f.l >= 0 ? f.l : f.l = f.length) === 4 + ? f(a0, a1, a2, a3) + : runtime.caml_call_gen(f, [a0, a1, a2, a3]); + } + function caml_call6(f, a0, a1, a2, a3, a4, a5){ + return (f.l >= 0 ? f.l : f.l = f.length) === 6 + ? f(a0, a1, a2, a3, a4, a5) + : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4, a5]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Cset = global_data.Re__Cset, + Re_Category = global_data.Re__Category, + Stdlib_ListLabels = global_data.Stdlib__ListLabels, + Re_Import = global_data.Re__Import, + Re_Bit_vector = global_data.Re__Bit_vector, + Stdlib_Atomic = global_data.Stdlib__Atomic, + Stdlib_Mutex = global_data.Stdlib__Mutex, + Re_Dyn = global_data.Re__Dyn, + Stdlib_Format = global_data.Stdlib__Format, + Re_Fmt = global_data.Re__Fmt, + Re_Mark_infos = global_data.Re__Mark_infos, + Assert_failure = global_data.Assert_failure, + Stdlib = global_data.Stdlib, + Re_Pmark = global_data.Re__Pmark, + Stdlib_Hashtbl = global_data.Stdlib__Hashtbl, + Re_Hash_set = global_data.Re__Hash_set; + function hash_combine(h, accu){return (accu * 65599 | 0) + h | 0;} + var equal = Re_Import[10][8], pp = Re_Fmt[7]; + function create(param){return [0, 0];} + var b = Re_Hash_set[3], c = Re_Hash_set[4]; + function to_string(param){ + return -730718166 === param + ? "long" + : 332064784 <= param ? "first" : "short"; + } + function to_dyn(t){var a = to_string(t); return Re_Dyn[6].call(null, a);} + var equal$0 = Re_Import[1][1]; + function pp$0(ch, k){ + var a = to_string(k); + return Stdlib_Format[13].call(null, ch, a); + } + function to_string$0(param){ + return 620821490 <= param ? "Non_greedy" : "Greedy"; + } + function to_dyn$0(t){ + var a = to_string$0(t); + return Re_Dyn[6].call(null, a); + } + function pp$1(fmt, t){ + var a = to_string$0(t); + return Stdlib_Format[13].call(null, fmt, a); + } + var + equal$1 = Re_Import[10][8], + compare = Re_Import[10][9], + pp$2 = Stdlib_Format[19], + to_dyn$1 = Re_Dyn[3]; + function prev(x){return x - 1 | 0;} + function next(x){return x + 1 | 0;} + function next2(x){return x + 2 | 0;} + function group_count(x){return x / 2 | 0;} + var to_dyn$2 = Re_Dyn[3]; + function to_int(x){return x;} + var pp$3 = Stdlib_Format[19], equal$2 = Re_Import[10][8]; + function wrap_sem(sem$0, sem, v){ + var name = to_string(sem); + if(sem$0){var sem$1 = sem$0[1]; if(equal$0(sem$1, sem)) return v;} + if(4 !== v[0]) return Re_Dyn[1].call(null, name, [0, v, 0]); + var v$0 = v[1]; + return Re_Dyn[1].call(null, name, v$0); + } + function d(sem, param){ + if(typeof param === "number") return 0; + switch(param[0]){ + case 0: + var cs = param[1]; return [0, [0, cs], 0]; + case 2: + var y = param[3], x = param[2], sem$0 = param[1]; + if(! equal$0(sem, sem$0)) throw Stdlib[8]; + var a = d(sem, y[2]); + return [0, x[2], a]; + default: throw Stdlib[8]; + } + } + var i = [2, "Eps"]; + function dyn_of_def(sem){ + return function(param){ + if(typeof param === "number") return i; + switch(param[0]){ + case 0: + var cset = param[1]; return Re_Cset[51].call(null, cset); + case 1: + var + alt = param[1], + a = + Stdlib_ListLabels[20].call + (null, function(a){return to_dyn$3(sem, a);}, alt); + return Re_Dyn[1].call(null, "Alt", a); + case 2: + var + y = param[3], + x = param[2], + sem$0 = param[1], + b = [0, sem$0], + to_dyn = function(a){return to_dyn$3(b, a);}, + t = y[2]; + a: + { + try{var s = d(sem$0, t);} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn !== Stdlib[8]) throw caml_maybe_attach_backtrace(exn, 0); + var match = 0; + break a; + } + var match = [0, s]; + } + var cst_Seq = "Seq"; + if(match) + var + y$0 = match[1], + e = dyn_of_def(sem), + f = Stdlib_ListLabels[20].call(null, e, y$0), + g = [0, to_dyn(x), f], + x$0 = Re_Dyn[1].call(null, cst_Seq, g); + else + var + h = [0, to_dyn(y), 0], + j = [0, to_dyn(x), h], + x$0 = Re_Dyn[1].call(null, cst_Seq, j); + return wrap_sem(sem, sem$0, x$0); + case 3: + var + t$0 = param[3], + sem$1 = param[2], + k = [0, to_dyn$3([0, sem$1], t$0), 0]; + return wrap_sem(sem, sem$1, Re_Dyn[1].call(null, "Rep", k)); + case 4: + var m = param[1], l = [0, to_dyn$1(m), 0]; + return Re_Dyn[1].call(null, "Mark", l); + case 5: + var + y$1 = param[2], + x$1 = param[1], + n = [0, to_dyn$1(y$1), 0], + o = [0, to_dyn$1(x$1), n]; + return Re_Dyn[1].call(null, "Erase", o); + case 6: + var c = param[1], p = [0, Re_Category[15].call(null, c), 0]; + return Re_Dyn[1].call(null, "Before", p); + case 7: + var c$0 = param[1], q = [0, Re_Category[15].call(null, c$0), 0]; + return Re_Dyn[1].call(null, "After", q); + default: + var m$0 = param[1], r = [0, Re_Pmark[5].call(null, m$0), 0]; + return Re_Dyn[1].call(null, "Pmark", r); + }}; + } + function to_dyn$3(sem, param){ + var def = param[2]; + return dyn_of_def(sem)(def); + } + function pp_with_sem(sem, ch, e){ + var match = e[2]; + if(typeof match === "number") return Re_Fmt[2].call(null, ch, "eps"); + switch(match[0]){ + case 0: + var l = match[1]; + return Re_Fmt[1].call(null, ch, "cst", Re_Cset[39], l); + case 1: + var + l$0 = match[1], + a = function(a, b){return pp_with_sem(sem, a, b);}, + d = Re_Fmt[10]; + return Re_Fmt[1].call + (null, ch, "alt", function(b, c){return d(0, a, b, c);}, l$0); + case 2: + var + e$0 = match[3], + e$1 = match[2], + k = match[1], + f = function(a, b){return pp_with_sem(sem, a, b);}, + g = function(a, b){return pp_with_sem(sem, a, b);}, + h = Re_Fmt[9]; + return Re_Fmt[1].call + (null, + ch, + "seq", + function(a, b){return h(pp$0, g, f, a, b);}, + [0, k, e$1, e$0]); + case 3: + var + e$2 = match[3], + k$0 = match[2], + j = [0, k$0], + m = function(a, b){return pp_with_sem(j, a, b);}, + n = Re_Fmt[8]; + return Re_Fmt[1].call + (null, + ch, + "rep", + function(a, b){return n(pp$0, m, a, b);}, + [0, k$0, e$2]); + case 4: + var i = match[1]; return Re_Fmt[1].call(null, ch, "mark", pp$2, i); + case 5: + var e$3 = match[2], b = match[1], o = Re_Fmt[8]; + return Re_Fmt[1].call + (null, + ch, + "erase", + function(a, b){return o(pp$2, pp$2, a, b);}, + [0, b, e$3]); + case 6: + var c = match[1]; + return Re_Fmt[1].call(null, ch, "before", Re_Category[14], c); + case 7: + var c$0 = match[1]; + return Re_Fmt[1].call(null, ch, "after", Re_Category[14], c$0); + default: + var i$0 = match[1]; + return Re_Fmt[1].call(null, ch, "pmark", Re_Pmark[4], i$0); + } + } + function pp$4(a, b){return pp_with_sem(0, a, b);} + function mk(ids, def){ids[1]++; return [0, ids[1], def];} + var a = [1, 0]; + function empty(ids){return mk(ids, a);} + function cst(ids, s){ + return Re_Cset[47].call(null, s) ? mk(ids, a) : mk(ids, [0, s]); + } + function eps(ids){return mk(ids, 0);} + function rep(ids, kind, sem, x){return mk(ids, [3, kind, sem, x]);} + function mark(ids, m){return mk(ids, [4, m]);} + function pmark(ids, i){return mk(ids, [8, i]);} + function erase(ids, m$0, m){return mk(ids, [5, m$0, m]);} + function before(ids, c){return mk(ids, [6, c]);} + function after(ids, c){return mk(ids, [7, c]);} + function alt(ids, l){ + if(! l) return mk(ids, a); + if(l[2]) return mk(ids, [1, l]); + var c = l[1]; + return c; + } + function seq(ids, kind, x, y){ + var a = x[2], match = y[2]; + if(typeof a !== "number" && 1 === a[0] && ! a[1]) return x; + if(typeof match !== "number" && 1 === match[0] && ! match[1]) return y; + if(typeof a === "number") return y; + if(typeof match === "number" && equal$0(kind, 332064784)) return x; + return mk(ids, [2, kind, x, y]); + } + function is_eps(expr){return typeof expr[2] === "number" ? 1 : 0;} + function rename(ids, x){ + var match = x[2]; + if(typeof match !== "number") + switch(match[0]){ + case 1: + var l = match[1]; + return mk + (ids, + [1, + Stdlib_ListLabels[20].call + (null, function(a){return rename(ids, a);}, l)]); + case 2: + var z = match[3], y = match[2], k = match[1], a = rename(ids, z); + return mk(ids, [2, k, rename(ids, y), a]); + case 3: + var y$0 = match[3], k$0 = match[2], g = match[1]; + return mk(ids, [3, g, k$0, rename(ids, y$0)]); + } + return mk(ids, x[2]); + } + var cst_marks = "marks"; + function to_dyn$4(param){ + var + pmarks = param[2], + marks = param[1], + a = caml_call1(Re_Pmark[6][43], pmarks), + e = Stdlib_ListLabels[20].call(null, Re_Pmark[5], a), + b = [0, [0, "pmarks", Re_Dyn[2].call(null, e)], 0], + c = + Stdlib_ListLabels[20].call + (null, + function(param){ + var + idx = param[2], + m = param[1], + a = to_dyn$2(idx), + b = to_dyn$1(m); + return Re_Dyn[4].call(null, b, a); + }, + marks), + d = [0, [0, cst_marks, Re_Dyn[2].call(null, c)], b]; + return Re_Dyn[5].call(null, d); + } + function equal$3(param, t){ + var + pmarks = param[2], + marks = param[1], + a = + Stdlib_ListLabels[16].call + (null, + function(b, param){ + var + y = param[2], + x = param[1], + y$0 = b[2], + x$0 = b[1], + a = equal$1(x$0, x); + return a ? equal$2(y$0, y) : a; + }, + marks, + t[1]); + return a ? caml_call2(Re_Pmark[6][32], pmarks, t[2]) : a; + } + var empty$0 = [0, 0, Re_Pmark[6][1]]; + function f(acc, param){ + var i = param[2], a = param[1]; + return hash_combine(a, hash_combine(i, acc)); + } + function hash(m, accu){ + var + init = hash_combine(Stdlib_Hashtbl[28].call(null, m[2]), accu), + l = m[1]; + return Stdlib_ListLabels[26].call(null, f, init, l); + } + var unknown = -1; + function marks_set_idx(idx, marks){ + if(! marks) return 0; + var rem = marks[2], match = marks[1], idx$0 = match[2], a = match[1]; + return equal$2(idx$0, unknown) + ? [0, [0, a, idx], marks_set_idx(idx, rem)] + : marks; + } + function marks_set_idx$0(marks, idx){ + var a = marks[2]; + return [0, marks_set_idx(idx, marks[1]), a]; + } + var + cst_2 = "<2>", + cst$0 = "@ ", + j = [0, [15, [12, 45, [15, 0]]], "%a-%a"], + k = + [0, + [18, + [1, [0, [11, cst_2, 0], cst_2]], + [11, cst_marks, [17, [0, cst$0, 1, 0], [15, [17, 0, 0]]]]], + "@[<2>marks@ %a@]"], + l = + [0, + [18, + [1, [0, [11, cst_2, 0], cst_2]], + [11, "pmarks ", [15, [17, 0, 0]]]], + "@[<2>pmarks %a@]"]; + function pp$5(fmt, param){ + var pmarks = param[2], marks = param[1]; + Stdlib_Format[1].call(null, fmt, 1); + if(marks){ + var + a = + function(fmt, param){ + var i = param[2], a = param[1]; + return caml_call4 + (Stdlib_Format[139].call(null, fmt)(j), pp$2, a, pp$3, i); + }, + b = Stdlib_Format[132]; + caml_call2 + (Stdlib_Format[139].call(null, fmt)(k), + function(c, d){return b(0, a, c, d);}, + marks); + } + var pmarks$0 = caml_call1(Re_Pmark[6][43], pmarks); + if(pmarks$0){ + var c = Re_Pmark[4], d = Stdlib_Format[132]; + caml_call2 + (Stdlib_Format[139].call(null, fmt)(l), + function(a, b){return d(0, c, a, b);}, + pmarks$0); + } + return Stdlib_Format[3].call(null, fmt, 0); + } + function equal_list(l1, l2){ + return Stdlib_ListLabels[16].call(null, equal$4, l1, l2); + } + function equal$4(x, y){ + switch(x[0]){ + case 0: + var e1 = x[3], l1 = x[2]; + if(0 === y[0]){ + var e2 = y[3], l2 = y[2], a = equal(e1[1], e2[1]); + return a ? equal_list(l1, l2) : a; + } + break; + case 1: + var e1$0 = x[2], marks1 = x[1]; + if(1 === y[0]){ + var e2$0 = y[2], marks2 = y[1], b = equal(e1$0[1], e2$0[1]); + return b ? equal$3(marks1, marks2) : b; + } + break; + default: + var marks1$0 = x[1]; + if(2 === y[0]){ + var marks2$0 = y[1]; + return equal$3(marks1$0, marks2$0); + } + } + return 0; + } + var letrec_function_context = []; + function hash_list(l, init){ + return Stdlib_ListLabels[26].call + (null, letrec_function_context[1], init, l); + } + function f$0(accu, x$1){ + switch(x$1[0]){ + case 0: + var e = x$1[3], l = x$1[2], a = hash_list(l, accu), x = e[1]; + return hash_combine(388635598, hash_combine(x, a)); + case 1: + var e$0 = x$1[2], marks = x$1[1], b = hash(marks, accu), x$0 = e$0[1]; + return hash_combine(726404471, hash_combine(x$0, b)); + default: + var marks$0 = x$1[1]; + return hash_combine(471882453, hash(marks$0, accu)); + } + } + var g = Re_Hash_set[5], h = Re_Hash_set[1]; + runtime.caml_update_dummy(letrec_function_context, [0, f$0]); + function e(sem, t){ + var + a = + Stdlib_ListLabels[20].call + (null, + function(param){ + switch(param[0]){ + case 0: + var + y = param[3], + x = param[2], + sem$0 = param[1], + a = [0, to_dyn$3([0, sem$0], y), 0], + b = [0, e([0, sem$0], x), a]; + return wrap_sem(sem, sem$0, Re_Dyn[1].call(null, "TSeq", b)); + case 1: + var + e$0 = param[2], + marks = param[1], + base = [0, to_dyn$3(sem, e$0), 0], + e$1 = + equal$3(empty$0, marks) ? base : [0, to_dyn$4(marks), base]; + return Re_Dyn[1].call(null, "TExp", e$1); + default: + var m = param[1], c = [0, to_dyn$4(m), 0]; + return Re_Dyn[1].call(null, "TMarks", c); + } + }, + t); + return Re_Dyn[2].call(null, a); + } + function tseq(kind, x, y, rem){ + a: + if(x){ + var a = x[1]; + if(1 === a[0] && typeof a[2][2] === "number" && ! x[2]){var marks = a[1], b = [0, [1, marks, y], 0]; break a;} + var b = [0, [0, kind, x, y], 0]; + } + else + var b = 0; + return Stdlib[37].call(null, b, rem); + } + function fold_right(t, init, f){ + if(! t) return init; + var xs = t[2], x = t[1]; + return caml_call2(f, x, fold_right(xs, init, f)); + } + function iter_marks(t, f){ + return Stdlib_ListLabels[18].call + (null, + function(e){ + if(0 === e[0]){var l = e[2]; return iter_marks(l, f);} + var marks = e[1]; + return caml_call1(f, marks); + }, + t); + } + var + cst_TExp = "(TExp", + m = + [0, + [18, + [1, [0, [11, cst_2, 0], cst_2]], + [11, "(TSeq", [17, [0, cst$0, 1, 0], [15, [17, [0, cst$0, 1, 0], 0]]]]], + "@[<2>(TSeq@ %a@ "], + n = [0, [17, [0, cst$0, 1, 0], [15, [12, 41, [17, 0, 0]]]], "@ %a)@]"], + o = + [0, + [18, + [1, [0, [11, cst_2, 0], cst_2]], + [11, + cst_TExp, + [17, + [0, cst$0, 1, 0], + [15, + [17, + [0, cst$0, 1, 0], + [12, + 40, + [15, + [12, 41, [17, [0, cst$0, 1, 0], [11, "(eps))", [17, 0, 0]]]]]]]]]]], + "@[<2>(TExp@ %a@ (%a)@ (eps))@]"], + p = + [0, + [18, + [1, [0, [11, cst_2, 0], cst_2]], + [11, + cst_TExp, + [17, + [0, cst$0, 1, 0], + [15, + [17, + [0, cst$0, 1, 0], + [12, + 40, + [15, + [12, 41, [17, [0, cst$0, 1, 0], [15, [12, 41, [17, 0, 0]]]]]]]]]]]], + "@[<2>(TExp@ %a@ (%a)@ %a)@]"], + q = + [0, + [18, + [1, [0, [11, cst_2, 0], cst_2]], + [11, "(TMatch", [17, [0, cst$0, 1, 0], [15, [12, 41, [17, 0, 0]]]]]], + "@[<2>(TMatch@ %a)@]"]; + function print_state_rec(ch, e, y){ + switch(e[0]){ + case 0: + var x = e[3], l = e[2], sem = e[1]; + caml_call2(Stdlib_Format[139].call(null, ch)(m), pp$0, sem); + print_state_lst(ch, l, x); + return caml_call2(Stdlib_Format[139].call(null, ch)(n), pp$4, x); + case 1: + var marks = e[1]; + if(typeof e[2][2] === "number"){ + var a = y[1]; + return caml_call4 + (Stdlib_Format[139].call(null, ch)(o), pp, a, pp$5, marks); + } + var x$0 = e[2], b = x$0[1]; + return caml_call6 + (Stdlib_Format[139].call(null, ch)(p), + pp, + b, + pp$5, + marks, + pp$4, + x$0); + default: + var marks$0 = e[1]; + return caml_call2(Stdlib_Format[139].call(null, ch)(q), pp$5, marks$0); + } + } + var + cst$1 = "()", + r = [0, [17, [0, cst$0, 1, 0], [11, "| ", 0]], "@ | "], + s = [0, [11, cst$1, 0], cst$1]; + function print_state_lst(ch, l, y){ + if(! l) return Stdlib_Format[139].call(null, ch)(s); + var rem = l[2], e = l[1]; + print_state_rec(ch, e, y); + return Stdlib_ListLabels[18].call + (null, + function(e){ + Stdlib_Format[139].call(null, ch)(r); + return print_state_rec(ch, e, y); + }, + rem); + } + var zero = 0; + function pp$6(ch, t){return print_state_lst(ch, [0, t, 0], [0, zero, 0]);} + function first_match(param$0){ + var param = param$0; + for(;;){ + if(! param) return 0; + var match = param[1]; + if(2 === match[0]){var marks = match[1]; return [0, marks];} + var r = param[2]; + param = r; + } + } + function remove_matches(t){ + return Stdlib_ListLabels[44].call + (null, function(param){return 2 === param[0] ? 0 : 1;}, t); + } + function set_idx(idx, xs){ + return Stdlib_ListLabels[20].call + (null, + function(param){ + switch(param[0]){ + case 0: + var x = param[3], l = param[2], kind = param[1]; + return [0, kind, set_idx(idx, l), x]; + case 1: + var x$0 = param[2], marks = param[1]; + return [1, marks_set_idx$0(marks, idx), x$0]; + default: + var marks$0 = param[1]; + return [2, marks_set_idx$0(marks$0, idx)]; + } + }, + xs); + } + function add_match(t, marks){return [0, [2, marks], t];} + function loop(seen, l$2, y){ + var l = l$2; + for(;;){ + if(! l) return 0; + var x = l[1]; + switch(x[0]){ + case 0: + var + r = l[2], + x$0 = x[3], + l$0 = x[2], + kind = x[1], + l$1 = loop(seen, l$0, x$0), + r$0 = loop(seen, r, y); + return tseq(kind, l$1, x$0, r$0); + case 1: + if(typeof x[2][2] === "number"){ + var r$1 = l[2]; + if(! c(seen, y[1])){ + b(seen, y[1]); + return [0, x, loop(seen, r$1, y)]; + } + l = r$1; + } + else{ + var r$2 = l[2], x$1 = x[2]; + if(! c(seen, x$1[1])){ + b(seen, x$1[1]); + return [0, x, loop(seen, r$2, y)]; + } + l = r$2; + } + break; + default: return [0, x, 0]; + } + } + } + var u = [0, [12, 91, [15, [12, 93, 0]]], "[%a]"]; + function pp$7(fmt, t){ + var + t$0 = t[3], + a = Re_Fmt[13], + b = [0, function(b, c){return a("; ", b, c);}], + c = Stdlib_Format[132]; + return caml_call2 + (Stdlib_Format[139].call(null, fmt)(u), + function(a, d){return c(b, pp$6, a, d);}, + t$0); + } + function idx(t){return t[1];} + function to_dyn$5(t){var t$0 = t[3]; return e(0, t$0);} + var empty$1 = 0, dummy = [0, unknown, Re_Category[3], empty$1, 0, -1]; + function mk$0(idx, cat, desc){ + return [0, + idx, + cat, + desc, + 0, + hash_list + (desc, + hash_combine + (idx, hash_combine(Re_Category[10].call(null, cat), 0))) + & 1073741823]; + } + function create$0(cat, expr){ + return mk$0(0, cat, [0, [1, empty$0, expr], 0]); + } + function equal$5(param, t){ + var + desc = param[3], + category = param[2], + idx = param[1], + hash = param[5], + b = Re_Import[10][8].call(null, hash, t[5]); + if(b){ + var c = equal$2(idx, t[1]); + if(c){ + var d = Re_Category[11].call(null, category, t[2]); + if(d) return equal_list(desc, t[3]); + var a = d; + } + else + var a = c; + } + else + var a = b; + return a; + } + function status_no_mutex(s){ + var match$0 = s[4]; + if(match$0){var s$0 = match$0[1]; return s$0;} + var param = s[3]; + if(param){ + var match = param[1]; + if(2 === match[0]) + var + m = match[1], + a = m[2], + st = [0, Re_Mark_infos[1].call(null, m[1]), a]; + else + var st = 1; + } + else + var st = 0; + s[4] = [0, st]; + return st; + } + function status(m, s){ + var match = s[4]; + if(match){var s$0 = match[1]; return s$0;} + Stdlib_Mutex[2].call(null, m); + var st = status_no_mutex(s); + Stdlib_Mutex[4].call(null, m); + return st; + } + function hash$0(t){return t[5];} + var Table = Stdlib_Hashtbl[26].call(null, [0, equal$5, hash$0]); + function create$1(param){ + var a = Stdlib_Atomic[1].call(null, 0), b = h(0); + return [0, Re_Bit_vector[3].call(null, 1), b, a]; + } + function index_count(w){return Stdlib_Atomic[3].call(null, w[3]);} + var eps_expr = [0, zero, 0]; + function delta_expr$0(counter, ctx, marks, x, rem){ + var c = ctx[1], match = x[2]; + if(typeof match === "number") return add_match(rem, marks); + switch(match[0]){ + case 0: + var s = match[1]; + return Re_Cset[17].call(null, c, s) + ? [0, [1, marks, eps_expr], rem] + : rem; + case 1: + var l = match[1]; + return Stdlib_ListLabels[27].call + (null, + function(a, b){return delta_expr(ctx, marks, a, b);}, + l, + rem); + case 2: + var + z = match[3], + y = match[2], + kind = match[1], + y$0 = delta_expr(ctx, marks, y, empty$1); + return counter < 50 + ? delta_seq$0(counter + 1 | 0, ctx, kind, y$0, z, rem) + : caml_trampoline_return + (delta_seq$0, [0, ctx, kind, y$0, z, rem]); + case 3: + var + y$1 = match[3], + kind$0 = match[2], + rep_kind = match[1], + y$2 = delta_expr(ctx, marks, y$1, empty$1), + match$0 = first_match(y$2); + if(match$0) + var + marks$0 = match$0[1], + marks$1 = marks$0, + y$3 = remove_matches(y$2); + else + var marks$1 = marks, y$3 = y$2; + return 620821490 <= rep_kind + ? add_match(tseq(kind$0, y$3, x, rem), marks) + : tseq(kind$0, y$3, x, add_match(rem, marks$1)); + case 4: + var i = match[1], b = marks[2]; + return add_match + (rem, + [0, + [0, + [0, i, unknown], + Stdlib_ListLabels[56].call(null, i, marks[1])], + b]); + case 5: + var + stop_inclusive = match[2], + start_inclusive = match[1], + a = marks[2]; + return add_match + (rem, + [0, + Stdlib_ListLabels[44].call + (null, + function(param){ + var + i = param[1], + a = Re_Import[5].call(null, i, start_inclusive); + return a ? a : Re_Import[6].call(null, i, stop_inclusive); + }, + marks[1]), + a]); + case 6: + var cat = match[1]; + return Re_Category[13].call(null, ctx[3], cat) + ? add_match(rem, marks) + : rem; + case 7: + var cat$0 = match[1]; + return Re_Category[13].call(null, ctx[2], cat$0) + ? add_match(rem, marks) + : rem; + default: + var i$0 = match[1], d = caml_call2(Re_Pmark[6][2], i$0, marks[2]); + return add_match(rem, [0, marks[1], d]); + } + } + function delta_expr(ctx, marks, x, rem){ + return caml_trampoline(delta_expr$0(0, ctx, marks, x, rem)); + } + var t = [0, "lib/automata.ml", 528, 14]; + function delta_seq$0(counter, ctx, kind, y$1, z, rem){ + var match = first_match(y$1); + if(! match) return tseq(kind, y$1, z, rem); + var marks = match[1]; + if(-730718166 === kind){ + var b = delta_expr(ctx, marks, z, rem); + return tseq(kind, remove_matches(y$1), z, b); + } + if(332064784 > kind){ + var a = tseq(kind, remove_matches(y$1), z, rem); + return counter < 50 + ? delta_expr$0(counter + 1 | 0, ctx, marks, z, a) + : caml_trampoline_return(delta_expr$0, [0, ctx, marks, z, a]); + } + var l = 0, param = y$1; + for(;;){ + if(! param) throw caml_maybe_attach_backtrace([0, Assert_failure, t], 1); + var x = param[1]; + if(2 === x[0]){ + var + r$0 = param[2], + y = remove_matches(r$0), + y$0 = Stdlib_ListLabels[10].call(null, l); + return tseq + (kind, y$0, z, delta_expr(ctx, marks, z, tseq(kind, y, z, rem))); + } + var r = param[2], l$0 = [0, x, l]; + l = l$0; + param = r; + } + } + function delta_seq(ctx, kind, y, z, rem){ + return caml_trampoline(delta_seq$0(0, ctx, kind, y, z, rem)); + } + function delta_desc(ctx, marks, l, rem){ + return fold_right + (l, + rem, + function(expr, acc){ + switch(expr[0]){ + case 0: + var + z = expr[3], + y = expr[2], + kind = expr[1], + y$0 = delta_desc(ctx, marks, y, empty$1); + return delta_seq(ctx, kind, y$0, z, acc); + case 1: + var e = expr[2], marks$0 = expr[1]; + return delta_expr(ctx, marks$0, e, acc); + default: return [0, expr, acc]; + } + }); + } + function delta(tbl_ref, next_cat, char, st){ + var + prev_cat = st[2], + ctx = [0, char, prev_cat, next_cat], + l = delta_desc(ctx, empty$0, st[3], empty$1), + seen = tbl_ref[2]; + g(seen); + var expr = loop(seen, l, eps_expr); + Re_Bit_vector[5].call(null, tbl_ref[1]); + var tbl = tbl_ref[1]; + iter_marks + (expr, + function(marks){ + return Stdlib_ListLabels[18].call + (null, + function(param){ + var i = param[2], a = 0 <= i ? 1 : 0; + return a ? Re_Bit_vector[2].call(null, tbl, i, 1) : a; + }, + marks[1]); + }); + var + len = Re_Bit_vector[1].call(null, tbl_ref[1]), + tbl$0 = tbl_ref[1], + idx = 0; + for(;;){ + if + (! + Re_Import[3].call(null, idx, len) + && Re_Bit_vector[4].call(null, tbl$0, idx)){ + var idx$0 = idx + 1 | 0; + idx = idx$0; + continue; + } + if(Re_Import[3].call(null, idx, len)){ + tbl_ref[1] = Re_Bit_vector[3].call(null, 2 * len | 0); + Stdlib_Atomic[4].call(null, tbl_ref[3], 2 * len | 0); + } + var expr$0 = set_idx(idx, expr); + return mk$0(idx, next_cat, expr$0); + } + } + runtime.caml_register_global + (60, + [0, + [0, compare, 0, prev, next, next2, group_count], + [0, to_dyn, pp$0], + [0, to_dyn$0, pp$1], + is_eps, + pp$4, + [0, create], + cst, + empty, + alt, + seq, + eps, + rep, + mark, + pmark, + erase, + before, + after, + rename, + [0, to_int], + [0], + [0, + pp$7, + dummy, + create$0, + idx, + status_no_mutex, + status, + to_dyn$5, + Table], + [0, create$1, index_count], + delta], + "Re__Automata"); + return; + } + (globalThis)); + +//# 2236 "../.js/default/re/re.cma.js" +//# shape: Re__Color_map:[[F(2),F(1)*],[F(2),F(2)*,F(2)],F(1),F(1),F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_bytes_set = runtime.caml_bytes_set, + caml_create_bytes = runtime.caml_create_bytes, + caml_string_get = runtime.caml_string_get, + global_data = runtime.caml_get_global_data(), + Re_Cset = global_data.Re__Cset, + Stdlib_Char = global_data.Stdlib__Char, + Stdlib_Bytes = global_data.Stdlib__Bytes; + function repr(t, color){ + return caml_string_get(t, Re_Cset[2].call(null, color)); + } + var length = runtime.caml_ml_string_length; + function get_char(t, c){ + return caml_string_get(t, Re_Cset[2].call(null, c)); + } + function get(t, c){ + return Re_Cset[5].call(null, runtime.caml_string_unsafe_get(t, c)); + } + function translate_colors(cm, cset){ + return Re_Cset[41].call + (null, + cset, + Re_Cset[14], + function(i, j, l){ + var + start = get_char(cm, i), + stop = get_char(cm, j), + a = Re_Cset[25].call(null, start, stop); + return Re_Cset[9].call(null, a, l); + }); + } + function make(param){return Stdlib_Bytes[1].call(null, 257, 0);} + function flatten(cm){ + var c = caml_create_bytes(256), color_repr = caml_create_bytes(256); + caml_bytes_set(c, 0, 0); + caml_bytes_set(color_repr, 0, 0); + var v = 0, i = 1; + for(;;){ + if(0 !== runtime.caml_bytes_get(cm, i)) + var v$0 = v + 1 | 0, v$1 = v$0; + else + var v$1 = v; + caml_bytes_set(c, i, Stdlib_Char[1].call(null, v$1)); + caml_bytes_set(color_repr, v$1, Stdlib_Char[1].call(null, i)); + var b = i + 1 | 0; + if(255 === i){ + var a = Stdlib_Bytes[8].call(null, color_repr, 0, v$1 + 1 | 0); + return [0, Stdlib_Bytes[44].call(null, c), a]; + } + v = v$1; + i = b; + } + } + function split(t, set){ + return Re_Cset[8].call + (null, + set, + function(i, j){ + caml_bytes_set(t, Re_Cset[2].call(null, i), 1); + return caml_bytes_set(t, Re_Cset[2].call(null, j) + 1 | 0, 1); + }); + } + runtime.caml_register_global + (3, + [0, + [0, repr, length], + [0, get_char, get, translate_colors], + make, + flatten, + split], + "Re__Color_map"); + return; + } + (globalThis)); + +//# 2318 "../.js/default/re/re.cma.js" +//# shape: Re__Ast:[N,F(2),F(1),F(2),F(1),F(2),N,F(1)*,F(1)*] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_wrap_exception = runtime.caml_wrap_exception; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call5(f, a0, a1, a2, a3, a4){ + return (f.l >= 0 ? f.l : f.l = f.length) === 5 + ? f(a0, a1, a2, a3, a4) + : runtime.caml_call_gen(f, [a0, a1, a2, a3, a4]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Cset = global_data.Re__Cset, + Re_Dyn = global_data.Re__Dyn, + Stdlib_ListLabels = global_data.Stdlib__ListLabels, + Re_Pmark = global_data.Re__Pmark, + Re_Automata = global_data.Re__Automata, + Re_Fmt = global_data.Re__Fmt, + Stdlib_Format = global_data.Stdlib__Format, + Re_Import = global_data.Re__Import, + Stdlib_Option = global_data.Stdlib__Option, + Stdlib = global_data.Stdlib, + Re_Color_map = global_data.Re__Color_map, + Stdlib_String = global_data.Stdlib__String, + Assert_failure = global_data.Assert_failure, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_Char = global_data.Stdlib__Char, + Re_Dense_map = global_data.Re__Dense_map, + cst_Alternative = "Alternative", + cst_Case = "Case", + cst_No_case = "No_case"; + function dyn_of_ast(f){ + return function(param){ + switch(param[0]){ + case 0: + var xs = param[1], b = Stdlib_ListLabels[20].call(null, f, xs); + return Re_Dyn[1].call(null, cst_Alternative, b); + case 1: + var a = param[1], c = [0, caml_call1(f, a), 0]; + return Re_Dyn[1].call(null, cst_No_case, c); + default: + var a$0 = param[1], d = [0, caml_call1(f, a$0), 0]; + return Re_Dyn[1].call(null, cst_Case, d); + }}; + } + function pp_ast(f, fmt, ast){ + function var$(s, re){return Re_Fmt[1].call(null, fmt, s, f, re);} + switch(ast[0]){ + case 0: + var alt = ast[1], a = Re_Fmt[10]; + return Re_Fmt[1].call + (null, + fmt, + cst_Alternative, + function(b, c){return a(0, f, b, c);}, + alt); + case 1: + var c = ast[1]; return var$(cst_No_case, c); + default: var c$0 = ast[1]; return var$(cst_Case, c$0); + } + } + var + cst_Complement = "Complement", + cst_Difference = "Difference", + cst_Intersection = "Intersection"; + function dyn_of_cset(param){ + switch(param[0]){ + case 0: + var cset = param[1], a = [0, Re_Cset[51].call(null, cset), 0]; + return Re_Dyn[1].call(null, "Cset", a); + case 1: + var + xs = param[1], + b = Stdlib_ListLabels[20].call(null, dyn_of_cset, xs); + return Re_Dyn[1].call(null, cst_Intersection, b); + case 2: + var + xs$0 = param[1], + d = Stdlib_ListLabels[20].call(null, dyn_of_cset, xs$0); + return Re_Dyn[1].call(null, cst_Complement, d); + case 3: + var + y = param[2], + x = param[1], + e = [0, dyn_of_cset(y), 0], + f = [0, dyn_of_cset(x), e]; + return Re_Dyn[1].call(null, cst_Difference, f); + default: + var c = param[1], g = [0, dyn_of_ast(dyn_of_cset)(c), 0]; + return Re_Dyn[1].call(null, "Cast", g); + } + } + var + cst_Beg_of_line = "Beg_of_line", + cst_Beg_of_str = "Beg_of_str", + cst_Beg_of_word = "Beg_of_word", + cst_End_of_line = "End_of_line", + cst_End_of_str = "End_of_str", + cst_End_of_word = "End_of_word", + cst_Group = "Group", + cst_Last_end_of_line = "Last_end_of_line", + cst_Nest = "Nest", + cst_No_group = "No_group", + cst_Not_bound = "Not_bound", + cst_Pmark = "Pmark", + cst_Repeat = "Repeat", + cst_Sem = "Sem", + cst_Sem_greedy = "Sem_greedy", + cst_Sequence = "Sequence", + cst_Set = "Set", + cst_Start = "Start", + cst_Stop = "Stop"; + function dyn_of_gen(f){ + return function(param){ + if(typeof param === "number") + switch(param){ + case 0: + return Re_Dyn[6].call(null, cst_Beg_of_line); + case 1: + return Re_Dyn[6].call(null, cst_End_of_line); + case 2: + return Re_Dyn[6].call(null, cst_Beg_of_word); + case 3: + return Re_Dyn[6].call(null, cst_End_of_word); + case 4: + return Re_Dyn[6].call(null, cst_Not_bound); + case 5: + return Re_Dyn[6].call(null, cst_Beg_of_str); + case 6: + return Re_Dyn[6].call(null, cst_End_of_str); + case 7: + return Re_Dyn[6].call(null, cst_Last_end_of_line); + case 8: + return Re_Dyn[6].call(null, cst_Start); + default: return Re_Dyn[6].call(null, cst_Stop); + } + switch(param[0]){ + case 0: + var a = param[1], b = [0, caml_call1(f, a), 0]; + return Re_Dyn[1].call(null, cst_Set, b); + case 1: + var ast = param[1], c = [0, dyn_of_ast(dyn_of_gen(f))(ast), 0]; + return Re_Dyn[1].call(null, "Ast", c); + case 2: + var + xs = param[1], + d = dyn_of_gen(f), + e = Stdlib_ListLabels[20].call(null, d, xs); + return Re_Dyn[1].call(null, cst_Sequence, e); + case 3: + var max = param[3], min = param[2], gen = param[1]; + if(max) + var x = max[1], base = [0, Re_Dyn[3].call(null, x), 0]; + else + var base = 0; + var + g = [0, Re_Dyn[3].call(null, min), base], + h = [0, dyn_of_gen(f)(gen), g]; + return Re_Dyn[1].call(null, cst_Repeat, h); + case 4: + var t = param[2], name = param[1], args = [0, dyn_of_gen(f)(t), 0]; + if(name) + var + name$0 = name[1], + args$0 = [0, Re_Dyn[7].call(null, name$0), args]; + else + var args$0 = args; + return Re_Dyn[1].call(null, cst_Group, args$0); + case 5: + var x$0 = param[1], i = [0, dyn_of_gen(f)(x$0), 0]; + return Re_Dyn[1].call(null, cst_No_group, i); + case 6: + var x$1 = param[1], j = [0, dyn_of_gen(f)(x$1), 0]; + return Re_Dyn[1].call(null, cst_Nest, j); + case 7: + var + t$0 = param[2], + pmark = param[1], + k = [0, dyn_of_gen(f)(t$0), 0], + l = [0, Re_Pmark[5].call(null, pmark), k]; + return Re_Dyn[1].call(null, cst_Pmark, l); + case 8: + var + t$1 = param[2], + sem = param[1], + m = [0, dyn_of_gen(f)(t$1), 0], + n = [0, caml_call1(Re_Automata[2][1], sem), m]; + return Re_Dyn[1].call(null, cst_Sem, n); + default: + var + t$2 = param[2], + rep = param[1], + o = [0, dyn_of_gen(f)(t$2), 0], + p = [0, caml_call1(Re_Automata[3][1], rep), o]; + return Re_Dyn[1].call(null, cst_Sem_greedy, p); + }}; + } + var + a = [0, [15, [17, [0, "@ ", 1, 0], [4, 0, 0, 0, [15, 0]]]], "%a@ %d%a"]; + function pp_gen(pp_cset, fmt, t){ + function pp(a, b){return pp_gen(pp_cset, a, b);} + function var$(s, re){return Re_Fmt[1].call(null, fmt, s, pp, re);} + if(typeof t === "number") + switch(t){ + case 0: + return Re_Fmt[2].call(null, fmt, cst_Beg_of_line); + case 1: + return Re_Fmt[2].call(null, fmt, cst_End_of_line); + case 2: + return Re_Fmt[2].call(null, fmt, cst_Beg_of_word); + case 3: + return Re_Fmt[2].call(null, fmt, cst_End_of_word); + case 4: + return Re_Fmt[2].call(null, fmt, cst_Not_bound); + case 5: + return Re_Fmt[2].call(null, fmt, cst_Beg_of_str); + case 6: + return Re_Fmt[2].call(null, fmt, cst_End_of_str); + case 7: + return Re_Fmt[2].call(null, fmt, cst_Last_end_of_line); + case 8: + return Re_Fmt[2].call(null, fmt, cst_Start); + default: return Re_Fmt[2].call(null, fmt, cst_Stop); + } + switch(t[0]){ + case 0: + var cset = t[1]; return caml_call2(pp_cset, fmt, cset); + case 1: + var a$0 = t[1]; return pp_ast(pp, fmt, a$0); + case 2: + var rel = t[1], b = Re_Fmt[10]; + return Re_Fmt[1].call + (null, + fmt, + cst_Sequence, + function(a, c){return b(0, pp, a, c);}, + rel); + case 3: + var + stop = t[3], + start = t[2], + re = t[1], + pp$0 = + function(fmt, param){ + var b = Re_Fmt[3]; + return caml_call5 + (Stdlib_Format[139].call(null, fmt)(a), + pp, + re, + start, + b, + stop); + }; + return Re_Fmt[1].call(null, fmt, cst_Repeat, pp$0, 0); + case 4: + var match = t[1]; + if(match){ + var c = t[2], n = match[1], d = Re_Fmt[2], e = Re_Fmt[8]; + return Re_Fmt[1].call + (null, + fmt, + "Named_group", + function(a, b){return e(d, pp, a, b);}, + [0, n, c]); + } + var c$0 = t[2]; + return var$(cst_Group, c$0); + case 5: + var c$1 = t[1]; return var$(cst_No_group, c$1); + case 6: + var c$2 = t[1]; return var$(cst_Nest, c$2); + case 7: + var r = t[2], m = t[1], f = Re_Pmark[4], g = Re_Fmt[8]; + return Re_Fmt[1].call + (null, + fmt, + cst_Pmark, + function(a, b){return g(f, pp, a, b);}, + [0, m, r]); + case 8: + var a$1 = t[2], sem = t[1], h = Re_Automata[2][2], i = Re_Fmt[8]; + return Re_Fmt[1].call + (null, + fmt, + cst_Sem, + function(a, b){return i(h, pp, a, b);}, + [0, sem, a$1]); + default: + var re$0 = t[2], k = t[1], j = Re_Automata[3][2], l = Re_Fmt[8]; + return Re_Fmt[1].call + (null, + fmt, + cst_Sem_greedy, + function(a, b){return l(j, pp, a, b);}, + [0, k, re$0]); + } + } + function pp_cset(fmt, cset){ + function seq(s, rel){ + var a = Re_Fmt[10]; + return Re_Fmt[1].call + (null, fmt, s, function(b, c){return a(0, pp_cset, b, c);}, rel); + } + switch(cset[0]){ + case 0: + var s = cset[1]; + return Re_Fmt[1].call(null, fmt, cst_Set, Re_Cset[39], s); + case 1: + var c = cset[1]; return seq(cst_Intersection, c); + case 2: + var c$0 = cset[1]; return seq(cst_Complement, c$0); + case 3: + var b = cset[2], a = cset[1], d = Re_Fmt[8]; + return Re_Fmt[1].call + (null, + fmt, + cst_Difference, + function(a, b){return d(pp_cset, pp_cset, a, b);}, + [0, a, b]); + default: var s$0 = cset[1]; return pp_ast(pp_cset, fmt, s$0); + } + } + function equal(cset, x1$4, x2$4){ + a: + { + b: + { + c: + { + var x1 = x1$4, x2 = x2$4; + d: + for(;;){ + if(typeof x1 === "number") break b; + switch(x1[0]){ + case 0: + if(typeof x2 === "number") break a; + if(0 !== x2[0]) break a; + var s2 = x2[1], s1 = x1[1]; + return caml_call2(cset, s1, s2); + case 1: + break c; + case 2: + break d; + case 3: + if(typeof x2 === "number") break a; + if(3 !== x2[0]) break a; + var + j2 = x2[3], + i2 = x2[2], + x2$0 = x2[1], + j1 = x1[3], + i1 = x1[2], + x1$0 = x1[1], + c = Re_Import[10][8].call(null, i1, i2); + if(c){ + var d = Stdlib_Option[12].call(null, Re_Import[10][8], j1, j2); + if(d){x1 = x1$0; x2 = x2$0; break;} + var e = d; + } + else + var e = c; + return e; + case 4: + if(typeof x2 === "number") break a; + if(4 === x2[0]) return 0; + break a; + case 6: + if(typeof x2 === "number") break a; + if(6 !== x2[0]) break a; + var x2$1 = x2[1], x1$1 = x1[1]; + x1 = x1$1; + x2 = x2$1; + break; + case 7: + if(typeof x2 === "number") break a; + if(7 !== x2[0]) break a; + var + r2 = x2[2], + m2 = x2[1], + r1 = x1[2], + m1 = x1[1], + f = Re_Pmark[1].call(null, m1, m2); + if(! f) return f; + x1 = r1; + x2 = r2; + break; + case 8: + if(typeof x2 === "number") break a; + if(8 !== x2[0]) break a; + var + x2$2 = x2[2], + sem = x2[1], + x1$2 = x1[2], + sem$0 = x1[1], + g = Re_Import[1][1].call(null, sem$0, sem); + if(! g) return g; + x1 = x1$2; + x2 = x2$2; + break; + case 9: + if(typeof x2 === "number") break a; + if(9 !== x2[0]) break a; + var + x2$3 = x2[2], + rep = x2[1], + x1$3 = x1[2], + rep$0 = x1[1], + h = Re_Import[1][1].call(null, rep$0, rep); + if(! h) return h; + x1 = x1$3; + x2 = x2$3; + break; + default: break a; + } + } + if(typeof x2 === "number") break a; + if(2 !== x2[0]) break a; + var l2 = x2[1], l1 = x1[1]; + return Stdlib_ListLabels[16].call + (null, function(a, b){return equal(cset, a, b);}, l1, l2); + } + if(typeof x2 === "number") break a; + if(1 !== x2[0]) break a; + var + y = x2[1], + x = x1[1], + eq = function(a, b){return equal(cset, a, b);}, + b = y[1], + a = x[1]; + return Stdlib_ListLabels[16].call(null, eq, a, b); + } + switch(x1){ + case 0: + if(typeof x2 !== "number" || x2) break a; break; + case 1: + if(typeof x2 !== "number" || 1 !== x2) break a; break; + case 2: + if(typeof x2 !== "number" || 2 !== x2) break a; break; + case 3: + if(typeof x2 !== "number" || 3 !== x2) break a; break; + case 4: + if(typeof x2 !== "number" || 4 !== x2) break a; break; + case 5: + if(typeof x2 !== "number" || 5 !== x2) break a; break; + case 6: + if(typeof x2 !== "number" || 6 !== x2) break a; break; + case 7: + if(typeof x2 !== "number" || 7 !== x2) break a; break; + case 8: + if(typeof x2 !== "number" || 8 !== x2) break a; break; + default: if(typeof x2 !== "number" || 9 > x2) break a; + } + return 1; + } + return 0; + } + var to_dyn = dyn_of_gen(dyn_of_cset); + function pp(a, b){return pp_gen(pp_cset, a, b);} + function cset(cset){return [0, [0, cset]];} + function handle_case_cset(ign_case$0, param$0){ + a: + { + b: + { + var ign_case = ign_case$0, param = param$0; + c: + for(;;) + switch(param[0]){ + case 0: + var s = param[1]; return ign_case ? Re_Cset[18].call(null, s) : s; + case 1: + break a; + case 2: + break b; + case 3: + var + r = param[2], + r$0 = param[1], + e = handle_case_cset(ign_case, r), + f = Re_Cset[13].call(null, Re_Cset[45], e), + g = handle_case_cset(ign_case, r$0); + return Re_Cset[12].call(null, g, f); + default: + var match = param[1]; + switch(match[0]){ + case 0: + break c; + case 1: + var a = match[1]; ign_case = 1; param = a; break; + default: var a$0 = match[1]; ign_case = 0; param = a$0; + } + } + var + l$1 = match[1], + h = + Stdlib_ListLabels[20].call + (null, function(a){return handle_case_cset(ign_case, a);}, l$1); + return Re_Cset[10].call(null, h); + } + var + l$0 = param[1], + c = + Stdlib_ListLabels[20].call + (null, function(a){return handle_case_cset(ign_case, a);}, l$0), + d = Re_Cset[10].call(null, c); + return Re_Cset[13].call(null, Re_Cset[45], d); + } + var + l = param[1], + b = + Stdlib_ListLabels[20].call + (null, function(a){return handle_case_cset(ign_case, a);}, l); + return Re_Cset[11].call(null, b); + } + function handle_case(ign_case$0, r$9){ + a: + { + var ign_case = ign_case$0, r = r$9; + b: + for(;;){ + if(typeof r === "number") return r; + switch(r[0]){ + case 0: + var s = r[1]; return [0, handle_case_cset(ign_case, s)]; + case 1: + var match = r[1]; + switch(match[0]){ + case 0: + break a; + case 1: + var r$0 = match[1]; ign_case = 1; r = r$0; break; + default: var r$1 = match[1]; ign_case = 0; r = r$1; + } + break; + case 2: + break b; + case 3: + var j = r[3], i = r[2], r$2 = r[1]; + return [3, handle_case(ign_case, r$2), i, j]; + case 4: + var r$3 = r[2], n = r[1]; return [4, n, handle_case(ign_case, r$3)]; + case 5: + var r$4 = r[1]; return [5, handle_case(ign_case, r$4)]; + case 6: + var r$5 = r[1]; return [6, handle_case(ign_case, r$5)]; + case 7: + var r$6 = r[2], i$0 = r[1]; + return [7, i$0, handle_case(ign_case, r$6)]; + case 8: + var r$7 = r[2], k = r[1]; return [8, k, handle_case(ign_case, r$7)]; + default: + var r$8 = r[2], k$0 = r[1]; + return [9, k$0, handle_case(ign_case, r$8)]; + } + } + var l$1 = r[1]; + return [2, + Stdlib_ListLabels[20].call + (null, function(a){return handle_case(ign_case, a);}, l$1)]; + } + var + l = match[1], + l$0 = + Stdlib_ListLabels[20].call + (null, function(a){return handle_case(ign_case, a);}, l); + return [1, [0, l$0]]; + } + function seq(l){if(l && ! l[2]){var r = l[1]; return r;} return [2, l];} + var + f = + Re_Dense_map[1].call + (null, + 256, + function(i){ + var a = Stdlib_Char[1].call(null, i); + return cset(Re_Cset[46].call(null, a)); + }); + function char(c){return caml_call1(f, c);} + var any = cset(Re_Cset[45]); + function str(s){ + var b = caml_ml_string_length(s) - 1 | 0, a = 0; + if(b < 0) + var l$0 = a; + else{ + var l = a, i = b; + for(;;){ + var + c = runtime.caml_string_get(s, i), + d = [0, caml_call1(f, c), l], + e = i - 1 | 0; + if(0 === i){var l$0 = d; break;} + l = d; + i = e; + } + } + return seq(l$0); + } + function as_set_elems(elems){ + try{ + var + e = + Stdlib_ListLabels[20].call + (null, + function(param){ + if(typeof param !== "number" && 0 === param[0]){var e = param[1]; return e;} + throw Stdlib[3]; + }, + elems); + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Stdlib[3]) return 0; + throw caml_maybe_attach_backtrace(exn, 0); + } + return [0, e]; + } + var empty = [1, [0, 0]]; + function alt(elems){ + if(! elems) return empty; + if(! elems[2]){var x = elems[1]; return x;} + var match = as_set_elems(elems); + if(! match) return [1, [0, elems]]; + var elems$0 = match[1]; + return [0, [4, [0, elems$0]]]; + } + var epsilon = seq(0); + function repn(r, i, j){ + var cst_Re_repn = "Re.repn"; + if(Re_Import[5].call(null, i, 0)) Stdlib[1].call(null, cst_Re_repn); + if(j){ + var j$0 = j[1]; + if(Re_Import[5].call(null, j$0, i)) + return Stdlib[1].call(null, cst_Re_repn); + if(0 === j$0){ + if(0 === i) return epsilon; + } + else if(1 === j$0 && 1 === i) return r; + } + return [3, r, i, j]; + } + function rep(r){return repn(r, 0, 0);} + function rep1(r){return repn(r, 1, 0);} + var b = [0, 1]; + function opt(r){return repn(r, 0, b);} + var bow = 2, eow = 3; + function word(r){return seq([0, bow, [0, r, [0, eow, 0]]]);} + var bos = 5, eos = 6; + function whole_string(r){return seq([0, bos, [0, r, [0, eos, 0]]]);} + function make_set(f, t){ + if(typeof t !== "number" && 0 === t[0]){ + var x = t[1]; + return [0, [4, caml_call1(f[1], x)]]; + } + return [1, caml_call1(f[1], t)]; + } + function longest(t){ + if(typeof t !== "number" && 0 === t[0]) return t; + return [8, -730718166, t]; + } + function shortest(t){ + if(typeof t !== "number" && 0 === t[0]) return t; + return [8, -1034406550, t]; + } + function first(t){ + if(typeof t !== "number" && 0 === t[0]) return t; + return [8, 332064784, t]; + } + function greedy(t){ + if(typeof t !== "number" && 0 === t[0]) return t; + return [9, -904640576, t]; + } + function non_greedy(t){ + if(typeof t !== "number" && 0 === t[0]) return t; + return [9, 620821490, t]; + } + function group(name, r){return [4, name, r];} + function no_group(t){ + if(typeof t !== "number" && 0 === t[0]) return t; + return [5, t]; + } + function nest(r){return [6, r];} + function set(str){return cset(Re_Cset[26].call(null, str));} + function mark(r){ + var i = Re_Pmark[3].call(null, 0); + return [0, i, [7, i, r]]; + } + function as_set_or_error(name, elems){ + var match = as_set_elems(elems); + if(! match) return Stdlib[1].call(null, name); + var s = match[1]; + return s; + } + function inter(elems){return [0, [1, as_set_or_error("Re.inter", elems)]];} + function compl(elems){return [0, [2, as_set_or_error("Re.compl", elems)]];} + function diff(r$0, r){ + if + (typeof r$0 !== "number" + && 0 === r$0[0] && typeof r !== "number" && 0 === r[0]){ + var r$1 = r[1], r$2 = r$0[1]; + return [0, [3, r$2, r$1]]; + } + return Stdlib[1].call(null, "Re.diff"); + } + var f$0 = [0, function(r){return [2, r];}]; + function case$(t){return make_set(f$0, t);} + var f$1 = [0, function(r){return [1, r];}]; + function no_case(t){return make_set(f$1, t);} + var c = [0, "lib/ast.ml", 363, 32]; + function witness(t){ + function witness(t$0){ + var t = t$0; + a: + for(;;){ + var cst = ""; + if(typeof t === "number") return cst; + switch(t[0]){ + case 0: + var + c$0 = t[1], + a = Re_Cset[49].call(null, c$0), + d = Re_Cset[4].call(null, a); + return Stdlib_String[1].call(null, 1, d); + case 1: + var match = t[1][1]; + if(! match) + throw caml_maybe_attach_backtrace([0, Assert_failure, c], 1); + var x = match[1]; + t = x; + break; + case 2: + var xs = t[1], e = Stdlib_ListLabels[20].call(null, witness, xs); + return Stdlib_String[7].call(null, cst, e); + case 3: + break a; + case 5: + var r$0 = t[1]; t = r$0; break; + case 6: + t = t[1]; break; + default: t = t[2]; + } + } + var + from = t[2], + r = t[1], + w = witness(r), + b = + Stdlib_Buffer[1].call + (null, runtime.caml_mul(caml_ml_string_length(w), from)); + if(from >= 1){ + var i = 1; + for(;;){ + Stdlib_Buffer[16].call(null, b, w); + var f = i + 1 | 0; + if(from === i) break; + i = f; + } + } + return Stdlib_Buffer[2].call(null, b); + } + return witness(handle_case(0, t)); + } + function merge_sequences(param$0){ + a: + { + var param = param$0; + b: + for(;;){ + if(! param) return 0; + var x = param[1]; + if(typeof x === "number") break a; + switch(x[0]){ + case 1: + var match = x[1]; + if(0 !== match[0]) break a; + var r$0 = param[2], l = match[1]; + param = Stdlib[37].call(null, l, r$0); + break; + case 2: + break b; + default: break a; + } + } + var match$0 = x[1]; + if(match$0){ + var + r$1 = param[2], + y = match$0[2], + x$0 = match$0[1], + r$2 = merge_sequences(r$1); + if(r$2){ + var a = r$2[1]; + if(typeof a !== "number" && 2 === a[0]){ + var match$1 = a[1]; + if(match$1){ + var r$3 = r$2[2], y$0 = match$1[2], x$1 = match$1[1]; + if(equal(Re_Cset[7], x$0, x$1)){ + var b = [0, seq(y$0), 0]; + return [0, [2, [0, x$0, [0, [1, [0, [0, seq(y), b]]], 0]]], r$3]; + } + } + } + } + return [0, [2, [0, x$0, y]], r$2]; + } + } + var r = param[2]; + return [0, x, merge_sequences(r)]; + } + function colorize(color_map, regexp){ + var lnl = [0, 0]; + function colorize(regexp$2){ + var regexp = regexp$2; + for(;;){ + if(typeof regexp === "number") + switch(regexp){ + case 7: + lnl[1] = 1; return 0; + case 0: + case 1: + return Re_Color_map[5].call(null, color_map, Re_Cset[24]); + case 2: + case 3: + case 4: + return Re_Color_map[5].call(null, color_map, Re_Cset[21]); + default: return 0; + } + switch(regexp[0]){ + case 0: + var s = regexp[1]; return Re_Color_map[5].call(null, color_map, s); + case 1: + var l = regexp[1][1]; + return Stdlib_ListLabels[18].call(null, colorize, l); + case 2: + var l$0 = regexp[1]; + return Stdlib_ListLabels[18].call(null, colorize, l$0); + case 3: + var regexp$0 = regexp[1]; regexp = regexp$0; break; + case 4: + case 7: + regexp = regexp[2]; break; + case 5: + case 6: + regexp = regexp[1]; break; + default: var regexp$1 = regexp[2]; regexp = regexp$1; + } + } + } + colorize(regexp); + return lnl[1]; + } + function anchored(param$0){ + var param = param$0; + for(;;){ + if(typeof param === "number") + switch(param){case 5:case 8: return 1;} + else + switch(param[0]){ + case 1: + var a = param[1]; + if(0 === a[0]){ + var als = a[1]; + return Stdlib_ListLabels[33].call(null, anchored, als); + } + var r = a[1]; + param = r; + continue; + case 2: + var l = param[1]; + return Stdlib_ListLabels[34].call(null, anchored, l); + case 3: + var i = param[2], r$0 = param[1], b = Re_Import[6].call(null, i, 0); + if(! b) return b; + param = r$0; + continue; + case 0: break; + case 5: + case 6: + param = param[1]; continue; + default: param = param[2]; continue; + } + return 0; + } + } + function t_of_cset(x){return [0, x];} + runtime.caml_register_global + (81, + [0, + to_dyn, + pp, + merge_sequences, + handle_case, + anchored, + colorize, + [0, + empty, + epsilon, + str, + no_case, + case$, + diff, + compl, + repn, + inter, + char, + any, + set, + mark, + nest, + no_group, + whole_string, + 7, + longest, + greedy, + non_greedy, + 9, + 4, + group, + word, + first, + bos, + bow, + eow, + eos, + 0, + 8, + 1, + opt, + rep, + rep1, + alt, + shortest, + seq, + pp, + witness], + cset, + t_of_cset], + "Re__Ast"); + return; + } + (globalThis)); + +//# 3381 "../.js/default/re/re.cma.js" +//# shape: Re__Group:[F(5)*,F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(2),F(1),F(1),F(2),F(1)*,F(1)*,F(2),N,F(2),F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib_Format = global_data.Stdlib__Format, + Stdlib_Array = global_data.Stdlib__Array, + Re_Fmt = global_data.Re__Fmt, + Stdlib_String = global_data.Stdlib__String, + Re_Mark_infos = global_data.Re__Mark_infos, + Stdlib_Option = global_data.Stdlib__Option, + Stdlib = global_data.Stdlib; + function create(s, gcount, gpos, marks, pmarks){return [0, s, marks, pmarks, gpos, gcount]; + } + function is_present(t){return 0 <= t ? 1 : 0;} + function get_no_check(t){return t;} + var absent = -1; + function start_offset(t, i){ + var i$0 = Re_Mark_infos[6].call(null, t[2], i); + if(! Re_Mark_infos[5][1].call(null, i$0)) return absent; + var a = Re_Mark_infos[5][2].call(null, i$0); + return caml_check_bound(t[4], a)[a + 1]; + } + function stop_offset(t, i){ + var i$0 = Re_Mark_infos[7].call(null, t[2], i); + if(! Re_Mark_infos[5][1].call(null, i$0)) return absent; + var a = Re_Mark_infos[5][2].call(null, i$0); + return caml_check_bound(t[4], a)[a + 1]; + } + function offset_opt(t, i){ + var a = Re_Mark_infos[2].call(null, t[2], i); + return Stdlib_Option[7].call + (null, + function(param){ + var + stop = param[2], + start = param[1], + a = caml_check_bound(t[4], stop)[stop + 1]; + return [0, caml_check_bound(t[4], start)[start + 1], a]; + }, + a); + } + function or_not_found(param){ + if(! param) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var s = param[1]; + return s; + } + function offset(t, i){return or_not_found(offset_opt(t, i));} + function pmarks(t){return t[3];} + function get(t, i){ + var a = offset_opt(t, i); + return or_not_found + (Stdlib_Option[7].call + (null, + function(param){ + var p2 = param[2], p1 = param[1]; + return Stdlib_String[16].call(null, t[1], p1, p2 - p1 | 0); + }, + a)); + } + function start_opt(subs, i){ + var a = offset_opt(subs, i); + return Stdlib_Option[7].call(null, function(a){return a[1];}, a); + } + function start(subs, i){return or_not_found(start_opt(subs, i));} + function stop_opt(subs, i){ + var a = offset_opt(subs, i); + return Stdlib_Option[7].call(null, function(a){return a[2];}, a); + } + function stop(subs, i){return or_not_found(stop_opt(subs, i));} + function test(t, i){return Re_Mark_infos[3].call(null, t[2], i);} + function get_opt(t, i){return test(t, i) ? [0, get(t, i)] : 0;} + var dummy_offset = [0, -1, -1]; + function all_offset(t){ + var res = caml_make_vect(t[5], dummy_offset); + Re_Mark_infos[4].call + (null, + t[2], + function(i, start, stop){ + var + p1 = caml_check_bound(t[4], start)[start + 1], + p2 = caml_check_bound(t[4], stop)[stop + 1]; + caml_check_bound(res, i)[i + 1] = [0, p1, p2]; + return 0; + }); + return res; + } + var cst = ""; + function all(t){ + var res = caml_make_vect(t[5], cst); + Re_Mark_infos[4].call + (null, + t[2], + function(i, start, stop){ + var + p1 = caml_check_bound(t[4], start)[start + 1], + p2 = caml_check_bound(t[4], stop)[stop + 1], + a = Stdlib_String[16].call(null, t[1], p1, p2 - p1 | 0); + caml_check_bound(res, i)[i + 1] = a; + return 0; + }); + return res; + } + var + a = + [0, + [18, + [1, [0, 0, cst]], + [12, + 40, + [2, + 0, + [11, + " (", + [4, 0, 0, 0, [12, 32, [4, 0, 0, 0, [11, "))", [17, 0, 0]]]]]]]]], + "@[(%s (%d %d))@]"]; + function pp(fmt, t){ + var + offsets = all_offset(t), + strs = all(t), + b = + Stdlib_Array[1].call + (null, + strs.length - 1, + function(i){ + var a = caml_check_bound(offsets, i)[i + 1]; + return [0, caml_check_bound(strs, i)[i + 1], a]; + }), + matches = Stdlib_Array[10].call(null, b); + function pp_match(fmt, param){ + var match = param[2], stop = match[2], start = match[1], str = param[1]; + return caml_call3 + (Stdlib_Format[139].call(null, fmt)(a), str, start, stop); + } + var c = Re_Fmt[10]; + return Re_Fmt[1].call + (null, + fmt, + "Group", + function(a, b){return c(0, pp_match, a, b);}, + matches); + } + function nb_groups(t){return t[5];} + runtime.caml_register_global + (11, + [0, + create, + get, + get_opt, + offset, + offset_opt, + start, + start_opt, + stop, + stop_opt, + all, + all_offset, + test, + pmarks, + nb_groups, + pp, + [0, is_present, get_no_check], + start_offset, + stop_offset], + "Re__Group"); + return; + } + (globalThis)); + +//# 3563 "../.js/default/re/re.cma.js" +//# shape: Re__Slice:[N] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + global_data = runtime.caml_get_global_data(), + Re_Import = global_data.Re__Import, + Stdlib_ListLabels = global_data.Stdlib__ListLabels, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Assert_failure = global_data.Assert_failure, + cst_lib_slice_ml = "lib/slice.ml", + a = [0, cst_lib_slice_ml, 22, 20], + b = [0, cst_lib_slice_ml, 39, 18]; + function get_substring(slices, remains, stop){ + a: + { + if(Re_Import[3].call(null, stop, remains)) return ""; + var slices$0 = slices, remains$0 = remains; + for(;;){ + if(Re_Import[3].call(null, remains$0, 0)){var slices$2 = slices$0; break a;} + if(! slices$0) + throw caml_maybe_attach_backtrace([0, Assert_failure, a], 1); + var + slices$1 = slices$0[2], + slice = slices$0[1], + len = slice[3], + pos = slice[2], + remains$1 = remains$0 - len | 0; + if(0 > remains$1) break; + slices$0 = slices$1; + remains$0 = remains$1; + } + var + pos$0 = pos + remains$0 | 0, + len$0 = len - remains$0 | 0, + slices$2 = [0, [0, slice[1], pos$0, len$0], slices$1]; + } + var + buf = Stdlib_Buffer[1].call(null, stop - remains | 0), + remains$4 = stop - remains | 0, + slices$3 = slices$2, + remains$2 = remains$4; + for(;;){ + if(Re_Import[6].call(null, remains$2, 0)){ + if(! slices$3) + throw caml_maybe_attach_backtrace([0, Assert_failure, b], 1); + var + slices$4 = slices$3[2], + match = slices$3[1], + len$1 = match[3], + pos$1 = match[2], + s = match[1], + remains$3 = remains$2 - len$1 | 0; + if(Re_Import[6].call(null, remains$3, 0)){ + Stdlib_Buffer[18].call(null, buf, s, pos$1, len$1); + slices$3 = slices$4; + remains$2 = remains$3; + continue; + } + Stdlib_Buffer[18].call(null, buf, s, pos$1, remains$2); + } + return Stdlib_Buffer[2].call(null, buf); + } + } + function drop_rev(t$1, remains$1){ + if(Re_Import[3].call(null, remains$1, 0)) return t$1; + var + t$2 = Stdlib_ListLabels[10].call(null, t$1), + t = t$2, + remains = remains$1; + for(;;){ + if(Re_Import[3].call(null, remains, 0)) + var a = t; + else if(t){ + var t$0 = t[2], slice = t[1], len = slice[3], pos = slice[2]; + if(len <= remains){ + var remains$0 = remains - len | 0; + t = t$0; + remains = remains$0; + continue; + } + var + delta = len - remains | 0, + a = [0, [0, slice[1], pos + delta | 0, len - delta | 0], t$0]; + } + else + var a = 0; + return Stdlib_ListLabels[10].call(null, a); + } + } + runtime.caml_register_global + (7, [0, [0, get_substring, drop_rev]], "Re__Slice"); + return; + } + (globalThis)); + +//# 3663 "../.js/default/re/re.cma.js" +//# shape: Re__Compile:[N,F(6),F(6),F(4),F(1),F(1)*,F(1)*,F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_check_bound = runtime.caml_check_bound, + caml_make_vect = runtime.caml_make_vect, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_get = runtime.caml_string_get, + caml_string_unsafe_get = runtime.caml_string_unsafe_get, + caml_wrap_exception = runtime.caml_wrap_exception; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + dummy = 0, + global_data = runtime.caml_get_global_data(), + Re_Import = global_data.Re__Import, + Stdlib_Mutex = global_data.Stdlib__Mutex, + Re_Color_map = global_data.Re__Color_map, + Re_Cset = global_data.Re__Cset, + Stdlib_Char = global_data.Stdlib__Char, + Re_Automata = global_data.Re__Automata, + Re_Category = global_data.Re__Category, + Re_Ast = global_data.Re__Ast, + Stdlib_ListLabels = global_data.Stdlib__ListLabels, + Stdlib = global_data.Stdlib, + Re_Group = global_data.Re__Group, + Re_Slice = global_data.Re__Slice, + Re_Mark_infos = global_data.Re__Mark_infos, + Stdlib_Option = global_data.Stdlib__Option, + Re_Pmark = global_data.Re__Pmark, + Stdlib_Array = global_data.Stdlib__Array; + function break_idx(t){return (t + 5 | 0) * -1 | 0;} + function get_info(param){return param[1];} + function follow_transition(param, color){ + return param[(1 + Re_Cset[2].call(null, color) | 0) + 1]; + } + function set_transition(param, color, st){ + var a = 1 + Re_Cset[2].call(null, color) | 0; + caml_check_bound(param, a)[a + 1] = st; + } + var unknown = -2; + function is_unknown_transition(st, color){ + var + st$0 = follow_transition(st, color), + info = get_info(st$0), + x = info[1]; + return Re_Import[3].call(null, x, unknown); + } + var info = [0, unknown, 0, Re_Automata[21][2]]; + function pp_re(ch, re){return Re_Automata[5].call(null, ch, re[1]);} + function group_count(re){return re[10];} + function group_names(re){return re[9];} + function unsafe_set(t, idx, pos){t[1][idx + 1] = pos;} + function set(t, idx, pos$0){ + if(t[2] <= idx) + for(;;){ + t[2] = 2 * t[2] | 0; + if(t[2] > idx){ + var pos = t[1]; + t[1] = caml_make_vect(t[2], 0); + Stdlib_Array[9].call(null, pos, 0, t[1], 0, pos.length - 1); + break; + } + } + return unsafe_set(t, idx, pos$0); + } + function first(t){return caml_check_bound(t[1], 0)[1];} + var empty = [0, [0], 0]; + function make(groups, re){ + if(! groups) return empty; + var length = caml_call1(Re_Automata[22][2], re[7]) + 1 | 0; + return [0, caml_make_vect(length, 0), length]; + } + function category(re, color){ + if(Re_Cset[1].call(null, color, Re_Cset[6])) return Re_Category[4]; + if(Re_Cset[1].call(null, color, re[6])){ + var + a = Re_Category[6], + b = Re_Category[1].call(null, Re_Category[8], Re_Category[7]); + return Re_Category[1].call(null, b, a); + } + var c = Re_Color_map[1][1].call(null, re[4], color); + return Re_Category[2].call(null, c); + } + var unknown_state = [0, info]; + function find_state(re, desc){ + try{var b = caml_call2(Re_Automata[21][8][7], re[8], desc); return b;} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn !== Stdlib[8]) throw caml_maybe_attach_backtrace(exn, 0); + var match = caml_call1(Re_Automata[21][5], desc); + a: + { + if(typeof match === "number" && match){var break_state = 0; break a;} + var break_state = 1; + } + var + idx = caml_call1(Re_Automata[21][4], desc), + a = + break_state + ? -5 - caml_call1(Re_Automata[19][1], idx) | 0 + : caml_call1(Re_Automata[19][1], idx), + state = [0, a, 0, desc]; + if(break_state) + var st$0 = [0, state]; + else{ + var ncol = re[5], st = caml_make_vect(ncol + 1 | 0, unknown_state); + caml_check_bound(st, 0)[1] = state; + var st$0 = st; + } + caml_call3(Re_Automata[21][8][5], re[8], desc, st$0); + return st$0; + } + } + function delta(re, cat, color, st){ + return Re_Automata[23].call(null, re[7], cat, color, st[3]); + } + function validate(re, s, pos, st){ + var + a = caml_string_get(s, pos), + color = Re_Color_map[2][2].call(null, re[3], a); + Stdlib_Mutex[2].call(null, re[11]); + if(is_unknown_transition(st, color)){ + var + cat = category(re, color), + desc = delta(re, cat, color, get_info(st)), + st$0 = find_state(re, desc); + set_transition(st, color, st$0); + } + return Stdlib_Mutex[4].call(null, re[11]); + } + function next(colors, st, s, pos){ + return follow_transition + (st, + Re_Color_map[2][2].call + (null, colors, caml_string_unsafe_get(s, pos))); + } + function loop_no_mark(re, colors, s, pos$1, last, st0$1, st$0){ + var pos = pos$1, st0 = st0$1, st = st$0; + for(;;){ + if(! Re_Import[5].call(null, pos, last)) return st; + var st0$0 = next(colors, st, s, pos), idx = get_info(st0$0)[1]; + if(0 <= idx){ + var pos$0 = pos + 1 | 0; + pos = pos$0; + st0 = st0$0; + st = st0$0; + } + else{if(idx <= -3) return st0$0; validate(re, s, pos, st0); st = st0;} + } + } + function final(re, st, cat){ + try{var c = Stdlib_ListLabels[51].call(null, cat, st[2]); return c;} + catch(exn$1){ + var exn = caml_wrap_exception(exn$1); + if(exn !== Stdlib[8]) throw caml_maybe_attach_backtrace(exn, 0); + Stdlib_Mutex[2].call(null, re[11]); + try{var b = Stdlib_ListLabels[51].call(null, cat, st[2]), res$0 = b;} + catch(exn){ + var exn$0 = caml_wrap_exception(exn); + if(exn$0 !== Stdlib[8]) throw caml_maybe_attach_backtrace(exn$0, 0); + var + st$0 = delta(re, cat, Re_Cset[6], st), + a = caml_call1(Re_Automata[21][5], st$0), + res = [0, caml_call1(Re_Automata[21][4], st$0), a]; + st[2] = [0, [0, cat, res], st[2]]; + var res$0 = res; + } + Stdlib_Mutex[4].call(null, re[11]); + return res$0; + } + } + function find_initial_state(re, cat){ + try{var b = Stdlib_ListLabels[51].call(null, cat, re[2]); return b;} + catch(exn$1){ + var exn = caml_wrap_exception(exn$1); + if(exn !== Stdlib[8]) throw caml_maybe_attach_backtrace(exn, 0); + Stdlib_Mutex[2].call(null, re[11]); + try{var a = Stdlib_ListLabels[51].call(null, cat, re[2]), res = a;} + catch(exn){ + var exn$0 = caml_wrap_exception(exn); + if(exn$0 !== Stdlib[8]) throw caml_maybe_attach_backtrace(exn$0, 0); + var st = find_state(re, caml_call2(Re_Automata[21][3], cat, re[1])); + re[2] = [0, [0, cat, st], re[2]]; + var res = st; + } + Stdlib_Mutex[4].call(null, re[11]); + return res; + } + } + function get_color(re, s, pos){ + if(Re_Import[5].call(null, pos, 0)) return Re_Cset[6]; + var slen = caml_ml_string_length(s); + if(slen <= pos) return Re_Cset[6]; + if + (Re_Import[3].call(null, pos, slen - 1 | 0) + && + ! + Re_Cset[1].call(null, re[6], Re_Cset[6]) + && Stdlib_Char[6].call(null, caml_string_unsafe_get(s, pos), 10)) + return re[6]; + return Re_Color_map[2][2].call + (null, re[3], caml_string_unsafe_get(s, pos)); + } + function scan_str(re, positions, s, initial_state, last, pos$2, groups){ + if + (Re_Import[3].call(null, last, caml_ml_string_length(s)) + && + ! + Re_Cset[1].call(null, re[6], Re_Cset[6]) + && Re_Import[6].call(null, last, pos$2)){ + var a = caml_string_get(s, last - 1 | 0); + if(Stdlib_Char[6].call(null, a, 10)){ + var + last$0 = last - 1 | 0, + st$2 = scan_str(re, positions, s, initial_state, last$0, pos$2, groups), + x$0 = get_info(st$2)[1]; + if(x$0 <= -3) return st$2; + for(;;){ + var + st$0 = follow_transition(st$2, re[6]), + info = get_info(st$0), + t = info[1]; + if(0 <= t){ + if(groups){var t$0 = info[1]; set(positions, t$0, last$0);} + return st$0; + } + var x = info[1]; + if(x <= -3){ + if(groups) set(positions, break_idx(info[1]), last$0); + return st$0; + } + var color = re[6]; + Stdlib_Mutex[2].call(null, re[11]); + if(is_unknown_transition(st$2, color)){ + var + cat = category(re, color), + real_c = Re_Color_map[2][2].call(null, re[3], 10), + desc = delta(re, cat, real_c, get_info(st$2)), + st$1 = find_state(re, desc); + set_transition(st$2, color, st$1); + } + Stdlib_Mutex[4].call(null, re[11]); + } + } + } + if(! groups) + return loop_no_mark + (re, re[3], s, pos$2, last, initial_state, initial_state); + var colors = re[3], pos = pos$2, st0 = initial_state, st = initial_state; + for(;;){ + if(! Re_Import[5].call(null, pos, last)) return st; + var st0$0 = next(colors, st, s, pos), idx = get_info(st0$0)[1]; + if(0 <= idx) + if(Re_Import[5].call(null, idx, positions[2])){ + unsafe_set(positions, idx, pos); + var pos$0 = pos + 1 | 0; + pos = pos$0; + st0 = st0$0; + st = st0$0; + } + else{ + set(positions, idx, pos); + var pos$1 = pos + 1 | 0; + pos = pos$1; + st0 = st0$0; + st = st0$0; + } + else{ + if(idx <= -3){set(positions, break_idx(idx), pos); return st0$0;} + validate(re, s, pos, st0); + st = st0; + } + } + } + function final_boundary_check + (re, positions, last, slen, s, state_info, groups){ + var + a = + Re_Import[3].call(null, last, slen) + ? Re_Category[4] + : category(re, get_color(re, s, last)), + final_cat = Re_Category[1].call(null, Re_Category[9], a), + match = final(re, state_info, final_cat), + res = match[2], + idx = match[1]; + if(groups && typeof res !== "number") + set(positions, caml_call1(Re_Automata[19][1], idx), last); + return res; + } + function make_match_str(re, positions, len, groups, partial, s, pos){ + var + slen = caml_ml_string_length(s), + last = Re_Import[3].call(null, len, -1) ? slen : pos + len | 0, + a = + Re_Import[3].call(null, pos, 0) + ? Re_Category[4] + : category(re, get_color(re, s, pos - 1 | 0)), + initial_cat = Re_Category[1].call(null, Re_Category[9], a), + initial_state = find_initial_state(re, initial_cat), + st = scan_str(re, positions, s, initial_state, last, pos, groups), + state_info = get_info(st), + x = state_info[1]; + a: + if(x > -3){ + if(partial && ! groups) break a; + if(partial && groups){ + var status = caml_call2(Re_Automata[21][6], re[11], state_info[3]); + if(typeof status === "number" && status){ + var + status$0 = + final_boundary_check + (re, positions, last, slen, s, state_info, groups); + return typeof status$0 === "number" ? 1 : status$0; + } + return status; + } + return final_boundary_check + (re, positions, last, slen, s, state_info, groups); + } + return caml_call2(Re_Automata[21][6], re[11], state_info[3]); + } + function create(re){ + var + category = Re_Category[1].call(null, Re_Category[9], Re_Category[4]), + state = find_initial_state(re, category); + return [0, state, re]; + } + function feed(t, s, pos, len){ + var + last = pos + len | 0, + state = loop_no_mark(t[2], t[2][3], s, pos, last, t[1], t[1]), + info = get_info(state), + x = info[1]; + if(x <= -3){ + var match = caml_call2(Re_Automata[21][6], t[2][11], info[3]); + a: + {if(typeof match === "number" && ! match){var a = 1; break a;} var a = 0; + } + if(a) return 0; + } + return [0, [0, state, t[2]]]; + } + function finalize(t, s, pos, len){ + var + last = pos + len | 0, + state = scan_str(t[2], empty, s, t[1], last, pos, 0), + info = get_info(state), + final_cat = Re_Category[1].call(null, Re_Category[9], Re_Category[4]); + return typeof final(t[2], info, final_cat)[2] === "number" ? 0 : 1; + } + function no_match_starts_before(t){return t[5];} + function create$0(t){return [0, t, make(1, t[2]), 0, 0, 0];} + function test_mark(t, mark){ + return caml_call2(Re_Pmark[6][31], mark, t[1]); + } + function get(t, i){ + var a = Re_Mark_infos[2].call(null, t[3], i); + return Stdlib_Option[7].call + (null, + function(param){ + var + stop = param[2], + start = param[1], + a = t[5], + start$0 = caml_check_bound(t[4], start)[start + 1] - a | 0, + b = t[5], + stop$0 = caml_check_bound(t[4], stop)[stop + 1] - b | 0; + return caml_call3(Re_Slice[1][1], t[2], start$0, stop$0); + }, + a); + } + function loop(re, abs_pos, colors, positions, s, pos$2, last, st0$1, st$0){ + var pos = pos$2, st0 = st0$1, st = st$0; + for(;;){ + if(! Re_Import[5].call(null, pos, last)) return st; + var st0$0 = next(colors, st, s, pos), idx = get_info(st0$0)[1]; + if(0 <= idx) + if(Re_Import[5].call(null, idx, positions[2])){ + unsafe_set(positions, idx, abs_pos + pos | 0); + var pos$0 = pos + 1 | 0; + pos = pos$0; + st0 = st0$0; + st = st0$0; + } + else{ + set(positions, idx, abs_pos + pos | 0); + var pos$1 = pos + 1 | 0; + pos = pos$1; + st0 = st0$0; + st = st0$0; + } + else{ + if(idx <= -3){ + set(positions, break_idx(idx), abs_pos + pos | 0); + return st0$0; + } + validate(re, s, pos, st0); + st = st0; + } + } + } + function feed$0(tt, s, pos, len){ + var + abs_pos = tt[4], + slices = tt[3], + positions = tt[2], + t = tt[1], + last = pos + len | 0, + state = loop(t[2], abs_pos, t[2][3], positions, s, pos, last, t[1], t[1]), + info = get_info(state), + x = info[1]; + if(x <= -3){ + var match = caml_call2(Re_Automata[21][6], t[2][11], info[3]); + a: + {if(typeof match === "number" && ! match){var a = 1; break a;} var a = 0; + } + if(a) return 0; + } + var + t$0 = [0, state, t[2]], + slices$0 = [0, [0, s, pos, len], slices], + first_match_pos = first(positions), + slices$1 = + caml_call2(Re_Slice[1][2], slices$0, first_match_pos - tt[5] | 0), + abs_pos$0 = abs_pos + len | 0; + return [0, [0, t$0, tt[2], slices$1, abs_pos$0, first_match_pos]]; + } + function finalize$0(tt, s, pos, len){ + var + abs_pos = tt[4], + slices = tt[3], + positions = tt[2], + t = tt[1], + last = pos + len | 0, + state = loop(t[2], abs_pos, t[2][3], positions, s, pos, last, t[1], t[1]), + info = get_info(state), + s$0 = caml_call2(Re_Automata[21][6], t[2][11], info[3]); + if(typeof s$0 === "number" && s$0) + var + final_cat = Re_Category[1].call(null, Re_Category[9], Re_Category[4]), + match = final(t[2], info, final_cat), + res = match[2], + idx = match[1], + match$0 = + typeof res === "number" + ? res + : (set + (positions, + caml_call1(Re_Automata[19][1], idx), + abs_pos + last | 0), + res); + else + var match$0 = s$0; + if(typeof match$0 === "number") return 0; + var + pmarks = match$0[2], + marks = match$0[1], + first_match_position = first(positions), + slices$0 = [0, [0, s, pos, len], slices], + slices$1 = + caml_call2(Re_Slice[1][2], slices$0, first_match_position - tt[5] | 0), + slices$2 = Stdlib_ListLabels[10].call(null, slices$1), + positions$0 = positions[1]; + return [0, + [0, pmarks, slices$2, marks, positions$0, first_match_position]]; + } + function match_str_no_bounds(groups, partial, re, s, pos, len){ + var + positions = make(groups, re), + match = make_match_str(re, positions, len, groups, partial, s, pos); + if(typeof match !== "number"){ + var pmarks = match[2], marks = match[1]; + return [0, + Re_Group[1].call(null, s, re[10], positions[1], marks, pmarks)]; + } + if(! match) return 0; + var no_match_starts_before = groups ? first(positions) : 0; + return [1, no_match_starts_before]; + } + var cst_Re_exec_out_of_bounds = "Re.exec: out of bounds"; + function match_str_p(re, s, pos, len){ + var a = Re_Import[5].call(null, pos, 0); + if(a) + var b = a; + else + var + c = Re_Import[5].call(null, len, -1), + b = + c || Re_Import[6].call(null, pos + len | 0, caml_ml_string_length(s)); + if(b) Stdlib[1].call(null, cst_Re_exec_out_of_bounds); + return typeof make_match_str(re, empty, len, 0, 0, s, pos) === "number" + ? 0 + : 1; + } + function match_str(groups, partial, re, s, pos, len){ + var a = Re_Import[5].call(null, pos, 0); + if(a) + var b = a; + else + var + c = Re_Import[5].call(null, len, -1), + b = + c || Re_Import[6].call(null, pos + len | 0, caml_ml_string_length(s)); + if(b) Stdlib[1].call(null, cst_Re_exec_out_of_bounds); + return match_str_no_bounds(groups, partial, re, s, pos, len); + } + function enforce_kind(ids, kind$0, kind, cr){ + if(typeof kind$0 === "number" && 332064784 === kind$0){ + if(typeof kind === "number" && 332064784 === kind) return cr; + var a = Re_Automata[11].call(null, ids); + return Re_Automata[10].call(null, ids, kind, cr, a); + } + return cr; + } + function translate(ctx$2, ast$3){ + a: + { + b: + { + c: + { + d: + { + e: + { + var ctx = ctx$2, ast = ast$3; + f: + for(;;){ + var + colors = ctx[8], + cache = ctx[7], + names = ctx[6], + pos = ctx[5], + greedy = ctx[4], + ign_group = ctx[3], + kind = ctx[2], + ids = ctx[1]; + if(typeof ast === "number") break a; + switch(ast[0]){ + case 0: + break b; + case 1: + break c; + case 2: + var l$1 = ast[1]; return [0, trans_seq(ctx, l$1), kind]; + case 3: + break d; + case 4: + var ast$0 = ast[2], n$2 = ast[1]; + if(! ign_group) break e; + ast = ast$0; + break; + case 5: + var + ast$1 = ast[1], + ctx$0 = + [0, ctx[1], ctx[2], 1, ctx[4], ctx[5], ctx[6], ctx[7], ctx[8]]; + ctx = ctx$0; + ast = ast$1; + break; + case 6: + break f; + case 7: + var + r$2 = ast[2], + i$1 = ast[1], + match$4 = translate(ctx, r$2), + kind$4 = match$4[2], + cr$3 = match$4[1], + M = Re_Automata[14].call(null, ids, i$1); + return [0, + Re_Automata[10].call(null, ids, 332064784, M, cr$3), + kind$4]; + case 8: + var + r$3 = ast[2], + kind$5 = ast[1], + match$5 = + translate + ([0, + ctx[1], + kind$5, + ctx[3], + ctx[4], + ctx[5], + ctx[6], + ctx[7], + ctx[8]], + r$3), + kind$6 = match$5[2], + cr$4 = match$5[1]; + return [0, enforce_kind(ids, kind$5, kind$6, cr$4), kind$5]; + default: + var + ast$2 = ast[2], + greedy$0 = ast[1], + ctx$1 = + [0, + ctx[1], + ctx[2], + ctx[3], + greedy$0, + ctx[5], + ctx[6], + ctx[7], + ctx[8]]; + ctx = ctx$1; + ast = ast$2; + } + } + var + r$1 = ast[1], + b = pos[1], + match$3 = translate(ctx, r$1), + kind$3 = match$3[2], + cr$2 = match$3[1], + e = caml_call1(Re_Automata[1][3], pos[1]), + K = caml_call2(Re_Automata[1][1], e, b); + if(Re_Import[3].call(null, K, -1)) return [0, cr$2, kind$3]; + var L = Re_Automata[15].call(null, ids, b, e); + return [0, + Re_Automata[10].call(null, ids, 332064784, L, cr$2), + kind$3]; + } + var p = pos[1]; + if(n$2){ + var name = n$2[1], F = names[1]; + names[1] = [0, [0, name, caml_call1(Re_Automata[1][6], p)], F]; + } + pos[1] = caml_call1(Re_Automata[1][5], pos[1]); + var + match$2 = translate(ctx, ast$0), + kind$2 = match$2[2], + cr$1 = match$2[1], + G = caml_call1(Re_Automata[1][4], p), + H = Re_Automata[13].call(null, ids, G), + I = Re_Automata[10].call(null, ids, 332064784, cr$1, H), + J = Re_Automata[13].call(null, ids, p); + return [0, Re_Automata[10].call(null, ids, 332064784, J, I), kind$2]; + } + var + j = ast[3], + i$0 = ast[2], + r$0 = ast[1], + match$1 = translate(ctx, r$0), + kind$1 = match$1[2], + cr$0 = match$1[1]; + if(j){ + var + j$0 = j[1], + f = + 620821490 <= greedy + ? function + (rem){ + var + a = Re_Automata[18].call(null, ids, cr$0), + b = [0, Re_Automata[10].call(null, ids, kind$1, a, rem), 0], + c = [0, Re_Automata[11].call(null, ids), b]; + return Re_Automata[9].call(null, ids, c); + } + : function + (rem){ + var + a = [0, Re_Automata[11].call(null, ids), 0], + b = Re_Automata[18].call(null, ids, cr$0), + c = [0, Re_Automata[10].call(null, ids, kind$1, b, rem), a]; + return Re_Automata[9].call(null, ids, c); + }, + v$2 = Re_Automata[11].call(null, ids), + n$1 = j$0 - i$0 | 0, + n = n$1, + v = v$2; + for(;;){ + if(Re_Import[10][8].call(null, n, 0)){var rem = v, n$4 = i$0; break;} + var v$0 = f(v), n$0 = n - 1 | 0; + n = n$0; + v = v$0; + } + } + else + var + rem = Re_Automata[12].call(null, ids, greedy, kind$1, cr$0), + n$4 = i$0; + for(;;){ + if(Re_Import[10][8].call(null, n$4, 0)) return [0, rem, kind]; + var + E = Re_Automata[18].call(null, ids, cr$0), + v$3 = Re_Automata[10].call(null, ids, kind$1, E, rem), + n$3 = n$4 - 1 | 0; + rem = v$3; + n$4 = n$3; + } + } + var l$0 = ast[1][1], merged_sequences = Re_Ast[3].call(null, l$0); + if(merged_sequences && ! merged_sequences[2]){ + var + r = merged_sequences[1], + match$0 = translate(ctx, r), + kind$0 = match$0[2], + cr = match$0[1]; + return [0, enforce_kind(ids, kind, kind$0, cr), kind]; + } + var + D = + Stdlib_ListLabels[20].call + (null, + function(r){ + var match = translate(ctx, r), kind$0 = match[2], cr = match[1]; + return enforce_kind(ids, kind, kind$0, cr); + }, + merged_sequences); + return [0, Re_Automata[9].call(null, ids, D), kind]; + } + var s = ast[1], match = Re_Cset[40].call(null, s); + if(match) + var + i = match[1], + c = Re_Color_map[2][1].call(null, colors, i), + a = Re_Cset[46].call(null, c); + else{ + var v$1 = [0, Re_Cset[42].call(null, s), s]; + try{var d = caml_call2(Re_Cset[44][17], v$1, cache[1]), a = d;} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn !== Stdlib[8]) throw caml_maybe_attach_backtrace(exn, 0); + var l = Re_Color_map[2][3].call(null, colors, s); + cache[1] = caml_call3(Re_Cset[44][2], v$1, l, cache[1]); + var a = l; + } + } + return [0, Re_Automata[7].call(null, ids, a), kind]; + } + switch(ast){ + case 0: + var g = Re_Category[1].call(null, Re_Category[4], Re_Category[7]); + return [0, Re_Automata[17].call(null, ids, g), kind]; + case 1: + var h = Re_Category[1].call(null, Re_Category[4], Re_Category[7]); + return [0, Re_Automata[16].call(null, ids, h), kind]; + case 2: + var + k = Re_Automata[16].call(null, ids, Re_Category[5]), + m = Re_Category[1].call(null, Re_Category[4], Re_Category[6]), + o = Re_Automata[17].call(null, ids, m); + return [0, Re_Automata[10].call(null, ids, 332064784, o, k), kind]; + case 3: + var + q = Re_Category[1].call(null, Re_Category[4], Re_Category[6]), + t = Re_Automata[16].call(null, ids, q), + u = Re_Automata[17].call(null, ids, Re_Category[5]); + return [0, Re_Automata[10].call(null, ids, 332064784, u, t), kind]; + case 4: + var + cat = Re_Category[1].call(null, Re_Category[4], Re_Category[6]), + w = Re_Automata[16].call(null, ids, cat), + x = Re_Automata[17].call(null, ids, cat), + y = [0, Re_Automata[10].call(null, ids, 332064784, x, w), 0], + z = Re_Automata[16].call(null, ids, Re_Category[5]), + A = Re_Automata[17].call(null, ids, Re_Category[5]), + B = [0, Re_Automata[10].call(null, ids, 332064784, A, z), y]; + return [0, Re_Automata[9].call(null, ids, B), kind]; + case 5: + return [0, Re_Automata[17].call(null, ids, Re_Category[4]), kind]; + case 6: + return [0, Re_Automata[16].call(null, ids, Re_Category[4]), kind]; + case 7: + var C = Re_Category[1].call(null, Re_Category[4], Re_Category[8]); + return [0, Re_Automata[16].call(null, ids, C), kind]; + case 8: + return [0, Re_Automata[17].call(null, ids, Re_Category[9]), kind]; + default: + return [0, Re_Automata[16].call(null, ids, Re_Category[9]), kind]; + } + } + function trans_seq(ctx, param){ + var kind = ctx[2], ids = ctx[1]; + if(! param) return Re_Automata[11].call(null, ids); + var r = param[1]; + if(param[2]){ + var + rem = param[2], + match = translate(ctx, r), + kind$0 = match[2], + cr = match[1], + cr$0 = trans_seq(ctx, rem); + return Re_Automata[4].call(null, cr$0) + ? cr + : Re_Automata + [4].call + (null, cr) + ? cr$0 + : Re_Automata[10].call(null, ids, kind$0, cr, cr$0); + } + var match$0 = translate(ctx, r), kind$1 = match$0[2], cr$1 = match$0[1]; + return enforce_kind(ids, kind, kind$1, cr$1); + } + function compile(r$0){ + if(Re_Ast[5].call(null, r$0)) + var regexp$0 = caml_call2(Re_Ast[7][23], 0, r$0); + else + var + e = [0, caml_call2(Re_Ast[7][23], 0, r$0), 0], + f = caml_call1(Re_Ast[7][34], Re_Ast[7][11]), + g = [0, caml_call1(Re_Ast[7][37], f), e], + regexp$0 = caml_call1(Re_Ast[7][38], g); + var + regexp = Re_Ast[4].call(null, 0, regexp$0), + color_map = Re_Color_map[3].call(null, 0), + need_lnl = Re_Ast[6].call(null, color_map, regexp), + match = Re_Color_map[4].call(null, color_map), + color_repr = match[2], + colors = match[1], + ncolor = Re_Color_map[1][2].call(null, color_repr), + lnl = need_lnl ? Re_Cset[3].call(null, ncolor) : Re_Cset[6], + ncolor$0 = need_lnl ? ncolor + 1 | 0 : ncolor, + c = [0, Re_Cset[44][1]], + d = [0, Re_Automata[1][2]], + ctx = + [0, + caml_call1(Re_Automata[6][1], 0), + 332064784, + 0, + -904640576, + d, + [0, 0], + c, + colors], + match$0 = translate(ctx, regexp), + kind = match$0[2], + r = match$0[1], + initial = enforce_kind(ctx[1], 332064784, kind, r), + group_count = caml_call1(Re_Automata[1][6], ctx[5][1]), + group_names = Stdlib_ListLabels[10].call(null, ctx[6][1]), + a = Stdlib_Mutex[1].call(null, 0), + b = caml_call1(Re_Automata[21][8][1], 97); + return [0, + initial, + 0, + colors, + color_repr, + ncolor$0, + lnl, + caml_call1(Re_Automata[22][1], 0), + b, + group_names, + group_count, + a]; + } + runtime.caml_register_global + (18, + [0, + [0, + create, + feed, + finalize, + [0, + [0, get, test_mark], + create$0, + feed$0, + finalize$0, + no_match_starts_before]], + match_str_no_bounds, + match_str, + match_str_p, + compile, + group_count, + group_names, + pp_re], + "Re__Compile"); + return; + } + (globalThis)); + +//# 4555 "../.js/default/re/re.cma.js" +//# shape: Re__Search:[F(4)->F(1),F(4)->F(1),F(4)->F(1),F(4)->F(1),F(4)->F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + var + global_data = runtime.caml_get_global_data(), + Assert_failure = global_data.Assert_failure, + Re_Compile = global_data.Re__Compile, + Stdlib_String = global_data.Stdlib__String, + Re_Group = global_data.Re__Group, + Stdlib = global_data.Stdlib, + Stdlib_Seq = global_data.Stdlib__Seq; + function all(opt, len, re, s){ + var pos = opt ? opt[1] : 0, cst_Re_all = "Re.all"; + if(pos < 0) Stdlib[1].call(null, cst_Re_all); + if(len){ + var + l = len[1], + a = l < 0, + b = a || caml_ml_string_length(s) < (pos + l | 0); + if(b) Stdlib[1].call(null, cst_Re_all); + var limit = pos + l | 0; + } + else + var limit = caml_ml_string_length(s); + function aux(pos$2, on_match$0, param){ + var pos = pos$2, on_match = on_match$0; + for(;;){ + if(limit < pos) return 0; + var match = Re_Compile[3].call(null, 1, 0, re, s, pos, limit - pos | 0); + if(typeof match !== "number" && 0 === match[0]){ + var + substr = match[1], + a = Re_Group[17].call(null, substr, 0), + p1 = caml_call1(Re_Group[16][2], a), + b = Re_Group[18].call(null, substr, 0), + p2 = caml_call1(Re_Group[16][2], b); + if(! on_match) break; + if(p1 !== pos) break; + if(p1 !== p2) break; + var pos$0 = pos + 1 | 0; + pos = pos$0; + on_match = 0; + continue; + } + return 0; + } + var pos$1 = p1 === p2 ? p2 + 1 | 0 : p2, c = p1 !== p2 ? 1 : 0; + return [0, substr, function(a){return aux(pos$1, c, a);}]; + } + return function(a){return aux(pos, 0, a);}; + } + function matches(pos, len, re, s){ + var a = all(pos, len, re, s); + function b(sub){return Re_Group[2].call(null, sub, 0);} + var c = Stdlib_Seq[29]; + return function(d){return c(b, a, d);}; + } + var a = [0, "lib/search.ml", 56, 6]; + function split_full(opt, len, re, s){ + var pos = opt ? opt[1] : 0, cst_Re_split = "Re.split"; + if(pos < 0) Stdlib[1].call(null, cst_Re_split); + if(len){ + var + l = len[1], + b = l < 0, + c = b || caml_ml_string_length(s) < (pos + l | 0); + if(c) Stdlib[1].call(null, cst_Re_split); + var limit = pos + l | 0; + } + else + var limit = caml_ml_string_length(s); + function aux(state$0, i, pos$2, param){ + a: + { + b: + { + var old_i = i, pos$0 = pos$2; + for(;;){ + if(typeof state$0 !== "number") break; + if(limit < pos$0){ + if(old_i === limit) return 0; + throw caml_maybe_attach_backtrace([0, Assert_failure, a], 1); + } + var + match = + Re_Compile[3].call(null, 1, 0, re, s, pos$0, limit - pos$0 | 0); + if(typeof match === "number") break b; + if(0 !== match[0]) return 0; + var + substr = match[1], + b = Re_Group[17].call(null, substr, 0), + p1 = caml_call1(Re_Group[16][2], b), + c = Re_Group[18].call(null, substr, 0), + p2 = caml_call1(Re_Group[16][2], c), + pos$1 = p1 === p2 ? p2 + 1 | 0 : p2; + if(old_i !== p1) break a; + if(p1 !== p2) break a; + if(pos >= p1) break a; + old_i = p2; + pos$0 = pos$1; + } + var x = state$0[2]; + return [0, x, function(a){return aux(814535476, old_i, pos$0, a);}]; + } + if(old_i >= limit) return 0; + var text = Stdlib_String[16].call(null, s, old_i, limit - old_i | 0); + return [0, + [0, 936573133, text], + function(a){return aux(state$0, limit, pos$0, a);}]; + } + if(pos >= p1) + return [0, + [0, -363573681, substr], + function(a){return aux(state$0, p2, pos$1, a);}]; + var + text$0 = Stdlib_String[16].call(null, s, old_i, p1 - old_i | 0), + state = [0, 73271853, [0, -363573681, substr]]; + return [0, + [0, 936573133, text$0], + function(a){return aux(state, p2, pos$1, a);}]; + } + return function(a){return aux(814535476, pos, pos, a);}; + } + function split(pos, len, re, s){ + var seq = split_full(pos, len, re, s); + function filter(seq$1, param){ + var seq = seq$1; + for(;;){ + var match = caml_call1(seq, 0); + if(! match) return 0; + var match$0 = match[1], variant = match$0[1]; + if(936573133 <= variant) break; + var seq$0 = match[2]; + seq = seq$0; + } + var tl = match[2], s = match$0[2]; + return [0, s, function(a){return filter(tl, a);}]; + } + return function(a){return filter(seq, a);}; + } + function split_delim(pos, len, re, s){ + var seq = split_full(pos, len, re, s); + function filter(delim$0, seq$1, param){ + a: + { + var cst = ""; + b: + { + var delim = delim$0, seq = seq$1; + for(;;){ + var match = caml_call1(seq, 0); + if(! match) break; + var match$0 = match[1], variant = match$0[1]; + if(936573133 <= variant) break a; + var seq$0 = match[2]; + if(delim) break b; + delim = 1; + seq = seq$0; + } + return delim ? [0, cst, function(param){return 0;}] : 0; + } + return [0, cst, function(param){return filter(1, seq$0, 0);}]; + } + var tl = match[2], s = match$0[2]; + return [0, s, function(a){return filter(0, tl, a);}]; + } + return function(a){return filter(1, seq, a);}; + } + runtime.caml_register_global + (13, [0, all, matches, split_full, split, split_delim], "Re__Search"); + return; + } + (globalThis)); + +//# 4741 "../.js/default/re/re.cma.js" +//# shape: Re__Core:[N,F(1),F(1)*,F(1)*,F(4),F(4),F(4),F(4),F(4),N,F(4),F(4),F(4)->F(1),F(4),F(4),F(4)->F(1),F(4),F(4),F(4),F(4)->F(1),F(4),F(4),F(4)->F(1),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(2),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(2),F(2),N,F(2),F(2),F(1),F(1),F(2),F(2),F(1)*,N] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Search = global_data.Re__Search, + Stdlib_Seq = global_data.Stdlib__Seq, + Stdlib_ListLabels = global_data.Stdlib__ListLabels, + Re_Group = global_data.Re__Group, + Re_Pmark = global_data.Re__Pmark, + Re_Compile = global_data.Re__Compile, + Stdlib = global_data.Stdlib, + Re_Cset = global_data.Re__Cset, + Re_Ast = global_data.Re__Ast, + cset = Re_Ast[8]; + function rg(c$0, c){return cset(Re_Cset[25].call(null, c$0, c));} + var + notnl = cset(Re_Cset[22]), + lower = cset(Re_Cset[30]), + upper = cset(Re_Cset[31]), + alpha = cset(Re_Cset[32]), + digit = cset(Re_Cset[19]), + alnum = cset(Re_Cset[33]), + wordc = cset(Re_Cset[34]), + ascii = cset(Re_Cset[23]), + blank = cset(Re_Cset[27]), + cntrl = cset(Re_Cset[35]), + graph = cset(Re_Cset[36]), + print = cset(Re_Cset[37]), + punct = cset(Re_Cset[38]), + space = cset(Re_Cset[28]), + xdigit = cset(Re_Cset[29]), + include = Re_Ast[7], + empty = include[1], + epsilon = include[2], + str = include[3], + no_case = include[4], + case$ = include[5], + diff = include[6], + compl = include[7], + repn = include[8], + inter = include[9], + char = include[10], + any = include[11], + set = include[12], + mark = include[13], + nest = include[14], + no_group = include[15], + whole_string = include[16], + leol = include[17], + longest = include[18], + greedy = include[19], + non_greedy = include[20], + stop = include[21], + not_boundary = include[22], + group = include[23], + word = include[24], + first = include[25], + bos = include[26], + bow = include[27], + eow = include[28], + eos = include[29], + bol = include[30], + start = include[31], + eol = include[32], + opt = include[33], + rep = include[34], + rep1 = include[35], + alt = include[36], + shortest = include[37], + seq = include[38], + pp = include[39], + witness = include[40]; + function exec_internal(a, opt, partial, groups, re, s){ + var pos = a ? a[1] : 0, len = opt ? opt[1] : -1; + return Re_Compile[3].call(null, groups, partial, re, s, pos, len); + } + function exec(pos, len, re, s){ + var match = exec_internal(pos, len, 0, 1, re, s); + if(typeof match !== "number" && 0 === match[0]){var substr = match[1]; return substr;} + throw caml_maybe_attach_backtrace(Stdlib[8], 1); + } + function exec_opt(pos, len, re, s){ + var match = exec_internal(pos, len, 0, 1, re, s); + if(typeof match !== "number" && 0 === match[0]){var substr = match[1]; return [0, substr];} + return 0; + } + function execp(a, opt, re, s){ + var pos = a ? a[1] : 0, len = opt ? opt[1] : -1; + return Re_Compile[4].call(null, re, s, pos, len); + } + function exec_partial(pos, len, re, s){ + var match = exec_internal(pos, len, 1, 0, re, s); + return typeof match === "number" + ? -1062743954 + : 0 === match[0] ? 782112175 : 939392865; + } + function exec_partial_detailed(pos, len, re, s){ + var match = exec_internal(pos, len, 1, 1, re, s); + if(typeof match === "number") return -1062743954; + if(0 === match[0]){var group = match[1]; return [0, 782112175, group];} + var no_match_starts_before = match[1]; + return [0, 939392865, no_match_starts_before]; + } + function marked(g, p){ + var a = Re_Group[13].call(null, g); + return caml_call2(Re_Pmark[6][31], p, a); + } + function mark_set(g){return Re_Group[13].call(null, g);} + var equal = Re_Pmark[1], compare = Re_Pmark[2]; + function gen_of_seq(s){ + var r = [0, s]; + return function(param){ + var match = caml_call1(r[1], 0); + if(! match) return 0; + var tl = match[2], x = match[1]; + r[1] = tl; + return [0, x];}; + } + function split_gen(pos, len, re, s){ + return gen_of_seq(Re_Search[4].call(null, pos, len, re, s)); + } + function split_full_gen(pos, len, re, s){ + return gen_of_seq(Re_Search[3].call(null, pos, len, re, s)); + } + function all_gen(pos, len, re, s){ + return gen_of_seq(Re_Search[1].call(null, pos, len, re, s)); + } + function matches_gen(pos, len, re, s){ + return gen_of_seq(Re_Search[2].call(null, pos, len, re, s)); + } + var + split_full_seq = Re_Search[3], + split_seq = Re_Search[4], + matches_seq = Re_Search[2], + all_seq = Re_Search[1], + get = Re_Group[2], + get_ofs = Re_Group[4], + get_all = Re_Group[10], + get_all_ofs = Re_Group[11], + test = Re_Group[12]; + function list_of_seq(s){ + var a = Stdlib_Seq[5].call(null, function(l, x){return [0, x, l];}, 0, s); + return Stdlib_ListLabels[10].call(null, a); + } + function all(pos, len, re, s){ + return list_of_seq(Re_Search[1].call(null, pos, len, re, s)); + } + function matches(pos, len, re, s){ + return list_of_seq(Re_Search[2].call(null, pos, len, re, s)); + } + function split_full(pos, len, re, s){ + return list_of_seq(Re_Search[3].call(null, pos, len, re, s)); + } + function split(pos, len, re, s){ + return list_of_seq(Re_Search[4].call(null, pos, len, re, s)); + } + function split_delim(pos, len, re, s){ + return list_of_seq(Re_Search[5].call(null, pos, len, re, s)); + } + var + compile = Re_Compile[5], + print_re = Re_Compile[8], + group_names = Re_Compile[7], + group_count = Re_Compile[6], + b = Re_Compile[1], + c = b[4], + a = Re_Pmark[6], + Re_Core = + [0, + [0, + Re_Group[2], + Re_Group[3], + Re_Group[4], + Re_Group[5], + Re_Group[6], + Re_Group[7], + Re_Group[8], + Re_Group[9], + Re_Group[10], + Re_Group[11], + Re_Group[12], + Re_Group[14], + Re_Group[15]], + compile, + group_count, + group_names, + exec, + exec_opt, + execp, + exec_partial, + exec_partial_detailed, + [0, + marked, + [0, + a[1], + a[2], + a[3], + a[4], + a[5], + a[6], + a[7], + a[8], + a[9], + a[10], + a[11], + a[12], + a[13], + a[14], + a[15], + a[16], + a[17], + a[18], + a[19], + a[20], + a[21], + a[22], + a[23], + a[24], + a[25], + a[26], + a[27], + a[28], + a[29], + a[30], + a[31], + a[32], + a[33], + a[34], + a[35], + a[36], + a[43], + a[37], + a[38], + a[39], + a[40], + a[41], + a[42]], + mark_set, + equal, + compare], + all, + all_gen, + all_seq, + matches, + matches_gen, + matches_seq, + split, + split_delim, + split_gen, + split_seq, + split_full, + split_full_gen, + split_full_seq, + [0, + Re_Search[1], + Re_Search[2], + Re_Search[4], + Re_Search[5], + Re_Search[3]], + str, + char, + alt, + seq, + empty, + epsilon, + rep, + rep1, + repn, + opt, + bol, + eol, + bow, + eow, + bos, + eos, + leol, + start, + stop, + word, + not_boundary, + whole_string, + longest, + shortest, + first, + greedy, + non_greedy, + group, + no_group, + nest, + mark, + set, + rg, + inter, + diff, + compl, + any, + notnl, + alnum, + wordc, + alpha, + ascii, + blank, + cntrl, + digit, + graph, + lower, + print, + punct, + space, + upper, + xdigit, + case$, + no_case, + pp, + print_re, + print_re, + witness, + get, + get_ofs, + get_all, + get_all_ofs, + test, + marked, + mark_set, + [0, b[1], b[2], b[3], [0, c[1], c[2], c[3], c[4]]]]; + runtime.caml_register_global(9, Re_Core, "Re__Core"); + return; + } + (globalThis)); + +//# 5088 "../.js/default/re/re.cma.js" +//# shape: Re__Parse_buffer:[N,F(1)*,F(1),F(1),F(1)*,F(2),F(3),F(1),F(2),F(2),F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_get = runtime.caml_string_get, + caml_wrap_exception = runtime.caml_wrap_exception, + Stdlib = runtime.caml_get_global_data().Stdlib, + Parse_error = + [248, "Re__Parse_buffer.Parse_error", runtime.caml_fresh_oo_id(0)]; + function create(str){return [0, str, 0];} + function unget(t){t[2] = t[2] - 1 | 0; return 0;} + function junk(t){t[2] = t[2] + 1 | 0; return 0;} + function eos(t){return t[2] === caml_ml_string_length(t[1]) ? 1 : 0;} + function test(t, c){ + var a = 1 - eos(t), b = a ? caml_string_get(t[1], t[2]) === c ? 1 : 0 : a; + return b; + } + function test2(t, c$0, c){ + var a = (t[2] + 1 | 0) < caml_ml_string_length(t[1]) ? 1 : 0; + if(a) + var + b = caml_string_get(t[1], t[2]) === c$0 ? 1 : 0, + d = b ? caml_string_get(t[1], t[2] + 1 | 0) === c ? 1 : 0 : b; + else + var d = a; + return d; + } + function accept(t, c){ + var r = test(t, c); + if(r) t[2] = t[2] + 1 | 0; + return r; + } + function get(t){ + var r = caml_string_get(t[1], t[2]); + t[2] = t[2] + 1 | 0; + return r; + } + function accept_s(t, s){ + var len = caml_ml_string_length(s); + try{ + var a = len - 1 | 0; + if(a >= 0){ + var j = 0; + for(;;){ + try{ + var b = caml_string_get(t[1], t[2] + j | 0); + if(caml_string_get(s, j) !== b) throw Stdlib[3]; + } + catch(exn){throw Stdlib[3];} + var c = j + 1 | 0; + if(a === j) break; + j = c; + } + } + t[2] = t[2] + len | 0; + return 1; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Stdlib[3]) return 0; + throw caml_maybe_attach_backtrace(exn, 0); + } + } + function integer(t){ + if(eos(t)) return 0; + var d$0 = get(t); + if(9 < d$0 - 48 >>> 0){unget(t); return 0;} + var i$1 = d$0 - 48 | 0, i = i$1; + for(;;){ + if(eos(t)) return [0, i]; + var d = get(t); + if(9 < d - 48 >>> 0){unget(t); return [0, i];} + var i$0 = (10 * i | 0) + (d - 48 | 0) | 0; + if(i$0 < i) throw caml_maybe_attach_backtrace(Parse_error, 1); + i = i$0; + } + } + runtime.caml_register_global + (2, + [0, + Parse_error, + create, + junk, + unget, + eos, + test, + test2, + get, + accept, + accept_s, + integer], + "Re__Parse_buffer"); + return; + } + (globalThis)); + +//# 5941 "../.js/default/re/re.cma.js" +//# shape: Re__Replace:[F(6),F(6)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_get = runtime.caml_string_get; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + var + global_data = runtime.caml_get_global_data(), + Re_Compile = global_data.Re__Compile, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Re_Group = global_data.Re__Group, + Stdlib = global_data.Stdlib; + function replace(a, len, opt, re, f, s){ + var + pos = a ? a[1] : 0, + all = opt ? opt[1] : 1, + cst_Re_replace = "Re.replace"; + if(pos < 0) Stdlib[1].call(null, cst_Re_replace); + if(len){ + var + l = len[1], + b = l < 0, + c = b || caml_ml_string_length(s) < (pos + l | 0); + if(c) Stdlib[1].call(null, cst_Re_replace); + var limit = pos + l | 0; + } + else + var limit = caml_ml_string_length(s); + var + buf = Stdlib_Buffer[1].call(null, caml_ml_string_length(s)), + pos$0 = pos, + on_match = 0; + for(;;){ + if(pos$0 <= limit){ + var + match = Re_Compile[3].call(null, 1, 0, re, s, pos$0, limit - pos$0 | 0); + if(typeof match === "number") + Stdlib_Buffer[18].call(null, buf, s, pos$0, limit - pos$0 | 0); + else if(0 === match[0]){ + var + substr = match[1], + d = Re_Group[17].call(null, substr, 0), + p1 = caml_call1(Re_Group[16][2], d), + e = Re_Group[18].call(null, substr, 0), + p2 = caml_call1(Re_Group[16][2], e); + if(pos$0 === p1 && p1 === p2 && on_match){ + if(p2 < limit){ + var g = caml_string_get(s, p2); + Stdlib_Buffer[12].call(null, buf, g); + } + var pos$1 = p2 + 1 | 0; + pos$0 = pos$1; + on_match = 0; + continue; + } + Stdlib_Buffer[18].call(null, buf, s, pos$0, p1 - pos$0 | 0); + var replacing = caml_call1(f, substr); + Stdlib_Buffer[16].call(null, buf, replacing); + if(all){ + var on_match$0 = p1 !== p2; + if(p1 !== p2){pos$0 = p2; on_match = on_match$0; continue;} + if(p2 < limit){ + var h = caml_string_get(s, p2); + Stdlib_Buffer[12].call(null, buf, h); + } + pos$0 = p2 + 1 | 0; + on_match = on_match$0; + continue; + } + Stdlib_Buffer[18].call(null, buf, s, p2, limit - p2 | 0); + } + } + return Stdlib_Buffer[2].call(null, buf); + } + } + function replace_string(pos, len, all, re, by, s){ + return replace(pos, len, all, re, function(param){return by;}, s); + } + runtime.caml_register_global + (6, [0, replace, replace_string], "Re__Replace"); + return; + } + (globalThis)); + +//# 6453 "../.js/default/re/re.cma.js" +//# shape: Re__Posix_class:[N,F(1),F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_list_of_js_array = runtime.caml_list_of_js_array, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_wrap_exception = runtime.caml_wrap_exception; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + var + global_data = runtime.caml_get_global_data(), + cst_alnum = "alnum", + cst_alpha = "alpha", + cst_ascii = "ascii", + cst_blank = "blank", + cst_cntrl = "cntrl", + cst_digit = "digit", + cst_graph = "graph", + cst_lower = "lower", + cst_print = "print", + cst_punct = "punct", + cst_space = "space", + cst_upper = "upper", + cst_word = "word", + cst_xdigit = "xdigit", + names = + caml_list_of_js_array + ([cst_alpha, + cst_alnum, + cst_ascii, + cst_blank, + cst_cntrl, + cst_digit, + cst_lower, + cst_print, + cst_space, + cst_upper, + cst_word, + cst_punct, + cst_graph, + cst_xdigit]), + Re_Parse_buffer = global_data.Re__Parse_buffer, + Stdlib_List = global_data.Stdlib__List, + Stdlib = global_data.Stdlib, + Re_Core = global_data.Re__Core; + function of_name(class$){ + var switch$ = runtime.caml_string_compare(class$, cst_lower); + if(0 <= switch$){ + if(0 >= switch$) return Re_Core[71]; + if(class$ === cst_print) return Re_Core[72]; + if(class$ === cst_punct) return Re_Core[73]; + if(class$ === cst_space) return Re_Core[74]; + if(class$ === cst_upper) return Re_Core[75]; + if(class$ === cst_word) return Re_Core[64]; + if(class$ === cst_xdigit) return Re_Core[76]; + } + else{ + if(class$ === cst_alnum) return Re_Core[63]; + if(class$ === cst_alpha) return Re_Core[65]; + if(class$ === cst_ascii) return Re_Core[66]; + if(class$ === cst_blank) return Re_Core[67]; + if(class$ === cst_cntrl) return Re_Core[68]; + if(class$ === cst_digit) return Re_Core[69]; + if(class$ === cst_graph) return Re_Core[70]; + } + var a = Stdlib[28].call(null, "Invalid pcre class: ", class$); + return Stdlib[1].call(null, a); + } + function parse(buf){ + var a = Re_Parse_buffer[9], b = Re_Parse_buffer[10]; + function accept_s(a){return b(buf, a);} + if(! a(buf, 58)) return 0; + var compl = a(buf, 94); + try{var cls = Stdlib_List[39].call(null, accept_s, names);} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Stdlib[8]) + throw caml_maybe_attach_backtrace(Re_Parse_buffer[1], 1); + throw caml_maybe_attach_backtrace(exn, 0); + } + if(1 - b(buf, ":]")) + throw caml_maybe_attach_backtrace(Re_Parse_buffer[1], 1); + var + posix_class = of_name(cls), + c = compl ? caml_call1(Re_Core[60], [0, posix_class, 0]) : posix_class; + return [0, c]; + } + runtime.caml_register_global + (21, [0, names, of_name, parse], "Re__Posix_class"); + return; + } + (globalThis)); + +//# 6553 "../.js/default/re/re.cma.js" +//# shape: Re__Perl:[N,N,F(2),F(2),F(1),F(2)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_mul = runtime.caml_mul, + caml_wrap_exception = runtime.caml_wrap_exception; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + function caml_call3(f, a0, a1, a2){ + return (f.l >= 0 ? f.l : f.l = f.length) === 3 + ? f(a0, a1, a2) + : runtime.caml_call_gen(f, [a0, a1, a2]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib_List = global_data.Stdlib__List, + Re_Core = global_data.Re__Core, + Re_Parse_buffer = global_data.Re__Parse_buffer, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Re_Posix_class = global_data.Re__Posix_class, + Stdlib = global_data.Stdlib, + Parse_error = Re_Parse_buffer[1], + Not_supported = + [248, "Re__Perl.Not_supported", runtime.caml_fresh_oo_id(0)]; + function char_of_int(x){ + try{var x$0 = Stdlib[29].call(null, x); return x$0;} + catch(exn){throw caml_maybe_attach_backtrace(Parse_error, 1);} + } + var + a = [0, caml_call1(Re_Core[26], 95), 0], + word_char = [0, Re_Core[63], a], + word = [1, caml_call1(Re_Core[27], word_char)], + not_word = [1, caml_call1(Re_Core[27], word_char)], + space = [1, Re_Core[74]], + not_space = [1, caml_call1(Re_Core[60], [0, Re_Core[74], 0])], + digit = [1, Re_Core[69]], + not_digit = [1, caml_call1(Re_Core[60], [0, Re_Core[69], 0])], + char_b = [0, 8], + char_newline = [0, 10], + char_cr = [0, 13], + char_tab = [0, 9]; + function re(opt, s){ + var + opts = opt ? opt[1] : 0, + ungreedy = Stdlib_List[38].call(null, -243745063, opts), + dotall = Stdlib_List[38].call(null, -424303016, opts), + dollar_endonly = Stdlib_List[38].call(null, -712595228, opts), + multiline = Stdlib_List[38].call(null, 1071952589, opts), + buf = Re_Parse_buffer[2].call(null, s), + a = Re_Parse_buffer[9]; + function eos(param){return Re_Parse_buffer[5].call(null, buf);} + function test(c){return Re_Parse_buffer[6].call(null, buf, c);} + function get(param){return Re_Parse_buffer[8].call(null, buf);} + function greedy_mod(r){ + var gr$0 = a(buf, 63), gr = ungreedy ? 1 - gr$0 : gr$0; + return gr ? caml_call1(Re_Core[51], r) : caml_call1(Re_Core[50], r); + } + function regexp(param){ + var left = [0, branch(0), 0], left$0 = left; + for(;;){ + if(! a(buf, 124)){ + var b = Stdlib_List[10].call(null, left$0); + return caml_call1(Re_Core[27], b); + } + var left$1 = [0, branch(0), left$0]; + left$0 = left$1; + } + } + function branch(param){ + var left = 0; + for(;;){ + if(! eos(0) && ! test(124) && ! test(41)){ + var r = atom(0); + if(a(buf, 42)) + var b = greedy_mod(caml_call1(Re_Core[31], r)); + else if(a(buf, 43)) + var b = greedy_mod(caml_call1(Re_Core[32], r)); + else if(a(buf, 63)) + var b = greedy_mod(caml_call1(Re_Core[34], r)); + else if(a(buf, 123)){ + var match = Re_Parse_buffer[11].call(null, buf); + if(match){ + var + i = match[1], + j = a(buf, 44) ? Re_Parse_buffer[11].call(null, buf) : [0, i]; + if(1 - a(buf, 125)) + throw caml_maybe_attach_backtrace(Parse_error, 1); + if(j){ + var j$0 = j[1]; + if(j$0 < i) throw caml_maybe_attach_backtrace(Parse_error, 1); + } + var b = greedy_mod(caml_call3(Re_Core[33], r, i, j)); + } + else{Re_Parse_buffer[4].call(null, buf); var b = r;} + } + else + var b = r; + var left$0 = [0, b, left]; + left = left$0; + continue; + } + var c = Stdlib_List[10].call(null, left); + return caml_call1(Re_Core[28], c); + } + } + function atom(param){ + if(a(buf, 46)) return dotall ? Re_Core[61] : Re_Core[62]; + if(! a(buf, 40)){ + if(a(buf, 94)) return multiline ? Re_Core[35] : Re_Core[39]; + if(a(buf, 36)) + return multiline + ? Re_Core[36] + : dollar_endonly ? Re_Core[41] : Re_Core[40]; + if(a(buf, 91)){ + if(a(buf, 94)){var h = bracket(0); return caml_call1(Re_Core[60], h);} + var j = bracket(0); + return caml_call1(Re_Core[27], j); + } + if(! a(buf, 92)){ + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var c = get(0); + a: + { + if(64 <= c){ + if(92 !== c && 123 !== c) break a; + } + else + if(44 <= c){if(63 > c) break a;} else if(42 > c) break a; + throw caml_maybe_attach_backtrace(Parse_error, 1); + } + return caml_call1(Re_Core[26], c); + } + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var n1 = get(0), switcher = n1 - 48 | 0; + if(74 >= switcher >>> 0) + switch(switcher){ + case 17: + return Re_Core[39]; + case 18: + return Re_Core[45]; + case 20: + return caml_call1(Re_Core[60], [0, Re_Core[69], 0]); + case 21: + throw caml_maybe_attach_backtrace(Parse_error, 1); + case 23: + return Re_Core[42]; + case 33: + var buf$0 = Stdlib_Buffer[1].call(null, 12); + for(;;) + if(a(buf, 92)){ + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var c$0 = get(0); + if(69 === c$0){ + var q = Stdlib_Buffer[2].call(null, buf$0); + return caml_call1(Re_Core[25], q); + } + Stdlib_Buffer[12].call(null, buf$0, 92); + Stdlib_Buffer[12].call(null, buf$0, c$0); + } + else{ + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var s = get(0); + Stdlib_Buffer[12].call(null, buf$0, s); + } + break; + case 35: + return caml_call1(Re_Core[60], [0, Re_Core[74], 0]); + case 39: + var l = [0, caml_call1(Re_Core[26], 95), 0]; + return caml_call1(Re_Core[60], [0, Re_Core[63], l]); + case 42: + return Re_Core[41]; + case 50: + return caml_call1 + (Re_Core[27], [0, Re_Core[37], [0, Re_Core[38], 0]]); + case 52: + return Re_Core[69]; + case 53: + return caml_call1(Re_Core[26], 27); + case 54: + return caml_call1(Re_Core[26], 12); + case 62: + return caml_call1(Re_Core[26], 10); + case 63: + if(a(buf, 123)){ + var acc$1 = 0; + for(;;){ + if(a(buf, 125)){var match$0 = [0, acc$1]; break;} + var match = maybe_octaldigit(0); + if(! match) throw caml_maybe_attach_backtrace(Parse_error, 1); + var p = match[1], acc$2 = [0, p, acc$1]; + acc$1 = acc$2; + } + } + else + var match$0 = 0; + if(! match$0) throw caml_maybe_attach_backtrace(Parse_error, 1); + var digits$1 = match$0[1], digits = digits$1, acc = 0, i = 1; + for(;;){ + if(! digits){ + var m = char_of_int(acc); + return caml_call1(Re_Core[26], m); + } + var + digits$0 = digits[2], + d = digits[1], + acc$0 = acc + caml_mul(d, i) | 0, + i$0 = caml_mul(i, i); + digits = digits$0; + acc = acc$0; + i = i$0; + } + break; + case 66: + return caml_call1(Re_Core[26], 13); + case 67: + return Re_Core[74]; + case 68: + return caml_call1(Re_Core[26], 9); + case 71: + var n = [0, caml_call1(Re_Core[26], 95), 0]; + return caml_call1(Re_Core[27], [0, Re_Core[63], n]); + case 72: + if(a(buf, 123)){ + var acc$4 = 0; + for(;;){ + if(a(buf, 125)){var match$1 = [0, acc$4]; break;} + var acc$3 = [0, hexdigit(0), acc$4]; + acc$4 = acc$3; + } + } + else + var match$1 = 0; + a: + { + if(match$1){ + var e = match$1[1]; + if(e){ + var match$2 = e[2], c1 = e[1]; + if(! match$2){var c2$0 = c1, c1$0 = 0; break a;} + if(! match$2[2]){ + var c2 = match$2[1], c2$0 = c2, c1$0 = c1; + break a; + } + } + throw caml_maybe_attach_backtrace(Parse_error, 1); + } + var + c1$1 = hexdigit(0), + c2$1 = hexdigit(0), + c2$0 = c2$1, + c1$0 = c1$1; + } + var code = (c1$0 * 16 | 0) + c2$0 | 0, o = char_of_int(code); + return caml_call1(Re_Core[26], o); + case 74: + return Re_Core[40]; + case 8: + case 9: + throw caml_maybe_attach_backtrace(Not_supported, 1); + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + var n2 = maybe_octaldigit(0), n3 = maybe_octaldigit(0); + if(n2 && n3){ + var + n3$0 = n3[1], + n2$0 = n2[1], + n1$0 = n1 - 48 | 0, + k = char_of_int(((n1$0 * 64 | 0) + (n2$0 * 8 | 0) | 0) + n3$0 | 0); + return caml_call1(Re_Core[26], k); + } + throw caml_maybe_attach_backtrace(Not_supported, 1); + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 43: + case 44: + case 45: + case 46: + case 47: + case 48: break; + default: throw caml_maybe_attach_backtrace(Parse_error, 1); + } + return caml_call1(Re_Core[26], n1); + } + if(! a(buf, 63)){ + var r$1 = regexp(0); + if(1 - a(buf, 41)) throw caml_maybe_attach_backtrace(Parse_error, 1); + return caml_call2(Re_Core[52], 0, r$1); + } + if(a(buf, 58)){ + var r = regexp(0); + if(1 - a(buf, 41)) throw caml_maybe_attach_backtrace(Parse_error, 1); + return r; + } + if(! a(buf, 35)){ + if(! a(buf, 60)) throw caml_maybe_attach_backtrace(Parse_error, 1); + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var c$1 = get(0), f = c$1 - 91 | 0; + a: + { + if(5 < f >>> 0){ + if(57 < f + 26 >>> 0) break a; + } + else if(4 !== f) break a; + var b = Stdlib_Buffer[1].call(null, 32); + Stdlib_Buffer[12].call(null, b, c$1); + for(;;){ + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var c$2 = get(0); + b: + { + if(65 <= c$2){ + var g = c$2 - 91 | 0; + if(5 < g >>> 0){if(32 <= g) break b;} else if(4 !== g) break b; + } + else{ + if(58 <= c$2){ + if(62 !== c$2) break b; + var name = Stdlib_Buffer[2].call(null, b), r$0 = regexp(0); + if(1 - a(buf, 41)) + throw caml_maybe_attach_backtrace(Parse_error, 1); + return caml_call2(Re_Core[52], [0, name], r$0); + } + if(48 > c$2) break b; + } + Stdlib_Buffer[12].call(null, b, c$2); + continue; + } + throw caml_maybe_attach_backtrace(Parse_error, 1); + } + } + throw caml_maybe_attach_backtrace(Parse_error, 1); + } + for(;;){ + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + if(a(buf, 41)) return Re_Core[30]; + Re_Parse_buffer[3].call(null, buf); + } + } + function hexdigit(param){ + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var d = get(0); + if(65 <= d){ + if(97 <= d){ + if(103 > d) return (d - 97 | 0) + 10 | 0; + } + else if(71 > d) return (d - 65 | 0) + 10 | 0; + } + else if(9 >= d - 48 >>> 0) return d - 48 | 0; + throw caml_maybe_attach_backtrace(Parse_error, 1); + } + function maybe_octaldigit(param){ + if(eos(0)) return 0; + var d = get(0); + return 7 < d - 48 >>> 0 ? 0 : [0, d - 48 | 0]; + } + function bracket(s$2){ + var s = s$2; + for(;;){ + if(0 !== s && a(buf, 93)) return s; + var match = char(0); + if(0 === match[0]){ + var c = match[1]; + if(a(buf, 45)){ + if(a(buf, 93)){ + var b = [0, caml_call1(Re_Core[26], 45), s]; + return [0, caml_call1(Re_Core[26], c), b]; + } + var match$0 = char(0); + if(0 === match$0[0]){ + var c$0 = match$0[1]; + s = [0, Re_Core[57].call(null, c, c$0), s]; + } + else{ + var + st = match$0[1], + d = [0, caml_call1(Re_Core[26], 45), [0, st, s]]; + s = [0, caml_call1(Re_Core[26], c), d]; + } + } + else{var s$0 = [0, caml_call1(Re_Core[26], c), s]; s = s$0;} + } + else{var st$0 = match[1], s$1 = [0, st$0, s]; s = s$1;} + } + } + function char(param){ + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var c = get(0); + if(91 === c){ + if(a(buf, 61)) throw caml_maybe_attach_backtrace(Not_supported, 1); + var match = Re_Posix_class[3].call(null, buf); + if(match){var set = match[1]; return [1, set];} + if(! a(buf, 46)) return [0, c]; + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var c$0 = get(0); + if(1 - a(buf, 46)) throw caml_maybe_attach_backtrace(Not_supported, 1); + if(1 - a(buf, 93)) throw caml_maybe_attach_backtrace(Parse_error, 1); + return [0, c$0]; + } + if(92 !== c) return [0, c]; + if(eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var c$1 = get(0); + if(58 <= c$1){ + if(123 > c$1) + switch(c$1 - 58 | 0){ + case 10: + return not_digit; + case 25: + return not_space; + case 29: + return not_word; + case 40: + return char_b; + case 42: + return digit; + case 52: + return char_newline; + case 56: + return char_cr; + case 57: + return space; + case 58: + return char_tab; + case 61: + return word; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 33: + case 34: + case 35: + case 36: + case 37: + case 38: break; + default: throw caml_maybe_attach_backtrace(Parse_error, 1); + } + } + else if(48 <= c$1) throw caml_maybe_attach_backtrace(Not_supported, 1); + return [0, c$1]; + } + var res = regexp(0); + if(1 - eos(0)) throw caml_maybe_attach_backtrace(Parse_error, 1); + var + r = + Stdlib_List[38].call(null, 616470068, opts) + ? caml_call1(Re_Core[28], [0, Re_Core[42], [0, res, 0]]) + : res, + r$0 = + Stdlib_List[38].call(null, 604571177, opts) + ? caml_call1(Re_Core[78], r) + : r; + return r$0; + } + var compile = Re_Core[2]; + function compile_pat(opt, s){ + var opts = opt ? opt[1] : 0; + return compile(re([0, opts], s)); + } + var b = [1, 404463778], c = [1, 434889564]; + function re_result(opts, s){ + try{var s$0 = re(opts, s);} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Not_supported) return b; + if(exn === Parse_error) return c; + throw caml_maybe_attach_backtrace(exn, 0); + } + return [0, s$0]; + } + runtime.caml_register_global + (13, + [0, Parse_error, Not_supported, re, re_result, compile, compile_pat], + "Re__Perl"); + return; + } + (globalThis)); + +//# 7058 "../.js/default/re/re.cma.js" +//# shape: Re__Pcre:[N,N,F(2),F(2),F(2),F(2),F(3),F(2),F(1),F(3),F(3),F(2),F(2),F(3),F(3),F(2),F(1)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + caml_bytes_unsafe_set = runtime.caml_bytes_unsafe_set, + caml_create_bytes = runtime.caml_create_bytes, + caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, + caml_ml_string_length = runtime.caml_ml_string_length, + caml_string_get = runtime.caml_string_get, + caml_wrap_exception = runtime.caml_wrap_exception; + function caml_call1(f, a0){ + return (f.l >= 0 ? f.l : f.l = f.length) === 1 + ? f(a0) + : runtime.caml_call_gen(f, [a0]); + } + function caml_call2(f, a0, a1){ + return (f.l >= 0 ? f.l : f.l = f.length) === 2 + ? f(a0, a1) + : runtime.caml_call_gen(f, [a0, a1]); + } + var + global_data = runtime.caml_get_global_data(), + Stdlib = global_data.Stdlib, + Re_Core = global_data.Re__Core, + Stdlib_List = global_data.Stdlib__List, + Stdlib_Bytes = global_data.Stdlib__Bytes, + Re_Group = global_data.Re__Group, + Stdlib_String = global_data.Stdlib__String, + Stdlib_Buffer = global_data.Stdlib__Buffer, + Stdlib_Array = global_data.Stdlib__Array, + Re_Perl = global_data.Re__Perl, + Parse_error = Re_Perl[1], + Not_supported = Re_Perl[2]; + function re(opt, pat){ + var + flags = opt ? opt[1] : 0, + opts = + Stdlib_List[20].call + (null, + function(param){ + return 601676297 <= param + ? 613575188 <= param ? 616470068 : 604571177 + : 426394317 <= param ? 1071952589 : -424303016; + }, + flags); + return Re_Perl[3].call(null, [0, opts], pat); + } + var a = [1, 404463778], b = [1, 434889564]; + function re_result(flags, s){ + try{var s$0 = re(flags, s);} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Not_supported) return a; + if(exn === Parse_error) return b; + throw caml_maybe_attach_backtrace(exn, 0); + } + return [0, s$0]; + } + function regexp(flags, pat){ + var a = re(flags, pat); + return Re_Core[2].call(null, a); + } + function extract(rex, s){ + var a = Re_Core[5].call(null, 0, 0, rex, s); + return caml_call1(Re_Core[1][9], a); + } + function exec(rex, pos, s){return Re_Core[5].call(null, pos, 0, rex, s);} + function names(rex){ + var + a = Re_Core[4].call(null, rex), + b = Stdlib_List[20].call(null, function(a){return a[1];}, a); + return Stdlib_Array[11].call(null, b); + } + function get_named_substring_opt(rex, name, s){ + var param = Re_Core[4].call(null, rex); + for(;;){ + if(! param) return 0; + var match = param[1], rem = param[2], i = match[2], n = match[1]; + if(n === name){ + var s$0 = caml_call2(Re_Core[1][2], s, i); + if(s$0) return s$0; + param = rem; + } + else{var rem$0 = param[2]; param = rem$0;} + } + } + function get_substring_ofs(s, i){return caml_call2(Re_Core[1][3], s, i);} + function pmatch(rex, s){return Re_Core[7].call(null, 0, 0, rex, s);} + function substitute(rex, subst, str){ + var b = Stdlib_Buffer[1].call(null, 1024), pos = 0, on_match = 0; + for(;;){ + a: + if(Re_Core[7].call(null, [0, pos], 0, rex, str)){ + var + ss = Re_Core[5].call(null, [0, pos], 0, rex, str), + match = caml_call2(Re_Core[1][3], ss, 0), + fin = match[2], + start = match[1]; + if(on_match && start === pos && start === fin){ + if(pos >= caml_ml_string_length(str)) break a; + var a = caml_string_get(str, pos); + Stdlib_Buffer[12].call(null, b, a); + var pos$0 = pos + 1 | 0; + pos = pos$0; + on_match = 0; + continue; + } + var pat = caml_call2(Re_Core[1][1], ss, 0); + Stdlib_Buffer[18].call(null, b, str, pos, start - pos | 0); + var c = caml_call1(subst, pat); + Stdlib_Buffer[16].call(null, b, c); + if(start !== fin){pos = fin; on_match = 1; continue;} + if(fin < caml_ml_string_length(str)){ + var d = caml_string_get(str, fin); + Stdlib_Buffer[12].call(null, b, d); + var pos$1 = fin + 1 | 0; + pos = pos$1; + on_match = 0; + continue; + } + } + else + Stdlib_Buffer[18].call + (null, b, str, pos, caml_ml_string_length(str) - pos | 0); + return Stdlib_Buffer[2].call(null, b); + } + } + var c = [0, 0]; + function split(rex, s){ + function split(accu$1, start$1){ + var accu = accu$1, start = start$1; + for(;;){ + if(start === caml_ml_string_length(s)) return accu; + try{ + var + g = Re_Core[5].call(null, [0, start], 0, rex, s), + g$0 = + Re_Group[8].call(null, g, 0) === start + ? Re_Core[5].call(null, [0, start + 1 | 0], 0, rex, s) + : g; + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Stdlib[8]) + return [0, + Stdlib_String[16].call + (null, s, start, caml_ml_string_length(s) - start | 0), + accu]; + throw caml_maybe_attach_backtrace(exn, 0); + } + var + start$0 = Re_Group[8].call(null, g$0, 0), + a = Re_Group[6].call(null, g$0, 0) - start | 0, + accu$0 = [0, Stdlib_String[16].call(null, s, start, a), accu]; + accu = accu$0; + start = start$0; + } + } + try{var g = Re_Core[5].call(null, c, 0, rex, s);} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Stdlib[8]) return s === "" ? 0 : [0, s, 0]; + throw caml_maybe_attach_backtrace(exn, 0); + } + if(0 === Re_Group[6].call(null, g, 0)) + var a = split(0, Re_Group[8].call(null, g, 0)); + else + var + b = Re_Group[8].call(null, g, 0), + d = Re_Group[6].call(null, g, 0), + a = split([0, Stdlib_String[16].call(null, s, 0, d), 0], b); + return Stdlib_List[10].call(null, a); + } + function quote(s){ + var + len = caml_ml_string_length(s), + buf = caml_create_bytes(len << 1), + d = len - 1 | 0, + b = 0; + if(d < 0) + var pos$4 = b; + else{ + var pos = b, i = 0; + for(;;){ + var c = runtime.caml_string_unsafe_get(s, i); + a: + { + b: + { + if(91 <= c){ + var a = c - 93 | 0; + if(29 < a >>> 0){if(32 <= a) break b;} else if(1 !== a) break b; + } + else + if(47 <= c){ + if(63 !== c) break b; + } + else{ + if(36 > c) break b; + switch(c - 36 | 0){case 1:case 2:case 3:case 8:case 9: break b; + } + } + caml_bytes_unsafe_set(buf, pos, 92); + var pos$1 = pos + 1 | 0; + caml_bytes_unsafe_set(buf, pos$1, c); + var pos$2 = pos$1 + 1 | 0, pos$3 = pos$2; + break a; + } + caml_bytes_unsafe_set(buf, pos, c); + var pos$0 = pos + 1 | 0, pos$3 = pos$0; + } + var e = i + 1 | 0; + if(d === i){var pos$4 = pos$3; break;} + pos = pos$3; + i = e; + } + } + var r = caml_create_bytes(pos$4); + runtime.caml_blit_bytes(buf, 0, r, 0, pos$4); + return Stdlib_Bytes[44].call(null, r); + } + var d = [0, -1, -1]; + function full_split(opt, rex, s){ + var max = opt ? opt[1] : 0; + if(0 === caml_ml_string_length(s)) return 0; + if(1 === max) return [0, [0, s], 0]; + var + results = Re_Core[21].call(null, 0, 0, rex, s), + matches = + Stdlib_List[20].call + (null, + function(param){ + var variant = param[1]; + if(936573133 <= variant){var s = param[2]; return [0, [0, s], 0];} + var + d$0 = param[2], + matches = caml_call1(Re_Core[1][10], d$0), + delim = caml_call2(Re_Core[1][1], d$0, 0), + b = matches.length - 2 | 0, + a = 0; + if(b < 1) + var l$0 = a; + else{ + var l = a, i = 1; + for(;;){ + var + e = + runtime.caml_equal + (runtime.caml_check_bound(matches, i)[i + 1], d) + ? 0 + : [2, i, caml_call2(Re_Core[1][1], d$0, i)], + c = [0, e, l], + f = i + 1 | 0; + if(b === i){var l$0 = c; break;} + l = c; + i = f; + } + } + return [0, [1, delim], Stdlib_List[10].call(null, l$0)]; + }, + results); + return Stdlib_List[14].call(null, matches); + } + function get_substring(s, i){return caml_call2(Re_Core[1][1], s, i);} + function get_named_substring(rex, name, s){ + var match = get_named_substring_opt(rex, name, s); + if(! match) throw caml_maybe_attach_backtrace(Stdlib[8], 1); + var s$0 = match[1]; + return s$0; + } + runtime.caml_register_global + (14, + [0, + Parse_error, + Not_supported, + re, + re_result, + regexp, + extract, + exec, + get_substring, + names, + get_named_substring, + get_named_substring_opt, + get_substring_ofs, + pmatch, + substitute, + full_split, + split, + quote], + "Re__Pcre"); + return; + } + (globalThis)); + +//# 7587 "../.js/default/re/re.cma.js" +//# shape: Re:[N,F(1),F(1)*,F(1)*,F(4),F(4),F(4),F(4),F(4),N,F(4),F(4),F(4)->F(1),F(4),F(4),F(4)->F(1),F(4),F(4),F(4),F(4)->F(1),F(4),F(4),F(4)->F(1),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(2),N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,N,F(2),F(2),N,F(2),F(2),F(1),F(1),F(2),F(2),F(1)*,N,F(6),F(6)] +(function + (globalThis){ + "use strict"; + var + runtime = globalThis.jsoo_runtime, + global_data = runtime.caml_get_global_data(), + Re_Core = global_data.Re__Core, + Re_Replace = global_data.Re__Replace, + Group = Re_Core[1], + compile = Re_Core[2], + group_count = Re_Core[3], + group_names = Re_Core[4], + exec = Re_Core[5], + exec_opt = Re_Core[6], + execp = Re_Core[7], + exec_partial = Re_Core[8], + exec_partial_detailed = Re_Core[9], + Mark = Re_Core[10], + all = Re_Core[11], + all_gen = Re_Core[12], + all_seq = Re_Core[13], + matches = Re_Core[14], + matches_gen = Re_Core[15], + matches_seq = Re_Core[16], + split = Re_Core[17], + split_delim = Re_Core[18], + split_gen = Re_Core[19], + split_seq = Re_Core[20], + split_full = Re_Core[21], + split_full_gen = Re_Core[22], + split_full_seq = Re_Core[23], + Seq = Re_Core[24], + str = Re_Core[25], + char = Re_Core[26], + alt = Re_Core[27], + seq = Re_Core[28], + empty = Re_Core[29], + epsilon = Re_Core[30], + rep = Re_Core[31], + rep1 = Re_Core[32], + repn = Re_Core[33], + opt = Re_Core[34], + bol = Re_Core[35], + eol = Re_Core[36], + bow = Re_Core[37], + eow = Re_Core[38], + bos = Re_Core[39], + eos = Re_Core[40], + leol = Re_Core[41], + start = Re_Core[42], + stop = Re_Core[43], + word = Re_Core[44], + not_boundary = Re_Core[45], + whole_string = Re_Core[46], + longest = Re_Core[47], + shortest = Re_Core[48], + first = Re_Core[49], + greedy = Re_Core[50], + non_greedy = Re_Core[51], + group = Re_Core[52], + no_group = Re_Core[53], + nest = Re_Core[54], + mark = Re_Core[55], + set = Re_Core[56], + rg = Re_Core[57], + inter = Re_Core[58], + diff = Re_Core[59], + compl = Re_Core[60], + any = Re_Core[61], + notnl = Re_Core[62], + alnum = Re_Core[63], + wordc = Re_Core[64], + alpha = Re_Core[65], + ascii = Re_Core[66], + blank = Re_Core[67], + cntrl = Re_Core[68], + digit = Re_Core[69], + graph = Re_Core[70], + lower = Re_Core[71], + print = Re_Core[72], + punct = Re_Core[73], + space = Re_Core[74], + upper = Re_Core[75], + xdigit = Re_Core[76], + case$ = Re_Core[77], + no_case = Re_Core[78], + pp = Re_Core[79], + pp_re = Re_Core[80], + print_re = Re_Core[81], + witness = Re_Core[82], + get = Re_Core[83], + get_ofs = Re_Core[84], + get_all = Re_Core[85], + get_all_ofs = Re_Core[86], + test = Re_Core[87], + marked = Re_Core[88], + mark_set = Re_Core[89], + Stream = Re_Core[90], + replace = Re_Replace[1], + replace_string = Re_Replace[2]; + runtime.caml_register_global + (2, + [0, + Group, + compile, + group_count, + group_names, + exec, + exec_opt, + execp, + exec_partial, + exec_partial_detailed, + Mark, + all, + all_gen, + all_seq, + matches, + matches_gen, + matches_seq, + split, + split_delim, + split_gen, + split_seq, + split_full, + split_full_gen, + split_full_seq, + Seq, + str, + char, + alt, + seq, + empty, + epsilon, + rep, + rep1, + repn, + opt, + bol, + eol, + bow, + eow, + bos, + eos, + leol, + start, + stop, + word, + not_boundary, + whole_string, + longest, + shortest, + first, + greedy, + non_greedy, + group, + no_group, + nest, + mark, + set, + rg, + inter, + diff, + compl, + any, + notnl, + alnum, + wordc, + alpha, + ascii, + blank, + cntrl, + digit, + graph, + lower, + print, + punct, + space, + upper, + xdigit, + case$, + no_case, + pp, + pp_re, + print_re, + witness, + get, + get_ofs, + get_all, + get_all_ofs, + test, + marked, + mark_set, + Stream, + replace, + replace_string], + "Re"); + return; + } + (globalThis)); + //# 5 "../lib/.sx.objs/jsoo/default/sx.cma.js" //# shape: Sx_types:[N,N,N,F(1),F(1),N,N,N,N,N,N,N,F(1),F(1),N,N,N,N,F(3),F(2),F(2),F(3),F(2),F(3),F(3),F(2),F(1),F(1),F(1)*,F(1)*,F(1),F(3),F(6),F(5),F(5),F(2),F(1),F(1),F(1)*,F(1)*,F(1)*,F(1)*,F(1)*,F(1)*,F(1)*,F(1),F(1)*,F(1)*,F(1)*,F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(1),F(1)*,F(2),F(2),F(1),F(1),F(1),F(1),F(1)*,F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(3),F(2),F(2),F(3),F(2),F(1)*,F(1),F(1),F(1),F(1),F(1)*,F(1),F(1),F(1),F(1),F(2),F(2),F(3),F(2),F(1),F(1),F(1)] (function @@ -27064,6 +36956,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List = global_data.Stdlib__List, Stdlib_String = global_data.Stdlib__String, Stdlib_Array = global_data.Stdlib__Array, + Re_Pcre = global_data.Re__Pcre, + Re = global_data.Re, Stdlib_Buffer = global_data.Stdlib__Buffer, Stdlib_Uchar = global_data.Stdlib__Uchar, primitives = Stdlib_Hashtbl[1].call(null, 0, 128), @@ -28376,13 +38270,20 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(b){ var c = b[1]; if(typeof c !== "number" && 2 === c[0] && ! b[2]){ + var sep = c[1], s = a[1]; + if(1 === caml_ml_string_length(sep)){ + var + d = caml_string_get(sep, 0), + e = Stdlib_String[17].call(null, d, s); + return [5, + Stdlib_List[20].call(null, function(p){return [2, p];}, e)]; + } var - sep = c[1], - s = a[1], - d = caml_string_get(sep, 0), - e = Stdlib_String[17].call(null, d, s); + f = caml_call1(Re[25], sep), + re = Re[2].call(null, f), + g = Re[17].call(null, 0, 0, re, s); return [5, - Stdlib_List[20].call(null, function(p){return [2, p];}, e)]; + Stdlib_List[20].call(null, function(p){return [2, p];}, g)]; } } } @@ -28500,15 +38401,304 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "char-from-code: 1 arg"], 1); }); + register + ("char-at", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0]){ + var b = args[2]; + if(b){ + var c = b[1]; + if(typeof c !== "number" && 1 === c[0] && ! b[2]){ + var n = c[1], s = a[1], i = n | 0; + if(0 <= i && i < caml_ml_string_length(s)){ + var d = caml_string_get(s, i); + return [2, Stdlib_String[1].call(null, 1, d)]; + } + return 0; + } + } + } + } + throw caml_maybe_attach_backtrace + ([0, Sx_types[8], "char-at: string and index"], 1); + }); + register + ("char-code", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0] && ! args[2]){ + var s = a[1]; + if(0 < caml_ml_string_length(s)) return [1, caml_string_get(s, 0)]; + } + } + throw caml_maybe_attach_backtrace + ([0, Sx_types[8], "char-code: 1 non-empty string arg"], 1); + }); + register + ("parse-number", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0] && ! args[2]){ + var s = a[1]; + try{var b = [1, runtime.caml_float_of_string(s)]; return b;} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] === Stdlib[7]) return 0; + throw caml_maybe_attach_backtrace(exn, 0); + } + } + } + throw caml_maybe_attach_backtrace + ([0, Sx_types[8], "parse-number: 1 string arg"], 1); + }); + var B = [0, 0, 0]; + register + ("regex-match", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0]){ + var b = args[2]; + if(b){ + var c = b[1]; + if(typeof c !== "number" && 2 === c[0] && ! b[2]){ + var input = c[1], pattern = a[1]; + try{ + var + f = Re_Pcre[3].call(null, 0, pattern), + re = Re[2].call(null, f), + match = Re[6].call(null, 0, 0, re, input); + if(match){ + var + group = match[1], + full = caml_call2(Re[1][1], group, 0), + n = caml_call1(Re[1][12], group), + d = n - 1 | 0, + groups = [0, [0, [2, full], 0]]; + if(d >= 1){ + var i = 1; + for(;;){ + try{ + var h = [0, [2, caml_call2(Re[1][1], group, i)], 0]; + groups[1] = Stdlib[37].call(null, groups[1], h); + } + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn !== Stdlib[8]) + throw caml_maybe_attach_backtrace(exn, 0); + groups[1] = Stdlib[37].call(null, groups[1], B); + } + var g = i + 1 | 0; + if(d === i) break; + i = g; + } + } + var e = [5, groups[1]]; + } + else + var e = 0; + return e; + } + catch(exn){return 0;} + } + } + } + } + throw caml_maybe_attach_backtrace + ([0, Sx_types[8], "regex-match: pattern and input strings"], 1); + }); + var C = [0, 0]; + register + ("regex-match?", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0]){ + var b = args[2]; + if(b){ + var c = b[1]; + if(typeof c !== "number" && 2 === c[0] && ! b[2]){ + var input = c[1], pattern = a[1]; + try{ + var + d = Re_Pcre[3].call(null, 0, pattern), + e = Re[2].call(null, d), + f = [0, Re[7].call(null, 0, 0, e, input)]; + return f; + } + catch(exn){return C;} + } + } + } + } + throw caml_maybe_attach_backtrace + ([0, Sx_types[8], "regex-match?: pattern and input strings"], 1); + }); + register + ("regex-find-all", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0]){ + var b = args[2]; + if(b){ + var c = b[1]; + if(typeof c !== "number" && 2 === c[0] && ! b[2]){ + var input = c[1], pattern = a[1]; + try{ + var + d = Re_Pcre[3].call(null, 0, pattern), + re = Re[2].call(null, d), + matches = Re[11].call(null, 0, 0, re, input), + results = + Stdlib_List[20].call + (null, + function(group){ + try{var a = [2, caml_call2(Re[1][1], group, 1)]; return a;} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn === Stdlib[8]) + return [2, caml_call2(Re[1][1], group, 0)]; + throw caml_maybe_attach_backtrace(exn, 0); + } + }, + matches); + return [20, [0, results]]; + } + catch(exn){return [20, [0, 0]];} + } + } + } + } + throw caml_maybe_attach_backtrace + ([0, Sx_types[8], "regex-find-all: pattern and input strings"], + 1); + }); + register + ("regex-replace", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0]){ + var b = args[2]; + if(b){ + var c = b[1]; + if(typeof c !== "number" && 2 === c[0]){ + var d = b[2]; + if(d){ + var e = d[1]; + if(typeof e !== "number" && 2 === e[0] && ! d[2]){ + var input = e[1], replacement = c[1], pattern = a[1]; + try{ + var + f = Re_Pcre[3].call(null, 0, pattern), + re = Re[2].call(null, f), + g = [2, Re[92].call(null, 0, 0, 0, re, replacement, input)]; + return g; + } + catch(exn){return [2, input];} + } + } + } + } + } + } + throw caml_maybe_attach_backtrace + ([0, + Sx_types[8], + "regex-replace: pattern, replacement, input strings"], + 1); + }); + register + ("regex-replace-first", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0]){ + var b = args[2]; + if(b){ + var c = b[1]; + if(typeof c !== "number" && 2 === c[0]){ + var d = b[2]; + if(d){ + var e = d[1]; + if(typeof e !== "number" && 2 === e[0] && ! d[2]){ + var input = e[1], replacement = c[1], pattern = a[1]; + try{ + var + g = Re_Pcre[3].call(null, 0, pattern), + re = Re[2].call(null, g), + match = Re[6].call(null, 0, 0, re, input); + if(match) + var + group = match[1], + start = caml_call2(Re[1][5], group, 0), + stop = caml_call2(Re[1][7], group, 0), + h = + Stdlib_String[16].call + (null, input, stop, caml_ml_string_length(input) - stop | 0), + i = Stdlib[28].call(null, replacement, h), + j = Stdlib_String[16].call(null, input, 0, start), + f = [2, Stdlib[28].call(null, j, i)]; + else + var f = [2, input]; + return f; + } + catch(exn){return [2, input];} + } + } + } + } + } + } + throw caml_maybe_attach_backtrace + ([0, + Sx_types[8], + "regex-replace-first: pattern, replacement, input strings"], + 1); + }); + register + ("regex-split", + function(args){ + if(args){ + var a = args[1]; + if(typeof a !== "number" && 2 === a[0]){ + var b = args[2]; + if(b){ + var c = b[1]; + if(typeof c !== "number" && 2 === c[0] && ! b[2]){ + var input = c[1], pattern = a[1]; + try{ + var + d = Re_Pcre[3].call(null, 0, pattern), + re = Re[2].call(null, d), + e = Re[17].call(null, 0, 0, re, input), + f = + [20, + [0, Stdlib_List[20].call(null, function(s){return [2, s];}, e)]]; + return f; + } + catch(exn){return [20, [0, [0, [2, input], 0]]];} + } + } + } + } + throw caml_maybe_attach_backtrace + ([0, Sx_types[8], "regex-split: pattern and input strings"], 1); + }); register("list", function(args){return [20, [0, args]];}); var cst_args = " args", cst_len = "len", - B = [0, [11, "len: ", [4, 0, 0, 0, [11, cst_args, 0]]], "len: %d args"], - C = [1, 0.], - D = [1, 1.], - E = [1, 1.], - F = [1, 0.]; + D = [0, [11, "len: ", [4, 0, 0, 0, [11, cst_args, 0]]], "len: %d args"], + E = [1, 0.], + F = [1, 1.], + G = [1, 1.], + H = [1, 0.]; register (cst_len, function(args){ @@ -28520,11 +38710,11 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(typeof a !== "number"){ switch(a[0]){ case 0: - if(a[1]){if(args[2]) break a; return D;} + if(a[1]){if(args[2]) break a; return F;} if(args[2]) break a; break b; case 1: - if(args[2]) break a; return E; + if(args[2]) break a; return G; case 2: if(args[2]) break a; var s = a[1]; @@ -28557,18 +38747,18 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg case 10: case 11: case 14: - if(args[2]) break a; return F; + if(args[2]) break a; return H; default: break a; } return [1, Stdlib_List[1].call(null, l)]; } if(args[2]) break a; } - return C; + return E; } var b = Stdlib_List[1].call(null, args), - c = caml_call1(Stdlib_Printf[4].call(null, B), b); + c = caml_call1(Stdlib_Printf[4].call(null, D), b); throw caml_maybe_attach_backtrace([0, Sx_types[8], c], 1); }); register("length", Stdlib_Hashtbl[6].call(null, primitives, cst_len)); @@ -28608,7 +38798,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "first: 1 list arg"], 1); }); - var G = [5, 0], H = [5, 0]; + var I = [5, 0], J = [5, 0]; register ("rest", function(args){ @@ -28631,11 +38821,11 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg break; default: break a; } - return H; + return J; } return [5, xs]; } - if(! args[2]) return G; + if(! args[2]) return I; } throw caml_maybe_attach_backtrace ([0, Sx_types[8], "rest: 1 list arg"], 1); @@ -28663,7 +38853,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "last: 1 list arg"], 1); }); - var I = [5, 0]; + var K = [5, 0]; register ("init", function(args){ @@ -28679,7 +38869,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg default: break a; } var match = Stdlib_List[10].call(null, l); - if(! match) return I; + if(! match) return K; var rest = match[2]; return [5, Stdlib_List[10].call(null, rest)]; } @@ -29050,7 +39240,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "contains?: 2 args"], 1); }); - var J = [5, 0]; + var L = [5, 0]; register ("range", function(args){ @@ -29078,7 +39268,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var c = match$0[1]; if(typeof c !== "number" && 1 === c[0] && ! match$0[2]){ var step = c[1]; - if(step === 0.) return J; + if(step === 0.) return L; var d = 0; if(0. < step){ var i = stop, items = d; @@ -29820,15 +40010,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg }); var cst_s = "~%s", - K = [2, ""], - L = [0, [12, 126, [2, 0, 0]], cst_s], - M = [0, [12, 126, [2, 0, 0]], cst_s], - N = [0, [12, 58, [2, 0, [12, 32, [2, 0, 0]]]], ":%s %s"], - O = + M = [2, ""], + N = [0, [12, 126, [2, 0, 0]], cst_s], + O = [0, [12, 126, [2, 0, 0]], cst_s], + P = [0, [12, 58, [2, 0, [12, 32, [2, 0, 0]]]], ":%s %s"], + Q = [0, [11, "(make-spread {", [2, 0, [11, "})", 0]]], "(make-spread {%s})"], - P = [0, [11, "#<", [2, 0, [12, 62, 0]]], "#<%s>"], - Q = [0, [11, "#"], - R = [0, [11, "#(", [2, 0, [12, 41, 0]]], "#(%s)"]; + R = [0, [11, "#<", [2, 0, [12, 62, 0]]], "#<%s>"], + S = [0, [11, "#"], + T = [0, [11, "#(", [2, 0, [12, 41, 0]]], "#(%s)"]; register ("serialize", function(args){ @@ -29839,15 +40029,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var cst = " "; switch(a[0]){ case 7: - if(args[2]) break a; return K; + if(args[2]) break a; return M; case 8: if(args[2]) break a; var c = a[1], b = c[1]; - return [2, caml_call1(Stdlib_Printf[4].call(null, L), b)]; + return [2, caml_call1(Stdlib_Printf[4].call(null, N), b)]; case 9: if(args[2]) break a; var i = a[1], d = i[1]; - return [2, caml_call1(Stdlib_Printf[4].call(null, M), d)]; + return [2, caml_call1(Stdlib_Printf[4].call(null, O), d)]; case 16: if(args[2]) break a; var s = a[1]; return [2, s]; case 17: @@ -29862,21 +40052,21 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg v = param[2], k = param[1], a = Sx_types[94].call(null, v); - return caml_call2(Stdlib_Printf[4].call(null, N), k, a); + return caml_call2(Stdlib_Printf[4].call(null, P), k, a); }, pairs), e = Stdlib_String[7].call(null, cst, dict_parts); - return [2, caml_call1(Stdlib_Printf[4].call(null, O), e)]; + return [2, caml_call1(Stdlib_Printf[4].call(null, Q), e)]; case 18: if(args[2]) break a; var s$0 = a[1]; return [2, s$0]; case 26: if(args[2]) break a; var r = a[1], f = r[1][1]; - return [2, caml_call1(Stdlib_Printf[4].call(null, P), f)]; + return [2, caml_call1(Stdlib_Printf[4].call(null, R), f)]; case 27: if(args[2]) break a; var p = a[1], g = p[1]; - return [2, caml_call1(Stdlib_Printf[4].call(null, Q), g)]; + return [2, caml_call1(Stdlib_Printf[4].call(null, S), g)]; case 28: if(args[2]) break a; var @@ -29886,7 +40076,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(v){return Sx_types[94].call(null, v);}, arr), elts = Stdlib_Array[10].call(null, h), j = Stdlib_String[7].call(null, cst, elts); - return [2, caml_call1(Stdlib_Printf[4].call(null, R), j)]; + return [2, caml_call1(Stdlib_Printf[4].call(null, T), j)]; } } if(! args[2]) return [2, Sx_types[94].call(null, a)]; @@ -30016,19 +40206,19 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg register ("clear-stores", function(args){Stdlib_Hashtbl[2].call(null, store_registry); return 0;}); - var S = [0, 1], T = [0, 1], U = [5, 0], V = [5, 0]; + var U = [0, 1], V = [0, 1], W = [5, 0], X = [5, 0]; register ("resource", function(args){ var state = Stdlib_Hashtbl[1].call(null, 0, 8); - Stdlib_Hashtbl[11].call(null, state, "loading", S); + Stdlib_Hashtbl[11].call(null, state, "loading", U); Stdlib_Hashtbl[11].call(null, state, "data", 0); Stdlib_Hashtbl[11].call(null, state, cst_error, 0); var sig_d = Stdlib_Hashtbl[1].call(null, 0, 8); - Stdlib_Hashtbl[11].call(null, sig_d, cst_signal, T); + Stdlib_Hashtbl[11].call(null, sig_d, cst_signal, V); Stdlib_Hashtbl[11].call(null, sig_d, cst_value, [6, state]); - Stdlib_Hashtbl[11].call(null, sig_d, "subscribers", U); - Stdlib_Hashtbl[11].call(null, sig_d, "deps", V); + Stdlib_Hashtbl[11].call(null, sig_d, "subscribers", W); + Stdlib_Hashtbl[11].call(null, sig_d, "deps", X); return [6, sig_d]; }); register @@ -30095,15 +40285,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "make-spread: 1 dict"], 1); }); - var W = [0, 0], X = [0, 1]; + var Y = [0, 0], Z = [0, 1]; register ("spread?", function(args){ a: if(args){ var a = args[1]; - if(typeof a !== "number" && 17 === a[0]){if(args[2]) break a; return X;} - if(! args[2]) return W; + if(typeof a !== "number" && 17 === a[0]){if(args[2]) break a; return Z;} + if(! args[2]) return Y; } throw caml_maybe_attach_backtrace([0, Sx_types[8], "spread?: 1 arg"], 1); }); @@ -30135,7 +40325,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = caml_call2(sx_call_fn[1], f, args); return caml_call1(sx_trampoline_fn[1], a); } - var Y = [5, 0]; + var _ = [5, 0]; register ("map", function(args){ @@ -30144,7 +40334,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = args[2]; if(a){ var b = a[1], f = args[1]; - if(typeof b === "number"){if(! a[2]) return Y;} + if(typeof b === "number"){if(! a[2]) return _;} else{ switch(b[0]){ case 5: @@ -30163,7 +40353,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "map: expected (fn list)"], 1); }); - var Z = [5, 0]; + var $ = [5, 0]; register ("map-indexed", function(args){ @@ -30172,7 +40362,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = args[2]; if(a){ var b = a[1], f = args[1]; - if(typeof b === "number"){if(! a[2]) return Z;} + if(typeof b === "number"){if(! a[2]) return $;} else{ switch(b[0]){ case 5: @@ -30193,7 +40383,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "map-indexed: expected (fn list)"], 1); }); - var _ = [5, 0]; + var aa = [5, 0]; register ("filter", function(args){ @@ -30202,7 +40392,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = args[2]; if(a){ var b = a[1], f = args[1]; - if(typeof b === "number"){if(! a[2]) return _;} + if(typeof b === "number"){if(! a[2]) return aa;} else{ switch(b[0]){ case 5: @@ -30228,7 +40418,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg }); var cst$1 = ", ", - $ = + ab = [0, [11, "for-each: expected (fn list), got (", @@ -30265,7 +40455,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(v){return Sx_types[39].call(null, v);}, args), types = Stdlib_String[7].call(null, cst$1, c), d = Stdlib_List[1].call(null, args), - e = caml_call2(Stdlib_Printf[4].call(null, $), types, d); + e = caml_call2(Stdlib_Printf[4].call(null, ab), types, d); throw caml_maybe_attach_backtrace([0, Sx_types[8], e], 1); }); register @@ -30299,7 +40489,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "reduce: expected (fn init list)"], 1); }); - var aa = [0, 0], ab = [0, 0]; + var ac = [0, 0], ad = [0, 0]; register ("some", function(args){ @@ -30308,7 +40498,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = args[2]; if(a){ var b = a[1], f = args[1]; - if(typeof b === "number"){if(! a[2]) return aa;} + if(typeof b === "number"){if(! a[2]) return ac;} else{ switch(b[0]){ case 5: @@ -30320,7 +40510,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(! a[2]){ var param = items; for(;;){ - if(! param) return ab; + if(! param) return ad; var rest = param[2], x = param[1], result = call_any(f, [0, x, 0]); if(Sx_types[49].call(null, result)) return result; param = rest; @@ -30332,7 +40522,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "some: expected (fn list)"], 1); }); - var ac = [0, 1]; + var ae = [0, 1]; register ("every?", function(args){ @@ -30341,7 +40531,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = args[2]; if(a){ var b = a[1], f = args[1]; - if(typeof b === "number"){if(! a[2]) return ac;} + if(typeof b === "number"){if(! a[2]) return ae;} else{ switch(b[0]){ case 5: @@ -30474,7 +40664,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "vm-stack-copy!: expected (src dst count)"], 1); }); - var ad = [0, 0]; + var af = [0, 0]; register ("primitive?", function(args){ @@ -30485,29 +40675,29 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return [0, Stdlib_Hashtbl[9].call(null, primitives, name)]; } } - return ad; + return af; }); - var ae = [0, 0], af = [0, 1]; + var ag = [0, 0], ah = [0, 1]; register ("lambda?", function(args){ if(args){ var a = args[1]; - if(typeof a !== "number" && 7 === a[0] && ! args[2]) return af; + if(typeof a !== "number" && 7 === a[0] && ! args[2]) return ah; } - return ae; + return ag; }); - var ag = [0, 0], ah = [0, 1]; + var ai = [0, 0], aj = [0, 1]; register ("island?", function(args){ if(args){ var a = args[1]; - if(typeof a !== "number" && 9 === a[0] && ! args[2]) return ah; + if(typeof a !== "number" && 9 === a[0] && ! args[2]) return aj; } - return ag; + return ai; }); - var ai = [0, 0]; + var ak = [0, 0]; register ("record?", function(args){ @@ -30515,7 +40705,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var v = args[1]; return Sx_types[78].call(null, v); } - return ai; + return ak; }); register ("make-rtd", @@ -30577,7 +40767,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg ([0, Sx_types[8], "record-set!: expected (record index value)"], 1); }); - var aj = [0, 0]; + var al = [0, 0]; register ("record-type?", function(args){ @@ -30588,7 +40778,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return Sx_types[77].call(null, v, uid); } } - return aj; + return al; }); register ("make-record-constructor", @@ -30659,17 +40849,17 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "make-parameter: expected 1-2 args"], 1); }); - var ak = [0, 0], al = [0, 0], am = [0, 1]; + var am = [0, 0], an = [0, 0], ao = [0, 1]; register ("parameter?", function(args){ a: if(args){ var a = args[1]; - if(typeof a !== "number" && 27 === a[0]){if(args[2]) break a; return am;} - if(! args[2]) return al; + if(typeof a !== "number" && 27 === a[0]){if(args[2]) break a; return ao;} + if(! args[2]) return an; } - return ak; + return am; }); register ("parameter-uid", @@ -30729,15 +40919,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg register ("vector", function(args){return [28, Stdlib_Array[11].call(null, args)];}); - var an = [0, 0], ao = [0, 1]; + var ap = [0, 0], aq = [0, 1]; register ("vector?", function(args){ a: if(args){ var a = args[1]; - if(typeof a !== "number" && 28 === a[0]){if(args[2]) break a; return ao;} - if(! args[2]) return an; + if(typeof a !== "number" && 28 === a[0]){if(args[2]) break a; return aq;} + if(! args[2]) return ap; } throw caml_maybe_attach_backtrace([0, Sx_types[8], "vector?: 1 arg"], 1); }); @@ -30951,7 +41141,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[20].call (null, function(s){return [2, s];}, cap_stack[1])]; }); - var ap = [0, 1], aq = [0, 1]; + var ar = [0, 1], as = [0, 1]; register ("has-capability?", function(args){ @@ -30960,14 +41150,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(typeof a !== "number" && a[0] - 2 >>> 0 < 3 && ! args[2]){ var cap = a[1]; return 0 === cap_stack[1] - ? aq + ? as : [0, Stdlib_List[37].call(null, cap, cap_stack[1])]; } } - return ap; + return ar; }); var - ar = + at = [0, [11, "Capability '", @@ -30986,7 +41176,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(Stdlib_List[37].call(null, cap, cap_stack[1])) return 0; var b = Stdlib_String[7].call(null, cst$1, cap_stack[1]), - c = caml_call2(Stdlib_Printf[4].call(null, ar), cap, b); + c = caml_call2(Stdlib_Printf[4].call(null, at), cap, b); throw caml_maybe_attach_backtrace([0, Sx_types[8], c], 1); } } @@ -30995,7 +41185,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg register ("capability-restricted?", function(args){return [0, 0 !== cap_stack[1] ? 1 : 0];}); - var as = [0, 0], at = [0, 1], au = [0, 1]; + var au = [0, 0], av = [0, 1], aw = [0, 1]; register ("is-else-clause?", function(args){ @@ -31004,14 +41194,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(typeof a !== "number") switch(a[0]){ case 0: - if(a[1] && ! args[2]) return at; break; + if(a[1] && ! args[2]) return av; break; case 4: - if(a[1] === "else" && ! args[2]) return au; break; + if(a[1] === "else" && ! args[2]) return aw; break; } } - return as; + return au; }); - var av = [0, 0]; + var ax = [0, 0]; register ("cond-scheme?", function(args){ @@ -31032,9 +41222,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg clauses)]; } } - return av; + return ax; }); - var aw = [0, 0], ax = [0, 1], ay = [0, 1]; + var ay = [0, 0], az = [0, 1], aA = [0, 1]; register ("component?", function(args){ @@ -31043,12 +41233,12 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(typeof a !== "number") switch(a[0]){ case 8: - if(! args[2]) return ax; break; + if(! args[2]) return az; break; case 9: - if(! args[2]) return ay; break; + if(! args[2]) return aA; break; } } - return aw; + return ay; }); register ("lambda-closure", @@ -31074,7 +41264,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } return 0; }); - var az = [0, 0]; + var aB = [0, 0]; register ("component-has-children?", function(args){ @@ -31088,7 +41278,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(! args[2]){var i = a[1]; return [0, i[3]];} break; } } - return az; + return aB; }); register ("component-name", @@ -31105,7 +41295,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } return 0; }); - var aA = [5, 0]; + var aC = [5, 0]; register ("component-params", function(args){ @@ -31131,7 +41321,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg break; } } - return aA; + return aC; }); register ("component-body", @@ -31169,15 +41359,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } return 0; }); - var aB = [0, 0], aC = [0, 1]; + var aD = [0, 0], aE = [0, 1]; register ("macro?", function(args){ if(args){ var a = args[1]; - if(typeof a !== "number" && 10 === a[0] && ! args[2]) return aC; + if(typeof a !== "number" && 10 === a[0] && ! args[2]) return aE; } - return aB; + return aD; }); register ("for-each-indexed", @@ -31208,7 +41398,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "for-each-indexed: expected (fn list)"], 1); }); - var aD = [5, 0]; + var aF = [5, 0]; register ("lambda-params", function(args){ @@ -31220,7 +41410,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[20].call(null, function(s){return [2, s];}, l[1])]; } } - return aD; + return aF; }); register ("lambda-body", @@ -31231,7 +41421,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } return 0; }); - var aE = [0, 1]; + var aG = [0, 1]; register ("empty-dict?", function(args){ @@ -31242,7 +41432,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return [0, 0 === Stdlib_Hashtbl[15].call(null, d) ? 1 : 0]; } } - return aE; + return aG; }); register ("make-raw-html", @@ -31253,7 +41443,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } return 0; }); - var aF = [2, cst]; + var aH = [2, cst]; register ("raw-html-content", function(args){ @@ -31261,7 +41451,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = args[1]; if(typeof a !== "number" && 16 === a[0] && ! args[2]){var s = a[1]; return [2, s];} } - return aF; + return aH; }); var cst_VM_undefined = "VM undefined: "; register @@ -31342,7 +41532,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_depth = " depth=", cst$0 = "->", cst_scope_push = "scope-push!", - aG = + aI = [0, [11, "PUSH ", @@ -31371,7 +41561,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg d = Stdlib_List[1].call(null, stack) + 1 | 0, e = Stdlib_List[1].call(null, stack); scope_log[1] = - [0, caml_call3(Stdlib_Printf[4].call(null, aG), name, e, d), c]; + [0, caml_call3(Stdlib_Printf[4].call(null, aI), name, e, d), c]; } Stdlib_Hashtbl[11].call(null, scope_stacks, name, [0, value, stack]); return 0; @@ -31382,7 +41572,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg }); var cst_scope_pop = "scope-pop!", - aH = + aJ = [0, [11, "POP ", @@ -31410,7 +41600,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg d = Stdlib[17].call(null, 0, c), e = Stdlib_List[1].call(null, stack); scope_log[1] = - [0, caml_call3(Stdlib_Printf[4].call(null, aH), name, e, d), b]; + [0, caml_call3(Stdlib_Printf[4].call(null, aJ), name, e, d), b]; } if(stack){ var rest = stack[2]; @@ -31423,7 +41613,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg }); var cst_found = " found=", - aI = + aK = [0, [11, "PEEK ", @@ -31449,7 +41639,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg scope_log[1] = [0, caml_call3 - (Stdlib_Printf[4].call(null, aI), name, c, 0 !== stack ? 1 : 0), + (Stdlib_Printf[4].call(null, aK), name, c, 0 !== stack ? 1 : 0), b]; } if(! stack) return 0; @@ -31461,7 +41651,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg }); var cst_context = "context", - aJ = + aL = [0, [11, "CTX ", @@ -31487,7 +41677,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg scope_log[1] = [0, caml_call3 - (Stdlib_Printf[4].call(null, aJ), name, b, 0 !== stack ? 1 : 0), + (Stdlib_Printf[4].call(null, aL), name, b, 0 !== stack ? 1 : 0), a]; } if(stack){var v = stack[1]; return v;} @@ -31499,8 +41689,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return 0; }); var - aK = [2, "bad args"], - aL = + aM = [2, "bad args"], + aN = [0, [11, "name=", @@ -31534,10 +41724,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg 0), b = Stdlib_String[7].call(null, ",", all_keys), c = Stdlib_List[1].call(null, stack); - return [2, caml_call3(Stdlib_Printf[4].call(null, aL), name, c, b)]; + return [2, caml_call3(Stdlib_Printf[4].call(null, aN), name, c, b)]; } } - return aK; + return aM; }); register ("collect!", @@ -31576,7 +41766,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } return 0; }); - var cst_collected = "collected", aM = [5, 0], aN = [5, 0]; + var cst_collected = "collected", aO = [5, 0], aP = [5, 0]; register (cst_collected, function(args){ @@ -31596,15 +41786,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var match = stack[1]; if(typeof match !== "number" && 5 === match[0]){var items = match[1]; return [5, items];} } - return aN; + return aP; } } - return aM; + return aO; }); var cst_clear_collected = "clear-collected!", - aO = [5, 0], - aP = [0, [5, 0], 0]; + aQ = [5, 0], + aR = [0, [5, 0], 0]; register (cst_clear_collected, function(args){ @@ -31622,10 +41812,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } if(stack){ var rest = stack[2]; - Stdlib_Hashtbl[11].call(null, scope_stacks, name, [0, aO, rest]); + Stdlib_Hashtbl[11].call(null, scope_stacks, name, [0, aQ, rest]); } else - Stdlib_Hashtbl[11].call(null, scope_stacks, name, aP); + Stdlib_Hashtbl[11].call(null, scope_stacks, name, aR); return 0; } } @@ -31682,7 +41872,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return 0; }); var - aQ = + aS = [0, [11, "provide-set!: '", [2, 0, [11, "' is not a reactive provide", 0]]], "provide-set!: '%s' is not a reactive provide"]; @@ -31713,7 +41903,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return 0; } } - var c = caml_call1(Stdlib_Printf[4].call(null, aQ), name); + var c = caml_call1(Stdlib_Printf[4].call(null, aS), name); throw caml_maybe_attach_backtrace([0, Sx_types[8], c], 1); } } @@ -31963,7 +42153,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var fn = match[1]; return caml_call1(fn, args); }); - var cst_emitted = "emitted", aR = [5, 0], aS = [5, 0]; + var cst_emitted = "emitted", aT = [5, 0], aU = [5, 0]; register (cst_emitted, function(args){ @@ -31983,26 +42173,26 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var match = stack[1]; if(typeof match !== "number" && 5 === match[0]){var items = match[1]; return [5, items];} } - return aS; + return aU; } } - return aR; + return aT; }); - var aT = [5, 0]; + var aV = [5, 0]; register ("scope-emitted", function(args){ var match = Stdlib_Hashtbl[7].call(null, primitives, cst_emitted); - if(! match) return aT; + if(! match) return aV; var fn = match[1]; return caml_call1(fn, args); }); - var aU = [5, 0]; + var aW = [5, 0]; register ("scope-collected", function(args){ var match = Stdlib_Hashtbl[7].call(null, primitives, cst_collected); - if(! match) return aU; + if(! match) return aW; var fn = match[1]; return caml_call1(fn, args); }); @@ -32032,7 +42222,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return caml_call1(fn, args); }); runtime.caml_register_global - (533, + (555, [0, primitives, sx_call_fn, @@ -32060,8 +42250,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); -//# 7332 "../lib/.sx.objs/jsoo/default/sx.cma.js" -//# shape: Sx_runtime:[F(2),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(3),F(2),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(1),F(1),F(2),F(2),F(1),F(2),F(1),F(1),F(1),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(3),F(3),F(3),F(2),F(2),F(1),F(1),F(3),F(2),F(2),F(1),F(1),F(2),F(1),F(1),F(1),F(2),F(2),F(3),F(1),F(1),F(2),F(1),F(2),F(1)*,F(1)*,F(1),F(2),F(2),F(3),F(3),F(1),F(1),F(2),F(2),F(1)*,F(1)*,F(1)*,F(1)*,F(1)*,F(1)*,F(1),F(1)*,F(1),F(1),F(2),F(1)*,F(2),F(1),F(1)*,F(1),F(1),F(1),F(4),F(2),F(1),F(1),F(2),F(2),F(1),N,F(2),N,N,F(1)*,F(1),F(2),F(2),F(2),F(1)*,F(2)*,F(1)*,F(1)*,F(2),F(4),F(2),F(2),F(2),F(2)*,F(1)*,N,N,N,N,F(1),F(2)] +//# 7630 "../lib/.sx.objs/jsoo/default/sx.cma.js" +//# shape: Sx_runtime:[F(2),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(1),F(2),F(3),F(2),F(1),F(1),F(1),F(1),F(2),F(2),F(2),F(1),F(1),F(2),F(2),F(1),F(2),F(1),F(1),F(1),F(2),F(2),F(2),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(2),F(2),F(3),F(3),F(3),F(2),F(2),F(1),F(1),F(3),F(2),F(2),F(1),F(1),F(2),F(1),F(1),F(1),F(2),F(2),F(3),F(1),F(1),F(2),F(1),F(2),F(1)*,F(1)*,F(1),F(2),F(2),F(3),F(3),F(1),F(1),F(2),F(2),F(1)*,F(1)*,F(1)*,F(1)*,F(1)*,F(1)*,F(1),F(1)*,F(1),F(1),F(2),F(1)*,F(2),F(1),F(1)*,F(1),F(1),F(1),F(4),F(2),F(1),F(1),F(2),F(2),F(1),N,F(2),N,N,F(1)*,F(1),F(2),F(2),F(2),F(1)*,F(2)*,F(1)*,F(1)*,F(2),F(4),F(2),F(2),F(2),F(2)*,F(1)*,N,N,N,N,F(1),F(2)] (function (globalThis){ "use strict"; @@ -32069,7 +42259,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg runtime = globalThis.jsoo_runtime, caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace, caml_ml_string_length = runtime.caml_ml_string_length, - caml_string_compare = runtime.caml_string_compare; + caml_string_compare = runtime.caml_string_compare, + caml_wrap_exception = runtime.caml_wrap_exception; function caml_call1(f, a0){ return (f.l >= 0 ? f.l : f.l = f.length) === 1 ? f(a0) @@ -32186,6 +42377,35 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } Sx_primitives[2][1] = sx_call; function sx_apply(f, args_list){return sx_call(f, sx_to_list(args_list));} + var cst_eval_error = "__eval_error__", b = [0, 1]; + function sx_apply_cek(f, args_list){ + if(typeof f !== "number") + switch(f[0]){ + case 14: + case 23: + try{var a = sx_apply(f, args_list); return a;} + catch(exn$0){ + var exn = caml_wrap_exception(exn$0); + if(exn[1] !== Sx_types[8]) throw caml_maybe_attach_backtrace(exn, 0); + var msg = exn[2], d = Stdlib_Hashtbl[1].call(null, 0, 3); + Stdlib_Hashtbl[11].call(null, d, cst_eval_error, b); + Stdlib_Hashtbl[11].call(null, d, "message", [2, msg]); + return [6, d]; + } + } + return sx_apply(f, args_list); + } + function is_eval_error(v){ + if(typeof v !== "number" && 6 === v[0]){ + var d = v[1], match = Stdlib_Hashtbl[7].call(null, d, cst_eval_error); + if(match){ + var a = match[1]; + if(typeof a !== "number" && 0 === a[0] && a[1]) return 1; + } + return 0; + } + return 0; + } function sx_append_b(lst, item){ if(typeof lst !== "number") switch(lst[0]){ @@ -32704,10 +42924,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(i, x){sx_call(fn, [0, [1, i], [0, x, 0]]); return 0;}, a); return 0; } - var b = [0, 0], c = [0, 1]; + var c = [0, 0], d = [0, 1]; function continuation_p(v){ - if(typeof v !== "number" && 12 === v[0]) return c; - return b; + if(typeof v !== "number" && 12 === v[0]) return d; + return c; } function make_cek_continuation(captured, rest_kont){ var data = Stdlib_Hashtbl[1].call(null, 0, 2); @@ -32725,10 +42945,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg throw caml_maybe_attach_backtrace ([0, Sx_types[8], "not a continuation"], 1); } - var d = [0, 0], e = [0, 1]; + var e = [0, 0], f = [0, 1]; function callcc_continuation_p(v){ - if(typeof v !== "number" && 13 === v[0]) return e; - return d; + if(typeof v !== "number" && 13 === v[0]) return f; + return e; } function make_callcc_continuation(captured){return [13, sx_to_list(captured)]; } @@ -32770,13 +42990,13 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_Hashtbl[11].call(null, tbl, a, handler); return handler; } - var f = [0, 0], g = [0, 1]; + var g = [0, 0], h = [0, 1]; function is_else_clause(v){ if(typeof v !== "number"){ var cst_default = "default"; switch(v[0]){ case 0: - if(v[1]) return g; break; + if(v[1]) return h; break; case 3: var s = v[1], @@ -32791,7 +43011,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return [0, d]; } } - return f; + return g; } function signal_value(s){ if(typeof s !== "number") @@ -32864,33 +43084,33 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } function register_in_scope(dispose_fn){return 0;} function component_set_param_types_b(comp, types){return 0;} - var h = [5, [0, [5, 0], [0, 0, [0, [0, 0], 0]]]]; - function parse_comp_params(params){return h;} - var i = [5, [0, [5, 0], [0, 0, 0]]]; - function parse_macro_params(params){return i;} - var j = [0, [5, 0], 0]; + var i = [5, [0, [5, 0], [0, 0, [0, [0, 0], 0]]]]; + function parse_comp_params(params){return i;} + var j = [5, [0, [5, 0], [0, 0, 0]]]; + function parse_macro_params(params){return j;} + var k = [0, [5, 0], 0]; function parse_keyword_args(raw_args, env){ - return [5, [0, [6, Stdlib_Hashtbl[1].call(null, 0, 0)], j]]; + return [5, [0, [6, Stdlib_Hashtbl[1].call(null, 0, 0)], k]]; } - var k = [2, "handler"]; + var l = [2, "handler"]; function make_handler_def(name, params, body, env){ var d = Stdlib_Hashtbl[1].call(null, 0, 4); - Stdlib_Hashtbl[11].call(null, d, cst_type, k); + Stdlib_Hashtbl[11].call(null, d, cst_type, l); Stdlib_Hashtbl[11].call(null, d, cst_name, name); Stdlib_Hashtbl[11].call(null, d, "params", params); Stdlib_Hashtbl[11].call(null, d, cst_body, body); return [6, d]; } - var l = [2, "page"]; + var m = [2, "page"]; function make_page_def(name, opts){ var d = Stdlib_Hashtbl[1].call(null, 0, 4); - Stdlib_Hashtbl[11].call(null, d, cst_type, l); + Stdlib_Hashtbl[11].call(null, d, cst_type, m); Stdlib_Hashtbl[11].call(null, d, cst_name, name); return [6, d]; } - var m = [1, 1.]; + var n = [1, 1.]; function sf_defhandler(args, env){ - var name = first(args), rest_args = rest(args), a = nth(rest_args, m); + var name = first(args), rest_args = rest(args), a = nth(rest_args, n); return make_handler_def(name, first(rest_args), a, env); } function strip_prefix(s, prefix){ @@ -32946,7 +43166,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return 0; } runtime.caml_register_global - (202, + (206, [0, prim_call, value_to_str, @@ -32955,6 +43175,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg sx_to_list, sx_call, sx_apply, + sx_apply_cek, + is_eval_error, sx_append_b, sx_dict_set_b, get_val, @@ -33084,8 +43306,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); -//# 8357 "../lib/.sx.objs/jsoo/default/sx.cma.js" -//# shape: Sx_ref:[N,F(1),N,N,N,N,F(3)*,F(3)*,F(3),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(3)*,F(2)*,F(2)*,F(4)*,F(4)*,F(2)*,F(6)*,F(3)*,F(3)*,F(2)*,F(3)*,F(4)*,F(3),F(3),F(4)*,F(4)*,F(4)*,F(5)*,F(3)*,F(3)*,F(3)*,F(3)*,F(3)*,F(4)*,F(3)*,F(2)*,F(4)*,F(1)*,F(3)*,F(2)*,F(2)*,F(4)*,F(3)*,F(1)*,F(1)*,F(4)*,F(2)*,F(1),F(3)*,F(3)*,F(2)*,F(2)*,F(2)*,F(1)*,F(2)*,F(3)*,F(5)*,F(2),F(2),F(2),F(2),F(1),F(2),F(1),F(1),F(1),F(1),F(3),F(2),F(2),F(1),F(1),N,F(2),N,N,N,N,N,N,N,N,N,N,F(1),F(1),F(1),F(2),N,F(2),F(1),F(1),F(1),F(3),N,F(1),N,F(1),F(2),F(2),F(3),F(3),F(3),F(2),F(1),F(1),F(2),F(2),F(2),F(3),F(1),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(3),F(2),F(2),F(2),F(3),F(1),F(1),F(2),F(1),F(1),F(3),F(3),F(3),F(3),F(3),F(3),F(1),F(1),F(1),F(1),F(3),F(3),F(3),F(5),F(2),F(2),F(2),F(3),F(3),F(3),F(2),F(3),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(1),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(2),F(3),F(4),F(1),F(1)*,F(2),F(4),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(1),F(5),F(4),F(2),F(1),F(2),F(1),F(1),F(1),F(1)] +//# 8687 "../lib/.sx.objs/jsoo/default/sx.cma.js" +//# shape: Sx_ref:[N,F(1),N,N,F(3)*,F(3)*,F(3),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(1),F(3)*,F(2)*,F(2)*,F(4)*,F(4)*,F(3)*,F(2)*,F(6)*,F(3)*,F(3)*,F(2)*,F(3)*,F(4)*,F(3),F(3),F(4)*,F(4)*,F(4)*,F(5)*,F(3)*,F(3)*,F(3)*,F(3)*,F(3)*,F(4)*,F(3)*,F(2)*,F(4)*,F(1)*,F(3)*,F(2)*,F(2)*,F(4)*,F(3)*,F(1)*,F(1)*,F(4)*,F(2)*,F(1),F(3)*,F(3)*,F(2)*,F(2)*,F(2)*,F(1)*,F(2)*,F(3)*,F(5)*,F(2),F(2),F(2),F(2),F(1),F(2),F(1),F(1),F(1),F(1),F(3),F(2),F(2),F(1),F(1),N,F(2),N,N,N,N,N,N,N,N,N,N,N,F(1),F(1),F(1),F(2),N,F(2),F(1),F(1),F(1),N,F(2),F(1),F(1),F(1),F(1),F(2),F(1),F(3),F(1),F(2),F(3),F(2),F(2),F(3),N,N,F(1),N,N,F(1),F(2),F(2),F(3),F(3),F(3),F(2),F(1),F(1),F(2),F(2),F(2),F(3),F(1),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(3),F(2),F(2),F(2),F(3),F(1),F(1),F(2),F(1),F(1),F(3),F(3),F(3),F(3),F(3),F(3),F(1),F(1),F(1),F(1),F(3),F(3),F(3),F(5),F(2),F(2),F(2),F(3),F(3),F(3),F(2),F(3),F(2),F(3),F(3),F(2),F(2),F(2),F(2),F(1),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(2),F(3),F(4),F(1),F(1)*,F(2),F(4),F(3),F(3),F(3),F(3),F(3),F(3),F(3),F(1),F(5),F(4),F(2),F(1),F(2),F(1),F(1),F(1),F(1)] (function (globalThis){ "use strict"; @@ -33115,10 +43337,6 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function trampoline(v){return caml_call1(trampoline_fn[1], v);} var protocol_registry = [6, Stdlib_Hashtbl[1].call(null, 0, 0)], - strict_ref = [0, [0, 0]], - strict = strict_ref[1], - prim_param_types_ref = [0, 0], - prim_param_types = prim_param_types_ref[1], cst_eval = "eval"; function make_cek_state(control, env, kont){ return [21, [0, control, env, kont, cst_eval, 0]]; @@ -33149,29 +43367,29 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg e = [2, cst_kont]; function cek_terminal_p(state){ var - a = [0, Sx_runtime[23].call(null, state, d), c], + a = [0, Sx_runtime[25].call(null, state, d), c], and = Sx_runtime[1].call(null, cst, a); if(! Sx_types[49].call(null, and)) return and; - var b = Sx_runtime[23].call(null, state, e); - return Sx_runtime[31].call(null, b); + var b = Sx_runtime[25].call(null, state, e); + return Sx_runtime[33].call(null, b); } var f = [0, [2, cst_io_suspended], 0], g = [2, cst_phase]; function cek_suspended_p(state){ - var a = [0, Sx_runtime[23].call(null, state, g), f]; + var a = [0, Sx_runtime[25].call(null, state, g), f]; return Sx_runtime[1].call(null, cst, a); } var h = [2, "control"]; - function cek_control(s){return Sx_runtime[23].call(null, s, h);} + function cek_control(s){return Sx_runtime[25].call(null, s, h);} var i = [2, cst_env]; - function cek_env(s){return Sx_runtime[23].call(null, s, i);} + function cek_env(s){return Sx_runtime[25].call(null, s, i);} var j = [2, cst_kont]; - function cek_kont(s){return Sx_runtime[23].call(null, s, j);} + function cek_kont(s){return Sx_runtime[25].call(null, s, j);} var k = [2, cst_phase]; - function cek_phase(s){return Sx_runtime[23].call(null, s, k);} + function cek_phase(s){return Sx_runtime[25].call(null, s, k);} var l = [2, cst_request]; - function cek_io_request(s){return Sx_runtime[23].call(null, s, l);} + function cek_io_request(s){return Sx_runtime[25].call(null, s, l);} var cst_value = "value", m = [2, cst_value]; - function cek_value(s){return Sx_runtime[23].call(null, s, m);} + function cek_value(s){return Sx_runtime[25].call(null, s, m);} var cst_if = "if"; function make_if_frame(then_expr, else_expr, env){ return [22, [0, cst_if, env, else_expr, then_expr, 0, 0, 0, 0, 0, 0]]; @@ -33203,6 +43421,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg has_effects, effect_list]]; } + var cst_define_foreign = "define-foreign"; + function make_define_foreign_frame(name, spec, env){ + return [22, [0, cst_define_foreign, env, name, 0, 0, 0, 0, 0, 0, 0]]; + } var cst_set = "set"; function make_set_frame(name, env){ return [22, [0, cst_set, env, name, 0, 0, 0, 0, 0, 0, 0]]; @@ -33250,16 +43472,16 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg p = [3, cst_quote]; function thread_insert_arg(form, value, fenv){ var - a = [0, Sx_runtime[71].call(null, form), n], + a = [0, Sx_runtime[73].call(null, form), n], b = Sx_runtime[1].call(null, cst, a); if(! Sx_types[49].call(null, b)) return eval_expr ([5, [0, form, [0, [5, [0, p, [0, value, 0]]], 0]]], fenv); var - c = Sx_runtime[13].call(null, form), - d = Sx_runtime[16].call(null, [5, [0, o, [0, value, 0]]], c), - e = Sx_runtime[12].call(null, form); - return eval_expr(Sx_runtime[16].call(null, e, d), fenv); + c = Sx_runtime[15].call(null, form), + d = Sx_runtime[18].call(null, [5, [0, o, [0, value, 0]]], c), + e = Sx_runtime[14].call(null, form); + return eval_expr(Sx_runtime[18].call(null, e, d), fenv); } var cst_append = "append", @@ -33268,7 +43490,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg s = [3, cst_quote]; function thread_insert_arg_last(form, value, fenv){ var - a = [0, Sx_runtime[71].call(null, form), q], + a = [0, Sx_runtime[73].call(null, form), q], b = Sx_runtime[1].call(null, cst, a); return Sx_types[49].call(null, b) ? eval_expr @@ -33427,23 +43649,23 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_collect_comp_trace(kont$1){ var kont = kont$1; for(;;){ - var a = Sx_runtime[31].call(null, kont); + var a = Sx_runtime[33].call(null, kont); if(Sx_types[49].call(null, a)) return x; var - frame = Sx_runtime[12].call(null, kont), + frame = Sx_runtime[14].call(null, kont), b = [0, frame_type(frame), y], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)){ var - e = kont_collect_comp_trace(Sx_runtime[13].call(null, kont)), + e = kont_collect_comp_trace(Sx_runtime[15].call(null, kont)), d = Stdlib_Hashtbl[1].call(null, 0, 2), - f = Sx_runtime[23].call(null, frame, z); + f = Sx_runtime[25].call(null, frame, z); Stdlib_Hashtbl[11].call(null, d, cst_file, f); - var g = Sx_runtime[23].call(null, frame, A); + var g = Sx_runtime[25].call(null, frame, A); Stdlib_Hashtbl[11].call(null, d, cst_name, g); - return Sx_runtime[16].call(null, [6, d], e); + return Sx_runtime[18].call(null, [6, d], e); } - var kont$0 = Sx_runtime[13].call(null, kont); + var kont$0 = Sx_runtime[15].call(null, kont); kont = kont$0; } } @@ -33500,15 +43722,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function find_matching_handler(handlers$1, condition){ var handlers = handlers$1; for(;;){ - var a = Sx_runtime[31].call(null, handlers); + var a = Sx_runtime[33].call(null, handlers); if(Sx_types[49].call(null, a)) return 0; var - pair = Sx_runtime[12].call(null, handlers), - pred = Sx_runtime[12].call(null, pair), - handler_fn = Sx_runtime[15].call(null, pair, B), + pair = Sx_runtime[14].call(null, handlers), + pred = Sx_runtime[14].call(null, pair), + handler_fn = Sx_runtime[17].call(null, pair, B), b = cek_call(pred, [5, [0, condition, 0]]); if(Sx_types[49].call(null, b)) return handler_fn; - var handlers$0 = Sx_runtime[13].call(null, handlers); + var handlers$0 = Sx_runtime[15].call(null, handlers); handlers = handlers$0; } } @@ -33516,35 +43738,35 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_find_handler(kont$2, condition){ var kont = kont$2; for(;;){ - var a = Sx_runtime[31].call(null, kont); + var a = Sx_runtime[33].call(null, kont); if(Sx_types[49].call(null, a)) return 0; var - frame = Sx_runtime[12].call(null, kont), + frame = Sx_runtime[14].call(null, kont), b = [0, frame_type(frame), C], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)){ var match = - find_matching_handler(Sx_runtime[23].call(null, frame, D), condition), - d = Sx_runtime[81].call(null, match); + find_matching_handler(Sx_runtime[25].call(null, frame, D), condition), + d = Sx_runtime[83].call(null, match); if(! Sx_types[49].call(null, d)) return match; - var kont$0 = Sx_runtime[13].call(null, kont); + var kont$0 = Sx_runtime[15].call(null, kont); kont = kont$0; } - else{var kont$1 = Sx_runtime[13].call(null, kont); kont = kont$1;} + else{var kont$1 = Sx_runtime[15].call(null, kont); kont = kont$1;} } } function find_named_restart(restarts$1, name){ var restarts = restarts$1; for(;;){ - var a = Sx_runtime[31].call(null, restarts); + var a = Sx_runtime[33].call(null, restarts); if(Sx_types[49].call(null, a)) return 0; var - entry = Sx_runtime[12].call(null, restarts), - b = [0, Sx_runtime[12].call(null, entry), [0, name, 0]], + entry = Sx_runtime[14].call(null, restarts), + b = [0, Sx_runtime[14].call(null, entry), [0, name, 0]], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)) return entry; - var restarts$0 = Sx_runtime[13].call(null, restarts); + var restarts$0 = Sx_runtime[15].call(null, restarts); restarts = restarts$0; } } @@ -33552,33 +43774,33 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_find_restart(kont$2, name){ var kont = kont$2; for(;;){ - var a = Sx_runtime[31].call(null, kont); + var a = Sx_runtime[33].call(null, kont); if(Sx_types[49].call(null, a)) return 0; var - frame = Sx_runtime[12].call(null, kont), + frame = Sx_runtime[14].call(null, kont), b = [0, frame_type(frame), E], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)){ var - match = find_named_restart(Sx_runtime[23].call(null, frame, F), name), - d = Sx_runtime[81].call(null, match); + match = find_named_restart(Sx_runtime[25].call(null, frame, F), name), + d = Sx_runtime[83].call(null, match); if(! Sx_types[49].call(null, d)) return [5, - [0, match, [0, frame, [0, Sx_runtime[13].call(null, kont), 0]]]]; - var kont$0 = Sx_runtime[13].call(null, kont); + [0, match, [0, frame, [0, Sx_runtime[15].call(null, kont), 0]]]]; + var kont$0 = Sx_runtime[15].call(null, kont); kont = kont$0; } - else{var kont$1 = Sx_runtime[13].call(null, kont); kont = kont$1;} + else{var kont$1 = Sx_runtime[15].call(null, kont); kont = kont$1;} } } var cst_type = "type", G = [2, cst_type]; - function frame_type(f){return Sx_runtime[23].call(null, f, G);} + function frame_type(f){return Sx_runtime[25].call(null, f, G);} function kont_push(frame, kont){ - return Sx_runtime[16].call(null, frame, kont); + return Sx_runtime[18].call(null, frame, kont); } - function kont_top(kont){return Sx_runtime[12].call(null, kont);} - function kont_pop(kont){return Sx_runtime[13].call(null, kont);} - function kont_empty_p(kont){return Sx_runtime[31].call(null, kont);} + function kont_top(kont){return Sx_runtime[14].call(null, kont);} + function kont_pop(kont){return Sx_runtime[15].call(null, kont);} + function kont_empty_p(kont){return Sx_runtime[33].call(null, kont);} var captured = [5, 0], H = [2, "shift without enclosing reset"], @@ -33587,13 +43809,13 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_capture_to_reset(kont){ var k = kont, captured$0 = captured; for(;;){ - var a = Sx_runtime[31].call(null, k); + var a = Sx_runtime[33].call(null, k); if(Sx_types[49].call(null, a)){ var b = Sx_runtime[2].call(null, H); throw caml_maybe_attach_backtrace([0, Sx_types[8], b], 1); } var - frame = Sx_runtime[12].call(null, k), + frame = Sx_runtime[14].call(null, k), c = [0, frame_type(frame), I], or = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, or)) @@ -33603,12 +43825,12 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg d = [0, frame_type(frame), J], or$0 = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, or$0)) - return [5, [0, captured$0, [0, Sx_runtime[13].call(null, k), 0]]]; + return [5, [0, captured$0, [0, Sx_runtime[15].call(null, k), 0]]]; var captured$1 = Sx_runtime[1].call (null, cst_append, [0, captured$0, [0, [5, [0, frame, 0]], 0]]), - k$0 = Sx_runtime[13].call(null, k); + k$0 = Sx_runtime[15].call(null, k); k = k$0; captured$0 = captured$1; } @@ -33617,14 +43839,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_push_provides(pairs$1, env, kont$1){ var pairs = pairs$1, kont = kont$1; for(;;){ - var a = Sx_runtime[31].call(null, pairs); + var a = Sx_runtime[33].call(null, pairs); if(Sx_types[49].call(null, a)) return kont; var - pair = Sx_runtime[12].call(null, pairs), - b = Sx_runtime[15].call(null, pair, L), - c = make_provide_frame(Sx_runtime[12].call(null, pair), b, K, env), - kont$0 = Sx_runtime[16].call(null, c, kont), - pairs$0 = Sx_runtime[13].call(null, pairs); + pair = Sx_runtime[14].call(null, pairs), + b = Sx_runtime[17].call(null, pair, L), + c = make_provide_frame(Sx_runtime[14].call(null, pair), b, K, env), + kont$0 = Sx_runtime[18].call(null, c, kont), + pairs$0 = Sx_runtime[15].call(null, pairs); pairs = pairs$0; kont = kont$0; } @@ -33633,20 +43855,20 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_find_provide(kont$1, name){ var kont = kont$1; for(;;){ - var b = Sx_runtime[31].call(null, kont); + var b = Sx_runtime[33].call(null, kont); if(Sx_types[49].call(null, b)) return 0; var - frame = Sx_runtime[12].call(null, kont), + frame = Sx_runtime[14].call(null, kont), c = [0, frame_type(frame), M], and = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, and)) var - d = [0, Sx_runtime[23].call(null, frame, N), [0, name, 0]], + d = [0, Sx_runtime[25].call(null, frame, N), [0, name, 0]], a = Sx_runtime[1].call(null, cst, d); else var a = and; if(Sx_types[49].call(null, a)) return frame; - var kont$0 = Sx_runtime[13].call(null, kont); + var kont$0 = Sx_runtime[15].call(null, kont); kont = kont$0; } } @@ -33654,20 +43876,20 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_find_scope_acc(kont$1, name){ var kont = kont$1; for(;;){ - var b = Sx_runtime[31].call(null, kont); + var b = Sx_runtime[33].call(null, kont); if(Sx_types[49].call(null, b)) return 0; var - frame = Sx_runtime[12].call(null, kont), + frame = Sx_runtime[14].call(null, kont), c = [0, frame_type(frame), O], and = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, and)) var - d = [0, Sx_runtime[23].call(null, frame, P), [0, name, 0]], + d = [0, Sx_runtime[25].call(null, frame, P), [0, name, 0]], a = Sx_runtime[1].call(null, cst, d); else var a = and; if(Sx_types[49].call(null, a)) return frame; - var kont$0 = Sx_runtime[13].call(null, kont); + var kont$0 = Sx_runtime[15].call(null, kont); kont = kont$0; } } @@ -33675,13 +43897,13 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function has_reactive_reset_frame_p(kont$1){ var kont = kont$1; for(;;){ - var a = Sx_runtime[31].call(null, kont); + var a = Sx_runtime[33].call(null, kont); if(Sx_types[49].call(null, a)) return Q; var - b = [0, frame_type(Sx_runtime[12].call(null, kont)), R], + b = [0, frame_type(Sx_runtime[14].call(null, kont)), R], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)) return S; - var kont$0 = Sx_runtime[13].call(null, kont); + var kont$0 = Sx_runtime[15].call(null, kont); kont = kont$0; } } @@ -33692,32 +43914,32 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function kont_capture_to_reactive_reset(kont){ var k = kont, captured = captured$0; for(;;){ - var a = Sx_runtime[31].call(null, k); + var a = Sx_runtime[33].call(null, k); if(Sx_types[49].call(null, a)){ var b = Sx_runtime[2].call(null, T); throw caml_maybe_attach_backtrace([0, Sx_types[8], b], 1); } var - frame = Sx_runtime[12].call(null, k), + frame = Sx_runtime[14].call(null, k), c = [0, frame_type(frame), U], d = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, d)) return [5, - [0, captured, [0, frame, [0, Sx_runtime[13].call(null, k), 0]]]]; + [0, captured, [0, frame, [0, Sx_runtime[15].call(null, k), 0]]]]; var captured$1 = Sx_runtime[1].call (null, cst_append, [0, captured, [0, [5, [0, frame, 0]], 0]]), - k$0 = Sx_runtime[13].call(null, k); + k$0 = Sx_runtime[15].call(null, k); k = k$0; captured = captured$1; } } var custom_special_forms = []; function register_special_form(name, handler){ - return Sx_runtime[9].call(null, custom_special_forms, name, handler); + return Sx_runtime[11].call(null, custom_special_forms, name, handler); } - var cst$0 = ".", V = [2, cst$0]; + var cst$0 = ".", cst_join = "join", V = [2, cst$0]; function library_name_key(spec){ var a = Sx_runtime[5].call(null, spec), @@ -33729,14 +43951,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[20].call (null, function(s){ - var a = Sx_runtime[37].call(null, s); + var a = Sx_runtime[39].call(null, s); return Sx_types[49].call(null, a) ? Sx_types[50].call(null, s) : [2, Sx_runtime[4].call(null, [0, s, 0])]; }, a)], 0]]; - return Sx_runtime[1].call(null, "join", b); + return Sx_runtime[1].call(null, cst_join, b); } var cst_has_key = "has-key?", library_registry = []; function library_loaded_p(spec){ @@ -33747,45 +43969,451 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function library_exports(spec){ var a = library_name_key(spec), - b = Sx_runtime[23].call(null, library_registry, a); - return Sx_runtime[23].call(null, b, W); + b = Sx_runtime[25].call(null, library_registry, a); + return Sx_runtime[25].call(null, b, W); } function register_library(spec, exports){ var d = Stdlib_Hashtbl[1].call(null, 0, 1); Stdlib_Hashtbl[11].call(null, d, cst_exports, exports); var a = library_name_key(spec); - return Sx_runtime[9].call(null, library_registry, a, [6, d]); + return Sx_runtime[11].call(null, library_registry, a, [6, d]); } var io_registry = []; function io_register_b(name, spec){ - return Sx_runtime[9].call(null, io_registry, name, spec); + return Sx_runtime[11].call(null, io_registry, name, spec); } function io_registered_p(name){ return Sx_runtime[1].call (null, cst_has_key, [0, io_registry, [0, name, 0]]); } function io_lookup(name){ - return Sx_runtime[23].call(null, io_registry, name); + return Sx_runtime[25].call(null, io_registry, name); } var cst_keys = "keys"; function io_names(param){ return Sx_runtime[1].call(null, cst_keys, [0, io_registry, 0]); } + var foreign_registry = []; + function foreign_register_b(name, spec){ + return Sx_runtime[11].call(null, foreign_registry, name, spec); + } + function foreign_registered_p(name){ + return Sx_runtime[1].call + (null, cst_has_key, [0, foreign_registry, [0, name, 0]]); + } + function foreign_lookup(name){ + return Sx_runtime[25].call(null, foreign_registry, name); + } + function foreign_names(param){ + return Sx_runtime[1].call(null, cst_keys, [0, foreign_registry, 0]); + } + var result = [5, 0], X = [5, 0]; + function foreign_parse_params(param_list){ + var + a = Sx_runtime[37].call(null, param_list), + items = Sx_types[49].call(null, a) ? param_list : X; + return foreign_parse_params_loop(items, result); + } + var cst$1 = ">=", Y = [0, [1, 2.], 0], Z = [1, 1.]; + function foreign_parse_kwargs_b(spec, remaining$1){ + var remaining = remaining$1; + for(;;){ + var + b = Sx_runtime[33].call(null, remaining), + and = [0, 1 - Sx_types[49].call(null, b)]; + if(Sx_types[49].call(null, and)){ + var + c = [0, Sx_runtime[24].call(null, remaining), Y], + and$0 = Sx_runtime[1].call(null, cst$1, c); + if(Sx_types[49].call(null, and$0)) + var + d = Sx_runtime[14].call(null, remaining), + a = Sx_runtime[32].call(null, d); + else + var a = and$0; + } + else + var a = and; + if(! Sx_types[49].call(null, a)) return 0; + var + v = Sx_runtime[17].call(null, remaining, Z), + e = Sx_runtime[32].call(null, v), + f = Sx_types[49].call(null, e) ? Sx_types[51].call(null, v) : v, + g = Sx_runtime[14].call(null, remaining), + h = Sx_types[51].call(null, g); + Sx_runtime[11].call(null, spec, h, f); + var + i = Sx_runtime[15].call(null, remaining), + remaining$0 = Sx_runtime[15].call(null, i); + remaining = remaining$0; + } + } + var + cst_method = "method", + cst_object = "object", + _ = [0, [2, cst$0], 0], + $ = [0, [1, 1.], 0], + aa = [2, cst$0]; + function foreign_resolve_binding(binding_str){ + var + parts = Sx_runtime[1].call(null, "split", [0, binding_str, _]), + a = [0, Sx_runtime[24].call(null, parts), $], + b = Sx_runtime[1].call(null, "<=", a); + if(Sx_types[49].call(null, b)){ + var d = Stdlib_Hashtbl[1].call(null, 0, 2); + Stdlib_Hashtbl[11].call(null, d, cst_method, binding_str); + Stdlib_Hashtbl[11].call(null, d, cst_object, 0); + return [6, d]; + } + var + method = Sx_runtime[16].call(null, parts), + c = Sx_runtime[20].call(null, parts), + e = Sx_runtime[15].call(null, c), + f = [0, aa, [0, Sx_runtime[20].call(null, e), 0]], + obj = Sx_runtime[1].call(null, cst_join, f), + d$0 = Stdlib_Hashtbl[1].call(null, 0, 2); + Stdlib_Hashtbl[11].call(null, d$0, cst_method, method); + Stdlib_Hashtbl[11].call(null, d$0, cst_object, obj); + return [6, d$0]; + } + var + cst_args_got = " args, got ", + cst_got = ", got ", + cst$2 = "<", + cst_any = "any", + cst_foreign = "foreign ", + cst_range = "range", + ab = [2, cst_args_got], + ac = [2, ": expected "], + ad = [2, cst_foreign], + ae = [1, 0.], + af = [2, cst_type], + ag = [0, [2, cst_any], 0], + ah = [2, cst_got], + ai = [2, "' expected "], + aj = [2, cst_name], + ak = [2, ": arg '"], + al = [2, cst_foreign]; + function foreign_check_args(name, params, args){ + var + b = Sx_runtime[33].call(null, params), + and = [0, 1 - Sx_types[49].call(null, b)]; + if(Sx_types[49].call(null, and)) + var + c = [0, Sx_runtime[24].call(null, params), 0], + d = [0, Sx_runtime[24].call(null, args), c], + a = Sx_runtime[1].call(null, cst$2, d); + else + var a = and; + if(Sx_types[49].call(null, a)){ + var + e = [0, ab, [0, Sx_runtime[24].call(null, args), 0]], + f = + [0, ad, [0, name, [0, ac, [0, Sx_runtime[24].call(null, params), e]]]], + g = [2, Sx_runtime[4].call(null, f)], + h = Sx_runtime[2].call(null, g); + throw caml_maybe_attach_backtrace([0, Sx_types[8], h], 1); + } + var + i = [0, Sx_runtime[24].call(null, args), 0], + j = [0, Sx_runtime[24].call(null, params), i], + k = [0, ae, [0, Sx_runtime[1].call(null, "min", j), 0]], + l = Sx_runtime[1].call(null, cst_range, k), + m = Sx_runtime[5].call(null, l); + Stdlib_List[18].call + (null, + function(i){ + var + spec = Sx_runtime[17].call(null, params, i), + val = Sx_runtime[17].call(null, args, i), + expected = Sx_runtime[25].call(null, spec, af), + b = Sx_runtime[1].call(null, cst, [0, expected, ag]), + and = [0, 1 - Sx_types[49].call(null, b)]; + if(Sx_types[49].call(null, and)) + var + c = value_matches_type_p(val, expected), + a = [0, 1 - Sx_types[49].call(null, c)]; + else + var a = and; + if(! Sx_types[49].call(null, a)) return 0; + var + d = + [0, + ai, + [0, expected, [0, ah, [0, Sx_runtime[73].call(null, val), 0]]]], + e = + [0, + al, + [0, name, [0, ak, [0, Sx_runtime[25].call(null, spec, aj), d]]]], + f = [2, Sx_runtime[4].call(null, e)], + g = Sx_runtime[2].call(null, f); + throw caml_maybe_attach_backtrace([0, Sx_types[8], g], 1); + }, + m); + return 0; + } + var + cst_rest = "&rest", + cst_ffi_args = "__ffi-args__", + cst_async = "async", + cst_fn = "fn", + cst_foreign_dispatch = "foreign-dispatch", + cst_returns = "returns", + cst_sync = "sync", + am = [2, cst_name], + an = [0, [2, cst_returns], 0], + ao = [2, cst_returns], + ap = [0, [2, "promise"], 0], + aq = [2, cst_async], + ar = [0, [2, cst_async], 0], + as = [0, [3, cst_ffi_args], 0], + at = [3, cst_quote], + au = [3, cst_foreign_dispatch], + av = [3, cst_perform], + aw = [5, [0, [3, cst_rest], [0, [3, cst_ffi_args], 0]]], + ax = [3, cst_fn], + ay = [0, [3, cst_ffi_args], 0], + az = [3, cst_quote], + aA = [3, cst_foreign_dispatch], + aB = [5, [0, [3, cst_rest], [0, [3, cst_ffi_args], 0]]], + aC = [3, cst_fn], + aD = [2, cst_sync], + aE = [2, cst_sync]; + function foreign_build_lambda(spec){ + var + name = Sx_runtime[25].call(null, spec, am), + a = Sx_runtime[1].call(null, cst_has_key, [0, spec, an]); + if(Sx_types[49].call(null, a)) + var + r = Sx_runtime[25].call(null, spec, ao), + b = Sx_runtime[1].call(null, cst, [0, r, ap]), + mode = Sx_types[49].call(null, b) ? aq : aD; + else + var mode = aE; + var c = Sx_runtime[1].call(null, cst, [0, mode, ar]); + return Sx_types[49].call(null, c) + ? [5, + [0, + ax, + [0, + aw, + [0, + [5, + [0, + av, + [0, [5, [0, au, [0, [5, [0, at, [0, name, 0]]], as]]], 0]]], + 0]]]] + : [5, + [0, + aC, + [0, + aB, + [0, [5, [0, aA, [0, [5, [0, az, [0, name, 0]]], ay]]], 0]]]]; + } + var + cst_params = "params", + aF = [1, 1.], + aG = [2, cst_name], + aH = [2, cst_params]; + function sf_define_foreign(args, env){ + var a = Sx_runtime[14].call(null, args), b = Sx_runtime[39].call(null, a); + if(Sx_types[49].call(null, b)) + var + c = Sx_runtime[14].call(null, args), + name = Sx_types[50].call(null, c); + else + var name = Sx_runtime[14].call(null, args); + var + param_list = Sx_runtime[17].call(null, args, aF), + spec = [6, Stdlib_Hashtbl[1].call(null, 0, 0)]; + Sx_runtime[11].call(null, spec, aG, name); + var d = foreign_parse_params(param_list); + Sx_runtime[11].call(null, spec, aH, d); + var e = Sx_runtime[15].call(null, args); + foreign_parse_kwargs_b(spec, Sx_runtime[15].call(null, e)); + foreign_register_b(name, spec); + return spec; + } + function step_sf_define_foreign(args, env, kont){ + var + spec = sf_define_foreign(args, env), + a = Sx_runtime[14].call(null, args), + b = Sx_runtime[39].call(null, a); + if(Sx_types[49].call(null, b)) + var + c = Sx_runtime[14].call(null, args), + name = Sx_types[50].call(null, c); + else + var name = Sx_runtime[14].call(null, args); + var lambda_expr = foreign_build_lambda(spec); + return make_cek_state + (lambda_expr, + env, + kont_push(make_define_foreign_frame(name, spec, env), kont)); + } + var + cst_concat = "concat", + cst_host_call = "host-call", + aI = [0, [2, "'"], 0], + aJ = [2, "foreign-dispatch: unknown foreign function '"], + aK = [2, cst_params], + aL = [2, "js"], + aM = [5, 0], + aN = [0, [2, ": no binding for current platform"], 0], + aO = [2, cst_foreign], + aP = [2, cst_object], + aQ = [2, cst_method], + aR = [2, cst_host_call], + aS = [2, cst_host_call], + aT = [2, "host-global"], + aU = [2, cst_host_call], + aV = [0, [2, ": host-call not available on this platform"], 0], + aW = [2, cst_foreign]; + function foreign_dispatch(name, args){ + var spec = foreign_lookup(name), a = Sx_runtime[83].call(null, spec); + if(Sx_types[49].call(null, a)){ + var + b = [2, Sx_runtime[4].call(null, [0, aJ, [0, name, aI]])], + c = Sx_runtime[2].call(null, b); + throw caml_maybe_attach_backtrace([0, Sx_types[8], c], 1); + } + var + params = Sx_runtime[25].call(null, spec, aK), + binding = Sx_runtime[25].call(null, spec, aL), + d = Sx_runtime[83].call(null, params), + e = Sx_types[49].call(null, d) ? aM : params; + foreign_check_args(name, e, args); + var f = Sx_runtime[83].call(null, binding); + if(Sx_types[49].call(null, f)){ + var + g = [2, Sx_runtime[4].call(null, [0, aO, [0, name, aN]])], + h = Sx_runtime[2].call(null, g); + throw caml_maybe_attach_backtrace([0, Sx_types[8], h], 1); + } + var + resolved = foreign_resolve_binding(binding), + obj_name = Sx_runtime[25].call(null, resolved, aP), + method = Sx_runtime[25].call(null, resolved, aQ), + i = Sx_runtime[91].call(null, aR); + if(! Sx_types[49].call(null, i)){ + var + o = [2, Sx_runtime[4].call(null, [0, aW, [0, name, aV]])], + p = Sx_runtime[2].call(null, o); + throw caml_maybe_attach_backtrace([0, Sx_types[8], p], 1); + } + var j = Sx_runtime[83].call(null, obj_name); + if(Sx_types[49].call(null, j)){ + var + k = + Sx_runtime[1].call + (null, cst_concat, [0, [5, [0, 0, [0, method, 0]]], [0, args, 0]]), + l = Sx_runtime[92].call(null, aS); + return Sx_runtime[7].call(null, l, k); + } + var + obj = cek_call(Sx_runtime[92].call(null, aT), [5, [0, obj_name, 0]]), + m = + Sx_runtime[1].call + (null, cst_concat, [0, [5, [0, obj, [0, method, 0]]], [0, args, 0]]), + n = Sx_runtime[92].call(null, aU); + return Sx_runtime[7].call(null, n, m); + } + var + cst_as = "as", + aX = [0, [2, cst_as], 0], + aY = [0, [1, 2.], 0], + aZ = [1, 1.]; + function foreign_parse_params_loop(items$1, acc$2){ + var items = items$1, acc = acc$2; + for(;;){ + var b = Sx_runtime[33].call(null, items); + if(Sx_types[49].call(null, b)) return acc; + var + item = Sx_runtime[14].call(null, items), + rest_items = Sx_runtime[15].call(null, items), + c = Sx_runtime[33].call(null, rest_items), + and = [0, 1 - Sx_types[49].call(null, c)]; + if(Sx_types[49].call(null, and)){ + var + e = Sx_runtime[14].call(null, rest_items), + and$0 = Sx_runtime[32].call(null, e); + if(Sx_types[49].call(null, and$0)){ + var + f = Sx_runtime[14].call(null, rest_items), + g = [0, Sx_types[51].call(null, f), aX], + and$1 = Sx_runtime[1].call(null, cst, g); + if(Sx_types[49].call(null, and$1)) + var + h = [0, Sx_runtime[24].call(null, rest_items), aY], + a = Sx_runtime[1].call(null, cst$1, h); + else + var a = and$1; + } + else + var a = and$0; + } + else + var a = and; + if(Sx_types[49].call(null, a)){ + var + d = Stdlib_Hashtbl[1].call(null, 0, 2), + t = Sx_runtime[17].call(null, rest_items, aZ), + i = Sx_runtime[32].call(null, t), + j = + Sx_types[49].call(null, i) + ? Sx_types[51].call(null, t) + : [2, Sx_runtime[4].call(null, [0, t, 0])]; + Stdlib_Hashtbl[11].call(null, d, cst_type, j); + var + k = Sx_runtime[39].call(null, item), + l = + Sx_types[49].call(null, k) + ? Sx_types[50].call(null, item) + : [2, Sx_runtime[4].call(null, [0, item, 0])]; + Stdlib_Hashtbl[11].call(null, d, cst_name, l); + var + acc$0 = + Sx_runtime[1].call + (null, cst_append, [0, acc, [0, [5, [0, [6, d], 0]], 0]]), + m = Sx_runtime[15].call(null, rest_items), + items$0 = Sx_runtime[15].call(null, m); + items = items$0; + acc = acc$0; + } + else{ + var + n = Sx_runtime[39].call(null, item), + o = + Sx_types[49].call(null, n) + ? Sx_types[50].call(null, item) + : [2, Sx_runtime[4].call(null, [0, item, 0])], + acc$1 = + Sx_runtime[1].call + (null, + cst_append, + [0, + acc, + [0, [5, [0, [22, [0, cst_any, 0, o, 0, 0, 0, 0, 0, 0, 0]], 0]], 0]]); + items = rest_items; + acc = acc$1; + } + } + } var cst_args = "args", cst_op = "op", - X = [0, [2, "' \xe2\x80\x94 not in *io-registry*"], 0], - Y = [2, "io: unknown operation '"], - Z = [3, cst_perform]; + a0 = [0, [2, "' \xe2\x80\x94 not in *io-registry*"], 0], + a1 = [2, "io: unknown operation '"], + a2 = [3, cst_perform]; function step_sf_io(args, env, kont){ var - name = Sx_runtime[12].call(null, args), - io_args = Sx_runtime[13].call(null, args), + name = Sx_runtime[14].call(null, args), + io_args = Sx_runtime[15].call(null, args), a = io_registered_p(name), b = [0, 1 - Sx_types[49].call(null, a)]; if(Sx_types[49].call(null, b)){ var - c = [2, Sx_runtime[4].call(null, [0, Y, [0, name, X]])], + c = [2, Sx_runtime[4].call(null, [0, a1, [0, name, a0]])], e = Sx_runtime[2].call(null, c); throw caml_maybe_attach_backtrace([0, Sx_types[8], e], 1); } @@ -33793,16 +44421,18 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_Hashtbl[11].call(null, d, cst_args, io_args); Stdlib_Hashtbl[11].call(null, d, cst_op, name); return make_cek_state - (Sx_runtime[16].call(null, Z, [5, [0, [6, d], 0]]), env, kont); + (Sx_runtime[18].call(null, a2, [5, [0, [6, d], 0]]), env, kont); } + var strict_ref = []; function set_strict_b(val){strict_ref[1] = val; return 0;} + var prim_param_types_ref = []; function set_prim_param_types_b(types){ prim_param_types_ref[1] = types; return 0; } var - cst$2 = "-", - cst$1 = "?", + cst$4 = "-", + cst$3 = "?", cst_boolean = "boolean", cst_ends_with = "ends-with?", cst_keyword = "keyword", @@ -33812,111 +44442,109 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_slice = "slice", cst_string = "string", cst_symbol = "symbol", - _ = [0, [2, "any"], 0], - $ = [0, 1], - aa = [0, [2, cst_number], 0], - ab = [0, [2, cst_string], 0], - ac = [0, [2, cst_boolean], 0], - ad = [0, [2, cst_nil], 0], - ae = [0, [2, cst_list], 0], - af = [0, [2, cst_dict], 0], - ag = [0, [2, cst_lambda], 0], - ah = [0, [2, cst_symbol], 0], - ai = [0, [2, cst_symbol], 0], - aj = [0, [2, cst_keyword], 0], - ak = [0, [2, cst_keyword], 0], - al = [0, [2, cst$1], 0], - am = [0, [1, 1.], 0], - an = [1, 0.], - ao = [0, 1]; + a3 = [0, [2, cst_any], 0], + a4 = [0, 1], + a5 = [0, [2, cst_number], 0], + a6 = [0, [2, cst_string], 0], + a7 = [0, [2, cst_boolean], 0], + a8 = [0, [2, cst_nil], 0], + a9 = [0, [2, cst_list], 0], + a_ = [0, [2, cst_dict], 0], + a$ = [0, [2, cst_lambda], 0], + ba = [0, [2, cst_symbol], 0], + bb = [0, [2, cst_symbol], 0], + bc = [0, [2, cst_keyword], 0], + bd = [0, [2, cst_keyword], 0], + be = [0, [2, cst$3], 0], + bf = [0, [1, 1.], 0], + bg = [1, 0.], + bh = [0, 1]; function value_matches_type_p(val, expected_type$1){ var expected_type = expected_type$1; for(;;){ - var a = Sx_runtime[1].call(null, cst, [0, expected_type, _]); - if(Sx_types[49].call(null, a)) return $; - var b = Sx_runtime[1].call(null, cst, [0, expected_type, aa]); - if(Sx_types[49].call(null, b)) return Sx_runtime[32].call(null, val); - var c = Sx_runtime[1].call(null, cst, [0, expected_type, ab]); - if(Sx_types[49].call(null, c)) return Sx_runtime[33].call(null, val); - var d = Sx_runtime[1].call(null, cst, [0, expected_type, ac]); - if(Sx_types[49].call(null, d)) return Sx_runtime[34].call(null, val); - var e = Sx_runtime[1].call(null, cst, [0, expected_type, ad]); - if(Sx_types[49].call(null, e)) return Sx_runtime[81].call(null, val); - var f = Sx_runtime[1].call(null, cst, [0, expected_type, ae]); - if(Sx_types[49].call(null, f)) return Sx_runtime[35].call(null, val); - var g = Sx_runtime[1].call(null, cst, [0, expected_type, af]); - if(Sx_types[49].call(null, g)) return Sx_runtime[36].call(null, val); - var h = Sx_runtime[1].call(null, cst, [0, expected_type, ag]); - if(Sx_types[49].call(null, h)) return Sx_runtime[83].call(null, val); - var i = Sx_runtime[1].call(null, cst, [0, expected_type, ah]); + var a = Sx_runtime[1].call(null, cst, [0, expected_type, a3]); + if(Sx_types[49].call(null, a)) return a4; + var b = Sx_runtime[1].call(null, cst, [0, expected_type, a5]); + if(Sx_types[49].call(null, b)) return Sx_runtime[34].call(null, val); + var c = Sx_runtime[1].call(null, cst, [0, expected_type, a6]); + if(Sx_types[49].call(null, c)) return Sx_runtime[35].call(null, val); + var d = Sx_runtime[1].call(null, cst, [0, expected_type, a7]); + if(Sx_types[49].call(null, d)) return Sx_runtime[36].call(null, val); + var e = Sx_runtime[1].call(null, cst, [0, expected_type, a8]); + if(Sx_types[49].call(null, e)) return Sx_runtime[83].call(null, val); + var f = Sx_runtime[1].call(null, cst, [0, expected_type, a9]); + if(Sx_types[49].call(null, f)) return Sx_runtime[37].call(null, val); + var g = Sx_runtime[1].call(null, cst, [0, expected_type, a_]); + if(Sx_types[49].call(null, g)) return Sx_runtime[38].call(null, val); + var h = Sx_runtime[1].call(null, cst, [0, expected_type, a$]); + if(Sx_types[49].call(null, h)) return Sx_runtime[85].call(null, val); + var i = Sx_runtime[1].call(null, cst, [0, expected_type, ba]); if(Sx_types[49].call(null, i)){ - var j = [0, Sx_runtime[71].call(null, val), ai]; + var j = [0, Sx_runtime[73].call(null, val), bb]; return Sx_runtime[1].call(null, cst, j); } - var k = Sx_runtime[1].call(null, cst, [0, expected_type, aj]); + var k = Sx_runtime[1].call(null, cst, [0, expected_type, bc]); if(Sx_types[49].call(null, k)){ - var l = [0, Sx_runtime[71].call(null, val), ak]; + var l = [0, Sx_runtime[73].call(null, val), bd]; return Sx_runtime[1].call(null, cst, l); } var - and = Sx_runtime[33].call(null, expected_type), + and = Sx_runtime[35].call(null, expected_type), m = Sx_types[49].call(null, and) - ? Sx_runtime[1].call(null, cst_ends_with, [0, expected_type, al]) + ? Sx_runtime[1].call(null, cst_ends_with, [0, expected_type, be]) : and; - if(! Sx_types[49].call(null, m)) return ao; - var or = Sx_runtime[81].call(null, val); + if(! Sx_types[49].call(null, m)) return bh; + var or = Sx_runtime[83].call(null, val); if(Sx_types[49].call(null, or)) return or; var n = [0, Sx_runtime[1].call(null, "string-length", [0, expected_type, 0]), - am], + bf], o = [0, expected_type, - [0, an, [0, Sx_runtime[1].call(null, cst$2, n), 0]]], + [0, bg, [0, Sx_runtime[1].call(null, cst$4, n), 0]]], expected_type$0 = Sx_runtime[1].call(null, cst_slice, o); expected_type = expected_type$0; } } var - cst$4 = " (", + cst$6 = " (", cst_expected = " expected ", - cst$3 = ")", - cst_got = ", got ", - cst$5 = "<", - cst$6 = ">", + cst$5 = ")", + cst$7 = ">", cst_Type_error = "Type error: ", - ap = [2, "positional"], - aq = [2, "rest-type"], - ar = [1, 1.], - as = [1, 1.], - at = [0, [2, cst$3], 0], - au = [2, cst$4], - av = [2, cst_got], - aw = [2, " for param "], - ax = [2, cst_expected], - ay = [2, cst_Type_error], - az = [1, 1.], - aA = [0, [2, cst$3], 0], - aB = [2, cst$4], - aC = [2, cst_got], - aD = [2, " for rest arg "], - aE = [2, cst_expected], - aF = [2, cst_Type_error], - aG = [5, 0], - aH = [5, 0]; + bi = [2, "positional"], + bj = [2, "rest-type"], + bk = [1, 1.], + bl = [1, 1.], + bm = [0, [2, cst$5], 0], + bn = [2, cst$6], + bo = [2, cst_got], + bp = [2, " for param "], + bq = [2, cst_expected], + br = [2, cst_Type_error], + bs = [1, 1.], + bt = [0, [2, cst$5], 0], + bu = [2, cst$6], + bv = [2, cst_got], + bw = [2, " for rest arg "], + bx = [2, cst_expected], + by = [2, cst_Type_error], + bz = [5, 0], + bA = [5, 0]; function strict_check_args(name, args){ var and = strict_ref[1], b = Sx_types[49].call(null, and) ? prim_param_types_ref[1] : and; if(! Sx_types[49].call(null, b)) return 0; - var spec = Sx_runtime[23].call(null, prim_param_types_ref[1], name); + var spec = Sx_runtime[25].call(null, prim_param_types_ref[1], name); if(! Sx_types[49].call(null, spec)) return 0; var - positional = Sx_runtime[23].call(null, spec, ap), - rest_type = Sx_runtime[23].call(null, spec, aq); + positional = Sx_runtime[25].call(null, spec, bi), + rest_type = Sx_runtime[25].call(null, spec, bj); if(Sx_types[49].call(null, positional)){ var c = Sx_runtime[5].call(null, positional), @@ -33931,32 +44559,32 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(pair){ var - idx = Sx_runtime[12].call(null, pair), - param = Sx_runtime[15].call(null, pair, ar), - p_name = Sx_runtime[12].call(null, param), - p_type = Sx_runtime[15].call(null, param, as), - a = [0, idx, [0, Sx_runtime[22].call(null, args), 0]], - b = Sx_runtime[1].call(null, cst$5, a); + idx = Sx_runtime[14].call(null, pair), + param = Sx_runtime[17].call(null, pair, bk), + p_name = Sx_runtime[14].call(null, param), + p_type = Sx_runtime[17].call(null, param, bl), + a = [0, idx, [0, Sx_runtime[24].call(null, args), 0]], + b = Sx_runtime[1].call(null, cst$2, a); if(Sx_types[49].call(null, b)){ var - val = Sx_runtime[15].call(null, args, idx), + val = Sx_runtime[17].call(null, args, idx), c = value_matches_type_p(val, p_type), d = [0, 1 - Sx_types[49].call(null, c)]; if(Sx_types[49].call(null, d)){ var - e = [0, au, [0, [2, Sx_runtime[4].call(null, [0, val, 0])], at]], + e = [0, bn, [0, [2, Sx_runtime[4].call(null, [0, val, 0])], bm]], f = [0, - ay, + br, [0, name, [0, - ax, + bq, [0, p_type, [0, - aw, - [0, p_name, [0, av, [0, Sx_runtime[71].call(null, val), e]]]]]]]], + bp, + [0, p_name, [0, bo, [0, Sx_runtime[73].call(null, val), e]]]]]]]], g = [2, Sx_runtime[4].call(null, f)], h = Sx_runtime[2].call(null, g); throw caml_maybe_attach_backtrace([0, Sx_types[8], h], 1); @@ -33968,16 +44596,16 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } if(Sx_types[49].call(null, rest_type)) var - positional$0 = Sx_types[49].call(null, positional) ? positional : aH, - f = [0, Sx_runtime[22].call(null, positional$0), 0], - g = [0, Sx_runtime[22].call(null, args), f], - a = Sx_runtime[1].call(null, cst$6, g); + positional$0 = Sx_types[49].call(null, positional) ? positional : bA, + f = [0, Sx_runtime[24].call(null, positional$0), 0], + g = [0, Sx_runtime[24].call(null, args), f], + a = Sx_runtime[1].call(null, cst$7, g); else var a = rest_type; if(! Sx_types[49].call(null, a)) return 0; var - positional$1 = Sx_types[49].call(null, positional) ? positional : aG, - h = [0, args, [0, Sx_runtime[22].call(null, positional$1), 0]], + positional$1 = Sx_types[49].call(null, positional) ? positional : bz, + h = [0, args, [0, Sx_runtime[24].call(null, positional$1), 0]], i = Sx_runtime[1].call(null, cst_slice, h), j = Sx_runtime[5].call(null, i), k = @@ -33991,25 +44619,25 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(pair){ var - idx = Sx_runtime[12].call(null, pair), - val = Sx_runtime[15].call(null, pair, az), + idx = Sx_runtime[14].call(null, pair), + val = Sx_runtime[17].call(null, pair, bs), a = value_matches_type_p(val, rest_type), b = [0, 1 - Sx_types[49].call(null, a)]; if(! Sx_types[49].call(null, b)) return 0; var - c = [0, aB, [0, [2, Sx_runtime[4].call(null, [0, val, 0])], aA]], + c = [0, bu, [0, [2, Sx_runtime[4].call(null, [0, val, 0])], bt]], d = [0, - aF, + by, [0, name, [0, - aE, + bx, [0, rest_type, [0, - aD, - [0, idx, [0, aC, [0, Sx_runtime[71].call(null, val), c]]]]]]]], + bw, + [0, idx, [0, bv, [0, Sx_runtime[73].call(null, val), c]]]]]]]], e = [2, Sx_runtime[4].call(null, d)], f = Sx_runtime[2].call(null, e); throw caml_maybe_attach_backtrace([0, Sx_types[8], f], 1); @@ -34018,37 +44646,36 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return 0; } var - cst$8 = "\xce\xbb", - cst_rest = "&rest", - cst$7 = "+", + cst$9 = "\xce\xbb", + cst$8 = "+", cst_index_of = "index-of", - aI = [0, [2, cst_rest], 0], - aJ = [1, 0.], - aK = [0, [1, 1.], 0], - aL = [0, 1], - aM = [5, 0], - aN = [0, 0]; + bB = [0, [2, cst_rest], 0], + bC = [1, 0.], + bD = [0, [1, 1.], 0], + bE = [0, 1], + bF = [5, 0], + bG = [0, 0]; function bind_lambda_params(params, args, local){ var - rest_idx = Sx_runtime[1].call(null, cst_index_of, [0, params, aI]), - and = Sx_runtime[32].call(null, rest_idx); + rest_idx = Sx_runtime[1].call(null, cst_index_of, [0, params, bB]), + and = Sx_runtime[34].call(null, rest_idx); if(Sx_types[49].call(null, and)) var - b = [0, rest_idx, [0, Sx_runtime[22].call(null, params), 0]], - a = Sx_runtime[1].call(null, cst$5, b); + b = [0, rest_idx, [0, Sx_runtime[24].call(null, params), 0]], + a = Sx_runtime[1].call(null, cst$2, b); else var a = and; - if(! Sx_types[49].call(null, a)) return aN; + if(! Sx_types[49].call(null, a)) return bG; var positional = Sx_runtime[1].call - (null, cst_slice, [0, params, [0, aJ, [0, rest_idx, 0]]]), - c = Sx_runtime[1].call(null, cst$7, [0, rest_idx, aK]), - rest_name = Sx_runtime[15].call(null, params, c); - Sx_runtime[91].call + (null, cst_slice, [0, params, [0, bC, [0, rest_idx, 0]]]), + c = Sx_runtime[1].call(null, cst$8, [0, rest_idx, bD]), + rest_name = Sx_runtime[17].call(null, params, c); + Sx_runtime[93].call (null, [14, - cst$8, + cst$9, function(args$0){ if(args$0){ var a = args$0[2]; @@ -34056,56 +44683,55 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var p = a[1], i = args$0[1], - b = [0, i, [0, Sx_runtime[22].call(null, args), 0]], - c = Sx_runtime[1].call(null, cst$5, b), + b = [0, i, [0, Sx_runtime[24].call(null, args), 0]], + c = Sx_runtime[1].call(null, cst$2, b), d = Sx_types[49].call(null, c) - ? Sx_runtime[15].call(null, args, i) + ? Sx_runtime[17].call(null, args, i) : 0, e = Sx_runtime[3].call(null, p); - return Sx_runtime[75].call(null, local, e, d); + return Sx_runtime[77].call(null, local, e, d); } } return 0; }], positional); var - d = [0, Sx_runtime[22].call(null, args), [0, rest_idx, 0]], - e = Sx_runtime[1].call(null, cst$6, d), + d = [0, Sx_runtime[24].call(null, args), [0, rest_idx, 0]], + e = Sx_runtime[1].call(null, cst$7, d), f = Sx_types[49].call(null, e) ? Sx_runtime[1].call(null, cst_slice, [0, args, [0, rest_idx, 0]]) - : aM, + : bF, g = Sx_runtime[3].call(null, rest_name); - Sx_runtime[75].call(null, local, g, f); - return aL; + Sx_runtime[77].call(null, local, g, f); + return bE; } var - cst_args_got = " args, got ", cst_expects = " expects ", cst_zip = "zip", - aO = [2, cst_args_got], - aP = [2, cst_expects], - aQ = [2, cst_lambda], - aR = [1, 1.]; + bH = [2, cst_args_got], + bI = [2, cst_expects], + bJ = [2, cst_lambda], + bK = [1, 1.]; function call_lambda(f, args, caller_env){ var params = Sx_types[52].call(null, f), a = Sx_types[54].call(null, f), - local = Sx_runtime[79].call(null, a, caller_env), + local = Sx_runtime[81].call(null, a, caller_env), b = bind_lambda_params(params, args, local), c = [0, 1 - Sx_types[49].call(null, b)]; if(Sx_types[49].call(null, c)){ var - d = [0, Sx_runtime[22].call(null, params), 0], - e = [0, Sx_runtime[22].call(null, args), d], - g = Sx_runtime[1].call(null, cst$6, e); + d = [0, Sx_runtime[24].call(null, params), 0], + e = [0, Sx_runtime[24].call(null, args), d], + g = Sx_runtime[1].call(null, cst$7, e); if(Sx_types[49].call(null, g)){ var - h = [0, aO, [0, Sx_runtime[22].call(null, args), 0]], - i = [0, aP, [0, Sx_runtime[22].call(null, params), h]], + h = [0, bH, [0, Sx_runtime[24].call(null, args), 0]], + i = [0, bI, [0, Sx_runtime[24].call(null, params), h]], or = Sx_types[55].call(null, f), - or$0 = Sx_types[49].call(null, or) ? or : aQ, + or$0 = Sx_types[49].call(null, or) ? or : bJ, j = [2, Sx_runtime[4].call(null, [0, or$0, i])], k = Sx_runtime[2].call(null, j); throw caml_maybe_attach_backtrace([0, Sx_types[8], k], 1); @@ -34117,22 +44743,22 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(pair){ var - a = Sx_runtime[15].call(null, pair, aR), - b = Sx_runtime[12].call(null, pair), + a = Sx_runtime[17].call(null, pair, bK), + b = Sx_runtime[14].call(null, pair), c = Sx_runtime[3].call(null, b); - Sx_runtime[75].call(null, local, c, a); + Sx_runtime[77].call(null, local, c, a); return 0; }, m); var - n = [0, params, [0, Sx_runtime[22].call(null, args), 0]], + n = [0, params, [0, Sx_runtime[24].call(null, args), 0]], o = Sx_runtime[1].call(null, cst_slice, n), p = Sx_runtime[5].call(null, o); Stdlib_List[18].call (null, function(p){ var a = Sx_runtime[3].call(null, p); - Sx_runtime[75].call(null, local, a, 0); + Sx_runtime[77].call(null, local, a, 0); return 0; }, p); @@ -34140,31 +44766,31 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var q = Sx_types[53].call(null, f); return Sx_types[36].call(null, q, local); } - var cst_children = "children", aS = [1, 1.], aT = [2, cst_children]; + var cst_children = "children", bL = [1, 1.], bM = [2, cst_children]; function call_component(comp, raw_args, env){ var parsed = parse_keyword_args(raw_args, env), - kwargs = Sx_runtime[12].call(null, parsed), - children = Sx_runtime[15].call(null, parsed, aS), + kwargs = Sx_runtime[14].call(null, parsed), + children = Sx_runtime[17].call(null, parsed, bL), a = Sx_types[63].call(null, comp), - local = Sx_runtime[79].call(null, a, env), + local = Sx_runtime[81].call(null, a, env), b = Sx_types[61].call(null, comp), c = Sx_runtime[5].call(null, b); Stdlib_List[18].call (null, function(p){ var - or = Sx_runtime[54].call(null, kwargs, p), + or = Sx_runtime[56].call(null, kwargs, p), or$0 = Sx_types[49].call(null, or) ? or : 0, a = Sx_runtime[3].call(null, p); - Sx_runtime[75].call(null, local, a, or$0); + Sx_runtime[77].call(null, local, a, or$0); return 0; }, c); var d = Sx_types[64].call(null, comp); if(Sx_types[49].call(null, d)){ - var e = Sx_runtime[3].call(null, aT); - Sx_runtime[75].call(null, local, e, children); + var e = Sx_runtime[3].call(null, bM); + Sx_runtime[77].call(null, local, e, children); } var f = Sx_types[62].call(null, comp); return Sx_types[36].call(null, f, local); @@ -34174,84 +44800,84 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_i = "i", cst_inc = "inc", cst_skip = "skip", - aU = [5, 0], - aV = [1, 0.], - aW = [2, cst_i], - aX = [0, 0], - aY = [2, cst_skip], - aZ = [2, cst_i], - a0 = [2, cst_skip], - a1 = [2, cst_i], - a2 = [0, 0], - a3 = [2, cst_skip], - a4 = [0, [2, cst_keyword], 0], - a5 = [2, cst_i], - a6 = [0, 1], - a7 = [2, cst_skip], - a8 = [2, cst_i]; + bN = [5, 0], + bO = [1, 0.], + bP = [2, cst_i], + bQ = [0, 0], + bR = [2, cst_skip], + bS = [2, cst_i], + bT = [2, cst_skip], + bU = [2, cst_i], + bV = [0, 0], + bW = [2, cst_skip], + bX = [0, [2, cst_keyword], 0], + bY = [2, cst_i], + bZ = [0, 1], + b0 = [2, cst_skip], + b1 = [2, cst_i]; function parse_keyword_args(raw_args, env){ var kwargs = [6, Stdlib_Hashtbl[1].call(null, 0, 0)], a = Sx_runtime[5].call(null, raw_args), d = Stdlib_Hashtbl[1].call(null, 0, 2), - b = Sx_runtime[2].call(null, aW); - Stdlib_Hashtbl[11].call(null, d, b, aV); - var c = Sx_runtime[2].call(null, aY); - Stdlib_Hashtbl[11].call(null, d, c, aX); - var children = [0, aU]; + b = Sx_runtime[2].call(null, bP); + Stdlib_Hashtbl[11].call(null, d, b, bO); + var c = Sx_runtime[2].call(null, bR); + Stdlib_Hashtbl[11].call(null, d, c, bQ); + var children = [0, bN]; Stdlib_List[26].call (null, function(state, arg){ var - idx = Sx_runtime[23].call(null, state, aZ), - skip = Sx_runtime[23].call(null, state, a0); + idx = Sx_runtime[25].call(null, state, bS), + skip = Sx_runtime[25].call(null, state, bT); if(Sx_types[49].call(null, skip)){ var b = [0, state, [0, - a3, + bW, [0, - a2, - [0, a1, [0, Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), 0]]]]]; + bV, + [0, bU, [0, Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), 0]]]]]; return Sx_runtime[1].call(null, cst_assoc, b); } var - c = [0, Sx_runtime[71].call(null, arg), a4], + c = [0, Sx_runtime[73].call(null, arg), bX], and = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, and)) var - d = [0, Sx_runtime[22].call(null, raw_args), 0], + d = [0, Sx_runtime[24].call(null, raw_args), 0], e = [0, Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), d], - a = Sx_runtime[1].call(null, cst$5, e); + a = Sx_runtime[1].call(null, cst$2, e); else var a = and; if(Sx_types[49].call(null, a)){ var f = Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), g = - trampoline(eval_expr(Sx_runtime[15].call(null, raw_args, f), env)), + trampoline(eval_expr(Sx_runtime[17].call(null, raw_args, f), env)), h = Sx_types[51].call(null, arg); - Sx_runtime[9].call(null, kwargs, h, g); + Sx_runtime[11].call(null, kwargs, h, g); var i = [0, state, [0, - a7, + b0, [0, - a6, - [0, a5, [0, Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), 0]]]]]; + bZ, + [0, bY, [0, Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), 0]]]]]; return Sx_runtime[1].call(null, cst_assoc, i); } var j = trampoline(eval_expr(arg, env)); - children[1] = Sx_runtime[8].call(null, children[1], j); + children[1] = Sx_runtime[10].call(null, children[1], j); var k = [0, state, - [0, a8, [0, Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), 0]]]; + [0, b1, [0, Sx_runtime[1].call(null, cst_inc, [0, idx, 0]), 0]]]; return Sx_runtime[1].call(null, cst_assoc, k); }, [6, d], @@ -34259,14 +44885,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return [5, [0, kwargs, [0, children[1], 0]]]; } var - cst$9 = "=>", - a9 = [0, [2, cst_list], 0], - a_ = [0, [1, 2.], 0], - a$ = [0, [1, 3.], 0], - ba = [0, [2, cst_symbol], 0], - bb = [1, 1.], - bc = [0, [2, cst$9], 0], - bd = [1, 1.]; + cst$10 = "=>", + b2 = [0, [2, cst_list], 0], + b3 = [0, [1, 2.], 0], + b4 = [0, [1, 3.], 0], + b5 = [0, [2, cst_symbol], 0], + b6 = [1, 1.], + b7 = [0, [2, cst$10], 0], + b8 = [1, 1.]; function cond_scheme_p(clauses){ var a = Sx_runtime[5].call(null, clauses); return [0, @@ -34274,27 +44900,27 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(c){ var - a = [0, Sx_runtime[71].call(null, c), a9], + a = [0, Sx_runtime[73].call(null, c), b2], and = Sx_runtime[1].call(null, cst, a); if(Sx_types[49].call(null, and)){ var - b = [0, Sx_runtime[22].call(null, c), a_], + b = [0, Sx_runtime[24].call(null, c), b3], or = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, or)) var or$0 = or; else{ var - d = [0, Sx_runtime[22].call(null, c), a$], + d = [0, Sx_runtime[24].call(null, c), b4], and$0 = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, and$0)){ var - e = Sx_runtime[15].call(null, c, bb), - f = [0, Sx_runtime[71].call(null, e), ba], + e = Sx_runtime[17].call(null, c, b6), + f = [0, Sx_runtime[73].call(null, e), b5], and$1 = Sx_runtime[1].call(null, cst, f); if(Sx_types[49].call(null, and$1)) var - g = Sx_runtime[15].call(null, c, bd), - h = [0, Sx_types[50].call(null, g), bc], + g = Sx_runtime[17].call(null, c, b8), + h = [0, Sx_types[50].call(null, g), b7], or$0 = Sx_runtime[1].call(null, cst, h); else var or$0 = and$1; @@ -34311,144 +44937,143 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } var cst_else = "else", - be = [0, [2, cst_keyword], 0], - bf = [0, [2, cst_else], 0], - bg = [0, [2, cst_symbol], 0], - bh = [0, [2, cst_else], 0], - bi = [0, [2, ":else"], 0]; + b9 = [0, [2, cst_keyword], 0], + b_ = [0, [2, cst_else], 0], + b$ = [0, [2, cst_symbol], 0], + ca = [0, [2, cst_else], 0], + cb = [0, [2, ":else"], 0]; function is_else_clause(test){ var - a = [0, Sx_runtime[71].call(null, test), be], + a = [0, Sx_runtime[73].call(null, test), b9], and = Sx_runtime[1].call(null, cst, a); if(Sx_types[49].call(null, and)) var - b = [0, Sx_types[51].call(null, test), bf], + b = [0, Sx_types[51].call(null, test), b_], or = Sx_runtime[1].call(null, cst, b); else var or = and; if(Sx_types[49].call(null, or)) return or; var - c = [0, Sx_runtime[71].call(null, test), bg], + c = [0, Sx_runtime[73].call(null, test), b$], and$0 = Sx_runtime[1].call(null, cst, c); if(! Sx_types[49].call(null, and$0)) return and$0; var - d = [0, Sx_types[50].call(null, test), bh], + d = [0, Sx_types[50].call(null, test), ca], or$0 = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, or$0)) return or$0; - var e = [0, Sx_types[50].call(null, test), bi]; + var e = [0, Sx_types[50].call(null, test), cb]; return Sx_runtime[1].call(null, cst, e); } var - cst$10 = "*", - cst$11 = "/", - cst_range = "range", - bj = [1, 1.], - bk = [0, [1, 2.], 0], - bl = [5, 0], - bm = [5, 0], - bn = [0, [2, cst_list], 0], - bo = [0, [1, 2.], 0], - bp = [0, [2, cst_symbol], 0], - bq = [1, 1.], - br = [0, [1, 1.], 0], - bs = [2, cst_begin], - bt = [0, [1, 2.], 0], - bu = [1, 0.], - bv = [0, [2, cst_symbol], 0], - bw = [0, [1, 2.], 0], - bx = [0, [1, 2.], 0], - by = [0, [1, 2.], 0], - bz = [0, [1, 2.], 0]; + cst$11 = "*", + cst$12 = "/", + cc = [1, 1.], + cd = [0, [1, 2.], 0], + ce = [5, 0], + cf = [5, 0], + cg = [0, [2, cst_list], 0], + ch = [0, [1, 2.], 0], + ci = [0, [2, cst_symbol], 0], + cj = [1, 1.], + ck = [0, [1, 1.], 0], + cl = [2, cst_begin], + cm = [0, [1, 2.], 0], + cn = [1, 0.], + co = [0, [2, cst_symbol], 0], + cp = [0, [1, 2.], 0], + cq = [0, [1, 2.], 0], + cr = [0, [1, 2.], 0], + cs = [0, [1, 2.], 0]; function sf_named_let(args, env){ var - b = Sx_runtime[12].call(null, args), + b = Sx_runtime[14].call(null, args), loop_name = Sx_types[50].call(null, b), - bindings = Sx_runtime[15].call(null, args, bj), - body = Sx_runtime[1].call(null, cst_slice, [0, args, bk]), - c = Sx_runtime[12].call(null, bindings), - d = [0, Sx_runtime[71].call(null, c), bn], + bindings = Sx_runtime[17].call(null, args, cc), + body = Sx_runtime[1].call(null, cst_slice, [0, args, cd]), + c = Sx_runtime[14].call(null, bindings), + d = [0, Sx_runtime[73].call(null, c), cg], and = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, and)) var - e = Sx_runtime[12].call(null, bindings), - f = [0, Sx_runtime[22].call(null, e), bo], + e = Sx_runtime[14].call(null, bindings), + f = [0, Sx_runtime[24].call(null, e), ch], a = Sx_runtime[1].call(null, cst, f); else var a = and; - var params = [0, bl], inits = [0, bm]; + var params = [0, ce], inits = [0, cf]; if(Sx_types[49].call(null, a)){ var g = Sx_runtime[5].call(null, bindings); Stdlib_List[18].call (null, function(binding){ var - b = Sx_runtime[12].call(null, binding), - c = [0, Sx_runtime[71].call(null, b), bp], + b = Sx_runtime[14].call(null, binding), + c = [0, Sx_runtime[73].call(null, b), ci], d = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, d)) var - e = Sx_runtime[12].call(null, binding), + e = Sx_runtime[14].call(null, binding), a = Sx_types[50].call(null, e); else - var a = Sx_runtime[12].call(null, binding); - params[1] = Sx_runtime[8].call(null, params[1], a); - var f = Sx_runtime[15].call(null, binding, bq); - inits[1] = Sx_runtime[8].call(null, inits[1], f); + var a = Sx_runtime[14].call(null, binding); + params[1] = Sx_runtime[10].call(null, params[1], a); + var f = Sx_runtime[17].call(null, binding, cj); + inits[1] = Sx_runtime[10].call(null, inits[1], f); return 0; }, g); } else{ var - o = [0, Sx_runtime[22].call(null, bindings), bt], - p = [0, bu, [0, Sx_runtime[1].call(null, cst$11, o), 0]], + o = [0, Sx_runtime[24].call(null, bindings), cm], + p = [0, cn, [0, Sx_runtime[1].call(null, cst$12, o), 0]], q = Sx_runtime[1].call(null, cst_range, p), r = Sx_runtime[5].call(null, q); Stdlib_List[26].call (null, function(acc, pair_idx){ var - b = Sx_runtime[1].call(null, cst$10, [0, pair_idx, bw]), - c = Sx_runtime[15].call(null, bindings, b), - d = [0, Sx_runtime[71].call(null, c), bv], + b = Sx_runtime[1].call(null, cst$11, [0, pair_idx, cp]), + c = Sx_runtime[17].call(null, bindings, b), + d = [0, Sx_runtime[73].call(null, c), co], e = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, e)) var - f = Sx_runtime[1].call(null, cst$10, [0, pair_idx, bx]), - g = Sx_runtime[15].call(null, bindings, f), + f = Sx_runtime[1].call(null, cst$11, [0, pair_idx, cq]), + g = Sx_runtime[17].call(null, bindings, f), a = Sx_types[50].call(null, g); else var - k = Sx_runtime[1].call(null, cst$10, [0, pair_idx, bz]), - a = Sx_runtime[15].call(null, bindings, k); - params[1] = Sx_runtime[8].call(null, params[1], a); + k = Sx_runtime[1].call(null, cst$11, [0, pair_idx, cs]), + a = Sx_runtime[17].call(null, bindings, k); + params[1] = Sx_runtime[10].call(null, params[1], a); var - h = [0, Sx_runtime[1].call(null, cst$10, [0, pair_idx, by]), 0], + h = [0, Sx_runtime[1].call(null, cst$11, [0, pair_idx, cr]), 0], i = Sx_runtime[1].call(null, cst_inc, h), - j = Sx_runtime[15].call(null, bindings, i); - inits[1] = Sx_runtime[8].call(null, inits[1], j); + j = Sx_runtime[17].call(null, bindings, i); + inits[1] = Sx_runtime[10].call(null, inits[1], j); return 0; }, 0, r); } var - h = [0, Sx_runtime[22].call(null, body), br], + h = [0, Sx_runtime[24].call(null, body), ck], i = Sx_runtime[1].call(null, cst, h); if(Sx_types[49].call(null, i)) - var loop_body = Sx_runtime[12].call(null, body); + var loop_body = Sx_runtime[14].call(null, body); else var - n = Sx_types[37].call(null, bs), - loop_body = Sx_runtime[16].call(null, n, body); + n = Sx_types[37].call(null, cl), + loop_body = Sx_runtime[18].call(null, n, body); var loop_fn = Sx_types[32].call(null, params[1], loop_body, env), j = Sx_runtime[3].call(null, loop_name); - Sx_runtime[80].call(null, loop_fn, j); + Sx_runtime[82].call(null, loop_fn, j); var k = Sx_runtime[3].call(null, loop_name), l = Sx_types[54].call(null, loop_fn); - Sx_runtime[75].call(null, l, k, loop_fn); + Sx_runtime[77].call(null, l, k, loop_fn); var m = Sx_runtime[5].call(null, inits[1]), init_vals = @@ -34458,28 +45083,27 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return cek_call(loop_fn, init_vals); } var - cst_as = "as", - bA = [0, [1, 1.], 0], - bB = [0, [2, cst_symbol], 0], - bC = [0, [2, cst_list], 0], - bD = [0, [1, 3.], 0], - bE = [0, [2, cst_keyword], 0], - bF = [1, 1.], - bG = [0, [2, cst_as], 0], - bH = [1, 1.], - bI = [2, cst_begin]; + ct = [0, [1, 1.], 0], + cu = [0, [2, cst_symbol], 0], + cv = [0, [2, cst_list], 0], + cw = [0, [1, 3.], 0], + cx = [0, [2, cst_keyword], 0], + cy = [1, 1.], + cz = [0, [2, cst_as], 0], + cA = [1, 1.], + cB = [2, cst_begin]; function sf_lambda(args, env){ var - params_expr = Sx_runtime[12].call(null, args), - body_exprs = Sx_runtime[13].call(null, args), - a = [0, Sx_runtime[22].call(null, body_exprs), bA], + params_expr = Sx_runtime[14].call(null, args), + body_exprs = Sx_runtime[15].call(null, args), + a = [0, Sx_runtime[24].call(null, body_exprs), ct], b = Sx_runtime[1].call(null, cst, a); if(Sx_types[49].call(null, b)) - var body = Sx_runtime[12].call(null, body_exprs); + var body = Sx_runtime[14].call(null, body_exprs); else var - d = Sx_types[37].call(null, bI), - body = Sx_runtime[16].call(null, d, body_exprs); + d = Sx_types[37].call(null, cB), + body = Sx_runtime[18].call(null, d, body_exprs); var c = Sx_runtime[5].call(null, params_expr), param_names = @@ -34488,25 +45112,25 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(p){ var - b = [0, Sx_runtime[71].call(null, p), bB], + b = [0, Sx_runtime[73].call(null, p), cu], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)) return Sx_types[50].call(null, p); var - d = [0, Sx_runtime[71].call(null, p), bC], + d = [0, Sx_runtime[73].call(null, p), cv], and = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, and)){ var - e = [0, Sx_runtime[22].call(null, p), bD], + e = [0, Sx_runtime[24].call(null, p), cw], and$0 = Sx_runtime[1].call(null, cst, e); if(Sx_types[49].call(null, and$0)){ var - f = Sx_runtime[15].call(null, p, bF), - g = [0, Sx_runtime[71].call(null, f), bE], + f = Sx_runtime[17].call(null, p, cy), + g = [0, Sx_runtime[73].call(null, f), cx], and$1 = Sx_runtime[1].call(null, cst, g); if(Sx_types[49].call(null, and$1)) var - h = Sx_runtime[15].call(null, p, bH), - i = [0, Sx_types[51].call(null, h), bG], + h = Sx_runtime[17].call(null, p, cA), + i = [0, Sx_types[51].call(null, h), cz], a = Sx_runtime[1].call(null, cst, i); else var a = and$1; @@ -34517,7 +45141,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg else var a = and; if(! Sx_types[49].call(null, a)) return p; - var j = Sx_runtime[12].call(null, p); + var j = Sx_runtime[14].call(null, p); return Sx_types[50].call(null, j); }, c)]; @@ -34527,49 +45151,49 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_current_file = "*current-file*", cst_effect_annotations = "*effect-annotations*", cst_effects = "effects", - cst$12 = "~", - bJ = [1, 1.], - bK = [2, cst$12], - bL = [1, 1.], - bM = [1, 2.], - bN = [2, "auto"], - bO = [2, "affinity"], - bP = [2, cst_effects], - bQ = [0, [2, cst_list], 0], - bR = [0, [2, cst_symbol], 0], - bS = [2, cst_effect_annotations], - bT = [2, cst_effect_annotations], - bU = [2, cst_effect_annotations], - bV = [2, cst_current_file], - bW = [2, cst_current_file]; + cst$13 = "~", + cC = [1, 1.], + cD = [2, cst$13], + cE = [1, 1.], + cF = [1, 2.], + cG = [2, "auto"], + cH = [2, "affinity"], + cI = [2, cst_effects], + cJ = [0, [2, cst_list], 0], + cK = [0, [2, cst_symbol], 0], + cL = [2, cst_effect_annotations], + cM = [2, cst_effect_annotations], + cN = [2, cst_effect_annotations], + cO = [2, cst_current_file], + cP = [2, cst_current_file]; function sf_defcomp(args, env){ var - name_sym = Sx_runtime[12].call(null, args), - params_raw = Sx_runtime[15].call(null, args, bJ), - body = Sx_runtime[14].call(null, args), + name_sym = Sx_runtime[14].call(null, args), + params_raw = Sx_runtime[17].call(null, args, cC), + body = Sx_runtime[16].call(null, args), a = Sx_types[50].call(null, name_sym), - comp_name = Sx_runtime[123].call(null, a, bK), + comp_name = Sx_runtime[125].call(null, a, cD), parsed = parse_comp_params(params_raw), - params = Sx_runtime[12].call(null, parsed), - has_children = Sx_runtime[15].call(null, parsed, bL), - param_types = Sx_runtime[15].call(null, parsed, bM), - affinity = defcomp_kwarg(args, bO, bN), + params = Sx_runtime[14].call(null, parsed), + has_children = Sx_runtime[17].call(null, parsed, cE), + param_types = Sx_runtime[17].call(null, parsed, cF), + affinity = defcomp_kwarg(args, cH, cG), comp = Sx_types[33].call (null, comp_name, params, has_children, body, env, affinity), - effects = defcomp_kwarg(args, bP, 0), - b = Sx_runtime[81].call(null, param_types), + effects = defcomp_kwarg(args, cI, 0), + b = Sx_runtime[83].call(null, param_types), and = [0, 1 - Sx_types[49].call(null, b)]; if(Sx_types[49].call(null, and)){ var c = Sx_runtime[1].call(null, cst_keys, [0, param_types, 0]); - Sx_runtime[31].call(null, c); + Sx_runtime[33].call(null, c); } var - d = Sx_runtime[81].call(null, effects), + d = Sx_runtime[83].call(null, effects), e = [0, 1 - Sx_types[49].call(null, d)]; if(Sx_types[49].call(null, e)){ var - f = [0, Sx_runtime[71].call(null, effects), bQ], + f = [0, Sx_runtime[73].call(null, effects), cJ], g = Sx_runtime[1].call(null, cst, f); if(Sx_types[49].call(null, g)) var @@ -34580,7 +45204,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(e){ var - a = [0, Sx_runtime[71].call(null, e), bR], + a = [0, Sx_runtime[73].call(null, e), cK], b = Sx_runtime[1].call(null, cst, a); return Sx_types[49].call(null, b) ? Sx_types[50].call(null, e) @@ -34592,58 +45216,58 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg effect_list = [5, [0, [2, Sx_runtime[4].call(null, [0, effects, 0])], 0]]; var - i = Sx_runtime[73].call(null, env, bS), + i = Sx_runtime[75].call(null, env, cL), effect_anns = Sx_types[49].call(null, i) - ? Sx_runtime[74].call(null, env, bT) + ? Sx_runtime[76].call(null, env, cM) : [6, Stdlib_Hashtbl[1].call(null, 0, 0)], j = Sx_types[50].call(null, name_sym); - Sx_runtime[9].call(null, effect_anns, j, effect_list); - var k = Sx_runtime[3].call(null, bU); - Sx_runtime[75].call(null, env, k, effect_anns); + Sx_runtime[11].call(null, effect_anns, j, effect_list); + var k = Sx_runtime[3].call(null, cN); + Sx_runtime[77].call(null, env, k, effect_anns); } - var l = Sx_runtime[73].call(null, env, bV); + var l = Sx_runtime[75].call(null, env, cO); if(Sx_types[49].call(null, l)){ - var m = Sx_runtime[74].call(null, env, bW); + var m = Sx_runtime[76].call(null, env, cP); Sx_types[60].call(null, comp, m); } var n = Sx_types[50].call(null, name_sym), o = Sx_runtime[3].call(null, n); - Sx_runtime[75].call(null, env, o, comp); + Sx_runtime[77].call(null, env, o, comp); return comp; } var - bX = [0, [1, 1.], 0], - bY = [0, [1, 1.], 0], - bZ = [1, 2.], - b0 = [0, [2, cst_keyword], 0], - b1 = [0, [1, 1.], 0], - b2 = [0, [1, 1.], 0], - b3 = [0, [2, cst_keyword], 0]; + cQ = [0, [1, 1.], 0], + cR = [0, [1, 1.], 0], + cS = [1, 2.], + cT = [0, [2, cst_keyword], 0], + cU = [0, [1, 1.], 0], + cV = [0, [1, 1.], 0], + cW = [0, [2, cst_keyword], 0]; function defcomp_kwarg(args, key, default$){ var - a = [0, Sx_runtime[22].call(null, args), bX], - end = Sx_runtime[1].call(null, cst$2, a), + a = [0, Sx_runtime[24].call(null, args), cQ], + end = Sx_runtime[1].call(null, cst$4, a), result = [0, default$], - b = Sx_runtime[1].call(null, cst_range, [0, bZ, [0, end, bY]]), + b = Sx_runtime[1].call(null, cst_range, [0, cS, [0, end, cR]]), c = Sx_runtime[5].call(null, b); Stdlib_List[18].call (null, function(i){ var - b = Sx_runtime[15].call(null, args, i), - c = [0, Sx_runtime[71].call(null, b), b0], + b = Sx_runtime[17].call(null, args, i), + c = [0, Sx_runtime[73].call(null, b), cT], and = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, and)){ var - d = Sx_runtime[15].call(null, args, i), + d = Sx_runtime[17].call(null, args, i), e = [0, Sx_types[51].call(null, d), [0, key, 0]], and$0 = Sx_runtime[1].call(null, cst, e); if(Sx_types[49].call(null, and$0)) var - f = [0, Sx_runtime[1].call(null, cst$7, [0, i, b1]), [0, end, 0]], - a = Sx_runtime[1].call(null, cst$5, f); + f = [0, Sx_runtime[1].call(null, cst$8, [0, i, cU]), [0, end, 0]], + a = Sx_runtime[1].call(null, cst$2, f); else var a = and$0; } @@ -34651,9 +45275,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)){ var - g = Sx_runtime[1].call(null, cst$7, [0, i, b2]), - val = Sx_runtime[15].call(null, args, g), - h = [0, Sx_runtime[71].call(null, val), b3], + g = Sx_runtime[1].call(null, cst$8, [0, i, cV]), + val = Sx_runtime[17].call(null, args, g), + h = [0, Sx_runtime[73].call(null, val), cW], j = Sx_runtime[1].call(null, cst, h), k = Sx_types[49].call(null, j) ? Sx_types[51].call(null, val) : val; result[1] = k; @@ -34664,56 +45288,56 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return result[1]; } var - b4 = [5, 0], - b5 = [0, 0], - b6 = [0, 0], - b7 = [0, [2, cst_list], 0], - b8 = [0, [1, 3.], 0], - b9 = [0, [2, cst_symbol], 0], - b_ = [0, [2, cst_keyword], 0], - b$ = [1, 1.], - ca = [0, [2, cst_as], 0], - cb = [1, 1.], - cc = [1, 2.], - cd = [0, [2, cst_symbol], 0], - ce = [0, [2, cst_symbol], 0], - cf = [0, [2, "&key"], 0], - cg = [0, 1], - ch = [0, [2, cst_rest], 0], - ci = [0, 1], - cj = [0, [2, "&children"], 0], - ck = [0, 1]; + cX = [5, 0], + cY = [0, 0], + cZ = [0, 0], + c0 = [0, [2, cst_list], 0], + c1 = [0, [1, 3.], 0], + c2 = [0, [2, cst_symbol], 0], + c3 = [0, [2, cst_keyword], 0], + c4 = [1, 1.], + c5 = [0, [2, cst_as], 0], + c6 = [1, 1.], + c7 = [1, 2.], + c8 = [0, [2, cst_symbol], 0], + c9 = [0, [2, cst_symbol], 0], + c_ = [0, [2, "&key"], 0], + c$ = [0, 1], + da = [0, [2, cst_rest], 0], + db = [0, 1], + dc = [0, [2, "&children"], 0], + dd = [0, 1]; function parse_comp_params(params_expr){ var param_types = [6, Stdlib_Hashtbl[1].call(null, 0, 0)], a = Sx_runtime[5].call(null, params_expr), - params = [0, b4], - has_children = [0, b5], - in_key = [0, b6]; + params = [0, cX], + has_children = [0, cY], + in_key = [0, cZ]; Stdlib_List[18].call (null, function(p){ var - b = [0, Sx_runtime[71].call(null, p), b7], + b = [0, Sx_runtime[73].call(null, p), c0], and = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, and)){ var - c = [0, Sx_runtime[22].call(null, p), b8], + c = [0, Sx_runtime[24].call(null, p), c1], and$0 = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, and$0)){ var - d = Sx_runtime[12].call(null, p), - e = [0, Sx_runtime[71].call(null, d), b9], + d = Sx_runtime[14].call(null, p), + e = [0, Sx_runtime[73].call(null, d), c2], and$1 = Sx_runtime[1].call(null, cst, e); if(Sx_types[49].call(null, and$1)){ var - f = Sx_runtime[15].call(null, p, b$), - g = [0, Sx_runtime[71].call(null, f), b_], + f = Sx_runtime[17].call(null, p, c4), + g = [0, Sx_runtime[73].call(null, f), c3], and$2 = Sx_runtime[1].call(null, cst, g); if(Sx_types[49].call(null, and$2)) var - h = Sx_runtime[15].call(null, p, cb), - i = [0, Sx_types[51].call(null, h), ca], + h = Sx_runtime[17].call(null, p, c6), + i = [0, Sx_types[51].call(null, h), c5], a = Sx_runtime[1].call(null, cst, i); else var a = and$2; @@ -34728,42 +45352,42 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)){ var - j = Sx_runtime[12].call(null, p), + j = Sx_runtime[14].call(null, p), name = Sx_types[50].call(null, j), - ptype = Sx_runtime[15].call(null, p, cc), - k = [0, Sx_runtime[71].call(null, ptype), cd], + ptype = Sx_runtime[17].call(null, p, c7), + k = [0, Sx_runtime[73].call(null, ptype), c8], l = Sx_runtime[1].call(null, cst, k), type_val = Sx_types[49].call(null, l) ? Sx_types[50].call(null, ptype) : ptype, m = [0, 1 - Sx_types[49].call(null, has_children[1])]; if(Sx_types[49].call(null, m)){ - params[1] = Sx_runtime[8].call(null, params[1], name); - Sx_runtime[9].call(null, param_types, name, type_val); + params[1] = Sx_runtime[10].call(null, params[1], name); + Sx_runtime[11].call(null, param_types, name, type_val); } } else{ var - n = [0, Sx_runtime[71].call(null, p), ce], + n = [0, Sx_runtime[73].call(null, p), c9], o = Sx_runtime[1].call(null, cst, n); if(Sx_types[49].call(null, o)){ var name$0 = Sx_types[50].call(null, p), - q = Sx_runtime[1].call(null, cst, [0, name$0, cf]); + q = Sx_runtime[1].call(null, cst, [0, name$0, c_]); if(Sx_types[49].call(null, q)) - in_key[1] = cg; + in_key[1] = c$; else{ - var r = Sx_runtime[1].call(null, cst, [0, name$0, ch]); + var r = Sx_runtime[1].call(null, cst, [0, name$0, da]); if(Sx_types[49].call(null, r)) - has_children[1] = ci; + has_children[1] = db; else{ - var s = Sx_runtime[1].call(null, cst, [0, name$0, cj]); + var s = Sx_runtime[1].call(null, cst, [0, name$0, dc]); if(Sx_types[49].call(null, s)) - has_children[1] = ck; + has_children[1] = dd; else if(! Sx_types[49].call(null, has_children[1])) if(Sx_types[49].call(null, in_key[1])) - params[1] = Sx_runtime[8].call(null, params[1], name$0); + params[1] = Sx_runtime[10].call(null, params[1], name$0); else - params[1] = Sx_runtime[8].call(null, params[1], name$0); + params[1] = Sx_runtime[10].call(null, params[1], name$0); } } } @@ -34774,61 +45398,61 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return [5, [0, params[1], [0, has_children[1], [0, param_types, 0]]]]; } var - cl = [1, 1.], - cm = [0, [1, 2.], 0], - cn = [0, [1, 1.], 0], - co = [2, cst$12], - cp = [1, 1.], - cq = [2, cst_current_file], - cr = [2, cst_current_file], - cs = [2, cst_begin]; + de = [1, 1.], + df = [0, [1, 2.], 0], + dg = [0, [1, 1.], 0], + dh = [2, cst$13], + di = [1, 1.], + dj = [2, cst_current_file], + dk = [2, cst_current_file], + dl = [2, cst_begin]; function sf_defisland(args, env){ var - name_sym = Sx_runtime[12].call(null, args), - params_raw = Sx_runtime[15].call(null, args, cl), - body_exprs = Sx_runtime[1].call(null, cst_slice, [0, args, cm]), - a = [0, Sx_runtime[22].call(null, body_exprs), cn], + name_sym = Sx_runtime[14].call(null, args), + params_raw = Sx_runtime[17].call(null, args, de), + body_exprs = Sx_runtime[1].call(null, cst_slice, [0, args, df]), + a = [0, Sx_runtime[24].call(null, body_exprs), dg], b = Sx_runtime[1].call(null, cst, a); if(Sx_types[49].call(null, b)) - var body = Sx_runtime[12].call(null, body_exprs); + var body = Sx_runtime[14].call(null, body_exprs); else var - h = Sx_types[37].call(null, cs), - body = Sx_runtime[16].call(null, h, body_exprs); + h = Sx_types[37].call(null, dl), + body = Sx_runtime[18].call(null, h, body_exprs); var c = Sx_types[50].call(null, name_sym), - comp_name = Sx_runtime[123].call(null, c, co), + comp_name = Sx_runtime[125].call(null, c, dh), parsed = parse_comp_params(params_raw), - params = Sx_runtime[12].call(null, parsed), - has_children = Sx_runtime[15].call(null, parsed, cp), + params = Sx_runtime[14].call(null, parsed), + has_children = Sx_runtime[17].call(null, parsed, di), island = Sx_types[34].call(null, comp_name, params, has_children, body, env), - d = Sx_runtime[73].call(null, env, cq); + d = Sx_runtime[75].call(null, env, dj); if(Sx_types[49].call(null, d)){ - var e = Sx_runtime[74].call(null, env, cr); + var e = Sx_runtime[76].call(null, env, dk); Sx_types[60].call(null, island, e); } var f = Sx_types[50].call(null, name_sym), g = Sx_runtime[3].call(null, f); - Sx_runtime[75].call(null, env, g, island); + Sx_runtime[77].call(null, env, g, island); return island; } - var cst$13 = ">=", ct = [0, [1, 2.], 0], cu = [1, 1.]; + var dm = [0, [1, 2.], 0], dn = [1, 1.]; function defio_parse_kwargs_b(spec, remaining$1){ var remaining = remaining$1; for(;;){ var - b = Sx_runtime[31].call(null, remaining), + b = Sx_runtime[33].call(null, remaining), and = [0, 1 - Sx_types[49].call(null, b)]; if(Sx_types[49].call(null, and)){ var - c = [0, Sx_runtime[22].call(null, remaining), ct], - and$0 = Sx_runtime[1].call(null, cst$13, c); + c = [0, Sx_runtime[24].call(null, remaining), dm], + and$0 = Sx_runtime[1].call(null, cst$1, c); if(Sx_types[49].call(null, and$0)) var - d = Sx_runtime[12].call(null, remaining), - a = Sx_runtime[30].call(null, d); + d = Sx_runtime[14].call(null, remaining), + a = Sx_runtime[32].call(null, d); else var a = and$0; } @@ -34836,88 +45460,88 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(! Sx_types[49].call(null, a)) return 0; var - e = Sx_runtime[15].call(null, remaining, cu), - f = Sx_runtime[12].call(null, remaining), + e = Sx_runtime[17].call(null, remaining, dn), + f = Sx_runtime[14].call(null, remaining), g = Sx_types[51].call(null, f); - Sx_runtime[9].call(null, spec, g, e); + Sx_runtime[11].call(null, spec, g, e); var - h = Sx_runtime[13].call(null, remaining), - remaining$0 = Sx_runtime[13].call(null, h); + h = Sx_runtime[15].call(null, remaining), + remaining$0 = Sx_runtime[15].call(null, h); remaining = remaining$0; } } - var cv = [2, cst_name]; + var dp = [2, cst_name]; function sf_defio(args, env){ var - name = Sx_runtime[12].call(null, args), + name = Sx_runtime[14].call(null, args), spec = [6, Stdlib_Hashtbl[1].call(null, 0, 0)]; - Sx_runtime[9].call(null, spec, cv, name); - defio_parse_kwargs_b(spec, Sx_runtime[13].call(null, args)); + Sx_runtime[11].call(null, spec, dp, name); + defio_parse_kwargs_b(spec, Sx_runtime[15].call(null, args)); io_register_b(name, spec); return spec; } - var cw = [1, 1.], cx = [1, 2.], cy = [1, 1.]; + var dq = [1, 1.], dr = [1, 2.], ds = [1, 1.]; function sf_defmacro(args, env){ var - name_sym = Sx_runtime[12].call(null, args), - params_raw = Sx_runtime[15].call(null, args, cw), - body = Sx_runtime[15].call(null, args, cx), + name_sym = Sx_runtime[14].call(null, args), + params_raw = Sx_runtime[17].call(null, args, dq), + body = Sx_runtime[17].call(null, args, dr), parsed = parse_macro_params(params_raw), - params = Sx_runtime[12].call(null, parsed), - rest_param = Sx_runtime[15].call(null, parsed, cy), + params = Sx_runtime[14].call(null, parsed), + rest_param = Sx_runtime[17].call(null, parsed, ds), a = Sx_types[50].call(null, name_sym), mac = Sx_types[35].call(null, params, rest_param, body, env, a), b = Sx_types[50].call(null, name_sym), c = Sx_runtime[3].call(null, b); - Sx_runtime[75].call(null, env, c, mac); + Sx_runtime[77].call(null, env, c, mac); return mac; } var cst_in_rest = "in-rest", - cz = [5, 0], - cA = [0, 0], - cB = [2, cst_in_rest], - cC = [0, [2, cst_symbol], 0], - cD = [0, [2, cst_rest], 0], - cE = [0, [2, cst_in_rest], [0, [0, 1], 0]], - cF = [2, cst_in_rest], - cG = [0, [2, cst_symbol], 0], - cH = [0, [2, cst_symbol], 0]; + dt = [5, 0], + du = [0, 0], + dv = [2, cst_in_rest], + dw = [0, [2, cst_symbol], 0], + dx = [0, [2, cst_rest], 0], + dy = [0, [2, cst_in_rest], [0, [0, 1], 0]], + dz = [2, cst_in_rest], + dA = [0, [2, cst_symbol], 0], + dB = [0, [2, cst_symbol], 0]; function parse_macro_params(params_expr){ var a = Sx_runtime[5].call(null, params_expr), d = Stdlib_Hashtbl[1].call(null, 0, 1), - b = Sx_runtime[2].call(null, cB); - Stdlib_Hashtbl[11].call(null, d, b, cA); - var params = [0, cz], rest_param = [0, 0]; + b = Sx_runtime[2].call(null, dv); + Stdlib_Hashtbl[11].call(null, d, b, du); + var params = [0, dt], rest_param = [0, 0]; Stdlib_List[26].call (null, function(state, p){ var - b = [0, Sx_runtime[71].call(null, p), cC], + b = [0, Sx_runtime[73].call(null, p), dw], and = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, and)) var - c = [0, Sx_types[50].call(null, p), cD], + c = [0, Sx_types[50].call(null, p), dx], a = Sx_runtime[1].call(null, cst, c); else var a = and; if(Sx_types[49].call(null, a)) - return Sx_runtime[1].call(null, cst_assoc, [0, state, cE]); - var d = Sx_runtime[23].call(null, state, cF); + return Sx_runtime[1].call(null, cst_assoc, [0, state, dy]); + var d = Sx_runtime[25].call(null, state, dz); if(Sx_types[49].call(null, d)){ var - e = [0, Sx_runtime[71].call(null, p), cG], + e = [0, Sx_runtime[73].call(null, p), dA], f = Sx_runtime[1].call(null, cst, e), g = Sx_types[49].call(null, f) ? Sx_types[50].call(null, p) : p; rest_param[1] = g; return state; } var - h = [0, Sx_runtime[71].call(null, p), cH], + h = [0, Sx_runtime[73].call(null, p), dB], i = Sx_runtime[1].call(null, cst, h), j = Sx_types[49].call(null, i) ? Sx_types[50].call(null, p) : p; - params[1] = Sx_runtime[8].call(null, params[1], j); + params[1] = Sx_runtime[10].call(null, params[1], j); return state; }, [6, d], @@ -34925,60 +45549,59 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return [5, [0, params[1], [0, rest_param[1], 0]]]; } var - cst_concat = "concat", - cI = [0, [2, cst_list], 0], - cJ = [5, 0], - cK = [0, [2, cst_symbol], 0], - cL = [0, [2, "unquote"], 0], - cM = [1, 1.], - cN = [5, 0], - cO = [0, [2, cst_list], 0], - cP = [0, [1, 2.], 0], - cQ = [0, [2, cst_symbol], 0], - cR = [0, [2, "splice-unquote"], 0], - cS = [1, 1.], - cT = [0, [2, cst_list], 0]; + dC = [0, [2, cst_list], 0], + dD = [5, 0], + dE = [0, [2, cst_symbol], 0], + dF = [0, [2, "unquote"], 0], + dG = [1, 1.], + dH = [5, 0], + dI = [0, [2, cst_list], 0], + dJ = [0, [1, 2.], 0], + dK = [0, [2, cst_symbol], 0], + dL = [0, [2, "splice-unquote"], 0], + dM = [1, 1.], + dN = [0, [2, cst_list], 0]; function qq_expand(template, env){ var - b = [0, Sx_runtime[71].call(null, template), cI], + b = [0, Sx_runtime[73].call(null, template), dC], c = Sx_runtime[1].call(null, cst, b), d = [0, 1 - Sx_types[49].call(null, c)]; if(Sx_types[49].call(null, d)) return template; - var e = Sx_runtime[31].call(null, template); - if(Sx_types[49].call(null, e)) return cJ; + var e = Sx_runtime[33].call(null, template); + if(Sx_types[49].call(null, e)) return dD; var - head = Sx_runtime[12].call(null, template), - f = [0, Sx_runtime[71].call(null, head), cK], + head = Sx_runtime[14].call(null, template), + f = [0, Sx_runtime[73].call(null, head), dE], and = Sx_runtime[1].call(null, cst, f); if(Sx_types[49].call(null, and)) var - g = [0, Sx_types[50].call(null, head), cL], + g = [0, Sx_types[50].call(null, head), dF], a = Sx_runtime[1].call(null, cst, g); else var a = and; if(Sx_types[49].call(null, a)) return trampoline - (eval_expr(Sx_runtime[15].call(null, template, cM), env)); + (eval_expr(Sx_runtime[17].call(null, template, dG), env)); var h = Sx_runtime[5].call(null, template); return Stdlib_List[26].call (null, function(result, item){ var - b = [0, Sx_runtime[71].call(null, item), cO], + b = [0, Sx_runtime[73].call(null, item), dI], and = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, and)){ var - c = [0, Sx_runtime[22].call(null, item), cP], + c = [0, Sx_runtime[24].call(null, item), dJ], and$0 = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, and$0)){ var - d = Sx_runtime[12].call(null, item), - e = [0, Sx_runtime[71].call(null, d), cQ], + d = Sx_runtime[14].call(null, item), + e = [0, Sx_runtime[73].call(null, d), dK], and$1 = Sx_runtime[1].call(null, cst, e); if(Sx_types[49].call(null, and$1)) var - f = Sx_runtime[12].call(null, item), - g = [0, Sx_types[50].call(null, f), cR], + f = Sx_runtime[14].call(null, item), + g = [0, Sx_types[50].call(null, f), dL], a = Sx_runtime[1].call(null, cst, g); else var a = and$1; @@ -34995,13 +45618,13 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var spliced = trampoline - (eval_expr(Sx_runtime[15].call(null, item, cS), env)), - h = [0, Sx_runtime[71].call(null, spliced), cT], + (eval_expr(Sx_runtime[17].call(null, item, dM), env)), + h = [0, Sx_runtime[73].call(null, spliced), dN], i = Sx_runtime[1].call(null, cst, h); if(Sx_types[49].call(null, i)) return Sx_runtime[1].call (null, cst_concat, [0, result, [0, spliced, 0]]); - var j = Sx_runtime[81].call(null, spliced); + var j = Sx_runtime[83].call(null, spliced); return Sx_types[49].call(null, j) ? result : Sx_runtime @@ -35010,97 +45633,97 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_concat, [0, result, [0, [5, [0, spliced, 0]], 0]]); }, - cN, + dH, h); } var cst_dec = "dec", - cU = [5, 0], - cV = [5, 0], - cW = [0, [2, cst_list], 0], - cX = [0, [1, 2.], 0], - cY = [0, [2, cst_symbol], 0], - cZ = [1, 1.], - c0 = [1, 1.], - c1 = [1, 0.], - c2 = [0, [1, 2.], 0], - c3 = [1, 0.], - c4 = [0, [2, cst_symbol], 0], - c5 = [0, [1, 2.], 0], - c6 = [0, [1, 2.], 0], - c7 = [0, [1, 2.], 0], - c8 = [0, [1, 2.], 0]; + dO = [5, 0], + dP = [5, 0], + dQ = [0, [2, cst_list], 0], + dR = [0, [1, 2.], 0], + dS = [0, [2, cst_symbol], 0], + dT = [1, 1.], + dU = [1, 1.], + dV = [1, 0.], + dW = [0, [1, 2.], 0], + dX = [1, 0.], + dY = [0, [2, cst_symbol], 0], + dZ = [0, [1, 2.], 0], + d0 = [0, [1, 2.], 0], + d1 = [0, [1, 2.], 0], + d2 = [0, [1, 2.], 0]; function sf_letrec(args, env){ var - bindings = Sx_runtime[12].call(null, args), - body = Sx_runtime[13].call(null, args), - local = Sx_runtime[78].call(null, env), - b = Sx_runtime[12].call(null, bindings), - c = [0, Sx_runtime[71].call(null, b), cW], + bindings = Sx_runtime[14].call(null, args), + body = Sx_runtime[15].call(null, args), + local = Sx_runtime[80].call(null, env), + b = Sx_runtime[14].call(null, bindings), + c = [0, Sx_runtime[73].call(null, b), dQ], and = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, and)) var - d = Sx_runtime[12].call(null, bindings), - e = [0, Sx_runtime[22].call(null, d), cX], + d = Sx_runtime[14].call(null, bindings), + e = [0, Sx_runtime[24].call(null, d), dR], a = Sx_runtime[1].call(null, cst, e); else var a = and; - var names = [0, cU], val_exprs = [0, cV]; + var names = [0, dO], val_exprs = [0, dP]; if(Sx_types[49].call(null, a)){ var f = Sx_runtime[5].call(null, bindings); Stdlib_List[18].call (null, function(binding){ var - a = Sx_runtime[12].call(null, binding), - b = [0, Sx_runtime[71].call(null, a), cY], + a = Sx_runtime[14].call(null, binding), + b = [0, Sx_runtime[73].call(null, a), dS], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)) var - d = Sx_runtime[12].call(null, binding), + d = Sx_runtime[14].call(null, binding), vname = Sx_types[50].call(null, d); else - var vname = Sx_runtime[12].call(null, binding); - names[1] = Sx_runtime[8].call(null, names[1], vname); - var e = Sx_runtime[15].call(null, binding, cZ); - val_exprs[1] = Sx_runtime[8].call(null, val_exprs[1], e); + var vname = Sx_runtime[14].call(null, binding); + names[1] = Sx_runtime[10].call(null, names[1], vname); + var e = Sx_runtime[17].call(null, binding, dT); + val_exprs[1] = Sx_runtime[10].call(null, val_exprs[1], e); var f = Sx_runtime[3].call(null, vname); - Sx_runtime[75].call(null, local, f, 0); + Sx_runtime[77].call(null, local, f, 0); return 0; }, f); } else{ var - p = [0, Sx_runtime[22].call(null, bindings), c2], - q = [0, c3, [0, Sx_runtime[1].call(null, cst$11, p), 0]], + p = [0, Sx_runtime[24].call(null, bindings), dW], + q = [0, dX, [0, Sx_runtime[1].call(null, cst$12, p), 0]], r = Sx_runtime[1].call(null, cst_range, q), s = Sx_runtime[5].call(null, r); Stdlib_List[26].call (null, function(acc, pair_idx){ var - a = Sx_runtime[1].call(null, cst$10, [0, pair_idx, c5]), - b = Sx_runtime[15].call(null, bindings, a), - c = [0, Sx_runtime[71].call(null, b), c4], + a = Sx_runtime[1].call(null, cst$11, [0, pair_idx, dZ]), + b = Sx_runtime[17].call(null, bindings, a), + c = [0, Sx_runtime[73].call(null, b), dY], d = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, d)) var - e = Sx_runtime[1].call(null, cst$10, [0, pair_idx, c6]), - f = Sx_runtime[15].call(null, bindings, e), + e = Sx_runtime[1].call(null, cst$11, [0, pair_idx, d0]), + f = Sx_runtime[17].call(null, bindings, e), vname = Sx_types[50].call(null, f); else var - j = Sx_runtime[1].call(null, cst$10, [0, pair_idx, c8]), - vname = Sx_runtime[15].call(null, bindings, j); + j = Sx_runtime[1].call(null, cst$11, [0, pair_idx, d2]), + vname = Sx_runtime[17].call(null, bindings, j); var - g = [0, Sx_runtime[1].call(null, cst$10, [0, pair_idx, c7]), 0], + g = [0, Sx_runtime[1].call(null, cst$11, [0, pair_idx, d1]), 0], h = Sx_runtime[1].call(null, cst_inc, g), - val_expr = Sx_runtime[15].call(null, bindings, h); - names[1] = Sx_runtime[8].call(null, names[1], vname); - val_exprs[1] = Sx_runtime[8].call(null, val_exprs[1], val_expr); + val_expr = Sx_runtime[17].call(null, bindings, h); + names[1] = Sx_runtime[10].call(null, names[1], vname); + val_exprs[1] = Sx_runtime[10].call(null, val_exprs[1], val_expr); var i = Sx_runtime[3].call(null, vname); - return Sx_runtime[75].call(null, local, i, 0); + return Sx_runtime[77].call(null, local, i, 0); }, 0, s); @@ -35117,10 +45740,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(pair){ var - a = Sx_runtime[15].call(null, pair, c0), - b = Sx_runtime[12].call(null, pair), + a = Sx_runtime[17].call(null, pair, dU), + b = Sx_runtime[14].call(null, pair), c = Sx_runtime[3].call(null, b); - Sx_runtime[75].call(null, local, c, a); + Sx_runtime[77].call(null, local, c, a); return 0; }, i); @@ -35128,17 +45751,17 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[18].call (null, function(val){ - var a = Sx_runtime[83].call(null, val); + var a = Sx_runtime[85].call(null, val); if(Sx_types[49].call(null, a)){ var b = Sx_runtime[5].call(null, names[1]); Stdlib_List[18].call (null, function(n){ var - a = Sx_runtime[74].call(null, local, n), + a = Sx_runtime[76].call(null, local, n), b = Sx_runtime[3].call(null, n), c = Sx_types[54].call(null, val); - Sx_runtime[75].call(null, c, b, a); + Sx_runtime[77].call(null, c, b, a); return 0; }, b); @@ -35147,49 +45770,49 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg }, j); var - k = [0, Sx_runtime[22].call(null, body), 0], - l = [0, body, [0, c1, [0, Sx_runtime[1].call(null, cst_dec, k), 0]]], + k = [0, Sx_runtime[24].call(null, body), 0], + l = [0, body, [0, dV, [0, Sx_runtime[1].call(null, cst_dec, k), 0]]], m = Sx_runtime[1].call(null, cst_slice, l), n = Sx_runtime[5].call(null, m); Stdlib_List[18].call (null, function(e){trampoline(eval_expr(e, local)); return 0;}, n); - var o = Sx_runtime[14].call(null, body); + var o = Sx_runtime[16].call(null, body); return Sx_types[36].call(null, o, local); } function step_sf_letrec(args, env, kont){ var thk = sf_letrec(args, env), a = Sx_types[71].call(null, thk); return make_cek_state(Sx_types[70].call(null, thk), a, kont); } - var c9 = [1, 1.], c_ = [1, 2.]; + var d3 = [1, 1.], d4 = [1, 2.]; function sf_dynamic_wind(args, env){ var - before = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - body = trampoline(eval_expr(Sx_runtime[15].call(null, args, c9), env)), - after = trampoline(eval_expr(Sx_runtime[15].call(null, args, c_), env)); - return Sx_runtime[99].call(null, before, body, after, env); + before = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + body = trampoline(eval_expr(Sx_runtime[17].call(null, args, d3), env)), + after = trampoline(eval_expr(Sx_runtime[17].call(null, args, d4), env)); + return Sx_runtime[101].call(null, before, body, after, env); } var - c$ = [0, [1, 1.], 0], - da = [0, [1, 2.], 0], - db = [0, [2, cst_keyword], 0], - dc = [0, [2, cst_value], 0], - dd = [1, 1.], - de = [0, [1, 2.], 0]; + d5 = [0, [1, 1.], 0], + d6 = [0, [1, 2.], 0], + d7 = [0, [2, cst_keyword], 0], + d8 = [0, [2, cst_value], 0], + d9 = [1, 1.], + d_ = [0, [1, 2.], 0]; function sf_scope(args, env){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - rest = Sx_runtime[1].call(null, cst_slice, [0, args, c$]), - b = [0, Sx_runtime[22].call(null, rest), da], - and = Sx_runtime[1].call(null, cst$13, b); + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + rest = Sx_runtime[1].call(null, cst_slice, [0, args, d5]), + b = [0, Sx_runtime[24].call(null, rest), d6], + and = Sx_runtime[1].call(null, cst$1, b); if(Sx_types[49].call(null, and)){ var - c = Sx_runtime[12].call(null, rest), - d = [0, Sx_runtime[71].call(null, c), db], + c = Sx_runtime[14].call(null, rest), + d = [0, Sx_runtime[73].call(null, c), d7], and$0 = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, and$0)) var - e = Sx_runtime[12].call(null, rest), - f = [0, Sx_types[51].call(null, e), dc], + e = Sx_runtime[14].call(null, rest), + f = [0, Sx_types[51].call(null, e), d8], a = Sx_runtime[1].call(null, cst, f); else var a = and$0; @@ -35198,64 +45821,64 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)) var - g = trampoline(eval_expr(Sx_runtime[15].call(null, rest, dd), env)), - body_exprs = Sx_runtime[1].call(null, cst_slice, [0, rest, de]), + g = trampoline(eval_expr(Sx_runtime[17].call(null, rest, d9), env)), + body_exprs = Sx_runtime[1].call(null, cst_slice, [0, rest, d_]), val = g; else var body_exprs = rest, val = 0; - Sx_runtime[100].call(null, name, val); + Sx_runtime[102].call(null, name, val); var h = Sx_runtime[5].call(null, body_exprs), result = [0, 0]; Stdlib_List[18].call (null, function(e){result[1] = trampoline(eval_expr(e, env)); return 0;}, h); - Sx_runtime[101].call(null, name); + Sx_runtime[103].call(null, name); return result[1]; } - var df = [1, 1.], dg = [0, [1, 2.], 0]; + var d$ = [1, 1.], ea = [0, [1, 2.], 0]; function sf_provide(args, env){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - val = trampoline(eval_expr(Sx_runtime[15].call(null, args, df), env)), - body_exprs = Sx_runtime[1].call(null, cst_slice, [0, args, dg]); - Sx_runtime[100].call(null, name, val); + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + val = trampoline(eval_expr(Sx_runtime[17].call(null, args, d$), env)), + body_exprs = Sx_runtime[1].call(null, cst_slice, [0, args, ea]); + Sx_runtime[102].call(null, name, val); var a = Sx_runtime[5].call(null, body_exprs), result = [0, 0]; Stdlib_List[18].call (null, function(e){result[1] = trampoline(eval_expr(e, env)); return 0;}, a); - Sx_runtime[101].call(null, name); + Sx_runtime[103].call(null, name); return result[1]; } var cst_sr_literals = "__sr-literals", cst_sr_rules = "__sr-rules", cst_syntax_rules_body = "__syntax-rules-body__", - dh = [0, [2, cst_syntax_rules_body], 0], - di = [2, cst_sr_rules], - dj = [2, cst_sr_literals], - dk = [1, 1.], - dl = [1, 1.]; + eb = [0, [2, cst_syntax_rules_body], 0], + ec = [2, cst_sr_rules], + ed = [2, cst_sr_literals], + ee = [1, 1.], + ef = [1, 1.]; function expand_macro(mac, raw_args, env){ var body = Sx_types[68].call(null, mac), - and = Sx_runtime[37].call(null, body); + and = Sx_runtime[39].call(null, body); if(Sx_types[49].call(null, and)) var - b = [0, Sx_types[50].call(null, body), dh], + b = [0, Sx_types[50].call(null, body), eb], a = Sx_runtime[1].call(null, cst, b); else var a = and; if(Sx_types[49].call(null, a)){ var closure = Sx_types[69].call(null, mac), - c = Sx_runtime[74].call(null, closure, di); + c = Sx_runtime[76].call(null, closure, ec); return syntax_rules_expand - (Sx_runtime[74].call(null, closure, dj), c, raw_args); + (Sx_runtime[76].call(null, closure, ed), c, raw_args); } var d = Sx_types[69].call(null, mac), - local = Sx_runtime[79].call(null, d, env), + local = Sx_runtime[81].call(null, d, env), e = Sx_types[66].call(null, mac), f = Sx_runtime[5].call(null, e), g = @@ -35269,19 +45892,19 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(pair){ var - b = [0, Sx_runtime[22].call(null, raw_args), 0], - c = [0, Sx_runtime[15].call(null, pair, dk), b], - d = Sx_runtime[1].call(null, cst$5, c); + b = [0, Sx_runtime[24].call(null, raw_args), 0], + c = [0, Sx_runtime[17].call(null, pair, ee), b], + d = Sx_runtime[1].call(null, cst$2, c); if(Sx_types[49].call(null, d)) var - e = Sx_runtime[15].call(null, pair, dl), - a = Sx_runtime[15].call(null, raw_args, e); + e = Sx_runtime[17].call(null, pair, ef), + a = Sx_runtime[17].call(null, raw_args, e); else var a = 0; var - f = Sx_runtime[12].call(null, pair), + f = Sx_runtime[14].call(null, pair), g = Sx_runtime[3].call(null, f); - Sx_runtime[75].call(null, local, g, a); + Sx_runtime[77].call(null, local, g, a); return 0; }, h); @@ -35289,11 +45912,11 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(Sx_types[49].call(null, i)){ var j = Sx_types[66].call(null, mac), - k = [0, raw_args, [0, Sx_runtime[22].call(null, j), 0]], + k = [0, raw_args, [0, Sx_runtime[24].call(null, j), 0]], l = Sx_runtime[1].call(null, cst_slice, k), m = Sx_types[67].call(null, mac), n = Sx_runtime[3].call(null, m); - Sx_runtime[75].call(null, local, n, l); + Sx_runtime[77].call(null, local, n, l); } return trampoline(eval_expr(Sx_types[68].call(null, mac), local)); } @@ -35310,74 +45933,74 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } var cst_IO_suspension_in_non_IO_co = "IO suspension in non-IO context", - dm = [2, cst_IO_suspension_in_non_IO_co]; + eg = [2, cst_IO_suspension_in_non_IO_co]; function cek_run(state){ var final = cek_step_loop(state), a = cek_suspended_p(final); if(! Sx_types[49].call(null, a)) return cek_value(final); - var b = Sx_runtime[2].call(null, dm); + var b = Sx_runtime[2].call(null, eg); throw caml_maybe_attach_backtrace([0, Sx_types[8], b], 1); } function cek_resume(suspended_state, result){ var a = cek_kont(suspended_state); return cek_step_loop(make_cek_value(result, cek_env(suspended_state), a)); } - var dn = [0, [2, cst_eval], 0]; + var eh = [0, [2, cst_eval], 0]; function cek_step(state){ - var a = [0, cek_phase(state), dn], b = Sx_runtime[1].call(null, cst, a); + var a = [0, cek_phase(state), eh], b = Sx_runtime[1].call(null, cst, a); return Sx_types[49].call(null, b) ? step_eval(state) : step_continue(state); } var cst_starts_with = "starts-with?", - dp = [2, cst_number], - dq = [2, cst_string], - dr = [2, cst_boolean], - ds = [2, cst_nil], - dt = [2, cst_symbol], - du = [0, [2, cst$12], 0], - dv = [0, [2, "true"], 0], - dw = [0, 1], - dx = [0, [2, "false"], 0], - dy = [0, 0], - dz = [0, [2, cst_nil], 0], - dA = [2, "Undefined symbol: "], - dB = [2, cst_keyword], - dC = [2, cst_dict], - dD = [5, 0], - dE = [2, cst_list], - dF = [5, 0]; + ei = [2, cst_number], + ej = [2, cst_string], + ek = [2, cst_boolean], + el = [2, cst_nil], + em = [2, cst_symbol], + en = [0, [2, cst$13], 0], + eo = [0, [2, "true"], 0], + ep = [0, 1], + eq = [0, [2, "false"], 0], + er = [0, 0], + es = [0, [2, cst_nil], 0], + et = [2, "Undefined symbol: "], + eu = [2, cst_keyword], + ev = [2, cst_dict], + ew = [5, 0], + ex = [2, cst_list], + ey = [5, 0]; function step_eval(state){ var expr = cek_control(state), env = cek_env(state), kont = cek_kont(state), - match_val = Sx_runtime[71].call(null, expr); - if(caml_equal(match_val, dp)) return make_cek_value(expr, env, kont); - if(caml_equal(match_val, dq)) return make_cek_value(expr, env, kont); - if(caml_equal(match_val, dr)) return make_cek_value(expr, env, kont); - if(caml_equal(match_val, ds)) return make_cek_value(0, env, kont); - if(! caml_equal(match_val, dt)){ - if(caml_equal(match_val, dB)) + match_val = Sx_runtime[73].call(null, expr); + if(caml_equal(match_val, ei)) return make_cek_value(expr, env, kont); + if(caml_equal(match_val, ej)) return make_cek_value(expr, env, kont); + if(caml_equal(match_val, ek)) return make_cek_value(expr, env, kont); + if(caml_equal(match_val, el)) return make_cek_value(0, env, kont); + if(! caml_equal(match_val, em)){ + if(caml_equal(match_val, eu)) return make_cek_value(Sx_types[51].call(null, expr), env, kont); - if(caml_equal(match_val, dC)){ + if(caml_equal(match_val, ev)){ var ks = Sx_runtime[1].call(null, cst_keys, [0, expr, 0]), - h = Sx_runtime[31].call(null, ks); + h = Sx_runtime[33].call(null, ks); if(Sx_types[49].call(null, h)) return make_cek_value ([6, Stdlib_Hashtbl[1].call(null, 0, 0)], env, kont); var - first_key = Sx_runtime[12].call(null, ks), - i = Sx_runtime[13].call(null, ks), + first_key = Sx_runtime[14].call(null, ks), + i = Sx_runtime[15].call(null, ks), j = Sx_runtime[5].call(null, i), - remaining_entries = [0, dD]; + remaining_entries = [0, ew]; Stdlib_List[18].call (null, function(k){ - var a = [5, [0, k, [0, Sx_runtime[23].call(null, expr, k), 0]]]; + var a = [5, [0, k, [0, Sx_runtime[25].call(null, expr, k), 0]]]; remaining_entries[1] = - Sx_runtime[8].call(null, remaining_entries[1], a); + Sx_runtime[10].call(null, remaining_entries[1], a); return 0; }, j); @@ -35388,36 +46011,36 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (remaining_entries[1], [5, [0, [5, [0, first_key, 0]], 0]], env), kont); return make_cek_state - (Sx_runtime[23].call(null, expr, first_key), env, k); + (Sx_runtime[25].call(null, expr, first_key), env, k); } - if(! caml_equal(match_val, dE)) return make_cek_value(expr, env, kont); - var l = Sx_runtime[31].call(null, expr); + if(! caml_equal(match_val, ex)) return make_cek_value(expr, env, kont); + var l = Sx_runtime[33].call(null, expr); return Sx_types[49].call(null, l) - ? make_cek_value(dF, env, kont) + ? make_cek_value(ey, env, kont) : step_eval_list(expr, env, kont); } var name = Sx_types[50].call(null, expr), - a = Sx_runtime[73].call(null, env, name); + a = Sx_runtime[75].call(null, env, name); if(Sx_types[49].call(null, a)) - var val = Sx_runtime[74].call(null, env, name); + var val = Sx_runtime[76].call(null, env, name); else{ - var b = Sx_runtime[89].call(null, name); + var b = Sx_runtime[91].call(null, name); if(Sx_types[49].call(null, b)) - var val = Sx_runtime[90].call(null, name); + var val = Sx_runtime[92].call(null, name); else{ - var c = Sx_runtime[1].call(null, cst, [0, name, dv]); + var c = Sx_runtime[1].call(null, cst, [0, name, eo]); if(Sx_types[49].call(null, c)) - var val = dw; + var val = ep; else{ - var d = Sx_runtime[1].call(null, cst, [0, name, dx]); + var d = Sx_runtime[1].call(null, cst, [0, name, eq]); if(Sx_types[49].call(null, d)) - var val = dy; + var val = er; else{ - var e = Sx_runtime[1].call(null, cst, [0, name, dz]); + var e = Sx_runtime[1].call(null, cst, [0, name, es]); if(! Sx_types[49].call(null, e)){ var - f = [2, Sx_runtime[4].call(null, [0, dA, [0, name, 0]])], + f = [2, Sx_runtime[4].call(null, [0, et, [0, name, 0]])], g = Sx_runtime[2].call(null, f); throw caml_maybe_attach_backtrace([0, Sx_types[8], g], 1); } @@ -35426,15 +46049,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } } } - var and = Sx_runtime[81].call(null, val); + var and = Sx_runtime[83].call(null, val); if(Sx_types[49].call(null, and)) - Sx_runtime[1].call(null, cst_starts_with, [0, name, du]); + Sx_runtime[1].call(null, cst_starts_with, [0, name, en]); return make_cek_value(val, env, kont); } - var dG = [0, 0]; + var ez = [0, 0]; function step_sf_raise(args, env, kont){ - var a = kont_push(make_raise_eval_frame(env, dG), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + var a = kont_push(make_raise_eval_frame(env, ez), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } var cst$14 = "_", @@ -35442,11 +46065,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_guard_result = "__guard-result", cst_call_cc = "call/cc", cst_first = "first", - cst_fn = "fn", cst_handler_bind = "handler-bind", cst_raise = "raise", - dH = [2, "__guard-reraise__"], - dI = + eA = [2, "__guard-reraise__"], + eB = [0, [5, [0, @@ -35455,45 +46077,45 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg [5, [0, [3, "nth"], [0, [3, cst_guard_result], [0, [1, 1.], 0]]]], 0]]], [0, [3, cst_guard_result], 0]], - dJ = [3, cst_quote], - dK = [5, [0, [3, cst_first], [0, [3, cst_guard_result], 0]]], - dL = [3, cst], - dM = + eC = [3, cst_quote], + eD = [5, [0, [3, cst_first], [0, [3, cst_guard_result], 0]]], + eE = [3, cst], + eF = [5, [0, [3, cst], [0, [5, [0, [3, "len"], [0, [3, cst_guard_result], 0]]], [0, [1, 2.], 0]]]], - dN = [5, [0, [3, "list?"], [0, [3, cst_guard_result], 0]]], - dO = [3, cst_and], - dP = [3, cst_if], - dQ = [3, cst_begin], - dR = [3, cst_guard_k], - dS = [3, cst_quote], - dT = [3, cst_list], - dU = [3, cst_else], - dV = [3, cst_cond], - dW = [3, cst_guard_k], - dX = [3, cst_fn], - dY = [5, [0, [0, 1], 0]], - dZ = [5, [0, [3, cst$14], 0]], - d0 = [3, cst_fn], - d1 = [3, cst_handler_bind], - d2 = [5, [0, [3, cst_guard_k], 0]], - d3 = [3, cst_fn], - d4 = [3, cst_call_cc], - d5 = [3, cst_guard_result], - d6 = [3, cst_let]; + eG = [5, [0, [3, "list?"], [0, [3, cst_guard_result], 0]]], + eH = [3, cst_and], + eI = [3, cst_if], + eJ = [3, cst_begin], + eK = [3, cst_guard_k], + eL = [3, cst_quote], + eM = [3, cst_list], + eN = [3, cst_else], + eO = [3, cst_cond], + eP = [3, cst_guard_k], + eQ = [3, cst_fn], + eR = [5, [0, [0, 1], 0]], + eS = [5, [0, [3, cst$14], 0]], + eT = [3, cst_fn], + eU = [3, cst_handler_bind], + eV = [5, [0, [3, cst_guard_k], 0]], + eW = [3, cst_fn], + eX = [3, cst_call_cc], + eY = [3, cst_guard_result], + eZ = [3, cst_let]; function step_sf_guard$0(counter, args, env, kont){ var - var_clauses = Sx_runtime[12].call(null, args), - body = Sx_runtime[13].call(null, args), - var$ = Sx_runtime[12].call(null, var_clauses), - clauses = Sx_runtime[13].call(null, var_clauses), - sentinel = Sx_types[37].call(null, dH), + var_clauses = Sx_runtime[14].call(null, args), + body = Sx_runtime[15].call(null, args), + var$ = Sx_runtime[14].call(null, var_clauses), + clauses = Sx_runtime[15].call(null, var_clauses), + sentinel = Sx_types[37].call(null, eA), b = - [5, [0, [5, [0, dR, [0, Sx_runtime[16].call(null, dQ, body), 0]]], 0]], + [5, [0, [5, [0, eK, [0, Sx_runtime[18].call(null, eJ, body), 0]]], 0]], c = Sx_runtime[1].call (null, @@ -35505,45 +46127,45 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg [0, [5, [0, - dU, + eN, [0, [5, - [0, dT, [0, [5, [0, dS, [0, sentinel, 0]]], [0, var$, 0]]]], + [0, eM, [0, [5, [0, eL, [0, sentinel, 0]]], [0, var$, 0]]]], 0]]], 0]], 0]]), - d = [5, [0, [5, [0, dW, [0, Sx_runtime[16].call(null, dV, c), 0]]], 0]], - e = Sx_runtime[16].call(null, [5, [0, var$, 0]], d), - f = [0, Sx_runtime[16].call(null, dX, e), 0], - g = Sx_runtime[16].call(null, dZ, dY), - h = [5, [0, [5, [0, Sx_runtime[16].call(null, d0, g), f]], 0]], - i = Sx_runtime[16].call(null, h, b), - j = [5, [0, Sx_runtime[16].call(null, d1, i), 0]], - k = Sx_runtime[16].call(null, d2, j), - l = [5, [0, Sx_runtime[16].call(null, d3, k), 0]], + d = [5, [0, [5, [0, eP, [0, Sx_runtime[18].call(null, eO, c), 0]]], 0]], + e = Sx_runtime[18].call(null, [5, [0, var$, 0]], d), + f = [0, Sx_runtime[18].call(null, eQ, e), 0], + g = Sx_runtime[18].call(null, eS, eR), + h = [5, [0, [5, [0, Sx_runtime[18].call(null, eT, g), f]], 0]], + i = Sx_runtime[18].call(null, h, b), + j = [5, [0, Sx_runtime[18].call(null, eU, i), 0]], + k = Sx_runtime[18].call(null, eV, j), + l = [5, [0, Sx_runtime[18].call(null, eW, k), 0]], a = [5, [0, - d6, + eZ, [0, - [5, [0, [5, [0, d5, [0, Sx_runtime[16].call(null, d4, l), 0]]], 0]], + [5, [0, [5, [0, eY, [0, Sx_runtime[18].call(null, eX, l), 0]]], 0]], [0, [5, [0, - dP, + eI, [0, [5, [0, - dO, + eH, [0, - dN, + eG, [0, - dM, + eF, [0, [5, - [0, dL, [0, dK, [0, [5, [0, dJ, [0, sentinel, 0]]], 0]]]], + [0, eE, [0, eD, [0, [5, [0, eC, [0, sentinel, 0]]], 0]]]], 0]]]]], - dI]]], + eB]]], 0]]]]; return counter < 50 ? step_eval_list$0(counter + 1 | 0, a, env, kont) @@ -35554,28 +46176,28 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } function step_sf_callcc(args, env, kont){ var a = kont_push(make_callcc_frame(env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } function step_sf_case(args, env, kont){ var a = kont_push - (make_case_frame(0, Sx_runtime[13].call(null, args), env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + (make_case_frame(0, Sx_runtime[15].call(null, args), env), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var d7 = [1, 1.], d8 = [3, cst_begin]; + var e0 = [1, 1.], e1 = [3, cst_begin]; function step_sf_let_match(args, env, kont){ var - pattern = Sx_runtime[12].call(null, args), - expr = Sx_runtime[15].call(null, args, d7), - a = Sx_runtime[13].call(null, args), - body = Sx_runtime[13].call(null, a); + pattern = Sx_runtime[14].call(null, args), + expr = Sx_runtime[17].call(null, args, e0), + a = Sx_runtime[15].call(null, args), + body = Sx_runtime[15].call(null, a); return step_sf_match ([5, [0, expr, [0, - [5, [0, pattern, [0, Sx_runtime[16].call(null, d8, body), 0]]], + [5, [0, pattern, [0, Sx_runtime[18].call(null, e1, body), 0]]], 0]]], env, kont); @@ -35589,184 +46211,188 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_syntax_rules = "syntax-rules", render_check = 0, render_fn = 0, - d9 = [0, [2, cst_symbol], 0], - d_ = [5, 0], - d$ = [5, 0], - ea = [0, [2, cst_symbol], 0], - eb = [0, [2, cst_if], 0], - ec = [0, [2, cst_when], 0], - ed = [0, [2, cst_cond], 0], - ee = [0, [2, cst_case], 0], - ef = [0, [2, cst_and], 0], - eg = [0, [2, cst_or], 0], - eh = [0, [2, cst_let], 0], - ei = [0, [2, "let*"], 0], - ej = [0, [2, cst_lambda], 0], - ek = [0, [2, cst_fn], 0], - el = [0, [2, cst_define], 0], - em = [0, [2, "defcomp"], 0], - en = [0, [2, "defisland"], 0], - eo = [0, [2, "defmacro"], 0], - ep = [0, [2, "defio"], 0], - eq = [0, [2, "io"], 0], - er = [0, [2, cst_begin], 0], - es = [0, [2, "do"], 0], - et = [1, 1.], - eu = [1, 1.], - ev = [0, [1, 2.], 0], - ew = [1, 2.], - ex = [3, cst_do_loop], - ey = [3, cst_begin], - ez = [3, cst_if], - eA = [1, 1.], - eB = [3, cst_do_loop], - eC = [3, cst_let], - eD = [3, cst_begin], - eE = [0, [2, "guard"], 0], - eF = [0, [2, cst_quote], 0], - eG = [0, [2, "quasiquote"], 0], - eH = [0, [2, "->"], 0], - eI = [0, [2, "->>"], 0], - eJ = [0, [2, "|>"], 0], - eK = [0, [2, "as->"], 0], - eL = [0, [2, "set!"], 0], - eM = [0, [2, "letrec"], 0], - eN = [0, [2, cst_reset], 0], - eO = [0, [2, "shift"], 0], - eP = [0, [2, cst_deref], 0], - eQ = [0, [2, cst_scope], 0], - eR = [0, [2, cst_provide], 0], - eS = [0, [2, cst_peek], 0], - eT = [0, [2, "provide!"], 0], - eU = [0, [2, "context"], 0], - eV = [0, [2, cst_bind], 0], - eW = [0, [2, "emit!"], 0], - eX = [0, [2, cst_emitted], 0], - eY = [0, [2, cst_handler_bind], 0], - eZ = [0, [2, "restart-case"], 0], - e0 = [0, [2, "signal-condition"], 0], - e1 = [0, [2, "invoke-restart"], 0], - e2 = [0, [2, "match"], 0], - e3 = [0, [2, "let-match"], 0], - e4 = [0, [2, cst_dynamic_wind], 0], - e5 = [0, [2, cst_map], 0], - e6 = [0, [2, cst_map_indexed], 0], - e7 = [0, [2, cst_filter], 0], - e8 = [0, [2, cst_reduce], 0], - e9 = [0, [2, cst_some], 0], - e_ = [0, [2, cst_every$0], 0], - e$ = [0, [2, cst_for_each], 0], - fa = [0, [2, cst_raise], 0], - fb = [0, [2, "raise-continuable"], 0], - fc = [0, 1], - fd = [0, [2, cst_call_cc], 0], - fe = [0, [2, "call-with-current-continuation"], 0], - ff = [0, [2, cst_perform], 0], - fg = [0, [2, "define-library"], 0], - fh = [0, [2, cst_import], 0], - fi = [0, [2, "define-record-type"], 0], - fj = [0, [2, "define-protocol"], 0], - fk = [0, [2, "implement"], 0], - fl = [0, [2, cst_parameterize], 0], - fm = [0, [2, cst_syntax_rules], 0], - fn = [0, [2, "define-syntax"], 0], - fo = [0, [2, cst_lambda], 0], - fp = [0, [2, cst_list], 0]; + e2 = [0, [2, cst_symbol], 0], + e3 = [5, 0], + e4 = [5, 0], + e5 = [0, [2, cst_symbol], 0], + e6 = [0, [2, cst_if], 0], + e7 = [0, [2, cst_when], 0], + e8 = [0, [2, cst_cond], 0], + e9 = [0, [2, cst_case], 0], + e_ = [0, [2, cst_and], 0], + e$ = [0, [2, cst_or], 0], + fa = [0, [2, cst_let], 0], + fb = [0, [2, "let*"], 0], + fc = [0, [2, cst_lambda], 0], + fd = [0, [2, cst_fn], 0], + fe = [0, [2, cst_define], 0], + ff = [0, [2, "defcomp"], 0], + fg = [0, [2, "defisland"], 0], + fh = [0, [2, "defmacro"], 0], + fi = [0, [2, "defio"], 0], + fj = [0, [2, cst_define_foreign], 0], + fk = [0, [2, "io"], 0], + fl = [0, [2, cst_begin], 0], + fm = [0, [2, "do"], 0], + fn = [1, 1.], + fo = [1, 1.], + fp = [0, [1, 2.], 0], + fq = [1, 2.], + fr = [3, cst_do_loop], + fs = [3, cst_begin], + ft = [3, cst_if], + fu = [1, 1.], + fv = [3, cst_do_loop], + fw = [3, cst_let], + fx = [3, cst_begin], + fy = [0, [2, "guard"], 0], + fz = [0, [2, cst_quote], 0], + fA = [0, [2, "quasiquote"], 0], + fB = [0, [2, "->"], 0], + fC = [0, [2, "->>"], 0], + fD = [0, [2, "|>"], 0], + fE = [0, [2, "as->"], 0], + fF = [0, [2, "set!"], 0], + fG = [0, [2, "letrec"], 0], + fH = [0, [2, cst_reset], 0], + fI = [0, [2, "shift"], 0], + fJ = [0, [2, cst_deref], 0], + fK = [0, [2, cst_scope], 0], + fL = [0, [2, cst_provide], 0], + fM = [0, [2, cst_peek], 0], + fN = [0, [2, "provide!"], 0], + fO = [0, [2, "context"], 0], + fP = [0, [2, cst_bind], 0], + fQ = [0, [2, "emit!"], 0], + fR = [0, [2, cst_emitted], 0], + fS = [0, [2, cst_handler_bind], 0], + fT = [0, [2, "restart-case"], 0], + fU = [0, [2, "signal-condition"], 0], + fV = [0, [2, "invoke-restart"], 0], + fW = [0, [2, "match"], 0], + fX = [0, [2, "let-match"], 0], + fY = [0, [2, cst_dynamic_wind], 0], + fZ = [0, [2, cst_map], 0], + f0 = [0, [2, cst_map_indexed], 0], + f1 = [0, [2, cst_filter], 0], + f2 = [0, [2, cst_reduce], 0], + f3 = [0, [2, cst_some], 0], + f4 = [0, [2, cst_every$0], 0], + f5 = [0, [2, cst_for_each], 0], + f6 = [0, [2, cst_raise], 0], + f7 = [0, [2, "raise-continuable"], 0], + f8 = [0, 1], + f9 = [0, [2, cst_call_cc], 0], + f_ = [0, [2, "call-with-current-continuation"], 0], + f$ = [0, [2, cst_perform], 0], + ga = [0, [2, "define-library"], 0], + gb = [0, [2, cst_import], 0], + gc = [0, [2, "define-record-type"], 0], + gd = [0, [2, "define-protocol"], 0], + ge = [0, [2, "implement"], 0], + gf = [0, [2, cst_parameterize], 0], + gg = [0, [2, cst_syntax_rules], 0], + gh = [0, [2, "define-syntax"], 0], + gi = [0, [2, cst_lambda], 0], + gj = [0, [2, cst_list], 0]; function step_eval_list$0(counter, expr$1, env, kont){ var expr = expr$1; for(;;){ var - head = Sx_runtime[12].call(null, expr), - args = Sx_runtime[13].call(null, expr), - c = [0, Sx_runtime[71].call(null, head), d9], + head = Sx_runtime[14].call(null, expr), + args = Sx_runtime[15].call(null, expr), + c = [0, Sx_runtime[73].call(null, head), e2], or = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, or)) var or$0 = or; else{ var - aV = [0, Sx_runtime[71].call(null, head), fo], - or$1 = Sx_runtime[1].call(null, cst, aV); + aW = [0, Sx_runtime[73].call(null, head), gi], + or$1 = Sx_runtime[1].call(null, cst, aW); if(Sx_types[49].call(null, or$1)) var or$0 = or$1; else var - aW = [0, Sx_runtime[71].call(null, head), fp], - or$0 = Sx_runtime[1].call(null, cst, aW); + aX = [0, Sx_runtime[73].call(null, head), gj], + or$0 = Sx_runtime[1].call(null, cst, aX); } var d = [0, 1 - Sx_types[49].call(null, or$0)]; if(Sx_types[49].call(null, d)){ - var e = Sx_runtime[31].call(null, expr); - if(Sx_types[49].call(null, e)) return make_cek_value(d_, env, kont); + var e = Sx_runtime[33].call(null, expr); + if(Sx_types[49].call(null, e)) return make_cek_value(e3, env, kont); var f = kont_push - (make_map_frame(0, Sx_runtime[13].call(null, expr), d$, env), kont); - return make_cek_state(Sx_runtime[12].call(null, expr), env, f); + (make_map_frame(0, Sx_runtime[15].call(null, expr), e4, env), kont); + return make_cek_state(Sx_runtime[14].call(null, expr), env, f); } var - g = [0, Sx_runtime[71].call(null, head), ea], + g = [0, Sx_runtime[73].call(null, head), e5], h = Sx_runtime[1].call(null, cst, g); if(! Sx_types[49].call(null, h)) return step_eval_call(head, args, env, kont); var match_val = Sx_types[50].call(null, head), - i = Sx_runtime[1].call(null, cst, [0, match_val, eb]); + i = Sx_runtime[1].call(null, cst, [0, match_val, e6]); if(Sx_types[49].call(null, i)) return step_sf_if(args, env, kont); - var j = Sx_runtime[1].call(null, cst, [0, match_val, ec]); + var j = Sx_runtime[1].call(null, cst, [0, match_val, e7]); if(Sx_types[49].call(null, j)) return step_sf_when(args, env, kont); - var k = Sx_runtime[1].call(null, cst, [0, match_val, ed]); + var k = Sx_runtime[1].call(null, cst, [0, match_val, e8]); if(Sx_types[49].call(null, k)) return step_sf_cond(args, env, kont); - var l = Sx_runtime[1].call(null, cst, [0, match_val, ee]); + var l = Sx_runtime[1].call(null, cst, [0, match_val, e9]); if(Sx_types[49].call(null, l)) return step_sf_case(args, env, kont); - var m = Sx_runtime[1].call(null, cst, [0, match_val, ef]); + var m = Sx_runtime[1].call(null, cst, [0, match_val, e_]); if(Sx_types[49].call(null, m)) return step_sf_and(args, env, kont); - var n = Sx_runtime[1].call(null, cst, [0, match_val, eg]); + var n = Sx_runtime[1].call(null, cst, [0, match_val, e$]); if(Sx_types[49].call(null, n)) return step_sf_or(args, env, kont); - var o = Sx_runtime[1].call(null, cst, [0, match_val, eh]); + var o = Sx_runtime[1].call(null, cst, [0, match_val, fa]); if(Sx_types[49].call(null, o)) return step_sf_let(args, env, kont); - var p = Sx_runtime[1].call(null, cst, [0, match_val, ei]); + var p = Sx_runtime[1].call(null, cst, [0, match_val, fb]); if(Sx_types[49].call(null, p)) return step_sf_let(args, env, kont); - var q = Sx_runtime[1].call(null, cst, [0, match_val, ej]); + var q = Sx_runtime[1].call(null, cst, [0, match_val, fc]); if(Sx_types[49].call(null, q)) return step_sf_lambda(args, env, kont); - var r = Sx_runtime[1].call(null, cst, [0, match_val, ek]); + var r = Sx_runtime[1].call(null, cst, [0, match_val, fd]); if(Sx_types[49].call(null, r)) return step_sf_lambda(args, env, kont); - var s = Sx_runtime[1].call(null, cst, [0, match_val, el]); + var s = Sx_runtime[1].call(null, cst, [0, match_val, fe]); if(Sx_types[49].call(null, s)) return step_sf_define(args, env, kont); - var t = Sx_runtime[1].call(null, cst, [0, match_val, em]); + var t = Sx_runtime[1].call(null, cst, [0, match_val, ff]); if(Sx_types[49].call(null, t)) return make_cek_value(sf_defcomp(args, env), env, kont); - var u = Sx_runtime[1].call(null, cst, [0, match_val, en]); + var u = Sx_runtime[1].call(null, cst, [0, match_val, fg]); if(Sx_types[49].call(null, u)) return make_cek_value(sf_defisland(args, env), env, kont); - var v = Sx_runtime[1].call(null, cst, [0, match_val, eo]); + var v = Sx_runtime[1].call(null, cst, [0, match_val, fh]); if(Sx_types[49].call(null, v)) return make_cek_value(sf_defmacro(args, env), env, kont); - var w = Sx_runtime[1].call(null, cst, [0, match_val, ep]); + var w = Sx_runtime[1].call(null, cst, [0, match_val, fi]); if(Sx_types[49].call(null, w)) return make_cek_value(sf_defio(args, env), env, kont); - var x = Sx_runtime[1].call(null, cst, [0, match_val, eq]); - if(Sx_types[49].call(null, x)) return step_sf_io(args, env, kont); - var y = Sx_runtime[1].call(null, cst, [0, match_val, er]); - if(Sx_types[49].call(null, y)) return step_sf_begin(args, env, kont); - var z = Sx_runtime[1].call(null, cst, [0, match_val, es]); - if(! Sx_types[49].call(null, z)) break; + var x = Sx_runtime[1].call(null, cst, [0, match_val, fj]); + if(Sx_types[49].call(null, x)) + return step_sf_define_foreign(args, env, kont); + var y = Sx_runtime[1].call(null, cst, [0, match_val, fk]); + if(Sx_types[49].call(null, y)) return step_sf_io(args, env, kont); + var z = Sx_runtime[1].call(null, cst, [0, match_val, fl]); + if(Sx_types[49].call(null, z)) return step_sf_begin(args, env, kont); + var A = Sx_runtime[1].call(null, cst, [0, match_val, fm]); + if(! Sx_types[49].call(null, A)) break; var - A = Sx_runtime[31].call(null, args), - and = [0, 1 - Sx_types[49].call(null, A)]; + B = Sx_runtime[33].call(null, args), + and = [0, 1 - Sx_types[49].call(null, B)]; if(Sx_types[49].call(null, and)){ var - B = Sx_runtime[12].call(null, args), - and$0 = Sx_runtime[35].call(null, B); + C = Sx_runtime[14].call(null, args), + and$0 = Sx_runtime[37].call(null, C); if(Sx_types[49].call(null, and$0)){ var - C = Sx_runtime[12].call(null, args), - D = Sx_runtime[31].call(null, C), - and$1 = [0, 1 - Sx_types[49].call(null, D)]; + D = Sx_runtime[14].call(null, args), + E = Sx_runtime[33].call(null, D), + and$1 = [0, 1 - Sx_types[49].call(null, E)]; if(Sx_types[49].call(null, and$1)) var - E = Sx_runtime[12].call(null, args), - F = Sx_runtime[12].call(null, E), - a = Sx_runtime[35].call(null, F); + F = Sx_runtime[14].call(null, args), + G = Sx_runtime[14].call(null, F), + a = Sx_runtime[37].call(null, G); else var a = and$1; } @@ -35777,206 +46403,206 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(! Sx_types[49].call(null, a)) return step_sf_begin(args, env, kont); var - bindings = Sx_runtime[12].call(null, args), - test_clause = Sx_runtime[15].call(null, args, et), - G = Sx_runtime[13].call(null, args), - body = Sx_runtime[13].call(null, G), - H = Sx_runtime[5].call(null, bindings); + bindings = Sx_runtime[14].call(null, args), + test_clause = Sx_runtime[17].call(null, args, fn), + H = Sx_runtime[15].call(null, args), + body = Sx_runtime[15].call(null, H), + I = Sx_runtime[5].call(null, bindings); Stdlib_List[20].call - (null, function(b){return Sx_runtime[12].call(null, b);}, H); - var I = Sx_runtime[5].call(null, bindings); + (null, function(b){return Sx_runtime[14].call(null, b);}, I); + var J = Sx_runtime[5].call(null, bindings); Stdlib_List[20].call - (null, function(b){return Sx_runtime[15].call(null, b, eu);}, I); + (null, function(b){return Sx_runtime[17].call(null, b, fo);}, J); var - J = Sx_runtime[5].call(null, bindings), + K = Sx_runtime[5].call(null, bindings), steps = [5, Stdlib_List[20].call (null, function(b){ var - a = [0, Sx_runtime[22].call(null, b), ev], - c = Sx_runtime[1].call(null, cst$6, a); + a = [0, Sx_runtime[24].call(null, b), fp], + c = Sx_runtime[1].call(null, cst$7, a); return Sx_types[49].call(null, c) - ? Sx_runtime[15].call(null, b, ew) - : Sx_runtime[12].call(null, b); + ? Sx_runtime[17].call(null, b, fq) + : Sx_runtime[14].call(null, b); }, - J)], - test = Sx_runtime[12].call(null, test_clause), - result = Sx_runtime[13].call(null, test_clause), - K = [0, body, [0, [5, [0, Sx_runtime[16].call(null, ex, steps), 0]], 0]], - L = Sx_runtime[1].call(null, cst_append, K), - M = [5, [0, Sx_runtime[16].call(null, ey, L), 0]], - N = Sx_runtime[31].call(null, result), - O = - Sx_types[49].call(null, N) ? 0 : Sx_runtime[16].call(null, eD, result), - P = Sx_runtime[16].call(null, O, M), - Q = Sx_runtime[16].call(null, test, P), - R = [5, [0, Sx_runtime[16].call(null, ez, Q), 0]], - S = Sx_runtime[5].call(null, bindings), - T = + K)], + test = Sx_runtime[14].call(null, test_clause), + result = Sx_runtime[15].call(null, test_clause), + L = [0, body, [0, [5, [0, Sx_runtime[18].call(null, fr, steps), 0]], 0]], + M = Sx_runtime[1].call(null, cst_append, L), + N = [5, [0, Sx_runtime[18].call(null, fs, M), 0]], + O = Sx_runtime[33].call(null, result), + P = + Sx_types[49].call(null, O) ? 0 : Sx_runtime[18].call(null, fx, result), + Q = Sx_runtime[18].call(null, P, N), + R = Sx_runtime[18].call(null, test, Q), + S = [5, [0, Sx_runtime[18].call(null, ft, R), 0]], + T = Sx_runtime[5].call(null, bindings), + U = [5, Stdlib_List[20].call (null, function(b){ - var a = [0, Sx_runtime[15].call(null, b, eA), 0]; - return [5, [0, Sx_runtime[12].call(null, b), a]]; + var a = [0, Sx_runtime[17].call(null, b, fu), 0]; + return [5, [0, Sx_runtime[14].call(null, b), a]]; }, - S)], - U = Sx_runtime[16].call(null, T, R), - V = Sx_runtime[16].call(null, eB, U), - expr$0 = Sx_runtime[16].call(null, eC, V); + T)], + V = Sx_runtime[18].call(null, U, S), + W = Sx_runtime[18].call(null, fv, V), + expr$0 = Sx_runtime[18].call(null, fw, W); expr = expr$0; } - var W = Sx_runtime[1].call(null, cst, [0, match_val, eE]); - if(Sx_types[49].call(null, W)) + var X = Sx_runtime[1].call(null, cst, [0, match_val, fy]); + if(Sx_types[49].call(null, X)) return counter < 50 ? step_sf_guard$0(counter + 1 | 0, args, env, kont) : caml_trampoline_return(step_sf_guard$0, [0, args, env, kont]); - var X = Sx_runtime[1].call(null, cst, [0, match_val, eF]); - if(Sx_types[49].call(null, X)){ + var Y = Sx_runtime[1].call(null, cst, [0, match_val, fz]); + if(Sx_types[49].call(null, Y)){ var - Y = Sx_runtime[31].call(null, args), - Z = Sx_types[49].call(null, Y) ? 0 : Sx_runtime[12].call(null, args); - return make_cek_value(Z, env, kont); + Z = Sx_runtime[33].call(null, args), + _ = Sx_types[49].call(null, Z) ? 0 : Sx_runtime[14].call(null, args); + return make_cek_value(_, env, kont); } - var _ = Sx_runtime[1].call(null, cst, [0, match_val, eG]); - if(Sx_types[49].call(null, _)) - return make_cek_value - (qq_expand(Sx_runtime[12].call(null, args), env), env, kont); - var $ = Sx_runtime[1].call(null, cst, [0, match_val, eH]); + var $ = Sx_runtime[1].call(null, cst, [0, match_val, fA]); if(Sx_types[49].call(null, $)) - return step_sf_thread_first(args, env, kont); - var aa = Sx_runtime[1].call(null, cst, [0, match_val, eI]); + return make_cek_value + (qq_expand(Sx_runtime[14].call(null, args), env), env, kont); + var aa = Sx_runtime[1].call(null, cst, [0, match_val, fB]); if(Sx_types[49].call(null, aa)) - return step_sf_thread_last(args, env, kont); - var ab = Sx_runtime[1].call(null, cst, [0, match_val, eJ]); + return step_sf_thread_first(args, env, kont); + var ab = Sx_runtime[1].call(null, cst, [0, match_val, fC]); if(Sx_types[49].call(null, ab)) return step_sf_thread_last(args, env, kont); - var ac = Sx_runtime[1].call(null, cst, [0, match_val, eK]); - if(Sx_types[49].call(null, ac)) return step_sf_thread_as(args, env, kont); - var ad = Sx_runtime[1].call(null, cst, [0, match_val, eL]); - if(Sx_types[49].call(null, ad)) return step_sf_set_b(args, env, kont); - var ae = Sx_runtime[1].call(null, cst, [0, match_val, eM]); - if(Sx_types[49].call(null, ae)) return step_sf_letrec(args, env, kont); - var af = Sx_runtime[1].call(null, cst, [0, match_val, eN]); - if(Sx_types[49].call(null, af)) return step_sf_reset(args, env, kont); - var ag = Sx_runtime[1].call(null, cst, [0, match_val, eO]); - if(Sx_types[49].call(null, ag)) return step_sf_shift(args, env, kont); - var ah = Sx_runtime[1].call(null, cst, [0, match_val, eP]); - if(Sx_types[49].call(null, ah)) return step_sf_deref(args, env, kont); - var ai = Sx_runtime[1].call(null, cst, [0, match_val, eQ]); - if(Sx_types[49].call(null, ai)) return step_sf_scope(args, env, kont); - var aj = Sx_runtime[1].call(null, cst, [0, match_val, eR]); - if(Sx_types[49].call(null, aj)) return step_sf_provide(args, env, kont); - var ak = Sx_runtime[1].call(null, cst, [0, match_val, eS]); - if(Sx_types[49].call(null, ak)) return step_sf_peek(args, env, kont); - var al = Sx_runtime[1].call(null, cst, [0, match_val, eT]); - if(Sx_types[49].call(null, al)) return step_sf_provide_b(args, env, kont); - var am = Sx_runtime[1].call(null, cst, [0, match_val, eU]); - if(Sx_types[49].call(null, am)) return step_sf_context(args, env, kont); - var an = Sx_runtime[1].call(null, cst, [0, match_val, eV]); - if(Sx_types[49].call(null, an)) return step_sf_bind(args, env, kont); - var ao = Sx_runtime[1].call(null, cst, [0, match_val, eW]); - if(Sx_types[49].call(null, ao)) return step_sf_emit(args, env, kont); - var ap = Sx_runtime[1].call(null, cst, [0, match_val, eX]); - if(Sx_types[49].call(null, ap)) return step_sf_emitted(args, env, kont); - var aq = Sx_runtime[1].call(null, cst, [0, match_val, eY]); - if(Sx_types[49].call(null, aq)) - return step_sf_handler_bind(args, env, kont); - var ar = Sx_runtime[1].call(null, cst, [0, match_val, eZ]); + var ac = Sx_runtime[1].call(null, cst, [0, match_val, fD]); + if(Sx_types[49].call(null, ac)) + return step_sf_thread_last(args, env, kont); + var ad = Sx_runtime[1].call(null, cst, [0, match_val, fE]); + if(Sx_types[49].call(null, ad)) return step_sf_thread_as(args, env, kont); + var ae = Sx_runtime[1].call(null, cst, [0, match_val, fF]); + if(Sx_types[49].call(null, ae)) return step_sf_set_b(args, env, kont); + var af = Sx_runtime[1].call(null, cst, [0, match_val, fG]); + if(Sx_types[49].call(null, af)) return step_sf_letrec(args, env, kont); + var ag = Sx_runtime[1].call(null, cst, [0, match_val, fH]); + if(Sx_types[49].call(null, ag)) return step_sf_reset(args, env, kont); + var ah = Sx_runtime[1].call(null, cst, [0, match_val, fI]); + if(Sx_types[49].call(null, ah)) return step_sf_shift(args, env, kont); + var ai = Sx_runtime[1].call(null, cst, [0, match_val, fJ]); + if(Sx_types[49].call(null, ai)) return step_sf_deref(args, env, kont); + var aj = Sx_runtime[1].call(null, cst, [0, match_val, fK]); + if(Sx_types[49].call(null, aj)) return step_sf_scope(args, env, kont); + var ak = Sx_runtime[1].call(null, cst, [0, match_val, fL]); + if(Sx_types[49].call(null, ak)) return step_sf_provide(args, env, kont); + var al = Sx_runtime[1].call(null, cst, [0, match_val, fM]); + if(Sx_types[49].call(null, al)) return step_sf_peek(args, env, kont); + var am = Sx_runtime[1].call(null, cst, [0, match_val, fN]); + if(Sx_types[49].call(null, am)) return step_sf_provide_b(args, env, kont); + var an = Sx_runtime[1].call(null, cst, [0, match_val, fO]); + if(Sx_types[49].call(null, an)) return step_sf_context(args, env, kont); + var ao = Sx_runtime[1].call(null, cst, [0, match_val, fP]); + if(Sx_types[49].call(null, ao)) return step_sf_bind(args, env, kont); + var ap = Sx_runtime[1].call(null, cst, [0, match_val, fQ]); + if(Sx_types[49].call(null, ap)) return step_sf_emit(args, env, kont); + var aq = Sx_runtime[1].call(null, cst, [0, match_val, fR]); + if(Sx_types[49].call(null, aq)) return step_sf_emitted(args, env, kont); + var ar = Sx_runtime[1].call(null, cst, [0, match_val, fS]); if(Sx_types[49].call(null, ar)) + return step_sf_handler_bind(args, env, kont); + var as = Sx_runtime[1].call(null, cst, [0, match_val, fT]); + if(Sx_types[49].call(null, as)) return step_sf_restart_case(args, env, kont); - var as = Sx_runtime[1].call(null, cst, [0, match_val, e0]); - if(Sx_types[49].call(null, as)) return step_sf_signal(args, env, kont); - var at = Sx_runtime[1].call(null, cst, [0, match_val, e1]); - if(Sx_types[49].call(null, at)) + var at = Sx_runtime[1].call(null, cst, [0, match_val, fU]); + if(Sx_types[49].call(null, at)) return step_sf_signal(args, env, kont); + var au = Sx_runtime[1].call(null, cst, [0, match_val, fV]); + if(Sx_types[49].call(null, au)) return step_sf_invoke_restart(args, env, kont); - var au = Sx_runtime[1].call(null, cst, [0, match_val, e2]); - if(Sx_types[49].call(null, au)) return step_sf_match(args, env, kont); - var av = Sx_runtime[1].call(null, cst, [0, match_val, e3]); - if(Sx_types[49].call(null, av)) return step_sf_let_match(args, env, kont); - var aw = Sx_runtime[1].call(null, cst, [0, match_val, e4]); - if(Sx_types[49].call(null, aw)) + var av = Sx_runtime[1].call(null, cst, [0, match_val, fW]); + if(Sx_types[49].call(null, av)) return step_sf_match(args, env, kont); + var aw = Sx_runtime[1].call(null, cst, [0, match_val, fX]); + if(Sx_types[49].call(null, aw)) return step_sf_let_match(args, env, kont); + var ax = Sx_runtime[1].call(null, cst, [0, match_val, fY]); + if(Sx_types[49].call(null, ax)) return make_cek_value(sf_dynamic_wind(args, env), env, kont); - var ax = Sx_runtime[1].call(null, cst, [0, match_val, e5]); - if(Sx_types[49].call(null, ax)) return step_ho_map(args, env, kont); - var ay = Sx_runtime[1].call(null, cst, [0, match_val, e6]); - if(Sx_types[49].call(null, ay)) + var ay = Sx_runtime[1].call(null, cst, [0, match_val, fZ]); + if(Sx_types[49].call(null, ay)) return step_ho_map(args, env, kont); + var az = Sx_runtime[1].call(null, cst, [0, match_val, f0]); + if(Sx_types[49].call(null, az)) return step_ho_map_indexed(args, env, kont); - var az = Sx_runtime[1].call(null, cst, [0, match_val, e7]); - if(Sx_types[49].call(null, az)) return step_ho_filter(args, env, kont); - var aA = Sx_runtime[1].call(null, cst, [0, match_val, e8]); - if(Sx_types[49].call(null, aA)) return step_ho_reduce(args, env, kont); - var aB = Sx_runtime[1].call(null, cst, [0, match_val, e9]); - if(Sx_types[49].call(null, aB)) return step_ho_some(args, env, kont); - var aC = Sx_runtime[1].call(null, cst, [0, match_val, e_]); - if(Sx_types[49].call(null, aC)) return step_ho_every(args, env, kont); - var aD = Sx_runtime[1].call(null, cst, [0, match_val, e$]); - if(Sx_types[49].call(null, aD)) return step_ho_for_each(args, env, kont); - var aE = Sx_runtime[1].call(null, cst, [0, match_val, fa]); - if(Sx_types[49].call(null, aE)) return step_sf_raise(args, env, kont); - var aF = Sx_runtime[1].call(null, cst, [0, match_val, fb]); - if(Sx_types[49].call(null, aF)){ - var aG = kont_push(make_raise_eval_frame(env, fc), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, aG); + var aA = Sx_runtime[1].call(null, cst, [0, match_val, f1]); + if(Sx_types[49].call(null, aA)) return step_ho_filter(args, env, kont); + var aB = Sx_runtime[1].call(null, cst, [0, match_val, f2]); + if(Sx_types[49].call(null, aB)) return step_ho_reduce(args, env, kont); + var aC = Sx_runtime[1].call(null, cst, [0, match_val, f3]); + if(Sx_types[49].call(null, aC)) return step_ho_some(args, env, kont); + var aD = Sx_runtime[1].call(null, cst, [0, match_val, f4]); + if(Sx_types[49].call(null, aD)) return step_ho_every(args, env, kont); + var aE = Sx_runtime[1].call(null, cst, [0, match_val, f5]); + if(Sx_types[49].call(null, aE)) return step_ho_for_each(args, env, kont); + var aF = Sx_runtime[1].call(null, cst, [0, match_val, f6]); + if(Sx_types[49].call(null, aF)) return step_sf_raise(args, env, kont); + var aG = Sx_runtime[1].call(null, cst, [0, match_val, f7]); + if(Sx_types[49].call(null, aG)){ + var aH = kont_push(make_raise_eval_frame(env, f8), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, aH); } - var aH = Sx_runtime[1].call(null, cst, [0, match_val, fd]); - if(Sx_types[49].call(null, aH)) return step_sf_callcc(args, env, kont); - var aI = Sx_runtime[1].call(null, cst, [0, match_val, fe]); + var aI = Sx_runtime[1].call(null, cst, [0, match_val, f9]); if(Sx_types[49].call(null, aI)) return step_sf_callcc(args, env, kont); - var aJ = Sx_runtime[1].call(null, cst, [0, match_val, ff]); - if(Sx_types[49].call(null, aJ)) return step_sf_perform(args, env, kont); - var aK = Sx_runtime[1].call(null, cst, [0, match_val, fg]); - if(Sx_types[49].call(null, aK)) + var aJ = Sx_runtime[1].call(null, cst, [0, match_val, f_]); + if(Sx_types[49].call(null, aJ)) return step_sf_callcc(args, env, kont); + var aK = Sx_runtime[1].call(null, cst, [0, match_val, f$]); + if(Sx_types[49].call(null, aK)) return step_sf_perform(args, env, kont); + var aL = Sx_runtime[1].call(null, cst, [0, match_val, ga]); + if(Sx_types[49].call(null, aL)) return step_sf_define_library(args, env, kont); - var aL = Sx_runtime[1].call(null, cst, [0, match_val, fh]); - if(Sx_types[49].call(null, aL)) return step_sf_import(args, env, kont); - var aM = Sx_runtime[1].call(null, cst, [0, match_val, fi]); - if(Sx_types[49].call(null, aM)) - return make_cek_value(sf_define_record_type(args, env), env, kont); - var aN = Sx_runtime[1].call(null, cst, [0, match_val, fj]); + var aM = Sx_runtime[1].call(null, cst, [0, match_val, gb]); + if(Sx_types[49].call(null, aM)) return step_sf_import(args, env, kont); + var aN = Sx_runtime[1].call(null, cst, [0, match_val, gc]); if(Sx_types[49].call(null, aN)) - return make_cek_value(sf_define_protocol(args, env), env, kont); - var aO = Sx_runtime[1].call(null, cst, [0, match_val, fk]); + return make_cek_value(sf_define_record_type(args, env), env, kont); + var aO = Sx_runtime[1].call(null, cst, [0, match_val, gd]); if(Sx_types[49].call(null, aO)) - return make_cek_value(sf_implement(args, env), env, kont); - var aP = Sx_runtime[1].call(null, cst, [0, match_val, fl]); + return make_cek_value(sf_define_protocol(args, env), env, kont); + var aP = Sx_runtime[1].call(null, cst, [0, match_val, ge]); if(Sx_types[49].call(null, aP)) - return step_sf_parameterize(args, env, kont); - var aQ = Sx_runtime[1].call(null, cst, [0, match_val, fm]); + return make_cek_value(sf_implement(args, env), env, kont); + var aQ = Sx_runtime[1].call(null, cst, [0, match_val, gf]); if(Sx_types[49].call(null, aQ)) + return step_sf_parameterize(args, env, kont); + var aR = Sx_runtime[1].call(null, cst, [0, match_val, gg]); + if(Sx_types[49].call(null, aR)) return make_cek_value(sf_syntax_rules(args, env), env, kont); - var aR = Sx_runtime[1].call(null, cst, [0, match_val, fn]); - if(Sx_types[49].call(null, aR)) return step_sf_define(args, env, kont); + var aS = Sx_runtime[1].call(null, cst, [0, match_val, gh]); + if(Sx_types[49].call(null, aS)) return step_sf_define(args, env, kont); var - aS = + aT = Sx_runtime[1].call (null, cst_has_key, [0, custom_special_forms, [0, match_val, 0]]); - if(Sx_types[49].call(null, aS)) + if(Sx_types[49].call(null, aT)) return make_cek_value (cek_call - (Sx_runtime[23].call(null, custom_special_forms, match_val), + (Sx_runtime[25].call(null, custom_special_forms, match_val), [5, [0, args, [0, env, 0]]]), env, kont); - var and$2 = Sx_runtime[73].call(null, env, match_val); + var and$2 = Sx_runtime[75].call(null, env, match_val); if(Sx_types[49].call(null, and$2)) var - aT = Sx_runtime[74].call(null, env, match_val), - b = Sx_runtime[86].call(null, aT); + aU = Sx_runtime[76].call(null, env, match_val), + b = Sx_runtime[88].call(null, aU); else var b = and$2; if(Sx_types[49].call(null, b)){ - var mac = Sx_runtime[74].call(null, env, match_val); + var mac = Sx_runtime[76].call(null, env, match_val); return make_cek_state(expand_macro(mac, args, env), env, kont); } var - aU = + aV = Sx_types[49].call(null, render_check) ? cek_call(render_check, [5, [0, expr, [0, env, 0]]]) : render_check; - return Sx_types[49].call(null, aU) + return Sx_types[49].call(null, aV) ? make_cek_value (cek_call(render_fn, [5, [0, expr, [0, env, 0]]]), env, kont) : step_eval_call(head, args, env, kont); @@ -35985,58 +46611,58 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return caml_trampoline(step_eval_list$0(0, expr, env, kont)); } var - fq = [5, 0], - fr = [0, [2, cst_provide], 0], - fs = [2, cst_value], - ft = [5, 0], - fu = [5, 0], - fv = [2, cst_name], - fw = [2, cst_env]; + gk = [5, 0], + gl = [0, [2, cst_provide], 0], + gm = [2, cst_value], + gn = [5, 0], + go = [5, 0], + gp = [2, cst_name], + gq = [2, cst_env]; function kont_extract_provides(kont){ - var a = Sx_runtime[31].call(null, kont); - if(Sx_types[49].call(null, a)) return fq; + var a = Sx_runtime[33].call(null, kont); + if(Sx_types[49].call(null, a)) return gk; var - frame = Sx_runtime[12].call(null, kont), - rest_frames = kont_extract_provides(Sx_runtime[13].call(null, kont)), - b = [0, frame_type(frame), fr], + frame = Sx_runtime[14].call(null, kont), + rest_frames = kont_extract_provides(Sx_runtime[15].call(null, kont)), + b = [0, frame_type(frame), gl], c = Sx_runtime[1].call(null, cst, b); if(! Sx_types[49].call(null, c)) return rest_frames; var - d = Sx_runtime[23].call(null, frame, fs), - e = Sx_runtime[23].call(null, frame, fv), + d = Sx_runtime[25].call(null, frame, gm), + e = Sx_runtime[25].call(null, frame, gp), f = [22, [0, cst_provide, - Sx_runtime[23].call(null, frame, fw), + Sx_runtime[25].call(null, frame, gq), e, 0, - fu, + go, 0, 0, - ft, + gn, d, 0]]; - return Sx_runtime[16].call(null, f, rest_frames); + return Sx_runtime[18].call(null, f, rest_frames); } var cst_contains = "contains?", provide_batch_depth_ref = [], provide_batch_queue_ref = [], provide_subscribers_ref = [], - fx = [0, [1, 0.], 0], - fy = [5, [0, 0, 0]]; + gr = [0, [1, 0.], 0], + gs = [5, [0, 0, 0]]; function fire_provide_subscribers(name){ - var subs = Sx_runtime[23].call(null, provide_subscribers_ref[1], name); + var subs = Sx_runtime[25].call(null, provide_subscribers_ref[1], name); if(Sx_types[49].call(null, subs)) var - b = Sx_runtime[31].call(null, subs), + b = Sx_runtime[33].call(null, subs), a = [0, 1 - Sx_types[49].call(null, b)]; else var a = subs; if(! Sx_types[49].call(null, a)) return 0; var - c = Sx_runtime[1].call(null, cst$6, [0, provide_batch_depth_ref[1], fx]); + c = Sx_runtime[1].call(null, cst$7, [0, provide_batch_depth_ref[1], gr]); if(Sx_types[49].call(null, c)){ var d = Sx_runtime[5].call(null, subs); Stdlib_List[18].call @@ -36049,72 +46675,72 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg b = [0, 1 - Sx_types[49].call(null, a)]; if(Sx_types[49].call(null, b)) provide_batch_queue_ref[1] = - Sx_runtime[8].call(null, provide_batch_queue_ref[1], sub); + Sx_runtime[10].call(null, provide_batch_queue_ref[1], sub); return 0; }, d); return 0; } var e = Sx_runtime[5].call(null, subs); - Stdlib_List[18].call(null, function(sub){cek_call(sub, fy); return 0;}, e); + Stdlib_List[18].call(null, function(sub){cek_call(sub, gs); return 0;}, e); return 0; } - var fz = [0, [1, 1.], 0]; + var gt = [0, [1, 1.], 0]; function batch_begin_b(param){ provide_batch_depth_ref[1] = - Sx_runtime[1].call(null, cst$7, [0, provide_batch_depth_ref[1], fz]); + Sx_runtime[1].call(null, cst$8, [0, provide_batch_depth_ref[1], gt]); return 0; } var - fA = [0, [1, 1.], 0], - fB = [0, [1, 0.], 0], - fC = [5, 0], - fD = [5, [0, 0, 0]]; + gu = [0, [1, 1.], 0], + gv = [0, [1, 0.], 0], + gw = [5, 0], + gx = [5, [0, 0, 0]]; function batch_end_b(param){ provide_batch_depth_ref[1] = - Sx_runtime[1].call(null, cst$2, [0, provide_batch_depth_ref[1], fA]); + Sx_runtime[1].call(null, cst$4, [0, provide_batch_depth_ref[1], gu]); var - a = Sx_runtime[1].call(null, cst, [0, provide_batch_depth_ref[1], fB]); + a = Sx_runtime[1].call(null, cst, [0, provide_batch_depth_ref[1], gv]); if(! Sx_types[49].call(null, a)) return 0; var queue = provide_batch_queue_ref[1]; - provide_batch_queue_ref[1] = fC; + provide_batch_queue_ref[1] = gw; var b = Sx_runtime[5].call(null, queue); - Stdlib_List[18].call(null, function(sub){cek_call(sub, fD); return 0;}, b); + Stdlib_List[18].call(null, function(sub){cek_call(sub, gx); return 0;}, b); return 0; } - var bind_tracking_ref = [], fE = [5, 0]; + var bind_tracking_ref = [], gy = [5, 0]; function step_sf_bind(args, env, kont){ - var body = Sx_runtime[12].call(null, args), prev = bind_tracking_ref[1]; - bind_tracking_ref[1] = fE; + var body = Sx_runtime[14].call(null, args), prev = bind_tracking_ref[1]; + bind_tracking_ref[1] = gy; return make_cek_state (body, env, kont_push(make_bind_frame(body, env, prev), kont)); } - var fF = [5, 0]; + var gz = [5, 0]; function step_sf_parameterize(args, env, kont){ var - bindings = Sx_runtime[12].call(null, args), - body = Sx_runtime[13].call(null, args), - or = Sx_runtime[81].call(null, bindings), + bindings = Sx_runtime[14].call(null, args), + body = Sx_runtime[15].call(null, args), + or = Sx_runtime[83].call(null, bindings), or$0 = - Sx_types[49].call(null, or) ? or : Sx_runtime[31].call(null, bindings); + Sx_types[49].call(null, or) ? or : Sx_runtime[33].call(null, bindings); if(Sx_types[49].call(null, or$0)) return step_sf_begin(body, env, kont); var - first_pair = Sx_runtime[12].call(null, bindings), - a = kont_push(make_parameterize_frame(bindings, 0, fF, body, env), kont); - return make_cek_state(Sx_runtime[12].call(null, first_pair), env, a); + first_pair = Sx_runtime[14].call(null, bindings), + a = kont_push(make_parameterize_frame(bindings, 0, gz, body, env), kont); + return make_cek_state(Sx_runtime[14].call(null, first_pair), env, a); } - var fG = [0, [2, cst$14], 0], fH = [1, 0.], fI = [1, 0.]; + var gA = [0, [2, cst$14], 0], gB = [1, 0.], gC = [1, 0.]; function syntax_rules_match(pattern, form, literals){ - var and = Sx_runtime[37].call(null, pattern); + var and = Sx_runtime[39].call(null, pattern); if(Sx_types[49].call(null, and)) var - e = [0, Sx_types[50].call(null, pattern), fG], + e = [0, Sx_types[50].call(null, pattern), gA], a = Sx_runtime[1].call(null, cst, e); else var a = and; if(Sx_types[49].call(null, a)) return [6, Stdlib_Hashtbl[1].call(null, 0, 0)]; - var and$0 = Sx_runtime[37].call(null, pattern); + var and$0 = Sx_runtime[39].call(null, pattern); if(Sx_types[49].call(null, and$0)) var f = [0, literals, [0, Sx_types[50].call(null, pattern), 0]], @@ -36122,7 +46748,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg else var b = and$0; if(Sx_types[49].call(null, b)){ - var and$1 = Sx_runtime[37].call(null, form); + var and$1 = Sx_runtime[39].call(null, form); if(Sx_types[49].call(null, and$1)) var g = [0, Sx_types[50].call(null, form), 0], @@ -36134,39 +46760,39 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg ? [6, Stdlib_Hashtbl[1].call(null, 0, 0)] : 0; } - var i = Sx_runtime[37].call(null, pattern); + var i = Sx_runtime[39].call(null, pattern); if(Sx_types[49].call(null, i)){ var d = [6, Stdlib_Hashtbl[1].call(null, 0, 0)], j = Sx_types[50].call(null, pattern); - Sx_runtime[9].call(null, d, j, form); + Sx_runtime[11].call(null, d, j, form); return d; } var - and$2 = Sx_runtime[35].call(null, pattern), + and$2 = Sx_runtime[37].call(null, pattern), k = Sx_types[49].call(null, and$2) - ? Sx_runtime[31].call(null, pattern) + ? Sx_runtime[33].call(null, pattern) : and$2; if(Sx_types[49].call(null, k)){ var - and$3 = Sx_runtime[35].call(null, form), + and$3 = Sx_runtime[37].call(null, form), l = Sx_types[49].call(null, and$3) - ? Sx_runtime[31].call(null, form) + ? Sx_runtime[33].call(null, form) : and$3; return Sx_types[49].call(null, l) ? [6, Stdlib_Hashtbl[1].call(null, 0, 0)] : 0; } var - and$4 = Sx_runtime[35].call(null, pattern), + and$4 = Sx_runtime[37].call(null, pattern), m = Sx_types[49].call(null, and$4) - ? Sx_runtime[35].call(null, form) + ? Sx_runtime[37].call(null, form) : and$4; if(Sx_types[49].call(null, m)) - return syntax_rules_match_list(pattern, fI, form, fH, literals); + return syntax_rules_match_list(pattern, gC, form, gB, literals); var n = Sx_runtime[1].call(null, cst, [0, pattern, [0, form, 0]]); return Sx_types[49].call(null, n) ? [6, Stdlib_Hashtbl[1].call(null, 0, 0)] @@ -36174,43 +46800,43 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } var cst$15 = "...", - fJ = [0, [1, 1.], 0], - fK = [0, [1, 1.], 0], - fL = [0, [2, cst$15], 0], - fM = [0, [1, 1.], 0], - fN = [0, [1, 2.], 0], - fO = [0, [1, 2.], 0], - fP = [0, [1, 0.], 0], - fQ = [0, 0, 0], - fR = [0, [1, 2.], 0], - fS = [0, [1, 1.], 0], - fT = [0, [1, 1.], 0]; + gD = [0, [1, 1.], 0], + gE = [0, [1, 1.], 0], + gF = [0, [2, cst$15], 0], + gG = [0, [1, 1.], 0], + gH = [0, [1, 2.], 0], + gI = [0, [1, 2.], 0], + gJ = [0, [1, 0.], 0], + gK = [0, 0, 0], + gL = [0, [1, 2.], 0], + gM = [0, [1, 1.], 0], + gN = [0, [1, 1.], 0]; function syntax_rules_match_list(pattern, pi, form, fi, literals){ var - plen = Sx_runtime[22].call(null, pattern), - flen = Sx_runtime[22].call(null, form), - and = Sx_runtime[1].call(null, cst$13, [0, pi, [0, plen, 0]]), + plen = Sx_runtime[24].call(null, pattern), + flen = Sx_runtime[24].call(null, form), + and = Sx_runtime[1].call(null, cst$1, [0, pi, [0, plen, 0]]), b = Sx_types[49].call(null, and) - ? Sx_runtime[1].call(null, cst$13, [0, fi, [0, flen, 0]]) + ? Sx_runtime[1].call(null, cst$1, [0, fi, [0, flen, 0]]) : and; if(Sx_types[49].call(null, b)) return [6, Stdlib_Hashtbl[1].call(null, 0, 0)]; - var c = Sx_runtime[1].call(null, cst$13, [0, pi, [0, plen, 0]]); + var c = Sx_runtime[1].call(null, cst$1, [0, pi, [0, plen, 0]]); if(Sx_types[49].call(null, c)) return 0; var - d = [0, Sx_runtime[1].call(null, cst$7, [0, pi, fJ]), [0, plen, 0]], - and$0 = Sx_runtime[1].call(null, cst$5, d); + d = [0, Sx_runtime[1].call(null, cst$8, [0, pi, gD]), [0, plen, 0]], + and$0 = Sx_runtime[1].call(null, cst$2, d); if(Sx_types[49].call(null, and$0)){ var - e = Sx_runtime[1].call(null, cst$7, [0, pi, fK]), - f = Sx_runtime[15].call(null, pattern, e), - and$1 = Sx_runtime[37].call(null, f); + e = Sx_runtime[1].call(null, cst$8, [0, pi, gE]), + f = Sx_runtime[17].call(null, pattern, e), + and$1 = Sx_runtime[39].call(null, f); if(Sx_types[49].call(null, and$1)) var - g = Sx_runtime[1].call(null, cst$7, [0, pi, fM]), - h = Sx_runtime[15].call(null, pattern, g), - i = [0, Sx_types[50].call(null, h), fL], + g = Sx_runtime[1].call(null, cst$8, [0, pi, gG]), + h = Sx_runtime[17].call(null, pattern, g), + i = [0, Sx_types[50].call(null, h), gF], a = Sx_runtime[1].call(null, cst, i); else var a = and$1; @@ -36219,16 +46845,16 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and$0; if(Sx_types[49].call(null, a)){ var - sub_pat = Sx_runtime[15].call(null, pattern, pi), - j = [0, plen, [0, Sx_runtime[1].call(null, cst$7, [0, pi, fN]), 0]]; - Sx_runtime[1].call(null, cst$2, j); - Sx_runtime[1].call(null, cst$2, [0, flen, [0, fi, 0]]); + sub_pat = Sx_runtime[17].call(null, pattern, pi), + j = [0, plen, [0, Sx_runtime[1].call(null, cst$8, [0, pi, gH]), 0]]; + Sx_runtime[1].call(null, cst$4, j); + Sx_runtime[1].call(null, cst$4, [0, flen, [0, fi, 0]]); var - k = [0, plen, [0, Sx_runtime[1].call(null, cst$7, [0, pi, fO]), 0]], - l = [0, Sx_runtime[1].call(null, cst$2, k), 0], - m = [0, Sx_runtime[1].call(null, cst$2, [0, flen, [0, fi, 0]]), l], - n_ellipsis = Sx_runtime[1].call(null, cst$2, m), - n = Sx_runtime[1].call(null, cst$5, [0, n_ellipsis, fP]); + k = [0, plen, [0, Sx_runtime[1].call(null, cst$8, [0, pi, gI]), 0]], + l = [0, Sx_runtime[1].call(null, cst$4, k), 0], + m = [0, Sx_runtime[1].call(null, cst$4, [0, flen, [0, fi, 0]]), l], + n_ellipsis = Sx_runtime[1].call(null, cst$4, m), + n = Sx_runtime[1].call(null, cst$2, [0, n_ellipsis, gJ]); if(Sx_types[49].call(null, n)) return 0; var o = @@ -36236,7 +46862,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg form, [0, fi, - [0, Sx_runtime[1].call(null, cst$7, [0, fi, [0, n_ellipsis, 0]]), 0]]]; + [0, Sx_runtime[1].call(null, cst$8, [0, fi, [0, n_ellipsis, 0]]), 0]]]; Sx_runtime[1].call(null, cst_slice, o); var p = @@ -36244,7 +46870,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg form, [0, fi, - [0, Sx_runtime[1].call(null, cst$7, [0, fi, [0, n_ellipsis, 0]]), 0]]], + [0, Sx_runtime[1].call(null, cst$8, [0, fi, [0, n_ellipsis, 0]]), 0]]], q = Sx_runtime[1].call(null, cst_slice, p), r = Sx_runtime[5].call(null, q), sub_bindings = @@ -36253,18 +46879,18 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(f){return syntax_rules_match(sub_pat, f, literals);}, r)], - s = Sx_runtime[1].call(null, cst_contains, [0, sub_bindings, fQ]); + s = Sx_runtime[1].call(null, cst_contains, [0, sub_bindings, gK]); if(Sx_types[49].call(null, s)) return 0; var - t = Sx_runtime[1].call(null, cst$7, [0, fi, [0, n_ellipsis, 0]]), + t = Sx_runtime[1].call(null, cst$8, [0, fi, [0, n_ellipsis, 0]]), rest_result = syntax_rules_match_list (pattern, - Sx_runtime[1].call(null, cst$7, [0, pi, fR]), + Sx_runtime[1].call(null, cst$8, [0, pi, gL]), form, t, literals), - u = Sx_runtime[81].call(null, rest_result); + u = Sx_runtime[83].call(null, rest_result); if(Sx_types[49].call(null, u)) return 0; var merged = [6, Stdlib_Hashtbl[1].call(null, 0, 0)], @@ -36279,20 +46905,20 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(key){ var - existing = Sx_runtime[54].call(null, merged, key), - a = Sx_runtime[81].call(null, existing); + existing = Sx_runtime[56].call(null, merged, key), + a = Sx_runtime[83].call(null, existing); if(Sx_types[49].call(null, a)){ - var c = [5, [0, Sx_runtime[23].call(null, b, key), 0]]; - Sx_runtime[9].call(null, merged, key, c); + var c = [5, [0, Sx_runtime[25].call(null, b, key), 0]]; + Sx_runtime[11].call(null, merged, key, c); } else{ var d = [0, existing, - [0, [5, [0, Sx_runtime[23].call(null, b, key), 0]], 0]], + [0, [5, [0, Sx_runtime[25].call(null, b, key), 0]], 0]], e = Sx_runtime[1].call(null, cst_append, d); - Sx_runtime[9].call(null, merged, key, e); + Sx_runtime[11].call(null, merged, key, e); } return 0; }, @@ -36306,31 +46932,31 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[18].call (null, function(key){ - var a = Sx_runtime[23].call(null, rest_result, key); - Sx_runtime[9].call(null, merged, key, a); + var a = Sx_runtime[25].call(null, rest_result, key); + Sx_runtime[11].call(null, merged, key, a); return 0; }, x); return merged; } - var y = Sx_runtime[1].call(null, cst$13, [0, fi, [0, flen, 0]]); + var y = Sx_runtime[1].call(null, cst$1, [0, fi, [0, flen, 0]]); if(Sx_types[49].call(null, y)) return 0; var - z = Sx_runtime[15].call(null, form, fi), + z = Sx_runtime[17].call(null, form, fi), sub_result = - syntax_rules_match(Sx_runtime[15].call(null, pattern, pi), z, literals), - A = Sx_runtime[81].call(null, sub_result); + syntax_rules_match(Sx_runtime[17].call(null, pattern, pi), z, literals), + A = Sx_runtime[83].call(null, sub_result); if(Sx_types[49].call(null, A)) return 0; var - B = Sx_runtime[1].call(null, cst$7, [0, fi, fS]), + B = Sx_runtime[1].call(null, cst$8, [0, fi, gM]), rest_result$0 = syntax_rules_match_list (pattern, - Sx_runtime[1].call(null, cst$7, [0, pi, fT]), + Sx_runtime[1].call(null, cst$8, [0, pi, gN]), form, B, literals), - C = Sx_runtime[81].call(null, rest_result$0); + C = Sx_runtime[83].call(null, rest_result$0); if(Sx_types[49].call(null, C)) return 0; var D = Sx_runtime[1].call(null, cst_keys, [0, sub_result, 0]), @@ -36338,15 +46964,15 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[18].call (null, function(key){ - var a = Sx_runtime[23].call(null, sub_result, key); - Sx_runtime[9].call(null, rest_result$0, key, a); + var a = Sx_runtime[25].call(null, sub_result, key); + Sx_runtime[11].call(null, rest_result$0, key, a); return 0; }, E); return rest_result$0; } function syntax_rules_find_var(template, bindings){ - var and = Sx_runtime[37].call(null, template); + var and = Sx_runtime[39].call(null, template); if(Sx_types[49].call(null, and)){ var b = [0, bindings, [0, Sx_types[50].call(null, template), 0]], @@ -36354,21 +46980,21 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(Sx_types[49].call(null, and$0)) var c = Sx_types[50].call(null, template), - d = Sx_runtime[23].call(null, bindings, c), - a = Sx_runtime[35].call(null, d); + d = Sx_runtime[25].call(null, bindings, c), + a = Sx_runtime[37].call(null, d); else var a = and$0; } else var a = and; if(Sx_types[49].call(null, a)) return Sx_types[50].call(null, template); - var e = Sx_runtime[35].call(null, template); + var e = Sx_runtime[37].call(null, template); if(! Sx_types[49].call(null, e)) return 0; var f = Sx_runtime[5].call(null, template); return Stdlib_List[26].call (null, function(found, t){ - var a = Sx_runtime[81].call(null, found); + var a = Sx_runtime[83].call(null, found); return Sx_types[49].call(null, a) ? syntax_rules_find_var(t, bindings) : found; @@ -36376,9 +47002,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg 0, f); } - var fU = [5, 0], fV = [5, 0]; + var gO = [5, 0], gP = [5, 0]; function syntax_rules_find_all_vars(template, bindings){ - var and = Sx_runtime[37].call(null, template); + var and = Sx_runtime[39].call(null, template); if(Sx_types[49].call(null, and)){ var b = [0, bindings, [0, Sx_types[50].call(null, template), 0]], @@ -36386,8 +47012,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(Sx_types[49].call(null, and$0)) var c = Sx_types[50].call(null, template), - d = Sx_runtime[23].call(null, bindings, c), - a = Sx_runtime[35].call(null, d); + d = Sx_runtime[25].call(null, bindings, c), + a = Sx_runtime[37].call(null, d); else var a = and$0; } @@ -36395,8 +47021,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)) return [5, [0, Sx_types[50].call(null, template), 0]]; - var e = Sx_runtime[35].call(null, template); - if(! Sx_types[49].call(null, e)) return fV; + var e = Sx_runtime[37].call(null, template); + if(! Sx_types[49].call(null, e)) return gP; var f = Sx_runtime[5].call(null, template); return Stdlib_List[26].call (null, @@ -36405,12 +47031,12 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg a = [0, acc, [0, syntax_rules_find_all_vars(t, bindings), 0]]; return Sx_runtime[1].call(null, cst_append, a); }, - fU, + gO, f); } - var fW = [1, 0.]; + var gQ = [1, 0.]; function syntax_rules_instantiate(template, bindings){ - var and = Sx_runtime[37].call(null, template); + var and = Sx_runtime[39].call(null, template); if(Sx_types[49].call(null, and)) var b = [0, bindings, [0, Sx_types[50].call(null, template), 0]], @@ -36419,48 +47045,48 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)){ var c = Sx_types[50].call(null, template); - return Sx_runtime[23].call(null, bindings, c); + return Sx_runtime[25].call(null, bindings, c); } var - d = Sx_runtime[35].call(null, template), + d = Sx_runtime[37].call(null, template), e = [0, 1 - Sx_types[49].call(null, d)]; if(Sx_types[49].call(null, e)) return template; - var f = Sx_runtime[31].call(null, template); + var f = Sx_runtime[33].call(null, template); return Sx_types[49].call(null, f) ? template - : syntax_rules_instantiate_list(template, fW, bindings); + : syntax_rules_instantiate_list(template, gQ, bindings); } var - fX = [5, 0], - fY = [0, [1, 1.], 0], - fZ = [0, [1, 1.], 0], - f0 = [0, [2, cst$15], 0], - f1 = [0, [1, 1.], 0], - f2 = [0, [1, 2.], 0], - f3 = [0, [1, 2.], 0], - f4 = [0, [1, 1.], 0]; + gR = [5, 0], + gS = [0, [1, 1.], 0], + gT = [0, [1, 1.], 0], + gU = [0, [2, cst$15], 0], + gV = [0, [1, 1.], 0], + gW = [0, [1, 2.], 0], + gX = [0, [1, 2.], 0], + gY = [0, [1, 1.], 0]; function syntax_rules_instantiate_list(template, i$1, bindings){ var i = i$1; for(;;){ var - a = [0, i, [0, Sx_runtime[22].call(null, template), 0]], - b = Sx_runtime[1].call(null, cst$13, a); - if(Sx_types[49].call(null, b)) return fX; + a = [0, i, [0, Sx_runtime[24].call(null, template), 0]], + b = Sx_runtime[1].call(null, cst$1, a); + if(Sx_types[49].call(null, b)) return gR; var - elem = Sx_runtime[15].call(null, template, i), - c = [0, Sx_runtime[22].call(null, template), 0], - d = [0, Sx_runtime[1].call(null, cst$7, [0, i, fY]), c], - and = Sx_runtime[1].call(null, cst$5, d); + elem = Sx_runtime[17].call(null, template, i), + c = [0, Sx_runtime[24].call(null, template), 0], + d = [0, Sx_runtime[1].call(null, cst$8, [0, i, gS]), c], + and = Sx_runtime[1].call(null, cst$2, d); if(Sx_types[49].call(null, and)){ var - e = Sx_runtime[1].call(null, cst$7, [0, i, fZ]), - f = Sx_runtime[15].call(null, template, e), - and$0 = Sx_runtime[37].call(null, f); + e = Sx_runtime[1].call(null, cst$8, [0, i, gT]), + f = Sx_runtime[17].call(null, template, e), + and$0 = Sx_runtime[39].call(null, f); if(Sx_types[49].call(null, and$0)) var - g = Sx_runtime[1].call(null, cst$7, [0, i, f1]), - h = Sx_runtime[15].call(null, template, g), - j = [0, Sx_types[50].call(null, h), f0], + g = Sx_runtime[1].call(null, cst$8, [0, i, gV]), + h = Sx_runtime[17].call(null, template, g), + j = [0, Sx_types[50].call(null, h), gU], has_ellipsis = Sx_runtime[1].call(null, cst, j); else var has_ellipsis = and$0; @@ -36471,21 +47097,21 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var p = syntax_rules_instantiate_list - (template, Sx_runtime[1].call(null, cst$7, [0, i, f4]), bindings), + (template, Sx_runtime[1].call(null, cst$8, [0, i, gY]), bindings), q = syntax_rules_instantiate(elem, bindings); - return Sx_runtime[16].call(null, q, p); + return Sx_runtime[18].call(null, q, p); } var all_vars = syntax_rules_find_all_vars(elem, bindings), - k = Sx_runtime[31].call(null, all_vars); + k = Sx_runtime[33].call(null, all_vars); if(! Sx_types[49].call(null, k)) break; - var i$0 = Sx_runtime[1].call(null, cst$7, [0, i, f2]); + var i$0 = Sx_runtime[1].call(null, cst$8, [0, i, gW]); i = i$0; } var - l = Sx_runtime[12].call(null, all_vars), - m = Sx_runtime[23].call(null, bindings, l), - count = Sx_runtime[22].call(null, m), + l = Sx_runtime[14].call(null, all_vars), + m = Sx_runtime[25].call(null, bindings, l), + count = Sx_runtime[24].call(null, m), n = Sx_runtime[1].call(null, cst_range, [0, count, 0]), o = Sx_runtime[5].call(null, n), expanded = @@ -36500,8 +47126,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[18].call (null, function(key){ - var a = Sx_runtime[23].call(null, bindings, key); - Sx_runtime[9].call(null, b, key, a); + var a = Sx_runtime[25].call(null, bindings, key); + Sx_runtime[11].call(null, b, key, a); return 0; }, c); @@ -36510,9 +47136,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(var_name){ var - a = Sx_runtime[23].call(null, bindings, var_name), - c = Sx_runtime[15].call(null, a, idx); - Sx_runtime[9].call(null, b, var_name, c); + a = Sx_runtime[25].call(null, bindings, var_name), + c = Sx_runtime[17].call(null, a, idx); + Sx_runtime[11].call(null, b, var_name, c); return 0; }, d); @@ -36521,104 +47147,104 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg o)], rest_result = syntax_rules_instantiate_list - (template, Sx_runtime[1].call(null, cst$7, [0, i, f3]), bindings); + (template, Sx_runtime[1].call(null, cst$8, [0, i, gX]), bindings); return Sx_runtime[1].call (null, cst_append, [0, expanded, [0, rest_result, 0]]); } - var f5 = [2, cst$14]; + var gZ = [2, cst$14]; function syntax_rules_expand(literals, rules, form){ var - a = Sx_types[37].call(null, f5), - full_form = Sx_runtime[16].call(null, a, form); + a = Sx_types[37].call(null, gZ), + full_form = Sx_runtime[18].call(null, a, form); return syntax_rules_try_rules(literals, rules, full_form); } - var f6 = [2, "syntax-rules: no pattern matched for "], f7 = [1, 1.]; + var g0 = [2, "syntax-rules: no pattern matched for "], g1 = [1, 1.]; function syntax_rules_try_rules(literals, rules$1, full_form){ var rules = rules$1; for(;;){ - var a = Sx_runtime[31].call(null, rules); + var a = Sx_runtime[33].call(null, rules); if(Sx_types[49].call(null, a)){ var - b = [0, f6, [0, Sx_runtime[66].call(null, full_form), 0]], + b = [0, g0, [0, Sx_runtime[68].call(null, full_form), 0]], c = [2, Sx_runtime[4].call(null, b)], d = Sx_runtime[2].call(null, c); throw caml_maybe_attach_backtrace([0, Sx_types[8], d], 1); } var - rule = Sx_runtime[12].call(null, rules), - pattern = Sx_runtime[12].call(null, rule), - template = Sx_runtime[15].call(null, rule, f7), + rule = Sx_runtime[14].call(null, rules), + pattern = Sx_runtime[14].call(null, rule), + template = Sx_runtime[17].call(null, rule, g1), bindings = syntax_rules_match(pattern, full_form, literals), - e = Sx_runtime[81].call(null, bindings), + e = Sx_runtime[83].call(null, bindings), f = [0, 1 - Sx_types[49].call(null, e)]; if(Sx_types[49].call(null, f)) return syntax_rules_instantiate(template, bindings); - var rules$0 = Sx_runtime[13].call(null, rules); + var rules$0 = Sx_runtime[15].call(null, rules); rules = rules$0; } } var - f8 = [2, cst_sr_literals], - f9 = [2, cst_sr_rules], - f_ = [2, cst_syntax_rules], - f$ = [3, cst_syntax_rules_body], - ga = [2, "__sr-form"], - gb = [5, 0], - gc = [5, 0]; + g2 = [2, cst_sr_literals], + g3 = [2, cst_sr_rules], + g4 = [2, cst_syntax_rules], + g5 = [3, cst_syntax_rules_body], + g6 = [2, "__sr-form"], + g7 = [5, 0], + g8 = [5, 0]; function sf_syntax_rules(args, env){ - var a = Sx_runtime[12].call(null, args), b = Sx_runtime[35].call(null, a); + var a = Sx_runtime[14].call(null, args), b = Sx_runtime[37].call(null, a); if(Sx_types[49].call(null, b)) var - c = Sx_runtime[12].call(null, args), + c = Sx_runtime[14].call(null, args), d = Sx_runtime[5].call(null, c), literals = [5, Stdlib_List[20].call (null, function(s){ - var a = Sx_runtime[37].call(null, s); + var a = Sx_runtime[39].call(null, s); return Sx_types[49].call(null, a) ? Sx_types[50].call(null, s) : [2, Sx_runtime[4].call(null, [0, s, 0])]; }, d)]; else - var literals = gc; + var literals = g8; var - rules = Sx_runtime[13].call(null, args), - closure = Sx_runtime[78].call(null, env), - e = Sx_runtime[3].call(null, f8); - Sx_runtime[75].call(null, closure, e, literals); - var f = Sx_runtime[3].call(null, f9); - Sx_runtime[75].call(null, closure, f, rules); - return Sx_types[35].call(null, gb, ga, f$, closure, f_); + rules = Sx_runtime[15].call(null, args), + closure = Sx_runtime[80].call(null, env), + e = Sx_runtime[3].call(null, g2); + Sx_runtime[77].call(null, closure, e, literals); + var f = Sx_runtime[3].call(null, g3); + Sx_runtime[77].call(null, closure, f, rules); + return Sx_types[35].call(null, g7, g6, g5, closure, g4); } var - gd = [5, 0], - ge = [5, 0], - gf = [0, [2, "export"], 0], - gg = [0, [2, cst_import], 0], - gh = [0, [2, cst_begin], 0]; + g9 = [5, 0], + g_ = [5, 0], + g$ = [0, [2, "export"], 0], + ha = [0, [2, cst_import], 0], + hb = [0, [2, cst_begin], 0]; function step_sf_define_library(args, env, kont){ var - lib_spec = Sx_runtime[12].call(null, args), - decls = Sx_runtime[13].call(null, args), - lib_env = Sx_runtime[78].call(null, env), + lib_spec = Sx_runtime[14].call(null, args), + decls = Sx_runtime[15].call(null, args), + lib_env = Sx_runtime[80].call(null, env), a = Sx_runtime[5].call(null, decls), - exports = [0, gd], - body_forms = [0, ge]; + exports = [0, g9], + body_forms = [0, g_]; Stdlib_List[18].call (null, function(decl){ - var and = Sx_runtime[35].call(null, decl); + var and = Sx_runtime[37].call(null, decl); if(Sx_types[49].call(null, and)){ var - b = Sx_runtime[31].call(null, decl), + b = Sx_runtime[33].call(null, decl), and$0 = [0, 1 - Sx_types[49].call(null, b)]; if(Sx_types[49].call(null, and$0)) var - c = Sx_runtime[12].call(null, decl), - a = Sx_runtime[37].call(null, c); + c = Sx_runtime[14].call(null, decl), + a = Sx_runtime[39].call(null, c); else var a = and$0; } @@ -36626,12 +47252,12 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)){ var - d = Sx_runtime[12].call(null, decl), + d = Sx_runtime[14].call(null, decl), kind = Sx_types[50].call(null, d), - e = Sx_runtime[1].call(null, cst, [0, kind, gf]); + e = Sx_runtime[1].call(null, cst, [0, kind, g$]); if(Sx_types[49].call(null, e)){ var - f = Sx_runtime[13].call(null, decl), + f = Sx_runtime[15].call(null, decl), g = Sx_runtime[5].call(null, f), h = [0, @@ -36639,7 +47265,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[20].call (null, function(s){ - var a = Sx_runtime[37].call(null, s); + var a = Sx_runtime[39].call(null, s); return Sx_types[49].call(null, a) ? Sx_types[50].call(null, s) : [2, Sx_runtime[4].call(null, [0, s, 0])]; @@ -36649,10 +47275,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg exports[1] = Sx_runtime[1].call(null, cst_append, [0, exports[1], h]); } else{ - var i = Sx_runtime[1].call(null, cst, [0, kind, gg]); + var i = Sx_runtime[1].call(null, cst, [0, kind, ha]); if(Sx_types[49].call(null, i)){ var - j = Sx_runtime[13].call(null, decl), + j = Sx_runtime[15].call(null, decl), k = Sx_runtime[5].call(null, j); Stdlib_List[18].call (null, @@ -36663,9 +47289,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg k); } else{ - var l = Sx_runtime[1].call(null, cst, [0, kind, gh]); + var l = Sx_runtime[1].call(null, cst, [0, kind, hb]); if(Sx_types[49].call(null, l)){ - var m = [0, Sx_runtime[13].call(null, decl), 0]; + var m = [0, Sx_runtime[15].call(null, decl), 0]; body_forms[1] = Sx_runtime[1].call(null, cst_append, [0, body_forms[1], m]); } @@ -36684,10 +47310,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[18].call (null, function(name){ - var a = Sx_runtime[73].call(null, lib_env, name); + var a = Sx_runtime[75].call(null, lib_env, name); if(Sx_types[49].call(null, a)){ - var b = Sx_runtime[74].call(null, lib_env, name); - Sx_runtime[9].call(null, export_dict, name, b); + var b = Sx_runtime[76].call(null, lib_env, name); + Sx_runtime[11].call(null, export_dict, name, b); } return 0; }, @@ -36700,24 +47326,24 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_only = "only", cst_prefix = "prefix", cst_rename = "rename", - gi = [0, [2, cst_only], 0], - gj = [1, 1.], - gk = [0, [2, cst_only], 0], - gl = [0, [2, cst_prefix], 0], - gm = [1, 2.], - gn = [0, [2, cst_except], 0], - go = [0, [2, cst_prefix], 0], - gp = [0, [2, cst_rename], 0]; + hc = [0, [2, cst_only], 0], + hd = [1, 1.], + he = [0, [2, cst_only], 0], + hf = [0, [2, cst_prefix], 0], + hg = [1, 2.], + hh = [0, [2, cst_except], 0], + hi = [0, [2, cst_prefix], 0], + hj = [0, [2, cst_rename], 0]; function bind_import_set(import_set, env){ - var and = Sx_runtime[35].call(null, import_set); + var and = Sx_runtime[37].call(null, import_set); if(Sx_types[49].call(null, and)){ var - b = Sx_runtime[31].call(null, import_set), + b = Sx_runtime[33].call(null, import_set), and$0 = [0, 1 - Sx_types[49].call(null, b)]; if(Sx_types[49].call(null, and$0)) var - c = Sx_runtime[12].call(null, import_set), - a = Sx_runtime[37].call(null, c); + c = Sx_runtime[14].call(null, import_set), + a = Sx_runtime[39].call(null, c); else var a = and$0; } @@ -36725,42 +47351,42 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)) var - d = Sx_runtime[12].call(null, import_set), + d = Sx_runtime[14].call(null, import_set), head = Sx_types[50].call(null, d); else var head = 0; - var or = Sx_runtime[1].call(null, cst, [0, head, gi]); + var or = Sx_runtime[1].call(null, cst, [0, head, hc]); if(Sx_types[49].call(null, or)) var or$0 = or; else{ - var or$1 = Sx_runtime[1].call(null, cst, [0, head, gn]); + var or$1 = Sx_runtime[1].call(null, cst, [0, head, hh]); if(Sx_types[49].call(null, or$1)) var or$0 = or$1; else var - or$2 = Sx_runtime[1].call(null, cst, [0, head, go]), + or$2 = Sx_runtime[1].call(null, cst, [0, head, hi]), or$0 = Sx_types[49].call(null, or$2) ? or$2 - : Sx_runtime[1].call(null, cst, [0, head, gp]); + : Sx_runtime[1].call(null, cst, [0, head, hj]); } var lib_spec = Sx_types[49].call(null, or$0) - ? Sx_runtime[15].call(null, import_set, gj) + ? Sx_runtime[17].call(null, import_set, hd) : import_set, exports = library_exports(lib_spec), - e = Sx_runtime[1].call(null, cst, [0, head, gk]); + e = Sx_runtime[1].call(null, cst, [0, head, he]); if(Sx_types[49].call(null, e)){ var - f = Sx_runtime[13].call(null, import_set), - g = Sx_runtime[13].call(null, f), + f = Sx_runtime[15].call(null, import_set), + g = Sx_runtime[15].call(null, f), h = Sx_runtime[5].call(null, g); Stdlib_List[18].call (null, function(s){ var - a = Sx_runtime[37].call(null, s), + a = Sx_runtime[39].call(null, s), id = Sx_types[49].call(null, a) ? Sx_types[50].call(null, s) @@ -36768,19 +47394,19 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg b = Sx_runtime[1].call(null, cst_has_key, [0, exports, [0, id, 0]]); if(Sx_types[49].call(null, b)){ var - c = Sx_runtime[23].call(null, exports, id), + c = Sx_runtime[25].call(null, exports, id), d = Sx_runtime[3].call(null, id); - Sx_runtime[75].call(null, env, d, c); + Sx_runtime[77].call(null, env, d, c); } return 0; }, h); return 0; } - var i = Sx_runtime[1].call(null, cst, [0, head, gl]); + var i = Sx_runtime[1].call(null, cst, [0, head, hf]); if(Sx_types[49].call(null, i)){ var - j = [0, Sx_runtime[15].call(null, import_set, gm), 0], + j = [0, Sx_runtime[17].call(null, import_set, hg), 0], pfx = [2, Sx_runtime[4].call(null, j)], k = Sx_runtime[1].call(null, cst_keys, [0, exports, 0]), l = Sx_runtime[5].call(null, k); @@ -36788,10 +47414,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(key){ var - a = Sx_runtime[23].call(null, exports, key), + a = Sx_runtime[25].call(null, exports, key), b = [2, Sx_runtime[4].call(null, [0, pfx, [0, key, 0]])], c = Sx_runtime[3].call(null, b); - Sx_runtime[75].call(null, env, c, a); + Sx_runtime[77].call(null, env, c, a); return 0; }, l); @@ -36804,38 +47430,38 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(key){ var - a = Sx_runtime[23].call(null, exports, key), + a = Sx_runtime[25].call(null, exports, key), b = Sx_runtime[3].call(null, key); - Sx_runtime[75].call(null, env, b, a); + Sx_runtime[77].call(null, env, b, a); return 0; }, n); return 0; } var - gq = [0, [2, cst_only], 0], - gr = [1, 1.], - gs = [2, cst_import], - gt = [0, [2, cst_except], 0], - gu = [0, [2, cst_prefix], 0], - gv = [0, [2, cst_rename], 0]; + hk = [0, [2, cst_only], 0], + hl = [1, 1.], + hm = [2, cst_import], + hn = [0, [2, cst_except], 0], + ho = [0, [2, cst_prefix], 0], + hp = [0, [2, cst_rename], 0]; function step_sf_import(args$0, env, kont){ var args = args$0; for(;;){ - var b = Sx_runtime[31].call(null, args); + var b = Sx_runtime[33].call(null, args); if(Sx_types[49].call(null, b)) return make_cek_value(0, env, kont); var - import_set = Sx_runtime[12].call(null, args), - rest_sets = Sx_runtime[13].call(null, args), - and = Sx_runtime[35].call(null, import_set); + import_set = Sx_runtime[14].call(null, args), + rest_sets = Sx_runtime[15].call(null, args), + and = Sx_runtime[37].call(null, import_set); if(Sx_types[49].call(null, and)){ var - c = Sx_runtime[31].call(null, import_set), + c = Sx_runtime[33].call(null, import_set), and$0 = [0, 1 - Sx_types[49].call(null, c)]; if(Sx_types[49].call(null, and$0)) var - e = Sx_runtime[12].call(null, import_set), - a = Sx_runtime[37].call(null, e); + e = Sx_runtime[14].call(null, import_set), + a = Sx_runtime[39].call(null, e); else var a = and$0; } @@ -36843,29 +47469,29 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)) var - f = Sx_runtime[12].call(null, import_set), + f = Sx_runtime[14].call(null, import_set), head = Sx_types[50].call(null, f); else var head = 0; - var or = Sx_runtime[1].call(null, cst, [0, head, gq]); + var or = Sx_runtime[1].call(null, cst, [0, head, hk]); if(Sx_types[49].call(null, or)) var or$0 = or; else{ - var or$1 = Sx_runtime[1].call(null, cst, [0, head, gt]); + var or$1 = Sx_runtime[1].call(null, cst, [0, head, hn]); if(Sx_types[49].call(null, or$1)) var or$0 = or$1; else var - or$2 = Sx_runtime[1].call(null, cst, [0, head, gu]), + or$2 = Sx_runtime[1].call(null, cst, [0, head, ho]), or$0 = Sx_types[49].call(null, or$2) ? or$2 - : Sx_runtime[1].call(null, cst, [0, head, gv]); + : Sx_runtime[1].call(null, cst, [0, head, hp]); } var lib_spec = Sx_types[49].call(null, or$0) - ? Sx_runtime[15].call(null, import_set, gr) + ? Sx_runtime[17].call(null, import_set, hl) : import_set, g = library_loaded_p(lib_spec); if(! Sx_types[49].call(null, g)){ @@ -36873,59 +47499,59 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg i = kont_push(make_import_frame(import_set, rest_sets, env), kont), d = Stdlib_Hashtbl[1].call(null, 0, 2); Stdlib_Hashtbl[11].call(null, d, "library", lib_spec); - Stdlib_Hashtbl[11].call(null, d, cst_op, gs); + Stdlib_Hashtbl[11].call(null, d, cst_op, hm); return make_cek_suspended([6, d], env, i); } bind_import_set(import_set, env); - var h = Sx_runtime[31].call(null, rest_sets); + var h = Sx_runtime[33].call(null, rest_sets); if(Sx_types[49].call(null, h)) return make_cek_value(0, env, kont); args = rest_sets; } } - var gw = [2, "perform requires an IO request argument"]; + var hq = [2, "perform requires an IO request argument"]; function step_sf_perform(args, env, kont){ - var a = Sx_runtime[31].call(null, args); + var a = Sx_runtime[33].call(null, args); if(Sx_types[49].call(null, a)){ - var b = Sx_runtime[2].call(null, gw); + var b = Sx_runtime[2].call(null, hq); throw caml_maybe_attach_backtrace([0, Sx_types[8], b], 1); } var c = kont_push(make_perform_frame(env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, c); + return make_cek_state(Sx_runtime[14].call(null, args), env, c); } var - gx = [1, 1.], - gy = [1, 2.], - gz = [0, [1, 3.], 0], - gA = [0, [2, cst$5], 0], - gB = [0, [2, cst$6], 0], - gC = [0, [1, 1.], 0], - gD = [1, 1.], - gE = [1, 1.], - gF = [0, [1, 3.], 0], - gG = [1, 2.]; + hr = [1, 1.], + hs = [1, 2.], + ht = [0, [1, 3.], 0], + hu = [0, [2, cst$2], 0], + hv = [0, [2, cst$7], 0], + hw = [0, [1, 1.], 0], + hx = [1, 1.], + hy = [1, 1.], + hz = [0, [1, 3.], 0], + hA = [1, 2.]; function sf_define_record_type(args, env){ var - type_sym = Sx_runtime[12].call(null, args), - ctor_spec = Sx_runtime[15].call(null, args, gx), - pred_sym = Sx_runtime[15].call(null, args, gy), - field_specs = Sx_runtime[1].call(null, cst_slice, [0, args, gz]), + type_sym = Sx_runtime[14].call(null, args), + ctor_spec = Sx_runtime[17].call(null, args, hr), + pred_sym = Sx_runtime[17].call(null, args, hs), + field_specs = Sx_runtime[1].call(null, cst_slice, [0, args, ht]), raw_name = Sx_types[50].call(null, type_sym), - and = Sx_runtime[1].call(null, cst_starts_with, [0, raw_name, gA]), + and = Sx_runtime[1].call(null, cst_starts_with, [0, raw_name, hu]), a = Sx_types[49].call(null, and) - ? Sx_runtime[1].call(null, cst_ends_with, [0, raw_name, gB]) + ? Sx_runtime[1].call(null, cst_ends_with, [0, raw_name, hv]) : and; if(Sx_types[49].call(null, a)) var - b = [0, Sx_runtime[22].call(null, raw_name), gC], - c = [0, raw_name, [0, gD, [0, Sx_runtime[1].call(null, cst$2, b), 0]]], + b = [0, Sx_runtime[24].call(null, raw_name), hw], + c = [0, raw_name, [0, hx, [0, Sx_runtime[1].call(null, cst$4, b), 0]]], type_name = Sx_runtime[1].call(null, cst_slice, c); else var type_name = raw_name; var - d = Sx_runtime[12].call(null, ctor_spec), + d = Sx_runtime[14].call(null, ctor_spec), ctor_name = Sx_types[50].call(null, d), - e = Sx_runtime[13].call(null, ctor_spec), + e = Sx_runtime[15].call(null, ctor_spec), f = Sx_runtime[5].call(null, e), ctor_params = [5, @@ -36938,22 +47564,22 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[20].call (null, function(fs){ - var a = Sx_runtime[12].call(null, fs); + var a = Sx_runtime[14].call(null, fs); return Sx_types[50].call(null, a); }, g)], rtd_uid = Sx_types[73].call(null, type_name, field_names, ctor_params), h = Sx_types[79].call(null, rtd_uid), i = Sx_runtime[3].call(null, ctor_name); - Sx_runtime[75].call(null, env, i, h); + Sx_runtime[77].call(null, env, i, h); var j = Sx_types[80].call(null, rtd_uid), k = Sx_runtime[3].call(null, pred_name); - Sx_runtime[75].call(null, env, k, j); - Sx_runtime[91].call + Sx_runtime[77].call(null, env, k, j); + Sx_runtime[93].call (null, [14, - cst$8, + cst$9, function(args){ if(args){ var a = args[2]; @@ -36961,21 +47587,21 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var fs = a[1], idx = args[1], - b = Sx_runtime[15].call(null, fs, gE), + b = Sx_runtime[17].call(null, fs, hy), accessor_name = Sx_types[50].call(null, b), c = Sx_types[81].call(null, idx), d = Sx_runtime[3].call(null, accessor_name); - Sx_runtime[75].call(null, env, d, c); + Sx_runtime[77].call(null, env, d, c); var - e = [0, Sx_runtime[22].call(null, fs), gF], - f = Sx_runtime[1].call(null, cst$13, e); + e = [0, Sx_runtime[24].call(null, fs), hz], + f = Sx_runtime[1].call(null, cst$1, e); if(! Sx_types[49].call(null, f)) return 0; var - g = Sx_runtime[15].call(null, fs, gG), + g = Sx_runtime[17].call(null, fs, hA), mutator_name = Sx_types[50].call(null, g), h = Sx_types[82].call(null, idx), i = Sx_runtime[3].call(null, mutator_name); - return Sx_runtime[75].call(null, env, i, h); + return Sx_runtime[77].call(null, env, i, h); } } return 0; @@ -36990,38 +47616,38 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_get = "get", cst_impls = "impls", cst_methods = "methods", - gH = [2, cst_protocol_registry], - gI = [2, "satisfies?"], - gJ = [3, "type-of"], - gK = [0, [2, cst_impls], 0], - gL = [3, cst_protocol_registry], - gM = [3, cst_get], - gN = [3, cst_get], - gO = [3, cst_get], - gP = [3, cst_get], - gQ = [3, cst_impl], - gR = [0, [2, ": not implemented for this type"], 0], - gS = [2, cst$0], - gT = [3, "error"], - gU = [5, [0, [3, "nil?"], [0, [3, cst_impl], 0]]], - gV = [3, cst_if], - gW = [3, cst_impl], - gX = [3, cst_let], - gY = [3, cst_fn]; + hB = [2, cst_protocol_registry], + hC = [2, "satisfies?"], + hD = [3, "type-of"], + hE = [0, [2, cst_impls], 0], + hF = [3, cst_protocol_registry], + hG = [3, cst_get], + hH = [3, cst_get], + hI = [3, cst_get], + hJ = [3, cst_get], + hK = [3, cst_impl], + hL = [0, [2, ": not implemented for this type"], 0], + hM = [2, cst$0], + hN = [3, "error"], + hO = [5, [0, [3, "nil?"], [0, [3, cst_impl], 0]]], + hP = [3, cst_if], + hQ = [3, cst_impl], + hR = [3, cst_let], + hS = [3, cst_fn]; function sf_define_protocol(args, env){ var - a = Sx_runtime[12].call(null, args), + a = Sx_runtime[14].call(null, args), proto_name = Sx_types[50].call(null, a), - method_specs = Sx_runtime[13].call(null, args), - b = Sx_runtime[3].call(null, gH); - Sx_runtime[75].call(null, env, b, protocol_registry); - var c = Sx_runtime[3].call(null, gI); - Sx_runtime[75].call + method_specs = Sx_runtime[15].call(null, args), + b = Sx_runtime[3].call(null, hB); + Sx_runtime[77].call(null, env, b, protocol_registry); + var c = Sx_runtime[3].call(null, hC); + Sx_runtime[77].call (null, env, c, [14, - cst$8, + cst$9, function(args){ if(args){ var a = args[2]; @@ -37045,10 +47671,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function(spec){ var d = Stdlib_Hashtbl[1].call(null, 0, 2), - a = Sx_runtime[22].call(null, spec); + a = Sx_runtime[24].call(null, spec); Stdlib_Hashtbl[11].call(null, d, cst_arity, a); var - b = Sx_runtime[12].call(null, spec), + b = Sx_runtime[14].call(null, spec), c = Sx_types[50].call(null, b); Stdlib_Hashtbl[11].call(null, d, cst_name, c); return [6, d]; @@ -37056,113 +47682,113 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg f)]; Stdlib_Hashtbl[11].call(null, d, cst_methods, g); Stdlib_Hashtbl[11].call(null, d, cst_name, proto_name); - Sx_runtime[9].call(null, protocol_registry, proto_name, [6, d]); + Sx_runtime[11].call(null, protocol_registry, proto_name, [6, d]); var h = Sx_runtime[5].call(null, method_specs); Stdlib_List[18].call (null, function(spec){ var - a = Sx_runtime[12].call(null, spec), + a = Sx_runtime[14].call(null, spec), method_name = Sx_types[50].call(null, a), - params = Sx_runtime[13].call(null, spec), - self_sym = Sx_runtime[12].call(null, params), - b = [0, Sx_runtime[16].call(null, gQ, params), 0], + params = Sx_runtime[15].call(null, spec), + self_sym = Sx_runtime[14].call(null, params), + b = [0, Sx_runtime[18].call(null, hK, params), 0], c = eval_expr ([5, [0, - gY, + hS, [0, params, [0, [5, [0, - gX, + hR, [0, [5, [0, [5, [0, - gW, + hQ, [0, [5, [0, - gP, + hJ, [0, [5, [0, - gO, + hI, [0, [5, - [0, gN, [0, [5, [0, gM, [0, gL, [0, proto_name, 0]]]], gK]]], - [0, [5, [0, gJ, [0, self_sym, 0]]], 0]]]], + [0, hH, [0, [5, [0, hG, [0, hF, [0, proto_name, 0]]]], hE]]], + [0, [5, [0, hD, [0, self_sym, 0]]], 0]]]], [0, method_name, 0]]]], 0]]], 0]], [0, [5, [0, - gV, + hP, [0, - gU, + hO, [0, [5, [0, - gT, + hN, [0, [2, Sx_runtime[4].call - (null, [0, proto_name, [0, gS, [0, method_name, gR]]])], + (null, [0, proto_name, [0, hM, [0, method_name, hL]]])], 0]]], b]]]], 0]]]], 0]]]], env), d = Sx_runtime[3].call(null, method_name); - Sx_runtime[75].call(null, env, d, c); + Sx_runtime[77].call(null, env, d, c); return 0; }, h); return 0; } var - gZ = [1, 1.], - g0 = [0, [1, 1.], 0], - g1 = [1, 1.], - g2 = [2, "Unknown protocol: "], - g3 = [2, cst_impls], - g4 = [2, cst_methods], - g5 = [2, cst_name], - g6 = [2, " in protocol "], - g7 = [2, "Unknown method "], - g8 = [2, cst_arity], - g9 = [1, 1.], - g_ = [0, [1, 1.], 0], - g$ = [3, cst_fn], - ha = [3, cst_begin]; + hT = [1, 1.], + hU = [0, [1, 1.], 0], + hV = [1, 1.], + hW = [2, "Unknown protocol: "], + hX = [2, cst_impls], + hY = [2, cst_methods], + hZ = [2, cst_name], + h0 = [2, " in protocol "], + h1 = [2, "Unknown method "], + h2 = [2, cst_arity], + h3 = [1, 1.], + h4 = [0, [1, 1.], 0], + h5 = [3, cst_fn], + h6 = [3, cst_begin]; function sf_implement(args, env){ var - a = Sx_runtime[12].call(null, args), + a = Sx_runtime[14].call(null, args), proto_name = Sx_types[50].call(null, a), - b = Sx_runtime[15].call(null, args, gZ), + b = Sx_runtime[17].call(null, args, hT), raw_type_name = Sx_types[50].call(null, b), - c = [0, Sx_runtime[22].call(null, raw_type_name), g0], + c = [0, Sx_runtime[24].call(null, raw_type_name), hU], d = - [0, raw_type_name, [0, g1, [0, Sx_runtime[1].call(null, cst$2, c), 0]]], + [0, raw_type_name, [0, hV, [0, Sx_runtime[1].call(null, cst$4, c), 0]]], type_name = Sx_runtime[1].call(null, cst_slice, d), - e = Sx_runtime[13].call(null, args), - method_defs = Sx_runtime[13].call(null, e), - proto = Sx_runtime[23].call(null, protocol_registry, proto_name), - f = Sx_runtime[81].call(null, proto); + e = Sx_runtime[15].call(null, args), + method_defs = Sx_runtime[15].call(null, e), + proto = Sx_runtime[25].call(null, protocol_registry, proto_name), + f = Sx_runtime[83].call(null, proto); if(Sx_types[49].call(null, f)){ var - g = [2, Sx_runtime[4].call(null, [0, g2, [0, proto_name, 0]])], + g = [2, Sx_runtime[4].call(null, [0, hW, [0, proto_name, 0]])], h = Sx_runtime[2].call(null, g); throw caml_maybe_attach_backtrace([0, Sx_types[8], h], 1); } var - impls = Sx_runtime[23].call(null, proto, g3), - or = Sx_runtime[23].call(null, impls, type_name), + impls = Sx_runtime[25].call(null, proto, hX), + or = Sx_runtime[25].call(null, impls, type_name), type_impls = Sx_types[49].call(null, or) ? or @@ -37172,9 +47798,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(method_def){ var - a = Sx_runtime[12].call(null, method_def), + a = Sx_runtime[14].call(null, method_def), mname = Sx_types[50].call(null, a), - b = Sx_runtime[23].call(null, proto, g4), + b = Sx_runtime[25].call(null, proto, hY), c = Sx_runtime[5].call(null, b), d = [5, @@ -37182,104 +47808,104 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(m){ var - a = [0, Sx_runtime[23].call(null, m, g5), [0, mname, 0]], + a = [0, Sx_runtime[25].call(null, m, hZ), [0, mname, 0]], b = Sx_runtime[1].call(null, cst, a); return Sx_types[49].call(null, b); }, c)], - proto_method = Sx_runtime[12].call(null, d), - e = Sx_runtime[81].call(null, proto_method); + proto_method = Sx_runtime[14].call(null, d), + e = Sx_runtime[83].call(null, proto_method); if(Sx_types[49].call(null, e)){ var f = [2, Sx_runtime[4].call - (null, [0, g7, [0, mname, [0, g6, [0, proto_name, 0]]]])], + (null, [0, h1, [0, mname, [0, h0, [0, proto_name, 0]]]])], g = Sx_runtime[2].call(null, f); throw caml_maybe_attach_backtrace([0, Sx_types[8], g], 1); } var - arity = Sx_runtime[23].call(null, proto_method, g8), + arity = Sx_runtime[25].call(null, proto_method, h2), params = Sx_runtime[1].call - (null, cst_slice, [0, method_def, [0, g9, [0, arity, 0]]]), - h = [0, Sx_runtime[1].call(null, cst$7, [0, arity, g_]), 0], - i = [0, Sx_runtime[22].call(null, method_def), h], + (null, cst_slice, [0, method_def, [0, h3, [0, arity, 0]]]), + h = [0, Sx_runtime[1].call(null, cst$8, [0, arity, h4]), 0], + i = [0, Sx_runtime[24].call(null, method_def), h], j = Sx_runtime[1].call(null, cst, i); if(Sx_types[49].call(null, j)) - var body = Sx_runtime[15].call(null, method_def, arity); + var body = Sx_runtime[17].call(null, method_def, arity); else var l = Sx_runtime[1].call(null, cst_slice, [0, method_def, [0, arity, 0]]), - body = Sx_runtime[16].call(null, ha, l); - var k = eval_expr([5, [0, g$, [0, params, [0, body, 0]]]], env); - Sx_runtime[9].call(null, type_impls, mname, k); + body = Sx_runtime[18].call(null, h6, l); + var k = eval_expr([5, [0, h5, [0, params, [0, body, 0]]]], env); + Sx_runtime[11].call(null, type_impls, mname, k); return 0; }, i); - Sx_runtime[9].call(null, impls, type_name, type_impls); + Sx_runtime[11].call(null, impls, type_name, type_impls); return 0; } - var hb = [0, 0], hc = [0, 0], hd = [2, cst_impls]; + var h7 = [0, 0], h8 = [0, 0], h9 = [2, cst_impls]; function satisfies_p(proto_name, value){ var a = Sx_types[78].call(null, value), b = [0, 1 - Sx_types[49].call(null, a)]; - if(Sx_types[49].call(null, b)) return hb; + if(Sx_types[49].call(null, b)) return h7; var - c = Sx_runtime[37].call(null, proto_name), + c = Sx_runtime[39].call(null, proto_name), d = Sx_types[49].call(null, c) ? Sx_types[50].call(null, proto_name) : proto_name, - proto = Sx_runtime[23].call(null, protocol_registry, d), - e = Sx_runtime[81].call(null, proto); - if(Sx_types[49].call(null, e)) return hc; + proto = Sx_runtime[25].call(null, protocol_registry, d), + e = Sx_runtime[83].call(null, proto); + if(Sx_types[49].call(null, e)) return h8; var - f = Sx_runtime[71].call(null, value), - g = Sx_runtime[23].call(null, proto, hd), - h = Sx_runtime[23].call(null, g, f), - i = Sx_runtime[81].call(null, h); + f = Sx_runtime[73].call(null, value), + g = Sx_runtime[25].call(null, proto, h9), + h = Sx_runtime[25].call(null, g, f), + i = Sx_runtime[83].call(null, h); return [0, 1 - Sx_types[49].call(null, i)]; } var warnings = [5, 0], - he = [0, [0, 1], 0], - hf = [0, [0, 0], 0], - hg = [0, [2, cst_else], 0], - hh = [0, [0, 1], 0], - hi = [0, [0, 0], 0], - hj = + h_ = [0, [0, 1], 0], + h$ = [0, [0, 0], 0], + ia = [0, [2, cst_else], 0], + ib = [0, [0, 1], 0], + ic = [0, [0, 0], 0], + id = [0, [5, [0, [2, "match may be non-exhaustive (no wildcard or :else pattern)"], 0]], 0], - hk = [2, "match on boolean missing false case"], - hl = [2, "match on boolean missing true case"]; + ie = [2, "match on boolean missing false case"], + ig = [2, "match on boolean missing true case"]; function check_match_exhaustiveness(clauses){ var b = Sx_runtime[5].call(null, clauses), patterns = [5, Stdlib_List[20].call - (null, function(c){return Sx_runtime[12].call(null, c);}, b)], + (null, function(c){return Sx_runtime[14].call(null, c);}, b)], c = Sx_runtime[5].call(null, patterns), has_wildcard = [0, Stdlib_List[34].call (null, function(p){ - var and = Sx_runtime[37].call(null, p); + var and = Sx_runtime[39].call(null, p); if(Sx_types[49].call(null, and)){ var - b = Sx_runtime[1].call(null, cst, [0, p, he]), + b = Sx_runtime[1].call(null, cst, [0, p, h_]), and$0 = [0, 1 - Sx_types[49].call(null, b)]; if(Sx_types[49].call(null, and$0)) var - c = Sx_runtime[1].call(null, cst, [0, p, hf]), + c = Sx_runtime[1].call(null, cst, [0, p, h$]), a = [0, 1 - Sx_types[49].call(null, c)]; else var a = and$0; @@ -37295,7 +47921,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[34].call (null, function(p){ - var a = Sx_runtime[1].call(null, cst, [0, p, hg]); + var a = Sx_runtime[1].call(null, cst, [0, p, ia]); return Sx_types[49].call(null, a); }, d)], @@ -37305,7 +47931,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[34].call (null, function(p){ - var a = Sx_runtime[1].call(null, cst, [0, p, hh]); + var a = Sx_runtime[1].call(null, cst, [0, p, ib]); return Sx_types[49].call(null, a); }, e)], @@ -37315,7 +47941,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[34].call (null, function(p){ - var a = Sx_runtime[1].call(null, cst, [0, p, hi]); + var a = Sx_runtime[1].call(null, cst, [0, p, ic]); return Sx_types[49].call(null, a); }, f)], @@ -37326,7 +47952,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg : and, warnings$0 = Sx_types[49].call(null, g) - ? Sx_runtime[1].call(null, cst_append, [0, warnings, hj]) + ? Sx_runtime[1].call(null, cst_append, [0, warnings, id]) : warnings, and$0 = Sx_types[49].call(null, has_true) ? has_true : has_false; if(Sx_types[49].call(null, and$0)){ @@ -37347,7 +47973,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and$0; if(Sx_types[49].call(null, a)) var - h = Sx_types[49].call(null, has_true) ? hk : hl, + h = Sx_types[49].call(null, has_true) ? ie : ig, warnings$1 = Sx_runtime[1].call (null, cst_append, [0, warnings$0, [0, [5, [0, h, 0]], 0]]); @@ -37355,52 +47981,52 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var warnings$1 = warnings$0; return warnings$1; } - var hm = [1, 1.]; + var ih = [1, 1.]; function match_find_clause(val, clauses$1, env){ var clauses = clauses$1; for(;;){ - var a = Sx_runtime[31].call(null, clauses); + var a = Sx_runtime[33].call(null, clauses); if(Sx_types[49].call(null, a)) return 0; var - clause = Sx_runtime[12].call(null, clauses), - pattern = Sx_runtime[12].call(null, clause), - body = Sx_runtime[15].call(null, clause, hm), - local = Sx_runtime[78].call(null, env), + clause = Sx_runtime[14].call(null, clauses), + pattern = Sx_runtime[14].call(null, clause), + body = Sx_runtime[17].call(null, clause, ih), + local = Sx_runtime[80].call(null, env), b = match_pattern(pattern, val, local); if(Sx_types[49].call(null, b)) return [5, [0, local, [0, body, 0]]]; - var clauses$0 = Sx_runtime[13].call(null, clauses); + var clauses$0 = Sx_runtime[15].call(null, clauses); clauses = clauses$0; } } var - hn = [0, [3, cst$14], 0], - ho = [0, 1], - hp = [0, [1, 2.], 0], - hq = [0, [3, cst$1], 0], - hr = [1, 1.], - hs = [0, [3, cst_quote], 0], - ht = [1, 1.], - hu = [0, 1], - hv = [0, [3, cst_rest], 0], - hw = [0, [3, cst_rest], 0], - hx = [1, 0.], - hy = [1, 0.], - hz = [1, 1.], - hA = [0, [1, 1.], 0], - hB = [0, 1], - hC = [0, 0], - hD = [1, 1.]; + ii = [0, [3, cst$14], 0], + ij = [0, 1], + ik = [0, [1, 2.], 0], + il = [0, [3, cst$3], 0], + im = [1, 1.], + io = [0, [3, cst_quote], 0], + ip = [1, 1.], + iq = [0, 1], + ir = [0, [3, cst_rest], 0], + is = [0, [3, cst_rest], 0], + it = [1, 0.], + iu = [1, 0.], + iv = [1, 1.], + iw = [0, [1, 1.], 0], + ix = [0, 1], + iy = [0, 0], + iz = [1, 1.]; function match_pattern(pattern, value, env){ - var d = Sx_runtime[1].call(null, cst, [0, pattern, hn]); - if(Sx_types[49].call(null, d)) return ho; - var and = Sx_runtime[35].call(null, pattern); + var d = Sx_runtime[1].call(null, cst, [0, pattern, ii]); + if(Sx_types[49].call(null, d)) return ij; + var and = Sx_runtime[37].call(null, pattern); if(Sx_types[49].call(null, and)){ var - e = [0, Sx_runtime[22].call(null, pattern), hp], + e = [0, Sx_runtime[24].call(null, pattern), ik], and$0 = Sx_runtime[1].call(null, cst, e); if(Sx_types[49].call(null, and$0)) var - f = [0, Sx_runtime[12].call(null, pattern), hq], + f = [0, Sx_runtime[14].call(null, pattern), il], a = Sx_runtime[1].call(null, cst, f); else var a = and$0; @@ -37408,17 +48034,17 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg else var a = and; if(Sx_types[49].call(null, a)){ - var pred = eval_expr(Sx_runtime[15].call(null, pattern, hr), env); + var pred = eval_expr(Sx_runtime[17].call(null, pattern, im), env); return cek_call(pred, [5, [0, value, 0]]); } - var and$1 = Sx_runtime[35].call(null, pattern); + var and$1 = Sx_runtime[37].call(null, pattern); if(Sx_types[49].call(null, and$1)){ var - g = Sx_runtime[31].call(null, pattern), + g = Sx_runtime[33].call(null, pattern), and$2 = [0, 1 - Sx_types[49].call(null, g)]; if(Sx_types[49].call(null, and$2)) var - h = [0, Sx_runtime[12].call(null, pattern), hs], + h = [0, Sx_runtime[14].call(null, pattern), io], b = Sx_runtime[1].call(null, cst, h); else var b = and$2; @@ -37426,22 +48052,22 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg else var b = and$1; if(Sx_types[49].call(null, b)){ - var i = [0, value, [0, Sx_runtime[15].call(null, pattern, ht), 0]]; + var i = [0, value, [0, Sx_runtime[17].call(null, pattern, ip), 0]]; return Sx_runtime[1].call(null, cst, i); } - var j = Sx_runtime[37].call(null, pattern); + var j = Sx_runtime[39].call(null, pattern); if(Sx_types[49].call(null, j)){ var k = Sx_types[50].call(null, pattern), l = Sx_runtime[3].call(null, k); - Sx_runtime[75].call(null, env, l, value); - return hu; + Sx_runtime[77].call(null, env, l, value); + return iq; } var - and$3 = Sx_runtime[36].call(null, pattern), + and$3 = Sx_runtime[38].call(null, pattern), m = Sx_types[49].call(null, and$3) - ? Sx_runtime[36].call(null, value) + ? Sx_runtime[38].call(null, value) : and$3; if(Sx_types[49].call(null, m)){ var @@ -37452,39 +48078,39 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(k){ var - a = Sx_runtime[23].call(null, value, k), + a = Sx_runtime[25].call(null, value, k), b = - match_pattern(Sx_runtime[23].call(null, pattern, k), a, env); + match_pattern(Sx_runtime[25].call(null, pattern, k), a, env); return Sx_types[49].call(null, b); }, o)]; } - var and$4 = Sx_runtime[35].call(null, pattern); + var and$4 = Sx_runtime[37].call(null, pattern); if(Sx_types[49].call(null, and$4)) var - and$5 = Sx_runtime[35].call(null, value), + and$5 = Sx_runtime[37].call(null, value), c = Sx_types[49].call(null, and$5) - ? Sx_runtime[1].call(null, cst_contains, [0, pattern, hv]) + ? Sx_runtime[1].call(null, cst_contains, [0, pattern, ir]) : and$5; else var c = and$4; if(Sx_types[49].call(null, c)){ var - rest_idx = Sx_runtime[1].call(null, cst_index_of, [0, pattern, hw]), - p = [0, Sx_runtime[22].call(null, value), [0, rest_idx, 0]], - and$6 = Sx_runtime[1].call(null, cst$13, p); + rest_idx = Sx_runtime[1].call(null, cst_index_of, [0, pattern, is]), + p = [0, Sx_runtime[24].call(null, value), [0, rest_idx, 0]], + and$6 = Sx_runtime[1].call(null, cst$1, p); if(! Sx_types[49].call(null, and$6)) return and$6; var q = [0, Sx_runtime[1].call - (null, cst_slice, [0, value, [0, hx, [0, rest_idx, 0]]]), + (null, cst_slice, [0, value, [0, it, [0, rest_idx, 0]]]), 0], r = [0, Sx_runtime[1].call - (null, cst_slice, [0, pattern, [0, hy, [0, rest_idx, 0]]]), + (null, cst_slice, [0, pattern, [0, iu, [0, rest_idx, 0]]]), q], s = Sx_runtime[1].call(null, cst_zip, r), t = Sx_runtime[5].call(null, s), @@ -37494,35 +48120,35 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(pair){ var - a = Sx_runtime[15].call(null, pair, hz), - b = match_pattern(Sx_runtime[12].call(null, pair), a, env); + a = Sx_runtime[17].call(null, pair, iv), + b = match_pattern(Sx_runtime[14].call(null, pair), a, env); return Sx_types[49].call(null, b); }, t)]; if(! Sx_types[49].call(null, and$7)) return and$7; var - u = Sx_runtime[1].call(null, cst$7, [0, rest_idx, hA]), - rest_name = Sx_runtime[15].call(null, pattern, u), + u = Sx_runtime[1].call(null, cst$8, [0, rest_idx, iw]), + rest_name = Sx_runtime[17].call(null, pattern, u), v = Sx_runtime[1].call(null, cst_slice, [0, value, [0, rest_idx, 0]]), w = Sx_types[50].call(null, rest_name), x = Sx_runtime[3].call(null, w); - Sx_runtime[75].call(null, env, x, v); - return hB; + Sx_runtime[77].call(null, env, x, v); + return ix; } var - and$8 = Sx_runtime[35].call(null, pattern), + and$8 = Sx_runtime[37].call(null, pattern), y = Sx_types[49].call(null, and$8) - ? Sx_runtime[35].call(null, value) + ? Sx_runtime[37].call(null, value) : and$8; if(! Sx_types[49].call(null, y)) return Sx_runtime[1].call(null, cst, [0, pattern, [0, value, 0]]); var - z = [0, Sx_runtime[22].call(null, value), 0], - A = [0, Sx_runtime[22].call(null, pattern), z], + z = [0, Sx_runtime[24].call(null, value), 0], + A = [0, Sx_runtime[24].call(null, pattern), z], B = Sx_runtime[1].call(null, cst, A), C = [0, 1 - Sx_types[49].call(null, B)]; - if(Sx_types[49].call(null, C)) return hC; + if(Sx_types[49].call(null, C)) return iy; var pairs = Sx_runtime[1].call(null, cst_zip, [0, pattern, [0, value, 0]]), D = Sx_runtime[5].call(null, pairs); @@ -37531,34 +48157,34 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(pair){ var - a = Sx_runtime[15].call(null, pair, hD), - b = match_pattern(Sx_runtime[12].call(null, pair), a, env); + a = Sx_runtime[17].call(null, pair, iz), + b = match_pattern(Sx_runtime[14].call(null, pair), a, env); return Sx_types[49].call(null, b); }, D)]; } - var hE = [2, "match: no clause matched "], hF = [1, 1.]; + var iA = [2, "match: no clause matched "], iB = [1, 1.]; function step_sf_match(args, env, kont){ var - val = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - clauses = Sx_runtime[13].call(null, args), + val = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + clauses = Sx_runtime[15].call(null, args), result = match_find_clause(val, clauses, env), - a = Sx_runtime[81].call(null, result); + a = Sx_runtime[83].call(null, result); if(Sx_types[49].call(null, a)){ var - b = [0, hE, [0, Sx_runtime[66].call(null, val), 0]], + b = [0, iA, [0, Sx_runtime[68].call(null, val), 0]], c = [2, Sx_runtime[4].call(null, b)], d = Sx_runtime[2].call(null, c); throw caml_maybe_attach_backtrace([0, Sx_types[8], d], 1); } - var e = Sx_runtime[12].call(null, result); - return make_cek_state(Sx_runtime[15].call(null, result, hF), e, kont); + var e = Sx_runtime[14].call(null, result); + return make_cek_state(Sx_runtime[17].call(null, result, iB), e, kont); } - var hG = [1, 1.]; + var iC = [1, 1.]; function step_sf_handler_bind(args, env, kont){ var - handler_specs = Sx_runtime[12].call(null, args), - body = Sx_runtime[13].call(null, args), + handler_specs = Sx_runtime[14].call(null, args), + body = Sx_runtime[15].call(null, args), a = Sx_runtime[5].call(null, handler_specs), handlers = [5, @@ -37568,28 +48194,28 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = [0, - trampoline(eval_expr(Sx_runtime[15].call(null, spec, hG), env)), + trampoline(eval_expr(Sx_runtime[17].call(null, spec, iC), env)), 0]; return [5, [0, - trampoline(eval_expr(Sx_runtime[12].call(null, spec), env)), + trampoline(eval_expr(Sx_runtime[14].call(null, spec), env)), a]]; }, a)], - b = Sx_runtime[31].call(null, body); + b = Sx_runtime[33].call(null, body); if(Sx_types[49].call(null, b)) return make_cek_value(0, env, kont); var c = kont_push - (make_handler_frame(handlers, Sx_runtime[13].call(null, body), env), + (make_handler_frame(handlers, Sx_runtime[15].call(null, body), env), kont); - return make_cek_state(Sx_runtime[12].call(null, body), env, c); + return make_cek_state(Sx_runtime[14].call(null, body), env, c); } - var hH = [1, 2.], hI = [1, 1.], hJ = [5, 0]; + var iD = [1, 2.], iE = [1, 1.], iF = [5, 0]; function step_sf_restart_case(args, env, kont){ var - body = Sx_runtime[12].call(null, args), - restart_specs = Sx_runtime[13].call(null, args), + body = Sx_runtime[14].call(null, args), + restart_specs = Sx_runtime[15].call(null, args), a = Sx_runtime[5].call(null, restart_specs), restarts = [5, @@ -37597,30 +48223,30 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg (null, function(spec){ var - b = [0, Sx_runtime[15].call(null, spec, hH), 0], - c = [0, Sx_runtime[15].call(null, spec, hI), b], - d = Sx_runtime[12].call(null, spec), - e = Sx_runtime[37].call(null, d); + b = [0, Sx_runtime[17].call(null, spec, iD), 0], + c = [0, Sx_runtime[17].call(null, spec, iE), b], + d = Sx_runtime[14].call(null, spec), + e = Sx_runtime[39].call(null, d); if(Sx_types[49].call(null, e)) var - f = Sx_runtime[12].call(null, spec), + f = Sx_runtime[14].call(null, spec), a = Sx_types[50].call(null, f); else - var a = Sx_runtime[12].call(null, spec); + var a = Sx_runtime[14].call(null, spec); return [5, [0, a, c]]; }, a)]; return make_cek_state (body, env, - kont_push(make_restart_frame(restarts, hJ, env), kont)); + kont_push(make_restart_frame(restarts, iF, env), kont)); } - var hK = [2, "Unhandled condition: "]; + var iG = [2, "Unhandled condition: "]; function step_sf_signal(args, env, kont){ var - condition = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), + condition = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), handler_fn = kont_find_handler(kont, condition), - a = Sx_runtime[81].call(null, handler_fn); + a = Sx_runtime[83].call(null, handler_fn); if(! Sx_types[49].call(null, a)) return continue_with_call (handler_fn, @@ -37629,168 +48255,168 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg [5, [0, condition, 0]], kont_push(make_signal_return_frame(env, kont), kont)); var - b = [0, hK, [0, Sx_runtime[66].call(null, condition), 0]], + b = [0, iG, [0, Sx_runtime[68].call(null, condition), 0]], c = [2, Sx_runtime[4].call(null, b)], d = Sx_runtime[2].call(null, c); throw caml_maybe_attach_backtrace([0, Sx_types[8], d], 1); } var - hL = [0, [1, 2.], 0], - hM = [1, 1.], - hN = [2, "No restart named: "], - hO = [1, 1.], - hP = [1, 2.], - hQ = [1, 1.], - hR = [1, 2.], - hS = [2, cst_env]; + iH = [0, [1, 2.], 0], + iI = [1, 1.], + iJ = [2, "No restart named: "], + iK = [1, 1.], + iL = [1, 2.], + iM = [1, 1.], + iN = [1, 2.], + iO = [2, cst_env]; function step_sf_invoke_restart(args, env, kont){ - var a = Sx_runtime[12].call(null, args), b = Sx_runtime[37].call(null, a); + var a = Sx_runtime[14].call(null, args), b = Sx_runtime[39].call(null, a); if(Sx_types[49].call(null, b)) - var c = Sx_runtime[12].call(null, args), rn = Sx_types[50].call(null, c); + var c = Sx_runtime[14].call(null, args), rn = Sx_types[50].call(null, c); else - var rn = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)); + var rn = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)); var - d = Sx_runtime[37].call(null, rn), + d = Sx_runtime[39].call(null, rn), restart_name = Sx_types[49].call(null, d) ? Sx_types[50].call(null, rn) : rn, - e = [0, Sx_runtime[22].call(null, args), hL], - f = Sx_runtime[1].call(null, cst$13, e), + e = [0, Sx_runtime[24].call(null, args), iH], + f = Sx_runtime[1].call(null, cst$1, e), restart_arg = Sx_types[49].call(null, f) - ? trampoline(eval_expr(Sx_runtime[15].call(null, args, hM), env)) + ? trampoline(eval_expr(Sx_runtime[17].call(null, args, iI), env)) : 0, found = kont_find_restart(kont, restart_name), - g = Sx_runtime[81].call(null, found); + g = Sx_runtime[83].call(null, found); if(Sx_types[49].call(null, g)){ var - h = [0, hN, [0, Sx_runtime[66].call(null, restart_name), 0]], + h = [0, iJ, [0, Sx_runtime[68].call(null, restart_name), 0]], i = [2, Sx_runtime[4].call(null, h)], j = Sx_runtime[2].call(null, i); throw caml_maybe_attach_backtrace([0, Sx_types[8], j], 1); } var - entry = Sx_runtime[12].call(null, found), - restart_frame = Sx_runtime[15].call(null, found, hO), - rest_kont = Sx_runtime[15].call(null, found, hP), - params = Sx_runtime[15].call(null, entry, hQ), - body = Sx_runtime[15].call(null, entry, hR), - k = Sx_runtime[23].call(null, restart_frame, hS), - restart_env = Sx_runtime[78].call(null, k), - l = Sx_runtime[31].call(null, params), + entry = Sx_runtime[14].call(null, found), + restart_frame = Sx_runtime[17].call(null, found, iK), + rest_kont = Sx_runtime[17].call(null, found, iL), + params = Sx_runtime[17].call(null, entry, iM), + body = Sx_runtime[17].call(null, entry, iN), + k = Sx_runtime[25].call(null, restart_frame, iO), + restart_env = Sx_runtime[80].call(null, k), + l = Sx_runtime[33].call(null, params), m = [0, 1 - Sx_types[49].call(null, l)]; if(Sx_types[49].call(null, m)){ var - n = Sx_runtime[12].call(null, params), + n = Sx_runtime[14].call(null, params), o = Sx_runtime[3].call(null, n); - Sx_runtime[75].call(null, restart_env, o, restart_arg); + Sx_runtime[77].call(null, restart_env, o, restart_arg); } return make_cek_state(body, restart_env, rest_kont); } - var hT = [0, [1, 2.], 0], hU = [1, 2.], hV = [1, 1.]; + var iP = [0, [1, 2.], 0], iQ = [1, 2.], iR = [1, 1.]; function step_sf_if(args, env, kont){ var - a = [0, Sx_runtime[22].call(null, args), hT], - b = Sx_runtime[1].call(null, cst$6, a), - c = Sx_types[49].call(null, b) ? Sx_runtime[15].call(null, args, hU) : 0, + a = [0, Sx_runtime[24].call(null, args), iP], + b = Sx_runtime[1].call(null, cst$7, a), + c = Sx_types[49].call(null, b) ? Sx_runtime[17].call(null, args, iQ) : 0, d = kont_push - (make_if_frame(Sx_runtime[15].call(null, args, hV), c, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, d); + (make_if_frame(Sx_runtime[17].call(null, args, iR), c, env), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, d); } function step_sf_when(args, env, kont){ var a = - kont_push(make_when_frame(Sx_runtime[13].call(null, args), env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + kont_push(make_when_frame(Sx_runtime[15].call(null, args), env), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var hW = [0, [1, 1.], 0]; + var iS = [0, [1, 1.], 0]; function step_sf_begin(args, env, kont){ - var a = Sx_runtime[31].call(null, args); + var a = Sx_runtime[33].call(null, args); if(Sx_types[49].call(null, a)) return make_cek_value(0, env, kont); var - b = [0, Sx_runtime[22].call(null, args), hW], + b = [0, Sx_runtime[24].call(null, args), iS], c = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, c)) - return make_cek_state(Sx_runtime[12].call(null, args), env, kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, kont); var d = - kont_push(make_begin_frame(Sx_runtime[13].call(null, args), env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, d); + kont_push(make_begin_frame(Sx_runtime[15].call(null, args), env), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, d); } var - hX = [0, [2, cst_symbol], 0], - hY = [0, [2, cst_list], 0], - hZ = [0, [1, 2.], 0], - h0 = [0, [2, cst_list], 0], - h1 = [0, [1, 2.], 0], - h2 = [0, [2, cst_symbol], 0], - h3 = [1, 1.], - h4 = [5, 0], - h5 = [0, [1, 2.], 0], - h6 = [1, 1.], - h7 = [0, [1, 2.], 0], - h8 = [0, [1, 2.], 0], - h9 = [1, 1.]; + iT = [0, [2, cst_symbol], 0], + iU = [0, [2, cst_list], 0], + iV = [0, [1, 2.], 0], + iW = [0, [2, cst_list], 0], + iX = [0, [1, 2.], 0], + iY = [0, [2, cst_symbol], 0], + iZ = [1, 1.], + i0 = [5, 0], + i1 = [0, [1, 2.], 0], + i2 = [1, 1.], + i3 = [0, [1, 2.], 0], + i4 = [0, [1, 2.], 0], + i5 = [1, 1.]; function step_sf_let(args, env, kont){ var - c = Sx_runtime[12].call(null, args), - d = [0, Sx_runtime[71].call(null, c), hX], + c = Sx_runtime[14].call(null, args), + d = [0, Sx_runtime[73].call(null, c), iT], e = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, e)) return make_cek_value(sf_named_let(args, env), env, kont); var - bindings = Sx_runtime[12].call(null, args), - body = Sx_runtime[13].call(null, args), - local = Sx_runtime[78].call(null, env), - f = Sx_runtime[31].call(null, bindings); + bindings = Sx_runtime[14].call(null, args), + body = Sx_runtime[15].call(null, args), + local = Sx_runtime[80].call(null, env), + f = Sx_runtime[33].call(null, bindings); if(Sx_types[49].call(null, f)) return step_sf_begin(body, local, kont); var - g = Sx_runtime[12].call(null, bindings), - h = [0, Sx_runtime[71].call(null, g), hY], + g = Sx_runtime[14].call(null, bindings), + h = [0, Sx_runtime[73].call(null, g), iU], and = Sx_runtime[1].call(null, cst, h); if(Sx_types[49].call(null, and)) var - i = Sx_runtime[12].call(null, bindings), - j = [0, Sx_runtime[22].call(null, i), hZ], + i = Sx_runtime[14].call(null, bindings), + j = [0, Sx_runtime[24].call(null, i), iV], a = Sx_runtime[1].call(null, cst, j); else var a = and; if(Sx_types[49].call(null, a)) - var first_binding = Sx_runtime[12].call(null, bindings); + var first_binding = Sx_runtime[14].call(null, bindings); else var - x = [0, Sx_runtime[15].call(null, bindings, h9), 0], - first_binding = [5, [0, Sx_runtime[12].call(null, bindings), x]]; + x = [0, Sx_runtime[17].call(null, bindings, i5), 0], + first_binding = [5, [0, Sx_runtime[14].call(null, bindings), x]]; var - k = Sx_runtime[12].call(null, bindings), - l = [0, Sx_runtime[71].call(null, k), h0], + k = Sx_runtime[14].call(null, bindings), + l = [0, Sx_runtime[73].call(null, k), iW], and$0 = Sx_runtime[1].call(null, cst, l); if(Sx_types[49].call(null, and$0)) var - m = Sx_runtime[12].call(null, bindings), - n = [0, Sx_runtime[22].call(null, m), h1], + m = Sx_runtime[14].call(null, bindings), + n = [0, Sx_runtime[24].call(null, m), iX], b = Sx_runtime[1].call(null, cst, n); else var b = and$0; if(Sx_types[49].call(null, b)) - var rest_bindings = Sx_runtime[13].call(null, bindings); + var rest_bindings = Sx_runtime[15].call(null, bindings); else{ var - t = [0, Sx_runtime[22].call(null, bindings), h5], - u = [0, h6, [0, Sx_runtime[1].call(null, cst$11, t), 0]], + t = [0, Sx_runtime[24].call(null, bindings), i1], + u = [0, i2, [0, Sx_runtime[1].call(null, cst$12, t), 0]], v = Sx_runtime[1].call(null, cst_range, u), w = Sx_runtime[5].call(null, v), - pairs = [0, h4]; + pairs = [0, i0]; Stdlib_List[26].call (null, function(acc, i){ var - a = [0, Sx_runtime[1].call(null, cst$10, [0, i, h7]), 0], + a = [0, Sx_runtime[1].call(null, cst$11, [0, i, i3]), 0], b = Sx_runtime[1].call(null, cst_inc, a), - c = [0, Sx_runtime[15].call(null, bindings, b), 0], - d = Sx_runtime[1].call(null, cst$10, [0, i, h8]), - e = [5, [0, Sx_runtime[15].call(null, bindings, d), c]]; - pairs[1] = Sx_runtime[8].call(null, pairs[1], e); + c = [0, Sx_runtime[17].call(null, bindings, b), 0], + d = Sx_runtime[1].call(null, cst$11, [0, i, i4]), + e = [5, [0, Sx_runtime[17].call(null, bindings, d), c]]; + pairs[1] = Sx_runtime[10].call(null, pairs[1], e); return 0; }, 0, @@ -37798,53 +48424,53 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var rest_bindings = pairs[1]; } var - o = Sx_runtime[12].call(null, first_binding), - p = [0, Sx_runtime[71].call(null, o), h2], + o = Sx_runtime[14].call(null, first_binding), + p = [0, Sx_runtime[73].call(null, o), iY], q = Sx_runtime[1].call(null, cst, p); if(Sx_types[49].call(null, q)) var - r = Sx_runtime[12].call(null, first_binding), + r = Sx_runtime[14].call(null, first_binding), vname = Sx_types[50].call(null, r); else - var vname = Sx_runtime[12].call(null, first_binding); + var vname = Sx_runtime[14].call(null, first_binding); var s = kont_push(make_let_frame(vname, rest_bindings, body, local), kont); return make_cek_state - (Sx_runtime[15].call(null, first_binding, h3), local, s); + (Sx_runtime[17].call(null, first_binding, iZ), local, s); } var - h_ = [0, [1, 4.], 0], - h$ = [0, [2, cst_keyword], 0], - ia = [1, 1.], - ib = [0, [2, cst_effects], 0], - ic = [1, 1.], - id = [0, [1, 4.], 0], - ie = [0, [2, cst_keyword], 0], - ig = [1, 1.], - ih = [0, [2, cst_effects], 0], - ii = [1, 1.], - ij = [1, 3.], - ik = [0, [1, 4.], 0], - il = [0, [2, cst_keyword], 0], - im = [1, 1.], - io = [0, [2, cst_effects], 0], - ip = [1, 1.], - iq = [1, 2.], - ir = [1, 1.]; + i6 = [0, [1, 4.], 0], + i7 = [0, [2, cst_keyword], 0], + i8 = [1, 1.], + i9 = [0, [2, cst_effects], 0], + i_ = [1, 1.], + i$ = [0, [1, 4.], 0], + ja = [0, [2, cst_keyword], 0], + jb = [1, 1.], + jc = [0, [2, cst_effects], 0], + jd = [1, 1.], + je = [1, 3.], + jf = [0, [1, 4.], 0], + jg = [0, [2, cst_keyword], 0], + jh = [1, 1.], + ji = [0, [2, cst_effects], 0], + jj = [1, 1.], + jk = [1, 2.], + jl = [1, 1.]; function step_sf_define(args, env, kont){ var - name_sym = Sx_runtime[12].call(null, args), - c = [0, Sx_runtime[22].call(null, args), h_], - and = Sx_runtime[1].call(null, cst$13, c); + name_sym = Sx_runtime[14].call(null, args), + c = [0, Sx_runtime[24].call(null, args), i6], + and = Sx_runtime[1].call(null, cst$1, c); if(Sx_types[49].call(null, and)){ var - d = Sx_runtime[15].call(null, args, ia), - e = [0, Sx_runtime[71].call(null, d), h$], + d = Sx_runtime[17].call(null, args, i8), + e = [0, Sx_runtime[73].call(null, d), i7], and$0 = Sx_runtime[1].call(null, cst, e); if(Sx_types[49].call(null, and$0)) var - f = Sx_runtime[15].call(null, args, ic), - g = [0, Sx_types[51].call(null, f), ib], + f = Sx_runtime[17].call(null, args, i_), + g = [0, Sx_types[51].call(null, f), i9], has_effects = Sx_runtime[1].call(null, cst, g); else var has_effects = and$0; @@ -37852,17 +48478,17 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg else var has_effects = and; var - h = [0, Sx_runtime[22].call(null, args), id], - and$1 = Sx_runtime[1].call(null, cst$13, h); + h = [0, Sx_runtime[24].call(null, args), i$], + and$1 = Sx_runtime[1].call(null, cst$1, h); if(Sx_types[49].call(null, and$1)){ var - i = Sx_runtime[15].call(null, args, ig), - j = [0, Sx_runtime[71].call(null, i), ie], + i = Sx_runtime[17].call(null, args, jb), + j = [0, Sx_runtime[73].call(null, i), ja], and$2 = Sx_runtime[1].call(null, cst, j); if(Sx_types[49].call(null, and$2)) var - k = Sx_runtime[15].call(null, args, ii), - l = [0, Sx_types[51].call(null, k), ih], + k = Sx_runtime[17].call(null, args, jd), + l = [0, Sx_types[51].call(null, k), jc], a = Sx_runtime[1].call(null, cst, l); else var a = and$2; @@ -37870,18 +48496,18 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg else var a = and$1; var - val_idx = Sx_types[49].call(null, a) ? ij : ir, - m = [0, Sx_runtime[22].call(null, args), ik], - and$3 = Sx_runtime[1].call(null, cst$13, m); + val_idx = Sx_types[49].call(null, a) ? je : jl, + m = [0, Sx_runtime[24].call(null, args), jf], + and$3 = Sx_runtime[1].call(null, cst$1, m); if(Sx_types[49].call(null, and$3)){ var - n = Sx_runtime[15].call(null, args, im), - o = [0, Sx_runtime[71].call(null, n), il], + n = Sx_runtime[17].call(null, args, jh), + o = [0, Sx_runtime[73].call(null, n), jg], and$4 = Sx_runtime[1].call(null, cst, o); if(Sx_types[49].call(null, and$4)) var - p = Sx_runtime[15].call(null, args, ip), - q = [0, Sx_types[51].call(null, p), io], + p = Sx_runtime[17].call(null, args, jj), + q = [0, Sx_types[51].call(null, p), ji], b = Sx_runtime[1].call(null, cst, q); else var b = and$4; @@ -37890,121 +48516,121 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var b = and$3; var effect_list = - Sx_types[49].call(null, b) ? Sx_runtime[15].call(null, args, iq) : 0, + Sx_types[49].call(null, b) ? Sx_runtime[17].call(null, args, jk) : 0, r = kont_push (make_define_frame (Sx_types[50].call(null, name_sym), env, has_effects, effect_list), kont); - return make_cek_state(Sx_runtime[15].call(null, args, val_idx), env, r); + return make_cek_state(Sx_runtime[17].call(null, args, val_idx), env, r); } - var is = [1, 1.]; + var jm = [1, 1.]; function step_sf_set_b(args, env, kont){ var - a = Sx_runtime[12].call(null, args), + a = Sx_runtime[14].call(null, args), b = kont_push(make_set_frame(Sx_types[50].call(null, a), env), kont); - return make_cek_state(Sx_runtime[15].call(null, args, is), env, b); + return make_cek_state(Sx_runtime[17].call(null, args, jm), env, b); } - var it = [0, 1]; + var jn = [0, 1]; function step_sf_and(args, env, kont){ - var a = Sx_runtime[31].call(null, args); - if(Sx_types[49].call(null, a)) return make_cek_value(it, env, kont); + var a = Sx_runtime[33].call(null, args); + if(Sx_types[49].call(null, a)) return make_cek_value(jn, env, kont); var - b = kont_push(make_and_frame(Sx_runtime[13].call(null, args), env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, b); + b = kont_push(make_and_frame(Sx_runtime[15].call(null, args), env), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, b); } - var iu = [0, 0]; + var jo = [0, 0]; function step_sf_or(args, env, kont){ - var a = Sx_runtime[31].call(null, args); - if(Sx_types[49].call(null, a)) return make_cek_value(iu, env, kont); + var a = Sx_runtime[33].call(null, args); + if(Sx_types[49].call(null, a)) return make_cek_value(jo, env, kont); var - b = kont_push(make_or_frame(Sx_runtime[13].call(null, args), env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, b); + b = kont_push(make_or_frame(Sx_runtime[15].call(null, args), env), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, b); } var - iv = [1, 1.], - iw = [0, 1], - ix = [0, [1, 2.], 0], - iy = [1, 1.], - iz = [0, 0]; + jp = [1, 1.], + jq = [0, 1], + jr = [0, [1, 2.], 0], + js = [1, 1.], + jt = [0, 0]; function step_sf_cond(args, env, kont){ var scheme_p = cond_scheme_p(args); if(Sx_types[49].call(null, scheme_p)){ - var a = Sx_runtime[31].call(null, args); + var a = Sx_runtime[33].call(null, args); if(Sx_types[49].call(null, a)) return make_cek_value(0, env, kont); var - clause = Sx_runtime[12].call(null, args), - test = Sx_runtime[12].call(null, clause), + clause = Sx_runtime[14].call(null, args), + test = Sx_runtime[14].call(null, clause), b = is_else_clause(test); return Sx_types[49].call(null, b) ? make_cek_state - (Sx_runtime[15].call(null, clause, iv), env, kont) + (Sx_runtime[17].call(null, clause, jp), env, kont) : make_cek_state - (test, env, kont_push(make_cond_frame(args, env, iw), kont)); + (test, env, kont_push(make_cond_frame(args, env, jq), kont)); } var - c = [0, Sx_runtime[22].call(null, args), ix], - d = Sx_runtime[1].call(null, cst$5, c); + c = [0, Sx_runtime[24].call(null, args), jr], + d = Sx_runtime[1].call(null, cst$2, c); if(Sx_types[49].call(null, d)) return make_cek_value(0, env, kont); - var test$0 = Sx_runtime[12].call(null, args), e = is_else_clause(test$0); + var test$0 = Sx_runtime[14].call(null, args), e = is_else_clause(test$0); return Sx_types[49].call(null, e) - ? make_cek_state(Sx_runtime[15].call(null, args, iy), env, kont) + ? make_cek_state(Sx_runtime[17].call(null, args, js), env, kont) : make_cek_state - (test$0, env, kont_push(make_cond_frame(args, env, iz), kont)); + (test$0, env, kont_push(make_cond_frame(args, env, jt), kont)); } - var iA = [2, cst_first]; + var ju = [2, cst_first]; function step_sf_thread_first(args, env, kont){ var a = kont_push - (make_thread_frame(Sx_runtime[13].call(null, args), env, iA, 0), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + (make_thread_frame(Sx_runtime[15].call(null, args), env, ju, 0), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var cst_last = "last", iB = [2, cst_last]; + var cst_last = "last", jv = [2, cst_last]; function step_sf_thread_last(args, env, kont){ var a = kont_push - (make_thread_frame(Sx_runtime[13].call(null, args), env, iB, 0), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + (make_thread_frame(Sx_runtime[15].call(null, args), env, jv, 0), kont); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var iC = [1, 1.], iD = [2, cst_as]; + var jw = [1, 1.], jx = [2, cst_as]; function step_sf_thread_as(args, env, kont){ var - init = Sx_runtime[12].call(null, args), - name = Sx_runtime[15].call(null, args, iC), - a = Sx_runtime[13].call(null, args), - forms = Sx_runtime[13].call(null, a); + init = Sx_runtime[14].call(null, args), + name = Sx_runtime[17].call(null, args, jw), + a = Sx_runtime[15].call(null, args), + forms = Sx_runtime[15].call(null, a); return make_cek_state (init, env, - kont_push(make_thread_frame(forms, env, iD, name), kont)); + kont_push(make_thread_frame(forms, env, jx, name), kont)); } function step_sf_lambda(args, env, kont){ return make_cek_value(sf_lambda(args, env), env, kont); } var - iE = [0, [1, 1.], 0], - iF = [0, [1, 2.], 0], - iG = [0, [2, cst_keyword], 0], - iH = [0, [2, cst_value], 0], - iI = [1, 1.], - iJ = [0, [1, 2.], 0]; + jy = [0, [1, 1.], 0], + jz = [0, [1, 2.], 0], + jA = [0, [2, cst_keyword], 0], + jB = [0, [2, cst_value], 0], + jC = [1, 1.], + jD = [0, [1, 2.], 0]; function step_sf_scope(args, env, kont){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - rest_args = Sx_runtime[1].call(null, cst_slice, [0, args, iE]), - b = [0, Sx_runtime[22].call(null, rest_args), iF], - and = Sx_runtime[1].call(null, cst$13, b); + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + rest_args = Sx_runtime[1].call(null, cst_slice, [0, args, jy]), + b = [0, Sx_runtime[24].call(null, rest_args), jz], + and = Sx_runtime[1].call(null, cst$1, b); if(Sx_types[49].call(null, and)){ var - c = Sx_runtime[12].call(null, rest_args), - d = [0, Sx_runtime[71].call(null, c), iG], + c = Sx_runtime[14].call(null, rest_args), + d = [0, Sx_runtime[73].call(null, c), jA], and$0 = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, and$0)) var - e = Sx_runtime[12].call(null, rest_args), - f = [0, Sx_types[51].call(null, e), iH], + e = Sx_runtime[14].call(null, rest_args), + f = [0, Sx_types[51].call(null, e), jB], a = Sx_runtime[1].call(null, cst, f); else var a = and$0; @@ -38013,48 +48639,48 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = and; if(Sx_types[49].call(null, a)) var - g = trampoline(eval_expr(Sx_runtime[15].call(null, rest_args, iI), env)), - body = Sx_runtime[1].call(null, cst_slice, [0, rest_args, iJ]), + g = trampoline(eval_expr(Sx_runtime[17].call(null, rest_args, jC), env)), + body = Sx_runtime[1].call(null, cst_slice, [0, rest_args, jD]), val = g; else var body = rest_args, val = 0; - var h = Sx_runtime[31].call(null, body); + var h = Sx_runtime[33].call(null, body); if(Sx_types[49].call(null, h)) return make_cek_value(0, env, kont); var i = kont_push - (make_scope_acc_frame(name, val, Sx_runtime[13].call(null, body), env), + (make_scope_acc_frame(name, val, Sx_runtime[15].call(null, body), env), kont); - return make_cek_state(Sx_runtime[12].call(null, body), env, i); + return make_cek_state(Sx_runtime[14].call(null, body), env, i); } - var iK = [1, 1.], iL = [0, [1, 2.], 0]; + var jE = [1, 1.], jF = [0, [1, 2.], 0]; function step_sf_provide(args, env, kont){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - val = trampoline(eval_expr(Sx_runtime[15].call(null, args, iK), env)), - body = Sx_runtime[1].call(null, cst_slice, [0, args, iL]); - Sx_runtime[100].call(null, name, val); - var a = Sx_runtime[31].call(null, body); + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + val = trampoline(eval_expr(Sx_runtime[17].call(null, args, jE), env)), + body = Sx_runtime[1].call(null, cst_slice, [0, args, jF]); + Sx_runtime[102].call(null, name, val); + var a = Sx_runtime[33].call(null, body); if(Sx_types[49].call(null, a)){ - Sx_runtime[101].call(null, name); + Sx_runtime[103].call(null, name); return make_cek_value(0, env, kont); } var b = kont_push - (make_provide_frame(name, val, Sx_runtime[13].call(null, body), env), + (make_provide_frame(name, val, Sx_runtime[15].call(null, body), env), kont); - return make_cek_state(Sx_runtime[12].call(null, body), env, b); + return make_cek_state(Sx_runtime[14].call(null, body), env, b); } - var iM = [0, [1, 2.], 0], iN = [1, 1.], iO = [2, cst_value]; + var jG = [0, [1, 2.], 0], jH = [1, 1.], jI = [2, cst_value]; function step_sf_context(args, env, kont){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - a = [0, Sx_runtime[22].call(null, args), iM], - b = Sx_runtime[1].call(null, cst$13, a), + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + a = [0, Sx_runtime[24].call(null, args), jG], + b = Sx_runtime[1].call(null, cst$1, a), default_val = Sx_types[49].call(null, b) - ? trampoline(eval_expr(Sx_runtime[15].call(null, args, iN), env)) + ? trampoline(eval_expr(Sx_runtime[17].call(null, args, jH), env)) : 0, frame = kont_find_provide(kont, name); if(Sx_types[49].call(null, bind_tracking_ref[1])){ @@ -38065,164 +48691,164 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg d = [0, 1 - Sx_types[49].call(null, c)]; if(Sx_types[49].call(null, d)) bind_tracking_ref[1] = - Sx_runtime[8].call(null, bind_tracking_ref[1], name); + Sx_runtime[10].call(null, bind_tracking_ref[1], name); } var - sv = Sx_runtime[102].call(null, name), - e = Sx_runtime[81].call(null, sv), + sv = Sx_runtime[104].call(null, name), + e = Sx_runtime[83].call(null, sv), f = Sx_types[49].call(null, e) ? Sx_types [49].call (null, frame) - ? Sx_runtime[23].call(null, frame, iO) + ? Sx_runtime[25].call(null, frame, jI) : default_val : sv; return make_cek_value(f, env, kont); } var - iP = [0, [1, 2.], 0], - iQ = [1, 1.], - iR = [2, cst_value], - iS = [2, cst_peek], - iT = [2, cst_peek]; + jJ = [0, [1, 2.], 0], + jK = [1, 1.], + jL = [2, cst_value], + jM = [2, cst_peek], + jN = [2, cst_peek]; function step_sf_peek(args, env, kont){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - b = [0, Sx_runtime[22].call(null, args), iP], - c = Sx_runtime[1].call(null, cst$13, b), + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + b = [0, Sx_runtime[24].call(null, args), jJ], + c = Sx_runtime[1].call(null, cst$1, b), default_val = Sx_types[49].call(null, c) - ? trampoline(eval_expr(Sx_runtime[15].call(null, args, iQ), env)) + ? trampoline(eval_expr(Sx_runtime[17].call(null, args, jK), env)) : 0, frame = kont_find_provide(kont, name); if(Sx_types[49].call(null, frame)) - var a = Sx_runtime[23].call(null, frame, iR); + var a = Sx_runtime[25].call(null, frame, jL); else{ - var d = Sx_runtime[73].call(null, env, iS); + var d = Sx_runtime[75].call(null, env, jM); if(Sx_types[49].call(null, d)) var - e = Sx_runtime[74].call(null, env, iT), + e = Sx_runtime[76].call(null, env, jN), a = Sx_runtime[7].call(null, e, [5, [0, name, [0, default_val, 0]]]); else var a = default_val; } return make_cek_value(a, env, kont); } - var iU = [1, 1.]; + var jO = [1, 1.]; function step_sf_provide_b(args, env, kont){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), a = kont_push(make_provide_set_frame(name, env), kont); - return make_cek_state(Sx_runtime[15].call(null, args, iU), env, a); + return make_cek_state(Sx_runtime[17].call(null, args, jO), env, a); } var cst_scope_emit = "scope-emit!", - iV = [1, 1.], - iW = [2, cst_emitted], - iX = [2, cst_emitted], - iY = [2, cst_scope_emit], - iZ = [2, cst_scope_emit]; + jP = [1, 1.], + jQ = [2, cst_emitted], + jR = [2, cst_emitted], + jS = [2, cst_scope_emit], + jT = [2, cst_scope_emit]; function step_sf_emit(args, env, kont){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), - val = trampoline(eval_expr(Sx_runtime[15].call(null, args, iV), env)), + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), + val = trampoline(eval_expr(Sx_runtime[17].call(null, args, jP), env)), frame = kont_find_scope_acc(kont, name); if(Sx_types[49].call(null, frame)){ var - a = [0, Sx_runtime[23].call(null, frame, iW), [0, [5, [0, val, 0]], 0]], + a = [0, Sx_runtime[25].call(null, frame, jQ), [0, [5, [0, val, 0]], 0]], b = Sx_runtime[1].call(null, cst_append, a); - Sx_runtime[9].call(null, frame, iX, b); + Sx_runtime[11].call(null, frame, jR, b); return make_cek_value(0, env, kont); } - var c = Sx_runtime[73].call(null, env, iY); + var c = Sx_runtime[75].call(null, env, jS); if(Sx_types[49].call(null, c)){ - var d = Sx_runtime[74].call(null, env, iZ); + var d = Sx_runtime[76].call(null, env, jT); Sx_runtime[7].call(null, d, [5, [0, name, [0, val, 0]]]); } return make_cek_value(0, env, kont); } var - i0 = [2, cst_emitted], - i1 = [2, cst_emitted], - i2 = [2, cst_emitted], - i3 = [5, 0]; + jU = [2, cst_emitted], + jV = [2, cst_emitted], + jW = [2, cst_emitted], + jX = [5, 0]; function step_sf_emitted(args, env, kont){ var - name = trampoline(eval_expr(Sx_runtime[12].call(null, args), env)), + name = trampoline(eval_expr(Sx_runtime[14].call(null, args), env)), frame = kont_find_scope_acc(kont, name); if(Sx_types[49].call(null, frame)) - var a = Sx_runtime[23].call(null, frame, i0); + var a = Sx_runtime[25].call(null, frame, jU); else{ - var b = Sx_runtime[73].call(null, env, i1); + var b = Sx_runtime[75].call(null, env, jV); if(Sx_types[49].call(null, b)) var - c = Sx_runtime[74].call(null, env, i2), + c = Sx_runtime[76].call(null, env, jW), a = Sx_runtime[7].call(null, c, [5, [0, name, 0]]); else - var a = i3; + var a = jX; } return make_cek_value(a, env, kont); } function step_sf_reset(args, env, kont){ var a = kont_push(make_reset_frame(env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var i4 = [1, 1.], i5 = [1, 1.]; + var jY = [1, 1.], jZ = [1, 1.]; function step_sf_shift(args, env, kont){ var - a = Sx_runtime[12].call(null, args), + a = Sx_runtime[14].call(null, args), k_name = Sx_types[50].call(null, a), - body = Sx_runtime[15].call(null, args, i4), + body = Sx_runtime[17].call(null, args, jY), captured_result = kont_capture_to_reset(kont), - captured = Sx_runtime[12].call(null, captured_result), - rest_kont = Sx_runtime[15].call(null, captured_result, i5), - k = Sx_runtime[93].call(null, captured, rest_kont), - shift_env = Sx_runtime[78].call(null, env), + captured = Sx_runtime[14].call(null, captured_result), + rest_kont = Sx_runtime[17].call(null, captured_result, jZ), + k = Sx_runtime[95].call(null, captured, rest_kont), + shift_env = Sx_runtime[80].call(null, env), b = Sx_runtime[3].call(null, k_name); - Sx_runtime[75].call(null, shift_env, b, k); + Sx_runtime[77].call(null, shift_env, b, k); return make_cek_state(body, shift_env, rest_kont); } function step_sf_deref(args, env, kont){ var a = kont_push(make_deref_frame(env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var i6 = [5, 0], i7 = [5, 0]; + var j0 = [5, 0], j1 = [5, 0]; function cek_call(f, args){ var - b = Sx_runtime[81].call(null, args), - a = Sx_types[49].call(null, b) ? i6 : args, - c = Sx_runtime[81].call(null, f); + b = Sx_runtime[83].call(null, args), + a = Sx_types[49].call(null, b) ? j0 : args, + c = Sx_runtime[83].call(null, f); if(Sx_types[49].call(null, c)) return 0; var - or = Sx_runtime[83].call(null, f), - or$0 = Sx_types[49].call(null, or) ? or : Sx_runtime[88].call(null, f); + or = Sx_runtime[85].call(null, f), + or$0 = Sx_types[49].call(null, or) ? or : Sx_runtime[90].call(null, f); return Sx_types[49].call(null, or$0) ? cek_run - (continue_with_call(f, a, Sx_runtime[77].call(null, 0), a, i7)) + (continue_with_call(f, a, Sx_runtime[79].call(null, 0), a, j1)) : 0; } var cst_update_fn = "update-fn", - i8 = [1, 1.], - i9 = [1, 2.], - i_ = [2, cst_update_fn], - i$ = [0, 0]; + j2 = [1, 1.], + j3 = [1, 2.], + j4 = [2, cst_update_fn], + j5 = [0, 0]; function reactive_shift_deref(sig, env, kont){ var scan_result = kont_capture_to_reactive_reset(kont), - captured_frames = Sx_runtime[12].call(null, scan_result), - reset_frame = Sx_runtime[15].call(null, scan_result, i8), - remaining_kont = Sx_runtime[15].call(null, scan_result, i9), - update_fn = Sx_runtime[23].call(null, reset_frame, i_), + captured_frames = Sx_runtime[14].call(null, scan_result), + reset_frame = Sx_runtime[17].call(null, scan_result, j2), + remaining_kont = Sx_runtime[17].call(null, scan_result, j3), + update_fn = Sx_runtime[25].call(null, reset_frame, j4), subscriber = [14, - cst$8, + cst$9, function(args){ var a = Sx_runtime[5].call(null, 0); Stdlib_List[18].call(null, function(d){cek_call(d, 0); return 0;}, a); var - new_reset = make_reactive_reset_frame(env, update_fn, i$), + new_reset = make_reactive_reset_frame(env, update_fn, j5), new_kont = Sx_runtime[1].call (null, @@ -38230,27 +48856,27 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg [0, captured_frames, [0, [5, [0, new_reset, 0]], [0, remaining_kont, 0]]]); - return Sx_runtime[114].call + return Sx_runtime[116].call (null, [14, - cst$8, + cst$9, function(args){ if(args && ! args[2]){ var d = args[1]; - Sx_runtime[8].call(null, 0, d); + Sx_runtime[10].call(null, 0, d); return 0; } return 0; }], [14, - cst$8, + cst$9, function(args){ return cek_run (make_cek_value - (Sx_runtime[111].call(null, sig), env, new_kont)); + (Sx_runtime[113].call(null, sig), env, new_kont)); }]); }]; - Sx_runtime[112].call(null, sig, subscriber); + Sx_runtime[114].call(null, sig, subscriber); var initial_kont = Sx_runtime[1].call @@ -38259,317 +48885,317 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg [0, captured_frames, [0, [5, [0, reset_frame, 0]], [0, remaining_kont, 0]]]); - return make_cek_value(Sx_runtime[111].call(null, sig), env, initial_kont); + return make_cek_value(Sx_runtime[113].call(null, sig), env, initial_kont); } - var ja = [0, [2, cst_symbol], 0], jb = [5, 0]; + var j6 = [0, [2, cst_symbol], 0], j7 = [5, 0]; function step_eval_call(head, args, env, kont){ var - a = [0, Sx_runtime[71].call(null, head), ja], + a = [0, Sx_runtime[73].call(null, head), j6], b = Sx_runtime[1].call(null, cst, a), hname = Sx_types[49].call(null, b) ? Sx_types[50].call(null, head) : 0; return make_cek_state (head, env, - kont_push(make_arg_frame(0, jb, args, env, args, hname), kont)); + kont_push(make_arg_frame(0, j7, args, env, args, hname), kont)); } var - jc = [0, [2, cst_map], 0], - jd = [0, [2, cst_map_indexed], 0], - je = [0, [2, cst_filter], 0], - jf = [0, [2, cst_reduce], 0], - jg = [0, [2, cst_some], 0], - jh = [0, [2, cst_every$0], 0], - ji = [0, [2, cst_for_each], 0]; + j8 = [0, [2, cst_map], 0], + j9 = [0, [2, cst_map_indexed], 0], + j_ = [0, [2, cst_filter], 0], + j$ = [0, [2, cst_reduce], 0], + ka = [0, [2, cst_some], 0], + kb = [0, [2, cst_every$0], 0], + kc = [0, [2, cst_for_each], 0]; function ho_form_name_p(name){ - var or = Sx_runtime[1].call(null, cst, [0, name, jc]); + var or = Sx_runtime[1].call(null, cst, [0, name, j8]); if(Sx_types[49].call(null, or)) return or; - var or$0 = Sx_runtime[1].call(null, cst, [0, name, jd]); + var or$0 = Sx_runtime[1].call(null, cst, [0, name, j9]); if(Sx_types[49].call(null, or$0)) return or$0; - var or$1 = Sx_runtime[1].call(null, cst, [0, name, je]); + var or$1 = Sx_runtime[1].call(null, cst, [0, name, j_]); if(Sx_types[49].call(null, or$1)) return or$1; - var or$2 = Sx_runtime[1].call(null, cst, [0, name, jf]); + var or$2 = Sx_runtime[1].call(null, cst, [0, name, j$]); if(Sx_types[49].call(null, or$2)) return or$2; - var or$3 = Sx_runtime[1].call(null, cst, [0, name, jg]); + var or$3 = Sx_runtime[1].call(null, cst, [0, name, ka]); if(Sx_types[49].call(null, or$3)) return or$3; - var or$4 = Sx_runtime[1].call(null, cst, [0, name, jh]); + var or$4 = Sx_runtime[1].call(null, cst, [0, name, kb]); return Sx_types[49].call(null, or$4) ? or$4 - : Sx_runtime[1].call(null, cst, [0, name, ji]); + : Sx_runtime[1].call(null, cst, [0, name, kc]); } function ho_fn_p(v){ - var or = Sx_runtime[88].call(null, v); - return Sx_types[49].call(null, or) ? or : Sx_runtime[83].call(null, v); + var or = Sx_runtime[90].call(null, v); + return Sx_types[49].call(null, or) ? or : Sx_runtime[85].call(null, v); } - var jj = [0, [2, cst_reduce], 0], jk = [1, 1.], jl = [1, 2.], jm = [1, 1.]; + var kd = [0, [2, cst_reduce], 0], ke = [1, 1.], kf = [1, 2.], kg = [1, 1.]; function ho_swap_args(ho_type, evaled){ - var c = Sx_runtime[1].call(null, cst, [0, ho_type, jj]); + var c = Sx_runtime[1].call(null, cst, [0, ho_type, kd]); if(Sx_types[49].call(null, c)){ var - a = Sx_runtime[12].call(null, evaled), - b = Sx_runtime[15].call(null, evaled, jk), + a = Sx_runtime[14].call(null, evaled), + b = Sx_runtime[17].call(null, evaled, ke), d = ho_fn_p(a), and = [0, 1 - Sx_types[49].call(null, d)], e = Sx_types[49].call(null, and) ? ho_fn_p(b) : and; return Sx_types[49].call(null, e) ? [5, - [0, b, [0, Sx_runtime[15].call(null, evaled, jl), [0, a, 0]]]] + [0, b, [0, Sx_runtime[17].call(null, evaled, kf), [0, a, 0]]]] : evaled; } var - a$0 = Sx_runtime[12].call(null, evaled), - b$0 = Sx_runtime[15].call(null, evaled, jm), + a$0 = Sx_runtime[14].call(null, evaled), + b$0 = Sx_runtime[17].call(null, evaled, kg), f = ho_fn_p(a$0), and$0 = [0, 1 - Sx_types[49].call(null, f)], g = Sx_types[49].call(null, and$0) ? ho_fn_p(b$0) : and$0; return Sx_types[49].call(null, g) ? [5, [0, b$0, [0, a$0, 0]]] : evaled; } var - jn = [0, [2, cst_map], 0], - jo = [0, [1, 2.], 0], - jp = [5, 0], - jq = [5, 0], - jr = [5, 0], - js = [1, 1.], - jt = [5, 0], - ju = [5, 0], - jv = [5, 0], - jw = [0, [2, cst_map_indexed], 0], - jx = [1, 1.], - jy = [5, 0], - jz = [5, 0], - jA = [5, 0], - jB = [1, 0.], - jC = [0, [2, cst_filter], 0], - jD = [1, 1.], - jE = [5, 0], - jF = [5, 0], - jG = [5, 0], - jH = [0, [2, cst_reduce], 0], - jI = [1, 1.], - jJ = [1, 2.], - jK = [5, 0], - jL = [0, [2, cst_some], 0], - jM = [1, 1.], - jN = [0, 0], - jO = [5, 0], - jP = [0, [2, cst_every], 0], - jQ = [1, 1.], - jR = [0, 1], - jS = [5, 0], - jT = [0, [2, cst_for_each], 0], - jU = [1, 1.], - jV = [5, 0], - jW = [2, "Unknown HO type: "]; + kh = [0, [2, cst_map], 0], + ki = [0, [1, 2.], 0], + kj = [5, 0], + kk = [5, 0], + kl = [5, 0], + km = [1, 1.], + kn = [5, 0], + ko = [5, 0], + kp = [5, 0], + kq = [0, [2, cst_map_indexed], 0], + kr = [1, 1.], + ks = [5, 0], + kt = [5, 0], + ku = [5, 0], + kv = [1, 0.], + kw = [0, [2, cst_filter], 0], + kx = [1, 1.], + ky = [5, 0], + kz = [5, 0], + kA = [5, 0], + kB = [0, [2, cst_reduce], 0], + kC = [1, 1.], + kD = [1, 2.], + kE = [5, 0], + kF = [0, [2, cst_some], 0], + kG = [1, 1.], + kH = [0, 0], + kI = [5, 0], + kJ = [0, [2, cst_every], 0], + kK = [1, 1.], + kL = [0, 1], + kM = [5, 0], + kN = [0, [2, cst_for_each], 0], + kO = [1, 1.], + kP = [5, 0], + kQ = [2, "Unknown HO type: "]; function ho_setup_dispatch(ho_type, evaled, env, kont){ var ordered = ho_swap_args(ho_type, evaled), - f = Sx_runtime[12].call(null, ordered), - a = Sx_runtime[1].call(null, cst, [0, ho_type, jn]); + f = Sx_runtime[14].call(null, ordered), + a = Sx_runtime[1].call(null, cst, [0, ho_type, kh]); if(Sx_types[49].call(null, a)){ var - b = [0, Sx_runtime[22].call(null, ordered), jo], - c = Sx_runtime[1].call(null, cst$6, b); + b = [0, Sx_runtime[24].call(null, ordered), ki], + c = Sx_runtime[1].call(null, cst$7, b); if(Sx_types[49].call(null, c)){ var - colls = Sx_runtime[13].call(null, ordered), + colls = Sx_runtime[15].call(null, ordered), d = Sx_runtime[5].call(null, colls), e = [0, Stdlib_List[34].call (null, function(c){ - var a = Sx_runtime[31].call(null, c); + var a = Sx_runtime[33].call(null, c); return Sx_types[49].call(null, a); }, d)]; - if(Sx_types[49].call(null, e)) return make_cek_value(jp, env, kont); + if(Sx_types[49].call(null, e)) return make_cek_value(kj, env, kont); var g = Sx_runtime[5].call(null, colls), heads = [5, Stdlib_List[20].call - (null, function(c){return Sx_runtime[12].call(null, c);}, g)], + (null, function(c){return Sx_runtime[14].call(null, c);}, g)], h = Sx_runtime[5].call(null, colls), tails = [5, Stdlib_List[20].call - (null, function(c){return Sx_runtime[13].call(null, c);}, h)]; + (null, function(c){return Sx_runtime[15].call(null, c);}, h)]; return continue_with_call (f, heads, env, - jr, - kont_push(make_multi_map_frame(f, tails, jq, env), kont)); + kl, + kont_push(make_multi_map_frame(f, tails, kk, env), kont)); } var - coll = Sx_runtime[15].call(null, ordered, js), - i = Sx_runtime[31].call(null, coll); - if(Sx_types[49].call(null, i)) return make_cek_value(jt, env, kont); + coll = Sx_runtime[17].call(null, ordered, km), + i = Sx_runtime[33].call(null, coll); + if(Sx_types[49].call(null, i)) return make_cek_value(kn, env, kont); var j = kont_push - (make_map_frame(f, Sx_runtime[13].call(null, coll), ju, env), kont); + (make_map_frame(f, Sx_runtime[15].call(null, coll), ko, env), kont); return continue_with_call - (f, [5, [0, Sx_runtime[12].call(null, coll), 0]], env, jv, j); + (f, [5, [0, Sx_runtime[14].call(null, coll), 0]], env, kp, j); } - var k = Sx_runtime[1].call(null, cst, [0, ho_type, jw]); + var k = Sx_runtime[1].call(null, cst, [0, ho_type, kq]); if(Sx_types[49].call(null, k)){ var - coll$0 = Sx_runtime[15].call(null, ordered, jx), - l = Sx_runtime[31].call(null, coll$0); - if(Sx_types[49].call(null, l)) return make_cek_value(jy, env, kont); + coll$0 = Sx_runtime[17].call(null, ordered, kr), + l = Sx_runtime[33].call(null, coll$0); + if(Sx_types[49].call(null, l)) return make_cek_value(ks, env, kont); var m = kont_push (make_map_indexed_frame - (f, Sx_runtime[13].call(null, coll$0), jz, env), + (f, Sx_runtime[15].call(null, coll$0), kt, env), kont); return continue_with_call (f, - [5, [0, jB, [0, Sx_runtime[12].call(null, coll$0), 0]]], + [5, [0, kv, [0, Sx_runtime[14].call(null, coll$0), 0]]], env, - jA, + ku, m); } - var n = Sx_runtime[1].call(null, cst, [0, ho_type, jC]); + var n = Sx_runtime[1].call(null, cst, [0, ho_type, kw]); if(Sx_types[49].call(null, n)){ var - coll$1 = Sx_runtime[15].call(null, ordered, jD), - o = Sx_runtime[31].call(null, coll$1); - if(Sx_types[49].call(null, o)) return make_cek_value(jE, env, kont); + coll$1 = Sx_runtime[17].call(null, ordered, kx), + o = Sx_runtime[33].call(null, coll$1); + if(Sx_types[49].call(null, o)) return make_cek_value(ky, env, kont); var - p = Sx_runtime[12].call(null, coll$1), + p = Sx_runtime[14].call(null, coll$1), q = kont_push - (make_filter_frame(f, Sx_runtime[13].call(null, coll$1), jF, p, env), + (make_filter_frame(f, Sx_runtime[15].call(null, coll$1), kz, p, env), kont); return continue_with_call - (f, [5, [0, Sx_runtime[12].call(null, coll$1), 0]], env, jG, q); + (f, [5, [0, Sx_runtime[14].call(null, coll$1), 0]], env, kA, q); } - var r = Sx_runtime[1].call(null, cst, [0, ho_type, jH]); + var r = Sx_runtime[1].call(null, cst, [0, ho_type, kB]); if(Sx_types[49].call(null, r)){ var - init = Sx_runtime[15].call(null, ordered, jI), - coll$2 = Sx_runtime[15].call(null, ordered, jJ), - s = Sx_runtime[31].call(null, coll$2); + init = Sx_runtime[17].call(null, ordered, kC), + coll$2 = Sx_runtime[17].call(null, ordered, kD), + s = Sx_runtime[33].call(null, coll$2); if(Sx_types[49].call(null, s)) return make_cek_value(init, env, kont); var t = kont_push - (make_reduce_frame(f, Sx_runtime[13].call(null, coll$2), env), kont); + (make_reduce_frame(f, Sx_runtime[15].call(null, coll$2), env), kont); return continue_with_call (f, - [5, [0, init, [0, Sx_runtime[12].call(null, coll$2), 0]]], + [5, [0, init, [0, Sx_runtime[14].call(null, coll$2), 0]]], env, - jK, + kE, t); } - var u = Sx_runtime[1].call(null, cst, [0, ho_type, jL]); + var u = Sx_runtime[1].call(null, cst, [0, ho_type, kF]); if(Sx_types[49].call(null, u)){ var - coll$3 = Sx_runtime[15].call(null, ordered, jM), - v = Sx_runtime[31].call(null, coll$3); - if(Sx_types[49].call(null, v)) return make_cek_value(jN, env, kont); + coll$3 = Sx_runtime[17].call(null, ordered, kG), + v = Sx_runtime[33].call(null, coll$3); + if(Sx_types[49].call(null, v)) return make_cek_value(kH, env, kont); var w = kont_push - (make_some_frame(f, Sx_runtime[13].call(null, coll$3), env), kont); + (make_some_frame(f, Sx_runtime[15].call(null, coll$3), env), kont); return continue_with_call - (f, [5, [0, Sx_runtime[12].call(null, coll$3), 0]], env, jO, w); + (f, [5, [0, Sx_runtime[14].call(null, coll$3), 0]], env, kI, w); } - var x = Sx_runtime[1].call(null, cst, [0, ho_type, jP]); + var x = Sx_runtime[1].call(null, cst, [0, ho_type, kJ]); if(Sx_types[49].call(null, x)){ var - coll$4 = Sx_runtime[15].call(null, ordered, jQ), - y = Sx_runtime[31].call(null, coll$4); - if(Sx_types[49].call(null, y)) return make_cek_value(jR, env, kont); + coll$4 = Sx_runtime[17].call(null, ordered, kK), + y = Sx_runtime[33].call(null, coll$4); + if(Sx_types[49].call(null, y)) return make_cek_value(kL, env, kont); var z = kont_push - (make_every_frame(f, Sx_runtime[13].call(null, coll$4), env), kont); + (make_every_frame(f, Sx_runtime[15].call(null, coll$4), env), kont); return continue_with_call - (f, [5, [0, Sx_runtime[12].call(null, coll$4), 0]], env, jS, z); + (f, [5, [0, Sx_runtime[14].call(null, coll$4), 0]], env, kM, z); } - var A = Sx_runtime[1].call(null, cst, [0, ho_type, jT]); + var A = Sx_runtime[1].call(null, cst, [0, ho_type, kN]); if(! Sx_types[49].call(null, A)){ var - D = [2, Sx_runtime[4].call(null, [0, jW, [0, ho_type, 0]])], + D = [2, Sx_runtime[4].call(null, [0, kQ, [0, ho_type, 0]])], E = Sx_runtime[2].call(null, D); throw caml_maybe_attach_backtrace([0, Sx_types[8], E], 1); } var - coll$5 = Sx_runtime[15].call(null, ordered, jU), - B = Sx_runtime[31].call(null, coll$5); + coll$5 = Sx_runtime[17].call(null, ordered, kO), + B = Sx_runtime[33].call(null, coll$5); if(Sx_types[49].call(null, B)) return make_cek_value(0, env, kont); var C = kont_push - (make_for_each_frame(f, Sx_runtime[13].call(null, coll$5), env), kont); + (make_for_each_frame(f, Sx_runtime[15].call(null, coll$5), env), kont); return continue_with_call - (f, [5, [0, Sx_runtime[12].call(null, coll$5), 0]], env, jV, C); + (f, [5, [0, Sx_runtime[14].call(null, coll$5), 0]], env, kP, C); } - var jX = [5, 0], jY = [2, cst_map]; + var kR = [5, 0], kS = [2, cst_map]; function step_ho_map(args, env, kont){ var a = kont_push - (make_ho_setup_frame(jY, Sx_runtime[13].call(null, args), jX, env), + (make_ho_setup_frame(kS, Sx_runtime[15].call(null, args), kR, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var jZ = [5, 0], j0 = [2, cst_map_indexed]; + var kT = [5, 0], kU = [2, cst_map_indexed]; function step_ho_map_indexed(args, env, kont){ var a = kont_push - (make_ho_setup_frame(j0, Sx_runtime[13].call(null, args), jZ, env), + (make_ho_setup_frame(kU, Sx_runtime[15].call(null, args), kT, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var j1 = [5, 0], j2 = [2, cst_filter]; + var kV = [5, 0], kW = [2, cst_filter]; function step_ho_filter(args, env, kont){ var a = kont_push - (make_ho_setup_frame(j2, Sx_runtime[13].call(null, args), j1, env), + (make_ho_setup_frame(kW, Sx_runtime[15].call(null, args), kV, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var j3 = [5, 0], j4 = [2, cst_reduce]; + var kX = [5, 0], kY = [2, cst_reduce]; function step_ho_reduce(args, env, kont){ var a = kont_push - (make_ho_setup_frame(j4, Sx_runtime[13].call(null, args), j3, env), + (make_ho_setup_frame(kY, Sx_runtime[15].call(null, args), kX, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var j5 = [5, 0], j6 = [2, cst_some]; + var kZ = [5, 0], k0 = [2, cst_some]; function step_ho_some(args, env, kont){ var a = kont_push - (make_ho_setup_frame(j6, Sx_runtime[13].call(null, args), j5, env), + (make_ho_setup_frame(k0, Sx_runtime[15].call(null, args), kZ, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var j7 = [5, 0], j8 = [2, cst_every]; + var k1 = [5, 0], k2 = [2, cst_every]; function step_ho_every(args, env, kont){ var a = kont_push - (make_ho_setup_frame(j8, Sx_runtime[13].call(null, args), j7, env), + (make_ho_setup_frame(k2, Sx_runtime[15].call(null, args), k1, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } - var j9 = [5, 0], j_ = [2, cst_for_each]; + var k3 = [5, 0], k4 = [2, cst_for_each]; function step_ho_for_each(args, env, kont){ var a = kont_push - (make_ho_setup_frame(j_, Sx_runtime[13].call(null, args), j9, env), + (make_ho_setup_frame(k4, Sx_runtime[15].call(null, args), k3, env), kont); - return make_cek_state(Sx_runtime[12].call(null, args), env, a); + return make_cek_state(Sx_runtime[14].call(null, args), env, a); } var cst_vm_suspended = "__vm_suspended", @@ -38582,959 +49208,982 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_scheme = "scheme", cst_subscribers = "subscribers", last_error_kont_ref = [0, 0], - j$ = [0, [2, cst_if], 0], - ka = [2, cst_env], - kb = [2, "then"], - kc = [2, cst_else], - kd = [2, cst_env], - ke = [2, cst_else], - kf = [0, [2, cst_when], 0], - kg = [2, cst_body], - kh = [2, cst_env], - ki = [0, [1, 1.], 0], - kj = [0, [2, cst_begin], 0], - kk = [2, cst_remaining], - kl = [2, cst_env], - km = [0, [1, 1.], 0], - kn = [0, [2, cst_let], 0], - ko = [2, cst_name], - kp = [2, cst_remaining], - kq = [2, cst_body], - kr = [2, cst_env], - ks = [0, [2, cst_symbol], 0], - kt = [1, 1.], - ku = [0, [2, cst_define], 0], - kv = [2, cst_name], - kw = [2, cst_env], - kx = [2, "has-effects"], - ky = [2, "effect-list"], - kz = [0, [2, cst_symbol], 0], - kA = [2, cst_effect_annotations], - kB = [2, cst_effect_annotations], - kC = [2, cst_effect_annotations], - kD = [0, [2, cst_set], 0], - kE = [2, cst_name], - kF = [2, cst_env], - kG = [0, [2, cst_and], 0], - kH = [2, cst_remaining], - kI = [0, [1, 1.], 0], - kJ = [2, cst_env], - kK = [2, cst_env], - kL = [0, [2, cst_or], 0], - kM = [2, cst_remaining], - kN = [0, 0], - kO = [0, [1, 1.], 0], - kP = [2, cst_env], - kQ = [2, cst_env], - kR = [0, [2, cst_cond], 0], - kS = [2, cst_remaining], - kT = [2, cst_env], - kU = [2, cst_scheme], - kV = [0, [1, 2.], 0], - kW = [0, [2, cst_symbol], 0], - kX = [1, 1.], - kY = [0, [2, cst$9], 0], - kZ = [1, 1.], - k0 = [1, 2.], - k1 = [1, 1.], - k2 = [1, 1.], - k3 = [0, 1], - k4 = [1, 1.], - k5 = [1, 2.], - k6 = [0, [1, 2.], 0], - k7 = [1, 1.], - k8 = [0, 0], - k9 = [0, [2, cst_case], 0], - k_ = [2, cst_match_val], - k$ = [2, cst_remaining], - la = [2, cst_env], - lb = [0, [2, cst_thread], 0], - lc = [2, cst_remaining], - ld = [2, cst_env], - le = [2, "extra"], - lf = [2, cst_name], - lg = [0, [2, cst_as], 0], - lh = [0, [2, cst_list], 0], - li = [0, [2, cst_symbol], 0], - lj = [3, cst_quote], - lk = [0, [2, cst_last], 0], - ll = [0, [2, cst_arg], 0], - lm = [2, cst_f], - ln = [2, cst_evaled], - lo = [2, cst_remaining], - lp = [2, cst_env], - lq = [2, "raw-args"], - lr = [2, "head-name"], - ls = [5, 0], - lt = [5, 0], - lu = [5, 0], - lv = [0, [2, cst_dict], 0], - lw = [2, cst_remaining], - lx = [2, cst_results], - ly = [2, cst_env], - lz = [1, 0.], - lA = [1, 1.], - lB = [1, 1.], - lC = [0, [2, cst_ho_setup], 0], - lD = [2, "ho-type"], + k5 = [0, [2, cst_if], 0], + k6 = [2, cst_env], + k7 = [2, "then"], + k8 = [2, cst_else], + k9 = [2, cst_env], + k_ = [2, cst_else], + k$ = [0, [2, cst_when], 0], + la = [2, cst_body], + lb = [2, cst_env], + lc = [0, [1, 1.], 0], + ld = [0, [2, cst_begin], 0], + le = [2, cst_remaining], + lf = [2, cst_env], + lg = [0, [1, 1.], 0], + lh = [0, [2, cst_let], 0], + li = [2, cst_name], + lj = [2, cst_remaining], + lk = [2, cst_body], + ll = [2, cst_env], + lm = [0, [2, cst_symbol], 0], + ln = [1, 1.], + lo = [0, [2, cst_define], 0], + lp = [2, cst_name], + lq = [2, cst_env], + lr = [2, "has-effects"], + ls = [2, "effect-list"], + lt = [0, [2, cst_symbol], 0], + lu = [2, cst_effect_annotations], + lv = [2, cst_effect_annotations], + lw = [2, cst_effect_annotations], + lx = [0, [2, cst_define_foreign], 0], + ly = [2, cst_name], + lz = [2, cst_env], + lA = [0, [2, cst_set], 0], + lB = [2, cst_name], + lC = [2, cst_env], + lD = [0, [2, cst_and], 0], lE = [2, cst_remaining], - lF = [2, cst_evaled], + lF = [0, [1, 1.], 0], lG = [2, cst_env], - lH = [0, [2, cst_reset], 0], - lI = [0, [2, cst_deref], 0], - lJ = [2, cst_env], - lK = [2, "sx-reactive"], - lL = [2, "deps"], - lM = [2, "notify"], - lN = [0, [2, cst_reactive_reset], 0], - lO = [2, cst_update_fn], - lP = [2, "first-render"], - lQ = [0, [2, cst_scope], 0], - lR = [2, cst_name], - lS = [2, cst_remaining], - lT = [2, cst_env], - lU = [0, [2, cst_provide], 0], - lV = [2, cst_remaining], - lW = [2, cst_env], - lX = [2, cst_name], - lY = [2, cst_value], - lZ = [2, cst_name], - l0 = [2, cst_subscribers], - l1 = [2, cst_subscribers], - l2 = [0, [2, cst_bind], 0], - l3 = [2, cst_body], - l4 = [2, cst_env], - l5 = [2, "prev-tracking"], - l6 = [5, 0], - l7 = [5, 0], - l8 = [0, [2, cst_provide_set], 0], - l9 = [2, cst_name], - l_ = [2, cst_env], - l$ = [2, cst_value], - ma = [2, cst_value], - mb = [0, [2, cst_scope_acc], 0], - mc = [2, cst_remaining], - md = [2, cst_env], - me = [2, cst_value], - mf = [2, cst_name], - mg = [2, cst_emitted], - mh = [2, cst_emitted], - mi = [0, [2, cst_map], 0], + lH = [2, cst_env], + lI = [0, [2, cst_or], 0], + lJ = [2, cst_remaining], + lK = [0, 0], + lL = [0, [1, 1.], 0], + lM = [2, cst_env], + lN = [2, cst_env], + lO = [0, [2, cst_cond], 0], + lP = [2, cst_remaining], + lQ = [2, cst_env], + lR = [2, cst_scheme], + lS = [0, [1, 2.], 0], + lT = [0, [2, cst_symbol], 0], + lU = [1, 1.], + lV = [0, [2, cst$10], 0], + lW = [1, 1.], + lX = [1, 2.], + lY = [1, 1.], + lZ = [1, 1.], + l0 = [0, 1], + l1 = [1, 1.], + l2 = [1, 2.], + l3 = [0, [1, 2.], 0], + l4 = [1, 1.], + l5 = [0, 0], + l6 = [0, [2, cst_case], 0], + l7 = [2, cst_match_val], + l8 = [2, cst_remaining], + l9 = [2, cst_env], + l_ = [0, [2, cst_thread], 0], + l$ = [2, cst_remaining], + ma = [2, cst_env], + mb = [2, "extra"], + mc = [2, cst_name], + md = [0, [2, cst_as], 0], + me = [0, [2, cst_list], 0], + mf = [0, [2, cst_symbol], 0], + mg = [3, cst_quote], + mh = [0, [2, cst_last], 0], + mi = [0, [2, cst_arg], 0], mj = [2, cst_f], - mk = [2, cst_remaining], - ml = [2, cst_results], - mm = [2, "indexed"], - mn = [2, cst_env], - mo = [5, 0], - mp = [0, [2, cst_filter], 0], - mq = [2, cst_f], - mr = [2, cst_remaining], - ms = [2, cst_results], - mt = [2, "current-item"], - mu = [2, cst_env], - mv = [5, 0], - mw = [0, [2, cst_reduce], 0], - mx = [2, cst_f], - my = [2, cst_remaining], - mz = [2, cst_env], - mA = [5, 0], - mB = [0, [2, cst_for_each], 0], - mC = [2, cst_f], - mD = [2, cst_remaining], - mE = [2, cst_env], - mF = [5, 0], - mG = [0, [2, cst_some], 0], - mH = [2, cst_f], - mI = [2, cst_remaining], - mJ = [2, cst_env], - mK = [0, 0], - mL = [5, 0], - mM = [0, [2, cst_every], 0], - mN = [2, cst_f], - mO = [2, cst_remaining], - mP = [2, cst_env], - mQ = [0, 0], - mR = [0, 1], - mS = [5, 0], - mT = [0, [2, cst_handler], 0], - mU = [2, cst_remaining], - mV = [2, cst_env], - mW = [2, cst_f], - mX = [0, [2, cst_restart], 0], - mY = [0, [2, cst_signal_return], 0], - mZ = [2, "saved-kont"], - m0 = [2, cst_env], - m1 = [0, [2, cst_comp_trace], 0], - m2 = [0, [2, cst_cond_arrow], 0], - m3 = [2, cst_match_val], - m4 = [2, cst_env], - m5 = [0, [2, cst_raise_eval], 0], - m6 = [2, cst_env], - m7 = [2, cst_scheme], - m8 = [2, "Unhandled exception: "], - m9 = [0, [2, cst_raise_guard], 0], - m_ = [2, "exception handler returned from non-continuable raise"], - m$ = [0, [2, cst_multi_map], 0], - na = [2, cst_f], - nb = [2, cst_remaining], - nc = [2, cst_results], - nd = [2, cst_env], - ne = [5, 0], - nf = [0, [2, cst_callcc], 0], - ng = [2, cst_env], - nh = [0, [2, cst_vm_resume], 0], - ni = [2, cst_f], - nj = [2, cst_vm_suspended], + mk = [2, cst_evaled], + ml = [2, cst_remaining], + mm = [2, cst_env], + mn = [2, "raw-args"], + mo = [2, "head-name"], + mp = [5, 0], + mq = [5, 0], + mr = [5, 0], + ms = [0, [2, cst_dict], 0], + mt = [2, cst_remaining], + mu = [2, cst_results], + mv = [2, cst_env], + mw = [1, 0.], + mx = [1, 1.], + my = [1, 1.], + mz = [0, [2, cst_ho_setup], 0], + mA = [2, "ho-type"], + mB = [2, cst_remaining], + mC = [2, cst_evaled], + mD = [2, cst_env], + mE = [0, [2, cst_reset], 0], + mF = [0, [2, cst_deref], 0], + mG = [2, cst_env], + mH = [2, "sx-reactive"], + mI = [2, "deps"], + mJ = [2, "notify"], + mK = [0, [2, cst_reactive_reset], 0], + mL = [2, cst_update_fn], + mM = [2, "first-render"], + mN = [0, [2, cst_scope], 0], + mO = [2, cst_name], + mP = [2, cst_remaining], + mQ = [2, cst_env], + mR = [0, [2, cst_provide], 0], + mS = [2, cst_remaining], + mT = [2, cst_env], + mU = [2, cst_name], + mV = [2, cst_value], + mW = [2, cst_name], + mX = [2, cst_subscribers], + mY = [2, cst_subscribers], + mZ = [0, [2, cst_bind], 0], + m0 = [2, cst_body], + m1 = [2, cst_env], + m2 = [2, "prev-tracking"], + m3 = [5, 0], + m4 = [5, 0], + m5 = [0, [2, cst_provide_set], 0], + m6 = [2, cst_name], + m7 = [2, cst_env], + m8 = [2, cst_value], + m9 = [2, cst_value], + m_ = [0, [2, cst_scope_acc], 0], + m$ = [2, cst_remaining], + na = [2, cst_env], + nb = [2, cst_value], + nc = [2, cst_name], + nd = [2, cst_emitted], + ne = [2, cst_emitted], + nf = [0, [2, cst_map], 0], + ng = [2, cst_f], + nh = [2, cst_remaining], + ni = [2, cst_results], + nj = [2, "indexed"], nk = [2, cst_env], - nl = [2, cst_resume], - nm = [2, cst_env], - nn = [2, cst_request], - no = [2, cst_env], - np = [0, [2, cst_perform], 0], - nq = [2, cst_env], - nr = [0, [2, cst_import], 0], - ns = [2, cst_args], - nt = [2, cst_remaining], - nu = [2, cst_env], - nv = [0, [2, cst_parameterize], 0], - nw = [2, cst_remaining], - nx = [2, cst_f], - ny = [2, cst_results], - nz = [2, cst_body], - nA = [2, cst_env], - nB = [1, 1.], - nC = [0, [1, 1.], 0], - nD = [3, cst_begin], - nE = [2, "Unknown frame type: "]; + nl = [5, 0], + nm = [0, [2, cst_filter], 0], + nn = [2, cst_f], + no = [2, cst_remaining], + np = [2, cst_results], + nq = [2, "current-item"], + nr = [2, cst_env], + ns = [5, 0], + nt = [0, [2, cst_reduce], 0], + nu = [2, cst_f], + nv = [2, cst_remaining], + nw = [2, cst_env], + nx = [5, 0], + ny = [0, [2, cst_for_each], 0], + nz = [2, cst_f], + nA = [2, cst_remaining], + nB = [2, cst_env], + nC = [5, 0], + nD = [0, [2, cst_some], 0], + nE = [2, cst_f], + nF = [2, cst_remaining], + nG = [2, cst_env], + nH = [0, 0], + nI = [5, 0], + nJ = [0, [2, cst_every], 0], + nK = [2, cst_f], + nL = [2, cst_remaining], + nM = [2, cst_env], + nN = [0, 0], + nO = [0, 1], + nP = [5, 0], + nQ = [0, [2, cst_handler], 0], + nR = [2, cst_remaining], + nS = [2, cst_env], + nT = [2, cst_f], + nU = [0, [2, cst_restart], 0], + nV = [0, [2, cst_signal_return], 0], + nW = [2, "saved-kont"], + nX = [2, cst_env], + nY = [0, [2, cst_comp_trace], 0], + nZ = [0, [2, cst_cond_arrow], 0], + n0 = [2, cst_match_val], + n1 = [2, cst_env], + n2 = [0, [2, cst_raise_eval], 0], + n3 = [2, cst_env], + n4 = [2, cst_scheme], + n5 = [2, "Unhandled exception: "], + n6 = [0, [2, cst_raise_guard], 0], + n7 = [2, "exception handler returned from non-continuable raise"], + n8 = [0, [2, cst_multi_map], 0], + n9 = [2, cst_f], + n_ = [2, cst_remaining], + n$ = [2, cst_results], + oa = [2, cst_env], + ob = [5, 0], + oc = [0, [2, cst_callcc], 0], + od = [2, cst_env], + oe = [0, [2, cst_vm_resume], 0], + of = [2, cst_f], + og = [2, cst_vm_suspended], + oh = [2, cst_env], + oi = [2, cst_resume], + oj = [2, cst_env], + ok = [2, cst_request], + ol = [2, cst_env], + om = [0, [2, cst_perform], 0], + on = [2, cst_env], + oo = [0, [2, cst_import], 0], + op = [2, cst_args], + oq = [2, cst_remaining], + or = [2, cst_env], + os = [0, [2, cst_parameterize], 0], + ot = [2, cst_remaining], + ou = [2, cst_f], + ov = [2, cst_results], + ow = [2, cst_body], + ox = [2, cst_env], + oy = [1, 1.], + oz = [0, [1, 1.], 0], + oA = [3, cst_begin], + oB = [2, "Unknown frame type: "]; function step_continue(state){ var converted_val = cek_value(state), env = cek_env(state), kont = cek_kont(state), - h = kont_empty_p(kont); - if(Sx_types[49].call(null, h)) return state; + i = kont_empty_p(kont); + if(Sx_types[49].call(null, i)) return state; var frame = kont_top(kont), rest_k = kont_pop(kont), match_val = frame_type(frame), - i = Sx_runtime[1].call(null, cst, [0, match_val, j$]); - if(Sx_types[49].call(null, i)){ + j = Sx_runtime[1].call(null, cst, [0, match_val, k5]); + if(Sx_types[49].call(null, j)){ if(Sx_types[49].call(null, converted_val)) var - j = Sx_runtime[81].call(null, converted_val), - c = [0, 1 - Sx_types[49].call(null, j)]; + l = Sx_runtime[83].call(null, converted_val), + c = [0, 1 - Sx_types[49].call(null, l)]; else var c = converted_val; if(Sx_types[49].call(null, c)){ - var l = Sx_runtime[23].call(null, frame, ka); - return make_cek_state(Sx_runtime[23].call(null, frame, kb), l, rest_k); + var m = Sx_runtime[25].call(null, frame, k6); + return make_cek_state(Sx_runtime[25].call(null, frame, k7), m, rest_k); } var - m = Sx_runtime[23].call(null, frame, kc), - n = Sx_runtime[81].call(null, m); - if(Sx_types[49].call(null, n)) return make_cek_value(0, env, rest_k); - var o = Sx_runtime[23].call(null, frame, kd); - return make_cek_state(Sx_runtime[23].call(null, frame, ke), o, rest_k); + n = Sx_runtime[25].call(null, frame, k8), + o = Sx_runtime[83].call(null, n); + if(Sx_types[49].call(null, o)) return make_cek_value(0, env, rest_k); + var p = Sx_runtime[25].call(null, frame, k9); + return make_cek_state(Sx_runtime[25].call(null, frame, k_), p, rest_k); } - var p = Sx_runtime[1].call(null, cst, [0, match_val, kf]); - if(Sx_types[49].call(null, p)){ + var q = Sx_runtime[1].call(null, cst, [0, match_val, k$]); + if(Sx_types[49].call(null, q)){ if(Sx_types[49].call(null, converted_val)) var - q = Sx_runtime[81].call(null, converted_val), - e = [0, 1 - Sx_types[49].call(null, q)]; + r = Sx_runtime[83].call(null, converted_val), + e = [0, 1 - Sx_types[49].call(null, r)]; else var e = converted_val; if(! Sx_types[49].call(null, e)) return make_cek_value(0, env, rest_k); var - body = Sx_runtime[23].call(null, frame, kg), - fenv = Sx_runtime[23].call(null, frame, kh), - r = Sx_runtime[31].call(null, body); - if(Sx_types[49].call(null, r)) return make_cek_value(0, fenv, rest_k); + body = Sx_runtime[25].call(null, frame, la), + fenv = Sx_runtime[25].call(null, frame, lb), + s = Sx_runtime[33].call(null, body); + if(Sx_types[49].call(null, s)) return make_cek_value(0, fenv, rest_k); var - s = [0, Sx_runtime[22].call(null, body), ki], - t = Sx_runtime[1].call(null, cst, s); - if(Sx_types[49].call(null, t)) - return make_cek_state(Sx_runtime[12].call(null, body), fenv, rest_k); + t = [0, Sx_runtime[24].call(null, body), lc], + u = Sx_runtime[1].call(null, cst, t); + if(Sx_types[49].call(null, u)) + return make_cek_state(Sx_runtime[14].call(null, body), fenv, rest_k); var - u = + v = kont_push - (make_begin_frame(Sx_runtime[13].call(null, body), fenv), rest_k); - return make_cek_state(Sx_runtime[12].call(null, body), fenv, u); + (make_begin_frame(Sx_runtime[15].call(null, body), fenv), rest_k); + return make_cek_state(Sx_runtime[14].call(null, body), fenv, v); } - var v = Sx_runtime[1].call(null, cst, [0, match_val, kj]); - if(Sx_types[49].call(null, v)){ + var w = Sx_runtime[1].call(null, cst, [0, match_val, ld]); + if(Sx_types[49].call(null, w)){ var - remaining = Sx_runtime[23].call(null, frame, kk), - fenv$0 = Sx_runtime[23].call(null, frame, kl), - w = Sx_runtime[31].call(null, remaining); - if(Sx_types[49].call(null, w)) + remaining = Sx_runtime[25].call(null, frame, le), + fenv$0 = Sx_runtime[25].call(null, frame, lf), + x = Sx_runtime[33].call(null, remaining); + if(Sx_types[49].call(null, x)) return make_cek_value(converted_val, fenv$0, rest_k); var - x = [0, Sx_runtime[22].call(null, remaining), km], - y = Sx_runtime[1].call(null, cst, x); - if(Sx_types[49].call(null, y)) + y = [0, Sx_runtime[24].call(null, remaining), lg], + z = Sx_runtime[1].call(null, cst, y); + if(Sx_types[49].call(null, z)) return make_cek_state - (Sx_runtime[12].call(null, remaining), fenv$0, rest_k); + (Sx_runtime[14].call(null, remaining), fenv$0, rest_k); var - z = + A = kont_push - (make_begin_frame(Sx_runtime[13].call(null, remaining), fenv$0), + (make_begin_frame(Sx_runtime[15].call(null, remaining), fenv$0), rest_k); - return make_cek_state(Sx_runtime[12].call(null, remaining), fenv$0, z); + return make_cek_state(Sx_runtime[14].call(null, remaining), fenv$0, A); } - var A = Sx_runtime[1].call(null, cst, [0, match_val, kn]); - if(Sx_types[49].call(null, A)){ + var B = Sx_runtime[1].call(null, cst, [0, match_val, lh]); + if(Sx_types[49].call(null, B)){ var - name = Sx_runtime[23].call(null, frame, ko), - remaining$0 = Sx_runtime[23].call(null, frame, kp), - body$0 = Sx_runtime[23].call(null, frame, kq), - local = Sx_runtime[23].call(null, frame, kr), - B = Sx_runtime[3].call(null, name); - Sx_runtime[75].call(null, local, B, converted_val); - var C = Sx_runtime[31].call(null, remaining$0); - if(Sx_types[49].call(null, C)) + name = Sx_runtime[25].call(null, frame, li), + remaining$0 = Sx_runtime[25].call(null, frame, lj), + body$0 = Sx_runtime[25].call(null, frame, lk), + local = Sx_runtime[25].call(null, frame, ll), + C = Sx_runtime[3].call(null, name); + Sx_runtime[77].call(null, local, C, converted_val); + var D = Sx_runtime[33].call(null, remaining$0); + if(Sx_types[49].call(null, D)) return step_sf_begin(body$0, local, rest_k); var - next_binding = Sx_runtime[12].call(null, remaining$0), - D = Sx_runtime[12].call(null, next_binding), - E = [0, Sx_runtime[71].call(null, D), ks], - F = Sx_runtime[1].call(null, cst, E); - if(Sx_types[49].call(null, F)) + next_binding = Sx_runtime[14].call(null, remaining$0), + E = Sx_runtime[14].call(null, next_binding), + F = [0, Sx_runtime[73].call(null, E), lm], + G = Sx_runtime[1].call(null, cst, F); + if(Sx_types[49].call(null, G)) var - G = Sx_runtime[12].call(null, next_binding), - vname = Sx_types[50].call(null, G); + H = Sx_runtime[14].call(null, next_binding), + vname = Sx_types[50].call(null, H); else - var vname = Sx_runtime[12].call(null, next_binding); + var vname = Sx_runtime[14].call(null, next_binding); var - H = + I = kont_push (make_let_frame - (vname, Sx_runtime[13].call(null, remaining$0), body$0, local), + (vname, Sx_runtime[15].call(null, remaining$0), body$0, local), rest_k); return make_cek_state - (Sx_runtime[15].call(null, next_binding, kt), local, H); + (Sx_runtime[17].call(null, next_binding, ln), local, I); } - var I = Sx_runtime[1].call(null, cst, [0, match_val, ku]); - if(Sx_types[49].call(null, I)){ + var J = Sx_runtime[1].call(null, cst, [0, match_val, lo]); + if(Sx_types[49].call(null, J)){ var - name$0 = Sx_runtime[23].call(null, frame, kv), - fenv$1 = Sx_runtime[23].call(null, frame, kw), - has_effects = Sx_runtime[23].call(null, frame, kx), - effect_list = Sx_runtime[23].call(null, frame, ky), - and = Sx_runtime[83].call(null, converted_val); + name$0 = Sx_runtime[25].call(null, frame, lp), + fenv$1 = Sx_runtime[25].call(null, frame, lq), + has_effects = Sx_runtime[25].call(null, frame, lr), + effect_list = Sx_runtime[25].call(null, frame, ls), + and = Sx_runtime[85].call(null, converted_val); if(Sx_types[49].call(null, and)) var - J = Sx_types[55].call(null, converted_val), - g = Sx_runtime[81].call(null, J); + K = Sx_types[55].call(null, converted_val), + g = Sx_runtime[83].call(null, K); else var g = and; if(Sx_types[49].call(null, g)){ - var K = Sx_runtime[3].call(null, name$0); - Sx_runtime[80].call(null, converted_val, K); + var L = Sx_runtime[3].call(null, name$0); + Sx_runtime[82].call(null, converted_val, L); } - var L = Sx_runtime[3].call(null, name$0); - Sx_runtime[75].call(null, fenv$1, L, converted_val); + var M = Sx_runtime[3].call(null, name$0); + Sx_runtime[77].call(null, fenv$1, M, converted_val); if(Sx_types[49].call(null, has_effects)){ var - M = Sx_runtime[5].call(null, effect_list), + N = Sx_runtime[5].call(null, effect_list), effect_names = [5, Stdlib_List[20].call (null, function(e){ var - a = [0, Sx_runtime[71].call(null, e), kz], + a = [0, Sx_runtime[73].call(null, e), lt], b = Sx_runtime[1].call(null, cst, a); return Sx_types[49].call(null, b) ? Sx_types[50].call(null, e) : e; }, - M)], - N = Sx_runtime[73].call(null, fenv$1, kA), + N)], + O = Sx_runtime[75].call(null, fenv$1, lu), effect_anns = - Sx_types[49].call(null, N) - ? Sx_runtime[74].call(null, fenv$1, kB) + Sx_types[49].call(null, O) + ? Sx_runtime[76].call(null, fenv$1, lv) : [6, Stdlib_Hashtbl[1].call(null, 0, 0)]; - Sx_runtime[9].call(null, effect_anns, name$0, effect_names); - var O = Sx_runtime[3].call(null, kC); - Sx_runtime[75].call(null, fenv$1, O, effect_anns); + Sx_runtime[11].call(null, effect_anns, name$0, effect_names); + var P = Sx_runtime[3].call(null, lw); + Sx_runtime[77].call(null, fenv$1, P, effect_anns); } return make_cek_value(converted_val, fenv$1, rest_k); } - var P = Sx_runtime[1].call(null, cst, [0, match_val, kD]); - if(Sx_types[49].call(null, P)){ + var Q = Sx_runtime[1].call(null, cst, [0, match_val, lx]); + if(Sx_types[49].call(null, Q)){ var - name$1 = Sx_runtime[23].call(null, frame, kE), - fenv$2 = Sx_runtime[23].call(null, frame, kF), - Q = Sx_runtime[3].call(null, name$1); - Sx_runtime[76].call(null, fenv$2, Q, converted_val); + name$1 = Sx_runtime[25].call(null, frame, ly), + fenv$2 = Sx_runtime[25].call(null, frame, lz), + and$0 = Sx_runtime[85].call(null, converted_val); + if(Sx_types[49].call(null, and$0)) + var + R = Sx_types[55].call(null, converted_val), + h = Sx_runtime[83].call(null, R); + else + var h = and$0; + if(Sx_types[49].call(null, h)){ + var S = Sx_runtime[3].call(null, name$1); + Sx_runtime[82].call(null, converted_val, S); + } + var T = Sx_runtime[3].call(null, name$1); + Sx_runtime[77].call(null, fenv$2, T, converted_val); + return make_cek_value(converted_val, fenv$2, rest_k); + } + var U = Sx_runtime[1].call(null, cst, [0, match_val, lA]); + if(Sx_types[49].call(null, U)){ + var + name$2 = Sx_runtime[25].call(null, frame, lB), + fenv$3 = Sx_runtime[25].call(null, frame, lC), + V = Sx_runtime[3].call(null, name$2); + Sx_runtime[78].call(null, fenv$3, V, converted_val); return make_cek_value(converted_val, env, rest_k); } - var R = Sx_runtime[1].call(null, cst, [0, match_val, kG]); - if(Sx_types[49].call(null, R)){ - var S = [0, 1 - Sx_types[49].call(null, converted_val)]; - if(Sx_types[49].call(null, S)) + var W = Sx_runtime[1].call(null, cst, [0, match_val, lD]); + if(Sx_types[49].call(null, W)){ + var X = [0, 1 - Sx_types[49].call(null, converted_val)]; + if(Sx_types[49].call(null, X)) return make_cek_value(converted_val, env, rest_k); var - remaining$1 = Sx_runtime[23].call(null, frame, kH), - T = Sx_runtime[31].call(null, remaining$1); - if(Sx_types[49].call(null, T)) + remaining$1 = Sx_runtime[25].call(null, frame, lE), + Y = Sx_runtime[33].call(null, remaining$1); + if(Sx_types[49].call(null, Y)) return make_cek_value(converted_val, env, rest_k); var - U = [0, Sx_runtime[22].call(null, remaining$1), kI], - V = Sx_runtime[1].call(null, cst, U); - if(Sx_types[49].call(null, V)) + Z = [0, Sx_runtime[24].call(null, remaining$1), lF], + _ = Sx_runtime[1].call(null, cst, Z); + if(Sx_types[49].call(null, _)) var rest_k$0 = rest_k; else var - X = Sx_runtime[23].call(null, frame, kK), + aa = Sx_runtime[25].call(null, frame, lH), rest_k$0 = kont_push - (make_and_frame(Sx_runtime[13].call(null, remaining$1), X), rest_k); - var W = Sx_runtime[23].call(null, frame, kJ); + (make_and_frame(Sx_runtime[15].call(null, remaining$1), aa), rest_k); + var $ = Sx_runtime[25].call(null, frame, lG); return make_cek_state - (Sx_runtime[12].call(null, remaining$1), W, rest_k$0); + (Sx_runtime[14].call(null, remaining$1), $, rest_k$0); } - var Y = Sx_runtime[1].call(null, cst, [0, match_val, kL]); - if(Sx_types[49].call(null, Y)){ + var ab = Sx_runtime[1].call(null, cst, [0, match_val, lI]); + if(Sx_types[49].call(null, ab)){ if(Sx_types[49].call(null, converted_val)) return make_cek_value(converted_val, env, rest_k); var - remaining$2 = Sx_runtime[23].call(null, frame, kM), - Z = Sx_runtime[31].call(null, remaining$2); - if(Sx_types[49].call(null, Z)) return make_cek_value(kN, env, rest_k); + remaining$2 = Sx_runtime[25].call(null, frame, lJ), + ac = Sx_runtime[33].call(null, remaining$2); + if(Sx_types[49].call(null, ac)) return make_cek_value(lK, env, rest_k); var - _ = [0, Sx_runtime[22].call(null, remaining$2), kO], - $ = Sx_runtime[1].call(null, cst, _); - if(Sx_types[49].call(null, $)) + ad = [0, Sx_runtime[24].call(null, remaining$2), lL], + ae = Sx_runtime[1].call(null, cst, ad); + if(Sx_types[49].call(null, ae)) var rest_k$1 = rest_k; else var - ab = Sx_runtime[23].call(null, frame, kQ), + ag = Sx_runtime[25].call(null, frame, lN), rest_k$1 = kont_push - (make_or_frame(Sx_runtime[13].call(null, remaining$2), ab), rest_k); - var aa = Sx_runtime[23].call(null, frame, kP); + (make_or_frame(Sx_runtime[15].call(null, remaining$2), ag), rest_k); + var af = Sx_runtime[25].call(null, frame, lM); return make_cek_state - (Sx_runtime[12].call(null, remaining$2), aa, rest_k$1); + (Sx_runtime[14].call(null, remaining$2), af, rest_k$1); } - var ac = Sx_runtime[1].call(null, cst, [0, match_val, kR]); - if(Sx_types[49].call(null, ac)){ + var ah = Sx_runtime[1].call(null, cst, [0, match_val, lO]); + if(Sx_types[49].call(null, ah)){ var - remaining$3 = Sx_runtime[23].call(null, frame, kS), - fenv$3 = Sx_runtime[23].call(null, frame, kT), - scheme_p = Sx_runtime[23].call(null, frame, kU); + remaining$3 = Sx_runtime[25].call(null, frame, lP), + fenv$4 = Sx_runtime[25].call(null, frame, lQ), + scheme_p = Sx_runtime[25].call(null, frame, lR); if(! Sx_types[49].call(null, scheme_p)){ if(Sx_types[49].call(null, converted_val)) return make_cek_state - (Sx_runtime[15].call(null, remaining$3, k4), fenv$3, rest_k); + (Sx_runtime[17].call(null, remaining$3, l1), fenv$4, rest_k); var - al = + aq = [0, remaining$3, - [0, k5, [0, Sx_runtime[22].call(null, remaining$3), 0]]], - next = Sx_runtime[1].call(null, cst_slice, al), - am = [0, Sx_runtime[22].call(null, next), k6], - an = Sx_runtime[1].call(null, cst$5, am); - if(Sx_types[49].call(null, an)) - return make_cek_value(0, fenv$3, rest_k); + [0, l2, [0, Sx_runtime[24].call(null, remaining$3), 0]]], + next = Sx_runtime[1].call(null, cst_slice, aq), + ar = [0, Sx_runtime[24].call(null, next), l3], + as = Sx_runtime[1].call(null, cst$2, ar); + if(Sx_types[49].call(null, as)) + return make_cek_value(0, fenv$4, rest_k); var - next_test$0 = Sx_runtime[12].call(null, next), - ao = is_else_clause(next_test$0); - return Sx_types[49].call(null, ao) + next_test$0 = Sx_runtime[14].call(null, next), + at = is_else_clause(next_test$0); + return Sx_types[49].call(null, at) ? make_cek_state - (Sx_runtime[15].call(null, next, k7), fenv$3, rest_k) + (Sx_runtime[17].call(null, next, l4), fenv$4, rest_k) : make_cek_state (next_test$0, - fenv$3, - kont_push(make_cond_frame(next, fenv$3, k8), rest_k)); + fenv$4, + kont_push(make_cond_frame(next, fenv$4, l5), rest_k)); } if(! Sx_types[49].call(null, converted_val)){ var - next_clauses = Sx_runtime[13].call(null, remaining$3), - aj = Sx_runtime[31].call(null, next_clauses); - if(Sx_types[49].call(null, aj)) - return make_cek_value(0, fenv$3, rest_k); + next_clauses = Sx_runtime[15].call(null, remaining$3), + ao = Sx_runtime[33].call(null, next_clauses); + if(Sx_types[49].call(null, ao)) + return make_cek_value(0, fenv$4, rest_k); var - next_clause = Sx_runtime[12].call(null, next_clauses), - next_test = Sx_runtime[12].call(null, next_clause), - ak = is_else_clause(next_test); - return Sx_types[49].call(null, ak) + next_clause = Sx_runtime[14].call(null, next_clauses), + next_test = Sx_runtime[14].call(null, next_clause), + ap = is_else_clause(next_test); + return Sx_types[49].call(null, ap) ? make_cek_state - (Sx_runtime[15].call(null, next_clause, k2), fenv$3, rest_k) + (Sx_runtime[17].call(null, next_clause, lZ), fenv$4, rest_k) : make_cek_state (next_test, - fenv$3, - kont_push(make_cond_frame(next_clauses, fenv$3, k3), rest_k)); + fenv$4, + kont_push(make_cond_frame(next_clauses, fenv$4, l0), rest_k)); } var - clause = Sx_runtime[12].call(null, remaining$3), - ad = [0, Sx_runtime[22].call(null, clause), kV], - and$0 = Sx_runtime[1].call(null, cst$6, ad); - if(Sx_types[49].call(null, and$0)){ + clause = Sx_runtime[14].call(null, remaining$3), + ai = [0, Sx_runtime[24].call(null, clause), lS], + and$1 = Sx_runtime[1].call(null, cst$7, ai); + if(Sx_types[49].call(null, and$1)){ var - ae = Sx_runtime[15].call(null, clause, kX), - af = [0, Sx_runtime[71].call(null, ae), kW], - and$1 = Sx_runtime[1].call(null, cst, af); - if(Sx_types[49].call(null, and$1)) + aj = Sx_runtime[17].call(null, clause, lU), + ak = [0, Sx_runtime[73].call(null, aj), lT], + and$2 = Sx_runtime[1].call(null, cst, ak); + if(Sx_types[49].call(null, and$2)) var - ag = Sx_runtime[15].call(null, clause, kZ), - ah = [0, Sx_types[50].call(null, ag), kY], - b = Sx_runtime[1].call(null, cst, ah); + al = Sx_runtime[17].call(null, clause, lW), + am = [0, Sx_types[50].call(null, al), lV], + b = Sx_runtime[1].call(null, cst, am); else - var b = and$1; + var b = and$2; } else - var b = and$0; + var b = and$1; if(! Sx_types[49].call(null, b)) return make_cek_state - (Sx_runtime[15].call(null, clause, k1), fenv$3, rest_k); - var ai = kont_push(make_cond_arrow_frame(converted_val, fenv$3), rest_k); - return make_cek_state(Sx_runtime[15].call(null, clause, k0), fenv$3, ai); + (Sx_runtime[17].call(null, clause, lY), fenv$4, rest_k); + var an = kont_push(make_cond_arrow_frame(converted_val, fenv$4), rest_k); + return make_cek_state(Sx_runtime[17].call(null, clause, lX), fenv$4, an); } - var ap = Sx_runtime[1].call(null, cst, [0, match_val, k9]); - if(Sx_types[49].call(null, ap)){ + var au = Sx_runtime[1].call(null, cst, [0, match_val, l6]); + if(Sx_types[49].call(null, au)){ var - match_val$0 = Sx_runtime[23].call(null, frame, k_), - remaining$4 = Sx_runtime[23].call(null, frame, k$), - fenv$4 = Sx_runtime[23].call(null, frame, la), - aq = Sx_runtime[81].call(null, match_val$0); - return Sx_types[49].call(null, aq) - ? sf_case_step_loop(converted_val, remaining$4, fenv$4, rest_k) - : sf_case_step_loop(match_val$0, remaining$4, fenv$4, rest_k); + match_val$0 = Sx_runtime[25].call(null, frame, l7), + remaining$4 = Sx_runtime[25].call(null, frame, l8), + fenv$5 = Sx_runtime[25].call(null, frame, l9), + av = Sx_runtime[83].call(null, match_val$0); + return Sx_types[49].call(null, av) + ? sf_case_step_loop(converted_val, remaining$4, fenv$5, rest_k) + : sf_case_step_loop(match_val$0, remaining$4, fenv$5, rest_k); } - var ar = Sx_runtime[1].call(null, cst, [0, match_val, lb]); - if(Sx_types[49].call(null, ar)){ + var aw = Sx_runtime[1].call(null, cst, [0, match_val, l_]); + if(Sx_types[49].call(null, aw)){ var - remaining$5 = Sx_runtime[23].call(null, frame, lc), - fenv$5 = Sx_runtime[23].call(null, frame, ld), - mode = Sx_runtime[23].call(null, frame, le), - bind_name = Sx_runtime[23].call(null, frame, lf), - as = Sx_runtime[31].call(null, remaining$5); - if(Sx_types[49].call(null, as)) - return make_cek_value(converted_val, fenv$5, rest_k); + remaining$5 = Sx_runtime[25].call(null, frame, l$), + fenv$6 = Sx_runtime[25].call(null, frame, ma), + mode = Sx_runtime[25].call(null, frame, mb), + bind_name = Sx_runtime[25].call(null, frame, mc), + ax = Sx_runtime[33].call(null, remaining$5); + if(Sx_types[49].call(null, ax)) + return make_cek_value(converted_val, fenv$6, rest_k); var - form = Sx_runtime[12].call(null, remaining$5), - rest_forms = Sx_runtime[13].call(null, remaining$5), - at = Sx_runtime[13].call(null, remaining$5), - au = Sx_runtime[31].call(null, at), + form = Sx_runtime[14].call(null, remaining$5), + rest_forms = Sx_runtime[15].call(null, remaining$5), + ay = Sx_runtime[15].call(null, remaining$5), + az = Sx_runtime[33].call(null, ay), new_kont = - Sx_types[49].call(null, au) + Sx_types[49].call(null, az) ? rest_k : kont_push (make_thread_frame - (Sx_runtime[13].call(null, remaining$5), fenv$5, mode, bind_name), + (Sx_runtime[15].call(null, remaining$5), fenv$6, mode, bind_name), rest_k), - av = Sx_runtime[1].call(null, cst, [0, mode, lg]); - if(Sx_types[49].call(null, av)){ + aA = Sx_runtime[1].call(null, cst, [0, mode, md]); + if(Sx_types[49].call(null, aA)){ var - new_env = Sx_runtime[78].call(null, fenv$5), - aw = Sx_types[50].call(null, bind_name), - ax = Sx_runtime[3].call(null, aw); - Sx_runtime[75].call(null, new_env, ax, converted_val); + new_env = Sx_runtime[80].call(null, fenv$6), + aB = Sx_types[50].call(null, bind_name), + aC = Sx_runtime[3].call(null, aB); + Sx_runtime[77].call(null, new_env, aC, converted_val); return make_cek_state(form, new_env, new_kont); } var - ay = [0, Sx_runtime[71].call(null, form), lh], - and$2 = Sx_runtime[1].call(null, cst, ay); - if(Sx_types[49].call(null, and$2)){ + aD = [0, Sx_runtime[73].call(null, form), me], + and$3 = Sx_runtime[1].call(null, cst, aD); + if(Sx_types[49].call(null, and$3)){ var - az = Sx_runtime[31].call(null, form), - and$3 = [0, 1 - Sx_types[49].call(null, az)]; - if(Sx_types[49].call(null, and$3)){ + aE = Sx_runtime[33].call(null, form), + and$4 = [0, 1 - Sx_types[49].call(null, aE)]; + if(Sx_types[49].call(null, and$4)){ var - aA = Sx_runtime[12].call(null, form), - aB = [0, Sx_runtime[71].call(null, aA), li], - and$4 = Sx_runtime[1].call(null, cst, aB); - if(Sx_types[49].call(null, and$4)) + aF = Sx_runtime[14].call(null, form), + aG = [0, Sx_runtime[73].call(null, aF), mf], + and$5 = Sx_runtime[1].call(null, cst, aG); + if(Sx_types[49].call(null, and$5)) var - aC = Sx_runtime[12].call(null, form), - a = ho_form_name_p(Sx_types[50].call(null, aC)); + aH = Sx_runtime[14].call(null, form), + a = ho_form_name_p(Sx_types[50].call(null, aH)); else - var a = and$4; + var a = and$5; } else - var a = and$3; + var a = and$4; } else - var a = and$2; + var a = and$3; if(Sx_types[49].call(null, a)){ var - aD = Sx_runtime[13].call(null, form), - aE = Sx_runtime[16].call(null, [5, [0, lj, [0, converted_val, 0]]], aD), - aF = Sx_runtime[12].call(null, form); + aI = Sx_runtime[15].call(null, form), + aJ = Sx_runtime[18].call(null, [5, [0, mg, [0, converted_val, 0]]], aI), + aK = Sx_runtime[14].call(null, form); return make_cek_state - (Sx_runtime[16].call(null, aF, aE), fenv$5, new_kont); + (Sx_runtime[18].call(null, aK, aJ), fenv$6, new_kont); } - var aG = Sx_runtime[1].call(null, cst, [0, mode, lk]); - if(Sx_types[49].call(null, aG)){ + var aL = Sx_runtime[1].call(null, cst, [0, mode, mh]); + if(Sx_types[49].call(null, aL)){ var - result = thread_insert_arg_last(form, converted_val, fenv$5), - aH = Sx_runtime[31].call(null, rest_forms); - return Sx_types[49].call(null, aH) - ? make_cek_value(result, fenv$5, rest_k) + result = thread_insert_arg_last(form, converted_val, fenv$6), + aM = Sx_runtime[33].call(null, rest_forms); + return Sx_types[49].call(null, aM) + ? make_cek_value(result, fenv$6, rest_k) : make_cek_value (result, - fenv$5, + fenv$6, kont_push - (make_thread_frame(rest_forms, fenv$5, mode, bind_name), + (make_thread_frame(rest_forms, fenv$6, mode, bind_name), rest_k)); } var - result$0 = thread_insert_arg(form, converted_val, fenv$5), - aI = Sx_runtime[31].call(null, rest_forms); - return Sx_types[49].call(null, aI) - ? make_cek_value(result$0, fenv$5, rest_k) + result$0 = thread_insert_arg(form, converted_val, fenv$6), + aN = Sx_runtime[33].call(null, rest_forms); + return Sx_types[49].call(null, aN) + ? make_cek_value(result$0, fenv$6, rest_k) : make_cek_value (result$0, - fenv$5, + fenv$6, kont_push - (make_thread_frame(rest_forms, fenv$5, mode, bind_name), + (make_thread_frame(rest_forms, fenv$6, mode, bind_name), rest_k)); } - var aJ = Sx_runtime[1].call(null, cst, [0, match_val, ll]); - if(Sx_types[49].call(null, aJ)){ + var aO = Sx_runtime[1].call(null, cst, [0, match_val, mi]); + if(Sx_types[49].call(null, aO)){ var - f = Sx_runtime[23].call(null, frame, lm), - evaled = Sx_runtime[23].call(null, frame, ln), - remaining$6 = Sx_runtime[23].call(null, frame, lo), - fenv$6 = Sx_runtime[23].call(null, frame, lp), - raw_args = Sx_runtime[23].call(null, frame, lq), - hname = Sx_runtime[23].call(null, frame, lr), - aK = Sx_runtime[81].call(null, f); - if(Sx_types[49].call(null, aK)){ + f = Sx_runtime[25].call(null, frame, mj), + evaled = Sx_runtime[25].call(null, frame, mk), + remaining$6 = Sx_runtime[25].call(null, frame, ml), + fenv$7 = Sx_runtime[25].call(null, frame, mm), + raw_args = Sx_runtime[25].call(null, frame, mn), + hname = Sx_runtime[25].call(null, frame, mo), + aP = Sx_runtime[83].call(null, f); + if(Sx_types[49].call(null, aP)){ var - and$5 = strict_ref[1], - hname$0 = Sx_types[49].call(null, and$5) ? hname : and$5; - if(Sx_types[49].call(null, hname$0)) strict_check_args(hname, ls); - var aL = Sx_runtime[31].call(null, remaining$6); - if(Sx_types[49].call(null, aL)) - return continue_with_call(converted_val, lt, fenv$6, raw_args, rest_k); + and$6 = strict_ref[1], + hname$0 = Sx_types[49].call(null, and$6) ? hname : and$6; + if(Sx_types[49].call(null, hname$0)) strict_check_args(hname, mp); + var aQ = Sx_runtime[33].call(null, remaining$6); + if(Sx_types[49].call(null, aQ)) + return continue_with_call(converted_val, mq, fenv$7, raw_args, rest_k); var - aM = + aR = kont_push (make_arg_frame (converted_val, - lu, - Sx_runtime[13].call(null, remaining$6), - fenv$6, + mr, + Sx_runtime[15].call(null, remaining$6), + fenv$7, raw_args, hname), rest_k); return make_cek_state - (Sx_runtime[12].call(null, remaining$6), fenv$6, aM); + (Sx_runtime[14].call(null, remaining$6), fenv$7, aR); } var new_evaled = Sx_runtime[1].call (null, cst_append, [0, evaled, [0, [5, [0, converted_val, 0]], 0]]), - aN = Sx_runtime[31].call(null, remaining$6); - if(! Sx_types[49].call(null, aN)){ + aS = Sx_runtime[33].call(null, remaining$6); + if(! Sx_types[49].call(null, aS)){ var - aO = + aT = kont_push (make_arg_frame (f, new_evaled, - Sx_runtime[13].call(null, remaining$6), - fenv$6, + Sx_runtime[15].call(null, remaining$6), + fenv$7, raw_args, hname), rest_k); return make_cek_state - (Sx_runtime[12].call(null, remaining$6), fenv$6, aO); + (Sx_runtime[14].call(null, remaining$6), fenv$7, aT); } var - and$6 = strict_ref[1], - hname$1 = Sx_types[49].call(null, and$6) ? hname : and$6; + and$7 = strict_ref[1], + hname$1 = Sx_types[49].call(null, and$7) ? hname : and$7; if(Sx_types[49].call(null, hname$1)) strict_check_args(hname, new_evaled); - return continue_with_call(f, new_evaled, fenv$6, raw_args, rest_k); + return continue_with_call(f, new_evaled, fenv$7, raw_args, rest_k); } - var aP = Sx_runtime[1].call(null, cst, [0, match_val, lv]); - if(Sx_types[49].call(null, aP)){ + var aU = Sx_runtime[1].call(null, cst, [0, match_val, ms]); + if(Sx_types[49].call(null, aU)){ var - remaining$7 = Sx_runtime[23].call(null, frame, lw), - results = Sx_runtime[23].call(null, frame, lx), - fenv$7 = Sx_runtime[23].call(null, frame, ly), - last_result = Sx_runtime[14].call(null, results), - aQ = + remaining$7 = Sx_runtime[25].call(null, frame, mt), + results = Sx_runtime[25].call(null, frame, mu), + fenv$8 = Sx_runtime[25].call(null, frame, mv), + last_result = Sx_runtime[16].call(null, results), + aV = [0, [5, [0, [5, - [0, Sx_runtime[12].call(null, last_result), [0, converted_val, 0]]], + [0, Sx_runtime[14].call(null, last_result), [0, converted_val, 0]]], 0]], 0], - aR = [0, Sx_runtime[22].call(null, results), 0], - aS = - [0, results, [0, lz, [0, Sx_runtime[1].call(null, cst_dec, aR), 0]]], - aT = [0, Sx_runtime[1].call(null, cst_slice, aS), aQ], - completed = Sx_runtime[1].call(null, cst_append, aT), - aU = Sx_runtime[31].call(null, remaining$7); - if(Sx_types[49].call(null, aU)){ + aW = [0, Sx_runtime[24].call(null, results), 0], + aX = + [0, results, [0, mw, [0, Sx_runtime[1].call(null, cst_dec, aW), 0]]], + aY = [0, Sx_runtime[1].call(null, cst_slice, aX), aV], + completed = Sx_runtime[1].call(null, cst_append, aY), + aZ = Sx_runtime[33].call(null, remaining$7); + if(Sx_types[49].call(null, aZ)){ var d = [6, Stdlib_Hashtbl[1].call(null, 0, 0)], - aV = Sx_runtime[5].call(null, completed); + a0 = Sx_runtime[5].call(null, completed); Stdlib_List[18].call (null, function(pair){ var - a = Sx_runtime[15].call(null, pair, lA), - b = Sx_runtime[12].call(null, pair); - Sx_runtime[9].call(null, d, b, a); + a = Sx_runtime[17].call(null, pair, mx), + b = Sx_runtime[14].call(null, pair); + Sx_runtime[11].call(null, d, b, a); return 0; }, - aV); - return make_cek_value(d, fenv$7, rest_k); + a0); + return make_cek_value(d, fenv$8, rest_k); } var - next_entry = Sx_runtime[12].call(null, remaining$7), - aW = + next_entry = Sx_runtime[14].call(null, remaining$7), + a1 = [0, completed, [0, - [5, [0, [5, [0, Sx_runtime[12].call(null, next_entry), 0]], 0]], + [5, [0, [5, [0, Sx_runtime[14].call(null, next_entry), 0]], 0]], 0]], - aX = Sx_runtime[1].call(null, cst_append, aW), - aY = + a2 = Sx_runtime[1].call(null, cst_append, a1), + a3 = kont_push - (make_dict_frame(Sx_runtime[13].call(null, remaining$7), aX, fenv$7), + (make_dict_frame(Sx_runtime[15].call(null, remaining$7), a2, fenv$8), rest_k); return make_cek_state - (Sx_runtime[15].call(null, next_entry, lB), fenv$7, aY); + (Sx_runtime[17].call(null, next_entry, my), fenv$8, a3); } - var aZ = Sx_runtime[1].call(null, cst, [0, match_val, lC]); - if(Sx_types[49].call(null, aZ)){ - var - ho_type = Sx_runtime[23].call(null, frame, lD), - remaining$8 = Sx_runtime[23].call(null, frame, lE), - a0 = - [0, - Sx_runtime[23].call(null, frame, lF), - [0, [5, [0, converted_val, 0]], 0]], - evaled$0 = Sx_runtime[1].call(null, cst_append, a0), - fenv$8 = Sx_runtime[23].call(null, frame, lG), - a1 = Sx_runtime[31].call(null, remaining$8); - if(Sx_types[49].call(null, a1)) - return ho_setup_dispatch(ho_type, evaled$0, fenv$8, rest_k); - var - a2 = - kont_push - (make_ho_setup_frame - (ho_type, Sx_runtime[13].call(null, remaining$8), evaled$0, fenv$8), - rest_k); - return make_cek_state(Sx_runtime[12].call(null, remaining$8), fenv$8, a2); - } - var a3 = Sx_runtime[1].call(null, cst, [0, match_val, lH]); - if(Sx_types[49].call(null, a3)) - return make_cek_value(converted_val, env, rest_k); - var a4 = Sx_runtime[1].call(null, cst, [0, match_val, lI]); + var a4 = Sx_runtime[1].call(null, cst, [0, match_val, mz]); if(Sx_types[49].call(null, a4)){ var - fenv$9 = Sx_runtime[23].call(null, frame, lJ), - a5 = Sx_runtime[87].call(null, converted_val), - a6 = [0, 1 - Sx_types[49].call(null, a5)]; + ho_type = Sx_runtime[25].call(null, frame, mA), + remaining$8 = Sx_runtime[25].call(null, frame, mB), + a5 = + [0, + Sx_runtime[25].call(null, frame, mC), + [0, [5, [0, converted_val, 0]], 0]], + evaled$0 = Sx_runtime[1].call(null, cst_append, a5), + fenv$9 = Sx_runtime[25].call(null, frame, mD), + a6 = Sx_runtime[33].call(null, remaining$8); if(Sx_types[49].call(null, a6)) - return make_cek_value(converted_val, fenv$9, rest_k); - var a7 = has_reactive_reset_frame_p(rest_k); - if(Sx_types[49].call(null, a7)) - return reactive_shift_deref(converted_val, fenv$9, rest_k); - var ctx = Sx_runtime[69].call(null, lK, 0); + return ho_setup_dispatch(ho_type, evaled$0, fenv$9, rest_k); + var + a7 = + kont_push + (make_ho_setup_frame + (ho_type, Sx_runtime[15].call(null, remaining$8), evaled$0, fenv$9), + rest_k); + return make_cek_state(Sx_runtime[14].call(null, remaining$8), fenv$9, a7); + } + var a8 = Sx_runtime[1].call(null, cst, [0, match_val, mE]); + if(Sx_types[49].call(null, a8)) + return make_cek_value(converted_val, env, rest_k); + var a9 = Sx_runtime[1].call(null, cst, [0, match_val, mF]); + if(Sx_types[49].call(null, a9)){ + var + fenv$10 = Sx_runtime[25].call(null, frame, mG), + a_ = Sx_runtime[89].call(null, converted_val), + a$ = [0, 1 - Sx_types[49].call(null, a_)]; + if(Sx_types[49].call(null, a$)) + return make_cek_value(converted_val, fenv$10, rest_k); + var ba = has_reactive_reset_frame_p(rest_k); + if(Sx_types[49].call(null, ba)) + return reactive_shift_deref(converted_val, fenv$10, rest_k); + var ctx = Sx_runtime[71].call(null, mH, 0); if(Sx_types[49].call(null, ctx)){ var - dep_list = Sx_runtime[23].call(null, ctx, lL), - notify_fn = Sx_runtime[23].call(null, ctx, lM), - a8 = + dep_list = Sx_runtime[25].call(null, ctx, mI), + notify_fn = Sx_runtime[25].call(null, ctx, mJ), + bb = Sx_runtime[1].call (null, cst_contains, [0, dep_list, [0, converted_val, 0]]), - a9 = [0, 1 - Sx_types[49].call(null, a8)]; - if(Sx_types[49].call(null, a9)){ - Sx_runtime[8].call(null, dep_list, converted_val); - Sx_runtime[112].call(null, converted_val, notify_fn); + bc = [0, 1 - Sx_types[49].call(null, bb)]; + if(Sx_types[49].call(null, bc)){ + Sx_runtime[10].call(null, dep_list, converted_val); + Sx_runtime[114].call(null, converted_val, notify_fn); } } return make_cek_value - (Sx_runtime[111].call(null, converted_val), fenv$9, rest_k); + (Sx_runtime[113].call(null, converted_val), fenv$10, rest_k); } - var a_ = Sx_runtime[1].call(null, cst, [0, match_val, lN]); - if(Sx_types[49].call(null, a_)){ + var bd = Sx_runtime[1].call(null, cst, [0, match_val, mK]); + if(Sx_types[49].call(null, bd)){ var - update_fn = Sx_runtime[23].call(null, frame, lO), - first_p = Sx_runtime[23].call(null, frame, lP), - a$ = + update_fn = Sx_runtime[25].call(null, frame, mL), + first_p = Sx_runtime[25].call(null, frame, mM), + be = Sx_types[49].call(null, update_fn) ? [0, 1 - Sx_types[49].call(null, first_p)] : update_fn; - if(Sx_types[49].call(null, a$)) + if(Sx_types[49].call(null, be)) cek_call(update_fn, [5, [0, converted_val, 0]]); return make_cek_value(converted_val, env, rest_k); } - var ba = Sx_runtime[1].call(null, cst, [0, match_val, lQ]); - if(Sx_types[49].call(null, ba)){ + var bf = Sx_runtime[1].call(null, cst, [0, match_val, mN]); + if(Sx_types[49].call(null, bf)){ var - name$2 = Sx_runtime[23].call(null, frame, lR), - remaining$9 = Sx_runtime[23].call(null, frame, lS), - fenv$10 = Sx_runtime[23].call(null, frame, lT), - bb = Sx_runtime[31].call(null, remaining$9); - if(Sx_types[49].call(null, bb)){ - Sx_runtime[101].call(null, name$2); - return make_cek_value(converted_val, fenv$10, rest_k); - } - var - bc = - kont_push - (make_scope_frame - (name$2, Sx_runtime[13].call(null, remaining$9), fenv$10), - rest_k); - return make_cek_state - (Sx_runtime[12].call(null, remaining$9), fenv$10, bc); - } - var bd = Sx_runtime[1].call(null, cst, [0, match_val, lU]); - if(Sx_types[49].call(null, bd)){ - var - remaining$10 = Sx_runtime[23].call(null, frame, lV), - fenv$11 = Sx_runtime[23].call(null, frame, lW), - be = Sx_runtime[31].call(null, remaining$10); - if(Sx_types[49].call(null, be)){ - var bf = Sx_runtime[23].call(null, frame, lX); - Sx_runtime[101].call(null, bf); + name$3 = Sx_runtime[25].call(null, frame, mO), + remaining$9 = Sx_runtime[25].call(null, frame, mP), + fenv$11 = Sx_runtime[25].call(null, frame, mQ), + bg = Sx_runtime[33].call(null, remaining$9); + if(Sx_types[49].call(null, bg)){ + Sx_runtime[103].call(null, name$3); return make_cek_value(converted_val, fenv$11, rest_k); } var - bg = Sx_runtime[13].call(null, remaining$10), - bh = Sx_runtime[23].call(null, frame, lY), + bh = + kont_push + (make_scope_frame + (name$3, Sx_runtime[15].call(null, remaining$9), fenv$11), + rest_k); + return make_cek_state + (Sx_runtime[14].call(null, remaining$9), fenv$11, bh); + } + var bi = Sx_runtime[1].call(null, cst, [0, match_val, mR]); + if(Sx_types[49].call(null, bi)){ + var + remaining$10 = Sx_runtime[25].call(null, frame, mS), + fenv$12 = Sx_runtime[25].call(null, frame, mT), + bj = Sx_runtime[33].call(null, remaining$10); + if(Sx_types[49].call(null, bj)){ + var bk = Sx_runtime[25].call(null, frame, mU); + Sx_runtime[103].call(null, bk); + return make_cek_value(converted_val, fenv$12, rest_k); + } + var + bl = Sx_runtime[15].call(null, remaining$10), + bm = Sx_runtime[25].call(null, frame, mV), new_frame = make_provide_frame - (Sx_runtime[23].call(null, frame, lZ), bh, bg, fenv$11), - bi = Sx_runtime[23].call(null, frame, l0); - Sx_runtime[9].call(null, new_frame, l1, bi); - var bj = kont_push(new_frame, rest_k); + (Sx_runtime[25].call(null, frame, mW), bm, bl, fenv$12), + bn = Sx_runtime[25].call(null, frame, mX); + Sx_runtime[11].call(null, new_frame, mY, bn); + var bo = kont_push(new_frame, rest_k); return make_cek_state - (Sx_runtime[12].call(null, remaining$10), fenv$11, bj); + (Sx_runtime[14].call(null, remaining$10), fenv$12, bo); } - var bk = Sx_runtime[1].call(null, cst, [0, match_val, l2]); - if(Sx_types[49].call(null, bk)){ + var bp = Sx_runtime[1].call(null, cst, [0, match_val, mZ]); + if(Sx_types[49].call(null, bp)){ var tracked = bind_tracking_ref[1], - body$1 = Sx_runtime[23].call(null, frame, l3), - fenv$12 = Sx_runtime[23].call(null, frame, l4), - prev = Sx_runtime[23].call(null, frame, l5); + body$1 = Sx_runtime[25].call(null, frame, m0), + fenv$13 = Sx_runtime[25].call(null, frame, m1), + prev = Sx_runtime[25].call(null, frame, m2); bind_tracking_ref[1] = prev; var subscriber = [14, - cst$8, + cst$9, function(args){ if(args && ! args[2]) - return cek_run(make_cek_state(body$1, fenv$12, l6)); + return cek_run(make_cek_state(body$1, fenv$13, m3)); return 0; }], - bl = Sx_runtime[5].call(null, tracked); + bq = Sx_runtime[5].call(null, tracked); Stdlib_List[18].call (null, function(name){ var existing = - Sx_runtime[23].call(null, provide_subscribers_ref[1], name), - existing$0 = Sx_types[49].call(null, existing) ? existing : l7, + Sx_runtime[25].call(null, provide_subscribers_ref[1], name), + existing$0 = Sx_types[49].call(null, existing) ? existing : m4, a = Sx_runtime[1].call (null, cst_append, [0, existing$0, [0, [5, [0, subscriber, 0]], 0]]); - Sx_runtime[9].call(null, provide_subscribers_ref[1], name, a); + Sx_runtime[11].call(null, provide_subscribers_ref[1], name, a); return 0; }, - bl); - return make_cek_value(converted_val, fenv$12, rest_k); - } - var bm = Sx_runtime[1].call(null, cst, [0, match_val, l8]); - if(Sx_types[49].call(null, bm)){ - var - name$3 = Sx_runtime[23].call(null, frame, l9), - fenv$13 = Sx_runtime[23].call(null, frame, l_), - target = kont_find_provide(rest_k, name$3), - old_val = - Sx_types[49].call(null, target) - ? Sx_runtime[23].call(null, target, l$) - : Sx_runtime[102].call(null, name$3); - if(Sx_types[49].call(null, target)) - Sx_runtime[9].call(null, target, ma, converted_val); - Sx_runtime[101].call(null, name$3); - Sx_runtime[100].call(null, name$3, converted_val); - var - bn = Sx_runtime[1].call(null, cst, [0, old_val, [0, converted_val, 0]]), - bo = [0, 1 - Sx_types[49].call(null, bn)]; - if(Sx_types[49].call(null, bo)) fire_provide_subscribers(name$3); + bq); return make_cek_value(converted_val, fenv$13, rest_k); } - var bp = Sx_runtime[1].call(null, cst, [0, match_val, mb]); - if(Sx_types[49].call(null, bp)){ + var br = Sx_runtime[1].call(null, cst, [0, match_val, m5]); + if(Sx_types[49].call(null, br)){ var - remaining$11 = Sx_runtime[23].call(null, frame, mc), - fenv$14 = Sx_runtime[23].call(null, frame, md), - bq = Sx_runtime[31].call(null, remaining$11); - if(Sx_types[49].call(null, bq)) - return make_cek_value(converted_val, fenv$14, rest_k); + name$4 = Sx_runtime[25].call(null, frame, m6), + fenv$14 = Sx_runtime[25].call(null, frame, m7), + target = kont_find_provide(rest_k, name$4), + old_val = + Sx_types[49].call(null, target) + ? Sx_runtime[25].call(null, target, m8) + : Sx_runtime[104].call(null, name$4); + if(Sx_types[49].call(null, target)) + Sx_runtime[11].call(null, target, m9, converted_val); + Sx_runtime[103].call(null, name$4); + Sx_runtime[102].call(null, name$4, converted_val); var - br = Sx_runtime[13].call(null, remaining$11), - bs = Sx_runtime[23].call(null, frame, me), + bs = Sx_runtime[1].call(null, cst, [0, old_val, [0, converted_val, 0]]), + bt = [0, 1 - Sx_types[49].call(null, bs)]; + if(Sx_types[49].call(null, bt)) fire_provide_subscribers(name$4); + return make_cek_value(converted_val, fenv$14, rest_k); + } + var bu = Sx_runtime[1].call(null, cst, [0, match_val, m_]); + if(Sx_types[49].call(null, bu)){ + var + remaining$11 = Sx_runtime[25].call(null, frame, m$), + fenv$15 = Sx_runtime[25].call(null, frame, na), + bv = Sx_runtime[33].call(null, remaining$11); + if(Sx_types[49].call(null, bv)) + return make_cek_value(converted_val, fenv$15, rest_k); + var + bw = Sx_runtime[15].call(null, remaining$11), + bx = Sx_runtime[25].call(null, frame, nb), new_frame$0 = make_scope_acc_frame - (Sx_runtime[23].call(null, frame, mf), bs, br, fenv$14), - bt = Sx_runtime[23].call(null, frame, mg); - Sx_runtime[9].call(null, new_frame$0, mh, bt); - var bu = kont_push(new_frame$0, rest_k); + (Sx_runtime[25].call(null, frame, nc), bx, bw, fenv$15), + by = Sx_runtime[25].call(null, frame, nd); + Sx_runtime[11].call(null, new_frame$0, ne, by); + var bz = kont_push(new_frame$0, rest_k); return make_cek_state - (Sx_runtime[12].call(null, remaining$11), fenv$14, bu); + (Sx_runtime[14].call(null, remaining$11), fenv$15, bz); } - var bv = Sx_runtime[1].call(null, cst, [0, match_val, mi]); - if(Sx_types[49].call(null, bv)){ + var bA = Sx_runtime[1].call(null, cst, [0, match_val, nf]); + if(Sx_types[49].call(null, bA)){ var - f$0 = Sx_runtime[23].call(null, frame, mj), - remaining$12 = Sx_runtime[23].call(null, frame, mk), - results$0 = Sx_runtime[23].call(null, frame, ml), - indexed = Sx_runtime[23].call(null, frame, mm), - fenv$15 = Sx_runtime[23].call(null, frame, mn), + f$0 = Sx_runtime[25].call(null, frame, ng), + remaining$12 = Sx_runtime[25].call(null, frame, nh), + results$0 = Sx_runtime[25].call(null, frame, ni), + indexed = Sx_runtime[25].call(null, frame, nj), + fenv$16 = Sx_runtime[25].call(null, frame, nk), new_results = Sx_runtime[1].call (null, cst_append, [0, results$0, [0, [5, [0, converted_val, 0]], 0]]), - bw = Sx_runtime[31].call(null, remaining$12); - if(Sx_types[49].call(null, bw)) - return make_cek_value(new_results, fenv$15, rest_k); + bB = Sx_runtime[33].call(null, remaining$12); + if(Sx_types[49].call(null, bB)) + return make_cek_value(new_results, fenv$16, rest_k); if(Sx_types[49].call(null, indexed)) var - bx = [0, Sx_runtime[12].call(null, remaining$12), 0], - call_args = [5, [0, Sx_runtime[22].call(null, new_results), bx]]; + bC = [0, Sx_runtime[14].call(null, remaining$12), 0], + call_args = [5, [0, Sx_runtime[24].call(null, new_results), bC]]; else - var call_args = [5, [0, Sx_runtime[12].call(null, remaining$12), 0]]; + var call_args = [5, [0, Sx_runtime[14].call(null, remaining$12), 0]]; var next_frame = Sx_types[49].call(null, indexed) ? make_map_indexed_frame (f$0, - Sx_runtime[13].call(null, remaining$12), + Sx_runtime[15].call(null, remaining$12), new_results, - fenv$15) + fenv$16) : make_map_frame (f$0, - Sx_runtime[13].call(null, remaining$12), + Sx_runtime[15].call(null, remaining$12), new_results, - fenv$15); + fenv$16); return continue_with_call - (f$0, call_args, fenv$15, mo, kont_push(next_frame, rest_k)); + (f$0, call_args, fenv$16, nl, kont_push(next_frame, rest_k)); } - var by = Sx_runtime[1].call(null, cst, [0, match_val, mp]); - if(Sx_types[49].call(null, by)){ + var bD = Sx_runtime[1].call(null, cst, [0, match_val, nm]); + if(Sx_types[49].call(null, bD)){ var - f$1 = Sx_runtime[23].call(null, frame, mq), - remaining$13 = Sx_runtime[23].call(null, frame, mr), - results$1 = Sx_runtime[23].call(null, frame, ms), - current_item = Sx_runtime[23].call(null, frame, mt), - fenv$16 = Sx_runtime[23].call(null, frame, mu), + f$1 = Sx_runtime[25].call(null, frame, nn), + remaining$13 = Sx_runtime[25].call(null, frame, no), + results$1 = Sx_runtime[25].call(null, frame, np), + current_item = Sx_runtime[25].call(null, frame, nq), + fenv$17 = Sx_runtime[25].call(null, frame, nr), new_results$0 = Sx_types[49].call(null, converted_val) ? Sx_runtime @@ -39543,318 +50192,318 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg cst_append, [0, results$1, [0, [5, [0, current_item, 0]], 0]]) : results$1, - bz = Sx_runtime[31].call(null, remaining$13); - if(Sx_types[49].call(null, bz)) - return make_cek_value(new_results$0, fenv$16, rest_k); + bE = Sx_runtime[33].call(null, remaining$13); + if(Sx_types[49].call(null, bE)) + return make_cek_value(new_results$0, fenv$17, rest_k); var - bA = Sx_runtime[12].call(null, remaining$13), - bB = + bF = Sx_runtime[14].call(null, remaining$13), + bG = kont_push (make_filter_frame (f$1, - Sx_runtime[13].call(null, remaining$13), + Sx_runtime[15].call(null, remaining$13), new_results$0, - bA, - fenv$16), + bF, + fenv$17), rest_k); return continue_with_call (f$1, - [5, [0, Sx_runtime[12].call(null, remaining$13), 0]], - fenv$16, - mv, - bB); + [5, [0, Sx_runtime[14].call(null, remaining$13), 0]], + fenv$17, + ns, + bG); } - var bC = Sx_runtime[1].call(null, cst, [0, match_val, mw]); - if(Sx_types[49].call(null, bC)){ + var bH = Sx_runtime[1].call(null, cst, [0, match_val, nt]); + if(Sx_types[49].call(null, bH)){ var - f$2 = Sx_runtime[23].call(null, frame, mx), - remaining$14 = Sx_runtime[23].call(null, frame, my), - fenv$17 = Sx_runtime[23].call(null, frame, mz), - bD = Sx_runtime[31].call(null, remaining$14); - if(Sx_types[49].call(null, bD)) - return make_cek_value(converted_val, fenv$17, rest_k); + f$2 = Sx_runtime[25].call(null, frame, nu), + remaining$14 = Sx_runtime[25].call(null, frame, nv), + fenv$18 = Sx_runtime[25].call(null, frame, nw), + bI = Sx_runtime[33].call(null, remaining$14); + if(Sx_types[49].call(null, bI)) + return make_cek_value(converted_val, fenv$18, rest_k); var - bE = + bJ = kont_push (make_reduce_frame - (f$2, Sx_runtime[13].call(null, remaining$14), fenv$17), + (f$2, Sx_runtime[15].call(null, remaining$14), fenv$18), rest_k); return continue_with_call (f$2, [5, [0, converted_val, - [0, Sx_runtime[12].call(null, remaining$14), 0]]], - fenv$17, - mA, - bE); + [0, Sx_runtime[14].call(null, remaining$14), 0]]], + fenv$18, + nx, + bJ); } - var bF = Sx_runtime[1].call(null, cst, [0, match_val, mB]); - if(Sx_types[49].call(null, bF)){ + var bK = Sx_runtime[1].call(null, cst, [0, match_val, ny]); + if(Sx_types[49].call(null, bK)){ var - f$3 = Sx_runtime[23].call(null, frame, mC), - remaining$15 = Sx_runtime[23].call(null, frame, mD), - fenv$18 = Sx_runtime[23].call(null, frame, mE), - bG = Sx_runtime[31].call(null, remaining$15); - if(Sx_types[49].call(null, bG)) - return make_cek_value(0, fenv$18, rest_k); + f$3 = Sx_runtime[25].call(null, frame, nz), + remaining$15 = Sx_runtime[25].call(null, frame, nA), + fenv$19 = Sx_runtime[25].call(null, frame, nB), + bL = Sx_runtime[33].call(null, remaining$15); + if(Sx_types[49].call(null, bL)) + return make_cek_value(0, fenv$19, rest_k); var - bH = + bM = kont_push (make_for_each_frame - (f$3, Sx_runtime[13].call(null, remaining$15), fenv$18), + (f$3, Sx_runtime[15].call(null, remaining$15), fenv$19), rest_k); return continue_with_call (f$3, - [5, [0, Sx_runtime[12].call(null, remaining$15), 0]], - fenv$18, - mF, - bH); + [5, [0, Sx_runtime[14].call(null, remaining$15), 0]], + fenv$19, + nC, + bM); } - var bI = Sx_runtime[1].call(null, cst, [0, match_val, mG]); - if(Sx_types[49].call(null, bI)){ + var bN = Sx_runtime[1].call(null, cst, [0, match_val, nD]); + if(Sx_types[49].call(null, bN)){ var - f$4 = Sx_runtime[23].call(null, frame, mH), - remaining$16 = Sx_runtime[23].call(null, frame, mI), - fenv$19 = Sx_runtime[23].call(null, frame, mJ); + f$4 = Sx_runtime[25].call(null, frame, nE), + remaining$16 = Sx_runtime[25].call(null, frame, nF), + fenv$20 = Sx_runtime[25].call(null, frame, nG); if(Sx_types[49].call(null, converted_val)) - return make_cek_value(converted_val, fenv$19, rest_k); - var bJ = Sx_runtime[31].call(null, remaining$16); - if(Sx_types[49].call(null, bJ)) - return make_cek_value(mK, fenv$19, rest_k); + return make_cek_value(converted_val, fenv$20, rest_k); + var bO = Sx_runtime[33].call(null, remaining$16); + if(Sx_types[49].call(null, bO)) + return make_cek_value(nH, fenv$20, rest_k); var - bK = + bP = kont_push (make_some_frame - (f$4, Sx_runtime[13].call(null, remaining$16), fenv$19), + (f$4, Sx_runtime[15].call(null, remaining$16), fenv$20), rest_k); return continue_with_call (f$4, - [5, [0, Sx_runtime[12].call(null, remaining$16), 0]], - fenv$19, - mL, - bK); + [5, [0, Sx_runtime[14].call(null, remaining$16), 0]], + fenv$20, + nI, + bP); } - var bL = Sx_runtime[1].call(null, cst, [0, match_val, mM]); - if(Sx_types[49].call(null, bL)){ + var bQ = Sx_runtime[1].call(null, cst, [0, match_val, nJ]); + if(Sx_types[49].call(null, bQ)){ var - f$5 = Sx_runtime[23].call(null, frame, mN), - remaining$17 = Sx_runtime[23].call(null, frame, mO), - fenv$20 = Sx_runtime[23].call(null, frame, mP), - bM = [0, 1 - Sx_types[49].call(null, converted_val)]; - if(Sx_types[49].call(null, bM)) - return make_cek_value(mQ, fenv$20, rest_k); - var bN = Sx_runtime[31].call(null, remaining$17); - if(Sx_types[49].call(null, bN)) - return make_cek_value(mR, fenv$20, rest_k); + f$5 = Sx_runtime[25].call(null, frame, nK), + remaining$17 = Sx_runtime[25].call(null, frame, nL), + fenv$21 = Sx_runtime[25].call(null, frame, nM), + bR = [0, 1 - Sx_types[49].call(null, converted_val)]; + if(Sx_types[49].call(null, bR)) + return make_cek_value(nN, fenv$21, rest_k); + var bS = Sx_runtime[33].call(null, remaining$17); + if(Sx_types[49].call(null, bS)) + return make_cek_value(nO, fenv$21, rest_k); var - bO = + bT = kont_push (make_every_frame - (f$5, Sx_runtime[13].call(null, remaining$17), fenv$20), + (f$5, Sx_runtime[15].call(null, remaining$17), fenv$21), rest_k); return continue_with_call (f$5, - [5, [0, Sx_runtime[12].call(null, remaining$17), 0]], - fenv$20, - mS, - bO); + [5, [0, Sx_runtime[14].call(null, remaining$17), 0]], + fenv$21, + nP, + bT); } - var bP = Sx_runtime[1].call(null, cst, [0, match_val, mT]); - if(Sx_types[49].call(null, bP)){ + var bU = Sx_runtime[1].call(null, cst, [0, match_val, nQ]); + if(Sx_types[49].call(null, bU)){ var - remaining$18 = Sx_runtime[23].call(null, frame, mU), - fenv$21 = Sx_runtime[23].call(null, frame, mV), - bQ = Sx_runtime[31].call(null, remaining$18); - if(Sx_types[49].call(null, bQ)) - return make_cek_value(converted_val, fenv$21, rest_k); + remaining$18 = Sx_runtime[25].call(null, frame, nR), + fenv$22 = Sx_runtime[25].call(null, frame, nS), + bV = Sx_runtime[33].call(null, remaining$18); + if(Sx_types[49].call(null, bV)) + return make_cek_value(converted_val, fenv$22, rest_k); var - bR = Sx_runtime[13].call(null, remaining$18), - bS = + bW = Sx_runtime[15].call(null, remaining$18), + bX = kont_push (make_handler_frame - (Sx_runtime[23].call(null, frame, mW), bR, fenv$21), + (Sx_runtime[25].call(null, frame, nT), bW, fenv$22), rest_k); return make_cek_state - (Sx_runtime[12].call(null, remaining$18), fenv$21, bS); + (Sx_runtime[14].call(null, remaining$18), fenv$22, bX); } - var bT = Sx_runtime[1].call(null, cst, [0, match_val, mX]); - if(Sx_types[49].call(null, bT)) + var bY = Sx_runtime[1].call(null, cst, [0, match_val, nU]); + if(Sx_types[49].call(null, bY)) return make_cek_value(converted_val, env, rest_k); - var bU = Sx_runtime[1].call(null, cst, [0, match_val, mY]); - if(Sx_types[49].call(null, bU)){ - var saved_kont = Sx_runtime[23].call(null, frame, mZ); + var bZ = Sx_runtime[1].call(null, cst, [0, match_val, nV]); + if(Sx_types[49].call(null, bZ)){ + var saved_kont = Sx_runtime[25].call(null, frame, nW); return make_cek_value - (converted_val, Sx_runtime[23].call(null, frame, m0), saved_kont); + (converted_val, Sx_runtime[25].call(null, frame, nX), saved_kont); } - var bV = Sx_runtime[1].call(null, cst, [0, match_val, m1]); - if(Sx_types[49].call(null, bV)) + var b0 = Sx_runtime[1].call(null, cst, [0, match_val, nY]); + if(Sx_types[49].call(null, b0)) return make_cek_value(converted_val, env, rest_k); - var bW = Sx_runtime[1].call(null, cst, [0, match_val, m2]); - if(Sx_types[49].call(null, bW)){ + var b1 = Sx_runtime[1].call(null, cst, [0, match_val, nZ]); + if(Sx_types[49].call(null, b1)){ var - test_value = Sx_runtime[23].call(null, frame, m3), - fenv$22 = Sx_runtime[23].call(null, frame, m4); + test_value = Sx_runtime[25].call(null, frame, n0), + fenv$23 = Sx_runtime[25].call(null, frame, n1); return continue_with_call (converted_val, [5, [0, test_value, 0]], - fenv$22, + fenv$23, [5, [0, test_value, 0]], rest_k); } - var bX = Sx_runtime[1].call(null, cst, [0, match_val, m5]); - if(Sx_types[49].call(null, bX)){ + var b2 = Sx_runtime[1].call(null, cst, [0, match_val, n2]); + if(Sx_types[49].call(null, b2)){ var - fenv$23 = Sx_runtime[23].call(null, frame, m6), - continuable_p = Sx_runtime[23].call(null, frame, m7), + fenv$24 = Sx_runtime[25].call(null, frame, n3), + continuable_p = Sx_runtime[25].call(null, frame, n4), handler_fn = kont_find_handler(rest_k, converted_val), - bY = Sx_runtime[81].call(null, handler_fn); - if(Sx_types[49].call(null, bY)){ + b3 = Sx_runtime[83].call(null, handler_fn); + if(Sx_types[49].call(null, b3)){ last_error_kont_ref[1] = rest_k; var - bZ = [0, m8, [0, Sx_runtime[66].call(null, converted_val), 0]], - b0 = [2, Sx_runtime[4].call(null, bZ)]; - return Sx_runtime[98].call(null, b0); + b4 = [0, n5, [0, Sx_runtime[68].call(null, converted_val), 0]], + b5 = [2, Sx_runtime[4].call(null, b4)]; + return Sx_runtime[100].call(null, b5); } var - b1 = + b6 = Sx_types[49].call(null, continuable_p) - ? kont_push(make_signal_return_frame(fenv$23, rest_k), rest_k) - : kont_push(make_raise_guard_frame(fenv$23, rest_k), rest_k); + ? kont_push(make_signal_return_frame(fenv$24, rest_k), rest_k) + : kont_push(make_raise_guard_frame(fenv$24, rest_k), rest_k); return continue_with_call (handler_fn, [5, [0, converted_val, 0]], - fenv$23, + fenv$24, [5, [0, converted_val, 0]], - b1); + b6); } - var b2 = Sx_runtime[1].call(null, cst, [0, match_val, m9]); - if(Sx_types[49].call(null, b2)){ + var b7 = Sx_runtime[1].call(null, cst, [0, match_val, n6]); + if(Sx_types[49].call(null, b7)){ last_error_kont_ref[1] = rest_k; - return Sx_runtime[98].call(null, m_); + return Sx_runtime[100].call(null, n7); } - var b3 = Sx_runtime[1].call(null, cst, [0, match_val, m$]); - if(Sx_types[49].call(null, b3)){ + var b8 = Sx_runtime[1].call(null, cst, [0, match_val, n8]); + if(Sx_types[49].call(null, b8)){ var - f$6 = Sx_runtime[23].call(null, frame, na), - remaining$19 = Sx_runtime[23].call(null, frame, nb), - b4 = + f$6 = Sx_runtime[25].call(null, frame, n9), + remaining$19 = Sx_runtime[25].call(null, frame, n_), + b9 = [0, - Sx_runtime[23].call(null, frame, nc), + Sx_runtime[25].call(null, frame, n$), [0, [5, [0, converted_val, 0]], 0]], - new_results$1 = Sx_runtime[1].call(null, cst_append, b4), - fenv$24 = Sx_runtime[23].call(null, frame, nd), - b5 = Sx_runtime[5].call(null, remaining$19), - b6 = + new_results$1 = Sx_runtime[1].call(null, cst_append, b9), + fenv$25 = Sx_runtime[25].call(null, frame, oa), + b_ = Sx_runtime[5].call(null, remaining$19), + b$ = [0, Stdlib_List[34].call (null, function(c){ - var a = Sx_runtime[31].call(null, c); + var a = Sx_runtime[33].call(null, c); return Sx_types[49].call(null, a); }, - b5)]; - if(Sx_types[49].call(null, b6)) - return make_cek_value(new_results$1, fenv$24, rest_k); + b_)]; + if(Sx_types[49].call(null, b$)) + return make_cek_value(new_results$1, fenv$25, rest_k); var - b7 = Sx_runtime[5].call(null, remaining$19), + ca = Sx_runtime[5].call(null, remaining$19), heads = [5, Stdlib_List[20].call - (null, function(c){return Sx_runtime[12].call(null, c);}, b7)], - b8 = Sx_runtime[5].call(null, remaining$19), + (null, function(c){return Sx_runtime[14].call(null, c);}, ca)], + cb = Sx_runtime[5].call(null, remaining$19), tails = [5, Stdlib_List[20].call - (null, function(c){return Sx_runtime[13].call(null, c);}, b8)]; + (null, function(c){return Sx_runtime[15].call(null, c);}, cb)]; return continue_with_call (f$6, heads, - fenv$24, - ne, + fenv$25, + ob, kont_push - (make_multi_map_frame(f$6, tails, new_results$1, fenv$24), + (make_multi_map_frame(f$6, tails, new_results$1, fenv$25), rest_k)); } - var b9 = Sx_runtime[1].call(null, cst, [0, match_val, nf]); - if(Sx_types[49].call(null, b9)){ - var k = Sx_runtime[96].call(null, rest_k); + var cc = Sx_runtime[1].call(null, cst, [0, match_val, oc]); + if(Sx_types[49].call(null, cc)){ + var k = Sx_runtime[98].call(null, rest_k); return continue_with_call (converted_val, [5, [0, k, 0]], - Sx_runtime[23].call(null, frame, ng), + Sx_runtime[25].call(null, frame, od), [5, [0, k, 0]], rest_k); } - var b_ = Sx_runtime[1].call(null, cst, [0, match_val, nh]); - if(Sx_types[49].call(null, b_)){ + var cd = Sx_runtime[1].call(null, cst, [0, match_val, oe]); + if(Sx_types[49].call(null, cd)){ var - resume_fn = Sx_runtime[23].call(null, frame, ni), + resume_fn = Sx_runtime[25].call(null, frame, of), result$1 = Sx_runtime[7].call(null, resume_fn, [5, [0, converted_val, 0]]), - and$7 = Sx_runtime[36].call(null, result$1), - b$ = - Sx_types[49].call(null, and$7) - ? Sx_runtime[23].call(null, result$1, nj) - : and$7; - if(! Sx_types[49].call(null, b$)) + and$8 = Sx_runtime[38].call(null, result$1), + ce = + Sx_types[49].call(null, and$8) + ? Sx_runtime[25].call(null, result$1, og) + : and$8; + if(! Sx_types[49].call(null, ce)) return make_cek_value - (result$1, Sx_runtime[23].call(null, frame, no), rest_k); + (result$1, Sx_runtime[25].call(null, frame, ol), rest_k); var - ca = Sx_runtime[23].call(null, frame, nk), - cb = + cf = Sx_runtime[25].call(null, frame, oh), + cg = kont_push - (make_vm_resume_frame(Sx_runtime[23].call(null, result$1, nl), ca), + (make_vm_resume_frame(Sx_runtime[25].call(null, result$1, oi), cf), rest_k), - cc = Sx_runtime[23].call(null, frame, nm); + ch = Sx_runtime[25].call(null, frame, oj); return make_cek_suspended - (Sx_runtime[23].call(null, result$1, nn), cc, cb); + (Sx_runtime[25].call(null, result$1, ok), ch, cg); } - var cd = Sx_runtime[1].call(null, cst, [0, match_val, np]); - if(Sx_types[49].call(null, cd)) + var ci = Sx_runtime[1].call(null, cst, [0, match_val, om]); + if(Sx_types[49].call(null, ci)) return make_cek_suspended - (converted_val, Sx_runtime[23].call(null, frame, nq), rest_k); - var ce = Sx_runtime[1].call(null, cst, [0, match_val, nr]); - if(Sx_types[49].call(null, ce)){ + (converted_val, Sx_runtime[25].call(null, frame, on), rest_k); + var cj = Sx_runtime[1].call(null, cst, [0, match_val, oo]); + if(Sx_types[49].call(null, cj)){ var - import_set = Sx_runtime[23].call(null, frame, ns), - remaining_sets = Sx_runtime[23].call(null, frame, nt), - fenv$25 = Sx_runtime[23].call(null, frame, nu); - bind_import_set(import_set, fenv$25); - var cf = Sx_runtime[31].call(null, remaining_sets); - return Sx_types[49].call(null, cf) - ? make_cek_value(0, fenv$25, rest_k) - : step_sf_import(remaining_sets, fenv$25, rest_k); + import_set = Sx_runtime[25].call(null, frame, op), + remaining_sets = Sx_runtime[25].call(null, frame, oq), + fenv$26 = Sx_runtime[25].call(null, frame, or); + bind_import_set(import_set, fenv$26); + var ck = Sx_runtime[33].call(null, remaining_sets); + return Sx_types[49].call(null, ck) + ? make_cek_value(0, fenv$26, rest_k) + : step_sf_import(remaining_sets, fenv$26, rest_k); } - var cg = Sx_runtime[1].call(null, cst, [0, match_val, nv]); - if(! Sx_types[49].call(null, cg)){ + var cl = Sx_runtime[1].call(null, cst, [0, match_val, os]); + if(! Sx_types[49].call(null, cl)){ last_error_kont_ref[1] = rest_k; var - cp = [2, Sx_runtime[4].call(null, [0, nE, [0, match_val, 0]])], - cq = Sx_runtime[2].call(null, cp); - throw caml_maybe_attach_backtrace([0, Sx_types[8], cq], 1); + cu = [2, Sx_runtime[4].call(null, [0, oB, [0, match_val, 0]])], + cv = Sx_runtime[2].call(null, cu); + throw caml_maybe_attach_backtrace([0, Sx_types[8], cv], 1); } var - remaining$20 = Sx_runtime[23].call(null, frame, nw), - current_param = Sx_runtime[23].call(null, frame, nx), - results$2 = Sx_runtime[23].call(null, frame, ny), - body$2 = Sx_runtime[23].call(null, frame, nz), - fenv$26 = Sx_runtime[23].call(null, frame, nA), - ch = Sx_runtime[81].call(null, current_param); - if(Sx_types[49].call(null, ch)){ + remaining$20 = Sx_runtime[25].call(null, frame, ot), + current_param = Sx_runtime[25].call(null, frame, ou), + results$2 = Sx_runtime[25].call(null, frame, ov), + body$2 = Sx_runtime[25].call(null, frame, ow), + fenv$27 = Sx_runtime[25].call(null, frame, ox), + cm = Sx_runtime[83].call(null, current_param); + if(Sx_types[49].call(null, cm)){ var - ci = Sx_runtime[12].call(null, remaining$20), - val_expr = Sx_runtime[15].call(null, ci, nB); + cn = Sx_runtime[14].call(null, remaining$20), + val_expr = Sx_runtime[17].call(null, cn, oy); return make_cek_state (val_expr, - fenv$26, + fenv$27, kont_push (make_parameterize_frame - (remaining$20, converted_val, results$2, body$2, fenv$26), + (remaining$20, converted_val, results$2, body$2, fenv$27), rest_k)); } var - cj = + co = [0, results$2, [0, @@ -39864,42 +50513,44 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg [0, Sx_types[84].call(null, current_param), [0, converted_val, 0]]], 0]], 0]], - new_results$2 = Sx_runtime[1].call(null, cst_append, cj), - rest_bindings = Sx_runtime[13].call(null, remaining$20), - ck = Sx_runtime[31].call(null, rest_bindings); - if(Sx_types[49].call(null, ck)){ + new_results$2 = Sx_runtime[1].call(null, cst_append, co), + rest_bindings = Sx_runtime[15].call(null, remaining$20), + cp = Sx_runtime[33].call(null, rest_bindings); + if(Sx_types[49].call(null, cp)){ var - cl = [0, Sx_runtime[22].call(null, body$2), nC], - cm = Sx_runtime[1].call(null, cst, cl), + cq = [0, Sx_runtime[24].call(null, body$2), oz], + cr = Sx_runtime[1].call(null, cst, cq), body_expr = - Sx_types[49].call(null, cm) - ? Sx_runtime[12].call(null, body$2) - : Sx_runtime[16].call(null, nD, body$2), - provide_kont = kont_push_provides(new_results$2, fenv$26, rest_k); - return make_cek_state(body_expr, fenv$26, provide_kont); + Sx_types[49].call(null, cr) + ? Sx_runtime[14].call(null, body$2) + : Sx_runtime[18].call(null, oA, body$2), + provide_kont = kont_push_provides(new_results$2, fenv$27, rest_k); + return make_cek_state(body_expr, fenv$27, provide_kont); } var - cn = + cs = kont_push (make_parameterize_frame - (rest_bindings, 0, new_results$2, body$2, fenv$26), + (rest_bindings, 0, new_results$2, body$2, fenv$27), rest_k), - co = Sx_runtime[12].call(null, rest_bindings); - return make_cek_state(Sx_runtime[12].call(null, co), fenv$26, cn); + ct = Sx_runtime[14].call(null, rest_bindings); + return make_cek_state(Sx_runtime[14].call(null, ct), fenv$27, cs); } var - nF = [2, cst_value], - nG = [2, "captured"], - nH = [2, cst_args_got], - nI = [2, cst_expects], - nJ = [2, cst_lambda], - nK = [1, 1.], - nL = [2, cst_vm_suspended], - nM = [2, cst_resume], - nN = [2, cst_request], - nO = [1, 1.], - nP = [2, cst_children], - nQ = [2, "Not callable: "]; + oC = [2, cst_value], + oD = [2, "captured"], + oE = [0, 0], + oF = [2, "message"], + oG = [2, cst_args_got], + oH = [2, cst_expects], + oI = [2, cst_lambda], + oJ = [1, 1.], + oK = [2, cst_vm_suspended], + oL = [2, cst_resume], + oM = [2, cst_request], + oN = [1, 1.], + oO = [2, cst_children], + oP = [2, "Not callable: "]; function continue_with_call(f, args, env, raw_args, kont){ var b = Sx_types[83].call(null, f); if(Sx_types[49].call(null, b)){ @@ -39908,40 +50559,40 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg frame = kont_find_provide(kont, uid), c = Sx_types[49].call(null, frame) - ? Sx_runtime[23].call(null, frame, nF) + ? Sx_runtime[25].call(null, frame, oC) : Sx_types[85].call(null, f); return make_cek_value(c, env, kont); } - var d = Sx_runtime[95].call(null, f); + var d = Sx_runtime[97].call(null, f); if(Sx_types[49].call(null, d)){ var - e = Sx_runtime[31].call(null, args), - arg = Sx_types[49].call(null, e) ? 0 : Sx_runtime[12].call(null, args), - captured = Sx_runtime[97].call(null, f); + e = Sx_runtime[33].call(null, args), + arg = Sx_types[49].call(null, e) ? 0 : Sx_runtime[14].call(null, args), + captured = Sx_runtime[99].call(null, f); return make_cek_value(arg, env, captured); } - var g = Sx_runtime[92].call(null, f); + var g = Sx_runtime[94].call(null, f); if(Sx_types[49].call(null, g)){ var - h = Sx_runtime[31].call(null, args), - arg$0 = Sx_types[49].call(null, h) ? 0 : Sx_runtime[12].call(null, args), - cont_data = Sx_runtime[94].call(null, f), - captured$0 = Sx_runtime[23].call(null, cont_data, nG), + h = Sx_runtime[33].call(null, args), + arg$0 = Sx_types[49].call(null, h) ? 0 : Sx_runtime[14].call(null, args), + cont_data = Sx_runtime[96].call(null, f), + captured$0 = Sx_runtime[25].call(null, cont_data, oD), result = cek_run(make_cek_value(arg$0, env, captured$0)); return make_cek_value(result, env, kont); } - var and = Sx_runtime[88].call(null, f); + var and = Sx_runtime[90].call(null, f); if(Sx_types[49].call(null, and)){ var - i = Sx_runtime[83].call(null, f), + i = Sx_runtime[85].call(null, f), and$0 = [0, 1 - Sx_types[49].call(null, i)]; if(Sx_types[49].call(null, and$0)){ var - j = Sx_runtime[84].call(null, f), + j = Sx_runtime[86].call(null, f), and$1 = [0, 1 - Sx_types[49].call(null, j)]; if(Sx_types[49].call(null, and$1)) var - k = Sx_runtime[85].call(null, f), + k = Sx_runtime[87].call(null, f), a = [0, 1 - Sx_types[49].call(null, k)]; else var a = and$1; @@ -39951,154 +50602,161 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } else var a = and; - if(Sx_types[49].call(null, a)) - return make_cek_value(Sx_runtime[7].call(null, f, args), env, kont); - var l = Sx_runtime[83].call(null, f); - if(! Sx_types[49].call(null, l)){ + if(Sx_types[49].call(null, a)){ var - or$1 = Sx_runtime[84].call(null, f), + result$0 = Sx_runtime[8].call(null, f, args), + l = [0, Sx_runtime[9].call(null, result$0)]; + if(! Sx_types[49].call(null, l)) + return make_cek_value(result$0, env, kont); + var m = kont_push(make_raise_eval_frame(env, oE), kont); + return make_cek_value(Sx_runtime[25].call(null, result$0, oF), env, m); + } + var n = Sx_runtime[85].call(null, f); + if(! Sx_types[49].call(null, n)){ + var + or$1 = Sx_runtime[86].call(null, f), or$2 = - Sx_types[49].call(null, or$1) ? or$1 : Sx_runtime[85].call(null, f); + Sx_types[49].call(null, or$1) ? or$1 : Sx_runtime[87].call(null, f); if(! Sx_types[49].call(null, or$2)){ var - L = [0, nQ, [0, Sx_runtime[66].call(null, f), 0]], - M = [2, Sx_runtime[4].call(null, L)], - N = Sx_runtime[2].call(null, M); - throw caml_maybe_attach_backtrace([0, Sx_types[8], N], 1); + N = [0, oP, [0, Sx_runtime[68].call(null, f), 0]], + O = [2, Sx_runtime[4].call(null, N)], + P = Sx_runtime[2].call(null, O); + throw caml_maybe_attach_backtrace([0, Sx_types[8], P], 1); } var parsed = parse_keyword_args(raw_args, env), - kwargs = Sx_runtime[12].call(null, parsed), - children = Sx_runtime[15].call(null, parsed, nO), - E = Sx_types[63].call(null, f), - local$0 = Sx_runtime[79].call(null, E, env), - F = Sx_types[61].call(null, f), - G = Sx_runtime[5].call(null, F); + kwargs = Sx_runtime[14].call(null, parsed), + children = Sx_runtime[17].call(null, parsed, oN), + G = Sx_types[63].call(null, f), + local$0 = Sx_runtime[81].call(null, G, env), + H = Sx_types[61].call(null, f), + I = Sx_runtime[5].call(null, H); Stdlib_List[18].call (null, function(p){ var - or = Sx_runtime[54].call(null, kwargs, p), + or = Sx_runtime[56].call(null, kwargs, p), or$0 = Sx_types[49].call(null, or) ? or : 0, a = Sx_runtime[3].call(null, p); - Sx_runtime[75].call(null, local$0, a, or$0); + Sx_runtime[77].call(null, local$0, a, or$0); return 0; }, - G); - var H = Sx_types[64].call(null, f); - if(Sx_types[49].call(null, H)){ - var I = Sx_runtime[3].call(null, nP); - Sx_runtime[75].call(null, local$0, I, children); + I); + var J = Sx_types[64].call(null, f); + if(Sx_types[49].call(null, J)){ + var K = Sx_runtime[3].call(null, oO); + Sx_runtime[77].call(null, local$0, K, children); } var - J = Sx_types[58].call(null, f), - K = - kont_push(make_comp_trace_frame(Sx_types[57].call(null, f), J), kont); - return make_cek_state(Sx_types[62].call(null, f), local$0, K); + L = Sx_types[58].call(null, f), + M = + kont_push(make_comp_trace_frame(Sx_types[57].call(null, f), L), kont); + return make_cek_state(Sx_types[62].call(null, f), local$0, M); } var params = Sx_types[52].call(null, f), - m = Sx_types[54].call(null, f), - local = Sx_runtime[79].call(null, m, env), - n = bind_lambda_params(params, args, local), - o = [0, 1 - Sx_types[49].call(null, n)]; - if(Sx_types[49].call(null, o)){ + o = Sx_types[54].call(null, f), + local = Sx_runtime[81].call(null, o, env), + p = bind_lambda_params(params, args, local), + q = [0, 1 - Sx_types[49].call(null, p)]; + if(Sx_types[49].call(null, q)){ var - p = [0, Sx_runtime[22].call(null, params), 0], - q = [0, Sx_runtime[22].call(null, args), p], - r = Sx_runtime[1].call(null, cst$6, q); - if(Sx_types[49].call(null, r)){ + r = [0, Sx_runtime[24].call(null, params), 0], + s = [0, Sx_runtime[24].call(null, args), r], + t = Sx_runtime[1].call(null, cst$7, s); + if(Sx_types[49].call(null, t)){ var - s = [0, nH, [0, Sx_runtime[22].call(null, args), 0]], - t = [0, nI, [0, Sx_runtime[22].call(null, params), s]], + u = [0, oG, [0, Sx_runtime[24].call(null, args), 0]], + v = [0, oH, [0, Sx_runtime[24].call(null, params), u]], or = Sx_types[55].call(null, f), - or$0 = Sx_types[49].call(null, or) ? or : nJ, - u = [2, Sx_runtime[4].call(null, [0, or$0, t])], - v = Sx_runtime[2].call(null, u); - throw caml_maybe_attach_backtrace([0, Sx_types[8], v], 1); + or$0 = Sx_types[49].call(null, or) ? or : oI, + w = [2, Sx_runtime[4].call(null, [0, or$0, v])], + x = Sx_runtime[2].call(null, w); + throw caml_maybe_attach_backtrace([0, Sx_types[8], x], 1); } var - w = Sx_runtime[1].call(null, cst_zip, [0, params, [0, args, 0]]), - x = Sx_runtime[5].call(null, w); + y = Sx_runtime[1].call(null, cst_zip, [0, params, [0, args, 0]]), + z = Sx_runtime[5].call(null, y); Stdlib_List[18].call (null, function(pair){ var - a = Sx_runtime[15].call(null, pair, nK), - b = Sx_runtime[12].call(null, pair), + a = Sx_runtime[17].call(null, pair, oJ), + b = Sx_runtime[14].call(null, pair), c = Sx_runtime[3].call(null, b); - Sx_runtime[75].call(null, local, c, a); + Sx_runtime[77].call(null, local, c, a); return 0; }, - x); + z); var - y = [0, params, [0, Sx_runtime[22].call(null, args), 0]], - z = Sx_runtime[1].call(null, cst_slice, y), - A = Sx_runtime[5].call(null, z); + A = [0, params, [0, Sx_runtime[24].call(null, args), 0]], + B = Sx_runtime[1].call(null, cst_slice, A), + C = Sx_runtime[5].call(null, B); Stdlib_List[18].call (null, function(p){ var a = Sx_runtime[3].call(null, p); - Sx_runtime[75].call(null, local, a, 0); + Sx_runtime[77].call(null, local, a, 0); return 0; }, - A); + C); } var - jit_result = Sx_runtime[131].call(null, f, args), - B = Sx_runtime[81].call(null, jit_result); - if(Sx_types[49].call(null, B)) + jit_result = Sx_runtime[133].call(null, f, args), + D = Sx_runtime[83].call(null, jit_result); + if(Sx_types[49].call(null, D)) return make_cek_state(Sx_types[53].call(null, f), local, kont); var - and$2 = Sx_runtime[36].call(null, jit_result), - C = + and$2 = Sx_runtime[38].call(null, jit_result), + E = Sx_types[49].call(null, and$2) - ? Sx_runtime[23].call(null, jit_result, nL) + ? Sx_runtime[25].call(null, jit_result, oK) : and$2; - if(! Sx_types[49].call(null, C)) + if(! Sx_types[49].call(null, E)) return make_cek_value(jit_result, local, kont); var - D = + F = kont_push - (make_vm_resume_frame(Sx_runtime[23].call(null, jit_result, nM), env), + (make_vm_resume_frame(Sx_runtime[25].call(null, jit_result, oL), env), kont); return make_cek_suspended - (Sx_runtime[23].call(null, jit_result, nN), env, D); + (Sx_runtime[25].call(null, jit_result, oM), env, F); } - var nR = [0, [1, 2.], 0], nS = [1, 1.], nT = [0, [1, 2.], 0]; + var oQ = [0, [1, 2.], 0], oR = [1, 1.], oS = [0, [1, 2.], 0]; function sf_case_step_loop(match_val, clauses$1, env, kont){ var clauses = clauses$1; for(;;){ var - a = [0, Sx_runtime[22].call(null, clauses), nR], - b = Sx_runtime[1].call(null, cst$5, a); + a = [0, Sx_runtime[24].call(null, clauses), oQ], + b = Sx_runtime[1].call(null, cst$2, a); if(Sx_types[49].call(null, b)) return make_cek_value(0, env, kont); var - test = Sx_runtime[12].call(null, clauses), - body = Sx_runtime[15].call(null, clauses, nS), + test = Sx_runtime[14].call(null, clauses), + body = Sx_runtime[17].call(null, clauses, oR), c = is_else_clause(test); if(Sx_types[49].call(null, c)) return make_cek_state(body, env, kont); var test_val = trampoline(eval_expr(test, env)), d = Sx_runtime[1].call(null, cst, [0, match_val, [0, test_val, 0]]); if(Sx_types[49].call(null, d)) return make_cek_state(body, env, kont); - var clauses$0 = Sx_runtime[1].call(null, cst_slice, [0, clauses, nT]); + var clauses$0 = Sx_runtime[1].call(null, cst_slice, [0, clauses, oS]); clauses = clauses$0; } } - var nU = [5, 0]; + var oT = [5, 0]; function eval_expr_cek(expr, env){ - return cek_run(make_cek_state(expr, env, nU)); + return cek_run(make_cek_state(expr, env, oT)); } function trampoline_cek(val){ - var a = Sx_runtime[82].call(null, val); + var a = Sx_runtime[84].call(null, val); if(! Sx_types[49].call(null, a)) return val; var b = Sx_types[71].call(null, val); return eval_expr_cek(Sx_types[70].call(null, val), b); } - var nV = [5, 0]; + var oU = [5, 0]; function eval_expr(expr, env){ - return cek_run(make_cek_state(expr, env, nV)); + return cek_run(make_cek_state(expr, env, oU)); } caml_update_dummy (custom_special_forms, [6, Stdlib_Hashtbl[1].call(null, 0, 0)]); @@ -40106,10 +50764,17 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg caml_update_dummy(provide_batch_depth_ref, [0, [1, 0.]]); caml_update_dummy(provide_batch_queue_ref, [0, [5, 0]]); caml_update_dummy - (provide_subscribers_ref, [0, [6, Stdlib_Hashtbl[1].call(null, 0, 8)]]); + (provide_subscribers_ref, [0, [6, Stdlib_Hashtbl[1].call(null, 0, 0)]]); + var provide_subscribers = []; + caml_update_dummy + (provide_subscribers, [6, Stdlib_Hashtbl[1].call(null, 0, 0)]); caml_update_dummy (library_registry, [6, Stdlib_Hashtbl[1].call(null, 0, 0)]); caml_update_dummy(io_registry, [6, Stdlib_Hashtbl[1].call(null, 0, 0)]); + caml_update_dummy + (foreign_registry, [6, Stdlib_Hashtbl[1].call(null, 0, 0)]); + caml_update_dummy(strict_ref, [0, [0, 0]]); + caml_update_dummy(prim_param_types_ref, [0, 0]); trampoline_fn[1] = function(v){ if(typeof v !== "number" && 11 === v[0]){ @@ -40190,7 +50855,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(e){ var match$1 = Stdlib_Hashtbl[7].call(null, d, cst_name), - cst = cst$1; + cst = cst$3; if(match$1){ var match$2 = match$1[1]; if(typeof match$2 === "number" || ! (2 === match$2[0])) @@ -40222,7 +50887,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(f[1] === cst_comp_trace){ var match$5 = f[3]; if(typeof match$5 === "number" || ! (2 === match$5[0])) - var name$0 = cst$1; + var name$0 = cst$3; else var s$2 = match$5[1], name$0 = s$2; var match$6 = f[2]; @@ -40259,14 +50924,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg name = param[1], prefix = 0 === i ? " in " : " called from "; if(file === cst$16){ - var a = Stdlib[28].call(null, cst$12, name); + var a = Stdlib[28].call(null, cst$13, name); return Stdlib[28].call(null, prefix, a); } var - b = Stdlib[28].call(null, file, cst$3), - c = Stdlib[28].call(null, cst$4, b), + b = Stdlib[28].call(null, file, cst$5), + c = Stdlib[28].call(null, cst$6, b), d = Stdlib[28].call(null, name, c), - e = Stdlib[28].call(null, cst$12, d); + e = Stdlib[28].call(null, cst$13, d); return Stdlib[28].call(null, prefix, e); }, trace), @@ -40280,14 +50945,11 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = format_comp_trace(trace); return Stdlib[28].call(null, msg, a); } - Sx_types[7][1] = cek_call; runtime.caml_register_global - (1515, + (1611, [0, trampoline_fn, trampoline, - strict_ref, - prim_param_types_ref, last_error_kont_ref, protocol_registry, make_cek_state, @@ -40306,6 +50968,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg make_begin_frame, make_let_frame, make_define_frame, + make_define_foreign_frame, make_set_frame, make_arg_frame, make_call_frame, @@ -40374,6 +51037,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg provide_batch_queue_ref, [5, 0], provide_subscribers_ref, + provide_subscribers, library_registry, library_name_key, library_loaded_p, @@ -40384,10 +51048,26 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg io_registered_p, io_lookup, io_names, + foreign_registry, + foreign_register_b, + foreign_registered_p, + foreign_lookup, + foreign_names, + foreign_parse_params, + foreign_parse_kwargs_b, + foreign_resolve_binding, + foreign_check_args, + foreign_build_lambda, + sf_define_foreign, + step_sf_define_foreign, + foreign_dispatch, + foreign_parse_params_loop, step_sf_io, - strict, + strict_ref, + [0, 0], set_strict_b, - prim_param_types, + prim_param_types_ref, + 0, set_prim_param_types_b, value_matches_type_p, strict_check_args, @@ -40508,7 +51188,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); -//# 15782 "../lib/.sx.objs/jsoo/default/sx.cma.js" +//# 16570 "../lib/.sx.objs/jsoo/default/sx.cma.js" //# shape: Sx_vm:[N,N,N,F(1)*,N,F(1)*,F(2),F(1),F(1),F(1),F(1),F(1),F(1)*,F(2),N,N,N,N,N,F(1),F(1),F(3),F(1),F(6),F(3),F(3),F(2),F(3),F(1),F(2),F(2),F(2),F(2),F(1),F(1)*,F(2),F(1)] (function (globalThis){ @@ -40856,7 +51536,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg globals); var result = - Sx_ref[215].call + Sx_ref[231].call (null, [5, [0, i, [0, [5, [0, h, [0, fn_expr, 0]]], 0]]], [19, compile_env]); @@ -40913,17 +51593,17 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = [0, args, 0]; var b = [19, Sx_types[13].call(null, 0)], - state = Sx_ref[211].call(null, f, [5, a], b, [5, a], j), - final = Sx_ref[131].call(null, state), - match = Sx_runtime[10].call(null, final, k); + state = Sx_ref[227].call(null, f, [5, a], b, [5, a], j), + final = Sx_ref[147].call(null, state), + match = Sx_runtime[12].call(null, final, k); if (typeof match !== "number" && 2 === match[0] && match[1] === cst_io_suspended){ vm[5] = [0, final]; throw caml_maybe_attach_backtrace - ([0, VmSuspended, Sx_runtime[10].call(null, final, l), vm], 1); + ([0, VmSuspended, Sx_runtime[12].call(null, final, l), vm], 1); } - return Sx_ref[17].call(null, final); + return Sx_ref[15].call(null, final); } var active_vm = [0, 0]; function call_closure(cl, args, globals){ @@ -41948,7 +52628,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg case 8: case 9: case 23: - var result$1 = Sx_ref[196].call(null, fn_val, [5, args$2]); + var result$1 = Sx_ref[212].call(null, fn_val, [5, args$2]); break b; } var result$1 = 0; @@ -42042,16 +52722,16 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var cek_state = match[1]; vm[5] = 0; var - final = Sx_ref[133].call(null, cek_state, result), - match$0 = Sx_runtime[10].call(null, final, y); + final = Sx_ref[149].call(null, cek_state, result), + match$0 = Sx_runtime[12].call(null, final, y); if (typeof match$0 !== "number" && 2 === match$0[0] && match$0[1] === cst_io_suspended){ vm[5] = [0, final]; throw caml_maybe_attach_backtrace - ([0, VmSuspended, Sx_runtime[10].call(null, final, z), vm], 1); + ([0, VmSuspended, Sx_runtime[12].call(null, final, z), vm], 1); } - push(vm, Sx_ref[17].call(null, final)); + push(vm, Sx_ref[15].call(null, final)); } else push(vm, result); @@ -42163,7 +52843,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg effective_globals); var result = - Sx_ref[215].call + Sx_ref[231].call (null, [5, [0, E, [0, [5, [0, D, [0, fn_expr, 0]]], 0]]], [19, compile_env]); @@ -42387,7 +53067,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg quoted = [5, [0, L, [0, expr, 0]]], R = [19, Sx_types[13].call(null, 0)], code_val = - Sx_ref[215].call(null, [5, [0, compile_fn, [0, quoted, 0]]], R), + Sx_ref[231].call(null, [5, [0, compile_fn, [0, quoted, 0]]], R), code = code_from_value(code_val), cl = [0, code, [0], M, globals, 0], vm = create(globals), @@ -43178,7 +53858,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); -//# 18453 "../lib/.sx.objs/jsoo/default/sx.cma.js" +//# 19241 "../lib/.sx.objs/jsoo/default/sx.cma.js" //# shape: Sx_vm_ref:[F(2),F(2),F(1),F(1)*,N,F(2),F(1),F(1),F(1),F(1)*,F(1)*,F(2),F(1)*,F(1)*,F(2)*,F(4),F(5),F(2),F(1),F(2),F(1),F(1),F(1),F(1),F(1),F(3),F(4),F(2),F(3),F(1),F(2),F(1),F(1),F(1),F(1),F(1)*,F(1),F(1),F(1),F(1),F(2),F(1),F(2)*,F(1),F(2),F(1),F(3),F(4),F(3),F(1)*,F(3),N,F(1)*,F(1)*,F(1)*,F(2),F(1)*,F(3),F(2),F(3),N,N,N,F(3),F(3),F(2),F(2),F(2),F(3),F(2),F(3),F(1),F(5),F(2),F(2),F(1),F(3),F(1),N,N,F(1)*] (function (globalThis){ @@ -43209,12 +53889,12 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Sx_ref = global_data.Sx_ref, Stdlib_Array = global_data.Stdlib__Array, Stdlib = global_data.Stdlib, - cek_call = Sx_ref[196], - eval_expr = Sx_ref[215]; + cek_call = Sx_ref[212], + eval_expr = Sx_ref[231]; function trampoline(v){ if(typeof v !== "number" && 11 === v[0]){ var env = v[2], expr = v[1]; - return Sx_ref[215].call(null, expr, [19, env]); + return Sx_ref[231].call(null, expr, [19, env]); } return v; } @@ -43422,11 +54102,11 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return 0; } var a = [2, cst_vc_bytecode]; - function code_bytecode(code){return Sx_runtime[10].call(null, code, a);} + function code_bytecode(code){return Sx_runtime[12].call(null, code, a);} var b = [2, cst_vc_constants]; - function code_constants(code){return Sx_runtime[10].call(null, code, b);} + function code_constants(code){return Sx_runtime[12].call(null, code, b);} var c = [2, cst_vc_locals]; - function code_locals(code){return Sx_runtime[10].call(null, code, c);} + function code_locals(code){return Sx_runtime[12].call(null, code, c);} function vm_sp(v){var m = unwrap_vm(v); return [1, m[2]];} function vm_set_sp_b(v, s){ var m = unwrap_vm(v); @@ -43647,9 +54327,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var a = to_ocaml_list(args), b = [19, Sx_types[13].call(null, 0)], - state = Sx_ref[211].call(null, f, [5, a], b, [5, a], h), - final = Sx_ref[131].call(null, state), - match = Sx_runtime[10].call(null, final, i); + state = Sx_ref[227].call(null, f, [5, a], b, [5, a], h), + final = Sx_ref[147].call(null, state), + match = Sx_runtime[12].call(null, final, i); if (typeof match !== "number" && 2 === match[0] && match[1] === "io-suspended"){ @@ -43657,10 +54337,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg m[5] = [0, final]; var c = Sx_vm[6].call(null, m[4]), - d = Sx_runtime[10].call(null, final, j); + d = Sx_runtime[12].call(null, final, j); throw caml_maybe_attach_backtrace([0, Sx_vm[1], d, c], 1); } - return Sx_ref[17].call(null, final); + return Sx_ref[15].call(null, final); } function env_walk(env, name){ if(typeof env === "number") return 0; @@ -43826,21 +54506,21 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var b = is_lambda(f); if(Sx_types[49].call(null, b)) return try_jit_call(vm, f, args); var - c = [0, Sx_runtime[71].call(null, f), k], + c = [0, Sx_runtime[73].call(null, f), k], or = Sx_runtime[1].call(null, cst, c); if(Sx_types[49].call(null, or)) var or$0 = or; else var - i = [0, Sx_runtime[71].call(null, f), m], + i = [0, Sx_runtime[73].call(null, f), m], or$0 = Sx_runtime[1].call(null, cst, i); if(Sx_types[49].call(null, or$0)) return vm_push(vm, cek_call_or_suspend(vm, f, args)); - var d = Sx_runtime[88].call(null, f); + var d = Sx_runtime[90].call(null, f); if(Sx_types[49].call(null, d)) return vm_push(vm, Sx_runtime[7].call(null, f, args)); var - e = [0, l, [0, Sx_runtime[71].call(null, f), 0]], + e = [0, l, [0, Sx_runtime[73].call(null, f), 0]], g = [2, Sx_runtime[4].call(null, e)], h = Sx_runtime[2].call(null, g); throw caml_maybe_attach_backtrace([0, Sx_types[8], h], 1); @@ -44039,25 +54719,25 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg for(;;){ var a = vm_frames(vm), - b = Sx_runtime[31].call(null, a), + b = Sx_runtime[33].call(null, a), c = [0, 1 - Sx_types[49].call(null, b)]; if(! Sx_types[49].call(null, c)) return 0; var d = vm_frames(vm), - frame = Sx_runtime[12].call(null, d), + frame = Sx_runtime[14].call(null, d), e = vm_frames(vm), - rest_frames = Sx_runtime[13].call(null, e), + rest_frames = Sx_runtime[15].call(null, e), bc = code_bytecode(closure_code(frame_closure(frame))), consts = code_constants(closure_code(frame_closure(frame))), - f = [0, Sx_runtime[22].call(null, bc), 0], + f = [0, Sx_runtime[24].call(null, bc), 0], g = [0, frame_ip(frame), f], h = Sx_runtime[1].call(null, ">=", g); if(Sx_types[49].call(null, h)) return vm_set_frames_b(vm, v); vm_step(vm, frame, rest_frames, bc, consts); var i = vm_globals_ref(vm), - j = Sx_runtime[23].call(null, i, w), - k = Sx_runtime[81].call(null, j); + j = Sx_runtime[25].call(null, i, w), + k = Sx_runtime[83].call(null, j); if(! Sx_types[49].call(null, k)) return 0; } } @@ -44114,7 +54794,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg c = Sx_runtime[1].call(null, cst, [0, op, x]); if(Sx_types[49].call(null, c)){ var idx = frame_read_u16(frame); - return vm_push(vm, Sx_runtime[15].call(null, consts, idx)); + return vm_push(vm, Sx_runtime[17].call(null, consts, idx)); } var e = Sx_runtime[1].call(null, cst, [0, op, y]); if(Sx_types[49].call(null, e)) return vm_push(vm, 0); @@ -44150,14 +54830,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(Sx_types[49].call(null, p)){ var idx$2 = frame_read_u16(frame), - name = Sx_runtime[15].call(null, consts, idx$2); + name = Sx_runtime[17].call(null, consts, idx$2); return vm_push(vm, vm_global_get(vm, frame, name)); } var q = Sx_runtime[1].call(null, cst, [0, op, K]); if(Sx_types[49].call(null, q)){ var idx$3 = frame_read_u16(frame), - name$0 = Sx_runtime[15].call(null, consts, idx$3); + name$0 = Sx_runtime[17].call(null, consts, idx$3); return vm_global_set(vm, frame, name$0, vm_peek(vm)); } var r = Sx_runtime[1].call(null, cst, [0, op, L]), cst$0 = "+"; @@ -44213,7 +54893,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(Sx_types[49].call(null, au)){ var idx$4 = frame_read_u16(frame), - code_val = Sx_runtime[15].call(null, consts, idx$4), + code_val = Sx_runtime[17].call(null, consts, idx$4), cl = vm_create_closure(vm, frame, code_val); return vm_push(vm, cl); } @@ -44222,7 +54902,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var idx$5 = frame_read_u16(frame), argc$1 = frame_read_u8(frame), - name$1 = Sx_runtime[15].call(null, consts, idx$5), + name$1 = Sx_runtime[17].call(null, consts, idx$5), args$1 = collect_n_from_stack(vm, argc$1); return vm_push(vm, call_primitive(name$1, args$1)); } @@ -44249,10 +54929,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(Sx_types[49].call(null, az)){ var idx$6 = frame_read_u16(frame), - name$2 = Sx_runtime[15].call(null, consts, idx$6), + name$2 = Sx_runtime[17].call(null, consts, idx$6), aA = vm_peek(vm), aB = vm_globals_ref(vm); - return Sx_runtime[9].call(null, aB, name$2, aA); + return Sx_runtime[11].call(null, aB, name$2, aA); } var aC = Sx_runtime[1].call(null, cst, [0, op, X]); if(Sx_types[49].call(null, aC)){ @@ -44298,27 +54978,27 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var aL = Sx_runtime[1].call(null, cst, [0, op, ad]); if(Sx_types[49].call(null, aL)){ var aM = vm_pop(vm); - return vm_push(vm, Sx_runtime[22].call(null, aM)); + return vm_push(vm, Sx_runtime[24].call(null, aM)); } var aN = Sx_runtime[1].call(null, cst, [0, op, ae]); if(Sx_types[49].call(null, aN)){ var aO = vm_pop(vm); - return vm_push(vm, Sx_runtime[12].call(null, aO)); + return vm_push(vm, Sx_runtime[14].call(null, aO)); } var aP = Sx_runtime[1].call(null, cst, [0, op, af]); if(Sx_types[49].call(null, aP)){ var aQ = vm_pop(vm); - return vm_push(vm, Sx_runtime[13].call(null, aQ)); + return vm_push(vm, Sx_runtime[15].call(null, aQ)); } var aR = Sx_runtime[1].call(null, cst, [0, op, ag]); if(Sx_types[49].call(null, aR)){ var n = vm_pop(vm), coll = vm_pop(vm); - return vm_push(vm, Sx_runtime[15].call(null, coll, n)); + return vm_push(vm, Sx_runtime[17].call(null, coll, n)); } var aS = Sx_runtime[1].call(null, cst, [0, op, ah]); if(Sx_types[49].call(null, aS)){ var coll$0 = vm_pop(vm), x$0 = vm_pop(vm); - return vm_push(vm, Sx_runtime[16].call(null, x$0, coll$0)); + return vm_push(vm, Sx_runtime[18].call(null, x$0, coll$0)); } var aT = Sx_runtime[1].call(null, cst, [0, op, ai]); if(Sx_types[49].call(null, aT)){ @@ -44338,7 +55018,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var aZ = Sx_runtime[1].call(null, cst, [0, op, am]); if(Sx_types[49].call(null, aZ)){ var request = vm_pop(vm), a0 = vm_globals_ref(vm); - return Sx_runtime[9].call(null, a0, an, request); + return Sx_runtime[11].call(null, a0, an, request); } var a1 = [2, Sx_runtime[4].call(null, [0, ao, [0, op, 0]])], @@ -44501,7 +55181,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg } (globalThis)); -//# 19777 "../lib/.sx.objs/jsoo/default/sx.cma.js" +//# 20565 "../lib/.sx.objs/jsoo/default/sx.cma.js" //# shape: Sx_render:[F(2),F(1),F(1)*,F(1)*,F(2),F(1),F(2),F(2),F(1),F(1),F(1),F(1),F(1),N,N,N,F(2),F(2),F(3),F(2),F(1),F(3),F(2),F(1)*,N,F(1),N,N,N,N,N,N,N,N,F(1),F(1),F(1),F(1),F(1),N,F(1),N,N,F(1),F(2),F(2),F(2),F(2),F(2),F(1),F(2),F(2),F(2),F(1),F(2),F(3),F(3),F(3),F(3),F(2),F(2),F(3),F(3),F(2),F(2),F(3),F(1),F(1),F(1),F(1)] (function (globalThis){ @@ -44779,8 +55459,8 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_Buffer = global_data.Stdlib__Buffer, Stdlib_String = global_data.Stdlib__String, Stdlib_Printexc = global_data.Stdlib__Printexc; - function eval_expr(expr, env){return Sx_ref[215].call(null, expr, env);} - var cond_scheme_p = Sx_ref[112], cst$6 = "", a = [2, cst$6]; + function eval_expr(expr, env){return Sx_ref[231].call(null, expr, env);} + var cond_scheme_p = Sx_ref[128], cst$6 = "", a = [2, cst$6]; function raw_html_content(v){ if(typeof v !== "number" && 16 === v[0]){var s = v[1]; return [2, s];} return a; @@ -44826,11 +55506,11 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function render_html_island(comp, args, env){ return caml_call3(render_html_island_ref[1], comp, args, env); } - var cek_call = Sx_ref[196]; + var cek_call = Sx_ref[212]; function trampoline(v){ if(typeof v !== "number" && 11 === v[0]){ var env = v[2], expr = v[1]; - return Sx_ref[215].call(null, expr, [19, env]); + return Sx_ref[231].call(null, expr, [19, env]); } return v; } @@ -44849,7 +55529,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var args = 0; } var - local = Sx_runtime[78].call(null, [19, mac[4]]), + local = Sx_runtime[80].call(null, [19, mac[4]]), ps$0 = Stdlib_List[20].call(null, function(p){return [2, p];}, mac[1]); a: { @@ -44859,23 +55539,23 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var match = mac[2]; if(! match) break a; var rp = match[1]; - Sx_runtime[75].call(null, local, [2, rp], [5, as]); + Sx_runtime[77].call(null, local, [2, rp], [5, as]); break a; } var ps_rest = ps[2], p = ps[1]; if(! as) break; var as_rest = as[2], a = as[1]; - Sx_runtime[75].call(null, local, p, a); + Sx_runtime[77].call(null, local, p, a); ps = ps_rest; as = as_rest; } var b = Stdlib_List[10].call(null, ps); Stdlib_List[18].call (null, - function(p){Sx_runtime[75].call(null, local, p, 0); return 0;}, + function(p){Sx_runtime[77].call(null, local, p, 0); return 0;}, b); } - return Sx_ref[215].call(null, mac[3], local); + return Sx_ref[231].call(null, mac[3], local); } return 0; } @@ -45048,10 +55728,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg Stdlib_List[26].call (null, function(state, arg){ - var skip = Sx_runtime[23].call(null, state, s); + var skip = Sx_runtime[25].call(null, state, s); if(Sx_types[49].call(null, skip)){ var - b = [0, Sx_runtime[23].call(null, state, t), 0], + b = [0, Sx_runtime[25].call(null, state, t), 0], c = [0, state, @@ -45061,25 +55741,25 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return Sx_runtime[1].call(null, cst_assoc, c); } var - d = [0, Sx_runtime[71].call(null, arg), x], + d = [0, Sx_runtime[73].call(null, arg), x], and = Sx_runtime[1].call(null, cst, d); if(Sx_types[49].call(null, and)) var - e = [0, Sx_runtime[22].call(null, args), 0], - f = [0, Sx_runtime[23].call(null, state, y), 0], + e = [0, Sx_runtime[24].call(null, args), 0], + f = [0, Sx_runtime[25].call(null, state, y), 0], g = [0, Sx_runtime[1].call(null, cst_inc, f), e], a = Sx_runtime[1].call(null, cst$0, g); else var a = and; if(Sx_types[49].call(null, a)){ var - h = [0, Sx_runtime[23].call(null, state, z), 0], + h = [0, Sx_runtime[25].call(null, state, z), 0], i = Sx_runtime[1].call(null, cst_inc, h), - val = trampoline(eval_expr(Sx_runtime[15].call(null, args, i), env)), + val = trampoline(eval_expr(Sx_runtime[17].call(null, args, i), env)), j = Sx_types[51].call(null, arg); - Sx_runtime[9].call(null, attrs, j, val); + Sx_runtime[11].call(null, attrs, j, val); var - k = [0, Sx_runtime[23].call(null, state, A), 0], + k = [0, Sx_runtime[25].call(null, state, A), 0], l = [0, state, @@ -45088,9 +55768,9 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg [0, C, [0, B, [0, Sx_runtime[1].call(null, cst_inc, k), 0]]]]]; return Sx_runtime[1].call(null, cst_assoc, l); } - children[1] = Sx_runtime[8].call(null, children[1], arg); + children[1] = Sx_runtime[10].call(null, children[1], arg); var - m = [0, Sx_runtime[23].call(null, state, E), 0], + m = [0, Sx_runtime[25].call(null, state, E), 0], n = [0, state, [0, F, [0, Sx_runtime[1].call(null, cst_inc, m), 0]]]; return Sx_runtime[1].call(null, cst_assoc, n); }, @@ -45108,17 +55788,17 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function eval_cond_scheme(clauses$1, env){ var clauses = clauses$1; for(;;){ - var a = Sx_runtime[31].call(null, clauses); + var a = Sx_runtime[33].call(null, clauses); if(Sx_types[49].call(null, a)) return 0; var - clause = Sx_runtime[12].call(null, clauses), - test = Sx_runtime[12].call(null, clause), - body = Sx_runtime[15].call(null, clause, G), - b = Sx_runtime[110].call(null, test); + clause = Sx_runtime[14].call(null, clauses), + test = Sx_runtime[14].call(null, clause), + body = Sx_runtime[17].call(null, clause, G), + b = Sx_runtime[112].call(null, test); if(Sx_types[49].call(null, b)) return body; var c = trampoline(eval_expr(test, env)); if(Sx_types[49].call(null, c)) return body; - var clauses$0 = Sx_runtime[13].call(null, clauses); + var clauses$0 = Sx_runtime[15].call(null, clauses); clauses = clauses$0; } } @@ -45131,13 +55811,13 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg var clauses = clauses$1; for(;;){ var - a = [0, Sx_runtime[22].call(null, clauses), H], + a = [0, Sx_runtime[24].call(null, clauses), H], b = Sx_runtime[1].call(null, cst$0, a); if(Sx_types[49].call(null, b)) return 0; var - test = Sx_runtime[12].call(null, clauses), - body = Sx_runtime[15].call(null, clauses, I), - c = Sx_runtime[110].call(null, test); + test = Sx_runtime[14].call(null, clauses), + body = Sx_runtime[17].call(null, clauses, I), + c = Sx_runtime[112].call(null, test); if(Sx_types[49].call(null, c)) return body; var d = trampoline(eval_expr(test, env)); if(Sx_types[49].call(null, d)) return body; @@ -45155,37 +55835,37 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg N = [1, 1.]; function process_bindings(bindings, env){ var - local = Sx_runtime[78].call(null, env), + local = Sx_runtime[80].call(null, env), a = Sx_runtime[5].call(null, bindings); Stdlib_List[18].call (null, function(pair){ var - b = [0, Sx_runtime[71].call(null, pair), K], + b = [0, Sx_runtime[73].call(null, pair), K], and = Sx_runtime[1].call(null, cst, b); if(Sx_types[49].call(null, and)) var - c = [0, Sx_runtime[22].call(null, pair), L], + c = [0, Sx_runtime[24].call(null, pair), L], a = Sx_runtime[1].call(null, cst$1, c); else var a = and; if(Sx_types[49].call(null, a)){ var - d = Sx_runtime[12].call(null, pair), - e = [0, Sx_runtime[71].call(null, d), M], + d = Sx_runtime[14].call(null, pair), + e = [0, Sx_runtime[73].call(null, d), M], f = Sx_runtime[1].call(null, cst, e); if(Sx_types[49].call(null, f)) var - g = Sx_runtime[12].call(null, pair), + g = Sx_runtime[14].call(null, pair), name = Sx_types[50].call(null, g); else var - j = [0, Sx_runtime[12].call(null, pair), 0], + j = [0, Sx_runtime[14].call(null, pair), 0], name = [2, Sx_runtime[4].call(null, j)]; var - h = trampoline(eval_expr(Sx_runtime[15].call(null, pair, N), local)), + h = trampoline(eval_expr(Sx_runtime[17].call(null, pair, N), local)), i = Sx_runtime[3].call(null, name); - Sx_runtime[75].call(null, local, i, h); + Sx_runtime[77].call(null, local, i, h); } return 0; }, @@ -45214,14 +55894,14 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg _ = [1, 1.]; function is_render_expr_p(expr){ var - a = [0, Sx_runtime[71].call(null, expr), O], + a = [0, Sx_runtime[73].call(null, expr), O], b = Sx_runtime[1].call(null, cst, a), or = [0, 1 - Sx_types[49].call(null, b)], - or$0 = Sx_types[49].call(null, or) ? or : Sx_runtime[31].call(null, expr); + or$0 = Sx_types[49].call(null, or) ? or : Sx_runtime[33].call(null, expr); if(Sx_types[49].call(null, or$0)) return P; var - h = Sx_runtime[12].call(null, expr), - c = [0, Sx_runtime[71].call(null, h), Q], + h = Sx_runtime[14].call(null, expr), + c = [0, Sx_runtime[73].call(null, h), Q], d = Sx_runtime[1].call(null, cst, c), e = [0, 1 - Sx_types[49].call(null, d)]; if(Sx_types[49].call(null, e)) return R; @@ -45244,12 +55924,12 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg and = Sx_runtime[1].call(null, cst$5, f); if(! Sx_types[49].call(null, and)) return and; var - g = [0, Sx_runtime[22].call(null, expr), Y], + g = [0, Sx_runtime[24].call(null, expr), Y], and$0 = Sx_runtime[1].call(null, cst$5, g); if(! Sx_types[49].call(null, and$0)) return and$0; var - i = Sx_runtime[15].call(null, expr, _), - j = [0, Sx_runtime[71].call(null, i), Z]; + i = Sx_runtime[17].call(null, expr, _), + j = [0, Sx_runtime[73].call(null, i), Z]; return Sx_runtime[1].call(null, cst, j); } var @@ -45288,7 +55968,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg ? [2, Sx_runtime[4].call(null, [0, existing, [0, ac, [0, val, 0]]])] : val; - Sx_runtime[9].call(null, target, ad, e); + Sx_runtime[11].call(null, target, ad, e); } else{ var f = Sx_runtime[1].call(null, cst, [0, key, ae]); @@ -45306,10 +55986,10 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg ? [2, Sx_runtime[4].call(null, [0, existing$0, [0, ah, [0, val, 0]]])] : val; - Sx_runtime[9].call(null, target, ai, h); + Sx_runtime[11].call(null, target, ai, h); } else - Sx_runtime[9].call(null, target, key, val); + Sx_runtime[11].call(null, target, key, val); } return 0; }, @@ -45346,7 +56026,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg function render_to_html$0(counter, expr$1, env$1){ var expr = expr$1, env = env$1; for(;;){ - var match_val = Sx_runtime[71].call(null, expr); + var match_val = Sx_runtime[73].call(null, expr); if(caml_equal(match_val, aj)) return ak; if(caml_equal(match_val, al)) return escape_html_val(expr); if(caml_equal(match_val, am)) @@ -45354,7 +56034,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg if(caml_equal(match_val, an)) return Sx_types[49].call(null, expr) ? ao : ap; if(caml_equal(match_val, aq)){ - var c = Sx_runtime[31].call(null, expr); + var c = Sx_runtime[33].call(null, expr); return Sx_types[49].call(null, c) ? ar : counter @@ -45373,7 +56053,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg return escape_html_val(Sx_types[51].call(null, expr)); if(caml_equal(match_val, au)) return raw_html_content(expr); if(caml_equal(match_val, av)){ - scope_emit(aw, Sx_runtime[68].call(null, expr)); + scope_emit(aw, Sx_runtime[70].call(null, expr)); return ax; } if(! caml_equal(match_val, ay)){ @@ -45407,7 +56087,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg aK = [2, cst$6], aL = [2, cst_thunk]; function render_value_to_html$0(counter, val, env){ - var match_val = Sx_runtime[71].call(null, val); + var match_val = Sx_runtime[73].call(null, val); if(caml_equal(match_val, az)) return aA; if(caml_equal(match_val, aB)) return escape_html_val(val); if(caml_equal(match_val, aC)) @@ -45420,7 +56100,7 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg : caml_trampoline_return(render_list_to_html$0, [0, val, env]); if(caml_equal(match_val, aH)) return raw_html_content(val); if(caml_equal(match_val, aI)){ - scope_emit(aJ, Sx_runtime[68].call(null, val)); + scope_emit(aJ, Sx_runtime[70].call(null, val)); return aK; } if(! caml_equal(match_val, aL)) @@ -45472,11 +56152,11 @@ a8=102,b8=114,b9="Stdlib__Type",eH="Stdlib__Buffer",df="Js_of_ocaml__Dom_svg",dg ba = [2, "