["^ ","~:rename-macros",["^ "],"~:renames",["^ "],"~:externs",["^ ","~$Error",["^ "]],"~:use-macros",["^ ","~$console","~$re-frame.loggers"],"~:excludes",["~#set",[]],"~:name","~$re-frame.cofx","~:imports",null,"~:requires",["^ ","~$re-frame.db","^=","~$re-frame.interceptor","^>","~$re-frame.registrar","^?","^6","^6"],"~:cljs.spec/speced-vars",[],"~:uses",["^ ","^5","^6","~$app-db","^=","~$->interceptor","^>","~$get-handler","^?","~$clear-handlers","^?","~$register-handler","^?"],"~:defs",["^ ","~$kind",["^ ","^9","~$re-frame.cofx/kind","~:file","out-cli/re_frame/cofx.cljc","~:line",11,"~:column",1,"~:end-line",11,"~:end-column",10,"~:meta",["^ ","^J","/Users/jmmk/Dropbox/clojure/javascript-externs-generator/out-cli/re_frame/cofx.cljc","^K",11,"^L",6,"^M",11,"^N",10],"~:tag","~$cljs.core/Keyword"],"~$reg-cofx",["^ ","~:protocol-inline",null,"^O",["^ ","^J","/Users/jmmk/Dropbox/clojure/javascript-externs-generator/out-cli/re_frame/cofx.cljc","^K",14,"^L",7,"^M",14,"^N",15,"~:arglists",["~#list",["~$quote",["^U",[["~$id","~$handler"]]]]],"~:doc","Register the given coeffect `handler` for the given `id`, for later use\n  within `inject-cofx`.\n\n  `id` is keyword, often namespaced.\n  `handler` is a function which takes either one or two arguements, the first of which is\n  always `coeffects` and which returns an updated `coeffects`.\n\n  See the docs for `inject-cofx` for example use."],"^9","~$re-frame.cofx/reg-cofx","~:variadic",false,"^J","out-cli/re_frame/cofx.cljc","^N",15,"~:method-params",["^U",[["^W","^X"]]],"~:protocol-impl",null,"~:arglists-meta",["^U",[null,null]],"^L",1,"^K",14,"^M",14,"~:max-fixed-arity",2,"~:fn-var",true,"^T",["^U",["^V",["^U",[["^W","^X"]]]]],"^Y","Register the given coeffect `handler` for the given `id`, for later use\n  within `inject-cofx`.\n\n  `id` is keyword, often namespaced.\n  `handler` is a function which takes either one or two arguements, the first of which is\n  always `coeffects` and which returns an updated `coeffects`.\n\n  See the docs for `inject-cofx` for example use."],"~$inject-cofx",["^ ","^S",null,"^O",["^ ","^J","/Users/jmmk/Dropbox/clojure/javascript-externs-generator/out-cli/re_frame/cofx.cljc","^K",29,"^L",7,"^M",29,"^N",18,"^T",["^U",["^V",["^U",[["^W"],["^W","~$value"]]]]],"^Y","Given an `id`, and an optional, arbitrary `value`, returns an interceptor\n   whose `:before` adds to the `:coeffects` (map) by calling a pre-registered\n   'coeffect handler' identified by the `id`.\n\n   The previous association of a `coeffect handler` with an `id` will have\n   happened via a call to `re-frame.core/reg-cofx` - generally on program startup.\n\n   Within the created interceptor, this 'looked up' `coeffect handler` will\n   be called (within the `:before`) with two arguments:\n     - the current value of `:coeffects`\n     - optionally, the originally supplied arbitrary `value`\n\n   This `coeffect handler` is expected to modify and return its first, `coeffects` argument.\n\n   Example Of how `inject-cofx` and `reg-cofx` work together\n   ---------------------------------------------------------\n\n   1. Early in app startup, you register a `coeffect handler` for `:datetime`:\n\n      (re-frame.core/reg-cofx\n        :datetime                        ;; usage  (inject-cofx :datetime)\n        (fn coeffect-handler\n          [coeffect]\n          (assoc coeffect :now (js/Date.))))   ;; modify and return first arg\n\n   2. Later, add an interceptor to an -fx event handler, using `inject-cofx`:\n\n      (re-frame.core/reg-event-fx        ;; we are registering an event handler\n         :event-id\n         [ ... (inject-cofx :datetime) ... ]    ;; <-- create an injecting interceptor\n         (fn event-handler\n           [coeffect event]\n           ... in here can access (:now coeffect) to obtain current datetime ... )))\n\n   Background\n   ----------\n\n   `coeffects` are the input resources required by an event handler\n   to perform its job. The two most obvious ones are `db` and `event`.\n   But sometimes an event handler might need other resources.\n\n   Perhaps an event handler needs a random number or a GUID or the current\n   datetime. Perhaps it needs access to a DataScript database connection.\n\n   If an event handler directly accesses these resources, it stops being\n   pure and, consequently, it becomes harder to test, etc. So we don't\n   want that.\n\n   Instead, the interceptor created by this function is a way to 'inject'\n   'necessary resources' into the `:coeffects` (map) subsequently given\n   to the event handler at call time.","~:top-fn",["^ ","^[",false,"^13",2,"^10",["^U",[["^W"],["^W","^16"]]],"^T",["^U",[["^W"],["^W","^16"]]],"^12",["^U",[null,null]]]],"^9","~$re-frame.cofx/inject-cofx","^[",false,"^J","out-cli/re_frame/cofx.cljc","^N",18,"^17",["^ ","^[",false,"^13",2,"^10",["^U",[["^W"],["^W","^16"]]],"^T",["^U",[["^W"],["^W","^16"]]],"^12",["^U",[null,null]]],"^10",["^U",[["^W"],["^W","^16"]]],"^11",null,"^12",["^U",[null,null]],"^L",1,"^K",29,"^M",29,"^13",2,"^14",true,"^T",["^U",[["^W"],["^W","^16"]]],"^Y","Given an `id`, and an optional, arbitrary `value`, returns an interceptor\n   whose `:before` adds to the `:coeffects` (map) by calling a pre-registered\n   'coeffect handler' identified by the `id`.\n\n   The previous association of a `coeffect handler` with an `id` will have\n   happened via a call to `re-frame.core/reg-cofx` - generally on program startup.\n\n   Within the created interceptor, this 'looked up' `coeffect handler` will\n   be called (within the `:before`) with two arguments:\n     - the current value of `:coeffects`\n     - optionally, the originally supplied arbitrary `value`\n\n   This `coeffect handler` is expected to modify and return its first, `coeffects` argument.\n\n   Example Of how `inject-cofx` and `reg-cofx` work together\n   ---------------------------------------------------------\n\n   1. Early in app startup, you register a `coeffect handler` for `:datetime`:\n\n      (re-frame.core/reg-cofx\n        :datetime                        ;; usage  (inject-cofx :datetime)\n        (fn coeffect-handler\n          [coeffect]\n          (assoc coeffect :now (js/Date.))))   ;; modify and return first arg\n\n   2. Later, add an interceptor to an -fx event handler, using `inject-cofx`:\n\n      (re-frame.core/reg-event-fx        ;; we are registering an event handler\n         :event-id\n         [ ... (inject-cofx :datetime) ... ]    ;; <-- create an injecting interceptor\n         (fn event-handler\n           [coeffect event]\n           ... in here can access (:now coeffect) to obtain current datetime ... )))\n\n   Background\n   ----------\n\n   `coeffects` are the input resources required by an event handler\n   to perform its job. The two most obvious ones are `db` and `event`.\n   But sometimes an event handler might need other resources.\n\n   Perhaps an event handler needs a random number or a GUID or the current\n   datetime. Perhaps it needs access to a DataScript database connection.\n\n   If an event handler directly accesses these resources, it stops being\n   pure and, consequently, it becomes harder to test, etc. So we don't\n   want that.\n\n   Instead, the interceptor created by this function is a way to 'inject'\n   'necessary resources' into the `:coeffects` (map) subsequently given\n   to the event handler at call time."],"~$inject-db",["^ ","^9","~$re-frame.cofx/inject-db","^J","out-cli/re_frame/cofx.cljc","^K",112,"^L",1,"^M",112,"^N",15,"^O",["^ ","^J","/Users/jmmk/Dropbox/clojure/javascript-externs-generator/out-cli/re_frame/cofx.cljc","^K",112,"^L",6,"^M",112,"^N",15],"^P","~$any"]],"~:cljs.spec/registry-ref",[],"~:require-macros",null,"~:cljs.analyzer/constants",["^ ","~:seen",["^8",["~:db","~:id","~:error","~:coeffects","~:cofx","~:before"]],"~:order",["^1D","^1A","^1C","^1E","^1B","^1@"]],"^Y",null]