{:rename-macros {}, :renames {}, :use-macros {}, :excludes #{}, :name re-frame.interceptor, :imports nil, :requires {re-frame.loggers re-frame.loggers, re-frame.interop re-frame.interop}, :uses {console re-frame.loggers, ratom? re-frame.interop, empty-queue re-frame.interop, debug-enabled? re-frame.interop}, :defs {invoke-interceptors {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 70, :column 8, :end-line 70, :end-column 27, :private true, :arglists (quote ([context direction])), :doc "Loop over all interceptors, calling `direction` function on each,\n threading the value of `context` through every call.\n\n `direction` is one of `:before` or `:after`.\n\n Each iteration, the next interceptor to process is obtained from\n context's `:queue`. After they are processed, interceptors are popped\n from `:queue` and added to `:stack`.\n\n After sufficient iteration, `:queue` will be empty, and `:stack` will\n contain all interceptors processed.\n\n Returns updated `context`. Ie. the `context` which has been threaded\n through all interceptor functions.\n\n Generally speaking, an interceptor's `:before` function will (if present)\n add to a `context's` `:coeffects`, while it's `:after` function\n will modify the `context`'s `:effects`. Very approximately.\n\n But because all interceptor functions are given `context`, and can\n return a modified version of it, the way is clear for an interceptor\n to introspect the stack or queue, or even modify the queue\n (add new interceptors via `enqueue`?). This is a very fluid arrangement."}, :private true, :name re-frame.interceptor/invoke-interceptors, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 27, :method-params ([context direction]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 70, :end-line 70, :max-fixed-arity 2, :fn-var true, :arglists (quote ([context direction])), :doc "Loop over all interceptors, calling `direction` function on each,\n threading the value of `context` through every call.\n\n `direction` is one of `:before` or `:after`.\n\n Each iteration, the next interceptor to process is obtained from\n context's `:queue`. After they are processed, interceptors are popped\n from `:queue` and added to `:stack`.\n\n After sufficient iteration, `:queue` will be empty, and `:stack` will\n contain all interceptors processed.\n\n Returns updated `context`. Ie. the `context` which has been threaded\n through all interceptor functions.\n\n Generally speaking, an interceptor's `:before` function will (if present)\n add to a `context's` `:coeffects`, while it's `:after` function\n will modify the `context`'s `:effects`. Very approximately.\n\n But because all interceptor functions are given `context`, and can\n return a modified version of it, the way is clear for an interceptor\n to introspect the stack or queue, or even modify the queue\n (add new interceptors via `enqueue`?). This is a very fluid arrangement."}, assoc-coeffect {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 52, :column 7, :end-line 52, :end-column 21, :arglists (quote ([context key value]))}, :name re-frame.interceptor/assoc-coeffect, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 21, :method-params ([context key value]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 52, :end-line 52, :max-fixed-arity 3, :fn-var true, :arglists (quote ([context key value]))}, update-coeffect {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 56, :column 7, :end-line 56, :end-column 22, :arglists (quote ([context key f & args])), :top-fn {:variadic true, :max-fixed-arity 3, :method-params [(context key f args)], :arglists ([context key f & args]), :arglists-meta (nil)}}, :name re-frame.interceptor/update-coeffect, :variadic true, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 22, :top-fn {:variadic true, :max-fixed-arity 3, :method-params [(context key f args)], :arglists ([context key f & args]), :arglists-meta (nil)}, :method-params [(context key f args)], :protocol-impl nil, :arglists-meta (nil), :column 1, :line 56, :end-line 56, :max-fixed-arity 3, :fn-var true, :arglists ([context key f & args])}, invoke-interceptor-fn {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 63, :column 8, :end-line 63, :end-column 29, :private true, :arglists (quote ([context interceptor direction]))}, :private true, :name re-frame.interceptor/invoke-interceptor-fn, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 29, :method-params ([context interceptor direction]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 63, :end-line 63, :max-fixed-arity 3, :fn-var true, :arglists (quote ([context interceptor direction]))}, get-effect {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 29, :column 7, :end-line 29, :end-column 17, :arglists (quote ([context] [context key] [context key not-found])), :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([context] [context key] [context key not-found]), :arglists ([context] [context key] [context key not-found]), :arglists-meta (nil nil nil)}}, :name re-frame.interceptor/get-effect, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 17, :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([context] [context key] [context key not-found]), :arglists ([context] [context key] [context key not-found]), :arglists-meta (nil nil nil)}, :method-params ([context] [context key] [context key not-found]), :protocol-impl nil, :arglists-meta (nil nil nil), :column 1, :line 29, :end-line 29, :max-fixed-arity 3, :fn-var true, :arglists ([context] [context key] [context key not-found])}, ->interceptor {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 15, :column 7, :end-line 15, :end-column 20, :arglists (quote ([& {:as m, :keys [id before after]}])), :doc "Create an interceptor from named arguments", :top-fn {:variadic true, :max-fixed-arity 0, :method-params [({:as m, :keys [id before after]})], :arglists ([& {:as m, :keys [id before after]}]), :arglists-meta (nil)}}, :name re-frame.interceptor/->interceptor, :variadic true, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 20, :top-fn {:variadic true, :max-fixed-arity 0, :method-params [({:as m, :keys [id before after]})], :arglists ([& {:as m, :keys [id before after]}]), :arglists-meta (nil)}, :method-params [({:as m, :keys [id before after]})], :protocol-impl nil, :arglists-meta (nil), :column 1, :line 15, :end-line 15, :max-fixed-arity 0, :fn-var true, :arglists ([& {:as m, :keys [id before after]}]), :doc "Create an interceptor from named arguments"}, get-coeffect {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 44, :column 7, :end-line 44, :end-column 19, :arglists (quote ([context] [context key] [context key not-found])), :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([context] [context key] [context key not-found]), :arglists ([context] [context key] [context key not-found]), :arglists-meta (nil nil nil)}}, :name re-frame.interceptor/get-coeffect, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 19, :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([context] [context key] [context key not-found]), :arglists ([context] [context key] [context key not-found]), :arglists-meta (nil nil nil)}, :method-params ([context] [context key] [context key not-found]), :protocol-impl nil, :arglists-meta (nil nil nil), :column 1, :line 44, :end-line 44, :max-fixed-arity 3, :fn-var true, :arglists ([context] [context key] [context key not-found])}, execute {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 144, :column 7, :end-line 144, :end-column 14, :arglists (quote ([event-v interceptors])), :doc "Executes the given chain (coll) of interceptors.\n\n Each interceptor has this form:\n {:before (fn [context] ...) ;; returns possibly modified context\n :after (fn [context] ...)} ;; `identity` would be a noop\n\n Walks the queue of iterceptors from beginning to end, calling the\n `:before` fn on each, then reverse direction and walk backwards,\n calling the `:after` fn on each.\n\n The last interceptor in the chain presumably wraps an event\n handler fn. So the overall goal of the process is to \"handle\n the given event\".\n\n Thread a `context` through all calls. `context` has this form:\n\n {:coeffects {:event [:a-query-id :some-param]\n :db }\n :effects {:db \n :dispatch [:an-event-id :param1]}\n :queue \n :stack }\n\n `context` has `:coeffects` and `:effects` which, if this was a web\n server, would be somewhat anologous to `request` and `response`\n respectively.\n\n `coeffects` will contain data like `event` and the initial\n state of `db` - the inputs required by the event handler\n (sitting presumably on the end of the chain), while handler-returned\n side effects are put into `:effects` including, but not limited to,\n new values for `db`.\n\n The first few interceptors in a chain will likely have `:before`\n functions which \"prime\" the `context` by adding the event, and\n the current state of app-db into `:coeffects`. But interceptors can\n add whatever they want to `:coeffects` - perhaps the event handler needs\n some information from localstore, or a random number, or access to\n a DataScript connection.\n\n Equally, some interceptors in the chain will have `:after` fn\n which can process the side effects accumulated into `:effects`\n including but, not limited to, updates to app-db.\n\n Through both stages (before and after), `context` contains a `:queue`\n of interceptors yet to be processed, and a `:stack` of interceptors\n already done. In advanced cases, these values can be modified by the\n functions through which the context is threaded."}, :name re-frame.interceptor/execute, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 14, :method-params ([event-v interceptors]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 144, :end-line 144, :max-fixed-arity 2, :fn-var true, :arglists (quote ([event-v interceptors])), :doc "Executes the given chain (coll) of interceptors.\n\n Each interceptor has this form:\n {:before (fn [context] ...) ;; returns possibly modified context\n :after (fn [context] ...)} ;; `identity` would be a noop\n\n Walks the queue of iterceptors from beginning to end, calling the\n `:before` fn on each, then reverse direction and walk backwards,\n calling the `:after` fn on each.\n\n The last interceptor in the chain presumably wraps an event\n handler fn. So the overall goal of the process is to \"handle\n the given event\".\n\n Thread a `context` through all calls. `context` has this form:\n\n {:coeffects {:event [:a-query-id :some-param]\n :db }\n :effects {:db \n :dispatch [:an-event-id :param1]}\n :queue \n :stack }\n\n `context` has `:coeffects` and `:effects` which, if this was a web\n server, would be somewhat anologous to `request` and `response`\n respectively.\n\n `coeffects` will contain data like `event` and the initial\n state of `db` - the inputs required by the event handler\n (sitting presumably on the end of the chain), while handler-returned\n side effects are put into `:effects` including, but not limited to,\n new values for `db`.\n\n The first few interceptors in a chain will likely have `:before`\n functions which \"prime\" the `context` by adding the event, and\n the current state of app-db into `:coeffects`. But interceptors can\n add whatever they want to `:coeffects` - perhaps the event handler needs\n some information from localstore, or a random number, or access to\n a DataScript connection.\n\n Equally, some interceptors in the chain will have `:after` fn\n which can process the side effects accumulated into `:effects`\n including but, not limited to, updates to app-db.\n\n Through both stages (before and after), `context` contains a `:queue`\n of interceptors yet to be processed, and a `:stack` of interceptors\n already done. In advanced cases, these values can be modified by the\n functions through which the context is threaded."}, assoc-effect {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 38, :column 7, :end-line 38, :end-column 19, :arglists (quote ([context key value]))}, :name re-frame.interceptor/assoc-effect, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 19, :method-params ([context key value]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 38, :end-line 38, :max-fixed-arity 3, :fn-var true, :arglists (quote ([context key value]))}, enqueue {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 107, :column 7, :end-line 107, :end-column 14, :arglists (quote ([context interceptors])), :doc "Add a collection of `interceptors` to the end of `context's` execution `:queue`.\n Returns the updated `context`.\n\n In an advanced case, this function could allow an interceptor to add new\n interceptors to the `:queue` of a context."}, :name re-frame.interceptor/enqueue, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 14, :method-params ([context interceptors]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 107, :end-line 107, :max-fixed-arity 2, :fn-var true, :arglists (quote ([context interceptors])), :doc "Add a collection of `interceptors` to the end of `context's` execution `:queue`.\n Returns the updated `context`.\n\n In an advanced case, this function could allow an interceptor to add new\n interceptors to the `:queue` of a context."}, mandatory-interceptor-keys {:name re-frame.interceptor/mandatory-interceptor-keys, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :line 7, :column 1, :end-line 7, :end-column 32, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 7, :column 6, :end-line 7, :end-column 32}}, interceptor? {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 9, :column 7, :end-line 9, :end-column 19, :arglists (quote ([m]))}, :name re-frame.interceptor/interceptor?, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 19, :method-params ([m]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 9, :end-line 9, :max-fixed-arity 1, :fn-var true, :arglists (quote ([m]))}, change-direction {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 130, :column 8, :end-line 130, :end-column 24, :private true, :arglists (quote ([context])), :doc "Called on completion of `:before` processing, this function prepares/modifies\n `context` for the backwards sweep of processing in which an interceptor\n chain's `:after` fns are called.\n\n At this point in processing, the `:queue` is empty and `:stack` holds all\n the previously run interceptors. So this function enables the backwards walk\n by priming `:queue` with what's currently in `:stack`"}, :private true, :name re-frame.interceptor/change-direction, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 24, :method-params ([context]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 130, :end-line 130, :max-fixed-arity 1, :fn-var true, :arglists (quote ([context])), :doc "Called on completion of `:before` processing, this function prepares/modifies\n `context` for the backwards sweep of processing in which an interceptor\n chain's `:after` fns are called.\n\n At this point in processing, the `:queue` is empty and `:stack` holds all\n the previously run interceptors. So this function enables the backwards walk\n by priming `:queue` with what's currently in `:stack`"}, context {:protocol-inline nil, :meta {:file "/Users/simon/workspace/swinging-needle-meter/docs/js/compiled/out/re_frame/interceptor.cljc", :line 119, :column 8, :end-line 119, :end-column 15, :private true, :arglists (quote ([event interceptors] [event interceptors db])), :doc "Create a fresh context", :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([event interceptors] [event interceptors db]), :arglists ([event interceptors] [event interceptors db]), :arglists-meta (nil nil)}}, :private true, :name re-frame.interceptor/context, :variadic false, :file "docs/js/compiled/out/re_frame/interceptor.cljc", :end-column 15, :top-fn {:variadic false, :max-fixed-arity 3, :method-params ([event interceptors] [event interceptors db]), :arglists ([event interceptors] [event interceptors db]), :arglists-meta (nil nil)}, :method-params ([event interceptors] [event interceptors db]), :protocol-impl nil, :arglists-meta (nil nil), :column 1, :line 119, :end-line 119, :max-fixed-arity 3, :fn-var true, :arglists ([event interceptors] [event interceptors db]), :doc "Create a fresh context"}}, :require-macros nil, :cljs.analyzer/constants {:seen #{:unnamed :db :queue :event :after :id :effects :stack :error :coeffects :before}, :order [:after :id :before :error :unnamed :effects :coeffects :queue :stack :event :db]}, :doc nil}