diff --git a/shared/static/wasm/sx/engine.sx b/shared/static/wasm/sx/engine.sx index 254dff7b..3e0c5e70 100644 --- a/shared/static/wasm/sx/engine.sx +++ b/shared/static/wasm/sx/engine.sx @@ -72,12 +72,12 @@ (fn ((tag-name :as string)) (cond - (= tag-name "FORM") + (= tag-name "form") (list (dict "event" "submit" "modifiers" (dict))) (or - (= tag-name "INPUT") - (= tag-name "SELECT") - (= tag-name "TEXTAREA")) + (= tag-name "input") + (= tag-name "select") + (= tag-name "textarea")) (list (dict "event" "change" "modifiers" (dict))) :else (list (dict "event" "click" "modifiers" (dict)))))) diff --git a/shared/static/wasm/sx/engine.sxbc b/shared/static/wasm/sx/engine.sxbc index 4336e022..1a9a11a6 100644 --- a/shared/static/wasm/sx/engine.sxbc +++ b/shared/static/wasm/sx/engine.sxbc @@ -1,3 +1,3 @@ -(sxbc 1 "654d2cb1ea807340" +(sxbc 1 "16c32e3b0a74e9f6" (code - :constants ("ENGINE_VERBS" "list" "get" "post" "put" "delete" "patch" "DEFAULT_SWAP" "outerHTML" "parse-time" {:upvalue-count 0 :arity 1 :constants ("nil?" 0 "ends-with?" "ms" "parse-int" "s" "*" "replace" "" 1000) :bytecode (16 0 52 0 0 1 33 6 0 1 1 0 32 74 0 16 0 1 3 0 52 2 0 2 33 12 0 16 0 1 1 0 52 4 0 2 32 50 0 16 0 1 5 0 52 2 0 2 33 29 0 16 0 1 5 0 1 8 0 52 7 0 3 1 1 0 52 4 0 2 1 9 0 52 6 0 2 32 9 0 16 0 1 1 0 52 4 0 2 50)} "parse-trigger-spec" {:upvalue-count 0 :arity 1 :constants ("nil?" "split" "," "filter" {:upvalue-count 0 :arity 1 :constants ("not" "nil?") :bytecode (16 0 52 1 0 1 52 0 0 1 50)} "map" {:upvalue-count 0 :arity 1 :constants ("split" "trim" " " "empty?" "=" "first" "every" ">=" "len" 2 "dict" "event" "modifiers" "interval" "parse-time" "nth" 1 "for-each" {:upvalue-count 1 :arity 1 :constants ("=" "once" "dict-set!" "changed" "starts-with?" "delay:" "delay" "parse-time" "slice" 6 "from:" "from" 5) :bytecode (16 0 1 1 0 52 0 0 2 33 13 0 18 0 1 1 0 3 52 2 0 3 32 97 0 16 0 1 3 0 52 0 0 2 33 13 0 18 0 1 3 0 3 52 2 0 3 32 72 0 16 0 1 5 0 52 4 0 2 33 26 0 18 0 1 6 0 20 7 0 16 0 1 9 0 52 8 0 2 48 1 52 2 0 3 32 34 0 16 0 1 10 0 52 4 0 2 33 21 0 18 0 1 11 0 16 0 1 12 0 52 8 0 2 52 2 0 3 32 1 0 2 50)} "rest") :bytecode (16 0 52 1 0 1 1 2 0 52 0 0 2 17 1 16 1 52 3 0 1 33 4 0 2 32 111 0 16 1 52 5 0 1 1 6 0 52 4 0 2 6 33 14 0 5 16 1 52 8 0 1 1 9 0 52 7 0 2 33 37 0 1 11 0 1 6 0 1 12 0 1 13 0 20 14 0 16 1 1 16 0 52 15 0 2 48 1 52 10 0 2 52 10 0 4 32 40 0 52 10 0 0 17 2 51 18 0 1 2 16 1 52 19 0 1 52 17 0 2 5 1 11 0 16 1 52 5 0 1 1 12 0 16 2 52 10 0 4 50)}) :bytecode (16 0 52 0 0 1 33 4 0 2 32 27 0 16 0 1 2 0 52 1 0 2 17 1 51 4 0 51 6 0 16 1 52 5 0 2 52 3 0 2 50)} "default-trigger" {:upvalue-count 0 :arity 1 :constants ("=" "FORM" "list" "dict" "event" "submit" "modifiers" "INPUT" "SELECT" "TEXTAREA" "change" "click") :bytecode (16 0 1 1 0 52 0 0 2 33 24 0 1 4 0 1 5 0 1 6 0 52 3 0 0 52 3 0 4 52 2 0 1 32 85 0 16 0 1 7 0 52 0 0 2 6 34 24 0 5 16 0 1 8 0 52 0 0 2 6 34 10 0 5 16 0 1 9 0 52 0 0 2 33 24 0 1 4 0 1 10 0 1 6 0 52 3 0 0 52 3 0 4 52 2 0 1 32 21 0 1 4 0 1 11 0 1 6 0 52 3 0 0 52 3 0 4 52 2 0 1 50)} "get-verb-info" {:upvalue-count 0 :arity 1 :constants ("some" {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "str" "sx-" "dict" "method" "upper" "url") :bytecode (20 0 0 18 0 1 2 0 16 0 52 1 0 2 48 2 17 1 16 1 33 21 0 1 4 0 16 0 52 5 0 1 1 6 0 16 1 52 3 0 4 32 1 0 2 50)} "ENGINE_VERBS") :bytecode (51 1 0 1 0 20 2 0 52 0 0 2 50)} "build-request-headers" {:upvalue-count 0 :arity 3 :constants ("dict" "SX-Request" "true" "SX-Current-URL" "browser-location-href" "dom-get-attr" "sx-target" "dict-set!" "SX-Target" "dom-query" "script[data-components][data-hash]" "data-hash" "SX-Components-Hash" "SX-Css" "sx-headers" "parse-header-value" "for-each" {:upvalue-count 2 :arity 1 :constants ("dict-set!" "str" "get") :bytecode (18 0 16 0 18 1 16 0 52 2 0 2 52 1 0 1 52 0 0 3 50)} "keys") :bytecode (1 1 0 1 2 0 1 3 0 20 4 0 48 0 52 0 0 4 17 3 20 5 0 16 0 1 6 0 48 2 17 4 16 4 33 14 0 16 3 1 8 0 16 4 52 7 0 3 32 1 0 2 5 20 5 0 20 9 0 1 10 0 48 1 1 11 0 48 2 17 4 16 4 33 14 0 16 3 1 12 0 16 4 52 7 0 3 32 1 0 2 5 16 2 33 14 0 16 3 1 13 0 16 2 52 7 0 3 32 1 0 2 5 20 5 0 16 0 1 14 0 48 2 17 4 16 4 33 38 0 20 15 0 16 4 48 1 17 5 16 5 33 20 0 51 17 0 1 3 1 5 16 5 52 18 0 1 52 16 0 2 32 1 0 2 32 1 0 2 5 16 3 50)} "process-response-headers" {:upvalue-count 0 :arity 1 :constants ("dict" "redirect" "SX-Redirect" "refresh" "SX-Refresh" "trigger" "SX-Trigger" "retarget" "SX-Retarget" "reswap" "SX-Reswap" "location" "SX-Location" "replace-url" "SX-Replace-Url" "css-hash" "SX-Css-Hash" "trigger-swap" "SX-Trigger-After-Swap" "trigger-settle" "SX-Trigger-After-Settle" "content-type" "Content-Type" "cache-invalidate" "SX-Cache-Invalidate" "cache-update" "SX-Cache-Update") :bytecode (1 1 0 16 0 1 2 0 48 1 1 3 0 16 0 1 4 0 48 1 1 5 0 16 0 1 6 0 48 1 1 7 0 16 0 1 8 0 48 1 1 9 0 16 0 1 10 0 48 1 1 11 0 16 0 1 12 0 48 1 1 13 0 16 0 1 14 0 48 1 1 15 0 16 0 1 16 0 48 1 1 17 0 16 0 1 18 0 48 1 1 19 0 16 0 1 20 0 48 1 1 21 0 16 0 1 22 0 48 1 1 23 0 16 0 1 24 0 48 1 1 25 0 16 0 1 26 0 48 1 52 0 0 26 50)} "parse-swap-spec" {:upvalue-count 0 :arity 2 :constants ("split" "DEFAULT_SWAP" " " "first" "for-each" {:upvalue-count 1 :arity 1 :constants ("=" "transition:true" "transition:false") :bytecode (16 0 1 1 0 52 0 0 2 33 6 0 3 19 0 32 19 0 16 0 1 2 0 52 0 0 2 33 6 0 4 19 0 32 1 0 2 50)} "rest" "dict" "style" "transition") :bytecode (16 0 6 34 4 0 5 20 1 0 1 2 0 52 0 0 2 17 2 16 2 52 3 0 1 17 3 16 1 17 4 51 5 0 1 4 16 2 52 6 0 1 52 4 0 2 5 1 8 0 16 3 1 9 0 16 4 52 7 0 4 50)} "parse-retry-spec" {:upvalue-count 0 :arity 1 :constants ("nil?" "split" ":" "dict" "strategy" "first" "start-ms" "parse-int" "nth" 1 1000 "cap-ms" 2 30000) :bytecode (16 0 52 0 0 1 33 4 0 2 32 62 0 16 0 1 2 0 52 1 0 2 17 1 1 4 0 16 1 52 5 0 1 1 6 0 16 1 1 9 0 52 8 0 2 1 10 0 52 7 0 2 1 11 0 16 1 1 12 0 52 8 0 2 1 13 0 52 7 0 2 52 3 0 6 50)} "next-retry-ms" {:upvalue-count 0 :arity 2 :constants ("min" "*" 2) :bytecode (16 0 1 2 0 52 1 0 2 16 1 52 0 0 2 50)} "filter-params" {:upvalue-count 0 :arity 2 :constants ("nil?" "=" "none" "list" "*" "starts-with?" "not " "map" "trim" "split" "slice" 4 "," "filter" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "first") :bytecode (18 0 16 0 52 2 0 1 52 1 0 2 52 0 0 1 50)} {:upvalue-count 1 :arity 1 :constants ("contains?" "first") :bytecode (18 0 16 0 52 1 0 1 52 0 0 2 50)}) :bytecode (16 0 52 0 0 1 33 5 0 16 1 32 116 0 16 0 1 2 0 52 1 0 2 33 7 0 52 3 0 0 32 97 0 16 0 1 4 0 52 1 0 2 33 5 0 16 1 32 80 0 16 0 1 6 0 52 5 0 2 33 39 0 20 8 0 16 0 1 11 0 52 10 0 2 1 12 0 52 9 0 2 52 7 0 2 17 2 51 14 0 1 2 16 1 52 13 0 2 32 29 0 20 8 0 16 0 1 12 0 52 9 0 2 52 7 0 2 17 2 51 15 0 1 2 16 1 52 13 0 2 50)} "resolve-target" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-target" "nil?" "=" "this" "closest" "dom-parent" "dom-query") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 52 2 0 1 6 34 10 0 5 16 1 1 4 0 52 3 0 2 33 5 0 16 0 32 29 0 16 1 1 5 0 52 3 0 2 33 10 0 20 6 0 16 0 49 1 32 7 0 20 7 0 16 1 49 1 50)} "apply-optimistic" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-optimistic" "nil?" "resolve-target" "dict" "target" "directive" "=" "remove" "dict-set!" "opacity" "dom-get-style" "dom-set-style" "0" "pointer-events" "none" "disable" "disabled" "dom-get-prop" "dom-set-prop" "starts-with?" "add-class:" "slice" 10 "add-class" "dom-add-class") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 52 2 0 1 33 4 0 2 32 191 0 20 3 0 16 0 48 1 6 34 3 0 5 16 0 17 2 1 5 0 16 2 1 6 0 16 1 52 4 0 4 17 3 16 1 1 8 0 52 7 0 2 33 50 0 16 3 1 10 0 20 11 0 16 2 1 10 0 48 2 52 9 0 3 5 20 12 0 16 2 1 10 0 1 13 0 48 3 5 20 12 0 16 2 1 14 0 1 15 0 48 3 32 94 0 16 1 1 16 0 52 7 0 2 33 34 0 16 3 1 17 0 20 18 0 16 2 1 17 0 48 2 52 9 0 3 5 20 19 0 16 2 1 17 0 3 48 3 32 48 0 16 1 1 21 0 52 20 0 2 33 35 0 16 1 1 23 0 52 22 0 2 17 4 16 3 1 24 0 16 4 52 9 0 3 5 20 25 0 16 2 16 4 48 2 32 1 0 2 5 16 3 50)} "revert-optimistic" {:upvalue-count 0 :arity 1 :constants ("get" "target" "directive" "=" "remove" "dom-set-style" "opacity" "" "pointer-events" "disable" "dom-set-prop" "disabled" "add-class" "dom-remove-class") :bytecode (16 0 33 153 0 16 0 1 1 0 52 0 0 2 17 1 16 0 1 2 0 52 0 0 2 17 2 16 2 1 4 0 52 3 0 2 33 44 0 20 5 0 16 1 1 6 0 16 0 1 6 0 52 0 0 2 6 34 4 0 5 1 7 0 48 3 5 20 5 0 16 1 1 8 0 1 7 0 49 3 32 72 0 16 2 1 9 0 52 3 0 2 33 28 0 20 10 0 16 1 1 11 0 16 0 1 11 0 52 0 0 2 6 34 2 0 5 4 49 3 32 32 0 16 0 1 12 0 52 0 0 2 33 19 0 20 13 0 16 1 16 0 1 12 0 52 0 0 2 49 2 32 1 0 2 32 1 0 2 50)} "find-oob-swaps" {:upvalue-count 0 :arity 1 :constants ("list" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-query-all" "str" "[" "]" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "outerHTML" "dom-id" "dom-remove-attr" "append!" "dict" "element" "swap-type" "target-id") :bytecode (20 0 0 16 0 18 0 48 2 6 34 4 0 5 1 1 0 17 1 20 2 0 16 0 48 1 17 2 20 3 0 16 0 18 0 48 2 5 16 2 33 29 0 20 4 0 18 1 1 6 0 16 0 1 7 0 16 1 1 8 0 16 2 52 5 0 6 49 2 32 1 0 2 50)}) :bytecode (20 0 0 18 0 1 2 0 16 0 1 3 0 52 1 0 3 48 2 17 1 51 5 0 1 0 0 1 16 1 52 4 0 2 50)} "sx-swap-oob" "hx-swap-oob") :bytecode (52 0 0 0 17 1 51 2 0 1 0 1 1 1 3 0 1 4 0 52 0 0 2 52 1 0 2 5 16 1 50)} "morph-node" {:upvalue-count 0 :arity 2 :constants ("dom-has-attr?" "sx-preserve" "sx-ignore" "data-sx-island" "is-processed?" "island-hydrated" "=" "dom-get-attr" "sync-attrs" "morph-island-children" "not" "dom-node-type" "dom-node-name" "dom-replace-child" "dom-parent" "dom-clone" 3 8 "dom-text-content" "dom-set-text-content" 1 "dispose-island" "dispose-islands-in" "dom-is-active-element?" "dom-is-input-element?" "morph-children") :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 11 0 5 20 0 0 16 0 1 2 0 48 2 33 4 0 2 32 148 1 20 0 0 16 0 1 3 0 48 2 6 33 55 0 5 20 4 0 16 0 1 5 0 48 2 6 33 40 0 5 20 0 0 16 1 1 3 0 48 2 6 33 25 0 5 20 7 0 16 0 1 3 0 48 2 20 7 0 16 1 1 3 0 48 2 52 6 0 2 33 22 0 20 8 0 16 0 16 1 48 2 5 20 9 0 16 0 16 1 49 2 32 54 1 20 11 0 16 0 48 1 20 11 0 16 1 48 1 52 6 0 2 52 10 0 1 6 34 23 0 5 20 12 0 16 0 48 1 20 12 0 16 1 48 1 52 6 0 2 52 10 0 1 33 25 0 20 13 0 20 14 0 16 0 48 1 20 15 0 16 1 3 48 2 16 0 49 3 32 233 0 20 11 0 16 0 48 1 1 16 0 52 6 0 2 6 34 15 0 5 20 11 0 16 0 48 1 1 17 0 52 6 0 2 33 46 0 20 18 0 16 0 48 1 20 18 0 16 1 48 1 52 6 0 2 52 10 0 1 33 17 0 20 19 0 16 0 20 18 0 16 1 48 1 49 2 32 1 0 2 32 151 0 20 11 0 16 0 48 1 1 20 0 52 6 0 2 33 133 0 20 0 0 16 0 1 3 0 48 2 6 33 44 0 5 20 0 0 16 1 1 3 0 48 2 6 33 29 0 5 20 7 0 16 0 1 3 0 48 2 20 7 0 16 1 1 3 0 48 2 52 6 0 2 52 10 0 1 33 18 0 20 21 0 16 0 48 1 5 20 22 0 16 0 48 1 32 1 0 2 5 20 8 0 16 0 16 1 48 2 5 20 23 0 16 0 48 1 6 33 8 0 5 20 24 0 16 0 48 1 52 10 0 1 33 12 0 20 25 0 16 0 16 1 49 2 32 1 0 2 32 1 0 2 50)} "sync-attrs" {:upvalue-count 0 :arity 2 :constants ("dom-get-attr" "data-sx-reactive-attrs" "" "empty?" "list" "split" "," "for-each" {:upvalue-count 2 :arity 1 :constants ("first" "nth" 1 "not" "=" "dom-get-attr" "contains?" "dom-set-attr") :bytecode (16 0 52 0 0 1 17 1 16 0 1 2 0 52 1 0 2 17 2 20 5 0 18 0 16 1 48 2 16 2 52 4 0 2 52 3 0 1 6 33 13 0 5 18 1 16 1 52 6 0 2 52 3 0 1 33 14 0 20 7 0 18 0 16 1 16 2 49 3 32 1 0 2 50)} "dom-attr-list" {:upvalue-count 3 :arity 1 :constants ("first" "not" "dom-has-attr?" "contains?" "=" "data-sx-reactive-attrs" "dom-remove-attr") :bytecode (16 0 52 0 0 1 17 1 20 2 0 18 0 16 1 48 2 52 1 0 1 6 33 31 0 5 18 1 16 1 52 3 0 2 52 1 0 1 6 33 14 0 5 16 1 1 5 0 52 4 0 2 52 1 0 1 33 12 0 20 6 0 18 2 16 1 49 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 4 0 5 1 2 0 17 2 16 2 52 3 0 1 33 7 0 52 4 0 0 32 9 0 16 2 1 6 0 52 5 0 2 17 3 51 8 0 1 0 1 3 20 9 0 16 1 48 1 52 7 0 2 5 51 10 0 1 1 1 3 1 0 20 9 0 16 0 48 1 52 7 0 2 50)} "morph-children" {:upvalue-count 0 :arity 2 :constants ("dom-child-list" "dict" 0 "for-each" {:upvalue-count 3 :arity 1 :constants ("dom-id" "not" "empty?" "dict-set!" "inc") :bytecode (20 0 0 16 0 48 1 17 1 16 1 6 33 11 0 5 16 1 52 2 0 1 52 1 0 1 33 24 0 18 0 16 1 16 0 52 3 0 3 5 18 1 16 1 18 2 52 3 0 3 32 1 0 2 5 18 2 52 4 0 1 19 2 50)} {:upvalue-count 6 :arity 1 :constants ("dom-id" "not" "empty?" "dict-get" "nil?" "dict-set!" "str" "<" "len" "=" "nth" "dom-insert-before" "morph-node" "inc" "dom-clone" "dom-append") :bytecode (20 0 0 16 0 48 1 17 1 16 1 6 33 11 0 5 16 1 52 2 0 1 52 1 0 1 33 5 0 16 1 32 1 0 2 17 2 16 2 33 11 0 18 0 16 2 52 3 0 2 32 1 0 2 17 3 16 3 6 33 11 0 5 16 3 52 4 0 1 52 1 0 1 33 133 0 18 1 16 2 52 3 0 2 17 4 16 4 33 16 0 18 2 16 4 52 6 0 1 3 52 5 0 3 32 1 0 2 5 18 3 18 4 52 8 0 1 52 7 0 2 6 33 19 0 5 16 3 18 4 18 3 52 10 0 2 52 9 0 2 52 1 0 1 33 39 0 20 11 0 18 5 16 3 18 3 18 4 52 8 0 1 52 7 0 2 33 11 0 18 4 18 3 52 10 0 2 32 1 0 2 48 3 32 1 0 2 5 20 12 0 16 3 16 0 48 2 5 18 3 52 13 0 1 19 3 32 135 0 18 3 18 4 52 8 0 1 52 7 0 2 33 105 0 18 4 18 3 52 10 0 2 17 4 20 0 0 16 4 48 1 17 5 16 5 6 33 22 0 5 16 5 52 2 0 1 52 1 0 1 6 33 7 0 5 16 2 52 1 0 1 33 20 0 20 11 0 18 5 20 14 0 16 0 3 48 2 16 4 49 3 32 32 0 18 2 18 3 52 6 0 1 3 52 5 0 3 5 20 12 0 16 4 16 0 48 2 5 18 3 52 13 0 1 19 3 32 15 0 20 15 0 18 5 20 14 0 16 0 3 48 2 49 2 50)} {:upvalue-count 3 :arity 1 :constants ("not" "dict-get" "str" "nth" "dom-is-child-of?" "dom-has-attr?" "sx-preserve" "sx-ignore" "dom-remove-child") :bytecode (18 0 16 0 52 2 0 1 52 1 0 2 52 0 0 1 33 76 0 18 1 16 0 52 3 0 2 17 1 20 4 0 16 1 18 2 48 2 6 33 34 0 5 20 5 0 16 1 1 6 0 48 2 52 0 0 1 6 33 15 0 5 20 5 0 16 1 1 7 0 48 2 52 0 0 1 33 12 0 20 8 0 18 2 16 1 49 2 32 1 0 2 32 1 0 2 50)} "range" "len") :bytecode (20 0 0 16 0 48 1 17 2 20 0 0 16 1 48 1 17 3 52 1 0 0 17 4 52 1 0 0 17 5 52 1 0 0 17 6 1 2 0 17 7 1 2 0 17 8 51 4 0 1 4 1 5 1 8 16 2 52 3 0 2 5 51 5 0 1 4 1 5 1 6 1 7 1 2 1 0 16 3 52 3 0 2 5 51 6 0 1 6 1 2 1 0 1 2 0 16 2 52 8 0 1 52 7 0 2 52 3 0 2 50)} "morph-island-children" {:upvalue-count 0 :arity 2 :constants ("dom-query-all" "[data-sx-lake]" "[data-sx-marsh]" "dict" "for-each" {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "data-sx-lake" "dict-set!") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 13 0 18 0 16 1 16 0 52 2 0 3 32 1 0 2 50)} {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "data-sx-marsh" "dict-set!") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 13 0 18 0 16 1 16 0 52 2 0 3 32 1 0 2 50)} {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "data-sx-lake" "dict-get" "sync-attrs" "morph-children") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 18 0 16 1 52 2 0 2 17 2 16 2 33 22 0 20 3 0 16 0 16 2 48 2 5 20 4 0 16 0 16 2 49 2 32 1 0 2 50)} {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "data-sx-marsh" "dict-get" "morph-marsh") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 18 0 16 1 52 2 0 2 17 2 16 2 33 14 0 20 3 0 16 0 16 2 18 1 49 3 32 1 0 2 50)} "process-signal-updates") :bytecode (20 0 0 16 0 1 1 0 48 2 17 2 20 0 0 16 1 1 1 0 48 2 17 3 20 0 0 16 0 1 2 0 48 2 17 4 20 0 0 16 1 1 2 0 48 2 17 5 52 3 0 0 17 6 52 3 0 0 17 7 51 5 0 1 6 16 3 52 4 0 2 5 51 6 0 1 7 16 5 52 4 0 2 5 51 7 0 1 6 16 2 52 4 0 2 5 51 8 0 1 7 1 0 16 4 52 4 0 2 5 20 9 0 16 1 49 1 50)} "morph-marsh" {:upvalue-count 0 :arity 3 :constants ("dom-get-data" "sx-marsh-transform" "sx-marsh-env" "dom-inner-html" "not" "empty?" "parse" "cek-call" "list" "dispose-marsh-scope" "with-marsh-scope" {:upvalue-count 3 :arity 0 :constants ("render-to-dom" "dom-remove-children-after" "dom-append") :bytecode (20 0 0 18 0 18 1 2 48 3 17 0 20 1 0 18 2 2 48 2 5 20 2 0 18 2 16 0 49 2 50)} "sync-attrs" "morph-children") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 20 0 0 16 0 1 2 0 48 2 17 4 20 3 0 16 1 48 1 17 5 16 4 6 33 18 0 5 16 5 6 33 11 0 5 16 5 52 5 0 1 52 4 0 1 33 61 0 20 6 0 16 5 48 1 17 6 16 3 33 16 0 20 7 0 16 3 16 6 52 8 0 1 48 2 32 2 0 16 6 17 7 20 9 0 16 0 48 1 5 20 10 0 16 0 51 11 0 1 7 1 4 1 0 49 2 32 19 0 20 12 0 16 0 16 1 48 2 5 20 13 0 16 0 16 1 49 2 50)} "process-signal-updates" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "[data-sx-signal]" "for-each" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "data-sx-signal" "index-of" ":" ">" 0 "slice" "+" 1 "json-parse" "reset!" "use-store" "dom-remove-attr") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 93 0 16 1 1 3 0 52 2 0 2 17 2 16 2 1 5 0 52 4 0 2 33 66 0 16 1 1 5 0 16 2 52 6 0 3 17 3 16 1 16 2 1 8 0 52 7 0 2 52 6 0 2 17 4 20 9 0 16 4 48 1 17 5 20 10 0 16 3 52 11 0 1 16 5 48 2 5 20 12 0 16 0 1 1 0 49 2 32 1 0 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 16 1 52 2 0 2 50)} "swap-dom-nodes" {:upvalue-count 0 :arity 3 :constants ("innerHTML" "=" "dom-is-fragment?" "morph-children" "dom-create-element" "div" "dom-append" "outerHTML" "dom-parent" "dom-clone" "dom-first-child" "dom-replace-child" "dom-next-sibling" "insert-remaining-siblings" "dom-remove-child" "afterend" "dom-insert-after" "beforeend" "afterbegin" "dom-prepend" "beforebegin" "dom-insert-before" "delete" "none") :bytecode (16 2 6 1 0 0 52 1 0 2 33 56 0 5 20 2 0 16 1 48 1 33 12 0 20 3 0 16 0 16 1 49 2 32 30 0 20 4 0 1 5 0 2 48 2 17 3 20 6 0 16 3 16 1 48 2 5 20 3 0 16 0 16 3 49 2 32 75 1 6 1 7 0 52 1 0 2 33 119 0 5 20 8 0 16 0 48 1 17 3 20 9 0 16 1 3 48 2 17 4 20 2 0 16 1 48 1 33 72 0 20 10 0 16 1 48 1 17 5 16 5 33 46 0 20 9 0 16 5 3 48 2 17 4 5 20 11 0 16 3 16 4 16 0 48 3 5 20 12 0 16 5 48 1 17 6 20 13 0 16 3 16 4 16 6 48 3 32 9 0 20 14 0 16 3 16 0 48 2 32 11 0 20 11 0 16 3 16 4 16 0 48 3 5 16 4 32 201 0 6 1 15 0 52 1 0 2 33 13 0 5 20 16 0 16 0 16 1 49 2 32 177 0 6 1 17 0 52 1 0 2 33 13 0 5 20 6 0 16 0 16 1 49 2 32 153 0 6 1 18 0 52 1 0 2 33 13 0 5 20 19 0 16 0 16 1 49 2 32 129 0 6 1 20 0 52 1 0 2 33 20 0 5 20 21 0 20 8 0 16 0 48 1 16 1 16 0 49 3 32 98 0 6 1 22 0 52 1 0 2 33 18 0 5 20 14 0 20 8 0 16 0 48 1 16 0 49 2 32 69 0 6 1 23 0 52 1 0 2 33 5 0 5 2 32 53 0 5 20 2 0 16 1 48 1 33 12 0 20 3 0 16 0 16 1 49 2 32 30 0 20 4 0 1 5 0 2 48 2 17 3 20 6 0 16 3 16 1 48 2 5 20 3 0 16 0 16 3 49 2 50)} "insert-remaining-siblings" {:upvalue-count 0 :arity 3 :constants ("dom-next-sibling" "dom-insert-after" "insert-remaining-siblings") :bytecode (16 2 33 33 0 20 0 0 16 2 48 1 17 3 20 1 0 16 1 16 2 48 2 5 20 2 0 16 0 16 2 16 3 49 3 32 1 0 2 50)} "swap-html-string" {:upvalue-count 0 :arity 3 :constants ("innerHTML" "=" "dom-set-inner-html" "outerHTML" "dom-parent" "dom-insert-adjacent-html" "afterend" "dom-remove-child" "beforeend" "afterbegin" "beforebegin" "delete" "none") :bytecode (16 2 6 1 0 0 52 1 0 2 33 13 0 5 20 2 0 16 0 16 1 49 2 32 212 0 6 1 3 0 52 1 0 2 33 38 0 5 20 4 0 16 0 48 1 17 3 20 5 0 16 0 1 6 0 16 1 48 3 5 20 7 0 16 3 16 0 48 2 5 16 3 32 163 0 6 1 6 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 6 0 16 1 49 3 32 136 0 6 1 8 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 8 0 16 1 49 3 32 109 0 6 1 9 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 9 0 16 1 49 3 32 82 0 6 1 10 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 10 0 16 1 49 3 32 55 0 6 1 11 0 52 1 0 2 33 18 0 5 20 7 0 20 4 0 16 0 48 1 16 0 49 2 32 26 0 6 1 12 0 52 1 0 2 33 5 0 5 2 32 10 0 5 20 2 0 16 0 16 1 49 2 50)} "handle-history" {:upvalue-count 0 :arity 3 :constants ("dom-get-attr" "sx-push-url" "sx-replace-url" "get" "replace-url" "browser-replace-state" "not" "=" "false" "browser-push-state" "true") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 20 0 0 16 0 1 2 0 48 2 17 4 16 2 1 4 0 52 3 0 2 17 5 16 5 33 10 0 20 5 0 16 5 49 1 32 101 0 16 3 6 33 14 0 5 16 3 1 8 0 52 7 0 2 52 6 0 1 33 27 0 20 9 0 16 3 1 10 0 52 7 0 2 33 5 0 16 1 32 2 0 16 3 49 1 32 51 0 16 4 6 33 14 0 5 16 4 1 8 0 52 7 0 2 52 6 0 1 33 27 0 20 5 0 16 4 1 10 0 52 7 0 2 33 5 0 16 1 32 2 0 16 4 49 1 32 1 0 2 50)} "PRELOAD_TTL" 30000 "preload-cache-get" {:upvalue-count 0 :arity 2 :constants ("dict-get" "nil?" ">" "-" "now-ms" "get" "timestamp" "PRELOAD_TTL" "dict-delete!") :bytecode (16 0 16 1 52 0 0 2 17 2 16 2 52 1 0 1 33 4 0 2 32 52 0 20 4 0 48 0 16 2 1 6 0 52 5 0 2 52 3 0 2 20 7 0 52 2 0 2 33 13 0 16 0 16 1 52 8 0 2 5 2 32 11 0 16 0 16 1 52 8 0 2 5 16 2 50)} "preload-cache-set" {:upvalue-count 0 :arity 4 :constants ("dict-set!" "dict" "text" "content-type" "timestamp" "now-ms") :bytecode (16 0 16 1 1 2 0 16 2 1 3 0 16 3 1 4 0 20 5 0 48 0 52 1 0 6 52 0 0 3 50)} "classify-trigger" {:upvalue-count 0 :arity 1 :constants ("get" "event" "=" "every" "poll" "intersect" "load" "revealed") :bytecode (16 0 1 1 0 52 0 0 2 17 1 16 1 1 3 0 52 2 0 2 33 6 0 1 4 0 32 57 0 16 1 1 5 0 52 2 0 2 33 6 0 1 5 0 32 39 0 16 1 1 6 0 52 2 0 2 33 6 0 1 6 0 32 21 0 16 1 1 7 0 52 2 0 2 33 6 0 1 7 0 32 3 0 1 1 0 50)} "should-boost-link?" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "href" "not" "starts-with?" "#" "javascript:" "mailto:" "browser-same-origin?" "dom-has-attr?" "sx-get" "sx-post" "sx-disable") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 6 33 119 0 5 16 1 1 4 0 52 3 0 2 52 2 0 1 6 33 101 0 5 16 1 1 5 0 52 3 0 2 52 2 0 1 6 33 83 0 5 16 1 1 6 0 52 3 0 2 52 2 0 1 6 33 65 0 5 20 7 0 16 1 48 1 6 33 53 0 5 20 8 0 16 0 1 9 0 48 2 52 2 0 1 6 33 34 0 5 20 8 0 16 0 1 10 0 48 2 52 2 0 1 6 33 15 0 5 20 8 0 16 0 1 11 0 48 2 52 2 0 1 50)} "should-boost-form?" {:upvalue-count 0 :arity 1 :constants ("not" "dom-has-attr?" "sx-get" "sx-post" "sx-disable") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 34 0 5 20 1 0 16 0 1 3 0 48 2 52 0 0 1 6 33 15 0 5 20 1 0 16 0 1 4 0 48 2 52 0 0 1 50)} "parse-sse-swap" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-sse-swap" "message") :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 4 0 5 1 2 0 50)}) :bytecode (1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 52 1 0 5 128 0 0 5 1 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 51 42 0 128 41 0 5 51 44 0 128 43 0 5 51 46 0 128 45 0 5 51 48 0 128 47 0 5 51 50 0 128 49 0 5 51 52 0 128 51 0 5 51 54 0 128 53 0 5 51 56 0 128 55 0 5 1 58 0 128 57 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 51 68 0 128 67 0 5 51 70 0 128 69 0 50))) + :constants ("ENGINE_VERBS" "list" "get" "post" "put" "delete" "patch" "DEFAULT_SWAP" "outerHTML" "parse-time" {:upvalue-count 0 :arity 1 :constants ("nil?" 0 "ends-with?" "ms" "parse-int" "s" "*" "replace" "" 1000) :bytecode (16 0 52 0 0 1 33 6 0 1 1 0 32 74 0 16 0 1 3 0 52 2 0 2 33 12 0 16 0 1 1 0 52 4 0 2 32 50 0 16 0 1 5 0 52 2 0 2 33 29 0 16 0 1 5 0 1 8 0 52 7 0 3 1 1 0 52 4 0 2 1 9 0 52 6 0 2 32 9 0 16 0 1 1 0 52 4 0 2 50)} "parse-trigger-spec" {:upvalue-count 0 :arity 1 :constants ("nil?" "split" "," "filter" {:upvalue-count 0 :arity 1 :constants ("not" "nil?") :bytecode (16 0 52 1 0 1 52 0 0 1 50)} "map" {:upvalue-count 0 :arity 1 :constants ("split" "trim" " " "empty?" "=" "first" "every" ">=" "len" 2 "dict" "event" "modifiers" "interval" "parse-time" "nth" 1 "for-each" {:upvalue-count 1 :arity 1 :constants ("=" "once" "dict-set!" "changed" "starts-with?" "delay:" "delay" "parse-time" "slice" 6 "from:" "from" 5) :bytecode (16 0 1 1 0 52 0 0 2 33 13 0 18 0 1 1 0 3 52 2 0 3 32 97 0 16 0 1 3 0 52 0 0 2 33 13 0 18 0 1 3 0 3 52 2 0 3 32 72 0 16 0 1 5 0 52 4 0 2 33 26 0 18 0 1 6 0 20 7 0 16 0 1 9 0 52 8 0 2 48 1 52 2 0 3 32 34 0 16 0 1 10 0 52 4 0 2 33 21 0 18 0 1 11 0 16 0 1 12 0 52 8 0 2 52 2 0 3 32 1 0 2 50)} "rest") :bytecode (16 0 52 1 0 1 1 2 0 52 0 0 2 17 1 16 1 52 3 0 1 33 4 0 2 32 111 0 16 1 52 5 0 1 1 6 0 52 4 0 2 6 33 14 0 5 16 1 52 8 0 1 1 9 0 52 7 0 2 33 37 0 1 11 0 1 6 0 1 12 0 1 13 0 20 14 0 16 1 1 16 0 52 15 0 2 48 1 52 10 0 2 52 10 0 4 32 40 0 52 10 0 0 17 2 51 18 0 1 2 16 1 52 19 0 1 52 17 0 2 5 1 11 0 16 1 52 5 0 1 1 12 0 16 2 52 10 0 4 50)}) :bytecode (16 0 52 0 0 1 33 4 0 2 32 27 0 16 0 1 2 0 52 1 0 2 17 1 51 4 0 51 6 0 16 1 52 5 0 2 52 3 0 2 50)} "default-trigger" {:upvalue-count 0 :arity 1 :constants ("=" "form" "list" "dict" "event" "submit" "modifiers" "input" "select" "textarea" "change" "click") :bytecode (16 0 1 1 0 52 0 0 2 33 24 0 1 4 0 1 5 0 1 6 0 52 3 0 0 52 3 0 4 52 2 0 1 32 85 0 16 0 1 7 0 52 0 0 2 6 34 24 0 5 16 0 1 8 0 52 0 0 2 6 34 10 0 5 16 0 1 9 0 52 0 0 2 33 24 0 1 4 0 1 10 0 1 6 0 52 3 0 0 52 3 0 4 52 2 0 1 32 21 0 1 4 0 1 11 0 1 6 0 52 3 0 0 52 3 0 4 52 2 0 1 50)} "get-verb-info" {:upvalue-count 0 :arity 1 :constants ("some" {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "str" "sx-" "dict" "method" "upper" "url") :bytecode (20 0 0 18 0 1 2 0 16 0 52 1 0 2 48 2 17 1 16 1 33 21 0 1 4 0 16 0 52 5 0 1 1 6 0 16 1 52 3 0 4 32 1 0 2 50)} "ENGINE_VERBS") :bytecode (51 1 0 1 0 20 2 0 52 0 0 2 50)} "build-request-headers" {:upvalue-count 0 :arity 3 :constants ("dict" "SX-Request" "true" "SX-Current-URL" "browser-location-href" "dom-get-attr" "sx-target" "dict-set!" "SX-Target" "dom-query" "script[data-components][data-hash]" "data-hash" "SX-Components-Hash" "SX-Css" "sx-headers" "parse-header-value" "for-each" {:upvalue-count 2 :arity 1 :constants ("dict-set!" "str" "get") :bytecode (18 0 16 0 18 1 16 0 52 2 0 2 52 1 0 1 52 0 0 3 50)} "keys") :bytecode (1 1 0 1 2 0 1 3 0 20 4 0 48 0 52 0 0 4 17 3 20 5 0 16 0 1 6 0 48 2 17 4 16 4 33 14 0 16 3 1 8 0 16 4 52 7 0 3 32 1 0 2 5 20 5 0 20 9 0 1 10 0 48 1 1 11 0 48 2 17 4 16 4 33 14 0 16 3 1 12 0 16 4 52 7 0 3 32 1 0 2 5 16 2 33 14 0 16 3 1 13 0 16 2 52 7 0 3 32 1 0 2 5 20 5 0 16 0 1 14 0 48 2 17 4 16 4 33 38 0 20 15 0 16 4 48 1 17 5 16 5 33 20 0 51 17 0 1 3 1 5 16 5 52 18 0 1 52 16 0 2 32 1 0 2 32 1 0 2 5 16 3 50)} "process-response-headers" {:upvalue-count 0 :arity 1 :constants ("dict" "redirect" "SX-Redirect" "refresh" "SX-Refresh" "trigger" "SX-Trigger" "retarget" "SX-Retarget" "reswap" "SX-Reswap" "location" "SX-Location" "replace-url" "SX-Replace-Url" "css-hash" "SX-Css-Hash" "trigger-swap" "SX-Trigger-After-Swap" "trigger-settle" "SX-Trigger-After-Settle" "content-type" "Content-Type" "cache-invalidate" "SX-Cache-Invalidate" "cache-update" "SX-Cache-Update") :bytecode (1 1 0 16 0 1 2 0 48 1 1 3 0 16 0 1 4 0 48 1 1 5 0 16 0 1 6 0 48 1 1 7 0 16 0 1 8 0 48 1 1 9 0 16 0 1 10 0 48 1 1 11 0 16 0 1 12 0 48 1 1 13 0 16 0 1 14 0 48 1 1 15 0 16 0 1 16 0 48 1 1 17 0 16 0 1 18 0 48 1 1 19 0 16 0 1 20 0 48 1 1 21 0 16 0 1 22 0 48 1 1 23 0 16 0 1 24 0 48 1 1 25 0 16 0 1 26 0 48 1 52 0 0 26 50)} "parse-swap-spec" {:upvalue-count 0 :arity 2 :constants ("split" "DEFAULT_SWAP" " " "first" "for-each" {:upvalue-count 1 :arity 1 :constants ("=" "transition:true" "transition:false") :bytecode (16 0 1 1 0 52 0 0 2 33 6 0 3 19 0 32 19 0 16 0 1 2 0 52 0 0 2 33 6 0 4 19 0 32 1 0 2 50)} "rest" "dict" "style" "transition") :bytecode (16 0 6 34 4 0 5 20 1 0 1 2 0 52 0 0 2 17 2 16 2 52 3 0 1 17 3 16 1 17 4 51 5 0 1 4 16 2 52 6 0 1 52 4 0 2 5 1 8 0 16 3 1 9 0 16 4 52 7 0 4 50)} "parse-retry-spec" {:upvalue-count 0 :arity 1 :constants ("nil?" "split" ":" "dict" "strategy" "first" "start-ms" "parse-int" "nth" 1 1000 "cap-ms" 2 30000) :bytecode (16 0 52 0 0 1 33 4 0 2 32 62 0 16 0 1 2 0 52 1 0 2 17 1 1 4 0 16 1 52 5 0 1 1 6 0 16 1 1 9 0 52 8 0 2 1 10 0 52 7 0 2 1 11 0 16 1 1 12 0 52 8 0 2 1 13 0 52 7 0 2 52 3 0 6 50)} "next-retry-ms" {:upvalue-count 0 :arity 2 :constants ("min" "*" 2) :bytecode (16 0 1 2 0 52 1 0 2 16 1 52 0 0 2 50)} "filter-params" {:upvalue-count 0 :arity 2 :constants ("nil?" "=" "none" "list" "*" "starts-with?" "not " "map" "trim" "split" "slice" 4 "," "filter" {:upvalue-count 1 :arity 1 :constants ("not" "contains?" "first") :bytecode (18 0 16 0 52 2 0 1 52 1 0 2 52 0 0 1 50)} {:upvalue-count 1 :arity 1 :constants ("contains?" "first") :bytecode (18 0 16 0 52 1 0 1 52 0 0 2 50)}) :bytecode (16 0 52 0 0 1 33 5 0 16 1 32 116 0 16 0 1 2 0 52 1 0 2 33 7 0 52 3 0 0 32 97 0 16 0 1 4 0 52 1 0 2 33 5 0 16 1 32 80 0 16 0 1 6 0 52 5 0 2 33 39 0 20 8 0 16 0 1 11 0 52 10 0 2 1 12 0 52 9 0 2 52 7 0 2 17 2 51 14 0 1 2 16 1 52 13 0 2 32 29 0 20 8 0 16 0 1 12 0 52 9 0 2 52 7 0 2 17 2 51 15 0 1 2 16 1 52 13 0 2 50)} "resolve-target" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-target" "nil?" "=" "this" "closest" "dom-parent" "dom-query") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 52 2 0 1 6 34 10 0 5 16 1 1 4 0 52 3 0 2 33 5 0 16 0 32 29 0 16 1 1 5 0 52 3 0 2 33 10 0 20 6 0 16 0 49 1 32 7 0 20 7 0 16 1 49 1 50)} "apply-optimistic" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-optimistic" "nil?" "resolve-target" "dict" "target" "directive" "=" "remove" "dict-set!" "opacity" "dom-get-style" "dom-set-style" "0" "pointer-events" "none" "disable" "disabled" "dom-get-prop" "dom-set-prop" "starts-with?" "add-class:" "slice" 10 "add-class" "dom-add-class") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 52 2 0 1 33 4 0 2 32 191 0 20 3 0 16 0 48 1 6 34 3 0 5 16 0 17 2 1 5 0 16 2 1 6 0 16 1 52 4 0 4 17 3 16 1 1 8 0 52 7 0 2 33 50 0 16 3 1 10 0 20 11 0 16 2 1 10 0 48 2 52 9 0 3 5 20 12 0 16 2 1 10 0 1 13 0 48 3 5 20 12 0 16 2 1 14 0 1 15 0 48 3 32 94 0 16 1 1 16 0 52 7 0 2 33 34 0 16 3 1 17 0 20 18 0 16 2 1 17 0 48 2 52 9 0 3 5 20 19 0 16 2 1 17 0 3 48 3 32 48 0 16 1 1 21 0 52 20 0 2 33 35 0 16 1 1 23 0 52 22 0 2 17 4 16 3 1 24 0 16 4 52 9 0 3 5 20 25 0 16 2 16 4 48 2 32 1 0 2 5 16 3 50)} "revert-optimistic" {:upvalue-count 0 :arity 1 :constants ("get" "target" "directive" "=" "remove" "dom-set-style" "opacity" "" "pointer-events" "disable" "dom-set-prop" "disabled" "add-class" "dom-remove-class") :bytecode (16 0 33 153 0 16 0 1 1 0 52 0 0 2 17 1 16 0 1 2 0 52 0 0 2 17 2 16 2 1 4 0 52 3 0 2 33 44 0 20 5 0 16 1 1 6 0 16 0 1 6 0 52 0 0 2 6 34 4 0 5 1 7 0 48 3 5 20 5 0 16 1 1 8 0 1 7 0 49 3 32 72 0 16 2 1 9 0 52 3 0 2 33 28 0 20 10 0 16 1 1 11 0 16 0 1 11 0 52 0 0 2 6 34 2 0 5 4 49 3 32 32 0 16 0 1 12 0 52 0 0 2 33 19 0 20 13 0 16 1 16 0 1 12 0 52 0 0 2 49 2 32 1 0 2 32 1 0 2 50)} "find-oob-swaps" {:upvalue-count 0 :arity 1 :constants ("list" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-query-all" "str" "[" "]" "for-each" {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "outerHTML" "dom-id" "dom-remove-attr" "append!" "dict" "element" "swap-type" "target-id") :bytecode (20 0 0 16 0 18 0 48 2 6 34 4 0 5 1 1 0 17 1 20 2 0 16 0 48 1 17 2 20 3 0 16 0 18 0 48 2 5 16 2 33 29 0 20 4 0 18 1 1 6 0 16 0 1 7 0 16 1 1 8 0 16 2 52 5 0 6 49 2 32 1 0 2 50)}) :bytecode (20 0 0 18 0 1 2 0 16 0 1 3 0 52 1 0 3 48 2 17 1 51 5 0 1 0 0 1 16 1 52 4 0 2 50)} "sx-swap-oob" "hx-swap-oob") :bytecode (52 0 0 0 17 1 51 2 0 1 0 1 1 1 3 0 1 4 0 52 0 0 2 52 1 0 2 5 16 1 50)} "morph-node" {:upvalue-count 0 :arity 2 :constants ("dom-has-attr?" "sx-preserve" "sx-ignore" "data-sx-island" "is-processed?" "island-hydrated" "=" "dom-get-attr" "sync-attrs" "morph-island-children" "not" "dom-node-type" "dom-node-name" "dom-replace-child" "dom-parent" "dom-clone" 3 8 "dom-text-content" "dom-set-text-content" 1 "dispose-island" "dispose-islands-in" "dom-is-active-element?" "dom-is-input-element?" "morph-children") :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 11 0 5 20 0 0 16 0 1 2 0 48 2 33 4 0 2 32 148 1 20 0 0 16 0 1 3 0 48 2 6 33 55 0 5 20 4 0 16 0 1 5 0 48 2 6 33 40 0 5 20 0 0 16 1 1 3 0 48 2 6 33 25 0 5 20 7 0 16 0 1 3 0 48 2 20 7 0 16 1 1 3 0 48 2 52 6 0 2 33 22 0 20 8 0 16 0 16 1 48 2 5 20 9 0 16 0 16 1 49 2 32 54 1 20 11 0 16 0 48 1 20 11 0 16 1 48 1 52 6 0 2 52 10 0 1 6 34 23 0 5 20 12 0 16 0 48 1 20 12 0 16 1 48 1 52 6 0 2 52 10 0 1 33 25 0 20 13 0 20 14 0 16 0 48 1 20 15 0 16 1 3 48 2 16 0 49 3 32 233 0 20 11 0 16 0 48 1 1 16 0 52 6 0 2 6 34 15 0 5 20 11 0 16 0 48 1 1 17 0 52 6 0 2 33 46 0 20 18 0 16 0 48 1 20 18 0 16 1 48 1 52 6 0 2 52 10 0 1 33 17 0 20 19 0 16 0 20 18 0 16 1 48 1 49 2 32 1 0 2 32 151 0 20 11 0 16 0 48 1 1 20 0 52 6 0 2 33 133 0 20 0 0 16 0 1 3 0 48 2 6 33 44 0 5 20 0 0 16 1 1 3 0 48 2 6 33 29 0 5 20 7 0 16 0 1 3 0 48 2 20 7 0 16 1 1 3 0 48 2 52 6 0 2 52 10 0 1 33 18 0 20 21 0 16 0 48 1 5 20 22 0 16 0 48 1 32 1 0 2 5 20 8 0 16 0 16 1 48 2 5 20 23 0 16 0 48 1 6 33 8 0 5 20 24 0 16 0 48 1 52 10 0 1 33 12 0 20 25 0 16 0 16 1 49 2 32 1 0 2 32 1 0 2 50)} "sync-attrs" {:upvalue-count 0 :arity 2 :constants ("dom-get-attr" "data-sx-reactive-attrs" "" "empty?" "list" "split" "," "for-each" {:upvalue-count 2 :arity 1 :constants ("first" "nth" 1 "not" "=" "dom-get-attr" "contains?" "dom-set-attr") :bytecode (16 0 52 0 0 1 17 1 16 0 1 2 0 52 1 0 2 17 2 20 5 0 18 0 16 1 48 2 16 2 52 4 0 2 52 3 0 1 6 33 13 0 5 18 1 16 1 52 6 0 2 52 3 0 1 33 14 0 20 7 0 18 0 16 1 16 2 49 3 32 1 0 2 50)} "dom-attr-list" {:upvalue-count 3 :arity 1 :constants ("first" "not" "dom-has-attr?" "contains?" "=" "data-sx-reactive-attrs" "dom-remove-attr") :bytecode (16 0 52 0 0 1 17 1 20 2 0 18 0 16 1 48 2 52 1 0 1 6 33 31 0 5 18 1 16 1 52 3 0 2 52 1 0 1 6 33 14 0 5 16 1 1 5 0 52 4 0 2 52 1 0 1 33 12 0 20 6 0 18 2 16 1 49 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 4 0 5 1 2 0 17 2 16 2 52 3 0 1 33 7 0 52 4 0 0 32 9 0 16 2 1 6 0 52 5 0 2 17 3 51 8 0 1 0 1 3 20 9 0 16 1 48 1 52 7 0 2 5 51 10 0 1 1 1 3 1 0 20 9 0 16 0 48 1 52 7 0 2 50)} "morph-children" {:upvalue-count 0 :arity 2 :constants ("dom-child-list" "dict" 0 "for-each" {:upvalue-count 3 :arity 1 :constants ("dom-id" "not" "empty?" "dict-set!" "inc") :bytecode (20 0 0 16 0 48 1 17 1 16 1 6 33 11 0 5 16 1 52 2 0 1 52 1 0 1 33 24 0 18 0 16 1 16 0 52 3 0 3 5 18 1 16 1 18 2 52 3 0 3 32 1 0 2 5 18 2 52 4 0 1 19 2 50)} {:upvalue-count 6 :arity 1 :constants ("dom-id" "not" "empty?" "dict-get" "nil?" "dict-set!" "str" "<" "len" "=" "nth" "dom-insert-before" "morph-node" "inc" "dom-clone" "dom-append") :bytecode (20 0 0 16 0 48 1 17 1 16 1 6 33 11 0 5 16 1 52 2 0 1 52 1 0 1 33 5 0 16 1 32 1 0 2 17 2 16 2 33 11 0 18 0 16 2 52 3 0 2 32 1 0 2 17 3 16 3 6 33 11 0 5 16 3 52 4 0 1 52 1 0 1 33 133 0 18 1 16 2 52 3 0 2 17 4 16 4 33 16 0 18 2 16 4 52 6 0 1 3 52 5 0 3 32 1 0 2 5 18 3 18 4 52 8 0 1 52 7 0 2 6 33 19 0 5 16 3 18 4 18 3 52 10 0 2 52 9 0 2 52 1 0 1 33 39 0 20 11 0 18 5 16 3 18 3 18 4 52 8 0 1 52 7 0 2 33 11 0 18 4 18 3 52 10 0 2 32 1 0 2 48 3 32 1 0 2 5 20 12 0 16 3 16 0 48 2 5 18 3 52 13 0 1 19 3 32 135 0 18 3 18 4 52 8 0 1 52 7 0 2 33 105 0 18 4 18 3 52 10 0 2 17 4 20 0 0 16 4 48 1 17 5 16 5 6 33 22 0 5 16 5 52 2 0 1 52 1 0 1 6 33 7 0 5 16 2 52 1 0 1 33 20 0 20 11 0 18 5 20 14 0 16 0 3 48 2 16 4 49 3 32 32 0 18 2 18 3 52 6 0 1 3 52 5 0 3 5 20 12 0 16 4 16 0 48 2 5 18 3 52 13 0 1 19 3 32 15 0 20 15 0 18 5 20 14 0 16 0 3 48 2 49 2 50)} {:upvalue-count 3 :arity 1 :constants ("not" "dict-get" "str" "nth" "dom-is-child-of?" "dom-has-attr?" "sx-preserve" "sx-ignore" "dom-remove-child") :bytecode (18 0 16 0 52 2 0 1 52 1 0 2 52 0 0 1 33 76 0 18 1 16 0 52 3 0 2 17 1 20 4 0 16 1 18 2 48 2 6 33 34 0 5 20 5 0 16 1 1 6 0 48 2 52 0 0 1 6 33 15 0 5 20 5 0 16 1 1 7 0 48 2 52 0 0 1 33 12 0 20 8 0 18 2 16 1 49 2 32 1 0 2 32 1 0 2 50)} "range" "len") :bytecode (20 0 0 16 0 48 1 17 2 20 0 0 16 1 48 1 17 3 52 1 0 0 17 4 52 1 0 0 17 5 52 1 0 0 17 6 1 2 0 17 7 1 2 0 17 8 51 4 0 1 4 1 5 1 8 16 2 52 3 0 2 5 51 5 0 1 4 1 5 1 6 1 7 1 2 1 0 16 3 52 3 0 2 5 51 6 0 1 6 1 2 1 0 1 2 0 16 2 52 8 0 1 52 7 0 2 52 3 0 2 50)} "morph-island-children" {:upvalue-count 0 :arity 2 :constants ("dom-query-all" "[data-sx-lake]" "[data-sx-marsh]" "dict" "for-each" {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "data-sx-lake" "dict-set!") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 13 0 18 0 16 1 16 0 52 2 0 3 32 1 0 2 50)} {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "data-sx-marsh" "dict-set!") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 13 0 18 0 16 1 16 0 52 2 0 3 32 1 0 2 50)} {:upvalue-count 1 :arity 1 :constants ("dom-get-attr" "data-sx-lake" "dict-get" "sync-attrs" "morph-children") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 18 0 16 1 52 2 0 2 17 2 16 2 33 22 0 20 3 0 16 0 16 2 48 2 5 20 4 0 16 0 16 2 49 2 32 1 0 2 50)} {:upvalue-count 2 :arity 1 :constants ("dom-get-attr" "data-sx-marsh" "dict-get" "morph-marsh") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 18 0 16 1 52 2 0 2 17 2 16 2 33 14 0 20 3 0 16 0 16 2 18 1 49 3 32 1 0 2 50)} "process-signal-updates") :bytecode (20 0 0 16 0 1 1 0 48 2 17 2 20 0 0 16 1 1 1 0 48 2 17 3 20 0 0 16 0 1 2 0 48 2 17 4 20 0 0 16 1 1 2 0 48 2 17 5 52 3 0 0 17 6 52 3 0 0 17 7 51 5 0 1 6 16 3 52 4 0 2 5 51 6 0 1 7 16 5 52 4 0 2 5 51 7 0 1 6 16 2 52 4 0 2 5 51 8 0 1 7 1 0 16 4 52 4 0 2 5 20 9 0 16 1 49 1 50)} "morph-marsh" {:upvalue-count 0 :arity 3 :constants ("dom-get-data" "sx-marsh-transform" "sx-marsh-env" "dom-inner-html" "not" "empty?" "parse" "cek-call" "list" "dispose-marsh-scope" "with-marsh-scope" {:upvalue-count 3 :arity 0 :constants ("render-to-dom" "dom-remove-children-after" "dom-append") :bytecode (20 0 0 18 0 18 1 2 48 3 17 0 20 1 0 18 2 2 48 2 5 20 2 0 18 2 16 0 49 2 50)} "sync-attrs" "morph-children") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 20 0 0 16 0 1 2 0 48 2 17 4 20 3 0 16 1 48 1 17 5 16 4 6 33 18 0 5 16 5 6 33 11 0 5 16 5 52 5 0 1 52 4 0 1 33 61 0 20 6 0 16 5 48 1 17 6 16 3 33 16 0 20 7 0 16 3 16 6 52 8 0 1 48 2 32 2 0 16 6 17 7 20 9 0 16 0 48 1 5 20 10 0 16 0 51 11 0 1 7 1 4 1 0 49 2 32 19 0 20 12 0 16 0 16 1 48 2 5 20 13 0 16 0 16 1 49 2 50)} "process-signal-updates" {:upvalue-count 0 :arity 1 :constants ("dom-query-all" "[data-sx-signal]" "for-each" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "data-sx-signal" "index-of" ":" ">" 0 "slice" "+" 1 "json-parse" "reset!" "use-store" "dom-remove-attr") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 33 93 0 16 1 1 3 0 52 2 0 2 17 2 16 2 1 5 0 52 4 0 2 33 66 0 16 1 1 5 0 16 2 52 6 0 3 17 3 16 1 16 2 1 8 0 52 7 0 2 52 6 0 2 17 4 20 9 0 16 4 48 1 17 5 20 10 0 16 3 52 11 0 1 16 5 48 2 5 20 12 0 16 0 1 1 0 49 2 32 1 0 2 32 1 0 2 50)}) :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 51 3 0 16 1 52 2 0 2 50)} "swap-dom-nodes" {:upvalue-count 0 :arity 3 :constants ("innerHTML" "=" "dom-is-fragment?" "morph-children" "dom-create-element" "div" "dom-append" "outerHTML" "dom-parent" "dom-clone" "dom-first-child" "dom-replace-child" "dom-next-sibling" "insert-remaining-siblings" "dom-remove-child" "afterend" "dom-insert-after" "beforeend" "afterbegin" "dom-prepend" "beforebegin" "dom-insert-before" "delete" "none") :bytecode (16 2 6 1 0 0 52 1 0 2 33 56 0 5 20 2 0 16 1 48 1 33 12 0 20 3 0 16 0 16 1 49 2 32 30 0 20 4 0 1 5 0 2 48 2 17 3 20 6 0 16 3 16 1 48 2 5 20 3 0 16 0 16 3 49 2 32 75 1 6 1 7 0 52 1 0 2 33 119 0 5 20 8 0 16 0 48 1 17 3 20 9 0 16 1 3 48 2 17 4 20 2 0 16 1 48 1 33 72 0 20 10 0 16 1 48 1 17 5 16 5 33 46 0 20 9 0 16 5 3 48 2 17 4 5 20 11 0 16 3 16 4 16 0 48 3 5 20 12 0 16 5 48 1 17 6 20 13 0 16 3 16 4 16 6 48 3 32 9 0 20 14 0 16 3 16 0 48 2 32 11 0 20 11 0 16 3 16 4 16 0 48 3 5 16 4 32 201 0 6 1 15 0 52 1 0 2 33 13 0 5 20 16 0 16 0 16 1 49 2 32 177 0 6 1 17 0 52 1 0 2 33 13 0 5 20 6 0 16 0 16 1 49 2 32 153 0 6 1 18 0 52 1 0 2 33 13 0 5 20 19 0 16 0 16 1 49 2 32 129 0 6 1 20 0 52 1 0 2 33 20 0 5 20 21 0 20 8 0 16 0 48 1 16 1 16 0 49 3 32 98 0 6 1 22 0 52 1 0 2 33 18 0 5 20 14 0 20 8 0 16 0 48 1 16 0 49 2 32 69 0 6 1 23 0 52 1 0 2 33 5 0 5 2 32 53 0 5 20 2 0 16 1 48 1 33 12 0 20 3 0 16 0 16 1 49 2 32 30 0 20 4 0 1 5 0 2 48 2 17 3 20 6 0 16 3 16 1 48 2 5 20 3 0 16 0 16 3 49 2 50)} "insert-remaining-siblings" {:upvalue-count 0 :arity 3 :constants ("dom-next-sibling" "dom-insert-after" "insert-remaining-siblings") :bytecode (16 2 33 33 0 20 0 0 16 2 48 1 17 3 20 1 0 16 1 16 2 48 2 5 20 2 0 16 0 16 2 16 3 49 3 32 1 0 2 50)} "swap-html-string" {:upvalue-count 0 :arity 3 :constants ("innerHTML" "=" "dom-set-inner-html" "outerHTML" "dom-parent" "dom-insert-adjacent-html" "afterend" "dom-remove-child" "beforeend" "afterbegin" "beforebegin" "delete" "none") :bytecode (16 2 6 1 0 0 52 1 0 2 33 13 0 5 20 2 0 16 0 16 1 49 2 32 212 0 6 1 3 0 52 1 0 2 33 38 0 5 20 4 0 16 0 48 1 17 3 20 5 0 16 0 1 6 0 16 1 48 3 5 20 7 0 16 3 16 0 48 2 5 16 3 32 163 0 6 1 6 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 6 0 16 1 49 3 32 136 0 6 1 8 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 8 0 16 1 49 3 32 109 0 6 1 9 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 9 0 16 1 49 3 32 82 0 6 1 10 0 52 1 0 2 33 16 0 5 20 5 0 16 0 1 10 0 16 1 49 3 32 55 0 6 1 11 0 52 1 0 2 33 18 0 5 20 7 0 20 4 0 16 0 48 1 16 0 49 2 32 26 0 6 1 12 0 52 1 0 2 33 5 0 5 2 32 10 0 5 20 2 0 16 0 16 1 49 2 50)} "handle-history" {:upvalue-count 0 :arity 3 :constants ("dom-get-attr" "sx-push-url" "sx-replace-url" "get" "replace-url" "browser-replace-state" "not" "=" "false" "browser-push-state" "true") :bytecode (20 0 0 16 0 1 1 0 48 2 17 3 20 0 0 16 0 1 2 0 48 2 17 4 16 2 1 4 0 52 3 0 2 17 5 16 5 33 10 0 20 5 0 16 5 49 1 32 101 0 16 3 6 33 14 0 5 16 3 1 8 0 52 7 0 2 52 6 0 1 33 27 0 20 9 0 16 3 1 10 0 52 7 0 2 33 5 0 16 1 32 2 0 16 3 49 1 32 51 0 16 4 6 33 14 0 5 16 4 1 8 0 52 7 0 2 52 6 0 1 33 27 0 20 5 0 16 4 1 10 0 52 7 0 2 33 5 0 16 1 32 2 0 16 4 49 1 32 1 0 2 50)} "PRELOAD_TTL" 30000 "preload-cache-get" {:upvalue-count 0 :arity 2 :constants ("dict-get" "nil?" ">" "-" "now-ms" "get" "timestamp" "PRELOAD_TTL" "dict-delete!") :bytecode (16 0 16 1 52 0 0 2 17 2 16 2 52 1 0 1 33 4 0 2 32 52 0 20 4 0 48 0 16 2 1 6 0 52 5 0 2 52 3 0 2 20 7 0 52 2 0 2 33 13 0 16 0 16 1 52 8 0 2 5 2 32 11 0 16 0 16 1 52 8 0 2 5 16 2 50)} "preload-cache-set" {:upvalue-count 0 :arity 4 :constants ("dict-set!" "dict" "text" "content-type" "timestamp" "now-ms") :bytecode (16 0 16 1 1 2 0 16 2 1 3 0 16 3 1 4 0 20 5 0 48 0 52 1 0 6 52 0 0 3 50)} "classify-trigger" {:upvalue-count 0 :arity 1 :constants ("get" "event" "=" "every" "poll" "intersect" "load" "revealed") :bytecode (16 0 1 1 0 52 0 0 2 17 1 16 1 1 3 0 52 2 0 2 33 6 0 1 4 0 32 57 0 16 1 1 5 0 52 2 0 2 33 6 0 1 5 0 32 39 0 16 1 1 6 0 52 2 0 2 33 6 0 1 6 0 32 21 0 16 1 1 7 0 52 2 0 2 33 6 0 1 7 0 32 3 0 1 1 0 50)} "should-boost-link?" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "href" "not" "starts-with?" "#" "javascript:" "mailto:" "browser-same-origin?" "dom-has-attr?" "sx-get" "sx-post" "sx-disable") :bytecode (20 0 0 16 0 1 1 0 48 2 17 1 16 1 6 33 119 0 5 16 1 1 4 0 52 3 0 2 52 2 0 1 6 33 101 0 5 16 1 1 5 0 52 3 0 2 52 2 0 1 6 33 83 0 5 16 1 1 6 0 52 3 0 2 52 2 0 1 6 33 65 0 5 20 7 0 16 1 48 1 6 33 53 0 5 20 8 0 16 0 1 9 0 48 2 52 2 0 1 6 33 34 0 5 20 8 0 16 0 1 10 0 48 2 52 2 0 1 6 33 15 0 5 20 8 0 16 0 1 11 0 48 2 52 2 0 1 50)} "should-boost-form?" {:upvalue-count 0 :arity 1 :constants ("not" "dom-has-attr?" "sx-get" "sx-post" "sx-disable") :bytecode (20 1 0 16 0 1 2 0 48 2 52 0 0 1 6 33 34 0 5 20 1 0 16 0 1 3 0 48 2 52 0 0 1 6 33 15 0 5 20 1 0 16 0 1 4 0 48 2 52 0 0 1 50)} "parse-sse-swap" {:upvalue-count 0 :arity 1 :constants ("dom-get-attr" "sx-sse-swap" "message") :bytecode (20 0 0 16 0 1 1 0 48 2 6 34 4 0 5 1 2 0 50)}) :bytecode (1 2 0 1 3 0 1 4 0 1 5 0 1 6 0 52 1 0 5 128 0 0 5 1 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 51 42 0 128 41 0 5 51 44 0 128 43 0 5 51 46 0 128 45 0 5 51 48 0 128 47 0 5 51 50 0 128 49 0 5 51 52 0 128 51 0 5 51 54 0 128 53 0 5 51 56 0 128 55 0 5 1 58 0 128 57 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 51 68 0 128 67 0 5 51 70 0 128 69 0 50))) diff --git a/web/engine.sx b/web/engine.sx index 254dff7b..3e0c5e70 100644 --- a/web/engine.sx +++ b/web/engine.sx @@ -72,12 +72,12 @@ (fn ((tag-name :as string)) (cond - (= tag-name "FORM") + (= tag-name "form") (list (dict "event" "submit" "modifiers" (dict))) (or - (= tag-name "INPUT") - (= tag-name "SELECT") - (= tag-name "TEXTAREA")) + (= tag-name "input") + (= tag-name "select") + (= tag-name "textarea")) (list (dict "event" "change" "modifiers" (dict))) :else (list (dict "event" "click" "modifiers" (dict)))))) diff --git a/web/tests/test-engine.sx b/web/tests/test-engine.sx index c3fa2d27..343b562c 100644 --- a/web/tests/test-engine.sx +++ b/web/tests/test-engine.sx @@ -1,212 +1,182 @@ -;; ========================================================================== -;; test-engine.sx — Tests for SxEngine pure logic (engine.sx) -;; -;; Requires: test-framework.sx loaded first. -;; Platform functions: parse-time, parse-trigger-spec, default-trigger, -;; parse-swap-spec, parse-retry-spec, next-retry-ms, filter-params -;; (loaded from bootstrapped output by test runners) -;; ========================================================================== +(defsuite + "parse-time" + (deftest "seconds to ms" (assert-equal 2000 (parse-time "2s"))) + (deftest "milliseconds" (assert-equal 500 (parse-time "500ms"))) + (deftest "nil returns 0" (assert-equal 0 (parse-time nil))) + (deftest "plain number string" (assert-equal 100 (parse-time "100"))) + (deftest "one second" (assert-equal 1000 (parse-time "1s"))) + (deftest "large seconds" (assert-equal 30000 (parse-time "30s")))) - -;; -------------------------------------------------------------------------- -;; 1. parse-time — time string parsing -;; -------------------------------------------------------------------------- - -(defsuite "parse-time" - - (deftest "seconds to ms" - (assert-equal 2000 (parse-time "2s"))) - - (deftest "milliseconds" - (assert-equal 500 (parse-time "500ms"))) - - (deftest "nil returns 0" - (assert-equal 0 (parse-time nil))) - - (deftest "plain number string" - (assert-equal 100 (parse-time "100"))) - - (deftest "one second" - (assert-equal 1000 (parse-time "1s"))) - - (deftest "large seconds" - (assert-equal 30000 (parse-time "30s")))) - - -;; -------------------------------------------------------------------------- -;; 2. parse-trigger-spec — trigger attribute parsing -;; -------------------------------------------------------------------------- - -(defsuite "parse-trigger-spec" - - (deftest "nil returns nil" - (assert-nil (parse-trigger-spec nil))) - - (deftest "single event" - (let ((triggers (parse-trigger-spec "click"))) +(defsuite + "parse-trigger-spec" + (deftest "nil returns nil" (assert-nil (parse-trigger-spec nil))) + (deftest + "single event" + (let + ((triggers (parse-trigger-spec "click"))) (assert-equal 1 (len triggers)) (assert-equal "click" (get (first triggers) "event")))) - - (deftest "event with once modifier" - (let ((triggers (parse-trigger-spec "click once"))) + (deftest + "event with once modifier" + (let + ((triggers (parse-trigger-spec "click once"))) (assert-equal 1 (len triggers)) (assert-equal "click" (get (first triggers) "event")) (assert-true (get (get (first triggers) "modifiers") "once")))) - - (deftest "event with delay modifier" - (let ((triggers (parse-trigger-spec "click delay:500ms"))) + (deftest + "event with delay modifier" + (let + ((triggers (parse-trigger-spec "click delay:500ms"))) (assert-equal 1 (len triggers)) (assert-equal 500 (get (get (first triggers) "modifiers") "delay")))) - - (deftest "multiple triggers comma-separated" - (let ((triggers (parse-trigger-spec "click,change"))) + (deftest + "multiple triggers comma-separated" + (let + ((triggers (parse-trigger-spec "click,change"))) (assert-equal 2 (len triggers)) (assert-equal "click" (get (first triggers) "event")) (assert-equal "change" (get (nth triggers 1) "event")))) - - (deftest "polling trigger" - (let ((triggers (parse-trigger-spec "every 3s"))) + (deftest + "polling trigger" + (let + ((triggers (parse-trigger-spec "every 3s"))) (assert-equal 1 (len triggers)) (assert-equal "every" (get (first triggers) "event")) - (assert-equal 3000 (get (get (first triggers) "modifiers") "interval")))) - - (deftest "event with from modifier" - (let ((triggers (parse-trigger-spec "click from:body"))) + (assert-equal + 3000 + (get (get (first triggers) "modifiers") "interval")))) + (deftest + "event with from modifier" + (let + ((triggers (parse-trigger-spec "click from:body"))) (assert-equal "body" (get (get (first triggers) "modifiers") "from")))) - - (deftest "event with changed modifier" - (let ((triggers (parse-trigger-spec "keyup changed"))) + (deftest + "event with changed modifier" + (let + ((triggers (parse-trigger-spec "keyup changed"))) (assert-equal "keyup" (get (first triggers) "event")) (assert-true (get (get (first triggers) "modifiers") "changed"))))) - -;; -------------------------------------------------------------------------- -;; 3. default-trigger — default trigger by element tag -;; -------------------------------------------------------------------------- - -(defsuite "default-trigger" - - (deftest "form submits" - (let ((triggers (default-trigger "FORM"))) +(defsuite + "default-trigger" + (deftest + "form submits" + (let + ((triggers (default-trigger "form"))) (assert-equal "submit" (get (first triggers) "event")))) - - (deftest "input changes" - (let ((triggers (default-trigger "INPUT"))) + (deftest + "input changes" + (let + ((triggers (default-trigger "input"))) (assert-equal "change" (get (first triggers) "event")))) - - (deftest "select changes" - (let ((triggers (default-trigger "SELECT"))) + (deftest + "select changes" + (let + ((triggers (default-trigger "select"))) (assert-equal "change" (get (first triggers) "event")))) - - (deftest "textarea changes" - (let ((triggers (default-trigger "TEXTAREA"))) + (deftest + "textarea changes" + (let + ((triggers (default-trigger "textarea"))) (assert-equal "change" (get (first triggers) "event")))) - - (deftest "div clicks" - (let ((triggers (default-trigger "DIV"))) + (deftest + "div clicks" + (let + ((triggers (default-trigger "div"))) (assert-equal "click" (get (first triggers) "event")))) - - (deftest "button clicks" - (let ((triggers (default-trigger "BUTTON"))) + (deftest + "button clicks" + (let + ((triggers (default-trigger "button"))) (assert-equal "click" (get (first triggers) "event"))))) - -;; -------------------------------------------------------------------------- -;; 4. parse-swap-spec — swap specification parsing -;; -------------------------------------------------------------------------- - -(defsuite "parse-swap-spec" - - (deftest "default swap" - (let ((spec (parse-swap-spec nil false))) +(defsuite + "parse-swap-spec" + (deftest + "default swap" + (let + ((spec (parse-swap-spec nil false))) (assert-equal "outerHTML" (get spec "style")) (assert-false (get spec "transition")))) - - (deftest "innerHTML" - (let ((spec (parse-swap-spec "innerHTML" false))) + (deftest + "innerHTML" + (let + ((spec (parse-swap-spec "innerHTML" false))) (assert-equal "innerHTML" (get spec "style")))) - - (deftest "with transition true" - (let ((spec (parse-swap-spec "innerHTML transition:true" false))) + (deftest + "with transition true" + (let + ((spec (parse-swap-spec "innerHTML transition:true" false))) (assert-equal "innerHTML" (get spec "style")) (assert-true (get spec "transition")))) - - (deftest "transition false overrides global" - (let ((spec (parse-swap-spec "outerHTML transition:false" true))) + (deftest + "transition false overrides global" + (let + ((spec (parse-swap-spec "outerHTML transition:false" true))) (assert-equal "outerHTML" (get spec "style")) (assert-false (get spec "transition")))) - - (deftest "global transition when not overridden" - (let ((spec (parse-swap-spec "innerHTML" true))) + (deftest + "global transition when not overridden" + (let + ((spec (parse-swap-spec "innerHTML" true))) (assert-equal "innerHTML" (get spec "style")) (assert-true (get spec "transition"))))) - -;; -------------------------------------------------------------------------- -;; 5. parse-retry-spec — retry specification parsing -;; -------------------------------------------------------------------------- - -(defsuite "parse-retry-spec" - - (deftest "nil returns nil" - (assert-nil (parse-retry-spec nil))) - - (deftest "exponential backoff" - (let ((spec (parse-retry-spec "exponential:1000:30000"))) +(defsuite + "parse-retry-spec" + (deftest "nil returns nil" (assert-nil (parse-retry-spec nil))) + (deftest + "exponential backoff" + (let + ((spec (parse-retry-spec "exponential:1000:30000"))) (assert-equal "exponential" (get spec "strategy")) (assert-equal 1000 (get spec "start-ms")) (assert-equal 30000 (get spec "cap-ms")))) - - (deftest "linear strategy" - (let ((spec (parse-retry-spec "linear:2000:60000"))) + (deftest + "linear strategy" + (let + ((spec (parse-retry-spec "linear:2000:60000"))) (assert-equal "linear" (get spec "strategy")) (assert-equal 2000 (get spec "start-ms")) (assert-equal 60000 (get spec "cap-ms"))))) - -;; -------------------------------------------------------------------------- -;; 6. next-retry-ms — exponential backoff calculation -;; -------------------------------------------------------------------------- - -(defsuite "next-retry-ms" - - (deftest "doubles current" - (assert-equal 2000 (next-retry-ms 1000 30000))) - - (deftest "caps at maximum" +(defsuite + "next-retry-ms" + (deftest "doubles current" (assert-equal 2000 (next-retry-ms 1000 30000))) + (deftest + "caps at maximum" (assert-equal 30000 (next-retry-ms 20000 30000))) + (deftest "exact cap" (assert-equal 30000 (next-retry-ms 15000 30000))) + (deftest "small initial" (assert-equal 200 (next-retry-ms 100 30000)))) - (deftest "exact cap" - (assert-equal 30000 (next-retry-ms 15000 30000))) - - (deftest "small initial" - (assert-equal 200 (next-retry-ms 100 30000)))) - - -;; -------------------------------------------------------------------------- -;; 7. filter-params — form parameter filtering -;; -------------------------------------------------------------------------- - -(defsuite "filter-params" - - (deftest "nil passes all through" - (let ((params (list (list "a" "1") (list "b" "2")))) +(defsuite + "filter-params" + (deftest + "nil passes all through" + (let + ((params (list (list "a" "1") (list "b" "2")))) (assert-equal 2 (len (filter-params nil params))))) - - (deftest "none returns empty" - (let ((params (list (list "a" "1") (list "b" "2")))) + (deftest + "none returns empty" + (let + ((params (list (list "a" "1") (list "b" "2")))) (assert-equal 0 (len (filter-params "none" params))))) - - (deftest "star passes all" - (let ((params (list (list "a" "1") (list "b" "2")))) + (deftest + "star passes all" + (let + ((params (list (list "a" "1") (list "b" "2")))) (assert-equal 2 (len (filter-params "*" params))))) - - (deftest "whitelist" - (let ((params (list (list "name" "Jo") (list "age" "30") (list "secret" "x")))) - (let ((filtered (filter-params "name,age" params))) + (deftest + "whitelist" + (let + ((params (list (list "name" "Jo") (list "age" "30") (list "secret" "x")))) + (let + ((filtered (filter-params "name,age" params))) (assert-equal 2 (len filtered))))) - - (deftest "blacklist with not" - (let ((params (list (list "name" "Jo") (list "csrf" "tok") (list "age" "30")))) - (let ((filtered (filter-params "not csrf" params))) + (deftest + "blacklist with not" + (let + ((params (list (list "name" "Jo") (list "csrf" "tok") (list "age" "30")))) + (let + ((filtered (filter-params "not csrf" params))) (assert-equal 2 (len filtered))))))