diff --git a/.bowerrc b/.bowerrc new file mode 100644 index 0000000..588953d --- /dev/null +++ b/.bowerrc @@ -0,0 +1,5 @@ +{ + "directory": "public/vendors", + "strict-ssl": true, + "timeout": 60000 +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe1493a --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +/target +/classes +/checkouts +profiles.clj +pom.xml +pom.xml.asc +*.jar +*.class +/.lein-* +/.nrepl-port +/resources/public/js +/public/js/out +/out +/.repl +*.log +/.env +/node_modules diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..d800a5c --- /dev/null +++ b/.npmrc @@ -0,0 +1,7 @@ +optional=false +save-dev=true +strict-ssl=true +depth=1 +usage=true +unicode=true +shrinkwrap=true diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1e400d9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 reagent-project + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/README.md b/README.md new file mode 100644 index 0000000..40c2fd4 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# Alchemy + + diff --git a/bower.json b/bower.json new file mode 100644 index 0000000..9ea347d --- /dev/null +++ b/bower.json @@ -0,0 +1,31 @@ +{ + "name": "alchemy", + "description": "Identity Hash frontend app", + "main": "gulpfile.js", + "authors": [ + "ffimusic" + ], + "license": "MIT", + "keywords": [ + "alchemy", + "identity", + "hash" + ], + "homepage": "https://identity-hash.online", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" + ], + "dependencies": { + "particles.js": "^2.0.0", + "semantic": "semantic-ui#^2.2.7", + "animate.css": "^3.5.2", + "smooth-scroll.js": "^10.3.1", + "waypoints": "^4.0.1", + "wow": "^1.1.2" + } +} diff --git a/env/dev/cljs/alchemy/dev.cljs b/env/dev/cljs/alchemy/dev.cljs new file mode 100644 index 0000000..bbe7de5 --- /dev/null +++ b/env/dev/cljs/alchemy/dev.cljs @@ -0,0 +1,11 @@ +(ns ^:figwheel-no-load alchemy.dev + (:require [alchemy.core :as core] + [figwheel.client :as figwheel :include-macros true])) + +(enable-console-print!) + +(figwheel/watch-and-reload + :websocket-url "ws://localhost:3449/figwheel-ws" + :jsload-callback core/mount-root) + +(core/init!) diff --git a/env/prod/cljs/alchemy/prod.cljs b/env/prod/cljs/alchemy/prod.cljs new file mode 100644 index 0000000..a46d27b --- /dev/null +++ b/env/prod/cljs/alchemy/prod.cljs @@ -0,0 +1,7 @@ +(ns alchemy.prod + (:require [alchemy.core :as core])) + +;;ignore println statements in prod +(set! *print-fn* (fn [& _])) + +(core/init!) diff --git a/externs/typedef.js b/externs/typedef.js new file mode 100644 index 0000000..fcb4d19 --- /dev/null +++ b/externs/typedef.js @@ -0,0 +1,6 @@ +var particleJS = function(){}; +var smoothScroll = function(){}; + +var WOW = {}; +WOW.init = function(){}; + diff --git a/gulpfile.js b/gulpfile.js new file mode 100644 index 0000000..c04df38 --- /dev/null +++ b/gulpfile.js @@ -0,0 +1,40 @@ +const gulp = require('gulp'); +const postcss = require('gulp-postcss'); +const sourcemaps = require('gulp-sourcemaps'); +const plumber = require('gulp-plumber'); +const imagemin = require('gulp-imagemin'); + +const plugins = [ + require('precss'), + require('autoprefixer'), + require('lost'), + require('cssnano') +]; + +gulp.task('css', () => { + let rename = require('gulp-rename'); + return gulp.src('./public/css/src/**/*.postcss') + .pipe(plumber()) + .pipe(rename({extname: '.css'})) + .pipe(sourcemaps.init()) + .pipe(gulp.dest('./public/css')) + .pipe(postcss(plugins)) + .pipe(rename({extname: '.min.css'})) + .pipe(sourcemaps.write('.')) + .pipe(gulp.dest('./public/css')) +}); + +gulp.task('images', () => { + return gulp.src('./public/images/unop/**/*') + .pipe(plumber()) + .pipe(imagemin()) + .pipe(gulp.dest('./public/images')); +}); + +gulp.task('watch', () => { + gulp.watch('./public/css/src/**/*.postcss', ['css']); + gulp.watch('./public/images/unop/**/*', ['images']); +}); + +gulp.task('default', ['css', 'images']); + diff --git a/index.js b/index.js new file mode 100644 index 0000000..3af0d51 --- /dev/null +++ b/index.js @@ -0,0 +1,10 @@ +var express = require('express'); +var serveStatic = require('serve-static'); + +var app = express(); + +app.set('port', (process.env.PORT || 3449)); +app.use(serveStatic(__dirname + '/public/', {'index': ['index.html']})); +app.listen(app.get('port'), () => { + console.log('Identity Hash is running on port', app.get('port')); +}); diff --git a/package.json b/package.json new file mode 100644 index 0000000..fcafa3d --- /dev/null +++ b/package.json @@ -0,0 +1,35 @@ +{ + "name": "0-alchemy-fe", + "version": "0.1.0", + "description": "Identity Hash frontend app", + "main": "index.js", + "scripts": { + "start": "node index.js", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://bitbucket.org/ffilabs/0-alchemy-fe.git" + }, + "keywords": [ + "alchemy", + "frontend", + "identity-hash" + ], + "author": "ffimusic", + "license": "MIT", + "homepage": "https://identity-hash.online", + "dependencies": { + "autoprefixer": "^6.7.7", + "cssnano": "^3.10.0", + "express": "^4.14.1", + "gulp-imagemin": "^3.2.0", + "gulp-plumber": "^1.1.0", + "gulp-postcss": "^6.4.0", + "gulp-rename": "^1.2.2", + "gulp-sourcemaps": "^2.4.1", + "lost": "^8.0.0", + "precss": "^1.4.0", + "serve-static": "^1.11.2" + } +} diff --git a/project.clj b/project.clj new file mode 100644 index 0000000..8cb8d78 --- /dev/null +++ b/project.clj @@ -0,0 +1,63 @@ +(defproject alchemy "0.1.0-SNAPSHOT" + :description "Identity Hash frontend app" + :url "https://identity-hash.online" + :license {:name "Eclipse Public License" + :url "http://www.eclipse.org/legal/epl-v10.html"} + + :dependencies [[org.clojure/clojure "1.9.0-alpha17" :scope "provided"] + [org.clojure/clojurescript "1.9.562" :scope "provided"] + [org.clojure/core.async "0.3.443" :exclusions [org.clojure/tools.reader]] + [reagent "0.6.2"] + [reagent-utils "0.2.1"] + [secretary "1.2.3"] + [venantius/accountant "0.2.0" :exclusions [org.clojure/tools.reader]]] + + :plugins [[lein-figwheel "0.5.10"] + [lein-cljsbuild "1.1.6" :exclusions [[org.clojure/clojure]]]] + + :min-lein-version "2.5.0" + + :clean-targets ^{:protect false} + [:target-path + [:cljsbuild :builds :app :compiler :output-dir] + [:cljsbuild :builds :app :compiler :output-to] + [:cljsbuild :builds :release :compiler :output-dir] + [:cljsbuild :builds :release :compiler :output-to]] + + :resource-paths ["public"] + + :figwheel {:http-server-root "." + :nrepl-port 7002 + :nrepl-middleware ["cemerick.piggieback/wrap-cljs-repl"] + :repl false + :css-dirs ["public/css"]} + + :cljsbuild {:builds {:app + {:source-paths ["src" "env/dev/cljs"] + :compiler + {:main "alchemy.dev" + :output-to "public/js/app.js" + :output-dir "public/js/out" + :asset-path "js/out" + :source-map true + :source-map-timestamp true + :optimizations :none + :pretty-print true} + :figwheel + {:open-urls ["http://localhost:3449/index.html"]}} + :release + {:source-paths ["src" "env/prod/cljs"] + :compiler + {:main "alchemy.prod" + :externs ["externs/typedef.js"] + :output-to "public/js/app.js" + :output-dir "public/js/rel" + :asset-path "js/rel" + :optimizations :advanced + :pretty-print false}}}} + + :aliases {"release" ["do" "clean" ["cljsbuild" "once" "release"]]} + + :profiles {:dev {:dependencies [[figwheel-sidecar "0.5.9"] + [org.clojure/tools.nrepl "0.2.12"] + [com.cemerick/piggieback "0.2.2-SNAPSHOT"]]}}) diff --git a/public/.gitignore b/public/.gitignore new file mode 100644 index 0000000..4a47c6d --- /dev/null +++ b/public/.gitignore @@ -0,0 +1 @@ +/vendors/ diff --git a/public/alchemy.sw.js b/public/alchemy.sw.js new file mode 100644 index 0000000..8453c9a --- /dev/null +++ b/public/alchemy.sw.js @@ -0,0 +1,68 @@ +const CACHE_NAME = 'identity-hash'; +const URLS_TO_CACHE = [ + '/index.html', + '/og.html', + '/alchemy.sw.js', + '/manifest.json', + '/images/full-identity.png', + '/images/favicon.png', + '/images/logo-id-144.png', + '/images/logo-id-192.png', + '/images/app_store_badge.png', + '/images/google_play_badge.png', + '/images/logo-ovh-avec-gray.png', + '/images/logo-ovh-avec-colored.png', + '/images/messenger_mock.gif', + '/images/your-identity.png', + '/images/import/about.png', + '/images/import/automation.png', + '/images/import/data_driven.png', + '/images/import/enterprise.png', + '/images/import/feature_1.png', + '/images/import/feature_2.png', + '/images/import/feature_3.png', + '/images/import/feature_4.png', + '/images/import/feature_5.png', + '/images/import/get-identity.png', + '/images/import/iphone_mockup.png', + '/images/import/topup.png', + '/vendors/semantic/dist/semantic.min.css', + '/vendors/animate.css/animate.min.css', + '/css/alchemy.min.css', + '/css/alchemy.min.css.map', + '/vendors/particles.js/particles.min.js', + '/vendors/smooth-scroll.js/dist/js/smooth-scroll.min.js', + '/vendors/wow/dist/wow.min.js', + '/js/app.js', + '/others/pjs-config.json' +]; + +self.addEventListener('install', function(event) { + event.waitUntil( + caches.open(CACHE_NAME).then(function(cache) { + return cache.addAll(URLS_TO_CACHE); + }) + ); +}); + +self.addEventListener('fetch', function(event) { + if (!event.request.url.includes("data")) { + event.respondWith( + caches.match(event.request).then(function(response) { + return response || fetch(event.request.clone()).then(function(resp) { + if (!resp || resp.status !== 200 || resp.type !== 'basic') { + return resp; + } + return caches.open(CACHE_NAME).then(function(cache) { + cache.put(event.request, resp.clone()); + }); + return resp; + }); + }) + ); + } +}); + +self.addEventListener('activate', function(event) { + +}); diff --git a/public/css/alchemy.css b/public/css/alchemy.css new file mode 100644 index 0000000..f0696f1 --- /dev/null +++ b/public/css/alchemy.css @@ -0,0 +1,270 @@ +@import url('https://fonts.googleapis.com/css?family=Questrial|Roboto'); + +$primary: #5764c6; +$secondary: #eff1fa; +$dark: #454d5d; +$gray-dark: #727e96; +$gray: #acb3c2; +$gray-light: #e7e9ed; +$border: #f0f1f4; +$background: #f8f9fa; +$light: #ffffff; +$success: #32b643; +$warning: #ffb700; +$error: #e85600; + +body { + font-family: 'Roboto', sans-serif !important; + background-color: $light; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Questrial', sans-serif !important; +} + +.alchemy.root { + display: flex; + min-height: 100vh; + flex-direction: column; +} + +.alchemy.header { + .ui.menu .item img.logo { + margin-right: 0; + width: 7.4em; + } +} + +.alchemy.content { + margin-top: 3.14em; + flex: 1; +} + +.alchemy.footer { + margin-top: 3.14em; + .copyright { + color: #c2c2c2; + } +} + +#home { + background-color: #7b86d9; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%233b48aa' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + display: flex; + align-items: center; + position: relative; + #particles-js { + position: absolute; + width: 100%; + height: 100%; + } + .ui.container { + z-index: 1; + .ui.header { + font-size: 4.6rem; + color: #fff; + .sub.header { + color: #fff; + font-size: 1.6rem; + } + } + .ui.button { + margin-top: 2em; + width: 16rem; + color: #fff; + } + } +} + +#about { + background-color: #56a7db; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%231477b7' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + .two.column { + margin: auto; + .ui.header { + color: $light; + font-size: 3rem; + } + p { + color: $light; + text-align: justify; + } + } + .three.column { + margin: auto; + padding-top: 4rem; + .ui.header { + color: $light; + } + p { + color: $light; + text-align: justify; + } + } +} + +#feature1, #feature2, #feature3, #feature4, #feature5, #feature6, #feature7, #feature8, #feature9 { + min-height: 20em; + min-width: 100vw; + display: flex; + align-items: center; + .column { + margin: auto; + .ui.header { + color: $light; + font-size: 3rem; + } + p { + color: $light; + } + } +} + +#feature1 { + background-color: #d6c5aa; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23967d55' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature2 { + background-color: #95a6cd; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23435c90' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature3 { + background-color: #bbbba4; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23747455' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature4 { + background-color: #e1557d; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a71740' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature5 { + background-color: #4ba18b; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%2319755e' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature6 { + background-color: #77b3d4; +} + +#enterprise { + background-color: #6c7180; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23383e51' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + padding-bottom: 4rem; + .column { + margin: auto; + .ui.header { + color: $light; + text-align: center; + } + .ui.button { + margin-top: 4rem; + } + p { + color: $light; + text-align: justify; + } + } +} + +#consumers { + background-color: #b199be; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%236d4584' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + .column { + margin: auto; + .ui.header { + color: $light; + text-align: center; + } + p { + color: $light; + text-align: justify; + } + } +} + +#topup { + background-color: transparent; + padding-top: 4rem; + padding-bottom: 4rem; +} + +#get-identity { + background-color: #eff1fa; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2aad1' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + padding-bottom: 4rem; + .column { + margin: auto; + .ui.header { + color: $gray-dark; + font-size: 3rem; + } + } +} + +#meet-sophia { + background-color: #ffffff; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2a0a0' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + padding-bottom: 4rem; + .column { + margin: auto; + .ui.header { + color: $gray-dark; + font-size: 3rem; + } + .ui.image { + padding-left: 0; + padding-right: 0; + box-shadow: 0px 5px 17px 1px rgba(0,0,0,0.45); + } + } +} + +#investors { + background-color: #f8f9fa; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23b1c0ce' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 20em; + min-width: 100vw; + padding-top: 4rem; + .ui.header { + color: $gray-dark; + text-align: center; + font-size: 3rem; + } + .swap { + width: 50%; + } + .swap img:last-child { + display: none; + } + .swap:hover img:first-child { + display: none; + } + .swap:hover img:last-child { + display: block; + } +} + +#privacy, #terms { + margin-top: 3.14em; +} + diff --git a/public/css/alchemy.css.map b/public/css/alchemy.css.map new file mode 100644 index 0000000..7c3a80f --- /dev/null +++ b/public/css/alchemy.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["alchemy.css"],"names":[],"mappings":"AAAA,wEAAwE,AAexE,KACE,wCAA6C,AAC7C,qBAAyB,CAC1B,AAED,kBACE,0CAAgD,CACjD,AAED,cACE,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,iBAAkB,AAClB,4BAAuB,AAAvB,6BAAuB,AAAvB,0BAAuB,AAAvB,qBAAuB,CACxB,AAGC,wCACE,eAAgB,AAChB,WAAa,CACd,AAGH,iBAEE,mBAAQ,AAAR,WAAQ,AAAR,MAAQ,CACT,AAED,iCAJE,iBAAmB,CASpB,AAHC,2BACE,aAAkB,CACnB,AAGH,MACE,yBAA2B,AAC3B,gBAAiB,AACjB,gBAAiB,AACjB,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,yBAAoB,AAApB,sBAAoB,AAApB,mBAAoB,AACpB,iBAAmB,CAsBpB,AArBC,oBACE,kBAAmB,AACnB,WAAY,AACZ,WAAa,CACd,AACD,oBACE,SAAW,CAcZ,AAbC,+BACE,iBAAkB,AAClB,UAAY,CAKb,AAJC,2CACE,WAAY,AACZ,gBAAkB,CACnB,AAEH,+BACE,eAAgB,AAChB,YAAa,AACb,UAAY,CACb,AAIL,OACE,yBAA0B,AAC1B,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAYnB,AAXC,eACE,WAAa,CASd,AARC,0BACE,WAAc,AACd,cAAgB,CACjB,AACD,iBACE,WAAc,AACd,kBAAoB,CACrB,AAIL,0FACE,gBAAiB,AACjB,gBAAiB,AACjB,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,yBAAoB,AAApB,sBAAoB,AAApB,kBAAoB,CAWrB,AAVC,kKACE,WAAa,CAQd,AAPC,qQACE,WAAc,AACd,cAAgB,CACjB,AACD,oLACE,UAAc,CACf,AAIL,UAAY,wBAA0B,CAAE,AACxC,UAAY,wBAA0B,CAAE,AACxC,UAAY,wBAA0B,CAAE,AACxC,UAAY,wBAA0B,CAAE,AACxC,UAAY,wBAA0B,CAAE,AACxC,UAAY,wBAA0B,CAAE,AAExC,YACE,yBAA0B,AAC1B,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAQnB,AAPC,oBACE,WAAa,CAKd,AAJC,+BACE,WAAc,AACd,iBAAmB,CACpB,AAIL,WACE,yBAA0B,AAC1B,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAMnB,AALC,sBACE,WAAc,AACd,kBAAmB,AACnB,cAAgB,CACjB,AAGH,OACE,yBAA0B,AAC1B,iBAAkB,AAClB,mBAAqB,CACtB,AAED,cACE,yBAA6B,AAC7B,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAMnB,AALC,yBACE,cAAkB,AAClB,kBAAmB,AACnB,cAAgB,CACjB,AAGH,aACE,sBAAyB,AACzB,gBAAiB,AACjB,gBAAiB,AACjB,iBAAkB,AAClB,mBAAqB,CAatB,AAZC,qBACE,WAAa,CAUd,AATC,gCACE,cAAkB,AAClB,cAAgB,CACjB,AACD,+BACE,eAAgB,AAChB,gBAAiB,AACjB,yCAA8C,CAC/C,AAIL,WACE,yBAA8B,AAC9B,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAkBnB,AAjBC,sBACE,cAAkB,AAClB,kBAAmB,AACnB,cAAgB,CACjB,AACD,iBACE,SAAW,CACZ,AAID,uEACE,YAAc,CACf,AACD,sCACE,aAAe,CAChB,AAGH,gBACE,iBAAmB,CACpB","file":"alchemy.css","sourcesContent":["@import url('https://fonts.googleapis.com/css?family=Questrial|Roboto');\n\n$primary: #5764c6;\n$secondary: #eff1fa;\n$dark: #454d5d;\n$gray-dark: #727e96;\n$gray: #acb3c2;\n$gray-light: #e7e9ed;\n$border: #f0f1f4;\n$background: #f8f9fa;\n$light: #ffffff;\n$success: #32b643;\n$warning: #ffb700;\n$error: #e85600;\n\nbody {\n font-family: 'Roboto', sans-serif !important;\n background-color: $light;\n}\n\nh1, h2, h3, h4, h5, h6 {\n font-family: 'Questrial', sans-serif !important;\n}\n\n.alchemy.root {\n display: flex;\n min-height: 100vh;\n flex-direction: column;\n}\n\n.alchemy.header {\n .ui.menu .item img.logo {\n margin-right: 0;\n width: 7.4em;\n }\n}\n\n.alchemy.content {\n margin-top: 3.14em;\n flex: 1;\n}\n\n.alchemy.footer {\n margin-top: 3.14em;\n .copyright {\n color: $gray-dark;\n }\n}\n\n#home {\n background-color: $primary;\n min-height: 42em;\n min-width: 100vw;\n display: flex;\n align-items: center;\n position: relative;\n #particles-js {\n position: absolute;\n width: 100%;\n height: 100%;\n }\n .ui.container {\n z-index: 1;\n .ui.header {\n font-size: 4.6rem;\n color: #fff;\n .sub.header {\n color: #fff;\n font-size: 1.6rem;\n }\n }\n .ui.button {\n margin-top: 2em;\n width: 16rem;\n color: #fff;\n }\n }\n}\n\n#about {\n background-color: #1c2ba1;\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n .column {\n margin: auto;\n .ui.header {\n color: $light;\n font-size: 3rem;\n }\n p {\n color: $light;\n text-align: justify;\n }\n }\n}\n\n#feature1, #feature2, #feature3, #feature4, #feature5, #feature6, #feature7, #feature8, #feature9 {\n min-height: 20em;\n min-width: 100vw;\n display: flex;\n align-items: center;\n .column {\n margin: auto;\n .ui.header {\n color: $light;\n font-size: 3rem;\n }\n p {\n color: $light;\n }\n }\n}\n\n#feature1 { background-color: #38465d; }\n#feature2 { background-color: #c17638; }\n#feature3 { background-color: #bbbba4; }\n#feature4 { background-color: #38465d; }\n#feature5 { background-color: #4ba18b; }\n#feature6 { background-color: #77b3d4; }\n\n#enterprise {\n background-color: #1c2ba1;\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n .column {\n margin: auto;\n .ui.header {\n color: $light;\n text-align: center;\n }\n }\n}\n\n#consumers {\n background-color: #5764c6;\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n .ui.header {\n color: $light;\n text-align: center;\n font-size: 3rem;\n }\n}\n\n#topup {\n background-color: #5764c6;\n padding-top: 4rem;\n padding-bottom: 4rem;\n}\n\n#get-identity {\n background-color: $secondary;\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n .ui.header {\n color: $gray-dark;\n text-align: center;\n font-size: 3rem;\n }\n}\n\n#meet-sophia {\n background-color: $light;\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n padding-bottom: 4rem;\n .column {\n margin: auto;\n .ui.header {\n color: $gray-dark;\n font-size: 3rem;\n }\n .ui.image {\n padding-left: 0;\n padding-right: 0;\n box-shadow: 0px 5px 17px 1px rgba(0,0,0,0.75);\n }\n }\n}\n\n#investors {\n background-color: $background;\n min-height: 20em;\n min-width: 100vw;\n padding-top: 4rem;\n .ui.header {\n color: $gray-dark;\n text-align: center;\n font-size: 3rem;\n }\n .swap {\n width: 50%;\n }\n .swap img:last-child {\n display: none;\n }\n .swap:hover img:first-child {\n display: none;\n }\n .swap:hover img:last-child {\n display: block;\n }\n}\n\n#privacy, #terms {\n margin-top: 3.14em;\n}\n\n"]} \ No newline at end of file diff --git a/public/css/alchemy.min.css b/public/css/alchemy.min.css new file mode 100644 index 0000000..0de1add --- /dev/null +++ b/public/css/alchemy.min.css @@ -0,0 +1,2 @@ +@import url("https://fonts.googleapis.com/css?family=Questrial|Roboto");body{font-family:Roboto,sans-serif!important;background-color:#fff}h1,h2,h3,h4,h5,h6{font-family:Questrial,sans-serif!important}.alchemy.root{display:-webkit-box;display:-ms-flexbox;display:flex;min-height:100vh;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.alchemy.header .ui.menu .item img.logo{margin-right:0;width:7.4em}.alchemy.content{-webkit-box-flex:1;-ms-flex:1;flex:1}.alchemy.content,.alchemy.footer{margin-top:3.14em}.alchemy.footer .copyright{color:#c2c2c2}#home{background-color:#7b86d9;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%233b48aa' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E");min-height:42em;min-width:100vw;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;position:relative}#home #particles-js{position:absolute;width:100%;height:100%}#home .ui.container{z-index:1}#home .ui.container .ui.header{font-size:4.6rem;color:#fff}#home .ui.container .ui.header .sub.header{color:#fff;font-size:1.6rem}#home .ui.container .ui.button{margin-top:2em;width:16rem;color:#fff}#about{background-color:#56a7db;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%231477b7' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E");min-height:42em;min-width:100vw;padding-top:4rem}#about .two.column{margin:auto}#about .two.column .ui.header{color:#fff;font-size:3rem}#about .two.column p{color:#fff;text-align:justify}#about .three.column{margin:auto;padding-top:4rem}#about .three.column .ui.header{color:#fff}#about .three.column p{color:#fff;text-align:justify}#feature1,#feature2,#feature3,#feature4,#feature5,#feature6,#feature7,#feature8,#feature9{min-height:20em;min-width:100vw;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}#feature1 .column,#feature2 .column,#feature3 .column,#feature4 .column,#feature5 .column,#feature6 .column,#feature7 .column,#feature8 .column,#feature9 .column{margin:auto}#feature1 .column .ui.header,#feature2 .column .ui.header,#feature3 .column .ui.header,#feature4 .column .ui.header,#feature5 .column .ui.header,#feature6 .column .ui.header,#feature7 .column .ui.header,#feature8 .column .ui.header,#feature9 .column .ui.header{color:#fff;font-size:3rem}#feature1 .column p,#feature2 .column p,#feature3 .column p,#feature4 .column p,#feature5 .column p,#feature6 .column p,#feature7 .column p,#feature8 .column p,#feature9 .column p{color:#fff}#feature1{background-color:#d6c5aa;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23967d55' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E")}#feature2{background-color:#95a6cd;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23435c90' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E")}#feature3{background-color:#bbbba4;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23747455' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E")}#feature4{background-color:#e1557d;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a71740' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E")}#feature5{background-color:#4ba18b;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%2319755e' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E")}#feature6{background-color:#77b3d4}#enterprise{background-color:#6c7180;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23383e51' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E");min-height:42em;min-width:100vw;padding-top:4rem;padding-bottom:4rem}#enterprise .column{margin:auto}#enterprise .column .ui.header{color:#fff;text-align:center}#enterprise .column .ui.button{margin-top:4rem}#enterprise .column p{color:#fff;text-align:justify}#consumers{background-color:#b199be;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%236d4584' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E");min-height:42em;min-width:100vw;padding-top:4rem}#consumers .column{margin:auto}#consumers .column .ui.header{color:#fff;text-align:center}#consumers .column p{color:#fff;text-align:justify}#topup{background-color:transparent}#get-identity,#topup{padding-top:4rem;padding-bottom:4rem}#get-identity{background-color:#eff1fa;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2aad1' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E");min-height:42em;min-width:100vw}#get-identity .column{margin:auto}#get-identity .column .ui.header{color:#727e96;font-size:3rem}#meet-sophia{background-color:#fff;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2a0a0' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E");min-height:42em;min-width:100vw;padding-top:4rem;padding-bottom:4rem}#meet-sophia .column{margin:auto}#meet-sophia .column .ui.header{color:#727e96;font-size:3rem}#meet-sophia .column .ui.image{padding-left:0;padding-right:0;box-shadow:0 5px 17px 1px rgba(0,0,0,.45)}#investors{background-color:#f8f9fa;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23b1c0ce' fill-opacity='.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'/%3E%3C/svg%3E");min-height:20em;min-width:100vw;padding-top:4rem}#investors .ui.header{color:#727e96;text-align:center;font-size:3rem}#investors .swap{width:50%}#investors .swap:hover img:first-child,#investors .swap img:last-child{display:none}#investors .swap:hover img:last-child{display:block}#privacy,#terms{margin-top:3.14em} +/*# sourceMappingURL=alchemy.min.css.map */ diff --git a/public/css/alchemy.min.css.map b/public/css/alchemy.min.css.map new file mode 100644 index 0000000..fa4cedc --- /dev/null +++ b/public/css/alchemy.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["alchemy.css"],"names":[],"mappings":"AAAA,wEAAwE,AAexE,KACE,wCAA6C,AAC7C,qBAAyB,CAC1B,AAED,kBACE,0CAAgD,CACjD,AAED,cACE,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,iBAAkB,AAClB,4BAAuB,AAAvB,6BAAuB,AAAvB,0BAAuB,AAAvB,qBAAuB,CACxB,AAGC,wCACE,eAAgB,AAChB,WAAa,CACd,AAGH,iBAEE,mBAAQ,AAAR,WAAQ,AAAR,MAAQ,CACT,AAED,iCAJE,iBAAmB,CASpB,AAHC,2BACE,aAAe,CAChB,AAGH,MACE,yBAA0B,AAC1B,oOAAkO,AAClO,gBAAiB,AACjB,gBAAiB,AACjB,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,yBAAoB,AAApB,sBAAoB,AAApB,mBAAoB,AACpB,iBAAmB,CAsBpB,AArBC,oBACE,kBAAmB,AACnB,WAAY,AACZ,WAAa,CACd,AACD,oBACE,SAAW,CAcZ,AAbC,+BACE,iBAAkB,AAClB,UAAY,CAKb,AAJC,2CACE,WAAY,AACZ,gBAAkB,CACnB,AAEH,+BACE,eAAgB,AAChB,YAAa,AACb,UAAY,CACb,AAIL,OACE,yBAA0B,AAC1B,oOAAkO,AAClO,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAuBnB,AAtBC,mBACE,WAAa,CASd,AARC,8BACE,WAAc,AACd,cAAgB,CACjB,AACD,qBACE,WAAc,AACd,kBAAoB,CACrB,AAEH,qBACE,YAAa,AACb,gBAAkB,CAQnB,AAPC,gCACE,UAAc,CACf,AACD,uBACE,WAAc,AACd,kBAAoB,CACrB,AAIL,0FACE,gBAAiB,AACjB,gBAAiB,AACjB,oBAAc,AAAd,oBAAc,AAAd,aAAc,AACd,yBAAoB,AAApB,sBAAoB,AAApB,kBAAoB,CAWrB,AAVC,kKACE,WAAa,CAQd,AAPC,qQACE,WAAc,AACd,cAAgB,CACjB,AACD,oLACE,UAAc,CACf,AAIL,UACE,yBAA0B,AAC1B,mOAAkO,CACnO,AAED,UACE,yBAA0B,AAC1B,mOAAkO,CACnO,AAED,UACE,yBAA0B,AAC1B,mOAAkO,CACnO,AAED,UACE,yBAA0B,AAC1B,mOAAkO,CACnO,AAED,UACE,yBAA0B,AAC1B,mOAAkO,CACnO,AAED,UACE,wBAA0B,CAC3B,AAED,YACE,yBAA0B,AAC1B,oOAAkO,AAClO,gBAAiB,AACjB,gBAAiB,AACjB,iBAAkB,AAClB,mBAAqB,CAetB,AAdC,oBACE,WAAa,CAYd,AAXC,+BACE,WAAc,AACd,iBAAmB,CACpB,AACD,+BACE,eAAiB,CAClB,AACD,sBACE,WAAc,AACd,kBAAoB,CACrB,AAIL,WACE,yBAA0B,AAC1B,oOAAkO,AAClO,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAYnB,AAXC,mBACE,WAAa,CASd,AARC,8BACE,WAAc,AACd,iBAAmB,CACpB,AACD,qBACE,WAAc,AACd,kBAAoB,CACrB,AAIL,OACE,4BAA8B,CAG/B,AAED,qBAJE,iBAAkB,AAClB,mBAAqB,CAiBtB,AAdD,cACE,yBAA0B,AAC1B,oOAAkO,AAClO,gBAAiB,AACjB,eAAiB,CAUlB,AAPC,sBACE,WAAa,CAKd,AAJC,iCACE,cAAkB,AAClB,cAAgB,CACjB,AAIL,aACE,sBAA0B,AAC1B,oOAAkO,AAClO,gBAAiB,AACjB,gBAAiB,AACjB,iBAAkB,AAClB,mBAAqB,CAatB,AAZC,qBACE,WAAa,CAUd,AATC,gCACE,cAAkB,AAClB,cAAgB,CACjB,AACD,+BACE,eAAgB,AAChB,gBAAiB,AACjB,yCAA8C,CAC/C,AAIL,WACE,yBAA0B,AAC1B,oOAAkO,AAClO,gBAAiB,AACjB,gBAAiB,AACjB,gBAAkB,CAkBnB,AAjBC,sBACE,cAAkB,AAClB,kBAAmB,AACnB,cAAgB,CACjB,AACD,iBACE,SAAW,CACZ,AAID,uEACE,YAAc,CACf,AACD,sCACE,aAAe,CAChB,AAGH,gBACE,iBAAmB,CACpB","file":"alchemy.min.css","sourcesContent":["@import url('https://fonts.googleapis.com/css?family=Questrial|Roboto');\n\n$primary: #5764c6;\n$secondary: #eff1fa;\n$dark: #454d5d;\n$gray-dark: #727e96;\n$gray: #acb3c2;\n$gray-light: #e7e9ed;\n$border: #f0f1f4;\n$background: #f8f9fa;\n$light: #ffffff;\n$success: #32b643;\n$warning: #ffb700;\n$error: #e85600;\n\nbody {\n font-family: 'Roboto', sans-serif !important;\n background-color: $light;\n}\n\nh1, h2, h3, h4, h5, h6 {\n font-family: 'Questrial', sans-serif !important;\n}\n\n.alchemy.root {\n display: flex;\n min-height: 100vh;\n flex-direction: column;\n}\n\n.alchemy.header {\n .ui.menu .item img.logo {\n margin-right: 0;\n width: 7.4em;\n }\n}\n\n.alchemy.content {\n margin-top: 3.14em;\n flex: 1;\n}\n\n.alchemy.footer {\n margin-top: 3.14em;\n .copyright {\n color: #c2c2c2;\n }\n}\n\n#home {\n background-color: #7b86d9;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%233b48aa' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n min-height: 42em;\n min-width: 100vw;\n display: flex;\n align-items: center;\n position: relative;\n #particles-js {\n position: absolute;\n width: 100%;\n height: 100%;\n }\n .ui.container {\n z-index: 1;\n .ui.header {\n font-size: 4.6rem;\n color: #fff;\n .sub.header {\n color: #fff;\n font-size: 1.6rem;\n }\n }\n .ui.button {\n margin-top: 2em;\n width: 16rem;\n color: #fff;\n }\n }\n}\n\n#about {\n background-color: #56a7db;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%231477b7' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n .two.column {\n margin: auto;\n .ui.header {\n color: $light;\n font-size: 3rem;\n }\n p {\n color: $light;\n text-align: justify;\n }\n }\n .three.column {\n margin: auto;\n padding-top: 4rem;\n .ui.header {\n color: $light;\n }\n p {\n color: $light;\n text-align: justify;\n }\n }\n}\n\n#feature1, #feature2, #feature3, #feature4, #feature5, #feature6, #feature7, #feature8, #feature9 {\n min-height: 20em;\n min-width: 100vw;\n display: flex;\n align-items: center;\n .column {\n margin: auto;\n .ui.header {\n color: $light;\n font-size: 3rem;\n }\n p {\n color: $light;\n }\n }\n}\n\n#feature1 {\n background-color: #d6c5aa;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23967d55' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n}\n\n#feature2 {\n background-color: #95a6cd;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23435c90' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n}\n\n#feature3 {\n background-color: #bbbba4;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23747455' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n}\n\n#feature4 {\n background-color: #e1557d;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a71740' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n}\n\n#feature5 {\n background-color: #4ba18b;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%2319755e' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n}\n\n#feature6 {\n background-color: #77b3d4;\n}\n\n#enterprise {\n background-color: #6c7180;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23383e51' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n padding-bottom: 4rem;\n .column {\n margin: auto;\n .ui.header {\n color: $light;\n text-align: center;\n }\n .ui.button {\n margin-top: 4rem;\n }\n p {\n color: $light;\n text-align: justify;\n }\n }\n}\n\n#consumers {\n background-color: #b199be;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%236d4584' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n .column {\n margin: auto;\n .ui.header {\n color: $light;\n text-align: center;\n }\n p {\n color: $light;\n text-align: justify;\n }\n }\n}\n\n#topup {\n background-color: transparent;\n padding-top: 4rem;\n padding-bottom: 4rem;\n}\n\n#get-identity {\n background-color: #eff1fa;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2aad1' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n padding-bottom: 4rem;\n .column {\n margin: auto;\n .ui.header {\n color: $gray-dark;\n font-size: 3rem;\n }\n }\n}\n\n#meet-sophia {\n background-color: #ffffff;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2a0a0' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n min-height: 42em;\n min-width: 100vw;\n padding-top: 4rem;\n padding-bottom: 4rem;\n .column {\n margin: auto;\n .ui.header {\n color: $gray-dark;\n font-size: 3rem;\n }\n .ui.image {\n padding-left: 0;\n padding-right: 0;\n box-shadow: 0px 5px 17px 1px rgba(0,0,0,0.45);\n }\n }\n}\n\n#investors {\n background-color: #f8f9fa;\n background-image: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23b1c0ce' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E\");\n min-height: 20em;\n min-width: 100vw;\n padding-top: 4rem;\n .ui.header {\n color: $gray-dark;\n text-align: center;\n font-size: 3rem;\n }\n .swap {\n width: 50%;\n }\n .swap img:last-child {\n display: none;\n }\n .swap:hover img:first-child {\n display: none;\n }\n .swap:hover img:last-child {\n display: block;\n }\n}\n\n#privacy, #terms {\n margin-top: 3.14em;\n}\n\n"]} \ No newline at end of file diff --git a/public/css/src/alchemy.postcss b/public/css/src/alchemy.postcss new file mode 100644 index 0000000..f0696f1 --- /dev/null +++ b/public/css/src/alchemy.postcss @@ -0,0 +1,270 @@ +@import url('https://fonts.googleapis.com/css?family=Questrial|Roboto'); + +$primary: #5764c6; +$secondary: #eff1fa; +$dark: #454d5d; +$gray-dark: #727e96; +$gray: #acb3c2; +$gray-light: #e7e9ed; +$border: #f0f1f4; +$background: #f8f9fa; +$light: #ffffff; +$success: #32b643; +$warning: #ffb700; +$error: #e85600; + +body { + font-family: 'Roboto', sans-serif !important; + background-color: $light; +} + +h1, h2, h3, h4, h5, h6 { + font-family: 'Questrial', sans-serif !important; +} + +.alchemy.root { + display: flex; + min-height: 100vh; + flex-direction: column; +} + +.alchemy.header { + .ui.menu .item img.logo { + margin-right: 0; + width: 7.4em; + } +} + +.alchemy.content { + margin-top: 3.14em; + flex: 1; +} + +.alchemy.footer { + margin-top: 3.14em; + .copyright { + color: #c2c2c2; + } +} + +#home { + background-color: #7b86d9; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%233b48aa' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + display: flex; + align-items: center; + position: relative; + #particles-js { + position: absolute; + width: 100%; + height: 100%; + } + .ui.container { + z-index: 1; + .ui.header { + font-size: 4.6rem; + color: #fff; + .sub.header { + color: #fff; + font-size: 1.6rem; + } + } + .ui.button { + margin-top: 2em; + width: 16rem; + color: #fff; + } + } +} + +#about { + background-color: #56a7db; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%231477b7' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + .two.column { + margin: auto; + .ui.header { + color: $light; + font-size: 3rem; + } + p { + color: $light; + text-align: justify; + } + } + .three.column { + margin: auto; + padding-top: 4rem; + .ui.header { + color: $light; + } + p { + color: $light; + text-align: justify; + } + } +} + +#feature1, #feature2, #feature3, #feature4, #feature5, #feature6, #feature7, #feature8, #feature9 { + min-height: 20em; + min-width: 100vw; + display: flex; + align-items: center; + .column { + margin: auto; + .ui.header { + color: $light; + font-size: 3rem; + } + p { + color: $light; + } + } +} + +#feature1 { + background-color: #d6c5aa; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23967d55' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature2 { + background-color: #95a6cd; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23435c90' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature3 { + background-color: #bbbba4; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23747455' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature4 { + background-color: #e1557d; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a71740' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature5 { + background-color: #4ba18b; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%2319755e' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); +} + +#feature6 { + background-color: #77b3d4; +} + +#enterprise { + background-color: #6c7180; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23383e51' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + padding-bottom: 4rem; + .column { + margin: auto; + .ui.header { + color: $light; + text-align: center; + } + .ui.button { + margin-top: 4rem; + } + p { + color: $light; + text-align: justify; + } + } +} + +#consumers { + background-color: #b199be; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%236d4584' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + .column { + margin: auto; + .ui.header { + color: $light; + text-align: center; + } + p { + color: $light; + text-align: justify; + } + } +} + +#topup { + background-color: transparent; + padding-top: 4rem; + padding-bottom: 4rem; +} + +#get-identity { + background-color: #eff1fa; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2aad1' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + padding-bottom: 4rem; + .column { + margin: auto; + .ui.header { + color: $gray-dark; + font-size: 3rem; + } + } +} + +#meet-sophia { + background-color: #ffffff; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23a2a0a0' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 42em; + min-width: 100vw; + padding-top: 4rem; + padding-bottom: 4rem; + .column { + margin: auto; + .ui.header { + color: $gray-dark; + font-size: 3rem; + } + .ui.image { + padding-left: 0; + padding-right: 0; + box-shadow: 0px 5px 17px 1px rgba(0,0,0,0.45); + } + } +} + +#investors { + background-color: #f8f9fa; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23b1c0ce' fill-opacity='0.4' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E"); + min-height: 20em; + min-width: 100vw; + padding-top: 4rem; + .ui.header { + color: $gray-dark; + text-align: center; + font-size: 3rem; + } + .swap { + width: 50%; + } + .swap img:last-child { + display: none; + } + .swap:hover img:first-child { + display: none; + } + .swap:hover img:last-child { + display: block; + } +} + +#privacy, #terms { + margin-top: 3.14em; +} + diff --git a/public/images/app_store_badge.png b/public/images/app_store_badge.png new file mode 100644 index 0000000..4116e4f Binary files /dev/null and b/public/images/app_store_badge.png differ diff --git a/public/images/favicon.png b/public/images/favicon.png new file mode 100644 index 0000000..fdf3a26 Binary files /dev/null and b/public/images/favicon.png differ diff --git a/public/images/full-identity.png b/public/images/full-identity.png new file mode 100644 index 0000000..f4da25e Binary files /dev/null and b/public/images/full-identity.png differ diff --git a/public/images/google_play_badge.png b/public/images/google_play_badge.png new file mode 100644 index 0000000..7ee9f02 Binary files /dev/null and b/public/images/google_play_badge.png differ diff --git a/public/images/import/about.png b/public/images/import/about.png new file mode 100644 index 0000000..7bc07b9 Binary files /dev/null and b/public/images/import/about.png differ diff --git a/public/images/import/automation.png b/public/images/import/automation.png new file mode 100644 index 0000000..489261c Binary files /dev/null and b/public/images/import/automation.png differ diff --git a/public/images/import/consumers_1.png b/public/images/import/consumers_1.png new file mode 100644 index 0000000..a74301a Binary files /dev/null and b/public/images/import/consumers_1.png differ diff --git a/public/images/import/consumers_2.png b/public/images/import/consumers_2.png new file mode 100644 index 0000000..0c97813 Binary files /dev/null and b/public/images/import/consumers_2.png differ diff --git a/public/images/import/data_driven.png b/public/images/import/data_driven.png new file mode 100644 index 0000000..f6674ab Binary files /dev/null and b/public/images/import/data_driven.png differ diff --git a/public/images/import/dots/about.png b/public/images/import/dots/about.png new file mode 100644 index 0000000..3a1ec80 Binary files /dev/null and b/public/images/import/dots/about.png differ diff --git a/public/images/import/dots/accounting.png b/public/images/import/dots/accounting.png new file mode 100644 index 0000000..6769de0 Binary files /dev/null and b/public/images/import/dots/accounting.png differ diff --git a/public/images/import/dots/activity_feed.png b/public/images/import/dots/activity_feed.png new file mode 100644 index 0000000..56773c3 Binary files /dev/null and b/public/images/import/dots/activity_feed.png differ diff --git a/public/images/import/dots/address_book.png b/public/images/import/dots/address_book.png new file mode 100644 index 0000000..4d85317 Binary files /dev/null and b/public/images/import/dots/address_book.png differ diff --git a/public/images/import/dots/agreement.png b/public/images/import/dots/agreement.png new file mode 100644 index 0000000..5c0a270 Binary files /dev/null and b/public/images/import/dots/agreement.png differ diff --git a/public/images/import/dots/android_os.png b/public/images/import/dots/android_os.png new file mode 100644 index 0000000..29e6350 Binary files /dev/null and b/public/images/import/dots/android_os.png differ diff --git a/public/images/import/dots/anonymous_mask.png b/public/images/import/dots/anonymous_mask.png new file mode 100644 index 0000000..7accdab Binary files /dev/null and b/public/images/import/dots/anonymous_mask.png differ diff --git a/public/images/import/dots/appointment_reminders.png b/public/images/import/dots/appointment_reminders.png new file mode 100644 index 0000000..c82e1e1 Binary files /dev/null and b/public/images/import/dots/appointment_reminders.png differ diff --git a/public/images/import/dots/approval.png b/public/images/import/dots/approval.png new file mode 100644 index 0000000..7988306 Binary files /dev/null and b/public/images/import/dots/approval.png differ diff --git a/public/images/import/dots/ask_question.png b/public/images/import/dots/ask_question.png new file mode 100644 index 0000000..e5a0e7e Binary files /dev/null and b/public/images/import/dots/ask_question.png differ diff --git a/public/images/import/dots/assistant.png b/public/images/import/dots/assistant.png new file mode 100644 index 0000000..d93dfb1 Binary files /dev/null and b/public/images/import/dots/assistant.png differ diff --git a/public/images/import/dots/automation.png b/public/images/import/dots/automation.png new file mode 100644 index 0000000..c13d5af Binary files /dev/null and b/public/images/import/dots/automation.png differ diff --git a/public/images/import/dots/available_updates.png b/public/images/import/dots/available_updates.png new file mode 100644 index 0000000..e0957fd Binary files /dev/null and b/public/images/import/dots/available_updates.png differ diff --git a/public/images/import/dots/bar_chart.png b/public/images/import/dots/bar_chart.png new file mode 100644 index 0000000..382d2f2 Binary files /dev/null and b/public/images/import/dots/bar_chart.png differ diff --git a/public/images/import/dots/bill.png b/public/images/import/dots/bill.png new file mode 100644 index 0000000..0ba6e61 Binary files /dev/null and b/public/images/import/dots/bill.png differ diff --git a/public/images/import/dots/brain.png b/public/images/import/dots/brain.png new file mode 100644 index 0000000..9310390 Binary files /dev/null and b/public/images/import/dots/brain.png differ diff --git a/public/images/import/dots/bullish.png b/public/images/import/dots/bullish.png new file mode 100644 index 0000000..c85d4d1 Binary files /dev/null and b/public/images/import/dots/bullish.png differ diff --git a/public/images/import/dots/business.png b/public/images/import/dots/business.png new file mode 100644 index 0000000..2493617 Binary files /dev/null and b/public/images/import/dots/business.png differ diff --git a/public/images/import/dots/business_contact.png b/public/images/import/dots/business_contact.png new file mode 100644 index 0000000..aca72d7 Binary files /dev/null and b/public/images/import/dots/business_contact.png differ diff --git a/public/images/import/dots/cash_in_hand.png b/public/images/import/dots/cash_in_hand.png new file mode 100644 index 0000000..4d23ccb Binary files /dev/null and b/public/images/import/dots/cash_in_hand.png differ diff --git a/public/images/import/dots/cash_register.png b/public/images/import/dots/cash_register.png new file mode 100644 index 0000000..ae3cede Binary files /dev/null and b/public/images/import/dots/cash_register.png differ diff --git a/public/images/import/dots/cellular_network.png b/public/images/import/dots/cellular_network.png new file mode 100644 index 0000000..807358d Binary files /dev/null and b/public/images/import/dots/cellular_network.png differ diff --git a/public/images/import/dots/chat.png b/public/images/import/dots/chat.png new file mode 100644 index 0000000..136dced Binary files /dev/null and b/public/images/import/dots/chat.png differ diff --git a/public/images/import/dots/check.png b/public/images/import/dots/check.png new file mode 100644 index 0000000..63cc7a6 Binary files /dev/null and b/public/images/import/dots/check.png differ diff --git a/public/images/import/dots/check_book.png b/public/images/import/dots/check_book.png new file mode 100644 index 0000000..897fc61 Binary files /dev/null and b/public/images/import/dots/check_book.png differ diff --git a/public/images/import/dots/cloud.png b/public/images/import/dots/cloud.png new file mode 100644 index 0000000..a2a1718 Binary files /dev/null and b/public/images/import/dots/cloud.png differ diff --git a/public/images/import/dots/code.png b/public/images/import/dots/code.png new file mode 100644 index 0000000..6318fe5 Binary files /dev/null and b/public/images/import/dots/code.png differ diff --git a/public/images/import/dots/combo_chart.png b/public/images/import/dots/combo_chart.png new file mode 100644 index 0000000..901c026 Binary files /dev/null and b/public/images/import/dots/combo_chart.png differ diff --git a/public/images/import/dots/computer.png b/public/images/import/dots/computer.png new file mode 100644 index 0000000..b4dc7e2 Binary files /dev/null and b/public/images/import/dots/computer.png differ diff --git a/public/images/import/dots/crown.png b/public/images/import/dots/crown.png new file mode 100644 index 0000000..51aed57 Binary files /dev/null and b/public/images/import/dots/crown.png differ diff --git a/public/images/import/dots/customer_support.png b/public/images/import/dots/customer_support.png new file mode 100644 index 0000000..194140c Binary files /dev/null and b/public/images/import/dots/customer_support.png differ diff --git a/public/images/import/dots/discount.png b/public/images/import/dots/discount.png new file mode 100644 index 0000000..696d897 Binary files /dev/null and b/public/images/import/dots/discount.png differ diff --git a/public/images/import/dots/document.png b/public/images/import/dots/document.png new file mode 100644 index 0000000..2545660 Binary files /dev/null and b/public/images/import/dots/document.png differ diff --git a/public/images/import/dots/download.png b/public/images/import/dots/download.png new file mode 100644 index 0000000..a23fdc1 Binary files /dev/null and b/public/images/import/dots/download.png differ diff --git a/public/images/import/dots/e-commerce.png b/public/images/import/dots/e-commerce.png new file mode 100644 index 0000000..6bc2d64 Binary files /dev/null and b/public/images/import/dots/e-commerce.png differ diff --git a/public/images/import/dots/electronic_identity_card.png b/public/images/import/dots/electronic_identity_card.png new file mode 100644 index 0000000..c417efc Binary files /dev/null and b/public/images/import/dots/electronic_identity_card.png differ diff --git a/public/images/import/dots/employee_card.png b/public/images/import/dots/employee_card.png new file mode 100644 index 0000000..d952556 Binary files /dev/null and b/public/images/import/dots/employee_card.png differ diff --git a/public/images/import/dots/facebook.png b/public/images/import/dots/facebook.png new file mode 100644 index 0000000..fc8d5f2 Binary files /dev/null and b/public/images/import/dots/facebook.png differ diff --git a/public/images/import/dots/facebook_messenger.png b/public/images/import/dots/facebook_messenger.png new file mode 100644 index 0000000..986d596 Binary files /dev/null and b/public/images/import/dots/facebook_messenger.png differ diff --git a/public/images/import/dots/faq.png b/public/images/import/dots/faq.png new file mode 100644 index 0000000..15562d4 Binary files /dev/null and b/public/images/import/dots/faq.png differ diff --git a/public/images/import/dots/form.png b/public/images/import/dots/form.png new file mode 100644 index 0000000..62d2882 Binary files /dev/null and b/public/images/import/dots/form.png differ diff --git a/public/images/import/dots/geo-fence.png b/public/images/import/dots/geo-fence.png new file mode 100644 index 0000000..6bc89fa Binary files /dev/null and b/public/images/import/dots/geo-fence.png differ diff --git a/public/images/import/dots/globe_earth.png b/public/images/import/dots/globe_earth.png new file mode 100644 index 0000000..e5c1d67 Binary files /dev/null and b/public/images/import/dots/globe_earth.png differ diff --git a/public/images/import/dots/goal.png b/public/images/import/dots/goal.png new file mode 100644 index 0000000..195fa5f Binary files /dev/null and b/public/images/import/dots/goal.png differ diff --git a/public/images/import/dots/handshake.png b/public/images/import/dots/handshake.png new file mode 100644 index 0000000..8f66756 Binary files /dev/null and b/public/images/import/dots/handshake.png differ diff --git a/public/images/import/dots/happy.png b/public/images/import/dots/happy.png new file mode 100644 index 0000000..9bad860 Binary files /dev/null and b/public/images/import/dots/happy.png differ diff --git a/public/images/import/dots/helping_hand.png b/public/images/import/dots/helping_hand.png new file mode 100644 index 0000000..1c127e1 Binary files /dev/null and b/public/images/import/dots/helping_hand.png differ diff --git a/public/images/import/dots/id_card.png b/public/images/import/dots/id_card.png new file mode 100644 index 0000000..33e09d9 Binary files /dev/null and b/public/images/import/dots/id_card.png differ diff --git a/public/images/import/dots/idea.png b/public/images/import/dots/idea.png new file mode 100644 index 0000000..ab31717 Binary files /dev/null and b/public/images/import/dots/idea.png differ diff --git a/public/images/import/dots/idea_sharing.png b/public/images/import/dots/idea_sharing.png new file mode 100644 index 0000000..497dbd8 Binary files /dev/null and b/public/images/import/dots/idea_sharing.png differ diff --git a/public/images/import/dots/in_progress.png b/public/images/import/dots/in_progress.png new file mode 100644 index 0000000..5e60c64 Binary files /dev/null and b/public/images/import/dots/in_progress.png differ diff --git a/public/images/import/dots/invisible.png b/public/images/import/dots/invisible.png new file mode 100644 index 0000000..53aea74 Binary files /dev/null and b/public/images/import/dots/invisible.png differ diff --git a/public/images/import/dots/invoice.png b/public/images/import/dots/invoice.png new file mode 100644 index 0000000..496961f Binary files /dev/null and b/public/images/import/dots/invoice.png differ diff --git a/public/images/import/dots/iphone.png b/public/images/import/dots/iphone.png new file mode 100644 index 0000000..266121f Binary files /dev/null and b/public/images/import/dots/iphone.png differ diff --git a/public/images/import/dots/language.png b/public/images/import/dots/language.png new file mode 100644 index 0000000..8501b79 Binary files /dev/null and b/public/images/import/dots/language.png differ diff --git a/public/images/import/dots/light_on.png b/public/images/import/dots/light_on.png new file mode 100644 index 0000000..f1dd322 Binary files /dev/null and b/public/images/import/dots/light_on.png differ diff --git a/public/images/import/dots/lightning_bolt.png b/public/images/import/dots/lightning_bolt.png new file mode 100644 index 0000000..e87d269 Binary files /dev/null and b/public/images/import/dots/lightning_bolt.png differ diff --git a/public/images/import/dots/lock.png b/public/images/import/dots/lock.png new file mode 100644 index 0000000..64fa207 Binary files /dev/null and b/public/images/import/dots/lock.png differ diff --git a/public/images/import/dots/loyalty_card.png b/public/images/import/dots/loyalty_card.png new file mode 100644 index 0000000..9ec6a74 Binary files /dev/null and b/public/images/import/dots/loyalty_card.png differ diff --git a/public/images/import/dots/maintenance.png b/public/images/import/dots/maintenance.png new file mode 100644 index 0000000..adad401 Binary files /dev/null and b/public/images/import/dots/maintenance.png differ diff --git a/public/images/import/dots/map_marker.png b/public/images/import/dots/map_marker.png new file mode 100644 index 0000000..18ca40a Binary files /dev/null and b/public/images/import/dots/map_marker.png differ diff --git a/public/images/import/dots/mind_map.png b/public/images/import/dots/mind_map.png new file mode 100644 index 0000000..2375759 Binary files /dev/null and b/public/images/import/dots/mind_map.png differ diff --git a/public/images/import/dots/money.png b/public/images/import/dots/money.png new file mode 100644 index 0000000..b8bf1fd Binary files /dev/null and b/public/images/import/dots/money.png differ diff --git a/public/images/import/dots/money_box.png b/public/images/import/dots/money_box.png new file mode 100644 index 0000000..5134f91 Binary files /dev/null and b/public/images/import/dots/money_box.png differ diff --git a/public/images/import/dots/money_transfer.png b/public/images/import/dots/money_transfer.png new file mode 100644 index 0000000..b750da5 Binary files /dev/null and b/public/images/import/dots/money_transfer.png differ diff --git a/public/images/import/dots/monitor.png b/public/images/import/dots/monitor.png new file mode 100644 index 0000000..4d68c41 Binary files /dev/null and b/public/images/import/dots/monitor.png differ diff --git a/public/images/import/dots/nfc_checkpoint.png b/public/images/import/dots/nfc_checkpoint.png new file mode 100644 index 0000000..f4ee964 Binary files /dev/null and b/public/images/import/dots/nfc_checkpoint.png differ diff --git a/public/images/import/dots/nfc_logo.png b/public/images/import/dots/nfc_logo.png new file mode 100644 index 0000000..465ec75 Binary files /dev/null and b/public/images/import/dots/nfc_logo.png differ diff --git a/public/images/import/dots/nfc_sign.png b/public/images/import/dots/nfc_sign.png new file mode 100644 index 0000000..e4a1679 Binary files /dev/null and b/public/images/import/dots/nfc_sign.png differ diff --git a/public/images/import/dots/online.png b/public/images/import/dots/online.png new file mode 100644 index 0000000..4d05b78 Binary files /dev/null and b/public/images/import/dots/online.png differ diff --git a/public/images/import/dots/online_support.png b/public/images/import/dots/online_support.png new file mode 100644 index 0000000..b16668f Binary files /dev/null and b/public/images/import/dots/online_support.png differ diff --git a/public/images/import/dots/password.png b/public/images/import/dots/password.png new file mode 100644 index 0000000..58c73aa Binary files /dev/null and b/public/images/import/dots/password.png differ diff --git a/public/images/import/dots/paycheque.png b/public/images/import/dots/paycheque.png new file mode 100644 index 0000000..313cef1 Binary files /dev/null and b/public/images/import/dots/paycheque.png differ diff --git a/public/images/import/dots/pie_chart.png b/public/images/import/dots/pie_chart.png new file mode 100644 index 0000000..9109624 Binary files /dev/null and b/public/images/import/dots/pie_chart.png differ diff --git a/public/images/import/dots/polyline.png b/public/images/import/dots/polyline.png new file mode 100644 index 0000000..0addbb9 Binary files /dev/null and b/public/images/import/dots/polyline.png differ diff --git a/public/images/import/dots/positive_dynamic.png b/public/images/import/dots/positive_dynamic.png new file mode 100644 index 0000000..493eb91 Binary files /dev/null and b/public/images/import/dots/positive_dynamic.png differ diff --git a/public/images/import/dots/purchase_order.png b/public/images/import/dots/purchase_order.png new file mode 100644 index 0000000..cb1f8b7 Binary files /dev/null and b/public/images/import/dots/purchase_order.png differ diff --git a/public/images/import/dots/push_notifications.png b/public/images/import/dots/push_notifications.png new file mode 100644 index 0000000..9c1414a Binary files /dev/null and b/public/images/import/dots/push_notifications.png differ diff --git a/public/images/import/dots/qr_code.png b/public/images/import/dots/qr_code.png new file mode 100644 index 0000000..e3aa057 Binary files /dev/null and b/public/images/import/dots/qr_code.png differ diff --git a/public/images/import/dots/question.png b/public/images/import/dots/question.png new file mode 100644 index 0000000..bc1d9a3 Binary files /dev/null and b/public/images/import/dots/question.png differ diff --git a/public/images/import/dots/receipt.png b/public/images/import/dots/receipt.png new file mode 100644 index 0000000..783542c Binary files /dev/null and b/public/images/import/dots/receipt.png differ diff --git a/public/images/import/dots/receive_cash.png b/public/images/import/dots/receive_cash.png new file mode 100644 index 0000000..492c908 Binary files /dev/null and b/public/images/import/dots/receive_cash.png differ diff --git a/public/images/import/dots/rocket.png b/public/images/import/dots/rocket.png new file mode 100644 index 0000000..6122fad Binary files /dev/null and b/public/images/import/dots/rocket.png differ diff --git a/public/images/import/dots/safe_ok.png b/public/images/import/dots/safe_ok.png new file mode 100644 index 0000000..d51962c Binary files /dev/null and b/public/images/import/dots/safe_ok.png differ diff --git a/public/images/import/dots/security_checked.png b/public/images/import/dots/security_checked.png new file mode 100644 index 0000000..9b14972 Binary files /dev/null and b/public/images/import/dots/security_checked.png differ diff --git a/public/images/import/dots/server.png b/public/images/import/dots/server.png new file mode 100644 index 0000000..d689cd2 Binary files /dev/null and b/public/images/import/dots/server.png differ diff --git a/public/images/import/dots/share.png b/public/images/import/dots/share.png new file mode 100644 index 0000000..245990e Binary files /dev/null and b/public/images/import/dots/share.png differ diff --git a/public/images/import/dots/shop.png b/public/images/import/dots/shop.png new file mode 100644 index 0000000..cee5e53 Binary files /dev/null and b/public/images/import/dots/shop.png differ diff --git a/public/images/import/dots/shopping_bag.png b/public/images/import/dots/shopping_bag.png new file mode 100644 index 0000000..e2ea2fe Binary files /dev/null and b/public/images/import/dots/shopping_bag.png differ diff --git a/public/images/import/dots/shopping_cart.png b/public/images/import/dots/shopping_cart.png new file mode 100644 index 0000000..5952949 Binary files /dev/null and b/public/images/import/dots/shopping_cart.png differ diff --git a/public/images/import/dots/shopping_cart_loaded.png b/public/images/import/dots/shopping_cart_loaded.png new file mode 100644 index 0000000..9ad35f7 Binary files /dev/null and b/public/images/import/dots/shopping_cart_loaded.png differ diff --git a/public/images/import/dots/sms.png b/public/images/import/dots/sms.png new file mode 100644 index 0000000..653b3d0 Binary files /dev/null and b/public/images/import/dots/sms.png differ diff --git a/public/images/import/dots/statistics.png b/public/images/import/dots/statistics.png new file mode 100644 index 0000000..a81b3dc Binary files /dev/null and b/public/images/import/dots/statistics.png differ diff --git a/public/images/import/dots/synchronize.png b/public/images/import/dots/synchronize.png new file mode 100644 index 0000000..501fc4f Binary files /dev/null and b/public/images/import/dots/synchronize.png differ diff --git a/public/images/import/dots/thumb_up.png b/public/images/import/dots/thumb_up.png new file mode 100644 index 0000000..109b366 Binary files /dev/null and b/public/images/import/dots/thumb_up.png differ diff --git a/public/images/import/dots/ticket.png b/public/images/import/dots/ticket.png new file mode 100644 index 0000000..0ffb398 Binary files /dev/null and b/public/images/import/dots/ticket.png differ diff --git a/public/images/import/dots/track_order.png b/public/images/import/dots/track_order.png new file mode 100644 index 0000000..14a4ff8 Binary files /dev/null and b/public/images/import/dots/track_order.png differ diff --git a/public/images/import/dots/trust.png b/public/images/import/dots/trust.png new file mode 100644 index 0000000..ac2b014 Binary files /dev/null and b/public/images/import/dots/trust.png differ diff --git a/public/images/import/dots/unknown_status.png b/public/images/import/dots/unknown_status.png new file mode 100644 index 0000000..6fb0bf1 Binary files /dev/null and b/public/images/import/dots/unknown_status.png differ diff --git a/public/images/import/dots/us_dollar.png b/public/images/import/dots/us_dollar.png new file mode 100644 index 0000000..889893b Binary files /dev/null and b/public/images/import/dots/us_dollar.png differ diff --git a/public/images/import/dots/user.png b/public/images/import/dots/user.png new file mode 100644 index 0000000..85ca267 Binary files /dev/null and b/public/images/import/dots/user.png differ diff --git a/public/images/import/dots/view_details.png b/public/images/import/dots/view_details.png new file mode 100644 index 0000000..906b8cd Binary files /dev/null and b/public/images/import/dots/view_details.png differ diff --git a/public/images/import/dots/visible.png b/public/images/import/dots/visible.png new file mode 100644 index 0000000..d840a90 Binary files /dev/null and b/public/images/import/dots/visible.png differ diff --git a/public/images/import/dots/wallet.png b/public/images/import/dots/wallet.png new file mode 100644 index 0000000..a8d244c Binary files /dev/null and b/public/images/import/dots/wallet.png differ diff --git a/public/images/import/dots/wi-fi.png b/public/images/import/dots/wi-fi.png new file mode 100644 index 0000000..4b569c9 Binary files /dev/null and b/public/images/import/dots/wi-fi.png differ diff --git a/public/images/import/dots/workflow.png b/public/images/import/dots/workflow.png new file mode 100644 index 0000000..34e63a8 Binary files /dev/null and b/public/images/import/dots/workflow.png differ diff --git a/public/images/import/dots/workstation.png b/public/images/import/dots/workstation.png new file mode 100644 index 0000000..4a29428 Binary files /dev/null and b/public/images/import/dots/workstation.png differ diff --git a/public/images/import/dots/worldwide_location.png b/public/images/import/dots/worldwide_location.png new file mode 100644 index 0000000..9306b2b Binary files /dev/null and b/public/images/import/dots/worldwide_location.png differ diff --git a/public/images/import/enterprise.png b/public/images/import/enterprise.png new file mode 100644 index 0000000..557c2cc Binary files /dev/null and b/public/images/import/enterprise.png differ diff --git a/public/images/import/feature_1.png b/public/images/import/feature_1.png new file mode 100644 index 0000000..356f070 Binary files /dev/null and b/public/images/import/feature_1.png differ diff --git a/public/images/import/feature_2.png b/public/images/import/feature_2.png new file mode 100644 index 0000000..270571f Binary files /dev/null and b/public/images/import/feature_2.png differ diff --git a/public/images/import/feature_3.png b/public/images/import/feature_3.png new file mode 100644 index 0000000..1afcc9a Binary files /dev/null and b/public/images/import/feature_3.png differ diff --git a/public/images/import/feature_4.png b/public/images/import/feature_4.png new file mode 100644 index 0000000..6bcfdc9 Binary files /dev/null and b/public/images/import/feature_4.png differ diff --git a/public/images/import/feature_5.png b/public/images/import/feature_5.png new file mode 100644 index 0000000..fc56408 Binary files /dev/null and b/public/images/import/feature_5.png differ diff --git a/public/images/import/get-identity.png b/public/images/import/get-identity.png new file mode 100644 index 0000000..6f7e948 Binary files /dev/null and b/public/images/import/get-identity.png differ diff --git a/public/images/import/iphone_mockup.png b/public/images/import/iphone_mockup.png new file mode 100644 index 0000000..0398065 Binary files /dev/null and b/public/images/import/iphone_mockup.png differ diff --git a/public/images/import/topup.png b/public/images/import/topup.png new file mode 100644 index 0000000..dca2bb5 Binary files /dev/null and b/public/images/import/topup.png differ diff --git a/public/images/logo-id-144.png b/public/images/logo-id-144.png new file mode 100644 index 0000000..e7ab3d8 Binary files /dev/null and b/public/images/logo-id-144.png differ diff --git a/public/images/logo-id-192.png b/public/images/logo-id-192.png new file mode 100644 index 0000000..d1fe79b Binary files /dev/null and b/public/images/logo-id-192.png differ diff --git a/public/images/logo-ovh-avec-colored.png b/public/images/logo-ovh-avec-colored.png new file mode 100644 index 0000000..c35d0c6 Binary files /dev/null and b/public/images/logo-ovh-avec-colored.png differ diff --git a/public/images/logo-ovh-avec-gray.png b/public/images/logo-ovh-avec-gray.png new file mode 100644 index 0000000..d51572b Binary files /dev/null and b/public/images/logo-ovh-avec-gray.png differ diff --git a/public/images/messenger_mock.gif b/public/images/messenger_mock.gif new file mode 100644 index 0000000..8543d65 Binary files /dev/null and b/public/images/messenger_mock.gif differ diff --git a/public/images/unop/app_store_badge.png b/public/images/unop/app_store_badge.png new file mode 100644 index 0000000..849d896 Binary files /dev/null and b/public/images/unop/app_store_badge.png differ diff --git a/public/images/unop/favicon.png b/public/images/unop/favicon.png new file mode 100644 index 0000000..9b550f5 Binary files /dev/null and b/public/images/unop/favicon.png differ diff --git a/public/images/unop/full-identity.png b/public/images/unop/full-identity.png new file mode 100644 index 0000000..8eccc1d Binary files /dev/null and b/public/images/unop/full-identity.png differ diff --git a/public/images/unop/google_play_badge.png b/public/images/unop/google_play_badge.png new file mode 100644 index 0000000..7ee9f02 Binary files /dev/null and b/public/images/unop/google_play_badge.png differ diff --git a/public/images/unop/import/about.png b/public/images/unop/import/about.png new file mode 100644 index 0000000..ae2c361 Binary files /dev/null and b/public/images/unop/import/about.png differ diff --git a/public/images/unop/import/automation.png b/public/images/unop/import/automation.png new file mode 100644 index 0000000..39bf43f Binary files /dev/null and b/public/images/unop/import/automation.png differ diff --git a/public/images/unop/import/consumers_1.png b/public/images/unop/import/consumers_1.png new file mode 100644 index 0000000..0eb7e01 Binary files /dev/null and b/public/images/unop/import/consumers_1.png differ diff --git a/public/images/unop/import/consumers_2.png b/public/images/unop/import/consumers_2.png new file mode 100644 index 0000000..3b99a81 Binary files /dev/null and b/public/images/unop/import/consumers_2.png differ diff --git a/public/images/unop/import/data_driven.png b/public/images/unop/import/data_driven.png new file mode 100644 index 0000000..4b22781 Binary files /dev/null and b/public/images/unop/import/data_driven.png differ diff --git a/public/images/unop/import/dots/about.png b/public/images/unop/import/dots/about.png new file mode 100644 index 0000000..619826d Binary files /dev/null and b/public/images/unop/import/dots/about.png differ diff --git a/public/images/unop/import/dots/accounting.png b/public/images/unop/import/dots/accounting.png new file mode 100644 index 0000000..b4896dc Binary files /dev/null and b/public/images/unop/import/dots/accounting.png differ diff --git a/public/images/unop/import/dots/activity_feed.png b/public/images/unop/import/dots/activity_feed.png new file mode 100644 index 0000000..2d2671b Binary files /dev/null and b/public/images/unop/import/dots/activity_feed.png differ diff --git a/public/images/unop/import/dots/address_book.png b/public/images/unop/import/dots/address_book.png new file mode 100644 index 0000000..c4b3d98 Binary files /dev/null and b/public/images/unop/import/dots/address_book.png differ diff --git a/public/images/unop/import/dots/agreement.png b/public/images/unop/import/dots/agreement.png new file mode 100644 index 0000000..c238d07 Binary files /dev/null and b/public/images/unop/import/dots/agreement.png differ diff --git a/public/images/unop/import/dots/android_os.png b/public/images/unop/import/dots/android_os.png new file mode 100644 index 0000000..0699bad Binary files /dev/null and b/public/images/unop/import/dots/android_os.png differ diff --git a/public/images/unop/import/dots/anonymous_mask.png b/public/images/unop/import/dots/anonymous_mask.png new file mode 100644 index 0000000..b7d8142 Binary files /dev/null and b/public/images/unop/import/dots/anonymous_mask.png differ diff --git a/public/images/unop/import/dots/appointment_reminders.png b/public/images/unop/import/dots/appointment_reminders.png new file mode 100644 index 0000000..a8f9dc9 Binary files /dev/null and b/public/images/unop/import/dots/appointment_reminders.png differ diff --git a/public/images/unop/import/dots/approval.png b/public/images/unop/import/dots/approval.png new file mode 100644 index 0000000..42e7bdf Binary files /dev/null and b/public/images/unop/import/dots/approval.png differ diff --git a/public/images/unop/import/dots/ask_question.png b/public/images/unop/import/dots/ask_question.png new file mode 100644 index 0000000..90b27f1 Binary files /dev/null and b/public/images/unop/import/dots/ask_question.png differ diff --git a/public/images/unop/import/dots/assistant.png b/public/images/unop/import/dots/assistant.png new file mode 100644 index 0000000..fa5536b Binary files /dev/null and b/public/images/unop/import/dots/assistant.png differ diff --git a/public/images/unop/import/dots/automation.png b/public/images/unop/import/dots/automation.png new file mode 100644 index 0000000..119437a Binary files /dev/null and b/public/images/unop/import/dots/automation.png differ diff --git a/public/images/unop/import/dots/available_updates.png b/public/images/unop/import/dots/available_updates.png new file mode 100644 index 0000000..a7f8626 Binary files /dev/null and b/public/images/unop/import/dots/available_updates.png differ diff --git a/public/images/unop/import/dots/bar_chart.png b/public/images/unop/import/dots/bar_chart.png new file mode 100644 index 0000000..717c863 Binary files /dev/null and b/public/images/unop/import/dots/bar_chart.png differ diff --git a/public/images/unop/import/dots/bill.png b/public/images/unop/import/dots/bill.png new file mode 100644 index 0000000..53583c3 Binary files /dev/null and b/public/images/unop/import/dots/bill.png differ diff --git a/public/images/unop/import/dots/brain.png b/public/images/unop/import/dots/brain.png new file mode 100644 index 0000000..24de178 Binary files /dev/null and b/public/images/unop/import/dots/brain.png differ diff --git a/public/images/unop/import/dots/bullish.png b/public/images/unop/import/dots/bullish.png new file mode 100644 index 0000000..f89533b Binary files /dev/null and b/public/images/unop/import/dots/bullish.png differ diff --git a/public/images/unop/import/dots/business.png b/public/images/unop/import/dots/business.png new file mode 100644 index 0000000..e58a148 Binary files /dev/null and b/public/images/unop/import/dots/business.png differ diff --git a/public/images/unop/import/dots/business_contact.png b/public/images/unop/import/dots/business_contact.png new file mode 100644 index 0000000..e2f4c3c Binary files /dev/null and b/public/images/unop/import/dots/business_contact.png differ diff --git a/public/images/unop/import/dots/cash_in_hand.png b/public/images/unop/import/dots/cash_in_hand.png new file mode 100644 index 0000000..553eac0 Binary files /dev/null and b/public/images/unop/import/dots/cash_in_hand.png differ diff --git a/public/images/unop/import/dots/cash_register.png b/public/images/unop/import/dots/cash_register.png new file mode 100644 index 0000000..4d5394f Binary files /dev/null and b/public/images/unop/import/dots/cash_register.png differ diff --git a/public/images/unop/import/dots/cellular_network.png b/public/images/unop/import/dots/cellular_network.png new file mode 100644 index 0000000..c314adf Binary files /dev/null and b/public/images/unop/import/dots/cellular_network.png differ diff --git a/public/images/unop/import/dots/chat.png b/public/images/unop/import/dots/chat.png new file mode 100644 index 0000000..582e6aa Binary files /dev/null and b/public/images/unop/import/dots/chat.png differ diff --git a/public/images/unop/import/dots/check.png b/public/images/unop/import/dots/check.png new file mode 100644 index 0000000..0185acf Binary files /dev/null and b/public/images/unop/import/dots/check.png differ diff --git a/public/images/unop/import/dots/check_book.png b/public/images/unop/import/dots/check_book.png new file mode 100644 index 0000000..7db9aae Binary files /dev/null and b/public/images/unop/import/dots/check_book.png differ diff --git a/public/images/unop/import/dots/cloud.png b/public/images/unop/import/dots/cloud.png new file mode 100644 index 0000000..22ab353 Binary files /dev/null and b/public/images/unop/import/dots/cloud.png differ diff --git a/public/images/unop/import/dots/code.png b/public/images/unop/import/dots/code.png new file mode 100644 index 0000000..9e3c890 Binary files /dev/null and b/public/images/unop/import/dots/code.png differ diff --git a/public/images/unop/import/dots/combo_chart.png b/public/images/unop/import/dots/combo_chart.png new file mode 100644 index 0000000..2c5f482 Binary files /dev/null and b/public/images/unop/import/dots/combo_chart.png differ diff --git a/public/images/unop/import/dots/computer.png b/public/images/unop/import/dots/computer.png new file mode 100644 index 0000000..df5109c Binary files /dev/null and b/public/images/unop/import/dots/computer.png differ diff --git a/public/images/unop/import/dots/crown.png b/public/images/unop/import/dots/crown.png new file mode 100644 index 0000000..75dd1fe Binary files /dev/null and b/public/images/unop/import/dots/crown.png differ diff --git a/public/images/unop/import/dots/customer_support.png b/public/images/unop/import/dots/customer_support.png new file mode 100644 index 0000000..43f9d15 Binary files /dev/null and b/public/images/unop/import/dots/customer_support.png differ diff --git a/public/images/unop/import/dots/discount.png b/public/images/unop/import/dots/discount.png new file mode 100644 index 0000000..1c4453c Binary files /dev/null and b/public/images/unop/import/dots/discount.png differ diff --git a/public/images/unop/import/dots/document.png b/public/images/unop/import/dots/document.png new file mode 100644 index 0000000..109e60b Binary files /dev/null and b/public/images/unop/import/dots/document.png differ diff --git a/public/images/unop/import/dots/download.png b/public/images/unop/import/dots/download.png new file mode 100644 index 0000000..b82856c Binary files /dev/null and b/public/images/unop/import/dots/download.png differ diff --git a/public/images/unop/import/dots/e-commerce.png b/public/images/unop/import/dots/e-commerce.png new file mode 100644 index 0000000..24fc160 Binary files /dev/null and b/public/images/unop/import/dots/e-commerce.png differ diff --git a/public/images/unop/import/dots/electronic_identity_card.png b/public/images/unop/import/dots/electronic_identity_card.png new file mode 100644 index 0000000..95dc0ac Binary files /dev/null and b/public/images/unop/import/dots/electronic_identity_card.png differ diff --git a/public/images/unop/import/dots/employee_card.png b/public/images/unop/import/dots/employee_card.png new file mode 100644 index 0000000..15cd758 Binary files /dev/null and b/public/images/unop/import/dots/employee_card.png differ diff --git a/public/images/unop/import/dots/facebook.png b/public/images/unop/import/dots/facebook.png new file mode 100644 index 0000000..56726a8 Binary files /dev/null and b/public/images/unop/import/dots/facebook.png differ diff --git a/public/images/unop/import/dots/facebook_messenger.png b/public/images/unop/import/dots/facebook_messenger.png new file mode 100644 index 0000000..e914fb6 Binary files /dev/null and b/public/images/unop/import/dots/facebook_messenger.png differ diff --git a/public/images/unop/import/dots/faq.png b/public/images/unop/import/dots/faq.png new file mode 100644 index 0000000..c8b95cc Binary files /dev/null and b/public/images/unop/import/dots/faq.png differ diff --git a/public/images/unop/import/dots/form.png b/public/images/unop/import/dots/form.png new file mode 100644 index 0000000..25b164b Binary files /dev/null and b/public/images/unop/import/dots/form.png differ diff --git a/public/images/unop/import/dots/geo-fence.png b/public/images/unop/import/dots/geo-fence.png new file mode 100644 index 0000000..baae947 Binary files /dev/null and b/public/images/unop/import/dots/geo-fence.png differ diff --git a/public/images/unop/import/dots/globe_earth.png b/public/images/unop/import/dots/globe_earth.png new file mode 100644 index 0000000..9c20bae Binary files /dev/null and b/public/images/unop/import/dots/globe_earth.png differ diff --git a/public/images/unop/import/dots/goal.png b/public/images/unop/import/dots/goal.png new file mode 100644 index 0000000..d8bbdd7 Binary files /dev/null and b/public/images/unop/import/dots/goal.png differ diff --git a/public/images/unop/import/dots/handshake.png b/public/images/unop/import/dots/handshake.png new file mode 100644 index 0000000..bf27804 Binary files /dev/null and b/public/images/unop/import/dots/handshake.png differ diff --git a/public/images/unop/import/dots/happy.png b/public/images/unop/import/dots/happy.png new file mode 100644 index 0000000..915f67a Binary files /dev/null and b/public/images/unop/import/dots/happy.png differ diff --git a/public/images/unop/import/dots/helping_hand.png b/public/images/unop/import/dots/helping_hand.png new file mode 100644 index 0000000..fb3d9ed Binary files /dev/null and b/public/images/unop/import/dots/helping_hand.png differ diff --git a/public/images/unop/import/dots/id_card.png b/public/images/unop/import/dots/id_card.png new file mode 100644 index 0000000..99a1302 Binary files /dev/null and b/public/images/unop/import/dots/id_card.png differ diff --git a/public/images/unop/import/dots/idea.png b/public/images/unop/import/dots/idea.png new file mode 100644 index 0000000..b61f720 Binary files /dev/null and b/public/images/unop/import/dots/idea.png differ diff --git a/public/images/unop/import/dots/idea_sharing.png b/public/images/unop/import/dots/idea_sharing.png new file mode 100644 index 0000000..7f1598b Binary files /dev/null and b/public/images/unop/import/dots/idea_sharing.png differ diff --git a/public/images/unop/import/dots/in_progress.png b/public/images/unop/import/dots/in_progress.png new file mode 100644 index 0000000..9426af9 Binary files /dev/null and b/public/images/unop/import/dots/in_progress.png differ diff --git a/public/images/unop/import/dots/invisible.png b/public/images/unop/import/dots/invisible.png new file mode 100644 index 0000000..ed7d3e5 Binary files /dev/null and b/public/images/unop/import/dots/invisible.png differ diff --git a/public/images/unop/import/dots/invoice.png b/public/images/unop/import/dots/invoice.png new file mode 100644 index 0000000..7f994c9 Binary files /dev/null and b/public/images/unop/import/dots/invoice.png differ diff --git a/public/images/unop/import/dots/iphone.png b/public/images/unop/import/dots/iphone.png new file mode 100644 index 0000000..d5ab6f7 Binary files /dev/null and b/public/images/unop/import/dots/iphone.png differ diff --git a/public/images/unop/import/dots/language.png b/public/images/unop/import/dots/language.png new file mode 100644 index 0000000..f6b37ed Binary files /dev/null and b/public/images/unop/import/dots/language.png differ diff --git a/public/images/unop/import/dots/light_on.png b/public/images/unop/import/dots/light_on.png new file mode 100644 index 0000000..0fcccab Binary files /dev/null and b/public/images/unop/import/dots/light_on.png differ diff --git a/public/images/unop/import/dots/lightning_bolt.png b/public/images/unop/import/dots/lightning_bolt.png new file mode 100644 index 0000000..6aceb7a Binary files /dev/null and b/public/images/unop/import/dots/lightning_bolt.png differ diff --git a/public/images/unop/import/dots/lock.png b/public/images/unop/import/dots/lock.png new file mode 100644 index 0000000..1a8f01f Binary files /dev/null and b/public/images/unop/import/dots/lock.png differ diff --git a/public/images/unop/import/dots/loyalty_card.png b/public/images/unop/import/dots/loyalty_card.png new file mode 100644 index 0000000..018f3fb Binary files /dev/null and b/public/images/unop/import/dots/loyalty_card.png differ diff --git a/public/images/unop/import/dots/maintenance.png b/public/images/unop/import/dots/maintenance.png new file mode 100644 index 0000000..119316d Binary files /dev/null and b/public/images/unop/import/dots/maintenance.png differ diff --git a/public/images/unop/import/dots/map_marker.png b/public/images/unop/import/dots/map_marker.png new file mode 100644 index 0000000..0da35a2 Binary files /dev/null and b/public/images/unop/import/dots/map_marker.png differ diff --git a/public/images/unop/import/dots/mind_map.png b/public/images/unop/import/dots/mind_map.png new file mode 100644 index 0000000..69f3265 Binary files /dev/null and b/public/images/unop/import/dots/mind_map.png differ diff --git a/public/images/unop/import/dots/money.png b/public/images/unop/import/dots/money.png new file mode 100644 index 0000000..1c66686 Binary files /dev/null and b/public/images/unop/import/dots/money.png differ diff --git a/public/images/unop/import/dots/money_box.png b/public/images/unop/import/dots/money_box.png new file mode 100644 index 0000000..b4c57c0 Binary files /dev/null and b/public/images/unop/import/dots/money_box.png differ diff --git a/public/images/unop/import/dots/money_transfer.png b/public/images/unop/import/dots/money_transfer.png new file mode 100644 index 0000000..b1dbe47 Binary files /dev/null and b/public/images/unop/import/dots/money_transfer.png differ diff --git a/public/images/unop/import/dots/monitor.png b/public/images/unop/import/dots/monitor.png new file mode 100644 index 0000000..2f1a3db Binary files /dev/null and b/public/images/unop/import/dots/monitor.png differ diff --git a/public/images/unop/import/dots/nfc_checkpoint.png b/public/images/unop/import/dots/nfc_checkpoint.png new file mode 100644 index 0000000..328eb21 Binary files /dev/null and b/public/images/unop/import/dots/nfc_checkpoint.png differ diff --git a/public/images/unop/import/dots/nfc_logo.png b/public/images/unop/import/dots/nfc_logo.png new file mode 100644 index 0000000..4980766 Binary files /dev/null and b/public/images/unop/import/dots/nfc_logo.png differ diff --git a/public/images/unop/import/dots/nfc_sign.png b/public/images/unop/import/dots/nfc_sign.png new file mode 100644 index 0000000..c79a128 Binary files /dev/null and b/public/images/unop/import/dots/nfc_sign.png differ diff --git a/public/images/unop/import/dots/online.png b/public/images/unop/import/dots/online.png new file mode 100644 index 0000000..c391c75 Binary files /dev/null and b/public/images/unop/import/dots/online.png differ diff --git a/public/images/unop/import/dots/online_support.png b/public/images/unop/import/dots/online_support.png new file mode 100644 index 0000000..7ff0d97 Binary files /dev/null and b/public/images/unop/import/dots/online_support.png differ diff --git a/public/images/unop/import/dots/password.png b/public/images/unop/import/dots/password.png new file mode 100644 index 0000000..0a4a1ec Binary files /dev/null and b/public/images/unop/import/dots/password.png differ diff --git a/public/images/unop/import/dots/paycheque.png b/public/images/unop/import/dots/paycheque.png new file mode 100644 index 0000000..4975d16 Binary files /dev/null and b/public/images/unop/import/dots/paycheque.png differ diff --git a/public/images/unop/import/dots/pie_chart.png b/public/images/unop/import/dots/pie_chart.png new file mode 100644 index 0000000..75b3300 Binary files /dev/null and b/public/images/unop/import/dots/pie_chart.png differ diff --git a/public/images/unop/import/dots/polyline.png b/public/images/unop/import/dots/polyline.png new file mode 100644 index 0000000..7ad7ab2 Binary files /dev/null and b/public/images/unop/import/dots/polyline.png differ diff --git a/public/images/unop/import/dots/positive_dynamic.png b/public/images/unop/import/dots/positive_dynamic.png new file mode 100644 index 0000000..2dce0e0 Binary files /dev/null and b/public/images/unop/import/dots/positive_dynamic.png differ diff --git a/public/images/unop/import/dots/purchase_order.png b/public/images/unop/import/dots/purchase_order.png new file mode 100644 index 0000000..a95755b Binary files /dev/null and b/public/images/unop/import/dots/purchase_order.png differ diff --git a/public/images/unop/import/dots/push_notifications.png b/public/images/unop/import/dots/push_notifications.png new file mode 100644 index 0000000..fa8ce7d Binary files /dev/null and b/public/images/unop/import/dots/push_notifications.png differ diff --git a/public/images/unop/import/dots/qr_code.png b/public/images/unop/import/dots/qr_code.png new file mode 100644 index 0000000..de3a285 Binary files /dev/null and b/public/images/unop/import/dots/qr_code.png differ diff --git a/public/images/unop/import/dots/question.png b/public/images/unop/import/dots/question.png new file mode 100644 index 0000000..81645a2 Binary files /dev/null and b/public/images/unop/import/dots/question.png differ diff --git a/public/images/unop/import/dots/receipt.png b/public/images/unop/import/dots/receipt.png new file mode 100644 index 0000000..7a89720 Binary files /dev/null and b/public/images/unop/import/dots/receipt.png differ diff --git a/public/images/unop/import/dots/receive_cash.png b/public/images/unop/import/dots/receive_cash.png new file mode 100644 index 0000000..06c5fab Binary files /dev/null and b/public/images/unop/import/dots/receive_cash.png differ diff --git a/public/images/unop/import/dots/rocket.png b/public/images/unop/import/dots/rocket.png new file mode 100644 index 0000000..b74c239 Binary files /dev/null and b/public/images/unop/import/dots/rocket.png differ diff --git a/public/images/unop/import/dots/safe_ok.png b/public/images/unop/import/dots/safe_ok.png new file mode 100644 index 0000000..82a4401 Binary files /dev/null and b/public/images/unop/import/dots/safe_ok.png differ diff --git a/public/images/unop/import/dots/security_checked.png b/public/images/unop/import/dots/security_checked.png new file mode 100644 index 0000000..014b683 Binary files /dev/null and b/public/images/unop/import/dots/security_checked.png differ diff --git a/public/images/unop/import/dots/server.png b/public/images/unop/import/dots/server.png new file mode 100644 index 0000000..4965c82 Binary files /dev/null and b/public/images/unop/import/dots/server.png differ diff --git a/public/images/unop/import/dots/share.png b/public/images/unop/import/dots/share.png new file mode 100644 index 0000000..51fcd8e Binary files /dev/null and b/public/images/unop/import/dots/share.png differ diff --git a/public/images/unop/import/dots/shop.png b/public/images/unop/import/dots/shop.png new file mode 100644 index 0000000..bbf3b19 Binary files /dev/null and b/public/images/unop/import/dots/shop.png differ diff --git a/public/images/unop/import/dots/shopping_bag.png b/public/images/unop/import/dots/shopping_bag.png new file mode 100644 index 0000000..21efd95 Binary files /dev/null and b/public/images/unop/import/dots/shopping_bag.png differ diff --git a/public/images/unop/import/dots/shopping_cart.png b/public/images/unop/import/dots/shopping_cart.png new file mode 100644 index 0000000..0081859 Binary files /dev/null and b/public/images/unop/import/dots/shopping_cart.png differ diff --git a/public/images/unop/import/dots/shopping_cart_loaded.png b/public/images/unop/import/dots/shopping_cart_loaded.png new file mode 100644 index 0000000..b57c058 Binary files /dev/null and b/public/images/unop/import/dots/shopping_cart_loaded.png differ diff --git a/public/images/unop/import/dots/sms.png b/public/images/unop/import/dots/sms.png new file mode 100644 index 0000000..2e964ee Binary files /dev/null and b/public/images/unop/import/dots/sms.png differ diff --git a/public/images/unop/import/dots/statistics.png b/public/images/unop/import/dots/statistics.png new file mode 100644 index 0000000..37b79df Binary files /dev/null and b/public/images/unop/import/dots/statistics.png differ diff --git a/public/images/unop/import/dots/synchronize.png b/public/images/unop/import/dots/synchronize.png new file mode 100644 index 0000000..1150273 Binary files /dev/null and b/public/images/unop/import/dots/synchronize.png differ diff --git a/public/images/unop/import/dots/thumb_up.png b/public/images/unop/import/dots/thumb_up.png new file mode 100644 index 0000000..e9e7582 Binary files /dev/null and b/public/images/unop/import/dots/thumb_up.png differ diff --git a/public/images/unop/import/dots/ticket.png b/public/images/unop/import/dots/ticket.png new file mode 100644 index 0000000..b0d3390 Binary files /dev/null and b/public/images/unop/import/dots/ticket.png differ diff --git a/public/images/unop/import/dots/track_order.png b/public/images/unop/import/dots/track_order.png new file mode 100644 index 0000000..6c59b5f Binary files /dev/null and b/public/images/unop/import/dots/track_order.png differ diff --git a/public/images/unop/import/dots/trust.png b/public/images/unop/import/dots/trust.png new file mode 100644 index 0000000..2a3beda Binary files /dev/null and b/public/images/unop/import/dots/trust.png differ diff --git a/public/images/unop/import/dots/unknown_status.png b/public/images/unop/import/dots/unknown_status.png new file mode 100644 index 0000000..54277b7 Binary files /dev/null and b/public/images/unop/import/dots/unknown_status.png differ diff --git a/public/images/unop/import/dots/us_dollar.png b/public/images/unop/import/dots/us_dollar.png new file mode 100644 index 0000000..4ebbac0 Binary files /dev/null and b/public/images/unop/import/dots/us_dollar.png differ diff --git a/public/images/unop/import/dots/user.png b/public/images/unop/import/dots/user.png new file mode 100644 index 0000000..8a909df Binary files /dev/null and b/public/images/unop/import/dots/user.png differ diff --git a/public/images/unop/import/dots/view_details.png b/public/images/unop/import/dots/view_details.png new file mode 100644 index 0000000..e213ae5 Binary files /dev/null and b/public/images/unop/import/dots/view_details.png differ diff --git a/public/images/unop/import/dots/visible.png b/public/images/unop/import/dots/visible.png new file mode 100644 index 0000000..484056f Binary files /dev/null and b/public/images/unop/import/dots/visible.png differ diff --git a/public/images/unop/import/dots/wallet.png b/public/images/unop/import/dots/wallet.png new file mode 100644 index 0000000..9319217 Binary files /dev/null and b/public/images/unop/import/dots/wallet.png differ diff --git a/public/images/unop/import/dots/wi-fi.png b/public/images/unop/import/dots/wi-fi.png new file mode 100644 index 0000000..5964332 Binary files /dev/null and b/public/images/unop/import/dots/wi-fi.png differ diff --git a/public/images/unop/import/dots/workflow.png b/public/images/unop/import/dots/workflow.png new file mode 100644 index 0000000..ecced4d Binary files /dev/null and b/public/images/unop/import/dots/workflow.png differ diff --git a/public/images/unop/import/dots/workstation.png b/public/images/unop/import/dots/workstation.png new file mode 100644 index 0000000..48c3448 Binary files /dev/null and b/public/images/unop/import/dots/workstation.png differ diff --git a/public/images/unop/import/dots/worldwide_location.png b/public/images/unop/import/dots/worldwide_location.png new file mode 100644 index 0000000..831739d Binary files /dev/null and b/public/images/unop/import/dots/worldwide_location.png differ diff --git a/public/images/unop/import/enterprise.png b/public/images/unop/import/enterprise.png new file mode 100644 index 0000000..d0304c8 Binary files /dev/null and b/public/images/unop/import/enterprise.png differ diff --git a/public/images/unop/import/feature_1.png b/public/images/unop/import/feature_1.png new file mode 100644 index 0000000..ae461b9 Binary files /dev/null and b/public/images/unop/import/feature_1.png differ diff --git a/public/images/unop/import/feature_2.png b/public/images/unop/import/feature_2.png new file mode 100644 index 0000000..c46b0ba Binary files /dev/null and b/public/images/unop/import/feature_2.png differ diff --git a/public/images/unop/import/feature_3.png b/public/images/unop/import/feature_3.png new file mode 100644 index 0000000..acf4b22 Binary files /dev/null and b/public/images/unop/import/feature_3.png differ diff --git a/public/images/unop/import/feature_4.png b/public/images/unop/import/feature_4.png new file mode 100644 index 0000000..874f583 Binary files /dev/null and b/public/images/unop/import/feature_4.png differ diff --git a/public/images/unop/import/feature_5.png b/public/images/unop/import/feature_5.png new file mode 100644 index 0000000..2736931 Binary files /dev/null and b/public/images/unop/import/feature_5.png differ diff --git a/public/images/unop/import/get-identity.png b/public/images/unop/import/get-identity.png new file mode 100644 index 0000000..fe24535 Binary files /dev/null and b/public/images/unop/import/get-identity.png differ diff --git a/public/images/unop/import/iphone_mockup.png b/public/images/unop/import/iphone_mockup.png new file mode 100644 index 0000000..777df64 Binary files /dev/null and b/public/images/unop/import/iphone_mockup.png differ diff --git a/public/images/unop/import/topup.png b/public/images/unop/import/topup.png new file mode 100644 index 0000000..72c4cfc Binary files /dev/null and b/public/images/unop/import/topup.png differ diff --git a/public/images/unop/logo-id-144.png b/public/images/unop/logo-id-144.png new file mode 100644 index 0000000..25bd6a9 Binary files /dev/null and b/public/images/unop/logo-id-144.png differ diff --git a/public/images/unop/logo-id-192.png b/public/images/unop/logo-id-192.png new file mode 100644 index 0000000..9fdbd65 Binary files /dev/null and b/public/images/unop/logo-id-192.png differ diff --git a/public/images/unop/logo-ovh-avec-colored.png b/public/images/unop/logo-ovh-avec-colored.png new file mode 100644 index 0000000..98bb5af Binary files /dev/null and b/public/images/unop/logo-ovh-avec-colored.png differ diff --git a/public/images/unop/logo-ovh-avec-gray.png b/public/images/unop/logo-ovh-avec-gray.png new file mode 100644 index 0000000..294adb6 Binary files /dev/null and b/public/images/unop/logo-ovh-avec-gray.png differ diff --git a/public/images/unop/your-identity.png b/public/images/unop/your-identity.png new file mode 100644 index 0000000..7fa4954 Binary files /dev/null and b/public/images/unop/your-identity.png differ diff --git a/public/images/your-identity.png b/public/images/your-identity.png new file mode 100644 index 0000000..aca5377 Binary files /dev/null and b/public/images/your-identity.png differ diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..04dfc39 --- /dev/null +++ b/public/index.html @@ -0,0 +1,90 @@ + + +
+ + + + + + + + + +Q(a)?a.toUpperCase():[D.c(a.substring(0,1).toUpperCase()),D.c(a.substring(1))].join("")} +function al(a){if("string"===typeof a)return a;a=ke(a);var b=Tk(a,/-/),c=I(b),b=K(c),c=L(c);return w(Zk.c?Zk.c(b):Zk.call(null,b))?a:ze(D,b,Te.f($k,c))}function bl(a){var b=function(){var b=function(){var b=yd(a);return b?(b=a.displayName,w(b)?b:a.name):b}();if(w(b))return b;b=function(){var b=null!=a?a.J&4096||m===a.kd?!0:!1:!1;return b?ke(a):b}();if(w(b))return b;b=Ad(a);return Gd(b)?yi.c(b):null}();return Qk(""+D.c(b),"$",".")}var cl=!1;if("undefined"===typeof dl)var dl=0;function el(a){return setTimeout(a,16)}var fl="undefined"===typeof window||null==window.document?el:function(){var a=window,b=a.requestAnimationFrame;if(w(b))return b;b=a.webkitRequestAnimationFrame;if(w(b))return b;b=a.mozRequestAnimationFrame;if(w(b))return b;a=a.msRequestAnimationFrame;return w(a)?a:el}();function gl(a,b){return a.cljsMountOrder-b.cljsMountOrder}if("undefined"===typeof hl)var hl=function(){return null};function il(a){this.Ec=a} +function jl(a,b){var c=a[b];if(null==c)return null;a[b]=null;for(var d=c.length,e=0;;)if(e=d&&a.push(Hm(c));return a}}(e),[b,c],a))}};if("undefined"===typeof Mm)var Mm=null;function Nm(){if(null!=Mm)return Mm;if("undefined"!==typeof ReactDOM)return Mm=ReactDOM;if("undefined"!==typeof require){var a=Mm=require("react-dom");if(w(a))return a;throw Error("require('react-dom') failed");}throw Error("js/ReactDOM is missing");}if("undefined"===typeof Om)var Om=Oe?Oe(Fe):Ne.call(null,Fe); +function Pm(a,b){var c=cl;cl=!0;try{return Nm().render(a.l?a.l():a.call(null),b,function(){return function(){var c=cl;cl=!1;try{return Se.C(Om,vd,b,new W(null,2,5,X,[a,b],null)),jl(ll,"afterRender"),null}finally{cl=c}}}(c))}finally{cl=c}}function Qm(a,b){return Pm(a,b)}vm=function(a){return Nm().findDOMNode(a)};function Rm(){Cl();Cl();for(var a=I(Rf(N.c?N.c(Om):N.call(null,Om))),b=null,c=0,d=0;;)if(d 2*this.pa&&ao(this),!0):!1};function ao(a){var b,c;if(a.pa!=a.Fa.length){for(b=c=0;c b)throw Error("Bad port number "+b);a.Db=b}else a.Db=null} +function jo(a,b,c){ho(a);b instanceof lo?(a.Za=b,a.Za.Zc(a.Qa)):(c||(b=mo(b,ro)),a.Za=new lo(b,0,a.Qa))}h.removeParameter=function(a){ho(this);this.Za.remove(a);return this};function ho(a){if(a.Zd)throw Error("Tried to modify a read-only Uri");}h.Zc=function(a){this.Qa=a;this.Za&&this.Za.Zc(a);return this};function so(a){return a instanceof fo?a.clone():new fo(a,void 0)}function ko(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""} +function mo(a,b,c){return ca(a)?(a=encodeURI(a).replace(b,to),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function to(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)}var no=/[#\/\?@]/g,po=/[\#\?:]/g,oo=/[\#\?]/g,ro=/[\#\?@]/g,qo=/#/g;function lo(a,b,c){this.pa=this.$=null;this.Na=a||null;this.Qa=!!c}function uo(a){a.$||(a.$=new $n,a.pa=0,a.Na&&eo(a.Na,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))}h=lo.prototype; +h.add=function(a,b){uo(this);this.Na=null;a=vo(this,a);var c=this.$.get(a);c||this.$.set(a,c=[]);c.push(b);this.pa+=1;return this};h.remove=function(a){uo(this);a=vo(this,a);return this.$.gc(a)?(this.Na=null,this.pa-=this.$.get(a).length,this.$.remove(a)):!1};h.clear=function(){this.$=this.Na=null;this.pa=0};h.gc=function(a){uo(this);a=vo(this,a);return this.$.gc(a)};h.forEach=function(a,b){uo(this);this.$.forEach(function(c,d){Qa(c,function(c){a.call(b,c,d,this)},this)},this)}; +h.rb=function(){uo(this);for(var a=this.$.Ua(),b=this.$.rb(),c=[],d=0;d this.head?(Co(this.h,this.N,a,0,this.h.length-this.N),Co(this.h,0,a,this.h.length-this.N,this.head),this.N=0,this.head=this.length,this.h=a):this.N===this.head?(this.head=this.N=0,this.h=a):null};function Fo(a,b){for(var c=a.length,d=0;;)if(d a)){a+=1;continue}break}Ro=!1;return 0 d.gb.length))throw Error([D.c("Assert failed: "), +D.c([D.c("No more than "),D.c(1024),D.c(" pending puts are allowed on a single channel."),D.c(" Consider using a windowed buffer.")].join("")),D.c("\n"),D.c("(\x3c (.-length puts) impl/MAX-QUEUE-SIZE)")].join(""));Eo(d.gb,new Yo(c,b))}return null}; +function cp(a,b){if(null!=a.L&&0 a.Gb.length))throw Error([D.c("Assert failed: "),D.c([D.c("No more than "),D.c(1024),D.c(" pending takes are allowed on a single channel.")].join("")),D.c("\n"),D.c("(\x3c (.-length takes) impl/MAX-QUEUE-SIZE)")].join(""));Eo(a.Gb,b)}return null} +function bp(a){if(!a.closed)for(a.closed=!0,w(function(){var b=a.L;return w(b)?0===a.gb.length:b}())&&(a.Pa.c?a.Pa.c(a.L):a.Pa.call(null,a.L));;){var b=a.Gb.pop();if(null!=b){var c=b.wa,d=w(function(){var b=a.L;return w(b)?0parseFloat(zp)){yp=String(Bp);break a}}yp=zp}var Wa={}; +function Cp(a){return Va(a,function(){for(var b=0,c=qa(String(yp)).split("."),d=qa(String(a)).split("."),e=Math.max(c.length,d.length),f=0;0==b&&f=a.keyCode)a.keyCode=-1}catch(b){}};var Jp="closure_listenable_"+(1E6*Math.random()|0),Kp=0;function Lp(a,b,c,d,e){this.listener=a;this.Dc=null;this.src=b;this.type=c;this.capture=!!d;this.cb=e;this.key=++Kp;this.Pb=this.qc=!1}function Mp(a){a.Pb=!0;a.listener=null;a.Dc=null;a.src=null;a.cb=null};function Np(a){this.src=a;this.Oa={};this.Hc=0}Np.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.Oa[f];a||(a=this.Oa[f]=[],this.Hc++);var g=Op(a,b,d,e);-1 e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(n){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var g=a.type,k=e.length-1;!c.Eb&&0<=k;k--)c.currentTarget=e[k],f=aq(e[k],g,!0,c),d=d&&f;for(k=0;!c.Eb&&k >>0);function Up(a){if(ga(a))return a;a[cq]||(a[cq]=function(b){return a.handleEvent(b)});return a[cq]};function dq(){Un.call(this);this.Bb=new Np(this);this.Id=this;this.Ad=null}oa(dq,Un);dq.prototype[Jp]=!0;h=dq.prototype;h.addEventListener=function(a,b,c,d){Tp(this,a,b,c,d)};h.removeEventListener=function(a,b,c,d){Zp(this,a,b,c,d)}; +h.dispatchEvent=function(a){var b,c=this.Ad;if(c)for(b=[];c;c=c.Ad)b.push(c);var c=this.Id,d=a.type||a;if(ca(a))a=new Wn(a,c);else if(a instanceof Wn)a.target=a.target||c;else{var e=a;a=new Wn(d,c);za(a,e)}var e=!0;if(b)for(var f=b.length-1;!a.Eb&&0<=f;f--){var g=a.currentTarget=b[f];e=eq(g,d,!0,a)&&e}a.Eb||(g=a.currentTarget=c,e=eq(g,d,!0,a)&&e,a.Eb||(e=eq(g,d,!1,a)&&e));if(b)for(f=0;!a.Eb&&f b?"":a.substring(b+1)}return null} +fq.prototype.Uc=function(a){if(this.Rc){var b=hq(this);if("popstate"==a.type||b!=this.rd)this.rd=b,this.dispatchEvent(new Xn(gq(this)))}};if("undefined"===typeof iq)var iq=new fq;function jq(){var a=iq,b=op(null);Tp(a,"navigate",function(a,b,e){return function(a){a=xo(e,a,pp);return w(a)?N.c?N.c(a):N.call(null,a):!0}}(a,"navigate",b));return b}function kq(a){for(;;){if(w(a.href))return a;a=a.parentNode;if(!w(a))return null}}function lq(a,b,c){var d=a.Jb.history;var e=[D.c(a.Cc),D.c(b)].join("");w(c)||(c=document.title,c=w(c)?c:"");d.pushState(null,c,e);a.dispatchEvent(new Xn(b))} +function mq(a){a=a.Za.toString();return Cd(a)?null:[D.c("?"),D.c(a)].join("")}function nq(a){a=a.qb;return Cd(a)?null:[D.c("#"),D.c(a)].join("")}if("undefined"===typeof oq)var oq=null;if("undefined"===typeof pq)var pq=null;var Ya=function(){function a(a){if(0 query [uri] + (let [query (.getQuery uri)] + (when-not (empty? query) + (str "?" query)))) + +(defn- uri->fragment [uri] + (let [fragment (.getFragment uri)] + (when-not (empty? fragment) + (str "#" fragment)))) + +(defn- prevent-reload-on-known-path + "Create a click handler that blocks page reloads for known routes" + [history path-exists?] + (events/listen + js/document + "click" + (fn [e] + (let [target (.-target e) + button (.-button e) + meta-key (.-metaKey e) + alt-key (.-altKey e) + ctrl-key (.-ctrlKey e) + shift-key (.-shiftKey e) + any-key (or meta-key alt-key ctrl-key shift-key) + href-node (find-href-node target) + href (when href-node (.-href href-node)) + link-target (when href-node (.-target href-node)) + uri (.parse Uri href) + path (.getPath uri) + query (uri->query uri) + fragment (uri->fragment uri) + relative-href (str path query fragment) + title (.-title target) + host (.getDomain uri) + port (.getPort uri) + current-host js/window.location.hostname + current-port js/window.location.port + loc js/window.location + current-relative-href (str (.-pathname loc) (.-query loc) (.-hash loc))] + (when (and (not any-key) + (#{"" "_self"} link-target) + (= button 0) + (= host current-host) + (or (not port) + (= (str port) (str current-port))) + (path-exists? path)) + (when (not= current-relative-href relative-href) ;; do not add duplicate html5 history state + (set-token! history relative-href title)) + (.preventDefault e)))))) + +(defonce nav-handler nil) +(defonce path-exists? nil) + +(defn configure-navigation! + "Create and configure HTML5 history navigation. + + nav-handler: a fn of one argument, a path. Called when we've decided + to navigate to another page. You'll want to make your app draw the + new page here. + + path-exists?: a fn of one argument, a path. Return truthy if this path is handled by the SPA" + [{:keys [nav-handler path-exists?]}] + (.setUseFragment history false) + (.setPathPrefix history "") + (.setEnabled history true) + (set! accountant.core/nav-handler nav-handler) + (set! accountant.core/path-exists? path-exists?) + (dispatch-on-navigate history nav-handler) + (prevent-reload-on-known-path history path-exists?)) + +(defn map->params [query] + (let [params (map #(name %) (keys query)) + values (vals query) + pairs (partition 2 (interleave params values))] + (str/join "&" (map #(str/join "=" %) pairs)))) + +(defn navigate! + "add a browser history entry. updates window/location" + ([route] (navigate! route {})) + ([route query] + (if nav-handler + (let [token (.getToken history) + old-route (first (str/split token "?")) + query-string (map->params (reduce-kv (fn [valid k v] + (if v + (assoc valid k v) + valid)) {} query)) + with-params (if (empty? query-string) + route + (str route "?" query-string))] + (if (= old-route route) + (. history (replaceToken with-params)) + (. history (setToken with-params)))) + (js/console.error "can't navigate! until configure-navigation! called")))) + +(defn dispatch-current! [] + "Dispatch current URI path." + (let [path (-> js/window .-location .-pathname) + query (-> js/window .-location .-search) + hash (-> js/window .-location .-hash)] + (if nav-handler + (nav-handler (str path query hash)) + (js/console.error "can't dispatch-current until configure-navigation! called")))) diff --git a/public/js/rel/accountant/core.js b/public/js/rel/accountant/core.js new file mode 100644 index 0000000..eaf27dc --- /dev/null +++ b/public/js/rel/accountant/core.js @@ -0,0 +1,462 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('accountant.core'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('cljs.core.async'); +goog.require('clojure.string'); +goog.require('goog.events'); +goog.require('goog.history.EventType'); +goog.require('goog.history.Event'); +goog.require('goog.history.Html5History'); +goog.require('goog.Uri'); +if(typeof accountant.core.history !== 'undefined'){ +} else { +accountant.core.history = (new goog.history.Html5History()); +} +accountant.core.listen = (function accountant$core$listen(el,type){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$0(); +var G__19952_19955 = el; +var G__19953_19956 = type; +var G__19954_19957 = ((function (G__19952_19955,G__19953_19956,out){ +return (function (e){ +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2(out,e); +});})(G__19952_19955,G__19953_19956,out)) +; +goog.events.listen(G__19952_19955,G__19953_19956,G__19954_19957); + +return out; +}); +accountant.core.dispatch_on_navigate = (function accountant$core$dispatch_on_navigate(history,nav_handler){ +var navigation = accountant.core.listen(history,goog.history.EventType.NAVIGATE); +var c__17075__auto__ = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto__,navigation){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto__,navigation){ +return (function (state_20000){ +var state_val_20001 = (state_20000[(1)]); +if((state_val_20001 === (1))){ +var state_20000__$1 = state_20000; +var statearr_20002_20016 = state_20000__$1; +(statearr_20002_20016[(2)] = null); + +(statearr_20002_20016[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_20001 === (2))){ +var state_20000__$1 = state_20000; +var statearr_20003_20017 = state_20000__$1; +(statearr_20003_20017[(1)] = (4)); + + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_20001 === (3))){ +var inst_19998 = (state_20000[(2)]); +var state_20000__$1 = state_20000; +return cljs.core.async.impl.ioc_helpers.return_chan(state_20000__$1,inst_19998); +} else { +if((state_val_20001 === (4))){ +var state_20000__$1 = state_20000; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_20000__$1,(7),navigation); +} else { +if((state_val_20001 === (5))){ +var state_20000__$1 = state_20000; +var statearr_20005_20018 = state_20000__$1; +(statearr_20005_20018[(2)] = null); + +(statearr_20005_20018[(1)] = (6)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_20001 === (6))){ +var inst_19996 = (state_20000[(2)]); +var state_20000__$1 = state_20000; +var statearr_20006_20019 = state_20000__$1; +(statearr_20006_20019[(2)] = inst_19996); + +(statearr_20006_20019[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_20001 === (7))){ +var inst_19990 = (state_20000[(2)]); +var inst_19991 = inst_19990.token; +var inst_19992 = (nav_handler.cljs$core$IFn$_invoke$arity$1 ? nav_handler.cljs$core$IFn$_invoke$arity$1(inst_19991) : nav_handler.call(null,inst_19991)); +var state_20000__$1 = (function (){var statearr_20007 = state_20000; +(statearr_20007[(7)] = inst_19992); + +return statearr_20007; +})(); +var statearr_20008_20020 = state_20000__$1; +(statearr_20008_20020[(2)] = null); + +(statearr_20008_20020[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +});})(c__17075__auto__,navigation)) +; +return ((function (switch__16949__auto__,c__17075__auto__,navigation){ +return (function() { +var accountant$core$dispatch_on_navigate_$_state_machine__16950__auto__ = null; +var accountant$core$dispatch_on_navigate_$_state_machine__16950__auto____0 = (function (){ +var statearr_20012 = [null,null,null,null,null,null,null,null]; +(statearr_20012[(0)] = accountant$core$dispatch_on_navigate_$_state_machine__16950__auto__); + +(statearr_20012[(1)] = (1)); + +return statearr_20012; +}); +var accountant$core$dispatch_on_navigate_$_state_machine__16950__auto____1 = (function (state_20000){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_20000); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e20013){if((e20013 instanceof Object)){ +var ex__16953__auto__ = e20013; +var statearr_20014_20021 = state_20000; +(statearr_20014_20021[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_20000); + +return cljs.core.cst$kw$recur; +} else { +throw e20013; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__20022 = state_20000; +state_20000 = G__20022; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +accountant$core$dispatch_on_navigate_$_state_machine__16950__auto__ = function(state_20000){ +switch(arguments.length){ +case 0: +return accountant$core$dispatch_on_navigate_$_state_machine__16950__auto____0.call(this); +case 1: +return accountant$core$dispatch_on_navigate_$_state_machine__16950__auto____1.call(this,state_20000); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +accountant$core$dispatch_on_navigate_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = accountant$core$dispatch_on_navigate_$_state_machine__16950__auto____0; +accountant$core$dispatch_on_navigate_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = accountant$core$dispatch_on_navigate_$_state_machine__16950__auto____1; +return accountant$core$dispatch_on_navigate_$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto__,navigation)) +})(); +var state__17077__auto__ = (function (){var statearr_20015 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_20015[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto__); + +return statearr_20015; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto__,navigation)) +); + +return c__17075__auto__; +}); +/** + * Given a DOM element that may or may not be a link, traverse up the DOM tree + * to see if any of its parents are links. If so, return the node. + */ +accountant.core.find_href_node = (function accountant$core$find_href_node(e){ +while(true){ +if(cljs.core.truth_(e.href)){ +return e; +} else { +var temp__5278__auto__ = e.parentNode; +if(cljs.core.truth_(temp__5278__auto__)){ +var parent = temp__5278__auto__; +var G__20023 = parent; +e = G__20023; +continue; +} else { +return null; +} +} +break; +} +}); +/** + * Gets the URL for a history token, but without preserving the query string + * as Google's version incorrectly does. (See https://goo.gl/xwgUos) + */ +accountant.core.get_url = (function accountant$core$get_url(history,token){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(history.pathPrefix_),cljs.core.str.cljs$core$IFn$_invoke$arity$1(token)].join(''); +}); +/** + * Sets a history token, but without preserving the query string as Google's + * version incorrectly does. (See https://goo.gl/xwgUos) + */ +accountant.core.set_token_BANG_ = (function accountant$core$set_token_BANG_(history,token,title){ +var js_history = history.window_.history; +var url = accountant.core.get_url(history,token); +js_history.pushState(null,(function (){var or__7960__auto__ = title; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = document.title; +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +return ""; +} +} +})(),url); + +return history.dispatchEvent((new goog.history.Event(token))); +}); +accountant.core.uri__GT_query = (function accountant$core$uri__GT_query(uri){ +var query = uri.getQuery(); +if(cljs.core.empty_QMARK_(query)){ +return null; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("?"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(query)].join(''); +} +}); +accountant.core.uri__GT_fragment = (function accountant$core$uri__GT_fragment(uri){ +var fragment = uri.getFragment(); +if(cljs.core.empty_QMARK_(fragment)){ +return null; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("#"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(fragment)].join(''); +} +}); +/** + * Create a click handler that blocks page reloads for known routes + */ +accountant.core.prevent_reload_on_known_path = (function accountant$core$prevent_reload_on_known_path(history,path_exists_QMARK_){ +var G__20027 = document; +var G__20028 = "click"; +var G__20029 = ((function (G__20027,G__20028){ +return (function (e){ +var target = e.target; +var button = e.button; +var meta_key = e.metaKey; +var alt_key = e.altKey; +var ctrl_key = e.ctrlKey; +var shift_key = e.shiftKey; +var any_key = (function (){var or__7960__auto__ = meta_key; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = alt_key; +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = ctrl_key; +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +return shift_key; +} +} +} +})(); +var href_node = accountant.core.find_href_node(target); +var href = (cljs.core.truth_(href_node)?href_node.href:null); +var link_target = (cljs.core.truth_(href_node)?href_node.target:null); +var uri = goog.Uri.parse(href); +var path = uri.getPath(); +var query = accountant.core.uri__GT_query(uri); +var fragment = accountant.core.uri__GT_fragment(uri); +var relative_href = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(path),cljs.core.str.cljs$core$IFn$_invoke$arity$1(query),cljs.core.str.cljs$core$IFn$_invoke$arity$1(fragment)].join(''); +var title = target.title; +var host = uri.getDomain(); +var port = uri.getPort(); +var current_host = window.location.hostname; +var current_port = window.location.port; +var loc = window.location; +var current_relative_href = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(loc.pathname),cljs.core.str.cljs$core$IFn$_invoke$arity$1(loc.query),cljs.core.str.cljs$core$IFn$_invoke$arity$1(loc.hash)].join(''); +if(cljs.core.truth_((function (){var and__7948__auto__ = cljs.core.not(any_key); +if(and__7948__auto__){ +var and__7948__auto____$1 = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["",null,"_self",null], null), null).call(null,link_target); +if(cljs.core.truth_(and__7948__auto____$1)){ +var and__7948__auto____$2 = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(button,(0)); +if(and__7948__auto____$2){ +var and__7948__auto____$3 = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(host,current_host); +if(and__7948__auto____$3){ +var and__7948__auto____$4 = (cljs.core.not(port)) || (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2([cljs.core.str.cljs$core$IFn$_invoke$arity$1(port)].join(''),[cljs.core.str.cljs$core$IFn$_invoke$arity$1(current_port)].join(''))); +if(and__7948__auto____$4){ +return (path_exists_QMARK_.cljs$core$IFn$_invoke$arity$1 ? path_exists_QMARK_.cljs$core$IFn$_invoke$arity$1(path) : path_exists_QMARK_.call(null,path)); +} else { +return and__7948__auto____$4; +} +} else { +return and__7948__auto____$3; +} +} else { +return and__7948__auto____$2; +} +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})())){ +if(cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(current_relative_href,relative_href)){ +accountant.core.set_token_BANG_(history,relative_href,title); +} else { +} + +return e.preventDefault(); +} else { +return null; +} +});})(G__20027,G__20028)) +; +return goog.events.listen(G__20027,G__20028,G__20029); +}); +if(typeof accountant.core.nav_handler !== 'undefined'){ +} else { +accountant.core.nav_handler = null; +} +if(typeof accountant.core.path_exists_QMARK_ !== 'undefined'){ +} else { +accountant.core.path_exists_QMARK_ = null; +} +/** + * Create and configure HTML5 history navigation. + * + * nav-handler: a fn of one argument, a path. Called when we've decided + * to navigate to another page. You'll want to make your app draw the + * new page here. + * + * path-exists?: a fn of one argument, a path. Return truthy if this path is handled by the SPA + */ +accountant.core.configure_navigation_BANG_ = (function accountant$core$configure_navigation_BANG_(p__20030){ +var map__20033 = p__20030; +var map__20033__$1 = ((((!((map__20033 == null)))?((((map__20033.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__20033.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__20033):map__20033); +var nav_handler = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__20033__$1,cljs.core.cst$kw$nav_DASH_handler); +var path_exists_QMARK_ = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__20033__$1,cljs.core.cst$kw$path_DASH_exists_QMARK_); +accountant.core.history.setUseFragment(false); + +accountant.core.history.setPathPrefix(""); + +accountant.core.history.setEnabled(true); + +accountant.core.nav_handler = nav_handler; + +accountant.core.path_exists_QMARK_ = path_exists_QMARK_; + +accountant.core.dispatch_on_navigate(accountant.core.history,nav_handler); + +return accountant.core.prevent_reload_on_known_path(accountant.core.history,path_exists_QMARK_); +}); +accountant.core.map__GT_params = (function accountant$core$map__GT_params(query){ +var params = cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__20035_SHARP_){ +return cljs.core.name(p1__20035_SHARP_); +}),cljs.core.keys(query)); +var values = cljs.core.vals(query); +var pairs = cljs.core.partition.cljs$core$IFn$_invoke$arity$2((2),cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(params,values)); +return clojure.string.join.cljs$core$IFn$_invoke$arity$2("&",cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (params,values,pairs){ +return (function (p1__20036_SHARP_){ +return clojure.string.join.cljs$core$IFn$_invoke$arity$2("=",p1__20036_SHARP_); +});})(params,values,pairs)) +,pairs)); +}); +/** + * add a browser history entry. updates window/location + */ +accountant.core.navigate_BANG_ = (function accountant$core$navigate_BANG_(var_args){ +var args20037 = []; +var len__9181__auto___20040 = arguments.length; +var i__9182__auto___20041 = (0); +while(true){ +if((i__9182__auto___20041 < len__9181__auto___20040)){ +args20037.push((arguments[i__9182__auto___20041])); + +var G__20042 = (i__9182__auto___20041 + (1)); +i__9182__auto___20041 = G__20042; +continue; +} else { +} +break; +} + +var G__20039 = args20037.length; +switch (G__20039) { +case 1: +return accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args20037.length)].join(''))); + +} +}); + +accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (route){ +return accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$2(route,cljs.core.PersistentArrayMap.EMPTY); +}); + +accountant.core.navigate_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (route,query){ +if(cljs.core.truth_(accountant.core.nav_handler)){ +var token = accountant.core.history.getToken(); +var old_route = cljs.core.first(clojure.string.split.cljs$core$IFn$_invoke$arity$2(token,"?")); +var query_string = accountant.core.map__GT_params(cljs.core.reduce_kv(((function (token,old_route){ +return (function (valid,k,v){ +if(cljs.core.truth_(v)){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(valid,k,v); +} else { +return valid; +} +});})(token,old_route)) +,cljs.core.PersistentArrayMap.EMPTY,query)); +var with_params = ((cljs.core.empty_QMARK_(query_string))?route:[cljs.core.str.cljs$core$IFn$_invoke$arity$1(route),cljs.core.str.cljs$core$IFn$_invoke$arity$1("?"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(query_string)].join('')); +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(old_route,route)){ +return accountant.core.history.replaceToken(with_params); +} else { +return accountant.core.history.setToken(with_params); +} +} else { +return console.error("can't navigate! until configure-navigation! called"); +} +}); + +accountant.core.navigate_BANG_.cljs$lang$maxFixedArity = 2; + +accountant.core.dispatch_current_BANG_ = (function accountant$core$dispatch_current_BANG_(){ + +var path = window.location.pathname; +var query = window.location.search; +var hash = window.location.hash; +if(cljs.core.truth_(accountant.core.nav_handler)){ +var G__20045 = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(path),cljs.core.str.cljs$core$IFn$_invoke$arity$1(query),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hash)].join(''); +return (accountant.core.nav_handler.cljs$core$IFn$_invoke$arity$1 ? accountant.core.nav_handler.cljs$core$IFn$_invoke$arity$1(G__20045) : accountant.core.nav_handler.call(null,G__20045)); +} else { +return console.error("can't dispatch-current until configure-navigation! called"); +} +}); diff --git a/public/js/rel/alchemy/components/home.js b/public/js/rel/alchemy/components/home.js new file mode 100644 index 0000000..fa7cfdb --- /dev/null +++ b/public/js/rel/alchemy/components/home.js @@ -0,0 +1,44 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.components.home'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.core'); +goog.require('alchemy.partials'); +alchemy.components.home.section_home = (function alchemy$components$home$section_home(){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_home,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_particles_DASH_js], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$wow$fadeInDown,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h1$ui$header$wow$fadeInDown,"Identity Hash",new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$sub$header,"Seamless identity verification and payment solutions.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"An identity for each individual + an e-wallet for the masses."], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$wow$fadeInUp,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$ui$inverted$large$basic$button,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$data_DASH_scroll,"",cljs.core.cst$kw$href,"/#get-identity"], null),"Get the app now"], null)], null)], null)], null); +}); +alchemy.components.home.section_about = (function alchemy$components$home$section_about(){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_about,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$grid,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$two$column$row,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"about",cljs.core.cst$kw$src,"/images/import/about.png"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Platform for the Billions"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Identity Hash is a platform where users from different walks of life get an equal identity. An identity that will give them a chance, a voice to be heard, be known, and be secured. We're connecting different channels like government, private institutions and some international consensus to simplify and automate the process of identity verification. By doing this we give voice to people that are not being listed, to be known and have an identity and for those under bank to have secure way of connecting to the future."], null)], null)], null),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$three$column$row,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"For Developers"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"A platform for developers made by developers. Developers can connect to the APIs to create their own platform that rely in secure identity verification platform. We love developers and open-source."], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInUp,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"For Businesses"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p," This is the right platform for identity verification and payment solution as we will help you scale up and keep your perimeter secure. Transaction privacy and automation will keep your services fast and secure."], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"For Everyone"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"It is built for everyone in regards of race, color, nationality, gender, and personal views. All data will be keep in a semi-decentralized cloud servers and will be kept in watch 24/7. We value your privacy."], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$one$column$row,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column], null)], null)], null)], null)], null); +}); +alchemy.components.home.section_features = (function alchemy$components$home$section_features(){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_feature1,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$two$column$grid,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Ease Identity Verification"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"User are given multiple options to verify their identity, one of it is through KYC (Know Your Customer) process."], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"feature_1",cljs.core.cst$kw$src,"/images/import/feature_1.png"], null)], null)], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_feature2,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$two$column$grid,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"feature_2",cljs.core.cst$kw$src,"/images/import/feature_2.png"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Immutable Transactions"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"All transactions are stored on a decentralized immutable transaction ledger."], null)], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_feature3,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$two$column$grid,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Scale Up"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"From small medium enterprise to large corporate retail establishments, can now receive payments and issue digital receipts without the need for cash registers."], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"feature_3",cljs.core.cst$kw$src,"/images/import/feature_3.png"], null)], null)], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_feature4,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$two$column$grid,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"feature_4",cljs.core.cst$kw$src,"/images/import/feature_4.png"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Seamless Money Transfer"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Sending and receiving money can now be done with a tap of your phone."], null)], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_feature5,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$two$column$grid,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Track Spendings"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Analyze and track your expenditure based on your transaction logs."], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"feature_5",cljs.core.cst$kw$src,"/images/import/feature_5.png"], null)], null)], null)], null)], null)], null)], null); +}); +alchemy.components.home.section_enterprise = (function alchemy$components$home$section_enterprise(){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_enterprise,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$grid$wow$fadeInUp,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$row,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"We're Enterprise Ready!"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$two$column$row,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"automation",cljs.core.cst$kw$src,"/images/import/automation.png"], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Automate & Streamline"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Automate batch processing of transactions with a push of a button. Also, create reports base on generated analytics and streamline the long process of identity verification that may take several days to just minutes."], null)], null),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"data_driven",cljs.core.cst$kw$src,"/images/import/data_driven.png"], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Data Driven APIs"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Connect to our APIs and create your own platform that rely in a secure identity verification platform. All transactions that will be created will be kept in a secure place for auditing and generating reports. We will assure the data you get is validated and secured."], null)], null)], null),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$three$column$row,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$ui$inverted$fluid$massive$basic$button,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$data_DASH_scroll,"",cljs.core.cst$kw$href,"https://calendly.com/identity-hash/product-demo"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$calendar$icon], null),"Book a Demo"], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column], null)], null)], null)], null)], null); +}); +alchemy.components.home.section_topup = (function alchemy$components$home$section_topup(){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_topup,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container$wow$fadeInUp,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"topup",cljs.core.cst$kw$src,"/images/import/topup.png"], null)], null)], null)], null); +}); +alchemy.components.home.section_consumers = (function alchemy$components$home$section_consumers(){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_consumers,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$three$column$grid,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$three$column$row,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"consumers_1",cljs.core.cst$kw$src,"/images/import/consumers_1.png"], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Put The Power In Your Hands"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Automate and track every transaction within the reach of your hands. Consumers can schedule payment transaction and create a freeze account that will limit transactions per day."], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInUp,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"iphone_mockup",cljs.core.cst$kw$src,"/images/import/iphone_mockup.png"], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"consumers_2",cljs.core.cst$kw$src,"/images/import/consumers_2.png"], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"First Class Customer Support"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"We dedicate first class support on all our consumers. We value each customers privacy and security. All feedback and issue will be track and be valued."], null)], null)], null)], null)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_topup], null)], null); +}); +alchemy.components.home.section_get_identity = (function alchemy$components$home$section_get_identity(){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_get_DASH_identity,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$two$column$grid,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInUp,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Get Identity"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Identity Hash is now available on both Google Play and App Store."], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$nav$ui$horizontal$list,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"google_play_badge",cljs.core.cst$kw$src,"/images/google_play_badge.png"], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"app_store_badge",cljs.core.cst$kw$src,"/images/app_store_badge.png"], null)], null)], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"get-identity",cljs.core.cst$kw$src,"/images/import/get-identity.png"], null)], null)], null)], null)], null)], null); +}); +alchemy.components.home.section_meet_sophia = (function alchemy$components$home$section_meet_sophia(){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_meet_DASH_sophia,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$two$column$grid,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInLeft,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Meet Sophia"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$p,"Use our integrated system to check your wallet balance using your favorite messaging app. Now, you can do transaction inside Facebook Messenger app."], null),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$ul,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"Use Messenger Codes to verify a persons identity"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"Verify other persons identity"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"Check your wallet balance"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"Contact our support help desk"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"Submit feedback"], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$ui$violet$large$basic$button,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"https://m.me/identity.hash"], null),"Start using Messenger now"], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column$wow$fadeInRight,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"messenger_mock",cljs.core.cst$kw$src,"/images/messenger_mock.gif"], null)], null)], null)], null)], null)], null); +}); +alchemy.components.home.section_investors = (function alchemy$components$home$section_investors(){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_investors,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container$wow$fadeInUp,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$header,"Partners & Investors"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$container,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$swap,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"/"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$large$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"logo-ovh-gray",cljs.core.cst$kw$src,"/images/logo-ovh-avec-gray.png"], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$ui$centered$large$image,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"logo-ovh-colored",cljs.core.cst$kw$src,"/images/logo-ovh-avec-colored.png"], null)], null)], null)], null)], null)], null); +}); +alchemy.components.home.view_did_mount = (function alchemy$components$home$view_did_mount(){ +particlesJS.load("particles-js","/others/pjs-config.json"); + +return (new WOW()).init(); +}); +alchemy.components.home.view_render = (function alchemy$components$home$view_render(){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$alchemy$root,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.header_partial_view], null),new cljs.core.PersistentVector(null, 9, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$main$alchemy$content,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_home], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_about], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_features], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_enterprise], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_consumers], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_get_identity], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_meet_sophia], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.section_investors], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.footer_partial_view], null)], null); +}); +alchemy.components.home.view = (function alchemy$components$home$view(){ +return reagent.core.create_class(new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$component_DASH_did_DASH_mount,alchemy.components.home.view_did_mount,cljs.core.cst$kw$reagent_DASH_render,alchemy.components.home.view_render], null)); +}); diff --git a/public/js/rel/alchemy/components/privacy.js b/public/js/rel/alchemy/components/privacy.js new file mode 100644 index 0000000..2482797 --- /dev/null +++ b/public/js/rel/alchemy/components/privacy.js @@ -0,0 +1,18 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.components.privacy'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.core'); +goog.require('alchemy.partials'); +alchemy.components.privacy.policy_summary = (function alchemy$components$privacy$policy_summary(){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$center$aligned$header,"POLICY SUMMARY"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$section$divider], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h3$ui$header,"Personal Data collected for the following purposes and using the following services:"], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$stackable$two$column$grid,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column_GT_h4$ui$header,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$user$icon], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$content,"Access to third party accounts",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$sub$header,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Facebook account access"], null),"Permissions: About Me, Access Friend Lists, Birthday, Email and Publish App Activity"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column_GT_h4$ui$header,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$line$chart$icon], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$content,"Analytics",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$sub$header,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Analytics collected directly"], null),"Personal Data: Cookies and Usage Data"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column_GT_h4$ui$header,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$mail$icon], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$content,"Contacting the user",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$sub$header,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Contact form"], null),"Personal Data: city, country, email address, first name and last name"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$column_GT_h4$ui$header,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$map$icon], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$content,"Location-based interactions",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$sub$header,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Geolocation"], null),"Personal Data: geographic position"], null)], null)], null)], null)], null); +}); +alchemy.components.privacy.policy_full = (function alchemy$components$privacy$policy_full(){ +return new cljs.core.PersistentVector(null, 15, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h2$ui$center$aligned$header,"FULL POLICY"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$section$divider], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h3$ui$header,"Data Controller and Owner"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Types of Data collected"], null),new cljs.core.PersistentVector(null, 16, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"Among the types of Personal Data that this Application collects, by itself or through third parties, there are: Cookies, Usage Data, first name, last name, country, email address, city and geographic position.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"Other Personal Data collected may be described in other sections of this privacy policy or by dedicated explanation text contextually with the Data collection.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"The Personal Data may be freely provided by the User, or collected automatically when using this Application.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"Any use of Cookies - or of other tracking tools - by this Application or by the owners of third party services used by this Application, unless stated otherwise, serves to identify Users and remember their preferences, for the sole purpose of providing the service required by the User.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"Failure to provide certain Personal Data may make it impossible for this Application to provide its services.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"Users are responsible for any Personal Data of third parties obtained, published or shared through this Application and confirm that they have the third party's consent to provide the Data to the Owner."], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$section$divider], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Mode and place of processing the Data"], null),new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Methods of processing"], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The Data Controller processes the Data of Users in a proper manner and shall take appropriate security measures to prevent unauthorized access, disclosure, modification, or unauthorized destruction of the Data.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"The Data processing is carried out using computers and/or IT enabled tools, following organizational procedures and modes strictly related to the purposes indicated. In addition to the Data Controller, in some cases, the Data may be accessible to certain types of persons in charge, involved with the operation of the site (administration, sales, marketing, legal, system administration) or external parties (such as third party technical service providers, mail carriers, hosting providers, IT companies, communications agencies) appointed, if necessary, as Data Processors by the Owner. The updated list of these parties may be requested from the Data Controller at any time."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Place"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The Data is processed at the Data Controller's operating offices and in any other places where the parties involved with the processing are located. For further information, please contact the Data Controller."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Retention time"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The Data is kept for the time necessary to provide the service requested by the User, or stated by the purposes outlined in this document, and the User can always request that the Data Controller suspend or remove the data."], null)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$section$divider], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"The use of the collected Data"], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The Data concerning the User is collected to allow the Owner to provide its services, as well as for the following purposes: Access to third party accounts, Analytics, Contacting the User and Location-based interactions.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"The Personal Data used for each purpose is outlined in the specific sections of this document."], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$section$divider], null),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Facebook permissions asked by this Application"], null),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"This Application may ask for some Facebook permissions allowing it to perform actions with the User's Facebook account and to retrieve information, including Personal Data, from it. For more information about the following permissions, refer to the Facebook permissions documentation and to the Facebook privacy policy.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"The permissions asked are the following:"], null),new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Basic information"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"By default, this includes certain User\u2019s Data such as id, name, picture, gender, and their locale. Certain connections of the User, such as the Friends, are also available. If the User has made more of their Data public, more information will be available."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"About Me"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"Provides access to the 'About Me' section of the profile."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Access Friend Lists"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"Provides access to any friend lists the User created."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Birthday"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"Provides access to the birthday."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Email"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"Provides access to the User's primary email address."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Publish App Activity"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"Allows the app to publish to the Open Graph using Built-in Actions, Achievements, Scores, or Custom Actions. The app can also publish other activity which is detailed in the Facebook's Publishing Permissions document."], null)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$section$divider], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Additional information about Data collection and processing"], null),new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Legal action"], null),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The User's Personal Data may be used for legal purposes by the Data Controller, in Court or in the stages leading to possible legal action arising from improper use of this Application or the related services.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"The User declares to be aware that the Data Controller may be required to reveal personal data upon request of public authorities."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Additional information about User's Personal Data"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"In addition to the information contained in this privacy policy, this Application may provide the User with additional and contextual information concerning particular services or the collection and processing of Personal Data upon request."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"System logs and maintenance"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"For operation and maintenance purposes, this Application and any third party services may collect files that record interaction with this Application (System logs) or use for this purpose other Personal Data (such as IP Address)."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Information not contained in this policy"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"More details concerning the collection or processing of Personal Data may be requested from the Data Controller at any time. Please see the contact information at the beginning of this document."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"The rights of Users"], null),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"Users have the right, at any time, to know whether their Personal Data has been stored and can consult the Data Controller to learn about their contents and origin, to verify their accuracy or to ask for them to be supplemented, cancelled, updated or corrected, or for their transformation into anonymous format or to block any data held in violation of the law, as well as to oppose their treatment for any and all legitimate reasons. Requests should be sent to the Data Controller at the contact information set out above.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"This Application does not support \u201CDo Not Track\u201D requests.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"To determine whether any of the third party services it uses honor the \u201CDo Not Track\u201D requests, please read their privacy policies."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h5$ui$grey$header,"Changes to this privacy policy"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The Data Controller reserves the right to make changes to this privacy policy at any time by giving notice to its Users on this page. It is strongly recommended to check this page often, referring to the date of the last modification listed at the bottom. If a User objects to any of the changes to the Policy, the User must cease using this Application and can request that the Data Controller remove the Personal Data. Unless stated otherwise, the then-current privacy policy applies to all Personal Data the Data Controller has about Users."], null)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$section$divider], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Contact us"], null),"If there are any questions regarding this privacy policy, you may contact us using the information below. Series of May 5, 2017."], null)], null); +}); +alchemy.components.privacy.view_render = (function alchemy$components$privacy$view_render(){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$alchemy$root,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.header_partial_view], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$main$alchemy$content,new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_privacy$ui$container,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h1$ui$header,"Privacy Policy"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$divider], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.privacy.policy_summary], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$divider], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.privacy.policy_full], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$divider], null)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.footer_partial_view], null)], null); +}); +alchemy.components.privacy.view = (function alchemy$components$privacy$view(){ +return reagent.core.create_class(new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$reagent_DASH_render,alchemy.components.privacy.view_render], null)); +}); diff --git a/public/js/rel/alchemy/components/terms.js b/public/js/rel/alchemy/components/terms.js new file mode 100644 index 0000000..b6ac034 --- /dev/null +++ b/public/js/rel/alchemy/components/terms.js @@ -0,0 +1,15 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.components.terms'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.core'); +goog.require('alchemy.partials'); +alchemy.components.terms.terms_of_use = (function alchemy$components$terms$terms_of_use(){ +return new cljs.core.PersistentVector(null, 9, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h1$ui$header,"Terms of Use"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$divider], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"PLEASE READ THESE TERMS OF SERVICE CAREFULLY AS THEY CONTAIN IMPORTANT INFORMATION REGARDING YOUR LEGAL RIGHTS, REMEDIES AND OBLIGATIONS. THESE INCLUDE VARIOUS LIMITATIONS AND EXCLUSIONS, A CLAUSE THAT GOVERNS THE JURISDICTION AND VENUE OF DISPUTES, AND OBLIGATIONS TO COMPLY WITH APPLICABLE LAWS AND REGULATIONS."], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$divider], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The following Terms of Use govern the access, viewing or use by you (hereinafter referred to as the 'User' or 'You') of Identity Hash's application services (hereinafter referred to as the 'Application' or 'Site') and Application Program Interface (hereinafter referred to as the 'API') and all its related features and functionalities (hereinafter referred to as the 'Service'). The Application and API are owned and operated by Identity Hash, LLC., a company with its registered office at Calle Estacion, Makati City, Philippines (hereinafter referred to as the 'Company').",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"By accepting the terms herein, or by accessing, viewing or using the Application, you agree to be bound by these Terms of Use and they constitute your binding legal obligations towards the Company. These Terms of Use may be modified at any time by the Company by posting the changes on the website and you agree that it shall be your responsibility to ascertain the changes to the Terms of Use by visiting the Terms of Use from time to time. Any modified terms shall be applicable to your use of the Application without need for any further consent. If you do not agree to the Terms of Use, you should not access, view or use the Application."], null),new cljs.core.PersistentVector(null, 26, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$basic$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"1. Key Terms"], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Privacy policy"], null)," shall mean the ",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"/#/privacy"], null),"Privacy Policy"], null),"."], null),new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"User"], null)," or ",new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"You"], null)," shall include any individual who is registered as a User in accordance with these Terms of Use."], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"User Information"], null)," shall mean any information provided by the User via the Application including but not limited to name, date of birth, identity proof, telephone number, email address, physical address, employment documents and other similar details."], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Terms of Use"], null)," shall mean the terms of use contained herein."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"2. API and Services Access"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"Business partners may access their data via API. Any use of the API, including use of the API through a third-party product that accesses the Service, is bound by the terms of this agreement plus the following specific terms:",new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$ul,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"You expressly understand and agree that the Company shall not be liable for any damages or losses resulting from your use of the API or third-party products that access data via the API."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"Abuse or excessively frequent requests to the Service via the API may result in the temporary or permanent suspension of your account's access to the API. The Company, in its sole discretion, will determine abuse or excessive usage of the API. The Company will make a reasonable attempt via email to warn the account owner prior to suspension."], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"3. Application Access and User Registration"], null),new cljs.core.PersistentVector(null, 19, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"You agree and understand that this application and the contents are intended for people who are of the age of 18 years or above. You hereby represent that you are 18 years of age or above and competent to contract or that you are represented by a parent or your legal guardian. You understand that this Application is intended for individual personal use only.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"To the extent that you are required to provide information in order to use the Application, you understand and undertake that you will provide accurate information including User Information as part of the sign up and application process.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"To the extent that you have provided information to use the Application, you represent that you have all rights required to provide the information that you have provided to the Application, including the User Information and represent that it is true and accurate.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"All User Information will be used and processed in accordance with these Terms of Use and the Privacy Policy. You acknowledge and agree that you have been provided with unrestricted access to the Privacy Policy and that it is your responsibility to read and understand the Privacy Policy. In the event you disagree with anything set forth in the Privacy Policy, it is your responsibility to bring it to the Company's notice using the notification mechanism set out in the Privacy Policy.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"You hereby grant the Company has the right to use the User Information for the furtherance of this Terms of Use and to store it and use it in a manner (either singularly or as an aggregate with information provided by other users on the Application) that improves features and functionalities of the Application or for undertaking any other analytics in relation to such information.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"You will be solely responsible for your acts on the Application including those conducted under the username assigned to you.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"You understand and agree that the Company may, in its sole discretion, terminate your access to the Application without notice and you waive any right to claim access to the Application or any other claim that you may have. Any data of your usage may be retained or deleted at the Company's sole discretion."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"4. Prohibited Use"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"In relation to the use and access of the Application its content and features, you agree and undertake not to:",new cljs.core.PersistentVector(null, 15, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$ul,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"re-sell the usage or services of the Application;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"upload, transmit or publish any information on behalf of a third party, including any User Information of any person other than you;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"impersonate another person;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"upload, transmit, email or publish any information or material which is harmful, threatening, abusive, libelous, obscene, derogatory (in any form), defamatory or libelous, discriminatory;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"racially or ethnically objectionable or contains pornography or encourages money laundering or gambling;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"violate the privacy of any person;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"upload, transmit, email or publish any information or material which is harmful to minors;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"upload, transmit, email or publish any information or material which threatens the unity, integrity, defence, security or sovereignty of the country in which you are resident or accessing the Application from, friendly relations with foreign countries, or public order or causes incitement to the commission of any cognizable offence or prevents investigation of any offence or is insulting any other nation;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"upload, transmit or publish any viruses or other malware, to corrupt, interrupt, limit, destroy or otherwise impact the Application, the Company's computer systems, or the computer systems of other Users or third party systems;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"upload transmit or publish anything which you do not have the rights to or any material which infringes the intellectual property rights (in whatever form) of any third party;"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"use the Application in any manner which is not permitted under these Terms of Use or in any manner which is illegal or unethical"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"access the Application in any unauthorized manner, including by hacking or using log in credentials of any other User or using bots"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"use the Application for any unauthorized marketing purposes or for sending any unsolicited materials or advertisements"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"use the Application for any purpose that is prohibited under applicable law, including the prohibitions set forth in the Information Technology (Intermediary Guidelines) Rules, 2011."], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"5. Intellectual Property"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"You agree and understand that:",new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$ul,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"the contents of the Application including but not limited to the information, logos, designs, databases, arrangement of databases, user interfaces, response formats, software, audio, pictures, logos, icons, are the sole property of the Company or its licensors. All intellectual property in and to the Application and its contents and functionalities shall vest solely with the Company or its licensors."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"save for the limited right to access and use the Application in accordance with the Terms of Use, on a non-exclusive and non-transferable basis, there are no other rights being granted to you in the Application or any of the contents and functionalities."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"to the extent required, you grant to the Company a non-exclusive, royalty free, worldwide, transferrable, sub-licensable right to host, display, demonstrate, publicly perform, use, reproduce, format, and distribute any content, posts, emails, uploads, materials, trademarks, trade names and any of Your intellectual property which You have provided to the Company or on the Application."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"any content uploaded by you may be displayed and reproduced by the Company in any manner it deems fit."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"you have no right to make any copies of the whole or part of this Application or any of the content therein."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"you have no rights to remove, modify (including removing any copyright notices or proprietary markings) any part of the Application save for any User Information that belongs to you."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"you have no right to use any search mechanisms other than that provided on the Application and you will not use any web-crawler or any data harvesting tools to harvest data of any sort from the Application."], null)], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"6. Disclaimers"], null),new cljs.core.PersistentVector(null, 9, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"The Company provides no guarantee for validity and accurateness of any information published on the Application. Further, you understand and agree that it is at your own discretion and based on your judgment that you use the Application.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"The Company does not represent in any manner that:",new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$ul,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"the information, data or contents of the Application are accurate"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"the Application will be available at all times and will operate error free or that there will be uninterrupted access and service"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"the integrity of the information on the Application or information you upload will be maintained"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"the Application or any content is free from viruses or other malware."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"you agree and understand that the contents and services on the Application are available on an 'as is' basis."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"you expressly release the Company and its director, officers and representatives from any cost, damage, liability or other consequence of any Use of the Application by You or the actions of the Users of the Application."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$li,"subject to applicable laws, the Company hereby disclaims all warranties, whether express or implied, in relation to the Application, its contents and functionalities, including but not limited to warranties of merchantability or fitness for a particular purpose. Where applicable laws do not permit the disclaimer of warranties to the extent detailed above, the said warranties are disclaimed to the maximum limit permitted by applicable law."], null)], null),"The Company reserves the right to remove any content posted on the Application and assumes no liability that may arise to you or any third party for such conduct of the Company.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),"The Application may contain links to third party applications. The Company shall not be responsible in any manner for the contents of these third party applications and if you should choose to use the link to view the third party applications, you choose to do so at your own risk. The Company does not endorse the contents nor in any manner represent the accuracy or correctness of information on such third party applications."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"7. Usage fee"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"Certain fee shall be charged for the use of the Application per se."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"8. Indemnity"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"You agree to indemnify and hold harmless the Company, its directors, shareholders, officers, employees and agents, against any claims, losses, damages or costs arising from (i) your use of the Application and its contents, (ii) your breach of these Terms of Use or (iii) any acts or omission of yours in relation to the Application and its use thereof, including but not limited to postings."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"9. Limitation of Liability"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"In no event shall the Company be liable for any loss of profits (anticipated or real), loss of business, loss of reputation, loss of data, loss of goodwill, any business interruption or any direct, indirect, special, incidental, consequential, punitive, tort or other damages, however caused, whether or not it has been advised of the possibility of such damages."], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"10. Complaints"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,"The Company takes matters related to intellectual property rights and privacy very seriously. Should you have any complaints regarding the Application, including but not limited to abuse and misuse of the Application, copyright infringement and the like, or any issues related to data privacy please report the same to ",new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"support@identity-hash.online"], null)], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$grey$header,"11. General"], null),new cljs.core.PersistentVector(null, 27, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$justified$container,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Termination"], null),": The Company reserves the rights to terminate your access to the Application at any time, in its sole discretion. If the Company determines that you have breached these Terms of Use, the Company shall be entitled to terminate your use and access of the Application with immediate effect. You acknowledge the Company's rights and waive any claim that you may have arising from such termination. Notwithstanding the termination of your access, all provisions which by their nature are intended to survive, shall survive termination and continue to be applicable.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Force Majeure"], null),": In no event shall the Company be liable for any acts beyond its control or for any acts of God.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Access"], null),": This Application is intended for viewing in the geographies of Philippines initially and later on in all the geographies of Southeast Asia. The Company does not make any claim that the Application and its contents may be lawfully viewed or accessed in the jurisdiction you are viewing it in. You are solely responsible for complying with laws applicable to you.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Waiver"], null),": No waiver of any provision of these Terms of Use shall be binding unless executed and notified by the Company in writing to you. No waiver of any of the provisions of these Terms of Use shall be deemed or shall constitute a waiver of any other provision and no waiver shall constitute a continuing waiver. You hereby waive any present or future claims you have against the Company arising from the your use of the Application or any other users' conduct.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Entire Agreement"], null),": These Terms of Use, the Privacy Policy and any other agreements you execute with the Company as relevant, shall constitute the entire agreement between you and the Company for the use of the Application. Any modification to these Terms of Use shall only be binding if posted on the Application by the Company.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Severability"], null),": If any provision of these Terms of Use is determined to be invalid or unenforceable, it will not affect the validity or enforceability of the other provisions of these Terms of Use, which shall remain in full force and effect.",new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$b,"Governing Law"], null),": These Terms of Use are governed by the laws of Philippines. You irrevocably consent to the exclusive jurisdiction and venue of the competent courts located in Philippines for all disputes arising out of or relating to these Terms of Use."], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$divider], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,"Last updated: February 7, 2017"], null)], null); +}); +alchemy.components.terms.view_render = (function alchemy$components$terms$view_render(){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$alchemy$root,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.header_partial_view], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$main$alchemy$content,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div_SHARP_terms$ui$container,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.terms.terms_of_use], null)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.footer_partial_view], null)], null); +}); +alchemy.components.terms.view = (function alchemy$components$terms$view(){ +return reagent.core.create_class(new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$reagent_DASH_render,alchemy.components.terms.view_render], null)); +}); diff --git a/public/js/rel/alchemy/core.js b/public/js/rel/alchemy/core.js new file mode 100644 index 0000000..a14b24d --- /dev/null +++ b/public/js/rel/alchemy/core.js @@ -0,0 +1,23 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.core'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.core'); +goog.require('reagent.session'); +goog.require('secretary.core'); +goog.require('accountant.core'); +goog.require('alchemy.routes'); +alchemy.core.mount_root = (function alchemy$core$mount_root(){ +return reagent.core.render.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.routes.current_page], null),document.getElementById("app")); +}); +alchemy.core.init_BANG_ = (function alchemy$core$init_BANG_(){ +accountant.core.configure_navigation_BANG_(new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$nav_DASH_handler,(function (path){ +return secretary.core.dispatch_BANG_(path); +}),cljs.core.cst$kw$path_DASH_exists_QMARK_,(function (path){ +return secretary.core.locate_route(path); +})], null)); + +accountant.core.dispatch_current_BANG_(); + +return alchemy.core.mount_root(); +}); diff --git a/public/js/rel/alchemy/partials.js b/public/js/rel/alchemy/partials.js new file mode 100644 index 0000000..d444467 --- /dev/null +++ b/public/js/rel/alchemy/partials.js @@ -0,0 +1,25 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.partials'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +alchemy.partials.header_partial_view = (function alchemy$partials$header_partial_view(){ +var logo = new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$alt,"Identity Hash",cljs.core.cst$kw$src,"/images/full-identity.png"], null); +var home = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"/"], null); +var headline = new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$data_DASH_scroll,"",cljs.core.cst$kw$href,"#home"], null); +var about = new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$data_DASH_scroll,"",cljs.core.cst$kw$href,"#about"], null); +var enterprise = new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$data_DASH_scroll,"",cljs.core.cst$kw$href,"#enterprise"], null); +var consumers = new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$data_DASH_scroll,"",cljs.core.cst$kw$href,"#consumers"], null); +var get_identity = new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$data_DASH_scroll,"",cljs.core.cst$kw$href,"#get-identity"], null); +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$header$alchemy$header,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$nav$ui$borderless$large$top$fixed$menu,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$data_DASH_scroll_DASH_header,""], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$ui$container,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$header$item,home,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$img$logo,logo], null)], null),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$right$menu,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,headline,"HOME"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,about,"ABOUT"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,enterprise,"ENTERPRISE"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,consumers,"CONSUMERS"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,get_identity,"GET IDENTITY"], null)], null)], null)], null)], null); +}); +alchemy.partials.footer_partial_view = (function alchemy$partials$footer_partial_view(){ +var about = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"/about"], null); +var blog = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"https://medium.com/identity-hash"], null); +var contact_us = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"https://goo.gl/forms/e8G4XEIvAC7aw6mj2"], null); +var terms = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"/terms"], null); +var privacy = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"/privacy"], null); +var facebook = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"https://facebook.com/identity.hash"], null); +var linkedin = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"https://www.linkedin.com/company/identity-hash"], null); +var medium = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$href,"https://medium.com/identity-hash"], null); +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$footer$alchemy$footer,new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$ui$container,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$ui$container$basic$segment,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$ui$stackable$divided$equal$height$grid,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$three$wide$column,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Identity Hash"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$nav$ui$link$list,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,blog,"Blog"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,contact_us,"Contact us"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$three$wide$column,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Digital Identity"], null),new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$nav$ui$link$list,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Trust & Safety"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Web of Trust"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Referrals"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$three$wide$column,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Electronic Wallet"], null),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$nav$ui$link$list,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Sending Payments"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Send and Receive Money"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Gather Rewards"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Get Discounts"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,"Responsible Payment"], null)], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$seven$wide$column,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$h4$ui$header,"Identity Hash"], null),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$link$list,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$item,"Seamless identity verification and payment solutions"], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$br], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$item,"Calle Estacion, Brgy. Pio del Pilar, Makati City"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$item,"Phone: +63 960-3159"], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$item,"Email: hello@identity-hash.online"], null)], null)], null)], null)], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$divider], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$section$ui$basic$container$segment,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$ui$horizontal$list,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$copyright$item,"\u00A9 2017 Identity Hash, LLC. All rights reserved and images from Icons8."], null)], null),new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$nav$ui$right$floated$horizontal$link$list,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,terms,"Terms & Conditions"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,privacy,"Privacy"], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,facebook,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$facebook$f$icon], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,linkedin,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$linkedin$icon], null)], null),new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$a$item,medium,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$i$medium$icon], null)], null)], null)], null)], null)], null); +}); diff --git a/public/js/rel/alchemy/prod.js b/public/js/rel/alchemy/prod.js new file mode 100644 index 0000000..dd029b1 --- /dev/null +++ b/public/js/rel/alchemy/prod.js @@ -0,0 +1,27 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.prod'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('alchemy.core'); +cljs.core._STAR_print_fn_STAR_ = (function() { +var G__20050__delegate = function (_){ +return null; +}; +var G__20050 = function (var_args){ +var _ = null; +if (arguments.length > 0) { +var G__20051__i = 0, G__20051__a = new Array(arguments.length - 0); +while (G__20051__i < G__20051__a.length) {G__20051__a[G__20051__i] = arguments[G__20051__i + 0]; ++G__20051__i;} + _ = new cljs.core.IndexedSeq(G__20051__a,0,null); +} +return G__20050__delegate.call(this,_);}; +G__20050.cljs$lang$maxFixedArity = 0; +G__20050.cljs$lang$applyTo = (function (arglist__20052){ +var _ = cljs.core.seq(arglist__20052); +return G__20050__delegate(_); +}); +G__20050.cljs$core$IFn$_invoke$arity$variadic = G__20050__delegate; +return G__20050; +})() +; +alchemy.core.init_BANG_(); diff --git a/public/js/rel/alchemy/routes.js b/public/js/rel/alchemy/routes.js new file mode 100644 index 0000000..5c56a47 --- /dev/null +++ b/public/js/rel/alchemy/routes.js @@ -0,0 +1,59 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.routes'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.core'); +goog.require('reagent.session'); +goog.require('secretary.core'); +goog.require('alchemy.views'); +var action__15052__auto___15253 = (function (params__15053__auto__){ +if(cljs.core.map_QMARK_(params__15053__auto__)){ +var map__15248 = params__15053__auto__; +var map__15248__$1 = ((((!((map__15248 == null)))?((((map__15248.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__15248.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__15248):map__15248); +return reagent.session.put_BANG_(cljs.core.cst$kw$current_DASH_page,new cljs.core.Var(function(){return alchemy.views.home_page;},cljs.core.cst$sym$alchemy$views_SLASH_home_DASH_page,cljs.core.PersistentHashMap.fromArrays([cljs.core.cst$kw$ns,cljs.core.cst$kw$name,cljs.core.cst$kw$file,cljs.core.cst$kw$end_DASH_column,cljs.core.cst$kw$column,cljs.core.cst$kw$line,cljs.core.cst$kw$end_DASH_line,cljs.core.cst$kw$arglists,cljs.core.cst$kw$doc,cljs.core.cst$kw$test],[cljs.core.cst$sym$alchemy$views,cljs.core.cst$sym$home_DASH_page,"/home/vagrant/repos/0-identity-hash/client/src/alchemy/src/alchemy/views.cljs",16,1,11,11,cljs.core.list(cljs.core.PersistentVector.EMPTY),null,(cljs.core.truth_(alchemy.views.home_page)?alchemy.views.home_page.cljs$lang$test:null)]))); +} else { +if(cljs.core.vector_QMARK_(params__15053__auto__)){ +var vec__15250 = params__15053__auto__; +return reagent.session.put_BANG_(cljs.core.cst$kw$current_DASH_page,new cljs.core.Var(function(){return alchemy.views.home_page;},cljs.core.cst$sym$alchemy$views_SLASH_home_DASH_page,cljs.core.PersistentHashMap.fromArrays([cljs.core.cst$kw$ns,cljs.core.cst$kw$name,cljs.core.cst$kw$file,cljs.core.cst$kw$end_DASH_column,cljs.core.cst$kw$column,cljs.core.cst$kw$line,cljs.core.cst$kw$end_DASH_line,cljs.core.cst$kw$arglists,cljs.core.cst$kw$doc,cljs.core.cst$kw$test],[cljs.core.cst$sym$alchemy$views,cljs.core.cst$sym$home_DASH_page,"/home/vagrant/repos/0-identity-hash/client/src/alchemy/src/alchemy/views.cljs",16,1,11,11,cljs.core.list(cljs.core.PersistentVector.EMPTY),null,(cljs.core.truth_(alchemy.views.home_page)?alchemy.views.home_page.cljs$lang$test:null)]))); +} else { +return null; +} +} +}); +secretary.core.add_route_BANG_("/",action__15052__auto___15253); + +var action__15052__auto___15259 = (function (params__15053__auto__){ +if(cljs.core.map_QMARK_(params__15053__auto__)){ +var map__15254 = params__15053__auto__; +var map__15254__$1 = ((((!((map__15254 == null)))?((((map__15254.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__15254.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__15254):map__15254); +return reagent.session.put_BANG_(cljs.core.cst$kw$current_DASH_page,new cljs.core.Var(function(){return alchemy.views.privacy_page;},cljs.core.cst$sym$alchemy$views_SLASH_privacy_DASH_page,cljs.core.PersistentHashMap.fromArrays([cljs.core.cst$kw$ns,cljs.core.cst$kw$name,cljs.core.cst$kw$file,cljs.core.cst$kw$end_DASH_column,cljs.core.cst$kw$column,cljs.core.cst$kw$line,cljs.core.cst$kw$end_DASH_line,cljs.core.cst$kw$arglists,cljs.core.cst$kw$doc,cljs.core.cst$kw$test],[cljs.core.cst$sym$alchemy$views,cljs.core.cst$sym$privacy_DASH_page,"/home/vagrant/repos/0-identity-hash/client/src/alchemy/src/alchemy/views.cljs",19,1,12,12,cljs.core.list(cljs.core.PersistentVector.EMPTY),null,(cljs.core.truth_(alchemy.views.privacy_page)?alchemy.views.privacy_page.cljs$lang$test:null)]))); +} else { +if(cljs.core.vector_QMARK_(params__15053__auto__)){ +var vec__15256 = params__15053__auto__; +return reagent.session.put_BANG_(cljs.core.cst$kw$current_DASH_page,new cljs.core.Var(function(){return alchemy.views.privacy_page;},cljs.core.cst$sym$alchemy$views_SLASH_privacy_DASH_page,cljs.core.PersistentHashMap.fromArrays([cljs.core.cst$kw$ns,cljs.core.cst$kw$name,cljs.core.cst$kw$file,cljs.core.cst$kw$end_DASH_column,cljs.core.cst$kw$column,cljs.core.cst$kw$line,cljs.core.cst$kw$end_DASH_line,cljs.core.cst$kw$arglists,cljs.core.cst$kw$doc,cljs.core.cst$kw$test],[cljs.core.cst$sym$alchemy$views,cljs.core.cst$sym$privacy_DASH_page,"/home/vagrant/repos/0-identity-hash/client/src/alchemy/src/alchemy/views.cljs",19,1,12,12,cljs.core.list(cljs.core.PersistentVector.EMPTY),null,(cljs.core.truth_(alchemy.views.privacy_page)?alchemy.views.privacy_page.cljs$lang$test:null)]))); +} else { +return null; +} +} +}); +secretary.core.add_route_BANG_("/privacy",action__15052__auto___15259); + +var action__15052__auto___15265 = (function (params__15053__auto__){ +if(cljs.core.map_QMARK_(params__15053__auto__)){ +var map__15260 = params__15053__auto__; +var map__15260__$1 = ((((!((map__15260 == null)))?((((map__15260.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__15260.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__15260):map__15260); +return reagent.session.put_BANG_(cljs.core.cst$kw$current_DASH_page,new cljs.core.Var(function(){return alchemy.views.terms_page;},cljs.core.cst$sym$alchemy$views_SLASH_terms_DASH_page,cljs.core.PersistentHashMap.fromArrays([cljs.core.cst$kw$ns,cljs.core.cst$kw$name,cljs.core.cst$kw$file,cljs.core.cst$kw$end_DASH_column,cljs.core.cst$kw$column,cljs.core.cst$kw$line,cljs.core.cst$kw$end_DASH_line,cljs.core.cst$kw$arglists,cljs.core.cst$kw$doc,cljs.core.cst$kw$test],[cljs.core.cst$sym$alchemy$views,cljs.core.cst$sym$terms_DASH_page,"/home/vagrant/repos/0-identity-hash/client/src/alchemy/src/alchemy/views.cljs",17,1,13,13,cljs.core.list(cljs.core.PersistentVector.EMPTY),null,(cljs.core.truth_(alchemy.views.terms_page)?alchemy.views.terms_page.cljs$lang$test:null)]))); +} else { +if(cljs.core.vector_QMARK_(params__15053__auto__)){ +var vec__15262 = params__15053__auto__; +return reagent.session.put_BANG_(cljs.core.cst$kw$current_DASH_page,new cljs.core.Var(function(){return alchemy.views.terms_page;},cljs.core.cst$sym$alchemy$views_SLASH_terms_DASH_page,cljs.core.PersistentHashMap.fromArrays([cljs.core.cst$kw$ns,cljs.core.cst$kw$name,cljs.core.cst$kw$file,cljs.core.cst$kw$end_DASH_column,cljs.core.cst$kw$column,cljs.core.cst$kw$line,cljs.core.cst$kw$end_DASH_line,cljs.core.cst$kw$arglists,cljs.core.cst$kw$doc,cljs.core.cst$kw$test],[cljs.core.cst$sym$alchemy$views,cljs.core.cst$sym$terms_DASH_page,"/home/vagrant/repos/0-identity-hash/client/src/alchemy/src/alchemy/views.cljs",17,1,13,13,cljs.core.list(cljs.core.PersistentVector.EMPTY),null,(cljs.core.truth_(alchemy.views.terms_page)?alchemy.views.terms_page.cljs$lang$test:null)]))); +} else { +return null; +} +} +}); +secretary.core.add_route_BANG_("/terms",action__15052__auto___15265); + +alchemy.routes.current_page = (function alchemy$routes$current_page(){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [reagent.session.get(cljs.core.cst$kw$current_DASH_page)], null)], null); +}); diff --git a/public/js/rel/alchemy/views.js b/public/js/rel/alchemy/views.js new file mode 100644 index 0000000..d064e16 --- /dev/null +++ b/public/js/rel/alchemy/views.js @@ -0,0 +1,21 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('alchemy.views'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.core'); +goog.require('alchemy.partials'); +goog.require('alchemy.components.home'); +goog.require('alchemy.components.privacy'); +goog.require('alchemy.components.terms'); +alchemy.views.home_page = (function alchemy$views$home_page(){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.home.view], null); +}); +alchemy.views.privacy_page = (function alchemy$views$privacy_page(){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.privacy.view], null); +}); +alchemy.views.terms_page = (function alchemy$views$terms_page(){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.components.terms.view], null); +}); +alchemy.views.not_found_page = (function alchemy$views$not_found_page(){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$div$alchemy$root,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.header_partial_view], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$main$alchemy$content], null),new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [alchemy.partials.footer_partial_view], null)], null); +}); diff --git a/public/js/rel/cljs/core.cljs b/public/js/rel/cljs/core.cljs new file mode 100644 index 0000000..a865f54 --- /dev/null +++ b/public/js/rel/cljs/core.cljs @@ -0,0 +1,10901 @@ +; Copyright (c) Rich Hickey. All rights reserved. +; The use and distribution terms for this software are covered by the +; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +; which can be found in the file epl-v10.html at the root of this distribution. +; By using this software in any fashion, you are agreeing to be bound by +; the terms of this license. +; You must not remove this notice, or any other, from this software. + +(ns cljs.core + (:require goog.math.Long + goog.math.Integer + [goog.string :as gstring] + [goog.object :as gobject] + [goog.array :as garray]) + (:import [goog.string StringBuffer])) + +;; next line is auto-generated by the build-script - Do not edit! +(def *clojurescript-version* "1.9.562") + +(def *unchecked-if* false) +(def *warn-on-infer* false) + +(defonce PROTOCOL_SENTINEL #js {}) + +(goog-define + ^{:dynamic true + :doc "Var bound to the name value of the compiler build :target option. + For example, if the compiler build :target is :nodejs, *target* will be bound + to \"nodejs\". *target* is a Google Closure define and can be set by compiler + :closure-defines option."} + *target* "default") + +(def + ^{:dynamic true + :doc "Var bound to the current namespace. Only used for bootstrapping." + :jsdoc ["@type {*}"]} + *ns* nil) + +(def + ^{:dynamic true + :jsdoc ["@type {*}"]} + *out* nil) + +(def + ^{:dynamic true} + *assert* true) + +(defonce + ^{:doc "Each runtime environment provides a different way to print output. + Whatever function *print-fn* is bound to will be passed any + Strings which should be printed." :dynamic true} + *print-fn* + (fn [_] + (throw (js/Error. "No *print-fn* fn set for evaluation environment")))) + +(defonce + ^{:doc "Each runtime environment provides a different way to print error output. + Whatever function *print-err-fn* is bound to will be passed any + Strings which should be printed." :dynamic true} + *print-err-fn* + (fn [_] + (throw (js/Error. "No *print-err-fn* fn set for evaluation environment")))) + +(defn set-print-fn! + "Set *print-fn* to f." + [f] (set! *print-fn* f)) + +(defn set-print-err-fn! + "Set *print-err-fn* to f." + [f] (set! *print-err-fn* f)) + +(def + ^{:dynamic true + :doc "When set to true, output will be flushed whenever a newline is printed. + + Defaults to true."} + *flush-on-newline* true) + +(def + ^{:dynamic true + :doc "When set to logical false will drop newlines from printing calls. + This is to work around the implicit newlines emitted by standard JavaScript + console objects."} + *print-newline* true) + +(def + ^{:dynamic true + :doc "When set to logical false, strings and characters will be printed with + non-alphanumeric characters converted to the appropriate escape sequences. + + Defaults to true"} + *print-readably* true) + +(def + ^{:dynamic true + :doc "If set to logical true, when printing an object, its metadata will also + be printed in a form that can be read back by the reader. + + Defaults to false."} + *print-meta* false) + +(def + ^{:dynamic true + :doc "When set to logical true, objects will be printed in a way that preserves + their type when read in later. + + Defaults to false."} + *print-dup* false) + +(def + ^{:dynamic true + :doc "*print-namespace-maps* controls whether the printer will print + namespace map literal syntax. + + Defaults to false, but the REPL binds it to true."} + *print-namespace-maps* false) + +(def + ^{:dynamic true + :doc "*print-length* controls how many items of each collection the + printer will print. If it is bound to logical false, there is no + limit. Otherwise, it must be bound to an integer indicating the maximum + number of items of each collection to print. If a collection contains + more items, the printer will print items up to the limit followed by + '...' to represent the remaining items. The root binding is nil + indicating no limit." + :jsdoc ["@type {null|number}"]} + *print-length* nil) + +(def + ^{:dynamic true + :doc "*print-level* controls how many levels deep the printer will + print nested objects. If it is bound to logical false, there is no + limit. Otherwise, it must be bound to an integer indicating the maximum + level to print. Each argument to print is at level 0; if an argument is a + collection, its items are at level 1; and so on. If an object is a + collection and is at a level greater than or equal to the value bound to + *print-level*, the printer prints '#' to represent it. The root binding + is nil indicating no limit." + :jsdoc ["@type {null|number}"]} + *print-level* nil) + +(defonce + ^{:dynamic true + :jsdoc ["@type {*}"]} + *loaded-libs* nil) + +(defn- pr-opts [] + {:flush-on-newline *flush-on-newline* + :readably *print-readably* + :meta *print-meta* + :dup *print-dup* + :print-length *print-length*}) + +(declare into-array) + +(defn enable-console-print! + "Set *print-fn* to console.log" + [] + (set! *print-newline* false) + (set! *print-fn* + (fn [& args] + (.apply (.-log js/console) js/console (into-array args)))) + (set! *print-err-fn* + (fn [& args] + (.apply (.-error js/console) js/console (into-array args)))) + nil) + +(def + ^{:doc "bound in a repl thread to the most recent value printed"} + *1) + +(def + ^{:doc "bound in a repl thread to the second most recent value printed"} + *2) + +(def + ^{:doc "bound in a repl thread to the third most recent value printed"} + *3) + +(def + ^{:doc "bound in a repl thread to the most recent exception caught by the repl"} + *e) + +(defn truth_ + "Internal - do not use!" + [x] + (cljs.core/truth_ x)) + +(def not-native nil) + +(declare instance? Keyword) + +(defn ^boolean identical? + "Tests if 2 arguments are the same object" + [x y] + (cljs.core/identical? x y)) + +(defn ^boolean nil? + "Returns true if x is nil, false otherwise." + [x] + (coercive-= x nil)) + +(defn ^boolean array? + "Returns true if x is a JavaScript array." + [x] + (if (identical? *target* "nodejs") + (.isArray js/Array x) + (instance? js/Array x))) + +(defn ^boolean number? + "Returns true if x is a JavaScript number." + [x] + (cljs.core/number? x)) + +(defn ^boolean not + "Returns true if x is logical false, false otherwise." + [x] + (cond + (nil? x) true + (false? x) true + :else false)) + +(defn ^boolean some? + "Returns true if x is not nil, false otherwise." + [x] (not (nil? x))) + +(defn ^boolean object? + "Returns true if x's constructor is Object" + [x] + (if-not (nil? x) + (identical? (.-constructor x) js/Object) + false)) + +(defn ^boolean string? + "Returns true if x is a JavaScript string." + [x] + (goog/isString x)) + +(defn ^boolean char? + "Returns true if x is a JavaScript string of length one." + [x] + (and (string? x) (== 1 (.-length x)))) + +(defn ^boolean any? + "Returns true if given any argument." + [x] true) + +(set! *unchecked-if* true) +(defn ^boolean native-satisfies? + "Internal - do not use!" + [p x] + (let [x (if (nil? x) nil x)] + (cond + (aget p (goog/typeOf x)) true + (aget p "_") true + :else false))) +(set! *unchecked-if* false) + +(defn is_proto_ + [x] + (identical? (.-prototype (.-constructor x)) x)) + +(def + ^{:doc "When compiled for a command-line target, whatever function + *main-cli-fn* is set to will be called with the command-line + argv as arguments"} + *main-cli-fn* nil) + +(defn type + "Return x's constructor." + [x] + (when-not (nil? x) + (.-constructor x))) + +(defn missing-protocol [proto obj] + (let [ty (type obj) + ty (if (and ty (.-cljs$lang$type ty)) + (.-cljs$lang$ctorStr ty) + (goog/typeOf obj))] + (js/Error. + (.join (array "No protocol method " proto + " defined for type " ty ": " obj) "")))) + +(defn type->str [ty] + (if-let [s (.-cljs$lang$ctorStr ty)] + s + (str ty))) + +;; INTERNAL - do not use, only for Node.js +(defn load-file [file] + (when-not js/COMPILED + (cljs.core/load-file* file))) + +(if (and (exists? js/Symbol) + (identical? (goog/typeOf js/Symbol) "function")) + (def ITER_SYMBOL (.-iterator js/Symbol)) + (def ITER_SYMBOL "@@iterator")) + +(def ^{:jsdoc ["@enum {string}"]} + CHAR_MAP + #js {"-" "_" + ":" "_COLON_" + "+" "_PLUS_" + ">" "_GT_" + "<" "_LT_" + "=" "_EQ_" + "~" "_TILDE_" + "!" "_BANG_" + "@" "_CIRCA_" + "#" "_SHARP_" + "'" "_SINGLEQUOTE_" + "\\\"" "_DOUBLEQUOTE_" + "%" "_PERCENT_" + "^" "_CARET_" + "&" "_AMPERSAND_" + "*" "_STAR_" + "|" "_BAR_" + "{" "_LBRACE_" + "}" "_RBRACE_" + "[" "_LBRACK_" + "]" "_RBRACK_" + "/" "_SLASH_" + "\\\\" "_BSLASH_" + "?" "_QMARK_"}) + +(def ^{:jsdoc ["@enum {string}"]} + DEMUNGE_MAP + #js {"_" "-" + "_COLON_" ":" + "_PLUS_" "+" + "_GT_" ">" + "_LT_" "<" + "_EQ_" "=" + "_TILDE_" "~" + "_BANG_" "!" + "_CIRCA_" "@" + "_SHARP_" "#" + "_SINGLEQUOTE_" "'" + "_DOUBLEQUOTE_" "\\\"" + "_PERCENT_" "%" + "_CARET_" "^" + "_AMPERSAND_" "&" + "_STAR_" "*" + "_BAR_" "|" + "_LBRACE_" "{" + "_RBRACE_" "}" + "_LBRACK_" "[" + "_RBRACK_" "]" + "_SLASH_" "/" + "_BSLASH_" "\\\\" + "_QMARK_" "?"}) + +(def DEMUNGE_PATTERN nil) + +(defn system-time + "Returns highest resolution time offered by host in milliseconds." + [] + (cond + (and (exists? js/performance) + (not (nil? (. js/performance -now)))) + (.now js/performance) + + (and (exists? js/process) + (not (nil? (. js/process -hrtime)))) + (let [t (.hrtime js/process)] + (/ (+ (* (aget t 0) 1e9) (aget t 1)) 1e6)) + + :else (.getTime (js/Date.)))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; arrays ;;;;;;;;;;;;;;;; + +(declare apply) + +(defn ^array make-array + "Construct a JavaScript array of the specified dimensions. Accepts ignored + type argument for compatibility with Clojure. Note that there is no efficient + way to allocate multi-dimensional arrays in JavaScript; as such, this function + will run in polynomial time when called with 3 or more arguments." + ([size] + (js/Array. size)) + ([type size] + (make-array size)) + ([type size & more-sizes] + (let [dims more-sizes + dimarray (make-array size)] + (dotimes [i (alength dimarray)] + (aset dimarray i (apply make-array nil dims))) + dimarray))) + +(defn aclone + "Returns a javascript array, cloned from the passed in array" + [arr] + (let [len (alength arr) + new-arr (make-array len)] + (dotimes [i len] + (aset new-arr i (aget arr i))) + new-arr)) + +(defn ^array array + "Creates a new javascript array. +@param {...*} var_args" ;;array is a special case, don't emulate this doc string + [var-args] ;; [& items] + (let [a (js/Array. (alength (cljs.core/js-arguments)))] + (loop [i 0] + (if (< i (alength a)) + (do + (aset a i (aget (cljs.core/js-arguments) i)) + (recur (inc i))) + a)))) + +(defn aget + "Returns the value at the index." + ([array i] + (cljs.core/aget array i)) + ([array i & idxs] + (apply aget (aget array i) idxs))) + +(defn aset + "Sets the value at the index." + ([array i val] + (cljs.core/aset array i val)) + ([array idx idx2 & idxv] + (apply aset (aget array idx) idx2 idxv))) + +(defn ^number alength + "Returns the length of the array. Works on arrays of all types." + [array] + (cljs.core/alength array)) + +(declare reduce) + +(defn ^array into-array + "Returns an array with components set to the values in aseq. Optional type + argument accepted for compatibility with Clojure." + ([aseq] + (into-array nil aseq)) + ([type aseq] + (reduce (fn [a x] (.push a x) a) (array) aseq))) + +(defn js-invoke + "Invoke JavaScript object method via string. Needed when the + string is not a valid unquoted property name." + [obj s & args] + (.apply (aget obj s) obj (into-array args))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;; core protocols ;;;;;;;;;;;;; + +(defprotocol Fn + "Marker protocol") + +(defprotocol IFn + "Protocol for adding the ability to invoke an object as a function. + For example, a vector can also be used to look up a value: + ([1 2 3 4] 1) => 2" + (-invoke + [this] + [this a] + [this a b] + [this a b c] + [this a b c d] + [this a b c d e] + [this a b c d e f] + [this a b c d e f g] + [this a b c d e f g h] + [this a b c d e f g h i] + [this a b c d e f g h i j] + [this a b c d e f g h i j k] + [this a b c d e f g h i j k l] + [this a b c d e f g h i j k l m] + [this a b c d e f g h i j k l m n] + [this a b c d e f g h i j k l m n o] + [this a b c d e f g h i j k l m n o p] + [this a b c d e f g h i j k l m n o p q] + [this a b c d e f g h i j k l m n o p q r] + [this a b c d e f g h i j k l m n o p q r s] + [this a b c d e f g h i j k l m n o p q r s t] + [this a b c d e f g h i j k l m n o p q r s t rest])) + +(defprotocol ICloneable + "Protocol for cloning a value." + (^clj -clone [value] + "Creates a clone of value.")) + +(defprotocol ICounted + "Protocol for adding the ability to count a collection in constant time." + (^number -count [coll] + "Calculates the count of coll in constant time. Used by cljs.core/count.")) + +(defprotocol IEmptyableCollection + "Protocol for creating an empty collection." + (-empty [coll] + "Returns an empty collection of the same category as coll. Used + by cljs.core/empty.")) + +(defprotocol ICollection + "Protocol for adding to a collection." + (^clj -conj [coll o] + "Returns a new collection of coll with o added to it. The new item + should be added to the most efficient place, e.g. + (conj [1 2 3 4] 5) => [1 2 3 4 5] + (conj '(2 3 4 5) 1) => '(1 2 3 4 5)")) + +#_(defprotocol IOrdinal + (-index [coll])) + +(defprotocol IIndexed + "Protocol for collections to provide indexed-based access to their items." + (-nth [coll n] [coll n not-found] + "Returns the value at the index n in the collection coll. + Returns not-found if index n is out of bounds and not-found is supplied.")) + +(defprotocol ASeq + "Marker protocol indicating an array sequence.") + +(defprotocol ISeq + "Protocol for collections to provide access to their items as sequences." + (-first [coll] + "Returns the first item in the collection coll. Used by cljs.core/first.") + (^clj -rest [coll] + "Returns a new collection of coll without the first item. It should + always return a seq, e.g. + (rest []) => () + (rest nil) => ()")) + +(defprotocol INext + "Protocol for accessing the next items of a collection." + (^clj-or-nil -next [coll] + "Returns a new collection of coll without the first item. In contrast to + rest, it should return nil if there are no more items, e.g. + (next []) => nil + (next nil) => nil")) + +(defprotocol ILookup + "Protocol for looking up a value in a data structure." + (-lookup [o k] [o k not-found] + "Use k to look up a value in o. If not-found is supplied and k is not + a valid value that can be used for look up, not-found is returned.")) + +(defprotocol IAssociative + "Protocol for adding associativity to collections." + (^boolean -contains-key? [coll k] + "Returns true if k is a key in coll.") + #_(-entry-at [coll k]) + (^clj -assoc [coll k v] + "Returns a new collection of coll with a mapping from key k to + value v added to it.")) + +(defprotocol IFind + "Protocol for implementing entry finding in collections." + (-find [coll k])) + +(defprotocol IMap + "Protocol for adding mapping functionality to collections." + #_(-assoc-ex [coll k v]) + (^clj -dissoc [coll k] + "Returns a new collection of coll without the mapping for key k.")) + +(defprotocol IMapEntry + "Protocol for examining a map entry." + (-key [coll] + "Returns the key of the map entry.") + (-val [coll] + "Returns the value of the map entry.")) + +(defprotocol ISet + "Protocol for adding set functionality to a collection." + (^clj -disjoin [coll v] + "Returns a new collection of coll that does not contain v.")) + +(defprotocol IStack + "Protocol for collections to provide access to their items as stacks. The top + of the stack should be accessed in the most efficient way for the different + data structures." + (-peek [coll] + "Returns the item from the top of the stack. Is used by cljs.core/peek.") + (^clj -pop [coll] + "Returns a new stack without the item on top of the stack. Is used + by cljs.core/pop.")) + +(defprotocol IVector + "Protocol for adding vector functionality to collections." + (^clj -assoc-n [coll n val] + "Returns a new vector with value val added at position n.")) + +(defprotocol IDeref + "Protocol for adding dereference functionality to a reference." + (-deref [o] + "Returns the value of the reference o.")) + +(defprotocol IDerefWithTimeout + (-deref-with-timeout [o msec timeout-val])) + +(defprotocol IMeta + "Protocol for accessing the metadata of an object." + (^clj-or-nil -meta [o] + "Returns the metadata of object o.")) + +(defprotocol IWithMeta + "Protocol for adding metadata to an object." + (^clj -with-meta [o meta] + "Returns a new object with value of o and metadata meta added to it.")) + +(defprotocol IReduce + "Protocol for seq types that can reduce themselves. + Called by cljs.core/reduce." + (-reduce [coll f] [coll f start] + "f should be a function of 2 arguments. If start is not supplied, + returns the result of applying f to the first 2 items in coll, then + applying f to that result and the 3rd item, etc.")) + +(defprotocol IKVReduce + "Protocol for associative types that can reduce themselves + via a function of key and val. Called by cljs.core/reduce-kv." + (-kv-reduce [coll f init] + "Reduces an associative collection and returns the result. f should be + a function that takes three arguments.")) + +(defprotocol IEquiv + "Protocol for adding value comparison functionality to a type." + (^boolean -equiv [o other] + "Returns true if o and other are equal, false otherwise.")) + +(defprotocol IHash + "Protocol for adding hashing functionality to a type." + (-hash [o] + "Returns the hash code of o.")) + +(defprotocol ISeqable + "Protocol for adding the ability to a type to be transformed into a sequence." + (^clj-or-nil -seq [o] + "Returns a seq of o, or nil if o is empty.")) + +(defprotocol ISequential + "Marker interface indicating a persistent collection of sequential items") + +(defprotocol IList + "Marker interface indicating a persistent list") + +(defprotocol IRecord + "Marker interface indicating a record object") + +(defprotocol IReversible + "Protocol for reversing a seq." + (^clj -rseq [coll] + "Returns a seq of the items in coll in reversed order.")) + +(defprotocol ISorted + "Protocol for a collection which can represent their items + in a sorted manner. " + (^clj -sorted-seq [coll ascending?] + "Returns a sorted seq from coll in either ascending or descending order.") + (^clj -sorted-seq-from [coll k ascending?] + "Returns a sorted seq from coll in either ascending or descending order. + If ascending is true, the result should contain all items which are > or >= + than k. If ascending is false, the result should contain all items which + are < or <= than k, e.g. + (-sorted-seq-from (sorted-set 1 2 3 4 5) 3 true) => (3 4 5) + (-sorted-seq-from (sorted-set 1 2 3 4 5) 3 false) => (3 2 1)") + (-entry-key [coll entry] + "Returns the key for entry.") + (-comparator [coll] + "Returns the comparator for coll.")) + +(defprotocol IWriter + "Protocol for writing. Currently only implemented by StringBufferWriter." + (-write [writer s] + "Writes s with writer and returns the result.") + (-flush [writer] + "Flush writer.")) + +(defprotocol IPrintWithWriter + "The old IPrintable protocol's implementation consisted of building a giant + list of strings to concatenate. This involved lots of concat calls, + intermediate vectors, and lazy-seqs, and was very slow in some older JS + engines. IPrintWithWriter implements printing via the IWriter protocol, so it + be implemented efficiently in terms of e.g. a StringBuffer append." + (-pr-writer [o writer opts])) + +(defprotocol IPending + "Protocol for types which can have a deferred realization. Currently only + implemented by Delay and LazySeq." + (^boolean -realized? [x] + "Returns true if a value for x has been produced, false otherwise.")) + +(defprotocol IWatchable + "Protocol for types that can be watched. Currently only implemented by Atom." + (-notify-watches [this oldval newval] + "Calls all watchers with this, oldval and newval.") + (-add-watch [this key f] + "Adds a watcher function f to this. Keys must be unique per reference, + and can be used to remove the watch with -remove-watch.") + (-remove-watch [this key] + "Removes watcher that corresponds to key from this.")) + +(defprotocol IEditableCollection + "Protocol for collections which can transformed to transients." + (^clj -as-transient [coll] + "Returns a new, transient version of the collection, in constant time.")) + +(defprotocol ITransientCollection + "Protocol for adding basic functionality to transient collections." + (^clj -conj! [tcoll val] + "Adds value val to tcoll and returns tcoll.") + (^clj -persistent! [tcoll] + "Creates a persistent data structure from tcoll and returns it.")) + +(defprotocol ITransientAssociative + "Protocol for adding associativity to transient collections." + (^clj -assoc! [tcoll key val] + "Returns a new transient collection of tcoll with a mapping from key to + val added to it.")) + +(defprotocol ITransientMap + "Protocol for adding mapping functionality to transient collections." + (^clj -dissoc! [tcoll key] + "Returns a new transient collection of tcoll without the mapping for key.")) + +(defprotocol ITransientVector + "Protocol for adding vector functionality to transient collections." + (^clj -assoc-n! [tcoll n val] + "Returns tcoll with value val added at position n.") + (^clj -pop! [tcoll] + "Returns tcoll with the last item removed from it.")) + +(defprotocol ITransientSet + "Protocol for adding set functionality to a transient collection." + (^clj -disjoin! [tcoll v] + "Returns tcoll without v.")) + +(defprotocol IComparable + "Protocol for values that can be compared." + (^number -compare [x y] + "Returns a negative number, zero, or a positive number when x is logically + 'less than', 'equal to', or 'greater than' y.")) + +(defprotocol IChunk + "Protocol for accessing the items of a chunk." + (-drop-first [coll] + "Return a new chunk of coll with the first item removed.")) + +(defprotocol IChunkedSeq + "Protocol for accessing a collection as sequential chunks." + (-chunked-first [coll] + "Returns the first chunk in coll.") + (-chunked-rest [coll] + "Return a new collection of coll with the first chunk removed.")) + +(defprotocol IChunkedNext + "Protocol for accessing the chunks of a collection." + (-chunked-next [coll] + "Returns a new collection of coll without the first chunk.")) + +(defprotocol INamed + "Protocol for adding a name." + (^string -name [x] + "Returns the name String of x.") + (^string -namespace [x] + "Returns the namespace String of x.")) + +(defprotocol IAtom + "Marker protocol indicating an atom.") + +(defprotocol IReset + "Protocol for adding resetting functionality." + (-reset! [o new-value] + "Sets the value of o to new-value.")) + +(defprotocol ISwap + "Protocol for adding swapping functionality." + (-swap! [o f] [o f a] [o f a b] [o f a b xs] + "Swaps the value of o to be (apply f current-value-of-atom args).")) + +(defprotocol IVolatile + "Protocol for adding volatile functionality." + (-vreset! [o new-value] + "Sets the value of volatile o to new-value without regard for the + current value. Returns new-value.")) + +(defprotocol IIterable + "Protocol for iterating over a collection." + (-iterator [coll] + "Returns an iterator for coll.")) + +;; Printing support + +(deftype StringBufferWriter [sb] + IWriter + (-write [_ s] (.append sb s)) + (-flush [_] nil)) + +(defn pr-str* + "Support so that collections can implement toString without + loading all the printing machinery." + [^not-native obj] + (let [sb (StringBuffer.) + writer (StringBufferWriter. sb)] + (-pr-writer obj writer (pr-opts)) + (-flush writer) + (str sb))) + +;;;;;;;;;;;;;;;;;;; Murmur3 ;;;;;;;;;;;;;;; + +;;http://hg.openjdk.java.net/jdk7u/jdk7u6/jdk/file/8c2c5d63a17e/src/share/classes/java/lang/Integer.java +(defn ^number int-rotate-left [x n] + (bit-or + (bit-shift-left x n) + (unsigned-bit-shift-right x (- n)))) + +;; http://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul +(if (and (exists? Math/imul) + (not (zero? (Math/imul 0xffffffff 5)))) + (defn ^number imul [a b] (Math/imul a b)) + (defn ^number imul [a b] + (let [ah (bit-and (unsigned-bit-shift-right a 16) 0xffff) + al (bit-and a 0xffff) + bh (bit-and (unsigned-bit-shift-right b 16) 0xffff) + bl (bit-and b 0xffff)] + (bit-or + (+ (* al bl) + (unsigned-bit-shift-right + (bit-shift-left (+ (* ah bl) (* al bh)) 16) 0)) 0)))) + +;; http://smhasher.googlecode.com/svn/trunk/MurmurHash3.cpp +(def m3-seed 0) +(def m3-C1 (int 0xcc9e2d51)) +(def m3-C2 (int 0x1b873593)) + +(defn ^number m3-mix-K1 [k1] + (-> (int k1) (imul m3-C1) (int-rotate-left 15) (imul m3-C2))) + +(defn ^number m3-mix-H1 [h1 k1] + (int (-> (int h1) (bit-xor (int k1)) (int-rotate-left 13) (imul 5) (+ (int 0xe6546b64))))) + +(defn ^number m3-fmix [h1 len] + (as-> (int h1) h1 + (bit-xor h1 len) + (bit-xor h1 (unsigned-bit-shift-right h1 16)) + (imul h1 (int 0x85ebca6b)) + (bit-xor h1 (unsigned-bit-shift-right h1 13)) + (imul h1 (int 0xc2b2ae35)) + (bit-xor h1 (unsigned-bit-shift-right h1 16)))) + +(defn ^number m3-hash-int [in] + (if (zero? in) + in + (let [k1 (m3-mix-K1 in) + h1 (m3-mix-H1 m3-seed k1)] + (m3-fmix h1 4)))) + +(defn ^number m3-hash-unencoded-chars [in] + (let [h1 (loop [i 1 h1 m3-seed] + (if (< i (alength in)) + (recur (+ i 2) + (m3-mix-H1 h1 + (m3-mix-K1 + (bit-or (.charCodeAt in (dec i)) + (bit-shift-left (.charCodeAt in i) 16))))) + h1)) + h1 (if (== (bit-and (alength in) 1) 1) + (bit-xor h1 (m3-mix-K1 (.charCodeAt in (dec (alength in))))) + h1)] + (m3-fmix h1 (imul 2 (alength in))))) + +;;;;;;;;;;;;;;;;;;; symbols ;;;;;;;;;;;;;;; + +(declare list Symbol = compare) + +;; Simple caching of string hashcode +(def string-hash-cache (js-obj)) +(def string-hash-cache-count 0) + +;;http://hg.openjdk.java.net/jdk7u/jdk7u6/jdk/file/8c2c5d63a17e/src/share/classes/java/lang/String.java +(defn hash-string* [s] + (if-not (nil? s) + (let [len (alength s)] + (if (pos? len) + (loop [i 0 hash 0] + (if (< i len) + (recur (inc i) (+ (imul 31 hash) (.charCodeAt s i))) + hash)) + 0)) + 0)) + +(defn add-to-string-hash-cache [k] + (let [h (hash-string* k)] + (aset string-hash-cache k h) + (set! string-hash-cache-count (inc string-hash-cache-count)) + h)) + +(defn hash-string [k] + (when (> string-hash-cache-count 255) + (set! string-hash-cache (js-obj)) + (set! string-hash-cache-count 0)) + (if (nil? k) + 0 + (let [h (aget string-hash-cache k)] + (if (number? h) + h + (add-to-string-hash-cache k))))) + +(defn hash + "Returns the hash code of its argument. Note this is the hash code + consistent with =." + [o] + (cond + (implements? IHash o) + (bit-xor (-hash ^not-native o) 0) + + (number? o) + (if (js/isFinite o) + (js-mod (Math/floor o) 2147483647) + (case o + Infinity + 2146435072 + -Infinity + -1048576 + 2146959360)) + + ;; note: mirrors Clojure's behavior on the JVM, where the hashCode is + ;; 1231 for true and 1237 for false + ;; http://docs.oracle.com/javase/7/docs/api/java/lang/Boolean.html#hashCode%28%29 + (true? o) 1231 + + (false? o) 1237 + + (string? o) + (m3-hash-int (hash-string o)) + + (instance? js/Date o) + (bit-xor (.valueOf o) 0) + + (nil? o) 0 + + :else + (bit-xor (-hash o) 0))) + +(defn hash-combine [seed hash] + ; a la boost + (bit-xor seed + (+ hash 0x9e3779b9 + (bit-shift-left seed 6) + (bit-shift-right seed 2)))) + +(defn ^boolean instance? + "Evaluates x and tests if it is an instance of the type + c. Returns true or false" + [c x] + (cljs.core/instance? c x)) + +(defn ^boolean symbol? + "Return true if x is a Symbol" + [x] + (instance? Symbol x)) + +(defn- hash-symbol [sym] + (hash-combine + (m3-hash-unencoded-chars (.-name sym)) + (hash-string (.-ns sym)))) + +(defn- compare-symbols [a b] + (cond + (identical? (.-str a) (.-str b)) 0 + (and (not (.-ns a)) (.-ns b)) -1 + (.-ns a) (if-not (.-ns b) + 1 + (let [nsc (garray/defaultCompare (.-ns a) (.-ns b))] + (if (== 0 nsc) + (garray/defaultCompare (.-name a) (.-name b)) + nsc))) + :default (garray/defaultCompare (.-name a) (.-name b)))) + +(declare get) + +(deftype Symbol [ns name str ^:mutable _hash _meta] + Object + (toString [_] str) + (equiv [this other] (-equiv this other)) + + IEquiv + (-equiv [_ other] + (if (instance? Symbol other) + (identical? str (.-str other)) + false)) + + IFn + (-invoke [sym coll] + (get coll sym)) + (-invoke [sym coll not-found] + (get coll sym not-found)) + + IMeta + (-meta [_] _meta) + + IWithMeta + (-with-meta [_ new-meta] (Symbol. ns name str _hash new-meta)) + + IHash + (-hash [sym] + (caching-hash sym hash-symbol _hash)) + + INamed + (-name [_] name) + (-namespace [_] ns) + + IPrintWithWriter + (-pr-writer [o writer _] (-write writer str))) + +(defn symbol + "Returns a Symbol with the given namespace and name." + ([name] + (if (symbol? name) + name + (let [idx (.indexOf name "/")] + (if (< idx 1) + (symbol nil name) + (symbol (.substring name 0 idx) + (.substring name (inc idx) (. name -length))))))) + ([ns name] + (let [sym-str (if-not (nil? ns) + (str ns "/" name) + name)] + (Symbol. ns name sym-str nil nil)))) + +(deftype Var [val sym _meta] + Object + (isMacro [_] + (. (val) -cljs$lang$macro)) + (toString [_] + (str "#'" sym)) + IDeref + (-deref [_] (val)) + IMeta + (-meta [_] _meta) + IWithMeta + (-with-meta [_ new-meta] + (Var. val sym new-meta)) + IEquiv + (-equiv [this other] + (if (instance? Var other) + (= (.-sym this) (.-sym other)) + false)) + IHash + (-hash [_] + (hash-symbol sym)) + Fn + IFn + (-invoke [_] + ((val))) + (-invoke [_ a] + ((val) a)) + (-invoke [_ a b] + ((val) a b)) + (-invoke [_ a b c] + ((val) a b c)) + (-invoke [_ a b c d] + ((val) a b c d)) + (-invoke [_ a b c d e] + ((val) a b c d e)) + (-invoke [_ a b c d e f] + ((val) a b c d e f)) + (-invoke [_ a b c d e f g] + ((val) a b c d e f g)) + (-invoke [_ a b c d e f g h] + ((val) a b c d e f g h)) + (-invoke [_ a b c d e f g h i] + ((val) a b c d e f g h i)) + (-invoke [_ a b c d e f g h i j] + ((val) a b c d e f g h i j)) + (-invoke [_ a b c d e f g h i j k] + ((val) a b c d e f g h i j k)) + (-invoke [_ a b c d e f g h i j k l] + ((val) a b c d e f g h i j k l)) + (-invoke [_ a b c d e f g h i j k l m] + ((val) a b c d e f g h i j k l m)) + (-invoke [_ a b c d e f g h i j k l m n] + ((val) a b c d e f g h i j k l m n)) + (-invoke [_ a b c d e f g h i j k l m n o] + ((val) a b c d e f g h i j k l m n o)) + (-invoke [_ a b c d e f g h i j k l m n o p] + ((val) a b c d e f g h i j k l m n o p)) + (-invoke [_ a b c d e f g h i j k l m n o p q] + ((val) a b c d e f g h i j k l m n o p q)) + (-invoke [_ a b c d e f g h i j k l m n o p q r] + ((val) a b c d e f g h i j k l m n o p q r)) + (-invoke [_ a b c d e f g h i j k l m n o p q r s] + ((val) a b c d e f g h i j k l m n o p q r s)) + (-invoke [_ a b c d e f g h i j k l m n o p q r s t] + ((val) a b c d e f g h i j k l m n o p q r s t)) + (-invoke [_ a b c d e f g h i j k l m n o p q r s t rest] + (apply (val) a b c d e f g h i j k l m n o p q r s t rest))) + +(defn ^boolean var? + "Returns true if v is of type cljs.core.Var" + [v] + (instance? cljs.core.Var v)) + +;;;;;;;;;;;;;;;;;;; fundamentals ;;;;;;;;;;;;;;; + +(declare array-seq prim-seq IndexedSeq) + +(defn ^boolean iterable? + "Return true if x implements IIterable protocol." + [x] + (satisfies? IIterable x)) + +(defn clone + "Clone the supplied value which must implement ICloneable." + [value] + (-clone value)) + +(defn ^boolean cloneable? + "Return true if x implements ICloneable protocol." + [value] + (satisfies? ICloneable value)) + +(defn ^seq seq + "Returns a seq on the collection. If the collection is + empty, returns nil. (seq nil) returns nil. seq also works on + Strings." + [coll] + (when-not (nil? coll) + (cond + (implements? ISeqable coll) + (-seq ^not-native coll) + + (array? coll) + (when-not (zero? (alength coll)) + (IndexedSeq. coll 0 nil)) + + (string? coll) + (when-not (zero? (alength coll)) + (IndexedSeq. coll 0 nil)) + + (native-satisfies? ISeqable coll) + (-seq coll) + + :else (throw (js/Error. (str coll " is not ISeqable")))))) + +(defn first + "Returns the first item in the collection. Calls seq on its + argument. If coll is nil, returns nil." + [coll] + (when-not (nil? coll) + (if (implements? ISeq coll) + (-first ^not-native coll) + (let [s (seq coll)] + (when-not (nil? s) + (-first s)))))) + +(defn ^seq rest + "Returns a possibly empty seq of the items after the first. Calls seq on its + argument." + [coll] + (if-not (nil? coll) + (if (implements? ISeq coll) + (-rest ^not-native coll) + (let [s (seq coll)] + (if s + (-rest ^not-native s) + ()))) + ())) + +(defn ^seq next + "Returns a seq of the items after the first. Calls seq on its + argument. If there are no more items, returns nil" + [coll] + (when-not (nil? coll) + (if (implements? INext coll) + (-next ^not-native coll) + (seq (rest coll))))) + +(defn ^boolean = + "Equality. Returns true if x equals y, false if not. Compares + numbers and collections in a type-independent manner. Clojure's immutable data + structures define -equiv (and thus =) as a value, not an identity, + comparison." + ([x] true) + ([x y] + (if (nil? x) + (nil? y) + (or (identical? x y) + ^boolean (-equiv x y)))) + ([x y & more] + (if (= x y) + (if (next more) + (recur y (first more) (next more)) + (= y (first more))) + false))) + +;; EXPERIMENTAL: subject to change +(deftype ES6Iterator [^:mutable s] + Object + (next [_] + (if-not (nil? s) + (let [x (first s)] + (set! s (next s)) + #js {:value x :done false}) + #js {:value nil :done true}))) + +(defn es6-iterator + "EXPERIMENTAL: Return a ES2015 compatible iterator for coll." + [coll] + (ES6Iterator. (seq coll))) + +(declare es6-iterator-seq) + +(deftype ES6IteratorSeq [value iter ^:mutable _rest] + ISeqable + (-seq [this] this) + ISeq + (-first [_] value) + (-rest [_] + (when (nil? _rest) + (set! _rest (es6-iterator-seq iter))) + _rest)) + +(defn es6-iterator-seq + "EXPERIMENTAL: Given an ES2015 compatible iterator return a seq." + [iter] + (let [v (.next iter)] + (if (.-done v) + () + (ES6IteratorSeq. (.-value v) iter nil)))) + +;;;;;;;;;;;;;;;;;;; Murmur3 Helpers ;;;;;;;;;;;;;;;; + +(defn ^number mix-collection-hash + "Mix final collection hash for ordered or unordered collections. + hash-basis is the combined collection hash, count is the number + of elements included in the basis. Note this is the hash code + consistent with =, different from .hashCode. + See http://clojure.org/data_structures#hash for full algorithms." + [hash-basis count] + (let [h1 m3-seed + k1 (m3-mix-K1 hash-basis) + h1 (m3-mix-H1 h1 k1)] + (m3-fmix h1 count))) + +(defn ^number hash-ordered-coll + "Returns the hash code, consistent with =, for an external ordered + collection implementing Iterable. + See http://clojure.org/data_structures#hash for full algorithms." + [coll] + (loop [n 0 hash-code 1 coll (seq coll)] + (if-not (nil? coll) + (recur (inc n) (bit-or (+ (imul 31 hash-code) (hash (first coll))) 0) + (next coll)) + (mix-collection-hash hash-code n)))) + +(def ^:private empty-ordered-hash + (mix-collection-hash 1 0)) + +(defn ^number hash-unordered-coll + "Returns the hash code, consistent with =, for an external unordered + collection implementing Iterable. For maps, the iterator should + return map entries whose hash is computed as + (hash-ordered-coll [k v]). + See http://clojure.org/data_structures#hash for full algorithms." + [coll] + (loop [n 0 hash-code 0 coll (seq coll)] + (if-not (nil? coll) + (recur (inc n) (bit-or (+ hash-code (hash (first coll))) 0) (next coll)) + (mix-collection-hash hash-code n)))) + +(def ^:private empty-unordered-hash + (mix-collection-hash 0 0)) + +;;;;;;;;;;;;;;;;;;; protocols on primitives ;;;;;;;; +(declare hash-map list equiv-sequential) + +(extend-type nil + ICounted + (-count [_] 0)) + +;; TODO: we should remove this and handle date equality checking +;; by some other means, probably by adding a new primitive type +;; case to the hash table lookup - David + +(extend-type js/Date + IEquiv + (-equiv [o other] + (and (instance? js/Date other) + (== (.valueOf o) (.valueOf other)))) + + IComparable + (-compare [this other] + (if (instance? js/Date other) + (garray/defaultCompare (.valueOf this) (.valueOf other)) + (throw (js/Error. (str "Cannot compare " this " to " other)))))) + +(defprotocol Inst + (inst-ms* [inst])) + +(extend-protocol Inst + js/Date + (inst-ms* [inst] (.getTime inst))) + +(defn inst-ms + "Return the number of milliseconds since January 1, 1970, 00:00:00 GMT" + [inst] + (inst-ms* inst)) + +(defn ^boolean inst? + "Return true if x satisfies Inst" + [x] + (satisfies? Inst x)) + +(extend-type number + IEquiv + (-equiv [x o] (identical? x o))) + +(declare with-meta) + +(extend-type function + Fn + IMeta + (-meta [_] nil)) + +(extend-type default + IHash + (-hash [o] + (goog/getUid o))) + +;;this is primitive because & emits call to array-seq +(defn inc + "Returns a number one greater than num." + [x] (cljs.core/+ x 1)) + +(declare deref) + +(deftype Reduced [val] + IDeref + (-deref [o] val)) + +(defn reduced + "Wraps x in a way such that a reduce will terminate with the value x" + [x] + (Reduced. x)) + +(defn ^boolean reduced? + "Returns true if x is the result of a call to reduced" + [r] + (instance? Reduced r)) + +(defn ensure-reduced + "If x is already reduced?, returns it, else returns (reduced x)" + [x] + (if (reduced? x) x (reduced x))) + +(defn unreduced + "If x is reduced?, returns (deref x), else returns x" + [x] + (if (reduced? x) (deref x) x)) + +;; generic to all refs +;; (but currently hard-coded to atom!) +(defn deref + "Also reader macro: @var/@atom/@delay. Returns the + most-recently-committed value of ref. When applied to a var + or atom, returns its current state. When applied to a delay, forces + it if not already forced. See also - realized?." + [o] + (-deref o)) + +(defn- ci-reduce + "Accepts any collection which satisfies the ICount and IIndexed protocols and +reduces them without incurring seq initialization" + ([cicoll f] + (let [cnt (-count cicoll)] + (if (zero? cnt) + (f) + (loop [val (-nth cicoll 0), n 1] + (if (< n cnt) + (let [nval (f val (-nth cicoll n))] + (if (reduced? nval) + @nval + (recur nval (inc n)))) + val))))) + ([cicoll f val] + (let [cnt (-count cicoll)] + (loop [val val, n 0] + (if (< n cnt) + (let [nval (f val (-nth cicoll n))] + (if (reduced? nval) + @nval + (recur nval (inc n)))) + val)))) + ([cicoll f val idx] + (let [cnt (-count cicoll)] + (loop [val val, n idx] + (if (< n cnt) + (let [nval (f val (-nth cicoll n))] + (if (reduced? nval) + @nval + (recur nval (inc n)))) + val))))) + +(defn- array-reduce + ([arr f] + (let [cnt (alength arr)] + (if (zero? (alength arr)) + (f) + (loop [val (aget arr 0), n 1] + (if (< n cnt) + (let [nval (f val (aget arr n))] + (if (reduced? nval) + @nval + (recur nval (inc n)))) + val))))) + ([arr f val] + (let [cnt (alength arr)] + (loop [val val, n 0] + (if (< n cnt) + (let [nval (f val (aget arr n))] + (if (reduced? nval) + @nval + (recur nval (inc n)))) + val)))) + ([arr f val idx] + (let [cnt (alength arr)] + (loop [val val, n idx] + (if (< n cnt) + (let [nval (f val (aget arr n))] + (if (reduced? nval) + @nval + (recur nval (inc n)))) + val))))) + +(declare hash-coll cons drop count nth RSeq List) + +(defn ^boolean counted? + "Returns true if coll implements count in constant time" + [x] (satisfies? ICounted x)) + +(defn ^boolean indexed? + "Returns true if coll implements nth in constant time" + [x] (satisfies? IIndexed x)) + +(defn- -indexOf + ([coll x] + (-indexOf coll x 0)) + ([coll x start] + (let [len (count coll)] + (if (>= start len) + -1 + (loop [idx (cond + (pos? start) start + (neg? start) (max 0 (+ start len)) + :else start)] + (if (< idx len) + (if (= (nth coll idx) x) + idx + (recur (inc idx))) + -1)))))) + +(defn- -lastIndexOf + ([coll x] + (-lastIndexOf coll x (count coll))) + ([coll x start] + (let [len (count coll)] + (if (zero? len) + -1 + (loop [idx (cond + (pos? start) (min (dec len) start) + (neg? start) (+ len start) + :else start)] + (if (>= idx 0) + (if (= (nth coll idx) x) + idx + (recur (dec idx))) + -1)))))) + +(deftype IndexedSeqIterator [arr ^:mutable i] + Object + (hasNext [_] + (< i (alength arr))) + (next [_] + (let [ret (aget arr i)] + (set! i (inc i)) + ret))) + +(deftype IndexedSeq [arr i meta] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ICloneable + (-clone [_] (IndexedSeq. arr i meta)) + + ISeqable + (-seq [this] + (when (< i (alength arr)) + this)) + + IMeta + (-meta [coll] meta) + IWithMeta + (-with-meta [coll new-meta] + (IndexedSeq. arr i new-meta)) + + ASeq + ISeq + (-first [_] (aget arr i)) + (-rest [_] (if (< (inc i) (alength arr)) + (IndexedSeq. arr (inc i) nil) + (list))) + + INext + (-next [_] (if (< (inc i) (alength arr)) + (IndexedSeq. arr (inc i) nil) + nil)) + + ICounted + (-count [_] + (max 0 (- (alength arr) i))) + + IIndexed + (-nth [coll n] + (let [i (+ n i)] + (if (and (<= 0 i) (< i (alength arr))) + (aget arr i) + (throw (js/Error. "Index out of bounds"))))) + (-nth [coll n not-found] + (let [i (+ n i)] + (if (and (<= 0 i) (< i (alength arr))) + (aget arr i) + not-found))) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IIterable + (-iterator [coll] + (IndexedSeqIterator. arr i)) + + ICollection + (-conj [coll o] (cons o coll)) + + IEmptyableCollection + (-empty [coll] (.-EMPTY List)) + + IReduce + (-reduce [coll f] + (array-reduce arr f (aget arr i) (inc i))) + (-reduce [coll f start] + (array-reduce arr f start i)) + + IHash + (-hash [coll] (hash-ordered-coll coll)) + + IReversible + (-rseq [coll] + (let [c (-count coll)] + (if (pos? c) + (RSeq. coll (dec c) nil))))) + +(es6-iterable IndexedSeq) + +(defn prim-seq + "Create seq from a primitive JavaScript Array-like." + ([prim] + (prim-seq prim 0)) + ([prim i] + (when (< i (alength prim)) + (IndexedSeq. prim i nil)))) + +(defn array-seq + "Create a seq from a JavaScript array." + ([array] + (prim-seq array 0)) + ([array i] + (prim-seq array i))) + +(declare with-meta seq-reduce) + +(deftype RSeq [ci i meta] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ICloneable + (-clone [_] (RSeq. ci i meta)) + + IMeta + (-meta [coll] meta) + IWithMeta + (-with-meta [coll new-meta] + (RSeq. ci i new-meta)) + + ISeqable + (-seq [coll] coll) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + ISeq + (-first [coll] + (-nth ci i)) + (-rest [coll] + (if (pos? i) + (RSeq. ci (dec i) nil) + ())) + + INext + (-next [coll] + (when (pos? i) + (RSeq. ci (dec i) nil))) + + ICounted + (-count [coll] (inc i)) + + ICollection + (-conj [coll o] + (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + IHash + (-hash [coll] (hash-ordered-coll coll)) + + IReduce + (-reduce [col f] (seq-reduce f col)) + (-reduce [col f start] (seq-reduce f start col))) + +(es6-iterable RSeq) + +(defn second + "Same as (first (next x))" + [coll] + (first (next coll))) + +(defn ffirst + "Same as (first (first x))" + [coll] + (first (first coll))) + +(defn nfirst + "Same as (next (first x))" + [coll] + (next (first coll))) + +(defn fnext + "Same as (first (next x))" + [coll] + (first (next coll))) + +(defn nnext + "Same as (next (next x))" + [coll] + (next (next coll))) + +(defn last + "Return the last item in coll, in linear time" + [s] + (let [sn (next s)] + (if-not (nil? sn) + (recur sn) + (first s)))) + +(extend-type default + IEquiv + (-equiv [x o] (identical? x o))) + +(defn conj + "conj[oin]. Returns a new collection with the xs + 'added'. (conj nil item) returns (item). The 'addition' may + happen at different 'places' depending on the concrete type." + ([] []) + ([coll] coll) + ([coll x] + (if-not (nil? coll) + (-conj coll x) + (list x))) + ([coll x & xs] + (if xs + (recur (conj coll x) (first xs) (next xs)) + (conj coll x)))) + +(defn empty + "Returns an empty collection of the same category as coll, or nil" + [coll] + (when-not (nil? coll) + (-empty coll))) + +(defn- accumulating-seq-count [coll] + (loop [s (seq coll) acc 0] + (if (counted? s) ; assumes nil is counted, which it currently is + (+ acc (-count s)) + (recur (next s) (inc acc))))) + +(defn count + "Returns the number of items in the collection. (count nil) returns + 0. Also works on strings, arrays, and Maps" + [coll] + (if-not (nil? coll) + (cond + (implements? ICounted coll) + (-count ^not-native coll) + + (array? coll) + (alength coll) + + (string? coll) + (alength coll) + + (implements? ISeqable coll) + (accumulating-seq-count coll) + + :else (-count coll)) + 0)) + +(defn- linear-traversal-nth + ([coll n] + (cond + (nil? coll) (throw (js/Error. "Index out of bounds")) + (zero? n) (if (seq coll) + (first coll) + (throw (js/Error. "Index out of bounds"))) + (indexed? coll) (-nth coll n) + (seq coll) (recur (next coll) (dec n)) + :else (throw (js/Error. "Index out of bounds")))) + ([coll n not-found] + (cond + (nil? coll) not-found + (zero? n) (if (seq coll) + (first coll) + not-found) + (indexed? coll) (-nth coll n not-found) + (seq coll) (recur (next coll) (dec n) not-found) + :else not-found))) + +(defn nth + "Returns the value at the index. get returns nil if index out of + bounds, nth throws an exception unless not-found is supplied. nth + also works for strings, arrays, regex Matchers and Lists, and, + in O(n) time, for sequences." + ([coll n] + (cond + (not (number? n)) + (throw (js/Error. "Index argument to nth must be a number")) + + (nil? coll) + coll + + (implements? IIndexed coll) + (-nth ^not-native coll n) + + (array? coll) + (if (and (>= n 0) (< n (.-length coll))) + (aget coll n) + (throw (js/Error. "Index out of bounds"))) + + (string? coll) + (if (and (>= n 0) (< n (.-length coll))) + (.charAt coll n) + (throw (js/Error. "Index out of bounds"))) + + (implements? ISeq coll) + (linear-traversal-nth coll n) + + (native-satisfies? IIndexed coll) + (-nth coll n) + + :else + (throw (js/Error. (str "nth not supported on this type " + (type->str (type coll))))))) + ([coll n not-found] + (cond + (not (number? n)) + (throw (js/Error. "Index argument to nth must be a number.")) + + (nil? coll) + not-found + + (implements? IIndexed coll) + (-nth ^not-native coll n not-found) + + (array? coll) + (if (and (>= n 0) (< n (.-length coll))) + (aget coll n) + not-found) + + (string? coll) + (if (and (>= n 0) (< n (.-length coll))) + (.charAt coll n) + not-found) + + (implements? ISeq coll) + (linear-traversal-nth coll n not-found) + + (native-satisfies? IIndexed coll) + (-nth coll n) + + :else + (throw (js/Error. (str "nth not supported on this type " + (type->str (type coll)))))))) + +(defn nthrest + "Returns the nth rest of coll, coll when n is 0." + [coll n] + (loop [n n xs coll] + (if (and (pos? n) (seq xs)) + (recur (dec n) (rest xs)) + xs))) + +(defn get + "Returns the value mapped to key, not-found or nil if key not present." + ([o k] + (when-not (nil? o) + (cond + (implements? ILookup o) + (-lookup ^not-native o k) + + (array? o) + (when (and (some? k) (< k (.-length o))) + (aget o (int k))) + + (string? o) + (when (and (some? k) (< k (.-length o))) + (.charAt o (int k))) + + (native-satisfies? ILookup o) + (-lookup o k) + + :else nil))) + ([o k not-found] + (if-not (nil? o) + (cond + (implements? ILookup o) + (-lookup ^not-native o k not-found) + + (array? o) + (if (and (some? k) (>= k 0) (< k (.-length o))) + (aget o (int k)) + not-found) + + (string? o) + (if (and (some? k) (>= k 0) (< k (.-length o))) + (.charAt o (int k)) + not-found) + + (native-satisfies? ILookup o) + (-lookup o k not-found) + + :else not-found) + not-found))) + +(declare PersistentHashMap PersistentArrayMap) + +(defn assoc + "assoc[iate]. When applied to a map, returns a new map of the + same (hashed/sorted) type, that contains the mapping of key(s) to + val(s). When applied to a vector, returns a new vector that + contains val at index." + ([coll k v] + (if-not (nil? coll) + (-assoc coll k v) + (array-map k v))) + ([coll k v & kvs] + (let [ret (assoc coll k v)] + (if kvs + (recur ret (first kvs) (second kvs) (nnext kvs)) + ret)))) + +(defn dissoc + "dissoc[iate]. Returns a new map of the same (hashed/sorted) type, + that does not contain a mapping for key(s)." + ([coll] coll) + ([coll k] + (when-not (nil? coll) + (-dissoc coll k))) + ([coll k & ks] + (when-not (nil? coll) + (let [ret (dissoc coll k)] + (if ks + (recur ret (first ks) (next ks)) + ret))))) + +(defn ^boolean fn? + "Return true if f is a JavaScript function or satisfies the Fn protocol." + [f] + (or ^boolean (goog/isFunction f) (satisfies? Fn f))) + +(deftype MetaFn [afn meta] + IMeta + (-meta [_] meta) + IWithMeta + (-with-meta [_ new-meta] + (MetaFn. afn new-meta)) + Fn + IFn + (-invoke [_] + (afn)) + (-invoke [_ a] + (afn a)) + (-invoke [_ a b] + (afn a b)) + (-invoke [_ a b c] + (afn a b c)) + (-invoke [_ a b c d] + (afn a b c d)) + (-invoke [_ a b c d e] + (afn a b c d e)) + (-invoke [_ a b c d e f] + (afn a b c d e f)) + (-invoke [_ a b c d e f g] + (afn a b c d e f g)) + (-invoke [_ a b c d e f g h] + (afn a b c d e f g h)) + (-invoke [_ a b c d e f g h i] + (afn a b c d e f g h i)) + (-invoke [_ a b c d e f g h i j] + (afn a b c d e f g h i j)) + (-invoke [_ a b c d e f g h i j k] + (afn a b c d e f g h i j k)) + (-invoke [_ a b c d e f g h i j k l] + (afn a b c d e f g h i j k l)) + (-invoke [_ a b c d e f g h i j k l m] + (afn a b c d e f g h i j k l m)) + (-invoke [_ a b c d e f g h i j k l m n] + (afn a b c d e f g h i j k l m n)) + (-invoke [_ a b c d e f g h i j k l m n o] + (afn a b c d e f g h i j k l m n o)) + (-invoke [_ a b c d e f g h i j k l m n o p] + (afn a b c d e f g h i j k l m n o p)) + (-invoke [_ a b c d e f g h i j k l m n o p q] + (afn a b c d e f g h i j k l m n o p q)) + (-invoke [_ a b c d e f g h i j k l m n o p q r] + (afn a b c d e f g h i j k l m n o p q r)) + (-invoke [_ a b c d e f g h i j k l m n o p q r s] + (afn a b c d e f g h i j k l m n o p q r s)) + (-invoke [_ a b c d e f g h i j k l m n o p q r s t] + (afn a b c d e f g h i j k l m n o p q r s t)) + (-invoke [_ a b c d e f g h i j k l m n o p q r s t rest] + (apply afn a b c d e f g h i j k l m n o p q r s t rest))) + +(defn with-meta + "Returns an object of the same type and value as obj, with + map m as its metadata." + [o meta] + (if ^boolean (goog/isFunction o) + (MetaFn. o meta) + (when-not (nil? o) + (-with-meta o meta)))) + +(defn meta + "Returns the metadata of obj, returns nil if there is no metadata." + [o] + (when (and (not (nil? o)) + (satisfies? IMeta o)) + (-meta o))) + +(defn peek + "For a list or queue, same as first, for a vector, same as, but much + more efficient than, last. If the collection is empty, returns nil." + [coll] + (when-not (nil? coll) + (-peek coll))) + +(defn pop + "For a list or queue, returns a new list/queue without the first + item, for a vector, returns a new vector without the last item. + Note - not the same as next/butlast." + [coll] + (when-not (nil? coll) + (-pop coll))) + +(defn disj + "disj[oin]. Returns a new set of the same (hashed/sorted) type, that + does not contain key(s)." + ([coll] coll) + ([coll k] + (when-not (nil? coll) + (-disjoin coll k))) + ([coll k & ks] + (when-not (nil? coll) + (let [ret (disj coll k)] + (if ks + (recur ret (first ks) (next ks)) + ret))))) + +(defn ^boolean empty? + "Returns true if coll has no items - same as (not (seq coll)). + Please use the idiom (seq x) rather than (not (empty? x))" + [coll] (or (nil? coll) + (not (seq coll)))) + +(defn ^boolean coll? + "Returns true if x satisfies ICollection" + [x] + (if (nil? x) + false + (satisfies? ICollection x))) + +(defn ^boolean set? + "Returns true if x satisfies ISet" + [x] + (if (nil? x) + false + (satisfies? ISet x))) + +(defn ^boolean associative? + "Returns true if coll implements Associative" + [x] (satisfies? IAssociative x)) + +(defn ^boolean ifind? + "Returns true if coll implements IFind" + [x] (satisfies? IFind x)) + +(defn ^boolean sequential? + "Returns true if coll satisfies ISequential" + [x] (satisfies? ISequential x)) + +(defn ^boolean sorted? + "Returns true if coll satisfies ISorted" + [x] (satisfies? ISorted x)) + +(defn ^boolean reduceable? + "Returns true if coll satisfies IReduce" + [x] (satisfies? IReduce x)) + +(defn ^boolean map? + "Return true if x satisfies IMap" + [x] + (if (nil? x) + false + (satisfies? IMap x))) + +(defn ^boolean record? + "Return true if x satisfies IRecord" + [x] + (satisfies? IRecord x)) + +(defn ^boolean vector? + "Return true if x satisfies IVector" + [x] (satisfies? IVector x)) + +(declare ChunkedCons ChunkedSeq) + +(defn ^boolean chunked-seq? + "Return true if x is satisfies IChunkedSeq." + [x] (implements? IChunkedSeq x)) + +;;;;;;;;;;;;;;;;;;;; js primitives ;;;;;;;;;;;; +(defn js-obj + "Create JavaSript object from an even number arguments representing + interleaved keys and values." + ([] + (cljs.core/js-obj)) + ([& keyvals] + (apply gobject/create keyvals))) + +(defn js-keys + "Return the JavaScript keys for an object." + [obj] + (let [keys (array)] + (gobject/forEach obj (fn [val key obj] (.push keys key))) + keys)) + +(defn js-delete + "Delete a property from a JavaScript object." + [obj key] + (cljs.core/js-delete obj key)) + +(defn- array-copy + ([from i to j len] + (loop [i i j j len len] + (if (zero? len) + to + (do (aset to j (aget from i)) + (recur (inc i) (inc j) (dec len))))))) + +(defn- array-copy-downward + ([from i to j len] + (loop [i (+ i (dec len)) j (+ j (dec len)) len len] + (if (zero? len) + to + (do (aset to j (aget from i)) + (recur (dec i) (dec j) (dec len))))))) + +;;;;;;;;;;;;;;;; preds ;;;;;;;;;;;;;;;;;; + +(def ^:private lookup-sentinel (js-obj)) + +(defn ^boolean false? + "Returns true if x is the value false, false otherwise." + [x] (cljs.core/false? x)) + +(defn ^boolean true? + "Returns true if x is the value true, false otherwise." + [x] (cljs.core/true? x)) + +(defn ^boolean boolean? + "Return true if x is a Boolean" + [x] (or (cljs.core/true? x) (cljs.core/false? x))) + +(defn ^boolean undefined? + "Returns true if x identical to the JavaScript undefined value." + [x] + (cljs.core/undefined? x)) + +(defn ^boolean seq? + "Return true if s satisfies ISeq" + [s] + (if (nil? s) + false + (satisfies? ISeq s))) + +(defn ^boolean seqable? + "Return true if the seq function is supported for s" + [s] + (or + (satisfies? ISeqable s) + (array? s) + (string? s))) + +(defn ^boolean boolean + "Coerce to boolean" + [x] + (cond + (nil? x) false + (false? x) false + :else true)) + +(defn ^boolean ifn? + "Returns true if f returns true for fn? or satisfies IFn." + [f] + (or (fn? f) (satisfies? IFn f))) + +(defn ^boolean integer? + "Returns true if n is a JavaScript number with no decimal part." + [n] + (and (number? n) + (not ^boolean (js/isNaN n)) + (not (identical? n js/Infinity)) + (== (js/parseFloat n) (js/parseInt n 10)))) + +(defn ^boolean int? + "Return true if x satisfies integer? or is an instance of goog.math.Integer + or goog.math.Long." + [x] + (or (integer? x) + (instance? goog.math.Integer x) + (instance? goog.math.Long x))) + +(defn ^boolean pos-int? + "Return true if x satisfies int? and is positive." + [x] + (cond + (integer? x) (pos? x) + + (instance? goog.math.Integer x) + (and (not (.isNegative x)) + (not (.isZero x))) + + (instance? goog.math.Long x) + (and (not (.isNegative x)) + (not (.isZero x))) + + :else false)) + +(defn ^boolean neg-int? + "Return true if x satisfies int? and is positive." + [x] + (cond + (integer? x) (neg? x) + + (instance? goog.math.Integer x) + (.isNegative x) + + (instance? goog.math.Long x) + (.isNegative x) + + :else false)) + +(defn ^boolean nat-int? + "Return true if x satisfies int? and is a natural integer value." + [x] + (cond + (integer? x) + (or (not (neg? x)) (zero? x)) + + (instance? goog.math.Integer x) + (or (not (.isNegative x)) (.isZero x)) + + (instance? goog.math.Long x) + (or (not (.isNegative x)) (.isZero x)) + + :else false)) + +(defn ^boolean float? + "Returns true for JavaScript numbers, false otherwise." + [x] + (number? x)) + +(defn ^boolean double? + "Returns true for JavaScript numbers, false otherwise." + [x] + (number? x)) + +(defn ^boolean infinite? + "Returns true for Infinity and -Infinity values." + [x] + (or (identical? x js/Number.POSITIVE_INFINITY) + (identical? x js/Number.NEGATIVE_INFINITY))) + +(defn ^boolean contains? + "Returns true if key is present in the given collection, otherwise + returns false. Note that for numerically indexed collections like + vectors and arrays, this tests if the numeric key is within the + range of indexes. 'contains?' operates constant or logarithmic time; + it will not perform a linear search for a value. See also 'some'." + [coll v] + (if (identical? (get coll v lookup-sentinel) lookup-sentinel) + false + true)) + +(defn find + "Returns the map entry for key, or nil if key not present." + [coll k] + (when (and (not (nil? coll)) + (associative? coll) + (contains? coll k)) + (if (ifind? coll) + (-find coll k) + [k (get coll k)]))) + +(defn ^boolean distinct? + "Returns true if no two of the arguments are =" + ([x] true) + ([x y] (not (= x y))) + ([x y & more] + (if (not (= x y)) + (loop [s #{x y} xs more] + (let [x (first xs) + etc (next xs)] + (if xs + (if (contains? s x) + false + (recur (conj s x) etc)) + true))) + false))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Seq fns ;;;;;;;;;;;;;;;; + +(defn ^number compare + "Comparator. Returns a negative number, zero, or a positive number + when x is logically 'less than', 'equal to', or 'greater than' + y. Uses IComparable if available and google.array.defaultCompare for objects + of the same type and special-cases nil to be less than any other object." + [x y] + (cond + (identical? x y) 0 + + (nil? x) -1 + + (nil? y) 1 + + (number? x) (if (number? y) + (garray/defaultCompare x y) + (throw (js/Error. (str "Cannot compare " x " to " y)))) + + (satisfies? IComparable x) + (-compare x y) + + :else + (if (and (or (string? x) (array? x) (true? x) (false? x)) + (identical? (type x) (type y))) + (garray/defaultCompare x y) + (throw (js/Error. (str "Cannot compare " x " to " y)))))) + +(defn ^:private compare-indexed + "Compare indexed collection." + ([xs ys] + (let [xl (count xs) + yl (count ys)] + (cond + (< xl yl) -1 + (> xl yl) 1 + (== xl 0) 0 + :else (compare-indexed xs ys xl 0)))) + ([xs ys len n] + (let [d (compare (nth xs n) (nth ys n))] + (if (and (zero? d) (< (+ n 1) len)) + (recur xs ys len (inc n)) + d)))) + +(defn ^:private fn->comparator + "Given a fn that might be boolean valued or a comparator, + return a fn that is a comparator." + [f] + (if (= f compare) + compare + (fn [x y] + (let [r (f x y)] + (if (number? r) + r + (if r + -1 + (if (f y x) 1 0))))))) + +(declare to-array) + +(defn sort + "Returns a sorted sequence of the items in coll. Comp can be + boolean-valued comparison function, or a -/0/+ valued comparator. + Comp defaults to compare." + ([coll] + (sort compare coll)) + ([comp coll] + (if (seq coll) + (let [a (to-array coll)] + ;; matching Clojure's stable sort, though docs don't promise it + (garray/stableSort a (fn->comparator comp)) + (seq a)) + ()))) + +(defn sort-by + "Returns a sorted sequence of the items in coll, where the sort + order is determined by comparing (keyfn item). Comp can be + boolean-valued comparison funcion, or a -/0/+ valued comparator. + Comp defaults to compare." + ([keyfn coll] + (sort-by keyfn compare coll)) + ([keyfn comp coll] + (sort (fn [x y] ((fn->comparator comp) (keyfn x) (keyfn y))) coll))) + +; simple reduce based on seqs, used as default +(defn- seq-reduce + ([f coll] + (if-let [s (seq coll)] + (reduce f (first s) (next s)) + (f))) + ([f val coll] + (loop [val val, coll (seq coll)] + (if coll + (let [nval (f val (first coll))] + (if (reduced? nval) + @nval + (recur nval (next coll)))) + val)))) + +(declare vec) + +(defn shuffle + "Return a random permutation of coll" + [coll] + (let [a (to-array coll)] + (garray/shuffle a) + (vec a))) + +(defn reduce + "f should be a function of 2 arguments. If val is not supplied, + returns the result of applying f to the first 2 items in coll, then + applying f to that result and the 3rd item, etc. If coll contains no + items, f must accept no arguments as well, and reduce returns the + result of calling f with no arguments. If coll has only 1 item, it + is returned and f is not called. If val is supplied, returns the + result of applying f to val and the first item in coll, then + applying f to that result and the 2nd item, etc. If coll contains no + items, returns val and f is not called." + ([f coll] + (cond + (implements? IReduce coll) + (-reduce ^not-native coll f) + + (array? coll) + (array-reduce coll f) + + (string? coll) + (array-reduce coll f) + + (native-satisfies? IReduce coll) + (-reduce coll f) + + :else + (seq-reduce f coll))) + ([f val coll] + (cond + (implements? IReduce coll) + (-reduce ^not-native coll f val) + + (array? coll) + (array-reduce coll f val) + + (string? coll) + (array-reduce coll f val) + + (native-satisfies? IReduce coll) + (-reduce coll f val) + + :else + (seq-reduce f val coll)))) + +(defn reduce-kv + "Reduces an associative collection. f should be a function of 3 + arguments. Returns the result of applying f to init, the first key + and the first value in coll, then applying f to that result and the + 2nd key and value, etc. If coll contains no entries, returns init + and f is not called. Note that reduce-kv is supported on vectors, + where the keys will be the ordinals." + ([f init coll] + (if-not (nil? coll) + (-kv-reduce coll f init) + init))) + +(defn identity + "Returns its argument." + [x] x) + +(defn completing + "Takes a reducing function f of 2 args and returns a fn suitable for + transduce by adding an arity-1 signature that calls cf (default - + identity) on the result argument." + ([f] (completing f identity)) + ([f cf] + (fn + ([] (f)) + ([x] (cf x)) + ([x y] (f x y))))) + +(defn transduce + "reduce with a transformation of f (xf). If init is not + supplied, (f) will be called to produce it. f should be a reducing + step function that accepts both 1 and 2 arguments, if it accepts + only 2 you can add the arity-1 with 'completing'. Returns the result + of applying (the transformed) xf to init and the first item in coll, + then applying xf to that result and the 2nd item, etc. If coll + contains no items, returns init and f is not called. Note that + certain transforms may inject or skip items." + ([xform f coll] (transduce xform f (f) coll)) + ([xform f init coll] + (let [f (xform f) + ret (reduce f init coll)] + (f ret)))) + +;;; Math - variadic forms will not work until the following implemented: +;;; first, next, reduce + +(defn ^number + + "Returns the sum of nums. (+) returns 0." + ([] 0) + ([x] x) + ([x y] (cljs.core/+ x y)) + ([x y & more] + (reduce + (cljs.core/+ x y) more))) + +(defn ^number - + "If no ys are supplied, returns the negation of x, else subtracts + the ys from x and returns the result." + ([x] (cljs.core/- x)) + ([x y] (cljs.core/- x y)) + ([x y & more] (reduce - (cljs.core/- x y) more))) + +(defn ^number * + "Returns the product of nums. (*) returns 1." + ([] 1) + ([x] x) + ([x y] (cljs.core/* x y)) + ([x y & more] (reduce * (cljs.core/* x y) more))) + +(declare divide) + +(defn ^number / + "If no denominators are supplied, returns 1/numerator, + else returns numerator divided by all of the denominators." + ([x] (/ 1 x)) + ([x y] (cljs.core/divide x y)) ;; FIXME: waiting on cljs.core// + ([x y & more] (reduce / (/ x y) more))) + +(defn ^boolean < + "Returns non-nil if nums are in monotonically increasing order, + otherwise false." + ([x] true) + ([x y] (cljs.core/< x y)) + ([x y & more] + (if (cljs.core/< x y) + (if (next more) + (recur y (first more) (next more)) + (cljs.core/< y (first more))) + false))) + +(defn ^boolean <= + "Returns non-nil if nums are in monotonically non-decreasing order, + otherwise false." + ([x] true) + ([x y] (cljs.core/<= x y)) + ([x y & more] + (if (cljs.core/<= x y) + (if (next more) + (recur y (first more) (next more)) + (cljs.core/<= y (first more))) + false))) + +(defn ^boolean > + "Returns non-nil if nums are in monotonically decreasing order, + otherwise false." + ([x] true) + ([x y] (cljs.core/> x y)) + ([x y & more] + (if (cljs.core/> x y) + (if (next more) + (recur y (first more) (next more)) + (cljs.core/> y (first more))) + false))) + +(defn ^boolean >= + "Returns non-nil if nums are in monotonically non-increasing order, + otherwise false." + ([x] true) + ([x y] (cljs.core/>= x y)) + ([x y & more] + (if (cljs.core/>= x y) + (if (next more) + (recur y (first more) (next more)) + (cljs.core/>= y (first more))) + false))) + +(defn dec + "Returns a number one less than num." + [x] (- x 1)) + +(defn ^number max + "Returns the greatest of the nums." + ([x] x) + ([x y] (cljs.core/max x y)) + ([x y & more] + (reduce max (cljs.core/max x y) more))) + +(defn ^number min + "Returns the least of the nums." + ([x] x) + ([x y] (cljs.core/min x y)) + ([x y & more] + (reduce min (cljs.core/min x y) more))) + +(defn ^number byte [x] x) + +(defn char + "Coerce to char" + [x] + (cond + (number? x) (.fromCharCode js/String x) + (and (string? x) (== (.-length x) 1)) x + :else (throw (js/Error. "Argument to char must be a character or number")))) + +(defn ^number short [x] x) +(defn ^number float [x] x) +(defn ^number double [x] x) + +(defn ^number unchecked-byte [x] x) +(defn ^number unchecked-char [x] x) +(defn ^number unchecked-short [x] x) +(defn ^number unchecked-float [x] x) +(defn ^number unchecked-double [x] x) + +(defn ^number unchecked-add + "Returns the sum of nums. (+) returns 0." + ([] 0) + ([x] x) + ([x y] (cljs.core/unchecked-add x y)) + ([x y & more] (reduce unchecked-add (cljs.core/unchecked-add x y) more))) + +(defn ^number unchecked-add-int + "Returns the sum of nums. (+) returns 0." + ([] 0) + ([x] x) + ([x y] (cljs.core/unchecked-add-int x y)) + ([x y & more] (reduce unchecked-add-int (cljs.core/unchecked-add-int x y) more))) + +(defn unchecked-dec + "Returns a number one less than x, an int." + [x] + (cljs.core/unchecked-dec x)) + +(defn unchecked-dec-int + "Returns a number one less than x, an int." + [x] + (cljs.core/unchecked-dec-int x)) + +(defn ^number unchecked-divide-int + "If no denominators are supplied, returns 1/numerator, + else returns numerator divided by all of the denominators." + ([x] (unchecked-divide-int 1 x)) + ([x y] (cljs.core/divide x y)) ;; FIXME: waiting on cljs.core// + ([x y & more] (reduce unchecked-divide-int (unchecked-divide-int x y) more))) + +(defn unchecked-inc [x] + (cljs.core/unchecked-inc x)) + +(defn unchecked-inc-int [x] + (cljs.core/unchecked-inc-int x)) + +(defn ^number unchecked-multiply + "Returns the product of nums. (*) returns 1." + ([] 1) + ([x] x) + ([x y] (cljs.core/unchecked-multiply x y)) + ([x y & more] (reduce unchecked-multiply (cljs.core/unchecked-multiply x y) more))) + +(defn ^number unchecked-multiply-int + "Returns the product of nums. (*) returns 1." + ([] 1) + ([x] x) + ([x y] (cljs.core/unchecked-multiply-int x y)) + ([x y & more] (reduce unchecked-multiply-int (cljs.core/unchecked-multiply-int x y) more))) + +(defn unchecked-negate [x] + (cljs.core/unchecked-negate x)) + +(defn unchecked-negate-int [x] + (cljs.core/unchecked-negate-int x)) + +(declare mod) + +(defn unchecked-remainder-int [x n] + (cljs.core/unchecked-remainder-int x n)) + +(defn ^number unchecked-subtract + "If no ys are supplied, returns the negation of x, else subtracts + the ys from x and returns the result." + ([x] (cljs.core/unchecked-subtract x)) + ([x y] (cljs.core/unchecked-subtract x y)) + ([x y & more] (reduce unchecked-subtract (cljs.core/unchecked-subtract x y) more))) + +(defn ^number unchecked-subtract-int + "If no ys are supplied, returns the negation of x, else subtracts + the ys from x and returns the result." + ([x] (cljs.core/unchecked-subtract-int x)) + ([x y] (cljs.core/unchecked-subtract-int x y)) + ([x y & more] (reduce unchecked-subtract-int (cljs.core/unchecked-subtract-int x y) more))) + +(defn- ^number fix [q] + (if (>= q 0) + (Math/floor q) + (Math/ceil q))) + +(defn int + "Coerce to int by stripping decimal places." + [x] + (bit-or x 0)) + +(defn unchecked-int + "Coerce to int by stripping decimal places." + [x] + (fix x)) + +(defn long + "Coerce to long by stripping decimal places. Identical to `int'." + [x] + (fix x)) + +(defn unchecked-long + "Coerce to long by stripping decimal places. Identical to `int'." + [x] + (fix x)) + +(defn booleans [x] x) +(defn bytes [x] x) +(defn chars [x] x) +(defn shorts [x] x) +(defn ints [x] x) +(defn floats [x] x) +(defn doubles [x] x) +(defn longs [x] x) + +(defn js-mod + "Modulus of num and div with original javascript behavior. i.e. bug for negative numbers" + [n d] + (cljs.core/js-mod n d)) + +(defn mod + "Modulus of num and div. Truncates toward negative infinity." + [n d] + (js-mod (+ (js-mod n d) d) d)) + +(defn quot + "quot[ient] of dividing numerator by denominator." + [n d] + (let [rem (js-mod n d)] + (fix (/ (- n rem) d)))) + +(defn rem + "remainder of dividing numerator by denominator." + [n d] + (let [q (quot n d)] + (- n (* d q)))) + +(defn bit-xor + "Bitwise exclusive or" + ([x y] (cljs.core/bit-xor x y)) + ([x y & more] + (reduce bit-xor (cljs.core/bit-xor x y) more))) + +(defn bit-and + "Bitwise and" + ([x y] (cljs.core/bit-and x y)) + ([x y & more] + (reduce bit-and (cljs.core/bit-and x y) more))) + +(defn bit-or + "Bitwise or" + ([x y] (cljs.core/bit-or x y)) + ([x y & more] + (reduce bit-or (cljs.core/bit-or x y) more))) + +(defn bit-and-not + "Bitwise and with complement" + ([x y] (cljs.core/bit-and-not x y)) + ([x y & more] + (reduce bit-and-not (cljs.core/bit-and-not x y) more))) + +(defn bit-clear + "Clear bit at index n" + [x n] + (cljs.core/bit-clear x n)) + +(defn bit-flip + "Flip bit at index n" + [x n] + (cljs.core/bit-flip x n)) + +(defn bit-not + "Bitwise complement" + [x] (cljs.core/bit-not x)) + +(defn bit-set + "Set bit at index n" + [x n] + (cljs.core/bit-set x n)) + +(defn ^boolean bit-test + "Test bit at index n" + [x n] + (cljs.core/bit-test x n)) + +(defn bit-shift-left + "Bitwise shift left" + [x n] (cljs.core/bit-shift-left x n)) + +(defn bit-shift-right + "Bitwise shift right" + [x n] (cljs.core/bit-shift-right x n)) + +(defn bit-shift-right-zero-fill + "DEPRECATED: Bitwise shift right with zero fill" + [x n] (cljs.core/bit-shift-right-zero-fill x n)) + +(defn unsigned-bit-shift-right + "Bitwise shift right with zero fill" + [x n] (cljs.core/unsigned-bit-shift-right x n)) + +(defn bit-count + "Counts the number of bits set in n" + [v] + (let [v (- v (bit-and (bit-shift-right v 1) 0x55555555)) + v (+ (bit-and v 0x33333333) (bit-and (bit-shift-right v 2) 0x33333333))] + (bit-shift-right (* (bit-and (+ v (bit-shift-right v 4)) 0xF0F0F0F) 0x1010101) 24))) + +(defn ^boolean == + "Returns non-nil if nums all have the equivalent + value, otherwise false. Behavior on non nums is + undefined." + ([x] true) + ([x y] (-equiv x y)) + ([x y & more] + (if (== x y) + (if (next more) + (recur y (first more) (next more)) + (== y (first more))) + false))) + +(defn ^boolean pos? + "Returns true if num is greater than zero, else false" + [x] (cljs.core/pos? x)) + +(defn ^boolean zero? + "Returns true if num is zero, else false" + [x] + (cljs.core/zero? x)) + +(defn ^boolean neg? + "Returns true if num is less than zero, else false" + [x] (cljs.core/neg? x)) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; protocols for host types ;;;;;; + +(defn nthnext + "Returns the nth next of coll, (seq coll) when n is 0." + [coll n] + (loop [n n xs (seq coll)] + (if (and xs (pos? n)) + (recur (dec n) (next xs)) + xs))) + +;;;;;;;;;;;;;;;;;;;;;;;;;; basics ;;;;;;;;;;;;;;;;;; + +(defn str + "With no args, returns the empty string. With one arg x, returns + x.toString(). (str nil) returns the empty string. With more than + one arg, returns the concatenation of the str values of the args." + ([] "") + ([x] (if (nil? x) + "" + (.join #js [x] ""))) + ([x & ys] + (loop [sb (StringBuffer. (str x)) more ys] + (if more + (recur (. sb (append (str (first more)))) (next more)) + (.toString sb))))) + +(defn subs + "Returns the substring of s beginning at start inclusive, and ending + at end (defaults to length of string), exclusive." + ([s start] (.substring s start)) + ([s start end] (.substring s start end))) + +(declare map name) + +(defn- equiv-sequential + "Assumes x is sequential. Returns true if x equals y, otherwise + returns false." + [x y] + (boolean + (when (sequential? y) + (if (and (counted? x) (counted? y) + (not (== (count x) (count y)))) + false + (loop [xs (seq x) ys (seq y)] + (cond (nil? xs) (nil? ys) + (nil? ys) false + (= (first xs) (first ys)) (recur (next xs) (next ys)) + :else false)))))) + +(defn- hash-coll [coll] + (if (seq coll) + (loop [res (hash (first coll)) s (next coll)] + (if (nil? s) + res + (recur (hash-combine res (hash (first s))) (next s)))) + 0)) + +(declare key val) + +(defn- hash-imap [m] + ;; a la clojure.lang.APersistentMap + (loop [h 0 s (seq m)] + (if s + (let [e (first s)] + (recur (js-mod (+ h (bit-xor (hash (key e)) (hash (val e)))) + 4503599627370496) + (next s))) + h))) + +(defn- hash-iset [s] + ;; a la clojure.lang.APersistentSet + (loop [h 0 s (seq s)] + (if s + (let [e (first s)] + (recur (js-mod (+ h (hash e)) 4503599627370496) + (next s))) + h))) + +(declare name chunk-first chunk-rest) + +(defn- extend-object! + "Takes a JavaScript object and a map of names to functions and + attaches said functions as methods on the object. Any references to + JavaScript's implicit this (via the this-as macro) will resolve to the + object that the function is attached." + [obj fn-map] + (doseq [[key-name f] fn-map] + (let [str-name (name key-name)] + (aset obj str-name f))) + obj) + +;;;;;;;;;;;;;;;; cons ;;;;;;;;;;;;;;;; +(deftype List [meta first rest count ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x count)) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IList + + ICloneable + (-clone [_] (List. meta first rest count __hash)) + + IWithMeta + (-with-meta [coll meta] (List. meta first rest count __hash)) + + IMeta + (-meta [coll] meta) + + ASeq + ISeq + (-first [coll] first) + (-rest [coll] + (if (== count 1) + () + rest)) + + INext + (-next [coll] + (if (== count 1) + nil + rest)) + + IStack + (-peek [coll] first) + (-pop [coll] (-rest coll)) + + ICollection + (-conj [coll o] (List. meta o coll (inc count) nil)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + ISeqable + (-seq [coll] coll) + + ICounted + (-count [coll] count) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(defn ^boolean list? + "Returns true if x implements IList" + [x] + (satisfies? IList x)) + +(es6-iterable List) + +(deftype EmptyList [meta] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IList + + ICloneable + (-clone [_] (EmptyList. meta)) + + IWithMeta + (-with-meta [coll meta] (EmptyList. meta)) + + IMeta + (-meta [coll] meta) + + ISeq + (-first [coll] nil) + (-rest [coll] ()) + + INext + (-next [coll] nil) + + IStack + (-peek [coll] nil) + (-pop [coll] (throw (js/Error. "Can't pop empty list"))) + + ICollection + (-conj [coll o] (List. meta o nil 1 nil)) + + IEmptyableCollection + (-empty [coll] coll) + + ISequential + IEquiv + (-equiv [coll other] + (if (or (list? other) + (sequential? other)) + (nil? (seq other)) + false)) + + IHash + (-hash [coll] empty-ordered-hash) + + ISeqable + (-seq [coll] nil) + + ICounted + (-count [coll] 0) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(set! (.-EMPTY List) (EmptyList. nil)) + +(es6-iterable EmptyList) + +(defn ^boolean reversible? + "Returns true if coll satisfies? IReversible." + [coll] + (satisfies? IReversible coll)) + +(defn ^seq rseq + "Returns, in constant time, a seq of the items in rev (which + can be a vector or sorted-map), in reverse order. If rev is empty returns nil" + [rev] + (-rseq rev)) + +(defn reverse + "Returns a seq of the items in coll in reverse order. Not lazy." + [coll] + (if (reversible? coll) + (rseq coll) + (reduce conj () coll))) + +(defn list + "Creates a new list containing the items." + [& xs] + (let [arr (if (and (instance? IndexedSeq xs) (zero? (.-i xs))) + (.-arr xs) + (let [arr (array)] + (loop [^not-native xs xs] + (if-not (nil? xs) + (do + (.push arr (-first xs)) + (recur (-next xs))) + arr))))] + (loop [i (alength arr) ^not-native r ()] + (if (> i 0) + (recur (dec i) (-conj r (aget arr (dec i)))) + r)))) + +(deftype Cons [meta first rest ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IList + + ICloneable + (-clone [_] (Cons. meta first rest __hash)) + + IWithMeta + (-with-meta [coll meta] (Cons. meta first rest __hash)) + + IMeta + (-meta [coll] meta) + + ASeq + ISeq + (-first [coll] first) + (-rest [coll] (if (nil? rest) () rest)) + + INext + (-next [coll] + (if (nil? rest) nil (seq rest))) + + ICollection + (-conj [coll o] (Cons. nil o coll nil)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + ISeqable + (-seq [coll] coll) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable Cons) + +(defn cons + "Returns a new seq where x is the first element and coll is the rest." + [x coll] + (if (or (nil? coll) + (implements? ISeq coll)) + (Cons. nil x coll nil) + (Cons. nil x (seq coll) nil))) + +(defn hash-keyword [k] + (int (+ (hash-symbol k) 0x9e3779b9))) + +(defn- compare-keywords [a b] + (cond + (identical? (.-fqn a) (.-fqn b)) 0 + (and (not (.-ns a)) (.-ns b)) -1 + (.-ns a) (if-not (.-ns b) + 1 + (let [nsc (garray/defaultCompare (.-ns a) (.-ns b))] + (if (== 0 nsc) + (garray/defaultCompare (.-name a) (.-name b)) + nsc))) + :default (garray/defaultCompare (.-name a) (.-name b)))) + +(deftype Keyword [ns name fqn ^:mutable _hash] + Object + (toString [_] (str ":" fqn)) + (equiv [this other] + (-equiv this other)) + + IEquiv + (-equiv [_ other] + (if (instance? Keyword other) + (identical? fqn (.-fqn other)) + false)) + IFn + (-invoke [kw coll] + (get coll kw)) + (-invoke [kw coll not-found] + (get coll kw not-found)) + + IHash + (-hash [this] + (caching-hash this hash-keyword _hash)) + + INamed + (-name [_] name) + (-namespace [_] ns) + + IPrintWithWriter + (-pr-writer [o writer _] (-write writer (str ":" fqn)))) + +(defn ^boolean keyword? + "Return true if x is a Keyword" + [x] + (instance? Keyword x)) + +(defn ^boolean keyword-identical? + "Efficient test to determine that two keywords are identical." + [x y] + (if (identical? x y) + true + (if (and (keyword? x) (keyword? y)) + (identical? (.-fqn x) (.-fqn y)) + false))) + +(defn ^boolean symbol-identical? + "Efficient test to determine that two symbols are identical." + [x y] + (if (identical? x y) + true + (if (and (symbol? x) (symbol? y)) + (identical? (.-str x) (.-str y)) + false))) + +(defn namespace + "Returns the namespace String of a symbol or keyword, or nil if not present." + [x] + (if (implements? INamed x) + (-namespace ^not-native x) + (throw (js/Error. (str "Doesn't support namespace: " x))))) + +(defn ^boolean ident? + "Return true if x is a symbol or keyword" + [x] (or (keyword? x) (symbol? x))) + +(defn ^boolean simple-ident? + "Return true if x is a symbol or keyword without a namespace" + [x] (and (ident? x) (nil? (namespace x)))) + +(defn ^boolean qualified-ident? + "Return true if x is a symbol or keyword with a namespace" + [x] (and (ident? x) (namespace x) true)) + +(defn ^boolean simple-symbol? + "Return true if x is a symbol without a namespace" + [x] (and (symbol? x) (nil? (namespace x)))) + +(defn ^boolean qualified-symbol? + "Return true if x is a symbol with a namespace" + [x] (and (symbol? x) (namespace x) true)) + +(defn ^boolean simple-keyword? + "Return true if x is a keyword without a namespace" + [x] (and (keyword? x) (nil? (namespace x)))) + +(defn ^boolean qualified-keyword? + "Return true if x is a keyword with a namespace" + [x] (and (keyword? x) (namespace x) true)) + +(defn keyword + "Returns a Keyword with the given namespace and name. Do not use : + in the keyword strings, it will be added automatically." + ([name] (cond + (keyword? name) name + (symbol? name) (Keyword. + (cljs.core/namespace name) + (cljs.core/name name) (.-str name) nil) + (string? name) (let [parts (.split name "/")] + (if (== (alength parts) 2) + (Keyword. (aget parts 0) (aget parts 1) name nil) + (Keyword. nil (aget parts 0) name nil))))) + ([ns name] + (let [ns (cond + (keyword? ns) (cljs.core/name ns) + (symbol? ns) (cljs.core/name ns) + :else ns) + name (cond + (keyword? name) (cljs.core/name name) + (symbol? name) (cljs.core/name name) + :else name)] + (Keyword. ns name (str (when ns (str ns "/")) name) nil)))) + + +(deftype LazySeq [meta ^:mutable fn ^:mutable s ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (sval [coll] + (if (nil? fn) + s + (do + (set! s (fn)) + (set! fn nil) + s))) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IPending + (-realized? [coll] + (not fn)) + + IWithMeta + (-with-meta [coll meta] (LazySeq. meta fn s __hash)) + + IMeta + (-meta [coll] meta) + + ISeq + (-first [coll] + (-seq coll) + (when-not (nil? s) + (first s))) + (-rest [coll] + (-seq coll) + (if-not (nil? s) + (rest s) + ())) + + INext + (-next [coll] + (-seq coll) + (when-not (nil? s) + (next s))) + + ICollection + (-conj [coll o] (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + ISeqable + (-seq [coll] + (.sval coll) + (when-not (nil? s) + (loop [ls s] + (if (instance? LazySeq ls) + (recur (.sval ls)) + (do (set! s ls) + (seq s)))))) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable LazySeq) + +(declare ArrayChunk) + +(deftype ChunkBuffer [^:mutable buf ^:mutable end] + Object + (add [_ o] + (aset buf end o) + (set! end (inc end))) + + (chunk [_] + (let [ret (ArrayChunk. buf 0 end)] + (set! buf nil) + ret)) + + ICounted + (-count [_] end)) + +(defn chunk-buffer [capacity] + (ChunkBuffer. (make-array capacity) 0)) + +(deftype ArrayChunk [arr off end] + ICounted + (-count [_] (- end off)) + + IIndexed + (-nth [coll i] + (aget arr (+ off i))) + (-nth [coll i not-found] + (if (and (>= i 0) (< i (- end off))) + (aget arr (+ off i)) + not-found)) + + IChunk + (-drop-first [coll] + (if (== off end) + (throw (js/Error. "-drop-first of empty chunk")) + (ArrayChunk. arr (inc off) end))) + + IReduce + (-reduce [coll f] + (array-reduce arr f (aget arr off) (inc off))) + (-reduce [coll f start] + (array-reduce arr f start off))) + +(defn array-chunk + ([arr] + (ArrayChunk. arr 0 (alength arr))) + ([arr off] + (ArrayChunk. arr off (alength arr))) + ([arr off end] + (ArrayChunk. arr off end))) + +(deftype ChunkedCons [chunk more meta ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IWithMeta + (-with-meta [coll m] + (ChunkedCons. chunk more m __hash)) + + IMeta + (-meta [coll] meta) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + ISeqable + (-seq [coll] coll) + + ASeq + ISeq + (-first [coll] (-nth chunk 0)) + (-rest [coll] + (if (> (-count chunk) 1) + (ChunkedCons. (-drop-first chunk) more meta nil) + (if (nil? more) + () + more))) + + INext + (-next [coll] + (if (> (-count chunk) 1) + (ChunkedCons. (-drop-first chunk) more meta nil) + (let [more (-seq more)] + (when-not (nil? more) + more)))) + + IChunkedSeq + (-chunked-first [coll] chunk) + (-chunked-rest [coll] + (if (nil? more) + () + more)) + + IChunkedNext + (-chunked-next [coll] + (if (nil? more) + nil + more)) + + ICollection + (-conj [this o] + (cons o this)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash))) + +(es6-iterable ChunkedCons) + +(defn chunk-cons [chunk rest] + (if (zero? (-count chunk)) + rest + (ChunkedCons. chunk rest nil nil))) + +(defn chunk-append [b x] + (.add b x)) + +(defn chunk [b] + (.chunk b)) + +(defn chunk-first [s] + (-chunked-first s)) + +(defn chunk-rest [s] + (-chunked-rest s)) + +(defn chunk-next [s] + (if (implements? IChunkedNext s) + (-chunked-next s) + (seq (-chunked-rest s)))) + +;;;;;;;;;;;;;;;; + +(defn to-array + "Naive impl of to-array as a start." + [s] + (let [ary (array)] + (loop [s s] + (if (seq s) + (do (. ary push (first s)) + (recur (next s))) + ary)))) + +(defn to-array-2d + "Returns a (potentially-ragged) 2-dimensional array + containing the contents of coll." + [coll] + (let [ret (make-array (count coll))] + (loop [i 0 xs (seq coll)] + (when xs + (aset ret i (to-array (first xs))) + (recur (inc i) (next xs)))) + ret)) + +(defn int-array + "Creates an array of ints. Does not coerce array, provided for compatibility + with Clojure." + ([size-or-seq] + (if (number? size-or-seq) + (int-array size-or-seq nil) + (into-array size-or-seq))) + ([size init-val-or-seq] + (let [a (make-array size)] + (if (seq? init-val-or-seq) + (let [s (seq init-val-or-seq)] + (loop [i 0 s s] + (if (and s (< i size)) + (do + (aset a i (first s)) + (recur (inc i) (next s))) + a))) + (do + (dotimes [i size] + (aset a i init-val-or-seq)) + a))))) + +(defn long-array + "Creates an array of longs. Does not coerce array, provided for compatibility + with Clojure." + ([size-or-seq] + (if (number? size-or-seq) + (long-array size-or-seq nil) + (into-array size-or-seq))) + ([size init-val-or-seq] + (let [a (make-array size)] + (if (seq? init-val-or-seq) + (let [s (seq init-val-or-seq)] + (loop [i 0 s s] + (if (and s (< i size)) + (do + (aset a i (first s)) + (recur (inc i) (next s))) + a))) + (do + (dotimes [i size] + (aset a i init-val-or-seq)) + a))))) + +(defn double-array + "Creates an array of doubles. Does not coerce array, provided for compatibility + with Clojure." + ([size-or-seq] + (if (number? size-or-seq) + (double-array size-or-seq nil) + (into-array size-or-seq))) + ([size init-val-or-seq] + (let [a (make-array size)] + (if (seq? init-val-or-seq) + (let [s (seq init-val-or-seq)] + (loop [i 0 s s] + (if (and s (< i size)) + (do + (aset a i (first s)) + (recur (inc i) (next s))) + a))) + (do + (dotimes [i size] + (aset a i init-val-or-seq)) + a))))) + +(defn object-array + "Creates an array of objects. Does not coerce array, provided for compatibility + with Clojure." + ([size-or-seq] + (if (number? size-or-seq) + (object-array size-or-seq nil) + (into-array size-or-seq))) + ([size init-val-or-seq] + (let [a (make-array size)] + (if (seq? init-val-or-seq) + (let [s (seq init-val-or-seq)] + (loop [i 0 s s] + (if (and s (< i size)) + (do + (aset a i (first s)) + (recur (inc i) (next s))) + a))) + (do + (dotimes [i size] + (aset a i init-val-or-seq)) + a))))) + +(defn bounded-count + "If coll is counted? returns its count, else will count at most the first n + elements of coll using its seq" + {:added "1.9"} + [n coll] + (if (counted? coll) + (count coll) + (loop [i 0 s (seq coll)] + (if (and (not (nil? s)) (< i n)) + (recur (inc i) (next s)) + i)))) + +(defn spread + [arglist] + (cond + (nil? arglist) nil + (nil? (next arglist)) (seq (first arglist)) + :else (cons (first arglist) + (spread (next arglist))))) + +(defn concat + "Returns a lazy seq representing the concatenation of the elements in the supplied colls." + ([] (lazy-seq nil)) + ([x] (lazy-seq x)) + ([x y] + (lazy-seq + (let [s (seq x)] + (if s + (if (chunked-seq? s) + (chunk-cons (chunk-first s) (concat (chunk-rest s) y)) + (cons (first s) (concat (rest s) y))) + y)))) + ([x y & zs] + (let [cat (fn cat [xys zs] + (lazy-seq + (let [xys (seq xys)] + (if xys + (if (chunked-seq? xys) + (chunk-cons (chunk-first xys) + (cat (chunk-rest xys) zs)) + (cons (first xys) (cat (rest xys) zs))) + (when zs + (cat (first zs) (next zs)))))))] + (cat (concat x y) zs)))) + +(defn list* + "Creates a new list containing the items prepended to the rest, the + last of which will be treated as a sequence." + ([args] (seq args)) + ([a args] (cons a args)) + ([a b args] (cons a (cons b args))) + ([a b c args] (cons a (cons b (cons c args)))) + ([a b c d & more] + (cons a (cons b (cons c (cons d (spread more))))))) + + +;;; Transients + +(defn transient + "Returns a new, transient version of the collection, in constant time." + [coll] + (-as-transient coll)) + +(defn persistent! + "Returns a new, persistent version of the transient collection, in + constant time. The transient collection cannot be used after this + call, any such use will throw an exception." + [tcoll] + (-persistent! tcoll)) + +(defn conj! + "Adds val to the transient collection, and return tcoll. The 'addition' + may happen at different 'places' depending on the concrete type." + ([] (transient [])) + ([tcoll] tcoll) + ([tcoll val] + (-conj! tcoll val)) + ([tcoll val & vals] + (let [ntcoll (-conj! tcoll val)] + (if vals + (recur ntcoll (first vals) (next vals)) + ntcoll)))) + +(defn assoc! + "When applied to a transient map, adds mapping of key(s) to + val(s). When applied to a transient vector, sets the val at index. + Note - index must be <= (count vector). Returns coll." + ([tcoll key val] + (-assoc! tcoll key val)) + ([tcoll key val & kvs] + (let [ntcoll (-assoc! tcoll key val)] + (if kvs + (recur ntcoll (first kvs) (second kvs) (nnext kvs)) + ntcoll)))) + +(defn dissoc! + "Returns a transient map that doesn't contain a mapping for key(s)." + ([tcoll key] + (-dissoc! tcoll key)) + ([tcoll key & ks] + (let [ntcoll (-dissoc! tcoll key)] + (if ks + (recur ntcoll (first ks) (next ks)) + ntcoll)))) + +(defn pop! + "Removes the last item from a transient vector. If + the collection is empty, throws an exception. Returns tcoll" + [tcoll] + (-pop! tcoll)) + +(defn disj! + "disj[oin]. Returns a transient set of the same (hashed/sorted) type, that + does not contain key(s)." + ([tcoll val] + (-disjoin! tcoll val)) + ([tcoll val & vals] + (let [ntcoll (-disjoin! tcoll val)] + (if vals + (recur ntcoll (first vals) (next vals)) + ntcoll)))) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; apply ;;;;;;;;;;;;;;;; + +;; see core.clj +(gen-apply-to) + +(set! *unchecked-if* true) +(defn apply + "Applies fn f to the argument list formed by prepending intervening arguments to args." + ([f args] + (let [fixed-arity (.-cljs$lang$maxFixedArity f)] + (if (.-cljs$lang$applyTo f) + (let [bc (bounded-count (inc fixed-arity) args)] + (if (<= bc fixed-arity) + (apply-to f bc args) + (.cljs$lang$applyTo f args))) + (.apply f f (to-array args))))) + ([f x args] + (let [arglist (list* x args) + fixed-arity (.-cljs$lang$maxFixedArity f)] + (if (.-cljs$lang$applyTo f) + (let [bc (bounded-count (inc fixed-arity) arglist)] + (if (<= bc fixed-arity) + (apply-to f bc arglist) + (.cljs$lang$applyTo f arglist))) + (.apply f f (to-array arglist))))) + ([f x y args] + (let [arglist (list* x y args) + fixed-arity (.-cljs$lang$maxFixedArity f)] + (if (.-cljs$lang$applyTo f) + (let [bc (bounded-count (inc fixed-arity) arglist)] + (if (<= bc fixed-arity) + (apply-to f bc arglist) + (.cljs$lang$applyTo f arglist))) + (.apply f f (to-array arglist))))) + ([f x y z args] + (let [arglist (list* x y z args) + fixed-arity (.-cljs$lang$maxFixedArity f)] + (if (.-cljs$lang$applyTo f) + (let [bc (bounded-count (inc fixed-arity) arglist)] + (if (<= bc fixed-arity) + (apply-to f bc arglist) + (.cljs$lang$applyTo f arglist))) + (.apply f f (to-array arglist))))) + ([f a b c d & args] + (let [arglist (cons a (cons b (cons c (cons d (spread args))))) + fixed-arity (.-cljs$lang$maxFixedArity f)] + (if (.-cljs$lang$applyTo f) + (let [bc (bounded-count (inc fixed-arity) arglist)] + (if (<= bc fixed-arity) + (apply-to f bc arglist) + (.cljs$lang$applyTo f arglist))) + (.apply f f (to-array arglist)))))) +(set! *unchecked-if* false) + +(defn vary-meta + "Returns an object of the same type and value as obj, with + (apply f (meta obj) args) as its metadata." + ([obj f] + (with-meta obj (f (meta obj)))) + ([obj f a] + (with-meta obj (f (meta obj) a))) + ([obj f a b] + (with-meta obj (f (meta obj) a b))) + ([obj f a b c] + (with-meta obj (f (meta obj) a b c))) + ([obj f a b c d] + (with-meta obj (f (meta obj) a b c d))) + ([obj f a b c d & args] + (with-meta obj (apply f (meta obj) a b c d args)))) + +(defn ^boolean not= + "Same as (not (= obj1 obj2))" + ([x] false) + ([x y] (not (= x y))) + ([x y & more] + (not (apply = x y more)))) + +(defn not-empty + "If coll is empty, returns nil, else coll" + [coll] (when (seq coll) coll)) + +(defn nil-iter [] + (reify + Object + (hasNext [_] false) + (next [_] (js/Error. "No such element")) + (remove [_] (js/Error. "Unsupported operation")))) + +(deftype StringIter [s ^:mutable i] + Object + (hasNext [_] (< i (alength s))) + (next [_] + (let [ret (.charAt s i)] + (set! i (inc i)) + ret)) + (remove [_] (js/Error. "Unsupported operation"))) + +(defn string-iter [x] + (StringIter. x 0)) + +(deftype ArrayIter [arr ^:mutable i] + Object + (hasNext [_] (< i (alength arr))) + (next [_] + (let [ret (aget arr i)] + (set! i (inc i)) + ret)) + (remove [_] (js/Error. "Unsupported operation"))) + +(defn array-iter [x] + (ArrayIter. x 0)) + +(def INIT #js {}) +(def START #js {}) + +(deftype SeqIter [^:mutable _seq ^:mutable _next] + Object + (hasNext [_] + (if (identical? _seq INIT) + (do + (set! _seq START) + (set! _next (seq _next))) + (if (identical? _seq _next) + (set! _next (next _seq)))) + (not (nil? _next))) + (next [this] + (if-not ^boolean (.hasNext this) + (throw (js/Error. "No such element")) + (do + (set! _seq _next) + (first _next)))) + (remove [_] (js/Error. "Unsupported operation"))) + +(defn seq-iter [coll] + (SeqIter. INIT coll)) + +(defn iter [coll] + (cond + (nil? coll) (nil-iter) + (string? coll) (string-iter coll) + (array? coll) (array-iter coll) + (iterable? coll) (-iterator coll) + (seqable? coll) (seq-iter coll) + :else (throw (js/Error. (str "Cannot create iterator from " coll))))) + +(deftype Many [vals] + Object + (add [this o] + (.push vals o) + this) + (remove [this] + (.shift vals)) + (isEmpty [this] + (zero? (.-length vals))) + (toString [this] + (str "Many: " vals))) + +(def ^:private NONE #js {}) + +(deftype Single [^:mutable val] + Object + (add [this o] + (if (identical? val NONE) + (do + (set! val o) + this) + (Many. #js [val o]))) + (remove [this] + (if (identical? val NONE) + (throw (js/Error. (str "Removing object from empty buffer"))) + (let [ret val] + (set! val NONE) + ret))) + (isEmpty [this] + (identical? val NONE)) + (toString [this] + (str "Single: " val))) + +(deftype Empty [] + Object + (add [this o] + (Single. o)) + (remove [this] + (throw (js/Error. (str "Removing object from empty buffer")))) + (isEmpty [this] + true) + (toString [this] + "Empty")) + +(def ^:private EMPTY (Empty.)) + +(deftype MultiIterator [iters] + Object + (hasNext [_] + (loop [iters (seq iters)] + (if-not (nil? iters) + (let [iter (first iters)] + (if-not ^boolean (.hasNext iter) + false + (recur (next iters)))) + true))) + (next [_] + (let [nexts (array)] + (dotimes [i (alength iters)] + (aset nexts i (.next (aget iters i)))) + (prim-seq nexts 0)))) + +(defn- chunkIteratorSeq [iter] + (lazy-seq + (when ^boolean (.hasNext iter) + (let [arr (array)] + (loop [n 0] + (if (and (.hasNext iter) (< n 32)) + (do + (aset arr n (.next iter)) + (recur (inc n))) + (chunk-cons (array-chunk arr 0 n) (chunkIteratorSeq iter)))))))) + +(deftype TransformerIterator [^:mutable buffer ^:mutable _next ^:mutable completed ^:mutable xf sourceIter multi] + Object + (step [this] + (if-not (identical? _next NONE) + true + (loop [] + (if (identical? _next NONE) + (if ^boolean (.isEmpty buffer) + (if ^boolean completed + false + (if ^boolean (.hasNext sourceIter) + (let [iter (if ^boolean multi + (apply xf (cons nil (.next sourceIter))) + (xf nil (.next sourceIter)))] + (when (reduced? iter) + (xf nil) + (set! completed true)) + (recur)) + (do + (xf nil) + (set! completed true) + (recur)))) + (do + (set! _next (.remove buffer)) + (recur))) + true)))) + (hasNext [this] + (.step this)) + (next [this] + (if ^boolean (.hasNext this) + (let [ret _next] + (set! _next NONE) + ret) + (throw (js/Error. "No such element")))) + (remove [_] + (js/Error. "Unsupported operation"))) + +(es6-iterable TransformerIterator) + +(defn transformer-iterator + [xform sourceIter multi] + (let [iterator (TransformerIterator. EMPTY NONE false nil sourceIter multi)] + (set! (.-xf iterator) + (xform (fn + ([] nil) + ([acc] acc) + ([acc o] + (set! (.-buffer iterator) (.add (.-buffer iterator) o)) + acc)))) + iterator)) + +(set! (.-create TransformerIterator) + (fn [xform coll] + (transformer-iterator xform (iter coll) false))) + +(set! (.-createMulti TransformerIterator) + (fn [xform colls] + (let [iters (array)] + (doseq [coll colls] + (.push iters (iter coll))) + (transformer-iterator xform (MultiIterator. iters) true)))) + +(defn sequence + "Coerces coll to a (possibly empty) sequence, if it is not already + one. Will not force a lazy seq. (sequence nil) yields (), When a + transducer is supplied, returns a lazy sequence of applications of + the transform to the items in coll(s), i.e. to the set of first + items of each coll, followed by the set of second + items in each coll, until any one of the colls is exhausted. Any + remaining items in other colls are ignored. The transform should accept + number-of-colls arguments" + ([coll] + (if (seq? coll) + coll + (or (seq coll) ()))) + ([xform coll] + (or (chunkIteratorSeq + (.create TransformerIterator xform coll)) + ())) + ([xform coll & colls] + (or (chunkIteratorSeq + (.createMulti TransformerIterator xform (to-array (cons coll colls)))) + ()))) + +(defn ^boolean every? + "Returns true if (pred x) is logical true for every x in coll, else + false." + [pred coll] + (cond + (nil? (seq coll)) true + (pred (first coll)) (recur pred (next coll)) + :else false)) + +(defn ^boolean not-every? + "Returns false if (pred x) is logical true for every x in + coll, else true." + [pred coll] (not (every? pred coll))) + +(defn some + "Returns the first logical true value of (pred x) for any x in coll, + else nil. One common idiom is to use a set as pred, for example + this will return :fred if :fred is in the sequence, otherwise nil: + (some #{:fred} coll)" + [pred coll] + (when (seq coll) + (or (pred (first coll)) (recur pred (next coll))))) + +(defn ^boolean not-any? + "Returns false if (pred x) is logical true for any x in coll, + else true." + [pred coll] (not (some pred coll))) + +(defn ^boolean even? + "Returns true if n is even, throws an exception if n is not an integer" + [n] (if (integer? n) + (zero? (bit-and n 1)) + (throw (js/Error. (str "Argument must be an integer: " n))))) + +(defn ^boolean odd? + "Returns true if n is odd, throws an exception if n is not an integer" + [n] (not (even? n))) + +(defn ^boolean complement + "Takes a fn f and returns a fn that takes the same arguments as f, + has the same effects, if any, and returns the opposite truth value." + [f] + (fn + ([] (not (f))) + ([x] (not (f x))) + ([x y] (not (f x y))) + ([x y & zs] (not (apply f x y zs))))) + +(defn constantly + "Returns a function that takes any number of arguments and returns x." + [x] (fn [& args] x)) + +(defn comp + "Takes a set of functions and returns a fn that is the composition + of those fns. The returned fn takes a variable number of args, + applies the rightmost of fns to the args, the next + fn (right-to-left) to the result, etc." + ([] identity) + ([f] f) + ([f g] + (fn + ([] (f (g))) + ([x] (f (g x))) + ([x y] (f (g x y))) + ([x y z] (f (g x y z))) + ([x y z & args] (f (apply g x y z args))))) + ([f g h] + (fn + ([] (f (g (h)))) + ([x] (f (g (h x)))) + ([x y] (f (g (h x y)))) + ([x y z] (f (g (h x y z)))) + ([x y z & args] (f (g (apply h x y z args)))))) + ([f1 f2 f3 & fs] + (let [fs (reverse (list* f1 f2 f3 fs))] + (fn [& args] + (loop [ret (apply (first fs) args) fs (next fs)] + (if fs + (recur ((first fs) ret) (next fs)) + ret)))))) + +(defn partial + "Takes a function f and fewer than the normal arguments to f, and + returns a fn that takes a variable number of additional args. When + called, the returned function calls f with args + additional args." + ([f] f) + ([f arg1] + (fn + ([] (f arg1)) + ([x] (f arg1 x)) + ([x y] (f arg1 x y)) + ([x y z] (f arg1 x y z)) + ([x y z & args] (apply f arg1 x y z args)))) + ([f arg1 arg2] + (fn + ([] (f arg1 arg2)) + ([x] (f arg1 arg2 x)) + ([x y] (f arg1 arg2 x y)) + ([x y z] (f arg1 arg2 x y z)) + ([x y z & args] (apply f arg1 arg2 x y z args)))) + ([f arg1 arg2 arg3] + (fn + ([] (f arg1 arg2 arg3)) + ([x] (f arg1 arg2 arg3 x)) + ([x y] (f arg1 arg2 arg3 x y)) + ([x y z] (f arg1 arg2 arg3 x y z)) + ([x y z & args] (apply f arg1 arg2 arg3 x y z args)))) + ([f arg1 arg2 arg3 & more] + (fn [& args] (apply f arg1 arg2 arg3 (concat more args))))) + +(defn fnil + "Takes a function f, and returns a function that calls f, replacing + a nil first argument to f with the supplied value x. Higher arity + versions can replace arguments in the second and third + positions (y, z). Note that the function f can take any number of + arguments, not just the one(s) being nil-patched." + ([f x] + (fn + ([a] (f (if (nil? a) x a))) + ([a b] (f (if (nil? a) x a) b)) + ([a b c] (f (if (nil? a) x a) b c)) + ([a b c & ds] (apply f (if (nil? a) x a) b c ds)))) + ([f x y] + (fn + ([a b] (f (if (nil? a) x a) (if (nil? b) y b))) + ([a b c] (f (if (nil? a) x a) (if (nil? b) y b) c)) + ([a b c & ds] (apply f (if (nil? a) x a) (if (nil? b) y b) c ds)))) + ([f x y z] + (fn + ([a b] (f (if (nil? a) x a) (if (nil? b) y b))) + ([a b c] (f (if (nil? a) x a) (if (nil? b) y b) (if (nil? c) z c))) + ([a b c & ds] (apply f (if (nil? a) x a) (if (nil? b) y b) (if (nil? c) z c) ds))))) + +(declare volatile!) + +(defn map-indexed + "Returns a lazy sequence consisting of the result of applying f to 0 + and the first item of coll, followed by applying f to 1 and the second + item in coll, etc, until coll is exhausted. Thus function f should + accept 2 arguments, index and item. Returns a stateful transducer when + no collection is provided." + ([f] + (fn [rf] + (let [i (volatile! -1)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (rf result (f (vswap! i inc) input))))))) + ([f coll] + (letfn [(mapi [idx coll] + (lazy-seq + (when-let [s (seq coll)] + (if (chunked-seq? s) + (let [c (chunk-first s) + size (count c) + b (chunk-buffer size)] + (dotimes [i size] + (chunk-append b (f (+ idx i) (-nth c i)))) + (chunk-cons (chunk b) (mapi (+ idx size) (chunk-rest s)))) + (cons (f idx (first s)) (mapi (inc idx) (rest s)))))))] + (mapi 0 coll)))) + +(defn keep + "Returns a lazy sequence of the non-nil results of (f item). Note, + this means false return values will be included. f must be free of + side-effects. Returns a transducer when no collection is provided." + ([f] + (fn [rf] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (let [v (f input)] + (if (nil? v) + result + (rf result v))))))) + ([f coll] + (lazy-seq + (when-let [s (seq coll)] + (if (chunked-seq? s) + (let [c (chunk-first s) + size (count c) + b (chunk-buffer size)] + (dotimes [i size] + (let [x (f (-nth c i))] + (when-not (nil? x) + (chunk-append b x)))) + (chunk-cons (chunk b) (keep f (chunk-rest s)))) + (let [x (f (first s))] + (if (nil? x) + (keep f (rest s)) + (cons x (keep f (rest s)))))))))) + +;; ============================================================================= +;; Atom + +(deftype Atom [state meta validator watches] + Object + (equiv [this other] + (-equiv this other)) + + IAtom + + IEquiv + (-equiv [o other] (identical? o other)) + + IDeref + (-deref [_] state) + + IMeta + (-meta [_] meta) + + IWatchable + (-notify-watches [this oldval newval] + (doseq [[key f] watches] + (f key this oldval newval))) + (-add-watch [this key f] + (set! (.-watches this) (assoc watches key f)) + this) + (-remove-watch [this key] + (set! (.-watches this) (dissoc watches key))) + + IHash + (-hash [this] (goog/getUid this))) + +(defn atom + "Creates and returns an Atom with an initial value of x and zero or + more options (in any order): + + :meta metadata-map + + :validator validate-fn + + If metadata-map is supplied, it will be come the metadata on the + atom. validate-fn must be nil or a side-effect-free fn of one + argument, which will be passed the intended new state on any state + change. If the new state is unacceptable, the validate-fn should + return false or throw an Error. If either of these error conditions + occur, then the value of the atom will not change." + ([x] (Atom. x nil nil nil)) + ([x & {:keys [meta validator]}] (Atom. x meta validator nil))) + +(declare pr-str) + +(defn reset! + "Sets the value of atom to newval without regard for the + current value. Returns new-value." + [a new-value] + (if (instance? Atom a) + (let [validate (.-validator a)] + (when-not (nil? validate) + (when-not (validate new-value) + (throw (js/Error. "Validator rejected reference state")))) + (let [old-value (.-state a)] + (set! (.-state a) new-value) + (when-not (nil? (.-watches a)) + (-notify-watches a old-value new-value)) + new-value)) + (-reset! a new-value))) + +(defn swap! + "Atomically swaps the value of atom to be: + (apply f current-value-of-atom args). Note that f may be called + multiple times, and thus should be free of side effects. Returns + the value that was swapped in." + ([a f] + (if (instance? Atom a) + (reset! a (f (.-state a))) + (-swap! a f))) + ([a f x] + (if (instance? Atom a) + (reset! a (f (.-state a) x)) + (-swap! a f x))) + ([a f x y] + (if (instance? Atom a) + (reset! a (f (.-state a) x y)) + (-swap! a f x y))) + ([a f x y & more] + (if (instance? Atom a) + (reset! a (apply f (.-state a) x y more)) + (-swap! a f x y more)))) + +(defn compare-and-set! + "Atomically sets the value of atom to newval if and only if the + current value of the atom is equal to oldval. Returns true if + set happened, else false." + [^not-native a oldval newval] + (if (= (-deref a) oldval) + (do (reset! a newval) true) + false)) + +(defn set-validator! + "Sets the validator-fn for an atom. validator-fn must be nil or a + side-effect-free fn of one argument, which will be passed the intended + new state on any state change. If the new state is unacceptable, the + validator-fn should return false or throw an Error. If the current state + is not acceptable to the new validator, an Error will be thrown and the + validator will not be changed." + [iref val] + (when (and (some? val) + (not (val (-deref iref)))) + (throw (js/Error. "Validator rejected reference state"))) + (set! (.-validator iref) val)) + +(defn get-validator + "Gets the validator-fn for a var/ref/agent/atom." + [iref] + (.-validator iref)) + +(deftype Volatile [^:mutable state] + IVolatile + (-vreset! [_ new-state] + (set! state new-state)) + + IDeref + (-deref [_] state)) + +(defn volatile! + "Creates and returns a Volatile with an initial value of val." + [val] + (Volatile. val)) + +(defn ^boolean volatile? + "Returns true if x is a volatile." + [x] (instance? Volatile x)) + +(defn vreset! + "Sets the value of volatile to newval without regard for the + current value. Returns newval." + [vol newval] (-vreset! vol newval)) + +(defn keep-indexed + "Returns a lazy sequence of the non-nil results of (f index item). Note, + this means false return values will be included. f must be free of + side-effects. Returns a stateful transducer when no collection is + provided." + ([f] + (fn [rf] + (let [ia (volatile! -1)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (let [i (vswap! ia inc) + v (f i input)] + (if (nil? v) + result + (rf result v)))))))) + ([f coll] + (letfn [(keepi [idx coll] + (lazy-seq + (when-let [s (seq coll)] + (if (chunked-seq? s) + (let [c (chunk-first s) + size (count c) + b (chunk-buffer size)] + (dotimes [i size] + (let [x (f (+ idx i) (-nth c i))] + (when-not (nil? x) + (chunk-append b x)))) + (chunk-cons (chunk b) (keepi (+ idx size) (chunk-rest s)))) + (let [x (f idx (first s))] + (if (nil? x) + (keepi (inc idx) (rest s)) + (cons x (keepi (inc idx) (rest s)))))))))] + (keepi 0 coll)))) + +(defn every-pred + "Takes a set of predicates and returns a function f that returns true if all of its + composing predicates return a logical true value against all of its arguments, else it returns + false. Note that f is short-circuiting in that it will stop execution on the first + argument that triggers a logical false result against the original predicates." + ([p] + (fn ep1 + ([] true) + ([x] (boolean (p x))) + ([x y] (boolean (and (p x) (p y)))) + ([x y z] (boolean (and (p x) (p y) (p z)))) + ([x y z & args] (boolean (and (ep1 x y z) + (every? p args)))))) + ([p1 p2] + (fn ep2 + ([] true) + ([x] (boolean (and (p1 x) (p2 x)))) + ([x y] (boolean (and (p1 x) (p1 y) (p2 x) (p2 y)))) + ([x y z] (boolean (and (p1 x) (p1 y) (p1 z) (p2 x) (p2 y) (p2 z)))) + ([x y z & args] (boolean (and (ep2 x y z) + (every? #(and (p1 %) (p2 %)) args)))))) + ([p1 p2 p3] + (fn ep3 + ([] true) + ([x] (boolean (and (p1 x) (p2 x) (p3 x)))) + ([x y] (boolean (and (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y)))) + ([x y z] (boolean (and (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y) (p1 z) (p2 z) (p3 z)))) + ([x y z & args] (boolean (and (ep3 x y z) + (every? #(and (p1 %) (p2 %) (p3 %)) args)))))) + ([p1 p2 p3 & ps] + (let [ps (list* p1 p2 p3 ps)] + (fn epn + ([] true) + ([x] (every? #(% x) ps)) + ([x y] (every? #(and (% x) (% y)) ps)) + ([x y z] (every? #(and (% x) (% y) (% z)) ps)) + ([x y z & args] (boolean (and (epn x y z) + (every? #(every? % args) ps)))))))) + +(defn some-fn + "Takes a set of predicates and returns a function f that returns the first logical true value + returned by one of its composing predicates against any of its arguments, else it returns + logical false. Note that f is short-circuiting in that it will stop execution on the first + argument that triggers a logical true result against the original predicates." + ([p] + (fn sp1 + ([] nil) + ([x] (p x)) + ([x y] (or (p x) (p y))) + ([x y z] (or (p x) (p y) (p z))) + ([x y z & args] (or (sp1 x y z) + (some p args))))) + ([p1 p2] + (fn sp2 + ([] nil) + ([x] (or (p1 x) (p2 x))) + ([x y] (or (p1 x) (p1 y) (p2 x) (p2 y))) + ([x y z] (or (p1 x) (p1 y) (p1 z) (p2 x) (p2 y) (p2 z))) + ([x y z & args] (or (sp2 x y z) + (some #(or (p1 %) (p2 %)) args))))) + ([p1 p2 p3] + (fn sp3 + ([] nil) + ([x] (or (p1 x) (p2 x) (p3 x))) + ([x y] (or (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y))) + ([x y z] (or (p1 x) (p2 x) (p3 x) (p1 y) (p2 y) (p3 y) (p1 z) (p2 z) (p3 z))) + ([x y z & args] (or (sp3 x y z) + (some #(or (p1 %) (p2 %) (p3 %)) args))))) + ([p1 p2 p3 & ps] + (let [ps (list* p1 p2 p3 ps)] + (fn spn + ([] nil) + ([x] (some #(% x) ps)) + ([x y] (some #(or (% x) (% y)) ps)) + ([x y z] (some #(or (% x) (% y) (% z)) ps)) + ([x y z & args] (or (spn x y z) + (some #(some % args) ps))))))) + +(defn map + "Returns a lazy sequence consisting of the result of applying f to + the set of first items of each coll, followed by applying f to the + set of second items in each coll, until any one of the colls is + exhausted. Any remaining items in other colls are ignored. Function + f should accept number-of-colls arguments. Returns a transducer when + no collection is provided." + ([f] + (fn [rf] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (rf result (f input))) + ([result input & inputs] + (rf result (apply f input inputs)))))) + ([f coll] + (lazy-seq + (when-let [s (seq coll)] + (if (chunked-seq? s) + (let [c (chunk-first s) + size (count c) + b (chunk-buffer size)] + (dotimes [i size] + (chunk-append b (f (-nth c i)))) + (chunk-cons (chunk b) (map f (chunk-rest s)))) + (cons (f (first s)) (map f (rest s))))))) + ([f c1 c2] + (lazy-seq + (let [s1 (seq c1) s2 (seq c2)] + (when (and s1 s2) + (cons (f (first s1) (first s2)) + (map f (rest s1) (rest s2))))))) + ([f c1 c2 c3] + (lazy-seq + (let [s1 (seq c1) s2 (seq c2) s3 (seq c3)] + (when (and s1 s2 s3) + (cons (f (first s1) (first s2) (first s3)) + (map f (rest s1) (rest s2) (rest s3))))))) + ([f c1 c2 c3 & colls] + (let [step (fn step [cs] + (lazy-seq + (let [ss (map seq cs)] + (when (every? identity ss) + (cons (map first ss) (step (map rest ss)))))))] + (map #(apply f %) (step (conj colls c3 c2 c1)))))) + +(defn take + "Returns a lazy sequence of the first n items in coll, or all items if + there are fewer than n. Returns a stateful transducer when + no collection is provided." + ([n] + {:pre [(number? n)]} + (fn [rf] + (let [na (volatile! n)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (let [n @na + nn (vswap! na dec) + result (if (pos? n) + (rf result input) + result)] + (if (not (pos? nn)) + (ensure-reduced result) + result))))))) + ([n coll] + {:pre [(number? n)]} + (lazy-seq + (when (pos? n) + (when-let [s (seq coll)] + (cons (first s) (take (dec n) (rest s)))))))) + +(defn drop + "Returns a lazy sequence of all but the first n items in coll. + Returns a stateful transducer when no collection is provided." + ([n] + {:pre [(number? n)]} + (fn [rf] + (let [na (volatile! n)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (let [n @na] + (vswap! na dec) + (if (pos? n) + result + (rf result input)))))))) + ([n coll] + {:pre [(number? n)]} + (let [step (fn [n coll] + (let [s (seq coll)] + (if (and (pos? n) s) + (recur (dec n) (rest s)) + s)))] + (lazy-seq (step n coll))))) + +(defn drop-last + "Return a lazy sequence of all but the last n (default 1) items in coll" + ([s] (drop-last 1 s)) + ([n s] (map (fn [x _] x) s (drop n s)))) + +(defn take-last + "Returns a seq of the last n items in coll. Depending on the type + of coll may be no better than linear time. For vectors, see also subvec." + [n coll] + (loop [s (seq coll), lead (seq (drop n coll))] + (if lead + (recur (next s) (next lead)) + s))) + +(defn drop-while + "Returns a lazy sequence of the items in coll starting from the + first item for which (pred item) returns logical false. Returns a + stateful transducer when no collection is provided." + ([pred] + (fn [rf] + (let [da (volatile! true)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (let [drop? @da] + (if (and drop? (pred input)) + result + (do + (vreset! da nil) + (rf result input))))))))) + ([pred coll] + (let [step (fn [pred coll] + (let [s (seq coll)] + (if (and s (pred (first s))) + (recur pred (rest s)) + s)))] + (lazy-seq (step pred coll))))) + +(defn cycle + "Returns a lazy (infinite!) sequence of repetitions of the items in coll." + [coll] (lazy-seq + (when-let [s (seq coll)] + (concat s (cycle s))))) + +(defn split-at + "Returns a vector of [(take n coll) (drop n coll)]" + [n coll] + [(take n coll) (drop n coll)]) + +(defn repeat + "Returns a lazy (infinite!, or length n if supplied) sequence of xs." + ([x] (lazy-seq (cons x (repeat x)))) + ([n x] (take n (repeat x)))) + +(defn replicate + "DEPRECATED: Use 'repeat' instead. + Returns a lazy seq of n xs." + [n x] (take n (repeat x))) + +(defn repeatedly + "Takes a function of no args, presumably with side effects, and + returns an infinite (or length n if supplied) lazy sequence of calls + to it" + ([f] (lazy-seq (cons (f) (repeatedly f)))) + ([n f] (take n (repeatedly f)))) + +(defn iterate + "Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects" + {:added "1.0"} + [f x] (cons x (lazy-seq (iterate f (f x))))) + +(defn interleave + "Returns a lazy seq of the first item in each coll, then the second etc." + ([] ()) + ([c1] (lazy-seq c1)) + ([c1 c2] + (lazy-seq + (let [s1 (seq c1) s2 (seq c2)] + (when (and s1 s2) + (cons (first s1) (cons (first s2) + (interleave (rest s1) (rest s2)))))))) + ([c1 c2 & colls] + (lazy-seq + (let [ss (map seq (conj colls c2 c1))] + (when (every? identity ss) + (concat (map first ss) (apply interleave (map rest ss)))))))) + +(defn interpose + "Returns a lazy seq of the elements of coll separated by sep. + Returns a stateful transducer when no collection is provided." + ([sep] + (fn [rf] + (let [started (volatile! false)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (if @started + (let [sepr (rf result sep)] + (if (reduced? sepr) + sepr + (rf sepr input))) + (do + (vreset! started true) + (rf result input)))))))) + ([sep coll] (drop 1 (interleave (repeat sep) coll)))) + + + +(defn- flatten1 + "Take a collection of collections, and return a lazy seq + of items from the inner collection" + [colls] + (let [cat (fn cat [coll colls] + (lazy-seq + (if-let [coll (seq coll)] + (cons (first coll) (cat (rest coll) colls)) + (when (seq colls) + (cat (first colls) (rest colls))))))] + (cat nil colls))) + +(declare cat) + +(defn mapcat + "Returns the result of applying concat to the result of applying map + to f and colls. Thus function f should return a collection. Returns + a transducer when no collections are provided" + {:added "1.0" + :static true} + ([f] (comp (map f) cat)) + ([f & colls] + (apply concat (apply map f colls)))) + +(defn filter + "Returns a lazy sequence of the items in coll for which + (pred item) returns true. pred must be free of side-effects. + Returns a transducer when no collection is provided." + ([pred] + (fn [rf] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (if (pred input) + (rf result input) + result))))) + ([pred coll] + (lazy-seq + (when-let [s (seq coll)] + (if (chunked-seq? s) + (let [c (chunk-first s) + size (count c) + b (chunk-buffer size)] + (dotimes [i size] + (when (pred (-nth c i)) + (chunk-append b (-nth c i)))) + (chunk-cons (chunk b) (filter pred (chunk-rest s)))) + (let [f (first s) r (rest s)] + (if (pred f) + (cons f (filter pred r)) + (filter pred r)))))))) + +(defn remove + "Returns a lazy sequence of the items in coll for which + (pred item) returns false. pred must be free of side-effects. + Returns a transducer when no collection is provided." + ([pred] (filter (complement pred))) + ([pred coll] + (filter (complement pred) coll))) + +(defn tree-seq + "Returns a lazy sequence of the nodes in a tree, via a depth-first walk. + branch? must be a fn of one arg that returns true if passed a node + that can have children (but may not). children must be a fn of one + arg that returns a sequence of the children. Will only be called on + nodes for which branch? returns true. Root is the root node of the + tree." + [branch? children root] + (let [walk (fn walk [node] + (lazy-seq + (cons node + (when (branch? node) + (mapcat walk (children node))))))] + (walk root))) + +(defn flatten + "Takes any nested combination of sequential things (lists, vectors, + etc.) and returns their contents as a single, flat sequence. + (flatten nil) returns nil." + [x] + (filter #(not (sequential? %)) + (rest (tree-seq sequential? seq x)))) + +(defn into + "Returns a new coll consisting of to-coll with all of the items of + from-coll conjoined. A transducer may be supplied." + ([] []) + ([to] to) + ([to from] + (if-not (nil? to) + (if (implements? IEditableCollection to) + (-with-meta (persistent! (reduce -conj! (transient to) from)) (meta to)) + (reduce -conj to from)) + (reduce conj () from))) + ([to xform from] + (if (implements? IEditableCollection to) + (-with-meta (persistent! (transduce xform conj! (transient to) from)) (meta to)) + (transduce xform conj to from)))) + +(defn mapv + "Returns a vector consisting of the result of applying f to the + set of first items of each coll, followed by applying f to the set + of second items in each coll, until any one of the colls is + exhausted. Any remaining items in other colls are ignored. Function + f should accept number-of-colls arguments." + ([f coll] + (-> (reduce (fn [v o] (conj! v (f o))) (transient []) coll) + persistent!)) + ([f c1 c2] + (into [] (map f c1 c2))) + ([f c1 c2 c3] + (into [] (map f c1 c2 c3))) + ([f c1 c2 c3 & colls] + (into [] (apply map f c1 c2 c3 colls)))) + +(defn filterv + "Returns a vector of the items in coll for which + (pred item) returns true. pred must be free of side-effects." + [pred coll] + (-> (reduce (fn [v o] (if (pred o) (conj! v o) v)) + (transient []) + coll) + persistent!)) + +(defn partition + "Returns a lazy sequence of lists of n items each, at offsets step + apart. If step is not supplied, defaults to n, i.e. the partitions + do not overlap. If a pad collection is supplied, use its elements as + necessary to complete last partition up to n items. In case there are + not enough padding elements, return a partition with less than n items." + ([n coll] + (partition n n coll)) + ([n step coll] + (lazy-seq + (when-let [s (seq coll)] + (let [p (take n s)] + (when (== n (count p)) + (cons p (partition n step (drop step s)))))))) + ([n step pad coll] + (lazy-seq + (when-let [s (seq coll)] + (let [p (take n s)] + (if (== n (count p)) + (cons p (partition n step pad (drop step s))) + (list (take n (concat p pad))))))))) + +(defn get-in + "Returns the value in a nested associative structure, + where ks is a sequence of keys. Returns nil if the key is not present, + or the not-found value if supplied." + {:added "1.2" + :static true} + ([m ks] + (reduce get m ks)) + ([m ks not-found] + (loop [sentinel lookup-sentinel + m m + ks (seq ks)] + (if-not (nil? ks) + (let [m (get m (first ks) sentinel)] + (if (identical? sentinel m) + not-found + (recur sentinel m (next ks)))) + m)))) + +(defn assoc-in + "Associates a value in a nested associative structure, where ks is a + sequence of keys and v is the new value and returns a new nested structure. + If any levels do not exist, hash-maps will be created." + [m [k & ks] v] + (if ks + (assoc m k (assoc-in (get m k) ks v)) + (assoc m k v))) + +(defn update-in + "'Updates' a value in a nested associative structure, where ks is a + sequence of keys and f is a function that will take the old value + and any supplied args and return the new value, and returns a new + nested structure. If any levels do not exist, hash-maps will be + created." + ([m [k & ks] f] + (if ks + (assoc m k (update-in (get m k) ks f)) + (assoc m k (f (get m k))))) + ([m [k & ks] f a] + (if ks + (assoc m k (update-in (get m k) ks f a)) + (assoc m k (f (get m k) a)))) + ([m [k & ks] f a b] + (if ks + (assoc m k (update-in (get m k) ks f a b)) + (assoc m k (f (get m k) a b)))) + ([m [k & ks] f a b c] + (if ks + (assoc m k (update-in (get m k) ks f a b c)) + (assoc m k (f (get m k) a b c)))) + ([m [k & ks] f a b c & args] + (if ks + (assoc m k (apply update-in (get m k) ks f a b c args)) + (assoc m k (apply f (get m k) a b c args))))) + +(defn update + "'Updates' a value in an associative structure, where k is a + key and f is a function that will take the old value + and any supplied args and return the new value, and returns a new + structure. If the key does not exist, nil is passed as the old value." + ([m k f] + (assoc m k (f (get m k)))) + ([m k f x] + (assoc m k (f (get m k) x))) + ([m k f x y] + (assoc m k (f (get m k) x y))) + ([m k f x y z] + (assoc m k (f (get m k) x y z))) + ([m k f x y z & more] + (assoc m k (apply f (get m k) x y z more)))) + +;;; PersistentVector + +(deftype VectorNode [edit arr]) + +(defn- pv-fresh-node [edit] + (VectorNode. edit (make-array 32))) + +(defn- pv-aget [node idx] + (aget (.-arr node) idx)) + +(defn- pv-aset [node idx val] + (aset (.-arr node) idx val)) + +(defn- pv-clone-node [node] + (VectorNode. (.-edit node) (aclone (.-arr node)))) + +(defn- tail-off [pv] + (let [cnt (.-cnt pv)] + (if (< cnt 32) + 0 + (bit-shift-left (bit-shift-right-zero-fill (dec cnt) 5) 5)))) + +(defn- new-path [edit level node] + (loop [ll level + ret node] + (if (zero? ll) + ret + (let [embed ret + r (pv-fresh-node edit) + _ (pv-aset r 0 embed)] + (recur (- ll 5) r))))) + +(defn- push-tail [pv level parent tailnode] + (let [ret (pv-clone-node parent) + subidx (bit-and (bit-shift-right-zero-fill (dec (.-cnt pv)) level) 0x01f)] + (if (== 5 level) + (do + (pv-aset ret subidx tailnode) + ret) + (let [child (pv-aget parent subidx)] + (if-not (nil? child) + (let [node-to-insert (push-tail pv (- level 5) child tailnode)] + (pv-aset ret subidx node-to-insert) + ret) + (let [node-to-insert (new-path nil (- level 5) tailnode)] + (pv-aset ret subidx node-to-insert) + ret)))))) + +(defn- vector-index-out-of-bounds [i cnt] + (throw (js/Error. (str "No item " i " in vector of length " cnt)))) + +(defn- first-array-for-longvec [pv] + ;; invariants: (count pv) > 32. + (loop [node (.-root pv) + level (.-shift pv)] + (if (pos? level) + (recur (pv-aget node 0) (- level 5)) + (.-arr node)))) + +(defn- unchecked-array-for [pv i] + ;; invariant: i is a valid index of pv (use array-for if unknown). + (if (>= i (tail-off pv)) + (.-tail pv) + (loop [node (.-root pv) + level (.-shift pv)] + (if (pos? level) + (recur (pv-aget node (bit-and (bit-shift-right-zero-fill i level) 0x01f)) + (- level 5)) + (.-arr node))))) + +(defn- array-for [pv i] + (if (and (<= 0 i) (< i (.-cnt pv))) + (unchecked-array-for pv i) + (vector-index-out-of-bounds i (.-cnt pv)))) + +(defn- do-assoc [pv level node i val] + (let [ret (pv-clone-node node)] + (if (zero? level) + (do + (pv-aset ret (bit-and i 0x01f) val) + ret) + (let [subidx (bit-and (bit-shift-right-zero-fill i level) 0x01f)] + (pv-aset ret subidx (do-assoc pv (- level 5) (pv-aget node subidx) i val)) + ret)))) + +(defn- pop-tail [pv level node] + (let [subidx (bit-and (bit-shift-right-zero-fill (- (.-cnt pv) 2) level) 0x01f)] + (cond + (> level 5) (let [new-child (pop-tail pv (- level 5) (pv-aget node subidx))] + (if (and (nil? new-child) (zero? subidx)) + nil + (let [ret (pv-clone-node node)] + (pv-aset ret subidx new-child) + ret))) + (zero? subidx) nil + :else (let [ret (pv-clone-node node)] + (pv-aset ret subidx nil) + ret)))) + +(deftype RangedIterator [^:mutable i ^:mutable base ^:mutable arr v start end] + Object + (hasNext [this] + (< i end)) + (next [this] + (when (== (- i base) 32) + (set! arr (unchecked-array-for v i)) + (set! base (+ base 32))) + (let [ret (aget arr (bit-and i 0x01f))] + (set! i (inc i)) + ret))) + +(defn ranged-iterator [v start end] + (let [i start] + (RangedIterator. i (- i (js-mod i 32)) + (when (< start (count v)) + (unchecked-array-for v i)) + v start end))) + +(declare tv-editable-root tv-editable-tail TransientVector deref + pr-sequential-writer pr-writer chunked-seq) + +(deftype PersistentVector [meta cnt shift root tail ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ICloneable + (-clone [_] (PersistentVector. meta cnt shift root tail __hash)) + + IWithMeta + (-with-meta [coll meta] (PersistentVector. meta cnt shift root tail __hash)) + + IMeta + (-meta [coll] meta) + + IStack + (-peek [coll] + (when (> cnt 0) + (-nth coll (dec cnt)))) + (-pop [coll] + (cond + (zero? cnt) (throw (js/Error. "Can't pop empty vector")) + (== 1 cnt) (-with-meta (.-EMPTY PersistentVector) meta) + (< 1 (- cnt (tail-off coll))) + (PersistentVector. meta (dec cnt) shift root (.slice tail 0 -1) nil) + :else (let [new-tail (unchecked-array-for coll (- cnt 2)) + nr (pop-tail coll shift root) + new-root (if (nil? nr) (.-EMPTY-NODE PersistentVector) nr) + cnt-1 (dec cnt)] + (if (and (< 5 shift) (nil? (pv-aget new-root 1))) + (PersistentVector. meta cnt-1 (- shift 5) (pv-aget new-root 0) new-tail nil) + (PersistentVector. meta cnt-1 shift new-root new-tail nil))))) + + ICollection + (-conj [coll o] + (if (< (- cnt (tail-off coll)) 32) + (let [len (alength tail) + new-tail (make-array (inc len))] + (dotimes [i len] + (aset new-tail i (aget tail i))) + (aset new-tail len o) + (PersistentVector. meta (inc cnt) shift root new-tail nil)) + (let [root-overflow? (> (bit-shift-right-zero-fill cnt 5) (bit-shift-left 1 shift)) + new-shift (if root-overflow? (+ shift 5) shift) + new-root (if root-overflow? + (let [n-r (pv-fresh-node nil)] + (pv-aset n-r 0 root) + (pv-aset n-r 1 (new-path nil shift (VectorNode. nil tail))) + n-r) + (push-tail coll shift root (VectorNode. nil tail)))] + (PersistentVector. meta (inc cnt) new-shift new-root (array o) nil)))) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY PersistentVector) meta)) + + ISequential + IEquiv + (-equiv [coll other] + (if (instance? PersistentVector other) + (if (== cnt (count other)) + (let [me-iter (-iterator coll) + you-iter (-iterator other)] + (loop [] + (if ^boolean (.hasNext me-iter) + (let [x (.next me-iter) + y (.next you-iter)] + (if (= x y) + (recur) + false)) + true))) + false) + (equiv-sequential coll other))) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + ISeqable + (-seq [coll] + (cond + (zero? cnt) nil + (<= cnt 32) (IndexedSeq. tail 0 nil) + :else (chunked-seq coll (first-array-for-longvec coll) 0 0))) + + ICounted + (-count [coll] cnt) + + IIndexed + (-nth [coll n] + (aget (array-for coll n) (bit-and n 0x01f))) + (-nth [coll n not-found] + (if (and (<= 0 n) (< n cnt)) + (aget (unchecked-array-for coll n) (bit-and n 0x01f)) + not-found)) + + ILookup + (-lookup [coll k] (-lookup coll k nil)) + (-lookup [coll k not-found] (if (number? k) + (-nth coll k not-found) + not-found)) + + IMapEntry + (-key [coll] + (-nth coll 0)) + (-val [coll] + (-nth coll 1)) + + IAssociative + (-assoc [coll k v] + (if (number? k) + (-assoc-n coll k v) + (throw (js/Error. "Vector's key for assoc must be a number.")))) + (-contains-key? [coll k] + (if (integer? k) + (and (<= 0 k) (< k cnt)) + false)) + + IFind + (-find [coll k] + [k (get coll k)]) + + IVector + (-assoc-n [coll n val] + (cond + (and (<= 0 n) (< n cnt)) + (if (<= (tail-off coll) n) + (let [new-tail (aclone tail)] + (aset new-tail (bit-and n 0x01f) val) + (PersistentVector. meta cnt shift root new-tail nil)) + (PersistentVector. meta cnt shift (do-assoc coll shift root n val) tail nil)) + (== n cnt) (-conj coll val) + :else (throw (js/Error. (str "Index " n " out of bounds [0," cnt "]"))))) + + IReduce + (-reduce [v f] + (ci-reduce v f)) + (-reduce [v f init] + (loop [i 0 init init] + (if (< i cnt) + (let [arr (unchecked-array-for v i) + len (alength arr) + init (loop [j 0 init init] + (if (< j len) + (let [init (f init (aget arr j))] + (if (reduced? init) + init + (recur (inc j) init))) + init))] + (if (reduced? init) + @init + (recur (+ i len) init))) + init))) + + IKVReduce + (-kv-reduce [v f init] + (loop [i 0 init init] + (if (< i cnt) + (let [arr (unchecked-array-for v i) + len (alength arr) + init (loop [j 0 init init] + (if (< j len) + (let [init (f init (+ j i) (aget arr j))] + (if (reduced? init) + init + (recur (inc j) init))) + init))] + (if (reduced? init) + @init + (recur (+ i len) init))) + init))) + + IFn + (-invoke [coll k] + (-nth coll k)) + (-invoke [coll k not-found] + (-nth coll k not-found)) + + IEditableCollection + (-as-transient [coll] + (TransientVector. cnt shift (tv-editable-root root) (tv-editable-tail tail))) + + IReversible + (-rseq [coll] + (if (pos? cnt) + (RSeq. coll (dec cnt) nil))) + + IIterable + (-iterator [this] + (ranged-iterator this 0 cnt))) + +(set! (.-EMPTY-NODE PersistentVector) (VectorNode. nil (make-array 32))) + +(set! (.-EMPTY PersistentVector) + (PersistentVector. nil 0 5 (.-EMPTY-NODE PersistentVector) (array) empty-ordered-hash)) + +(set! (.-fromArray PersistentVector) + (fn [xs ^boolean no-clone] + (let [l (alength xs) + xs (if no-clone xs (aclone xs))] + (if (< l 32) + (PersistentVector. nil l 5 (.-EMPTY-NODE PersistentVector) xs nil) + (let [node (.slice xs 0 32) + v (PersistentVector. nil 32 5 (.-EMPTY-NODE PersistentVector) node nil)] + (loop [i 32 out (-as-transient v)] + (if (< i l) + (recur (inc i) (conj! out (aget xs i))) + (persistent! out)))))))) + +(es6-iterable PersistentVector) + +(defn vec + "Creates a new vector containing the contents of coll. JavaScript arrays + will be aliased and should not be modified." + [coll] + (if (array? coll) + (.fromArray PersistentVector coll true) + (-persistent! + (reduce -conj! + (-as-transient (.-EMPTY PersistentVector)) + coll)))) + +(defn vector + "Creates a new vector containing the args." + [& args] + (if (and (instance? IndexedSeq args) (zero? (.-i args))) + (.fromArray PersistentVector (.-arr args) true) + (vec args))) + +(declare subvec) + +(deftype ChunkedSeq [vec node i off meta ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IWithMeta + (-with-meta [coll m] + (chunked-seq vec node i off m)) + IMeta + (-meta [coll] meta) + + ISeqable + (-seq [coll] coll) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + ASeq + ISeq + (-first [coll] + (aget node off)) + (-rest [coll] + (if (< (inc off) (alength node)) + (let [s (chunked-seq vec node i (inc off))] + (if (nil? s) + () + s)) + (-chunked-rest coll))) + + INext + (-next [coll] + (if (< (inc off) (alength node)) + (let [s (chunked-seq vec node i (inc off))] + (if (nil? s) + nil + s)) + (-chunked-next coll))) + + ICollection + (-conj [coll o] + (cons o coll)) + + IEmptyableCollection + (-empty [coll] + (-with-meta (.-EMPTY PersistentVector) meta)) + + IChunkedSeq + (-chunked-first [coll] + (array-chunk node off)) + (-chunked-rest [coll] + (let [end (+ i (alength node))] + (if (< end (-count vec)) + (chunked-seq vec (unchecked-array-for vec end) end 0) + ()))) + + IChunkedNext + (-chunked-next [coll] + (let [end (+ i (alength node))] + (when (< end (-count vec)) + (chunked-seq vec (unchecked-array-for vec end) end 0)))) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + IReduce + (-reduce [coll f] + (ci-reduce (subvec vec (+ i off) (count vec)) f)) + + (-reduce [coll f start] + (ci-reduce (subvec vec (+ i off) (count vec)) f start))) + +(es6-iterable ChunkedSeq) + +(defn chunked-seq + ([vec i off] (ChunkedSeq. vec (array-for vec i) i off nil nil)) + ([vec node i off] (ChunkedSeq. vec node i off nil nil)) + ([vec node i off meta] + (ChunkedSeq. vec node i off meta nil))) + +(declare build-subvec) + +(deftype Subvec [meta v start end ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ICloneable + (-clone [_] (Subvec. meta v start end __hash)) + + IWithMeta + (-with-meta [coll meta] (build-subvec meta v start end __hash)) + + IMeta + (-meta [coll] meta) + + IStack + (-peek [coll] + (-nth v (dec end))) + (-pop [coll] + (if (== start end) + (throw (js/Error. "Can't pop empty vector")) + (build-subvec meta v start (dec end) nil))) + + ICollection + (-conj [coll o] + (build-subvec meta (-assoc-n v end o) start (inc end) nil)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY PersistentVector) meta)) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + ISeqable + (-seq [coll] + (let [subvec-seq (fn subvec-seq [i] + (when-not (== i end) + (cons (-nth v i) + (lazy-seq + (subvec-seq (inc i))))))] + (subvec-seq start))) + + IReversible + (-rseq [coll] + (if-not (== start end) + (RSeq. coll (dec (- end start)) nil))) + + ICounted + (-count [coll] (- end start)) + + IIndexed + (-nth [coll n] + (if (or (neg? n) (<= end (+ start n))) + (vector-index-out-of-bounds n (- end start)) + (-nth v (+ start n)))) + (-nth [coll n not-found] + (if (or (neg? n) (<= end (+ start n))) + not-found + (-nth v (+ start n) not-found))) + + ILookup + (-lookup [coll k] (-lookup coll k nil)) + (-lookup [coll k not-found] (if (number? k) + (-nth coll k not-found) + not-found)) + + IAssociative + (-assoc [coll key val] + (if (number? key) + (-assoc-n coll key val) + (throw (js/Error. "Subvec's key for assoc must be a number.")))) + + IFind + (-find [coll key] + [key (get coll key)]) + + IVector + (-assoc-n [coll n val] + (let [v-pos (+ start n)] + (if (or (neg? n) (<= (inc end) v-pos)) + (throw (js/Error. (str "Index " n " out of bounds [0," (-count coll) "]"))) + (build-subvec meta (assoc v v-pos val) start (max end (inc v-pos)) nil)))) + + IReduce + (-reduce [coll f] + (ci-reduce coll f)) + (-reduce [coll f start] + (ci-reduce coll f start)) + + IKVReduce + (-kv-reduce [coll f init] + (loop [i start j 0 init init] + (if (< i end) + (let [init (f init j (-nth v i))] + (if (reduced? init) + @init + (recur (inc i) (inc j) init))) + init))) + + IFn + (-invoke [coll k] + (-nth coll k)) + (-invoke [coll k not-found] + (-nth coll k not-found)) + + IIterable + (-iterator [coll] + (ranged-iterator v start end))) + +(es6-iterable Subvec) + +(defn- build-subvec [meta v start end __hash] + (if (instance? Subvec v) + (recur meta (.-v v) (+ (.-start v) start) (+ (.-start v) end) __hash) + (do + (when-not (vector? v) + (throw (js/Error. "v must satisfy IVector"))) + (let [c (count v)] + (when (or (neg? start) + (neg? end) + (> start c) + (> end c)) + (throw (js/Error. "Index out of bounds")))) + (Subvec. meta v start end __hash)))) + +(defn subvec + "Returns a persistent vector of the items in vector from + start (inclusive) to end (exclusive). If end is not supplied, + defaults to (count vector). This operation is O(1) and very fast, as + the resulting vector shares structure with the original and no + trimming is done." + ([v start] + (subvec v start (count v))) + ([v start end] + (build-subvec nil v start end nil))) + +(defn- tv-ensure-editable [edit node] + (if (identical? edit (.-edit node)) + node + (VectorNode. edit (aclone (.-arr node))))) + +(defn- tv-editable-root [node] + (VectorNode. (js-obj) (aclone (.-arr node)))) + +(defn- tv-editable-tail [tl] + (let [ret (make-array 32)] + (array-copy tl 0 ret 0 (alength tl)) + ret)) + +(defn- tv-push-tail [tv level parent tail-node] + (let [ret (tv-ensure-editable (.. tv -root -edit) parent) + subidx (bit-and (bit-shift-right-zero-fill (dec (.-cnt tv)) level) 0x01f)] + (pv-aset ret subidx + (if (== level 5) + tail-node + (let [child (pv-aget ret subidx)] + (if-not (nil? child) + (tv-push-tail tv (- level 5) child tail-node) + (new-path (.. tv -root -edit) (- level 5) tail-node))))) + ret)) + +(defn- tv-pop-tail [tv level node] + (let [node (tv-ensure-editable (.. tv -root -edit) node) + subidx (bit-and (bit-shift-right-zero-fill (- (.-cnt tv) 2) level) 0x01f)] + (cond + (> level 5) (let [new-child (tv-pop-tail + tv (- level 5) (pv-aget node subidx))] + (if (and (nil? new-child) (zero? subidx)) + nil + (do (pv-aset node subidx new-child) + node))) + (zero? subidx) nil + :else (do (pv-aset node subidx nil) + node)))) + +(defn- unchecked-editable-array-for [tv i] + ;; invariant: i is a valid index of tv. + (if (>= i (tail-off tv)) + (.-tail tv) + (let [root (.-root tv)] + (loop [node root + level (.-shift tv)] + (if (pos? level) + (recur (tv-ensure-editable + (.-edit root) + (pv-aget node + (bit-and (bit-shift-right-zero-fill i level) + 0x01f))) + (- level 5)) + (.-arr node)))))) + +(deftype TransientVector [^:mutable cnt + ^:mutable shift + ^:mutable root + ^:mutable tail] + ITransientCollection + (-conj! [tcoll o] + (if ^boolean (.-edit root) + (if (< (- cnt (tail-off tcoll)) 32) + (do (aset tail (bit-and cnt 0x01f) o) + (set! cnt (inc cnt)) + tcoll) + (let [tail-node (VectorNode. (.-edit root) tail) + new-tail (make-array 32)] + (aset new-tail 0 o) + (set! tail new-tail) + (if (> (bit-shift-right-zero-fill cnt 5) + (bit-shift-left 1 shift)) + (let [new-root-array (make-array 32) + new-shift (+ shift 5)] + (aset new-root-array 0 root) + (aset new-root-array 1 (new-path (.-edit root) shift tail-node)) + (set! root (VectorNode. (.-edit root) new-root-array)) + (set! shift new-shift) + (set! cnt (inc cnt)) + tcoll) + (let [new-root (tv-push-tail tcoll shift root tail-node)] + (set! root new-root) + (set! cnt (inc cnt)) + tcoll)))) + (throw (js/Error. "conj! after persistent!")))) + + (-persistent! [tcoll] + (if ^boolean (.-edit root) + (do (set! (.-edit root) nil) + (let [len (- cnt (tail-off tcoll)) + trimmed-tail (make-array len)] + (array-copy tail 0 trimmed-tail 0 len) + (PersistentVector. nil cnt shift root trimmed-tail nil))) + (throw (js/Error. "persistent! called twice")))) + + ITransientAssociative + (-assoc! [tcoll key val] + (if (number? key) + (-assoc-n! tcoll key val) + (throw (js/Error. "TransientVector's key for assoc! must be a number.")))) + + ITransientVector + (-assoc-n! [tcoll n val] + (if ^boolean (.-edit root) + (cond + (and (<= 0 n) (< n cnt)) + (if (<= (tail-off tcoll) n) + (do (aset tail (bit-and n 0x01f) val) + tcoll) + (let [new-root + ((fn go [level node] + (let [node (tv-ensure-editable (.-edit root) node)] + (if (zero? level) + (do (pv-aset node (bit-and n 0x01f) val) + node) + (let [subidx (bit-and (bit-shift-right-zero-fill n level) + 0x01f)] + (pv-aset node subidx + (go (- level 5) (pv-aget node subidx))) + node)))) + shift root)] + (set! root new-root) + tcoll)) + (== n cnt) (-conj! tcoll val) + :else + (throw + (js/Error. + (str "Index " n " out of bounds for TransientVector of length" cnt)))) + (throw (js/Error. "assoc! after persistent!")))) + + (-pop! [tcoll] + (if ^boolean (.-edit root) + (cond + (zero? cnt) (throw (js/Error. "Can't pop empty vector")) + (== 1 cnt) (do (set! cnt 0) tcoll) + (pos? (bit-and (dec cnt) 0x01f)) (do (set! cnt (dec cnt)) tcoll) + :else + (let [new-tail (unchecked-editable-array-for tcoll (- cnt 2)) + new-root (let [nr (tv-pop-tail tcoll shift root)] + (if-not (nil? nr) + nr + (VectorNode. (.-edit root) (make-array 32))))] + (if (and (< 5 shift) (nil? (pv-aget new-root 1))) + (let [new-root (tv-ensure-editable (.-edit root) (pv-aget new-root 0))] + (set! root new-root) + (set! shift (- shift 5)) + (set! cnt (dec cnt)) + (set! tail new-tail) + tcoll) + (do (set! root new-root) + (set! cnt (dec cnt)) + (set! tail new-tail) + tcoll)))) + (throw (js/Error. "pop! after persistent!")))) + + ICounted + (-count [coll] + (if ^boolean (.-edit root) + cnt + (throw (js/Error. "count after persistent!")))) + + IIndexed + (-nth [coll n] + (if ^boolean (.-edit root) + (aget (array-for coll n) (bit-and n 0x01f)) + (throw (js/Error. "nth after persistent!")))) + + (-nth [coll n not-found] + (if (and (<= 0 n) (< n cnt)) + (-nth coll n) + not-found)) + + ILookup + (-lookup [coll k] (-lookup coll k nil)) + + (-lookup [coll k not-found] (if (number? k) + (-nth coll k not-found) + not-found)) + + IFn + (-invoke [coll k] + (-lookup coll k)) + + (-invoke [coll k not-found] + (-lookup coll k not-found))) + +;;; PersistentQueue ;;; + +(deftype PersistentQueueIter [^:mutable fseq riter] + Object + (hasNext [_] + (or (and (some? fseq) (seq fseq)) (and (some? riter) (.hasNext riter)))) + (next [_] + (cond + (some? fseq) + (let [ret (first fseq)] + (set! fseq (next fseq)) + ret) + (and (some? riter) ^boolean (.hasNext riter)) + (.next riter) + :else (throw (js/Error. "No such element")))) + (remove [_] (js/Error. "Unsupported operation"))) + +(deftype PersistentQueueSeq [meta front rear ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IWithMeta + (-with-meta [coll meta] (PersistentQueueSeq. meta front rear __hash)) + + IMeta + (-meta [coll] meta) + + ISeq + (-first [coll] (first front)) + (-rest [coll] + (if-let [f1 (next front)] + (PersistentQueueSeq. meta f1 rear nil) + (if (nil? rear) + (-empty coll) + (PersistentQueueSeq. meta rear nil nil)))) + + ICollection + (-conj [coll o] (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + ISeqable + (-seq [coll] coll)) + +(es6-iterable PersistentQueueSeq) + +(deftype PersistentQueue [meta count front rear ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ICloneable + (-clone [coll] (PersistentQueue. meta count front rear __hash)) + + IIterable + (-iterator [coll] + (PersistentQueueIter. front (-iterator rear))) + + IWithMeta + (-with-meta [coll meta] (PersistentQueue. meta count front rear __hash)) + + IMeta + (-meta [coll] meta) + + ISeq + (-first [coll] (first front)) + (-rest [coll] (rest (seq coll))) + + IStack + (-peek [coll] (first front)) + (-pop [coll] + (if front + (if-let [f1 (next front)] + (PersistentQueue. meta (dec count) f1 rear nil) + (PersistentQueue. meta (dec count) (seq rear) [] nil)) + coll)) + + ICollection + (-conj [coll o] + (if front + (PersistentQueue. meta (inc count) front (conj (or rear []) o) nil) + (PersistentQueue. meta (inc count) (conj front o) [] nil))) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY PersistentQueue) meta)) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + ISeqable + (-seq [coll] + (let [rear (seq rear)] + (if (or front rear) + (PersistentQueueSeq. nil front (seq rear) nil)))) + + ICounted + (-count [coll] count)) + +(set! (.-EMPTY PersistentQueue) (PersistentQueue. nil 0 nil [] empty-ordered-hash)) + +(es6-iterable PersistentQueue) + +(deftype NeverEquiv [] + Object + (equiv [this other] + (-equiv this other)) + IEquiv + (-equiv [o other] false)) + +(def ^:private never-equiv (NeverEquiv.)) + +(defn- ^boolean equiv-map + "Assumes y is a map. Returns true if x equals y, otherwise returns + false." + [x y] + (boolean + (when (map? y) + ; assume all maps are counted + (when (== (count x) (count y)) + (every? (fn [xkv] (= (get y (first xkv) never-equiv) + (second xkv))) + x))))) + + +(defn- scan-array [incr k array] + (let [len (alength array)] + (loop [i 0] + (when (< i len) + (if (identical? k (aget array i)) + i + (recur (+ i incr))))))) + +; The keys field is an array of all keys of this map, in no particular +; order. Any string, keyword, or symbol key is used as a property name +; to store the value in strobj. If a key is assoc'ed when that same +; key already exists in strobj, the old value is overwritten. If a +; non-string key is assoc'ed, return a HashMap object instead. + +(defn- obj-map-compare-keys [a b] + (let [a (hash a) + b (hash b)] + (cond + (< a b) -1 + (> a b) 1 + :else 0))) + +(defn- obj-map->hash-map [m k v] + (let [ks (.-keys m) + len (alength ks) + so (.-strobj m) + mm (meta m)] + (loop [i 0 + out (transient (.-EMPTY PersistentHashMap))] + (if (< i len) + (let [k (aget ks i)] + (recur (inc i) (assoc! out k (aget so k)))) + (-with-meta (persistent! (assoc! out k v)) mm))))) + +;;; ObjMap - DEPRECATED + +(defn- obj-clone [obj ks] + (let [new-obj (js-obj) + l (alength ks)] + (loop [i 0] + (when (< i l) + (let [k (aget ks i)] + (aset new-obj k (aget obj k)) + (recur (inc i))))) + new-obj)) + +(deftype ObjMap [meta keys strobj update-count ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + + IWithMeta + (-with-meta [coll meta] (ObjMap. meta keys strobj update-count __hash)) + + IMeta + (-meta [coll] meta) + + ICollection + (-conj [coll entry] + (if (vector? entry) + (-assoc coll (-nth entry 0) (-nth entry 1)) + (reduce -conj + coll + entry))) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY ObjMap) meta)) + + IEquiv + (-equiv [coll other] (equiv-map coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-unordered-coll __hash)) + + ISeqable + (-seq [coll] + (when (pos? (alength keys)) + (map #(vector % (aget strobj %)) + (.sort keys obj-map-compare-keys)))) + + ICounted + (-count [coll] (alength keys)) + + ILookup + (-lookup [coll k] (-lookup coll k nil)) + (-lookup [coll k not-found] + (if (and ^boolean (goog/isString k) + (not (nil? (scan-array 1 k keys)))) + (aget strobj k) + not-found)) + + IAssociative + (-assoc [coll k v] + (if ^boolean (goog/isString k) + (if (or (> update-count (.-HASHMAP_THRESHOLD ObjMap)) + (>= (alength keys) (.-HASHMAP_THRESHOLD ObjMap))) + (obj-map->hash-map coll k v) + (if-not (nil? (scan-array 1 k keys)) + (let [new-strobj (obj-clone strobj keys)] + (aset new-strobj k v) + (ObjMap. meta keys new-strobj (inc update-count) nil)) ; overwrite + (let [new-strobj (obj-clone strobj keys) ; append + new-keys (aclone keys)] + (aset new-strobj k v) + (.push new-keys k) + (ObjMap. meta new-keys new-strobj (inc update-count) nil)))) + ;; non-string key. game over. + (obj-map->hash-map coll k v))) + (-contains-key? [coll k] + (if (and ^boolean (goog/isString k) + (not (nil? (scan-array 1 k keys)))) + true + false)) + + IFind + (-find [coll k] + [k (get coll k)]) + + IKVReduce + (-kv-reduce [coll f init] + (let [len (alength keys)] + (loop [keys (.sort keys obj-map-compare-keys) + init init] + (if (seq keys) + (let [k (first keys) + init (f init k (aget strobj k))] + (if (reduced? init) + @init + (recur (rest keys) init))) + init)))) + + IMap + (-dissoc [coll k] + (if (and ^boolean (goog/isString k) + (not (nil? (scan-array 1 k keys)))) + (let [new-keys (aclone keys) + new-strobj (obj-clone strobj keys)] + (.splice new-keys (scan-array 1 k new-keys) 1) + (js-delete new-strobj k) + (ObjMap. meta new-keys new-strobj (inc update-count) nil)) + coll)) ; key not found, return coll unchanged + + IFn + (-invoke [coll k] + (-lookup coll k)) + (-invoke [coll k not-found] + (-lookup coll k not-found)) + + IEditableCollection + (-as-transient [coll] + (transient (into (hash-map) coll)))) + +(set! (.-EMPTY ObjMap) (ObjMap. nil (array) (js-obj) 0 empty-unordered-hash)) + +(set! (.-HASHMAP_THRESHOLD ObjMap) 8) + +(set! (.-fromObject ObjMap) (fn [ks obj] (ObjMap. nil ks obj 0 nil))) + +;; Record Iterator +(deftype RecordIter [^:mutable i record base-count fields ext-map-iter] + Object + (hasNext [_] + (or (< i base-count) (.hasNext ext-map-iter))) + (next [_] + (if (< i base-count) + (let [k (nth fields i)] + (set! i (inc i)) + [k (-lookup record k)]) + (.next ext-map-iter))) + (remove [_] (js/Error. "Unsupported operation"))) + +;; EXPERIMENTAL: subject to change +(deftype ES6EntriesIterator [^:mutable s] + Object + (next [_] + (if-not (nil? s) + (let [[k v] (first s)] + (set! s (next s)) + #js {:value #js [k v] :done false}) + #js {:value nil :done true}))) + +(defn es6-entries-iterator [coll] + (ES6EntriesIterator. (seq coll))) + +;; EXPERIMENTAL: subject to change +(deftype ES6SetEntriesIterator [^:mutable s] + Object + (next [_] + (if-not (nil? s) + (let [x (first s)] + (set! s (next s)) + #js {:value #js [x x] :done false}) + #js {:value nil :done true}))) + +(defn es6-set-entries-iterator [coll] + (ES6SetEntriesIterator. (seq coll))) + +;;; PersistentArrayMap + +(defn- array-index-of-nil? [arr] + (let [len (alength arr)] + (loop [i 0] + (cond + (<= len i) -1 + (nil? (aget arr i)) i + :else (recur (+ i 2)))))) + +(defn- array-index-of-keyword? [arr k] + (let [len (alength arr) + kstr (.-fqn k)] + (loop [i 0] + (cond + (<= len i) -1 + (and (keyword? (aget arr i)) + (identical? kstr (.-fqn (aget arr i)))) i + :else (recur (+ i 2)))))) + +(defn- array-index-of-symbol? [arr k] + (let [len (alength arr) + kstr (.-str k)] + (loop [i 0] + (cond + (<= len i) -1 + (and (symbol? (aget arr i)) + (identical? kstr (.-str (aget arr i)))) i + :else (recur (+ i 2)))))) + +(defn- array-index-of-identical? [arr k] + (let [len (alength arr)] + (loop [i 0] + (cond + (<= len i) -1 + (identical? k (aget arr i)) i + :else (recur (+ i 2)))))) + +(defn- array-index-of-equiv? [arr k] + (let [len (alength arr)] + (loop [i 0] + (cond + (<= len i) -1 + (= k (aget arr i)) i + :else (recur (+ i 2)))))) + +(defn array-index-of [arr k] + (cond + (keyword? k) (array-index-of-keyword? arr k) + + (or ^boolean (goog/isString k) (number? k)) + (array-index-of-identical? arr k) + + (symbol? k) (array-index-of-symbol? arr k) + + (nil? k) + (array-index-of-nil? arr) + + :else (array-index-of-equiv? arr k))) + +(defn- array-map-index-of [m k] + (array-index-of (.-arr m) k)) + +(defn- array-extend-kv [arr k v] + (let [l (alength arr) + narr (make-array (+ l 2))] + (loop [i 0] + (when (< i l) + (aset narr i (aget arr i)) + (recur (inc i)))) + (aset narr l k) + (aset narr (inc l) v) + narr)) + +(defn- array-map-extend-kv [m k v] + (array-extend-kv (.-arr m) k v)) + +(declare TransientArrayMap) + +(deftype MapEntry [key val ^:mutable __hash] + Object + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMapEntry + (-key [node] key) + (-val [node] val) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IMeta + (-meta [node] nil) + + IWithMeta + (-with-meta [node meta] + (with-meta [key val] meta)) + + IStack + (-peek [node] val) + + (-pop [node] [key]) + + ICollection + (-conj [node o] [key val o]) + + IEmptyableCollection + (-empty [node] []) + + ISequential + ISeqable + (-seq [node] (list key val)) + + ICounted + (-count [node] 2) + + IIndexed + (-nth [node n] + (cond (== n 0) key + (== n 1) val + :else (throw (js/Error. "Index out of bounds")))) + + (-nth [node n not-found] + (cond (== n 0) key + (== n 1) val + :else not-found)) + + ILookup + (-lookup [node k] (-nth node k nil)) + (-lookup [node k not-found] (-nth node k not-found)) + + IAssociative + (-assoc [node k v] + (assoc [key val] k v)) + (-contains-key? [node k] + (or (== k 0) (== k 1))) + + IFind + (-find [node k] + (cond + (== k 0) [0 key] + (== k 1) [1 val] + :else nil)) + + IVector + (-assoc-n [node n v] + (-assoc-n [key val] n v)) + + IReduce + (-reduce [node f] + (ci-reduce node f)) + + (-reduce [node f start] + (ci-reduce node f start)) + + IFn + (-invoke [node k] + (-nth node k)) + + (-invoke [node k not-found] + (-nth node k not-found))) + +(deftype PersistentArrayMapSeq [arr i _meta] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMeta + (-meta [coll] _meta) + + IWithMeta + (-with-meta [coll new-meta] + (PersistentArrayMapSeq. arr i new-meta)) + + ICounted + (-count [coll] + (/ (- (alength arr) i) 2)) + + ISeqable + (-seq [coll] coll) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + ICollection + (-conj [coll o] + (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) _meta)) + + IHash + (-hash [coll] (hash-ordered-coll coll)) + + ISeq + (-first [coll] + [(aget arr i) (aget arr (inc i))]) + + (-rest [coll] + (if (< i (- (alength arr) 2)) + (PersistentArrayMapSeq. arr (+ i 2) _meta) + ())) + + INext + (-next [coll] + (when (< i (- (alength arr) 2)) + (PersistentArrayMapSeq. arr (+ i 2) _meta))) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable PersistentArrayMapSeq) + +(defn persistent-array-map-seq [arr i _meta] + (when (<= i (- (alength arr) 2)) + (PersistentArrayMapSeq. arr i _meta))) + +(declare keys vals) + +(deftype PersistentArrayMapIterator [arr ^:mutable i cnt] + Object + (hasNext [_] + (< i cnt)) + (next [_] + (let [ret [(aget arr i) (aget arr (inc i))]] + (set! i (+ i 2)) + ret))) + +(deftype PersistentArrayMap [meta cnt arr ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + + ;; EXPERIMENTAL: subject to change + (keys [coll] + (es6-iterator (keys coll))) + (entries [coll] + (es6-entries-iterator (seq coll))) + (values [coll] + (es6-iterator (vals coll))) + (has [coll k] + (contains? coll k)) + (get [coll k not-found] + (-lookup coll k not-found)) + (forEach [coll f] + (doseq [[k v] coll] + (f v k))) + + ICloneable + (-clone [_] (PersistentArrayMap. meta cnt arr __hash)) + + IWithMeta + (-with-meta [coll meta] (PersistentArrayMap. meta cnt arr __hash)) + + IMeta + (-meta [coll] meta) + + ICollection + (-conj [coll entry] + (if (vector? entry) + (-assoc coll (-nth entry 0) (-nth entry 1)) + (loop [ret coll es (seq entry)] + (if (nil? es) + ret + (let [e (first es)] + (if (vector? e) + (recur (-assoc ret (-nth e 0) (-nth e 1)) + (next es)) + (throw (js/Error. "conj on a map takes map entries or seqables of map entries")))))))) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY PersistentArrayMap) meta)) + + IEquiv + (-equiv [coll other] + (if (implements? IMap other) + (let [alen (alength arr) + ^not-native other other] + (if (== cnt (-count other)) + (loop [i 0] + (if (< i alen) + (let [v (-lookup other (aget arr i) lookup-sentinel)] + (if-not (identical? v lookup-sentinel) + (if (= (aget arr (inc i)) v) + (recur (+ i 2)) + false) + false)) + true)) + false)) + (equiv-map coll other))) + + IHash + (-hash [coll] (caching-hash coll hash-unordered-coll __hash)) + + IIterable + (-iterator [this] + (PersistentArrayMapIterator. arr 0 (* cnt 2))) + + ISeqable + (-seq [coll] + (persistent-array-map-seq arr 0 nil)) + + ICounted + (-count [coll] cnt) + + ILookup + (-lookup [coll k] + (-lookup coll k nil)) + + (-lookup [coll k not-found] + (let [idx (array-map-index-of coll k)] + (if (== idx -1) + not-found + (aget arr (inc idx))))) + + IAssociative + (-assoc [coll k v] + (let [idx (array-map-index-of coll k)] + (cond + (== idx -1) + (if (< cnt (.-HASHMAP-THRESHOLD PersistentArrayMap)) + (let [arr (array-map-extend-kv coll k v)] + (PersistentArrayMap. meta (inc cnt) arr nil)) + (-> (into (.-EMPTY PersistentHashMap) coll) + (-assoc k v) + (-with-meta meta))) + + (identical? v (aget arr (inc idx))) + coll + + :else + (let [arr (doto (aclone arr) + (aset (inc idx) v))] + (PersistentArrayMap. meta cnt arr nil))))) + + (-contains-key? [coll k] + (not (== (array-map-index-of coll k) -1))) + + IFind + (-find [coll k] + (let [idx (array-map-index-of coll k)] + [(aget arr idx) (get coll k)])) + + IMap + (-dissoc [coll k] + (let [idx (array-map-index-of coll k)] + (if (>= idx 0) + (let [len (alength arr) + new-len (- len 2)] + (if (zero? new-len) + (-empty coll) + (let [new-arr (make-array new-len)] + (loop [s 0 d 0] + (cond + (>= s len) (PersistentArrayMap. meta (dec cnt) new-arr nil) + (= k (aget arr s)) (recur (+ s 2) d) + :else (do (aset new-arr d (aget arr s)) + (aset new-arr (inc d) (aget arr (inc s))) + (recur (+ s 2) (+ d 2)))))))) + coll))) + + IKVReduce + (-kv-reduce [coll f init] + (let [len (alength arr)] + (loop [i 0 init init] + (if (< i len) + (let [init (f init (aget arr i) (aget arr (inc i)))] + (if (reduced? init) + @init + (recur (+ i 2) init))) + init)))) + + IReduce + (-reduce [coll f] + (seq-reduce f coll)) + (-reduce [coll f start] + (seq-reduce f start coll)) + + IFn + (-invoke [coll k] + (-lookup coll k)) + + (-invoke [coll k not-found] + (-lookup coll k not-found)) + + IEditableCollection + (-as-transient [coll] + (TransientArrayMap. (js-obj) (alength arr) (aclone arr)))) + +(set! (.-EMPTY PersistentArrayMap) (PersistentArrayMap. nil 0 (array) empty-unordered-hash)) + +(set! (.-HASHMAP-THRESHOLD PersistentArrayMap) 8) + +(set! (.-fromArray PersistentArrayMap) + (fn [arr ^boolean no-clone ^boolean no-check] + (as-> (if no-clone arr (aclone arr)) arr + (if no-check + arr + (let [ret (array)] + (loop [i 0] + (when (< i (alength arr)) + (let [k (aget arr i) + v (aget arr (inc i)) + idx (array-index-of ret k)] + (when (== idx -1) + (.push ret k) + (.push ret v))) + (recur (+ i 2)))) + ret)) + (let [cnt (/ (alength arr) 2)] + (PersistentArrayMap. nil cnt arr nil))))) + +(set! (.-createWithCheck PersistentArrayMap) + (fn [arr] + (let [ret (array)] + (loop [i 0] + (when (< i (alength arr)) + (let [k (aget arr i) + v (aget arr (inc i)) + idx (array-index-of ret k)] + (if (== idx -1) + (doto ret (.push k) (.push v)) + (throw (js/Error. (str "Duplicate key: " k))))) + (recur (+ i 2)))) + (let [cnt (/ (alength arr) 2)] + (PersistentArrayMap. nil cnt arr nil))))) + +(set! (.-createAsIfByAssoc PersistentArrayMap) + (fn [arr] + (let [ret (array)] + (loop [i 0] + (when (< i (alength arr)) + (let [k (aget arr i) + v (aget arr (inc i)) + idx (array-index-of ret k)] + (if (== idx -1) + (doto ret (.push k) (.push v)) + (aset ret (inc idx) v))) + (recur (+ i 2)))) + (PersistentArrayMap. nil (/ (alength ret) 2) ret nil)))) + +(es6-iterable PersistentArrayMap) + +(declare array->transient-hash-map) + +(deftype TransientArrayMap [^:mutable editable? + ^:mutable len + arr] + ICounted + (-count [tcoll] + (if editable? + (quot len 2) + (throw (js/Error. "count after persistent!")))) + + ILookup + (-lookup [tcoll k] + (-lookup tcoll k nil)) + + (-lookup [tcoll k not-found] + (if editable? + (let [idx (array-map-index-of tcoll k)] + (if (== idx -1) + not-found + (aget arr (inc idx)))) + (throw (js/Error. "lookup after persistent!")))) + + ITransientCollection + (-conj! [tcoll o] + (if editable? + (if (satisfies? IMapEntry o) + (-assoc! tcoll (key o) (val o)) + (loop [es (seq o) tcoll tcoll] + (if-let [e (first es)] + (recur (next es) + (-assoc! tcoll (key e) (val e))) + tcoll))) + (throw (js/Error. "conj! after persistent!")))) + + (-persistent! [tcoll] + (if editable? + (do (set! editable? false) + (PersistentArrayMap. nil (quot len 2) arr nil)) + (throw (js/Error. "persistent! called twice")))) + + ITransientAssociative + (-assoc! [tcoll key val] + (if editable? + (let [idx (array-map-index-of tcoll key)] + (if (== idx -1) + (if (<= (+ len 2) (* 2 (.-HASHMAP-THRESHOLD PersistentArrayMap))) + (do (set! len (+ len 2)) + (.push arr key) + (.push arr val) + tcoll) + (assoc! (array->transient-hash-map len arr) key val)) + (if (identical? val (aget arr (inc idx))) + tcoll + (do (aset arr (inc idx) val) + tcoll)))) + (throw (js/Error. "assoc! after persistent!")))) + + ITransientMap + (-dissoc! [tcoll key] + (if editable? + (let [idx (array-map-index-of tcoll key)] + (when (>= idx 0) + (aset arr idx (aget arr (- len 2))) + (aset arr (inc idx) (aget arr (dec len))) + (doto arr .pop .pop) + (set! len (- len 2))) + tcoll) + (throw (js/Error. "dissoc! after persistent!"))))) + +(declare TransientHashMap) + +(defn- array->transient-hash-map [len arr] + (loop [out (transient (.-EMPTY PersistentHashMap)) + i 0] + (if (< i len) + (recur (assoc! out (aget arr i) (aget arr (inc i))) (+ i 2)) + out))) + +;;; PersistentHashMap + +(deftype Box [^:mutable val]) + +(declare create-inode-seq create-array-node-seq reset! create-node atom deref) + +(defn ^boolean key-test [key other] + (cond + (identical? key other) true + (keyword-identical? key other) true + :else (= key other))) + +(defn- mask [hash shift] + (bit-and (bit-shift-right-zero-fill hash shift) 0x01f)) + +(defn- clone-and-set + ([arr i a] + (doto (aclone arr) + (aset i a))) + ([arr i a j b] + (doto (aclone arr) + (aset i a) + (aset j b)))) + +(defn- remove-pair [arr i] + (let [new-arr (make-array (- (alength arr) 2))] + (array-copy arr 0 new-arr 0 (* 2 i)) + (array-copy arr (* 2 (inc i)) new-arr (* 2 i) (- (alength new-arr) (* 2 i))) + new-arr)) + +(defn- bitmap-indexed-node-index [bitmap bit] + (bit-count (bit-and bitmap (dec bit)))) + +(defn- bitpos [hash shift] + (bit-shift-left 1 (mask hash shift))) + +(defn- edit-and-set + ([inode edit i a] + (let [editable (.ensure-editable inode edit)] + (aset (.-arr editable) i a) + editable)) + ([inode edit i a j b] + (let [editable (.ensure-editable inode edit)] + (aset (.-arr editable) i a) + (aset (.-arr editable) j b) + editable))) + +(defn- inode-kv-reduce [arr f init] + (let [len (alength arr)] + (loop [i 0 init init] + (if (< i len) + (let [init (let [k (aget arr i)] + (if-not (nil? k) + (f init k (aget arr (inc i))) + (let [node (aget arr (inc i))] + (if-not (nil? node) + (.kv-reduce node f init) + init))))] + (if (reduced? init) + @init + (recur (+ i 2) init))) + init)))) + +(declare ArrayNode) + + (deftype NodeIterator [arr ^:mutable i ^:mutable next-entry ^:mutable next-iter] + Object + (advance [this] + (let [len (alength arr)] + (loop [] + (if (< i len) + (let [key (aget arr i) + node-or-val (aget arr (inc i)) + ^boolean found + (cond (some? key) + (set! next-entry [key node-or-val]) + (some? node-or-val) + (let [new-iter (-iterator node-or-val)] + (if ^boolean (.hasNext new-iter) + (set! next-iter new-iter) + false)) + :else false)] + (set! i (+ i 2)) + (if found true (recur))) + false)))) + (hasNext [this] + (or (some? next-entry) (some? next-iter) (.advance this))) + (next [this] + (cond + (some? next-entry) + (let [ret next-entry] + (set! next-entry nil) + ret) + (some? next-iter) + (let [ret (.next next-iter)] + (when-not ^boolean (.hasNext next-iter) + (set! next-iter nil)) + ret) + ^boolean (.advance this) + (.next this) + :else (throw (js/Error. "No such element")))) + (remove [_] (js/Error. "Unsupported operation"))) + +(deftype BitmapIndexedNode [edit ^:mutable bitmap ^:mutable arr] + Object + (inode-assoc [inode shift hash key val added-leaf?] + (let [bit (bitpos hash shift) + idx (bitmap-indexed-node-index bitmap bit)] + (if (zero? (bit-and bitmap bit)) + (let [n (bit-count bitmap)] + (if (>= n 16) + (let [nodes (make-array 32) + jdx (mask hash shift)] + (aset nodes jdx (.inode-assoc (.-EMPTY BitmapIndexedNode) (+ shift 5) hash key val added-leaf?)) + (loop [i 0 j 0] + (if (< i 32) + (if (zero? (bit-and (bit-shift-right-zero-fill bitmap i) 1)) + (recur (inc i) j) + (do (aset nodes i + (if-not (nil? (aget arr j)) + (.inode-assoc (.-EMPTY BitmapIndexedNode) + (+ shift 5) (cljs.core/hash (aget arr j)) (aget arr j) (aget arr (inc j)) added-leaf?) + (aget arr (inc j)))) + (recur (inc i) (+ j 2)))))) + (ArrayNode. nil (inc n) nodes)) + (let [new-arr (make-array (* 2 (inc n)))] + (array-copy arr 0 new-arr 0 (* 2 idx)) + (aset new-arr (* 2 idx) key) + (aset new-arr (inc (* 2 idx)) val) + (array-copy arr (* 2 idx) new-arr (* 2 (inc idx)) (* 2 (- n idx))) + (set! (.-val added-leaf?) true) + (BitmapIndexedNode. nil (bit-or bitmap bit) new-arr)))) + (let [key-or-nil (aget arr (* 2 idx)) + val-or-node (aget arr (inc (* 2 idx)))] + (cond (nil? key-or-nil) + (let [n (.inode-assoc val-or-node (+ shift 5) hash key val added-leaf?)] + (if (identical? n val-or-node) + inode + (BitmapIndexedNode. nil bitmap (clone-and-set arr (inc (* 2 idx)) n)))) + + (key-test key key-or-nil) + (if (identical? val val-or-node) + inode + (BitmapIndexedNode. nil bitmap (clone-and-set arr (inc (* 2 idx)) val))) + + :else + (do (set! (.-val added-leaf?) true) + (BitmapIndexedNode. nil bitmap + (clone-and-set arr (* 2 idx) nil (inc (* 2 idx)) + (create-node (+ shift 5) key-or-nil val-or-node hash key val))))))))) + + (inode-without [inode shift hash key] + (let [bit (bitpos hash shift)] + (if (zero? (bit-and bitmap bit)) + inode + (let [idx (bitmap-indexed-node-index bitmap bit) + key-or-nil (aget arr (* 2 idx)) + val-or-node (aget arr (inc (* 2 idx)))] + (cond (nil? key-or-nil) + (let [n (.inode-without val-or-node (+ shift 5) hash key)] + (cond (identical? n val-or-node) inode + (not (nil? n)) (BitmapIndexedNode. nil bitmap (clone-and-set arr (inc (* 2 idx)) n)) + (== bitmap bit) nil + :else (BitmapIndexedNode. nil (bit-xor bitmap bit) (remove-pair arr idx)))) + (key-test key key-or-nil) + (BitmapIndexedNode. nil (bit-xor bitmap bit) (remove-pair arr idx)) + :else inode))))) + + (inode-lookup [inode shift hash key not-found] + (let [bit (bitpos hash shift)] + (if (zero? (bit-and bitmap bit)) + not-found + (let [idx (bitmap-indexed-node-index bitmap bit) + key-or-nil (aget arr (* 2 idx)) + val-or-node (aget arr (inc (* 2 idx)))] + (cond (nil? key-or-nil) (.inode-lookup val-or-node (+ shift 5) hash key not-found) + (key-test key key-or-nil) val-or-node + :else not-found))))) + + (inode-find [inode shift hash key not-found] + (let [bit (bitpos hash shift)] + (if (zero? (bit-and bitmap bit)) + not-found + (let [idx (bitmap-indexed-node-index bitmap bit) + key-or-nil (aget arr (* 2 idx)) + val-or-node (aget arr (inc (* 2 idx)))] + (cond (nil? key-or-nil) (.inode-find val-or-node (+ shift 5) hash key not-found) + (key-test key key-or-nil) [key-or-nil val-or-node] + :else not-found))))) + + (inode-seq [inode] + (create-inode-seq arr)) + + (ensure-editable [inode e] + (if (identical? e edit) + inode + (let [n (bit-count bitmap) + new-arr (make-array (if (neg? n) 4 (* 2 (inc n))))] + (array-copy arr 0 new-arr 0 (* 2 n)) + (BitmapIndexedNode. e bitmap new-arr)))) + + (edit-and-remove-pair [inode e bit i] + (if (== bitmap bit) + nil + (let [editable (.ensure-editable inode e) + earr (.-arr editable) + len (alength earr)] + (set! (.-bitmap editable) (bit-xor bit (.-bitmap editable))) + (array-copy earr (* 2 (inc i)) + earr (* 2 i) + (- len (* 2 (inc i)))) + (aset earr (- len 2) nil) + (aset earr (dec len) nil) + editable))) + + (inode-assoc! [inode edit shift hash key val added-leaf?] + (let [bit (bitpos hash shift) + idx (bitmap-indexed-node-index bitmap bit)] + (if (zero? (bit-and bitmap bit)) + (let [n (bit-count bitmap)] + (cond + (< (* 2 n) (alength arr)) + (let [editable (.ensure-editable inode edit) + earr (.-arr editable)] + (set! (.-val added-leaf?) true) + (array-copy-downward earr (* 2 idx) + earr (* 2 (inc idx)) + (* 2 (- n idx))) + (aset earr (* 2 idx) key) + (aset earr (inc (* 2 idx)) val) + (set! (.-bitmap editable) (bit-or (.-bitmap editable) bit)) + editable) + + (>= n 16) + (let [nodes (make-array 32) + jdx (mask hash shift)] + (aset nodes jdx (.inode-assoc! (.-EMPTY BitmapIndexedNode) edit (+ shift 5) hash key val added-leaf?)) + (loop [i 0 j 0] + (if (< i 32) + (if (zero? (bit-and (bit-shift-right-zero-fill bitmap i) 1)) + (recur (inc i) j) + (do (aset nodes i + (if-not (nil? (aget arr j)) + (.inode-assoc! (.-EMPTY BitmapIndexedNode) + edit (+ shift 5) (cljs.core/hash (aget arr j)) (aget arr j) (aget arr (inc j)) added-leaf?) + (aget arr (inc j)))) + (recur (inc i) (+ j 2)))))) + (ArrayNode. edit (inc n) nodes)) + + :else + (let [new-arr (make-array (* 2 (+ n 4)))] + (array-copy arr 0 new-arr 0 (* 2 idx)) + (aset new-arr (* 2 idx) key) + (aset new-arr (inc (* 2 idx)) val) + (array-copy arr (* 2 idx) new-arr (* 2 (inc idx)) (* 2 (- n idx))) + (set! (.-val added-leaf?) true) + (let [editable (.ensure-editable inode edit)] + (set! (.-arr editable) new-arr) + (set! (.-bitmap editable) (bit-or (.-bitmap editable) bit)) + editable)))) + (let [key-or-nil (aget arr (* 2 idx)) + val-or-node (aget arr (inc (* 2 idx)))] + (cond (nil? key-or-nil) + (let [n (.inode-assoc! val-or-node edit (+ shift 5) hash key val added-leaf?)] + (if (identical? n val-or-node) + inode + (edit-and-set inode edit (inc (* 2 idx)) n))) + + (key-test key key-or-nil) + (if (identical? val val-or-node) + inode + (edit-and-set inode edit (inc (* 2 idx)) val)) + + :else + (do (set! (.-val added-leaf?) true) + (edit-and-set inode edit (* 2 idx) nil (inc (* 2 idx)) + (create-node edit (+ shift 5) key-or-nil val-or-node hash key val)))))))) + + (inode-without! [inode edit shift hash key removed-leaf?] + (let [bit (bitpos hash shift)] + (if (zero? (bit-and bitmap bit)) + inode + (let [idx (bitmap-indexed-node-index bitmap bit) + key-or-nil (aget arr (* 2 idx)) + val-or-node (aget arr (inc (* 2 idx)))] + (cond (nil? key-or-nil) + (let [n (.inode-without! val-or-node edit (+ shift 5) hash key removed-leaf?)] + (cond (identical? n val-or-node) inode + (not (nil? n)) (edit-and-set inode edit (inc (* 2 idx)) n) + (== bitmap bit) nil + :else (.edit-and-remove-pair inode edit bit idx))) + (key-test key key-or-nil) + (do (set! (.-val removed-leaf?) true) + (.edit-and-remove-pair inode edit bit idx)) + :else inode))))) + + (kv-reduce [inode f init] + (inode-kv-reduce arr f init)) + + IIterable + (-iterator [coll] + (NodeIterator. arr 0 nil nil))) + +(set! (.-EMPTY BitmapIndexedNode) (BitmapIndexedNode. nil 0 (make-array 0))) + +(defn- pack-array-node [array-node edit idx] + (let [arr (.-arr array-node) + len (alength arr) + new-arr (make-array (* 2 (dec (.-cnt array-node))))] + (loop [i 0 j 1 bitmap 0] + (if (< i len) + (if (and (not (== i idx)) + (not (nil? (aget arr i)))) + (do (aset new-arr j (aget arr i)) + (recur (inc i) (+ j 2) (bit-or bitmap (bit-shift-left 1 i)))) + (recur (inc i) j bitmap)) + (BitmapIndexedNode. edit bitmap new-arr))))) + +(deftype ArrayNodeIterator [arr ^:mutable i ^:mutable next-iter] + Object + (hasNext [this] + (let [len (alength arr)] + (loop [] + (if-not (and (some? next-iter) ^boolean (.hasNext next-iter)) + (if (< i len) + (let [node (aget arr i)] + (set! i (inc i)) + (when (some? node) + (set! next-iter (-iterator node))) + (recur)) + false) + true)))) + (next [this] + (if ^boolean (.hasNext this) + (.next next-iter) + (throw (js/Error. "No such element")))) + (remove [_] (js/Error. "Unsupported operation"))) + +(deftype ArrayNode [edit ^:mutable cnt ^:mutable arr] + Object + (inode-assoc [inode shift hash key val added-leaf?] + (let [idx (mask hash shift) + node (aget arr idx)] + (if (nil? node) + (ArrayNode. nil (inc cnt) (clone-and-set arr idx (.inode-assoc (.-EMPTY BitmapIndexedNode) (+ shift 5) hash key val added-leaf?))) + (let [n (.inode-assoc node (+ shift 5) hash key val added-leaf?)] + (if (identical? n node) + inode + (ArrayNode. nil cnt (clone-and-set arr idx n))))))) + + (inode-without [inode shift hash key] + (let [idx (mask hash shift) + node (aget arr idx)] + (if-not (nil? node) + (let [n (.inode-without node (+ shift 5) hash key)] + (cond + (identical? n node) + inode + + (nil? n) + (if (<= cnt 8) + (pack-array-node inode nil idx) + (ArrayNode. nil (dec cnt) (clone-and-set arr idx n))) + + :else + (ArrayNode. nil cnt (clone-and-set arr idx n)))) + inode))) + + (inode-lookup [inode shift hash key not-found] + (let [idx (mask hash shift) + node (aget arr idx)] + (if-not (nil? node) + (.inode-lookup node (+ shift 5) hash key not-found) + not-found))) + + (inode-find [inode shift hash key not-found] + (let [idx (mask hash shift) + node (aget arr idx)] + (if-not (nil? node) + (.inode-find node (+ shift 5) hash key not-found) + not-found))) + + (inode-seq [inode] + (create-array-node-seq arr)) + + (ensure-editable [inode e] + (if (identical? e edit) + inode + (ArrayNode. e cnt (aclone arr)))) + + (inode-assoc! [inode edit shift hash key val added-leaf?] + (let [idx (mask hash shift) + node (aget arr idx)] + (if (nil? node) + (let [editable (edit-and-set inode edit idx (.inode-assoc! (.-EMPTY BitmapIndexedNode) edit (+ shift 5) hash key val added-leaf?))] + (set! (.-cnt editable) (inc (.-cnt editable))) + editable) + (let [n (.inode-assoc! node edit (+ shift 5) hash key val added-leaf?)] + (if (identical? n node) + inode + (edit-and-set inode edit idx n)))))) + + (inode-without! [inode edit shift hash key removed-leaf?] + (let [idx (mask hash shift) + node (aget arr idx)] + (if (nil? node) + inode + (let [n (.inode-without! node edit (+ shift 5) hash key removed-leaf?)] + (cond + (identical? n node) + inode + + (nil? n) + (if (<= cnt 8) + (pack-array-node inode edit idx) + (let [editable (edit-and-set inode edit idx n)] + (set! (.-cnt editable) (dec (.-cnt editable))) + editable)) + + :else + (edit-and-set inode edit idx n)))))) + + (kv-reduce [inode f init] + (let [len (alength arr)] ; actually 32 + (loop [i 0 init init] + (if (< i len) + (let [node (aget arr i)] + (if-not (nil? node) + (let [init (.kv-reduce node f init)] + (if (reduced? init) + @init + (recur (inc i) init))) + (recur (inc i) init))) + init)))) + + IIterable + (-iterator [coll] + (ArrayNodeIterator. arr 0 nil))) + +(defn- hash-collision-node-find-index [arr cnt key] + (let [lim (* 2 cnt)] + (loop [i 0] + (if (< i lim) + (if (key-test key (aget arr i)) + i + (recur (+ i 2))) + -1)))) + +(deftype HashCollisionNode [edit + ^:mutable collision-hash + ^:mutable cnt + ^:mutable arr] + Object + (inode-assoc [inode shift hash key val added-leaf?] + (if (== hash collision-hash) + (let [idx (hash-collision-node-find-index arr cnt key)] + (if (== idx -1) + (let [len (* 2 cnt) + new-arr (make-array (+ len 2))] + (array-copy arr 0 new-arr 0 len) + (aset new-arr len key) + (aset new-arr (inc len) val) + (set! (.-val added-leaf?) true) + (HashCollisionNode. nil collision-hash (inc cnt) new-arr)) + (if (= (aget arr (inc idx)) val) + inode + (HashCollisionNode. nil collision-hash cnt (clone-and-set arr (inc idx) val))))) + (.inode-assoc (BitmapIndexedNode. nil (bitpos collision-hash shift) (array nil inode)) + shift hash key val added-leaf?))) + + (inode-without [inode shift hash key] + (let [idx (hash-collision-node-find-index arr cnt key)] + (cond (== idx -1) inode + (== cnt 1) nil + :else (HashCollisionNode. nil collision-hash (dec cnt) (remove-pair arr (quot idx 2)))))) + + (inode-lookup [inode shift hash key not-found] + (let [idx (hash-collision-node-find-index arr cnt key)] + (cond (< idx 0) not-found + (key-test key (aget arr idx)) (aget arr (inc idx)) + :else not-found))) + + (inode-find [inode shift hash key not-found] + (let [idx (hash-collision-node-find-index arr cnt key)] + (cond (< idx 0) not-found + (key-test key (aget arr idx)) [(aget arr idx) (aget arr (inc idx))] + :else not-found))) + + (inode-seq [inode] + (create-inode-seq arr)) + + (ensure-editable [inode e] + (if (identical? e edit) + inode + (let [new-arr (make-array (* 2 (inc cnt)))] + (array-copy arr 0 new-arr 0 (* 2 cnt)) + (HashCollisionNode. e collision-hash cnt new-arr)))) + + (ensure-editable-array [inode e count array] + (if (identical? e edit) + (do (set! arr array) + (set! cnt count) + inode) + (HashCollisionNode. edit collision-hash count array))) + + (inode-assoc! [inode edit shift hash key val added-leaf?] + (if (== hash collision-hash) + (let [idx (hash-collision-node-find-index arr cnt key)] + (if (== idx -1) + (if (> (alength arr) (* 2 cnt)) + (let [editable (edit-and-set inode edit (* 2 cnt) key (inc (* 2 cnt)) val)] + (set! (.-val added-leaf?) true) + (set! (.-cnt editable) (inc (.-cnt editable))) + editable) + (let [len (alength arr) + new-arr (make-array (+ len 2))] + (array-copy arr 0 new-arr 0 len) + (aset new-arr len key) + (aset new-arr (inc len) val) + (set! (.-val added-leaf?) true) + (.ensure-editable-array inode edit (inc cnt) new-arr))) + (if (identical? (aget arr (inc idx)) val) + inode + (edit-and-set inode edit (inc idx) val)))) + (.inode-assoc! (BitmapIndexedNode. edit (bitpos collision-hash shift) (array nil inode nil nil)) + edit shift hash key val added-leaf?))) + + (inode-without! [inode edit shift hash key removed-leaf?] + (let [idx (hash-collision-node-find-index arr cnt key)] + (if (== idx -1) + inode + (do (set! (.-val removed-leaf?) true) + (if (== cnt 1) + nil + (let [editable (.ensure-editable inode edit) + earr (.-arr editable)] + (aset earr idx (aget earr (- (* 2 cnt) 2))) + (aset earr (inc idx) (aget earr (dec (* 2 cnt)))) + (aset earr (dec (* 2 cnt)) nil) + (aset earr (- (* 2 cnt) 2) nil) + (set! (.-cnt editable) (dec (.-cnt editable))) + editable)))))) + + (kv-reduce [inode f init] + (inode-kv-reduce arr f init)) + + IIterable + (-iterator [coll] + (NodeIterator. arr 0 nil nil))) + +(defn- create-node + ([shift key1 val1 key2hash key2 val2] + (let [key1hash (hash key1)] + (if (== key1hash key2hash) + (HashCollisionNode. nil key1hash 2 (array key1 val1 key2 val2)) + (let [added-leaf? (Box. false)] + (-> (.-EMPTY BitmapIndexedNode) + (.inode-assoc shift key1hash key1 val1 added-leaf?) + (.inode-assoc shift key2hash key2 val2 added-leaf?)))))) + ([edit shift key1 val1 key2hash key2 val2] + (let [key1hash (hash key1)] + (if (== key1hash key2hash) + (HashCollisionNode. nil key1hash 2 (array key1 val1 key2 val2)) + (let [added-leaf? (Box. false)] + (-> (.-EMPTY BitmapIndexedNode) + (.inode-assoc! edit shift key1hash key1 val1 added-leaf?) + (.inode-assoc! edit shift key2hash key2 val2 added-leaf?))))))) + +(deftype NodeSeq [meta nodes i s ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMeta + (-meta [coll] meta) + + IWithMeta + (-with-meta [coll meta] (NodeSeq. meta nodes i s __hash)) + + ICollection + (-conj [coll o] (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + ISequential + ISeq + (-first [coll] + (if (nil? s) + [(aget nodes i) (aget nodes (inc i))] + (first s))) + + (-rest [coll] + (let [ret (if (nil? s) + (create-inode-seq nodes (+ i 2) nil) + (create-inode-seq nodes i (next s)))] + (if-not (nil? ret) ret ()))) + + ISeqable + (-seq [this] this) + + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable NodeSeq) + +(defn- create-inode-seq + ([nodes] + (create-inode-seq nodes 0 nil)) + ([nodes i s] + (if (nil? s) + (let [len (alength nodes)] + (loop [j i] + (if (< j len) + (if-not (nil? (aget nodes j)) + (NodeSeq. nil nodes j nil nil) + (if-let [node (aget nodes (inc j))] + (if-let [node-seq (.inode-seq node)] + (NodeSeq. nil nodes (+ j 2) node-seq nil) + (recur (+ j 2))) + (recur (+ j 2))))))) + (NodeSeq. nil nodes i s nil)))) + +(deftype ArrayNodeSeq [meta nodes i s ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMeta + (-meta [coll] meta) + + IWithMeta + (-with-meta [coll meta] (ArrayNodeSeq. meta nodes i s __hash)) + + ICollection + (-conj [coll o] (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + ISequential + ISeq + (-first [coll] (first s)) + (-rest [coll] + (let [ret (create-array-node-seq nil nodes i (next s))] + (if-not (nil? ret) ret ()))) + + ISeqable + (-seq [this] this) + + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable ArrayNodeSeq) + +(defn- create-array-node-seq + ([nodes] (create-array-node-seq nil nodes 0 nil)) + ([meta nodes i s] + (if (nil? s) + (let [len (alength nodes)] + (loop [j i] + (if (< j len) + (if-let [nj (aget nodes j)] + (if-let [ns (.inode-seq nj)] + (ArrayNodeSeq. meta nodes (inc j) ns nil) + (recur (inc j))) + (recur (inc j)))))) + (ArrayNodeSeq. meta nodes i s nil)))) + +(deftype HashMapIter [nil-val root-iter ^:mutable seen] + Object + (hasNext [_] + (or (not ^boolean seen) ^boolean (.hasNext root-iter))) + (next [_] + (if-not ^boolean seen + (do + (set! seen true) + [nil nil-val]) + (.next root-iter))) + (remove [_] (js/Error. "Unsupported operation"))) + +(deftype PersistentHashMap [meta cnt root ^boolean has-nil? nil-val ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + + ;; EXPERIMENTAL: subject to change + (keys [coll] + (es6-iterator (keys coll))) + (entries [coll] + (es6-entries-iterator (seq coll))) + (values [coll] + (es6-iterator (vals coll))) + (has [coll k] + (contains? coll k)) + (get [coll k not-found] + (-lookup coll k not-found)) + (forEach [coll f] + (doseq [[k v] coll] + (f v k))) + + ICloneable + (-clone [_] (PersistentHashMap. meta cnt root has-nil? nil-val __hash)) + + IIterable + (-iterator [coll] + (let [root-iter (if ^boolean root (-iterator root) (nil-iter))] + (if has-nil? + (HashMapIter. nil-val root-iter false) + root-iter))) + + IWithMeta + (-with-meta [coll meta] (PersistentHashMap. meta cnt root has-nil? nil-val __hash)) + + IMeta + (-meta [coll] meta) + + ICollection + (-conj [coll entry] + (if (vector? entry) + (-assoc coll (-nth entry 0) (-nth entry 1)) + (loop [ret coll es (seq entry)] + (if (nil? es) + ret + (let [e (first es)] + (if (vector? e) + (recur (-assoc ret (-nth e 0) (-nth e 1)) + (next es)) + (throw (js/Error. "conj on a map takes map entries or seqables of map entries")))))))) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY PersistentHashMap) meta)) + + IEquiv + (-equiv [coll other] (equiv-map coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-unordered-coll __hash)) + + ISeqable + (-seq [coll] + (when (pos? cnt) + (let [s (if-not (nil? root) (.inode-seq root))] + (if has-nil? + (cons [nil nil-val] s) + s)))) + + ICounted + (-count [coll] cnt) + + ILookup + (-lookup [coll k] + (-lookup coll k nil)) + + (-lookup [coll k not-found] + (cond (nil? k) (if has-nil? + nil-val + not-found) + (nil? root) not-found + :else (.inode-lookup root 0 (hash k) k not-found))) + + IAssociative + (-assoc [coll k v] + (if (nil? k) + (if (and has-nil? (identical? v nil-val)) + coll + (PersistentHashMap. meta (if has-nil? cnt (inc cnt)) root true v nil)) + (let [added-leaf? (Box. false) + new-root (-> (if (nil? root) + (.-EMPTY BitmapIndexedNode) + root) + (.inode-assoc 0 (hash k) k v added-leaf?))] + (if (identical? new-root root) + coll + (PersistentHashMap. meta (if ^boolean (.-val added-leaf?) (inc cnt) cnt) new-root has-nil? nil-val nil))))) + + (-contains-key? [coll k] + (cond (nil? k) has-nil? + (nil? root) false + :else (not (identical? (.inode-lookup root 0 (hash k) k lookup-sentinel) + lookup-sentinel)))) + + IFind + (-find [coll k] + (if has-nil? + [nil nil-val] + (.inode-find root 0 (hash k) k nil))) + + IMap + (-dissoc [coll k] + (cond (nil? k) (if has-nil? + (PersistentHashMap. meta (dec cnt) root false nil nil) + coll) + (nil? root) coll + :else + (let [new-root (.inode-without root 0 (hash k) k)] + (if (identical? new-root root) + coll + (PersistentHashMap. meta (dec cnt) new-root has-nil? nil-val nil))))) + + IKVReduce + (-kv-reduce [coll f init] + (let [init (if has-nil? (f init nil nil-val) init)] + (cond + (reduced? init) @init + (not (nil? root)) (.kv-reduce root f init) + :else init))) + + IFn + (-invoke [coll k] + (-lookup coll k)) + + (-invoke [coll k not-found] + (-lookup coll k not-found)) + + IEditableCollection + (-as-transient [coll] + (TransientHashMap. (js-obj) root cnt has-nil? nil-val))) + +(set! (.-EMPTY PersistentHashMap) (PersistentHashMap. nil 0 nil false nil empty-unordered-hash)) + +(set! (.-fromArray PersistentHashMap) + (fn [arr ^boolean no-clone] + (let [arr (if no-clone arr (aclone arr)) + len (alength arr)] + (loop [i 0 ret (transient (.-EMPTY PersistentHashMap))] + (if (< i len) + (recur (+ i 2) + (-assoc! ret (aget arr i) (aget arr (inc i)))) + (-persistent! ret)))))) + +(set! (.-fromArrays PersistentHashMap) + (fn [ks vs] + (let [len (alength ks)] + (loop [i 0 ^not-native out (transient (.-EMPTY PersistentHashMap))] + (if (< i len) + (recur (inc i) (-assoc! out (aget ks i) (aget vs i))) + (persistent! out)))))) + +(set! (.-createWithCheck PersistentHashMap) + (fn [arr] + (let [len (alength arr) + ret (transient (.-EMPTY PersistentHashMap))] + (loop [i 0] + (when (< i len) + (-assoc! ret (aget arr i) (aget arr (inc i))) + (if (not= (-count ret) (inc (/ i 2))) + (throw (js/Error. (str "Duplicate key: " (aget arr i)))) + (recur (+ i 2))))) + (-persistent! ret)))) + +(es6-iterable PersistentHashMap) + +(deftype TransientHashMap [^:mutable ^boolean edit + ^:mutable root + ^:mutable count + ^:mutable ^boolean has-nil? + ^:mutable nil-val] + Object + (conj! [tcoll o] + (if edit + (if (satisfies? IMapEntry o) + (.assoc! tcoll (key o) (val o)) + (loop [es (seq o) tcoll tcoll] + (if-let [e (first es)] + (recur (next es) + (.assoc! tcoll (key e) (val e))) + tcoll))) + (throw (js/Error. "conj! after persistent")))) + + (assoc! [tcoll k v] + (if edit + (if (nil? k) + (do (if (identical? nil-val v) + nil + (set! nil-val v)) + (if has-nil? + nil + (do (set! count (inc count)) + (set! has-nil? true))) + tcoll) + (let [added-leaf? (Box. false) + node (-> (if (nil? root) + (.-EMPTY BitmapIndexedNode) + root) + (.inode-assoc! edit 0 (hash k) k v added-leaf?))] + (if (identical? node root) + nil + (set! root node)) + (if ^boolean (.-val added-leaf?) + (set! count (inc count))) + tcoll)) + (throw (js/Error. "assoc! after persistent!")))) + + (without! [tcoll k] + (if edit + (if (nil? k) + (if has-nil? + (do (set! has-nil? false) + (set! nil-val nil) + (set! count (dec count)) + tcoll) + tcoll) + (if (nil? root) + tcoll + (let [removed-leaf? (Box. false) + node (.inode-without! root edit 0 (hash k) k removed-leaf?)] + (if (identical? node root) + nil + (set! root node)) + (if ^boolean (.-val removed-leaf?) + (set! count (dec count))) + tcoll))) + (throw (js/Error. "dissoc! after persistent!")))) + + (persistent! [tcoll] + (if edit + (do (set! edit nil) + (PersistentHashMap. nil count root has-nil? nil-val nil)) + (throw (js/Error. "persistent! called twice")))) + + ICounted + (-count [coll] + (if edit + count + (throw (js/Error. "count after persistent!")))) + + ILookup + (-lookup [tcoll k] + (if (nil? k) + (if has-nil? + nil-val) + (if (nil? root) + nil + (.inode-lookup root 0 (hash k) k)))) + + (-lookup [tcoll k not-found] + (if (nil? k) + (if has-nil? + nil-val + not-found) + (if (nil? root) + not-found + (.inode-lookup root 0 (hash k) k not-found)))) + + ITransientCollection + (-conj! [tcoll val] (.conj! tcoll val)) + + (-persistent! [tcoll] (.persistent! tcoll)) + + ITransientAssociative + (-assoc! [tcoll key val] (.assoc! tcoll key val)) + + ITransientMap + (-dissoc! [tcoll key] (.without! tcoll key))) + +;;; PersistentTreeMap + +(defn- tree-map-seq-push [node stack ^boolean ascending?] + (loop [t node stack stack] + (if-not (nil? t) + (recur (if ascending? (.-left t) (.-right t)) + (conj stack t)) + stack))) + +(deftype PersistentTreeMapSeq [meta stack ^boolean ascending? cnt ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ISeqable + (-seq [this] this) + + ISequential + ISeq + (-first [this] (peek stack)) + (-rest [this] + (let [t (first stack) + next-stack (tree-map-seq-push (if ascending? (.-right t) (.-left t)) + (next stack) + ascending?)] + (if-not (nil? next-stack) + (PersistentTreeMapSeq. nil next-stack ascending? (dec cnt) nil) + ()))) + + ICounted + (-count [coll] + (if (neg? cnt) + (inc (count (next coll))) + cnt)) + + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + ICollection + (-conj [coll o] (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) meta)) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + IMeta + (-meta [coll] meta) + + IWithMeta + (-with-meta [coll meta] + (PersistentTreeMapSeq. meta stack ascending? cnt __hash)) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable PersistentTreeMapSeq) + +(defn- create-tree-map-seq [tree ascending? cnt] + (PersistentTreeMapSeq. nil (tree-map-seq-push tree nil ascending?) ascending? cnt nil)) + +(declare RedNode BlackNode) + +(defn- balance-left [key val ins right] + (if (instance? RedNode ins) + (cond + (instance? RedNode (.-left ins)) + (RedNode. (.-key ins) (.-val ins) + (.blacken (.-left ins)) + (BlackNode. key val (.-right ins) right nil) + nil) + + (instance? RedNode (.-right ins)) + (RedNode. (.. ins -right -key) (.. ins -right -val) + (BlackNode. (.-key ins) (.-val ins) + (.-left ins) + (.. ins -right -left) + nil) + (BlackNode. key val + (.. ins -right -right) + right + nil) + nil) + + :else + (BlackNode. key val ins right nil)) + (BlackNode. key val ins right nil))) + +(defn- balance-right [key val left ins] + (if (instance? RedNode ins) + (cond + (instance? RedNode (.-right ins)) + (RedNode. (.-key ins) (.-val ins) + (BlackNode. key val left (.-left ins) nil) + (.blacken (.-right ins)) + nil) + + (instance? RedNode (.-left ins)) + (RedNode. (.. ins -left -key) (.. ins -left -val) + (BlackNode. key val left (.. ins -left -left) nil) + (BlackNode. (.-key ins) (.-val ins) + (.. ins -left -right) + (.-right ins) + nil) + nil) + + :else + (BlackNode. key val left ins nil)) + (BlackNode. key val left ins nil))) + +(defn- balance-left-del [key val del right] + (cond + (instance? RedNode del) + (RedNode. key val (.blacken del) right nil) + + (instance? BlackNode right) + (balance-right key val del (.redden right)) + + (and (instance? RedNode right) (instance? BlackNode (.-left right))) + (RedNode. (.. right -left -key) (.. right -left -val) + (BlackNode. key val del (.. right -left -left) nil) + (balance-right (.-key right) (.-val right) + (.. right -left -right) + (.redden (.-right right))) + nil) + + :else + (throw (js/Error. "red-black tree invariant violation")))) + +(defn- balance-right-del [key val left del] + (cond + (instance? RedNode del) + (RedNode. key val left (.blacken del) nil) + + (instance? BlackNode left) + (balance-left key val (.redden left) del) + + (and (instance? RedNode left) (instance? BlackNode (.-right left))) + (RedNode. (.. left -right -key) (.. left -right -val) + (balance-left (.-key left) (.-val left) + (.redden (.-left left)) + (.. left -right -left)) + (BlackNode. key val (.. left -right -right) del nil) + nil) + + :else + (throw (js/Error. "red-black tree invariant violation")))) + +(defn- tree-map-kv-reduce [node f init] + (let [init (if-not (nil? (.-left node)) + (tree-map-kv-reduce (.-left node) f init) + init)] + (if (reduced? init) + @init + (let [init (f init (.-key node) (.-val node))] + (if (reduced? init) + @init + (let [init (if-not (nil? (.-right node)) + (tree-map-kv-reduce (.-right node) f init) + init)] + (if (reduced? init) + @init + init))))))) + +(deftype BlackNode [key val left right ^:mutable __hash] + Object + (add-left [node ins] + (.balance-left ins node)) + + (add-right [node ins] + (.balance-right ins node)) + + (remove-left [node del] + (balance-left-del key val del right)) + + (remove-right [node del] + (balance-right-del key val left del)) + + (blacken [node] node) + + (redden [node] (RedNode. key val left right nil)) + + (balance-left [node parent] + (BlackNode. (.-key parent) (.-val parent) node (.-right parent) nil)) + + (balance-right [node parent] + (BlackNode. (.-key parent) (.-val parent) (.-left parent) node nil)) + + (replace [node key val left right] + (BlackNode. key val left right nil)) + + (kv-reduce [node f init] + (tree-map-kv-reduce node f init)) + + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMapEntry + (-key [node] key) + (-val [node] val) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IMeta + (-meta [node] nil) + + IWithMeta + (-with-meta [node meta] + (-with-meta [key val] meta)) + + IStack + (-peek [node] val) + + (-pop [node] [key]) + + ICollection + (-conj [node o] [key val o]) + + IEmptyableCollection + (-empty [node] []) + + ISequential + ISeqable + (-seq [node] (list key val)) + + ICounted + (-count [node] 2) + + IIndexed + (-nth [node n] + (cond (== n 0) key + (== n 1) val + :else (throw (js/Error. "Index out of bounds")))) + + (-nth [node n not-found] + (cond (== n 0) key + (== n 1) val + :else not-found)) + + ILookup + (-lookup [node k] (-nth node k nil)) + (-lookup [node k not-found] (-nth node k not-found)) + + IAssociative + (-assoc [node k v] + (assoc [key val] k v)) + (-contains-key? [node k] + (or (== k 0) (== k 1))) + + IFind + (-find [node k] + (cond + (== k 0) [0 key] + (== k 1) [1 val] + :else nil)) + + IVector + (-assoc-n [node n v] + (-assoc-n [key val] n v)) + + IReduce + (-reduce [node f] + (ci-reduce node f)) + + (-reduce [node f start] + (ci-reduce node f start)) + + IFn + (-invoke [node k] + (-nth node k)) + + (-invoke [node k not-found] + (-nth node k not-found))) + +(es6-iterable BlackNode) + +(deftype RedNode [key val left right ^:mutable __hash] + Object + (add-left [node ins] + (RedNode. key val ins right nil)) + + (add-right [node ins] + (RedNode. key val left ins nil)) + + (remove-left [node del] + (RedNode. key val del right nil)) + + (remove-right [node del] + (RedNode. key val left del nil)) + + (blacken [node] + (BlackNode. key val left right nil)) + + (redden [node] + (throw (js/Error. "red-black tree invariant violation"))) + + (balance-left [node parent] + (cond + (instance? RedNode left) + (RedNode. key val + (.blacken left) + (BlackNode. (.-key parent) (.-val parent) right (.-right parent) nil) + nil) + + (instance? RedNode right) + (RedNode. (.-key right) (.-val right) + (BlackNode. key val left (.-left right) nil) + (BlackNode. (.-key parent) (.-val parent) + (.-right right) + (.-right parent) + nil) + nil) + + :else + (BlackNode. (.-key parent) (.-val parent) node (.-right parent) nil))) + + (balance-right [node parent] + (cond + (instance? RedNode right) + (RedNode. key val + (BlackNode. (.-key parent) (.-val parent) + (.-left parent) + left + nil) + (.blacken right) + nil) + + (instance? RedNode left) + (RedNode. (.-key left) (.-val left) + (BlackNode. (.-key parent) (.-val parent) + (.-left parent) + (.-left left) + nil) + (BlackNode. key val (.-right left) right nil) + nil) + + :else + (BlackNode. (.-key parent) (.-val parent) (.-left parent) node nil))) + + (replace [node key val left right] + (RedNode. key val left right nil)) + + (kv-reduce [node f init] + (tree-map-kv-reduce node f init)) + + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMapEntry + (-key [node] key) + (-val [node] val) + + IHash + (-hash [coll] (caching-hash coll hash-ordered-coll __hash)) + + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + IMeta + (-meta [node] nil) + + IWithMeta + (-with-meta [node meta] + (-with-meta [key val] meta)) + + IStack + (-peek [node] val) + + (-pop [node] [key]) + + ICollection + (-conj [node o] [key val o]) + + IEmptyableCollection + (-empty [node] []) + + ISequential + ISeqable + (-seq [node] (list key val)) + + ICounted + (-count [node] 2) + + IIndexed + (-nth [node n] + (cond (== n 0) key + (== n 1) val + :else (throw (js/Error. "Index out of bounds")))) + + (-nth [node n not-found] + (cond (== n 0) key + (== n 1) val + :else not-found)) + + ILookup + (-lookup [node k] (-nth node k nil)) + (-lookup [node k not-found] (-nth node k not-found)) + + IAssociative + (-assoc [node k v] + (assoc [key val] k v)) + (-contains-key? [node k] + (or (== k 0) (== k 1))) + + IFind + (-find [node k] + (cond + (== k 0) [0 key] + (== k 1) [1 val] + :else nil)) + + IVector + (-assoc-n [node n v] + (-assoc-n [key val] n v)) + + IReduce + (-reduce [node f] + (ci-reduce node f)) + + (-reduce [node f start] + (ci-reduce node f start)) + + IFn + (-invoke [node k] + (-nth node k)) + + (-invoke [node k not-found] + (-nth node k not-found))) + +(es6-iterable RedNode) + +(defn- tree-map-add [comp tree k v found] + (if (nil? tree) + (RedNode. k v nil nil nil) + (let [c (comp k (.-key tree))] + (cond + (zero? c) + (do (aset found 0 tree) + nil) + + (neg? c) + (let [ins (tree-map-add comp (.-left tree) k v found)] + (if-not (nil? ins) + (.add-left tree ins))) + + :else + (let [ins (tree-map-add comp (.-right tree) k v found)] + (if-not (nil? ins) + (.add-right tree ins))))))) + +(defn- tree-map-append [left right] + (cond + (nil? left) + right + + (nil? right) + left + + (instance? RedNode left) + (if (instance? RedNode right) + (let [app (tree-map-append (.-right left) (.-left right))] + (if (instance? RedNode app) + (RedNode. (.-key app) (.-val app) + (RedNode. (.-key left) (.-val left) + (.-left left) + (.-left app) + nil) + (RedNode. (.-key right) (.-val right) + (.-right app) + (.-right right) + nil) + nil) + (RedNode. (.-key left) (.-val left) + (.-left left) + (RedNode. (.-key right) (.-val right) app (.-right right) nil) + nil))) + (RedNode. (.-key left) (.-val left) + (.-left left) + (tree-map-append (.-right left) right) + nil)) + + (instance? RedNode right) + (RedNode. (.-key right) (.-val right) + (tree-map-append left (.-left right)) + (.-right right) + nil) + + :else + (let [app (tree-map-append (.-right left) (.-left right))] + (if (instance? RedNode app) + (RedNode. (.-key app) (.-val app) + (BlackNode. (.-key left) (.-val left) + (.-left left) + (.-left app) + nil) + (BlackNode. (.-key right) (.-val right) + (.-right app) + (.-right right) + nil) + nil) + (balance-left-del (.-key left) (.-val left) + (.-left left) + (BlackNode. (.-key right) (.-val right) + app + (.-right right) + nil)))))) + +(defn- tree-map-remove [comp tree k found] + (if-not (nil? tree) + (let [c (comp k (.-key tree))] + (cond + (zero? c) + (do (aset found 0 tree) + (tree-map-append (.-left tree) (.-right tree))) + + (neg? c) + (let [del (tree-map-remove comp (.-left tree) k found)] + (if (or (not (nil? del)) (not (nil? (aget found 0)))) + (if (instance? BlackNode (.-left tree)) + (balance-left-del (.-key tree) (.-val tree) del (.-right tree)) + (RedNode. (.-key tree) (.-val tree) del (.-right tree) nil)))) + + :else + (let [del (tree-map-remove comp (.-right tree) k found)] + (if (or (not (nil? del)) (not (nil? (aget found 0)))) + (if (instance? BlackNode (.-right tree)) + (balance-right-del (.-key tree) (.-val tree) (.-left tree) del) + (RedNode. (.-key tree) (.-val tree) (.-left tree) del nil)))))))) + +(defn- tree-map-replace [comp tree k v] + (let [tk (.-key tree) + c (comp k tk)] + (cond (zero? c) (.replace tree tk v (.-left tree) (.-right tree)) + (neg? c) (.replace tree tk (.-val tree) (tree-map-replace comp (.-left tree) k v) (.-right tree)) + :else (.replace tree tk (.-val tree) (.-left tree) (tree-map-replace comp (.-right tree) k v))))) + +(declare key) + +(deftype PersistentTreeMap [comp tree cnt meta ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + + ;; EXPERIMENTAL: subject to change + (keys [coll] + (es6-iterator (keys coll))) + (entries [coll] + (es6-entries-iterator (seq coll))) + (values [coll] + (es6-iterator (vals coll))) + (has [coll k] + (contains? coll k)) + (get [coll k not-found] + (-lookup coll k not-found)) + (forEach [coll f] + (doseq [[k v] coll] + (f v k))) + + (entry-at [coll k] + (loop [t tree] + (if-not (nil? t) + (let [c (comp k (.-key t))] + (cond (zero? c) t + (neg? c) (recur (.-left t)) + :else (recur (.-right t))))))) + + ICloneable + (-clone [_] (PersistentTreeMap. comp tree cnt meta __hash)) + + IWithMeta + (-with-meta [coll meta] (PersistentTreeMap. comp tree cnt meta __hash)) + + IMeta + (-meta [coll] meta) + + ICollection + (-conj [coll entry] + (if (vector? entry) + (-assoc coll (-nth entry 0) (-nth entry 1)) + (loop [ret coll es (seq entry)] + (if (nil? es) + ret + (let [e (first es)] + (if (vector? e) + (recur (-assoc ret (-nth e 0) (-nth e 1)) + (next es)) + (throw (js/Error. "conj on a map takes map entries or seqables of map entries")))))))) + + IEmptyableCollection + (-empty [coll] (PersistentTreeMap. comp nil 0 meta 0)) + + IEquiv + (-equiv [coll other] (equiv-map coll other)) + + IHash + (-hash [coll] (caching-hash coll hash-unordered-coll __hash)) + + ICounted + (-count [coll] cnt) + + IKVReduce + (-kv-reduce [coll f init] + (if-not (nil? tree) + (tree-map-kv-reduce tree f init) + init)) + + IFn + (-invoke [coll k] + (-lookup coll k)) + + (-invoke [coll k not-found] + (-lookup coll k not-found)) + + ISeqable + (-seq [coll] + (if (pos? cnt) + (create-tree-map-seq tree true cnt))) + + IReversible + (-rseq [coll] + (if (pos? cnt) + (create-tree-map-seq tree false cnt))) + + ILookup + (-lookup [coll k] + (-lookup coll k nil)) + + (-lookup [coll k not-found] + (let [n (.entry-at coll k)] + (if-not (nil? n) + (.-val n) + not-found))) + + IAssociative + (-assoc [coll k v] + (let [found (array nil) + t (tree-map-add comp tree k v found)] + (if (nil? t) + (let [found-node (nth found 0)] + (if (= v (.-val found-node)) + coll + (PersistentTreeMap. comp (tree-map-replace comp tree k v) cnt meta nil))) + (PersistentTreeMap. comp (.blacken t) (inc cnt) meta nil)))) + + (-contains-key? [coll k] + (not (nil? (.entry-at coll k)))) + + IFind + (-find [coll k] + (.entry-at coll k)) + + IMap + (-dissoc [coll k] + (let [found (array nil) + t (tree-map-remove comp tree k found)] + (if (nil? t) + (if (nil? (nth found 0)) + coll + (PersistentTreeMap. comp nil 0 meta nil)) + (PersistentTreeMap. comp (.blacken t) (dec cnt) meta nil)))) + + ISorted + (-sorted-seq [coll ascending?] + (if (pos? cnt) + (create-tree-map-seq tree ascending? cnt))) + + (-sorted-seq-from [coll k ascending?] + (if (pos? cnt) + (loop [stack nil t tree] + (if-not (nil? t) + (let [c (comp k (.-key t))] + (cond + (zero? c) (PersistentTreeMapSeq. nil (conj stack t) ascending? -1 nil) + ascending? (if (neg? c) + (recur (conj stack t) (.-left t)) + (recur stack (.-right t))) + :else (if (pos? c) + (recur (conj stack t) (.-right t)) + (recur stack (.-left t))))) + (when-not (nil? stack) + (PersistentTreeMapSeq. nil stack ascending? -1 nil)))))) + + (-entry-key [coll entry] (key entry)) + + (-comparator [coll] comp)) + +(set! (.-EMPTY PersistentTreeMap) (PersistentTreeMap. compare nil 0 nil empty-unordered-hash)) + +(es6-iterable PersistentTreeMap) + +(defn hash-map + "keyval => key val + Returns a new hash map with supplied mappings." + [& keyvals] + (loop [in (seq keyvals), out (transient (.-EMPTY PersistentHashMap))] + (if in + (recur (nnext in) (assoc! out (first in) (second in))) + (persistent! out)))) + +(defn array-map + "keyval => key val + Returns a new array map with supplied mappings." + [& keyvals] + (let [arr (if (and (instance? IndexedSeq keyvals) (zero? (.-i keyvals))) + (.-arr keyvals) + (into-array keyvals))] + (.createAsIfByAssoc PersistentArrayMap arr))) + +(defn obj-map + "keyval => key val + Returns a new object map with supplied mappings." + [& keyvals] + (let [ks (array) + obj (js-obj)] + (loop [kvs (seq keyvals)] + (if kvs + (do (.push ks (first kvs)) + (aset obj (first kvs) (second kvs)) + (recur (nnext kvs))) + (.fromObject ObjMap ks obj))))) + +(defn sorted-map + "keyval => key val + Returns a new sorted map with supplied mappings." + ([& keyvals] + (loop [in (seq keyvals) out (.-EMPTY PersistentTreeMap)] + (if in + (recur (nnext in) (assoc out (first in) (second in))) + out)))) + +(defn sorted-map-by + "keyval => key val + Returns a new sorted map with supplied mappings, using the supplied comparator." + ([comparator & keyvals] + (loop [in (seq keyvals) + out (PersistentTreeMap. (fn->comparator comparator) nil 0 nil 0)] + (if in + (recur (nnext in) (assoc out (first in) (second in))) + out)))) + +(deftype KeySeq [^not-native mseq _meta] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMeta + (-meta [coll] _meta) + + IWithMeta + (-with-meta [coll new-meta] (KeySeq. mseq new-meta)) + + ISeqable + (-seq [coll] coll) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + ICollection + (-conj [coll o] + (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) _meta)) + + IHash + (-hash [coll] (hash-ordered-coll coll)) + + ISeq + (-first [coll] + (let [^not-native me (-first mseq)] + (-key me))) + + (-rest [coll] + (let [nseq (if (satisfies? INext mseq) + (-next mseq) + (next mseq))] + (if-not (nil? nseq) + (KeySeq. nseq _meta) + ()))) + + INext + (-next [coll] + (let [nseq (if (satisfies? INext mseq) + (-next mseq) + (next mseq))] + (when-not (nil? nseq) + (KeySeq. nseq _meta)))) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable KeySeq) + +(defn keys + "Returns a sequence of the map's keys." + [hash-map] + (when-let [mseq (seq hash-map)] + (KeySeq. mseq nil))) + +(defn key + "Returns the key of the map entry." + [map-entry] + (-key map-entry)) + +(deftype ValSeq [^not-native mseq _meta] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + IMeta + (-meta [coll] _meta) + + IWithMeta + (-with-meta [coll new-meta] (ValSeq. mseq new-meta)) + + ISeqable + (-seq [coll] coll) + + ISequential + IEquiv + (-equiv [coll other] (equiv-sequential coll other)) + + ICollection + (-conj [coll o] + (cons o coll)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY List) _meta)) + + IHash + (-hash [coll] (hash-ordered-coll coll)) + + ISeq + (-first [coll] + (let [^not-native me (-first mseq)] + (-val me))) + + (-rest [coll] + (let [nseq (if (satisfies? INext mseq) + (-next mseq) + (next mseq))] + (if-not (nil? nseq) + (ValSeq. nseq _meta) + ()))) + + INext + (-next [coll] + (let [nseq (if (satisfies? INext mseq) + (-next mseq) + (next mseq))] + (when-not (nil? nseq) + (ValSeq. nseq _meta)))) + + IReduce + (-reduce [coll f] (seq-reduce f coll)) + (-reduce [coll f start] (seq-reduce f start coll))) + +(es6-iterable ValSeq) + +(defn vals + "Returns a sequence of the map's values." + [hash-map] + (when-let [mseq (seq hash-map)] + (ValSeq. mseq nil))) + +(defn val + "Returns the value in the map entry." + [map-entry] + (-val map-entry)) + +(defn merge + "Returns a map that consists of the rest of the maps conj-ed onto + the first. If a key occurs in more than one map, the mapping from + the latter (left-to-right) will be the mapping in the result." + [& maps] + (when (some identity maps) + (reduce #(conj (or %1 {}) %2) maps))) + +(defn merge-with + "Returns a map that consists of the rest of the maps conj-ed onto + the first. If a key occurs in more than one map, the mapping(s) + from the latter (left-to-right) will be combined with the mapping in + the result by calling (f val-in-result val-in-latter)." + [f & maps] + (when (some identity maps) + (let [merge-entry (fn [m e] + (let [k (first e) v (second e)] + (if (contains? m k) + (assoc m k (f (get m k) v)) + (assoc m k v)))) + merge2 (fn [m1 m2] + (reduce merge-entry (or m1 {}) (seq m2)))] + (reduce merge2 maps)))) + +(defn select-keys + "Returns a map containing only those entries in map whose key is in keys" + [map keyseq] + (loop [ret {} keys (seq keyseq)] + (if keys + (let [key (first keys) + entry (get map key ::not-found)] + (recur + (if (not= entry ::not-found) + (assoc ret key entry) + ret) + (next keys))) + (-with-meta ret (meta map))))) + +;;; PersistentHashSet + +(declare TransientHashSet) + +(deftype HashSetIter [iter] + Object + (hasNext [_] + (.hasNext iter)) + (next [_] + (if ^boolean (.hasNext iter) + (aget (.-tail (.next iter)) 0) + (throw (js/Error. "No such element")))) + (remove [_] (js/Error. "Unsupported operation"))) + +(deftype PersistentHashSet [meta hash-map ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + + ;; EXPERIMENTAL: subject to change + (keys [coll] + (es6-iterator (seq coll))) + (entries [coll] + (es6-set-entries-iterator (seq coll))) + (values [coll] + (es6-iterator (seq coll))) + (has [coll k] + (contains? coll k)) + (forEach [coll f] + (doseq [[k v] coll] + (f v k))) + + ICloneable + (-clone [_] (PersistentHashSet. meta hash-map __hash)) + + IIterable + (-iterator [coll] + (HashSetIter. (-iterator hash-map))) + + IWithMeta + (-with-meta [coll meta] (PersistentHashSet. meta hash-map __hash)) + + IMeta + (-meta [coll] meta) + + ICollection + (-conj [coll o] + (PersistentHashSet. meta (assoc hash-map o nil) nil)) + + IEmptyableCollection + (-empty [coll] (-with-meta (.-EMPTY PersistentHashSet) meta)) + + IEquiv + (-equiv [coll other] + (and + (set? other) + (== (count coll) (count other)) + (every? #(contains? coll %) + other))) + + IHash + (-hash [coll] (caching-hash coll hash-unordered-coll __hash)) + + ISeqable + (-seq [coll] (keys hash-map)) + + ICounted + (-count [coll] (-count hash-map)) + + ILookup + (-lookup [coll v] + (-lookup coll v nil)) + (-lookup [coll v not-found] + (if (-contains-key? hash-map v) + v + not-found)) + + ISet + (-disjoin [coll v] + (PersistentHashSet. meta (-dissoc hash-map v) nil)) + + IFn + (-invoke [coll k] + (-lookup coll k)) + (-invoke [coll k not-found] + (-lookup coll k not-found)) + + IEditableCollection + (-as-transient [coll] (TransientHashSet. (-as-transient hash-map)))) + +(set! (.-EMPTY PersistentHashSet) + (PersistentHashSet. nil (.-EMPTY PersistentArrayMap) empty-unordered-hash)) + +(set! (.-fromArray PersistentHashSet) + (fn [items ^boolean no-clone] + (let [len (alength items)] + (if (<= len (.-HASHMAP-THRESHOLD PersistentArrayMap)) + (let [arr (if no-clone items (aclone items))] + (loop [i 0 + out (transient (.-EMPTY PersistentArrayMap))] + (if (< i len) + (recur (inc i) (-assoc! out (aget items i) nil)) + (PersistentHashSet. nil (-persistent! out) nil)))) + (loop [i 0 + out (transient (.-EMPTY PersistentHashSet))] + (if (< i len) + (recur (inc i) (-conj! out (aget items i))) + (-persistent! out))))))) + +(set! (.-createWithCheck PersistentHashSet) + (fn [items] + (let [len (alength items) + t (-as-transient (.-EMPTY PersistentHashSet))] + (dotimes [i len] + (-conj! t (aget items i)) + (when-not (= (count t) (inc i)) + (throw (js/Error. (str "Duplicate key: " (aget items i)))))) + (-persistent! t)))) + +(set! (.-createAsIfByAssoc PersistentHashSet) + (fn [items] + (let [len (alength items) + t (-as-transient (.-EMPTY PersistentHashSet))] + (dotimes [i len] (-conj! t (aget items i))) + (-persistent! t)))) + +(es6-iterable PersistentHashSet) + +(deftype TransientHashSet [^:mutable transient-map] + ITransientCollection + (-conj! [tcoll o] + (set! transient-map (assoc! transient-map o nil)) + tcoll) + + (-persistent! [tcoll] + (PersistentHashSet. nil (persistent! transient-map) nil)) + + ITransientSet + (-disjoin! [tcoll v] + (set! transient-map (dissoc! transient-map v)) + tcoll) + + ICounted + (-count [tcoll] (count transient-map)) + + ILookup + (-lookup [tcoll v] + (-lookup tcoll v nil)) + + (-lookup [tcoll v not-found] + (if (identical? (-lookup transient-map v lookup-sentinel) lookup-sentinel) + not-found + v)) + + IFn + (-invoke [tcoll k] + (if (identical? (-lookup transient-map k lookup-sentinel) lookup-sentinel) + nil + k)) + + (-invoke [tcoll k not-found] + (if (identical? (-lookup transient-map k lookup-sentinel) lookup-sentinel) + not-found + k))) + +(deftype PersistentTreeSet [meta tree-map ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + + ;; EXPERIMENTAL: subject to change + (keys [coll] + (es6-iterator (seq coll))) + (entries [coll] + (es6-set-entries-iterator (seq coll))) + (values [coll] + (es6-iterator (seq coll))) + (has [coll k] + (contains? coll k)) + (forEach [coll f] + (doseq [[k v] coll] + (f v k))) + + ICloneable + (-clone [_] (PersistentTreeSet. meta tree-map __hash)) + + IWithMeta + (-with-meta [coll meta] (PersistentTreeSet. meta tree-map __hash)) + + IMeta + (-meta [coll] meta) + + ICollection + (-conj [coll o] + (PersistentTreeSet. meta (assoc tree-map o nil) nil)) + + IEmptyableCollection + (-empty [coll] (PersistentTreeSet. meta (-empty tree-map) 0)) + + IEquiv + (-equiv [coll other] + (and + (set? other) + (== (count coll) (count other)) + (every? #(contains? coll %) + other))) + + IHash + (-hash [coll] (caching-hash coll hash-unordered-coll __hash)) + + ISeqable + (-seq [coll] (keys tree-map)) + + ISorted + (-sorted-seq [coll ascending?] + (map key (-sorted-seq tree-map ascending?))) + + (-sorted-seq-from [coll k ascending?] + (map key (-sorted-seq-from tree-map k ascending?))) + + (-entry-key [coll entry] entry) + + (-comparator [coll] (-comparator tree-map)) + + IReversible + (-rseq [coll] + (if (pos? (count tree-map)) + (map key (rseq tree-map)))) + + ICounted + (-count [coll] (count tree-map)) + + ILookup + (-lookup [coll v] + (-lookup coll v nil)) + (-lookup [coll v not-found] + (let [n (.entry-at tree-map v)] + (if-not (nil? n) + (.-key n) + not-found))) + + ISet + (-disjoin [coll v] + (PersistentTreeSet. meta (dissoc tree-map v) nil)) + + IFn + (-invoke [coll k] + (-lookup coll k)) + (-invoke [coll k not-found] + (-lookup coll k not-found))) + +(set! (.-EMPTY PersistentTreeSet) + (PersistentTreeSet. nil (.-EMPTY PersistentTreeMap) empty-unordered-hash)) + +(es6-iterable PersistentTreeSet) + +(defn set-from-indexed-seq [iseq] + (let [arr (.-arr iseq) + ret (areduce arr i ^not-native res (-as-transient #{}) + (-conj! res (aget arr i)))] + (-persistent! ^not-native ret))) + +(defn set + "Returns a set of the distinct elements of coll." + [coll] + (let [in (seq coll)] + (cond + (nil? in) #{} + + (and (instance? IndexedSeq in) (zero? (.-i in))) + (.createAsIfByAssoc PersistentHashSet (.-arr in)) + + :else + (loop [^not-native in in + ^not-native out (-as-transient #{})] + (if-not (nil? in) + (recur (next in) (-conj! out (-first in))) + (persistent! out)))))) + +(defn hash-set + "Returns a new hash set with supplied keys. Any equal keys are + handled as if by repeated uses of conj." + ([] #{}) + ([& keys] (set keys))) + +(defn sorted-set + "Returns a new sorted set with supplied keys." + ([& keys] + (reduce -conj (.-EMPTY PersistentTreeSet) keys))) + +(defn sorted-set-by + "Returns a new sorted set with supplied keys, using the supplied comparator." + ([comparator & keys] + (reduce -conj + (PersistentTreeSet. nil (sorted-map-by comparator) 0) + keys))) + +(defn replace + "Given a map of replacement pairs and a vector/collection, returns a + vector/seq with any elements = a key in smap replaced with the + corresponding val in smap. Returns a transducer when no collection + is provided." + ([smap] + (map #(if-let [e (find smap %)] (val e) %))) + ([smap coll] + (if (vector? coll) + (let [n (count coll)] + (reduce (fn [v i] + (if-let [e (find smap (nth v i))] + (assoc v i (second e)) + v)) + coll (take n (iterate inc 0)))) + (map #(if-let [e (find smap %)] (second e) %) coll)))) + +(defn distinct + "Returns a lazy sequence of the elements of coll with duplicates removed. + Returns a stateful transducer when no collection is provided." + ([] + (fn [rf] + (let [seen (volatile! #{})] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (if (contains? @seen input) + result + (do (vswap! seen conj input) + (rf result input)))))))) + ([coll] + (let [step (fn step [xs seen] + (lazy-seq + ((fn [[f :as xs] seen] + (when-let [s (seq xs)] + (if (contains? seen f) + (recur (rest s) seen) + (cons f (step (rest s) (conj seen f)))))) + xs seen)))] + (step coll #{})))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(defn butlast + "Return a seq of all but the last item in coll, in linear time" + [s] + (loop [ret [] s s] + (if (next s) + (recur (conj ret (first s)) (next s)) + (seq ret)))) + +(defn name + "Returns the name String of a string, symbol or keyword." + [x] + (if (implements? INamed x) + (-name ^not-native x) + (if (string? x) + x + (throw (js/Error. (str "Doesn't support name: " x)))))) + +(defn zipmap + "Returns a map with the keys mapped to the corresponding vals." + [keys vals] + (loop [map (transient {}) + ks (seq keys) + vs (seq vals)] + (if (and ks vs) + (recur (assoc! map (first ks) (first vs)) + (next ks) + (next vs)) + (persistent! map)))) + +(defn max-key + "Returns the x for which (k x), a number, is greatest." + ([k x] x) + ([k x y] (if (> (k x) (k y)) x y)) + ([k x y & more] + (reduce #(max-key k %1 %2) (max-key k x y) more))) + +(defn min-key + "Returns the x for which (k x), a number, is least." + ([k x] x) + ([k x y] (if (< (k x) (k y)) x y)) + ([k x y & more] + (reduce #(min-key k %1 %2) (min-key k x y) more))) + +(deftype ArrayList [^:mutable arr] + Object + (add [_ x] (.push arr x)) + (size [_] (alength arr)) + (clear [_] (set! arr (array))) + (isEmpty [_] (zero? (alength arr))) + (toArray [_] arr)) + +(defn array-list [] + (ArrayList. (array))) + +(defn partition-all + "Returns a lazy sequence of lists like partition, but may include + partitions with fewer than n items at the end. Returns a stateful + transducer when no collection is provided." + ([n] + (fn [rf] + (let [a (array-list)] + (fn + ([] (rf)) + ([result] + (let [result (if (.isEmpty a) + result + (let [v (vec (.toArray a))] + ;;clear first! + (.clear a) + (unreduced (rf result v))))] + (rf result))) + ([result input] + (.add a input) + (if (== n (.size a)) + (let [v (vec (.toArray a))] + (.clear a) + (rf result v)) + result)))))) + ([n coll] + (partition-all n n coll)) + ([n step coll] + (lazy-seq + (when-let [s (seq coll)] + (cons (take n s) (partition-all n step (drop step s))))))) + +(defn take-while + "Returns a lazy sequence of successive items from coll while + (pred item) returns true. pred must be free of side-effects. + Returns a transducer when no collection is provided." + ([pred] + (fn [rf] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (if (pred input) + (rf result input) + (reduced result)))))) + ([pred coll] + (lazy-seq + (when-let [s (seq coll)] + (when (pred (first s)) + (cons (first s) (take-while pred (rest s)))))))) + +(defn mk-bound-fn + [sc test key] + (fn [e] + (let [comp (-comparator sc)] + (test (comp (-entry-key sc e) key) 0)))) + +(defn subseq + "sc must be a sorted collection, test(s) one of <, <=, > or + >=. Returns a seq of those entries with keys ek for + which (test (.. sc comparator (compare ek key)) 0) is true" + ([sc test key] + (let [include (mk-bound-fn sc test key)] + (if (#{> >=} test) + (when-let [[e :as s] (-sorted-seq-from sc key true)] + (if (include e) s (next s))) + (take-while include (-sorted-seq sc true))))) + ([sc start-test start-key end-test end-key] + (when-let [[e :as s] (-sorted-seq-from sc start-key true)] + (take-while (mk-bound-fn sc end-test end-key) + (if ((mk-bound-fn sc start-test start-key) e) s (next s)))))) + +(defn rsubseq + "sc must be a sorted collection, test(s) one of <, <=, > or + >=. Returns a reverse seq of those entries with keys ek for + which (test (.. sc comparator (compare ek key)) 0) is true" + ([sc test key] + (let [include (mk-bound-fn sc test key)] + (if (#{< <=} test) + (when-let [[e :as s] (-sorted-seq-from sc key false)] + (if (include e) s (next s))) + (take-while include (-sorted-seq sc false))))) + ([sc start-test start-key end-test end-key] + (when-let [[e :as s] (-sorted-seq-from sc end-key false)] + (take-while (mk-bound-fn sc start-test start-key) + (if ((mk-bound-fn sc end-test end-key) e) s (next s)))))) + +(deftype RangeIterator [^:mutable i end step] + Object + (hasNext [_] + (if (pos? step) + (< i end) + (> i end))) + (next [_] + (let [ret i] + (set! i (+ i step)) + ret))) + +(deftype Range [meta start end step ^:mutable __hash] + Object + (toString [coll] + (pr-str* coll)) + (equiv [this other] + (-equiv this other)) + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ICloneable + (-clone [_] (Range. meta start end step __hash)) + + IWithMeta + (-with-meta [rng meta] (Range. meta start end step __hash)) + + IMeta + (-meta [rng] meta) + + ISeqable + (-seq [rng] + (cond + (pos? step) (when (< start end) rng) + (neg? step) (when (> start end) rng) + :else (when-not (== start end) rng))) + + ISeq + (-first [rng] + (when-not (nil? (-seq rng)) start)) + (-rest [rng] + (if-not (nil? (-seq rng)) + (Range. meta (+ start step) end step nil) + ())) + + IIterable + (-iterator [_] + (RangeIterator. start end step)) + + INext + (-next [rng] + (if (pos? step) + (when (< (+ start step) end) + (Range. meta (+ start step) end step nil)) + (when (> (+ start step) end) + (Range. meta (+ start step) end step nil)))) + + ICollection + (-conj [rng o] (cons o rng)) + + IEmptyableCollection + (-empty [rng] (-with-meta (.-EMPTY List) meta)) + + ISequential + IEquiv + (-equiv [rng other] (equiv-sequential rng other)) + + IHash + (-hash [rng] (caching-hash rng hash-ordered-coll __hash)) + + ICounted + (-count [rng] + (if-not (-seq rng) + 0 + (Math/ceil (/ (- end start) step)))) + + IIndexed + (-nth [rng n] + (if (< n (-count rng)) + (+ start (* n step)) + (if (and (> start end) (zero? step)) + start + (throw (js/Error. "Index out of bounds"))))) + (-nth [rng n not-found] + (if (< n (-count rng)) + (+ start (* n step)) + (if (and (> start end) (zero? step)) + start + not-found))) + + IReduce + (-reduce [rng f] (ci-reduce rng f)) + (-reduce [rng f init] + (loop [i start ret init] + (if (if (pos? step) (< i end) (> i end)) + (let [ret (f ret i)] + (if (reduced? ret) + @ret + (recur (+ i step) ret))) + ret)))) + +(es6-iterable Range) + +(defn range + "Returns a lazy seq of nums from start (inclusive) to end + (exclusive), by step, where start defaults to 0, step to 1, + and end to infinity." + ([] (range 0 (.-MAX_VALUE js/Number) 1)) + ([end] (range 0 end 1)) + ([start end] (range start end 1)) + ([start end step] (Range. nil start end step nil))) + +(defn take-nth + "Returns a lazy seq of every nth item in coll. Returns a stateful + transducer when no collection is provided." + ([n] + {:pre [(number? n)]} + (fn [rf] + (let [ia (volatile! -1)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (let [i (vswap! ia inc)] + (if (zero? (rem i n)) + (rf result input) + result))))))) + ([n coll] + {:pre [(number? n)]} + (lazy-seq + (when-let [s (seq coll)] + (cons (first s) (take-nth n (drop n s))))))) + +(defn split-with + "Returns a vector of [(take-while pred coll) (drop-while pred coll)]" + [pred coll] + [(take-while pred coll) (drop-while pred coll)]) + +(defn partition-by + "Applies f to each value in coll, splitting it each time f returns a + new value. Returns a lazy seq of partitions. Returns a stateful + transducer when no collection is provided." + ([f] + (fn [rf] + (let [a (array-list) + pa (volatile! ::none)] + (fn + ([] (rf)) + ([result] + (let [result (if (.isEmpty a) + result + (let [v (vec (.toArray a))] + ;;clear first! + (.clear a) + (unreduced (rf result v))))] + (rf result))) + ([result input] + (let [pval @pa + val (f input)] + (vreset! pa val) + (if (or (keyword-identical? pval ::none) + (= val pval)) + (do + (.add a input) + result) + (let [v (vec (.toArray a))] + (.clear a) + (let [ret (rf result v)] + (when-not (reduced? ret) + (.add a input)) + ret))))))))) + ([f coll] + (lazy-seq + (when-let [s (seq coll)] + (let [fst (first s) + fv (f fst) + run (cons fst (take-while #(= fv (f %)) (next s)))] + (cons run (partition-by f (seq (drop (count run) s))))))))) + +(defn frequencies + "Returns a map from distinct items in coll to the number of times + they appear." + [coll] + (persistent! + (reduce (fn [counts x] + (assoc! counts x (inc (get counts x 0)))) + (transient {}) coll))) + +(defn reductions + "Returns a lazy seq of the intermediate values of the reduction (as + per reduce) of coll by f, starting with init." + ([f coll] + (lazy-seq + (if-let [s (seq coll)] + (reductions f (first s) (rest s)) + (list (f))))) + ([f init coll] + (if (reduced? init) + (list @init) + (cons init + (lazy-seq + (when-let [s (seq coll)] + (reductions f (f init (first s)) (rest s)))))))) + +(defn juxt + "Takes a set of functions and returns a fn that is the juxtaposition + of those fns. The returned fn takes a variable number of args, and + returns a vector containing the result of applying each fn to the + args (left-to-right). + ((juxt a b c) x) => [(a x) (b x) (c x)]" + ([f] + (fn + ([] (vector (f))) + ([x] (vector (f x))) + ([x y] (vector (f x y))) + ([x y z] (vector (f x y z))) + ([x y z & args] (vector (apply f x y z args))))) + ([f g] + (fn + ([] (vector (f) (g))) + ([x] (vector (f x) (g x))) + ([x y] (vector (f x y) (g x y))) + ([x y z] (vector (f x y z) (g x y z))) + ([x y z & args] (vector (apply f x y z args) (apply g x y z args))))) + ([f g h] + (fn + ([] (vector (f) (g) (h))) + ([x] (vector (f x) (g x) (h x))) + ([x y] (vector (f x y) (g x y) (h x y))) + ([x y z] (vector (f x y z) (g x y z) (h x y z))) + ([x y z & args] (vector (apply f x y z args) (apply g x y z args) (apply h x y z args))))) + ([f g h & fs] + (let [fs (list* f g h fs)] + (fn + ([] (reduce #(conj %1 (%2)) [] fs)) + ([x] (reduce #(conj %1 (%2 x)) [] fs)) + ([x y] (reduce #(conj %1 (%2 x y)) [] fs)) + ([x y z] (reduce #(conj %1 (%2 x y z)) [] fs)) + ([x y z & args] (reduce #(conj %1 (apply %2 x y z args)) [] fs)))))) + +(defn dorun + "When lazy sequences are produced via functions that have side + effects, any effects other than those needed to produce the first + element in the seq do not occur until the seq is consumed. dorun can + be used to force any effects. Walks through the successive nexts of + the seq, does not retain the head and returns nil." + ([coll] + (when (seq coll) + (recur (next coll)))) + ([n coll] + (when (and (seq coll) (pos? n)) + (recur (dec n) (next coll))))) + +(defn doall + "When lazy sequences are produced via functions that have side + effects, any effects other than those needed to produce the first + element in the seq do not occur until the seq is consumed. doall can + be used to force any effects. Walks through the successive nexts of + the seq, retains the head and returns it, thus causing the entire + seq to reside in memory at one time." + ([coll] + (dorun coll) + coll) + ([n coll] + (dorun n coll) + coll)) + +;;;;;;;;;;;;;;;;;;;;;;;;; Regular Expressions ;;;;;;;;;; + +(defn ^boolean regexp? + "Returns true if x is a JavaScript RegExp instance." + [x] + (instance? js/RegExp x)) + +(defn re-matches + "Returns the result of (re-find re s) if re fully matches s." + [re s] + (if (string? s) + (let [matches (.exec re s)] + (when (= (first matches) s) + (if (== (count matches) 1) + (first matches) + (vec matches)))) + (throw (js/TypeError. "re-matches must match against a string.")))) + + +(defn re-find + "Returns the first regex match, if any, of s to re, using + re.exec(s). Returns a vector, containing first the matching + substring, then any capturing groups if the regular expression contains + capturing groups." + [re s] + (if (string? s) + (let [matches (.exec re s)] + (when-not (nil? matches) + (if (== (count matches) 1) + (first matches) + (vec matches)))) + (throw (js/TypeError. "re-find must match against a string.")))) + +(defn re-seq + "Returns a lazy sequence of successive matches of re in s." + [re s] + (let [match-data (re-find re s) + match-idx (.search s re) + match-str (if (coll? match-data) (first match-data) match-data) + post-match (subs s (+ match-idx (count match-str)))] + (when match-data (lazy-seq (cons match-data (when (seq post-match) (re-seq re post-match))))))) + +(defn re-pattern + "Returns an instance of RegExp which has compiled the provided string." + [s] + (if (instance? js/RegExp s) + s + (let [[prefix flags] (re-find #"^\(\?([idmsux]*)\)" s) + pattern (subs s (count prefix))] + (js/RegExp. pattern (or flags ""))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Printing ;;;;;;;;;;;;;;;; + +(defn pr-sequential-writer [writer print-one begin sep end opts coll] + (binding [*print-level* (when-not (nil? *print-level*) (dec *print-level*))] + (if (and (not (nil? *print-level*)) (neg? *print-level*)) + (-write writer "#") + (do + (-write writer begin) + (if (zero? (:print-length opts)) + (when (seq coll) + (-write writer (or (:more-marker opts) "..."))) + (do + (when (seq coll) + (print-one (first coll) writer opts)) + (loop [coll (next coll) n (dec (:print-length opts))] + (if (and coll (or (nil? n) (not (zero? n)))) + (do + (-write writer sep) + (print-one (first coll) writer opts) + (recur (next coll) (dec n))) + (when (and (seq coll) (zero? n)) + (-write writer sep) + (-write writer (or (:more-marker opts) "..."))))))) + (-write writer end))))) + +(defn write-all [writer & ss] + (doseq [s ss] + (-write writer s))) + +(defn string-print [x] + (*print-fn* x) + nil) + +(defn flush [] ;stub + nil) + +(def ^:private char-escapes + (js-obj + "\"" "\\\"" + "\\" "\\\\" + "\b" "\\b" + "\f" "\\f" + "\n" "\\n" + "\r" "\\r" + "\t" "\\t")) + +(defn ^:private quote-string + [s] + (str \" + (.replace s (js/RegExp "[\\\\\"\b\f\n\r\t]" "g") + (fn [match] (aget char-escapes match))) + \")) + +(declare print-map) + +(defn ^boolean print-meta? [opts obj] + (and (boolean (get opts :meta)) + (implements? IMeta obj) + (not (nil? (meta obj))))) + +(defn- pr-writer-impl + [obj writer opts] + (cond + (nil? obj) (-write writer "nil") + :else + (do + (when (print-meta? opts obj) + (-write writer "^") + (pr-writer (meta obj) writer opts) + (-write writer " ")) + (cond + ;; handle CLJS ctors + ^boolean (.-cljs$lang$type obj) + (.cljs$lang$ctorPrWriter obj obj writer opts) + + ; Use the new, more efficient, IPrintWithWriter interface when possible. + (implements? IPrintWithWriter obj) + (-pr-writer ^not-native obj writer opts) + + (or (true? obj) (false? obj) (number? obj)) + (-write writer (str obj)) + + (object? obj) + (do + (-write writer "#js ") + (print-map + (map (fn [k] [(keyword k) (aget obj k)]) (js-keys obj)) + pr-writer writer opts)) + + (array? obj) + (pr-sequential-writer writer pr-writer "#js [" " " "]" opts obj) + + ^boolean (goog/isString obj) + (if (:readably opts) + (-write writer (quote-string obj)) + (-write writer obj)) + + ^boolean (goog/isFunction obj) + (let [name (.-name obj) + name (if (or (nil? name) (gstring/isEmpty name)) + "Function" + name)] + (write-all writer "#object[" name " \"" (str obj) "\"]")) + + (instance? js/Date obj) + (let [normalize (fn [n len] + (loop [ns (str n)] + (if (< (count ns) len) + (recur (str "0" ns)) + ns)))] + (write-all writer + "#inst \"" + (str (.getUTCFullYear obj)) "-" + (normalize (inc (.getUTCMonth obj)) 2) "-" + (normalize (.getUTCDate obj) 2) "T" + (normalize (.getUTCHours obj) 2) ":" + (normalize (.getUTCMinutes obj) 2) ":" + (normalize (.getUTCSeconds obj) 2) "." + (normalize (.getUTCMilliseconds obj) 3) "-" + "00:00\"")) + + (regexp? obj) (write-all writer "#\"" (.-source obj) "\"") + + :else + (if (.. obj -constructor -cljs$lang$ctorStr) + (write-all writer + "#object[" (.replace (.. obj -constructor -cljs$lang$ctorStr) + (js/RegExp. "/" "g") ".") "]") + (let [name (.. obj -constructor -name) + name (if (or (nil? name) (gstring/isEmpty name)) + "Object" + name)] + (write-all writer "#object[" name " " (str obj) "]"))))))) + +(defn- pr-writer + "Prefer this to pr-seq, because it makes the printing function + configurable, allowing efficient implementations such as appending + to a StringBuffer." + [obj writer opts] + (if-let [alt-impl (:alt-impl opts)] + (alt-impl obj writer (assoc opts :fallback-impl pr-writer-impl)) + (pr-writer-impl obj writer opts))) + +(defn pr-seq-writer [objs writer opts] + (pr-writer (first objs) writer opts) + (doseq [obj (next objs)] + (-write writer " ") + (pr-writer obj writer opts))) + +(defn- pr-sb-with-opts [objs opts] + (let [sb (StringBuffer.) + writer (StringBufferWriter. sb)] + (pr-seq-writer objs writer opts) + (-flush writer) + sb)) + +(defn pr-str-with-opts + "Prints a sequence of objects to a string, observing all the + options given in opts" + [objs opts] + (if (empty? objs) + "" + (str (pr-sb-with-opts objs opts)))) + +(defn prn-str-with-opts + "Same as pr-str-with-opts followed by (newline)" + [objs opts] + (if (empty? objs) + "\n" + (let [sb (pr-sb-with-opts objs opts)] + (.append sb \newline) + (str sb)))) + +(defn- pr-with-opts + "Prints a sequence of objects using string-print, observing all + the options given in opts" + [objs opts] + (string-print (pr-str-with-opts objs opts))) + +(defn newline + "Prints a newline using *print-fn*" + ([] (newline nil)) + ([opts] + (string-print "\n") + (when (get opts :flush-on-newline) + (flush)))) + +(defn pr-str + "pr to a string, returning it. Fundamental entrypoint to IPrintWithWriter." + [& objs] + (pr-str-with-opts objs (pr-opts))) + +(defn prn-str + "Same as pr-str followed by (newline)" + [& objs] + (prn-str-with-opts objs (pr-opts))) + +(defn pr + "Prints the object(s) using string-print. Prints the + object(s), separated by spaces if there is more than one. + By default, pr and prn print in a way that objects can be + read by the reader" + [& objs] + (pr-with-opts objs (pr-opts))) + +(def ^{:doc + "Prints the object(s) using string-print. + print and println produce output for human consumption."} + print + (fn cljs-core-print [& objs] + (pr-with-opts objs (assoc (pr-opts) :readably false)))) + +(defn print-str + "print to a string, returning it" + [& objs] + (pr-str-with-opts objs (assoc (pr-opts) :readably false))) + +(defn println + "Same as print followed by (newline)" + [& objs] + (pr-with-opts objs (assoc (pr-opts) :readably false)) + (when *print-newline* + (newline (pr-opts)))) + +(defn println-str + "println to a string, returning it" + [& objs] + (prn-str-with-opts objs (assoc (pr-opts) :readably false))) + +(defn prn + "Same as pr followed by (newline)." + [& objs] + (pr-with-opts objs (pr-opts)) + (when *print-newline* + (newline (pr-opts)))) + +(defn- strip-ns + [named] + (if (symbol? named) + (symbol nil (name named)) + (keyword nil (name named)))) + +(defn- lift-ns + "Returns [lifted-ns lifted-map] or nil if m can't be lifted." + [m] + (when *print-namespace-maps* + (loop [ns nil + [[k v :as entry] & entries] (seq m) + lm (empty m)] + (if entry + (when (or (keyword? k) (symbol? k)) + (if ns + (when (= ns (namespace k)) + (recur ns entries (assoc lm (strip-ns k) v))) + (when-let [new-ns (namespace k)] + (recur new-ns entries (assoc lm (strip-ns k) v))))) + [ns lm])))) + +(defn print-prefix-map [prefix m print-one writer opts] + (pr-sequential-writer + writer + (fn [e w opts] + (do (print-one (key e) w opts) + (-write w \space) + (print-one (val e) w opts))) + (str prefix "{") ", " "}" + opts (seq m))) + +(defn print-map [m print-one writer opts] + (let [[ns lift-map] (lift-ns m)] + (if ns + (print-prefix-map (str "#:" ns) lift-map print-one writer opts) + (print-prefix-map nil m print-one writer opts)))) + +(extend-protocol IPrintWithWriter + LazySeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + TransformerIterator + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + IndexedSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + RSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + PersistentQueue + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "#queue [" " " "]" opts (seq coll))) + + PersistentQueueSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + PersistentTreeMapSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + NodeSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + ArrayNodeSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + List + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + Cons + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + EmptyList + (-pr-writer [coll writer opts] (-write writer "()")) + + PersistentVector + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "[" " " "]" opts coll)) + + ChunkedCons + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + ChunkedSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + Subvec + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "[" " " "]" opts coll)) + + BlackNode + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "[" " " "]" opts coll)) + + RedNode + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "[" " " "]" opts coll)) + + ObjMap + (-pr-writer [coll writer opts] + (print-map coll pr-writer writer opts)) + + KeySeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + ValSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + PersistentArrayMapSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + PersistentArrayMap + (-pr-writer [coll writer opts] + (print-map coll pr-writer writer opts)) + + PersistentHashMap + (-pr-writer [coll writer opts] + (print-map coll pr-writer writer opts)) + + PersistentTreeMap + (-pr-writer [coll writer opts] + (print-map coll pr-writer writer opts)) + + PersistentHashSet + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "#{" " " "}" opts coll)) + + PersistentTreeSet + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "#{" " " "}" opts coll)) + + Range + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + ES6IteratorSeq + (-pr-writer [coll writer opts] (pr-sequential-writer writer pr-writer "(" " " ")" opts coll)) + + Atom + (-pr-writer [a writer opts] + (-write writer "#object [cljs.core.Atom ") + (pr-writer {:val (.-state a)} writer opts) + (-write writer "]")) + + Volatile + (-pr-writer [a writer opts] + (-write writer "#object [cljs.core.Volatile ") + (pr-writer {:val (.-state a)} writer opts) + (-write writer "]")) + + Var + (-pr-writer [a writer opts] + (-write writer "#'") + (pr-writer (.-sym a) writer opts))) + +;; IComparable +(extend-protocol IComparable + Symbol + (-compare [x y] + (if (symbol? y) + (compare-symbols x y) + (throw (js/Error. (str "Cannot compare " x " to " y))))) + + Keyword + (-compare [x y] + (if (keyword? y) + (compare-keywords x y) + (throw (js/Error. (str "Cannot compare " x " to " y))))) + + Subvec + (-compare [x y] + (if (vector? y) + (compare-indexed x y) + (throw (js/Error. (str "Cannot compare " x " to " y))))) + + PersistentVector + (-compare [x y] + (if (vector? y) + (compare-indexed x y) + (throw (js/Error. (str "Cannot compare " x " to " y)))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Reference Types ;;;;;;;;;;;;;;;; + +(defn alter-meta! + "Atomically sets the metadata for a namespace/var/ref/agent/atom to be: + + (apply f its-current-meta args) + + f must be free of side-effects" + [iref f & args] + (set! (.-meta iref) (apply f (.-meta iref) args))) + +(defn reset-meta! + "Atomically resets the metadata for an atom" + [iref m] + (set! (.-meta iref) m)) + +(defn add-watch + "Adds a watch function to an atom reference. The watch fn must be a + fn of 4 args: a key, the reference, its old-state, its + new-state. Whenever the reference's state might have been changed, + any registered watches will have their functions called. The watch + fn will be called synchronously. Note that an atom's state + may have changed again prior to the fn call, so use old/new-state + rather than derefing the reference. Keys must be unique per + reference, and can be used to remove the watch with remove-watch, + but are otherwise considered opaque by the watch mechanism. Bear in + mind that regardless of the result or action of the watch fns the + atom's value will change. Example: + + (def a (atom 0)) + (add-watch a :inc (fn [k r o n] (assert (== 0 n)))) + (swap! a inc) + ;; Assertion Error + (deref a) + ;=> 1" + [iref key f] + (-add-watch iref key f) + iref) + +(defn remove-watch + "Removes a watch (set by add-watch) from a reference" + [iref key] + (-remove-watch iref key) + iref) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gensym ;;;;;;;;;;;;;;;; +;; Internal - do not use! +(def + ^{:jsdoc ["@type {*}"]} + gensym_counter nil) + +(defn gensym + "Returns a new symbol with a unique name. If a prefix string is + supplied, the name is prefix# where # is some unique number. If + prefix is not supplied, the prefix is 'G__'." + ([] (gensym "G__")) + ([prefix-string] + (when (nil? gensym_counter) + (set! gensym_counter (atom 0))) + (symbol (str prefix-string (swap! gensym_counter inc))))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Fixtures ;;;;;;;;;;;;;;;; + +(def fixture1 1) +(def fixture2 2) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Delay ;;;;;;;;;;;;;;;;;;;; + +(deftype Delay [^:mutable f ^:mutable value] + IDeref + (-deref [_] + (when f + (set! value (f)) + (set! f nil)) + value) + + IPending + (-realized? [x] + (not f))) + +(defn ^boolean delay? + "returns true if x is a Delay created with delay" + [x] (instance? Delay x)) + +(defn force + "If x is a Delay, returns the (possibly cached) value of its expression, else returns x" + [x] + (if (delay? x) + (deref x) + x)) + +(defn ^boolean realized? + "Returns true if a value has been produced for a delay or lazy sequence." + [x] + (-realized? x)) + +(defn- preserving-reduced + [rf] + #(let [ret (rf %1 %2)] + (if (reduced? ret) + (reduced ret) + ret))) + +(defn cat + "A transducer which concatenates the contents of each input, which must be a + collection, into the reduction." + {:added "1.7"} + [rf] + (let [rf1 (preserving-reduced rf)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (reduce rf1 result input))))) + +(defn halt-when + "Returns a transducer that ends transduction when pred returns true + for an input. When retf is supplied it must be a fn of 2 arguments - + it will be passed the (completed) result so far and the input that + triggered the predicate, and its return value (if it does not throw + an exception) will be the return value of the transducer. If retf + is not supplied, the input that triggered the predicate will be + returned. If the predicate never returns true the transduction is + unaffected." + {:added "1.9"} + ([pred] (halt-when pred nil)) + ([pred retf] + (fn [rf] + (fn + ([] (rf)) + ([result] + (if (and (map? result) (contains? result ::halt)) + (::halt result) + (rf result))) + ([result input] + (if (pred input) + (reduced {::halt (if retf (retf (rf result) input) input)}) + (rf result input))))))) + +(defn dedupe + "Returns a lazy sequence removing consecutive duplicates in coll. + Returns a transducer when no collection is provided." + ([] + (fn [rf] + (let [pa (volatile! ::none)] + (fn + ([] (rf)) + ([result] (rf result)) + ([result input] + (let [prior @pa] + (vreset! pa input) + (if (= prior input) + result + (rf result input)))))))) + ([coll] (sequence (dedupe) coll))) + +(declare rand) + +(defn random-sample + "Returns items from coll with random probability of prob (0.0 - + 1.0). Returns a transducer when no collection is provided." + ([prob] + (filter (fn [_] (< (rand) prob)))) + ([prob coll] + (filter (fn [_] (< (rand) prob)) coll))) + +(deftype Eduction [xform coll] + Object + (indexOf [coll x] + (-indexOf coll x 0)) + (indexOf [coll x start] + (-indexOf coll x start)) + (lastIndexOf [coll x] + (-lastIndexOf coll x (count coll))) + (lastIndexOf [coll x start] + (-lastIndexOf coll x start)) + + ISequential + + IIterable + (-iterator [coll] + (.create TransformerIterator xform coll)) + + ISeqable + (-seq [_] (seq (sequence xform coll))) + + IReduce + (-reduce [_ f] (transduce xform (completing f) coll)) + (-reduce [_ f init] (transduce xform (completing f) init coll)) + + IPrintWithWriter + (-pr-writer [coll writer opts] + (pr-sequential-writer writer pr-writer "(" " " ")" opts coll))) + +(es6-iterable Eduction) + +(defn eduction + "Returns a reducible/iterable application of the transducers + to the items in coll. Transducers are applied in order as if + combined with comp. Note that these applications will be + performed every time reduce/iterator is called." + {:arglists '([xform* coll])} + [& xforms] + (Eduction. (apply comp (butlast xforms)) (last xforms))) + +(defn run! + "Runs the supplied procedure (via reduce), for purposes of side + effects, on successive items in the collection. Returns nil" + [proc coll] + (reduce #(proc %2) nil coll) + nil) + +(defprotocol IEncodeJS + (-clj->js [x] "Recursively transforms clj values to JavaScript") + (-key->js [x] "Transforms map keys to valid JavaScript keys. Arbitrary keys are + encoded to their string representation via (pr-str x)")) + +(declare clj->js) + +(defn key->js [k] + (if (satisfies? IEncodeJS k) + (-clj->js k) + (if (or (string? k) + (number? k) + (keyword? k) + (symbol? k)) + (clj->js k) + (pr-str k)))) + +(defn clj->js + "Recursively transforms ClojureScript values to JavaScript. + sets/vectors/lists become Arrays, Keywords and Symbol become Strings, + Maps become Objects. Arbitrary keys are encoded to by key->js." + [x] + (when-not (nil? x) + (if (satisfies? IEncodeJS x) + (-clj->js x) + (cond + (keyword? x) (name x) + (symbol? x) (str x) + (map? x) (let [m (js-obj)] + (doseq [[k v] x] + (aset m (key->js k) (clj->js v))) + m) + (coll? x) (let [arr (array)] + (doseq [x (map clj->js x)] + (.push arr x)) + arr) + :else x)))) + +(defprotocol IEncodeClojure + (-js->clj [x options] "Transforms JavaScript values to Clojure")) + +(defn js->clj + "Recursively transforms JavaScript arrays into ClojureScript + vectors, and JavaScript objects into ClojureScript maps. With + option ':keywordize-keys true' will convert object fields from + strings to keywords." + ([x] (js->clj x :keywordize-keys false)) + ([x & opts] + (let [{:keys [keywordize-keys]} opts + keyfn (if keywordize-keys keyword str) + f (fn thisfn [x] + (cond + (satisfies? IEncodeClojure x) + (-js->clj x (apply array-map opts)) + + (seq? x) + (doall (map thisfn x)) + + (coll? x) + (into (empty x) (map thisfn x)) + + (array? x) + (vec (map thisfn x)) + + (identical? (type x) js/Object) + (into {} (for [k (js-keys x)] + [(keyfn k) (thisfn (aget x k))])) + + :else x))] + (f x)))) + +(defn memoize + "Returns a memoized version of a referentially transparent function. The + memoized version of the function keeps a cache of the mapping from arguments + to results and, when calls with the same arguments are repeated often, has + higher performance at the expense of higher memory use." + [f] + (let [mem (atom {})] + (fn [& args] + (let [v (get @mem args lookup-sentinel)] + (if (identical? v lookup-sentinel) + (let [ret (apply f args)] + (swap! mem assoc args ret) + ret) + v))))) + +(defn trampoline + "trampoline can be used to convert algorithms requiring mutual + recursion without stack consumption. Calls f with supplied args, if + any. If f returns a fn, calls that fn with no arguments, and + continues to repeat, until the return value is not a fn, then + returns that non-fn value. Note that if you want to return a fn as a + final value, you must wrap it in some data structure and unpack it + after trampoline returns." + ([f] + (let [ret (f)] + (if (fn? ret) + (recur ret) + ret))) + ([f & args] + (trampoline #(apply f args)))) + +(defn rand + "Returns a random floating point number between 0 (inclusive) and + n (default 1) (exclusive)." + ([] (rand 1)) + ([n] (* (Math/random) n))) + +(defn rand-int + "Returns a random integer between 0 (inclusive) and n (exclusive)." + [n] (Math/floor (* (Math/random) n))) + +(defn rand-nth + "Return a random element of the (sequential) collection. Will have + the same performance characteristics as nth for the given + collection." + [coll] + (nth coll (rand-int (count coll)))) + +(defn group-by + "Returns a map of the elements of coll keyed by the result of + f on each element. The value at each key will be a vector of the + corresponding elements, in the order they appeared in coll." + [f coll] + (persistent! + (reduce + (fn [ret x] + (let [k (f x)] + (assoc! ret k (conj (get ret k []) x)))) + (transient {}) coll))) + +(defn make-hierarchy + "Creates a hierarchy object for use with derive, isa? etc." + [] {:parents {} :descendants {} :ancestors {}}) + +(def + ^{:private true + :jsdoc ["@type {*}"]} + -global-hierarchy nil) + +(defn- get-global-hierarchy [] + (when (nil? -global-hierarchy) + (set! -global-hierarchy (atom (make-hierarchy)))) + -global-hierarchy) + +(defn- swap-global-hierarchy! [f & args] + (apply swap! (get-global-hierarchy) f args)) + +(defn ^boolean isa? + "Returns true if (= child parent), or child is directly or indirectly derived from + parent, either via a JavaScript type inheritance relationship or a + relationship established via derive. h must be a hierarchy obtained + from make-hierarchy, if not supplied defaults to the global + hierarchy" + ([child parent] (isa? @(get-global-hierarchy) child parent)) + ([h child parent] + (or (= child parent) + ;; (and (class? parent) (class? child) + ;; (. ^Class parent isAssignableFrom child)) + (contains? ((:ancestors h) child) parent) + ;;(and (class? child) (some #(contains? ((:ancestors h) %) parent) (supers child))) + (and (vector? parent) (vector? child) + (== (count parent) (count child)) + (loop [ret true i 0] + (if (or (not ret) (== i (count parent))) + ret + (recur (isa? h (child i) (parent i)) (inc i)))))))) + +(defn parents + "Returns the immediate parents of tag, either via a JavaScript type + inheritance relationship or a relationship established via derive. h + must be a hierarchy obtained from make-hierarchy, if not supplied + defaults to the global hierarchy" + ([tag] (parents @(get-global-hierarchy) tag)) + ([h tag] (not-empty (get (:parents h) tag)))) + +(defn ancestors + "Returns the immediate and indirect parents of tag, either via a JavaScript type + inheritance relationship or a relationship established via derive. h + must be a hierarchy obtained from make-hierarchy, if not supplied + defaults to the global hierarchy" + ([tag] (ancestors @(get-global-hierarchy) tag)) + ([h tag] (not-empty (get (:ancestors h) tag)))) + +(defn descendants + "Returns the immediate and indirect children of tag, through a + relationship established via derive. h must be a hierarchy obtained + from make-hierarchy, if not supplied defaults to the global + hierarchy. Note: does not work on JavaScript type inheritance + relationships." + ([tag] (descendants @(get-global-hierarchy) tag)) + ([h tag] (not-empty (get (:descendants h) tag)))) + +(defn derive + "Establishes a parent/child relationship between parent and + tag. Parent must be a namespace-qualified symbol or keyword and + child can be either a namespace-qualified symbol or keyword or a + class. h must be a hierarchy obtained from make-hierarchy, if not + supplied defaults to, and modifies, the global hierarchy." + ([tag parent] + (assert (namespace parent)) + ;; (assert (or (class? tag) (and (instance? cljs.core.Named tag) (namespace tag)))) + (swap-global-hierarchy! derive tag parent) nil) + ([h tag parent] + (assert (not= tag parent)) + ;; (assert (or (class? tag) (instance? clojure.lang.Named tag))) + ;; (assert (instance? clojure.lang.INamed tag)) + ;; (assert (instance? clojure.lang.INamed parent)) + (let [tp (:parents h) + td (:descendants h) + ta (:ancestors h) + tf (fn [m source sources target targets] + (reduce (fn [ret k] + (assoc ret k + (reduce conj (get targets k #{}) (cons target (targets target))))) + m (cons source (sources source))))] + (or + (when-not (contains? (tp tag) parent) + (when (contains? (ta tag) parent) + (throw (js/Error. (str tag "already has" parent "as ancestor")))) + (when (contains? (ta parent) tag) + (throw (js/Error. (str "Cyclic derivation:" parent "has" tag "as ancestor")))) + {:parents (assoc (:parents h) tag (conj (get tp tag #{}) parent)) + :ancestors (tf (:ancestors h) tag td parent ta) + :descendants (tf (:descendants h) parent ta tag td)}) + h)))) + +(defn underive + "Removes a parent/child relationship between parent and + tag. h must be a hierarchy obtained from make-hierarchy, if not + supplied defaults to, and modifies, the global hierarchy." + ([tag parent] + (swap-global-hierarchy! underive tag parent) + nil) + ([h tag parent] + (let [parentMap (:parents h) + childsParents (if (parentMap tag) + (disj (parentMap tag) parent) #{}) + newParents (if (not-empty childsParents) + (assoc parentMap tag childsParents) + (dissoc parentMap tag)) + deriv-seq (flatten (map #(cons (first %) (interpose (first %) (second %))) + (seq newParents)))] + (if (contains? (parentMap tag) parent) + (reduce #(apply derive %1 %2) (make-hierarchy) + (partition 2 deriv-seq)) + h)))) + +(defn- reset-cache + [method-cache method-table cached-hierarchy hierarchy] + (swap! method-cache (fn [_] (deref method-table))) + (swap! cached-hierarchy (fn [_] (deref hierarchy)))) + +(defn- prefers* + [x y prefer-table] + (let [xprefs (@prefer-table x)] + (or + (when (and xprefs (xprefs y)) + true) + (loop [ps (parents y)] + (when (pos? (count ps)) + (when (prefers* x (first ps) prefer-table) + true) + (recur (rest ps)))) + (loop [ps (parents x)] + (when (pos? (count ps)) + (when (prefers* (first ps) y prefer-table) + true) + (recur (rest ps)))) + false))) + +(defn- dominates + [x y prefer-table hierarchy] + (or (prefers* x y prefer-table) (isa? hierarchy x y))) + +(defn- find-and-cache-best-method + [name dispatch-val hierarchy method-table prefer-table method-cache cached-hierarchy default-dispatch-val] + (let [best-entry (reduce (fn [be [k _ :as e]] + (if (isa? @hierarchy dispatch-val k) + (let [be2 (if (or (nil? be) (dominates k (first be) prefer-table @hierarchy)) + e + be)] + (when-not (dominates (first be2) k prefer-table @hierarchy) + (throw (js/Error. + (str "Multiple methods in multimethod '" name + "' match dispatch value: " dispatch-val " -> " k + " and " (first be2) ", and neither is preferred")))) + be2) + be)) + nil @method-table) + best-entry (if-let [entry (and (nil? best-entry) (@method-table default-dispatch-val))] + [default-dispatch-val entry] + best-entry)] + (when best-entry + (if (= @cached-hierarchy @hierarchy) + (do + (swap! method-cache assoc dispatch-val (second best-entry)) + (second best-entry)) + (do + (reset-cache method-cache method-table cached-hierarchy hierarchy) + (find-and-cache-best-method name dispatch-val hierarchy method-table prefer-table + method-cache cached-hierarchy default-dispatch-val)))))) + +(defprotocol IMultiFn + (-reset [mf]) + (-add-method [mf dispatch-val method]) + (-remove-method [mf dispatch-val]) + (-prefer-method [mf dispatch-val dispatch-val-y]) + (-get-method [mf dispatch-val]) + (-methods [mf]) + (-prefers [mf]) + (-default-dispatch-val [mf]) + (-dispatch-fn [mf])) + +(defn- throw-no-method-error [name dispatch-val] + (throw (js/Error. (str "No method in multimethod '" name "' for dispatch value: " dispatch-val)))) + +(deftype MultiFn [name dispatch-fn default-dispatch-val hierarchy + method-table prefer-table method-cache cached-hierarchy] + IFn + (-invoke [mf] + (let [dispatch-val (dispatch-fn) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn))) + (-invoke [mf a] + (let [dispatch-val (dispatch-fn a) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a))) + (-invoke [mf a b] + (let [dispatch-val (dispatch-fn a b) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b))) + (-invoke [mf a b c] + (let [dispatch-val (dispatch-fn a b c) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c))) + (-invoke [mf a b c d] + (let [dispatch-val (dispatch-fn a b c d) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d))) + (-invoke [mf a b c d e] + (let [dispatch-val (dispatch-fn a b c d e) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e))) + (-invoke [mf a b c d e f] + (let [dispatch-val (dispatch-fn a b c d e f) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f))) + (-invoke [mf a b c d e f g] + (let [dispatch-val (dispatch-fn a b c d e f g) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g))) + (-invoke [mf a b c d e f g h] + (let [dispatch-val (dispatch-fn a b c d e f g h) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h))) + (-invoke [mf a b c d e f g h i] + (let [dispatch-val (dispatch-fn a b c d e f g h i) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i))) + (-invoke [mf a b c d e f g h i j] + (let [dispatch-val (dispatch-fn a b c d e f g h i j) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j))) + (-invoke [mf a b c d e f g h i j k] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k))) + (-invoke [mf a b c d e f g h i j k l] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l))) + (-invoke [mf a b c d e f g h i j k l m] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m))) + (-invoke [mf a b c d e f g h i j k l m n] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m n) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m n))) + (-invoke [mf a b c d e f g h i j k l m n o] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m n o) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m n o))) + (-invoke [mf a b c d e f g h i j k l m n o p] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m n o p) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m n o p))) + (-invoke [mf a b c d e f g h i j k l m n o p q] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m n o p q) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m n o p q))) + (-invoke [mf a b c d e f g h i j k l m n o p q r] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m n o p q r) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m n o p q r))) + (-invoke [mf a b c d e f g h i j k l m n o p q r s] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m n o p q r s) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m n o p q r s))) + (-invoke [mf a b c d e f g h i j k l m n o p q r s t] + (let [dispatch-val (dispatch-fn a b c d e f g h i j k l m n o p q r s t) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (target-fn a b c d e f g h i j k l m n o p q r s t))) + (-invoke [mf a b c d e f g h i j k l m n o p q r s t rest] + (let [dispatch-val (apply dispatch-fn a b c d e f g h i j k l m n o p q r s t rest) + target-fn (-get-method mf dispatch-val)] + (when-not target-fn + (throw-no-method-error name dispatch-val)) + (apply target-fn a b c d e f g h i j k l m n o p q r s t rest))) + + IMultiFn + (-reset [mf] + (swap! method-table (fn [mf] {})) + (swap! method-cache (fn [mf] {})) + (swap! prefer-table (fn [mf] {})) + (swap! cached-hierarchy (fn [mf] nil)) + mf) + + (-add-method [mf dispatch-val method] + (swap! method-table assoc dispatch-val method) + (reset-cache method-cache method-table cached-hierarchy hierarchy) + mf) + + (-remove-method [mf dispatch-val] + (swap! method-table dissoc dispatch-val) + (reset-cache method-cache method-table cached-hierarchy hierarchy) + mf) + + (-get-method [mf dispatch-val] + (when-not (= @cached-hierarchy @hierarchy) + (reset-cache method-cache method-table cached-hierarchy hierarchy)) + (if-let [target-fn (@method-cache dispatch-val)] + target-fn + (find-and-cache-best-method name dispatch-val hierarchy method-table + prefer-table method-cache cached-hierarchy default-dispatch-val))) + + (-prefer-method [mf dispatch-val-x dispatch-val-y] + (when (prefers* dispatch-val-x dispatch-val-y prefer-table) + (throw (js/Error. (str "Preference conflict in multimethod '" name "': " dispatch-val-y + " is already preferred to " dispatch-val-x)))) + (swap! prefer-table + (fn [old] + (assoc old dispatch-val-x + (conj (get old dispatch-val-x #{}) + dispatch-val-y)))) + (reset-cache method-cache method-table cached-hierarchy hierarchy)) + + (-methods [mf] @method-table) + (-prefers [mf] @prefer-table) + (-default-dispatch-val [mf] default-dispatch-val) + (-dispatch-fn [mf] dispatch-fn) + + INamed + (-name [this] (-name name)) + (-namespace [this] (-namespace name)) + + IHash + (-hash [this] (goog/getUid this))) + +(defn remove-all-methods + "Removes all of the methods of multimethod." + [multifn] + (-reset multifn)) + +(defn remove-method + "Removes the method of multimethod associated with dispatch-value." + [multifn dispatch-val] + (-remove-method multifn dispatch-val)) + +(defn prefer-method + "Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y + when there is a conflict" + [multifn dispatch-val-x dispatch-val-y] + (-prefer-method multifn dispatch-val-x dispatch-val-y)) + +(defn methods + "Given a multimethod, returns a map of dispatch values -> dispatch fns" + [multifn] (-methods multifn)) + +(defn get-method + "Given a multimethod and a dispatch value, returns the dispatch fn + that would apply to that value, or nil if none apply and no default" + [multifn dispatch-val] (-get-method multifn dispatch-val)) + +(defn prefers + "Given a multimethod, returns a map of preferred value -> set of other values" + [multifn] (-prefers multifn)) + +(defn default-dispatch-val + "Given a multimethod, return it's default-dispatch-val." + [multifn] (-default-dispatch-val multifn)) + +(defn dispatch-fn + "Given a multimethod, return it's dispatch-fn." + [multifn] (-dispatch-fn multifn)) + +;; UUID +(defprotocol IUUID "A marker protocol for UUIDs") + +(deftype UUID [uuid ^:mutable __hash] + IUUID + + Object + (toString [_] uuid) + (equiv [this other] + (-equiv this other)) + + IEquiv + (-equiv [_ other] + (and (instance? UUID other) (identical? uuid (.-uuid other)))) + + IPrintWithWriter + (-pr-writer [_ writer _] + (-write writer (str "#uuid \"" uuid "\""))) + + IHash + (-hash [this] + (when (nil? __hash) + (set! __hash (hash uuid))) + __hash) + + IComparable + (-compare [_ other] + (garray/defaultCompare uuid (.-uuid other)))) + +(defn uuid [s] + (UUID. s nil)) + +(defn random-uuid [] + (letfn [(hex [] (.toString (rand-int 16) 16))] + (let [rhex (.toString (bit-or 0x8 (bit-and 0x3 (rand-int 16))) 16)] + (uuid + (str (hex) (hex) (hex) (hex) + (hex) (hex) (hex) (hex) "-" + (hex) (hex) (hex) (hex) "-" + "4" (hex) (hex) (hex) "-" + rhex (hex) (hex) (hex) "-" + (hex) (hex) (hex) (hex) + (hex) (hex) (hex) (hex) + (hex) (hex) (hex) (hex)))))) + +(defn ^boolean uuid? + [x] (implements? IUUID x)) + +;;; ExceptionInfo + +(defn- pr-writer-ex-info [obj writer opts] + (-write writer "#error {:message ") + (pr-writer (.-message obj) writer opts) + (when (.-data obj) + (-write writer ", :data ") + (pr-writer (.-data obj) writer opts)) + (when (.-cause obj) + (-write writer ", :cause ") + (pr-writer (.-cause obj) writer opts)) + (-write writer "}")) + +(defn ^{:jsdoc ["@constructor"]} + ExceptionInfo [message data cause] + (let [e (js/Error. message)] + (this-as this + (set! (.-message this) message) + (set! (.-data this) data) + (set! (.-cause this) cause) + (do + (set! (.-name this) (.-name e)) + ;; non-standard + (set! (.-description this) (.-description e)) + (set! (.-number this) (.-number e)) + (set! (.-fileName this) (.-fileName e)) + (set! (.-lineNumber this) (.-lineNumber e)) + (set! (.-columnNumber this) (.-columnNumber e)) + (set! (.-stack this) (.-stack e))) + this))) + +(set! (.. ExceptionInfo -prototype -__proto__) js/Error.prototype) + +(extend-type ExceptionInfo + IPrintWithWriter + (-pr-writer [obj writer opts] + (pr-writer-ex-info obj writer opts))) + +(set! (.. ExceptionInfo -prototype -toString) + (fn [] + (this-as this (pr-str* this)))) + +(defn ex-info + "Create an instance of ExceptionInfo, an Error type that carries a + map of additional data." + ([msg data] (ex-info msg data nil)) + ([msg data cause] + (ExceptionInfo. msg data cause))) + +(defn ex-data + "Returns exception data (a map) if ex is an ExceptionInfo. + Otherwise returns nil." + [ex] + (when (instance? ExceptionInfo ex) + (.-data ex))) + +(defn ex-message + "Returns the message attached to the given Error / ExceptionInfo object. + For non-Errors returns nil." + [ex] + (when (instance? js/Error ex) + (.-message ex))) + +(defn ex-cause + "Returns exception cause (an Error / ExceptionInfo) if ex is an + ExceptionInfo. + Otherwise returns nil." + [ex] + (when (instance? ExceptionInfo ex) + (.-cause ex))) + +(defn comparator + "Returns an JavaScript compatible comparator based upon pred." + [pred] + (fn [x y] + (cond (pred x y) -1 (pred y x) 1 :else 0))) + +(defn ^boolean special-symbol? + "Returns true if x names a special form" + [x] + (contains? + '#{if def fn* do let* loop* letfn* throw try catch finally + recur new set! ns deftype* defrecord* . js* & quote var ns*} + x)) + +(defn test + "test [v] finds fn at key :test in var metadata and calls it, + presuming failure will throw exception" + [v] + (let [f (.-cljs$lang$test v)] + (if f + (do (f) :ok) + :no-test))) + + +(deftype TaggedLiteral [tag form] + Object + (toString [coll] + (pr-str* coll)) + + IEquiv + (-equiv [this other] + (and (instance? TaggedLiteral other) + (= tag (.-tag other)) + (= form (.-form other)))) + + IHash + (-hash [this] + (+ (* 31 (hash tag)) + (hash form))) + + ILookup + (-lookup [this v] + (-lookup this v nil)) + (-lookup [this v not-found] + (case v + :tag tag + :form form + not-found)) + + IPrintWithWriter + (-pr-writer [o writer opts] + (-write writer (str "#" tag " ")) + (pr-writer form writer opts))) + +(defn ^boolean tagged-literal? + "Return true if the value is the data representation of a tagged literal" + [value] + (instance? TaggedLiteral value)) + +(defn tagged-literal + "Construct a data representation of a tagged literal from a + tag symbol and a form." + [tag form] + {:pre [(symbol? tag)]} + (TaggedLiteral. tag form)) + +(def + ^{:private true + :jsdoc ["@type {*}"]} + js-reserved-arr + #js ["arguments" "abstract" "await" "boolean" "break" "byte" "case" + "catch" "char" "class" "const" "continue" + "debugger" "default" "delete" "do" "double" + "else" "enum" "export" "extends" "final" + "finally" "float" "for" "function" "goto" "if" + "implements" "import" "in" "instanceof" "int" + "interface" "let" "long" "native" "new" + "package" "private" "protected" "public" + "return" "short" "static" "super" "switch" + "synchronized" "this" "throw" "throws" + "transient" "try" "typeof" "var" "void" + "volatile" "while" "with" "yield" "methods" + "null" "constructor"]) + +(def + ^{:jsdoc ["@type {null|Object}"]} + js-reserved nil) + +(defn- js-reserved? [x] + (when (nil? js-reserved) + (set! js-reserved + (reduce #(do (gobject/set %1 %2 true) %1) + #js {} js-reserved-arr))) + (.hasOwnProperty js-reserved x)) + +(defn- demunge-pattern [] + (when-not DEMUNGE_PATTERN + (set! DEMUNGE_PATTERN + (let [ks (sort (fn [a b] (- (. b -length) (. a -length))) + (js-keys DEMUNGE_MAP))] + (loop [ks ks ret ""] + (if (seq ks) + (recur + (next ks) + (str + (cond-> ret + (not (identical? ret "")) (str "|")) + (first ks))) + (str ret "|\\$")))))) + DEMUNGE_PATTERN) + +(defn- munge-str [name] + (let [sb (StringBuffer.)] + (loop [i 0] + (if (< i (. name -length)) + (let [c (.charAt name i) + sub (gobject/get CHAR_MAP c)] + (if-not (nil? sub) + (.append sb sub) + (.append sb c)) + (recur (inc i))))) + (.toString sb))) + +(defn munge [name] + (let [name' (munge-str (str name)) + name' (cond + (identical? name' "..") "_DOT__DOT_" + (js-reserved? name') (str name' "$") + :else name')] + (if (symbol? name) + (symbol name') + (str name')))) + +(defn- demunge-str [munged-name] + (let [r (js/RegExp. (demunge-pattern) "g") + munged-name (if (gstring/endsWith munged-name "$") + (.substring munged-name 0 (dec (. munged-name -length))) + munged-name)] + (loop [ret "" last-match-end 0] + (if-let [match (.exec r munged-name)] + (let [[x] match] + (recur + (str ret + (.substring munged-name last-match-end + (- (. r -lastIndex) (. x -length))) + (if (identical? x "$") "/" (gobject/get DEMUNGE_MAP x))) + (. r -lastIndex))) + (str ret + (.substring munged-name last-match-end (.-length munged-name))))))) + +(defn demunge [name] + ((if (symbol? name) symbol str) + (let [name' (str name)] + (if (identical? name' "_DOT__DOT_") + ".." + (demunge-str (str name)))))) + +;; ----------------------------------------------------------------------------- +;; Bootstrap helpers - incompatible with advanced compilation + +(defn- ns-lookup + "Bootstrap only." + [ns-obj k] + (fn [] (gobject/get ns-obj k))) + +;; Bootstrap only +(deftype Namespace [obj name] + Object + (findInternedVar [this sym] + (let [k (munge (str sym))] + (when ^boolean (gobject/containsKey obj k) + (let [var-sym (symbol (str name) (str sym)) + var-meta {:ns this}] + (Var. (ns-lookup obj k) var-sym var-meta))))) + (getName [_] name) + (toString [_] + (str name)) + IEquiv + (-equiv [_ other] + (if (instance? Namespace other) + (= name (.-name other)) + false)) + IHash + (-hash [_] + (hash name))) + +(def + ^{:doc "Bootstrap only." :jsdoc ["@type {*}"]} + NS_CACHE nil) + +(defn- find-ns-obj* + "Bootstrap only." + [ctxt xs] + (cond + (nil? ctxt) nil + (nil? xs) ctxt + :else (recur (gobject/get ctxt (first xs)) (next xs)))) + +(defn find-ns-obj + "Bootstrap only." + [ns] + (let [munged-ns (munge (str ns)) + segs (.split munged-ns ".")] + (case *target* + "nodejs" (if ^boolean js/COMPILED + ; Under simple optimizations on nodejs, namespaces will be in module + ; rather than global scope and must be accessed by a direct call to eval. + ; The first segment may refer to an undefined variable, so its evaluation + ; may throw ReferenceError. + (find-ns-obj* + (try + (let [ctxt (js/eval (first segs))] + (when (and ctxt (object? ctxt)) + ctxt)) + (catch js/ReferenceError e + nil)) + (next segs)) + (find-ns-obj* js/global segs)) + "default" (find-ns-obj* goog/global segs) + (throw (js/Error. (str "find-ns-obj not supported for target " *target*)))))) + +(defn ns-interns* + "Bootstrap only." + [sym] + (let [ns-obj (find-ns-obj sym) + ns (Namespace. ns-obj sym)] + (letfn [(step [ret k] + (let [var-sym (symbol (demunge k))] + (assoc ret + var-sym (Var. #(gobject/get ns-obj k) + (symbol (str sym) (str var-sym)) {:ns ns}))))] + (reduce step {} (js-keys ns-obj))))) + +(defn create-ns + "Bootstrap only." + ([sym] + (create-ns sym (find-ns-obj sym))) + ([sym ns-obj] + (Namespace. ns-obj sym))) + +(defn find-ns + "Bootstrap only." + [ns] + (when (nil? NS_CACHE) + (set! NS_CACHE (atom {}))) + (let [the-ns (get @NS_CACHE ns)] + (if-not (nil? the-ns) + the-ns + (let [ns-obj (find-ns-obj ns)] + (when-not (nil? ns-obj) + (let [new-ns (create-ns ns ns-obj)] + (swap! NS_CACHE assoc ns new-ns) + new-ns)))))) + +(defn find-macros-ns + "Bootstrap only." + [ns] + (when (nil? NS_CACHE) + (set! NS_CACHE (atom {}))) + (let [the-ns (get @NS_CACHE ns)] + (if-not (nil? the-ns) + the-ns + (let [ns-str (str ns) + ns (if (not ^boolean (gstring/contains ns-str "$macros")) + (symbol (str ns-str "$macros")) + ns) + ns-obj (find-ns-obj ns)] + (when-not (nil? ns-obj) + (let [new-ns (create-ns ns ns-obj)] + (swap! NS_CACHE assoc ns new-ns) + new-ns)))))) + +(defn ns-name + "Bootstrap only." + [ns-obj] + (.-name ns-obj)) diff --git a/public/js/rel/cljs/core.js b/public/js/rel/cljs/core.js new file mode 100644 index 0000000..573f23b --- /dev/null +++ b/public/js/rel/cljs/core.js @@ -0,0 +1,36278 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core'); +goog.require('goog.math.Long'); +goog.require('goog.math.Integer'); +goog.require('goog.string'); +goog.require('goog.object'); +goog.require('goog.array'); +goog.require('goog.string.StringBuffer'); +cljs.core._STAR_clojurescript_version_STAR_ = "1.9.562"; +cljs.core._STAR_unchecked_if_STAR_ = false; +cljs.core._STAR_warn_on_infer_STAR_ = false; +if(typeof cljs.core.PROTOCOL_SENTINEL !== 'undefined'){ +} else { +cljs.core.PROTOCOL_SENTINEL = ({}); +} + +/** @define {string} */ +goog.define("cljs.core._STAR_target_STAR_","default"); +/** + * Var bound to the current namespace. Only used for bootstrapping. + * @type {*} + */ +cljs.core._STAR_ns_STAR_ = null; +/** + * @type {*} + */ +cljs.core._STAR_out_STAR_ = null; +cljs.core._STAR_assert_STAR_ = true; +if(typeof cljs.core._STAR_print_fn_STAR_ !== 'undefined'){ +} else { +/** + * Each runtime environment provides a different way to print output. + * Whatever function *print-fn* is bound to will be passed any + * Strings which should be printed. + */ +cljs.core._STAR_print_fn_STAR_ = (function cljs$core$_STAR_print_fn_STAR_(_){ +throw (new Error("No *print-fn* fn set for evaluation environment")); +}); +} +if(typeof cljs.core._STAR_print_err_fn_STAR_ !== 'undefined'){ +} else { +/** + * Each runtime environment provides a different way to print error output. + * Whatever function *print-err-fn* is bound to will be passed any + * Strings which should be printed. + */ +cljs.core._STAR_print_err_fn_STAR_ = (function cljs$core$_STAR_print_err_fn_STAR_(_){ +throw (new Error("No *print-err-fn* fn set for evaluation environment")); +}); +} +/** + * Set *print-fn* to f. + */ +cljs.core.set_print_fn_BANG_ = (function cljs$core$set_print_fn_BANG_(f){ +return cljs.core._STAR_print_fn_STAR_ = f; +}); +/** + * Set *print-err-fn* to f. + */ +cljs.core.set_print_err_fn_BANG_ = (function cljs$core$set_print_err_fn_BANG_(f){ +return cljs.core._STAR_print_err_fn_STAR_ = f; +}); +/** + * When set to true, output will be flushed whenever a newline is printed. + * + * Defaults to true. + */ +cljs.core._STAR_flush_on_newline_STAR_ = true; +/** + * When set to logical false will drop newlines from printing calls. + * This is to work around the implicit newlines emitted by standard JavaScript + * console objects. + */ +cljs.core._STAR_print_newline_STAR_ = true; +/** + * When set to logical false, strings and characters will be printed with + * non-alphanumeric characters converted to the appropriate escape sequences. + * + * Defaults to true + */ +cljs.core._STAR_print_readably_STAR_ = true; +/** + * If set to logical true, when printing an object, its metadata will also + * be printed in a form that can be read back by the reader. + * + * Defaults to false. + */ +cljs.core._STAR_print_meta_STAR_ = false; +/** + * When set to logical true, objects will be printed in a way that preserves + * their type when read in later. + * + * Defaults to false. + */ +cljs.core._STAR_print_dup_STAR_ = false; +/** + * *print-namespace-maps* controls whether the printer will print + * namespace map literal syntax. + * + * Defaults to false, but the REPL binds it to true. + */ +cljs.core._STAR_print_namespace_maps_STAR_ = false; +/** + * *print-length* controls how many items of each collection the + * printer will print. If it is bound to logical false, there is no + * limit. Otherwise, it must be bound to an integer indicating the maximum + * number of items of each collection to print. If a collection contains + * more items, the printer will print items up to the limit followed by + * '...' to represent the remaining items. The root binding is nil + * indicating no limit. + * @type {null|number} + */ +cljs.core._STAR_print_length_STAR_ = null; +/** + * *print-level* controls how many levels deep the printer will + * print nested objects. If it is bound to logical false, there is no + * limit. Otherwise, it must be bound to an integer indicating the maximum + * level to print. Each argument to print is at level 0; if an argument is a + * collection, its items are at level 1; and so on. If an object is a + * collection and is at a level greater than or equal to the value bound to + * *print-level*, the printer prints '#' to represent it. The root binding + * is nil indicating no limit. + * @type {null|number} + */ +cljs.core._STAR_print_level_STAR_ = null; +if(typeof cljs.core._STAR_loaded_libs_STAR_ !== 'undefined'){ +} else { +/** + * @type {*} + */ +cljs.core._STAR_loaded_libs_STAR_ = null; +} +cljs.core.pr_opts = (function cljs$core$pr_opts(){ +return new cljs.core.PersistentArrayMap(null, 5, [cljs.core.cst$kw$flush_DASH_on_DASH_newline,cljs.core._STAR_flush_on_newline_STAR_,cljs.core.cst$kw$readably,cljs.core._STAR_print_readably_STAR_,cljs.core.cst$kw$meta,cljs.core._STAR_print_meta_STAR_,cljs.core.cst$kw$dup,cljs.core._STAR_print_dup_STAR_,cljs.core.cst$kw$print_DASH_length,cljs.core._STAR_print_length_STAR_], null); +}); +/** + * Set *print-fn* to console.log + */ +cljs.core.enable_console_print_BANG_ = (function cljs$core$enable_console_print_BANG_(){ +cljs.core._STAR_print_newline_STAR_ = false; + +cljs.core._STAR_print_fn_STAR_ = (function() { +var G__11013__delegate = function (args){ +return console.log.apply(console,(cljs.core.into_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(args) : cljs.core.into_array.call(null,args))); +}; +var G__11013 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__11014__i = 0, G__11014__a = new Array(arguments.length - 0); +while (G__11014__i < G__11014__a.length) {G__11014__a[G__11014__i] = arguments[G__11014__i + 0]; ++G__11014__i;} + args = new cljs.core.IndexedSeq(G__11014__a,0,null); +} +return G__11013__delegate.call(this,args);}; +G__11013.cljs$lang$maxFixedArity = 0; +G__11013.cljs$lang$applyTo = (function (arglist__11015){ +var args = cljs.core.seq(arglist__11015); +return G__11013__delegate(args); +}); +G__11013.cljs$core$IFn$_invoke$arity$variadic = G__11013__delegate; +return G__11013; +})() +; + +cljs.core._STAR_print_err_fn_STAR_ = (function() { +var G__11016__delegate = function (args){ +return console.error.apply(console,(cljs.core.into_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(args) : cljs.core.into_array.call(null,args))); +}; +var G__11016 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__11017__i = 0, G__11017__a = new Array(arguments.length - 0); +while (G__11017__i < G__11017__a.length) {G__11017__a[G__11017__i] = arguments[G__11017__i + 0]; ++G__11017__i;} + args = new cljs.core.IndexedSeq(G__11017__a,0,null); +} +return G__11016__delegate.call(this,args);}; +G__11016.cljs$lang$maxFixedArity = 0; +G__11016.cljs$lang$applyTo = (function (arglist__11018){ +var args = cljs.core.seq(arglist__11018); +return G__11016__delegate(args); +}); +G__11016.cljs$core$IFn$_invoke$arity$variadic = G__11016__delegate; +return G__11016; +})() +; + +return null; +}); +/** + * Internal - do not use! + */ +cljs.core.truth_ = (function cljs$core$truth_(x){ +return (x != null && x !== false); +}); +cljs.core.not_native = null; + +/** + * Tests if 2 arguments are the same object + */ +cljs.core.identical_QMARK_ = (function cljs$core$identical_QMARK_(x,y){ +return (x === y); +}); +/** + * Returns true if x is nil, false otherwise. + */ +cljs.core.nil_QMARK_ = (function cljs$core$nil_QMARK_(x){ +return (x == null); +}); +/** + * Returns true if x is a JavaScript array. + */ +cljs.core.array_QMARK_ = (function cljs$core$array_QMARK_(x){ +if((cljs.core._STAR_target_STAR_ === "nodejs")){ +return Array.isArray(x); +} else { +return (x instanceof Array); +} +}); +/** + * Returns true if x is a JavaScript number. + */ +cljs.core.number_QMARK_ = (function cljs$core$number_QMARK_(x){ +return typeof x === 'number'; +}); +/** + * Returns true if x is logical false, false otherwise. + */ +cljs.core.not = (function cljs$core$not(x){ +if((x == null)){ +return true; +} else { +if(x === false){ +return true; +} else { +return false; + +} +} +}); +/** + * Returns true if x is not nil, false otherwise. + */ +cljs.core.some_QMARK_ = (function cljs$core$some_QMARK_(x){ +return !((x == null)); +}); +/** + * Returns true if x's constructor is Object + */ +cljs.core.object_QMARK_ = (function cljs$core$object_QMARK_(x){ +if(!((x == null))){ +return (x.constructor === Object); +} else { +return false; +} +}); +/** + * Returns true if x is a JavaScript string. + */ +cljs.core.string_QMARK_ = (function cljs$core$string_QMARK_(x){ +return goog.isString(x); +}); +/** + * Returns true if x is a JavaScript string of length one. + */ +cljs.core.char_QMARK_ = (function cljs$core$char_QMARK_(x){ +return (typeof x === 'string') && (((1) === x.length)); +}); +/** + * Returns true if given any argument. + */ +cljs.core.any_QMARK_ = (function cljs$core$any_QMARK_(x){ +return true; +}); +/** + * Internal - do not use! + */ +cljs.core.native_satisfies_QMARK_ = (function cljs$core$native_satisfies_QMARK_(p,x){ +var x__$1 = (((x == null))?null:x); +if((p[goog.typeOf(x__$1)])){ +return true; +} else { +if((p["_"])){ +return true; +} else { +return false; + +} +} +}); +cljs.core.is_proto_ = (function cljs$core$is_proto_(x){ +return (x.constructor.prototype === x); +}); +/** + * When compiled for a command-line target, whatever function + * *main-cli-fn* is set to will be called with the command-line + * argv as arguments + */ +cljs.core._STAR_main_cli_fn_STAR_ = null; +/** + * Return x's constructor. + */ +cljs.core.type = (function cljs$core$type(x){ +if((x == null)){ +return null; +} else { +return x.constructor; +} +}); +cljs.core.missing_protocol = (function cljs$core$missing_protocol(proto,obj){ +var ty = cljs.core.type(obj); +var ty__$1 = (cljs.core.truth_((function (){var and__7948__auto__ = ty; +if(cljs.core.truth_(and__7948__auto__)){ +return ty.cljs$lang$type; +} else { +return and__7948__auto__; +} +})())?ty.cljs$lang$ctorStr:goog.typeOf(obj)); +return (new Error(["No protocol method ",proto," defined for type ",ty__$1,": ",obj].join(""))); +}); +cljs.core.type__GT_str = (function cljs$core$type__GT_str(ty){ +var temp__5276__auto__ = ty.cljs$lang$ctorStr; +if(cljs.core.truth_(temp__5276__auto__)){ +var s = temp__5276__auto__; +return s; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(ty)].join(''); +} +}); +cljs.core.load_file = (function cljs$core$load_file(file){ +if(cljs.core.truth_(COMPILED)){ +return null; +} else { +return goog.nodeGlobalRequire(file); +} +}); +if((typeof Symbol !== 'undefined') && ((goog.typeOf(Symbol) === "function"))){ +cljs.core.ITER_SYMBOL = Symbol.iterator; +} else { +cljs.core.ITER_SYMBOL = "@@iterator"; +} +/** + * @enum {string} + */ +cljs.core.CHAR_MAP = ({"]": "_RBRACK_", "'": "_SINGLEQUOTE_", "=": "_EQ_", "\"": "_DOUBLEQUOTE_", "!": "_BANG_", "*": "_STAR_", "%": "_PERCENT_", "|": "_BAR_", "~": "_TILDE_", "/": "_SLASH_", "\\": "_BSLASH_", "-": "_", "?": "_QMARK_", "&": "_AMPERSAND_", ":": "_COLON_", "<": "_LT_", "{": "_LBRACE_", "}": "_RBRACE_", "[": "_LBRACK_", "#": "_SHARP_", "^": "_CARET_", "+": "_PLUS_", "@": "_CIRCA_", ">": "_GT_"}); +/** + * @enum {string} + */ +cljs.core.DEMUNGE_MAP = ({"_RBRACE_": "}", "_COLON_": ":", "_BANG_": "!", "_QMARK_": "?", "_BSLASH_": "\\\\", "_SLASH_": "/", "_PERCENT_": "%", "_PLUS_": "+", "_SHARP_": "#", "_LBRACE_": "{", "_BAR_": "|", "_LBRACK_": "[", "_EQ_": "=", "_": "-", "_TILDE_": "~", "_RBRACK_": "]", "_GT_": ">", "_SINGLEQUOTE_": "'", "_CIRCA_": "@", "_AMPERSAND_": "&", "_DOUBLEQUOTE_": "\\\"", "_CARET_": "^", "_LT_": "<", "_STAR_": "*"}); +cljs.core.DEMUNGE_PATTERN = null; +/** + * Returns highest resolution time offered by host in milliseconds. + */ +cljs.core.system_time = (function cljs$core$system_time(){ +if((typeof performance !== 'undefined') && (!((performance.now == null)))){ +return performance.now(); +} else { +if((typeof process !== 'undefined') && (!((process.hrtime == null)))){ +var t = process.hrtime(); +return ((((t[(0)]) * 1.0E9) + (t[(1)])) / 1000000.0); +} else { +return (new Date()).getTime(); + +} +} +}); +/** + * Construct a JavaScript array of the specified dimensions. Accepts ignored + * type argument for compatibility with Clojure. Note that there is no efficient + * way to allocate multi-dimensional arrays in JavaScript; as such, this function + * will run in polynomial time when called with 3 or more arguments. + */ +cljs.core.make_array = (function cljs$core$make_array(var_args){ +var args11019 = []; +var len__9181__auto___11025 = arguments.length; +var i__9182__auto___11026 = (0); +while(true){ +if((i__9182__auto___11026 < len__9181__auto___11025)){ +args11019.push((arguments[i__9182__auto___11026])); + +var G__11027 = (i__9182__auto___11026 + (1)); +i__9182__auto___11026 = G__11027; +continue; +} else { +} +break; +} + +var G__11024 = args11019.length; +switch (G__11024) { +case 1: +return cljs.core.make_array.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.make_array.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11019.slice((2)),(0),null)); +return cljs.core.make_array.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.make_array.cljs$core$IFn$_invoke$arity$1 = (function (size){ +return (new Array(size)); +}); + +cljs.core.make_array.cljs$core$IFn$_invoke$arity$2 = (function (type,size){ +return (new Array(size)); +}); + +cljs.core.make_array.cljs$core$IFn$_invoke$arity$variadic = (function (type,size,more_sizes){ +var dims = more_sizes; +var dimarray = (new Array(size)); +var n__8981__auto___11029 = dimarray.length; +var i_11030 = (0); +while(true){ +if((i_11030 < n__8981__auto___11029)){ +(dimarray[i_11030] = (cljs.core.apply.cljs$core$IFn$_invoke$arity$3 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.make_array,null,dims) : cljs.core.apply.call(null,cljs.core.make_array,null,dims))); + +var G__11031 = (i_11030 + (1)); +i_11030 = G__11031; +continue; +} else { +} +break; +} + +return dimarray; +}); + +cljs.core.make_array.cljs$lang$applyTo = (function (seq11020){ +var G__11021 = cljs.core.first(seq11020); +var seq11020__$1 = cljs.core.next(seq11020); +var G__11022 = cljs.core.first(seq11020__$1); +var seq11020__$2 = cljs.core.next(seq11020__$1); +return cljs.core.make_array.cljs$core$IFn$_invoke$arity$variadic(G__11021,G__11022,seq11020__$2); +}); + +cljs.core.make_array.cljs$lang$maxFixedArity = (2); + +/** + * Returns a javascript array, cloned from the passed in array + */ +cljs.core.aclone = (function cljs$core$aclone(arr){ +var len = arr.length; +var new_arr = (new Array(len)); +var n__8981__auto___11032 = len; +var i_11033 = (0); +while(true){ +if((i_11033 < n__8981__auto___11032)){ +(new_arr[i_11033] = (arr[i_11033])); + +var G__11034 = (i_11033 + (1)); +i_11033 = G__11034; +continue; +} else { +} +break; +} + +return new_arr; +}); +/** + * Creates a new javascript array. + * @param {...*} var_args + */ +cljs.core.array = (function cljs$core$array(var_args){ +var a = (new Array(arguments.length)); +var i = (0); +while(true){ +if((i < a.length)){ +(a[i] = (arguments[i])); + +var G__11035 = (i + (1)); +i = G__11035; +continue; +} else { +return a; +} +break; +} +}); +/** + * Returns the value at the index. + */ +cljs.core.aget = (function cljs$core$aget(var_args){ +var args11036 = []; +var len__9181__auto___11045 = arguments.length; +var i__9182__auto___11046 = (0); +while(true){ +if((i__9182__auto___11046 < len__9181__auto___11045)){ +args11036.push((arguments[i__9182__auto___11046])); + +var G__11047 = (i__9182__auto___11046 + (1)); +i__9182__auto___11046 = G__11047; +continue; +} else { +} +break; +} + +var G__11041 = args11036.length; +switch (G__11041) { +case 2: +return cljs.core.aget.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11036.slice((2)),(0),null)); +return cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.aget.cljs$core$IFn$_invoke$arity$2 = (function (array,i){ +return (array[i]); +}); + +cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic = (function (array,i,idxs){ +var G__11042 = cljs.core.aget; +var G__11043 = (array[i]); +var G__11044 = idxs; +return (cljs.core.apply.cljs$core$IFn$_invoke$arity$3 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$3(G__11042,G__11043,G__11044) : cljs.core.apply.call(null,G__11042,G__11043,G__11044)); +}); + +cljs.core.aget.cljs$lang$applyTo = (function (seq11037){ +var G__11038 = cljs.core.first(seq11037); +var seq11037__$1 = cljs.core.next(seq11037); +var G__11039 = cljs.core.first(seq11037__$1); +var seq11037__$2 = cljs.core.next(seq11037__$1); +return cljs.core.aget.cljs$core$IFn$_invoke$arity$variadic(G__11038,G__11039,seq11037__$2); +}); + +cljs.core.aget.cljs$lang$maxFixedArity = (2); + +/** + * Sets the value at the index. + */ +cljs.core.aset = (function cljs$core$aset(var_args){ +var args11049 = []; +var len__9181__auto___11060 = arguments.length; +var i__9182__auto___11061 = (0); +while(true){ +if((i__9182__auto___11061 < len__9181__auto___11060)){ +args11049.push((arguments[i__9182__auto___11061])); + +var G__11062 = (i__9182__auto___11061 + (1)); +i__9182__auto___11061 = G__11062; +continue; +} else { +} +break; +} + +var G__11055 = args11049.length; +switch (G__11055) { +case 3: +return cljs.core.aset.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11049.slice((3)),(0),null)); +return cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.aset.cljs$core$IFn$_invoke$arity$3 = (function (array,i,val){ +return (array[i] = val); +}); + +cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic = (function (array,idx,idx2,idxv){ +var G__11056 = cljs.core.aset; +var G__11057 = (array[idx]); +var G__11058 = idx2; +var G__11059 = idxv; +return (cljs.core.apply.cljs$core$IFn$_invoke$arity$4 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$4(G__11056,G__11057,G__11058,G__11059) : cljs.core.apply.call(null,G__11056,G__11057,G__11058,G__11059)); +}); + +cljs.core.aset.cljs$lang$applyTo = (function (seq11050){ +var G__11051 = cljs.core.first(seq11050); +var seq11050__$1 = cljs.core.next(seq11050); +var G__11052 = cljs.core.first(seq11050__$1); +var seq11050__$2 = cljs.core.next(seq11050__$1); +var G__11053 = cljs.core.first(seq11050__$2); +var seq11050__$3 = cljs.core.next(seq11050__$2); +return cljs.core.aset.cljs$core$IFn$_invoke$arity$variadic(G__11051,G__11052,G__11053,seq11050__$3); +}); + +cljs.core.aset.cljs$lang$maxFixedArity = (3); + +/** + * Returns the length of the array. Works on arrays of all types. + */ +cljs.core.alength = (function cljs$core$alength(array){ +return array.length; +}); +/** + * Returns an array with components set to the values in aseq. Optional type + * argument accepted for compatibility with Clojure. + */ +cljs.core.into_array = (function cljs$core$into_array(var_args){ +var args11064 = []; +var len__9181__auto___11070 = arguments.length; +var i__9182__auto___11071 = (0); +while(true){ +if((i__9182__auto___11071 < len__9181__auto___11070)){ +args11064.push((arguments[i__9182__auto___11071])); + +var G__11072 = (i__9182__auto___11071 + (1)); +i__9182__auto___11071 = G__11072; +continue; +} else { +} +break; +} + +var G__11066 = args11064.length; +switch (G__11066) { +case 1: +return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.into_array.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11064.length)].join(''))); + +} +}); + +cljs.core.into_array.cljs$core$IFn$_invoke$arity$1 = (function (aseq){ +return cljs.core.into_array.cljs$core$IFn$_invoke$arity$2(null,aseq); +}); + +cljs.core.into_array.cljs$core$IFn$_invoke$arity$2 = (function (type,aseq){ +var G__11067 = (function (a,x){ +a.push(x); + +return a; +}); +var G__11068 = []; +var G__11069 = aseq; +return (cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(G__11067,G__11068,G__11069) : cljs.core.reduce.call(null,G__11067,G__11068,G__11069)); +}); + +cljs.core.into_array.cljs$lang$maxFixedArity = 2; + +/** + * Invoke JavaScript object method via string. Needed when the + * string is not a valid unquoted property name. + */ +cljs.core.js_invoke = (function cljs$core$js_invoke(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___11077 = arguments.length; +var i__9182__auto___11078 = (0); +while(true){ +if((i__9182__auto___11078 < len__9181__auto___11077)){ +args__9188__auto__.push((arguments[i__9182__auto___11078])); + +var G__11079 = (i__9182__auto___11078 + (1)); +i__9182__auto___11078 = G__11079; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((2) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((2)),(0),null)):null); +return cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9189__auto__); +}); + +cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic = (function (obj,s,args){ +return (obj[s]).apply(obj,cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(args)); +}); + +cljs.core.js_invoke.cljs$lang$maxFixedArity = (2); + +cljs.core.js_invoke.cljs$lang$applyTo = (function (seq11074){ +var G__11075 = cljs.core.first(seq11074); +var seq11074__$1 = cljs.core.next(seq11074); +var G__11076 = cljs.core.first(seq11074__$1); +var seq11074__$2 = cljs.core.next(seq11074__$1); +return cljs.core.js_invoke.cljs$core$IFn$_invoke$arity$variadic(G__11075,G__11076,seq11074__$2); +}); + + +/** + * Marker protocol + * @interface + */ +cljs.core.Fn = function(){}; + + +/** + * Protocol for adding the ability to invoke an object as a function. + * For example, a vector can also be used to look up a value: + * ([1 2 3 4] 1) => 2 + * @interface + */ +cljs.core.IFn = function(){}; + +cljs.core._invoke = (function cljs$core$_invoke(var_args){ +var args11080 = []; +var len__9181__auto___11083 = arguments.length; +var i__9182__auto___11084 = (0); +while(true){ +if((i__9182__auto___11084 < len__9181__auto___11083)){ +args11080.push((arguments[i__9182__auto___11084])); + +var G__11085 = (i__9182__auto___11084 + (1)); +i__9182__auto___11084 = G__11085; +continue; +} else { +} +break; +} + +var G__11082 = args11080.length; +switch (G__11082) { +case 1: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +case 6: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$6((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)])); + +break; +case 7: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$7((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)])); + +break; +case 8: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$8((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)])); + +break; +case 9: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$9((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)])); + +break; +case 10: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$10((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)])); + +break; +case 11: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$11((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)])); + +break; +case 12: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$12((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)])); + +break; +case 13: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$13((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)])); + +break; +case 14: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$14((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)])); + +break; +case 15: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$15((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)])); + +break; +case 16: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$16((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)]),(arguments[(15)])); + +break; +case 17: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$17((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)]),(arguments[(15)]),(arguments[(16)])); + +break; +case 18: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$18((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)]),(arguments[(15)]),(arguments[(16)]),(arguments[(17)])); + +break; +case 19: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$19((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)]),(arguments[(15)]),(arguments[(16)]),(arguments[(17)]),(arguments[(18)])); + +break; +case 20: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$20((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)]),(arguments[(15)]),(arguments[(16)]),(arguments[(17)]),(arguments[(18)]),(arguments[(19)])); + +break; +case 21: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$21((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)]),(arguments[(15)]),(arguments[(16)]),(arguments[(17)]),(arguments[(18)]),(arguments[(19)]),(arguments[(20)])); + +break; +case 22: +return cljs.core._invoke.cljs$core$IFn$_invoke$arity$22((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)]),(arguments[(7)]),(arguments[(8)]),(arguments[(9)]),(arguments[(10)]),(arguments[(11)]),(arguments[(12)]),(arguments[(13)]),(arguments[(14)]),(arguments[(15)]),(arguments[(16)]),(arguments[(17)]),(arguments[(18)]),(arguments[(19)]),(arguments[(20)]),(arguments[(21)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11080.length)].join(''))); + +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$1 = (function (this$){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$1 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$1(this$); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto__.call(null,this$)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto____$1.call(null,this$)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$2 = (function (this$,a){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$2 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$2(this$,a); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(this$,a) : m__8679__auto__.call(null,this$,a)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(this$,a) : m__8679__auto____$1.call(null,this$,a)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$3 = (function (this$,a,b){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$3 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$3(this$,a,b); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(this$,a,b) : m__8679__auto__.call(null,this$,a,b)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(this$,a,b) : m__8679__auto____$1.call(null,this$,a,b)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$4 = (function (this$,a,b,c){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$4 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$4(this$,a,b,c); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$4(this$,a,b,c) : m__8679__auto__.call(null,this$,a,b,c)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$4(this$,a,b,c) : m__8679__auto____$1.call(null,this$,a,b,c)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$5 = (function (this$,a,b,c,d){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$5 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$5(this$,a,b,c,d); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$5 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$5(this$,a,b,c,d) : m__8679__auto__.call(null,this$,a,b,c,d)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$5 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$5(this$,a,b,c,d) : m__8679__auto____$1.call(null,this$,a,b,c,d)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$6 = (function (this$,a,b,c,d,e){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$6 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$6(this$,a,b,c,d,e); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$6 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$6(this$,a,b,c,d,e) : m__8679__auto__.call(null,this$,a,b,c,d,e)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$6 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$6(this$,a,b,c,d,e) : m__8679__auto____$1.call(null,this$,a,b,c,d,e)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$7 = (function (this$,a,b,c,d,e,f){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$7 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$7(this$,a,b,c,d,e,f); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$7 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$7(this$,a,b,c,d,e,f) : m__8679__auto__.call(null,this$,a,b,c,d,e,f)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$7 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$7(this$,a,b,c,d,e,f) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$8 = (function (this$,a,b,c,d,e,f,g){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$8 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$8(this$,a,b,c,d,e,f,g); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$8 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$8(this$,a,b,c,d,e,f,g) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$8 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$8(this$,a,b,c,d,e,f,g) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$9 = (function (this$,a,b,c,d,e,f,g,h){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$9 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$9(this$,a,b,c,d,e,f,g,h); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$9 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$9(this$,a,b,c,d,e,f,g,h) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$9 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$9(this$,a,b,c,d,e,f,g,h) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$10 = (function (this$,a,b,c,d,e,f,g,h,i){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$10 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$10(this$,a,b,c,d,e,f,g,h,i); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$10 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$10(this$,a,b,c,d,e,f,g,h,i) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$10 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$10(this$,a,b,c,d,e,f,g,h,i) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$11 = (function (this$,a,b,c,d,e,f,g,h,i,j){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$11 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$11(this$,a,b,c,d,e,f,g,h,i,j); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$11 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$11(this$,a,b,c,d,e,f,g,h,i,j) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$11 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$11(this$,a,b,c,d,e,f,g,h,i,j) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$12 = (function (this$,a,b,c,d,e,f,g,h,i,j,k){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$12 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$12(this$,a,b,c,d,e,f,g,h,i,j,k); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$12 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$12(this$,a,b,c,d,e,f,g,h,i,j,k) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$12 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$12(this$,a,b,c,d,e,f,g,h,i,j,k) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$13 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$13 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$13(this$,a,b,c,d,e,f,g,h,i,j,k,l); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$13 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$13(this$,a,b,c,d,e,f,g,h,i,j,k,l) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$13 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$13(this$,a,b,c,d,e,f,g,h,i,j,k,l) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$14 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$14 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$14(this$,a,b,c,d,e,f,g,h,i,j,k,l,m); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$14 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$14(this$,a,b,c,d,e,f,g,h,i,j,k,l,m) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$14 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$14(this$,a,b,c,d,e,f,g,h,i,j,k,l,m) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$15 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$15 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$15(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$15 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$15(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$15 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$15(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$16 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$16 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$16(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$16 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$16(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$16 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$16(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$17 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$17 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$17(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$17 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$17(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$17 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$17(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$18 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$18 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$18(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$18 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$18(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$18 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$18(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$19 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$19 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$19(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$19 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$19(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$19 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$19(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$20 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$20 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$20(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$20 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$20(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$20 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$20(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$21 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$21 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$21(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$21 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$21(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$21 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$21(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$core$IFn$_invoke$arity$22 = (function (this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +if((!((this$ == null))) && (!((this$.cljs$core$IFn$_invoke$arity$22 == null)))){ +return this$.cljs$core$IFn$_invoke$arity$22(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._invoke[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$22 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$22(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest) : m__8679__auto__.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest)); +} else { +var m__8679__auto____$1 = (cljs.core._invoke["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$22 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$22(this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest) : m__8679__auto____$1.call(null,this$,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest)); +} else { +throw cljs.core.missing_protocol("IFn.-invoke",this$); +} +} +} +}); + +cljs.core._invoke.cljs$lang$maxFixedArity = 22; + + + +/** + * Protocol for cloning a value. + * @interface + */ +cljs.core.ICloneable = function(){}; + +/** + * Creates a clone of value. + */ +cljs.core._clone = (function cljs$core$_clone(value){ +if((!((value == null))) && (!((value.cljs$core$ICloneable$_clone$arity$1 == null)))){ +return value.cljs$core$ICloneable$_clone$arity$1(value); +} else { +var x__8678__auto__ = (((value == null))?null:value); +var m__8679__auto__ = (cljs.core._clone[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(value) : m__8679__auto__.call(null,value)); +} else { +var m__8679__auto____$1 = (cljs.core._clone["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(value) : m__8679__auto____$1.call(null,value)); +} else { +throw cljs.core.missing_protocol("ICloneable.-clone",value); +} +} +} +}); + + +/** + * Protocol for adding the ability to count a collection in constant time. + * @interface + */ +cljs.core.ICounted = function(){}; + +/** + * Calculates the count of coll in constant time. Used by cljs.core/count. + */ +cljs.core._count = (function cljs$core$_count(coll){ +if((!((coll == null))) && (!((coll.cljs$core$ICounted$_count$arity$1 == null)))){ +return coll.cljs$core$ICounted$_count$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._count[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._count["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("ICounted.-count",coll); +} +} +} +}); + + +/** + * Protocol for creating an empty collection. + * @interface + */ +cljs.core.IEmptyableCollection = function(){}; + +/** + * Returns an empty collection of the same category as coll. Used + * by cljs.core/empty. + */ +cljs.core._empty = (function cljs$core$_empty(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IEmptyableCollection$_empty$arity$1 == null)))){ +return coll.cljs$core$IEmptyableCollection$_empty$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._empty[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._empty["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IEmptyableCollection.-empty",coll); +} +} +} +}); + + +/** + * Protocol for adding to a collection. + * @interface + */ +cljs.core.ICollection = function(){}; + +/** + * Returns a new collection of coll with o added to it. The new item + * should be added to the most efficient place, e.g. + * (conj [1 2 3 4] 5) => [1 2 3 4 5] + * (conj '(2 3 4 5) 1) => '(1 2 3 4 5) + */ +cljs.core._conj = (function cljs$core$_conj(coll,o){ +if((!((coll == null))) && (!((coll.cljs$core$ICollection$_conj$arity$2 == null)))){ +return coll.cljs$core$ICollection$_conj$arity$2(coll,o); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._conj[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,o) : m__8679__auto__.call(null,coll,o)); +} else { +var m__8679__auto____$1 = (cljs.core._conj["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,o) : m__8679__auto____$1.call(null,coll,o)); +} else { +throw cljs.core.missing_protocol("ICollection.-conj",coll); +} +} +} +}); + + +/** + * Protocol for collections to provide indexed-based access to their items. + * @interface + */ +cljs.core.IIndexed = function(){}; + +/** + * Returns the value at the index n in the collection coll. + * Returns not-found if index n is out of bounds and not-found is supplied. + */ +cljs.core._nth = (function cljs$core$_nth(var_args){ +var args11087 = []; +var len__9181__auto___11090 = arguments.length; +var i__9182__auto___11091 = (0); +while(true){ +if((i__9182__auto___11091 < len__9181__auto___11090)){ +args11087.push((arguments[i__9182__auto___11091])); + +var G__11092 = (i__9182__auto___11091 + (1)); +i__9182__auto___11091 = G__11092; +continue; +} else { +} +break; +} + +var G__11089 = args11087.length; +switch (G__11089) { +case 2: +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core._nth.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11087.length)].join(''))); + +} +}); + +cljs.core._nth.cljs$core$IFn$_invoke$arity$2 = (function (coll,n){ +if((!((coll == null))) && (!((coll.cljs$core$IIndexed$_nth$arity$2 == null)))){ +return coll.cljs$core$IIndexed$_nth$arity$2(coll,n); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._nth[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,n) : m__8679__auto__.call(null,coll,n)); +} else { +var m__8679__auto____$1 = (cljs.core._nth["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,n) : m__8679__auto____$1.call(null,coll,n)); +} else { +throw cljs.core.missing_protocol("IIndexed.-nth",coll); +} +} +} +}); + +cljs.core._nth.cljs$core$IFn$_invoke$arity$3 = (function (coll,n,not_found){ +if((!((coll == null))) && (!((coll.cljs$core$IIndexed$_nth$arity$3 == null)))){ +return coll.cljs$core$IIndexed$_nth$arity$3(coll,n,not_found); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._nth[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(coll,n,not_found) : m__8679__auto__.call(null,coll,n,not_found)); +} else { +var m__8679__auto____$1 = (cljs.core._nth["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(coll,n,not_found) : m__8679__auto____$1.call(null,coll,n,not_found)); +} else { +throw cljs.core.missing_protocol("IIndexed.-nth",coll); +} +} +} +}); + +cljs.core._nth.cljs$lang$maxFixedArity = 3; + + + +/** + * Marker protocol indicating an array sequence. + * @interface + */ +cljs.core.ASeq = function(){}; + + +/** + * Protocol for collections to provide access to their items as sequences. + * @interface + */ +cljs.core.ISeq = function(){}; + +/** + * Returns the first item in the collection coll. Used by cljs.core/first. + */ +cljs.core._first = (function cljs$core$_first(coll){ +if((!((coll == null))) && (!((coll.cljs$core$ISeq$_first$arity$1 == null)))){ +return coll.cljs$core$ISeq$_first$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._first[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._first["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("ISeq.-first",coll); +} +} +} +}); + +/** + * Returns a new collection of coll without the first item. It should + * always return a seq, e.g. + * (rest []) => () + * (rest nil) => () + */ +cljs.core._rest = (function cljs$core$_rest(coll){ +if((!((coll == null))) && (!((coll.cljs$core$ISeq$_rest$arity$1 == null)))){ +return coll.cljs$core$ISeq$_rest$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._rest[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._rest["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("ISeq.-rest",coll); +} +} +} +}); + + +/** + * Protocol for accessing the next items of a collection. + * @interface + */ +cljs.core.INext = function(){}; + +/** + * Returns a new collection of coll without the first item. In contrast to + * rest, it should return nil if there are no more items, e.g. + * (next []) => nil + * (next nil) => nil + */ +cljs.core._next = (function cljs$core$_next(coll){ +if((!((coll == null))) && (!((coll.cljs$core$INext$_next$arity$1 == null)))){ +return coll.cljs$core$INext$_next$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._next[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._next["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("INext.-next",coll); +} +} +} +}); + + +/** + * Protocol for looking up a value in a data structure. + * @interface + */ +cljs.core.ILookup = function(){}; + +/** + * Use k to look up a value in o. If not-found is supplied and k is not + * a valid value that can be used for look up, not-found is returned. + */ +cljs.core._lookup = (function cljs$core$_lookup(var_args){ +var args11094 = []; +var len__9181__auto___11097 = arguments.length; +var i__9182__auto___11098 = (0); +while(true){ +if((i__9182__auto___11098 < len__9181__auto___11097)){ +args11094.push((arguments[i__9182__auto___11098])); + +var G__11099 = (i__9182__auto___11098 + (1)); +i__9182__auto___11098 = G__11099; +continue; +} else { +} +break; +} + +var G__11096 = args11094.length; +switch (G__11096) { +case 2: +return cljs.core._lookup.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11094.length)].join(''))); + +} +}); + +cljs.core._lookup.cljs$core$IFn$_invoke$arity$2 = (function (o,k){ +if((!((o == null))) && (!((o.cljs$core$ILookup$_lookup$arity$2 == null)))){ +return o.cljs$core$ILookup$_lookup$arity$2(o,k); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._lookup[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(o,k) : m__8679__auto__.call(null,o,k)); +} else { +var m__8679__auto____$1 = (cljs.core._lookup["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(o,k) : m__8679__auto____$1.call(null,o,k)); +} else { +throw cljs.core.missing_protocol("ILookup.-lookup",o); +} +} +} +}); + +cljs.core._lookup.cljs$core$IFn$_invoke$arity$3 = (function (o,k,not_found){ +if((!((o == null))) && (!((o.cljs$core$ILookup$_lookup$arity$3 == null)))){ +return o.cljs$core$ILookup$_lookup$arity$3(o,k,not_found); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._lookup[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(o,k,not_found) : m__8679__auto__.call(null,o,k,not_found)); +} else { +var m__8679__auto____$1 = (cljs.core._lookup["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(o,k,not_found) : m__8679__auto____$1.call(null,o,k,not_found)); +} else { +throw cljs.core.missing_protocol("ILookup.-lookup",o); +} +} +} +}); + +cljs.core._lookup.cljs$lang$maxFixedArity = 3; + + + +/** + * Protocol for adding associativity to collections. + * @interface + */ +cljs.core.IAssociative = function(){}; + +/** + * Returns true if k is a key in coll. + */ +cljs.core._contains_key_QMARK_ = (function cljs$core$_contains_key_QMARK_(coll,k){ +if((!((coll == null))) && (!((coll.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 == null)))){ +return coll.cljs$core$IAssociative$_contains_key_QMARK_$arity$2(coll,k); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._contains_key_QMARK_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,k) : m__8679__auto__.call(null,coll,k)); +} else { +var m__8679__auto____$1 = (cljs.core._contains_key_QMARK_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,k) : m__8679__auto____$1.call(null,coll,k)); +} else { +throw cljs.core.missing_protocol("IAssociative.-contains-key?",coll); +} +} +} +}); + +/** + * Returns a new collection of coll with a mapping from key k to + * value v added to it. + */ +cljs.core._assoc = (function cljs$core$_assoc(coll,k,v){ +if((!((coll == null))) && (!((coll.cljs$core$IAssociative$_assoc$arity$3 == null)))){ +return coll.cljs$core$IAssociative$_assoc$arity$3(coll,k,v); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._assoc[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(coll,k,v) : m__8679__auto__.call(null,coll,k,v)); +} else { +var m__8679__auto____$1 = (cljs.core._assoc["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(coll,k,v) : m__8679__auto____$1.call(null,coll,k,v)); +} else { +throw cljs.core.missing_protocol("IAssociative.-assoc",coll); +} +} +} +}); + + +/** + * Protocol for implementing entry finding in collections. + * @interface + */ +cljs.core.IFind = function(){}; + +cljs.core._find = (function cljs$core$_find(coll,k){ +if((!((coll == null))) && (!((coll.cljs$core$IFind$_find$arity$2 == null)))){ +return coll.cljs$core$IFind$_find$arity$2(coll,k); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._find[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,k) : m__8679__auto__.call(null,coll,k)); +} else { +var m__8679__auto____$1 = (cljs.core._find["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,k) : m__8679__auto____$1.call(null,coll,k)); +} else { +throw cljs.core.missing_protocol("IFind.-find",coll); +} +} +} +}); + + +/** + * Protocol for adding mapping functionality to collections. + * @interface + */ +cljs.core.IMap = function(){}; + +/** + * Returns a new collection of coll without the mapping for key k. + */ +cljs.core._dissoc = (function cljs$core$_dissoc(coll,k){ +if((!((coll == null))) && (!((coll.cljs$core$IMap$_dissoc$arity$2 == null)))){ +return coll.cljs$core$IMap$_dissoc$arity$2(coll,k); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._dissoc[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,k) : m__8679__auto__.call(null,coll,k)); +} else { +var m__8679__auto____$1 = (cljs.core._dissoc["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,k) : m__8679__auto____$1.call(null,coll,k)); +} else { +throw cljs.core.missing_protocol("IMap.-dissoc",coll); +} +} +} +}); + + +/** + * Protocol for examining a map entry. + * @interface + */ +cljs.core.IMapEntry = function(){}; + +/** + * Returns the key of the map entry. + */ +cljs.core._key = (function cljs$core$_key(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IMapEntry$_key$arity$1 == null)))){ +return coll.cljs$core$IMapEntry$_key$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._key[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._key["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IMapEntry.-key",coll); +} +} +} +}); + +/** + * Returns the value of the map entry. + */ +cljs.core._val = (function cljs$core$_val(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IMapEntry$_val$arity$1 == null)))){ +return coll.cljs$core$IMapEntry$_val$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._val[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._val["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IMapEntry.-val",coll); +} +} +} +}); + + +/** + * Protocol for adding set functionality to a collection. + * @interface + */ +cljs.core.ISet = function(){}; + +/** + * Returns a new collection of coll that does not contain v. + */ +cljs.core._disjoin = (function cljs$core$_disjoin(coll,v){ +if((!((coll == null))) && (!((coll.cljs$core$ISet$_disjoin$arity$2 == null)))){ +return coll.cljs$core$ISet$_disjoin$arity$2(coll,v); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._disjoin[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,v) : m__8679__auto__.call(null,coll,v)); +} else { +var m__8679__auto____$1 = (cljs.core._disjoin["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,v) : m__8679__auto____$1.call(null,coll,v)); +} else { +throw cljs.core.missing_protocol("ISet.-disjoin",coll); +} +} +} +}); + + +/** + * Protocol for collections to provide access to their items as stacks. The top + * of the stack should be accessed in the most efficient way for the different + * data structures. + * @interface + */ +cljs.core.IStack = function(){}; + +/** + * Returns the item from the top of the stack. Is used by cljs.core/peek. + */ +cljs.core._peek = (function cljs$core$_peek(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IStack$_peek$arity$1 == null)))){ +return coll.cljs$core$IStack$_peek$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._peek[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._peek["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IStack.-peek",coll); +} +} +} +}); + +/** + * Returns a new stack without the item on top of the stack. Is used + * by cljs.core/pop. + */ +cljs.core._pop = (function cljs$core$_pop(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IStack$_pop$arity$1 == null)))){ +return coll.cljs$core$IStack$_pop$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._pop[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._pop["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IStack.-pop",coll); +} +} +} +}); + + +/** + * Protocol for adding vector functionality to collections. + * @interface + */ +cljs.core.IVector = function(){}; + +/** + * Returns a new vector with value val added at position n. + */ +cljs.core._assoc_n = (function cljs$core$_assoc_n(coll,n,val){ +if((!((coll == null))) && (!((coll.cljs$core$IVector$_assoc_n$arity$3 == null)))){ +return coll.cljs$core$IVector$_assoc_n$arity$3(coll,n,val); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._assoc_n[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(coll,n,val) : m__8679__auto__.call(null,coll,n,val)); +} else { +var m__8679__auto____$1 = (cljs.core._assoc_n["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(coll,n,val) : m__8679__auto____$1.call(null,coll,n,val)); +} else { +throw cljs.core.missing_protocol("IVector.-assoc-n",coll); +} +} +} +}); + + +/** + * Protocol for adding dereference functionality to a reference. + * @interface + */ +cljs.core.IDeref = function(){}; + +/** + * Returns the value of the reference o. + */ +cljs.core._deref = (function cljs$core$_deref(o){ +if((!((o == null))) && (!((o.cljs$core$IDeref$_deref$arity$1 == null)))){ +return o.cljs$core$IDeref$_deref$arity$1(o); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._deref[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto__.call(null,o)); +} else { +var m__8679__auto____$1 = (cljs.core._deref["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto____$1.call(null,o)); +} else { +throw cljs.core.missing_protocol("IDeref.-deref",o); +} +} +} +}); + + +/** + * @interface + */ +cljs.core.IDerefWithTimeout = function(){}; + +cljs.core._deref_with_timeout = (function cljs$core$_deref_with_timeout(o,msec,timeout_val){ +if((!((o == null))) && (!((o.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3 == null)))){ +return o.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3(o,msec,timeout_val); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._deref_with_timeout[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(o,msec,timeout_val) : m__8679__auto__.call(null,o,msec,timeout_val)); +} else { +var m__8679__auto____$1 = (cljs.core._deref_with_timeout["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(o,msec,timeout_val) : m__8679__auto____$1.call(null,o,msec,timeout_val)); +} else { +throw cljs.core.missing_protocol("IDerefWithTimeout.-deref-with-timeout",o); +} +} +} +}); + + +/** + * Protocol for accessing the metadata of an object. + * @interface + */ +cljs.core.IMeta = function(){}; + +/** + * Returns the metadata of object o. + */ +cljs.core._meta = (function cljs$core$_meta(o){ +if((!((o == null))) && (!((o.cljs$core$IMeta$_meta$arity$1 == null)))){ +return o.cljs$core$IMeta$_meta$arity$1(o); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._meta[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto__.call(null,o)); +} else { +var m__8679__auto____$1 = (cljs.core._meta["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto____$1.call(null,o)); +} else { +throw cljs.core.missing_protocol("IMeta.-meta",o); +} +} +} +}); + + +/** + * Protocol for adding metadata to an object. + * @interface + */ +cljs.core.IWithMeta = function(){}; + +/** + * Returns a new object with value of o and metadata meta added to it. + */ +cljs.core._with_meta = (function cljs$core$_with_meta(o,meta){ +if((!((o == null))) && (!((o.cljs$core$IWithMeta$_with_meta$arity$2 == null)))){ +return o.cljs$core$IWithMeta$_with_meta$arity$2(o,meta); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._with_meta[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(o,meta) : m__8679__auto__.call(null,o,meta)); +} else { +var m__8679__auto____$1 = (cljs.core._with_meta["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(o,meta) : m__8679__auto____$1.call(null,o,meta)); +} else { +throw cljs.core.missing_protocol("IWithMeta.-with-meta",o); +} +} +} +}); + + +/** + * Protocol for seq types that can reduce themselves. + * Called by cljs.core/reduce. + * @interface + */ +cljs.core.IReduce = function(){}; + +/** + * f should be a function of 2 arguments. If start is not supplied, + * returns the result of applying f to the first 2 items in coll, then + * applying f to that result and the 3rd item, etc. + */ +cljs.core._reduce = (function cljs$core$_reduce(var_args){ +var args11101 = []; +var len__9181__auto___11104 = arguments.length; +var i__9182__auto___11105 = (0); +while(true){ +if((i__9182__auto___11105 < len__9181__auto___11104)){ +args11101.push((arguments[i__9182__auto___11105])); + +var G__11106 = (i__9182__auto___11105 + (1)); +i__9182__auto___11105 = G__11106; +continue; +} else { +} +break; +} + +var G__11103 = args11101.length; +switch (G__11103) { +case 2: +return cljs.core._reduce.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core._reduce.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11101.length)].join(''))); + +} +}); + +cljs.core._reduce.cljs$core$IFn$_invoke$arity$2 = (function (coll,f){ +if((!((coll == null))) && (!((coll.cljs$core$IReduce$_reduce$arity$2 == null)))){ +return coll.cljs$core$IReduce$_reduce$arity$2(coll,f); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._reduce[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,f) : m__8679__auto__.call(null,coll,f)); +} else { +var m__8679__auto____$1 = (cljs.core._reduce["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,f) : m__8679__auto____$1.call(null,coll,f)); +} else { +throw cljs.core.missing_protocol("IReduce.-reduce",coll); +} +} +} +}); + +cljs.core._reduce.cljs$core$IFn$_invoke$arity$3 = (function (coll,f,start){ +if((!((coll == null))) && (!((coll.cljs$core$IReduce$_reduce$arity$3 == null)))){ +return coll.cljs$core$IReduce$_reduce$arity$3(coll,f,start); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._reduce[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(coll,f,start) : m__8679__auto__.call(null,coll,f,start)); +} else { +var m__8679__auto____$1 = (cljs.core._reduce["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(coll,f,start) : m__8679__auto____$1.call(null,coll,f,start)); +} else { +throw cljs.core.missing_protocol("IReduce.-reduce",coll); +} +} +} +}); + +cljs.core._reduce.cljs$lang$maxFixedArity = 3; + + + +/** + * Protocol for associative types that can reduce themselves + * via a function of key and val. Called by cljs.core/reduce-kv. + * @interface + */ +cljs.core.IKVReduce = function(){}; + +/** + * Reduces an associative collection and returns the result. f should be + * a function that takes three arguments. + */ +cljs.core._kv_reduce = (function cljs$core$_kv_reduce(coll,f,init){ +if((!((coll == null))) && (!((coll.cljs$core$IKVReduce$_kv_reduce$arity$3 == null)))){ +return coll.cljs$core$IKVReduce$_kv_reduce$arity$3(coll,f,init); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._kv_reduce[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(coll,f,init) : m__8679__auto__.call(null,coll,f,init)); +} else { +var m__8679__auto____$1 = (cljs.core._kv_reduce["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(coll,f,init) : m__8679__auto____$1.call(null,coll,f,init)); +} else { +throw cljs.core.missing_protocol("IKVReduce.-kv-reduce",coll); +} +} +} +}); + + +/** + * Protocol for adding value comparison functionality to a type. + * @interface + */ +cljs.core.IEquiv = function(){}; + +/** + * Returns true if o and other are equal, false otherwise. + */ +cljs.core._equiv = (function cljs$core$_equiv(o,other){ +if((!((o == null))) && (!((o.cljs$core$IEquiv$_equiv$arity$2 == null)))){ +return o.cljs$core$IEquiv$_equiv$arity$2(o,other); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._equiv[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(o,other) : m__8679__auto__.call(null,o,other)); +} else { +var m__8679__auto____$1 = (cljs.core._equiv["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(o,other) : m__8679__auto____$1.call(null,o,other)); +} else { +throw cljs.core.missing_protocol("IEquiv.-equiv",o); +} +} +} +}); + + +/** + * Protocol for adding hashing functionality to a type. + * @interface + */ +cljs.core.IHash = function(){}; + +/** + * Returns the hash code of o. + */ +cljs.core._hash = (function cljs$core$_hash(o){ +if((!((o == null))) && (!((o.cljs$core$IHash$_hash$arity$1 == null)))){ +return o.cljs$core$IHash$_hash$arity$1(o); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._hash[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto__.call(null,o)); +} else { +var m__8679__auto____$1 = (cljs.core._hash["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto____$1.call(null,o)); +} else { +throw cljs.core.missing_protocol("IHash.-hash",o); +} +} +} +}); + + +/** + * Protocol for adding the ability to a type to be transformed into a sequence. + * @interface + */ +cljs.core.ISeqable = function(){}; + +/** + * Returns a seq of o, or nil if o is empty. + */ +cljs.core._seq = (function cljs$core$_seq(o){ +if((!((o == null))) && (!((o.cljs$core$ISeqable$_seq$arity$1 == null)))){ +return o.cljs$core$ISeqable$_seq$arity$1(o); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._seq[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto__.call(null,o)); +} else { +var m__8679__auto____$1 = (cljs.core._seq["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(o) : m__8679__auto____$1.call(null,o)); +} else { +throw cljs.core.missing_protocol("ISeqable.-seq",o); +} +} +} +}); + + +/** + * Marker interface indicating a persistent collection of sequential items + * @interface + */ +cljs.core.ISequential = function(){}; + + +/** + * Marker interface indicating a persistent list + * @interface + */ +cljs.core.IList = function(){}; + + +/** + * Marker interface indicating a record object + * @interface + */ +cljs.core.IRecord = function(){}; + + +/** + * Protocol for reversing a seq. + * @interface + */ +cljs.core.IReversible = function(){}; + +/** + * Returns a seq of the items in coll in reversed order. + */ +cljs.core._rseq = (function cljs$core$_rseq(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IReversible$_rseq$arity$1 == null)))){ +return coll.cljs$core$IReversible$_rseq$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._rseq[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._rseq["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IReversible.-rseq",coll); +} +} +} +}); + + +/** + * Protocol for a collection which can represent their items + * in a sorted manner. + * @interface + */ +cljs.core.ISorted = function(){}; + +/** + * Returns a sorted seq from coll in either ascending or descending order. + */ +cljs.core._sorted_seq = (function cljs$core$_sorted_seq(coll,ascending_QMARK_){ +if((!((coll == null))) && (!((coll.cljs$core$ISorted$_sorted_seq$arity$2 == null)))){ +return coll.cljs$core$ISorted$_sorted_seq$arity$2(coll,ascending_QMARK_); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._sorted_seq[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,ascending_QMARK_) : m__8679__auto__.call(null,coll,ascending_QMARK_)); +} else { +var m__8679__auto____$1 = (cljs.core._sorted_seq["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,ascending_QMARK_) : m__8679__auto____$1.call(null,coll,ascending_QMARK_)); +} else { +throw cljs.core.missing_protocol("ISorted.-sorted-seq",coll); +} +} +} +}); + +/** + * Returns a sorted seq from coll in either ascending or descending order. + * If ascending is true, the result should contain all items which are > or >= + * than k. If ascending is false, the result should contain all items which + * are < or <= than k, e.g. + * (-sorted-seq-from (sorted-set 1 2 3 4 5) 3 true) => (3 4 5) + * (-sorted-seq-from (sorted-set 1 2 3 4 5) 3 false) => (3 2 1) + */ +cljs.core._sorted_seq_from = (function cljs$core$_sorted_seq_from(coll,k,ascending_QMARK_){ +if((!((coll == null))) && (!((coll.cljs$core$ISorted$_sorted_seq_from$arity$3 == null)))){ +return coll.cljs$core$ISorted$_sorted_seq_from$arity$3(coll,k,ascending_QMARK_); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._sorted_seq_from[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(coll,k,ascending_QMARK_) : m__8679__auto__.call(null,coll,k,ascending_QMARK_)); +} else { +var m__8679__auto____$1 = (cljs.core._sorted_seq_from["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(coll,k,ascending_QMARK_) : m__8679__auto____$1.call(null,coll,k,ascending_QMARK_)); +} else { +throw cljs.core.missing_protocol("ISorted.-sorted-seq-from",coll); +} +} +} +}); + +/** + * Returns the key for entry. + */ +cljs.core._entry_key = (function cljs$core$_entry_key(coll,entry){ +if((!((coll == null))) && (!((coll.cljs$core$ISorted$_entry_key$arity$2 == null)))){ +return coll.cljs$core$ISorted$_entry_key$arity$2(coll,entry); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._entry_key[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(coll,entry) : m__8679__auto__.call(null,coll,entry)); +} else { +var m__8679__auto____$1 = (cljs.core._entry_key["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(coll,entry) : m__8679__auto____$1.call(null,coll,entry)); +} else { +throw cljs.core.missing_protocol("ISorted.-entry-key",coll); +} +} +} +}); + +/** + * Returns the comparator for coll. + */ +cljs.core._comparator = (function cljs$core$_comparator(coll){ +if((!((coll == null))) && (!((coll.cljs$core$ISorted$_comparator$arity$1 == null)))){ +return coll.cljs$core$ISorted$_comparator$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._comparator[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._comparator["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("ISorted.-comparator",coll); +} +} +} +}); + + +/** + * Protocol for writing. Currently only implemented by StringBufferWriter. + * @interface + */ +cljs.core.IWriter = function(){}; + +/** + * Writes s with writer and returns the result. + */ +cljs.core._write = (function cljs$core$_write(writer,s){ +if((!((writer == null))) && (!((writer.cljs$core$IWriter$_write$arity$2 == null)))){ +return writer.cljs$core$IWriter$_write$arity$2(writer,s); +} else { +var x__8678__auto__ = (((writer == null))?null:writer); +var m__8679__auto__ = (cljs.core._write[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(writer,s) : m__8679__auto__.call(null,writer,s)); +} else { +var m__8679__auto____$1 = (cljs.core._write["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(writer,s) : m__8679__auto____$1.call(null,writer,s)); +} else { +throw cljs.core.missing_protocol("IWriter.-write",writer); +} +} +} +}); + +/** + * Flush writer. + */ +cljs.core._flush = (function cljs$core$_flush(writer){ +if((!((writer == null))) && (!((writer.cljs$core$IWriter$_flush$arity$1 == null)))){ +return writer.cljs$core$IWriter$_flush$arity$1(writer); +} else { +var x__8678__auto__ = (((writer == null))?null:writer); +var m__8679__auto__ = (cljs.core._flush[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(writer) : m__8679__auto__.call(null,writer)); +} else { +var m__8679__auto____$1 = (cljs.core._flush["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(writer) : m__8679__auto____$1.call(null,writer)); +} else { +throw cljs.core.missing_protocol("IWriter.-flush",writer); +} +} +} +}); + + +/** + * The old IPrintable protocol's implementation consisted of building a giant + * list of strings to concatenate. This involved lots of concat calls, + * intermediate vectors, and lazy-seqs, and was very slow in some older JS + * engines. IPrintWithWriter implements printing via the IWriter protocol, so it + * be implemented efficiently in terms of e.g. a StringBuffer append. + * @interface + */ +cljs.core.IPrintWithWriter = function(){}; + +cljs.core._pr_writer = (function cljs$core$_pr_writer(o,writer,opts){ +if((!((o == null))) && (!((o.cljs$core$IPrintWithWriter$_pr_writer$arity$3 == null)))){ +return o.cljs$core$IPrintWithWriter$_pr_writer$arity$3(o,writer,opts); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._pr_writer[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(o,writer,opts) : m__8679__auto__.call(null,o,writer,opts)); +} else { +var m__8679__auto____$1 = (cljs.core._pr_writer["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(o,writer,opts) : m__8679__auto____$1.call(null,o,writer,opts)); +} else { +throw cljs.core.missing_protocol("IPrintWithWriter.-pr-writer",o); +} +} +} +}); + + +/** + * Protocol for types which can have a deferred realization. Currently only + * implemented by Delay and LazySeq. + * @interface + */ +cljs.core.IPending = function(){}; + +/** + * Returns true if a value for x has been produced, false otherwise. + */ +cljs.core._realized_QMARK_ = (function cljs$core$_realized_QMARK_(x){ +if((!((x == null))) && (!((x.cljs$core$IPending$_realized_QMARK_$arity$1 == null)))){ +return x.cljs$core$IPending$_realized_QMARK_$arity$1(x); +} else { +var x__8678__auto__ = (((x == null))?null:x); +var m__8679__auto__ = (cljs.core._realized_QMARK_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto__.call(null,x)); +} else { +var m__8679__auto____$1 = (cljs.core._realized_QMARK_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto____$1.call(null,x)); +} else { +throw cljs.core.missing_protocol("IPending.-realized?",x); +} +} +} +}); + + +/** + * Protocol for types that can be watched. Currently only implemented by Atom. + * @interface + */ +cljs.core.IWatchable = function(){}; + +/** + * Calls all watchers with this, oldval and newval. + */ +cljs.core._notify_watches = (function cljs$core$_notify_watches(this$,oldval,newval){ +if((!((this$ == null))) && (!((this$.cljs$core$IWatchable$_notify_watches$arity$3 == null)))){ +return this$.cljs$core$IWatchable$_notify_watches$arity$3(this$,oldval,newval); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._notify_watches[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(this$,oldval,newval) : m__8679__auto__.call(null,this$,oldval,newval)); +} else { +var m__8679__auto____$1 = (cljs.core._notify_watches["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(this$,oldval,newval) : m__8679__auto____$1.call(null,this$,oldval,newval)); +} else { +throw cljs.core.missing_protocol("IWatchable.-notify-watches",this$); +} +} +} +}); + +/** + * Adds a watcher function f to this. Keys must be unique per reference, + * and can be used to remove the watch with -remove-watch. + */ +cljs.core._add_watch = (function cljs$core$_add_watch(this$,key,f){ +if((!((this$ == null))) && (!((this$.cljs$core$IWatchable$_add_watch$arity$3 == null)))){ +return this$.cljs$core$IWatchable$_add_watch$arity$3(this$,key,f); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._add_watch[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(this$,key,f) : m__8679__auto__.call(null,this$,key,f)); +} else { +var m__8679__auto____$1 = (cljs.core._add_watch["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(this$,key,f) : m__8679__auto____$1.call(null,this$,key,f)); +} else { +throw cljs.core.missing_protocol("IWatchable.-add-watch",this$); +} +} +} +}); + +/** + * Removes watcher that corresponds to key from this. + */ +cljs.core._remove_watch = (function cljs$core$_remove_watch(this$,key){ +if((!((this$ == null))) && (!((this$.cljs$core$IWatchable$_remove_watch$arity$2 == null)))){ +return this$.cljs$core$IWatchable$_remove_watch$arity$2(this$,key); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core._remove_watch[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(this$,key) : m__8679__auto__.call(null,this$,key)); +} else { +var m__8679__auto____$1 = (cljs.core._remove_watch["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(this$,key) : m__8679__auto____$1.call(null,this$,key)); +} else { +throw cljs.core.missing_protocol("IWatchable.-remove-watch",this$); +} +} +} +}); + + +/** + * Protocol for collections which can transformed to transients. + * @interface + */ +cljs.core.IEditableCollection = function(){}; + +/** + * Returns a new, transient version of the collection, in constant time. + */ +cljs.core._as_transient = (function cljs$core$_as_transient(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IEditableCollection$_as_transient$arity$1 == null)))){ +return coll.cljs$core$IEditableCollection$_as_transient$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._as_transient[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._as_transient["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IEditableCollection.-as-transient",coll); +} +} +} +}); + + +/** + * Protocol for adding basic functionality to transient collections. + * @interface + */ +cljs.core.ITransientCollection = function(){}; + +/** + * Adds value val to tcoll and returns tcoll. + */ +cljs.core._conj_BANG_ = (function cljs$core$_conj_BANG_(tcoll,val){ +if((!((tcoll == null))) && (!((tcoll.cljs$core$ITransientCollection$_conj_BANG_$arity$2 == null)))){ +return tcoll.cljs$core$ITransientCollection$_conj_BANG_$arity$2(tcoll,val); +} else { +var x__8678__auto__ = (((tcoll == null))?null:tcoll); +var m__8679__auto__ = (cljs.core._conj_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(tcoll,val) : m__8679__auto__.call(null,tcoll,val)); +} else { +var m__8679__auto____$1 = (cljs.core._conj_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll,val) : m__8679__auto____$1.call(null,tcoll,val)); +} else { +throw cljs.core.missing_protocol("ITransientCollection.-conj!",tcoll); +} +} +} +}); + +/** + * Creates a persistent data structure from tcoll and returns it. + */ +cljs.core._persistent_BANG_ = (function cljs$core$_persistent_BANG_(tcoll){ +if((!((tcoll == null))) && (!((tcoll.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 == null)))){ +return tcoll.cljs$core$ITransientCollection$_persistent_BANG_$arity$1(tcoll); +} else { +var x__8678__auto__ = (((tcoll == null))?null:tcoll); +var m__8679__auto__ = (cljs.core._persistent_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(tcoll) : m__8679__auto__.call(null,tcoll)); +} else { +var m__8679__auto____$1 = (cljs.core._persistent_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(tcoll) : m__8679__auto____$1.call(null,tcoll)); +} else { +throw cljs.core.missing_protocol("ITransientCollection.-persistent!",tcoll); +} +} +} +}); + + +/** + * Protocol for adding associativity to transient collections. + * @interface + */ +cljs.core.ITransientAssociative = function(){}; + +/** + * Returns a new transient collection of tcoll with a mapping from key to + * val added to it. + */ +cljs.core._assoc_BANG_ = (function cljs$core$_assoc_BANG_(tcoll,key,val){ +if((!((tcoll == null))) && (!((tcoll.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 == null)))){ +return tcoll.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(tcoll,key,val); +} else { +var x__8678__auto__ = (((tcoll == null))?null:tcoll); +var m__8679__auto__ = (cljs.core._assoc_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(tcoll,key,val) : m__8679__auto__.call(null,tcoll,key,val)); +} else { +var m__8679__auto____$1 = (cljs.core._assoc_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(tcoll,key,val) : m__8679__auto____$1.call(null,tcoll,key,val)); +} else { +throw cljs.core.missing_protocol("ITransientAssociative.-assoc!",tcoll); +} +} +} +}); + + +/** + * Protocol for adding mapping functionality to transient collections. + * @interface + */ +cljs.core.ITransientMap = function(){}; + +/** + * Returns a new transient collection of tcoll without the mapping for key. + */ +cljs.core._dissoc_BANG_ = (function cljs$core$_dissoc_BANG_(tcoll,key){ +if((!((tcoll == null))) && (!((tcoll.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 == null)))){ +return tcoll.cljs$core$ITransientMap$_dissoc_BANG_$arity$2(tcoll,key); +} else { +var x__8678__auto__ = (((tcoll == null))?null:tcoll); +var m__8679__auto__ = (cljs.core._dissoc_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(tcoll,key) : m__8679__auto__.call(null,tcoll,key)); +} else { +var m__8679__auto____$1 = (cljs.core._dissoc_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll,key) : m__8679__auto____$1.call(null,tcoll,key)); +} else { +throw cljs.core.missing_protocol("ITransientMap.-dissoc!",tcoll); +} +} +} +}); + + +/** + * Protocol for adding vector functionality to transient collections. + * @interface + */ +cljs.core.ITransientVector = function(){}; + +/** + * Returns tcoll with value val added at position n. + */ +cljs.core._assoc_n_BANG_ = (function cljs$core$_assoc_n_BANG_(tcoll,n,val){ +if((!((tcoll == null))) && (!((tcoll.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 == null)))){ +return tcoll.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(tcoll,n,val); +} else { +var x__8678__auto__ = (((tcoll == null))?null:tcoll); +var m__8679__auto__ = (cljs.core._assoc_n_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(tcoll,n,val) : m__8679__auto__.call(null,tcoll,n,val)); +} else { +var m__8679__auto____$1 = (cljs.core._assoc_n_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(tcoll,n,val) : m__8679__auto____$1.call(null,tcoll,n,val)); +} else { +throw cljs.core.missing_protocol("ITransientVector.-assoc-n!",tcoll); +} +} +} +}); + +/** + * Returns tcoll with the last item removed from it. + */ +cljs.core._pop_BANG_ = (function cljs$core$_pop_BANG_(tcoll){ +if((!((tcoll == null))) && (!((tcoll.cljs$core$ITransientVector$_pop_BANG_$arity$1 == null)))){ +return tcoll.cljs$core$ITransientVector$_pop_BANG_$arity$1(tcoll); +} else { +var x__8678__auto__ = (((tcoll == null))?null:tcoll); +var m__8679__auto__ = (cljs.core._pop_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(tcoll) : m__8679__auto__.call(null,tcoll)); +} else { +var m__8679__auto____$1 = (cljs.core._pop_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(tcoll) : m__8679__auto____$1.call(null,tcoll)); +} else { +throw cljs.core.missing_protocol("ITransientVector.-pop!",tcoll); +} +} +} +}); + + +/** + * Protocol for adding set functionality to a transient collection. + * @interface + */ +cljs.core.ITransientSet = function(){}; + +/** + * Returns tcoll without v. + */ +cljs.core._disjoin_BANG_ = (function cljs$core$_disjoin_BANG_(tcoll,v){ +if((!((tcoll == null))) && (!((tcoll.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 == null)))){ +return tcoll.cljs$core$ITransientSet$_disjoin_BANG_$arity$2(tcoll,v); +} else { +var x__8678__auto__ = (((tcoll == null))?null:tcoll); +var m__8679__auto__ = (cljs.core._disjoin_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(tcoll,v) : m__8679__auto__.call(null,tcoll,v)); +} else { +var m__8679__auto____$1 = (cljs.core._disjoin_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(tcoll,v) : m__8679__auto____$1.call(null,tcoll,v)); +} else { +throw cljs.core.missing_protocol("ITransientSet.-disjoin!",tcoll); +} +} +} +}); + + +/** + * Protocol for values that can be compared. + * @interface + */ +cljs.core.IComparable = function(){}; + +/** + * Returns a negative number, zero, or a positive number when x is logically + * 'less than', 'equal to', or 'greater than' y. + */ +cljs.core._compare = (function cljs$core$_compare(x,y){ +if((!((x == null))) && (!((x.cljs$core$IComparable$_compare$arity$2 == null)))){ +return x.cljs$core$IComparable$_compare$arity$2(x,y); +} else { +var x__8678__auto__ = (((x == null))?null:x); +var m__8679__auto__ = (cljs.core._compare[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(x,y) : m__8679__auto__.call(null,x,y)); +} else { +var m__8679__auto____$1 = (cljs.core._compare["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(x,y) : m__8679__auto____$1.call(null,x,y)); +} else { +throw cljs.core.missing_protocol("IComparable.-compare",x); +} +} +} +}); + + +/** + * Protocol for accessing the items of a chunk. + * @interface + */ +cljs.core.IChunk = function(){}; + +/** + * Return a new chunk of coll with the first item removed. + */ +cljs.core._drop_first = (function cljs$core$_drop_first(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IChunk$_drop_first$arity$1 == null)))){ +return coll.cljs$core$IChunk$_drop_first$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._drop_first[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._drop_first["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IChunk.-drop-first",coll); +} +} +} +}); + + +/** + * Protocol for accessing a collection as sequential chunks. + * @interface + */ +cljs.core.IChunkedSeq = function(){}; + +/** + * Returns the first chunk in coll. + */ +cljs.core._chunked_first = (function cljs$core$_chunked_first(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IChunkedSeq$_chunked_first$arity$1 == null)))){ +return coll.cljs$core$IChunkedSeq$_chunked_first$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._chunked_first[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._chunked_first["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IChunkedSeq.-chunked-first",coll); +} +} +} +}); + +/** + * Return a new collection of coll with the first chunk removed. + */ +cljs.core._chunked_rest = (function cljs$core$_chunked_rest(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IChunkedSeq$_chunked_rest$arity$1 == null)))){ +return coll.cljs$core$IChunkedSeq$_chunked_rest$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._chunked_rest[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._chunked_rest["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IChunkedSeq.-chunked-rest",coll); +} +} +} +}); + + +/** + * Protocol for accessing the chunks of a collection. + * @interface + */ +cljs.core.IChunkedNext = function(){}; + +/** + * Returns a new collection of coll without the first chunk. + */ +cljs.core._chunked_next = (function cljs$core$_chunked_next(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IChunkedNext$_chunked_next$arity$1 == null)))){ +return coll.cljs$core$IChunkedNext$_chunked_next$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._chunked_next[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._chunked_next["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IChunkedNext.-chunked-next",coll); +} +} +} +}); + + +/** + * Protocol for adding a name. + * @interface + */ +cljs.core.INamed = function(){}; + +/** + * Returns the name String of x. + */ +cljs.core._name = (function cljs$core$_name(x){ +if((!((x == null))) && (!((x.cljs$core$INamed$_name$arity$1 == null)))){ +return x.cljs$core$INamed$_name$arity$1(x); +} else { +var x__8678__auto__ = (((x == null))?null:x); +var m__8679__auto__ = (cljs.core._name[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto__.call(null,x)); +} else { +var m__8679__auto____$1 = (cljs.core._name["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto____$1.call(null,x)); +} else { +throw cljs.core.missing_protocol("INamed.-name",x); +} +} +} +}); + +/** + * Returns the namespace String of x. + */ +cljs.core._namespace = (function cljs$core$_namespace(x){ +if((!((x == null))) && (!((x.cljs$core$INamed$_namespace$arity$1 == null)))){ +return x.cljs$core$INamed$_namespace$arity$1(x); +} else { +var x__8678__auto__ = (((x == null))?null:x); +var m__8679__auto__ = (cljs.core._namespace[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto__.call(null,x)); +} else { +var m__8679__auto____$1 = (cljs.core._namespace["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto____$1.call(null,x)); +} else { +throw cljs.core.missing_protocol("INamed.-namespace",x); +} +} +} +}); + + +/** + * Marker protocol indicating an atom. + * @interface + */ +cljs.core.IAtom = function(){}; + + +/** + * Protocol for adding resetting functionality. + * @interface + */ +cljs.core.IReset = function(){}; + +/** + * Sets the value of o to new-value. + */ +cljs.core._reset_BANG_ = (function cljs$core$_reset_BANG_(o,new_value){ +if((!((o == null))) && (!((o.cljs$core$IReset$_reset_BANG_$arity$2 == null)))){ +return o.cljs$core$IReset$_reset_BANG_$arity$2(o,new_value); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._reset_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(o,new_value) : m__8679__auto__.call(null,o,new_value)); +} else { +var m__8679__auto____$1 = (cljs.core._reset_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(o,new_value) : m__8679__auto____$1.call(null,o,new_value)); +} else { +throw cljs.core.missing_protocol("IReset.-reset!",o); +} +} +} +}); + + +/** + * Protocol for adding swapping functionality. + * @interface + */ +cljs.core.ISwap = function(){}; + +/** + * Swaps the value of o to be (apply f current-value-of-atom args). + */ +cljs.core._swap_BANG_ = (function cljs$core$_swap_BANG_(var_args){ +var args11108 = []; +var len__9181__auto___11111 = arguments.length; +var i__9182__auto___11112 = (0); +while(true){ +if((i__9182__auto___11112 < len__9181__auto___11111)){ +args11108.push((arguments[i__9182__auto___11112])); + +var G__11113 = (i__9182__auto___11112 + (1)); +i__9182__auto___11112 = G__11113; +continue; +} else { +} +break; +} + +var G__11110 = args11108.length; +switch (G__11110) { +case 2: +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11108.length)].join(''))); + +} +}); + +cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (o,f){ +if((!((o == null))) && (!((o.cljs$core$ISwap$_swap_BANG_$arity$2 == null)))){ +return o.cljs$core$ISwap$_swap_BANG_$arity$2(o,f); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._swap_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(o,f) : m__8679__auto__.call(null,o,f)); +} else { +var m__8679__auto____$1 = (cljs.core._swap_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(o,f) : m__8679__auto____$1.call(null,o,f)); +} else { +throw cljs.core.missing_protocol("ISwap.-swap!",o); +} +} +} +}); + +cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$3 = (function (o,f,a){ +if((!((o == null))) && (!((o.cljs$core$ISwap$_swap_BANG_$arity$3 == null)))){ +return o.cljs$core$ISwap$_swap_BANG_$arity$3(o,f,a); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._swap_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(o,f,a) : m__8679__auto__.call(null,o,f,a)); +} else { +var m__8679__auto____$1 = (cljs.core._swap_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(o,f,a) : m__8679__auto____$1.call(null,o,f,a)); +} else { +throw cljs.core.missing_protocol("ISwap.-swap!",o); +} +} +} +}); + +cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$4 = (function (o,f,a,b){ +if((!((o == null))) && (!((o.cljs$core$ISwap$_swap_BANG_$arity$4 == null)))){ +return o.cljs$core$ISwap$_swap_BANG_$arity$4(o,f,a,b); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._swap_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$4(o,f,a,b) : m__8679__auto__.call(null,o,f,a,b)); +} else { +var m__8679__auto____$1 = (cljs.core._swap_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$4(o,f,a,b) : m__8679__auto____$1.call(null,o,f,a,b)); +} else { +throw cljs.core.missing_protocol("ISwap.-swap!",o); +} +} +} +}); + +cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$5 = (function (o,f,a,b,xs){ +if((!((o == null))) && (!((o.cljs$core$ISwap$_swap_BANG_$arity$5 == null)))){ +return o.cljs$core$ISwap$_swap_BANG_$arity$5(o,f,a,b,xs); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._swap_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$5 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$5(o,f,a,b,xs) : m__8679__auto__.call(null,o,f,a,b,xs)); +} else { +var m__8679__auto____$1 = (cljs.core._swap_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$5 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$5(o,f,a,b,xs) : m__8679__auto____$1.call(null,o,f,a,b,xs)); +} else { +throw cljs.core.missing_protocol("ISwap.-swap!",o); +} +} +} +}); + +cljs.core._swap_BANG_.cljs$lang$maxFixedArity = 5; + + + +/** + * Protocol for adding volatile functionality. + * @interface + */ +cljs.core.IVolatile = function(){}; + +/** + * Sets the value of volatile o to new-value without regard for the + * current value. Returns new-value. + */ +cljs.core._vreset_BANG_ = (function cljs$core$_vreset_BANG_(o,new_value){ +if((!((o == null))) && (!((o.cljs$core$IVolatile$_vreset_BANG_$arity$2 == null)))){ +return o.cljs$core$IVolatile$_vreset_BANG_$arity$2(o,new_value); +} else { +var x__8678__auto__ = (((o == null))?null:o); +var m__8679__auto__ = (cljs.core._vreset_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(o,new_value) : m__8679__auto__.call(null,o,new_value)); +} else { +var m__8679__auto____$1 = (cljs.core._vreset_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(o,new_value) : m__8679__auto____$1.call(null,o,new_value)); +} else { +throw cljs.core.missing_protocol("IVolatile.-vreset!",o); +} +} +} +}); + + +/** + * Protocol for iterating over a collection. + * @interface + */ +cljs.core.IIterable = function(){}; + +/** + * Returns an iterator for coll. + */ +cljs.core._iterator = (function cljs$core$_iterator(coll){ +if((!((coll == null))) && (!((coll.cljs$core$IIterable$_iterator$arity$1 == null)))){ +return coll.cljs$core$IIterable$_iterator$arity$1(coll); +} else { +var x__8678__auto__ = (((coll == null))?null:coll); +var m__8679__auto__ = (cljs.core._iterator[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto__.call(null,coll)); +} else { +var m__8679__auto____$1 = (cljs.core._iterator["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(coll) : m__8679__auto____$1.call(null,coll)); +} else { +throw cljs.core.missing_protocol("IIterable.-iterator",coll); +} +} +} +}); + + +/** +* @constructor + * @implements {cljs.core.IWriter} +*/ +cljs.core.StringBufferWriter = (function (sb){ +this.sb = sb; +this.cljs$lang$protocol_mask$partition0$ = 1073741824; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_write$arity$2 = (function (_,s){ +var self__ = this; +var ___$1 = this; +return self__.sb.append(s); +}); + +cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_flush$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return null; +}); + +cljs.core.StringBufferWriter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$sb], null); +}); + +cljs.core.StringBufferWriter.cljs$lang$type = true; + +cljs.core.StringBufferWriter.cljs$lang$ctorStr = "cljs.core/StringBufferWriter"; + +cljs.core.StringBufferWriter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/StringBufferWriter"); +}); + +cljs.core.__GT_StringBufferWriter = (function cljs$core$__GT_StringBufferWriter(sb){ +return (new cljs.core.StringBufferWriter(sb)); +}); + +/** + * Support so that collections can implement toString without + * loading all the printing machinery. + */ +cljs.core.pr_str_STAR_ = (function cljs$core$pr_str_STAR_(obj){ +var sb = (new goog.string.StringBuffer()); +var writer = (new cljs.core.StringBufferWriter(sb)); +obj.cljs$core$IPrintWithWriter$_pr_writer$arity$3(null,writer,cljs.core.pr_opts()); + +writer.cljs$core$IWriter$_flush$arity$1(null); + +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb)].join(''); +}); +cljs.core.int_rotate_left = (function cljs$core$int_rotate_left(x,n){ +return ((x << n) | (x >>> (- n))); +}); +if((typeof Math.imul !== 'undefined') && (!((Math.imul((4294967295),(5)) === (0))))){ +cljs.core.imul = (function cljs$core$imul(a,b){ +return Math.imul(a,b); +}); +} else { +cljs.core.imul = (function cljs$core$imul(a,b){ +var ah = ((a >>> (16)) & (65535)); +var al = (a & (65535)); +var bh = ((b >>> (16)) & (65535)); +var bl = (b & (65535)); +return (((al * bl) + ((((ah * bl) + (al * bh)) << (16)) >>> (0))) | (0)); +}); +} +cljs.core.m3_seed = (0); +cljs.core.m3_C1 = ((3432918353) | (0)); +cljs.core.m3_C2 = ((461845907) | (0)); +cljs.core.m3_mix_K1 = (function cljs$core$m3_mix_K1(k1){ +return cljs.core.imul(cljs.core.int_rotate_left(cljs.core.imul((k1 | (0)),cljs.core.m3_C1),(15)),cljs.core.m3_C2); +}); +cljs.core.m3_mix_H1 = (function cljs$core$m3_mix_H1(h1,k1){ +return ((cljs.core.imul(cljs.core.int_rotate_left(((h1 | (0)) ^ (k1 | (0))),(13)),(5)) + ((3864292196) | (0))) | (0)); +}); +cljs.core.m3_fmix = (function cljs$core$m3_fmix(h1,len){ +var h1__$1 = (h1 | (0)); +var h1__$2 = (h1__$1 ^ len); +var h1__$3 = (h1__$2 ^ (h1__$2 >>> (16))); +var h1__$4 = cljs.core.imul(h1__$3,((2246822507) | (0))); +var h1__$5 = (h1__$4 ^ (h1__$4 >>> (13))); +var h1__$6 = cljs.core.imul(h1__$5,((3266489909) | (0))); +return (h1__$6 ^ (h1__$6 >>> (16))); +}); +cljs.core.m3_hash_int = (function cljs$core$m3_hash_int(in$){ +if((in$ === (0))){ +return in$; +} else { +var k1 = cljs.core.m3_mix_K1(in$); +var h1 = cljs.core.m3_mix_H1(cljs.core.m3_seed,k1); +return cljs.core.m3_fmix(h1,(4)); +} +}); +cljs.core.m3_hash_unencoded_chars = (function cljs$core$m3_hash_unencoded_chars(in$){ +var h1 = (function (){var i = (1); +var h1 = cljs.core.m3_seed; +while(true){ +if((i < in$.length)){ +var G__11115 = (i + (2)); +var G__11116 = cljs.core.m3_mix_H1(h1,cljs.core.m3_mix_K1((in$.charCodeAt((i - (1))) | (in$.charCodeAt(i) << (16))))); +i = G__11115; +h1 = G__11116; +continue; +} else { +return h1; +} +break; +} +})(); +var h1__$1 = ((((in$.length & (1)) === (1)))?(h1 ^ cljs.core.m3_mix_K1(in$.charCodeAt((in$.length - (1))))):h1); +return cljs.core.m3_fmix(h1__$1,cljs.core.imul((2),in$.length)); +}); + + + +cljs.core.string_hash_cache = {}; +cljs.core.string_hash_cache_count = (0); +cljs.core.hash_string_STAR_ = (function cljs$core$hash_string_STAR_(s){ +if(!((s == null))){ +var len = s.length; +if((len > (0))){ +var i = (0); +var hash = (0); +while(true){ +if((i < len)){ +var G__11119 = (i + (1)); +var G__11120 = (cljs.core.imul((31),hash) + s.charCodeAt(i)); +i = G__11119; +hash = G__11120; +continue; +} else { +return hash; +} +break; +} +} else { +return (0); +} +} else { +return (0); +} +}); +cljs.core.add_to_string_hash_cache = (function cljs$core$add_to_string_hash_cache(k){ +var h = cljs.core.hash_string_STAR_(k); +(cljs.core.string_hash_cache[k] = h); + +cljs.core.string_hash_cache_count = (cljs.core.string_hash_cache_count + (1)); + +return h; +}); +cljs.core.hash_string = (function cljs$core$hash_string(k){ +if((cljs.core.string_hash_cache_count > (255))){ +cljs.core.string_hash_cache = {}; + +cljs.core.string_hash_cache_count = (0); +} else { +} + +if((k == null)){ +return (0); +} else { +var h = (cljs.core.string_hash_cache[k]); +if(typeof h === 'number'){ +return h; +} else { +return cljs.core.add_to_string_hash_cache(k); +} +} +}); +/** + * Returns the hash code of its argument. Note this is the hash code + * consistent with =. + */ +cljs.core.hash = (function cljs$core$hash(o){ +if(((!((o == null)))?((((o.cljs$lang$protocol_mask$partition0$ & (4194304))) || ((cljs.core.PROTOCOL_SENTINEL === o.cljs$core$IHash$)))?true:false):false)){ +return (o.cljs$core$IHash$_hash$arity$1(null) ^ (0)); +} else { +if(typeof o === 'number'){ +if(cljs.core.truth_(isFinite(o))){ +return (Math.floor(o) % (2147483647)); +} else { +var G__11128 = o; +switch (G__11128) { +case Infinity: +return (2146435072); + +break; +case -Infinity: +return (-1048576); + +break; +default: +return (2146959360); + +} +} +} else { +if(o === true){ +return (1231); +} else { +if(o === false){ +return (1237); +} else { +if(typeof o === 'string'){ +return cljs.core.m3_hash_int(cljs.core.hash_string(o)); +} else { +if((o instanceof Date)){ +return (o.valueOf() ^ (0)); +} else { +if((o == null)){ +return (0); +} else { +return (cljs.core._hash(o) ^ (0)); + +} +} +} +} +} +} +} +}); +cljs.core.hash_combine = (function cljs$core$hash_combine(seed,hash){ +return (seed ^ (((hash + (2654435769)) + (seed << (6))) + (seed >> (2)))); +}); +/** + * Evaluates x and tests if it is an instance of the type + * c. Returns true or false + */ +cljs.core.instance_QMARK_ = (function cljs$core$instance_QMARK_(c,x){ +return (x instanceof c); +}); +/** + * Return true if x is a Symbol + */ +cljs.core.symbol_QMARK_ = (function cljs$core$symbol_QMARK_(x){ +return (x instanceof cljs.core.Symbol); +}); +cljs.core.hash_symbol = (function cljs$core$hash_symbol(sym){ +return cljs.core.hash_combine(cljs.core.m3_hash_unencoded_chars(sym.name),cljs.core.hash_string(sym.ns)); +}); +cljs.core.compare_symbols = (function cljs$core$compare_symbols(a,b){ +if((a.str === b.str)){ +return (0); +} else { +if(cljs.core.truth_((function (){var and__7948__auto__ = cljs.core.not(a.ns); +if(and__7948__auto__){ +return b.ns; +} else { +return and__7948__auto__; +} +})())){ +return (-1); +} else { +if(cljs.core.truth_(a.ns)){ +if(cljs.core.not(b.ns)){ +return (1); +} else { +var nsc = (function (){var G__11136 = a.ns; +var G__11137 = b.ns; +return goog.array.defaultCompare(G__11136,G__11137); +})(); +if(((0) === nsc)){ +var G__11138 = a.name; +var G__11139 = b.name; +return goog.array.defaultCompare(G__11138,G__11139); +} else { +return nsc; +} +} +} else { +var G__11140 = a.name; +var G__11141 = b.name; +return goog.array.defaultCompare(G__11140,G__11141); + +} +} +} +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.INamed} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IPrintWithWriter} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.Symbol = (function (ns,name,str,_hash,_meta){ +this.ns = ns; +this.name = name; +this.str = str; +this._hash = _hash; +this._meta = _meta; +this.cljs$lang$protocol_mask$partition0$ = 2154168321; +this.cljs$lang$protocol_mask$partition1$ = 4096; +}) +cljs.core.Symbol.prototype.toString = (function (){ +var self__ = this; +var _ = this; +return self__.str; +}); + +cljs.core.Symbol.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.Symbol.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +if((other instanceof cljs.core.Symbol)){ +return (self__.str === other.str); +} else { +return false; +} +}); + +cljs.core.Symbol.prototype.call = (function() { +var G__11143 = null; +var G__11143__2 = (function (self__,coll){ +var self__ = this; +var self____$1 = this; +var sym = self____$1; +return (cljs.core.get.cljs$core$IFn$_invoke$arity$2 ? cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll,sym) : cljs.core.get.call(null,coll,sym)); +}); +var G__11143__3 = (function (self__,coll,not_found){ +var self__ = this; +var self____$1 = this; +var sym = self____$1; +return (cljs.core.get.cljs$core$IFn$_invoke$arity$3 ? cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll,sym,not_found) : cljs.core.get.call(null,coll,sym,not_found)); +}); +G__11143 = function(self__,coll,not_found){ +switch(arguments.length){ +case 2: +return G__11143__2.call(this,self__,coll); +case 3: +return G__11143__3.call(this,self__,coll,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11143.cljs$core$IFn$_invoke$arity$2 = G__11143__2; +G__11143.cljs$core$IFn$_invoke$arity$3 = G__11143__3; +return G__11143; +})() +; + +cljs.core.Symbol.prototype.apply = (function (self__,args11142){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args11142))); +}); + +cljs.core.Symbol.prototype.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +var self__ = this; +var sym = this; +return (cljs.core.get.cljs$core$IFn$_invoke$arity$2 ? cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll,sym) : cljs.core.get.call(null,coll,sym)); +}); + +cljs.core.Symbol.prototype.cljs$core$IFn$_invoke$arity$2 = (function (coll,not_found){ +var self__ = this; +var sym = this; +return (cljs.core.get.cljs$core$IFn$_invoke$arity$3 ? cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll,sym,not_found) : cljs.core.get.call(null,coll,sym,not_found)); +}); + +cljs.core.Symbol.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__._meta; +}); + +cljs.core.Symbol.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_,new_meta){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.Symbol(self__.ns,self__.name,self__.str,self__._hash,new_meta)); +}); + +cljs.core.Symbol.prototype.cljs$core$IHash$_hash$arity$1 = (function (sym){ +var self__ = this; +var sym__$1 = this; +var h__8402__auto__ = self__._hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_symbol(sym__$1); +self__._hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.Symbol.prototype.cljs$core$INamed$_name$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.name; +}); + +cljs.core.Symbol.prototype.cljs$core$INamed$_namespace$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.ns; +}); + +cljs.core.Symbol.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (o,writer,_){ +var self__ = this; +var o__$1 = this; +return cljs.core._write(writer,self__.str); +}); + +cljs.core.Symbol.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$ns,cljs.core.cst$sym$name,cljs.core.cst$sym$str,cljs.core.with_meta(cljs.core.cst$sym$_hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$_meta], null); +}); + +cljs.core.Symbol.cljs$lang$type = true; + +cljs.core.Symbol.cljs$lang$ctorStr = "cljs.core/Symbol"; + +cljs.core.Symbol.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Symbol"); +}); + +cljs.core.__GT_Symbol = (function cljs$core$__GT_Symbol(ns,name,str,_hash,_meta){ +return (new cljs.core.Symbol(ns,name,str,_hash,_meta)); +}); + +/** + * Returns a Symbol with the given namespace and name. + */ +cljs.core.symbol = (function cljs$core$symbol(var_args){ +var args11144 = []; +var len__9181__auto___11147 = arguments.length; +var i__9182__auto___11148 = (0); +while(true){ +if((i__9182__auto___11148 < len__9181__auto___11147)){ +args11144.push((arguments[i__9182__auto___11148])); + +var G__11149 = (i__9182__auto___11148 + (1)); +i__9182__auto___11148 = G__11149; +continue; +} else { +} +break; +} + +var G__11146 = args11144.length; +switch (G__11146) { +case 1: +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11144.length)].join(''))); + +} +}); + +cljs.core.symbol.cljs$core$IFn$_invoke$arity$1 = (function (name){ +if((name instanceof cljs.core.Symbol)){ +return name; +} else { +var idx = name.indexOf("/"); +if((idx < (1))){ +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$2(null,name); +} else { +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$2(name.substring((0),idx),name.substring((idx + (1)),name.length)); +} +} +}); + +cljs.core.symbol.cljs$core$IFn$_invoke$arity$2 = (function (ns,name){ +var sym_str = ((!((ns == null)))?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns),cljs.core.str.cljs$core$IFn$_invoke$arity$1("/"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(name)].join(''):name); +return (new cljs.core.Symbol(ns,name,sym_str,null,null)); +}); + +cljs.core.symbol.cljs$lang$maxFixedArity = 2; + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.Fn} + * @implements {cljs.core.IDeref} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.Var = (function (val,sym,_meta){ +this.val = val; +this.sym = sym; +this._meta = _meta; +this.cljs$lang$protocol_mask$partition0$ = 6717441; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.Var.prototype.isMacro = (function (){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).cljs$lang$macro; +}); + +cljs.core.Var.prototype.toString = (function (){ +var self__ = this; +var _ = this; +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("#'"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.sym)].join(''); +}); + +cljs.core.Var.prototype.cljs$core$IDeref$_deref$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)); +}); + +cljs.core.Var.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__._meta; +}); + +cljs.core.Var.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_,new_meta){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.Var(self__.val,self__.sym,new_meta)); +}); + +cljs.core.Var.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this$,other){ +var self__ = this; +var this$__$1 = this; +if((other instanceof cljs.core.Var)){ +var G__11152 = this$__$1.sym; +var G__11153 = other.sym; +return (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2 ? cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(G__11152,G__11153) : cljs.core._EQ_.call(null,G__11152,G__11153)); +} else { +return false; +} +}); + +cljs.core.Var.prototype.cljs$core$IHash$_hash$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.hash_symbol(self__.sym); +}); + +cljs.core.Var.prototype.cljs$core$Fn$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Var.prototype.call = (function() { +var G__11198 = null; +var G__11198__1 = (function (self__){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null); +}); +var G__11198__2 = (function (self__,a){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a); +}); +var G__11198__3 = (function (self__,a,b){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b); +}); +var G__11198__4 = (function (self__,a,b,c){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c); +}); +var G__11198__5 = (function (self__,a,b,c,d){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d); +}); +var G__11198__6 = (function (self__,a,b,c,d,e){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e); +}); +var G__11198__7 = (function (self__,a,b,c,d,e,f){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f); +}); +var G__11198__8 = (function (self__,a,b,c,d,e,f,g){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g); +}); +var G__11198__9 = (function (self__,a,b,c,d,e,f,g,h){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h); +}); +var G__11198__10 = (function (self__,a,b,c,d,e,f,g,h,i){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i); +}); +var G__11198__11 = (function (self__,a,b,c,d,e,f,g,h,i,j){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j); +}); +var G__11198__12 = (function (self__,a,b,c,d,e,f,g,h,i,j,k){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k); +}); +var G__11198__13 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l); +}); +var G__11198__14 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m); +}); +var G__11198__15 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n); +}); +var G__11198__16 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o); +}); +var G__11198__17 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); +}); +var G__11198__18 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q); +}); +var G__11198__19 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r); +}); +var G__11198__20 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s); +}); +var G__11198__21 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t); +}); +var G__11198__22 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +var G__11154 = (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)); +var G__11155 = a; +var G__11156 = b; +var G__11157 = c; +var G__11158 = d; +var G__11159 = e; +var G__11160 = f; +var G__11161 = g; +var G__11162 = h; +var G__11163 = i; +var G__11164 = j; +var G__11165 = k; +var G__11166 = l; +var G__11167 = m; +var G__11168 = n; +var G__11169 = o; +var G__11170 = p; +var G__11171 = q; +var G__11172 = r; +var G__11173 = s; +var G__11174 = t; +var G__11175 = rest; +return (cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(G__11154,G__11155,G__11156,G__11157,G__11158,G__11159,G__11160,G__11161,G__11162,G__11163,G__11164,G__11165,G__11166,G__11167,G__11168,G__11169,G__11170,G__11171,G__11172,G__11173,G__11174,G__11175) : cljs.core.apply.call(null,G__11154,G__11155,G__11156,G__11157,G__11158,G__11159,G__11160,G__11161,G__11162,G__11163,G__11164,G__11165,G__11166,G__11167,G__11168,G__11169,G__11170,G__11171,G__11172,G__11173,G__11174,G__11175)); +}); +G__11198 = function(self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +switch(arguments.length){ +case 1: +return G__11198__1.call(this,self__); +case 2: +return G__11198__2.call(this,self__,a); +case 3: +return G__11198__3.call(this,self__,a,b); +case 4: +return G__11198__4.call(this,self__,a,b,c); +case 5: +return G__11198__5.call(this,self__,a,b,c,d); +case 6: +return G__11198__6.call(this,self__,a,b,c,d,e); +case 7: +return G__11198__7.call(this,self__,a,b,c,d,e,f); +case 8: +return G__11198__8.call(this,self__,a,b,c,d,e,f,g); +case 9: +return G__11198__9.call(this,self__,a,b,c,d,e,f,g,h); +case 10: +return G__11198__10.call(this,self__,a,b,c,d,e,f,g,h,i); +case 11: +return G__11198__11.call(this,self__,a,b,c,d,e,f,g,h,i,j); +case 12: +return G__11198__12.call(this,self__,a,b,c,d,e,f,g,h,i,j,k); +case 13: +return G__11198__13.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l); +case 14: +return G__11198__14.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m); +case 15: +return G__11198__15.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n); +case 16: +return G__11198__16.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o); +case 17: +return G__11198__17.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); +case 18: +return G__11198__18.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q); +case 19: +return G__11198__19.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r); +case 20: +return G__11198__20.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s); +case 21: +return G__11198__21.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t); +case 22: +return G__11198__22.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11198.cljs$core$IFn$_invoke$arity$1 = G__11198__1; +G__11198.cljs$core$IFn$_invoke$arity$2 = G__11198__2; +G__11198.cljs$core$IFn$_invoke$arity$3 = G__11198__3; +G__11198.cljs$core$IFn$_invoke$arity$4 = G__11198__4; +G__11198.cljs$core$IFn$_invoke$arity$5 = G__11198__5; +G__11198.cljs$core$IFn$_invoke$arity$6 = G__11198__6; +G__11198.cljs$core$IFn$_invoke$arity$7 = G__11198__7; +G__11198.cljs$core$IFn$_invoke$arity$8 = G__11198__8; +G__11198.cljs$core$IFn$_invoke$arity$9 = G__11198__9; +G__11198.cljs$core$IFn$_invoke$arity$10 = G__11198__10; +G__11198.cljs$core$IFn$_invoke$arity$11 = G__11198__11; +G__11198.cljs$core$IFn$_invoke$arity$12 = G__11198__12; +G__11198.cljs$core$IFn$_invoke$arity$13 = G__11198__13; +G__11198.cljs$core$IFn$_invoke$arity$14 = G__11198__14; +G__11198.cljs$core$IFn$_invoke$arity$15 = G__11198__15; +G__11198.cljs$core$IFn$_invoke$arity$16 = G__11198__16; +G__11198.cljs$core$IFn$_invoke$arity$17 = G__11198__17; +G__11198.cljs$core$IFn$_invoke$arity$18 = G__11198__18; +G__11198.cljs$core$IFn$_invoke$arity$19 = G__11198__19; +G__11198.cljs$core$IFn$_invoke$arity$20 = G__11198__20; +G__11198.cljs$core$IFn$_invoke$arity$21 = G__11198__21; +G__11198.cljs$core$IFn$_invoke$arity$22 = G__11198__22; +return G__11198; +})() +; + +cljs.core.Var.prototype.apply = (function (self__,args11151){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args11151))); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$0 = (function (){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$1 = (function (a){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$2 = (function (a,b){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$3 = (function (a,b,c){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$4 = (function (a,b,c,d){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$5 = (function (a,b,c,d,e){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$6 = (function (a,b,c,d,e,f){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$7 = (function (a,b,c,d,e,f,g){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$8 = (function (a,b,c,d,e,f,g,h){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$9 = (function (a,b,c,d,e,f,g,h,i){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$10 = (function (a,b,c,d,e,f,g,h,i,j){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$11 = (function (a,b,c,d,e,f,g,h,i,j,k){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$12 = (function (a,b,c,d,e,f,g,h,i,j,k,l){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$13 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$14 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$15 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$16 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$17 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$18 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$19 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$20 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){ +var self__ = this; +var _ = this; +return (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)).call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t); +}); + +cljs.core.Var.prototype.cljs$core$IFn$_invoke$arity$21 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +var self__ = this; +var _ = this; +var G__11176 = (self__.val.cljs$core$IFn$_invoke$arity$0 ? self__.val.cljs$core$IFn$_invoke$arity$0() : self__.val.call(null)); +var G__11177 = a; +var G__11178 = b; +var G__11179 = c; +var G__11180 = d; +var G__11181 = e; +var G__11182 = f; +var G__11183 = g; +var G__11184 = h; +var G__11185 = i; +var G__11186 = j; +var G__11187 = k; +var G__11188 = l; +var G__11189 = m; +var G__11190 = n; +var G__11191 = o; +var G__11192 = p; +var G__11193 = q; +var G__11194 = r; +var G__11195 = s; +var G__11196 = t; +var G__11197 = rest; +return (cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(G__11176,G__11177,G__11178,G__11179,G__11180,G__11181,G__11182,G__11183,G__11184,G__11185,G__11186,G__11187,G__11188,G__11189,G__11190,G__11191,G__11192,G__11193,G__11194,G__11195,G__11196,G__11197) : cljs.core.apply.call(null,G__11176,G__11177,G__11178,G__11179,G__11180,G__11181,G__11182,G__11183,G__11184,G__11185,G__11186,G__11187,G__11188,G__11189,G__11190,G__11191,G__11192,G__11193,G__11194,G__11195,G__11196,G__11197)); +}); + +cljs.core.Var.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$val,cljs.core.cst$sym$sym,cljs.core.cst$sym$_meta], null); +}); + +cljs.core.Var.cljs$lang$type = true; + +cljs.core.Var.cljs$lang$ctorStr = "cljs.core/Var"; + +cljs.core.Var.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Var"); +}); + +cljs.core.__GT_Var = (function cljs$core$__GT_Var(val,sym,_meta){ +return (new cljs.core.Var(val,sym,_meta)); +}); + +/** + * Returns true if v is of type cljs.core.Var + */ +cljs.core.var_QMARK_ = (function cljs$core$var_QMARK_(v){ +return (v instanceof cljs.core.Var); +}); + + +/** + * Return true if x implements IIterable protocol. + */ +cljs.core.iterable_QMARK_ = (function cljs$core$iterable_QMARK_(x){ +if(!((x == null))){ +if((false) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IIterable$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IIterable,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IIterable,x); +} +}); +/** + * Clone the supplied value which must implement ICloneable. + */ +cljs.core.clone = (function cljs$core$clone(value){ +return cljs.core._clone(value); +}); +/** + * Return true if x implements ICloneable protocol. + */ +cljs.core.cloneable_QMARK_ = (function cljs$core$cloneable_QMARK_(value){ +if(!((value == null))){ +if(((value.cljs$lang$protocol_mask$partition1$ & (8192))) || ((cljs.core.PROTOCOL_SENTINEL === value.cljs$core$ICloneable$))){ +return true; +} else { +if((!value.cljs$lang$protocol_mask$partition1$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.ICloneable,value); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.ICloneable,value); +} +}); +/** + * Returns a seq on the collection. If the collection is + * empty, returns nil. (seq nil) returns nil. seq also works on + * Strings. + */ +cljs.core.seq = (function cljs$core$seq(coll){ +if((coll == null)){ +return null; +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (8388608))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ISeqable$)))?true:false):false)){ +return coll.cljs$core$ISeqable$_seq$arity$1(null); +} else { +if(cljs.core.array_QMARK_(coll)){ +if((coll.length === (0))){ +return null; +} else { +return (new cljs.core.IndexedSeq(coll,(0),null)); +} +} else { +if(typeof coll === 'string'){ +if((coll.length === (0))){ +return null; +} else { +return (new cljs.core.IndexedSeq(coll,(0),null)); +} +} else { +if(cljs.core.native_satisfies_QMARK_(cljs.core.ISeqable,coll)){ +return cljs.core._seq(coll); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1(coll),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" is not ISeqable")].join(''))); + +} +} +} +} +} +}); +/** + * Returns the first item in the collection. Calls seq on its + * argument. If coll is nil, returns nil. + */ +cljs.core.first = (function cljs$core$first(coll){ +if((coll == null)){ +return null; +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ISeq$)))?true:false):false)){ +return coll.cljs$core$ISeq$_first$arity$1(null); +} else { +var s = cljs.core.seq(coll); +if((s == null)){ +return null; +} else { +return cljs.core._first(s); +} +} +} +}); +/** + * Returns a possibly empty seq of the items after the first. Calls seq on its + * argument. + */ +cljs.core.rest = (function cljs$core$rest(coll){ +if(!((coll == null))){ +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ISeq$)))?true:false):false)){ +return coll.cljs$core$ISeq$_rest$arity$1(null); +} else { +var s = cljs.core.seq(coll); +if(s){ +return cljs.core._rest(s); +} else { +return cljs.core.List.EMPTY; +} +} +} else { +return cljs.core.List.EMPTY; +} +}); +/** + * Returns a seq of the items after the first. Calls seq on its + * argument. If there are no more items, returns nil + */ +cljs.core.next = (function cljs$core$next(coll){ +if((coll == null)){ +return null; +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (128))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$INext$)))?true:false):false)){ +return coll.cljs$core$INext$_next$arity$1(null); +} else { +return cljs.core.seq(cljs.core.rest(coll)); +} +} +}); +/** + * Equality. Returns true if x equals y, false if not. Compares + * numbers and collections in a type-independent manner. Clojure's immutable data + * structures define -equiv (and thus =) as a value, not an identity, + * comparison. + */ +cljs.core._EQ_ = (function cljs$core$_EQ_(var_args){ +var args11211 = []; +var len__9181__auto___11217 = arguments.length; +var i__9182__auto___11218 = (0); +while(true){ +if((i__9182__auto___11218 < len__9181__auto___11217)){ +args11211.push((arguments[i__9182__auto___11218])); + +var G__11219 = (i__9182__auto___11218 + (1)); +i__9182__auto___11218 = G__11219; +continue; +} else { +} +break; +} + +var G__11216 = args11211.length; +switch (G__11216) { +case 1: +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11211.slice((2)),(0),null)); +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._EQ_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return true; +}); + +cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +if((x == null)){ +return (y == null); +} else { +return ((x === y)) || (cljs.core._equiv(x,y)); +} +}); + +cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +while(true){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x,y)){ +if(cljs.core.next(more)){ +var G__11221 = y; +var G__11222 = cljs.core.first(more); +var G__11223 = cljs.core.next(more); +x = G__11221; +y = G__11222; +more = G__11223; +continue; +} else { +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(y,cljs.core.first(more)); +} +} else { +return false; +} +break; +} +}); + +cljs.core._EQ_.cljs$lang$applyTo = (function (seq11212){ +var G__11213 = cljs.core.first(seq11212); +var seq11212__$1 = cljs.core.next(seq11212); +var G__11214 = cljs.core.first(seq11212__$1); +var seq11212__$2 = cljs.core.next(seq11212__$1); +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$variadic(G__11213,G__11214,seq11212__$2); +}); + +cljs.core._EQ_.cljs$lang$maxFixedArity = (2); + + +/** +* @constructor +*/ +cljs.core.ES6Iterator = (function (s){ +this.s = s; +}) +cljs.core.ES6Iterator.prototype.next = (function (){ +var self__ = this; +var _ = this; +if(!((self__.s == null))){ +var x = cljs.core.first(self__.s); +self__.s = cljs.core.next(self__.s); + +return ({"value": x, "done": false}); +} else { +return ({"value": null, "done": true}); +} +}); + +cljs.core.ES6Iterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$s,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ES6Iterator.cljs$lang$type = true; + +cljs.core.ES6Iterator.cljs$lang$ctorStr = "cljs.core/ES6Iterator"; + +cljs.core.ES6Iterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ES6Iterator"); +}); + +cljs.core.__GT_ES6Iterator = (function cljs$core$__GT_ES6Iterator(s){ +return (new cljs.core.ES6Iterator(s)); +}); + +/** + * EXPERIMENTAL: Return a ES2015 compatible iterator for coll. + */ +cljs.core.es6_iterator = (function cljs$core$es6_iterator(coll){ +return (new cljs.core.ES6Iterator(cljs.core.seq(coll))); +}); + +/** +* @constructor + * @implements {cljs.core.ISeq} + * @implements {cljs.core.ISeqable} +*/ +cljs.core.ES6IteratorSeq = (function (value,iter,_rest){ +this.value = value; +this.iter = iter; +this._rest = _rest; +this.cljs$lang$protocol_mask$partition0$ = 8388672; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.ES6IteratorSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return this$__$1; +}); + +cljs.core.ES6IteratorSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.value; +}); + +cljs.core.ES6IteratorSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +if((self__._rest == null)){ +self__._rest = (cljs.core.es6_iterator_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.es6_iterator_seq.cljs$core$IFn$_invoke$arity$1(self__.iter) : cljs.core.es6_iterator_seq.call(null,self__.iter)); +} else { +} + +return self__._rest; +}); + +cljs.core.ES6IteratorSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$value,cljs.core.cst$sym$iter,cljs.core.with_meta(cljs.core.cst$sym$_rest,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ES6IteratorSeq.cljs$lang$type = true; + +cljs.core.ES6IteratorSeq.cljs$lang$ctorStr = "cljs.core/ES6IteratorSeq"; + +cljs.core.ES6IteratorSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ES6IteratorSeq"); +}); + +cljs.core.__GT_ES6IteratorSeq = (function cljs$core$__GT_ES6IteratorSeq(value,iter,_rest){ +return (new cljs.core.ES6IteratorSeq(value,iter,_rest)); +}); + +/** + * EXPERIMENTAL: Given an ES2015 compatible iterator return a seq. + */ +cljs.core.es6_iterator_seq = (function cljs$core$es6_iterator_seq(iter){ +var v = iter.next(); +if(cljs.core.truth_(v.done)){ +return cljs.core.List.EMPTY; +} else { +return (new cljs.core.ES6IteratorSeq(v.value,iter,null)); +} +}); +/** + * Mix final collection hash for ordered or unordered collections. + * hash-basis is the combined collection hash, count is the number + * of elements included in the basis. Note this is the hash code + * consistent with =, different from .hashCode. + * See http://clojure.org/data_structures#hash for full algorithms. + */ +cljs.core.mix_collection_hash = (function cljs$core$mix_collection_hash(hash_basis,count){ +var h1 = cljs.core.m3_seed; +var k1 = cljs.core.m3_mix_K1(hash_basis); +var h1__$1 = cljs.core.m3_mix_H1(h1,k1); +return cljs.core.m3_fmix(h1__$1,count); +}); +/** + * Returns the hash code, consistent with =, for an external ordered + * collection implementing Iterable. + * See http://clojure.org/data_structures#hash for full algorithms. + */ +cljs.core.hash_ordered_coll = (function cljs$core$hash_ordered_coll(coll){ +var n = (0); +var hash_code = (1); +var coll__$1 = cljs.core.seq(coll); +while(true){ +if(!((coll__$1 == null))){ +var G__11224 = (n + (1)); +var G__11225 = ((cljs.core.imul((31),hash_code) + cljs.core.hash(cljs.core.first(coll__$1))) | (0)); +var G__11226 = cljs.core.next(coll__$1); +n = G__11224; +hash_code = G__11225; +coll__$1 = G__11226; +continue; +} else { +return cljs.core.mix_collection_hash(hash_code,n); +} +break; +} +}); +cljs.core.empty_ordered_hash = cljs.core.mix_collection_hash((1),(0)); +/** + * Returns the hash code, consistent with =, for an external unordered + * collection implementing Iterable. For maps, the iterator should + * return map entries whose hash is computed as + * (hash-ordered-coll [k v]). + * See http://clojure.org/data_structures#hash for full algorithms. + */ +cljs.core.hash_unordered_coll = (function cljs$core$hash_unordered_coll(coll){ +var n = (0); +var hash_code = (0); +var coll__$1 = cljs.core.seq(coll); +while(true){ +if(!((coll__$1 == null))){ +var G__11227 = (n + (1)); +var G__11228 = ((hash_code + cljs.core.hash(cljs.core.first(coll__$1))) | (0)); +var G__11229 = cljs.core.next(coll__$1); +n = G__11227; +hash_code = G__11228; +coll__$1 = G__11229; +continue; +} else { +return cljs.core.mix_collection_hash(hash_code,n); +} +break; +} +}); +cljs.core.empty_unordered_hash = cljs.core.mix_collection_hash((0),(0)); + + +(cljs.core.ICounted["null"] = true); + +(cljs.core._count["null"] = (function (_){ +return (0); +})); +Date.prototype.cljs$core$IEquiv$ = cljs.core.PROTOCOL_SENTINEL; + +Date.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (o,other){ +var o__$1 = this; +return ((other instanceof Date)) && ((o__$1.valueOf() === other.valueOf())); +}); + +Date.prototype.cljs$core$IComparable$ = cljs.core.PROTOCOL_SENTINEL; + +Date.prototype.cljs$core$IComparable$_compare$arity$2 = (function (this$,other){ +var this$__$1 = this; +if((other instanceof Date)){ +var G__11230 = this$__$1.valueOf(); +var G__11231 = other.valueOf(); +return goog.array.defaultCompare(G__11230,G__11231); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot compare "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(this$__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(other)].join(''))); +} +}); + +/** + * @interface + */ +cljs.core.Inst = function(){}; + +cljs.core.inst_ms_STAR_ = (function cljs$core$inst_ms_STAR_(inst){ +if((!((inst == null))) && (!((inst.cljs$core$Inst$inst_ms_STAR_$arity$1 == null)))){ +return inst.cljs$core$Inst$inst_ms_STAR_$arity$1(inst); +} else { +var x__8678__auto__ = (((inst == null))?null:inst); +var m__8679__auto__ = (cljs.core.inst_ms_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(inst) : m__8679__auto__.call(null,inst)); +} else { +var m__8679__auto____$1 = (cljs.core.inst_ms_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(inst) : m__8679__auto____$1.call(null,inst)); +} else { +throw cljs.core.missing_protocol("Inst.inst-ms*",inst); +} +} +} +}); + +Date.prototype.cljs$core$Inst$ = cljs.core.PROTOCOL_SENTINEL; + +Date.prototype.cljs$core$Inst$inst_ms_STAR_$arity$1 = (function (inst){ +var inst__$1 = this; +return inst__$1.getTime(); +}); +/** + * Return the number of milliseconds since January 1, 1970, 00:00:00 GMT + */ +cljs.core.inst_ms = (function cljs$core$inst_ms(inst){ +return cljs.core.inst_ms_STAR_(inst); +}); +/** + * Return true if x satisfies Inst + */ +cljs.core.inst_QMARK_ = (function cljs$core$inst_QMARK_(x){ +if(!((x == null))){ +if((false) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$Inst$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.Inst,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.Inst,x); +} +}); +(cljs.core.IEquiv["number"] = true); + +(cljs.core._equiv["number"] = (function (x,o){ +return (x === o); +})); +(cljs.core.Fn["function"] = true); + +(cljs.core.IMeta["function"] = true); + +(cljs.core._meta["function"] = (function (_){ +return null; +})); +(cljs.core.IHash["_"] = true); + +(cljs.core._hash["_"] = (function (o){ +return goog.getUid(o); +})); +/** + * Returns a number one greater than num. + */ +cljs.core.inc = (function cljs$core$inc(x){ +return (x + (1)); +}); + +/** +* @constructor + * @implements {cljs.core.IDeref} +*/ +cljs.core.Reduced = (function (val){ +this.val = val; +this.cljs$lang$protocol_mask$partition0$ = 32768; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.Reduced.prototype.cljs$core$IDeref$_deref$arity$1 = (function (o){ +var self__ = this; +var o__$1 = this; +return self__.val; +}); + +cljs.core.Reduced.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$val], null); +}); + +cljs.core.Reduced.cljs$lang$type = true; + +cljs.core.Reduced.cljs$lang$ctorStr = "cljs.core/Reduced"; + +cljs.core.Reduced.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Reduced"); +}); + +cljs.core.__GT_Reduced = (function cljs$core$__GT_Reduced(val){ +return (new cljs.core.Reduced(val)); +}); + +/** + * Wraps x in a way such that a reduce will terminate with the value x + */ +cljs.core.reduced = (function cljs$core$reduced(x){ +return (new cljs.core.Reduced(x)); +}); +/** + * Returns true if x is the result of a call to reduced + */ +cljs.core.reduced_QMARK_ = (function cljs$core$reduced_QMARK_(r){ +return (r instanceof cljs.core.Reduced); +}); +/** + * If x is already reduced?, returns it, else returns (reduced x) + */ +cljs.core.ensure_reduced = (function cljs$core$ensure_reduced(x){ +if(cljs.core.reduced_QMARK_(x)){ +return x; +} else { +return cljs.core.reduced(x); +} +}); +/** + * If x is reduced?, returns (deref x), else returns x + */ +cljs.core.unreduced = (function cljs$core$unreduced(x){ +if(cljs.core.reduced_QMARK_(x)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(x) : cljs.core.deref.call(null,x)); +} else { +return x; +} +}); +/** + * Also reader macro: @var/@atom/@delay. Returns the + * most-recently-committed value of ref. When applied to a var + * or atom, returns its current state. When applied to a delay, forces + * it if not already forced. See also - realized?. + */ +cljs.core.deref = (function cljs$core$deref(o){ +return cljs.core._deref(o); +}); +/** + * Accepts any collection which satisfies the ICount and IIndexed protocols and + * reduces them without incurring seq initialization + */ +cljs.core.ci_reduce = (function cljs$core$ci_reduce(var_args){ +var args11234 = []; +var len__9181__auto___11243 = arguments.length; +var i__9182__auto___11244 = (0); +while(true){ +if((i__9182__auto___11244 < len__9181__auto___11243)){ +args11234.push((arguments[i__9182__auto___11244])); + +var G__11245 = (i__9182__auto___11244 + (1)); +i__9182__auto___11244 = G__11245; +continue; +} else { +} +break; +} + +var G__11236 = args11234.length; +switch (G__11236) { +case 2: +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11234.length)].join(''))); + +} +}); + +cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2 = (function (cicoll,f){ +var cnt = cljs.core._count(cicoll); +if((cnt === (0))){ +return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +} else { +var val = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll,(0)); +var n = (1); +while(true){ +if((n < cnt)){ +var nval = (function (){var G__11237 = val; +var G__11238 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll,n); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__11237,G__11238) : f.call(null,G__11237,G__11238)); +})(); +if(cljs.core.reduced_QMARK_(nval)){ +return cljs.core.deref(nval); +} else { +var G__11247 = nval; +var G__11248 = (n + (1)); +val = G__11247; +n = G__11248; +continue; +} +} else { +return val; +} +break; +} +} +}); + +cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3 = (function (cicoll,f,val){ +var cnt = cljs.core._count(cicoll); +var val__$1 = val; +var n = (0); +while(true){ +if((n < cnt)){ +var nval = (function (){var G__11239 = val__$1; +var G__11240 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll,n); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__11239,G__11240) : f.call(null,G__11239,G__11240)); +})(); +if(cljs.core.reduced_QMARK_(nval)){ +return cljs.core.deref(nval); +} else { +var G__11249 = nval; +var G__11250 = (n + (1)); +val__$1 = G__11249; +n = G__11250; +continue; +} +} else { +return val__$1; +} +break; +} +}); + +cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$4 = (function (cicoll,f,val,idx){ +var cnt = cljs.core._count(cicoll); +var val__$1 = val; +var n = idx; +while(true){ +if((n < cnt)){ +var nval = (function (){var G__11241 = val__$1; +var G__11242 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(cicoll,n); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__11241,G__11242) : f.call(null,G__11241,G__11242)); +})(); +if(cljs.core.reduced_QMARK_(nval)){ +return cljs.core.deref(nval); +} else { +var G__11251 = nval; +var G__11252 = (n + (1)); +val__$1 = G__11251; +n = G__11252; +continue; +} +} else { +return val__$1; +} +break; +} +}); + +cljs.core.ci_reduce.cljs$lang$maxFixedArity = 4; + +cljs.core.array_reduce = (function cljs$core$array_reduce(var_args){ +var args11253 = []; +var len__9181__auto___11262 = arguments.length; +var i__9182__auto___11263 = (0); +while(true){ +if((i__9182__auto___11263 < len__9181__auto___11262)){ +args11253.push((arguments[i__9182__auto___11263])); + +var G__11264 = (i__9182__auto___11263 + (1)); +i__9182__auto___11263 = G__11264; +continue; +} else { +} +break; +} + +var G__11255 = args11253.length; +switch (G__11255) { +case 2: +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11253.length)].join(''))); + +} +}); + +cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2 = (function (arr,f){ +var cnt = arr.length; +if((arr.length === (0))){ +return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +} else { +var val = (arr[(0)]); +var n = (1); +while(true){ +if((n < cnt)){ +var nval = (function (){var G__11256 = val; +var G__11257 = (arr[n]); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__11256,G__11257) : f.call(null,G__11256,G__11257)); +})(); +if(cljs.core.reduced_QMARK_(nval)){ +return cljs.core.deref(nval); +} else { +var G__11266 = nval; +var G__11267 = (n + (1)); +val = G__11266; +n = G__11267; +continue; +} +} else { +return val; +} +break; +} +} +}); + +cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3 = (function (arr,f,val){ +var cnt = arr.length; +var val__$1 = val; +var n = (0); +while(true){ +if((n < cnt)){ +var nval = (function (){var G__11258 = val__$1; +var G__11259 = (arr[n]); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__11258,G__11259) : f.call(null,G__11258,G__11259)); +})(); +if(cljs.core.reduced_QMARK_(nval)){ +return cljs.core.deref(nval); +} else { +var G__11268 = nval; +var G__11269 = (n + (1)); +val__$1 = G__11268; +n = G__11269; +continue; +} +} else { +return val__$1; +} +break; +} +}); + +cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4 = (function (arr,f,val,idx){ +var cnt = arr.length; +var val__$1 = val; +var n = idx; +while(true){ +if((n < cnt)){ +var nval = (function (){var G__11260 = val__$1; +var G__11261 = (arr[n]); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__11260,G__11261) : f.call(null,G__11260,G__11261)); +})(); +if(cljs.core.reduced_QMARK_(nval)){ +return cljs.core.deref(nval); +} else { +var G__11270 = nval; +var G__11271 = (n + (1)); +val__$1 = G__11270; +n = G__11271; +continue; +} +} else { +return val__$1; +} +break; +} +}); + +cljs.core.array_reduce.cljs$lang$maxFixedArity = 4; + + + + + + + +/** + * Returns true if coll implements count in constant time + */ +cljs.core.counted_QMARK_ = (function cljs$core$counted_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (2))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$ICounted$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.ICounted,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.ICounted,x); +} +}); +/** + * Returns true if coll implements nth in constant time + */ +cljs.core.indexed_QMARK_ = (function cljs$core$indexed_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (16))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IIndexed$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed,x); +} +}); +cljs.core._indexOf = (function cljs$core$_indexOf(var_args){ +var args11276 = []; +var len__9181__auto___11279 = arguments.length; +var i__9182__auto___11280 = (0); +while(true){ +if((i__9182__auto___11280 < len__9181__auto___11279)){ +args11276.push((arguments[i__9182__auto___11280])); + +var G__11281 = (i__9182__auto___11280 + (1)); +i__9182__auto___11280 = G__11281; +continue; +} else { +} +break; +} + +var G__11278 = args11276.length; +switch (G__11278) { +case 2: +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11276.length)].join(''))); + +} +}); + +cljs.core._indexOf.cljs$core$IFn$_invoke$arity$2 = (function (coll,x){ +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); + +cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3 = (function (coll,x,start){ +var len = (cljs.core.count.cljs$core$IFn$_invoke$arity$1 ? cljs.core.count.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.count.call(null,coll)); +if((start >= len)){ +return (-1); +} else { +var idx = (((start > (0)))?start:(((start < (0)))?(function (){var x__8298__auto__ = (0); +var y__8299__auto__ = (start + len); +return ((x__8298__auto__ > y__8299__auto__) ? x__8298__auto__ : y__8299__auto__); +})():start +)); +while(true){ +if((idx < len)){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((cljs.core.nth.cljs$core$IFn$_invoke$arity$2 ? cljs.core.nth.cljs$core$IFn$_invoke$arity$2(coll,idx) : cljs.core.nth.call(null,coll,idx)),x)){ +return idx; +} else { +var G__11283 = (idx + (1)); +idx = G__11283; +continue; +} +} else { +return (-1); +} +break; +} +} +}); + +cljs.core._indexOf.cljs$lang$maxFixedArity = 3; + +cljs.core._lastIndexOf = (function cljs$core$_lastIndexOf(var_args){ +var args11284 = []; +var len__9181__auto___11287 = arguments.length; +var i__9182__auto___11288 = (0); +while(true){ +if((i__9182__auto___11288 < len__9181__auto___11287)){ +args11284.push((arguments[i__9182__auto___11288])); + +var G__11289 = (i__9182__auto___11288 + (1)); +i__9182__auto___11288 = G__11289; +continue; +} else { +} +break; +} + +var G__11286 = args11284.length; +switch (G__11286) { +case 2: +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11284.length)].join(''))); + +} +}); + +cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$2 = (function (coll,x){ +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(cljs.core.count.cljs$core$IFn$_invoke$arity$1 ? cljs.core.count.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.count.call(null,coll))); +}); + +cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3 = (function (coll,x,start){ +var len = (cljs.core.count.cljs$core$IFn$_invoke$arity$1 ? cljs.core.count.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.count.call(null,coll)); +if((len === (0))){ +return (-1); +} else { +var idx = (((start > (0)))?(function (){var x__8305__auto__ = (len - (1)); +var y__8306__auto__ = start; +return ((x__8305__auto__ < y__8306__auto__) ? x__8305__auto__ : y__8306__auto__); +})():(((start < (0)))?(len + start):start +)); +while(true){ +if((idx >= (0))){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((cljs.core.nth.cljs$core$IFn$_invoke$arity$2 ? cljs.core.nth.cljs$core$IFn$_invoke$arity$2(coll,idx) : cljs.core.nth.call(null,coll,idx)),x)){ +return idx; +} else { +var G__11291 = (idx - (1)); +idx = G__11291; +continue; +} +} else { +return (-1); +} +break; +} +} +}); + +cljs.core._lastIndexOf.cljs$lang$maxFixedArity = 3; + + +/** +* @constructor +*/ +cljs.core.IndexedSeqIterator = (function (arr,i){ +this.arr = arr; +this.i = i; +}) +cljs.core.IndexedSeqIterator.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +return (self__.i < self__.arr.length); +}); + +cljs.core.IndexedSeqIterator.prototype.next = (function (){ +var self__ = this; +var _ = this; +var ret = (self__.arr[self__.i]); +self__.i = (self__.i + (1)); + +return ret; +}); + +cljs.core.IndexedSeqIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.IndexedSeqIterator.cljs$lang$type = true; + +cljs.core.IndexedSeqIterator.cljs$lang$ctorStr = "cljs.core/IndexedSeqIterator"; + +cljs.core.IndexedSeqIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/IndexedSeqIterator"); +}); + +cljs.core.__GT_IndexedSeqIterator = (function cljs$core$__GT_IndexedSeqIterator(arr,i){ +return (new cljs.core.IndexedSeqIterator(arr,i)); +}); + + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IReversible} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ASeq} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.IndexedSeq = (function (arr,i,meta){ +this.arr = arr; +this.i = i; +this.meta = meta; +this.cljs$lang$protocol_mask$partition0$ = 166592766; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.IndexedSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.IndexedSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.IndexedSeq.prototype.indexOf = (function() { +var G__11292 = null; +var G__11292__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__11292__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11292 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11292__1.call(this,x); +case 2: +return G__11292__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11292.cljs$core$IFn$_invoke$arity$1 = G__11292__1; +G__11292.cljs$core$IFn$_invoke$arity$2 = G__11292__2; +return G__11292; +})() +; + +cljs.core.IndexedSeq.prototype.lastIndexOf = (function() { +var G__11293 = null; +var G__11293__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(cljs.core.count.cljs$core$IFn$_invoke$arity$1 ? cljs.core.count.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.count.call(null,coll))); +}); +var G__11293__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11293 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11293__1.call(this,x); +case 2: +return G__11293__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11293.cljs$core$IFn$_invoke$arity$1 = G__11293__1; +G__11293.cljs$core$IFn$_invoke$arity$2 = G__11293__2; +return G__11293; +})() +; + +cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (coll,n){ +var self__ = this; +var coll__$1 = this; +var i__$1 = (n + self__.i); +if((((0) <= i__$1)) && ((i__$1 < self__.arr.length))){ +return (self__.arr[i__$1]); +} else { +throw (new Error("Index out of bounds")); +} +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (coll,n,not_found){ +var self__ = this; +var coll__$1 = this; +var i__$1 = (n + self__.i); +if((((0) <= i__$1)) && ((i__$1 < self__.arr.length))){ +return (self__.arr[i__$1]); +} else { +return not_found; +} +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.IndexedSeq.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.IndexedSeqIterator(self__.arr,self__.i)); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.IndexedSeq.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.IndexedSeq(self__.arr,self__.i,self__.meta)); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$INext$_next$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +if(((self__.i + (1)) < self__.arr.length)){ +return (new cljs.core.IndexedSeq(self__.arr,(self__.i + (1)),null)); +} else { +return null; +} +}); + +cljs.core.IndexedSeq.prototype.cljs$core$ICounted$_count$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +var x__8298__auto__ = (0); +var y__8299__auto__ = (self__.arr.length - self__.i); +return ((x__8298__auto__ > y__8299__auto__) ? x__8298__auto__ : y__8299__auto__); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IReversible$_rseq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var c = coll__$1.cljs$core$ICounted$_count$arity$1(null); +if((c > (0))){ +return (new cljs.core.RSeq(coll__$1,(c - (1)),null)); +} else { +return null; +} +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.hash_ordered_coll(coll__$1); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2 ? cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2(coll__$1,other) : cljs.core.equiv_sequential.call(null,coll__$1,other)); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.List.EMPTY; +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr,f,(self__.arr[self__.i]),(self__.i + (1))); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr,f,start,self__.i); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (self__.arr[self__.i]); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +if(((self__.i + (1)) < self__.arr.length)){ +return (new cljs.core.IndexedSeq(self__.arr,(self__.i + (1)),null)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.IndexedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +if((self__.i < self__.arr.length)){ +return this$__$1; +} else { +return null; +} +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,new_meta){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.IndexedSeq(self__.arr,self__.i,new_meta)); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.cons.cljs$core$IFn$_invoke$arity$2 ? cljs.core.cons.cljs$core$IFn$_invoke$arity$2(o,coll__$1) : cljs.core.cons.call(null,o,coll__$1)); +}); + +cljs.core.IndexedSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.cst$sym$i,cljs.core.cst$sym$meta], null); +}); + +cljs.core.IndexedSeq.cljs$lang$type = true; + +cljs.core.IndexedSeq.cljs$lang$ctorStr = "cljs.core/IndexedSeq"; + +cljs.core.IndexedSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/IndexedSeq"); +}); + +cljs.core.__GT_IndexedSeq = (function cljs$core$__GT_IndexedSeq(arr,i,meta){ +return (new cljs.core.IndexedSeq(arr,i,meta)); +}); + +(cljs.core.IndexedSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Create seq from a primitive JavaScript Array-like. + */ +cljs.core.prim_seq = (function cljs$core$prim_seq(var_args){ +var args11294 = []; +var len__9181__auto___11297 = arguments.length; +var i__9182__auto___11298 = (0); +while(true){ +if((i__9182__auto___11298 < len__9181__auto___11297)){ +args11294.push((arguments[i__9182__auto___11298])); + +var G__11299 = (i__9182__auto___11298 + (1)); +i__9182__auto___11298 = G__11299; +continue; +} else { +} +break; +} + +var G__11296 = args11294.length; +switch (G__11296) { +case 1: +return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11294.length)].join(''))); + +} +}); + +cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$1 = (function (prim){ +return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(prim,(0)); +}); + +cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2 = (function (prim,i){ +if((i < prim.length)){ +return (new cljs.core.IndexedSeq(prim,i,null)); +} else { +return null; +} +}); + +cljs.core.prim_seq.cljs$lang$maxFixedArity = 2; + +/** + * Create a seq from a JavaScript array. + */ +cljs.core.array_seq = (function cljs$core$array_seq(var_args){ +var args11301 = []; +var len__9181__auto___11304 = arguments.length; +var i__9182__auto___11305 = (0); +while(true){ +if((i__9182__auto___11305 < len__9181__auto___11304)){ +args11301.push((arguments[i__9182__auto___11305])); + +var G__11306 = (i__9182__auto___11305 + (1)); +i__9182__auto___11305 = G__11306; +continue; +} else { +} +break; +} + +var G__11303 = args11301.length; +switch (G__11303) { +case 1: +return cljs.core.array_seq.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.array_seq.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11301.length)].join(''))); + +} +}); + +cljs.core.array_seq.cljs$core$IFn$_invoke$arity$1 = (function (array){ +return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(array,(0)); +}); + +cljs.core.array_seq.cljs$core$IFn$_invoke$arity$2 = (function (array,i){ +return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(array,i); +}); + +cljs.core.array_seq.cljs$lang$maxFixedArity = 2; + + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.RSeq = (function (ci,i,meta){ +this.ci = ci; +this.i = i; +this.meta = meta; +this.cljs$lang$protocol_mask$partition0$ = 32374990; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.RSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.RSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.RSeq.prototype.indexOf = (function() { +var G__11308 = null; +var G__11308__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__11308__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11308 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11308__1.call(this,x); +case 2: +return G__11308__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11308.cljs$core$IFn$_invoke$arity$1 = G__11308__1; +G__11308.cljs$core$IFn$_invoke$arity$2 = G__11308__2; +return G__11308; +})() +; + +cljs.core.RSeq.prototype.lastIndexOf = (function() { +var G__11309 = null; +var G__11309__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(cljs.core.count.cljs$core$IFn$_invoke$arity$1 ? cljs.core.count.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.count.call(null,coll))); +}); +var G__11309__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11309 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11309__1.call(this,x); +case 2: +return G__11309__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11309.cljs$core$IFn$_invoke$arity$1 = G__11309__1; +G__11309.cljs$core$IFn$_invoke$arity$2 = G__11309__2; +return G__11309; +})() +; + +cljs.core.RSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.RSeq.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.RSeq(self__.ci,self__.i,self__.meta)); +}); + +cljs.core.RSeq.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.i > (0))){ +return (new cljs.core.RSeq(self__.ci,(self__.i - (1)),null)); +} else { +return null; +} +}); + +cljs.core.RSeq.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (self__.i + (1)); +}); + +cljs.core.RSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.hash_ordered_coll(coll__$1); +}); + +cljs.core.RSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2 ? cljs.core.equiv_sequential.cljs$core$IFn$_invoke$arity$2(coll__$1,other) : cljs.core.equiv_sequential.call(null,coll__$1,other)); +}); + +cljs.core.RSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.RSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (col,f){ +var self__ = this; +var col__$1 = this; +return (cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2 ? cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,col__$1) : cljs.core.seq_reduce.call(null,f,col__$1)); +}); + +cljs.core.RSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (col,f,start){ +var self__ = this; +var col__$1 = this; +return (cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,col__$1) : cljs.core.seq_reduce.call(null,f,start,col__$1)); +}); + +cljs.core.RSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.ci,self__.i); +}); + +cljs.core.RSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.i > (0))){ +return (new cljs.core.RSeq(self__.ci,(self__.i - (1)),null)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.RSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.RSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,new_meta){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.RSeq(self__.ci,self__.i,new_meta)); +}); + +cljs.core.RSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.cons.cljs$core$IFn$_invoke$arity$2 ? cljs.core.cons.cljs$core$IFn$_invoke$arity$2(o,coll__$1) : cljs.core.cons.call(null,o,coll__$1)); +}); + +cljs.core.RSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$ci,cljs.core.cst$sym$i,cljs.core.cst$sym$meta], null); +}); + +cljs.core.RSeq.cljs$lang$type = true; + +cljs.core.RSeq.cljs$lang$ctorStr = "cljs.core/RSeq"; + +cljs.core.RSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/RSeq"); +}); + +cljs.core.__GT_RSeq = (function cljs$core$__GT_RSeq(ci,i,meta){ +return (new cljs.core.RSeq(ci,i,meta)); +}); + +(cljs.core.RSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Same as (first (next x)) + */ +cljs.core.second = (function cljs$core$second(coll){ +return cljs.core.first(cljs.core.next(coll)); +}); +/** + * Same as (first (first x)) + */ +cljs.core.ffirst = (function cljs$core$ffirst(coll){ +return cljs.core.first(cljs.core.first(coll)); +}); +/** + * Same as (next (first x)) + */ +cljs.core.nfirst = (function cljs$core$nfirst(coll){ +return cljs.core.next(cljs.core.first(coll)); +}); +/** + * Same as (first (next x)) + */ +cljs.core.fnext = (function cljs$core$fnext(coll){ +return cljs.core.first(cljs.core.next(coll)); +}); +/** + * Same as (next (next x)) + */ +cljs.core.nnext = (function cljs$core$nnext(coll){ +return cljs.core.next(cljs.core.next(coll)); +}); +/** + * Return the last item in coll, in linear time + */ +cljs.core.last = (function cljs$core$last(s){ +while(true){ +var sn = cljs.core.next(s); +if(!((sn == null))){ +var G__11310 = sn; +s = G__11310; +continue; +} else { +return cljs.core.first(s); +} +break; +} +}); +(cljs.core.IEquiv["_"] = true); + +(cljs.core._equiv["_"] = (function (x,o){ +return (x === o); +})); +/** + * conj[oin]. Returns a new collection with the xs + * 'added'. (conj nil item) returns (item). The 'addition' may + * happen at different 'places' depending on the concrete type. + */ +cljs.core.conj = (function cljs$core$conj(var_args){ +var args11311 = []; +var len__9181__auto___11317 = arguments.length; +var i__9182__auto___11318 = (0); +while(true){ +if((i__9182__auto___11318 < len__9181__auto___11317)){ +args11311.push((arguments[i__9182__auto___11318])); + +var G__11319 = (i__9182__auto___11318 + (1)); +i__9182__auto___11318 = G__11319; +continue; +} else { +} +break; +} + +var G__11316 = args11311.length; +switch (G__11316) { +case 0: +return cljs.core.conj.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.conj.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11311.slice((2)),(0),null)); +return cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.conj.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.PersistentVector.EMPTY; +}); + +cljs.core.conj.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +return coll; +}); + +cljs.core.conj.cljs$core$IFn$_invoke$arity$2 = (function (coll,x){ +if(!((coll == null))){ +return cljs.core._conj(coll,x); +} else { +var x__8894__auto__ = x; +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto__); +} +}); + +cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic = (function (coll,x,xs){ +while(true){ +if(cljs.core.truth_(xs)){ +var G__11321 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(coll,x); +var G__11322 = cljs.core.first(xs); +var G__11323 = cljs.core.next(xs); +coll = G__11321; +x = G__11322; +xs = G__11323; +continue; +} else { +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(coll,x); +} +break; +} +}); + +cljs.core.conj.cljs$lang$applyTo = (function (seq11312){ +var G__11313 = cljs.core.first(seq11312); +var seq11312__$1 = cljs.core.next(seq11312); +var G__11314 = cljs.core.first(seq11312__$1); +var seq11312__$2 = cljs.core.next(seq11312__$1); +return cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(G__11313,G__11314,seq11312__$2); +}); + +cljs.core.conj.cljs$lang$maxFixedArity = (2); + +/** + * Returns an empty collection of the same category as coll, or nil + */ +cljs.core.empty = (function cljs$core$empty(coll){ +if((coll == null)){ +return null; +} else { +return cljs.core._empty(coll); +} +}); +cljs.core.accumulating_seq_count = (function cljs$core$accumulating_seq_count(coll){ +var s = cljs.core.seq(coll); +var acc = (0); +while(true){ +if(cljs.core.counted_QMARK_(s)){ +return (acc + cljs.core._count(s)); +} else { +var G__11324 = cljs.core.next(s); +var G__11325 = (acc + (1)); +s = G__11324; +acc = G__11325; +continue; +} +break; +} +}); +/** + * Returns the number of items in the collection. (count nil) returns + * 0. Also works on strings, arrays, and Maps + */ +cljs.core.count = (function cljs$core$count(coll){ +if(!((coll == null))){ +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (2))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ICounted$)))?true:false):false)){ +return coll.cljs$core$ICounted$_count$arity$1(null); +} else { +if(cljs.core.array_QMARK_(coll)){ +return coll.length; +} else { +if(typeof coll === 'string'){ +return coll.length; +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (8388608))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ISeqable$)))?true:false):false)){ +return cljs.core.accumulating_seq_count(coll); +} else { +return cljs.core._count(coll); + +} +} +} +} +} else { +return (0); +} +}); +cljs.core.linear_traversal_nth = (function cljs$core$linear_traversal_nth(var_args){ +var args11330 = []; +var len__9181__auto___11333 = arguments.length; +var i__9182__auto___11334 = (0); +while(true){ +if((i__9182__auto___11334 < len__9181__auto___11333)){ +args11330.push((arguments[i__9182__auto___11334])); + +var G__11335 = (i__9182__auto___11334 + (1)); +i__9182__auto___11334 = G__11335; +continue; +} else { +} +break; +} + +var G__11332 = args11330.length; +switch (G__11332) { +case 2: +return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11330.length)].join(''))); + +} +}); + +cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$2 = (function (coll,n){ +while(true){ +if((coll == null)){ +throw (new Error("Index out of bounds")); +} else { +if((n === (0))){ +if(cljs.core.seq(coll)){ +return cljs.core.first(coll); +} else { +throw (new Error("Index out of bounds")); +} +} else { +if(cljs.core.indexed_QMARK_(coll)){ +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll,n); +} else { +if(cljs.core.seq(coll)){ +var G__11337 = cljs.core.next(coll); +var G__11338 = (n - (1)); +coll = G__11337; +n = G__11338; +continue; +} else { +throw (new Error("Index out of bounds")); + +} +} +} +} +break; +} +}); + +cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$3 = (function (coll,n,not_found){ +while(true){ +if((coll == null)){ +return not_found; +} else { +if((n === (0))){ +if(cljs.core.seq(coll)){ +return cljs.core.first(coll); +} else { +return not_found; +} +} else { +if(cljs.core.indexed_QMARK_(coll)){ +return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(coll,n,not_found); +} else { +if(cljs.core.seq(coll)){ +var G__11339 = cljs.core.next(coll); +var G__11340 = (n - (1)); +var G__11341 = not_found; +coll = G__11339; +n = G__11340; +not_found = G__11341; +continue; +} else { +return not_found; + +} +} +} +} +break; +} +}); + +cljs.core.linear_traversal_nth.cljs$lang$maxFixedArity = 3; + +/** + * Returns the value at the index. get returns nil if index out of + * bounds, nth throws an exception unless not-found is supplied. nth + * also works for strings, arrays, regex Matchers and Lists, and, + * in O(n) time, for sequences. + */ +cljs.core.nth = (function cljs$core$nth(var_args){ +var args11342 = []; +var len__9181__auto___11349 = arguments.length; +var i__9182__auto___11350 = (0); +while(true){ +if((i__9182__auto___11350 < len__9181__auto___11349)){ +args11342.push((arguments[i__9182__auto___11350])); + +var G__11351 = (i__9182__auto___11350 + (1)); +i__9182__auto___11350 = G__11351; +continue; +} else { +} +break; +} + +var G__11344 = args11342.length; +switch (G__11344) { +case 2: +return cljs.core.nth.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.nth.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11342.length)].join(''))); + +} +}); + +cljs.core.nth.cljs$core$IFn$_invoke$arity$2 = (function (coll,n){ +if(!(typeof n === 'number')){ +throw (new Error("Index argument to nth must be a number")); +} else { +if((coll == null)){ +return coll; +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (16))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$IIndexed$)))?true:false):false)){ +return coll.cljs$core$IIndexed$_nth$arity$2(null,n); +} else { +if(cljs.core.array_QMARK_(coll)){ +if(((n >= (0))) && ((n < coll.length))){ +return (coll[n]); +} else { +throw (new Error("Index out of bounds")); +} +} else { +if(typeof coll === 'string'){ +if(((n >= (0))) && ((n < coll.length))){ +return coll.charAt(n); +} else { +throw (new Error("Index out of bounds")); +} +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ISeq$)))?true:false):false)){ +return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$2(coll,n); +} else { +if(cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed,coll)){ +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll,n); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("nth not supported on this type "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.type__GT_str(cljs.core.type(coll)))].join(''))); + +} +} +} +} +} +} +} +}); + +cljs.core.nth.cljs$core$IFn$_invoke$arity$3 = (function (coll,n,not_found){ +if(!(typeof n === 'number')){ +throw (new Error("Index argument to nth must be a number.")); +} else { +if((coll == null)){ +return not_found; +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (16))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$IIndexed$)))?true:false):false)){ +return coll.cljs$core$IIndexed$_nth$arity$3(null,n,not_found); +} else { +if(cljs.core.array_QMARK_(coll)){ +if(((n >= (0))) && ((n < coll.length))){ +return (coll[n]); +} else { +return not_found; +} +} else { +if(typeof coll === 'string'){ +if(((n >= (0))) && ((n < coll.length))){ +return coll.charAt(n); +} else { +return not_found; +} +} else { +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ISeq$)))?true:false):false)){ +return cljs.core.linear_traversal_nth.cljs$core$IFn$_invoke$arity$3(coll,n,not_found); +} else { +if(cljs.core.native_satisfies_QMARK_(cljs.core.IIndexed,coll)){ +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(coll,n); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("nth not supported on this type "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.type__GT_str(cljs.core.type(coll)))].join(''))); + +} +} +} +} +} +} +} +}); + +cljs.core.nth.cljs$lang$maxFixedArity = 3; + +/** + * Returns the nth rest of coll, coll when n is 0. + */ +cljs.core.nthrest = (function cljs$core$nthrest(coll,n){ +var n__$1 = n; +var xs = coll; +while(true){ +if(((n__$1 > (0))) && (cljs.core.seq(xs))){ +var G__11353 = (n__$1 - (1)); +var G__11354 = cljs.core.rest(xs); +n__$1 = G__11353; +xs = G__11354; +continue; +} else { +return xs; +} +break; +} +}); +/** + * Returns the value mapped to key, not-found or nil if key not present. + */ +cljs.core.get = (function cljs$core$get(var_args){ +var args11355 = []; +var len__9181__auto___11360 = arguments.length; +var i__9182__auto___11361 = (0); +while(true){ +if((i__9182__auto___11361 < len__9181__auto___11360)){ +args11355.push((arguments[i__9182__auto___11361])); + +var G__11362 = (i__9182__auto___11361 + (1)); +i__9182__auto___11361 = G__11362; +continue; +} else { +} +break; +} + +var G__11357 = args11355.length; +switch (G__11357) { +case 2: +return cljs.core.get.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.get.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11355.length)].join(''))); + +} +}); + +cljs.core.get.cljs$core$IFn$_invoke$arity$2 = (function (o,k){ +if((o == null)){ +return null; +} else { +if(((!((o == null)))?((((o.cljs$lang$protocol_mask$partition0$ & (256))) || ((cljs.core.PROTOCOL_SENTINEL === o.cljs$core$ILookup$)))?true:false):false)){ +return o.cljs$core$ILookup$_lookup$arity$2(null,k); +} else { +if(cljs.core.array_QMARK_(o)){ +if((!((k == null))) && ((k < o.length))){ +return (o[(k | (0))]); +} else { +return null; +} +} else { +if(typeof o === 'string'){ +if((!((k == null))) && ((k < o.length))){ +return o.charAt((k | (0))); +} else { +return null; +} +} else { +if(cljs.core.native_satisfies_QMARK_(cljs.core.ILookup,o)){ +return cljs.core._lookup.cljs$core$IFn$_invoke$arity$2(o,k); +} else { +return null; + +} +} +} +} +} +}); + +cljs.core.get.cljs$core$IFn$_invoke$arity$3 = (function (o,k,not_found){ +if(!((o == null))){ +if(((!((o == null)))?((((o.cljs$lang$protocol_mask$partition0$ & (256))) || ((cljs.core.PROTOCOL_SENTINEL === o.cljs$core$ILookup$)))?true:false):false)){ +return o.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +} else { +if(cljs.core.array_QMARK_(o)){ +if((!((k == null))) && ((k >= (0))) && ((k < o.length))){ +return (o[(k | (0))]); +} else { +return not_found; +} +} else { +if(typeof o === 'string'){ +if((!((k == null))) && ((k >= (0))) && ((k < o.length))){ +return o.charAt((k | (0))); +} else { +return not_found; +} +} else { +if(cljs.core.native_satisfies_QMARK_(cljs.core.ILookup,o)){ +return cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(o,k,not_found); +} else { +return not_found; + +} +} +} +} +} else { +return not_found; +} +}); + +cljs.core.get.cljs$lang$maxFixedArity = 3; + + +/** + * assoc[iate]. When applied to a map, returns a new map of the + * same (hashed/sorted) type, that contains the mapping of key(s) to + * val(s). When applied to a vector, returns a new vector that + * contains val at index. + */ +cljs.core.assoc = (function cljs$core$assoc(var_args){ +var args11364 = []; +var len__9181__auto___11371 = arguments.length; +var i__9182__auto___11372 = (0); +while(true){ +if((i__9182__auto___11372 < len__9181__auto___11371)){ +args11364.push((arguments[i__9182__auto___11372])); + +var G__11373 = (i__9182__auto___11372 + (1)); +i__9182__auto___11372 = G__11373; +continue; +} else { +} +break; +} + +var G__11370 = args11364.length; +switch (G__11370) { +case 3: +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11364.slice((3)),(0),null)); +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.assoc.cljs$core$IFn$_invoke$arity$3 = (function (coll,k,v){ +if(!((coll == null))){ +return cljs.core._assoc(coll,k,v); +} else { +return cljs.core.PersistentArrayMap.createAsIfByAssoc([k,v]); +} +}); + +cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic = (function (coll,k,v,kvs){ +while(true){ +var ret = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(coll,k,v); +if(cljs.core.truth_(kvs)){ +var G__11375 = ret; +var G__11376 = cljs.core.first(kvs); +var G__11377 = cljs.core.second(kvs); +var G__11378 = cljs.core.nnext(kvs); +coll = G__11375; +k = G__11376; +v = G__11377; +kvs = G__11378; +continue; +} else { +return ret; +} +break; +} +}); + +cljs.core.assoc.cljs$lang$applyTo = (function (seq11365){ +var G__11366 = cljs.core.first(seq11365); +var seq11365__$1 = cljs.core.next(seq11365); +var G__11367 = cljs.core.first(seq11365__$1); +var seq11365__$2 = cljs.core.next(seq11365__$1); +var G__11368 = cljs.core.first(seq11365__$2); +var seq11365__$3 = cljs.core.next(seq11365__$2); +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(G__11366,G__11367,G__11368,seq11365__$3); +}); + +cljs.core.assoc.cljs$lang$maxFixedArity = (3); + +/** + * dissoc[iate]. Returns a new map of the same (hashed/sorted) type, + * that does not contain a mapping for key(s). + */ +cljs.core.dissoc = (function cljs$core$dissoc(var_args){ +var args11379 = []; +var len__9181__auto___11385 = arguments.length; +var i__9182__auto___11386 = (0); +while(true){ +if((i__9182__auto___11386 < len__9181__auto___11385)){ +args11379.push((arguments[i__9182__auto___11386])); + +var G__11387 = (i__9182__auto___11386 + (1)); +i__9182__auto___11386 = G__11387; +continue; +} else { +} +break; +} + +var G__11384 = args11379.length; +switch (G__11384) { +case 1: +return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11379.slice((2)),(0),null)); +return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.dissoc.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +return coll; +}); + +cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2 = (function (coll,k){ +if((coll == null)){ +return null; +} else { +return cljs.core._dissoc(coll,k); +} +}); + +cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic = (function (coll,k,ks){ +while(true){ +if((coll == null)){ +return null; +} else { +var ret = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(coll,k); +if(cljs.core.truth_(ks)){ +var G__11389 = ret; +var G__11390 = cljs.core.first(ks); +var G__11391 = cljs.core.next(ks); +coll = G__11389; +k = G__11390; +ks = G__11391; +continue; +} else { +return ret; +} +} +break; +} +}); + +cljs.core.dissoc.cljs$lang$applyTo = (function (seq11380){ +var G__11381 = cljs.core.first(seq11380); +var seq11380__$1 = cljs.core.next(seq11380); +var G__11382 = cljs.core.first(seq11380__$1); +var seq11380__$2 = cljs.core.next(seq11380__$1); +return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__11381,G__11382,seq11380__$2); +}); + +cljs.core.dissoc.cljs$lang$maxFixedArity = (2); + +/** + * Return true if f is a JavaScript function or satisfies the Fn protocol. + */ +cljs.core.fn_QMARK_ = (function cljs$core$fn_QMARK_(f){ +var or__7960__auto__ = goog.isFunction(f); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +if(!((f == null))){ +if((false) || ((cljs.core.PROTOCOL_SENTINEL === f.cljs$core$Fn$))){ +return true; +} else { +if((!f.cljs$lang$protocol_mask$partition$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.Fn,f); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.Fn,f); +} +} +}); + +/** +* @constructor + * @implements {cljs.core.IFn} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.Fn} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.MetaFn = (function (afn,meta){ +this.afn = afn; +this.meta = meta; +this.cljs$lang$protocol_mask$partition0$ = 393217; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.MetaFn.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.meta; +}); + +cljs.core.MetaFn.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_,new_meta){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.MetaFn(self__.afn,new_meta)); +}); + +cljs.core.MetaFn.prototype.cljs$core$Fn$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.MetaFn.prototype.call = (function() { +var G__11397 = null; +var G__11397__1 = (function (self__){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$0 ? self__.afn.cljs$core$IFn$_invoke$arity$0() : self__.afn.call(null)); +}); +var G__11397__2 = (function (self__,a){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$1 ? self__.afn.cljs$core$IFn$_invoke$arity$1(a) : self__.afn.call(null,a)); +}); +var G__11397__3 = (function (self__,a,b){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$2 ? self__.afn.cljs$core$IFn$_invoke$arity$2(a,b) : self__.afn.call(null,a,b)); +}); +var G__11397__4 = (function (self__,a,b,c){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$3 ? self__.afn.cljs$core$IFn$_invoke$arity$3(a,b,c) : self__.afn.call(null,a,b,c)); +}); +var G__11397__5 = (function (self__,a,b,c,d){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$4 ? self__.afn.cljs$core$IFn$_invoke$arity$4(a,b,c,d) : self__.afn.call(null,a,b,c,d)); +}); +var G__11397__6 = (function (self__,a,b,c,d,e){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$5 ? self__.afn.cljs$core$IFn$_invoke$arity$5(a,b,c,d,e) : self__.afn.call(null,a,b,c,d,e)); +}); +var G__11397__7 = (function (self__,a,b,c,d,e,f){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$6 ? self__.afn.cljs$core$IFn$_invoke$arity$6(a,b,c,d,e,f) : self__.afn.call(null,a,b,c,d,e,f)); +}); +var G__11397__8 = (function (self__,a,b,c,d,e,f,g){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$7 ? self__.afn.cljs$core$IFn$_invoke$arity$7(a,b,c,d,e,f,g) : self__.afn.call(null,a,b,c,d,e,f,g)); +}); +var G__11397__9 = (function (self__,a,b,c,d,e,f,g,h){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$8 ? self__.afn.cljs$core$IFn$_invoke$arity$8(a,b,c,d,e,f,g,h) : self__.afn.call(null,a,b,c,d,e,f,g,h)); +}); +var G__11397__10 = (function (self__,a,b,c,d,e,f,g,h,i){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$9 ? self__.afn.cljs$core$IFn$_invoke$arity$9(a,b,c,d,e,f,g,h,i) : self__.afn.call(null,a,b,c,d,e,f,g,h,i)); +}); +var G__11397__11 = (function (self__,a,b,c,d,e,f,g,h,i,j){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$10 ? self__.afn.cljs$core$IFn$_invoke$arity$10(a,b,c,d,e,f,g,h,i,j) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j)); +}); +var G__11397__12 = (function (self__,a,b,c,d,e,f,g,h,i,j,k){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$11 ? self__.afn.cljs$core$IFn$_invoke$arity$11(a,b,c,d,e,f,g,h,i,j,k) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k)); +}); +var G__11397__13 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$12 ? self__.afn.cljs$core$IFn$_invoke$arity$12(a,b,c,d,e,f,g,h,i,j,k,l) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l)); +}); +var G__11397__14 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$13 ? self__.afn.cljs$core$IFn$_invoke$arity$13(a,b,c,d,e,f,g,h,i,j,k,l,m) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m)); +}); +var G__11397__15 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$14 ? self__.afn.cljs$core$IFn$_invoke$arity$14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +}); +var G__11397__16 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$15 ? self__.afn.cljs$core$IFn$_invoke$arity$15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +}); +var G__11397__17 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$16 ? self__.afn.cljs$core$IFn$_invoke$arity$16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +}); +var G__11397__18 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$17 ? self__.afn.cljs$core$IFn$_invoke$arity$17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +}); +var G__11397__19 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$18 ? self__.afn.cljs$core$IFn$_invoke$arity$18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +}); +var G__11397__20 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$19 ? self__.afn.cljs$core$IFn$_invoke$arity$19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +}); +var G__11397__21 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (self__.afn.cljs$core$IFn$_invoke$arity$20 ? self__.afn.cljs$core$IFn$_invoke$arity$20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +}); +var G__11397__22 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +var self__ = this; +var self____$1 = this; +var _ = self____$1; +return (cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(self__.afn,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest) : cljs.core.apply.call(null,self__.afn,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest)); +}); +G__11397 = function(self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +switch(arguments.length){ +case 1: +return G__11397__1.call(this,self__); +case 2: +return G__11397__2.call(this,self__,a); +case 3: +return G__11397__3.call(this,self__,a,b); +case 4: +return G__11397__4.call(this,self__,a,b,c); +case 5: +return G__11397__5.call(this,self__,a,b,c,d); +case 6: +return G__11397__6.call(this,self__,a,b,c,d,e); +case 7: +return G__11397__7.call(this,self__,a,b,c,d,e,f); +case 8: +return G__11397__8.call(this,self__,a,b,c,d,e,f,g); +case 9: +return G__11397__9.call(this,self__,a,b,c,d,e,f,g,h); +case 10: +return G__11397__10.call(this,self__,a,b,c,d,e,f,g,h,i); +case 11: +return G__11397__11.call(this,self__,a,b,c,d,e,f,g,h,i,j); +case 12: +return G__11397__12.call(this,self__,a,b,c,d,e,f,g,h,i,j,k); +case 13: +return G__11397__13.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l); +case 14: +return G__11397__14.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m); +case 15: +return G__11397__15.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n); +case 16: +return G__11397__16.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o); +case 17: +return G__11397__17.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); +case 18: +return G__11397__18.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q); +case 19: +return G__11397__19.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r); +case 20: +return G__11397__20.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s); +case 21: +return G__11397__21.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t); +case 22: +return G__11397__22.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11397.cljs$core$IFn$_invoke$arity$1 = G__11397__1; +G__11397.cljs$core$IFn$_invoke$arity$2 = G__11397__2; +G__11397.cljs$core$IFn$_invoke$arity$3 = G__11397__3; +G__11397.cljs$core$IFn$_invoke$arity$4 = G__11397__4; +G__11397.cljs$core$IFn$_invoke$arity$5 = G__11397__5; +G__11397.cljs$core$IFn$_invoke$arity$6 = G__11397__6; +G__11397.cljs$core$IFn$_invoke$arity$7 = G__11397__7; +G__11397.cljs$core$IFn$_invoke$arity$8 = G__11397__8; +G__11397.cljs$core$IFn$_invoke$arity$9 = G__11397__9; +G__11397.cljs$core$IFn$_invoke$arity$10 = G__11397__10; +G__11397.cljs$core$IFn$_invoke$arity$11 = G__11397__11; +G__11397.cljs$core$IFn$_invoke$arity$12 = G__11397__12; +G__11397.cljs$core$IFn$_invoke$arity$13 = G__11397__13; +G__11397.cljs$core$IFn$_invoke$arity$14 = G__11397__14; +G__11397.cljs$core$IFn$_invoke$arity$15 = G__11397__15; +G__11397.cljs$core$IFn$_invoke$arity$16 = G__11397__16; +G__11397.cljs$core$IFn$_invoke$arity$17 = G__11397__17; +G__11397.cljs$core$IFn$_invoke$arity$18 = G__11397__18; +G__11397.cljs$core$IFn$_invoke$arity$19 = G__11397__19; +G__11397.cljs$core$IFn$_invoke$arity$20 = G__11397__20; +G__11397.cljs$core$IFn$_invoke$arity$21 = G__11397__21; +G__11397.cljs$core$IFn$_invoke$arity$22 = G__11397__22; +return G__11397; +})() +; + +cljs.core.MetaFn.prototype.apply = (function (self__,args11396){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args11396))); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$0 = (function (){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$0 ? self__.afn.cljs$core$IFn$_invoke$arity$0() : self__.afn.call(null)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$1 = (function (a){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$1 ? self__.afn.cljs$core$IFn$_invoke$arity$1(a) : self__.afn.call(null,a)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$2 = (function (a,b){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$2 ? self__.afn.cljs$core$IFn$_invoke$arity$2(a,b) : self__.afn.call(null,a,b)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$3 = (function (a,b,c){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$3 ? self__.afn.cljs$core$IFn$_invoke$arity$3(a,b,c) : self__.afn.call(null,a,b,c)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$4 = (function (a,b,c,d){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$4 ? self__.afn.cljs$core$IFn$_invoke$arity$4(a,b,c,d) : self__.afn.call(null,a,b,c,d)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$5 = (function (a,b,c,d,e){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$5 ? self__.afn.cljs$core$IFn$_invoke$arity$5(a,b,c,d,e) : self__.afn.call(null,a,b,c,d,e)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$6 = (function (a,b,c,d,e,f){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$6 ? self__.afn.cljs$core$IFn$_invoke$arity$6(a,b,c,d,e,f) : self__.afn.call(null,a,b,c,d,e,f)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$7 = (function (a,b,c,d,e,f,g){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$7 ? self__.afn.cljs$core$IFn$_invoke$arity$7(a,b,c,d,e,f,g) : self__.afn.call(null,a,b,c,d,e,f,g)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$8 = (function (a,b,c,d,e,f,g,h){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$8 ? self__.afn.cljs$core$IFn$_invoke$arity$8(a,b,c,d,e,f,g,h) : self__.afn.call(null,a,b,c,d,e,f,g,h)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$9 = (function (a,b,c,d,e,f,g,h,i){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$9 ? self__.afn.cljs$core$IFn$_invoke$arity$9(a,b,c,d,e,f,g,h,i) : self__.afn.call(null,a,b,c,d,e,f,g,h,i)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$10 = (function (a,b,c,d,e,f,g,h,i,j){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$10 ? self__.afn.cljs$core$IFn$_invoke$arity$10(a,b,c,d,e,f,g,h,i,j) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$11 = (function (a,b,c,d,e,f,g,h,i,j,k){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$11 ? self__.afn.cljs$core$IFn$_invoke$arity$11(a,b,c,d,e,f,g,h,i,j,k) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$12 = (function (a,b,c,d,e,f,g,h,i,j,k,l){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$12 ? self__.afn.cljs$core$IFn$_invoke$arity$12(a,b,c,d,e,f,g,h,i,j,k,l) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$13 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$13 ? self__.afn.cljs$core$IFn$_invoke$arity$13(a,b,c,d,e,f,g,h,i,j,k,l,m) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$14 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$14 ? self__.afn.cljs$core$IFn$_invoke$arity$14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$15 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$15 ? self__.afn.cljs$core$IFn$_invoke$arity$15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$16 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$16 ? self__.afn.cljs$core$IFn$_invoke$arity$16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$17 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$17 ? self__.afn.cljs$core$IFn$_invoke$arity$17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$18 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$18 ? self__.afn.cljs$core$IFn$_invoke$arity$18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$19 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$19 ? self__.afn.cljs$core$IFn$_invoke$arity$19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$20 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){ +var self__ = this; +var _ = this; +return (self__.afn.cljs$core$IFn$_invoke$arity$20 ? self__.afn.cljs$core$IFn$_invoke$arity$20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : self__.afn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +}); + +cljs.core.MetaFn.prototype.cljs$core$IFn$_invoke$arity$21 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +var self__ = this; +var _ = this; +return (cljs.core.apply.cljs$core$IFn$_invoke$arity$22 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$22(self__.afn,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest) : cljs.core.apply.call(null,self__.afn,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest)); +}); + +cljs.core.MetaFn.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$afn,cljs.core.cst$sym$meta], null); +}); + +cljs.core.MetaFn.cljs$lang$type = true; + +cljs.core.MetaFn.cljs$lang$ctorStr = "cljs.core/MetaFn"; + +cljs.core.MetaFn.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/MetaFn"); +}); + +cljs.core.__GT_MetaFn = (function cljs$core$__GT_MetaFn(afn,meta){ +return (new cljs.core.MetaFn(afn,meta)); +}); + +/** + * Returns an object of the same type and value as obj, with + * map m as its metadata. + */ +cljs.core.with_meta = (function cljs$core$with_meta(o,meta){ +if(goog.isFunction(o)){ +return (new cljs.core.MetaFn(o,meta)); +} else { +if((o == null)){ +return null; +} else { +return cljs.core._with_meta(o,meta); +} +} +}); +/** + * Returns the metadata of obj, returns nil if there is no metadata. + */ +cljs.core.meta = (function cljs$core$meta(o){ +if((function (){var and__7948__auto__ = !((o == null)); +if(and__7948__auto__){ +if(!((o == null))){ +if(((o.cljs$lang$protocol_mask$partition0$ & (131072))) || ((cljs.core.PROTOCOL_SENTINEL === o.cljs$core$IMeta$))){ +return true; +} else { +if((!o.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IMeta,o); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IMeta,o); +} +} else { +return and__7948__auto__; +} +})()){ +return cljs.core._meta(o); +} else { +return null; +} +}); +/** + * For a list or queue, same as first, for a vector, same as, but much + * more efficient than, last. If the collection is empty, returns nil. + */ +cljs.core.peek = (function cljs$core$peek(coll){ +if((coll == null)){ +return null; +} else { +return cljs.core._peek(coll); +} +}); +/** + * For a list or queue, returns a new list/queue without the first + * item, for a vector, returns a new vector without the last item. + * Note - not the same as next/butlast. + */ +cljs.core.pop = (function cljs$core$pop(coll){ +if((coll == null)){ +return null; +} else { +return cljs.core._pop(coll); +} +}); +/** + * disj[oin]. Returns a new set of the same (hashed/sorted) type, that + * does not contain key(s). + */ +cljs.core.disj = (function cljs$core$disj(var_args){ +var args11402 = []; +var len__9181__auto___11408 = arguments.length; +var i__9182__auto___11409 = (0); +while(true){ +if((i__9182__auto___11409 < len__9181__auto___11408)){ +args11402.push((arguments[i__9182__auto___11409])); + +var G__11410 = (i__9182__auto___11409 + (1)); +i__9182__auto___11409 = G__11410; +continue; +} else { +} +break; +} + +var G__11407 = args11402.length; +switch (G__11407) { +case 1: +return cljs.core.disj.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.disj.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11402.slice((2)),(0),null)); +return cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.disj.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +return coll; +}); + +cljs.core.disj.cljs$core$IFn$_invoke$arity$2 = (function (coll,k){ +if((coll == null)){ +return null; +} else { +return cljs.core._disjoin(coll,k); +} +}); + +cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic = (function (coll,k,ks){ +while(true){ +if((coll == null)){ +return null; +} else { +var ret = cljs.core.disj.cljs$core$IFn$_invoke$arity$2(coll,k); +if(cljs.core.truth_(ks)){ +var G__11412 = ret; +var G__11413 = cljs.core.first(ks); +var G__11414 = cljs.core.next(ks); +coll = G__11412; +k = G__11413; +ks = G__11414; +continue; +} else { +return ret; +} +} +break; +} +}); + +cljs.core.disj.cljs$lang$applyTo = (function (seq11403){ +var G__11404 = cljs.core.first(seq11403); +var seq11403__$1 = cljs.core.next(seq11403); +var G__11405 = cljs.core.first(seq11403__$1); +var seq11403__$2 = cljs.core.next(seq11403__$1); +return cljs.core.disj.cljs$core$IFn$_invoke$arity$variadic(G__11404,G__11405,seq11403__$2); +}); + +cljs.core.disj.cljs$lang$maxFixedArity = (2); + +/** + * Returns true if coll has no items - same as (not (seq coll)). + * Please use the idiom (seq x) rather than (not (empty? x)) + */ +cljs.core.empty_QMARK_ = (function cljs$core$empty_QMARK_(coll){ +return ((coll == null)) || (cljs.core.not(cljs.core.seq(coll))); +}); +/** + * Returns true if x satisfies ICollection + */ +cljs.core.coll_QMARK_ = (function cljs$core$coll_QMARK_(x){ +if((x == null)){ +return false; +} else { +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (8))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$ICollection$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.ICollection,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.ICollection,x); +} +} +}); +/** + * Returns true if x satisfies ISet + */ +cljs.core.set_QMARK_ = (function cljs$core$set_QMARK_(x){ +if((x == null)){ +return false; +} else { +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (4096))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$ISet$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.ISet,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.ISet,x); +} +} +}); +/** + * Returns true if coll implements Associative + */ +cljs.core.associative_QMARK_ = (function cljs$core$associative_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (512))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IAssociative$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IAssociative,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IAssociative,x); +} +}); +/** + * Returns true if coll implements IFind + */ +cljs.core.ifind_QMARK_ = (function cljs$core$ifind_QMARK_(x){ +if(!((x == null))){ +if((false) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IFind$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IFind,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IFind,x); +} +}); +/** + * Returns true if coll satisfies ISequential + */ +cljs.core.sequential_QMARK_ = (function cljs$core$sequential_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (16777216))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$ISequential$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.ISequential,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.ISequential,x); +} +}); +/** + * Returns true if coll satisfies ISorted + */ +cljs.core.sorted_QMARK_ = (function cljs$core$sorted_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (268435456))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$ISorted$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.ISorted,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.ISorted,x); +} +}); +/** + * Returns true if coll satisfies IReduce + */ +cljs.core.reduceable_QMARK_ = (function cljs$core$reduceable_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (524288))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IReduce$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IReduce,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IReduce,x); +} +}); +/** + * Return true if x satisfies IMap + */ +cljs.core.map_QMARK_ = (function cljs$core$map_QMARK_(x){ +if((x == null)){ +return false; +} else { +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (1024))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IMap$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IMap,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IMap,x); +} +} +}); +/** + * Return true if x satisfies IRecord + */ +cljs.core.record_QMARK_ = (function cljs$core$record_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (67108864))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IRecord$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IRecord,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IRecord,x); +} +}); +/** + * Return true if x satisfies IVector + */ +cljs.core.vector_QMARK_ = (function cljs$core$vector_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (16384))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IVector$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IVector,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IVector,x); +} +}); + +/** + * Return true if x is satisfies IChunkedSeq. + */ +cljs.core.chunked_seq_QMARK_ = (function cljs$core$chunked_seq_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition1$ & (512))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IChunkedSeq$))){ +return true; +} else { +return false; +} +} else { +return false; +} +}); +/** + * Create JavaSript object from an even number arguments representing + * interleaved keys and values. + */ +cljs.core.js_obj = (function cljs$core$js_obj(var_args){ +var args11437 = []; +var len__9181__auto___11443 = arguments.length; +var i__9182__auto___11444 = (0); +while(true){ +if((i__9182__auto___11444 < len__9181__auto___11443)){ +args11437.push((arguments[i__9182__auto___11444])); + +var G__11445 = (i__9182__auto___11444 + (1)); +i__9182__auto___11444 = G__11445; +continue; +} else { +} +break; +} + +var G__11440 = args11437.length; +switch (G__11440) { +case 0: +return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$0(); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11437.slice((0)),(0),null)); +return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic(argseq__9204__auto__); + +} +}); + +cljs.core.js_obj.cljs$core$IFn$_invoke$arity$0 = (function (){ +return {}; +}); + +cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic = (function (keyvals){ +return (cljs.core.apply.cljs$core$IFn$_invoke$arity$2 ? cljs.core.apply.cljs$core$IFn$_invoke$arity$2(goog.object.create,keyvals) : cljs.core.apply.call(null,goog.object.create,keyvals)); +}); + +cljs.core.js_obj.cljs$lang$applyTo = (function (seq11438){ +return cljs.core.js_obj.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq11438)); +}); + +cljs.core.js_obj.cljs$lang$maxFixedArity = (0); + +/** + * Return the JavaScript keys for an object. + */ +cljs.core.js_keys = (function cljs$core$js_keys(obj){ +var keys = []; +var G__11449_11451 = obj; +var G__11450_11452 = ((function (G__11449_11451,keys){ +return (function (val,key,obj__$1){ +return keys.push(key); +});})(G__11449_11451,keys)) +; +goog.object.forEach(G__11449_11451,G__11450_11452); + +return keys; +}); +/** + * Delete a property from a JavaScript object. + */ +cljs.core.js_delete = (function cljs$core$js_delete(obj,key){ +return delete obj[key]; +}); +cljs.core.array_copy = (function cljs$core$array_copy(from,i,to,j,len){ +var i__$1 = i; +var j__$1 = j; +var len__$1 = len; +while(true){ +if((len__$1 === (0))){ +return to; +} else { +(to[j__$1] = (from[i__$1])); + +var G__11453 = (i__$1 + (1)); +var G__11454 = (j__$1 + (1)); +var G__11455 = (len__$1 - (1)); +i__$1 = G__11453; +j__$1 = G__11454; +len__$1 = G__11455; +continue; +} +break; +} +}); +cljs.core.array_copy_downward = (function cljs$core$array_copy_downward(from,i,to,j,len){ +var i__$1 = (i + (len - (1))); +var j__$1 = (j + (len - (1))); +var len__$1 = len; +while(true){ +if((len__$1 === (0))){ +return to; +} else { +(to[j__$1] = (from[i__$1])); + +var G__11456 = (i__$1 - (1)); +var G__11457 = (j__$1 - (1)); +var G__11458 = (len__$1 - (1)); +i__$1 = G__11456; +j__$1 = G__11457; +len__$1 = G__11458; +continue; +} +break; +} +}); +cljs.core.lookup_sentinel = {}; +/** + * Returns true if x is the value false, false otherwise. + */ +cljs.core.false_QMARK_ = (function cljs$core$false_QMARK_(x){ +return x === false; +}); +/** + * Returns true if x is the value true, false otherwise. + */ +cljs.core.true_QMARK_ = (function cljs$core$true_QMARK_(x){ +return x === true; +}); +/** + * Return true if x is a Boolean + */ +cljs.core.boolean_QMARK_ = (function cljs$core$boolean_QMARK_(x){ +return (x === true) || (x === false); +}); +/** + * Returns true if x identical to the JavaScript undefined value. + */ +cljs.core.undefined_QMARK_ = (function cljs$core$undefined_QMARK_(x){ +return (void 0 === x); +}); +/** + * Return true if s satisfies ISeq + */ +cljs.core.seq_QMARK_ = (function cljs$core$seq_QMARK_(s){ +if((s == null)){ +return false; +} else { +if(!((s == null))){ +if(((s.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === s.cljs$core$ISeq$))){ +return true; +} else { +if((!s.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.ISeq,s); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.ISeq,s); +} +} +}); +/** + * Return true if the seq function is supported for s + */ +cljs.core.seqable_QMARK_ = (function cljs$core$seqable_QMARK_(s){ +var or__7960__auto__ = ((!((s == null)))?((((s.cljs$lang$protocol_mask$partition0$ & (8388608))) || ((cljs.core.PROTOCOL_SENTINEL === s.cljs$core$ISeqable$)))?true:(((!s.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.ISeqable,s):false)):cljs.core.native_satisfies_QMARK_(cljs.core.ISeqable,s)); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return (cljs.core.array_QMARK_(s)) || (typeof s === 'string'); +} +}); +/** + * Coerce to boolean + */ +cljs.core.boolean$ = (function cljs$core$boolean(x){ +if((x == null)){ +return false; +} else { +if(x === false){ +return false; +} else { +return true; + +} +} +}); +/** + * Returns true if f returns true for fn? or satisfies IFn. + */ +cljs.core.ifn_QMARK_ = (function cljs$core$ifn_QMARK_(f){ +var or__7960__auto__ = cljs.core.fn_QMARK_(f); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +if(!((f == null))){ +if(((f.cljs$lang$protocol_mask$partition0$ & (1))) || ((cljs.core.PROTOCOL_SENTINEL === f.cljs$core$IFn$))){ +return true; +} else { +if((!f.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IFn,f); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IFn,f); +} +} +}); +/** + * Returns true if n is a JavaScript number with no decimal part. + */ +cljs.core.integer_QMARK_ = (function cljs$core$integer_QMARK_(n){ +return (typeof n === 'number') && (!(isNaN(n))) && (!((n === Infinity))) && ((parseFloat(n) === parseInt(n,(10)))); +}); +/** + * Return true if x satisfies integer? or is an instance of goog.math.Integer + * or goog.math.Long. + */ +cljs.core.int_QMARK_ = (function cljs$core$int_QMARK_(x){ +return (cljs.core.integer_QMARK_(x)) || ((x instanceof goog.math.Integer)) || ((x instanceof goog.math.Long)); +}); +/** + * Return true if x satisfies int? and is positive. + */ +cljs.core.pos_int_QMARK_ = (function cljs$core$pos_int_QMARK_(x){ +if(cljs.core.integer_QMARK_(x)){ +return (x > (0)); +} else { +if((x instanceof goog.math.Integer)){ +return (cljs.core.not(x.isNegative())) && (cljs.core.not(x.isZero())); +} else { +if((x instanceof goog.math.Long)){ +return (cljs.core.not(x.isNegative())) && (cljs.core.not(x.isZero())); +} else { +return false; + +} +} +} +}); +/** + * Return true if x satisfies int? and is positive. + */ +cljs.core.neg_int_QMARK_ = (function cljs$core$neg_int_QMARK_(x){ +if(cljs.core.integer_QMARK_(x)){ +return (x < (0)); +} else { +if((x instanceof goog.math.Integer)){ +return x.isNegative(); +} else { +if((x instanceof goog.math.Long)){ +return x.isNegative(); +} else { +return false; + +} +} +} +}); +/** + * Return true if x satisfies int? and is a natural integer value. + */ +cljs.core.nat_int_QMARK_ = (function cljs$core$nat_int_QMARK_(x){ +if(cljs.core.integer_QMARK_(x)){ +return (!((x < (0)))) || ((x === (0))); +} else { +if((x instanceof goog.math.Integer)){ +var or__7960__auto__ = cljs.core.not(x.isNegative()); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return x.isZero(); +} +} else { +if((x instanceof goog.math.Long)){ +var or__7960__auto__ = cljs.core.not(x.isNegative()); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return x.isZero(); +} +} else { +return false; + +} +} +} +}); +/** + * Returns true for JavaScript numbers, false otherwise. + */ +cljs.core.float_QMARK_ = (function cljs$core$float_QMARK_(x){ +return typeof x === 'number'; +}); +/** + * Returns true for JavaScript numbers, false otherwise. + */ +cljs.core.double_QMARK_ = (function cljs$core$double_QMARK_(x){ +return typeof x === 'number'; +}); +/** + * Returns true for Infinity and -Infinity values. + */ +cljs.core.infinite_QMARK_ = (function cljs$core$infinite_QMARK_(x){ +return ((x === Number.POSITIVE_INFINITY)) || ((x === Number.NEGATIVE_INFINITY)); +}); +/** + * Returns true if key is present in the given collection, otherwise + * returns false. Note that for numerically indexed collections like + * vectors and arrays, this tests if the numeric key is within the + * range of indexes. 'contains?' operates constant or logarithmic time; + * it will not perform a linear search for a value. See also 'some'. + */ +cljs.core.contains_QMARK_ = (function cljs$core$contains_QMARK_(coll,v){ +if((cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll,v,cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)){ +return false; +} else { +return true; +} +}); +/** + * Returns the map entry for key, or nil if key not present. + */ +cljs.core.find = (function cljs$core$find(coll,k){ +if((!((coll == null))) && (cljs.core.associative_QMARK_(coll)) && (cljs.core.contains_QMARK_(coll,k))){ +if(cljs.core.ifind_QMARK_(coll)){ +return cljs.core._find(coll,k); +} else { +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k,cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll,k)], null); +} +} else { +return null; +} +}); +/** + * Returns true if no two of the arguments are = + */ +cljs.core.distinct_QMARK_ = (function cljs$core$distinct_QMARK_(var_args){ +var args11471 = []; +var len__9181__auto___11477 = arguments.length; +var i__9182__auto___11478 = (0); +while(true){ +if((i__9182__auto___11478 < len__9181__auto___11477)){ +args11471.push((arguments[i__9182__auto___11478])); + +var G__11479 = (i__9182__auto___11478 + (1)); +i__9182__auto___11478 = G__11479; +continue; +} else { +} +break; +} + +var G__11476 = args11471.length; +switch (G__11476) { +case 1: +return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11471.slice((2)),(0),null)); +return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return true; +}); + +cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return !(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x,y)); +}); + +cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +if(!(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x,y))){ +var s = cljs.core.PersistentHashSet.createAsIfByAssoc([x,y]); +var xs = more; +while(true){ +var x__$1 = cljs.core.first(xs); +var etc = cljs.core.next(xs); +if(cljs.core.truth_(xs)){ +if(cljs.core.contains_QMARK_(s,x__$1)){ +return false; +} else { +var G__11481 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(s,x__$1); +var G__11482 = etc; +s = G__11481; +xs = G__11482; +continue; +} +} else { +return true; +} +break; +} +} else { +return false; +} +}); + +cljs.core.distinct_QMARK_.cljs$lang$applyTo = (function (seq11472){ +var G__11473 = cljs.core.first(seq11472); +var seq11472__$1 = cljs.core.next(seq11472); +var G__11474 = cljs.core.first(seq11472__$1); +var seq11472__$2 = cljs.core.next(seq11472__$1); +return cljs.core.distinct_QMARK_.cljs$core$IFn$_invoke$arity$variadic(G__11473,G__11474,seq11472__$2); +}); + +cljs.core.distinct_QMARK_.cljs$lang$maxFixedArity = (2); + +/** + * Comparator. Returns a negative number, zero, or a positive number + * when x is logically 'less than', 'equal to', or 'greater than' + * y. Uses IComparable if available and google.array.defaultCompare for objects + * of the same type and special-cases nil to be less than any other object. + */ +cljs.core.compare = (function cljs$core$compare(x,y){ +if((x === y)){ +return (0); +} else { +if((x == null)){ +return (-1); +} else { +if((y == null)){ +return (1); +} else { +if(typeof x === 'number'){ +if(typeof y === 'number'){ +return goog.array.defaultCompare(x,y); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot compare "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(y)].join(''))); +} +} else { +if(((!((x == null)))?((((x.cljs$lang$protocol_mask$partition1$ & (2048))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IComparable$)))?true:(((!x.cljs$lang$protocol_mask$partition1$))?cljs.core.native_satisfies_QMARK_(cljs.core.IComparable,x):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IComparable,x))){ +return cljs.core._compare(x,y); +} else { +if(((typeof x === 'string') || (cljs.core.array_QMARK_(x)) || (x === true) || (x === false)) && ((cljs.core.type(x) === cljs.core.type(y)))){ +return goog.array.defaultCompare(x,y); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot compare "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(y)].join(''))); +} + +} +} +} +} +} +}); +/** + * Compare indexed collection. + */ +cljs.core.compare_indexed = (function cljs$core$compare_indexed(var_args){ +var args11485 = []; +var len__9181__auto___11488 = arguments.length; +var i__9182__auto___11489 = (0); +while(true){ +if((i__9182__auto___11489 < len__9181__auto___11488)){ +args11485.push((arguments[i__9182__auto___11489])); + +var G__11490 = (i__9182__auto___11489 + (1)); +i__9182__auto___11489 = G__11490; +continue; +} else { +} +break; +} + +var G__11487 = args11485.length; +switch (G__11487) { +case 2: +return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 4: +return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11485.length)].join(''))); + +} +}); + +cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2 = (function (xs,ys){ +var xl = cljs.core.count(xs); +var yl = cljs.core.count(ys); +if((xl < yl)){ +return (-1); +} else { +if((xl > yl)){ +return (1); +} else { +if((xl === (0))){ +return (0); +} else { +return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4(xs,ys,xl,(0)); + +} +} +} +}); + +cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$4 = (function (xs,ys,len,n){ +while(true){ +var d = cljs.core.compare(cljs.core.nth.cljs$core$IFn$_invoke$arity$2(xs,n),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(ys,n)); +if(((d === (0))) && (((n + (1)) < len))){ +var G__11492 = xs; +var G__11493 = ys; +var G__11494 = len; +var G__11495 = (n + (1)); +xs = G__11492; +ys = G__11493; +len = G__11494; +n = G__11495; +continue; +} else { +return d; +} +break; +} +}); + +cljs.core.compare_indexed.cljs$lang$maxFixedArity = 4; + +/** + * Given a fn that might be boolean valued or a comparator, + * return a fn that is a comparator. + */ +cljs.core.fn__GT_comparator = (function cljs$core$fn__GT_comparator(f){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(f,cljs.core.compare)){ +return cljs.core.compare; +} else { +return (function (x,y){ +var r = (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x,y) : f.call(null,x,y)); +if(typeof r === 'number'){ +return r; +} else { +if(cljs.core.truth_(r)){ +return (-1); +} else { +if(cljs.core.truth_((f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(y,x) : f.call(null,y,x)))){ +return (1); +} else { +return (0); +} +} +} +}); +} +}); +/** + * Returns a sorted sequence of the items in coll. Comp can be + * boolean-valued comparison function, or a -/0/+ valued comparator. + * Comp defaults to compare. + */ +cljs.core.sort = (function cljs$core$sort(var_args){ +var args11496 = []; +var len__9181__auto___11501 = arguments.length; +var i__9182__auto___11502 = (0); +while(true){ +if((i__9182__auto___11502 < len__9181__auto___11501)){ +args11496.push((arguments[i__9182__auto___11502])); + +var G__11503 = (i__9182__auto___11502 + (1)); +i__9182__auto___11502 = G__11503; +continue; +} else { +} +break; +} + +var G__11498 = args11496.length; +switch (G__11498) { +case 1: +return cljs.core.sort.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.sort.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11496.length)].join(''))); + +} +}); + +cljs.core.sort.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +return cljs.core.sort.cljs$core$IFn$_invoke$arity$2(cljs.core.compare,coll); +}); + +cljs.core.sort.cljs$core$IFn$_invoke$arity$2 = (function (comp,coll){ +if(cljs.core.seq(coll)){ +var a = (cljs.core.to_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.to_array.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.to_array.call(null,coll)); +var G__11499_11505 = a; +var G__11500_11506 = cljs.core.fn__GT_comparator(comp); +goog.array.stableSort(G__11499_11505,G__11500_11506); + +return cljs.core.seq(a); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.sort.cljs$lang$maxFixedArity = 2; + +/** + * Returns a sorted sequence of the items in coll, where the sort + * order is determined by comparing (keyfn item). Comp can be + * boolean-valued comparison funcion, or a -/0/+ valued comparator. + * Comp defaults to compare. + */ +cljs.core.sort_by = (function cljs$core$sort_by(var_args){ +var args11507 = []; +var len__9181__auto___11510 = arguments.length; +var i__9182__auto___11511 = (0); +while(true){ +if((i__9182__auto___11511 < len__9181__auto___11510)){ +args11507.push((arguments[i__9182__auto___11511])); + +var G__11512 = (i__9182__auto___11511 + (1)); +i__9182__auto___11511 = G__11512; +continue; +} else { +} +break; +} + +var G__11509 = args11507.length; +switch (G__11509) { +case 2: +return cljs.core.sort_by.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.sort_by.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11507.length)].join(''))); + +} +}); + +cljs.core.sort_by.cljs$core$IFn$_invoke$arity$2 = (function (keyfn,coll){ +return cljs.core.sort_by.cljs$core$IFn$_invoke$arity$3(keyfn,cljs.core.compare,coll); +}); + +cljs.core.sort_by.cljs$core$IFn$_invoke$arity$3 = (function (keyfn,comp,coll){ +return cljs.core.sort.cljs$core$IFn$_invoke$arity$2((function (x,y){ +return cljs.core.fn__GT_comparator(comp).call(null,(keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(x) : keyfn.call(null,x)),(keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(y) : keyfn.call(null,y))); +}),coll); +}); + +cljs.core.sort_by.cljs$lang$maxFixedArity = 3; + +cljs.core.seq_reduce = (function cljs$core$seq_reduce(var_args){ +var args11514 = []; +var len__9181__auto___11522 = arguments.length; +var i__9182__auto___11523 = (0); +while(true){ +if((i__9182__auto___11523 < len__9181__auto___11522)){ +args11514.push((arguments[i__9182__auto___11523])); + +var G__11524 = (i__9182__auto___11523 + (1)); +i__9182__auto___11523 = G__11524; +continue; +} else { +} +break; +} + +var G__11516 = args11514.length; +switch (G__11516) { +case 2: +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11514.length)].join(''))); + +} +}); + +cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +var temp__5276__auto__ = cljs.core.seq(coll); +if(temp__5276__auto__){ +var s = temp__5276__auto__; +var G__11517 = f; +var G__11518 = cljs.core.first(s); +var G__11519 = cljs.core.next(s); +return (cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(G__11517,G__11518,G__11519) : cljs.core.reduce.call(null,G__11517,G__11518,G__11519)); +} else { +return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +} +}); + +cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3 = (function (f,val,coll){ +var val__$1 = val; +var coll__$1 = cljs.core.seq(coll); +while(true){ +if(coll__$1){ +var nval = (function (){var G__11520 = val__$1; +var G__11521 = cljs.core.first(coll__$1); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__11520,G__11521) : f.call(null,G__11520,G__11521)); +})(); +if(cljs.core.reduced_QMARK_(nval)){ +return cljs.core.deref(nval); +} else { +var G__11526 = nval; +var G__11527 = cljs.core.next(coll__$1); +val__$1 = G__11526; +coll__$1 = G__11527; +continue; +} +} else { +return val__$1; +} +break; +} +}); + +cljs.core.seq_reduce.cljs$lang$maxFixedArity = 3; + +/** + * Return a random permutation of coll + */ +cljs.core.shuffle = (function cljs$core$shuffle(coll){ +var a = (cljs.core.to_array.cljs$core$IFn$_invoke$arity$1 ? cljs.core.to_array.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.to_array.call(null,coll)); +goog.array.shuffle(a); + +return (cljs.core.vec.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vec.cljs$core$IFn$_invoke$arity$1(a) : cljs.core.vec.call(null,a)); +}); +/** + * f should be a function of 2 arguments. If val is not supplied, + * returns the result of applying f to the first 2 items in coll, then + * applying f to that result and the 3rd item, etc. If coll contains no + * items, f must accept no arguments as well, and reduce returns the + * result of calling f with no arguments. If coll has only 1 item, it + * is returned and f is not called. If val is supplied, returns the + * result of applying f to val and the first item in coll, then + * applying f to that result and the 2nd item, etc. If coll contains no + * items, returns val and f is not called. + */ +cljs.core.reduce = (function cljs$core$reduce(var_args){ +var args11528 = []; +var len__9181__auto___11533 = arguments.length; +var i__9182__auto___11534 = (0); +while(true){ +if((i__9182__auto___11534 < len__9181__auto___11533)){ +args11528.push((arguments[i__9182__auto___11534])); + +var G__11535 = (i__9182__auto___11534 + (1)); +i__9182__auto___11534 = G__11535; +continue; +} else { +} +break; +} + +var G__11530 = args11528.length; +switch (G__11530) { +case 2: +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11528.length)].join(''))); + +} +}); + +cljs.core.reduce.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (524288))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$IReduce$)))?true:false):false)){ +return coll.cljs$core$IReduce$_reduce$arity$2(null,f); +} else { +if(cljs.core.array_QMARK_(coll)){ +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2(coll,f); +} else { +if(typeof coll === 'string'){ +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$2(coll,f); +} else { +if(cljs.core.native_satisfies_QMARK_(cljs.core.IReduce,coll)){ +return cljs.core._reduce.cljs$core$IFn$_invoke$arity$2(coll,f); +} else { +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll); + +} +} +} +} +}); + +cljs.core.reduce.cljs$core$IFn$_invoke$arity$3 = (function (f,val,coll){ +if(((!((coll == null)))?((((coll.cljs$lang$protocol_mask$partition0$ & (524288))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$IReduce$)))?true:false):false)){ +return coll.cljs$core$IReduce$_reduce$arity$3(null,f,val); +} else { +if(cljs.core.array_QMARK_(coll)){ +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3(coll,f,val); +} else { +if(typeof coll === 'string'){ +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$3(coll,f,val); +} else { +if(cljs.core.native_satisfies_QMARK_(cljs.core.IReduce,coll)){ +return cljs.core._reduce.cljs$core$IFn$_invoke$arity$3(coll,f,val); +} else { +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,val,coll); + +} +} +} +} +}); + +cljs.core.reduce.cljs$lang$maxFixedArity = 3; + +/** + * Reduces an associative collection. f should be a function of 3 + * arguments. Returns the result of applying f to init, the first key + * and the first value in coll, then applying f to that result and the + * 2nd key and value, etc. If coll contains no entries, returns init + * and f is not called. Note that reduce-kv is supported on vectors, + * where the keys will be the ordinals. + */ +cljs.core.reduce_kv = (function cljs$core$reduce_kv(f,init,coll){ +if(!((coll == null))){ +return cljs.core._kv_reduce(coll,f,init); +} else { +return init; +} +}); +/** + * Returns its argument. + */ +cljs.core.identity = (function cljs$core$identity(x){ +return x; +}); +/** + * Takes a reducing function f of 2 args and returns a fn suitable for + * transduce by adding an arity-1 signature that calls cf (default - + * identity) on the result argument. + */ +cljs.core.completing = (function cljs$core$completing(var_args){ +var args11537 = []; +var len__9181__auto___11540 = arguments.length; +var i__9182__auto___11541 = (0); +while(true){ +if((i__9182__auto___11541 < len__9181__auto___11540)){ +args11537.push((arguments[i__9182__auto___11541])); + +var G__11542 = (i__9182__auto___11541 + (1)); +i__9182__auto___11541 = G__11542; +continue; +} else { +} +break; +} + +var G__11539 = args11537.length; +switch (G__11539) { +case 1: +return cljs.core.completing.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.completing.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11537.length)].join(''))); + +} +}); + +cljs.core.completing.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return cljs.core.completing.cljs$core$IFn$_invoke$arity$2(f,cljs.core.identity); +}); + +cljs.core.completing.cljs$core$IFn$_invoke$arity$2 = (function (f,cf){ +return (function() { +var G__11544 = null; +var G__11544__0 = (function (){ +return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +}); +var G__11544__1 = (function (x){ +return (cf.cljs$core$IFn$_invoke$arity$1 ? cf.cljs$core$IFn$_invoke$arity$1(x) : cf.call(null,x)); +}); +var G__11544__2 = (function (x,y){ +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x,y) : f.call(null,x,y)); +}); +G__11544 = function(x,y){ +switch(arguments.length){ +case 0: +return G__11544__0.call(this); +case 1: +return G__11544__1.call(this,x); +case 2: +return G__11544__2.call(this,x,y); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11544.cljs$core$IFn$_invoke$arity$0 = G__11544__0; +G__11544.cljs$core$IFn$_invoke$arity$1 = G__11544__1; +G__11544.cljs$core$IFn$_invoke$arity$2 = G__11544__2; +return G__11544; +})() +}); + +cljs.core.completing.cljs$lang$maxFixedArity = 2; + +/** + * reduce with a transformation of f (xf). If init is not + * supplied, (f) will be called to produce it. f should be a reducing + * step function that accepts both 1 and 2 arguments, if it accepts + * only 2 you can add the arity-1 with 'completing'. Returns the result + * of applying (the transformed) xf to init and the first item in coll, + * then applying xf to that result and the 2nd item, etc. If coll + * contains no items, returns init and f is not called. Note that + * certain transforms may inject or skip items. + */ +cljs.core.transduce = (function cljs$core$transduce(var_args){ +var args11545 = []; +var len__9181__auto___11548 = arguments.length; +var i__9182__auto___11549 = (0); +while(true){ +if((i__9182__auto___11549 < len__9181__auto___11548)){ +args11545.push((arguments[i__9182__auto___11549])); + +var G__11550 = (i__9182__auto___11549 + (1)); +i__9182__auto___11549 = G__11550; +continue; +} else { +} +break; +} + +var G__11547 = args11545.length; +switch (G__11547) { +case 3: +return cljs.core.transduce.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11545.length)].join(''))); + +} +}); + +cljs.core.transduce.cljs$core$IFn$_invoke$arity$3 = (function (xform,f,coll){ +return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(xform,f,(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)),coll); +}); + +cljs.core.transduce.cljs$core$IFn$_invoke$arity$4 = (function (xform,f,init,coll){ +var f__$1 = (xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(f) : xform.call(null,f)); +var ret = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(f__$1,init,coll); +return (f__$1.cljs$core$IFn$_invoke$arity$1 ? f__$1.cljs$core$IFn$_invoke$arity$1(ret) : f__$1.call(null,ret)); +}); + +cljs.core.transduce.cljs$lang$maxFixedArity = 4; + +/** + * Returns the sum of nums. (+) returns 0. + */ +cljs.core._PLUS_ = (function cljs$core$_PLUS_(var_args){ +var args11552 = []; +var len__9181__auto___11558 = arguments.length; +var i__9182__auto___11559 = (0); +while(true){ +if((i__9182__auto___11559 < len__9181__auto___11558)){ +args11552.push((arguments[i__9182__auto___11559])); + +var G__11560 = (i__9182__auto___11559 + (1)); +i__9182__auto___11559 = G__11560; +continue; +} else { +} +break; +} + +var G__11557 = args11552.length; +switch (G__11557) { +case 0: +return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11552.slice((2)),(0),null)); +return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (0); +}); + +cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x + y); +}); + +cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._PLUS_,(x + y),more); +}); + +cljs.core._PLUS_.cljs$lang$applyTo = (function (seq11553){ +var G__11554 = cljs.core.first(seq11553); +var seq11553__$1 = cljs.core.next(seq11553); +var G__11555 = cljs.core.first(seq11553__$1); +var seq11553__$2 = cljs.core.next(seq11553__$1); +return cljs.core._PLUS_.cljs$core$IFn$_invoke$arity$variadic(G__11554,G__11555,seq11553__$2); +}); + +cljs.core._PLUS_.cljs$lang$maxFixedArity = (2); + +/** + * If no ys are supplied, returns the negation of x, else subtracts + * the ys from x and returns the result. + */ +cljs.core._ = (function cljs$core$_(var_args){ +var args11562 = []; +var len__9181__auto___11568 = arguments.length; +var i__9182__auto___11569 = (0); +while(true){ +if((i__9182__auto___11569 < len__9181__auto___11568)){ +args11562.push((arguments[i__9182__auto___11569])); + +var G__11570 = (i__9182__auto___11569 + (1)); +i__9182__auto___11569 = G__11570; +continue; +} else { +} +break; +} + +var G__11567 = args11562.length; +switch (G__11567) { +case 1: +return cljs.core._.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11562.slice((2)),(0),null)); +return cljs.core._.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return (- x); +}); + +cljs.core._.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x - y); +}); + +cljs.core._.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._,(x - y),more); +}); + +cljs.core._.cljs$lang$applyTo = (function (seq11563){ +var G__11564 = cljs.core.first(seq11563); +var seq11563__$1 = cljs.core.next(seq11563); +var G__11565 = cljs.core.first(seq11563__$1); +var seq11563__$2 = cljs.core.next(seq11563__$1); +return cljs.core._.cljs$core$IFn$_invoke$arity$variadic(G__11564,G__11565,seq11563__$2); +}); + +cljs.core._.cljs$lang$maxFixedArity = (2); + +/** + * Returns the product of nums. (*) returns 1. + */ +cljs.core._STAR_ = (function cljs$core$_STAR_(var_args){ +var args11572 = []; +var len__9181__auto___11578 = arguments.length; +var i__9182__auto___11579 = (0); +while(true){ +if((i__9182__auto___11579 < len__9181__auto___11578)){ +args11572.push((arguments[i__9182__auto___11579])); + +var G__11580 = (i__9182__auto___11579 + (1)); +i__9182__auto___11579 = G__11580; +continue; +} else { +} +break; +} + +var G__11577 = args11572.length; +switch (G__11577) { +case 0: +return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11572.slice((2)),(0),null)); +return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._STAR_.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (1); +}); + +cljs.core._STAR_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core._STAR_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x * y); +}); + +cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._STAR_,(x * y),more); +}); + +cljs.core._STAR_.cljs$lang$applyTo = (function (seq11573){ +var G__11574 = cljs.core.first(seq11573); +var seq11573__$1 = cljs.core.next(seq11573); +var G__11575 = cljs.core.first(seq11573__$1); +var seq11573__$2 = cljs.core.next(seq11573__$1); +return cljs.core._STAR_.cljs$core$IFn$_invoke$arity$variadic(G__11574,G__11575,seq11573__$2); +}); + +cljs.core._STAR_.cljs$lang$maxFixedArity = (2); + +/** + * If no denominators are supplied, returns 1/numerator, + * else returns numerator divided by all of the denominators. + */ +cljs.core._SLASH_ = (function cljs$core$_SLASH_(var_args){ +var args11582 = []; +var len__9181__auto___11588 = arguments.length; +var i__9182__auto___11589 = (0); +while(true){ +if((i__9182__auto___11589 < len__9181__auto___11588)){ +args11582.push((arguments[i__9182__auto___11589])); + +var G__11590 = (i__9182__auto___11589 + (1)); +i__9182__auto___11589 = G__11590; +continue; +} else { +} +break; +} + +var G__11587 = args11582.length; +switch (G__11587) { +case 1: +return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11582.slice((2)),(0),null)); +return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return ((1) / x); +}); + +cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x / y); +}); + +cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._SLASH_,(x / y),more); +}); + +cljs.core._SLASH_.cljs$lang$applyTo = (function (seq11583){ +var G__11584 = cljs.core.first(seq11583); +var seq11583__$1 = cljs.core.next(seq11583); +var G__11585 = cljs.core.first(seq11583__$1); +var seq11583__$2 = cljs.core.next(seq11583__$1); +return cljs.core._SLASH_.cljs$core$IFn$_invoke$arity$variadic(G__11584,G__11585,seq11583__$2); +}); + +cljs.core._SLASH_.cljs$lang$maxFixedArity = (2); + +/** + * Returns non-nil if nums are in monotonically increasing order, + * otherwise false. + */ +cljs.core._LT_ = (function cljs$core$_LT_(var_args){ +var args11592 = []; +var len__9181__auto___11598 = arguments.length; +var i__9182__auto___11599 = (0); +while(true){ +if((i__9182__auto___11599 < len__9181__auto___11598)){ +args11592.push((arguments[i__9182__auto___11599])); + +var G__11600 = (i__9182__auto___11599 + (1)); +i__9182__auto___11599 = G__11600; +continue; +} else { +} +break; +} + +var G__11597 = args11592.length; +switch (G__11597) { +case 1: +return cljs.core._LT_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._LT_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11592.slice((2)),(0),null)); +return cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._LT_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return true; +}); + +cljs.core._LT_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x < y); +}); + +cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +while(true){ +if((x < y)){ +if(cljs.core.next(more)){ +var G__11602 = y; +var G__11603 = cljs.core.first(more); +var G__11604 = cljs.core.next(more); +x = G__11602; +y = G__11603; +more = G__11604; +continue; +} else { +return (y < cljs.core.first(more)); +} +} else { +return false; +} +break; +} +}); + +cljs.core._LT_.cljs$lang$applyTo = (function (seq11593){ +var G__11594 = cljs.core.first(seq11593); +var seq11593__$1 = cljs.core.next(seq11593); +var G__11595 = cljs.core.first(seq11593__$1); +var seq11593__$2 = cljs.core.next(seq11593__$1); +return cljs.core._LT_.cljs$core$IFn$_invoke$arity$variadic(G__11594,G__11595,seq11593__$2); +}); + +cljs.core._LT_.cljs$lang$maxFixedArity = (2); + +/** + * Returns non-nil if nums are in monotonically non-decreasing order, + * otherwise false. + */ +cljs.core._LT__EQ_ = (function cljs$core$_LT__EQ_(var_args){ +var args11605 = []; +var len__9181__auto___11611 = arguments.length; +var i__9182__auto___11612 = (0); +while(true){ +if((i__9182__auto___11612 < len__9181__auto___11611)){ +args11605.push((arguments[i__9182__auto___11612])); + +var G__11613 = (i__9182__auto___11612 + (1)); +i__9182__auto___11612 = G__11613; +continue; +} else { +} +break; +} + +var G__11610 = args11605.length; +switch (G__11610) { +case 1: +return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11605.slice((2)),(0),null)); +return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return true; +}); + +cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x <= y); +}); + +cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +while(true){ +if((x <= y)){ +if(cljs.core.next(more)){ +var G__11615 = y; +var G__11616 = cljs.core.first(more); +var G__11617 = cljs.core.next(more); +x = G__11615; +y = G__11616; +more = G__11617; +continue; +} else { +return (y <= cljs.core.first(more)); +} +} else { +return false; +} +break; +} +}); + +cljs.core._LT__EQ_.cljs$lang$applyTo = (function (seq11606){ +var G__11607 = cljs.core.first(seq11606); +var seq11606__$1 = cljs.core.next(seq11606); +var G__11608 = cljs.core.first(seq11606__$1); +var seq11606__$2 = cljs.core.next(seq11606__$1); +return cljs.core._LT__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__11607,G__11608,seq11606__$2); +}); + +cljs.core._LT__EQ_.cljs$lang$maxFixedArity = (2); + +/** + * Returns non-nil if nums are in monotonically decreasing order, + * otherwise false. + */ +cljs.core._GT_ = (function cljs$core$_GT_(var_args){ +var args11618 = []; +var len__9181__auto___11624 = arguments.length; +var i__9182__auto___11625 = (0); +while(true){ +if((i__9182__auto___11625 < len__9181__auto___11624)){ +args11618.push((arguments[i__9182__auto___11625])); + +var G__11626 = (i__9182__auto___11625 + (1)); +i__9182__auto___11625 = G__11626; +continue; +} else { +} +break; +} + +var G__11623 = args11618.length; +switch (G__11623) { +case 1: +return cljs.core._GT_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._GT_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11618.slice((2)),(0),null)); +return cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._GT_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return true; +}); + +cljs.core._GT_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x > y); +}); + +cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +while(true){ +if((x > y)){ +if(cljs.core.next(more)){ +var G__11628 = y; +var G__11629 = cljs.core.first(more); +var G__11630 = cljs.core.next(more); +x = G__11628; +y = G__11629; +more = G__11630; +continue; +} else { +return (y > cljs.core.first(more)); +} +} else { +return false; +} +break; +} +}); + +cljs.core._GT_.cljs$lang$applyTo = (function (seq11619){ +var G__11620 = cljs.core.first(seq11619); +var seq11619__$1 = cljs.core.next(seq11619); +var G__11621 = cljs.core.first(seq11619__$1); +var seq11619__$2 = cljs.core.next(seq11619__$1); +return cljs.core._GT_.cljs$core$IFn$_invoke$arity$variadic(G__11620,G__11621,seq11619__$2); +}); + +cljs.core._GT_.cljs$lang$maxFixedArity = (2); + +/** + * Returns non-nil if nums are in monotonically non-increasing order, + * otherwise false. + */ +cljs.core._GT__EQ_ = (function cljs$core$_GT__EQ_(var_args){ +var args11631 = []; +var len__9181__auto___11637 = arguments.length; +var i__9182__auto___11638 = (0); +while(true){ +if((i__9182__auto___11638 < len__9181__auto___11637)){ +args11631.push((arguments[i__9182__auto___11638])); + +var G__11639 = (i__9182__auto___11638 + (1)); +i__9182__auto___11638 = G__11639; +continue; +} else { +} +break; +} + +var G__11636 = args11631.length; +switch (G__11636) { +case 1: +return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11631.slice((2)),(0),null)); +return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return true; +}); + +cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x >= y); +}); + +cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +while(true){ +if((x >= y)){ +if(cljs.core.next(more)){ +var G__11641 = y; +var G__11642 = cljs.core.first(more); +var G__11643 = cljs.core.next(more); +x = G__11641; +y = G__11642; +more = G__11643; +continue; +} else { +return (y >= cljs.core.first(more)); +} +} else { +return false; +} +break; +} +}); + +cljs.core._GT__EQ_.cljs$lang$applyTo = (function (seq11632){ +var G__11633 = cljs.core.first(seq11632); +var seq11632__$1 = cljs.core.next(seq11632); +var G__11634 = cljs.core.first(seq11632__$1); +var seq11632__$2 = cljs.core.next(seq11632__$1); +return cljs.core._GT__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__11633,G__11634,seq11632__$2); +}); + +cljs.core._GT__EQ_.cljs$lang$maxFixedArity = (2); + +/** + * Returns a number one less than num. + */ +cljs.core.dec = (function cljs$core$dec(x){ +return (x - (1)); +}); +/** + * Returns the greatest of the nums. + */ +cljs.core.max = (function cljs$core$max(var_args){ +var args11644 = []; +var len__9181__auto___11650 = arguments.length; +var i__9182__auto___11651 = (0); +while(true){ +if((i__9182__auto___11651 < len__9181__auto___11650)){ +args11644.push((arguments[i__9182__auto___11651])); + +var G__11652 = (i__9182__auto___11651 + (1)); +i__9182__auto___11651 = G__11652; +continue; +} else { +} +break; +} + +var G__11649 = args11644.length; +switch (G__11649) { +case 1: +return cljs.core.max.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.max.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11644.slice((2)),(0),null)); +return cljs.core.max.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.max.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core.max.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +var x__8298__auto__ = x; +var y__8299__auto__ = y; +return ((x__8298__auto__ > y__8299__auto__) ? x__8298__auto__ : y__8299__auto__); +}); + +cljs.core.max.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.max,(function (){var x__8298__auto__ = x; +var y__8299__auto__ = y; +return ((x__8298__auto__ > y__8299__auto__) ? x__8298__auto__ : y__8299__auto__); +})(),more); +}); + +cljs.core.max.cljs$lang$applyTo = (function (seq11645){ +var G__11646 = cljs.core.first(seq11645); +var seq11645__$1 = cljs.core.next(seq11645); +var G__11647 = cljs.core.first(seq11645__$1); +var seq11645__$2 = cljs.core.next(seq11645__$1); +return cljs.core.max.cljs$core$IFn$_invoke$arity$variadic(G__11646,G__11647,seq11645__$2); +}); + +cljs.core.max.cljs$lang$maxFixedArity = (2); + +/** + * Returns the least of the nums. + */ +cljs.core.min = (function cljs$core$min(var_args){ +var args11654 = []; +var len__9181__auto___11660 = arguments.length; +var i__9182__auto___11661 = (0); +while(true){ +if((i__9182__auto___11661 < len__9181__auto___11660)){ +args11654.push((arguments[i__9182__auto___11661])); + +var G__11662 = (i__9182__auto___11661 + (1)); +i__9182__auto___11661 = G__11662; +continue; +} else { +} +break; +} + +var G__11659 = args11654.length; +switch (G__11659) { +case 1: +return cljs.core.min.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.min.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11654.slice((2)),(0),null)); +return cljs.core.min.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.min.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core.min.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +var x__8305__auto__ = x; +var y__8306__auto__ = y; +return ((x__8305__auto__ < y__8306__auto__) ? x__8305__auto__ : y__8306__auto__); +}); + +cljs.core.min.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.min,(function (){var x__8305__auto__ = x; +var y__8306__auto__ = y; +return ((x__8305__auto__ < y__8306__auto__) ? x__8305__auto__ : y__8306__auto__); +})(),more); +}); + +cljs.core.min.cljs$lang$applyTo = (function (seq11655){ +var G__11656 = cljs.core.first(seq11655); +var seq11655__$1 = cljs.core.next(seq11655); +var G__11657 = cljs.core.first(seq11655__$1); +var seq11655__$2 = cljs.core.next(seq11655__$1); +return cljs.core.min.cljs$core$IFn$_invoke$arity$variadic(G__11656,G__11657,seq11655__$2); +}); + +cljs.core.min.cljs$lang$maxFixedArity = (2); + +cljs.core.byte$ = (function cljs$core$byte(x){ +return x; +}); +/** + * Coerce to char + */ +cljs.core.char$ = (function cljs$core$char(x){ +if(typeof x === 'number'){ +return String.fromCharCode(x); +} else { +if((typeof x === 'string') && ((x.length === (1)))){ +return x; +} else { +throw (new Error("Argument to char must be a character or number")); + +} +} +}); +cljs.core.short$ = (function cljs$core$short(x){ +return x; +}); +cljs.core.float$ = (function cljs$core$float(x){ +return x; +}); +cljs.core.double$ = (function cljs$core$double(x){ +return x; +}); +cljs.core.unchecked_byte = (function cljs$core$unchecked_byte(x){ +return x; +}); +cljs.core.unchecked_char = (function cljs$core$unchecked_char(x){ +return x; +}); +cljs.core.unchecked_short = (function cljs$core$unchecked_short(x){ +return x; +}); +cljs.core.unchecked_float = (function cljs$core$unchecked_float(x){ +return x; +}); +cljs.core.unchecked_double = (function cljs$core$unchecked_double(x){ +return x; +}); +/** + * Returns the sum of nums. (+) returns 0. + */ +cljs.core.unchecked_add = (function cljs$core$unchecked_add(var_args){ +var args11664 = []; +var len__9181__auto___11670 = arguments.length; +var i__9182__auto___11671 = (0); +while(true){ +if((i__9182__auto___11671 < len__9181__auto___11670)){ +args11664.push((arguments[i__9182__auto___11671])); + +var G__11672 = (i__9182__auto___11671 + (1)); +i__9182__auto___11671 = G__11672; +continue; +} else { +} +break; +} + +var G__11669 = args11664.length; +switch (G__11669) { +case 0: +return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11664.slice((2)),(0),null)); +return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (0); +}); + +cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x + y); +}); + +cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_add,(x + y),more); +}); + +cljs.core.unchecked_add.cljs$lang$applyTo = (function (seq11665){ +var G__11666 = cljs.core.first(seq11665); +var seq11665__$1 = cljs.core.next(seq11665); +var G__11667 = cljs.core.first(seq11665__$1); +var seq11665__$2 = cljs.core.next(seq11665__$1); +return cljs.core.unchecked_add.cljs$core$IFn$_invoke$arity$variadic(G__11666,G__11667,seq11665__$2); +}); + +cljs.core.unchecked_add.cljs$lang$maxFixedArity = (2); + +/** + * Returns the sum of nums. (+) returns 0. + */ +cljs.core.unchecked_add_int = (function cljs$core$unchecked_add_int(var_args){ +var args11674 = []; +var len__9181__auto___11680 = arguments.length; +var i__9182__auto___11681 = (0); +while(true){ +if((i__9182__auto___11681 < len__9181__auto___11680)){ +args11674.push((arguments[i__9182__auto___11681])); + +var G__11682 = (i__9182__auto___11681 + (1)); +i__9182__auto___11681 = G__11682; +continue; +} else { +} +break; +} + +var G__11679 = args11674.length; +switch (G__11679) { +case 0: +return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11674.slice((2)),(0),null)); +return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (0); +}); + +cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x + y); +}); + +cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_add_int,(x + y),more); +}); + +cljs.core.unchecked_add_int.cljs$lang$applyTo = (function (seq11675){ +var G__11676 = cljs.core.first(seq11675); +var seq11675__$1 = cljs.core.next(seq11675); +var G__11677 = cljs.core.first(seq11675__$1); +var seq11675__$2 = cljs.core.next(seq11675__$1); +return cljs.core.unchecked_add_int.cljs$core$IFn$_invoke$arity$variadic(G__11676,G__11677,seq11675__$2); +}); + +cljs.core.unchecked_add_int.cljs$lang$maxFixedArity = (2); + +/** + * Returns a number one less than x, an int. + */ +cljs.core.unchecked_dec = (function cljs$core$unchecked_dec(x){ +return (x - (1)); +}); +/** + * Returns a number one less than x, an int. + */ +cljs.core.unchecked_dec_int = (function cljs$core$unchecked_dec_int(x){ +return (x - (1)); +}); +/** + * If no denominators are supplied, returns 1/numerator, + * else returns numerator divided by all of the denominators. + */ +cljs.core.unchecked_divide_int = (function cljs$core$unchecked_divide_int(var_args){ +var args11684 = []; +var len__9181__auto___11690 = arguments.length; +var i__9182__auto___11691 = (0); +while(true){ +if((i__9182__auto___11691 < len__9181__auto___11690)){ +args11684.push((arguments[i__9182__auto___11691])); + +var G__11692 = (i__9182__auto___11691 + (1)); +i__9182__auto___11691 = G__11692; +continue; +} else { +} +break; +} + +var G__11689 = args11684.length; +switch (G__11689) { +case 1: +return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11684.slice((2)),(0),null)); +return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return ((1) / x); +}); + +cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x / y); +}); + +cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_divide_int,(x / y),more); +}); + +cljs.core.unchecked_divide_int.cljs$lang$applyTo = (function (seq11685){ +var G__11686 = cljs.core.first(seq11685); +var seq11685__$1 = cljs.core.next(seq11685); +var G__11687 = cljs.core.first(seq11685__$1); +var seq11685__$2 = cljs.core.next(seq11685__$1); +return cljs.core.unchecked_divide_int.cljs$core$IFn$_invoke$arity$variadic(G__11686,G__11687,seq11685__$2); +}); + +cljs.core.unchecked_divide_int.cljs$lang$maxFixedArity = (2); + +cljs.core.unchecked_inc = (function cljs$core$unchecked_inc(x){ +return (x + (1)); +}); +cljs.core.unchecked_inc_int = (function cljs$core$unchecked_inc_int(x){ +return (x + (1)); +}); +/** + * Returns the product of nums. (*) returns 1. + */ +cljs.core.unchecked_multiply = (function cljs$core$unchecked_multiply(var_args){ +var args11694 = []; +var len__9181__auto___11700 = arguments.length; +var i__9182__auto___11701 = (0); +while(true){ +if((i__9182__auto___11701 < len__9181__auto___11700)){ +args11694.push((arguments[i__9182__auto___11701])); + +var G__11702 = (i__9182__auto___11701 + (1)); +i__9182__auto___11701 = G__11702; +continue; +} else { +} +break; +} + +var G__11699 = args11694.length; +switch (G__11699) { +case 0: +return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11694.slice((2)),(0),null)); +return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (1); +}); + +cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x * y); +}); + +cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_multiply,(x * y),more); +}); + +cljs.core.unchecked_multiply.cljs$lang$applyTo = (function (seq11695){ +var G__11696 = cljs.core.first(seq11695); +var seq11695__$1 = cljs.core.next(seq11695); +var G__11697 = cljs.core.first(seq11695__$1); +var seq11695__$2 = cljs.core.next(seq11695__$1); +return cljs.core.unchecked_multiply.cljs$core$IFn$_invoke$arity$variadic(G__11696,G__11697,seq11695__$2); +}); + +cljs.core.unchecked_multiply.cljs$lang$maxFixedArity = (2); + +/** + * Returns the product of nums. (*) returns 1. + */ +cljs.core.unchecked_multiply_int = (function cljs$core$unchecked_multiply_int(var_args){ +var args11704 = []; +var len__9181__auto___11710 = arguments.length; +var i__9182__auto___11711 = (0); +while(true){ +if((i__9182__auto___11711 < len__9181__auto___11710)){ +args11704.push((arguments[i__9182__auto___11711])); + +var G__11712 = (i__9182__auto___11711 + (1)); +i__9182__auto___11711 = G__11712; +continue; +} else { +} +break; +} + +var G__11709 = args11704.length; +switch (G__11709) { +case 0: +return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11704.slice((2)),(0),null)); +return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (1); +}); + +cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return x; +}); + +cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x * y); +}); + +cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_multiply_int,(x * y),more); +}); + +cljs.core.unchecked_multiply_int.cljs$lang$applyTo = (function (seq11705){ +var G__11706 = cljs.core.first(seq11705); +var seq11705__$1 = cljs.core.next(seq11705); +var G__11707 = cljs.core.first(seq11705__$1); +var seq11705__$2 = cljs.core.next(seq11705__$1); +return cljs.core.unchecked_multiply_int.cljs$core$IFn$_invoke$arity$variadic(G__11706,G__11707,seq11705__$2); +}); + +cljs.core.unchecked_multiply_int.cljs$lang$maxFixedArity = (2); + +cljs.core.unchecked_negate = (function cljs$core$unchecked_negate(x){ +return (- x); +}); +cljs.core.unchecked_negate_int = (function cljs$core$unchecked_negate_int(x){ +return (- x); +}); +cljs.core.unchecked_remainder_int = (function cljs$core$unchecked_remainder_int(x,n){ +return (cljs.core.mod.cljs$core$IFn$_invoke$arity$2 ? cljs.core.mod.cljs$core$IFn$_invoke$arity$2(x,n) : cljs.core.mod.call(null,x,n)); +}); +/** + * If no ys are supplied, returns the negation of x, else subtracts + * the ys from x and returns the result. + */ +cljs.core.unchecked_subtract = (function cljs$core$unchecked_subtract(var_args){ +var args11714 = []; +var len__9181__auto___11720 = arguments.length; +var i__9182__auto___11721 = (0); +while(true){ +if((i__9182__auto___11721 < len__9181__auto___11720)){ +args11714.push((arguments[i__9182__auto___11721])); + +var G__11722 = (i__9182__auto___11721 + (1)); +i__9182__auto___11721 = G__11722; +continue; +} else { +} +break; +} + +var G__11719 = args11714.length; +switch (G__11719) { +case 1: +return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11714.slice((2)),(0),null)); +return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return (- x); +}); + +cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x - y); +}); + +cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_subtract,(x - y),more); +}); + +cljs.core.unchecked_subtract.cljs$lang$applyTo = (function (seq11715){ +var G__11716 = cljs.core.first(seq11715); +var seq11715__$1 = cljs.core.next(seq11715); +var G__11717 = cljs.core.first(seq11715__$1); +var seq11715__$2 = cljs.core.next(seq11715__$1); +return cljs.core.unchecked_subtract.cljs$core$IFn$_invoke$arity$variadic(G__11716,G__11717,seq11715__$2); +}); + +cljs.core.unchecked_subtract.cljs$lang$maxFixedArity = (2); + +/** + * If no ys are supplied, returns the negation of x, else subtracts + * the ys from x and returns the result. + */ +cljs.core.unchecked_subtract_int = (function cljs$core$unchecked_subtract_int(var_args){ +var args11724 = []; +var len__9181__auto___11730 = arguments.length; +var i__9182__auto___11731 = (0); +while(true){ +if((i__9182__auto___11731 < len__9181__auto___11730)){ +args11724.push((arguments[i__9182__auto___11731])); + +var G__11732 = (i__9182__auto___11731 + (1)); +i__9182__auto___11731 = G__11732; +continue; +} else { +} +break; +} + +var G__11729 = args11724.length; +switch (G__11729) { +case 1: +return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11724.slice((2)),(0),null)); +return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return (- x); +}); + +cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x - y); +}); + +cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.unchecked_subtract_int,(x - y),more); +}); + +cljs.core.unchecked_subtract_int.cljs$lang$applyTo = (function (seq11725){ +var G__11726 = cljs.core.first(seq11725); +var seq11725__$1 = cljs.core.next(seq11725); +var G__11727 = cljs.core.first(seq11725__$1); +var seq11725__$2 = cljs.core.next(seq11725__$1); +return cljs.core.unchecked_subtract_int.cljs$core$IFn$_invoke$arity$variadic(G__11726,G__11727,seq11725__$2); +}); + +cljs.core.unchecked_subtract_int.cljs$lang$maxFixedArity = (2); + +cljs.core.fix = (function cljs$core$fix(q){ +if((q >= (0))){ +return Math.floor(q); +} else { +return Math.ceil(q); +} +}); +/** + * Coerce to int by stripping decimal places. + */ +cljs.core.int$ = (function cljs$core$int(x){ +return (x | (0)); +}); +/** + * Coerce to int by stripping decimal places. + */ +cljs.core.unchecked_int = (function cljs$core$unchecked_int(x){ +return cljs.core.fix(x); +}); +/** + * Coerce to long by stripping decimal places. Identical to `int'. + */ +cljs.core.long$ = (function cljs$core$long(x){ +return cljs.core.fix(x); +}); +/** + * Coerce to long by stripping decimal places. Identical to `int'. + */ +cljs.core.unchecked_long = (function cljs$core$unchecked_long(x){ +return cljs.core.fix(x); +}); +cljs.core.booleans = (function cljs$core$booleans(x){ +return x; +}); +cljs.core.bytes = (function cljs$core$bytes(x){ +return x; +}); +cljs.core.chars = (function cljs$core$chars(x){ +return x; +}); +cljs.core.shorts = (function cljs$core$shorts(x){ +return x; +}); +cljs.core.ints = (function cljs$core$ints(x){ +return x; +}); +cljs.core.floats = (function cljs$core$floats(x){ +return x; +}); +cljs.core.doubles = (function cljs$core$doubles(x){ +return x; +}); +cljs.core.longs = (function cljs$core$longs(x){ +return x; +}); +/** + * Modulus of num and div with original javascript behavior. i.e. bug for negative numbers + */ +cljs.core.js_mod = (function cljs$core$js_mod(n,d){ +return (n % d); +}); +/** + * Modulus of num and div. Truncates toward negative infinity. + */ +cljs.core.mod = (function cljs$core$mod(n,d){ +return (((n % d) + d) % d); +}); +/** + * quot[ient] of dividing numerator by denominator. + */ +cljs.core.quot = (function cljs$core$quot(n,d){ +var rem = (n % d); +return cljs.core.fix(((n - rem) / d)); +}); +/** + * remainder of dividing numerator by denominator. + */ +cljs.core.rem = (function cljs$core$rem(n,d){ +var q = cljs.core.quot(n,d); +return (n - (d * q)); +}); +/** + * Bitwise exclusive or + */ +cljs.core.bit_xor = (function cljs$core$bit_xor(var_args){ +var args11734 = []; +var len__9181__auto___11740 = arguments.length; +var i__9182__auto___11741 = (0); +while(true){ +if((i__9182__auto___11741 < len__9181__auto___11740)){ +args11734.push((arguments[i__9182__auto___11741])); + +var G__11742 = (i__9182__auto___11741 + (1)); +i__9182__auto___11741 = G__11742; +continue; +} else { +} +break; +} + +var G__11739 = args11734.length; +switch (G__11739) { +case 2: +return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11734.slice((2)),(0),null)); +return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x ^ y); +}); + +cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_xor,(x ^ y),more); +}); + +cljs.core.bit_xor.cljs$lang$applyTo = (function (seq11735){ +var G__11736 = cljs.core.first(seq11735); +var seq11735__$1 = cljs.core.next(seq11735); +var G__11737 = cljs.core.first(seq11735__$1); +var seq11735__$2 = cljs.core.next(seq11735__$1); +return cljs.core.bit_xor.cljs$core$IFn$_invoke$arity$variadic(G__11736,G__11737,seq11735__$2); +}); + +cljs.core.bit_xor.cljs$lang$maxFixedArity = (2); + +/** + * Bitwise and + */ +cljs.core.bit_and = (function cljs$core$bit_and(var_args){ +var args11744 = []; +var len__9181__auto___11750 = arguments.length; +var i__9182__auto___11751 = (0); +while(true){ +if((i__9182__auto___11751 < len__9181__auto___11750)){ +args11744.push((arguments[i__9182__auto___11751])); + +var G__11752 = (i__9182__auto___11751 + (1)); +i__9182__auto___11751 = G__11752; +continue; +} else { +} +break; +} + +var G__11749 = args11744.length; +switch (G__11749) { +case 2: +return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11744.slice((2)),(0),null)); +return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.bit_and.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x & y); +}); + +cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_and,(x & y),more); +}); + +cljs.core.bit_and.cljs$lang$applyTo = (function (seq11745){ +var G__11746 = cljs.core.first(seq11745); +var seq11745__$1 = cljs.core.next(seq11745); +var G__11747 = cljs.core.first(seq11745__$1); +var seq11745__$2 = cljs.core.next(seq11745__$1); +return cljs.core.bit_and.cljs$core$IFn$_invoke$arity$variadic(G__11746,G__11747,seq11745__$2); +}); + +cljs.core.bit_and.cljs$lang$maxFixedArity = (2); + +/** + * Bitwise or + */ +cljs.core.bit_or = (function cljs$core$bit_or(var_args){ +var args11754 = []; +var len__9181__auto___11760 = arguments.length; +var i__9182__auto___11761 = (0); +while(true){ +if((i__9182__auto___11761 < len__9181__auto___11760)){ +args11754.push((arguments[i__9182__auto___11761])); + +var G__11762 = (i__9182__auto___11761 + (1)); +i__9182__auto___11761 = G__11762; +continue; +} else { +} +break; +} + +var G__11759 = args11754.length; +switch (G__11759) { +case 2: +return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11754.slice((2)),(0),null)); +return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.bit_or.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x | y); +}); + +cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_or,(x | y),more); +}); + +cljs.core.bit_or.cljs$lang$applyTo = (function (seq11755){ +var G__11756 = cljs.core.first(seq11755); +var seq11755__$1 = cljs.core.next(seq11755); +var G__11757 = cljs.core.first(seq11755__$1); +var seq11755__$2 = cljs.core.next(seq11755__$1); +return cljs.core.bit_or.cljs$core$IFn$_invoke$arity$variadic(G__11756,G__11757,seq11755__$2); +}); + +cljs.core.bit_or.cljs$lang$maxFixedArity = (2); + +/** + * Bitwise and with complement + */ +cljs.core.bit_and_not = (function cljs$core$bit_and_not(var_args){ +var args11764 = []; +var len__9181__auto___11770 = arguments.length; +var i__9182__auto___11771 = (0); +while(true){ +if((i__9182__auto___11771 < len__9181__auto___11770)){ +args11764.push((arguments[i__9182__auto___11771])); + +var G__11772 = (i__9182__auto___11771 + (1)); +i__9182__auto___11771 = G__11772; +continue; +} else { +} +break; +} + +var G__11769 = args11764.length; +switch (G__11769) { +case 2: +return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11764.slice((2)),(0),null)); +return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (x & ~y); +}); + +cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.bit_and_not,(x & ~y),more); +}); + +cljs.core.bit_and_not.cljs$lang$applyTo = (function (seq11765){ +var G__11766 = cljs.core.first(seq11765); +var seq11765__$1 = cljs.core.next(seq11765); +var G__11767 = cljs.core.first(seq11765__$1); +var seq11765__$2 = cljs.core.next(seq11765__$1); +return cljs.core.bit_and_not.cljs$core$IFn$_invoke$arity$variadic(G__11766,G__11767,seq11765__$2); +}); + +cljs.core.bit_and_not.cljs$lang$maxFixedArity = (2); + +/** + * Clear bit at index n + */ +cljs.core.bit_clear = (function cljs$core$bit_clear(x,n){ +return (x & ~(1 << n)); +}); +/** + * Flip bit at index n + */ +cljs.core.bit_flip = (function cljs$core$bit_flip(x,n){ +return (x ^ (1 << n)); +}); +/** + * Bitwise complement + */ +cljs.core.bit_not = (function cljs$core$bit_not(x){ +return (~ x); +}); +/** + * Set bit at index n + */ +cljs.core.bit_set = (function cljs$core$bit_set(x,n){ +return (x | (1 << n)); +}); +/** + * Test bit at index n + */ +cljs.core.bit_test = (function cljs$core$bit_test(x,n){ +return ((x & (1 << n)) != 0); +}); +/** + * Bitwise shift left + */ +cljs.core.bit_shift_left = (function cljs$core$bit_shift_left(x,n){ +return (x << n); +}); +/** + * Bitwise shift right + */ +cljs.core.bit_shift_right = (function cljs$core$bit_shift_right(x,n){ +return (x >> n); +}); +/** + * DEPRECATED: Bitwise shift right with zero fill + */ +cljs.core.bit_shift_right_zero_fill = (function cljs$core$bit_shift_right_zero_fill(x,n){ +return (x >>> n); +}); +/** + * Bitwise shift right with zero fill + */ +cljs.core.unsigned_bit_shift_right = (function cljs$core$unsigned_bit_shift_right(x,n){ +return (x >>> n); +}); +/** + * Counts the number of bits set in n + */ +cljs.core.bit_count = (function cljs$core$bit_count(v){ +var v__$1 = (v - ((v >> (1)) & (1431655765))); +var v__$2 = ((v__$1 & (858993459)) + ((v__$1 >> (2)) & (858993459))); +return ((((v__$2 + (v__$2 >> (4))) & (252645135)) * (16843009)) >> (24)); +}); +/** + * Returns non-nil if nums all have the equivalent + * value, otherwise false. Behavior on non nums is + * undefined. + */ +cljs.core._EQ__EQ_ = (function cljs$core$_EQ__EQ_(var_args){ +var args11774 = []; +var len__9181__auto___11780 = arguments.length; +var i__9182__auto___11781 = (0); +while(true){ +if((i__9182__auto___11781 < len__9181__auto___11780)){ +args11774.push((arguments[i__9182__auto___11781])); + +var G__11782 = (i__9182__auto___11781 + (1)); +i__9182__auto___11781 = G__11782; +continue; +} else { +} +break; +} + +var G__11779 = args11774.length; +switch (G__11779) { +case 1: +return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11774.slice((2)),(0),null)); +return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return true; +}); + +cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return cljs.core._equiv(x,y); +}); + +cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +while(true){ +if((x === y)){ +if(cljs.core.next(more)){ +var G__11784 = y; +var G__11785 = cljs.core.first(more); +var G__11786 = cljs.core.next(more); +x = G__11784; +y = G__11785; +more = G__11786; +continue; +} else { +return (y === cljs.core.first(more)); +} +} else { +return false; +} +break; +} +}); + +cljs.core._EQ__EQ_.cljs$lang$applyTo = (function (seq11775){ +var G__11776 = cljs.core.first(seq11775); +var seq11775__$1 = cljs.core.next(seq11775); +var G__11777 = cljs.core.first(seq11775__$1); +var seq11775__$2 = cljs.core.next(seq11775__$1); +return cljs.core._EQ__EQ_.cljs$core$IFn$_invoke$arity$variadic(G__11776,G__11777,seq11775__$2); +}); + +cljs.core._EQ__EQ_.cljs$lang$maxFixedArity = (2); + +/** + * Returns true if num is greater than zero, else false + */ +cljs.core.pos_QMARK_ = (function cljs$core$pos_QMARK_(x){ +return (x > (0)); +}); +/** + * Returns true if num is zero, else false + */ +cljs.core.zero_QMARK_ = (function cljs$core$zero_QMARK_(x){ +return (x === (0)); +}); +/** + * Returns true if num is less than zero, else false + */ +cljs.core.neg_QMARK_ = (function cljs$core$neg_QMARK_(x){ +return (x < (0)); +}); +/** + * Returns the nth next of coll, (seq coll) when n is 0. + */ +cljs.core.nthnext = (function cljs$core$nthnext(coll,n){ +var n__$1 = n; +var xs = cljs.core.seq(coll); +while(true){ +if((xs) && ((n__$1 > (0)))){ +var G__11787 = (n__$1 - (1)); +var G__11788 = cljs.core.next(xs); +n__$1 = G__11787; +xs = G__11788; +continue; +} else { +return xs; +} +break; +} +}); +/** + * With no args, returns the empty string. With one arg x, returns + * x.toString(). (str nil) returns the empty string. With more than + * one arg, returns the concatenation of the str values of the args. + */ +cljs.core.str = (function cljs$core$str(var_args){ +var args11789 = []; +var len__9181__auto___11794 = arguments.length; +var i__9182__auto___11795 = (0); +while(true){ +if((i__9182__auto___11795 < len__9181__auto___11794)){ +args11789.push((arguments[i__9182__auto___11795])); + +var G__11796 = (i__9182__auto___11795 + (1)); +i__9182__auto___11795 = G__11796; +continue; +} else { +} +break; +} + +var G__11793 = args11789.length; +switch (G__11793) { +case 0: +return cljs.core.str.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.str.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11789.slice((1)),(0),null)); +return cljs.core.str.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9204__auto__); + +} +}); + +cljs.core.str.cljs$core$IFn$_invoke$arity$0 = (function (){ +return ""; +}); + +cljs.core.str.cljs$core$IFn$_invoke$arity$1 = (function (x){ +if((x == null)){ +return ""; +} else { +return [x].join(""); +} +}); + +cljs.core.str.cljs$core$IFn$_invoke$arity$variadic = (function (x,ys){ +var sb = (new goog.string.StringBuffer([cljs.core.str.cljs$core$IFn$_invoke$arity$1(x)].join(''))); +var more = ys; +while(true){ +if(cljs.core.truth_(more)){ +var G__11798 = sb.append([cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.first(more))].join('')); +var G__11799 = cljs.core.next(more); +sb = G__11798; +more = G__11799; +continue; +} else { +return sb.toString(); +} +break; +} +}); + +cljs.core.str.cljs$lang$applyTo = (function (seq11790){ +var G__11791 = cljs.core.first(seq11790); +var seq11790__$1 = cljs.core.next(seq11790); +return cljs.core.str.cljs$core$IFn$_invoke$arity$variadic(G__11791,seq11790__$1); +}); + +cljs.core.str.cljs$lang$maxFixedArity = (1); + +/** + * Returns the substring of s beginning at start inclusive, and ending + * at end (defaults to length of string), exclusive. + */ +cljs.core.subs = (function cljs$core$subs(var_args){ +var args11800 = []; +var len__9181__auto___11803 = arguments.length; +var i__9182__auto___11804 = (0); +while(true){ +if((i__9182__auto___11804 < len__9181__auto___11803)){ +args11800.push((arguments[i__9182__auto___11804])); + +var G__11805 = (i__9182__auto___11804 + (1)); +i__9182__auto___11804 = G__11805; +continue; +} else { +} +break; +} + +var G__11802 = args11800.length; +switch (G__11802) { +case 2: +return cljs.core.subs.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.subs.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11800.length)].join(''))); + +} +}); + +cljs.core.subs.cljs$core$IFn$_invoke$arity$2 = (function (s,start){ +return s.substring(start); +}); + +cljs.core.subs.cljs$core$IFn$_invoke$arity$3 = (function (s,start,end){ +return s.substring(start,end); +}); + +cljs.core.subs.cljs$lang$maxFixedArity = 3; + + +/** + * Assumes x is sequential. Returns true if x equals y, otherwise + * returns false. + */ +cljs.core.equiv_sequential = (function cljs$core$equiv_sequential(x,y){ +return cljs.core.boolean$(((cljs.core.sequential_QMARK_(y))?(((cljs.core.counted_QMARK_(x)) && (cljs.core.counted_QMARK_(y)) && (!((cljs.core.count(x) === cljs.core.count(y)))))?false:(function (){var xs = cljs.core.seq(x); +var ys = cljs.core.seq(y); +while(true){ +if((xs == null)){ +return (ys == null); +} else { +if((ys == null)){ +return false; +} else { +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.first(xs),cljs.core.first(ys))){ +var G__11807 = cljs.core.next(xs); +var G__11808 = cljs.core.next(ys); +xs = G__11807; +ys = G__11808; +continue; +} else { +return false; + +} +} +} +break; +} +})()):null)); +}); +cljs.core.hash_coll = (function cljs$core$hash_coll(coll){ +if(cljs.core.seq(coll)){ +var res = cljs.core.hash(cljs.core.first(coll)); +var s = cljs.core.next(coll); +while(true){ +if((s == null)){ +return res; +} else { +var G__11809 = cljs.core.hash_combine(res,cljs.core.hash(cljs.core.first(s))); +var G__11810 = cljs.core.next(s); +res = G__11809; +s = G__11810; +continue; +} +break; +} +} else { +return (0); +} +}); + +cljs.core.hash_imap = (function cljs$core$hash_imap(m){ +var h = (0); +var s = cljs.core.seq(m); +while(true){ +if(s){ +var e = cljs.core.first(s); +var G__11811 = ((h + (cljs.core.hash((cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.key.call(null,e))) ^ cljs.core.hash((cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.val.call(null,e))))) % (4503599627370496)); +var G__11812 = cljs.core.next(s); +h = G__11811; +s = G__11812; +continue; +} else { +return h; +} +break; +} +}); +cljs.core.hash_iset = (function cljs$core$hash_iset(s){ +var h = (0); +var s__$1 = cljs.core.seq(s); +while(true){ +if(s__$1){ +var e = cljs.core.first(s__$1); +var G__11813 = ((h + cljs.core.hash(e)) % (4503599627370496)); +var G__11814 = cljs.core.next(s__$1); +h = G__11813; +s__$1 = G__11814; +continue; +} else { +return h; +} +break; +} +}); + + +/** + * Takes a JavaScript object and a map of names to functions and + * attaches said functions as methods on the object. Any references to + * JavaScript's implicit this (via the this-as macro) will resolve to the + * object that the function is attached. + */ +cljs.core.extend_object_BANG_ = (function cljs$core$extend_object_BANG_(obj,fn_map){ +var seq__11825_11835 = cljs.core.seq(fn_map); +var chunk__11826_11836 = null; +var count__11827_11837 = (0); +var i__11828_11838 = (0); +while(true){ +if((i__11828_11838 < count__11827_11837)){ +var vec__11829_11839 = chunk__11826_11836.cljs$core$IIndexed$_nth$arity$2(null,i__11828_11838); +var key_name_11840 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__11829_11839,(0),null); +var f_11841 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__11829_11839,(1),null); +var str_name_11842 = (cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(key_name_11840) : cljs.core.name.call(null,key_name_11840)); +(obj[str_name_11842] = f_11841); + +var G__11843 = seq__11825_11835; +var G__11844 = chunk__11826_11836; +var G__11845 = count__11827_11837; +var G__11846 = (i__11828_11838 + (1)); +seq__11825_11835 = G__11843; +chunk__11826_11836 = G__11844; +count__11827_11837 = G__11845; +i__11828_11838 = G__11846; +continue; +} else { +var temp__5278__auto___11847 = cljs.core.seq(seq__11825_11835); +if(temp__5278__auto___11847){ +var seq__11825_11848__$1 = temp__5278__auto___11847; +if(cljs.core.chunked_seq_QMARK_(seq__11825_11848__$1)){ +var c__8871__auto___11849 = (cljs.core.chunk_first.cljs$core$IFn$_invoke$arity$1 ? cljs.core.chunk_first.cljs$core$IFn$_invoke$arity$1(seq__11825_11848__$1) : cljs.core.chunk_first.call(null,seq__11825_11848__$1)); +var G__11850 = (cljs.core.chunk_rest.cljs$core$IFn$_invoke$arity$1 ? cljs.core.chunk_rest.cljs$core$IFn$_invoke$arity$1(seq__11825_11848__$1) : cljs.core.chunk_rest.call(null,seq__11825_11848__$1)); +var G__11851 = c__8871__auto___11849; +var G__11852 = cljs.core.count(c__8871__auto___11849); +var G__11853 = (0); +seq__11825_11835 = G__11850; +chunk__11826_11836 = G__11851; +count__11827_11837 = G__11852; +i__11828_11838 = G__11853; +continue; +} else { +var vec__11832_11854 = cljs.core.first(seq__11825_11848__$1); +var key_name_11855 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__11832_11854,(0),null); +var f_11856 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__11832_11854,(1),null); +var str_name_11857 = (cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(key_name_11855) : cljs.core.name.call(null,key_name_11855)); +(obj[str_name_11857] = f_11856); + +var G__11858 = cljs.core.next(seq__11825_11848__$1); +var G__11859 = null; +var G__11860 = (0); +var G__11861 = (0); +seq__11825_11835 = G__11858; +chunk__11826_11836 = G__11859; +count__11827_11837 = G__11860; +i__11828_11838 = G__11861; +continue; +} +} else { +} +} +break; +} + +return obj; +}); + +/** +* @constructor + * @implements {cljs.core.IList} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ASeq} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IStack} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.List = (function (meta,first,rest,count,__hash){ +this.meta = meta; +this.first = first; +this.rest = rest; +this.count = count; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 65937646; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.List.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.List.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.List.prototype.indexOf = (function() { +var G__11862 = null; +var G__11862__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__11862__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11862 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11862__1.call(this,x); +case 2: +return G__11862__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11862.cljs$core$IFn$_invoke$arity$1 = G__11862__1; +G__11862.cljs$core$IFn$_invoke$arity$2 = G__11862__2; +return G__11862; +})() +; + +cljs.core.List.prototype.lastIndexOf = (function() { +var G__11863 = null; +var G__11863__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,self__.count); +}); +var G__11863__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11863 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11863__1.call(this,x); +case 2: +return G__11863__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11863.cljs$core$IFn$_invoke$arity$1 = G__11863__1; +G__11863.cljs$core$IFn$_invoke$arity$2 = G__11863__2; +return G__11863; +})() +; + +cljs.core.List.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.List.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.List(self__.meta,self__.first,self__.rest,self__.count,self__.__hash)); +}); + +cljs.core.List.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.count === (1))){ +return null; +} else { +return self__.rest; +} +}); + +cljs.core.List.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.count; +}); + +cljs.core.List.prototype.cljs$core$IStack$_peek$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.first; +}); + +cljs.core.List.prototype.cljs$core$IStack$_pop$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ISeq$_rest$arity$1(null); +}); + +cljs.core.List.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.List.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.List.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.List.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.first; +}); + +cljs.core.List.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.count === (1))){ +return cljs.core.List.EMPTY; +} else { +return self__.rest; +} +}); + +cljs.core.List.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.List.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.List(meta__$1,self__.first,self__.rest,self__.count,self__.__hash)); +}); + +cljs.core.List.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.List(self__.meta,o,coll__$1,(self__.count + (1)),null)); +}); + +cljs.core.List.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$first,cljs.core.cst$sym$rest,cljs.core.cst$sym$count,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.List.cljs$lang$type = true; + +cljs.core.List.cljs$lang$ctorStr = "cljs.core/List"; + +cljs.core.List.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/List"); +}); + +cljs.core.__GT_List = (function cljs$core$__GT_List(meta,first,rest,count,__hash){ +return (new cljs.core.List(meta,first,rest,count,__hash)); +}); + +/** + * Returns true if x implements IList + */ +cljs.core.list_QMARK_ = (function cljs$core$list_QMARK_(x){ +if(!((x == null))){ +if(((x.cljs$lang$protocol_mask$partition0$ & (33554432))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IList$))){ +return true; +} else { +if((!x.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IList,x); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IList,x); +} +}); +(cljs.core.List.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.IList} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IStack} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.EmptyList = (function (meta){ +this.meta = meta; +this.cljs$lang$protocol_mask$partition0$ = 65937614; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.EmptyList.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.EmptyList.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.EmptyList.prototype.indexOf = (function() { +var G__11866 = null; +var G__11866__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__11866__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11866 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11866__1.call(this,x); +case 2: +return G__11866__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11866.cljs$core$IFn$_invoke$arity$1 = G__11866__1; +G__11866.cljs$core$IFn$_invoke$arity$2 = G__11866__2; +return G__11866; +})() +; + +cljs.core.EmptyList.prototype.lastIndexOf = (function() { +var G__11867 = null; +var G__11867__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__11867__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11867 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11867__1.call(this,x); +case 2: +return G__11867__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11867.cljs$core$IFn$_invoke$arity$1 = G__11867__1; +G__11867.cljs$core$IFn$_invoke$arity$2 = G__11867__2; +return G__11867; +})() +; + +cljs.core.EmptyList.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.EmptyList.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.EmptyList(self__.meta)); +}); + +cljs.core.EmptyList.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return null; +}); + +cljs.core.EmptyList.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (0); +}); + +cljs.core.EmptyList.prototype.cljs$core$IStack$_peek$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return null; +}); + +cljs.core.EmptyList.prototype.cljs$core$IStack$_pop$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +throw (new Error("Can't pop empty list")); +}); + +cljs.core.EmptyList.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.empty_ordered_hash; +}); + +cljs.core.EmptyList.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +if((cljs.core.list_QMARK_(other)) || (cljs.core.sequential_QMARK_(other))){ +return (cljs.core.seq(other) == null); +} else { +return false; +} +}); + +cljs.core.EmptyList.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.EmptyList.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.EmptyList.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.EmptyList.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return null; +}); + +cljs.core.EmptyList.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.List.EMPTY; +}); + +cljs.core.EmptyList.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return null; +}); + +cljs.core.EmptyList.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.EmptyList(meta__$1)); +}); + +cljs.core.EmptyList.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.List(self__.meta,o,null,(1),null)); +}); + +cljs.core.EmptyList.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta], null); +}); + +cljs.core.EmptyList.cljs$lang$type = true; + +cljs.core.EmptyList.cljs$lang$ctorStr = "cljs.core/EmptyList"; + +cljs.core.EmptyList.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/EmptyList"); +}); + +cljs.core.__GT_EmptyList = (function cljs$core$__GT_EmptyList(meta){ +return (new cljs.core.EmptyList(meta)); +}); + +cljs.core.List.EMPTY = (new cljs.core.EmptyList(null)); +(cljs.core.EmptyList.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Returns true if coll satisfies? IReversible. + */ +cljs.core.reversible_QMARK_ = (function cljs$core$reversible_QMARK_(coll){ +if(!((coll == null))){ +if(((coll.cljs$lang$protocol_mask$partition0$ & (134217728))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$IReversible$))){ +return true; +} else { +if((!coll.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IReversible,coll); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IReversible,coll); +} +}); +/** + * Returns, in constant time, a seq of the items in rev (which + * can be a vector or sorted-map), in reverse order. If rev is empty returns nil + */ +cljs.core.rseq = (function cljs$core$rseq(rev){ +return cljs.core._rseq(rev); +}); +/** + * Returns a seq of the items in coll in reverse order. Not lazy. + */ +cljs.core.reverse = (function cljs$core$reverse(coll){ +if(cljs.core.reversible_QMARK_(coll)){ +return cljs.core.rseq(coll); +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj,cljs.core.List.EMPTY,coll); +} +}); +/** + * Creates a new list containing the items. + */ +cljs.core.list = (function cljs$core$list(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___11871 = arguments.length; +var i__9182__auto___11872 = (0); +while(true){ +if((i__9182__auto___11872 < len__9181__auto___11871)){ +args__9188__auto__.push((arguments[i__9182__auto___11872])); + +var G__11873 = (i__9182__auto___11872 + (1)); +i__9182__auto___11872 = G__11873; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.list.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.list.cljs$core$IFn$_invoke$arity$variadic = (function (xs){ +var arr = ((((xs instanceof cljs.core.IndexedSeq)) && ((xs.i === (0))))?xs.arr:(function (){var arr = []; +var xs__$1 = xs; +while(true){ +if(!((xs__$1 == null))){ +arr.push(xs__$1.cljs$core$ISeq$_first$arity$1(null)); + +var G__11874 = xs__$1.cljs$core$INext$_next$arity$1(null); +xs__$1 = G__11874; +continue; +} else { +return arr; +} +break; +} +})()); +var i = arr.length; +var r = cljs.core.List.EMPTY; +while(true){ +if((i > (0))){ +var G__11875 = (i - (1)); +var G__11876 = r.cljs$core$ICollection$_conj$arity$2(null,(arr[(i - (1))])); +i = G__11875; +r = G__11876; +continue; +} else { +return r; +} +break; +} +}); + +cljs.core.list.cljs$lang$maxFixedArity = (0); + +cljs.core.list.cljs$lang$applyTo = (function (seq11870){ +return cljs.core.list.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq11870)); +}); + + +/** +* @constructor + * @implements {cljs.core.IList} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ASeq} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.Cons = (function (meta,first,rest,__hash){ +this.meta = meta; +this.first = first; +this.rest = rest; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 65929452; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.Cons.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.Cons.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.Cons.prototype.indexOf = (function() { +var G__11877 = null; +var G__11877__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__11877__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11877 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11877__1.call(this,x); +case 2: +return G__11877__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11877.cljs$core$IFn$_invoke$arity$1 = G__11877__1; +G__11877.cljs$core$IFn$_invoke$arity$2 = G__11877__2; +return G__11877; +})() +; + +cljs.core.Cons.prototype.lastIndexOf = (function() { +var G__11878 = null; +var G__11878__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__11878__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11878 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11878__1.call(this,x); +case 2: +return G__11878__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11878.cljs$core$IFn$_invoke$arity$1 = G__11878__1; +G__11878.cljs$core$IFn$_invoke$arity$2 = G__11878__2; +return G__11878; +})() +; + +cljs.core.Cons.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.Cons.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.Cons(self__.meta,self__.first,self__.rest,self__.__hash)); +}); + +cljs.core.Cons.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.rest == null)){ +return null; +} else { +return cljs.core.seq(self__.rest); +} +}); + +cljs.core.Cons.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.Cons.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.Cons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.Cons.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.Cons.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.Cons.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.first; +}); + +cljs.core.Cons.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.rest == null)){ +return cljs.core.List.EMPTY; +} else { +return self__.rest; +} +}); + +cljs.core.Cons.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.Cons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.Cons(meta__$1,self__.first,self__.rest,self__.__hash)); +}); + +cljs.core.Cons.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.Cons(null,o,coll__$1,null)); +}); + +cljs.core.Cons.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$first,cljs.core.cst$sym$rest,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Cons.cljs$lang$type = true; + +cljs.core.Cons.cljs$lang$ctorStr = "cljs.core/Cons"; + +cljs.core.Cons.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Cons"); +}); + +cljs.core.__GT_Cons = (function cljs$core$__GT_Cons(meta,first,rest,__hash){ +return (new cljs.core.Cons(meta,first,rest,__hash)); +}); + +(cljs.core.Cons.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Returns a new seq where x is the first element and coll is the rest. + */ +cljs.core.cons = (function cljs$core$cons(x,coll){ +if((function (){var or__7960__auto__ = (coll == null); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +if(!((coll == null))){ +if(((coll.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === coll.cljs$core$ISeq$))){ +return true; +} else { +return false; +} +} else { +return false; +} +} +})()){ +return (new cljs.core.Cons(null,x,coll,null)); +} else { +return (new cljs.core.Cons(null,x,cljs.core.seq(coll),null)); +} +}); +cljs.core.hash_keyword = (function cljs$core$hash_keyword(k){ +return ((cljs.core.hash_symbol(k) + (2654435769)) | (0)); +}); +cljs.core.compare_keywords = (function cljs$core$compare_keywords(a,b){ +if((a.fqn === b.fqn)){ +return (0); +} else { +if(cljs.core.truth_((function (){var and__7948__auto__ = cljs.core.not(a.ns); +if(and__7948__auto__){ +return b.ns; +} else { +return and__7948__auto__; +} +})())){ +return (-1); +} else { +if(cljs.core.truth_(a.ns)){ +if(cljs.core.not(b.ns)){ +return (1); +} else { +var nsc = (function (){var G__11889 = a.ns; +var G__11890 = b.ns; +return goog.array.defaultCompare(G__11889,G__11890); +})(); +if(((0) === nsc)){ +var G__11891 = a.name; +var G__11892 = b.name; +return goog.array.defaultCompare(G__11891,G__11892); +} else { +return nsc; +} +} +} else { +var G__11893 = a.name; +var G__11894 = b.name; +return goog.array.defaultCompare(G__11893,G__11894); + +} +} +} +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.INamed} + * @implements {cljs.core.IPrintWithWriter} +*/ +cljs.core.Keyword = (function (ns,name,fqn,_hash){ +this.ns = ns; +this.name = name; +this.fqn = fqn; +this._hash = _hash; +this.cljs$lang$protocol_mask$partition0$ = 2153775105; +this.cljs$lang$protocol_mask$partition1$ = 4096; +}) +cljs.core.Keyword.prototype.toString = (function (){ +var self__ = this; +var _ = this; +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(":"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.fqn)].join(''); +}); + +cljs.core.Keyword.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.Keyword.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +if((other instanceof cljs.core.Keyword)){ +return (self__.fqn === other.fqn); +} else { +return false; +} +}); + +cljs.core.Keyword.prototype.call = (function() { +var G__11896 = null; +var G__11896__2 = (function (self__,coll){ +var self__ = this; +var self____$1 = this; +var kw = self____$1; +return cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll,kw); +}); +var G__11896__3 = (function (self__,coll,not_found){ +var self__ = this; +var self____$1 = this; +var kw = self____$1; +return cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll,kw,not_found); +}); +G__11896 = function(self__,coll,not_found){ +switch(arguments.length){ +case 2: +return G__11896__2.call(this,self__,coll); +case 3: +return G__11896__3.call(this,self__,coll,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11896.cljs$core$IFn$_invoke$arity$2 = G__11896__2; +G__11896.cljs$core$IFn$_invoke$arity$3 = G__11896__3; +return G__11896; +})() +; + +cljs.core.Keyword.prototype.apply = (function (self__,args11895){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args11895))); +}); + +cljs.core.Keyword.prototype.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +var self__ = this; +var kw = this; +return cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll,kw); +}); + +cljs.core.Keyword.prototype.cljs$core$IFn$_invoke$arity$2 = (function (coll,not_found){ +var self__ = this; +var kw = this; +return cljs.core.get.cljs$core$IFn$_invoke$arity$3(coll,kw,not_found); +}); + +cljs.core.Keyword.prototype.cljs$core$IHash$_hash$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +var h__8402__auto__ = self__._hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_keyword(this$__$1); +self__._hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.Keyword.prototype.cljs$core$INamed$_name$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.name; +}); + +cljs.core.Keyword.prototype.cljs$core$INamed$_namespace$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.ns; +}); + +cljs.core.Keyword.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (o,writer,_){ +var self__ = this; +var o__$1 = this; +return cljs.core._write(writer,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(":"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.fqn)].join('')); +}); + +cljs.core.Keyword.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$ns,cljs.core.cst$sym$name,cljs.core.cst$sym$fqn,cljs.core.with_meta(cljs.core.cst$sym$_hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Keyword.cljs$lang$type = true; + +cljs.core.Keyword.cljs$lang$ctorStr = "cljs.core/Keyword"; + +cljs.core.Keyword.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Keyword"); +}); + +cljs.core.__GT_Keyword = (function cljs$core$__GT_Keyword(ns,name,fqn,_hash){ +return (new cljs.core.Keyword(ns,name,fqn,_hash)); +}); + +/** + * Return true if x is a Keyword + */ +cljs.core.keyword_QMARK_ = (function cljs$core$keyword_QMARK_(x){ +return (x instanceof cljs.core.Keyword); +}); +/** + * Efficient test to determine that two keywords are identical. + */ +cljs.core.keyword_identical_QMARK_ = (function cljs$core$keyword_identical_QMARK_(x,y){ +if((x === y)){ +return true; +} else { +if(((x instanceof cljs.core.Keyword)) && ((y instanceof cljs.core.Keyword))){ +return (x.fqn === y.fqn); +} else { +return false; +} +} +}); +/** + * Efficient test to determine that two symbols are identical. + */ +cljs.core.symbol_identical_QMARK_ = (function cljs$core$symbol_identical_QMARK_(x,y){ +if((x === y)){ +return true; +} else { +if(((x instanceof cljs.core.Symbol)) && ((y instanceof cljs.core.Symbol))){ +return (x.str === y.str); +} else { +return false; +} +} +}); +/** + * Returns the namespace String of a symbol or keyword, or nil if not present. + */ +cljs.core.namespace = (function cljs$core$namespace(x){ +if(((!((x == null)))?((((x.cljs$lang$protocol_mask$partition1$ & (4096))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$INamed$)))?true:false):false)){ +return x.cljs$core$INamed$_namespace$arity$1(null); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Doesn't support namespace: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x)].join(''))); +} +}); +/** + * Return true if x is a symbol or keyword + */ +cljs.core.ident_QMARK_ = (function cljs$core$ident_QMARK_(x){ +return ((x instanceof cljs.core.Keyword)) || ((x instanceof cljs.core.Symbol)); +}); +/** + * Return true if x is a symbol or keyword without a namespace + */ +cljs.core.simple_ident_QMARK_ = (function cljs$core$simple_ident_QMARK_(x){ +return (cljs.core.ident_QMARK_(x)) && ((cljs.core.namespace(x) == null)); +}); +/** + * Return true if x is a symbol or keyword with a namespace + */ +cljs.core.qualified_ident_QMARK_ = (function cljs$core$qualified_ident_QMARK_(x){ +var and__7948__auto__ = cljs.core.ident_QMARK_(x); +if(and__7948__auto__){ +var and__7948__auto____$1 = cljs.core.namespace(x); +if(cljs.core.truth_(and__7948__auto____$1)){ +return true; +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +}); +/** + * Return true if x is a symbol without a namespace + */ +cljs.core.simple_symbol_QMARK_ = (function cljs$core$simple_symbol_QMARK_(x){ +return ((x instanceof cljs.core.Symbol)) && ((cljs.core.namespace(x) == null)); +}); +/** + * Return true if x is a symbol with a namespace + */ +cljs.core.qualified_symbol_QMARK_ = (function cljs$core$qualified_symbol_QMARK_(x){ +var and__7948__auto__ = (x instanceof cljs.core.Symbol); +if(and__7948__auto__){ +var and__7948__auto____$1 = cljs.core.namespace(x); +if(cljs.core.truth_(and__7948__auto____$1)){ +return true; +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +}); +/** + * Return true if x is a keyword without a namespace + */ +cljs.core.simple_keyword_QMARK_ = (function cljs$core$simple_keyword_QMARK_(x){ +return ((x instanceof cljs.core.Keyword)) && ((cljs.core.namespace(x) == null)); +}); +/** + * Return true if x is a keyword with a namespace + */ +cljs.core.qualified_keyword_QMARK_ = (function cljs$core$qualified_keyword_QMARK_(x){ +var and__7948__auto__ = (x instanceof cljs.core.Keyword); +if(and__7948__auto__){ +var and__7948__auto____$1 = cljs.core.namespace(x); +if(cljs.core.truth_(and__7948__auto____$1)){ +return true; +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +}); +/** + * Returns a Keyword with the given namespace and name. Do not use : + * in the keyword strings, it will be added automatically. + */ +cljs.core.keyword = (function cljs$core$keyword(var_args){ +var args11899 = []; +var len__9181__auto___11902 = arguments.length; +var i__9182__auto___11903 = (0); +while(true){ +if((i__9182__auto___11903 < len__9181__auto___11902)){ +args11899.push((arguments[i__9182__auto___11903])); + +var G__11904 = (i__9182__auto___11903 + (1)); +i__9182__auto___11903 = G__11904; +continue; +} else { +} +break; +} + +var G__11901 = args11899.length; +switch (G__11901) { +case 1: +return cljs.core.keyword.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.keyword.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11899.length)].join(''))); + +} +}); + +cljs.core.keyword.cljs$core$IFn$_invoke$arity$1 = (function (name){ +if((name instanceof cljs.core.Keyword)){ +return name; +} else { +if((name instanceof cljs.core.Symbol)){ +return (new cljs.core.Keyword(cljs.core.namespace(name),(cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(name) : cljs.core.name.call(null,name)),name.str,null)); +} else { +if(typeof name === 'string'){ +var parts = name.split("/"); +if((parts.length === (2))){ +return (new cljs.core.Keyword((parts[(0)]),(parts[(1)]),name,null)); +} else { +return (new cljs.core.Keyword(null,(parts[(0)]),name,null)); +} +} else { +return null; +} +} +} +}); + +cljs.core.keyword.cljs$core$IFn$_invoke$arity$2 = (function (ns,name){ +var ns__$1 = (((ns instanceof cljs.core.Keyword))?(cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(ns) : cljs.core.name.call(null,ns)):(((ns instanceof cljs.core.Symbol))?(cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(ns) : cljs.core.name.call(null,ns)):ns +)); +var name__$1 = (((name instanceof cljs.core.Keyword))?(cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(name) : cljs.core.name.call(null,name)):(((name instanceof cljs.core.Symbol))?(cljs.core.name.cljs$core$IFn$_invoke$arity$1 ? cljs.core.name.cljs$core$IFn$_invoke$arity$1(name) : cljs.core.name.call(null,name)):name +)); +return (new cljs.core.Keyword(ns__$1,name__$1,[cljs.core.str.cljs$core$IFn$_invoke$arity$1((cljs.core.truth_(ns__$1)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1("/")].join(''):null)),cljs.core.str.cljs$core$IFn$_invoke$arity$1(name__$1)].join(''),null)); +}); + +cljs.core.keyword.cljs$lang$maxFixedArity = 2; + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IPending} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.LazySeq = (function (meta,fn,s,__hash){ +this.meta = meta; +this.fn = fn; +this.s = s; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32374988; +this.cljs$lang$protocol_mask$partition1$ = 1; +}) +cljs.core.LazySeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.LazySeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.LazySeq.prototype.sval = (function (){ +var self__ = this; +var coll = this; +if((self__.fn == null)){ +return self__.s; +} else { +self__.s = (self__.fn.cljs$core$IFn$_invoke$arity$0 ? self__.fn.cljs$core$IFn$_invoke$arity$0() : self__.fn.call(null)); + +self__.fn = null; + +return self__.s; +} +}); + +cljs.core.LazySeq.prototype.indexOf = (function() { +var G__11906 = null; +var G__11906__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__11906__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11906 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11906__1.call(this,x); +case 2: +return G__11906__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11906.cljs$core$IFn$_invoke$arity$1 = G__11906__1; +G__11906.cljs$core$IFn$_invoke$arity$2 = G__11906__2; +return G__11906; +})() +; + +cljs.core.LazySeq.prototype.lastIndexOf = (function() { +var G__11907 = null; +var G__11907__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__11907__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11907 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11907__1.call(this,x); +case 2: +return G__11907__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11907.cljs$core$IFn$_invoke$arity$1 = G__11907__1; +G__11907.cljs$core$IFn$_invoke$arity$2 = G__11907__2; +return G__11907; +})() +; + +cljs.core.LazySeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.LazySeq.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +coll__$1.cljs$core$ISeqable$_seq$arity$1(null); + +if((self__.s == null)){ +return null; +} else { +return cljs.core.next(self__.s); +} +}); + +cljs.core.LazySeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.LazySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.LazySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.LazySeq.prototype.cljs$core$IPending$_realized_QMARK_$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.not(self__.fn); +}); + +cljs.core.LazySeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.LazySeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.LazySeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +coll__$1.cljs$core$ISeqable$_seq$arity$1(null); + +if((self__.s == null)){ +return null; +} else { +return cljs.core.first(self__.s); +} +}); + +cljs.core.LazySeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +coll__$1.cljs$core$ISeqable$_seq$arity$1(null); + +if(!((self__.s == null))){ +return cljs.core.rest(self__.s); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.LazySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +coll__$1.sval(); + +if((self__.s == null)){ +return null; +} else { +var ls = self__.s; +while(true){ +if((ls instanceof cljs.core.LazySeq)){ +var G__11908 = ls.sval(); +ls = G__11908; +continue; +} else { +self__.s = ls; + +return cljs.core.seq(self__.s); +} +break; +} +} +}); + +cljs.core.LazySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.LazySeq(meta__$1,self__.fn,self__.s,self__.__hash)); +}); + +cljs.core.LazySeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.LazySeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.with_meta(cljs.core.cst$sym$fn,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$s,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.LazySeq.cljs$lang$type = true; + +cljs.core.LazySeq.cljs$lang$ctorStr = "cljs.core/LazySeq"; + +cljs.core.LazySeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/LazySeq"); +}); + +cljs.core.__GT_LazySeq = (function cljs$core$__GT_LazySeq(meta,fn,s,__hash){ +return (new cljs.core.LazySeq(meta,fn,s,__hash)); +}); + +(cljs.core.LazySeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.ICounted} +*/ +cljs.core.ChunkBuffer = (function (buf,end){ +this.buf = buf; +this.end = end; +this.cljs$lang$protocol_mask$partition0$ = 2; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.ChunkBuffer.prototype.add = (function (o){ +var self__ = this; +var _ = this; +(self__.buf[self__.end] = o); + +return self__.end = (self__.end + (1)); +}); + +cljs.core.ChunkBuffer.prototype.chunk = (function (){ +var self__ = this; +var _ = this; +var ret = (new cljs.core.ArrayChunk(self__.buf,(0),self__.end)); +self__.buf = null; + +return ret; +}); + +cljs.core.ChunkBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.end; +}); + +cljs.core.ChunkBuffer.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$buf,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$end,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ChunkBuffer.cljs$lang$type = true; + +cljs.core.ChunkBuffer.cljs$lang$ctorStr = "cljs.core/ChunkBuffer"; + +cljs.core.ChunkBuffer.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ChunkBuffer"); +}); + +cljs.core.__GT_ChunkBuffer = (function cljs$core$__GT_ChunkBuffer(buf,end){ +return (new cljs.core.ChunkBuffer(buf,end)); +}); + +cljs.core.chunk_buffer = (function cljs$core$chunk_buffer(capacity){ +return (new cljs.core.ChunkBuffer((new Array(capacity)),(0))); +}); + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.IChunk} + * @implements {cljs.core.IReduce} +*/ +cljs.core.ArrayChunk = (function (arr,off,end){ +this.arr = arr; +this.off = off; +this.end = end; +this.cljs$lang$protocol_mask$partition0$ = 524306; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.ArrayChunk.prototype.cljs$core$ICounted$_count$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (self__.end - self__.off); +}); + +cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (coll,i){ +var self__ = this; +var coll__$1 = this; +return (self__.arr[(self__.off + i)]); +}); + +cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (coll,i,not_found){ +var self__ = this; +var coll__$1 = this; +if(((i >= (0))) && ((i < (self__.end - self__.off)))){ +return (self__.arr[(self__.off + i)]); +} else { +return not_found; +} +}); + +cljs.core.ArrayChunk.prototype.cljs$core$IChunk$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ArrayChunk.prototype.cljs$core$IChunk$_drop_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.off === self__.end)){ +throw (new Error("-drop-first of empty chunk")); +} else { +return (new cljs.core.ArrayChunk(self__.arr,(self__.off + (1)),self__.end)); +} +}); + +cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr,f,(self__.arr[self__.off]),(self__.off + (1))); +}); + +cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.array_reduce.cljs$core$IFn$_invoke$arity$4(self__.arr,f,start,self__.off); +}); + +cljs.core.ArrayChunk.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.cst$sym$off,cljs.core.cst$sym$end], null); +}); + +cljs.core.ArrayChunk.cljs$lang$type = true; + +cljs.core.ArrayChunk.cljs$lang$ctorStr = "cljs.core/ArrayChunk"; + +cljs.core.ArrayChunk.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ArrayChunk"); +}); + +cljs.core.__GT_ArrayChunk = (function cljs$core$__GT_ArrayChunk(arr,off,end){ +return (new cljs.core.ArrayChunk(arr,off,end)); +}); + +cljs.core.array_chunk = (function cljs$core$array_chunk(var_args){ +var args11909 = []; +var len__9181__auto___11912 = arguments.length; +var i__9182__auto___11913 = (0); +while(true){ +if((i__9182__auto___11913 < len__9181__auto___11912)){ +args11909.push((arguments[i__9182__auto___11913])); + +var G__11914 = (i__9182__auto___11913 + (1)); +i__9182__auto___11913 = G__11914; +continue; +} else { +} +break; +} + +var G__11911 = args11909.length; +switch (G__11911) { +case 1: +return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11909.length)].join(''))); + +} +}); + +cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$1 = (function (arr){ +return (new cljs.core.ArrayChunk(arr,(0),arr.length)); +}); + +cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$2 = (function (arr,off){ +return (new cljs.core.ArrayChunk(arr,off,arr.length)); +}); + +cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$3 = (function (arr,off,end){ +return (new cljs.core.ArrayChunk(arr,off,end)); +}); + +cljs.core.array_chunk.cljs$lang$maxFixedArity = 3; + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ASeq} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IChunkedNext} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IChunkedSeq} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.ChunkedCons = (function (chunk,more,meta,__hash){ +this.chunk = chunk; +this.more = more; +this.meta = meta; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 31850732; +this.cljs$lang$protocol_mask$partition1$ = 1536; +}) +cljs.core.ChunkedCons.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.ChunkedCons.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.ChunkedCons.prototype.indexOf = (function() { +var G__11916 = null; +var G__11916__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__11916__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11916 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11916__1.call(this,x); +case 2: +return G__11916__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11916.cljs$core$IFn$_invoke$arity$1 = G__11916__1; +G__11916.cljs$core$IFn$_invoke$arity$2 = G__11916__2; +return G__11916; +})() +; + +cljs.core.ChunkedCons.prototype.lastIndexOf = (function() { +var G__11917 = null; +var G__11917__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__11917__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__11917 = function(x,start){ +switch(arguments.length){ +case 1: +return G__11917__1.call(this,x); +case 2: +return G__11917__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__11917.cljs$core$IFn$_invoke$arity$1 = G__11917__1; +G__11917.cljs$core$IFn$_invoke$arity$2 = G__11917__2; +return G__11917; +})() +; + +cljs.core.ChunkedCons.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.ChunkedCons.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((cljs.core._count(self__.chunk) > (1))){ +return (new cljs.core.ChunkedCons(cljs.core._drop_first(self__.chunk),self__.more,self__.meta,null)); +} else { +var more__$1 = cljs.core._seq(self__.more); +if((more__$1 == null)){ +return null; +} else { +return more__$1; +} +} +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.chunk,(0)); +}); + +cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((cljs.core._count(self__.chunk) > (1))){ +return (new cljs.core.ChunkedCons(cljs.core._drop_first(self__.chunk),self__.more,self__.meta,null)); +} else { +if((self__.more == null)){ +return cljs.core.List.EMPTY; +} else { +return self__.more; +} +} +}); + +cljs.core.ChunkedCons.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.chunk; +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.more == null)){ +return cljs.core.List.EMPTY; +} else { +return self__.more; +} +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,m){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.ChunkedCons(self__.chunk,self__.more,m,self__.__hash)); +}); + +cljs.core.ChunkedCons.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this$,o){ +var self__ = this; +var this$__$1 = this; +return cljs.core.cons(o,this$__$1); +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.more == null)){ +return null; +} else { +return self__.more; +} +}); + +cljs.core.ChunkedCons.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$chunk,cljs.core.cst$sym$more,cljs.core.cst$sym$meta,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ChunkedCons.cljs$lang$type = true; + +cljs.core.ChunkedCons.cljs$lang$ctorStr = "cljs.core/ChunkedCons"; + +cljs.core.ChunkedCons.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ChunkedCons"); +}); + +cljs.core.__GT_ChunkedCons = (function cljs$core$__GT_ChunkedCons(chunk,more,meta,__hash){ +return (new cljs.core.ChunkedCons(chunk,more,meta,__hash)); +}); + +(cljs.core.ChunkedCons.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.chunk_cons = (function cljs$core$chunk_cons(chunk,rest){ +if((cljs.core._count(chunk) === (0))){ +return rest; +} else { +return (new cljs.core.ChunkedCons(chunk,rest,null,null)); +} +}); +cljs.core.chunk_append = (function cljs$core$chunk_append(b,x){ +return b.add(x); +}); +cljs.core.chunk = (function cljs$core$chunk(b){ +return b.chunk(); +}); +cljs.core.chunk_first = (function cljs$core$chunk_first(s){ +return cljs.core._chunked_first(s); +}); +cljs.core.chunk_rest = (function cljs$core$chunk_rest(s){ +return cljs.core._chunked_rest(s); +}); +cljs.core.chunk_next = (function cljs$core$chunk_next(s){ +if(((!((s == null)))?((((s.cljs$lang$protocol_mask$partition1$ & (1024))) || ((cljs.core.PROTOCOL_SENTINEL === s.cljs$core$IChunkedNext$)))?true:false):false)){ +return cljs.core._chunked_next(s); +} else { +return cljs.core.seq(cljs.core._chunked_rest(s)); +} +}); +/** + * Naive impl of to-array as a start. + */ +cljs.core.to_array = (function cljs$core$to_array(s){ +var ary = []; +var s__$1 = s; +while(true){ +if(cljs.core.seq(s__$1)){ +ary.push(cljs.core.first(s__$1)); + +var G__11920 = cljs.core.next(s__$1); +s__$1 = G__11920; +continue; +} else { +return ary; +} +break; +} +}); +/** + * Returns a (potentially-ragged) 2-dimensional array + * containing the contents of coll. + */ +cljs.core.to_array_2d = (function cljs$core$to_array_2d(coll){ +var ret = (new Array(cljs.core.count(coll))); +var i_11921 = (0); +var xs_11922 = cljs.core.seq(coll); +while(true){ +if(xs_11922){ +(ret[i_11921] = cljs.core.to_array(cljs.core.first(xs_11922))); + +var G__11923 = (i_11921 + (1)); +var G__11924 = cljs.core.next(xs_11922); +i_11921 = G__11923; +xs_11922 = G__11924; +continue; +} else { +} +break; +} + +return ret; +}); +/** + * Creates an array of ints. Does not coerce array, provided for compatibility + * with Clojure. + */ +cljs.core.int_array = (function cljs$core$int_array(var_args){ +var args11925 = []; +var len__9181__auto___11928 = arguments.length; +var i__9182__auto___11929 = (0); +while(true){ +if((i__9182__auto___11929 < len__9181__auto___11928)){ +args11925.push((arguments[i__9182__auto___11929])); + +var G__11930 = (i__9182__auto___11929 + (1)); +i__9182__auto___11929 = G__11930; +continue; +} else { +} +break; +} + +var G__11927 = args11925.length; +switch (G__11927) { +case 1: +return cljs.core.int_array.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.int_array.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11925.length)].join(''))); + +} +}); + +cljs.core.int_array.cljs$core$IFn$_invoke$arity$1 = (function (size_or_seq){ +if(typeof size_or_seq === 'number'){ +return cljs.core.int_array.cljs$core$IFn$_invoke$arity$2(size_or_seq,null); +} else { +return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq); +} +}); + +cljs.core.int_array.cljs$core$IFn$_invoke$arity$2 = (function (size,init_val_or_seq){ +var a = (new Array(size)); +if(cljs.core.seq_QMARK_(init_val_or_seq)){ +var s = cljs.core.seq(init_val_or_seq); +var i = (0); +var s__$1 = s; +while(true){ +if((s__$1) && ((i < size))){ +(a[i] = cljs.core.first(s__$1)); + +var G__11932 = (i + (1)); +var G__11933 = cljs.core.next(s__$1); +i = G__11932; +s__$1 = G__11933; +continue; +} else { +return a; +} +break; +} +} else { +var n__8981__auto___11934 = size; +var i_11935 = (0); +while(true){ +if((i_11935 < n__8981__auto___11934)){ +(a[i_11935] = init_val_or_seq); + +var G__11936 = (i_11935 + (1)); +i_11935 = G__11936; +continue; +} else { +} +break; +} + +return a; +} +}); + +cljs.core.int_array.cljs$lang$maxFixedArity = 2; + +/** + * Creates an array of longs. Does not coerce array, provided for compatibility + * with Clojure. + */ +cljs.core.long_array = (function cljs$core$long_array(var_args){ +var args11937 = []; +var len__9181__auto___11940 = arguments.length; +var i__9182__auto___11941 = (0); +while(true){ +if((i__9182__auto___11941 < len__9181__auto___11940)){ +args11937.push((arguments[i__9182__auto___11941])); + +var G__11942 = (i__9182__auto___11941 + (1)); +i__9182__auto___11941 = G__11942; +continue; +} else { +} +break; +} + +var G__11939 = args11937.length; +switch (G__11939) { +case 1: +return cljs.core.long_array.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.long_array.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11937.length)].join(''))); + +} +}); + +cljs.core.long_array.cljs$core$IFn$_invoke$arity$1 = (function (size_or_seq){ +if(typeof size_or_seq === 'number'){ +return cljs.core.long_array.cljs$core$IFn$_invoke$arity$2(size_or_seq,null); +} else { +return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq); +} +}); + +cljs.core.long_array.cljs$core$IFn$_invoke$arity$2 = (function (size,init_val_or_seq){ +var a = (new Array(size)); +if(cljs.core.seq_QMARK_(init_val_or_seq)){ +var s = cljs.core.seq(init_val_or_seq); +var i = (0); +var s__$1 = s; +while(true){ +if((s__$1) && ((i < size))){ +(a[i] = cljs.core.first(s__$1)); + +var G__11944 = (i + (1)); +var G__11945 = cljs.core.next(s__$1); +i = G__11944; +s__$1 = G__11945; +continue; +} else { +return a; +} +break; +} +} else { +var n__8981__auto___11946 = size; +var i_11947 = (0); +while(true){ +if((i_11947 < n__8981__auto___11946)){ +(a[i_11947] = init_val_or_seq); + +var G__11948 = (i_11947 + (1)); +i_11947 = G__11948; +continue; +} else { +} +break; +} + +return a; +} +}); + +cljs.core.long_array.cljs$lang$maxFixedArity = 2; + +/** + * Creates an array of doubles. Does not coerce array, provided for compatibility + * with Clojure. + */ +cljs.core.double_array = (function cljs$core$double_array(var_args){ +var args11949 = []; +var len__9181__auto___11952 = arguments.length; +var i__9182__auto___11953 = (0); +while(true){ +if((i__9182__auto___11953 < len__9181__auto___11952)){ +args11949.push((arguments[i__9182__auto___11953])); + +var G__11954 = (i__9182__auto___11953 + (1)); +i__9182__auto___11953 = G__11954; +continue; +} else { +} +break; +} + +var G__11951 = args11949.length; +switch (G__11951) { +case 1: +return cljs.core.double_array.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.double_array.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11949.length)].join(''))); + +} +}); + +cljs.core.double_array.cljs$core$IFn$_invoke$arity$1 = (function (size_or_seq){ +if(typeof size_or_seq === 'number'){ +return cljs.core.double_array.cljs$core$IFn$_invoke$arity$2(size_or_seq,null); +} else { +return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq); +} +}); + +cljs.core.double_array.cljs$core$IFn$_invoke$arity$2 = (function (size,init_val_or_seq){ +var a = (new Array(size)); +if(cljs.core.seq_QMARK_(init_val_or_seq)){ +var s = cljs.core.seq(init_val_or_seq); +var i = (0); +var s__$1 = s; +while(true){ +if((s__$1) && ((i < size))){ +(a[i] = cljs.core.first(s__$1)); + +var G__11956 = (i + (1)); +var G__11957 = cljs.core.next(s__$1); +i = G__11956; +s__$1 = G__11957; +continue; +} else { +return a; +} +break; +} +} else { +var n__8981__auto___11958 = size; +var i_11959 = (0); +while(true){ +if((i_11959 < n__8981__auto___11958)){ +(a[i_11959] = init_val_or_seq); + +var G__11960 = (i_11959 + (1)); +i_11959 = G__11960; +continue; +} else { +} +break; +} + +return a; +} +}); + +cljs.core.double_array.cljs$lang$maxFixedArity = 2; + +/** + * Creates an array of objects. Does not coerce array, provided for compatibility + * with Clojure. + */ +cljs.core.object_array = (function cljs$core$object_array(var_args){ +var args11961 = []; +var len__9181__auto___11964 = arguments.length; +var i__9182__auto___11965 = (0); +while(true){ +if((i__9182__auto___11965 < len__9181__auto___11964)){ +args11961.push((arguments[i__9182__auto___11965])); + +var G__11966 = (i__9182__auto___11965 + (1)); +i__9182__auto___11965 = G__11966; +continue; +} else { +} +break; +} + +var G__11963 = args11961.length; +switch (G__11963) { +case 1: +return cljs.core.object_array.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.object_array.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args11961.length)].join(''))); + +} +}); + +cljs.core.object_array.cljs$core$IFn$_invoke$arity$1 = (function (size_or_seq){ +if(typeof size_or_seq === 'number'){ +return cljs.core.object_array.cljs$core$IFn$_invoke$arity$2(size_or_seq,null); +} else { +return cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(size_or_seq); +} +}); + +cljs.core.object_array.cljs$core$IFn$_invoke$arity$2 = (function (size,init_val_or_seq){ +var a = (new Array(size)); +if(cljs.core.seq_QMARK_(init_val_or_seq)){ +var s = cljs.core.seq(init_val_or_seq); +var i = (0); +var s__$1 = s; +while(true){ +if((s__$1) && ((i < size))){ +(a[i] = cljs.core.first(s__$1)); + +var G__11968 = (i + (1)); +var G__11969 = cljs.core.next(s__$1); +i = G__11968; +s__$1 = G__11969; +continue; +} else { +return a; +} +break; +} +} else { +var n__8981__auto___11970 = size; +var i_11971 = (0); +while(true){ +if((i_11971 < n__8981__auto___11970)){ +(a[i_11971] = init_val_or_seq); + +var G__11972 = (i_11971 + (1)); +i_11971 = G__11972; +continue; +} else { +} +break; +} + +return a; +} +}); + +cljs.core.object_array.cljs$lang$maxFixedArity = 2; + +/** + * If coll is counted? returns its count, else will count at most the first n + * elements of coll using its seq + */ +cljs.core.bounded_count = (function cljs$core$bounded_count(n,coll){ +if(cljs.core.counted_QMARK_(coll)){ +return cljs.core.count(coll); +} else { +var i = (0); +var s = cljs.core.seq(coll); +while(true){ +if((!((s == null))) && ((i < n))){ +var G__11973 = (i + (1)); +var G__11974 = cljs.core.next(s); +i = G__11973; +s = G__11974; +continue; +} else { +return i; +} +break; +} +} +}); +cljs.core.spread = (function cljs$core$spread(arglist){ +if((arglist == null)){ +return null; +} else { +if((cljs.core.next(arglist) == null)){ +return cljs.core.seq(cljs.core.first(arglist)); +} else { +return cljs.core.cons(cljs.core.first(arglist),(function (){var G__11976 = cljs.core.next(arglist); +return (cljs.core.spread.cljs$core$IFn$_invoke$arity$1 ? cljs.core.spread.cljs$core$IFn$_invoke$arity$1(G__11976) : cljs.core.spread.call(null,G__11976)); +})()); + +} +} +}); +/** + * Returns a lazy seq representing the concatenation of the elements in the supplied colls. + */ +cljs.core.concat = (function cljs$core$concat(var_args){ +var args11977 = []; +var len__9181__auto___11989 = arguments.length; +var i__9182__auto___11990 = (0); +while(true){ +if((i__9182__auto___11990 < len__9181__auto___11989)){ +args11977.push((arguments[i__9182__auto___11990])); + +var G__11991 = (i__9182__auto___11990 + (1)); +i__9182__auto___11990 = G__11991; +continue; +} else { +} +break; +} + +var G__11982 = args11977.length; +switch (G__11982) { +case 0: +return cljs.core.concat.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.concat.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.concat.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11977.slice((2)),(0),null)); +return cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.concat.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (new cljs.core.LazySeq(null,(function (){ +return null; +}),null,null)); +}); + +cljs.core.concat.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return (new cljs.core.LazySeq(null,(function (){ +return x; +}),null,null)); +}); + +cljs.core.concat.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return (new cljs.core.LazySeq(null,(function (){ +var s = cljs.core.seq(x); +if(s){ +if(cljs.core.chunked_seq_QMARK_(s)){ +return cljs.core.chunk_cons(cljs.core.chunk_first(s),cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core.chunk_rest(s),y)); +} else { +return cljs.core.cons(cljs.core.first(s),cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core.rest(s),y)); +} +} else { +return y; +} +}),null,null)); +}); + +cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,zs){ +var cat = (function cljs$core$cat(xys,zs__$1){ +return (new cljs.core.LazySeq(null,(function (){ +var xys__$1 = cljs.core.seq(xys); +if(xys__$1){ +if(cljs.core.chunked_seq_QMARK_(xys__$1)){ +return cljs.core.chunk_cons(cljs.core.chunk_first(xys__$1),cljs$core$cat(cljs.core.chunk_rest(xys__$1),zs__$1)); +} else { +return cljs.core.cons(cljs.core.first(xys__$1),cljs$core$cat(cljs.core.rest(xys__$1),zs__$1)); +} +} else { +if(cljs.core.truth_(zs__$1)){ +return cljs$core$cat(cljs.core.first(zs__$1),cljs.core.next(zs__$1)); +} else { +return null; +} +} +}),null,null)); +}); +return cat(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(x,y),zs); +}); + +cljs.core.concat.cljs$lang$applyTo = (function (seq11978){ +var G__11979 = cljs.core.first(seq11978); +var seq11978__$1 = cljs.core.next(seq11978); +var G__11980 = cljs.core.first(seq11978__$1); +var seq11978__$2 = cljs.core.next(seq11978__$1); +return cljs.core.concat.cljs$core$IFn$_invoke$arity$variadic(G__11979,G__11980,seq11978__$2); +}); + +cljs.core.concat.cljs$lang$maxFixedArity = (2); + +/** + * Creates a new list containing the items prepended to the rest, the + * last of which will be treated as a sequence. + */ +cljs.core.list_STAR_ = (function cljs$core$list_STAR_(var_args){ +var args11993 = []; +var len__9181__auto___12001 = arguments.length; +var i__9182__auto___12002 = (0); +while(true){ +if((i__9182__auto___12002 < len__9181__auto___12001)){ +args11993.push((arguments[i__9182__auto___12002])); + +var G__12003 = (i__9182__auto___12002 + (1)); +i__9182__auto___12002 = G__12003; +continue; +} else { +} +break; +} + +var G__12000 = args11993.length; +switch (G__12000) { +case 1: +return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args11993.slice((4)),(0),null)); +return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),argseq__9204__auto__); + +} +}); + +cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$1 = (function (args){ +return cljs.core.seq(args); +}); + +cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$2 = (function (a,args){ +return cljs.core.cons(a,args); +}); + +cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3 = (function (a,b,args){ +return cljs.core.cons(a,cljs.core.cons(b,args)); +}); + +cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4 = (function (a,b,c,args){ +return cljs.core.cons(a,cljs.core.cons(b,cljs.core.cons(c,args))); +}); + +cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic = (function (a,b,c,d,more){ +return cljs.core.cons(a,cljs.core.cons(b,cljs.core.cons(c,cljs.core.cons(d,cljs.core.spread(more))))); +}); + +cljs.core.list_STAR_.cljs$lang$applyTo = (function (seq11994){ +var G__11995 = cljs.core.first(seq11994); +var seq11994__$1 = cljs.core.next(seq11994); +var G__11996 = cljs.core.first(seq11994__$1); +var seq11994__$2 = cljs.core.next(seq11994__$1); +var G__11997 = cljs.core.first(seq11994__$2); +var seq11994__$3 = cljs.core.next(seq11994__$2); +var G__11998 = cljs.core.first(seq11994__$3); +var seq11994__$4 = cljs.core.next(seq11994__$3); +return cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$variadic(G__11995,G__11996,G__11997,G__11998,seq11994__$4); +}); + +cljs.core.list_STAR_.cljs$lang$maxFixedArity = (4); + +/** + * Returns a new, transient version of the collection, in constant time. + */ +cljs.core.transient$ = (function cljs$core$transient(coll){ +return cljs.core._as_transient(coll); +}); +/** + * Returns a new, persistent version of the transient collection, in + * constant time. The transient collection cannot be used after this + * call, any such use will throw an exception. + */ +cljs.core.persistent_BANG_ = (function cljs$core$persistent_BANG_(tcoll){ +return cljs.core._persistent_BANG_(tcoll); +}); +/** + * Adds val to the transient collection, and return tcoll. The 'addition' + * may happen at different 'places' depending on the concrete type. + */ +cljs.core.conj_BANG_ = (function cljs$core$conj_BANG_(var_args){ +var args12005 = []; +var len__9181__auto___12011 = arguments.length; +var i__9182__auto___12012 = (0); +while(true){ +if((i__9182__auto___12012 < len__9181__auto___12011)){ +args12005.push((arguments[i__9182__auto___12012])); + +var G__12013 = (i__9182__auto___12012 + (1)); +i__9182__auto___12012 = G__12013; +continue; +} else { +} +break; +} + +var G__12010 = args12005.length; +switch (G__12010) { +case 0: +return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12005.slice((2)),(0),null)); +return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.transient$(cljs.core.PersistentVector.EMPTY); +}); + +cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (tcoll){ +return tcoll; +}); + +cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (tcoll,val){ +return cljs.core._conj_BANG_(tcoll,val); +}); + +cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (tcoll,val,vals){ +while(true){ +var ntcoll = cljs.core._conj_BANG_(tcoll,val); +if(cljs.core.truth_(vals)){ +var G__12015 = ntcoll; +var G__12016 = cljs.core.first(vals); +var G__12017 = cljs.core.next(vals); +tcoll = G__12015; +val = G__12016; +vals = G__12017; +continue; +} else { +return ntcoll; +} +break; +} +}); + +cljs.core.conj_BANG_.cljs$lang$applyTo = (function (seq12006){ +var G__12007 = cljs.core.first(seq12006); +var seq12006__$1 = cljs.core.next(seq12006); +var G__12008 = cljs.core.first(seq12006__$1); +var seq12006__$2 = cljs.core.next(seq12006__$1); +return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__12007,G__12008,seq12006__$2); +}); + +cljs.core.conj_BANG_.cljs$lang$maxFixedArity = (2); + +/** + * When applied to a transient map, adds mapping of key(s) to + * val(s). When applied to a transient vector, sets the val at index. + * Note - index must be <= (count vector). Returns coll. + */ +cljs.core.assoc_BANG_ = (function cljs$core$assoc_BANG_(var_args){ +var args12018 = []; +var len__9181__auto___12025 = arguments.length; +var i__9182__auto___12026 = (0); +while(true){ +if((i__9182__auto___12026 < len__9181__auto___12025)){ +args12018.push((arguments[i__9182__auto___12026])); + +var G__12027 = (i__9182__auto___12026 + (1)); +i__9182__auto___12026 = G__12027; +continue; +} else { +} +break; +} + +var G__12024 = args12018.length; +switch (G__12024) { +case 3: +return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12018.slice((3)),(0),null)); +return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3 = (function (tcoll,key,val){ +return cljs.core._assoc_BANG_(tcoll,key,val); +}); + +cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (tcoll,key,val,kvs){ +while(true){ +var ntcoll = cljs.core._assoc_BANG_(tcoll,key,val); +if(cljs.core.truth_(kvs)){ +var G__12029 = ntcoll; +var G__12030 = cljs.core.first(kvs); +var G__12031 = cljs.core.second(kvs); +var G__12032 = cljs.core.nnext(kvs); +tcoll = G__12029; +key = G__12030; +val = G__12031; +kvs = G__12032; +continue; +} else { +return ntcoll; +} +break; +} +}); + +cljs.core.assoc_BANG_.cljs$lang$applyTo = (function (seq12019){ +var G__12020 = cljs.core.first(seq12019); +var seq12019__$1 = cljs.core.next(seq12019); +var G__12021 = cljs.core.first(seq12019__$1); +var seq12019__$2 = cljs.core.next(seq12019__$1); +var G__12022 = cljs.core.first(seq12019__$2); +var seq12019__$3 = cljs.core.next(seq12019__$2); +return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__12020,G__12021,G__12022,seq12019__$3); +}); + +cljs.core.assoc_BANG_.cljs$lang$maxFixedArity = (3); + +/** + * Returns a transient map that doesn't contain a mapping for key(s). + */ +cljs.core.dissoc_BANG_ = (function cljs$core$dissoc_BANG_(var_args){ +var args12033 = []; +var len__9181__auto___12039 = arguments.length; +var i__9182__auto___12040 = (0); +while(true){ +if((i__9182__auto___12040 < len__9181__auto___12039)){ +args12033.push((arguments[i__9182__auto___12040])); + +var G__12041 = (i__9182__auto___12040 + (1)); +i__9182__auto___12040 = G__12041; +continue; +} else { +} +break; +} + +var G__12038 = args12033.length; +switch (G__12038) { +case 2: +return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12033.slice((2)),(0),null)); +return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (tcoll,key){ +return cljs.core._dissoc_BANG_(tcoll,key); +}); + +cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (tcoll,key,ks){ +while(true){ +var ntcoll = cljs.core._dissoc_BANG_(tcoll,key); +if(cljs.core.truth_(ks)){ +var G__12043 = ntcoll; +var G__12044 = cljs.core.first(ks); +var G__12045 = cljs.core.next(ks); +tcoll = G__12043; +key = G__12044; +ks = G__12045; +continue; +} else { +return ntcoll; +} +break; +} +}); + +cljs.core.dissoc_BANG_.cljs$lang$applyTo = (function (seq12034){ +var G__12035 = cljs.core.first(seq12034); +var seq12034__$1 = cljs.core.next(seq12034); +var G__12036 = cljs.core.first(seq12034__$1); +var seq12034__$2 = cljs.core.next(seq12034__$1); +return cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__12035,G__12036,seq12034__$2); +}); + +cljs.core.dissoc_BANG_.cljs$lang$maxFixedArity = (2); + +/** + * Removes the last item from a transient vector. If + * the collection is empty, throws an exception. Returns tcoll + */ +cljs.core.pop_BANG_ = (function cljs$core$pop_BANG_(tcoll){ +return cljs.core._pop_BANG_(tcoll); +}); +/** + * disj[oin]. Returns a transient set of the same (hashed/sorted) type, that + * does not contain key(s). + */ +cljs.core.disj_BANG_ = (function cljs$core$disj_BANG_(var_args){ +var args12046 = []; +var len__9181__auto___12052 = arguments.length; +var i__9182__auto___12053 = (0); +while(true){ +if((i__9182__auto___12053 < len__9181__auto___12052)){ +args12046.push((arguments[i__9182__auto___12053])); + +var G__12054 = (i__9182__auto___12053 + (1)); +i__9182__auto___12053 = G__12054; +continue; +} else { +} +break; +} + +var G__12051 = args12046.length; +switch (G__12051) { +case 2: +return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12046.slice((2)),(0),null)); +return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (tcoll,val){ +return cljs.core._disjoin_BANG_(tcoll,val); +}); + +cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (tcoll,val,vals){ +while(true){ +var ntcoll = cljs.core._disjoin_BANG_(tcoll,val); +if(cljs.core.truth_(vals)){ +var G__12056 = ntcoll; +var G__12057 = cljs.core.first(vals); +var G__12058 = cljs.core.next(vals); +tcoll = G__12056; +val = G__12057; +vals = G__12058; +continue; +} else { +return ntcoll; +} +break; +} +}); + +cljs.core.disj_BANG_.cljs$lang$applyTo = (function (seq12047){ +var G__12048 = cljs.core.first(seq12047); +var seq12047__$1 = cljs.core.next(seq12047); +var G__12049 = cljs.core.first(seq12047__$1); +var seq12047__$2 = cljs.core.next(seq12047__$1); +return cljs.core.disj_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__12048,G__12049,seq12047__$2); +}); + +cljs.core.disj_BANG_.cljs$lang$maxFixedArity = (2); + + +cljs.core.apply_to = (function cljs$core$apply_to(f,argc,args){ +var args__$1 = cljs.core.seq(args); +if((argc === (0))){ +return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +} else { +var a9025 = cljs.core._first(args__$1); +var args__$2 = cljs.core._rest(args__$1); +if((argc === (1))){ +if(f.cljs$core$IFn$_invoke$arity$1){ +return f.cljs$core$IFn$_invoke$arity$1(a9025); +} else { +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(a9025) : f.call(null,a9025)); +} +} else { +var b9026 = cljs.core._first(args__$2); +var args__$3 = cljs.core._rest(args__$2); +if((argc === (2))){ +if(f.cljs$core$IFn$_invoke$arity$2){ +return f.cljs$core$IFn$_invoke$arity$2(a9025,b9026); +} else { +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(a9025,b9026) : f.call(null,a9025,b9026)); +} +} else { +var c9027 = cljs.core._first(args__$3); +var args__$4 = cljs.core._rest(args__$3); +if((argc === (3))){ +if(f.cljs$core$IFn$_invoke$arity$3){ +return f.cljs$core$IFn$_invoke$arity$3(a9025,b9026,c9027); +} else { +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(a9025,b9026,c9027) : f.call(null,a9025,b9026,c9027)); +} +} else { +var d9028 = cljs.core._first(args__$4); +var args__$5 = cljs.core._rest(args__$4); +if((argc === (4))){ +if(f.cljs$core$IFn$_invoke$arity$4){ +return f.cljs$core$IFn$_invoke$arity$4(a9025,b9026,c9027,d9028); +} else { +return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(a9025,b9026,c9027,d9028) : f.call(null,a9025,b9026,c9027,d9028)); +} +} else { +var e9029 = cljs.core._first(args__$5); +var args__$6 = cljs.core._rest(args__$5); +if((argc === (5))){ +if(f.cljs$core$IFn$_invoke$arity$5){ +return f.cljs$core$IFn$_invoke$arity$5(a9025,b9026,c9027,d9028,e9029); +} else { +return (f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(a9025,b9026,c9027,d9028,e9029) : f.call(null,a9025,b9026,c9027,d9028,e9029)); +} +} else { +var f9030 = cljs.core._first(args__$6); +var args__$7 = cljs.core._rest(args__$6); +if((argc === (6))){ +if(f.cljs$core$IFn$_invoke$arity$6){ +return f.cljs$core$IFn$_invoke$arity$6(a9025,b9026,c9027,d9028,e9029,f9030); +} else { +return (f.cljs$core$IFn$_invoke$arity$6 ? f.cljs$core$IFn$_invoke$arity$6(a9025,b9026,c9027,d9028,e9029,f9030) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030)); +} +} else { +var g9031 = cljs.core._first(args__$7); +var args__$8 = cljs.core._rest(args__$7); +if((argc === (7))){ +if(f.cljs$core$IFn$_invoke$arity$7){ +return f.cljs$core$IFn$_invoke$arity$7(a9025,b9026,c9027,d9028,e9029,f9030,g9031); +} else { +return (f.cljs$core$IFn$_invoke$arity$7 ? f.cljs$core$IFn$_invoke$arity$7(a9025,b9026,c9027,d9028,e9029,f9030,g9031) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031)); +} +} else { +var h9032 = cljs.core._first(args__$8); +var args__$9 = cljs.core._rest(args__$8); +if((argc === (8))){ +if(f.cljs$core$IFn$_invoke$arity$8){ +return f.cljs$core$IFn$_invoke$arity$8(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032); +} else { +return (f.cljs$core$IFn$_invoke$arity$8 ? f.cljs$core$IFn$_invoke$arity$8(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032)); +} +} else { +var i9033 = cljs.core._first(args__$9); +var args__$10 = cljs.core._rest(args__$9); +if((argc === (9))){ +if(f.cljs$core$IFn$_invoke$arity$9){ +return f.cljs$core$IFn$_invoke$arity$9(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033); +} else { +return (f.cljs$core$IFn$_invoke$arity$9 ? f.cljs$core$IFn$_invoke$arity$9(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033)); +} +} else { +var j9034 = cljs.core._first(args__$10); +var args__$11 = cljs.core._rest(args__$10); +if((argc === (10))){ +if(f.cljs$core$IFn$_invoke$arity$10){ +return f.cljs$core$IFn$_invoke$arity$10(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034); +} else { +return (f.cljs$core$IFn$_invoke$arity$10 ? f.cljs$core$IFn$_invoke$arity$10(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034)); +} +} else { +var k9035 = cljs.core._first(args__$11); +var args__$12 = cljs.core._rest(args__$11); +if((argc === (11))){ +if(f.cljs$core$IFn$_invoke$arity$11){ +return f.cljs$core$IFn$_invoke$arity$11(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035); +} else { +return (f.cljs$core$IFn$_invoke$arity$11 ? f.cljs$core$IFn$_invoke$arity$11(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035)); +} +} else { +var l9036 = cljs.core._first(args__$12); +var args__$13 = cljs.core._rest(args__$12); +if((argc === (12))){ +if(f.cljs$core$IFn$_invoke$arity$12){ +return f.cljs$core$IFn$_invoke$arity$12(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036); +} else { +return (f.cljs$core$IFn$_invoke$arity$12 ? f.cljs$core$IFn$_invoke$arity$12(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036)); +} +} else { +var m9037 = cljs.core._first(args__$13); +var args__$14 = cljs.core._rest(args__$13); +if((argc === (13))){ +if(f.cljs$core$IFn$_invoke$arity$13){ +return f.cljs$core$IFn$_invoke$arity$13(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037); +} else { +return (f.cljs$core$IFn$_invoke$arity$13 ? f.cljs$core$IFn$_invoke$arity$13(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037)); +} +} else { +var n9038 = cljs.core._first(args__$14); +var args__$15 = cljs.core._rest(args__$14); +if((argc === (14))){ +if(f.cljs$core$IFn$_invoke$arity$14){ +return f.cljs$core$IFn$_invoke$arity$14(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038); +} else { +return (f.cljs$core$IFn$_invoke$arity$14 ? f.cljs$core$IFn$_invoke$arity$14(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038)); +} +} else { +var o9039 = cljs.core._first(args__$15); +var args__$16 = cljs.core._rest(args__$15); +if((argc === (15))){ +if(f.cljs$core$IFn$_invoke$arity$15){ +return f.cljs$core$IFn$_invoke$arity$15(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039); +} else { +return (f.cljs$core$IFn$_invoke$arity$15 ? f.cljs$core$IFn$_invoke$arity$15(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039)); +} +} else { +var p9040 = cljs.core._first(args__$16); +var args__$17 = cljs.core._rest(args__$16); +if((argc === (16))){ +if(f.cljs$core$IFn$_invoke$arity$16){ +return f.cljs$core$IFn$_invoke$arity$16(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040); +} else { +return (f.cljs$core$IFn$_invoke$arity$16 ? f.cljs$core$IFn$_invoke$arity$16(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040)); +} +} else { +var q9041 = cljs.core._first(args__$17); +var args__$18 = cljs.core._rest(args__$17); +if((argc === (17))){ +if(f.cljs$core$IFn$_invoke$arity$17){ +return f.cljs$core$IFn$_invoke$arity$17(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041); +} else { +return (f.cljs$core$IFn$_invoke$arity$17 ? f.cljs$core$IFn$_invoke$arity$17(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041)); +} +} else { +var r9042 = cljs.core._first(args__$18); +var args__$19 = cljs.core._rest(args__$18); +if((argc === (18))){ +if(f.cljs$core$IFn$_invoke$arity$18){ +return f.cljs$core$IFn$_invoke$arity$18(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042); +} else { +return (f.cljs$core$IFn$_invoke$arity$18 ? f.cljs$core$IFn$_invoke$arity$18(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042)); +} +} else { +var s9043 = cljs.core._first(args__$19); +var args__$20 = cljs.core._rest(args__$19); +if((argc === (19))){ +if(f.cljs$core$IFn$_invoke$arity$19){ +return f.cljs$core$IFn$_invoke$arity$19(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042,s9043); +} else { +return (f.cljs$core$IFn$_invoke$arity$19 ? f.cljs$core$IFn$_invoke$arity$19(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042,s9043) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042,s9043)); +} +} else { +var t9044 = cljs.core._first(args__$20); +var args__$21 = cljs.core._rest(args__$20); +if((argc === (20))){ +if(f.cljs$core$IFn$_invoke$arity$20){ +return f.cljs$core$IFn$_invoke$arity$20(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042,s9043,t9044); +} else { +return (f.cljs$core$IFn$_invoke$arity$20 ? f.cljs$core$IFn$_invoke$arity$20(a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042,s9043,t9044) : f.call(null,a9025,b9026,c9027,d9028,e9029,f9030,g9031,h9032,i9033,j9034,k9035,l9036,m9037,n9038,o9039,p9040,q9041,r9042,s9043,t9044)); +} +} else { +throw (new Error("Only up to 20 arguments supported on functions")); +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +}); + +/** + * Applies fn f to the argument list formed by prepending intervening arguments to args. + */ +cljs.core.apply = (function cljs$core$apply(var_args){ +var args12059 = []; +var len__9181__auto___12068 = arguments.length; +var i__9182__auto___12069 = (0); +while(true){ +if((i__9182__auto___12069 < len__9181__auto___12068)){ +args12059.push((arguments[i__9182__auto___12069])); + +var G__12070 = (i__9182__auto___12069 + (1)); +i__9182__auto___12069 = G__12070; +continue; +} else { +} +break; +} + +var G__12067 = args12059.length; +switch (G__12067) { +case 2: +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.apply.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.apply.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core.apply.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12059.slice((5)),(0),null)); +return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),argseq__9204__auto__); + +} +}); + +cljs.core.apply.cljs$core$IFn$_invoke$arity$2 = (function (f,args){ +var fixed_arity = f.cljs$lang$maxFixedArity; +if(f.cljs$lang$applyTo){ +var bc = cljs.core.bounded_count((fixed_arity + (1)),args); +if((bc <= fixed_arity)){ +return cljs.core.apply_to(f,bc,args); +} else { +return f.cljs$lang$applyTo(args); +} +} else { +return f.apply(f,cljs.core.to_array(args)); +} +}); + +cljs.core.apply.cljs$core$IFn$_invoke$arity$3 = (function (f,x,args){ +var arglist = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$2(x,args); +var fixed_arity = f.cljs$lang$maxFixedArity; +if(f.cljs$lang$applyTo){ +var bc = cljs.core.bounded_count((fixed_arity + (1)),arglist); +if((bc <= fixed_arity)){ +return cljs.core.apply_to(f,bc,arglist); +} else { +return f.cljs$lang$applyTo(arglist); +} +} else { +return f.apply(f,cljs.core.to_array(arglist)); +} +}); + +cljs.core.apply.cljs$core$IFn$_invoke$arity$4 = (function (f,x,y,args){ +var arglist = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$3(x,y,args); +var fixed_arity = f.cljs$lang$maxFixedArity; +if(f.cljs$lang$applyTo){ +var bc = cljs.core.bounded_count((fixed_arity + (1)),arglist); +if((bc <= fixed_arity)){ +return cljs.core.apply_to(f,bc,arglist); +} else { +return f.cljs$lang$applyTo(arglist); +} +} else { +return f.apply(f,cljs.core.to_array(arglist)); +} +}); + +cljs.core.apply.cljs$core$IFn$_invoke$arity$5 = (function (f,x,y,z,args){ +var arglist = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(x,y,z,args); +var fixed_arity = f.cljs$lang$maxFixedArity; +if(f.cljs$lang$applyTo){ +var bc = cljs.core.bounded_count((fixed_arity + (1)),arglist); +if((bc <= fixed_arity)){ +return cljs.core.apply_to(f,bc,arglist); +} else { +return f.cljs$lang$applyTo(arglist); +} +} else { +return f.apply(f,cljs.core.to_array(arglist)); +} +}); + +cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic = (function (f,a,b,c,d,args){ +var arglist = cljs.core.cons(a,cljs.core.cons(b,cljs.core.cons(c,cljs.core.cons(d,cljs.core.spread(args))))); +var fixed_arity = f.cljs$lang$maxFixedArity; +if(f.cljs$lang$applyTo){ +var bc = cljs.core.bounded_count((fixed_arity + (1)),arglist); +if((bc <= fixed_arity)){ +return cljs.core.apply_to(f,bc,arglist); +} else { +return f.cljs$lang$applyTo(arglist); +} +} else { +return f.apply(f,cljs.core.to_array(arglist)); +} +}); + +cljs.core.apply.cljs$lang$applyTo = (function (seq12060){ +var G__12061 = cljs.core.first(seq12060); +var seq12060__$1 = cljs.core.next(seq12060); +var G__12062 = cljs.core.first(seq12060__$1); +var seq12060__$2 = cljs.core.next(seq12060__$1); +var G__12063 = cljs.core.first(seq12060__$2); +var seq12060__$3 = cljs.core.next(seq12060__$2); +var G__12064 = cljs.core.first(seq12060__$3); +var seq12060__$4 = cljs.core.next(seq12060__$3); +var G__12065 = cljs.core.first(seq12060__$4); +var seq12060__$5 = cljs.core.next(seq12060__$4); +return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(G__12061,G__12062,G__12063,G__12064,G__12065,seq12060__$5); +}); + +cljs.core.apply.cljs$lang$maxFixedArity = (5); + +/** + * Returns an object of the same type and value as obj, with + * (apply f (meta obj) args) as its metadata. + */ +cljs.core.vary_meta = (function cljs$core$vary_meta(var_args){ +var args12072 = []; +var len__9181__auto___12097 = arguments.length; +var i__9182__auto___12098 = (0); +while(true){ +if((i__9182__auto___12098 < len__9181__auto___12097)){ +args12072.push((arguments[i__9182__auto___12098])); + +var G__12099 = (i__9182__auto___12098 + (1)); +i__9182__auto___12098 = G__12099; +continue; +} else { +} +break; +} + +var G__12081 = args12072.length; +switch (G__12081) { +case 2: +return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +case 6: +return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$6((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12072.slice((6)),(0),null)); +return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),argseq__9204__auto__); + +} +}); + +cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$2 = (function (obj,f){ +return cljs.core.with_meta(obj,(function (){var G__12082 = cljs.core.meta(obj); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12082) : f.call(null,G__12082)); +})()); +}); + +cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$3 = (function (obj,f,a){ +return cljs.core.with_meta(obj,(function (){var G__12083 = cljs.core.meta(obj); +var G__12084 = a; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12083,G__12084) : f.call(null,G__12083,G__12084)); +})()); +}); + +cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$4 = (function (obj,f,a,b){ +return cljs.core.with_meta(obj,(function (){var G__12085 = cljs.core.meta(obj); +var G__12086 = a; +var G__12087 = b; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12085,G__12086,G__12087) : f.call(null,G__12085,G__12086,G__12087)); +})()); +}); + +cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$5 = (function (obj,f,a,b,c){ +return cljs.core.with_meta(obj,(function (){var G__12088 = cljs.core.meta(obj); +var G__12089 = a; +var G__12090 = b; +var G__12091 = c; +return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__12088,G__12089,G__12090,G__12091) : f.call(null,G__12088,G__12089,G__12090,G__12091)); +})()); +}); + +cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$6 = (function (obj,f,a,b,c,d){ +return cljs.core.with_meta(obj,(function (){var G__12092 = cljs.core.meta(obj); +var G__12093 = a; +var G__12094 = b; +var G__12095 = c; +var G__12096 = d; +return (f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(G__12092,G__12093,G__12094,G__12095,G__12096) : f.call(null,G__12092,G__12093,G__12094,G__12095,G__12096)); +})()); +}); + +cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$variadic = (function (obj,f,a,b,c,d,args){ +return cljs.core.with_meta(obj,cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f,cljs.core.meta(obj),a,b,c,cljs.core.array_seq([d,args], 0))); +}); + +cljs.core.vary_meta.cljs$lang$applyTo = (function (seq12073){ +var G__12074 = cljs.core.first(seq12073); +var seq12073__$1 = cljs.core.next(seq12073); +var G__12075 = cljs.core.first(seq12073__$1); +var seq12073__$2 = cljs.core.next(seq12073__$1); +var G__12076 = cljs.core.first(seq12073__$2); +var seq12073__$3 = cljs.core.next(seq12073__$2); +var G__12077 = cljs.core.first(seq12073__$3); +var seq12073__$4 = cljs.core.next(seq12073__$3); +var G__12078 = cljs.core.first(seq12073__$4); +var seq12073__$5 = cljs.core.next(seq12073__$4); +var G__12079 = cljs.core.first(seq12073__$5); +var seq12073__$6 = cljs.core.next(seq12073__$5); +return cljs.core.vary_meta.cljs$core$IFn$_invoke$arity$variadic(G__12074,G__12075,G__12076,G__12077,G__12078,G__12079,seq12073__$6); +}); + +cljs.core.vary_meta.cljs$lang$maxFixedArity = (6); + +/** + * Same as (not (= obj1 obj2)) + */ +cljs.core.not_EQ_ = (function cljs$core$not_EQ_(var_args){ +var args12101 = []; +var len__9181__auto___12107 = arguments.length; +var i__9182__auto___12108 = (0); +while(true){ +if((i__9182__auto___12108 < len__9181__auto___12107)){ +args12101.push((arguments[i__9182__auto___12108])); + +var G__12109 = (i__9182__auto___12108 + (1)); +i__9182__auto___12108 = G__12109; +continue; +} else { +} +break; +} + +var G__12106 = args12101.length; +switch (G__12106) { +case 1: +return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12101.slice((2)),(0),null)); +return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return false; +}); + +cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2 = (function (x,y){ +return !(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x,y)); +}); + +cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic = (function (x,y,more){ +return cljs.core.not(cljs.core.apply.cljs$core$IFn$_invoke$arity$4(cljs.core._EQ_,x,y,more)); +}); + +cljs.core.not_EQ_.cljs$lang$applyTo = (function (seq12102){ +var G__12103 = cljs.core.first(seq12102); +var seq12102__$1 = cljs.core.next(seq12102); +var G__12104 = cljs.core.first(seq12102__$1); +var seq12102__$2 = cljs.core.next(seq12102__$1); +return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$variadic(G__12103,G__12104,seq12102__$2); +}); + +cljs.core.not_EQ_.cljs$lang$maxFixedArity = (2); + +/** + * If coll is empty, returns nil, else coll + */ +cljs.core.not_empty = (function cljs$core$not_empty(coll){ +if(cljs.core.seq(coll)){ +return coll; +} else { +return null; +} +}); +cljs.core.nil_iter = (function cljs$core$nil_iter(){ +if(typeof cljs.core.t_cljs$core12114 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.t_cljs$core12114 = (function (meta12115){ +this.meta12115 = meta12115; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.t_cljs$core12114.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_12116,meta12115__$1){ +var self__ = this; +var _12116__$1 = this; +return (new cljs.core.t_cljs$core12114(meta12115__$1)); +}); + +cljs.core.t_cljs$core12114.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_12116){ +var self__ = this; +var _12116__$1 = this; +return self__.meta12115; +}); + +cljs.core.t_cljs$core12114.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +return false; +}); + +cljs.core.t_cljs$core12114.prototype.next = (function (){ +var self__ = this; +var _ = this; +return (new Error("No such element")); +}); + +cljs.core.t_cljs$core12114.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.t_cljs$core12114.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta12115], null); +}); + +cljs.core.t_cljs$core12114.cljs$lang$type = true; + +cljs.core.t_cljs$core12114.cljs$lang$ctorStr = "cljs.core/t_cljs$core12114"; + +cljs.core.t_cljs$core12114.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/t_cljs$core12114"); +}); + +cljs.core.__GT_t_cljs$core12114 = (function cljs$core$nil_iter_$___GT_t_cljs$core12114(meta12115){ +return (new cljs.core.t_cljs$core12114(meta12115)); +}); + +} + +return (new cljs.core.t_cljs$core12114(cljs.core.PersistentArrayMap.EMPTY)); +}); + +/** +* @constructor +*/ +cljs.core.StringIter = (function (s,i){ +this.s = s; +this.i = i; +}) +cljs.core.StringIter.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +return (self__.i < self__.s.length); +}); + +cljs.core.StringIter.prototype.next = (function (){ +var self__ = this; +var _ = this; +var ret = self__.s.charAt(self__.i); +self__.i = (self__.i + (1)); + +return ret; +}); + +cljs.core.StringIter.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.StringIter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$s,cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.StringIter.cljs$lang$type = true; + +cljs.core.StringIter.cljs$lang$ctorStr = "cljs.core/StringIter"; + +cljs.core.StringIter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/StringIter"); +}); + +cljs.core.__GT_StringIter = (function cljs$core$__GT_StringIter(s,i){ +return (new cljs.core.StringIter(s,i)); +}); + +cljs.core.string_iter = (function cljs$core$string_iter(x){ +return (new cljs.core.StringIter(x,(0))); +}); + +/** +* @constructor +*/ +cljs.core.ArrayIter = (function (arr,i){ +this.arr = arr; +this.i = i; +}) +cljs.core.ArrayIter.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +return (self__.i < self__.arr.length); +}); + +cljs.core.ArrayIter.prototype.next = (function (){ +var self__ = this; +var _ = this; +var ret = (self__.arr[self__.i]); +self__.i = (self__.i + (1)); + +return ret; +}); + +cljs.core.ArrayIter.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.ArrayIter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ArrayIter.cljs$lang$type = true; + +cljs.core.ArrayIter.cljs$lang$ctorStr = "cljs.core/ArrayIter"; + +cljs.core.ArrayIter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ArrayIter"); +}); + +cljs.core.__GT_ArrayIter = (function cljs$core$__GT_ArrayIter(arr,i){ +return (new cljs.core.ArrayIter(arr,i)); +}); + +cljs.core.array_iter = (function cljs$core$array_iter(x){ +return (new cljs.core.ArrayIter(x,(0))); +}); +cljs.core.INIT = ({}); +cljs.core.START = ({}); + +/** +* @constructor +*/ +cljs.core.SeqIter = (function (_seq,_next){ +this._seq = _seq; +this._next = _next; +}) +cljs.core.SeqIter.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +if((self__._seq === cljs.core.INIT)){ +self__._seq = cljs.core.START; + +self__._next = cljs.core.seq(self__._next); +} else { +if((self__._seq === self__._next)){ +self__._next = cljs.core.next(self__._seq); +} else { +} +} + +return !((self__._next == null)); +}); + +cljs.core.SeqIter.prototype.next = (function (){ +var self__ = this; +var this$ = this; +if(!(this$.hasNext())){ +throw (new Error("No such element")); +} else { +self__._seq = self__._next; + +return cljs.core.first(self__._next); +} +}); + +cljs.core.SeqIter.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.SeqIter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$_seq,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$_next,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.SeqIter.cljs$lang$type = true; + +cljs.core.SeqIter.cljs$lang$ctorStr = "cljs.core/SeqIter"; + +cljs.core.SeqIter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/SeqIter"); +}); + +cljs.core.__GT_SeqIter = (function cljs$core$__GT_SeqIter(_seq,_next){ +return (new cljs.core.SeqIter(_seq,_next)); +}); + +cljs.core.seq_iter = (function cljs$core$seq_iter(coll){ +return (new cljs.core.SeqIter(cljs.core.INIT,coll)); +}); +cljs.core.iter = (function cljs$core$iter(coll){ +if((coll == null)){ +return cljs.core.nil_iter(); +} else { +if(typeof coll === 'string'){ +return cljs.core.string_iter(coll); +} else { +if(cljs.core.array_QMARK_(coll)){ +return cljs.core.array_iter(coll); +} else { +if(cljs.core.iterable_QMARK_(coll)){ +return cljs.core._iterator(coll); +} else { +if(cljs.core.seqable_QMARK_(coll)){ +return cljs.core.seq_iter(coll); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot create iterator from "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(coll)].join(''))); + +} +} +} +} +} +}); + +/** +* @constructor +*/ +cljs.core.Many = (function (vals){ +this.vals = vals; +}) +cljs.core.Many.prototype.add = (function (o){ +var self__ = this; +var this$ = this; +self__.vals.push(o); + +return this$; +}); + +cljs.core.Many.prototype.remove = (function (){ +var self__ = this; +var this$ = this; +return self__.vals.shift(); +}); + +cljs.core.Many.prototype.isEmpty = (function (){ +var self__ = this; +var this$ = this; +return (self__.vals.length === (0)); +}); + +cljs.core.Many.prototype.toString = (function (){ +var self__ = this; +var this$ = this; +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("Many: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.vals)].join(''); +}); + +cljs.core.Many.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$vals], null); +}); + +cljs.core.Many.cljs$lang$type = true; + +cljs.core.Many.cljs$lang$ctorStr = "cljs.core/Many"; + +cljs.core.Many.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Many"); +}); + +cljs.core.__GT_Many = (function cljs$core$__GT_Many(vals){ +return (new cljs.core.Many(vals)); +}); + +cljs.core.NONE = ({}); + +/** +* @constructor +*/ +cljs.core.Single = (function (val){ +this.val = val; +}) +cljs.core.Single.prototype.add = (function (o){ +var self__ = this; +var this$ = this; +if((self__.val === cljs.core.NONE)){ +self__.val = o; + +return this$; +} else { +return (new cljs.core.Many([self__.val,o])); +} +}); + +cljs.core.Single.prototype.remove = (function (){ +var self__ = this; +var this$ = this; +if((self__.val === cljs.core.NONE)){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Removing object from empty buffer")].join(''))); +} else { +var ret = self__.val; +self__.val = cljs.core.NONE; + +return ret; +} +}); + +cljs.core.Single.prototype.isEmpty = (function (){ +var self__ = this; +var this$ = this; +return (self__.val === cljs.core.NONE); +}); + +cljs.core.Single.prototype.toString = (function (){ +var self__ = this; +var this$ = this; +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("Single: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.val)].join(''); +}); + +cljs.core.Single.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$val,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Single.cljs$lang$type = true; + +cljs.core.Single.cljs$lang$ctorStr = "cljs.core/Single"; + +cljs.core.Single.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Single"); +}); + +cljs.core.__GT_Single = (function cljs$core$__GT_Single(val){ +return (new cljs.core.Single(val)); +}); + + +/** +* @constructor +*/ +cljs.core.Empty = (function (){ +}) +cljs.core.Empty.prototype.add = (function (o){ +var self__ = this; +var this$ = this; +return (new cljs.core.Single(o)); +}); + +cljs.core.Empty.prototype.remove = (function (){ +var self__ = this; +var this$ = this; +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Removing object from empty buffer")].join(''))); +}); + +cljs.core.Empty.prototype.isEmpty = (function (){ +var self__ = this; +var this$ = this; +return true; +}); + +cljs.core.Empty.prototype.toString = (function (){ +var self__ = this; +var this$ = this; +return "Empty"; +}); + +cljs.core.Empty.getBasis = (function (){ +return cljs.core.PersistentVector.EMPTY; +}); + +cljs.core.Empty.cljs$lang$type = true; + +cljs.core.Empty.cljs$lang$ctorStr = "cljs.core/Empty"; + +cljs.core.Empty.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Empty"); +}); + +cljs.core.__GT_Empty = (function cljs$core$__GT_Empty(){ +return (new cljs.core.Empty()); +}); + +cljs.core.EMPTY = (new cljs.core.Empty()); + +/** +* @constructor +*/ +cljs.core.MultiIterator = (function (iters){ +this.iters = iters; +}) +cljs.core.MultiIterator.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +var iters__$1 = cljs.core.seq(self__.iters); +while(true){ +if(!((iters__$1 == null))){ +var iter = cljs.core.first(iters__$1); +if(!(iter.hasNext())){ +return false; +} else { +var G__12117 = cljs.core.next(iters__$1); +iters__$1 = G__12117; +continue; +} +} else { +return true; +} +break; +} +}); + +cljs.core.MultiIterator.prototype.next = (function (){ +var self__ = this; +var _ = this; +var nexts = []; +var n__8981__auto___12118 = self__.iters.length; +var i_12119 = (0); +while(true){ +if((i_12119 < n__8981__auto___12118)){ +(nexts[i_12119] = (self__.iters[i_12119]).next()); + +var G__12120 = (i_12119 + (1)); +i_12119 = G__12120; +continue; +} else { +} +break; +} + +return cljs.core.prim_seq.cljs$core$IFn$_invoke$arity$2(nexts,(0)); +}); + +cljs.core.MultiIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$iters], null); +}); + +cljs.core.MultiIterator.cljs$lang$type = true; + +cljs.core.MultiIterator.cljs$lang$ctorStr = "cljs.core/MultiIterator"; + +cljs.core.MultiIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/MultiIterator"); +}); + +cljs.core.__GT_MultiIterator = (function cljs$core$__GT_MultiIterator(iters){ +return (new cljs.core.MultiIterator(iters)); +}); + +cljs.core.chunkIteratorSeq = (function cljs$core$chunkIteratorSeq(iter){ +return (new cljs.core.LazySeq(null,(function (){ +if(iter.hasNext()){ +var arr = []; +var n = (0); +while(true){ +if(cljs.core.truth_((function (){var and__7948__auto__ = iter.hasNext(); +if(cljs.core.truth_(and__7948__auto__)){ +return (n < (32)); +} else { +return and__7948__auto__; +} +})())){ +(arr[n] = iter.next()); + +var G__12121 = (n + (1)); +n = G__12121; +continue; +} else { +return cljs.core.chunk_cons(cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$3(arr,(0),n),(cljs.core.chunkIteratorSeq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.chunkIteratorSeq.cljs$core$IFn$_invoke$arity$1(iter) : cljs.core.chunkIteratorSeq.call(null,iter))); +} +break; +} +} else { +return null; +} +}),null,null)); +}); + +/** +* @constructor +*/ +cljs.core.TransformerIterator = (function (buffer,_next,completed,xf,sourceIter,multi){ +this.buffer = buffer; +this._next = _next; +this.completed = completed; +this.xf = xf; +this.sourceIter = sourceIter; +this.multi = multi; +}) +cljs.core.TransformerIterator.prototype.step = (function (){ +var self__ = this; +var this$ = this; +if(!((self__._next === cljs.core.NONE))){ +return true; +} else { +while(true){ +if((self__._next === cljs.core.NONE)){ +if(self__.buffer.isEmpty()){ +if(self__.completed){ +return false; +} else { +if(self__.sourceIter.hasNext()){ +var iter = ((self__.multi)?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(self__.xf,cljs.core.cons(null,self__.sourceIter.next())):(function (){var G__12122 = null; +var G__12123 = self__.sourceIter.next(); +return (self__.xf.cljs$core$IFn$_invoke$arity$2 ? self__.xf.cljs$core$IFn$_invoke$arity$2(G__12122,G__12123) : self__.xf.call(null,G__12122,G__12123)); +})()); +if(cljs.core.reduced_QMARK_(iter)){ +(self__.xf.cljs$core$IFn$_invoke$arity$1 ? self__.xf.cljs$core$IFn$_invoke$arity$1(null) : self__.xf.call(null,null)); + +self__.completed = true; +} else { +} + +continue; +} else { +(self__.xf.cljs$core$IFn$_invoke$arity$1 ? self__.xf.cljs$core$IFn$_invoke$arity$1(null) : self__.xf.call(null,null)); + +self__.completed = true; + +continue; +} +} +} else { +self__._next = self__.buffer.remove(); + +continue; +} +} else { +return true; +} +break; +} +} +}); + +cljs.core.TransformerIterator.prototype.hasNext = (function (){ +var self__ = this; +var this$ = this; +return this$.step(); +}); + +cljs.core.TransformerIterator.prototype.next = (function (){ +var self__ = this; +var this$ = this; +if(this$.hasNext()){ +var ret = self__._next; +self__._next = cljs.core.NONE; + +return ret; +} else { +throw (new Error("No such element")); +} +}); + +cljs.core.TransformerIterator.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.TransformerIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$buffer,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$_next,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$completed,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$xf,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$sourceIter,cljs.core.cst$sym$multi], null); +}); + +cljs.core.TransformerIterator.cljs$lang$type = true; + +cljs.core.TransformerIterator.cljs$lang$ctorStr = "cljs.core/TransformerIterator"; + +cljs.core.TransformerIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/TransformerIterator"); +}); + +cljs.core.__GT_TransformerIterator = (function cljs$core$__GT_TransformerIterator(buffer,_next,completed,xf,sourceIter,multi){ +return (new cljs.core.TransformerIterator(buffer,_next,completed,xf,sourceIter,multi)); +}); + +(cljs.core.TransformerIterator.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.transformer_iterator = (function cljs$core$transformer_iterator(xform,sourceIter,multi){ +var iterator = (new cljs.core.TransformerIterator(cljs.core.EMPTY,cljs.core.NONE,false,null,sourceIter,multi)); +iterator.xf = (function (){var G__12125 = ((function (iterator){ +return (function() { +var G__12126 = null; +var G__12126__0 = (function (){ +return null; +}); +var G__12126__1 = (function (acc){ +return acc; +}); +var G__12126__2 = (function (acc,o){ +iterator.buffer = iterator.buffer.add(o); + +return acc; +}); +G__12126 = function(acc,o){ +switch(arguments.length){ +case 0: +return G__12126__0.call(this); +case 1: +return G__12126__1.call(this,acc); +case 2: +return G__12126__2.call(this,acc,o); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12126.cljs$core$IFn$_invoke$arity$0 = G__12126__0; +G__12126.cljs$core$IFn$_invoke$arity$1 = G__12126__1; +G__12126.cljs$core$IFn$_invoke$arity$2 = G__12126__2; +return G__12126; +})() +;})(iterator)) +; +return (xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(G__12125) : xform.call(null,G__12125)); +})(); + +return iterator; +}); +cljs.core.TransformerIterator.create = (function (xform,coll){ +return cljs.core.transformer_iterator(xform,cljs.core.iter(coll),false); +}); +cljs.core.TransformerIterator.createMulti = (function (xform,colls){ +var iters = []; +var seq__12127_12131 = cljs.core.seq(colls); +var chunk__12128_12132 = null; +var count__12129_12133 = (0); +var i__12130_12134 = (0); +while(true){ +if((i__12130_12134 < count__12129_12133)){ +var coll_12135 = chunk__12128_12132.cljs$core$IIndexed$_nth$arity$2(null,i__12130_12134); +iters.push(cljs.core.iter(coll_12135)); + +var G__12136 = seq__12127_12131; +var G__12137 = chunk__12128_12132; +var G__12138 = count__12129_12133; +var G__12139 = (i__12130_12134 + (1)); +seq__12127_12131 = G__12136; +chunk__12128_12132 = G__12137; +count__12129_12133 = G__12138; +i__12130_12134 = G__12139; +continue; +} else { +var temp__5278__auto___12140 = cljs.core.seq(seq__12127_12131); +if(temp__5278__auto___12140){ +var seq__12127_12141__$1 = temp__5278__auto___12140; +if(cljs.core.chunked_seq_QMARK_(seq__12127_12141__$1)){ +var c__8871__auto___12142 = cljs.core.chunk_first(seq__12127_12141__$1); +var G__12143 = cljs.core.chunk_rest(seq__12127_12141__$1); +var G__12144 = c__8871__auto___12142; +var G__12145 = cljs.core.count(c__8871__auto___12142); +var G__12146 = (0); +seq__12127_12131 = G__12143; +chunk__12128_12132 = G__12144; +count__12129_12133 = G__12145; +i__12130_12134 = G__12146; +continue; +} else { +var coll_12147 = cljs.core.first(seq__12127_12141__$1); +iters.push(cljs.core.iter(coll_12147)); + +var G__12148 = cljs.core.next(seq__12127_12141__$1); +var G__12149 = null; +var G__12150 = (0); +var G__12151 = (0); +seq__12127_12131 = G__12148; +chunk__12128_12132 = G__12149; +count__12129_12133 = G__12150; +i__12130_12134 = G__12151; +continue; +} +} else { +} +} +break; +} + +return cljs.core.transformer_iterator(xform,(new cljs.core.MultiIterator(iters)),true); +}); +/** + * Coerces coll to a (possibly empty) sequence, if it is not already + * one. Will not force a lazy seq. (sequence nil) yields (), When a + * transducer is supplied, returns a lazy sequence of applications of + * the transform to the items in coll(s), i.e. to the set of first + * items of each coll, followed by the set of second + * items in each coll, until any one of the colls is exhausted. Any + * remaining items in other colls are ignored. The transform should accept + * number-of-colls arguments + */ +cljs.core.sequence = (function cljs$core$sequence(var_args){ +var args12152 = []; +var len__9181__auto___12158 = arguments.length; +var i__9182__auto___12159 = (0); +while(true){ +if((i__9182__auto___12159 < len__9181__auto___12158)){ +args12152.push((arguments[i__9182__auto___12159])); + +var G__12160 = (i__9182__auto___12159 + (1)); +i__9182__auto___12159 = G__12160; +continue; +} else { +} +break; +} + +var G__12157 = args12152.length; +switch (G__12157) { +case 1: +return cljs.core.sequence.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.sequence.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12152.slice((2)),(0),null)); +return cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.sequence.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +if(cljs.core.seq_QMARK_(coll)){ +return coll; +} else { +var or__7960__auto__ = cljs.core.seq(coll); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return cljs.core.List.EMPTY; +} +} +}); + +cljs.core.sequence.cljs$core$IFn$_invoke$arity$2 = (function (xform,coll){ +var or__7960__auto__ = cljs.core.chunkIteratorSeq(cljs.core.TransformerIterator.create(xform,coll)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic = (function (xform,coll,colls){ +var or__7960__auto__ = cljs.core.chunkIteratorSeq(cljs.core.TransformerIterator.createMulti(xform,cljs.core.to_array(cljs.core.cons(coll,colls)))); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.sequence.cljs$lang$applyTo = (function (seq12153){ +var G__12154 = cljs.core.first(seq12153); +var seq12153__$1 = cljs.core.next(seq12153); +var G__12155 = cljs.core.first(seq12153__$1); +var seq12153__$2 = cljs.core.next(seq12153__$1); +return cljs.core.sequence.cljs$core$IFn$_invoke$arity$variadic(G__12154,G__12155,seq12153__$2); +}); + +cljs.core.sequence.cljs$lang$maxFixedArity = (2); + +/** + * Returns true if (pred x) is logical true for every x in coll, else + * false. + */ +cljs.core.every_QMARK_ = (function cljs$core$every_QMARK_(pred,coll){ +while(true){ +if((cljs.core.seq(coll) == null)){ +return true; +} else { +if(cljs.core.truth_((function (){var G__12163 = cljs.core.first(coll); +return (pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__12163) : pred.call(null,G__12163)); +})())){ +var G__12164 = pred; +var G__12165 = cljs.core.next(coll); +pred = G__12164; +coll = G__12165; +continue; +} else { +return false; + +} +} +break; +} +}); +/** + * Returns false if (pred x) is logical true for every x in + * coll, else true. + */ +cljs.core.not_every_QMARK_ = (function cljs$core$not_every_QMARK_(pred,coll){ +return !(cljs.core.every_QMARK_(pred,coll)); +}); +/** + * Returns the first logical true value of (pred x) for any x in coll, + * else nil. One common idiom is to use a set as pred, for example + * this will return :fred if :fred is in the sequence, otherwise nil: + * (some #{:fred} coll) + */ +cljs.core.some = (function cljs$core$some(pred,coll){ +while(true){ +if(cljs.core.seq(coll)){ +var or__7960__auto__ = (function (){var G__12169 = cljs.core.first(coll); +return (pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__12169) : pred.call(null,G__12169)); +})(); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var G__12170 = pred; +var G__12171 = cljs.core.next(coll); +pred = G__12170; +coll = G__12171; +continue; +} +} else { +return null; +} +break; +} +}); +/** + * Returns false if (pred x) is logical true for any x in coll, + * else true. + */ +cljs.core.not_any_QMARK_ = (function cljs$core$not_any_QMARK_(pred,coll){ +return cljs.core.not(cljs.core.some(pred,coll)); +}); +/** + * Returns true if n is even, throws an exception if n is not an integer + */ +cljs.core.even_QMARK_ = (function cljs$core$even_QMARK_(n){ +if(cljs.core.integer_QMARK_(n)){ +return ((n & (1)) === (0)); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Argument must be an integer: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(n)].join(''))); +} +}); +/** + * Returns true if n is odd, throws an exception if n is not an integer + */ +cljs.core.odd_QMARK_ = (function cljs$core$odd_QMARK_(n){ +return !(cljs.core.even_QMARK_(n)); +}); +/** + * Takes a fn f and returns a fn that takes the same arguments as f, + * has the same effects, if any, and returns the opposite truth value. + */ +cljs.core.complement = (function cljs$core$complement(f){ +return (function() { +var G__12172 = null; +var G__12172__0 = (function (){ +return cljs.core.not((f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null))); +}); +var G__12172__1 = (function (x){ +return cljs.core.not((f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null,x))); +}); +var G__12172__2 = (function (x,y){ +return cljs.core.not((f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x,y) : f.call(null,x,y))); +}); +var G__12172__3 = (function() { +var G__12173__delegate = function (x,y,zs){ +return cljs.core.not(cljs.core.apply.cljs$core$IFn$_invoke$arity$4(f,x,y,zs)); +}; +var G__12173 = function (x,y,var_args){ +var zs = null; +if (arguments.length > 2) { +var G__12174__i = 0, G__12174__a = new Array(arguments.length - 2); +while (G__12174__i < G__12174__a.length) {G__12174__a[G__12174__i] = arguments[G__12174__i + 2]; ++G__12174__i;} + zs = new cljs.core.IndexedSeq(G__12174__a,0,null); +} +return G__12173__delegate.call(this,x,y,zs);}; +G__12173.cljs$lang$maxFixedArity = 2; +G__12173.cljs$lang$applyTo = (function (arglist__12175){ +var x = cljs.core.first(arglist__12175); +arglist__12175 = cljs.core.next(arglist__12175); +var y = cljs.core.first(arglist__12175); +var zs = cljs.core.rest(arglist__12175); +return G__12173__delegate(x,y,zs); +}); +G__12173.cljs$core$IFn$_invoke$arity$variadic = G__12173__delegate; +return G__12173; +})() +; +G__12172 = function(x,y,var_args){ +var zs = var_args; +switch(arguments.length){ +case 0: +return G__12172__0.call(this); +case 1: +return G__12172__1.call(this,x); +case 2: +return G__12172__2.call(this,x,y); +default: +var G__12176 = null; +if (arguments.length > 2) { +var G__12177__i = 0, G__12177__a = new Array(arguments.length - 2); +while (G__12177__i < G__12177__a.length) {G__12177__a[G__12177__i] = arguments[G__12177__i + 2]; ++G__12177__i;} +G__12176 = new cljs.core.IndexedSeq(G__12177__a,0,null); +} +return G__12172__3.cljs$core$IFn$_invoke$arity$variadic(x,y, G__12176); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12172.cljs$lang$maxFixedArity = 2; +G__12172.cljs$lang$applyTo = G__12172__3.cljs$lang$applyTo; +G__12172.cljs$core$IFn$_invoke$arity$0 = G__12172__0; +G__12172.cljs$core$IFn$_invoke$arity$1 = G__12172__1; +G__12172.cljs$core$IFn$_invoke$arity$2 = G__12172__2; +G__12172.cljs$core$IFn$_invoke$arity$variadic = G__12172__3.cljs$core$IFn$_invoke$arity$variadic; +return G__12172; +})() +}); +/** + * Returns a function that takes any number of arguments and returns x. + */ +cljs.core.constantly = (function cljs$core$constantly(x){ +return (function() { +var G__12178__delegate = function (args){ +return x; +}; +var G__12178 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__12179__i = 0, G__12179__a = new Array(arguments.length - 0); +while (G__12179__i < G__12179__a.length) {G__12179__a[G__12179__i] = arguments[G__12179__i + 0]; ++G__12179__i;} + args = new cljs.core.IndexedSeq(G__12179__a,0,null); +} +return G__12178__delegate.call(this,args);}; +G__12178.cljs$lang$maxFixedArity = 0; +G__12178.cljs$lang$applyTo = (function (arglist__12180){ +var args = cljs.core.seq(arglist__12180); +return G__12178__delegate(args); +}); +G__12178.cljs$core$IFn$_invoke$arity$variadic = G__12178__delegate; +return G__12178; +})() +; +}); +/** + * Takes a set of functions and returns a fn that is the composition + * of those fns. The returned fn takes a variable number of args, + * applies the rightmost of fns to the args, the next + * fn (right-to-left) to the result, etc. + */ +cljs.core.comp = (function cljs$core$comp(var_args){ +var args12181 = []; +var len__9181__auto___12203 = arguments.length; +var i__9182__auto___12204 = (0); +while(true){ +if((i__9182__auto___12204 < len__9181__auto___12203)){ +args12181.push((arguments[i__9182__auto___12204])); + +var G__12205 = (i__9182__auto___12204 + (1)); +i__9182__auto___12204 = G__12205; +continue; +} else { +} +break; +} + +var G__12187 = args12181.length; +switch (G__12187) { +case 0: +return cljs.core.comp.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.comp.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.comp.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.comp.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12181.slice((3)),(0),null)); +return cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.comp.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.identity; +}); + +cljs.core.comp.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return f; +}); + +cljs.core.comp.cljs$core$IFn$_invoke$arity$2 = (function (f,g){ +return (function() { +var G__12207 = null; +var G__12207__0 = (function (){ +var G__12188 = (g.cljs$core$IFn$_invoke$arity$0 ? g.cljs$core$IFn$_invoke$arity$0() : g.call(null)); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12188) : f.call(null,G__12188)); +}); +var G__12207__1 = (function (x){ +var G__12189 = (g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(x) : g.call(null,x)); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12189) : f.call(null,G__12189)); +}); +var G__12207__2 = (function (x,y){ +var G__12190 = (g.cljs$core$IFn$_invoke$arity$2 ? g.cljs$core$IFn$_invoke$arity$2(x,y) : g.call(null,x,y)); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12190) : f.call(null,G__12190)); +}); +var G__12207__3 = (function (x,y,z){ +var G__12191 = (g.cljs$core$IFn$_invoke$arity$3 ? g.cljs$core$IFn$_invoke$arity$3(x,y,z) : g.call(null,x,y,z)); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12191) : f.call(null,G__12191)); +}); +var G__12207__4 = (function() { +var G__12208__delegate = function (x,y,z,args){ +var G__12192 = cljs.core.apply.cljs$core$IFn$_invoke$arity$5(g,x,y,z,args); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12192) : f.call(null,G__12192)); +}; +var G__12208 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12209__i = 0, G__12209__a = new Array(arguments.length - 3); +while (G__12209__i < G__12209__a.length) {G__12209__a[G__12209__i] = arguments[G__12209__i + 3]; ++G__12209__i;} + args = new cljs.core.IndexedSeq(G__12209__a,0,null); +} +return G__12208__delegate.call(this,x,y,z,args);}; +G__12208.cljs$lang$maxFixedArity = 3; +G__12208.cljs$lang$applyTo = (function (arglist__12210){ +var x = cljs.core.first(arglist__12210); +arglist__12210 = cljs.core.next(arglist__12210); +var y = cljs.core.first(arglist__12210); +arglist__12210 = cljs.core.next(arglist__12210); +var z = cljs.core.first(arglist__12210); +var args = cljs.core.rest(arglist__12210); +return G__12208__delegate(x,y,z,args); +}); +G__12208.cljs$core$IFn$_invoke$arity$variadic = G__12208__delegate; +return G__12208; +})() +; +G__12207 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__12207__0.call(this); +case 1: +return G__12207__1.call(this,x); +case 2: +return G__12207__2.call(this,x,y); +case 3: +return G__12207__3.call(this,x,y,z); +default: +var G__12211 = null; +if (arguments.length > 3) { +var G__12212__i = 0, G__12212__a = new Array(arguments.length - 3); +while (G__12212__i < G__12212__a.length) {G__12212__a[G__12212__i] = arguments[G__12212__i + 3]; ++G__12212__i;} +G__12211 = new cljs.core.IndexedSeq(G__12212__a,0,null); +} +return G__12207__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12211); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12207.cljs$lang$maxFixedArity = 3; +G__12207.cljs$lang$applyTo = G__12207__4.cljs$lang$applyTo; +G__12207.cljs$core$IFn$_invoke$arity$0 = G__12207__0; +G__12207.cljs$core$IFn$_invoke$arity$1 = G__12207__1; +G__12207.cljs$core$IFn$_invoke$arity$2 = G__12207__2; +G__12207.cljs$core$IFn$_invoke$arity$3 = G__12207__3; +G__12207.cljs$core$IFn$_invoke$arity$variadic = G__12207__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12207; +})() +}); + +cljs.core.comp.cljs$core$IFn$_invoke$arity$3 = (function (f,g,h){ +return (function() { +var G__12213 = null; +var G__12213__0 = (function (){ +var G__12193 = (function (){var G__12194 = (h.cljs$core$IFn$_invoke$arity$0 ? h.cljs$core$IFn$_invoke$arity$0() : h.call(null)); +return (g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__12194) : g.call(null,G__12194)); +})(); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12193) : f.call(null,G__12193)); +}); +var G__12213__1 = (function (x){ +var G__12195 = (function (){var G__12196 = (h.cljs$core$IFn$_invoke$arity$1 ? h.cljs$core$IFn$_invoke$arity$1(x) : h.call(null,x)); +return (g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__12196) : g.call(null,G__12196)); +})(); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12195) : f.call(null,G__12195)); +}); +var G__12213__2 = (function (x,y){ +var G__12197 = (function (){var G__12198 = (h.cljs$core$IFn$_invoke$arity$2 ? h.cljs$core$IFn$_invoke$arity$2(x,y) : h.call(null,x,y)); +return (g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__12198) : g.call(null,G__12198)); +})(); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12197) : f.call(null,G__12197)); +}); +var G__12213__3 = (function (x,y,z){ +var G__12199 = (function (){var G__12200 = (h.cljs$core$IFn$_invoke$arity$3 ? h.cljs$core$IFn$_invoke$arity$3(x,y,z) : h.call(null,x,y,z)); +return (g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__12200) : g.call(null,G__12200)); +})(); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12199) : f.call(null,G__12199)); +}); +var G__12213__4 = (function() { +var G__12214__delegate = function (x,y,z,args){ +var G__12201 = (function (){var G__12202 = cljs.core.apply.cljs$core$IFn$_invoke$arity$5(h,x,y,z,args); +return (g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(G__12202) : g.call(null,G__12202)); +})(); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12201) : f.call(null,G__12201)); +}; +var G__12214 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12215__i = 0, G__12215__a = new Array(arguments.length - 3); +while (G__12215__i < G__12215__a.length) {G__12215__a[G__12215__i] = arguments[G__12215__i + 3]; ++G__12215__i;} + args = new cljs.core.IndexedSeq(G__12215__a,0,null); +} +return G__12214__delegate.call(this,x,y,z,args);}; +G__12214.cljs$lang$maxFixedArity = 3; +G__12214.cljs$lang$applyTo = (function (arglist__12216){ +var x = cljs.core.first(arglist__12216); +arglist__12216 = cljs.core.next(arglist__12216); +var y = cljs.core.first(arglist__12216); +arglist__12216 = cljs.core.next(arglist__12216); +var z = cljs.core.first(arglist__12216); +var args = cljs.core.rest(arglist__12216); +return G__12214__delegate(x,y,z,args); +}); +G__12214.cljs$core$IFn$_invoke$arity$variadic = G__12214__delegate; +return G__12214; +})() +; +G__12213 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__12213__0.call(this); +case 1: +return G__12213__1.call(this,x); +case 2: +return G__12213__2.call(this,x,y); +case 3: +return G__12213__3.call(this,x,y,z); +default: +var G__12217 = null; +if (arguments.length > 3) { +var G__12218__i = 0, G__12218__a = new Array(arguments.length - 3); +while (G__12218__i < G__12218__a.length) {G__12218__a[G__12218__i] = arguments[G__12218__i + 3]; ++G__12218__i;} +G__12217 = new cljs.core.IndexedSeq(G__12218__a,0,null); +} +return G__12213__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12217); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12213.cljs$lang$maxFixedArity = 3; +G__12213.cljs$lang$applyTo = G__12213__4.cljs$lang$applyTo; +G__12213.cljs$core$IFn$_invoke$arity$0 = G__12213__0; +G__12213.cljs$core$IFn$_invoke$arity$1 = G__12213__1; +G__12213.cljs$core$IFn$_invoke$arity$2 = G__12213__2; +G__12213.cljs$core$IFn$_invoke$arity$3 = G__12213__3; +G__12213.cljs$core$IFn$_invoke$arity$variadic = G__12213__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12213; +})() +}); + +cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic = (function (f1,f2,f3,fs){ +var fs__$1 = cljs.core.reverse(cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(f1,f2,f3,fs)); +return ((function (fs__$1){ +return (function() { +var G__12219__delegate = function (args){ +var ret = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.first(fs__$1),args); +var fs__$2 = cljs.core.next(fs__$1); +while(true){ +if(fs__$2){ +var G__12220 = cljs.core.first(fs__$2).call(null,ret); +var G__12221 = cljs.core.next(fs__$2); +ret = G__12220; +fs__$2 = G__12221; +continue; +} else { +return ret; +} +break; +} +}; +var G__12219 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__12222__i = 0, G__12222__a = new Array(arguments.length - 0); +while (G__12222__i < G__12222__a.length) {G__12222__a[G__12222__i] = arguments[G__12222__i + 0]; ++G__12222__i;} + args = new cljs.core.IndexedSeq(G__12222__a,0,null); +} +return G__12219__delegate.call(this,args);}; +G__12219.cljs$lang$maxFixedArity = 0; +G__12219.cljs$lang$applyTo = (function (arglist__12223){ +var args = cljs.core.seq(arglist__12223); +return G__12219__delegate(args); +}); +G__12219.cljs$core$IFn$_invoke$arity$variadic = G__12219__delegate; +return G__12219; +})() +; +;})(fs__$1)) +}); + +cljs.core.comp.cljs$lang$applyTo = (function (seq12182){ +var G__12183 = cljs.core.first(seq12182); +var seq12182__$1 = cljs.core.next(seq12182); +var G__12184 = cljs.core.first(seq12182__$1); +var seq12182__$2 = cljs.core.next(seq12182__$1); +var G__12185 = cljs.core.first(seq12182__$2); +var seq12182__$3 = cljs.core.next(seq12182__$2); +return cljs.core.comp.cljs$core$IFn$_invoke$arity$variadic(G__12183,G__12184,G__12185,seq12182__$3); +}); + +cljs.core.comp.cljs$lang$maxFixedArity = (3); + +/** + * Takes a function f and fewer than the normal arguments to f, and + * returns a fn that takes a variable number of additional args. When + * called, the returned function calls f with args + additional args. + */ +cljs.core.partial = (function cljs$core$partial(var_args){ +var args12224 = []; +var len__9181__auto___12232 = arguments.length; +var i__9182__auto___12233 = (0); +while(true){ +if((i__9182__auto___12233 < len__9181__auto___12232)){ +args12224.push((arguments[i__9182__auto___12233])); + +var G__12234 = (i__9182__auto___12233 + (1)); +i__9182__auto___12233 = G__12234; +continue; +} else { +} +break; +} + +var G__12231 = args12224.length; +switch (G__12231) { +case 1: +return cljs.core.partial.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.partial.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.partial.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.partial.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12224.slice((4)),(0),null)); +return cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),argseq__9204__auto__); + +} +}); + +cljs.core.partial.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return f; +}); + +cljs.core.partial.cljs$core$IFn$_invoke$arity$2 = (function (f,arg1){ +return (function() { +var G__12236 = null; +var G__12236__0 = (function (){ +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(arg1) : f.call(null,arg1)); +}); +var G__12236__1 = (function (x){ +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(arg1,x) : f.call(null,arg1,x)); +}); +var G__12236__2 = (function (x,y){ +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(arg1,x,y) : f.call(null,arg1,x,y)); +}); +var G__12236__3 = (function (x,y,z){ +return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(arg1,x,y,z) : f.call(null,arg1,x,y,z)); +}); +var G__12236__4 = (function() { +var G__12237__delegate = function (x,y,z,args){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f,arg1,x,y,z,cljs.core.array_seq([args], 0)); +}; +var G__12237 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12238__i = 0, G__12238__a = new Array(arguments.length - 3); +while (G__12238__i < G__12238__a.length) {G__12238__a[G__12238__i] = arguments[G__12238__i + 3]; ++G__12238__i;} + args = new cljs.core.IndexedSeq(G__12238__a,0,null); +} +return G__12237__delegate.call(this,x,y,z,args);}; +G__12237.cljs$lang$maxFixedArity = 3; +G__12237.cljs$lang$applyTo = (function (arglist__12239){ +var x = cljs.core.first(arglist__12239); +arglist__12239 = cljs.core.next(arglist__12239); +var y = cljs.core.first(arglist__12239); +arglist__12239 = cljs.core.next(arglist__12239); +var z = cljs.core.first(arglist__12239); +var args = cljs.core.rest(arglist__12239); +return G__12237__delegate(x,y,z,args); +}); +G__12237.cljs$core$IFn$_invoke$arity$variadic = G__12237__delegate; +return G__12237; +})() +; +G__12236 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__12236__0.call(this); +case 1: +return G__12236__1.call(this,x); +case 2: +return G__12236__2.call(this,x,y); +case 3: +return G__12236__3.call(this,x,y,z); +default: +var G__12240 = null; +if (arguments.length > 3) { +var G__12241__i = 0, G__12241__a = new Array(arguments.length - 3); +while (G__12241__i < G__12241__a.length) {G__12241__a[G__12241__i] = arguments[G__12241__i + 3]; ++G__12241__i;} +G__12240 = new cljs.core.IndexedSeq(G__12241__a,0,null); +} +return G__12236__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12240); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12236.cljs$lang$maxFixedArity = 3; +G__12236.cljs$lang$applyTo = G__12236__4.cljs$lang$applyTo; +G__12236.cljs$core$IFn$_invoke$arity$0 = G__12236__0; +G__12236.cljs$core$IFn$_invoke$arity$1 = G__12236__1; +G__12236.cljs$core$IFn$_invoke$arity$2 = G__12236__2; +G__12236.cljs$core$IFn$_invoke$arity$3 = G__12236__3; +G__12236.cljs$core$IFn$_invoke$arity$variadic = G__12236__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12236; +})() +}); + +cljs.core.partial.cljs$core$IFn$_invoke$arity$3 = (function (f,arg1,arg2){ +return (function() { +var G__12242 = null; +var G__12242__0 = (function (){ +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(arg1,arg2) : f.call(null,arg1,arg2)); +}); +var G__12242__1 = (function (x){ +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(arg1,arg2,x) : f.call(null,arg1,arg2,x)); +}); +var G__12242__2 = (function (x,y){ +return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(arg1,arg2,x,y) : f.call(null,arg1,arg2,x,y)); +}); +var G__12242__3 = (function (x,y,z){ +return (f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(arg1,arg2,x,y,z) : f.call(null,arg1,arg2,x,y,z)); +}); +var G__12242__4 = (function() { +var G__12243__delegate = function (x,y,z,args){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f,arg1,arg2,x,y,cljs.core.array_seq([z,args], 0)); +}; +var G__12243 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12244__i = 0, G__12244__a = new Array(arguments.length - 3); +while (G__12244__i < G__12244__a.length) {G__12244__a[G__12244__i] = arguments[G__12244__i + 3]; ++G__12244__i;} + args = new cljs.core.IndexedSeq(G__12244__a,0,null); +} +return G__12243__delegate.call(this,x,y,z,args);}; +G__12243.cljs$lang$maxFixedArity = 3; +G__12243.cljs$lang$applyTo = (function (arglist__12245){ +var x = cljs.core.first(arglist__12245); +arglist__12245 = cljs.core.next(arglist__12245); +var y = cljs.core.first(arglist__12245); +arglist__12245 = cljs.core.next(arglist__12245); +var z = cljs.core.first(arglist__12245); +var args = cljs.core.rest(arglist__12245); +return G__12243__delegate(x,y,z,args); +}); +G__12243.cljs$core$IFn$_invoke$arity$variadic = G__12243__delegate; +return G__12243; +})() +; +G__12242 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__12242__0.call(this); +case 1: +return G__12242__1.call(this,x); +case 2: +return G__12242__2.call(this,x,y); +case 3: +return G__12242__3.call(this,x,y,z); +default: +var G__12246 = null; +if (arguments.length > 3) { +var G__12247__i = 0, G__12247__a = new Array(arguments.length - 3); +while (G__12247__i < G__12247__a.length) {G__12247__a[G__12247__i] = arguments[G__12247__i + 3]; ++G__12247__i;} +G__12246 = new cljs.core.IndexedSeq(G__12247__a,0,null); +} +return G__12242__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12246); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12242.cljs$lang$maxFixedArity = 3; +G__12242.cljs$lang$applyTo = G__12242__4.cljs$lang$applyTo; +G__12242.cljs$core$IFn$_invoke$arity$0 = G__12242__0; +G__12242.cljs$core$IFn$_invoke$arity$1 = G__12242__1; +G__12242.cljs$core$IFn$_invoke$arity$2 = G__12242__2; +G__12242.cljs$core$IFn$_invoke$arity$3 = G__12242__3; +G__12242.cljs$core$IFn$_invoke$arity$variadic = G__12242__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12242; +})() +}); + +cljs.core.partial.cljs$core$IFn$_invoke$arity$4 = (function (f,arg1,arg2,arg3){ +return (function() { +var G__12248 = null; +var G__12248__0 = (function (){ +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(arg1,arg2,arg3) : f.call(null,arg1,arg2,arg3)); +}); +var G__12248__1 = (function (x){ +return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(arg1,arg2,arg3,x) : f.call(null,arg1,arg2,arg3,x)); +}); +var G__12248__2 = (function (x,y){ +return (f.cljs$core$IFn$_invoke$arity$5 ? f.cljs$core$IFn$_invoke$arity$5(arg1,arg2,arg3,x,y) : f.call(null,arg1,arg2,arg3,x,y)); +}); +var G__12248__3 = (function (x,y,z){ +return (f.cljs$core$IFn$_invoke$arity$6 ? f.cljs$core$IFn$_invoke$arity$6(arg1,arg2,arg3,x,y,z) : f.call(null,arg1,arg2,arg3,x,y,z)); +}); +var G__12248__4 = (function() { +var G__12249__delegate = function (x,y,z,args){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f,arg1,arg2,arg3,x,cljs.core.array_seq([y,z,args], 0)); +}; +var G__12249 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12250__i = 0, G__12250__a = new Array(arguments.length - 3); +while (G__12250__i < G__12250__a.length) {G__12250__a[G__12250__i] = arguments[G__12250__i + 3]; ++G__12250__i;} + args = new cljs.core.IndexedSeq(G__12250__a,0,null); +} +return G__12249__delegate.call(this,x,y,z,args);}; +G__12249.cljs$lang$maxFixedArity = 3; +G__12249.cljs$lang$applyTo = (function (arglist__12251){ +var x = cljs.core.first(arglist__12251); +arglist__12251 = cljs.core.next(arglist__12251); +var y = cljs.core.first(arglist__12251); +arglist__12251 = cljs.core.next(arglist__12251); +var z = cljs.core.first(arglist__12251); +var args = cljs.core.rest(arglist__12251); +return G__12249__delegate(x,y,z,args); +}); +G__12249.cljs$core$IFn$_invoke$arity$variadic = G__12249__delegate; +return G__12249; +})() +; +G__12248 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__12248__0.call(this); +case 1: +return G__12248__1.call(this,x); +case 2: +return G__12248__2.call(this,x,y); +case 3: +return G__12248__3.call(this,x,y,z); +default: +var G__12252 = null; +if (arguments.length > 3) { +var G__12253__i = 0, G__12253__a = new Array(arguments.length - 3); +while (G__12253__i < G__12253__a.length) {G__12253__a[G__12253__i] = arguments[G__12253__i + 3]; ++G__12253__i;} +G__12252 = new cljs.core.IndexedSeq(G__12253__a,0,null); +} +return G__12248__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12252); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12248.cljs$lang$maxFixedArity = 3; +G__12248.cljs$lang$applyTo = G__12248__4.cljs$lang$applyTo; +G__12248.cljs$core$IFn$_invoke$arity$0 = G__12248__0; +G__12248.cljs$core$IFn$_invoke$arity$1 = G__12248__1; +G__12248.cljs$core$IFn$_invoke$arity$2 = G__12248__2; +G__12248.cljs$core$IFn$_invoke$arity$3 = G__12248__3; +G__12248.cljs$core$IFn$_invoke$arity$variadic = G__12248__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12248; +})() +}); + +cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic = (function (f,arg1,arg2,arg3,more){ +return (function() { +var G__12254__delegate = function (args){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,arg1,arg2,arg3,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(more,args)); +}; +var G__12254 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__12255__i = 0, G__12255__a = new Array(arguments.length - 0); +while (G__12255__i < G__12255__a.length) {G__12255__a[G__12255__i] = arguments[G__12255__i + 0]; ++G__12255__i;} + args = new cljs.core.IndexedSeq(G__12255__a,0,null); +} +return G__12254__delegate.call(this,args);}; +G__12254.cljs$lang$maxFixedArity = 0; +G__12254.cljs$lang$applyTo = (function (arglist__12256){ +var args = cljs.core.seq(arglist__12256); +return G__12254__delegate(args); +}); +G__12254.cljs$core$IFn$_invoke$arity$variadic = G__12254__delegate; +return G__12254; +})() +; +}); + +cljs.core.partial.cljs$lang$applyTo = (function (seq12225){ +var G__12226 = cljs.core.first(seq12225); +var seq12225__$1 = cljs.core.next(seq12225); +var G__12227 = cljs.core.first(seq12225__$1); +var seq12225__$2 = cljs.core.next(seq12225__$1); +var G__12228 = cljs.core.first(seq12225__$2); +var seq12225__$3 = cljs.core.next(seq12225__$2); +var G__12229 = cljs.core.first(seq12225__$3); +var seq12225__$4 = cljs.core.next(seq12225__$3); +return cljs.core.partial.cljs$core$IFn$_invoke$arity$variadic(G__12226,G__12227,G__12228,G__12229,seq12225__$4); +}); + +cljs.core.partial.cljs$lang$maxFixedArity = (4); + +/** + * Takes a function f, and returns a function that calls f, replacing + * a nil first argument to f with the supplied value x. Higher arity + * versions can replace arguments in the second and third + * positions (y, z). Note that the function f can take any number of + * arguments, not just the one(s) being nil-patched. + */ +cljs.core.fnil = (function cljs$core$fnil(var_args){ +var args12257 = []; +var len__9181__auto___12276 = arguments.length; +var i__9182__auto___12277 = (0); +while(true){ +if((i__9182__auto___12277 < len__9181__auto___12276)){ +args12257.push((arguments[i__9182__auto___12277])); + +var G__12278 = (i__9182__auto___12277 + (1)); +i__9182__auto___12277 = G__12278; +continue; +} else { +} +break; +} + +var G__12259 = args12257.length; +switch (G__12259) { +case 2: +return cljs.core.fnil.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.fnil.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.fnil.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12257.length)].join(''))); + +} +}); + +cljs.core.fnil.cljs$core$IFn$_invoke$arity$2 = (function (f,x){ +return (function() { +var G__12280 = null; +var G__12280__1 = (function (a){ +var G__12260 = (((a == null))?x:a); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12260) : f.call(null,G__12260)); +}); +var G__12280__2 = (function (a,b){ +var G__12261 = (((a == null))?x:a); +var G__12262 = b; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12261,G__12262) : f.call(null,G__12261,G__12262)); +}); +var G__12280__3 = (function (a,b,c){ +var G__12263 = (((a == null))?x:a); +var G__12264 = b; +var G__12265 = c; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12263,G__12264,G__12265) : f.call(null,G__12263,G__12264,G__12265)); +}); +var G__12280__4 = (function() { +var G__12281__delegate = function (a,b,c,ds){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,(((a == null))?x:a),b,c,ds); +}; +var G__12281 = function (a,b,c,var_args){ +var ds = null; +if (arguments.length > 3) { +var G__12282__i = 0, G__12282__a = new Array(arguments.length - 3); +while (G__12282__i < G__12282__a.length) {G__12282__a[G__12282__i] = arguments[G__12282__i + 3]; ++G__12282__i;} + ds = new cljs.core.IndexedSeq(G__12282__a,0,null); +} +return G__12281__delegate.call(this,a,b,c,ds);}; +G__12281.cljs$lang$maxFixedArity = 3; +G__12281.cljs$lang$applyTo = (function (arglist__12283){ +var a = cljs.core.first(arglist__12283); +arglist__12283 = cljs.core.next(arglist__12283); +var b = cljs.core.first(arglist__12283); +arglist__12283 = cljs.core.next(arglist__12283); +var c = cljs.core.first(arglist__12283); +var ds = cljs.core.rest(arglist__12283); +return G__12281__delegate(a,b,c,ds); +}); +G__12281.cljs$core$IFn$_invoke$arity$variadic = G__12281__delegate; +return G__12281; +})() +; +G__12280 = function(a,b,c,var_args){ +var ds = var_args; +switch(arguments.length){ +case 1: +return G__12280__1.call(this,a); +case 2: +return G__12280__2.call(this,a,b); +case 3: +return G__12280__3.call(this,a,b,c); +default: +var G__12284 = null; +if (arguments.length > 3) { +var G__12285__i = 0, G__12285__a = new Array(arguments.length - 3); +while (G__12285__i < G__12285__a.length) {G__12285__a[G__12285__i] = arguments[G__12285__i + 3]; ++G__12285__i;} +G__12284 = new cljs.core.IndexedSeq(G__12285__a,0,null); +} +return G__12280__4.cljs$core$IFn$_invoke$arity$variadic(a,b,c, G__12284); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12280.cljs$lang$maxFixedArity = 3; +G__12280.cljs$lang$applyTo = G__12280__4.cljs$lang$applyTo; +G__12280.cljs$core$IFn$_invoke$arity$1 = G__12280__1; +G__12280.cljs$core$IFn$_invoke$arity$2 = G__12280__2; +G__12280.cljs$core$IFn$_invoke$arity$3 = G__12280__3; +G__12280.cljs$core$IFn$_invoke$arity$variadic = G__12280__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12280; +})() +}); + +cljs.core.fnil.cljs$core$IFn$_invoke$arity$3 = (function (f,x,y){ +return (function() { +var G__12286 = null; +var G__12286__2 = (function (a,b){ +var G__12266 = (((a == null))?x:a); +var G__12267 = (((b == null))?y:b); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12266,G__12267) : f.call(null,G__12266,G__12267)); +}); +var G__12286__3 = (function (a,b,c){ +var G__12268 = (((a == null))?x:a); +var G__12269 = (((b == null))?y:b); +var G__12270 = c; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12268,G__12269,G__12270) : f.call(null,G__12268,G__12269,G__12270)); +}); +var G__12286__4 = (function() { +var G__12287__delegate = function (a,b,c,ds){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,(((a == null))?x:a),(((b == null))?y:b),c,ds); +}; +var G__12287 = function (a,b,c,var_args){ +var ds = null; +if (arguments.length > 3) { +var G__12288__i = 0, G__12288__a = new Array(arguments.length - 3); +while (G__12288__i < G__12288__a.length) {G__12288__a[G__12288__i] = arguments[G__12288__i + 3]; ++G__12288__i;} + ds = new cljs.core.IndexedSeq(G__12288__a,0,null); +} +return G__12287__delegate.call(this,a,b,c,ds);}; +G__12287.cljs$lang$maxFixedArity = 3; +G__12287.cljs$lang$applyTo = (function (arglist__12289){ +var a = cljs.core.first(arglist__12289); +arglist__12289 = cljs.core.next(arglist__12289); +var b = cljs.core.first(arglist__12289); +arglist__12289 = cljs.core.next(arglist__12289); +var c = cljs.core.first(arglist__12289); +var ds = cljs.core.rest(arglist__12289); +return G__12287__delegate(a,b,c,ds); +}); +G__12287.cljs$core$IFn$_invoke$arity$variadic = G__12287__delegate; +return G__12287; +})() +; +G__12286 = function(a,b,c,var_args){ +var ds = var_args; +switch(arguments.length){ +case 2: +return G__12286__2.call(this,a,b); +case 3: +return G__12286__3.call(this,a,b,c); +default: +var G__12290 = null; +if (arguments.length > 3) { +var G__12291__i = 0, G__12291__a = new Array(arguments.length - 3); +while (G__12291__i < G__12291__a.length) {G__12291__a[G__12291__i] = arguments[G__12291__i + 3]; ++G__12291__i;} +G__12290 = new cljs.core.IndexedSeq(G__12291__a,0,null); +} +return G__12286__4.cljs$core$IFn$_invoke$arity$variadic(a,b,c, G__12290); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12286.cljs$lang$maxFixedArity = 3; +G__12286.cljs$lang$applyTo = G__12286__4.cljs$lang$applyTo; +G__12286.cljs$core$IFn$_invoke$arity$2 = G__12286__2; +G__12286.cljs$core$IFn$_invoke$arity$3 = G__12286__3; +G__12286.cljs$core$IFn$_invoke$arity$variadic = G__12286__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12286; +})() +}); + +cljs.core.fnil.cljs$core$IFn$_invoke$arity$4 = (function (f,x,y,z){ +return (function() { +var G__12292 = null; +var G__12292__2 = (function (a,b){ +var G__12271 = (((a == null))?x:a); +var G__12272 = (((b == null))?y:b); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12271,G__12272) : f.call(null,G__12271,G__12272)); +}); +var G__12292__3 = (function (a,b,c){ +var G__12273 = (((a == null))?x:a); +var G__12274 = (((b == null))?y:b); +var G__12275 = (((c == null))?z:c); +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12273,G__12274,G__12275) : f.call(null,G__12273,G__12274,G__12275)); +}); +var G__12292__4 = (function() { +var G__12293__delegate = function (a,b,c,ds){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,(((a == null))?x:a),(((b == null))?y:b),(((c == null))?z:c),ds); +}; +var G__12293 = function (a,b,c,var_args){ +var ds = null; +if (arguments.length > 3) { +var G__12294__i = 0, G__12294__a = new Array(arguments.length - 3); +while (G__12294__i < G__12294__a.length) {G__12294__a[G__12294__i] = arguments[G__12294__i + 3]; ++G__12294__i;} + ds = new cljs.core.IndexedSeq(G__12294__a,0,null); +} +return G__12293__delegate.call(this,a,b,c,ds);}; +G__12293.cljs$lang$maxFixedArity = 3; +G__12293.cljs$lang$applyTo = (function (arglist__12295){ +var a = cljs.core.first(arglist__12295); +arglist__12295 = cljs.core.next(arglist__12295); +var b = cljs.core.first(arglist__12295); +arglist__12295 = cljs.core.next(arglist__12295); +var c = cljs.core.first(arglist__12295); +var ds = cljs.core.rest(arglist__12295); +return G__12293__delegate(a,b,c,ds); +}); +G__12293.cljs$core$IFn$_invoke$arity$variadic = G__12293__delegate; +return G__12293; +})() +; +G__12292 = function(a,b,c,var_args){ +var ds = var_args; +switch(arguments.length){ +case 2: +return G__12292__2.call(this,a,b); +case 3: +return G__12292__3.call(this,a,b,c); +default: +var G__12296 = null; +if (arguments.length > 3) { +var G__12297__i = 0, G__12297__a = new Array(arguments.length - 3); +while (G__12297__i < G__12297__a.length) {G__12297__a[G__12297__i] = arguments[G__12297__i + 3]; ++G__12297__i;} +G__12296 = new cljs.core.IndexedSeq(G__12297__a,0,null); +} +return G__12292__4.cljs$core$IFn$_invoke$arity$variadic(a,b,c, G__12296); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12292.cljs$lang$maxFixedArity = 3; +G__12292.cljs$lang$applyTo = G__12292__4.cljs$lang$applyTo; +G__12292.cljs$core$IFn$_invoke$arity$2 = G__12292__2; +G__12292.cljs$core$IFn$_invoke$arity$3 = G__12292__3; +G__12292.cljs$core$IFn$_invoke$arity$variadic = G__12292__4.cljs$core$IFn$_invoke$arity$variadic; +return G__12292; +})() +}); + +cljs.core.fnil.cljs$lang$maxFixedArity = 4; + +/** + * Returns a lazy sequence consisting of the result of applying f to 0 + * and the first item of coll, followed by applying f to 1 and the second + * item in coll, etc, until coll is exhausted. Thus function f should + * accept 2 arguments, index and item. Returns a stateful transducer when + * no collection is provided. + */ +cljs.core.map_indexed = (function cljs$core$map_indexed(var_args){ +var args12298 = []; +var len__9181__auto___12329 = arguments.length; +var i__9182__auto___12330 = (0); +while(true){ +if((i__9182__auto___12330 < len__9181__auto___12329)){ +args12298.push((arguments[i__9182__auto___12330])); + +var G__12331 = (i__9182__auto___12330 + (1)); +i__9182__auto___12330 = G__12331; +continue; +} else { +} +break; +} + +var G__12300 = args12298.length; +switch (G__12300) { +case 1: +return cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12298.length)].join(''))); + +} +}); + +cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return (function (rf){ +var i = (cljs.core.volatile_BANG_.cljs$core$IFn$_invoke$arity$1 ? cljs.core.volatile_BANG_.cljs$core$IFn$_invoke$arity$1((-1)) : cljs.core.volatile_BANG_.call(null,(-1))); +return ((function (i){ +return (function() { +var G__12333 = null; +var G__12333__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12333__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12333__2 = (function (result,input){ +var G__12301 = result; +var G__12302 = (function (){var G__12303 = cljs.core._vreset_BANG_(i,(cljs.core._deref(i) + (1))); +var G__12304 = input; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12303,G__12304) : f.call(null,G__12303,G__12304)); +})(); +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(G__12301,G__12302) : rf.call(null,G__12301,G__12302)); +}); +G__12333 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12333__0.call(this); +case 1: +return G__12333__1.call(this,result); +case 2: +return G__12333__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12333.cljs$core$IFn$_invoke$arity$0 = G__12333__0; +G__12333.cljs$core$IFn$_invoke$arity$1 = G__12333__1; +G__12333.cljs$core$IFn$_invoke$arity$2 = G__12333__2; +return G__12333; +})() +;})(i)) +}); +}); + +cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +var mapi = (function cljs$core$mapi(idx,coll__$1){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll__$1); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(s)){ +var c = cljs.core.chunk_first(s); +var size = cljs.core.count(c); +var b = cljs.core.chunk_buffer(size); +var n__8981__auto___12334 = size; +var i_12335 = (0); +while(true){ +if((i_12335 < n__8981__auto___12334)){ +cljs.core.chunk_append(b,(function (){var G__12325 = (idx + i_12335); +var G__12326 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c,i_12335); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12325,G__12326) : f.call(null,G__12325,G__12326)); +})()); + +var G__12336 = (i_12335 + (1)); +i_12335 = G__12336; +continue; +} else { +} +break; +} + +return cljs.core.chunk_cons(cljs.core.chunk(b),cljs$core$mapi((idx + size),cljs.core.chunk_rest(s))); +} else { +return cljs.core.cons((function (){var G__12327 = idx; +var G__12328 = cljs.core.first(s); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12327,G__12328) : f.call(null,G__12327,G__12328)); +})(),cljs$core$mapi((idx + (1)),cljs.core.rest(s))); +} +} else { +return null; +} +}),null,null)); +}); +return mapi((0),coll); +}); + +cljs.core.map_indexed.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy sequence of the non-nil results of (f item). Note, + * this means false return values will be included. f must be free of + * side-effects. Returns a transducer when no collection is provided. + */ +cljs.core.keep = (function cljs$core$keep(var_args){ +var args12337 = []; +var len__9181__auto___12342 = arguments.length; +var i__9182__auto___12343 = (0); +while(true){ +if((i__9182__auto___12343 < len__9181__auto___12342)){ +args12337.push((arguments[i__9182__auto___12343])); + +var G__12344 = (i__9182__auto___12343 + (1)); +i__9182__auto___12343 = G__12344; +continue; +} else { +} +break; +} + +var G__12339 = args12337.length; +switch (G__12339) { +case 1: +return cljs.core.keep.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.keep.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12337.length)].join(''))); + +} +}); + +cljs.core.keep.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return (function (rf){ +return (function() { +var G__12346 = null; +var G__12346__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12346__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12346__2 = (function (result,input){ +var v = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(input) : f.call(null,input)); +if((v == null)){ +return result; +} else { +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,v) : rf.call(null,result,v)); +} +}); +G__12346 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12346__0.call(this); +case 1: +return G__12346__1.call(this,result); +case 2: +return G__12346__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12346.cljs$core$IFn$_invoke$arity$0 = G__12346__0; +G__12346.cljs$core$IFn$_invoke$arity$1 = G__12346__1; +G__12346.cljs$core$IFn$_invoke$arity$2 = G__12346__2; +return G__12346; +})() +}); +}); + +cljs.core.keep.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(s)){ +var c = cljs.core.chunk_first(s); +var size = cljs.core.count(c); +var b = cljs.core.chunk_buffer(size); +var n__8981__auto___12347 = size; +var i_12348 = (0); +while(true){ +if((i_12348 < n__8981__auto___12347)){ +var x_12349 = (function (){var G__12340 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c,i_12348); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12340) : f.call(null,G__12340)); +})(); +if((x_12349 == null)){ +} else { +cljs.core.chunk_append(b,x_12349); +} + +var G__12350 = (i_12348 + (1)); +i_12348 = G__12350; +continue; +} else { +} +break; +} + +return cljs.core.chunk_cons(cljs.core.chunk(b),cljs.core.keep.cljs$core$IFn$_invoke$arity$2(f,cljs.core.chunk_rest(s))); +} else { +var x = (function (){var G__12341 = cljs.core.first(s); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12341) : f.call(null,G__12341)); +})(); +if((x == null)){ +return cljs.core.keep.cljs$core$IFn$_invoke$arity$2(f,cljs.core.rest(s)); +} else { +return cljs.core.cons(x,cljs.core.keep.cljs$core$IFn$_invoke$arity$2(f,cljs.core.rest(s))); +} +} +} else { +return null; +} +}),null,null)); +}); + +cljs.core.keep.cljs$lang$maxFixedArity = 2; + + +/** +* @constructor + * @implements {cljs.core.IWatchable} + * @implements {cljs.core.IAtom} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IDeref} +*/ +cljs.core.Atom = (function (state,meta,validator,watches){ +this.state = state; +this.meta = meta; +this.validator = validator; +this.watches = watches; +this.cljs$lang$protocol_mask$partition1$ = 16386; +this.cljs$lang$protocol_mask$partition0$ = 6455296; +}) +cljs.core.Atom.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.Atom.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (o,other){ +var self__ = this; +var o__$1 = this; +return (o__$1 === other); +}); + +cljs.core.Atom.prototype.cljs$core$IDeref$_deref$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.state; +}); + +cljs.core.Atom.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.meta; +}); + +cljs.core.Atom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = (function (this$,oldval,newval){ +var self__ = this; +var this$__$1 = this; +var seq__12351 = cljs.core.seq(self__.watches); +var chunk__12352 = null; +var count__12353 = (0); +var i__12354 = (0); +while(true){ +if((i__12354 < count__12353)){ +var vec__12355 = chunk__12352.cljs$core$IIndexed$_nth$arity$2(null,i__12354); +var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12355,(0),null); +var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12355,(1),null); +(f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(key,this$__$1,oldval,newval) : f.call(null,key,this$__$1,oldval,newval)); + +var G__12361 = seq__12351; +var G__12362 = chunk__12352; +var G__12363 = count__12353; +var G__12364 = (i__12354 + (1)); +seq__12351 = G__12361; +chunk__12352 = G__12362; +count__12353 = G__12363; +i__12354 = G__12364; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__12351); +if(temp__5278__auto__){ +var seq__12351__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__12351__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__12351__$1); +var G__12365 = cljs.core.chunk_rest(seq__12351__$1); +var G__12366 = c__8871__auto__; +var G__12367 = cljs.core.count(c__8871__auto__); +var G__12368 = (0); +seq__12351 = G__12365; +chunk__12352 = G__12366; +count__12353 = G__12367; +i__12354 = G__12368; +continue; +} else { +var vec__12358 = cljs.core.first(seq__12351__$1); +var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12358,(0),null); +var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12358,(1),null); +(f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(key,this$__$1,oldval,newval) : f.call(null,key,this$__$1,oldval,newval)); + +var G__12369 = cljs.core.next(seq__12351__$1); +var G__12370 = null; +var G__12371 = (0); +var G__12372 = (0); +seq__12351 = G__12369; +chunk__12352 = G__12370; +count__12353 = G__12371; +i__12354 = G__12372; +continue; +} +} else { +return null; +} +} +break; +} +}); + +cljs.core.Atom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = (function (this$,key,f){ +var self__ = this; +var this$__$1 = this; +this$__$1.watches = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.watches,key,f); + +return this$__$1; +}); + +cljs.core.Atom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = (function (this$,key){ +var self__ = this; +var this$__$1 = this; +return this$__$1.watches = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.watches,key); +}); + +cljs.core.Atom.prototype.cljs$core$IHash$_hash$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return goog.getUid(this$__$1); +}); + +cljs.core.Atom.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$state,cljs.core.cst$sym$meta,cljs.core.cst$sym$validator,cljs.core.cst$sym$watches], null); +}); + +cljs.core.Atom.cljs$lang$type = true; + +cljs.core.Atom.cljs$lang$ctorStr = "cljs.core/Atom"; + +cljs.core.Atom.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Atom"); +}); + +cljs.core.__GT_Atom = (function cljs$core$__GT_Atom(state,meta,validator,watches){ +return (new cljs.core.Atom(state,meta,validator,watches)); +}); + +/** + * Creates and returns an Atom with an initial value of x and zero or + * more options (in any order): + * + * :meta metadata-map + * + * :validator validate-fn + * + * If metadata-map is supplied, it will be come the metadata on the + * atom. validate-fn must be nil or a side-effect-free fn of one + * argument, which will be passed the intended new state on any state + * change. If the new state is unacceptable, the validate-fn should + * return false or throw an Error. If either of these error conditions + * occur, then the value of the atom will not change. + */ +cljs.core.atom = (function cljs$core$atom(var_args){ +var args12373 = []; +var len__9181__auto___12381 = arguments.length; +var i__9182__auto___12382 = (0); +while(true){ +if((i__9182__auto___12382 < len__9181__auto___12381)){ +args12373.push((arguments[i__9182__auto___12382])); + +var G__12383 = (i__9182__auto___12382 + (1)); +i__9182__auto___12382 = G__12383; +continue; +} else { +} +break; +} + +var G__12377 = args12373.length; +switch (G__12377) { +case 1: +return cljs.core.atom.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12373.slice((1)),(0),null)); +return cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9204__auto__); + +} +}); + +cljs.core.atom.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return (new cljs.core.Atom(x,null,null,null)); +}); + +cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic = (function (x,p__12378){ +var map__12379 = p__12378; +var map__12379__$1 = ((((!((map__12379 == null)))?((((map__12379.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__12379.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__12379):map__12379); +var meta = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__12379__$1,cljs.core.cst$kw$meta); +var validator = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__12379__$1,cljs.core.cst$kw$validator); +return (new cljs.core.Atom(x,meta,validator,null)); +}); + +cljs.core.atom.cljs$lang$applyTo = (function (seq12374){ +var G__12375 = cljs.core.first(seq12374); +var seq12374__$1 = cljs.core.next(seq12374); +return cljs.core.atom.cljs$core$IFn$_invoke$arity$variadic(G__12375,seq12374__$1); +}); + +cljs.core.atom.cljs$lang$maxFixedArity = (1); + +/** + * Sets the value of atom to newval without regard for the + * current value. Returns new-value. + */ +cljs.core.reset_BANG_ = (function cljs$core$reset_BANG_(a,new_value){ +if((a instanceof cljs.core.Atom)){ +var validate = a.validator; +if((validate == null)){ +} else { +if(cljs.core.truth_((validate.cljs$core$IFn$_invoke$arity$1 ? validate.cljs$core$IFn$_invoke$arity$1(new_value) : validate.call(null,new_value)))){ +} else { +throw (new Error("Validator rejected reference state")); +} +} + +var old_value = a.state; +a.state = new_value; + +if((a.watches == null)){ +} else { +cljs.core._notify_watches(a,old_value,new_value); +} + +return new_value; +} else { +return cljs.core._reset_BANG_(a,new_value); +} +}); +/** + * Atomically swaps the value of atom to be: + * (apply f current-value-of-atom args). Note that f may be called + * multiple times, and thus should be free of side effects. Returns + * the value that was swapped in. + */ +cljs.core.swap_BANG_ = (function cljs$core$swap_BANG_(var_args){ +var args12385 = []; +var len__9181__auto___12399 = arguments.length; +var i__9182__auto___12400 = (0); +while(true){ +if((i__9182__auto___12400 < len__9181__auto___12399)){ +args12385.push((arguments[i__9182__auto___12400])); + +var G__12401 = (i__9182__auto___12400 + (1)); +i__9182__auto___12400 = G__12401; +continue; +} else { +} +break; +} + +var G__12392 = args12385.length; +switch (G__12392) { +case 2: +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12385.slice((4)),(0),null)); +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),argseq__9204__auto__); + +} +}); + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (a,f){ +if((a instanceof cljs.core.Atom)){ +return cljs.core.reset_BANG_(a,(function (){var G__12393 = a.state; +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12393) : f.call(null,G__12393)); +})()); +} else { +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$2(a,f); +} +}); + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3 = (function (a,f,x){ +if((a instanceof cljs.core.Atom)){ +return cljs.core.reset_BANG_(a,(function (){var G__12394 = a.state; +var G__12395 = x; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12394,G__12395) : f.call(null,G__12394,G__12395)); +})()); +} else { +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$3(a,f,x); +} +}); + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4 = (function (a,f,x,y){ +if((a instanceof cljs.core.Atom)){ +return cljs.core.reset_BANG_(a,(function (){var G__12396 = a.state; +var G__12397 = x; +var G__12398 = y; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12396,G__12397,G__12398) : f.call(null,G__12396,G__12397,G__12398)); +})()); +} else { +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$4(a,f,x,y); +} +}); + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (a,f,x,y,more){ +if((a instanceof cljs.core.Atom)){ +return cljs.core.reset_BANG_(a,cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,a.state,x,y,more)); +} else { +return cljs.core._swap_BANG_.cljs$core$IFn$_invoke$arity$5(a,f,x,y,more); +} +}); + +cljs.core.swap_BANG_.cljs$lang$applyTo = (function (seq12386){ +var G__12387 = cljs.core.first(seq12386); +var seq12386__$1 = cljs.core.next(seq12386); +var G__12388 = cljs.core.first(seq12386__$1); +var seq12386__$2 = cljs.core.next(seq12386__$1); +var G__12389 = cljs.core.first(seq12386__$2); +var seq12386__$3 = cljs.core.next(seq12386__$2); +var G__12390 = cljs.core.first(seq12386__$3); +var seq12386__$4 = cljs.core.next(seq12386__$3); +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__12387,G__12388,G__12389,G__12390,seq12386__$4); +}); + +cljs.core.swap_BANG_.cljs$lang$maxFixedArity = (4); + +/** + * Atomically sets the value of atom to newval if and only if the + * current value of the atom is equal to oldval. Returns true if + * set happened, else false. + */ +cljs.core.compare_and_set_BANG_ = (function cljs$core$compare_and_set_BANG_(a,oldval,newval){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(a.cljs$core$IDeref$_deref$arity$1(null),oldval)){ +cljs.core.reset_BANG_(a,newval); + +return true; +} else { +return false; +} +}); +/** + * Sets the validator-fn for an atom. validator-fn must be nil or a + * side-effect-free fn of one argument, which will be passed the intended + * new state on any state change. If the new state is unacceptable, the + * validator-fn should return false or throw an Error. If the current state + * is not acceptable to the new validator, an Error will be thrown and the + * validator will not be changed. + */ +cljs.core.set_validator_BANG_ = (function cljs$core$set_validator_BANG_(iref,val){ +if((!((val == null))) && (cljs.core.not((function (){var G__12406 = cljs.core._deref(iref); +return (val.cljs$core$IFn$_invoke$arity$1 ? val.cljs$core$IFn$_invoke$arity$1(G__12406) : val.call(null,G__12406)); +})()))){ +throw (new Error("Validator rejected reference state")); +} else { +} + +return iref.validator = val; +}); +/** + * Gets the validator-fn for a var/ref/agent/atom. + */ +cljs.core.get_validator = (function cljs$core$get_validator(iref){ +return iref.validator; +}); + +/** +* @constructor + * @implements {cljs.core.IVolatile} + * @implements {cljs.core.IDeref} +*/ +cljs.core.Volatile = (function (state){ +this.state = state; +this.cljs$lang$protocol_mask$partition0$ = 32768; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.Volatile.prototype.cljs$core$IVolatile$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Volatile.prototype.cljs$core$IVolatile$_vreset_BANG_$arity$2 = (function (_,new_state){ +var self__ = this; +var ___$1 = this; +return self__.state = new_state; +}); + +cljs.core.Volatile.prototype.cljs$core$IDeref$_deref$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.state; +}); + +cljs.core.Volatile.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$state,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Volatile.cljs$lang$type = true; + +cljs.core.Volatile.cljs$lang$ctorStr = "cljs.core/Volatile"; + +cljs.core.Volatile.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Volatile"); +}); + +cljs.core.__GT_Volatile = (function cljs$core$__GT_Volatile(state){ +return (new cljs.core.Volatile(state)); +}); + +/** + * Creates and returns a Volatile with an initial value of val. + */ +cljs.core.volatile_BANG_ = (function cljs$core$volatile_BANG_(val){ +return (new cljs.core.Volatile(val)); +}); +/** + * Returns true if x is a volatile. + */ +cljs.core.volatile_QMARK_ = (function cljs$core$volatile_QMARK_(x){ +return (x instanceof cljs.core.Volatile); +}); +/** + * Sets the value of volatile to newval without regard for the + * current value. Returns newval. + */ +cljs.core.vreset_BANG_ = (function cljs$core$vreset_BANG_(vol,newval){ +return cljs.core._vreset_BANG_(vol,newval); +}); +/** + * Returns a lazy sequence of the non-nil results of (f index item). Note, + * this means false return values will be included. f must be free of + * side-effects. Returns a stateful transducer when no collection is + * provided. + */ +cljs.core.keep_indexed = (function cljs$core$keep_indexed(var_args){ +var args12407 = []; +var len__9181__auto___12438 = arguments.length; +var i__9182__auto___12439 = (0); +while(true){ +if((i__9182__auto___12439 < len__9181__auto___12438)){ +args12407.push((arguments[i__9182__auto___12439])); + +var G__12440 = (i__9182__auto___12439 + (1)); +i__9182__auto___12439 = G__12440; +continue; +} else { +} +break; +} + +var G__12409 = args12407.length; +switch (G__12409) { +case 1: +return cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12407.length)].join(''))); + +} +}); + +cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return (function (rf){ +var ia = cljs.core.volatile_BANG_((-1)); +return ((function (ia){ +return (function() { +var G__12442 = null; +var G__12442__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12442__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12442__2 = (function (result,input){ +var i = cljs.core._vreset_BANG_(ia,(cljs.core._deref(ia) + (1))); +var v = (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(i,input) : f.call(null,i,input)); +if((v == null)){ +return result; +} else { +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,v) : rf.call(null,result,v)); +} +}); +G__12442 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12442__0.call(this); +case 1: +return G__12442__1.call(this,result); +case 2: +return G__12442__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12442.cljs$core$IFn$_invoke$arity$0 = G__12442__0; +G__12442.cljs$core$IFn$_invoke$arity$1 = G__12442__1; +G__12442.cljs$core$IFn$_invoke$arity$2 = G__12442__2; +return G__12442; +})() +;})(ia)) +}); +}); + +cljs.core.keep_indexed.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +var keepi = (function cljs$core$keepi(idx,coll__$1){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll__$1); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(s)){ +var c = cljs.core.chunk_first(s); +var size = cljs.core.count(c); +var b = cljs.core.chunk_buffer(size); +var n__8981__auto___12443 = size; +var i_12444 = (0); +while(true){ +if((i_12444 < n__8981__auto___12443)){ +var x_12445 = (function (){var G__12434 = (idx + i_12444); +var G__12435 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c,i_12444); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12434,G__12435) : f.call(null,G__12434,G__12435)); +})(); +if((x_12445 == null)){ +} else { +cljs.core.chunk_append(b,x_12445); +} + +var G__12446 = (i_12444 + (1)); +i_12444 = G__12446; +continue; +} else { +} +break; +} + +return cljs.core.chunk_cons(cljs.core.chunk(b),cljs$core$keepi((idx + size),cljs.core.chunk_rest(s))); +} else { +var x = (function (){var G__12436 = idx; +var G__12437 = cljs.core.first(s); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12436,G__12437) : f.call(null,G__12436,G__12437)); +})(); +if((x == null)){ +return cljs$core$keepi((idx + (1)),cljs.core.rest(s)); +} else { +return cljs.core.cons(x,cljs$core$keepi((idx + (1)),cljs.core.rest(s))); +} +} +} else { +return null; +} +}),null,null)); +}); +return keepi((0),coll); +}); + +cljs.core.keep_indexed.cljs$lang$maxFixedArity = 2; + +/** + * Takes a set of predicates and returns a function f that returns true if all of its + * composing predicates return a logical true value against all of its arguments, else it returns + * false. Note that f is short-circuiting in that it will stop execution on the first + * argument that triggers a logical false result against the original predicates. + */ +cljs.core.every_pred = (function cljs$core$every_pred(var_args){ +var args12453 = []; +var len__9181__auto___12460 = arguments.length; +var i__9182__auto___12461 = (0); +while(true){ +if((i__9182__auto___12461 < len__9181__auto___12460)){ +args12453.push((arguments[i__9182__auto___12461])); + +var G__12462 = (i__9182__auto___12461 + (1)); +i__9182__auto___12461 = G__12462; +continue; +} else { +} +break; +} + +var G__12459 = args12453.length; +switch (G__12459) { +case 1: +return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12453.slice((3)),(0),null)); +return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.every_pred.cljs$core$IFn$_invoke$arity$1 = (function (p){ +return (function() { +var cljs$core$ep1 = null; +var cljs$core$ep1__0 = (function (){ +return true; +}); +var cljs$core$ep1__1 = (function (x){ +return cljs.core.boolean$((p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null,x))); +}); +var cljs$core$ep1__2 = (function (x,y){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +return (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null,y)); +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep1__3 = (function (x,y,z){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$1)){ +return (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(z) : p.call(null,z)); +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep1__4 = (function() { +var G__12464__delegate = function (x,y,z,args){ +return cljs.core.boolean$((function (){var and__7948__auto__ = cljs$core$ep1.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.every_QMARK_(p,args); +} else { +return and__7948__auto__; +} +})()); +}; +var G__12464 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12465__i = 0, G__12465__a = new Array(arguments.length - 3); +while (G__12465__i < G__12465__a.length) {G__12465__a[G__12465__i] = arguments[G__12465__i + 3]; ++G__12465__i;} + args = new cljs.core.IndexedSeq(G__12465__a,0,null); +} +return G__12464__delegate.call(this,x,y,z,args);}; +G__12464.cljs$lang$maxFixedArity = 3; +G__12464.cljs$lang$applyTo = (function (arglist__12466){ +var x = cljs.core.first(arglist__12466); +arglist__12466 = cljs.core.next(arglist__12466); +var y = cljs.core.first(arglist__12466); +arglist__12466 = cljs.core.next(arglist__12466); +var z = cljs.core.first(arglist__12466); +var args = cljs.core.rest(arglist__12466); +return G__12464__delegate(x,y,z,args); +}); +G__12464.cljs$core$IFn$_invoke$arity$variadic = G__12464__delegate; +return G__12464; +})() +; +cljs$core$ep1 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$ep1__0.call(this); +case 1: +return cljs$core$ep1__1.call(this,x); +case 2: +return cljs$core$ep1__2.call(this,x,y); +case 3: +return cljs$core$ep1__3.call(this,x,y,z); +default: +var G__12467 = null; +if (arguments.length > 3) { +var G__12468__i = 0, G__12468__a = new Array(arguments.length - 3); +while (G__12468__i < G__12468__a.length) {G__12468__a[G__12468__i] = arguments[G__12468__i + 3]; ++G__12468__i;} +G__12467 = new cljs.core.IndexedSeq(G__12468__a,0,null); +} +return cljs$core$ep1__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12467); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$ep1.cljs$lang$maxFixedArity = 3; +cljs$core$ep1.cljs$lang$applyTo = cljs$core$ep1__4.cljs$lang$applyTo; +cljs$core$ep1.cljs$core$IFn$_invoke$arity$0 = cljs$core$ep1__0; +cljs$core$ep1.cljs$core$IFn$_invoke$arity$1 = cljs$core$ep1__1; +cljs$core$ep1.cljs$core$IFn$_invoke$arity$2 = cljs$core$ep1__2; +cljs$core$ep1.cljs$core$IFn$_invoke$arity$3 = cljs$core$ep1__3; +cljs$core$ep1.cljs$core$IFn$_invoke$arity$variadic = cljs$core$ep1__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$ep1; +})() +}); + +cljs.core.every_pred.cljs$core$IFn$_invoke$arity$2 = (function (p1,p2){ +return (function() { +var cljs$core$ep2 = null; +var cljs$core$ep2__0 = (function (){ +return true; +}); +var cljs$core$ep2__1 = (function (x){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep2__2 = (function (x,y){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$1)){ +var and__7948__auto____$2 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(and__7948__auto____$2)){ +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +} else { +return and__7948__auto____$2; +} +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep2__3 = (function (x,y,z){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$1)){ +var and__7948__auto____$2 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null,z)); +if(cljs.core.truth_(and__7948__auto____$2)){ +var and__7948__auto____$3 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(and__7948__auto____$3)){ +var and__7948__auto____$4 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$4)){ +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null,z)); +} else { +return and__7948__auto____$4; +} +} else { +return and__7948__auto____$3; +} +} else { +return and__7948__auto____$2; +} +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep2__4 = (function() { +var G__12469__delegate = function (x,y,z,args){ +return cljs.core.boolean$((function (){var and__7948__auto__ = cljs$core$ep2.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.every_QMARK_(((function (and__7948__auto__){ +return (function (p1__12447_SHARP_){ +var and__7948__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__12447_SHARP_) : p1.call(null,p1__12447_SHARP_)); +if(cljs.core.truth_(and__7948__auto____$1)){ +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__12447_SHARP_) : p2.call(null,p1__12447_SHARP_)); +} else { +return and__7948__auto____$1; +} +});})(and__7948__auto__)) +,args); +} else { +return and__7948__auto__; +} +})()); +}; +var G__12469 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12470__i = 0, G__12470__a = new Array(arguments.length - 3); +while (G__12470__i < G__12470__a.length) {G__12470__a[G__12470__i] = arguments[G__12470__i + 3]; ++G__12470__i;} + args = new cljs.core.IndexedSeq(G__12470__a,0,null); +} +return G__12469__delegate.call(this,x,y,z,args);}; +G__12469.cljs$lang$maxFixedArity = 3; +G__12469.cljs$lang$applyTo = (function (arglist__12471){ +var x = cljs.core.first(arglist__12471); +arglist__12471 = cljs.core.next(arglist__12471); +var y = cljs.core.first(arglist__12471); +arglist__12471 = cljs.core.next(arglist__12471); +var z = cljs.core.first(arglist__12471); +var args = cljs.core.rest(arglist__12471); +return G__12469__delegate(x,y,z,args); +}); +G__12469.cljs$core$IFn$_invoke$arity$variadic = G__12469__delegate; +return G__12469; +})() +; +cljs$core$ep2 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$ep2__0.call(this); +case 1: +return cljs$core$ep2__1.call(this,x); +case 2: +return cljs$core$ep2__2.call(this,x,y); +case 3: +return cljs$core$ep2__3.call(this,x,y,z); +default: +var G__12472 = null; +if (arguments.length > 3) { +var G__12473__i = 0, G__12473__a = new Array(arguments.length - 3); +while (G__12473__i < G__12473__a.length) {G__12473__a[G__12473__i] = arguments[G__12473__i + 3]; ++G__12473__i;} +G__12472 = new cljs.core.IndexedSeq(G__12473__a,0,null); +} +return cljs$core$ep2__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12472); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$ep2.cljs$lang$maxFixedArity = 3; +cljs$core$ep2.cljs$lang$applyTo = cljs$core$ep2__4.cljs$lang$applyTo; +cljs$core$ep2.cljs$core$IFn$_invoke$arity$0 = cljs$core$ep2__0; +cljs$core$ep2.cljs$core$IFn$_invoke$arity$1 = cljs$core$ep2__1; +cljs$core$ep2.cljs$core$IFn$_invoke$arity$2 = cljs$core$ep2__2; +cljs$core$ep2.cljs$core$IFn$_invoke$arity$3 = cljs$core$ep2__3; +cljs$core$ep2.cljs$core$IFn$_invoke$arity$variadic = cljs$core$ep2__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$ep2; +})() +}); + +cljs.core.every_pred.cljs$core$IFn$_invoke$arity$3 = (function (p1,p2,p3){ +return (function() { +var cljs$core$ep3 = null; +var cljs$core$ep3__0 = (function (){ +return true; +}); +var cljs$core$ep3__1 = (function (x){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(and__7948__auto____$1)){ +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null,x)); +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep3__2 = (function (x,y){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(and__7948__auto____$1)){ +var and__7948__auto____$2 = (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null,x)); +if(cljs.core.truth_(and__7948__auto____$2)){ +var and__7948__auto____$3 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$3)){ +var and__7948__auto____$4 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$4)){ +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null,y)); +} else { +return and__7948__auto____$4; +} +} else { +return and__7948__auto____$3; +} +} else { +return and__7948__auto____$2; +} +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep3__3 = (function (x,y,z){ +return cljs.core.boolean$((function (){var and__7948__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(and__7948__auto____$1)){ +var and__7948__auto____$2 = (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null,x)); +if(cljs.core.truth_(and__7948__auto____$2)){ +var and__7948__auto____$3 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$3)){ +var and__7948__auto____$4 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$4)){ +var and__7948__auto____$5 = (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$5)){ +var and__7948__auto____$6 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null,z)); +if(cljs.core.truth_(and__7948__auto____$6)){ +var and__7948__auto____$7 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null,z)); +if(cljs.core.truth_(and__7948__auto____$7)){ +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(z) : p3.call(null,z)); +} else { +return and__7948__auto____$7; +} +} else { +return and__7948__auto____$6; +} +} else { +return and__7948__auto____$5; +} +} else { +return and__7948__auto____$4; +} +} else { +return and__7948__auto____$3; +} +} else { +return and__7948__auto____$2; +} +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})()); +}); +var cljs$core$ep3__4 = (function() { +var G__12474__delegate = function (x,y,z,args){ +return cljs.core.boolean$((function (){var and__7948__auto__ = cljs$core$ep3.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.every_QMARK_(((function (and__7948__auto__){ +return (function (p1__12448_SHARP_){ +var and__7948__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__12448_SHARP_) : p1.call(null,p1__12448_SHARP_)); +if(cljs.core.truth_(and__7948__auto____$1)){ +var and__7948__auto____$2 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__12448_SHARP_) : p2.call(null,p1__12448_SHARP_)); +if(cljs.core.truth_(and__7948__auto____$2)){ +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(p1__12448_SHARP_) : p3.call(null,p1__12448_SHARP_)); +} else { +return and__7948__auto____$2; +} +} else { +return and__7948__auto____$1; +} +});})(and__7948__auto__)) +,args); +} else { +return and__7948__auto__; +} +})()); +}; +var G__12474 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12475__i = 0, G__12475__a = new Array(arguments.length - 3); +while (G__12475__i < G__12475__a.length) {G__12475__a[G__12475__i] = arguments[G__12475__i + 3]; ++G__12475__i;} + args = new cljs.core.IndexedSeq(G__12475__a,0,null); +} +return G__12474__delegate.call(this,x,y,z,args);}; +G__12474.cljs$lang$maxFixedArity = 3; +G__12474.cljs$lang$applyTo = (function (arglist__12476){ +var x = cljs.core.first(arglist__12476); +arglist__12476 = cljs.core.next(arglist__12476); +var y = cljs.core.first(arglist__12476); +arglist__12476 = cljs.core.next(arglist__12476); +var z = cljs.core.first(arglist__12476); +var args = cljs.core.rest(arglist__12476); +return G__12474__delegate(x,y,z,args); +}); +G__12474.cljs$core$IFn$_invoke$arity$variadic = G__12474__delegate; +return G__12474; +})() +; +cljs$core$ep3 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$ep3__0.call(this); +case 1: +return cljs$core$ep3__1.call(this,x); +case 2: +return cljs$core$ep3__2.call(this,x,y); +case 3: +return cljs$core$ep3__3.call(this,x,y,z); +default: +var G__12477 = null; +if (arguments.length > 3) { +var G__12478__i = 0, G__12478__a = new Array(arguments.length - 3); +while (G__12478__i < G__12478__a.length) {G__12478__a[G__12478__i] = arguments[G__12478__i + 3]; ++G__12478__i;} +G__12477 = new cljs.core.IndexedSeq(G__12478__a,0,null); +} +return cljs$core$ep3__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12477); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$ep3.cljs$lang$maxFixedArity = 3; +cljs$core$ep3.cljs$lang$applyTo = cljs$core$ep3__4.cljs$lang$applyTo; +cljs$core$ep3.cljs$core$IFn$_invoke$arity$0 = cljs$core$ep3__0; +cljs$core$ep3.cljs$core$IFn$_invoke$arity$1 = cljs$core$ep3__1; +cljs$core$ep3.cljs$core$IFn$_invoke$arity$2 = cljs$core$ep3__2; +cljs$core$ep3.cljs$core$IFn$_invoke$arity$3 = cljs$core$ep3__3; +cljs$core$ep3.cljs$core$IFn$_invoke$arity$variadic = cljs$core$ep3__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$ep3; +})() +}); + +cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic = (function (p1,p2,p3,ps){ +var ps__$1 = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(p1,p2,p3,ps); +return ((function (ps__$1){ +return (function() { +var cljs$core$epn = null; +var cljs$core$epn__0 = (function (){ +return true; +}); +var cljs$core$epn__1 = (function (x){ +return cljs.core.every_QMARK_(((function (ps__$1){ +return (function (p1__12449_SHARP_){ +return (p1__12449_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12449_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__12449_SHARP_.call(null,x)); +});})(ps__$1)) +,ps__$1); +}); +var cljs$core$epn__2 = (function (x,y){ +return cljs.core.every_QMARK_(((function (ps__$1){ +return (function (p1__12450_SHARP_){ +var and__7948__auto__ = (p1__12450_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12450_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__12450_SHARP_.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +return (p1__12450_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12450_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__12450_SHARP_.call(null,y)); +} else { +return and__7948__auto__; +} +});})(ps__$1)) +,ps__$1); +}); +var cljs$core$epn__3 = (function (x,y,z){ +return cljs.core.every_QMARK_(((function (ps__$1){ +return (function (p1__12451_SHARP_){ +var and__7948__auto__ = (p1__12451_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12451_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__12451_SHARP_.call(null,x)); +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = (p1__12451_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12451_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__12451_SHARP_.call(null,y)); +if(cljs.core.truth_(and__7948__auto____$1)){ +return (p1__12451_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12451_SHARP_.cljs$core$IFn$_invoke$arity$1(z) : p1__12451_SHARP_.call(null,z)); +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +});})(ps__$1)) +,ps__$1); +}); +var cljs$core$epn__4 = (function() { +var G__12479__delegate = function (x,y,z,args){ +return cljs.core.boolean$((function (){var and__7948__auto__ = cljs$core$epn.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.every_QMARK_(((function (and__7948__auto__,ps__$1){ +return (function (p1__12452_SHARP_){ +return cljs.core.every_QMARK_(p1__12452_SHARP_,args); +});})(and__7948__auto__,ps__$1)) +,ps__$1); +} else { +return and__7948__auto__; +} +})()); +}; +var G__12479 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12480__i = 0, G__12480__a = new Array(arguments.length - 3); +while (G__12480__i < G__12480__a.length) {G__12480__a[G__12480__i] = arguments[G__12480__i + 3]; ++G__12480__i;} + args = new cljs.core.IndexedSeq(G__12480__a,0,null); +} +return G__12479__delegate.call(this,x,y,z,args);}; +G__12479.cljs$lang$maxFixedArity = 3; +G__12479.cljs$lang$applyTo = (function (arglist__12481){ +var x = cljs.core.first(arglist__12481); +arglist__12481 = cljs.core.next(arglist__12481); +var y = cljs.core.first(arglist__12481); +arglist__12481 = cljs.core.next(arglist__12481); +var z = cljs.core.first(arglist__12481); +var args = cljs.core.rest(arglist__12481); +return G__12479__delegate(x,y,z,args); +}); +G__12479.cljs$core$IFn$_invoke$arity$variadic = G__12479__delegate; +return G__12479; +})() +; +cljs$core$epn = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$epn__0.call(this); +case 1: +return cljs$core$epn__1.call(this,x); +case 2: +return cljs$core$epn__2.call(this,x,y); +case 3: +return cljs$core$epn__3.call(this,x,y,z); +default: +var G__12482 = null; +if (arguments.length > 3) { +var G__12483__i = 0, G__12483__a = new Array(arguments.length - 3); +while (G__12483__i < G__12483__a.length) {G__12483__a[G__12483__i] = arguments[G__12483__i + 3]; ++G__12483__i;} +G__12482 = new cljs.core.IndexedSeq(G__12483__a,0,null); +} +return cljs$core$epn__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12482); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$epn.cljs$lang$maxFixedArity = 3; +cljs$core$epn.cljs$lang$applyTo = cljs$core$epn__4.cljs$lang$applyTo; +cljs$core$epn.cljs$core$IFn$_invoke$arity$0 = cljs$core$epn__0; +cljs$core$epn.cljs$core$IFn$_invoke$arity$1 = cljs$core$epn__1; +cljs$core$epn.cljs$core$IFn$_invoke$arity$2 = cljs$core$epn__2; +cljs$core$epn.cljs$core$IFn$_invoke$arity$3 = cljs$core$epn__3; +cljs$core$epn.cljs$core$IFn$_invoke$arity$variadic = cljs$core$epn__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$epn; +})() +;})(ps__$1)) +}); + +cljs.core.every_pred.cljs$lang$applyTo = (function (seq12454){ +var G__12455 = cljs.core.first(seq12454); +var seq12454__$1 = cljs.core.next(seq12454); +var G__12456 = cljs.core.first(seq12454__$1); +var seq12454__$2 = cljs.core.next(seq12454__$1); +var G__12457 = cljs.core.first(seq12454__$2); +var seq12454__$3 = cljs.core.next(seq12454__$2); +return cljs.core.every_pred.cljs$core$IFn$_invoke$arity$variadic(G__12455,G__12456,G__12457,seq12454__$3); +}); + +cljs.core.every_pred.cljs$lang$maxFixedArity = (3); + +/** + * Takes a set of predicates and returns a function f that returns the first logical true value + * returned by one of its composing predicates against any of its arguments, else it returns + * logical false. Note that f is short-circuiting in that it will stop execution on the first + * argument that triggers a logical true result against the original predicates. + */ +cljs.core.some_fn = (function cljs$core$some_fn(var_args){ +var args12490 = []; +var len__9181__auto___12497 = arguments.length; +var i__9182__auto___12498 = (0); +while(true){ +if((i__9182__auto___12498 < len__9181__auto___12497)){ +args12490.push((arguments[i__9182__auto___12498])); + +var G__12499 = (i__9182__auto___12498 + (1)); +i__9182__auto___12498 = G__12499; +continue; +} else { +} +break; +} + +var G__12496 = args12490.length; +switch (G__12496) { +case 1: +return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12490.slice((3)),(0),null)); +return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.some_fn.cljs$core$IFn$_invoke$arity$1 = (function (p){ +return (function() { +var cljs$core$sp1 = null; +var cljs$core$sp1__0 = (function (){ +return null; +}); +var cljs$core$sp1__1 = (function (x){ +return (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null,x)); +}); +var cljs$core$sp1__2 = (function (x,y){ +var or__7960__auto__ = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null,y)); +} +}); +var cljs$core$sp1__3 = (function (x,y,z){ +var or__7960__auto__ = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(x) : p.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(y) : p.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +return (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(z) : p.call(null,z)); +} +} +}); +var cljs$core$sp1__4 = (function() { +var G__12501__delegate = function (x,y,z,args){ +var or__7960__auto__ = cljs$core$sp1.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.some(p,args); +} +}; +var G__12501 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12502__i = 0, G__12502__a = new Array(arguments.length - 3); +while (G__12502__i < G__12502__a.length) {G__12502__a[G__12502__i] = arguments[G__12502__i + 3]; ++G__12502__i;} + args = new cljs.core.IndexedSeq(G__12502__a,0,null); +} +return G__12501__delegate.call(this,x,y,z,args);}; +G__12501.cljs$lang$maxFixedArity = 3; +G__12501.cljs$lang$applyTo = (function (arglist__12503){ +var x = cljs.core.first(arglist__12503); +arglist__12503 = cljs.core.next(arglist__12503); +var y = cljs.core.first(arglist__12503); +arglist__12503 = cljs.core.next(arglist__12503); +var z = cljs.core.first(arglist__12503); +var args = cljs.core.rest(arglist__12503); +return G__12501__delegate(x,y,z,args); +}); +G__12501.cljs$core$IFn$_invoke$arity$variadic = G__12501__delegate; +return G__12501; +})() +; +cljs$core$sp1 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$sp1__0.call(this); +case 1: +return cljs$core$sp1__1.call(this,x); +case 2: +return cljs$core$sp1__2.call(this,x,y); +case 3: +return cljs$core$sp1__3.call(this,x,y,z); +default: +var G__12504 = null; +if (arguments.length > 3) { +var G__12505__i = 0, G__12505__a = new Array(arguments.length - 3); +while (G__12505__i < G__12505__a.length) {G__12505__a[G__12505__i] = arguments[G__12505__i + 3]; ++G__12505__i;} +G__12504 = new cljs.core.IndexedSeq(G__12505__a,0,null); +} +return cljs$core$sp1__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12504); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$sp1.cljs$lang$maxFixedArity = 3; +cljs$core$sp1.cljs$lang$applyTo = cljs$core$sp1__4.cljs$lang$applyTo; +cljs$core$sp1.cljs$core$IFn$_invoke$arity$0 = cljs$core$sp1__0; +cljs$core$sp1.cljs$core$IFn$_invoke$arity$1 = cljs$core$sp1__1; +cljs$core$sp1.cljs$core$IFn$_invoke$arity$2 = cljs$core$sp1__2; +cljs$core$sp1.cljs$core$IFn$_invoke$arity$3 = cljs$core$sp1__3; +cljs$core$sp1.cljs$core$IFn$_invoke$arity$variadic = cljs$core$sp1__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$sp1; +})() +}); + +cljs.core.some_fn.cljs$core$IFn$_invoke$arity$2 = (function (p1,p2){ +return (function() { +var cljs$core$sp2 = null; +var cljs$core$sp2__0 = (function (){ +return null; +}); +var cljs$core$sp2__1 = (function (x){ +var or__7960__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +} +}); +var cljs$core$sp2__2 = (function (x,y){ +var or__7960__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +} +} +} +}); +var cljs$core$sp2__3 = (function (x,y,z){ +var or__7960__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null,z)); +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +var or__7960__auto____$3 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(or__7960__auto____$3)){ +return or__7960__auto____$3; +} else { +var or__7960__auto____$4 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$4)){ +return or__7960__auto____$4; +} else { +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null,z)); +} +} +} +} +} +}); +var cljs$core$sp2__4 = (function() { +var G__12506__delegate = function (x,y,z,args){ +var or__7960__auto__ = cljs$core$sp2.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.some(((function (or__7960__auto__){ +return (function (p1__12484_SHARP_){ +var or__7960__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__12484_SHARP_) : p1.call(null,p1__12484_SHARP_)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +return (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__12484_SHARP_) : p2.call(null,p1__12484_SHARP_)); +} +});})(or__7960__auto__)) +,args); +} +}; +var G__12506 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12507__i = 0, G__12507__a = new Array(arguments.length - 3); +while (G__12507__i < G__12507__a.length) {G__12507__a[G__12507__i] = arguments[G__12507__i + 3]; ++G__12507__i;} + args = new cljs.core.IndexedSeq(G__12507__a,0,null); +} +return G__12506__delegate.call(this,x,y,z,args);}; +G__12506.cljs$lang$maxFixedArity = 3; +G__12506.cljs$lang$applyTo = (function (arglist__12508){ +var x = cljs.core.first(arglist__12508); +arglist__12508 = cljs.core.next(arglist__12508); +var y = cljs.core.first(arglist__12508); +arglist__12508 = cljs.core.next(arglist__12508); +var z = cljs.core.first(arglist__12508); +var args = cljs.core.rest(arglist__12508); +return G__12506__delegate(x,y,z,args); +}); +G__12506.cljs$core$IFn$_invoke$arity$variadic = G__12506__delegate; +return G__12506; +})() +; +cljs$core$sp2 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$sp2__0.call(this); +case 1: +return cljs$core$sp2__1.call(this,x); +case 2: +return cljs$core$sp2__2.call(this,x,y); +case 3: +return cljs$core$sp2__3.call(this,x,y,z); +default: +var G__12509 = null; +if (arguments.length > 3) { +var G__12510__i = 0, G__12510__a = new Array(arguments.length - 3); +while (G__12510__i < G__12510__a.length) {G__12510__a[G__12510__i] = arguments[G__12510__i + 3]; ++G__12510__i;} +G__12509 = new cljs.core.IndexedSeq(G__12510__a,0,null); +} +return cljs$core$sp2__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12509); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$sp2.cljs$lang$maxFixedArity = 3; +cljs$core$sp2.cljs$lang$applyTo = cljs$core$sp2__4.cljs$lang$applyTo; +cljs$core$sp2.cljs$core$IFn$_invoke$arity$0 = cljs$core$sp2__0; +cljs$core$sp2.cljs$core$IFn$_invoke$arity$1 = cljs$core$sp2__1; +cljs$core$sp2.cljs$core$IFn$_invoke$arity$2 = cljs$core$sp2__2; +cljs$core$sp2.cljs$core$IFn$_invoke$arity$3 = cljs$core$sp2__3; +cljs$core$sp2.cljs$core$IFn$_invoke$arity$variadic = cljs$core$sp2__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$sp2; +})() +}); + +cljs.core.some_fn.cljs$core$IFn$_invoke$arity$3 = (function (p1,p2,p3){ +return (function() { +var cljs$core$sp3 = null; +var cljs$core$sp3__0 = (function (){ +return null; +}); +var cljs$core$sp3__1 = (function (x){ +var or__7960__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null,x)); +} +} +}); +var cljs$core$sp3__2 = (function (x,y){ +var or__7960__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null,x)); +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +var or__7960__auto____$3 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$3)){ +return or__7960__auto____$3; +} else { +var or__7960__auto____$4 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$4)){ +return or__7960__auto____$4; +} else { +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null,y)); +} +} +} +} +} +}); +var cljs$core$sp3__3 = (function (x,y,z){ +var or__7960__auto__ = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(x) : p1.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(x) : p2.call(null,x)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(x) : p3.call(null,x)); +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +var or__7960__auto____$3 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(y) : p1.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$3)){ +return or__7960__auto____$3; +} else { +var or__7960__auto____$4 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(y) : p2.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$4)){ +return or__7960__auto____$4; +} else { +var or__7960__auto____$5 = (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(y) : p3.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$5)){ +return or__7960__auto____$5; +} else { +var or__7960__auto____$6 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(z) : p1.call(null,z)); +if(cljs.core.truth_(or__7960__auto____$6)){ +return or__7960__auto____$6; +} else { +var or__7960__auto____$7 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(z) : p2.call(null,z)); +if(cljs.core.truth_(or__7960__auto____$7)){ +return or__7960__auto____$7; +} else { +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(z) : p3.call(null,z)); +} +} +} +} +} +} +} +} +}); +var cljs$core$sp3__4 = (function() { +var G__12511__delegate = function (x,y,z,args){ +var or__7960__auto__ = cljs$core$sp3.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.some(((function (or__7960__auto__){ +return (function (p1__12485_SHARP_){ +var or__7960__auto____$1 = (p1.cljs$core$IFn$_invoke$arity$1 ? p1.cljs$core$IFn$_invoke$arity$1(p1__12485_SHARP_) : p1.call(null,p1__12485_SHARP_)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = (p2.cljs$core$IFn$_invoke$arity$1 ? p2.cljs$core$IFn$_invoke$arity$1(p1__12485_SHARP_) : p2.call(null,p1__12485_SHARP_)); +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +return (p3.cljs$core$IFn$_invoke$arity$1 ? p3.cljs$core$IFn$_invoke$arity$1(p1__12485_SHARP_) : p3.call(null,p1__12485_SHARP_)); +} +} +});})(or__7960__auto__)) +,args); +} +}; +var G__12511 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12512__i = 0, G__12512__a = new Array(arguments.length - 3); +while (G__12512__i < G__12512__a.length) {G__12512__a[G__12512__i] = arguments[G__12512__i + 3]; ++G__12512__i;} + args = new cljs.core.IndexedSeq(G__12512__a,0,null); +} +return G__12511__delegate.call(this,x,y,z,args);}; +G__12511.cljs$lang$maxFixedArity = 3; +G__12511.cljs$lang$applyTo = (function (arglist__12513){ +var x = cljs.core.first(arglist__12513); +arglist__12513 = cljs.core.next(arglist__12513); +var y = cljs.core.first(arglist__12513); +arglist__12513 = cljs.core.next(arglist__12513); +var z = cljs.core.first(arglist__12513); +var args = cljs.core.rest(arglist__12513); +return G__12511__delegate(x,y,z,args); +}); +G__12511.cljs$core$IFn$_invoke$arity$variadic = G__12511__delegate; +return G__12511; +})() +; +cljs$core$sp3 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$sp3__0.call(this); +case 1: +return cljs$core$sp3__1.call(this,x); +case 2: +return cljs$core$sp3__2.call(this,x,y); +case 3: +return cljs$core$sp3__3.call(this,x,y,z); +default: +var G__12514 = null; +if (arguments.length > 3) { +var G__12515__i = 0, G__12515__a = new Array(arguments.length - 3); +while (G__12515__i < G__12515__a.length) {G__12515__a[G__12515__i] = arguments[G__12515__i + 3]; ++G__12515__i;} +G__12514 = new cljs.core.IndexedSeq(G__12515__a,0,null); +} +return cljs$core$sp3__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12514); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$sp3.cljs$lang$maxFixedArity = 3; +cljs$core$sp3.cljs$lang$applyTo = cljs$core$sp3__4.cljs$lang$applyTo; +cljs$core$sp3.cljs$core$IFn$_invoke$arity$0 = cljs$core$sp3__0; +cljs$core$sp3.cljs$core$IFn$_invoke$arity$1 = cljs$core$sp3__1; +cljs$core$sp3.cljs$core$IFn$_invoke$arity$2 = cljs$core$sp3__2; +cljs$core$sp3.cljs$core$IFn$_invoke$arity$3 = cljs$core$sp3__3; +cljs$core$sp3.cljs$core$IFn$_invoke$arity$variadic = cljs$core$sp3__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$sp3; +})() +}); + +cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic = (function (p1,p2,p3,ps){ +var ps__$1 = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(p1,p2,p3,ps); +return ((function (ps__$1){ +return (function() { +var cljs$core$spn = null; +var cljs$core$spn__0 = (function (){ +return null; +}); +var cljs$core$spn__1 = (function (x){ +return cljs.core.some(((function (ps__$1){ +return (function (p1__12486_SHARP_){ +return (p1__12486_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12486_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__12486_SHARP_.call(null,x)); +});})(ps__$1)) +,ps__$1); +}); +var cljs$core$spn__2 = (function (x,y){ +return cljs.core.some(((function (ps__$1){ +return (function (p1__12487_SHARP_){ +var or__7960__auto__ = (p1__12487_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12487_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__12487_SHARP_.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return (p1__12487_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12487_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__12487_SHARP_.call(null,y)); +} +});})(ps__$1)) +,ps__$1); +}); +var cljs$core$spn__3 = (function (x,y,z){ +return cljs.core.some(((function (ps__$1){ +return (function (p1__12488_SHARP_){ +var or__7960__auto__ = (p1__12488_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12488_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p1__12488_SHARP_.call(null,x)); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (p1__12488_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12488_SHARP_.cljs$core$IFn$_invoke$arity$1(y) : p1__12488_SHARP_.call(null,y)); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +return (p1__12488_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__12488_SHARP_.cljs$core$IFn$_invoke$arity$1(z) : p1__12488_SHARP_.call(null,z)); +} +} +});})(ps__$1)) +,ps__$1); +}); +var cljs$core$spn__4 = (function() { +var G__12516__delegate = function (x,y,z,args){ +var or__7960__auto__ = cljs$core$spn.cljs$core$IFn$_invoke$arity$3(x,y,z); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.some(((function (or__7960__auto__,ps__$1){ +return (function (p1__12489_SHARP_){ +return cljs.core.some(p1__12489_SHARP_,args); +});})(or__7960__auto__,ps__$1)) +,ps__$1); +} +}; +var G__12516 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__12517__i = 0, G__12517__a = new Array(arguments.length - 3); +while (G__12517__i < G__12517__a.length) {G__12517__a[G__12517__i] = arguments[G__12517__i + 3]; ++G__12517__i;} + args = new cljs.core.IndexedSeq(G__12517__a,0,null); +} +return G__12516__delegate.call(this,x,y,z,args);}; +G__12516.cljs$lang$maxFixedArity = 3; +G__12516.cljs$lang$applyTo = (function (arglist__12518){ +var x = cljs.core.first(arglist__12518); +arglist__12518 = cljs.core.next(arglist__12518); +var y = cljs.core.first(arglist__12518); +arglist__12518 = cljs.core.next(arglist__12518); +var z = cljs.core.first(arglist__12518); +var args = cljs.core.rest(arglist__12518); +return G__12516__delegate(x,y,z,args); +}); +G__12516.cljs$core$IFn$_invoke$arity$variadic = G__12516__delegate; +return G__12516; +})() +; +cljs$core$spn = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return cljs$core$spn__0.call(this); +case 1: +return cljs$core$spn__1.call(this,x); +case 2: +return cljs$core$spn__2.call(this,x,y); +case 3: +return cljs$core$spn__3.call(this,x,y,z); +default: +var G__12519 = null; +if (arguments.length > 3) { +var G__12520__i = 0, G__12520__a = new Array(arguments.length - 3); +while (G__12520__i < G__12520__a.length) {G__12520__a[G__12520__i] = arguments[G__12520__i + 3]; ++G__12520__i;} +G__12519 = new cljs.core.IndexedSeq(G__12520__a,0,null); +} +return cljs$core$spn__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__12519); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$spn.cljs$lang$maxFixedArity = 3; +cljs$core$spn.cljs$lang$applyTo = cljs$core$spn__4.cljs$lang$applyTo; +cljs$core$spn.cljs$core$IFn$_invoke$arity$0 = cljs$core$spn__0; +cljs$core$spn.cljs$core$IFn$_invoke$arity$1 = cljs$core$spn__1; +cljs$core$spn.cljs$core$IFn$_invoke$arity$2 = cljs$core$spn__2; +cljs$core$spn.cljs$core$IFn$_invoke$arity$3 = cljs$core$spn__3; +cljs$core$spn.cljs$core$IFn$_invoke$arity$variadic = cljs$core$spn__4.cljs$core$IFn$_invoke$arity$variadic; +return cljs$core$spn; +})() +;})(ps__$1)) +}); + +cljs.core.some_fn.cljs$lang$applyTo = (function (seq12491){ +var G__12492 = cljs.core.first(seq12491); +var seq12491__$1 = cljs.core.next(seq12491); +var G__12493 = cljs.core.first(seq12491__$1); +var seq12491__$2 = cljs.core.next(seq12491__$1); +var G__12494 = cljs.core.first(seq12491__$2); +var seq12491__$3 = cljs.core.next(seq12491__$2); +return cljs.core.some_fn.cljs$core$IFn$_invoke$arity$variadic(G__12492,G__12493,G__12494,seq12491__$3); +}); + +cljs.core.some_fn.cljs$lang$maxFixedArity = (3); + +/** + * Returns a lazy sequence consisting of the result of applying f to + * the set of first items of each coll, followed by applying f to the + * set of second items in each coll, until any one of the colls is + * exhausted. Any remaining items in other colls are ignored. Function + * f should accept number-of-colls arguments. Returns a transducer when + * no collection is provided. + */ +cljs.core.map = (function cljs$core$map(var_args){ +var args12522 = []; +var len__9181__auto___12542 = arguments.length; +var i__9182__auto___12543 = (0); +while(true){ +if((i__9182__auto___12543 < len__9181__auto___12542)){ +args12522.push((arguments[i__9182__auto___12543])); + +var G__12544 = (i__9182__auto___12543 + (1)); +i__9182__auto___12543 = G__12544; +continue; +} else { +} +break; +} + +var G__12529 = args12522.length; +switch (G__12529) { +case 1: +return cljs.core.map.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.map.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.map.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.map.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12522.slice((4)),(0),null)); +return cljs.core.map.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),argseq__9204__auto__); + +} +}); + +cljs.core.map.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return (function (rf){ +return (function() { +var G__12546 = null; +var G__12546__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12546__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12546__2 = (function (result,input){ +var G__12530 = result; +var G__12531 = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(input) : f.call(null,input)); +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(G__12530,G__12531) : rf.call(null,G__12530,G__12531)); +}); +var G__12546__3 = (function() { +var G__12547__delegate = function (result,input,inputs){ +var G__12532 = result; +var G__12533 = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,input,inputs); +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(G__12532,G__12533) : rf.call(null,G__12532,G__12533)); +}; +var G__12547 = function (result,input,var_args){ +var inputs = null; +if (arguments.length > 2) { +var G__12548__i = 0, G__12548__a = new Array(arguments.length - 2); +while (G__12548__i < G__12548__a.length) {G__12548__a[G__12548__i] = arguments[G__12548__i + 2]; ++G__12548__i;} + inputs = new cljs.core.IndexedSeq(G__12548__a,0,null); +} +return G__12547__delegate.call(this,result,input,inputs);}; +G__12547.cljs$lang$maxFixedArity = 2; +G__12547.cljs$lang$applyTo = (function (arglist__12549){ +var result = cljs.core.first(arglist__12549); +arglist__12549 = cljs.core.next(arglist__12549); +var input = cljs.core.first(arglist__12549); +var inputs = cljs.core.rest(arglist__12549); +return G__12547__delegate(result,input,inputs); +}); +G__12547.cljs$core$IFn$_invoke$arity$variadic = G__12547__delegate; +return G__12547; +})() +; +G__12546 = function(result,input,var_args){ +var inputs = var_args; +switch(arguments.length){ +case 0: +return G__12546__0.call(this); +case 1: +return G__12546__1.call(this,result); +case 2: +return G__12546__2.call(this,result,input); +default: +var G__12550 = null; +if (arguments.length > 2) { +var G__12551__i = 0, G__12551__a = new Array(arguments.length - 2); +while (G__12551__i < G__12551__a.length) {G__12551__a[G__12551__i] = arguments[G__12551__i + 2]; ++G__12551__i;} +G__12550 = new cljs.core.IndexedSeq(G__12551__a,0,null); +} +return G__12546__3.cljs$core$IFn$_invoke$arity$variadic(result,input, G__12550); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12546.cljs$lang$maxFixedArity = 2; +G__12546.cljs$lang$applyTo = G__12546__3.cljs$lang$applyTo; +G__12546.cljs$core$IFn$_invoke$arity$0 = G__12546__0; +G__12546.cljs$core$IFn$_invoke$arity$1 = G__12546__1; +G__12546.cljs$core$IFn$_invoke$arity$2 = G__12546__2; +G__12546.cljs$core$IFn$_invoke$arity$variadic = G__12546__3.cljs$core$IFn$_invoke$arity$variadic; +return G__12546; +})() +}); +}); + +cljs.core.map.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(s)){ +var c = cljs.core.chunk_first(s); +var size = cljs.core.count(c); +var b = cljs.core.chunk_buffer(size); +var n__8981__auto___12552 = size; +var i_12553 = (0); +while(true){ +if((i_12553 < n__8981__auto___12552)){ +cljs.core.chunk_append(b,(function (){var G__12534 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c,i_12553); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12534) : f.call(null,G__12534)); +})()); + +var G__12554 = (i_12553 + (1)); +i_12553 = G__12554; +continue; +} else { +} +break; +} + +return cljs.core.chunk_cons(cljs.core.chunk(b),cljs.core.map.cljs$core$IFn$_invoke$arity$2(f,cljs.core.chunk_rest(s))); +} else { +return cljs.core.cons((function (){var G__12535 = cljs.core.first(s); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12535) : f.call(null,G__12535)); +})(),cljs.core.map.cljs$core$IFn$_invoke$arity$2(f,cljs.core.rest(s))); +} +} else { +return null; +} +}),null,null)); +}); + +cljs.core.map.cljs$core$IFn$_invoke$arity$3 = (function (f,c1,c2){ +return (new cljs.core.LazySeq(null,(function (){ +var s1 = cljs.core.seq(c1); +var s2 = cljs.core.seq(c2); +if((s1) && (s2)){ +return cljs.core.cons((function (){var G__12536 = cljs.core.first(s1); +var G__12537 = cljs.core.first(s2); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12536,G__12537) : f.call(null,G__12536,G__12537)); +})(),cljs.core.map.cljs$core$IFn$_invoke$arity$3(f,cljs.core.rest(s1),cljs.core.rest(s2))); +} else { +return null; +} +}),null,null)); +}); + +cljs.core.map.cljs$core$IFn$_invoke$arity$4 = (function (f,c1,c2,c3){ +return (new cljs.core.LazySeq(null,(function (){ +var s1 = cljs.core.seq(c1); +var s2 = cljs.core.seq(c2); +var s3 = cljs.core.seq(c3); +if((s1) && (s2) && (s3)){ +return cljs.core.cons((function (){var G__12538 = cljs.core.first(s1); +var G__12539 = cljs.core.first(s2); +var G__12540 = cljs.core.first(s3); +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12538,G__12539,G__12540) : f.call(null,G__12538,G__12539,G__12540)); +})(),cljs.core.map.cljs$core$IFn$_invoke$arity$4(f,cljs.core.rest(s1),cljs.core.rest(s2),cljs.core.rest(s3))); +} else { +return null; +} +}),null,null)); +}); + +cljs.core.map.cljs$core$IFn$_invoke$arity$variadic = (function (f,c1,c2,c3,colls){ +var step = (function cljs$core$step(cs){ +return (new cljs.core.LazySeq(null,(function (){ +var ss = cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.seq,cs); +if(cljs.core.every_QMARK_(cljs.core.identity,ss)){ +return cljs.core.cons(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.first,ss),cljs$core$step(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.rest,ss))); +} else { +return null; +} +}),null,null)); +}); +return cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (step){ +return (function (p1__12521_SHARP_){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f,p1__12521_SHARP_); +});})(step)) +,step(cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(colls,c3,cljs.core.array_seq([c2,c1], 0)))); +}); + +cljs.core.map.cljs$lang$applyTo = (function (seq12523){ +var G__12524 = cljs.core.first(seq12523); +var seq12523__$1 = cljs.core.next(seq12523); +var G__12525 = cljs.core.first(seq12523__$1); +var seq12523__$2 = cljs.core.next(seq12523__$1); +var G__12526 = cljs.core.first(seq12523__$2); +var seq12523__$3 = cljs.core.next(seq12523__$2); +var G__12527 = cljs.core.first(seq12523__$3); +var seq12523__$4 = cljs.core.next(seq12523__$3); +return cljs.core.map.cljs$core$IFn$_invoke$arity$variadic(G__12524,G__12525,G__12526,G__12527,seq12523__$4); +}); + +cljs.core.map.cljs$lang$maxFixedArity = (4); + +/** + * Returns a lazy sequence of the first n items in coll, or all items if + * there are fewer than n. Returns a stateful transducer when + * no collection is provided. + */ +cljs.core.take = (function cljs$core$take(var_args){ +var args12555 = []; +var len__9181__auto___12558 = arguments.length; +var i__9182__auto___12559 = (0); +while(true){ +if((i__9182__auto___12559 < len__9181__auto___12558)){ +args12555.push((arguments[i__9182__auto___12559])); + +var G__12560 = (i__9182__auto___12559 + (1)); +i__9182__auto___12559 = G__12560; +continue; +} else { +} +break; +} + +var G__12557 = args12555.length; +switch (G__12557) { +case 1: +return cljs.core.take.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.take.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12555.length)].join(''))); + +} +}); + +cljs.core.take.cljs$core$IFn$_invoke$arity$1 = (function (n){ +if(typeof n === 'number'){ +} else { +throw (new Error("Assert failed: (number? n)")); +} + +return (function (rf){ +var na = cljs.core.volatile_BANG_(n); +return ((function (na){ +return (function() { +var G__12562 = null; +var G__12562__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12562__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12562__2 = (function (result,input){ +var n__$1 = cljs.core.deref(na); +var nn = cljs.core._vreset_BANG_(na,(cljs.core._deref(na) - (1))); +var result__$1 = (((n__$1 > (0)))?(rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)):result); +if(!((nn > (0)))){ +return cljs.core.ensure_reduced(result__$1); +} else { +return result__$1; +} +}); +G__12562 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12562__0.call(this); +case 1: +return G__12562__1.call(this,result); +case 2: +return G__12562__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12562.cljs$core$IFn$_invoke$arity$0 = G__12562__0; +G__12562.cljs$core$IFn$_invoke$arity$1 = G__12562__1; +G__12562.cljs$core$IFn$_invoke$arity$2 = G__12562__2; +return G__12562; +})() +;})(na)) +}); +}); + +cljs.core.take.cljs$core$IFn$_invoke$arity$2 = (function (n,coll){ +if(typeof n === 'number'){ +} else { +throw (new Error("Assert failed: (number? n)")); +} + +return (new cljs.core.LazySeq(null,(function (){ +if((n > (0))){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +return cljs.core.cons(cljs.core.first(s),cljs.core.take.cljs$core$IFn$_invoke$arity$2((n - (1)),cljs.core.rest(s))); +} else { +return null; +} +} else { +return null; +} +}),null,null)); +}); + +cljs.core.take.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy sequence of all but the first n items in coll. + * Returns a stateful transducer when no collection is provided. + */ +cljs.core.drop = (function cljs$core$drop(var_args){ +var args12563 = []; +var len__9181__auto___12566 = arguments.length; +var i__9182__auto___12567 = (0); +while(true){ +if((i__9182__auto___12567 < len__9181__auto___12566)){ +args12563.push((arguments[i__9182__auto___12567])); + +var G__12568 = (i__9182__auto___12567 + (1)); +i__9182__auto___12567 = G__12568; +continue; +} else { +} +break; +} + +var G__12565 = args12563.length; +switch (G__12565) { +case 1: +return cljs.core.drop.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.drop.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12563.length)].join(''))); + +} +}); + +cljs.core.drop.cljs$core$IFn$_invoke$arity$1 = (function (n){ +if(typeof n === 'number'){ +} else { +throw (new Error("Assert failed: (number? n)")); +} + +return (function (rf){ +var na = cljs.core.volatile_BANG_(n); +return ((function (na){ +return (function() { +var G__12570 = null; +var G__12570__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12570__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12570__2 = (function (result,input){ +var n__$1 = cljs.core.deref(na); +cljs.core._vreset_BANG_(na,(cljs.core._deref(na) - (1))); + +if((n__$1 > (0))){ +return result; +} else { +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} +}); +G__12570 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12570__0.call(this); +case 1: +return G__12570__1.call(this,result); +case 2: +return G__12570__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12570.cljs$core$IFn$_invoke$arity$0 = G__12570__0; +G__12570.cljs$core$IFn$_invoke$arity$1 = G__12570__1; +G__12570.cljs$core$IFn$_invoke$arity$2 = G__12570__2; +return G__12570; +})() +;})(na)) +}); +}); + +cljs.core.drop.cljs$core$IFn$_invoke$arity$2 = (function (n,coll){ +if(typeof n === 'number'){ +} else { +throw (new Error("Assert failed: (number? n)")); +} + +var step = (function (n__$1,coll__$1){ +while(true){ +var s = cljs.core.seq(coll__$1); +if(((n__$1 > (0))) && (s)){ +var G__12571 = (n__$1 - (1)); +var G__12572 = cljs.core.rest(s); +n__$1 = G__12571; +coll__$1 = G__12572; +continue; +} else { +return s; +} +break; +} +}); +return (new cljs.core.LazySeq(null,((function (step){ +return (function (){ +return step(n,coll); +});})(step)) +,null,null)); +}); + +cljs.core.drop.cljs$lang$maxFixedArity = 2; + +/** + * Return a lazy sequence of all but the last n (default 1) items in coll + */ +cljs.core.drop_last = (function cljs$core$drop_last(var_args){ +var args12573 = []; +var len__9181__auto___12576 = arguments.length; +var i__9182__auto___12577 = (0); +while(true){ +if((i__9182__auto___12577 < len__9181__auto___12576)){ +args12573.push((arguments[i__9182__auto___12577])); + +var G__12578 = (i__9182__auto___12577 + (1)); +i__9182__auto___12577 = G__12578; +continue; +} else { +} +break; +} + +var G__12575 = args12573.length; +switch (G__12575) { +case 1: +return cljs.core.drop_last.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.drop_last.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12573.length)].join(''))); + +} +}); + +cljs.core.drop_last.cljs$core$IFn$_invoke$arity$1 = (function (s){ +return cljs.core.drop_last.cljs$core$IFn$_invoke$arity$2((1),s); +}); + +cljs.core.drop_last.cljs$core$IFn$_invoke$arity$2 = (function (n,s){ +return cljs.core.map.cljs$core$IFn$_invoke$arity$3((function (x,_){ +return x; +}),s,cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n,s)); +}); + +cljs.core.drop_last.cljs$lang$maxFixedArity = 2; + +/** + * Returns a seq of the last n items in coll. Depending on the type + * of coll may be no better than linear time. For vectors, see also subvec. + */ +cljs.core.take_last = (function cljs$core$take_last(n,coll){ +var s = cljs.core.seq(coll); +var lead = cljs.core.seq(cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n,coll)); +while(true){ +if(lead){ +var G__12580 = cljs.core.next(s); +var G__12581 = cljs.core.next(lead); +s = G__12580; +lead = G__12581; +continue; +} else { +return s; +} +break; +} +}); +/** + * Returns a lazy sequence of the items in coll starting from the + * first item for which (pred item) returns logical false. Returns a + * stateful transducer when no collection is provided. + */ +cljs.core.drop_while = (function cljs$core$drop_while(var_args){ +var args12582 = []; +var len__9181__auto___12587 = arguments.length; +var i__9182__auto___12588 = (0); +while(true){ +if((i__9182__auto___12588 < len__9181__auto___12587)){ +args12582.push((arguments[i__9182__auto___12588])); + +var G__12589 = (i__9182__auto___12588 + (1)); +i__9182__auto___12588 = G__12589; +continue; +} else { +} +break; +} + +var G__12584 = args12582.length; +switch (G__12584) { +case 1: +return cljs.core.drop_while.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.drop_while.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12582.length)].join(''))); + +} +}); + +cljs.core.drop_while.cljs$core$IFn$_invoke$arity$1 = (function (pred){ +return (function (rf){ +var da = cljs.core.volatile_BANG_(true); +return ((function (da){ +return (function() { +var G__12591 = null; +var G__12591__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12591__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12591__2 = (function (result,input){ +var drop_QMARK_ = cljs.core.deref(da); +if(cljs.core.truth_((function (){var and__7948__auto__ = drop_QMARK_; +if(cljs.core.truth_(and__7948__auto__)){ +return (pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null,input)); +} else { +return and__7948__auto__; +} +})())){ +return result; +} else { +cljs.core.vreset_BANG_(da,null); + +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} +}); +G__12591 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12591__0.call(this); +case 1: +return G__12591__1.call(this,result); +case 2: +return G__12591__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12591.cljs$core$IFn$_invoke$arity$0 = G__12591__0; +G__12591.cljs$core$IFn$_invoke$arity$1 = G__12591__1; +G__12591.cljs$core$IFn$_invoke$arity$2 = G__12591__2; +return G__12591; +})() +;})(da)) +}); +}); + +cljs.core.drop_while.cljs$core$IFn$_invoke$arity$2 = (function (pred,coll){ +var step = (function (pred__$1,coll__$1){ +while(true){ +var s = cljs.core.seq(coll__$1); +if(cljs.core.truth_((function (){var and__7948__auto__ = s; +if(and__7948__auto__){ +var G__12586 = cljs.core.first(s); +return (pred__$1.cljs$core$IFn$_invoke$arity$1 ? pred__$1.cljs$core$IFn$_invoke$arity$1(G__12586) : pred__$1.call(null,G__12586)); +} else { +return and__7948__auto__; +} +})())){ +var G__12592 = pred__$1; +var G__12593 = cljs.core.rest(s); +pred__$1 = G__12592; +coll__$1 = G__12593; +continue; +} else { +return s; +} +break; +} +}); +return (new cljs.core.LazySeq(null,((function (step){ +return (function (){ +return step(pred,coll); +});})(step)) +,null,null)); +}); + +cljs.core.drop_while.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy (infinite!) sequence of repetitions of the items in coll. + */ +cljs.core.cycle = (function cljs$core$cycle(coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +return cljs.core.concat.cljs$core$IFn$_invoke$arity$2(s,(cljs.core.cycle.cljs$core$IFn$_invoke$arity$1 ? cljs.core.cycle.cljs$core$IFn$_invoke$arity$1(s) : cljs.core.cycle.call(null,s))); +} else { +return null; +} +}),null,null)); +}); +/** + * Returns a vector of [(take n coll) (drop n coll)] + */ +cljs.core.split_at = (function cljs$core$split_at(n,coll){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,coll),cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n,coll)], null); +}); +/** + * Returns a lazy (infinite!, or length n if supplied) sequence of xs. + */ +cljs.core.repeat = (function cljs$core$repeat(var_args){ +var args12594 = []; +var len__9181__auto___12597 = arguments.length; +var i__9182__auto___12598 = (0); +while(true){ +if((i__9182__auto___12598 < len__9181__auto___12597)){ +args12594.push((arguments[i__9182__auto___12598])); + +var G__12599 = (i__9182__auto___12598 + (1)); +i__9182__auto___12598 = G__12599; +continue; +} else { +} +break; +} + +var G__12596 = args12594.length; +switch (G__12596) { +case 1: +return cljs.core.repeat.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.repeat.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12594.length)].join(''))); + +} +}); + +cljs.core.repeat.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return (new cljs.core.LazySeq(null,(function (){ +return cljs.core.cons(x,cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(x)); +}),null,null)); +}); + +cljs.core.repeat.cljs$core$IFn$_invoke$arity$2 = (function (n,x){ +return cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(x)); +}); + +cljs.core.repeat.cljs$lang$maxFixedArity = 2; + +/** + * DEPRECATED: Use 'repeat' instead. + * Returns a lazy seq of n xs. + */ +cljs.core.replicate = (function cljs$core$replicate(n,x){ +return cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(x)); +}); +/** + * Takes a function of no args, presumably with side effects, and + * returns an infinite (or length n if supplied) lazy sequence of calls + * to it + */ +cljs.core.repeatedly = (function cljs$core$repeatedly(var_args){ +var args12601 = []; +var len__9181__auto___12604 = arguments.length; +var i__9182__auto___12605 = (0); +while(true){ +if((i__9182__auto___12605 < len__9181__auto___12604)){ +args12601.push((arguments[i__9182__auto___12605])); + +var G__12606 = (i__9182__auto___12605 + (1)); +i__9182__auto___12605 = G__12606; +continue; +} else { +} +break; +} + +var G__12603 = args12601.length; +switch (G__12603) { +case 1: +return cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12601.length)].join(''))); + +} +}); + +cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return (new cljs.core.LazySeq(null,(function (){ +return cljs.core.cons((f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)),cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1(f)); +}),null,null)); +}); + +cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$2 = (function (n,f){ +return cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,cljs.core.repeatedly.cljs$core$IFn$_invoke$arity$1(f)); +}); + +cljs.core.repeatedly.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects + */ +cljs.core.iterate = (function cljs$core$iterate(f,x){ +return cljs.core.cons(x,(new cljs.core.LazySeq(null,(function (){ +var G__12610 = f; +var G__12611 = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null,x)); +return (cljs.core.iterate.cljs$core$IFn$_invoke$arity$2 ? cljs.core.iterate.cljs$core$IFn$_invoke$arity$2(G__12610,G__12611) : cljs.core.iterate.call(null,G__12610,G__12611)); +}),null,null))); +}); +/** + * Returns a lazy seq of the first item in each coll, then the second etc. + */ +cljs.core.interleave = (function cljs$core$interleave(var_args){ +var args12612 = []; +var len__9181__auto___12618 = arguments.length; +var i__9182__auto___12619 = (0); +while(true){ +if((i__9182__auto___12619 < len__9181__auto___12618)){ +args12612.push((arguments[i__9182__auto___12619])); + +var G__12620 = (i__9182__auto___12619 + (1)); +i__9182__auto___12619 = G__12620; +continue; +} else { +} +break; +} + +var G__12617 = args12612.length; +switch (G__12617) { +case 0: +return cljs.core.interleave.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.interleave.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.interleave.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12612.slice((2)),(0),null)); +return cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +cljs.core.interleave.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.List.EMPTY; +}); + +cljs.core.interleave.cljs$core$IFn$_invoke$arity$1 = (function (c1){ +return (new cljs.core.LazySeq(null,(function (){ +return c1; +}),null,null)); +}); + +cljs.core.interleave.cljs$core$IFn$_invoke$arity$2 = (function (c1,c2){ +return (new cljs.core.LazySeq(null,(function (){ +var s1 = cljs.core.seq(c1); +var s2 = cljs.core.seq(c2); +if((s1) && (s2)){ +return cljs.core.cons(cljs.core.first(s1),cljs.core.cons(cljs.core.first(s2),cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(cljs.core.rest(s1),cljs.core.rest(s2)))); +} else { +return null; +} +}),null,null)); +}); + +cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic = (function (c1,c2,colls){ +return (new cljs.core.LazySeq(null,(function (){ +var ss = cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.seq,cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(colls,c2,cljs.core.array_seq([c1], 0))); +if(cljs.core.every_QMARK_(cljs.core.identity,ss)){ +return cljs.core.concat.cljs$core$IFn$_invoke$arity$2(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.first,ss),cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.interleave,cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.rest,ss))); +} else { +return null; +} +}),null,null)); +}); + +cljs.core.interleave.cljs$lang$applyTo = (function (seq12613){ +var G__12614 = cljs.core.first(seq12613); +var seq12613__$1 = cljs.core.next(seq12613); +var G__12615 = cljs.core.first(seq12613__$1); +var seq12613__$2 = cljs.core.next(seq12613__$1); +return cljs.core.interleave.cljs$core$IFn$_invoke$arity$variadic(G__12614,G__12615,seq12613__$2); +}); + +cljs.core.interleave.cljs$lang$maxFixedArity = (2); + +/** + * Returns a lazy seq of the elements of coll separated by sep. + * Returns a stateful transducer when no collection is provided. + */ +cljs.core.interpose = (function cljs$core$interpose(var_args){ +var args12622 = []; +var len__9181__auto___12625 = arguments.length; +var i__9182__auto___12626 = (0); +while(true){ +if((i__9182__auto___12626 < len__9181__auto___12625)){ +args12622.push((arguments[i__9182__auto___12626])); + +var G__12627 = (i__9182__auto___12626 + (1)); +i__9182__auto___12626 = G__12627; +continue; +} else { +} +break; +} + +var G__12624 = args12622.length; +switch (G__12624) { +case 1: +return cljs.core.interpose.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.interpose.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12622.length)].join(''))); + +} +}); + +cljs.core.interpose.cljs$core$IFn$_invoke$arity$1 = (function (sep){ +return (function (rf){ +var started = cljs.core.volatile_BANG_(false); +return ((function (started){ +return (function() { +var G__12629 = null; +var G__12629__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12629__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12629__2 = (function (result,input){ +if(cljs.core.truth_(cljs.core.deref(started))){ +var sepr = (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,sep) : rf.call(null,result,sep)); +if(cljs.core.reduced_QMARK_(sepr)){ +return sepr; +} else { +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(sepr,input) : rf.call(null,sepr,input)); +} +} else { +cljs.core.vreset_BANG_(started,true); + +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} +}); +G__12629 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12629__0.call(this); +case 1: +return G__12629__1.call(this,result); +case 2: +return G__12629__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12629.cljs$core$IFn$_invoke$arity$0 = G__12629__0; +G__12629.cljs$core$IFn$_invoke$arity$1 = G__12629__1; +G__12629.cljs$core$IFn$_invoke$arity$2 = G__12629__2; +return G__12629; +})() +;})(started)) +}); +}); + +cljs.core.interpose.cljs$core$IFn$_invoke$arity$2 = (function (sep,coll){ +return cljs.core.drop.cljs$core$IFn$_invoke$arity$2((1),cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(cljs.core.repeat.cljs$core$IFn$_invoke$arity$1(sep),coll)); +}); + +cljs.core.interpose.cljs$lang$maxFixedArity = 2; + +/** + * Take a collection of collections, and return a lazy seq + * of items from the inner collection + */ +cljs.core.flatten1 = (function cljs$core$flatten1(colls){ +var cat = (function cljs$core$flatten1_$_cat(coll,colls__$1){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5276__auto__ = cljs.core.seq(coll); +if(temp__5276__auto__){ +var coll__$1 = temp__5276__auto__; +return cljs.core.cons(cljs.core.first(coll__$1),cljs$core$flatten1_$_cat(cljs.core.rest(coll__$1),colls__$1)); +} else { +if(cljs.core.seq(colls__$1)){ +return cljs$core$flatten1_$_cat(cljs.core.first(colls__$1),cljs.core.rest(colls__$1)); +} else { +return null; +} +} +}),null,null)); +}); +return cat(null,colls); +}); +/** + * Returns the result of applying concat to the result of applying map + * to f and colls. Thus function f should return a collection. Returns + * a transducer when no collections are provided + */ +cljs.core.mapcat = (function cljs$core$mapcat(var_args){ +var args12638 = []; +var len__9181__auto___12643 = arguments.length; +var i__9182__auto___12644 = (0); +while(true){ +if((i__9182__auto___12644 < len__9181__auto___12643)){ +args12638.push((arguments[i__9182__auto___12644])); + +var G__12645 = (i__9182__auto___12644 + (1)); +i__9182__auto___12644 = G__12645; +continue; +} else { +} +break; +} + +var G__12642 = args12638.length; +switch (G__12642) { +case 1: +return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12638.slice((1)),(0),null)); +return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9204__auto__); + +} +}); + +cljs.core.mapcat.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return cljs.core.comp.cljs$core$IFn$_invoke$arity$2(cljs.core.map.cljs$core$IFn$_invoke$arity$1(f),cljs.core.cat); +}); + +cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic = (function (f,colls){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.concat,cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.map,f,colls)); +}); + +cljs.core.mapcat.cljs$lang$applyTo = (function (seq12639){ +var G__12640 = cljs.core.first(seq12639); +var seq12639__$1 = cljs.core.next(seq12639); +return cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic(G__12640,seq12639__$1); +}); + +cljs.core.mapcat.cljs$lang$maxFixedArity = (1); + +/** + * Returns a lazy sequence of the items in coll for which + * (pred item) returns true. pred must be free of side-effects. + * Returns a transducer when no collection is provided. + */ +cljs.core.filter = (function cljs$core$filter(var_args){ +var args12647 = []; +var len__9181__auto___12651 = arguments.length; +var i__9182__auto___12652 = (0); +while(true){ +if((i__9182__auto___12652 < len__9181__auto___12651)){ +args12647.push((arguments[i__9182__auto___12652])); + +var G__12653 = (i__9182__auto___12652 + (1)); +i__9182__auto___12652 = G__12653; +continue; +} else { +} +break; +} + +var G__12649 = args12647.length; +switch (G__12649) { +case 1: +return cljs.core.filter.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.filter.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12647.length)].join(''))); + +} +}); + +cljs.core.filter.cljs$core$IFn$_invoke$arity$1 = (function (pred){ +return (function (rf){ +return (function() { +var G__12655 = null; +var G__12655__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__12655__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__12655__2 = (function (result,input){ +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null,input)))){ +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} else { +return result; +} +}); +G__12655 = function(result,input){ +switch(arguments.length){ +case 0: +return G__12655__0.call(this); +case 1: +return G__12655__1.call(this,result); +case 2: +return G__12655__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12655.cljs$core$IFn$_invoke$arity$0 = G__12655__0; +G__12655.cljs$core$IFn$_invoke$arity$1 = G__12655__1; +G__12655.cljs$core$IFn$_invoke$arity$2 = G__12655__2; +return G__12655; +})() +}); +}); + +cljs.core.filter.cljs$core$IFn$_invoke$arity$2 = (function (pred,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(s)){ +var c = cljs.core.chunk_first(s); +var size = cljs.core.count(c); +var b = cljs.core.chunk_buffer(size); +var n__8981__auto___12656 = size; +var i_12657 = (0); +while(true){ +if((i_12657 < n__8981__auto___12656)){ +if(cljs.core.truth_((function (){var G__12650 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c,i_12657); +return (pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__12650) : pred.call(null,G__12650)); +})())){ +cljs.core.chunk_append(b,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c,i_12657)); +} else { +} + +var G__12658 = (i_12657 + (1)); +i_12657 = G__12658; +continue; +} else { +} +break; +} + +return cljs.core.chunk_cons(cljs.core.chunk(b),cljs.core.filter.cljs$core$IFn$_invoke$arity$2(pred,cljs.core.chunk_rest(s))); +} else { +var f = cljs.core.first(s); +var r = cljs.core.rest(s); +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(f) : pred.call(null,f)))){ +return cljs.core.cons(f,cljs.core.filter.cljs$core$IFn$_invoke$arity$2(pred,r)); +} else { +return cljs.core.filter.cljs$core$IFn$_invoke$arity$2(pred,r); +} +} +} else { +return null; +} +}),null,null)); +}); + +cljs.core.filter.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy sequence of the items in coll for which + * (pred item) returns false. pred must be free of side-effects. + * Returns a transducer when no collection is provided. + */ +cljs.core.remove = (function cljs$core$remove(var_args){ +var args12659 = []; +var len__9181__auto___12662 = arguments.length; +var i__9182__auto___12663 = (0); +while(true){ +if((i__9182__auto___12663 < len__9181__auto___12662)){ +args12659.push((arguments[i__9182__auto___12663])); + +var G__12664 = (i__9182__auto___12663 + (1)); +i__9182__auto___12663 = G__12664; +continue; +} else { +} +break; +} + +var G__12661 = args12659.length; +switch (G__12661) { +case 1: +return cljs.core.remove.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.remove.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12659.length)].join(''))); + +} +}); + +cljs.core.remove.cljs$core$IFn$_invoke$arity$1 = (function (pred){ +return cljs.core.filter.cljs$core$IFn$_invoke$arity$1(cljs.core.complement(pred)); +}); + +cljs.core.remove.cljs$core$IFn$_invoke$arity$2 = (function (pred,coll){ +return cljs.core.filter.cljs$core$IFn$_invoke$arity$2(cljs.core.complement(pred),coll); +}); + +cljs.core.remove.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy sequence of the nodes in a tree, via a depth-first walk. + * branch? must be a fn of one arg that returns true if passed a node + * that can have children (but may not). children must be a fn of one + * arg that returns a sequence of the children. Will only be called on + * nodes for which branch? returns true. Root is the root node of the + * tree. + */ +cljs.core.tree_seq = (function cljs$core$tree_seq(branch_QMARK_,children,root){ +var walk = (function cljs$core$tree_seq_$_walk(node){ +return (new cljs.core.LazySeq(null,(function (){ +return cljs.core.cons(node,(cljs.core.truth_((branch_QMARK_.cljs$core$IFn$_invoke$arity$1 ? branch_QMARK_.cljs$core$IFn$_invoke$arity$1(node) : branch_QMARK_.call(null,node)))?cljs.core.mapcat.cljs$core$IFn$_invoke$arity$variadic(cljs$core$tree_seq_$_walk,cljs.core.array_seq([(children.cljs$core$IFn$_invoke$arity$1 ? children.cljs$core$IFn$_invoke$arity$1(node) : children.call(null,node))], 0)):null)); +}),null,null)); +}); +return walk(root); +}); +/** + * Takes any nested combination of sequential things (lists, vectors, + * etc.) and returns their contents as a single, flat sequence. + * (flatten nil) returns nil. + */ +cljs.core.flatten = (function cljs$core$flatten(x){ +return cljs.core.filter.cljs$core$IFn$_invoke$arity$2((function (p1__12666_SHARP_){ +return !(cljs.core.sequential_QMARK_(p1__12666_SHARP_)); +}),cljs.core.rest(cljs.core.tree_seq(cljs.core.sequential_QMARK_,cljs.core.seq,x))); +}); +/** + * Returns a new coll consisting of to-coll with all of the items of + * from-coll conjoined. A transducer may be supplied. + */ +cljs.core.into = (function cljs$core$into(var_args){ +var args12667 = []; +var len__9181__auto___12672 = arguments.length; +var i__9182__auto___12673 = (0); +while(true){ +if((i__9182__auto___12673 < len__9181__auto___12672)){ +args12667.push((arguments[i__9182__auto___12673])); + +var G__12674 = (i__9182__auto___12673 + (1)); +i__9182__auto___12673 = G__12674; +continue; +} else { +} +break; +} + +var G__12669 = args12667.length; +switch (G__12669) { +case 0: +return cljs.core.into.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.into.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.into.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.into.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12667.length)].join(''))); + +} +}); + +cljs.core.into.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.PersistentVector.EMPTY; +}); + +cljs.core.into.cljs$core$IFn$_invoke$arity$1 = (function (to){ +return to; +}); + +cljs.core.into.cljs$core$IFn$_invoke$arity$2 = (function (to,from){ +if(!((to == null))){ +if(((!((to == null)))?((((to.cljs$lang$protocol_mask$partition1$ & (4))) || ((cljs.core.PROTOCOL_SENTINEL === to.cljs$core$IEditableCollection$)))?true:false):false)){ +return cljs.core._with_meta(cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj_BANG_,cljs.core.transient$(to),from)),cljs.core.meta(to)); +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,to,from); +} +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj,cljs.core.List.EMPTY,from); +} +}); + +cljs.core.into.cljs$core$IFn$_invoke$arity$3 = (function (to,xform,from){ +if(((!((to == null)))?((((to.cljs$lang$protocol_mask$partition1$ & (4))) || ((cljs.core.PROTOCOL_SENTINEL === to.cljs$core$IEditableCollection$)))?true:false):false)){ +return cljs.core._with_meta(cljs.core.persistent_BANG_(cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(xform,cljs.core.conj_BANG_,cljs.core.transient$(to),from)),cljs.core.meta(to)); +} else { +return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(xform,cljs.core.conj,to,from); +} +}); + +cljs.core.into.cljs$lang$maxFixedArity = 3; + +/** + * Returns a vector consisting of the result of applying f to the + * set of first items of each coll, followed by applying f to the set + * of second items in each coll, until any one of the colls is + * exhausted. Any remaining items in other colls are ignored. Function + * f should accept number-of-colls arguments. + */ +cljs.core.mapv = (function cljs$core$mapv(var_args){ +var args12676 = []; +var len__9181__auto___12684 = arguments.length; +var i__9182__auto___12685 = (0); +while(true){ +if((i__9182__auto___12685 < len__9181__auto___12684)){ +args12676.push((arguments[i__9182__auto___12685])); + +var G__12686 = (i__9182__auto___12685 + (1)); +i__9182__auto___12685 = G__12686; +continue; +} else { +} +break; +} + +var G__12683 = args12676.length; +switch (G__12683) { +case 2: +return cljs.core.mapv.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.mapv.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.mapv.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12676.slice((4)),(0),null)); +return cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),argseq__9204__auto__); + +} +}); + +cljs.core.mapv.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (v,o){ +return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(v,(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(o) : f.call(null,o))); +}),cljs.core.transient$(cljs.core.PersistentVector.EMPTY),coll)); +}); + +cljs.core.mapv.cljs$core$IFn$_invoke$arity$3 = (function (f,c1,c2){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentVector.EMPTY,cljs.core.map.cljs$core$IFn$_invoke$arity$3(f,c1,c2)); +}); + +cljs.core.mapv.cljs$core$IFn$_invoke$arity$4 = (function (f,c1,c2,c3){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentVector.EMPTY,cljs.core.map.cljs$core$IFn$_invoke$arity$4(f,c1,c2,c3)); +}); + +cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic = (function (f,c1,c2,c3,colls){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentVector.EMPTY,cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(cljs.core.map,f,c1,c2,c3,cljs.core.array_seq([colls], 0))); +}); + +cljs.core.mapv.cljs$lang$applyTo = (function (seq12677){ +var G__12678 = cljs.core.first(seq12677); +var seq12677__$1 = cljs.core.next(seq12677); +var G__12679 = cljs.core.first(seq12677__$1); +var seq12677__$2 = cljs.core.next(seq12677__$1); +var G__12680 = cljs.core.first(seq12677__$2); +var seq12677__$3 = cljs.core.next(seq12677__$2); +var G__12681 = cljs.core.first(seq12677__$3); +var seq12677__$4 = cljs.core.next(seq12677__$3); +return cljs.core.mapv.cljs$core$IFn$_invoke$arity$variadic(G__12678,G__12679,G__12680,G__12681,seq12677__$4); +}); + +cljs.core.mapv.cljs$lang$maxFixedArity = (4); + +/** + * Returns a vector of the items in coll for which + * (pred item) returns true. pred must be free of side-effects. + */ +cljs.core.filterv = (function cljs$core$filterv(pred,coll){ +return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (v,o){ +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(o) : pred.call(null,o)))){ +return cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(v,o); +} else { +return v; +} +}),cljs.core.transient$(cljs.core.PersistentVector.EMPTY),coll)); +}); +/** + * Returns a lazy sequence of lists of n items each, at offsets step + * apart. If step is not supplied, defaults to n, i.e. the partitions + * do not overlap. If a pad collection is supplied, use its elements as + * necessary to complete last partition up to n items. In case there are + * not enough padding elements, return a partition with less than n items. + */ +cljs.core.partition = (function cljs$core$partition(var_args){ +var args12688 = []; +var len__9181__auto___12691 = arguments.length; +var i__9182__auto___12692 = (0); +while(true){ +if((i__9182__auto___12692 < len__9181__auto___12691)){ +args12688.push((arguments[i__9182__auto___12692])); + +var G__12693 = (i__9182__auto___12692 + (1)); +i__9182__auto___12692 = G__12693; +continue; +} else { +} +break; +} + +var G__12690 = args12688.length; +switch (G__12690) { +case 2: +return cljs.core.partition.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.partition.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.partition.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12688.length)].join(''))); + +} +}); + +cljs.core.partition.cljs$core$IFn$_invoke$arity$2 = (function (n,coll){ +return cljs.core.partition.cljs$core$IFn$_invoke$arity$3(n,n,coll); +}); + +cljs.core.partition.cljs$core$IFn$_invoke$arity$3 = (function (n,step,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +var p = cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,s); +if((n === cljs.core.count(p))){ +return cljs.core.cons(p,cljs.core.partition.cljs$core$IFn$_invoke$arity$3(n,step,cljs.core.drop.cljs$core$IFn$_invoke$arity$2(step,s))); +} else { +return null; +} +} else { +return null; +} +}),null,null)); +}); + +cljs.core.partition.cljs$core$IFn$_invoke$arity$4 = (function (n,step,pad,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +var p = cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,s); +if((n === cljs.core.count(p))){ +return cljs.core.cons(p,cljs.core.partition.cljs$core$IFn$_invoke$arity$4(n,step,pad,cljs.core.drop.cljs$core$IFn$_invoke$arity$2(step,s))); +} else { +var x__8894__auto__ = cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(p,pad)); +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto__); +} +} else { +return null; +} +}),null,null)); +}); + +cljs.core.partition.cljs$lang$maxFixedArity = 4; + +/** + * Returns the value in a nested associative structure, + * where ks is a sequence of keys. Returns nil if the key is not present, + * or the not-found value if supplied. + */ +cljs.core.get_in = (function cljs$core$get_in(var_args){ +var args12695 = []; +var len__9181__auto___12698 = arguments.length; +var i__9182__auto___12699 = (0); +while(true){ +if((i__9182__auto___12699 < len__9181__auto___12698)){ +args12695.push((arguments[i__9182__auto___12699])); + +var G__12700 = (i__9182__auto___12699 + (1)); +i__9182__auto___12699 = G__12700; +continue; +} else { +} +break; +} + +var G__12697 = args12695.length; +switch (G__12697) { +case 2: +return cljs.core.get_in.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.get_in.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12695.length)].join(''))); + +} +}); + +cljs.core.get_in.cljs$core$IFn$_invoke$arity$2 = (function (m,ks){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.get,m,ks); +}); + +cljs.core.get_in.cljs$core$IFn$_invoke$arity$3 = (function (m,ks,not_found){ +var sentinel = cljs.core.lookup_sentinel; +var m__$1 = m; +var ks__$1 = cljs.core.seq(ks); +while(true){ +if(!((ks__$1 == null))){ +var m__$2 = cljs.core.get.cljs$core$IFn$_invoke$arity$3(m__$1,cljs.core.first(ks__$1),sentinel); +if((sentinel === m__$2)){ +return not_found; +} else { +var G__12702 = sentinel; +var G__12703 = m__$2; +var G__12704 = cljs.core.next(ks__$1); +sentinel = G__12702; +m__$1 = G__12703; +ks__$1 = G__12704; +continue; +} +} else { +return m__$1; +} +break; +} +}); + +cljs.core.get_in.cljs$lang$maxFixedArity = 3; + +/** + * Associates a value in a nested associative structure, where ks is a + * sequence of keys and v is the new value and returns a new nested structure. + * If any levels do not exist, hash-maps will be created. + */ +cljs.core.assoc_in = (function cljs$core$assoc_in(m,p__12705,v){ +var vec__12712 = p__12705; +var seq__12713 = cljs.core.seq(vec__12712); +var first__12714 = cljs.core.first(seq__12713); +var seq__12713__$1 = cljs.core.next(seq__12713); +var k = first__12714; +var ks = seq__12713__$1; +if(ks){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12715 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__12716 = ks; +var G__12717 = v; +return (cljs.core.assoc_in.cljs$core$IFn$_invoke$arity$3 ? cljs.core.assoc_in.cljs$core$IFn$_invoke$arity$3(G__12715,G__12716,G__12717) : cljs.core.assoc_in.call(null,G__12715,G__12716,G__12717)); +})()); +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,v); +} +}); +/** + * 'Updates' a value in a nested associative structure, where ks is a + * sequence of keys and f is a function that will take the old value + * and any supplied args and return the new value, and returns a new + * nested structure. If any levels do not exist, hash-maps will be + * created. + */ +cljs.core.update_in = (function cljs$core$update_in(var_args){ +var args12718 = []; +var len__9181__auto___12758 = arguments.length; +var i__9182__auto___12759 = (0); +while(true){ +if((i__9182__auto___12759 < len__9181__auto___12758)){ +args12718.push((arguments[i__9182__auto___12759])); + +var G__12760 = (i__9182__auto___12759 + (1)); +i__9182__auto___12759 = G__12760; +continue; +} else { +} +break; +} + +var G__12727 = args12718.length; +switch (G__12727) { +case 3: +return cljs.core.update_in.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.update_in.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core.update_in.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +case 6: +return cljs.core.update_in.cljs$core$IFn$_invoke$arity$6((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12718.slice((6)),(0),null)); +return cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),argseq__9204__auto__); + +} +}); + +cljs.core.update_in.cljs$core$IFn$_invoke$arity$3 = (function (m,p__12728,f){ +var vec__12729 = p__12728; +var seq__12730 = cljs.core.seq(vec__12729); +var first__12731 = cljs.core.first(seq__12730); +var seq__12730__$1 = cljs.core.next(seq__12730); +var k = first__12731; +var ks = seq__12730__$1; +if(ks){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,cljs.core.update_in.cljs$core$IFn$_invoke$arity$3(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k),ks,f)); +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12732 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12732) : f.call(null,G__12732)); +})()); +} +}); + +cljs.core.update_in.cljs$core$IFn$_invoke$arity$4 = (function (m,p__12733,f,a){ +var vec__12734 = p__12733; +var seq__12735 = cljs.core.seq(vec__12734); +var first__12736 = cljs.core.first(seq__12735); +var seq__12735__$1 = cljs.core.next(seq__12735); +var k = first__12736; +var ks = seq__12735__$1; +if(ks){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,cljs.core.update_in.cljs$core$IFn$_invoke$arity$4(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k),ks,f,a)); +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12737 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__12738 = a; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12737,G__12738) : f.call(null,G__12737,G__12738)); +})()); +} +}); + +cljs.core.update_in.cljs$core$IFn$_invoke$arity$5 = (function (m,p__12739,f,a,b){ +var vec__12740 = p__12739; +var seq__12741 = cljs.core.seq(vec__12740); +var first__12742 = cljs.core.first(seq__12741); +var seq__12741__$1 = cljs.core.next(seq__12741); +var k = first__12742; +var ks = seq__12741__$1; +if(ks){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,cljs.core.update_in.cljs$core$IFn$_invoke$arity$5(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k),ks,f,a,b)); +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12743 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__12744 = a; +var G__12745 = b; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12743,G__12744,G__12745) : f.call(null,G__12743,G__12744,G__12745)); +})()); +} +}); + +cljs.core.update_in.cljs$core$IFn$_invoke$arity$6 = (function (m,p__12746,f,a,b,c){ +var vec__12747 = p__12746; +var seq__12748 = cljs.core.seq(vec__12747); +var first__12749 = cljs.core.first(seq__12748); +var seq__12748__$1 = cljs.core.next(seq__12748); +var k = first__12749; +var ks = seq__12748__$1; +if(ks){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,cljs.core.update_in.cljs$core$IFn$_invoke$arity$6(cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k),ks,f,a,b,c)); +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12750 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__12751 = a; +var G__12752 = b; +var G__12753 = c; +return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__12750,G__12751,G__12752,G__12753) : f.call(null,G__12750,G__12751,G__12752,G__12753)); +})()); +} +}); + +cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic = (function (m,p__12754,f,a,b,c,args){ +var vec__12755 = p__12754; +var seq__12756 = cljs.core.seq(vec__12755); +var first__12757 = cljs.core.first(seq__12756); +var seq__12756__$1 = cljs.core.next(seq__12756); +var k = first__12757; +var ks = seq__12756__$1; +if(ks){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(cljs.core.update_in,cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k),ks,f,a,cljs.core.array_seq([b,c,args], 0))); +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f,cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k),a,b,c,cljs.core.array_seq([args], 0))); +} +}); + +cljs.core.update_in.cljs$lang$applyTo = (function (seq12719){ +var G__12720 = cljs.core.first(seq12719); +var seq12719__$1 = cljs.core.next(seq12719); +var G__12721 = cljs.core.first(seq12719__$1); +var seq12719__$2 = cljs.core.next(seq12719__$1); +var G__12722 = cljs.core.first(seq12719__$2); +var seq12719__$3 = cljs.core.next(seq12719__$2); +var G__12723 = cljs.core.first(seq12719__$3); +var seq12719__$4 = cljs.core.next(seq12719__$3); +var G__12724 = cljs.core.first(seq12719__$4); +var seq12719__$5 = cljs.core.next(seq12719__$4); +var G__12725 = cljs.core.first(seq12719__$5); +var seq12719__$6 = cljs.core.next(seq12719__$5); +return cljs.core.update_in.cljs$core$IFn$_invoke$arity$variadic(G__12720,G__12721,G__12722,G__12723,G__12724,G__12725,seq12719__$6); +}); + +cljs.core.update_in.cljs$lang$maxFixedArity = (6); + +/** + * 'Updates' a value in an associative structure, where k is a + * key and f is a function that will take the old value + * and any supplied args and return the new value, and returns a new + * structure. If the key does not exist, nil is passed as the old value. + */ +cljs.core.update = (function cljs$core$update(var_args){ +var args12762 = []; +var len__9181__auto___12782 = arguments.length; +var i__9182__auto___12783 = (0); +while(true){ +if((i__9182__auto___12783 < len__9181__auto___12782)){ +args12762.push((arguments[i__9182__auto___12783])); + +var G__12784 = (i__9182__auto___12783 + (1)); +i__9182__auto___12783 = G__12784; +continue; +} else { +} +break; +} + +var G__12771 = args12762.length; +switch (G__12771) { +case 3: +return cljs.core.update.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.update.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core.update.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +case 6: +return cljs.core.update.cljs$core$IFn$_invoke$arity$6((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args12762.slice((6)),(0),null)); +return cljs.core.update.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),argseq__9204__auto__); + +} +}); + +cljs.core.update.cljs$core$IFn$_invoke$arity$3 = (function (m,k,f){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12772 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__12772) : f.call(null,G__12772)); +})()); +}); + +cljs.core.update.cljs$core$IFn$_invoke$arity$4 = (function (m,k,f,x){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12773 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__12774 = x; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12773,G__12774) : f.call(null,G__12773,G__12774)); +})()); +}); + +cljs.core.update.cljs$core$IFn$_invoke$arity$5 = (function (m,k,f,x,y){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12775 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__12776 = x; +var G__12777 = y; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12775,G__12776,G__12777) : f.call(null,G__12775,G__12776,G__12777)); +})()); +}); + +cljs.core.update.cljs$core$IFn$_invoke$arity$6 = (function (m,k,f,x,y,z){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__12778 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__12779 = x; +var G__12780 = y; +var G__12781 = z; +return (f.cljs$core$IFn$_invoke$arity$4 ? f.cljs$core$IFn$_invoke$arity$4(G__12778,G__12779,G__12780,G__12781) : f.call(null,G__12778,G__12779,G__12780,G__12781)); +})()); +}); + +cljs.core.update.cljs$core$IFn$_invoke$arity$variadic = (function (m,k,f,x,y,z,more){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(f,cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k),x,y,z,cljs.core.array_seq([more], 0))); +}); + +cljs.core.update.cljs$lang$applyTo = (function (seq12763){ +var G__12764 = cljs.core.first(seq12763); +var seq12763__$1 = cljs.core.next(seq12763); +var G__12765 = cljs.core.first(seq12763__$1); +var seq12763__$2 = cljs.core.next(seq12763__$1); +var G__12766 = cljs.core.first(seq12763__$2); +var seq12763__$3 = cljs.core.next(seq12763__$2); +var G__12767 = cljs.core.first(seq12763__$3); +var seq12763__$4 = cljs.core.next(seq12763__$3); +var G__12768 = cljs.core.first(seq12763__$4); +var seq12763__$5 = cljs.core.next(seq12763__$4); +var G__12769 = cljs.core.first(seq12763__$5); +var seq12763__$6 = cljs.core.next(seq12763__$5); +return cljs.core.update.cljs$core$IFn$_invoke$arity$variadic(G__12764,G__12765,G__12766,G__12767,G__12768,G__12769,seq12763__$6); +}); + +cljs.core.update.cljs$lang$maxFixedArity = (6); + + +/** +* @constructor +*/ +cljs.core.VectorNode = (function (edit,arr){ +this.edit = edit; +this.arr = arr; +}) + +cljs.core.VectorNode.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$edit,cljs.core.cst$sym$arr], null); +}); + +cljs.core.VectorNode.cljs$lang$type = true; + +cljs.core.VectorNode.cljs$lang$ctorStr = "cljs.core/VectorNode"; + +cljs.core.VectorNode.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/VectorNode"); +}); + +cljs.core.__GT_VectorNode = (function cljs$core$__GT_VectorNode(edit,arr){ +return (new cljs.core.VectorNode(edit,arr)); +}); + +cljs.core.pv_fresh_node = (function cljs$core$pv_fresh_node(edit){ +return (new cljs.core.VectorNode(edit,[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null])); +}); +cljs.core.pv_aget = (function cljs$core$pv_aget(node,idx){ +return (node.arr[idx]); +}); +cljs.core.pv_aset = (function cljs$core$pv_aset(node,idx,val){ +return (node.arr[idx] = val); +}); +cljs.core.pv_clone_node = (function cljs$core$pv_clone_node(node){ +return (new cljs.core.VectorNode(node.edit,cljs.core.aclone(node.arr))); +}); +cljs.core.tail_off = (function cljs$core$tail_off(pv){ +var cnt = pv.cnt; +if((cnt < (32))){ +return (0); +} else { +return (((cnt - (1)) >>> (5)) << (5)); +} +}); +cljs.core.new_path = (function cljs$core$new_path(edit,level,node){ +var ll = level; +var ret = node; +while(true){ +if((ll === (0))){ +return ret; +} else { +var embed = ret; +var r = cljs.core.pv_fresh_node(edit); +var _ = cljs.core.pv_aset(r,(0),embed); +var G__12786 = (ll - (5)); +var G__12787 = r; +ll = G__12786; +ret = G__12787; +continue; +} +break; +} +}); +cljs.core.push_tail = (function cljs$core$push_tail(pv,level,parent,tailnode){ +var ret = cljs.core.pv_clone_node(parent); +var subidx = (((pv.cnt - (1)) >>> level) & (31)); +if(((5) === level)){ +cljs.core.pv_aset(ret,subidx,tailnode); + +return ret; +} else { +var child = cljs.core.pv_aget(parent,subidx); +if(!((child == null))){ +var node_to_insert = (function (){var G__12792 = pv; +var G__12793 = (level - (5)); +var G__12794 = child; +var G__12795 = tailnode; +return (cljs.core.push_tail.cljs$core$IFn$_invoke$arity$4 ? cljs.core.push_tail.cljs$core$IFn$_invoke$arity$4(G__12792,G__12793,G__12794,G__12795) : cljs.core.push_tail.call(null,G__12792,G__12793,G__12794,G__12795)); +})(); +cljs.core.pv_aset(ret,subidx,node_to_insert); + +return ret; +} else { +var node_to_insert = cljs.core.new_path(null,(level - (5)),tailnode); +cljs.core.pv_aset(ret,subidx,node_to_insert); + +return ret; +} +} +}); +cljs.core.vector_index_out_of_bounds = (function cljs$core$vector_index_out_of_bounds(i,cnt){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No item "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(i),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" in vector of length "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cnt)].join(''))); +}); +cljs.core.first_array_for_longvec = (function cljs$core$first_array_for_longvec(pv){ +var node = pv.root; +var level = pv.shift; +while(true){ +if((level > (0))){ +var G__12796 = cljs.core.pv_aget(node,(0)); +var G__12797 = (level - (5)); +node = G__12796; +level = G__12797; +continue; +} else { +return node.arr; +} +break; +} +}); +cljs.core.unchecked_array_for = (function cljs$core$unchecked_array_for(pv,i){ +if((i >= cljs.core.tail_off(pv))){ +return pv.tail; +} else { +var node = pv.root; +var level = pv.shift; +while(true){ +if((level > (0))){ +var G__12798 = cljs.core.pv_aget(node,((i >>> level) & (31))); +var G__12799 = (level - (5)); +node = G__12798; +level = G__12799; +continue; +} else { +return node.arr; +} +break; +} +} +}); +cljs.core.array_for = (function cljs$core$array_for(pv,i){ +if((((0) <= i)) && ((i < pv.cnt))){ +return cljs.core.unchecked_array_for(pv,i); +} else { +return cljs.core.vector_index_out_of_bounds(i,pv.cnt); +} +}); +cljs.core.do_assoc = (function cljs$core$do_assoc(pv,level,node,i,val){ +var ret = cljs.core.pv_clone_node(node); +if((level === (0))){ +cljs.core.pv_aset(ret,(i & (31)),val); + +return ret; +} else { +var subidx = ((i >>> level) & (31)); +cljs.core.pv_aset(ret,subidx,(function (){var G__12805 = pv; +var G__12806 = (level - (5)); +var G__12807 = cljs.core.pv_aget(node,subidx); +var G__12808 = i; +var G__12809 = val; +return (cljs.core.do_assoc.cljs$core$IFn$_invoke$arity$5 ? cljs.core.do_assoc.cljs$core$IFn$_invoke$arity$5(G__12805,G__12806,G__12807,G__12808,G__12809) : cljs.core.do_assoc.call(null,G__12805,G__12806,G__12807,G__12808,G__12809)); +})()); + +return ret; +} +}); +cljs.core.pop_tail = (function cljs$core$pop_tail(pv,level,node){ +var subidx = (((pv.cnt - (2)) >>> level) & (31)); +if((level > (5))){ +var new_child = (function (){var G__12813 = pv; +var G__12814 = (level - (5)); +var G__12815 = cljs.core.pv_aget(node,subidx); +return (cljs.core.pop_tail.cljs$core$IFn$_invoke$arity$3 ? cljs.core.pop_tail.cljs$core$IFn$_invoke$arity$3(G__12813,G__12814,G__12815) : cljs.core.pop_tail.call(null,G__12813,G__12814,G__12815)); +})(); +if(((new_child == null)) && ((subidx === (0)))){ +return null; +} else { +var ret = cljs.core.pv_clone_node(node); +cljs.core.pv_aset(ret,subidx,new_child); + +return ret; +} +} else { +if((subidx === (0))){ +return null; +} else { +var ret = cljs.core.pv_clone_node(node); +cljs.core.pv_aset(ret,subidx,null); + +return ret; + +} +} +}); + +/** +* @constructor +*/ +cljs.core.RangedIterator = (function (i,base,arr,v,start,end){ +this.i = i; +this.base = base; +this.arr = arr; +this.v = v; +this.start = start; +this.end = end; +}) +cljs.core.RangedIterator.prototype.hasNext = (function (){ +var self__ = this; +var this$ = this; +return (self__.i < self__.end); +}); + +cljs.core.RangedIterator.prototype.next = (function (){ +var self__ = this; +var this$ = this; +if(((self__.i - self__.base) === (32))){ +self__.arr = cljs.core.unchecked_array_for(self__.v,self__.i); + +self__.base = (self__.base + (32)); +} else { +} + +var ret = (self__.arr[(self__.i & (31))]); +self__.i = (self__.i + (1)); + +return ret; +}); + +cljs.core.RangedIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$base,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$arr,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$v,cljs.core.cst$sym$start,cljs.core.cst$sym$end], null); +}); + +cljs.core.RangedIterator.cljs$lang$type = true; + +cljs.core.RangedIterator.cljs$lang$ctorStr = "cljs.core/RangedIterator"; + +cljs.core.RangedIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/RangedIterator"); +}); + +cljs.core.__GT_RangedIterator = (function cljs$core$__GT_RangedIterator(i,base,arr,v,start,end){ +return (new cljs.core.RangedIterator(i,base,arr,v,start,end)); +}); + +cljs.core.ranged_iterator = (function cljs$core$ranged_iterator(v,start,end){ +var i = start; +return (new cljs.core.RangedIterator(i,(i - (i % (32))),(((start < cljs.core.count(v)))?cljs.core.unchecked_array_for(v,i):null),v,start,end)); +}); + + + + + + + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IVector} + * @implements {cljs.core.IReversible} + * @implements {cljs.core.IKVReduce} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEditableCollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IStack} + * @implements {cljs.core.IMapEntry} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.ILookup} + * @implements {cljs.core.IReduce} +*/ +cljs.core.PersistentVector = (function (meta,cnt,shift,root,tail,__hash){ +this.meta = meta; +this.cnt = cnt; +this.shift = shift; +this.root = root; +this.tail = tail; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 167668511; +this.cljs$lang$protocol_mask$partition1$ = 8196; +}) +cljs.core.PersistentVector.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentVector.prototype.cljs$core$IFind$_find$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k,cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll__$1,k)], null); +}); + +cljs.core.PersistentVector.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentVector.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentVector.prototype.indexOf = (function() { +var G__12826 = null; +var G__12826__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__12826__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12826 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12826__1.call(this,x); +case 2: +return G__12826__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12826.cljs$core$IFn$_invoke$arity$1 = G__12826__1; +G__12826.cljs$core$IFn$_invoke$arity$2 = G__12826__2; +return G__12826; +})() +; + +cljs.core.PersistentVector.prototype.lastIndexOf = (function() { +var G__12827 = null; +var G__12827__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__12827__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12827 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12827__1.call(this,x); +case 2: +return G__12827__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12827.cljs$core$IFn$_invoke$arity$1 = G__12827__1; +G__12827.cljs$core$IFn$_invoke$arity$2 = G__12827__2; +return G__12827; +})() +; + +cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,k,not_found){ +var self__ = this; +var coll__$1 = this; +if(typeof k === 'number'){ +return coll__$1.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +} else { +return not_found; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (v,f,init){ +var self__ = this; +var v__$1 = this; +var i = (0); +var init__$1 = init; +while(true){ +if((i < self__.cnt)){ +var arr = cljs.core.unchecked_array_for(v__$1,i); +var len = arr.length; +var init__$2 = (function (){var j = (0); +var init__$2 = init__$1; +while(true){ +if((j < len)){ +var init__$3 = (function (){var G__12817 = init__$2; +var G__12818 = (j + i); +var G__12819 = (arr[j]); +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12817,G__12818,G__12819) : f.call(null,G__12817,G__12818,G__12819)); +})(); +if(cljs.core.reduced_QMARK_(init__$3)){ +return init__$3; +} else { +var G__12828 = (j + (1)); +var G__12829 = init__$3; +j = G__12828; +init__$2 = G__12829; +continue; +} +} else { +return init__$2; +} +break; +} +})(); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var G__12830 = (i + len); +var G__12831 = init__$2; +i = G__12830; +init__$1 = G__12831; +continue; +} +} else { +return init__$1; +} +break; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (coll,n){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.array_for(coll__$1,n)[(n & (31))]); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (coll,n,not_found){ +var self__ = this; +var coll__$1 = this; +if((((0) <= n)) && ((n < self__.cnt))){ +return (cljs.core.unchecked_array_for(coll__$1,n)[(n & (31))]); +} else { +return not_found; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IVector$_assoc_n$arity$3 = (function (coll,n,val){ +var self__ = this; +var coll__$1 = this; +if((((0) <= n)) && ((n < self__.cnt))){ +if((cljs.core.tail_off(coll__$1) <= n)){ +var new_tail = cljs.core.aclone(self__.tail); +(new_tail[(n & (31))] = val); + +return (new cljs.core.PersistentVector(self__.meta,self__.cnt,self__.shift,self__.root,new_tail,null)); +} else { +return (new cljs.core.PersistentVector(self__.meta,self__.cnt,self__.shift,cljs.core.do_assoc(coll__$1,self__.shift,self__.root,n,val),self__.tail,null)); +} +} else { +if((n === self__.cnt)){ +return coll__$1.cljs$core$ICollection$_conj$arity$2(null,val); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Index "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(n),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" out of bounds [0,"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.cnt),cljs.core.str.cljs$core$IFn$_invoke$arity$1("]")].join(''))); + +} +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentVector.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return cljs.core.ranged_iterator(this$__$1,(0),self__.cnt); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentVector.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.PersistentVector(self__.meta,self__.cnt,self__.shift,self__.root,self__.tail,self__.__hash)); +}); + +cljs.core.PersistentVector.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.cnt; +}); + +cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_key$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$IIndexed$_nth$arity$2(null,(0)); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_val$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$IIndexed$_nth$arity$2(null,(1)); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IStack$_peek$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt > (0))){ +return coll__$1.cljs$core$IIndexed$_nth$arity$2(null,(self__.cnt - (1))); +} else { +return null; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IStack$_pop$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt === (0))){ +throw (new Error("Can't pop empty vector")); +} else { +if(((1) === self__.cnt)){ +return cljs.core._with_meta(cljs.core.PersistentVector.EMPTY,self__.meta); +} else { +if(((1) < (self__.cnt - cljs.core.tail_off(coll__$1)))){ +return (new cljs.core.PersistentVector(self__.meta,(self__.cnt - (1)),self__.shift,self__.root,self__.tail.slice((0),(-1)),null)); +} else { +var new_tail = cljs.core.unchecked_array_for(coll__$1,(self__.cnt - (2))); +var nr = cljs.core.pop_tail(coll__$1,self__.shift,self__.root); +var new_root = (((nr == null))?cljs.core.PersistentVector.EMPTY_NODE:nr); +var cnt_1 = (self__.cnt - (1)); +if((((5) < self__.shift)) && ((cljs.core.pv_aget(new_root,(1)) == null))){ +return (new cljs.core.PersistentVector(self__.meta,cnt_1,(self__.shift - (5)),cljs.core.pv_aget(new_root,(0)),new_tail,null)); +} else { +return (new cljs.core.PersistentVector(self__.meta,cnt_1,self__.shift,new_root,new_tail,null)); +} + +} +} +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IReversible$_rseq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt > (0))){ +return (new cljs.core.RSeq(coll__$1,(self__.cnt - (1)),null)); +} else { +return null; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +if((other instanceof cljs.core.PersistentVector)){ +if((self__.cnt === cljs.core.count(other))){ +var me_iter = coll__$1.cljs$core$IIterable$_iterator$arity$1(null); +var you_iter = cljs.core._iterator(other); +while(true){ +if(me_iter.hasNext()){ +var x = me_iter.next(); +var y = you_iter.next(); +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(x,y)){ +continue; +} else { +return false; +} +} else { +return true; +} +break; +} +} else { +return false; +} +} else { +return cljs.core.equiv_sequential(coll__$1,other); +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.TransientVector(self__.cnt,self__.shift,(cljs.core.tv_editable_root.cljs$core$IFn$_invoke$arity$1 ? cljs.core.tv_editable_root.cljs$core$IFn$_invoke$arity$1(self__.root) : cljs.core.tv_editable_root.call(null,self__.root)),(cljs.core.tv_editable_tail.cljs$core$IFn$_invoke$arity$1 ? cljs.core.tv_editable_tail.cljs$core$IFn$_invoke$arity$1(self__.tail) : cljs.core.tv_editable_tail.call(null,self__.tail)))); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.PersistentVector.EMPTY,self__.meta); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (v,f){ +var self__ = this; +var v__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(v__$1,f); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (v,f,init){ +var self__ = this; +var v__$1 = this; +var i = (0); +var init__$1 = init; +while(true){ +if((i < self__.cnt)){ +var arr = cljs.core.unchecked_array_for(v__$1,i); +var len = arr.length; +var init__$2 = (function (){var j = (0); +var init__$2 = init__$1; +while(true){ +if((j < len)){ +var init__$3 = (function (){var G__12820 = init__$2; +var G__12821 = (arr[j]); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__12820,G__12821) : f.call(null,G__12820,G__12821)); +})(); +if(cljs.core.reduced_QMARK_(init__$3)){ +return init__$3; +} else { +var G__12832 = (j + (1)); +var G__12833 = init__$3; +j = G__12832; +init__$2 = G__12833; +continue; +} +} else { +return init__$2; +} +break; +} +})(); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var G__12834 = (i + len); +var G__12835 = init__$2; +i = G__12834; +init__$1 = G__12835; +continue; +} +} else { +return init__$1; +} +break; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (coll,k,v){ +var self__ = this; +var coll__$1 = this; +if(typeof k === 'number'){ +return coll__$1.cljs$core$IVector$_assoc_n$arity$3(null,k,v); +} else { +throw (new Error("Vector's key for assoc must be a number.")); +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +if(cljs.core.integer_QMARK_(k)){ +return (((0) <= k)) && ((k < self__.cnt)); +} else { +return false; +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt === (0))){ +return null; +} else { +if((self__.cnt <= (32))){ +return (new cljs.core.IndexedSeq(self__.tail,(0),null)); +} else { +var G__12822 = coll__$1; +var G__12823 = cljs.core.first_array_for_longvec(coll__$1); +var G__12824 = (0); +var G__12825 = (0); +return (cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__12822,G__12823,G__12824,G__12825) : cljs.core.chunked_seq.call(null,G__12822,G__12823,G__12824,G__12825)); + +} +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentVector(meta__$1,self__.cnt,self__.shift,self__.root,self__.tail,self__.__hash)); +}); + +cljs.core.PersistentVector.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +if(((self__.cnt - cljs.core.tail_off(coll__$1)) < (32))){ +var len = self__.tail.length; +var new_tail = (new Array((len + (1)))); +var n__8981__auto___12836 = len; +var i_12837 = (0); +while(true){ +if((i_12837 < n__8981__auto___12836)){ +(new_tail[i_12837] = (self__.tail[i_12837])); + +var G__12838 = (i_12837 + (1)); +i_12837 = G__12838; +continue; +} else { +} +break; +} + +(new_tail[len] = o); + +return (new cljs.core.PersistentVector(self__.meta,(self__.cnt + (1)),self__.shift,self__.root,new_tail,null)); +} else { +var root_overflow_QMARK_ = ((self__.cnt >>> (5)) > ((1) << self__.shift)); +var new_shift = ((root_overflow_QMARK_)?(self__.shift + (5)):self__.shift); +var new_root = ((root_overflow_QMARK_)?(function (){var n_r = cljs.core.pv_fresh_node(null); +cljs.core.pv_aset(n_r,(0),self__.root); + +cljs.core.pv_aset(n_r,(1),cljs.core.new_path(null,self__.shift,(new cljs.core.VectorNode(null,self__.tail)))); + +return n_r; +})():cljs.core.push_tail(coll__$1,self__.shift,self__.root,(new cljs.core.VectorNode(null,self__.tail)))); +return (new cljs.core.PersistentVector(self__.meta,(self__.cnt + (1)),new_shift,new_root,[o],null)); +} +}); + +cljs.core.PersistentVector.prototype.call = (function() { +var G__12839 = null; +var G__12839__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$IIndexed$_nth$arity$2(null,k); +}); +var G__12839__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); +G__12839 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__12839__2.call(this,self__,k); +case 3: +return G__12839__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12839.cljs$core$IFn$_invoke$arity$2 = G__12839__2; +G__12839.cljs$core$IFn$_invoke$arity$3 = G__12839__3; +return G__12839; +})() +; + +cljs.core.PersistentVector.prototype.apply = (function (self__,args12816){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args12816))); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$IIndexed$_nth$arity$2(null,k); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.PersistentVector.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$cnt,cljs.core.cst$sym$shift,cljs.core.cst$sym$root,cljs.core.cst$sym$tail,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentVector.cljs$lang$type = true; + +cljs.core.PersistentVector.cljs$lang$ctorStr = "cljs.core/PersistentVector"; + +cljs.core.PersistentVector.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentVector"); +}); + +cljs.core.__GT_PersistentVector = (function cljs$core$__GT_PersistentVector(meta,cnt,shift,root,tail,__hash){ +return (new cljs.core.PersistentVector(meta,cnt,shift,root,tail,__hash)); +}); + +cljs.core.PersistentVector.EMPTY_NODE = (new cljs.core.VectorNode(null,[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null])); +cljs.core.PersistentVector.EMPTY = (new cljs.core.PersistentVector(null,(0),(5),cljs.core.PersistentVector.EMPTY_NODE,[],cljs.core.empty_ordered_hash)); +cljs.core.PersistentVector.fromArray = (function (xs,no_clone){ +var l = xs.length; +var xs__$1 = ((no_clone)?xs:cljs.core.aclone(xs)); +if((l < (32))){ +return (new cljs.core.PersistentVector(null,l,(5),cljs.core.PersistentVector.EMPTY_NODE,xs__$1,null)); +} else { +var node = xs__$1.slice((0),(32)); +var v = (new cljs.core.PersistentVector(null,(32),(5),cljs.core.PersistentVector.EMPTY_NODE,node,null)); +var i = (32); +var out = v.cljs$core$IEditableCollection$_as_transient$arity$1(null); +while(true){ +if((i < l)){ +var G__12840 = (i + (1)); +var G__12841 = cljs.core.conj_BANG_.cljs$core$IFn$_invoke$arity$2(out,(xs__$1[i])); +i = G__12840; +out = G__12841; +continue; +} else { +return cljs.core.persistent_BANG_(out); +} +break; +} +} +}); +(cljs.core.PersistentVector.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Creates a new vector containing the contents of coll. JavaScript arrays + * will be aliased and should not be modified. + */ +cljs.core.vec = (function cljs$core$vec(coll){ +if(cljs.core.array_QMARK_(coll)){ +return cljs.core.PersistentVector.fromArray(coll,true); +} else { +return cljs.core._persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj_BANG_,cljs.core._as_transient(cljs.core.PersistentVector.EMPTY),coll)); +} +}); +/** + * Creates a new vector containing the args. + */ +cljs.core.vector = (function cljs$core$vector(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___12843 = arguments.length; +var i__9182__auto___12844 = (0); +while(true){ +if((i__9182__auto___12844 < len__9181__auto___12843)){ +args__9188__auto__.push((arguments[i__9182__auto___12844])); + +var G__12845 = (i__9182__auto___12844 + (1)); +i__9182__auto___12844 = G__12845; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic = (function (args){ +if(((args instanceof cljs.core.IndexedSeq)) && ((args.i === (0)))){ +return cljs.core.PersistentVector.fromArray(args.arr,true); +} else { +return cljs.core.vec(args); +} +}); + +cljs.core.vector.cljs$lang$maxFixedArity = (0); + +cljs.core.vector.cljs$lang$applyTo = (function (seq12842){ +return cljs.core.vector.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq12842)); +}); + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ASeq} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IChunkedNext} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IChunkedSeq} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.ChunkedSeq = (function (vec,node,i,off,meta,__hash){ +this.vec = vec; +this.node = node; +this.i = i; +this.off = off; +this.meta = meta; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32375020; +this.cljs$lang$protocol_mask$partition1$ = 1536; +}) +cljs.core.ChunkedSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.ChunkedSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.ChunkedSeq.prototype.indexOf = (function() { +var G__12868 = null; +var G__12868__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__12868__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12868 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12868__1.call(this,x); +case 2: +return G__12868__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12868.cljs$core$IFn$_invoke$arity$1 = G__12868__1; +G__12868.cljs$core$IFn$_invoke$arity$2 = G__12868__2; +return G__12868; +})() +; + +cljs.core.ChunkedSeq.prototype.lastIndexOf = (function() { +var G__12869 = null; +var G__12869__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__12869__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12869 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12869__1.call(this,x); +case 2: +return G__12869__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12869.cljs$core$IFn$_invoke$arity$1 = G__12869__1; +G__12869.cljs$core$IFn$_invoke$arity$2 = G__12869__2; +return G__12869; +})() +; + +cljs.core.ChunkedSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if(((self__.off + (1)) < self__.node.length)){ +var s = (function (){var G__12846 = self__.vec; +var G__12847 = self__.node; +var G__12848 = self__.i; +var G__12849 = (self__.off + (1)); +return (cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__12846,G__12847,G__12848,G__12849) : cljs.core.chunked_seq.call(null,G__12846,G__12847,G__12848,G__12849)); +})(); +if((s == null)){ +return null; +} else { +return s; +} +} else { +return coll__$1.cljs$core$IChunkedNext$_chunked_next$arity$1(null); +} +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.PersistentVector.EMPTY,self__.meta); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2((function (){var G__12850 = self__.vec; +var G__12851 = (self__.i + self__.off); +var G__12852 = cljs.core.count(self__.vec); +return (cljs.core.subvec.cljs$core$IFn$_invoke$arity$3 ? cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(G__12850,G__12851,G__12852) : cljs.core.subvec.call(null,G__12850,G__12851,G__12852)); +})(),f); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3((function (){var G__12853 = self__.vec; +var G__12854 = (self__.i + self__.off); +var G__12855 = cljs.core.count(self__.vec); +return (cljs.core.subvec.cljs$core$IFn$_invoke$arity$3 ? cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(G__12853,G__12854,G__12855) : cljs.core.subvec.call(null,G__12853,G__12854,G__12855)); +})(),f,start); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (self__.node[self__.off]); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if(((self__.off + (1)) < self__.node.length)){ +var s = (function (){var G__12856 = self__.vec; +var G__12857 = self__.node; +var G__12858 = self__.i; +var G__12859 = (self__.off + (1)); +return (cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__12856,G__12857,G__12858,G__12859) : cljs.core.chunked_seq.call(null,G__12856,G__12857,G__12858,G__12859)); +})(); +if((s == null)){ +return cljs.core.List.EMPTY; +} else { +return s; +} +} else { +return coll__$1.cljs$core$IChunkedSeq$_chunked_rest$arity$1(null); +} +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.array_chunk.cljs$core$IFn$_invoke$arity$2(self__.node,self__.off); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var end = (self__.i + self__.node.length); +if((end < cljs.core._count(self__.vec))){ +var G__12860 = self__.vec; +var G__12861 = cljs.core.unchecked_array_for(self__.vec,end); +var G__12862 = end; +var G__12863 = (0); +return (cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__12860,G__12861,G__12862,G__12863) : cljs.core.chunked_seq.call(null,G__12860,G__12861,G__12862,G__12863)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,m){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5(self__.vec,self__.node,self__.i,self__.off,m) : cljs.core.chunked_seq.call(null,self__.vec,self__.node,self__.i,self__.off,m)); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var end = (self__.i + self__.node.length); +if((end < cljs.core._count(self__.vec))){ +var G__12864 = self__.vec; +var G__12865 = cljs.core.unchecked_array_for(self__.vec,end); +var G__12866 = end; +var G__12867 = (0); +return (cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4(G__12864,G__12865,G__12866,G__12867) : cljs.core.chunked_seq.call(null,G__12864,G__12865,G__12866,G__12867)); +} else { +return null; +} +}); + +cljs.core.ChunkedSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$vec,cljs.core.cst$sym$node,cljs.core.cst$sym$i,cljs.core.cst$sym$off,cljs.core.cst$sym$meta,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ChunkedSeq.cljs$lang$type = true; + +cljs.core.ChunkedSeq.cljs$lang$ctorStr = "cljs.core/ChunkedSeq"; + +cljs.core.ChunkedSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ChunkedSeq"); +}); + +cljs.core.__GT_ChunkedSeq = (function cljs$core$__GT_ChunkedSeq(vec,node,i,off,meta,__hash){ +return (new cljs.core.ChunkedSeq(vec,node,i,off,meta,__hash)); +}); + +(cljs.core.ChunkedSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.chunked_seq = (function cljs$core$chunked_seq(var_args){ +var args12870 = []; +var len__9181__auto___12873 = arguments.length; +var i__9182__auto___12874 = (0); +while(true){ +if((i__9182__auto___12874 < len__9181__auto___12873)){ +args12870.push((arguments[i__9182__auto___12874])); + +var G__12875 = (i__9182__auto___12874 + (1)); +i__9182__auto___12874 = G__12875; +continue; +} else { +} +break; +} + +var G__12872 = args12870.length; +switch (G__12872) { +case 3: +return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12870.length)].join(''))); + +} +}); + +cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$3 = (function (vec,i,off){ +return (new cljs.core.ChunkedSeq(vec,cljs.core.array_for(vec,i),i,off,null,null)); +}); + +cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$4 = (function (vec,node,i,off){ +return (new cljs.core.ChunkedSeq(vec,node,i,off,null,null)); +}); + +cljs.core.chunked_seq.cljs$core$IFn$_invoke$arity$5 = (function (vec,node,i,off,meta){ +return (new cljs.core.ChunkedSeq(vec,node,i,off,meta,null)); +}); + +cljs.core.chunked_seq.cljs$lang$maxFixedArity = 5; + + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IVector} + * @implements {cljs.core.IReversible} + * @implements {cljs.core.IKVReduce} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IStack} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.ILookup} + * @implements {cljs.core.IReduce} +*/ +cljs.core.Subvec = (function (meta,v,start,end,__hash){ +this.meta = meta; +this.v = v; +this.start = start; +this.end = end; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 167666463; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.Subvec.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Subvec.prototype.cljs$core$IFind$_find$arity$2 = (function (coll,key){ +var self__ = this; +var coll__$1 = this; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key,cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll__$1,key)], null); +}); + +cljs.core.Subvec.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.Subvec.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.Subvec.prototype.indexOf = (function() { +var G__12897 = null; +var G__12897__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__12897__2 = (function (x,start__$1){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start__$1); +}); +G__12897 = function(x,start__$1){ +switch(arguments.length){ +case 1: +return G__12897__1.call(this,x); +case 2: +return G__12897__2.call(this,x,start__$1); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12897.cljs$core$IFn$_invoke$arity$1 = G__12897__1; +G__12897.cljs$core$IFn$_invoke$arity$2 = G__12897__2; +return G__12897; +})() +; + +cljs.core.Subvec.prototype.lastIndexOf = (function() { +var G__12898 = null; +var G__12898__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__12898__2 = (function (x,start__$1){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start__$1); +}); +G__12898 = function(x,start__$1){ +switch(arguments.length){ +case 1: +return G__12898__1.call(this,x); +case 2: +return G__12898__2.call(this,x,start__$1); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12898.cljs$core$IFn$_invoke$arity$1 = G__12898__1; +G__12898.cljs$core$IFn$_invoke$arity$2 = G__12898__2; +return G__12898; +})() +; + +cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,k,not_found){ +var self__ = this; +var coll__$1 = this; +if(typeof k === 'number'){ +return coll__$1.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +} else { +return not_found; +} +}); + +cljs.core.Subvec.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (coll,f,init){ +var self__ = this; +var coll__$1 = this; +var i = self__.start; +var j = (0); +var init__$1 = init; +while(true){ +if((i < self__.end)){ +var init__$2 = (function (){var G__12878 = init__$1; +var G__12879 = j; +var G__12880 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v,i); +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12878,G__12879,G__12880) : f.call(null,G__12878,G__12879,G__12880)); +})(); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var G__12899 = (i + (1)); +var G__12900 = (j + (1)); +var G__12901 = init__$2; +i = G__12899; +j = G__12900; +init__$1 = G__12901; +continue; +} +} else { +return init__$1; +} +break; +} +}); + +cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (coll,n){ +var self__ = this; +var coll__$1 = this; +if(((n < (0))) || ((self__.end <= (self__.start + n)))){ +return cljs.core.vector_index_out_of_bounds(n,(self__.end - self__.start)); +} else { +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v,(self__.start + n)); +} +}); + +cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (coll,n,not_found){ +var self__ = this; +var coll__$1 = this; +if(((n < (0))) || ((self__.end <= (self__.start + n)))){ +return not_found; +} else { +return cljs.core._nth.cljs$core$IFn$_invoke$arity$3(self__.v,(self__.start + n),not_found); +} +}); + +cljs.core.Subvec.prototype.cljs$core$IVector$_assoc_n$arity$3 = (function (coll,n,val){ +var self__ = this; +var coll__$1 = this; +var v_pos = (self__.start + n); +if(((n < (0))) || (((self__.end + (1)) <= v_pos))){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Index "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(n),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" out of bounds [0,"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(coll__$1.cljs$core$ICounted$_count$arity$1(null)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("]")].join(''))); +} else { +var G__12881 = self__.meta; +var G__12882 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.v,v_pos,val); +var G__12883 = self__.start; +var G__12884 = (function (){var x__8298__auto__ = self__.end; +var y__8299__auto__ = (v_pos + (1)); +return ((x__8298__auto__ > y__8299__auto__) ? x__8298__auto__ : y__8299__auto__); +})(); +var G__12885 = null; +return (cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__12881,G__12882,G__12883,G__12884,G__12885) : cljs.core.build_subvec.call(null,G__12881,G__12882,G__12883,G__12884,G__12885)); +} +}); + +cljs.core.Subvec.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Subvec.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.ranged_iterator(self__.v,self__.start,self__.end); +}); + +cljs.core.Subvec.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.Subvec.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.Subvec(self__.meta,self__.v,self__.start,self__.end,self__.__hash)); +}); + +cljs.core.Subvec.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (self__.end - self__.start); +}); + +cljs.core.Subvec.prototype.cljs$core$IStack$_peek$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v,(self__.end - (1))); +}); + +cljs.core.Subvec.prototype.cljs$core$IStack$_pop$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.start === self__.end)){ +throw (new Error("Can't pop empty vector")); +} else { +var G__12886 = self__.meta; +var G__12887 = self__.v; +var G__12888 = self__.start; +var G__12889 = (self__.end - (1)); +var G__12890 = null; +return (cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__12886,G__12887,G__12888,G__12889,G__12890) : cljs.core.build_subvec.call(null,G__12886,G__12887,G__12888,G__12889,G__12890)); +} +}); + +cljs.core.Subvec.prototype.cljs$core$IReversible$_rseq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if(!((self__.start === self__.end))){ +return (new cljs.core.RSeq(coll__$1,((self__.end - self__.start) - (1)),null)); +} else { +return null; +} +}); + +cljs.core.Subvec.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.Subvec.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.Subvec.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.PersistentVector.EMPTY,self__.meta); +}); + +cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(coll__$1,f); +}); + +cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start__$1){ +var self__ = this; +var coll__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(coll__$1,f,start__$1); +}); + +cljs.core.Subvec.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (coll,key,val){ +var self__ = this; +var coll__$1 = this; +if(typeof key === 'number'){ +return coll__$1.cljs$core$IVector$_assoc_n$arity$3(null,key,val); +} else { +throw (new Error("Subvec's key for assoc must be a number.")); +} +}); + +cljs.core.Subvec.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var subvec_seq = ((function (coll__$1){ +return (function cljs$core$subvec_seq(i){ +if((i === self__.end)){ +return null; +} else { +return cljs.core.cons(cljs.core._nth.cljs$core$IFn$_invoke$arity$2(self__.v,i),(new cljs.core.LazySeq(null,((function (coll__$1){ +return (function (){ +return cljs$core$subvec_seq((i + (1))); +});})(coll__$1)) +,null,null))); +} +});})(coll__$1)) +; +return subvec_seq(self__.start); +}); + +cljs.core.Subvec.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(meta__$1,self__.v,self__.start,self__.end,self__.__hash) : cljs.core.build_subvec.call(null,meta__$1,self__.v,self__.start,self__.end,self__.__hash)); +}); + +cljs.core.Subvec.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +var G__12892 = self__.meta; +var G__12893 = cljs.core._assoc_n(self__.v,self__.end,o); +var G__12894 = self__.start; +var G__12895 = (self__.end + (1)); +var G__12896 = null; +return (cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5 ? cljs.core.build_subvec.cljs$core$IFn$_invoke$arity$5(G__12892,G__12893,G__12894,G__12895,G__12896) : cljs.core.build_subvec.call(null,G__12892,G__12893,G__12894,G__12895,G__12896)); +}); + +cljs.core.Subvec.prototype.call = (function() { +var G__12902 = null; +var G__12902__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$IIndexed$_nth$arity$2(null,k); +}); +var G__12902__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); +G__12902 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__12902__2.call(this,self__,k); +case 3: +return G__12902__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12902.cljs$core$IFn$_invoke$arity$2 = G__12902__2; +G__12902.cljs$core$IFn$_invoke$arity$3 = G__12902__3; +return G__12902; +})() +; + +cljs.core.Subvec.prototype.apply = (function (self__,args12877){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args12877))); +}); + +cljs.core.Subvec.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$IIndexed$_nth$arity$2(null,k); +}); + +cljs.core.Subvec.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.Subvec.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$v,cljs.core.cst$sym$start,cljs.core.cst$sym$end,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Subvec.cljs$lang$type = true; + +cljs.core.Subvec.cljs$lang$ctorStr = "cljs.core/Subvec"; + +cljs.core.Subvec.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Subvec"); +}); + +cljs.core.__GT_Subvec = (function cljs$core$__GT_Subvec(meta,v,start,end,__hash){ +return (new cljs.core.Subvec(meta,v,start,end,__hash)); +}); + +(cljs.core.Subvec.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.build_subvec = (function cljs$core$build_subvec(meta,v,start,end,__hash){ +while(true){ +if((v instanceof cljs.core.Subvec)){ +var G__12903 = meta; +var G__12904 = v.v; +var G__12905 = (v.start + start); +var G__12906 = (v.start + end); +var G__12907 = __hash; +meta = G__12903; +v = G__12904; +start = G__12905; +end = G__12906; +__hash = G__12907; +continue; +} else { +if(cljs.core.vector_QMARK_(v)){ +} else { +throw (new Error("v must satisfy IVector")); +} + +var c_12908 = cljs.core.count(v); +if(((start < (0))) || ((end < (0))) || ((start > c_12908)) || ((end > c_12908))){ +throw (new Error("Index out of bounds")); +} else { +} + +return (new cljs.core.Subvec(meta,v,start,end,__hash)); +} +break; +} +}); +/** + * Returns a persistent vector of the items in vector from + * start (inclusive) to end (exclusive). If end is not supplied, + * defaults to (count vector). This operation is O(1) and very fast, as + * the resulting vector shares structure with the original and no + * trimming is done. + */ +cljs.core.subvec = (function cljs$core$subvec(var_args){ +var args12909 = []; +var len__9181__auto___12912 = arguments.length; +var i__9182__auto___12913 = (0); +while(true){ +if((i__9182__auto___12913 < len__9181__auto___12912)){ +args12909.push((arguments[i__9182__auto___12913])); + +var G__12914 = (i__9182__auto___12913 + (1)); +i__9182__auto___12913 = G__12914; +continue; +} else { +} +break; +} + +var G__12911 = args12909.length; +switch (G__12911) { +case 2: +return cljs.core.subvec.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.subvec.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args12909.length)].join(''))); + +} +}); + +cljs.core.subvec.cljs$core$IFn$_invoke$arity$2 = (function (v,start){ +return cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(v,start,cljs.core.count(v)); +}); + +cljs.core.subvec.cljs$core$IFn$_invoke$arity$3 = (function (v,start,end){ +return cljs.core.build_subvec(null,v,start,end,null); +}); + +cljs.core.subvec.cljs$lang$maxFixedArity = 3; + +cljs.core.tv_ensure_editable = (function cljs$core$tv_ensure_editable(edit,node){ +if((edit === node.edit)){ +return node; +} else { +return (new cljs.core.VectorNode(edit,cljs.core.aclone(node.arr))); +} +}); +cljs.core.tv_editable_root = (function cljs$core$tv_editable_root(node){ +return (new cljs.core.VectorNode({},cljs.core.aclone(node.arr))); +}); +cljs.core.tv_editable_tail = (function cljs$core$tv_editable_tail(tl){ +var ret = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +cljs.core.array_copy(tl,(0),ret,(0),tl.length); + +return ret; +}); +cljs.core.tv_push_tail = (function cljs$core$tv_push_tail(tv,level,parent,tail_node){ +var ret = cljs.core.tv_ensure_editable(tv.root.edit,parent); +var subidx = (((tv.cnt - (1)) >>> level) & (31)); +cljs.core.pv_aset(ret,subidx,(((level === (5)))?tail_node:(function (){var child = cljs.core.pv_aget(ret,subidx); +if(!((child == null))){ +var G__12924 = tv; +var G__12925 = (level - (5)); +var G__12926 = child; +var G__12927 = tail_node; +return (cljs.core.tv_push_tail.cljs$core$IFn$_invoke$arity$4 ? cljs.core.tv_push_tail.cljs$core$IFn$_invoke$arity$4(G__12924,G__12925,G__12926,G__12927) : cljs.core.tv_push_tail.call(null,G__12924,G__12925,G__12926,G__12927)); +} else { +return cljs.core.new_path(tv.root.edit,(level - (5)),tail_node); +} +})())); + +return ret; +}); +cljs.core.tv_pop_tail = (function cljs$core$tv_pop_tail(tv,level,node){ +var node__$1 = cljs.core.tv_ensure_editable(tv.root.edit,node); +var subidx = (((tv.cnt - (2)) >>> level) & (31)); +if((level > (5))){ +var new_child = (function (){var G__12931 = tv; +var G__12932 = (level - (5)); +var G__12933 = cljs.core.pv_aget(node__$1,subidx); +return (cljs.core.tv_pop_tail.cljs$core$IFn$_invoke$arity$3 ? cljs.core.tv_pop_tail.cljs$core$IFn$_invoke$arity$3(G__12931,G__12932,G__12933) : cljs.core.tv_pop_tail.call(null,G__12931,G__12932,G__12933)); +})(); +if(((new_child == null)) && ((subidx === (0)))){ +return null; +} else { +cljs.core.pv_aset(node__$1,subidx,new_child); + +return node__$1; +} +} else { +if((subidx === (0))){ +return null; +} else { +cljs.core.pv_aset(node__$1,subidx,null); + +return node__$1; + +} +} +}); +cljs.core.unchecked_editable_array_for = (function cljs$core$unchecked_editable_array_for(tv,i){ +if((i >= cljs.core.tail_off(tv))){ +return tv.tail; +} else { +var root = tv.root; +var node = root; +var level = tv.shift; +while(true){ +if((level > (0))){ +var G__12934 = cljs.core.tv_ensure_editable(root.edit,cljs.core.pv_aget(node,((i >>> level) & (31)))); +var G__12935 = (level - (5)); +node = G__12934; +level = G__12935; +continue; +} else { +return node.arr; +} +break; +} +} +}); + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ITransientCollection} + * @implements {cljs.core.ITransientVector} + * @implements {cljs.core.ITransientAssociative} + * @implements {cljs.core.ILookup} +*/ +cljs.core.TransientVector = (function (cnt,shift,root,tail){ +this.cnt = cnt; +this.shift = shift; +this.root = root; +this.tail = tail; +this.cljs$lang$protocol_mask$partition1$ = 88; +this.cljs$lang$protocol_mask$partition0$ = 275; +}) +cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = (function (tcoll,o){ +var self__ = this; +var tcoll__$1 = this; +if(self__.root.edit){ +if(((self__.cnt - cljs.core.tail_off(tcoll__$1)) < (32))){ +(self__.tail[(self__.cnt & (31))] = o); + +self__.cnt = (self__.cnt + (1)); + +return tcoll__$1; +} else { +var tail_node = (new cljs.core.VectorNode(self__.root.edit,self__.tail)); +var new_tail = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(new_tail[(0)] = o); + +self__.tail = new_tail; + +if(((self__.cnt >>> (5)) > ((1) << self__.shift))){ +var new_root_array = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +var new_shift = (self__.shift + (5)); +(new_root_array[(0)] = self__.root); + +(new_root_array[(1)] = cljs.core.new_path(self__.root.edit,self__.shift,tail_node)); + +self__.root = (new cljs.core.VectorNode(self__.root.edit,new_root_array)); + +self__.shift = new_shift; + +self__.cnt = (self__.cnt + (1)); + +return tcoll__$1; +} else { +var new_root = cljs.core.tv_push_tail(tcoll__$1,self__.shift,self__.root,tail_node); +self__.root = new_root; + +self__.cnt = (self__.cnt + (1)); + +return tcoll__$1; +} +} +} else { +throw (new Error("conj! after persistent!")); +} +}); + +cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = (function (tcoll){ +var self__ = this; +var tcoll__$1 = this; +if(self__.root.edit){ +self__.root.edit = null; + +var len = (self__.cnt - cljs.core.tail_off(tcoll__$1)); +var trimmed_tail = (new Array(len)); +cljs.core.array_copy(self__.tail,(0),trimmed_tail,(0),len); + +return (new cljs.core.PersistentVector(null,self__.cnt,self__.shift,self__.root,trimmed_tail,null)); +} else { +throw (new Error("persistent! called twice")); +} +}); + +cljs.core.TransientVector.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = (function (tcoll,key,val){ +var self__ = this; +var tcoll__$1 = this; +if(typeof key === 'number'){ +return tcoll__$1.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(null,key,val); +} else { +throw (new Error("TransientVector's key for assoc! must be a number.")); +} +}); + +cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 = (function (tcoll,n,val){ +var self__ = this; +var tcoll__$1 = this; +if(self__.root.edit){ +if((((0) <= n)) && ((n < self__.cnt))){ +if((cljs.core.tail_off(tcoll__$1) <= n)){ +(self__.tail[(n & (31))] = val); + +return tcoll__$1; +} else { +var new_root = ((function (tcoll__$1){ +return (function cljs$core$go(level,node){ +var node__$1 = cljs.core.tv_ensure_editable(self__.root.edit,node); +if((level === (0))){ +cljs.core.pv_aset(node__$1,(n & (31)),val); + +return node__$1; +} else { +var subidx = ((n >>> level) & (31)); +cljs.core.pv_aset(node__$1,subidx,cljs$core$go((level - (5)),cljs.core.pv_aget(node__$1,subidx))); + +return node__$1; +} +});})(tcoll__$1)) +.call(null,self__.shift,self__.root); +self__.root = new_root; + +return tcoll__$1; +} +} else { +if((n === self__.cnt)){ +return tcoll__$1.cljs$core$ITransientCollection$_conj_BANG_$arity$2(null,val); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Index "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(n),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" out of bounds for TransientVector of length"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.cnt)].join(''))); + +} +} +} else { +throw (new Error("assoc! after persistent!")); +} +}); + +cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_pop_BANG_$arity$1 = (function (tcoll){ +var self__ = this; +var tcoll__$1 = this; +if(self__.root.edit){ +if((self__.cnt === (0))){ +throw (new Error("Can't pop empty vector")); +} else { +if(((1) === self__.cnt)){ +self__.cnt = (0); + +return tcoll__$1; +} else { +if((((self__.cnt - (1)) & (31)) > (0))){ +self__.cnt = (self__.cnt - (1)); + +return tcoll__$1; +} else { +var new_tail = cljs.core.unchecked_editable_array_for(tcoll__$1,(self__.cnt - (2))); +var new_root = (function (){var nr = cljs.core.tv_pop_tail(tcoll__$1,self__.shift,self__.root); +if(!((nr == null))){ +return nr; +} else { +return (new cljs.core.VectorNode(self__.root.edit,[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null])); +} +})(); +if((((5) < self__.shift)) && ((cljs.core.pv_aget(new_root,(1)) == null))){ +var new_root__$1 = cljs.core.tv_ensure_editable(self__.root.edit,cljs.core.pv_aget(new_root,(0))); +self__.root = new_root__$1; + +self__.shift = (self__.shift - (5)); + +self__.cnt = (self__.cnt - (1)); + +self__.tail = new_tail; + +return tcoll__$1; +} else { +self__.root = new_root; + +self__.cnt = (self__.cnt - (1)); + +self__.tail = new_tail; + +return tcoll__$1; +} + +} +} +} +} else { +throw (new Error("pop! after persistent!")); +} +}); + +cljs.core.TransientVector.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if(self__.root.edit){ +return self__.cnt; +} else { +throw (new Error("count after persistent!")); +} +}); + +cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (coll,n){ +var self__ = this; +var coll__$1 = this; +if(self__.root.edit){ +return (cljs.core.array_for(coll__$1,n)[(n & (31))]); +} else { +throw (new Error("nth after persistent!")); +} +}); + +cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (coll,n,not_found){ +var self__ = this; +var coll__$1 = this; +if((((0) <= n)) && ((n < self__.cnt))){ +return coll__$1.cljs$core$IIndexed$_nth$arity$2(null,n); +} else { +return not_found; +} +}); + +cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,k,not_found){ +var self__ = this; +var coll__$1 = this; +if(typeof k === 'number'){ +return coll__$1.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +} else { +return not_found; +} +}); + +cljs.core.TransientVector.prototype.call = (function() { +var G__12939 = null; +var G__12939__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); +var G__12939__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); +G__12939 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__12939__2.call(this,self__,k); +case 3: +return G__12939__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12939.cljs$core$IFn$_invoke$arity$2 = G__12939__2; +G__12939.cljs$core$IFn$_invoke$arity$3 = G__12939__3; +return G__12939; +})() +; + +cljs.core.TransientVector.prototype.apply = (function (self__,args12936){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args12936))); +}); + +cljs.core.TransientVector.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); + +cljs.core.TransientVector.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.TransientVector.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$cnt,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$shift,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$root,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$tail,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.TransientVector.cljs$lang$type = true; + +cljs.core.TransientVector.cljs$lang$ctorStr = "cljs.core/TransientVector"; + +cljs.core.TransientVector.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/TransientVector"); +}); + +cljs.core.__GT_TransientVector = (function cljs$core$__GT_TransientVector(cnt,shift,root,tail){ +return (new cljs.core.TransientVector(cnt,shift,root,tail)); +}); + + +/** +* @constructor +*/ +cljs.core.PersistentQueueIter = (function (fseq,riter){ +this.fseq = fseq; +this.riter = riter; +}) +cljs.core.PersistentQueueIter.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +var or__7960__auto__ = (!((self__.fseq == null))) && (cljs.core.seq(self__.fseq)); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +var and__7948__auto__ = !((self__.riter == null)); +if(and__7948__auto__){ +return self__.riter.hasNext(); +} else { +return and__7948__auto__; +} +} +}); + +cljs.core.PersistentQueueIter.prototype.next = (function (){ +var self__ = this; +var _ = this; +if(!((self__.fseq == null))){ +var ret = cljs.core.first(self__.fseq); +self__.fseq = cljs.core.next(self__.fseq); + +return ret; +} else { +if((!((self__.riter == null))) && (self__.riter.hasNext())){ +return self__.riter.next(); +} else { +throw (new Error("No such element")); + +} +} +}); + +cljs.core.PersistentQueueIter.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.PersistentQueueIter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$fseq,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$riter], null); +}); + +cljs.core.PersistentQueueIter.cljs$lang$type = true; + +cljs.core.PersistentQueueIter.cljs$lang$ctorStr = "cljs.core/PersistentQueueIter"; + +cljs.core.PersistentQueueIter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentQueueIter"); +}); + +cljs.core.__GT_PersistentQueueIter = (function cljs$core$__GT_PersistentQueueIter(fseq,riter){ +return (new cljs.core.PersistentQueueIter(fseq,riter)); +}); + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.PersistentQueueSeq = (function (meta,front,rear,__hash){ +this.meta = meta; +this.front = front; +this.rear = rear; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 31850572; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.PersistentQueueSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentQueueSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentQueueSeq.prototype.indexOf = (function() { +var G__12940 = null; +var G__12940__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__12940__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12940 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12940__1.call(this,x); +case 2: +return G__12940__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12940.cljs$core$IFn$_invoke$arity$1 = G__12940__1; +G__12940.cljs$core$IFn$_invoke$arity$2 = G__12940__2; +return G__12940; +})() +; + +cljs.core.PersistentQueueSeq.prototype.lastIndexOf = (function() { +var G__12941 = null; +var G__12941__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__12941__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12941 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12941__1.call(this,x); +case 2: +return G__12941__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12941.cljs$core$IFn$_invoke$arity$1 = G__12941__1; +G__12941.cljs$core$IFn$_invoke$arity$2 = G__12941__2; +return G__12941; +})() +; + +cljs.core.PersistentQueueSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.first(self__.front); +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var temp__5276__auto__ = cljs.core.next(self__.front); +if(temp__5276__auto__){ +var f1 = temp__5276__auto__; +return (new cljs.core.PersistentQueueSeq(self__.meta,f1,self__.rear,null)); +} else { +if((self__.rear == null)){ +return coll__$1.cljs$core$IEmptyableCollection$_empty$arity$1(null); +} else { +return (new cljs.core.PersistentQueueSeq(self__.meta,self__.rear,null,null)); +} +} +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentQueueSeq(meta__$1,self__.front,self__.rear,self__.__hash)); +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.PersistentQueueSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$front,cljs.core.cst$sym$rear,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentQueueSeq.cljs$lang$type = true; + +cljs.core.PersistentQueueSeq.cljs$lang$ctorStr = "cljs.core/PersistentQueueSeq"; + +cljs.core.PersistentQueueSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentQueueSeq"); +}); + +cljs.core.__GT_PersistentQueueSeq = (function cljs$core$__GT_PersistentQueueSeq(meta,front,rear,__hash){ +return (new cljs.core.PersistentQueueSeq(meta,front,rear,__hash)); +}); + +(cljs.core.PersistentQueueSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IStack} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.PersistentQueue = (function (meta,count,front,rear,__hash){ +this.meta = meta; +this.count = count; +this.front = front; +this.rear = rear; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 31858766; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.PersistentQueue.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentQueue.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentQueue.prototype.indexOf = (function() { +var G__12942 = null; +var G__12942__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__12942__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12942 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12942__1.call(this,x); +case 2: +return G__12942__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12942.cljs$core$IFn$_invoke$arity$1 = G__12942__1; +G__12942.cljs$core$IFn$_invoke$arity$2 = G__12942__2; +return G__12942; +})() +; + +cljs.core.PersistentQueue.prototype.lastIndexOf = (function() { +var G__12943 = null; +var G__12943__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(self__.count.cljs$core$IFn$_invoke$arity$1 ? self__.count.cljs$core$IFn$_invoke$arity$1(coll) : self__.count.call(null,coll))); +}); +var G__12943__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12943 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12943__1.call(this,x); +case 2: +return G__12943__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12943.cljs$core$IFn$_invoke$arity$1 = G__12943__1; +G__12943.cljs$core$IFn$_invoke$arity$2 = G__12943__2; +return G__12943; +})() +; + +cljs.core.PersistentQueue.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentQueue.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentQueueIter(self__.front,cljs.core._iterator(self__.rear))); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentQueue.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentQueue(self__.meta,self__.count,self__.front,self__.rear,self__.__hash)); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.count; +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IStack$_peek$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.first(self__.front); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IStack$_pop$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if(cljs.core.truth_(self__.front)){ +var temp__5276__auto__ = cljs.core.next(self__.front); +if(temp__5276__auto__){ +var f1 = temp__5276__auto__; +return (new cljs.core.PersistentQueue(self__.meta,(self__.count - (1)),f1,self__.rear,null)); +} else { +return (new cljs.core.PersistentQueue(self__.meta,(self__.count - (1)),cljs.core.seq(self__.rear),cljs.core.PersistentVector.EMPTY,null)); +} +} else { +return coll__$1; +} +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.PersistentQueue.EMPTY,self__.meta); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.first(self__.front); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.rest(cljs.core.seq(coll__$1)); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var rear__$1 = cljs.core.seq(self__.rear); +if(cljs.core.truth_((function (){var or__7960__auto__ = self__.front; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return rear__$1; +} +})())){ +return (new cljs.core.PersistentQueueSeq(null,self__.front,cljs.core.seq(rear__$1),null)); +} else { +return null; +} +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentQueue(meta__$1,self__.count,self__.front,self__.rear,self__.__hash)); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +if(cljs.core.truth_(self__.front)){ +return (new cljs.core.PersistentQueue(self__.meta,(self__.count + (1)),self__.front,cljs.core.conj.cljs$core$IFn$_invoke$arity$2((function (){var or__7960__auto__ = self__.rear; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.PersistentVector.EMPTY; +} +})(),o),null)); +} else { +return (new cljs.core.PersistentQueue(self__.meta,(self__.count + (1)),cljs.core.conj.cljs$core$IFn$_invoke$arity$2(self__.front,o),cljs.core.PersistentVector.EMPTY,null)); +} +}); + +cljs.core.PersistentQueue.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$count,cljs.core.cst$sym$front,cljs.core.cst$sym$rear,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentQueue.cljs$lang$type = true; + +cljs.core.PersistentQueue.cljs$lang$ctorStr = "cljs.core/PersistentQueue"; + +cljs.core.PersistentQueue.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentQueue"); +}); + +cljs.core.__GT_PersistentQueue = (function cljs$core$__GT_PersistentQueue(meta,count,front,rear,__hash){ +return (new cljs.core.PersistentQueue(meta,count,front,rear,__hash)); +}); + +cljs.core.PersistentQueue.EMPTY = (new cljs.core.PersistentQueue(null,(0),null,cljs.core.PersistentVector.EMPTY,cljs.core.empty_ordered_hash)); +(cljs.core.PersistentQueue.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.IEquiv} +*/ +cljs.core.NeverEquiv = (function (){ +this.cljs$lang$protocol_mask$partition0$ = 2097152; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.NeverEquiv.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.NeverEquiv.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (o,other){ +var self__ = this; +var o__$1 = this; +return false; +}); + +cljs.core.NeverEquiv.getBasis = (function (){ +return cljs.core.PersistentVector.EMPTY; +}); + +cljs.core.NeverEquiv.cljs$lang$type = true; + +cljs.core.NeverEquiv.cljs$lang$ctorStr = "cljs.core/NeverEquiv"; + +cljs.core.NeverEquiv.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/NeverEquiv"); +}); + +cljs.core.__GT_NeverEquiv = (function cljs$core$__GT_NeverEquiv(){ +return (new cljs.core.NeverEquiv()); +}); + +cljs.core.never_equiv = (new cljs.core.NeverEquiv()); +/** + * Assumes y is a map. Returns true if x equals y, otherwise returns + * false. + */ +cljs.core.equiv_map = (function cljs$core$equiv_map(x,y){ +return cljs.core.boolean$(((cljs.core.map_QMARK_(y))?(((cljs.core.count(x) === cljs.core.count(y)))?cljs.core.every_QMARK_((function (xkv){ +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(y,cljs.core.first(xkv),cljs.core.never_equiv),cljs.core.second(xkv)); +}),x):null):null)); +}); +cljs.core.scan_array = (function cljs$core$scan_array(incr,k,array){ +var len = array.length; +var i = (0); +while(true){ +if((i < len)){ +if((k === (array[i]))){ +return i; +} else { +var G__12944 = (i + incr); +i = G__12944; +continue; +} +} else { +return null; +} +break; +} +}); +cljs.core.obj_map_compare_keys = (function cljs$core$obj_map_compare_keys(a,b){ +var a__$1 = cljs.core.hash(a); +var b__$1 = cljs.core.hash(b); +if((a__$1 < b__$1)){ +return (-1); +} else { +if((a__$1 > b__$1)){ +return (1); +} else { +return (0); + +} +} +}); +cljs.core.obj_map__GT_hash_map = (function cljs$core$obj_map__GT_hash_map(m,k,v){ +var ks = m.keys; +var len = ks.length; +var so = m.strobj; +var mm = cljs.core.meta(m); +var i = (0); +var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY); +while(true){ +if((i < len)){ +var k__$1 = (ks[i]); +var G__12945 = (i + (1)); +var G__12946 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out,k__$1,(so[k__$1])); +i = G__12945; +out = G__12946; +continue; +} else { +return cljs.core._with_meta(cljs.core.persistent_BANG_(cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out,k,v)),mm); +} +break; +} +}); +cljs.core.obj_clone = (function cljs$core$obj_clone(obj,ks){ +var new_obj = {}; +var l = ks.length; +var i_12951 = (0); +while(true){ +if((i_12951 < l)){ +var k_12952 = (ks[i_12951]); +(new_obj[k_12952] = (obj[k_12952])); + +var G__12953 = (i_12951 + (1)); +i_12951 = G__12953; +continue; +} else { +} +break; +} + +return new_obj; +}); + +/** +* @constructor + * @implements {cljs.core.IKVReduce} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEditableCollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.IMap} + * @implements {cljs.core.ILookup} +*/ +cljs.core.ObjMap = (function (meta,keys,strobj,update_count,__hash){ +this.meta = meta; +this.keys = keys; +this.strobj = strobj; +this.update_count = update_count; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 16123663; +this.cljs$lang$protocol_mask$partition1$ = 4; +}) +cljs.core.ObjMap.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ObjMap.prototype.cljs$core$IFind$_find$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k,cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll__$1,k)], null); +}); + +cljs.core.ObjMap.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.ObjMap.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,k,not_found){ +var self__ = this; +var coll__$1 = this; +if((goog.isString(k)) && (!((cljs.core.scan_array((1),k,self__.keys) == null)))){ +return (self__.strobj[k]); +} else { +return not_found; +} +}); + +cljs.core.ObjMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (coll,f,init){ +var self__ = this; +var coll__$1 = this; +var len = self__.keys.length; +var keys__$1 = self__.keys.sort(cljs.core.obj_map_compare_keys); +var init__$1 = init; +while(true){ +if(cljs.core.seq(keys__$1)){ +var k = cljs.core.first(keys__$1); +var init__$2 = (function (){var G__12956 = init__$1; +var G__12957 = k; +var G__12958 = (self__.strobj[k]); +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12956,G__12957,G__12958) : f.call(null,G__12956,G__12957,G__12958)); +})(); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var G__12959 = cljs.core.rest(keys__$1); +var G__12960 = init__$2; +keys__$1 = G__12959; +init__$1 = G__12960; +continue; +} +} else { +return init__$1; +} +break; +} +}); + +cljs.core.ObjMap.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.ObjMap.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.keys.length; +}); + +cljs.core.ObjMap.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_unordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.ObjMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_map(coll__$1,other); +}); + +cljs.core.ObjMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.transient$(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentHashMap.EMPTY,coll__$1)); +}); + +cljs.core.ObjMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.ObjMap.EMPTY,self__.meta); +}); + +cljs.core.ObjMap.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +if((goog.isString(k)) && (!((cljs.core.scan_array((1),k,self__.keys) == null)))){ +var new_keys = cljs.core.aclone(self__.keys); +var new_strobj = cljs.core.obj_clone(self__.strobj,self__.keys); +new_keys.splice(cljs.core.scan_array((1),k,new_keys),(1)); + +delete new_strobj[k]; + +return (new cljs.core.ObjMap(self__.meta,new_keys,new_strobj,(self__.update_count + (1)),null)); +} else { +return coll__$1; +} +}); + +cljs.core.ObjMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (coll,k,v){ +var self__ = this; +var coll__$1 = this; +if(goog.isString(k)){ +if(((self__.update_count > cljs.core.ObjMap.HASHMAP_THRESHOLD)) || ((self__.keys.length >= cljs.core.ObjMap.HASHMAP_THRESHOLD))){ +return cljs.core.obj_map__GT_hash_map(coll__$1,k,v); +} else { +if(!((cljs.core.scan_array((1),k,self__.keys) == null))){ +var new_strobj = cljs.core.obj_clone(self__.strobj,self__.keys); +(new_strobj[k] = v); + +return (new cljs.core.ObjMap(self__.meta,self__.keys,new_strobj,(self__.update_count + (1)),null)); +} else { +var new_strobj = cljs.core.obj_clone(self__.strobj,self__.keys); +var new_keys = cljs.core.aclone(self__.keys); +(new_strobj[k] = v); + +new_keys.push(k); + +return (new cljs.core.ObjMap(self__.meta,new_keys,new_strobj,(self__.update_count + (1)),null)); +} +} +} else { +return cljs.core.obj_map__GT_hash_map(coll__$1,k,v); +} +}); + +cljs.core.ObjMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +if((goog.isString(k)) && (!((cljs.core.scan_array((1),k,self__.keys) == null)))){ +return true; +} else { +return false; +} +}); + +cljs.core.ObjMap.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.keys.length > (0))){ +return cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (coll__$1){ +return (function (p1__12954_SHARP_){ +return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[p1__12954_SHARP_,(self__.strobj[p1__12954_SHARP_])],null)); +});})(coll__$1)) +,self__.keys.sort(cljs.core.obj_map_compare_keys)); +} else { +return null; +} +}); + +cljs.core.ObjMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.ObjMap(meta__$1,self__.keys,self__.strobj,self__.update_count,self__.__hash)); +}); + +cljs.core.ObjMap.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,entry){ +var self__ = this; +var coll__$1 = this; +if(cljs.core.vector_QMARK_(entry)){ +return coll__$1.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(1))); +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,coll__$1,entry); +} +}); + +cljs.core.ObjMap.prototype.call = (function() { +var G__12961 = null; +var G__12961__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); +var G__12961__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); +G__12961 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__12961__2.call(this,self__,k); +case 3: +return G__12961__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12961.cljs$core$IFn$_invoke$arity$2 = G__12961__2; +G__12961.cljs$core$IFn$_invoke$arity$3 = G__12961__3; +return G__12961; +})() +; + +cljs.core.ObjMap.prototype.apply = (function (self__,args12955){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args12955))); +}); + +cljs.core.ObjMap.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); + +cljs.core.ObjMap.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.ObjMap.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$keys,cljs.core.cst$sym$strobj,cljs.core.cst$sym$update_DASH_count,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ObjMap.cljs$lang$type = true; + +cljs.core.ObjMap.cljs$lang$ctorStr = "cljs.core/ObjMap"; + +cljs.core.ObjMap.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ObjMap"); +}); + +cljs.core.__GT_ObjMap = (function cljs$core$__GT_ObjMap(meta,keys,strobj,update_count,__hash){ +return (new cljs.core.ObjMap(meta,keys,strobj,update_count,__hash)); +}); + +cljs.core.ObjMap.EMPTY = (new cljs.core.ObjMap(null,[],{},(0),cljs.core.empty_unordered_hash)); +cljs.core.ObjMap.HASHMAP_THRESHOLD = (8); +cljs.core.ObjMap.fromObject = (function (ks,obj){ +return (new cljs.core.ObjMap(null,ks,obj,(0),null)); +}); + +/** +* @constructor +*/ +cljs.core.RecordIter = (function (i,record,base_count,fields,ext_map_iter){ +this.i = i; +this.record = record; +this.base_count = base_count; +this.fields = fields; +this.ext_map_iter = ext_map_iter; +}) +cljs.core.RecordIter.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +var or__7960__auto__ = (self__.i < self__.base_count); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return self__.ext_map_iter.hasNext(); +} +}); + +cljs.core.RecordIter.prototype.next = (function (){ +var self__ = this; +var _ = this; +if((self__.i < self__.base_count)){ +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(self__.fields,self__.i); +self__.i = (self__.i + (1)); + +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k,cljs.core._lookup.cljs$core$IFn$_invoke$arity$2(self__.record,k)], null); +} else { +return self__.ext_map_iter.next(); +} +}); + +cljs.core.RecordIter.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.RecordIter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$record,cljs.core.cst$sym$base_DASH_count,cljs.core.cst$sym$fields,cljs.core.cst$sym$ext_DASH_map_DASH_iter], null); +}); + +cljs.core.RecordIter.cljs$lang$type = true; + +cljs.core.RecordIter.cljs$lang$ctorStr = "cljs.core/RecordIter"; + +cljs.core.RecordIter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/RecordIter"); +}); + +cljs.core.__GT_RecordIter = (function cljs$core$__GT_RecordIter(i,record,base_count,fields,ext_map_iter){ +return (new cljs.core.RecordIter(i,record,base_count,fields,ext_map_iter)); +}); + + +/** +* @constructor +*/ +cljs.core.ES6EntriesIterator = (function (s){ +this.s = s; +}) +cljs.core.ES6EntriesIterator.prototype.next = (function (){ +var self__ = this; +var _ = this; +if(!((self__.s == null))){ +var vec__12964 = cljs.core.first(self__.s); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12964,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12964,(1),null); +self__.s = cljs.core.next(self__.s); + +return ({"value": [k,v], "done": false}); +} else { +return ({"value": null, "done": true}); +} +}); + +cljs.core.ES6EntriesIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$s,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ES6EntriesIterator.cljs$lang$type = true; + +cljs.core.ES6EntriesIterator.cljs$lang$ctorStr = "cljs.core/ES6EntriesIterator"; + +cljs.core.ES6EntriesIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ES6EntriesIterator"); +}); + +cljs.core.__GT_ES6EntriesIterator = (function cljs$core$__GT_ES6EntriesIterator(s){ +return (new cljs.core.ES6EntriesIterator(s)); +}); + +cljs.core.es6_entries_iterator = (function cljs$core$es6_entries_iterator(coll){ +return (new cljs.core.ES6EntriesIterator(cljs.core.seq(coll))); +}); + +/** +* @constructor +*/ +cljs.core.ES6SetEntriesIterator = (function (s){ +this.s = s; +}) +cljs.core.ES6SetEntriesIterator.prototype.next = (function (){ +var self__ = this; +var _ = this; +if(!((self__.s == null))){ +var x = cljs.core.first(self__.s); +self__.s = cljs.core.next(self__.s); + +return ({"value": [x,x], "done": false}); +} else { +return ({"value": null, "done": true}); +} +}); + +cljs.core.ES6SetEntriesIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$s,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ES6SetEntriesIterator.cljs$lang$type = true; + +cljs.core.ES6SetEntriesIterator.cljs$lang$ctorStr = "cljs.core/ES6SetEntriesIterator"; + +cljs.core.ES6SetEntriesIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ES6SetEntriesIterator"); +}); + +cljs.core.__GT_ES6SetEntriesIterator = (function cljs$core$__GT_ES6SetEntriesIterator(s){ +return (new cljs.core.ES6SetEntriesIterator(s)); +}); + +cljs.core.es6_set_entries_iterator = (function cljs$core$es6_set_entries_iterator(coll){ +return (new cljs.core.ES6SetEntriesIterator(cljs.core.seq(coll))); +}); +cljs.core.array_index_of_nil_QMARK_ = (function cljs$core$array_index_of_nil_QMARK_(arr){ +var len = arr.length; +var i = (0); +while(true){ +if((len <= i)){ +return (-1); +} else { +if(((arr[i]) == null)){ +return i; +} else { +var G__12967 = (i + (2)); +i = G__12967; +continue; + +} +} +break; +} +}); +cljs.core.array_index_of_keyword_QMARK_ = (function cljs$core$array_index_of_keyword_QMARK_(arr,k){ +var len = arr.length; +var kstr = k.fqn; +var i = (0); +while(true){ +if((len <= i)){ +return (-1); +} else { +if((((arr[i]) instanceof cljs.core.Keyword)) && ((kstr === (arr[i]).fqn))){ +return i; +} else { +var G__12968 = (i + (2)); +i = G__12968; +continue; + +} +} +break; +} +}); +cljs.core.array_index_of_symbol_QMARK_ = (function cljs$core$array_index_of_symbol_QMARK_(arr,k){ +var len = arr.length; +var kstr = k.str; +var i = (0); +while(true){ +if((len <= i)){ +return (-1); +} else { +if((((arr[i]) instanceof cljs.core.Symbol)) && ((kstr === (arr[i]).str))){ +return i; +} else { +var G__12969 = (i + (2)); +i = G__12969; +continue; + +} +} +break; +} +}); +cljs.core.array_index_of_identical_QMARK_ = (function cljs$core$array_index_of_identical_QMARK_(arr,k){ +var len = arr.length; +var i = (0); +while(true){ +if((len <= i)){ +return (-1); +} else { +if((k === (arr[i]))){ +return i; +} else { +var G__12970 = (i + (2)); +i = G__12970; +continue; + +} +} +break; +} +}); +cljs.core.array_index_of_equiv_QMARK_ = (function cljs$core$array_index_of_equiv_QMARK_(arr,k){ +var len = arr.length; +var i = (0); +while(true){ +if((len <= i)){ +return (-1); +} else { +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(k,(arr[i]))){ +return i; +} else { +var G__12971 = (i + (2)); +i = G__12971; +continue; + +} +} +break; +} +}); +cljs.core.array_index_of = (function cljs$core$array_index_of(arr,k){ +if((k instanceof cljs.core.Keyword)){ +return cljs.core.array_index_of_keyword_QMARK_(arr,k); +} else { +if((goog.isString(k)) || (typeof k === 'number')){ +return cljs.core.array_index_of_identical_QMARK_(arr,k); +} else { +if((k instanceof cljs.core.Symbol)){ +return cljs.core.array_index_of_symbol_QMARK_(arr,k); +} else { +if((k == null)){ +return cljs.core.array_index_of_nil_QMARK_(arr); +} else { +return cljs.core.array_index_of_equiv_QMARK_(arr,k); + +} +} +} +} +}); +cljs.core.array_map_index_of = (function cljs$core$array_map_index_of(m,k){ +return cljs.core.array_index_of(m.arr,k); +}); +cljs.core.array_extend_kv = (function cljs$core$array_extend_kv(arr,k,v){ +var l = arr.length; +var narr = (new Array((l + (2)))); +var i_12972 = (0); +while(true){ +if((i_12972 < l)){ +(narr[i_12972] = (arr[i_12972])); + +var G__12973 = (i_12972 + (1)); +i_12972 = G__12973; +continue; +} else { +} +break; +} + +(narr[l] = k); + +(narr[(l + (1))] = v); + +return narr; +}); +cljs.core.array_map_extend_kv = (function cljs$core$array_map_extend_kv(m,k,v){ +return cljs.core.array_extend_kv(m.arr,k,v); +}); + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IVector} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IStack} + * @implements {cljs.core.IMapEntry} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.ILookup} + * @implements {cljs.core.IReduce} +*/ +cljs.core.MapEntry = (function (key,val,__hash){ +this.key = key; +this.val = val; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32402207; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.MapEntry.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.MapEntry.prototype.cljs$core$IFind$_find$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +if((k === (0))){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(0),self__.key], null); +} else { +if((k === (1))){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(1),self__.val], null); +} else { +return null; + +} +} +}); + +cljs.core.MapEntry.prototype.indexOf = (function() { +var G__12975 = null; +var G__12975__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__12975__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12975 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12975__1.call(this,x); +case 2: +return G__12975__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12975.cljs$core$IFn$_invoke$arity$1 = G__12975__1; +G__12975.cljs$core$IFn$_invoke$arity$2 = G__12975__2; +return G__12975; +})() +; + +cljs.core.MapEntry.prototype.lastIndexOf = (function() { +var G__12976 = null; +var G__12976__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__12976__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12976 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12976__1.call(this,x); +case 2: +return G__12976__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12976.cljs$core$IFn$_invoke$arity$1 = G__12976__1; +G__12976.cljs$core$IFn$_invoke$arity$2 = G__12976__2; +return G__12976; +})() +; + +cljs.core.MapEntry.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +return node__$1.cljs$core$IIndexed$_nth$arity$3(null,k,null); +}); + +cljs.core.MapEntry.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (node,k,not_found){ +var self__ = this; +var node__$1 = this; +return node__$1.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.MapEntry.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (node,n){ +var self__ = this; +var node__$1 = this; +if((n === (0))){ +return self__.key; +} else { +if((n === (1))){ +return self__.val; +} else { +throw (new Error("Index out of bounds")); + +} +} +}); + +cljs.core.MapEntry.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (node,n,not_found){ +var self__ = this; +var node__$1 = this; +if((n === (0))){ +return self__.key; +} else { +if((n === (1))){ +return self__.val; +} else { +return not_found; + +} +} +}); + +cljs.core.MapEntry.prototype.cljs$core$IVector$_assoc_n$arity$3 = (function (node,n,v){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null).cljs$core$IVector$_assoc_n$arity$3(null,n,v); +}); + +cljs.core.MapEntry.prototype.cljs$core$IMeta$_meta$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return null; +}); + +cljs.core.MapEntry.prototype.cljs$core$ICounted$_count$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return (2); +}); + +cljs.core.MapEntry.prototype.cljs$core$IMapEntry$_key$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.key; +}); + +cljs.core.MapEntry.prototype.cljs$core$IMapEntry$_val$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.val; +}); + +cljs.core.MapEntry.prototype.cljs$core$IStack$_peek$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.val; +}); + +cljs.core.MapEntry.prototype.cljs$core$IStack$_pop$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key], null); +}); + +cljs.core.MapEntry.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.MapEntry.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.MapEntry.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return cljs.core.PersistentVector.EMPTY; +}); + +cljs.core.MapEntry.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (node,f){ +var self__ = this; +var node__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(node__$1,f); +}); + +cljs.core.MapEntry.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (node,f,start){ +var self__ = this; +var node__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(node__$1,f,start); +}); + +cljs.core.MapEntry.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (node,k,v){ +var self__ = this; +var node__$1 = this; +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null),k,v); +}); + +cljs.core.MapEntry.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +return ((k === (0))) || ((k === (1))); +}); + +cljs.core.MapEntry.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +var x__8894__auto__ = self__.key; +return cljs.core._conj((function (){var x__8894__auto____$1 = self__.val; +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto____$1); +})(),x__8894__auto__); +}); + +cljs.core.MapEntry.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (node,meta){ +var self__ = this; +var node__$1 = this; +return cljs.core.with_meta(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null),meta); +}); + +cljs.core.MapEntry.prototype.cljs$core$ICollection$_conj$arity$2 = (function (node,o){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val,o], null); +}); + +cljs.core.MapEntry.prototype.call = (function() { +var G__12977 = null; +var G__12977__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var node = self____$1; +return node.cljs$core$IIndexed$_nth$arity$2(null,k); +}); +var G__12977__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var node = self____$1; +return node.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); +G__12977 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__12977__2.call(this,self__,k); +case 3: +return G__12977__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12977.cljs$core$IFn$_invoke$arity$2 = G__12977__2; +G__12977.cljs$core$IFn$_invoke$arity$3 = G__12977__3; +return G__12977; +})() +; + +cljs.core.MapEntry.prototype.apply = (function (self__,args12974){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args12974))); +}); + +cljs.core.MapEntry.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var node = this; +return node.cljs$core$IIndexed$_nth$arity$2(null,k); +}); + +cljs.core.MapEntry.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var node = this; +return node.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.MapEntry.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$key,cljs.core.cst$sym$val,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.MapEntry.cljs$lang$type = true; + +cljs.core.MapEntry.cljs$lang$ctorStr = "cljs.core/MapEntry"; + +cljs.core.MapEntry.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/MapEntry"); +}); + +cljs.core.__GT_MapEntry = (function cljs$core$__GT_MapEntry(key,val,__hash){ +return (new cljs.core.MapEntry(key,val,__hash)); +}); + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.PersistentArrayMapSeq = (function (arr,i,_meta){ +this.arr = arr; +this.i = i; +this._meta = _meta; +this.cljs$lang$protocol_mask$partition0$ = 32374990; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.PersistentArrayMapSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentArrayMapSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentArrayMapSeq.prototype.indexOf = (function() { +var G__12978 = null; +var G__12978__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__12978__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12978 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12978__1.call(this,x); +case 2: +return G__12978__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12978.cljs$core$IFn$_invoke$arity$1 = G__12978__1; +G__12978.cljs$core$IFn$_invoke$arity$2 = G__12978__2; +return G__12978; +})() +; + +cljs.core.PersistentArrayMapSeq.prototype.lastIndexOf = (function() { +var G__12979 = null; +var G__12979__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__12979__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__12979 = function(x,start){ +switch(arguments.length){ +case 1: +return G__12979__1.call(this,x); +case 2: +return G__12979__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__12979.cljs$core$IFn$_invoke$arity$1 = G__12979__1; +G__12979.cljs$core$IFn$_invoke$arity$2 = G__12979__2; +return G__12979; +})() +; + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__._meta; +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.i < (self__.arr.length - (2)))){ +return (new cljs.core.PersistentArrayMapSeq(self__.arr,(self__.i + (2)),self__._meta)); +} else { +return null; +} +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return ((self__.arr.length - self__.i) / (2)); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.hash_ordered_coll(coll__$1); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__._meta); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(self__.arr[self__.i]),(self__.arr[(self__.i + (1))])], null); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.i < (self__.arr.length - (2)))){ +return (new cljs.core.PersistentArrayMapSeq(self__.arr,(self__.i + (2)),self__._meta)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,new_meta){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentArrayMapSeq(self__.arr,self__.i,new_meta)); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.PersistentArrayMapSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.cst$sym$i,cljs.core.cst$sym$_meta], null); +}); + +cljs.core.PersistentArrayMapSeq.cljs$lang$type = true; + +cljs.core.PersistentArrayMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentArrayMapSeq"; + +cljs.core.PersistentArrayMapSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentArrayMapSeq"); +}); + +cljs.core.__GT_PersistentArrayMapSeq = (function cljs$core$__GT_PersistentArrayMapSeq(arr,i,_meta){ +return (new cljs.core.PersistentArrayMapSeq(arr,i,_meta)); +}); + +(cljs.core.PersistentArrayMapSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.persistent_array_map_seq = (function cljs$core$persistent_array_map_seq(arr,i,_meta){ +if((i <= (arr.length - (2)))){ +return (new cljs.core.PersistentArrayMapSeq(arr,i,_meta)); +} else { +return null; +} +}); + + +/** +* @constructor +*/ +cljs.core.PersistentArrayMapIterator = (function (arr,i,cnt){ +this.arr = arr; +this.i = i; +this.cnt = cnt; +}) +cljs.core.PersistentArrayMapIterator.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +return (self__.i < self__.cnt); +}); + +cljs.core.PersistentArrayMapIterator.prototype.next = (function (){ +var self__ = this; +var _ = this; +var ret = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(self__.arr[self__.i]),(self__.arr[(self__.i + (1))])], null); +self__.i = (self__.i + (2)); + +return ret; +}); + +cljs.core.PersistentArrayMapIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$cnt], null); +}); + +cljs.core.PersistentArrayMapIterator.cljs$lang$type = true; + +cljs.core.PersistentArrayMapIterator.cljs$lang$ctorStr = "cljs.core/PersistentArrayMapIterator"; + +cljs.core.PersistentArrayMapIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentArrayMapIterator"); +}); + +cljs.core.__GT_PersistentArrayMapIterator = (function cljs$core$__GT_PersistentArrayMapIterator(arr,i,cnt){ +return (new cljs.core.PersistentArrayMapIterator(arr,i,cnt)); +}); + + +/** +* @constructor + * @implements {cljs.core.IKVReduce} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEditableCollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.IMap} + * @implements {cljs.core.ILookup} + * @implements {cljs.core.IReduce} +*/ +cljs.core.PersistentArrayMap = (function (meta,cnt,arr,__hash){ +this.meta = meta; +this.cnt = cnt; +this.arr = arr; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 16647951; +this.cljs$lang$protocol_mask$partition1$ = 8196; +}) +cljs.core.PersistentArrayMap.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentArrayMap.prototype.cljs$core$IFind$_find$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +var idx = cljs.core.array_map_index_of(coll__$1,k); +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(self__.arr[idx]),cljs.core.get.cljs$core$IFn$_invoke$arity$2(coll__$1,k)], null); +}); + +cljs.core.PersistentArrayMap.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentArrayMap.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentArrayMap.prototype.keys = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator((cljs.core.keys.cljs$core$IFn$_invoke$arity$1 ? cljs.core.keys.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.keys.call(null,coll))); +}); + +cljs.core.PersistentArrayMap.prototype.entries = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_entries_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentArrayMap.prototype.values = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator((cljs.core.vals.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vals.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.vals.call(null,coll))); +}); + +cljs.core.PersistentArrayMap.prototype.has = (function (k){ +var self__ = this; +var coll = this; +return cljs.core.contains_QMARK_(coll,k); +}); + +cljs.core.PersistentArrayMap.prototype.get = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentArrayMap.prototype.forEach = (function (f){ +var self__ = this; +var coll = this; +var seq__12981 = cljs.core.seq(coll); +var chunk__12982 = null; +var count__12983 = (0); +var i__12984 = (0); +while(true){ +if((i__12984 < count__12983)){ +var vec__12985 = chunk__12982.cljs$core$IIndexed$_nth$arity$2(null,i__12984); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12985,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12985,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__12998 = seq__12981; +var G__12999 = chunk__12982; +var G__13000 = count__12983; +var G__13001 = (i__12984 + (1)); +seq__12981 = G__12998; +chunk__12982 = G__12999; +count__12983 = G__13000; +i__12984 = G__13001; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__12981); +if(temp__5278__auto__){ +var seq__12981__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__12981__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__12981__$1); +var G__13002 = cljs.core.chunk_rest(seq__12981__$1); +var G__13003 = c__8871__auto__; +var G__13004 = cljs.core.count(c__8871__auto__); +var G__13005 = (0); +seq__12981 = G__13002; +chunk__12982 = G__13003; +count__12983 = G__13004; +i__12984 = G__13005; +continue; +} else { +var vec__12988 = cljs.core.first(seq__12981__$1); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12988,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__12988,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13006 = cljs.core.next(seq__12981__$1); +var G__13007 = null; +var G__13008 = (0); +var G__13009 = (0); +seq__12981 = G__13006; +chunk__12982 = G__13007; +count__12983 = G__13008; +i__12984 = G__13009; +continue; +} +} else { +return null; +} +} +break; +} +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,k,not_found){ +var self__ = this; +var coll__$1 = this; +var idx = cljs.core.array_map_index_of(coll__$1,k); +if((idx === (-1))){ +return not_found; +} else { +return (self__.arr[(idx + (1))]); +} +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (coll,f,init){ +var self__ = this; +var coll__$1 = this; +var len = self__.arr.length; +var i = (0); +var init__$1 = init; +while(true){ +if((i < len)){ +var init__$2 = (function (){var G__12991 = init__$1; +var G__12992 = (self__.arr[i]); +var G__12993 = (self__.arr[(i + (1))]); +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__12991,G__12992,G__12993) : f.call(null,G__12991,G__12992,G__12993)); +})(); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var G__13010 = (i + (2)); +var G__13011 = init__$2; +i = G__13010; +init__$1 = G__13011; +continue; +} +} else { +return init__$1; +} +break; +} +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentArrayMap.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return (new cljs.core.PersistentArrayMapIterator(self__.arr,(0),(self__.cnt * (2)))); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.PersistentArrayMap(self__.meta,self__.cnt,self__.arr,self__.__hash)); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.cnt; +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_unordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +if(((!((other == null)))?((((other.cljs$lang$protocol_mask$partition0$ & (1024))) || ((cljs.core.PROTOCOL_SENTINEL === other.cljs$core$IMap$)))?true:false):false)){ +var alen = self__.arr.length; +var other__$1 = other; +if((self__.cnt === other__$1.cljs$core$ICounted$_count$arity$1(null))){ +var i = (0); +while(true){ +if((i < alen)){ +var v = other__$1.cljs$core$ILookup$_lookup$arity$3(null,(self__.arr[i]),cljs.core.lookup_sentinel); +if(!((v === cljs.core.lookup_sentinel))){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((self__.arr[(i + (1))]),v)){ +var G__13012 = (i + (2)); +i = G__13012; +continue; +} else { +return false; +} +} else { +return false; +} +} else { +return true; +} +break; +} +} else { +return false; +} +} else { +return cljs.core.equiv_map(coll__$1,other); +} +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.TransientArrayMap({},self__.arr.length,cljs.core.aclone(self__.arr))); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.PersistentArrayMap.EMPTY,self__.meta); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +var idx = cljs.core.array_map_index_of(coll__$1,k); +if((idx >= (0))){ +var len = self__.arr.length; +var new_len = (len - (2)); +if((new_len === (0))){ +return coll__$1.cljs$core$IEmptyableCollection$_empty$arity$1(null); +} else { +var new_arr = (new Array(new_len)); +var s = (0); +var d = (0); +while(true){ +if((s >= len)){ +return (new cljs.core.PersistentArrayMap(self__.meta,(self__.cnt - (1)),new_arr,null)); +} else { +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(k,(self__.arr[s]))){ +var G__13013 = (s + (2)); +var G__13014 = d; +s = G__13013; +d = G__13014; +continue; +} else { +(new_arr[d] = (self__.arr[s])); + +(new_arr[(d + (1))] = (self__.arr[(s + (1))])); + +var G__13015 = (s + (2)); +var G__13016 = (d + (2)); +s = G__13015; +d = G__13016; +continue; + +} +} +break; +} +} +} else { +return coll__$1; +} +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (coll,k,v){ +var self__ = this; +var coll__$1 = this; +var idx = cljs.core.array_map_index_of(coll__$1,k); +if((idx === (-1))){ +if((self__.cnt < cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD)){ +var arr__$1 = cljs.core.array_map_extend_kv(coll__$1,k,v); +return (new cljs.core.PersistentArrayMap(self__.meta,(self__.cnt + (1)),arr__$1,null)); +} else { +return cljs.core._with_meta(cljs.core._assoc(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentHashMap.EMPTY,coll__$1),k,v),self__.meta); +} +} else { +if((v === (self__.arr[(idx + (1))]))){ +return coll__$1; +} else { +var arr__$1 = (function (){var G__12997 = cljs.core.aclone(self__.arr); +(G__12997[(idx + (1))] = v); + +return G__12997; +})(); +return (new cljs.core.PersistentArrayMap(self__.meta,self__.cnt,arr__$1,null)); + +} +} +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return !((cljs.core.array_map_index_of(coll__$1,k) === (-1))); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.persistent_array_map_seq(self__.arr,(0),null); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentArrayMap(meta__$1,self__.cnt,self__.arr,self__.__hash)); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,entry){ +var self__ = this; +var coll__$1 = this; +if(cljs.core.vector_QMARK_(entry)){ +return coll__$1.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(1))); +} else { +var ret = coll__$1; +var es = cljs.core.seq(entry); +while(true){ +if((es == null)){ +return ret; +} else { +var e = cljs.core.first(es); +if(cljs.core.vector_QMARK_(e)){ +var G__13017 = ret.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e,(1))); +var G__13018 = cljs.core.next(es); +ret = G__13017; +es = G__13018; +continue; +} else { +throw (new Error("conj on a map takes map entries or seqables of map entries")); +} +} +break; +} +} +}); + +cljs.core.PersistentArrayMap.prototype.call = (function() { +var G__13019 = null; +var G__13019__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); +var G__13019__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); +G__13019 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13019__2.call(this,self__,k); +case 3: +return G__13019__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13019.cljs$core$IFn$_invoke$arity$2 = G__13019__2; +G__13019.cljs$core$IFn$_invoke$arity$3 = G__13019__3; +return G__13019; +})() +; + +cljs.core.PersistentArrayMap.prototype.apply = (function (self__,args12980){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args12980))); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentArrayMap.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$cnt,cljs.core.cst$sym$arr,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentArrayMap.cljs$lang$type = true; + +cljs.core.PersistentArrayMap.cljs$lang$ctorStr = "cljs.core/PersistentArrayMap"; + +cljs.core.PersistentArrayMap.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentArrayMap"); +}); + +cljs.core.__GT_PersistentArrayMap = (function cljs$core$__GT_PersistentArrayMap(meta,cnt,arr,__hash){ +return (new cljs.core.PersistentArrayMap(meta,cnt,arr,__hash)); +}); + +cljs.core.PersistentArrayMap.EMPTY = (new cljs.core.PersistentArrayMap(null,(0),[],cljs.core.empty_unordered_hash)); +cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD = (8); +cljs.core.PersistentArrayMap.fromArray = (function (arr,no_clone,no_check){ +var arr__$1 = ((no_clone)?arr:cljs.core.aclone(arr)); +var arr__$2 = ((no_check)?arr__$1:(function (){var ret = []; +var i_13020 = (0); +while(true){ +if((i_13020 < arr__$1.length)){ +var k_13021 = (arr__$1[i_13020]); +var v_13022 = (arr__$1[(i_13020 + (1))]); +var idx_13023 = cljs.core.array_index_of(ret,k_13021); +if((idx_13023 === (-1))){ +ret.push(k_13021); + +ret.push(v_13022); +} else { +} + +var G__13024 = (i_13020 + (2)); +i_13020 = G__13024; +continue; +} else { +} +break; +} + +return ret; +})()); +var cnt = (arr__$2.length / (2)); +return (new cljs.core.PersistentArrayMap(null,cnt,arr__$2,null)); +}); +cljs.core.PersistentArrayMap.createWithCheck = (function (arr){ +var ret = []; +var i_13026 = (0); +while(true){ +if((i_13026 < arr.length)){ +var k_13027 = (arr[i_13026]); +var v_13028 = (arr[(i_13026 + (1))]); +var idx_13029 = cljs.core.array_index_of(ret,k_13027); +if((idx_13029 === (-1))){ +var G__13025_13030 = ret; +G__13025_13030.push(k_13027); + +G__13025_13030.push(v_13028); + +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Duplicate key: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(k_13027)].join(''))); +} + +var G__13031 = (i_13026 + (2)); +i_13026 = G__13031; +continue; +} else { +} +break; +} + +var cnt = (arr.length / (2)); +return (new cljs.core.PersistentArrayMap(null,cnt,arr,null)); +}); +cljs.core.PersistentArrayMap.createAsIfByAssoc = (function (arr){ +var ret = []; +var i_13033 = (0); +while(true){ +if((i_13033 < arr.length)){ +var k_13034 = (arr[i_13033]); +var v_13035 = (arr[(i_13033 + (1))]); +var idx_13036 = cljs.core.array_index_of(ret,k_13034); +if((idx_13036 === (-1))){ +var G__13032_13037 = ret; +G__13032_13037.push(k_13034); + +G__13032_13037.push(v_13035); + +} else { +(ret[(idx_13036 + (1))] = v_13035); +} + +var G__13038 = (i_13033 + (2)); +i_13033 = G__13038; +continue; +} else { +} +break; +} + +return (new cljs.core.PersistentArrayMap(null,(ret.length / (2)),ret,null)); +}); +(cljs.core.PersistentArrayMap.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.ITransientMap} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ITransientCollection} + * @implements {cljs.core.ITransientAssociative} + * @implements {cljs.core.ILookup} +*/ +cljs.core.TransientArrayMap = (function (editable_QMARK_,len,arr){ +this.editable_QMARK_ = editable_QMARK_; +this.len = len; +this.arr = arr; +this.cljs$lang$protocol_mask$partition0$ = 258; +this.cljs$lang$protocol_mask$partition1$ = 56; +}) +cljs.core.TransientArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = (function (tcoll){ +var self__ = this; +var tcoll__$1 = this; +if(cljs.core.truth_(self__.editable_QMARK_)){ +return cljs.core.quot(self__.len,(2)); +} else { +throw (new Error("count after persistent!")); +} +}); + +cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (tcoll,k){ +var self__ = this; +var tcoll__$1 = this; +return tcoll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (tcoll,k,not_found){ +var self__ = this; +var tcoll__$1 = this; +if(cljs.core.truth_(self__.editable_QMARK_)){ +var idx = cljs.core.array_map_index_of(tcoll__$1,k); +if((idx === (-1))){ +return not_found; +} else { +return (self__.arr[(idx + (1))]); +} +} else { +throw (new Error("lookup after persistent!")); +} +}); + +cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = (function (tcoll,o){ +var self__ = this; +var tcoll__$1 = this; +if(cljs.core.truth_(self__.editable_QMARK_)){ +if(((!((o == null)))?((((o.cljs$lang$protocol_mask$partition0$ & (2048))) || ((cljs.core.PROTOCOL_SENTINEL === o.cljs$core$IMapEntry$)))?true:(((!o.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry,o):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry,o))){ +return tcoll__$1.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(null,(cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.key.call(null,o)),(cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.val.call(null,o))); +} else { +var es = cljs.core.seq(o); +var tcoll__$2 = tcoll__$1; +while(true){ +var temp__5276__auto__ = cljs.core.first(es); +if(cljs.core.truth_(temp__5276__auto__)){ +var e = temp__5276__auto__; +var G__13041 = cljs.core.next(es); +var G__13042 = tcoll__$2.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(null,(cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.key.call(null,e)),(cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.val.call(null,e))); +es = G__13041; +tcoll__$2 = G__13042; +continue; +} else { +return tcoll__$2; +} +break; +} +} +} else { +throw (new Error("conj! after persistent!")); +} +}); + +cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = (function (tcoll){ +var self__ = this; +var tcoll__$1 = this; +if(cljs.core.truth_(self__.editable_QMARK_)){ +self__.editable_QMARK_ = false; + +return (new cljs.core.PersistentArrayMap(null,cljs.core.quot(self__.len,(2)),self__.arr,null)); +} else { +throw (new Error("persistent! called twice")); +} +}); + +cljs.core.TransientArrayMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = (function (tcoll,key,val){ +var self__ = this; +var tcoll__$1 = this; +if(cljs.core.truth_(self__.editable_QMARK_)){ +var idx = cljs.core.array_map_index_of(tcoll__$1,key); +if((idx === (-1))){ +if(((self__.len + (2)) <= ((2) * cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD))){ +self__.len = (self__.len + (2)); + +self__.arr.push(key); + +self__.arr.push(val); + +return tcoll__$1; +} else { +return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3((cljs.core.array__GT_transient_hash_map.cljs$core$IFn$_invoke$arity$2 ? cljs.core.array__GT_transient_hash_map.cljs$core$IFn$_invoke$arity$2(self__.len,self__.arr) : cljs.core.array__GT_transient_hash_map.call(null,self__.len,self__.arr)),key,val); +} +} else { +if((val === (self__.arr[(idx + (1))]))){ +return tcoll__$1; +} else { +(self__.arr[(idx + (1))] = val); + +return tcoll__$1; +} +} +} else { +throw (new Error("assoc! after persistent!")); +} +}); + +cljs.core.TransientArrayMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = (function (tcoll,key){ +var self__ = this; +var tcoll__$1 = this; +if(cljs.core.truth_(self__.editable_QMARK_)){ +var idx = cljs.core.array_map_index_of(tcoll__$1,key); +if((idx >= (0))){ +(self__.arr[idx] = (self__.arr[(self__.len - (2))])); + +(self__.arr[(idx + (1))] = (self__.arr[(self__.len - (1))])); + +var G__13040_13043 = self__.arr; +G__13040_13043.pop(); + +G__13040_13043.pop(); + + +self__.len = (self__.len - (2)); +} else { +} + +return tcoll__$1; +} else { +throw (new Error("dissoc! after persistent!")); +} +}); + +cljs.core.TransientArrayMap.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$editable_QMARK_,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$len,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$arr], null); +}); + +cljs.core.TransientArrayMap.cljs$lang$type = true; + +cljs.core.TransientArrayMap.cljs$lang$ctorStr = "cljs.core/TransientArrayMap"; + +cljs.core.TransientArrayMap.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/TransientArrayMap"); +}); + +cljs.core.__GT_TransientArrayMap = (function cljs$core$__GT_TransientArrayMap(editable_QMARK_,len,arr){ +return (new cljs.core.TransientArrayMap(editable_QMARK_,len,arr)); +}); + +cljs.core.array__GT_transient_hash_map = (function cljs$core$array__GT_transient_hash_map(len,arr){ +var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY); +var i = (0); +while(true){ +if((i < len)){ +var G__13044 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out,(arr[i]),(arr[(i + (1))])); +var G__13045 = (i + (2)); +out = G__13044; +i = G__13045; +continue; +} else { +return out; +} +break; +} +}); + +/** +* @constructor +*/ +cljs.core.Box = (function (val){ +this.val = val; +}) + +cljs.core.Box.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$val,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Box.cljs$lang$type = true; + +cljs.core.Box.cljs$lang$ctorStr = "cljs.core/Box"; + +cljs.core.Box.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Box"); +}); + +cljs.core.__GT_Box = (function cljs$core$__GT_Box(val){ +return (new cljs.core.Box(val)); +}); + + + + + + +cljs.core.key_test = (function cljs$core$key_test(key,other){ +if((key === other)){ +return true; +} else { +if(cljs.core.keyword_identical_QMARK_(key,other)){ +return true; +} else { +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(key,other); + +} +} +}); +cljs.core.mask = (function cljs$core$mask(hash,shift){ +return ((hash >>> shift) & (31)); +}); +cljs.core.clone_and_set = (function cljs$core$clone_and_set(var_args){ +var args13046 = []; +var len__9181__auto___13051 = arguments.length; +var i__9182__auto___13052 = (0); +while(true){ +if((i__9182__auto___13052 < len__9181__auto___13051)){ +args13046.push((arguments[i__9182__auto___13052])); + +var G__13053 = (i__9182__auto___13052 + (1)); +i__9182__auto___13052 = G__13053; +continue; +} else { +} +break; +} + +var G__13048 = args13046.length; +switch (G__13048) { +case 3: +return cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 5: +return cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13046.length)].join(''))); + +} +}); + +cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3 = (function (arr,i,a){ +var G__13049 = cljs.core.aclone(arr); +(G__13049[i] = a); + +return G__13049; +}); + +cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$5 = (function (arr,i,a,j,b){ +var G__13050 = cljs.core.aclone(arr); +(G__13050[i] = a); + +(G__13050[j] = b); + +return G__13050; +}); + +cljs.core.clone_and_set.cljs$lang$maxFixedArity = 5; + +cljs.core.remove_pair = (function cljs$core$remove_pair(arr,i){ +var new_arr = (new Array((arr.length - (2)))); +cljs.core.array_copy(arr,(0),new_arr,(0),((2) * i)); + +cljs.core.array_copy(arr,((2) * (i + (1))),new_arr,((2) * i),(new_arr.length - ((2) * i))); + +return new_arr; +}); +cljs.core.bitmap_indexed_node_index = (function cljs$core$bitmap_indexed_node_index(bitmap,bit){ +return cljs.core.bit_count((bitmap & (bit - (1)))); +}); +cljs.core.bitpos = (function cljs$core$bitpos(hash,shift){ +return ((1) << ((hash >>> shift) & 0x01f)); +}); +cljs.core.edit_and_set = (function cljs$core$edit_and_set(var_args){ +var args13055 = []; +var len__9181__auto___13058 = arguments.length; +var i__9182__auto___13059 = (0); +while(true){ +if((i__9182__auto___13059 < len__9181__auto___13058)){ +args13055.push((arguments[i__9182__auto___13059])); + +var G__13060 = (i__9182__auto___13059 + (1)); +i__9182__auto___13059 = G__13060; +continue; +} else { +} +break; +} + +var G__13057 = args13055.length; +switch (G__13057) { +case 4: +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 6: +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13055.length)].join(''))); + +} +}); + +cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4 = (function (inode,edit,i,a){ +var editable = inode.ensure_editable(edit); +(editable.arr[i] = a); + +return editable; +}); + +cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6 = (function (inode,edit,i,a,j,b){ +var editable = inode.ensure_editable(edit); +(editable.arr[i] = a); + +(editable.arr[j] = b); + +return editable; +}); + +cljs.core.edit_and_set.cljs$lang$maxFixedArity = 6; + +cljs.core.inode_kv_reduce = (function cljs$core$inode_kv_reduce(arr,f,init){ +var len = arr.length; +var i = (0); +var init__$1 = init; +while(true){ +if((i < len)){ +var init__$2 = (function (){var k = (arr[i]); +if(!((k == null))){ +var G__13065 = init__$1; +var G__13066 = k; +var G__13067 = (arr[(i + (1))]); +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__13065,G__13066,G__13067) : f.call(null,G__13065,G__13066,G__13067)); +} else { +var node = (arr[(i + (1))]); +if(!((node == null))){ +return node.kv_reduce(f,init__$1); +} else { +return init__$1; +} +} +})(); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var G__13068 = (i + (2)); +var G__13069 = init__$2; +i = G__13068; +init__$1 = G__13069; +continue; +} +} else { +return init__$1; +} +break; +} +}); + +/** +* @constructor +*/ +cljs.core.NodeIterator = (function (arr,i,next_entry,next_iter){ +this.arr = arr; +this.i = i; +this.next_entry = next_entry; +this.next_iter = next_iter; +}) +cljs.core.NodeIterator.prototype.advance = (function (){ +var self__ = this; +var this$ = this; +var len = self__.arr.length; +while(true){ +if((self__.i < len)){ +var key = (self__.arr[self__.i]); +var node_or_val = (self__.arr[(self__.i + (1))]); +var found = ((!((key == null)))?self__.next_entry = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key,node_or_val], null):((!((node_or_val == null)))?(function (){var new_iter = cljs.core._iterator(node_or_val); +if(new_iter.hasNext()){ +return self__.next_iter = new_iter; +} else { +return false; +} +})():false +)); +self__.i = (self__.i + (2)); + +if(found){ +return true; +} else { +continue; +} +} else { +return false; +} +break; +} +}); + +cljs.core.NodeIterator.prototype.hasNext = (function (){ +var self__ = this; +var this$ = this; +var or__7960__auto__ = !((self__.next_entry == null)); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = !((self__.next_iter == null)); +if(or__7960__auto____$1){ +return or__7960__auto____$1; +} else { +return this$.advance(); +} +} +}); + +cljs.core.NodeIterator.prototype.next = (function (){ +var self__ = this; +var this$ = this; +if(!((self__.next_entry == null))){ +var ret = self__.next_entry; +self__.next_entry = null; + +return ret; +} else { +if(!((self__.next_iter == null))){ +var ret = self__.next_iter.next(); +if(self__.next_iter.hasNext()){ +} else { +self__.next_iter = null; +} + +return ret; +} else { +if(this$.advance()){ +return this$.next(); +} else { +throw (new Error("No such element")); + +} +} +} +}); + +cljs.core.NodeIterator.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.NodeIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$next_DASH_entry,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$next_DASH_iter,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.NodeIterator.cljs$lang$type = true; + +cljs.core.NodeIterator.cljs$lang$ctorStr = "cljs.core/NodeIterator"; + +cljs.core.NodeIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/NodeIterator"); +}); + +cljs.core.__GT_NodeIterator = (function cljs$core$__GT_NodeIterator(arr,i,next_entry,next_iter){ +return (new cljs.core.NodeIterator(arr,i,next_entry,next_iter)); +}); + + +/** +* @constructor + * @implements {cljs.core.IIterable} +*/ +cljs.core.BitmapIndexedNode = (function (edit,bitmap,arr){ +this.edit = edit; +this.bitmap = bitmap; +this.arr = arr; +}) +cljs.core.BitmapIndexedNode.prototype.ensure_editable = (function (e){ +var self__ = this; +var inode = this; +if((e === self__.edit)){ +return inode; +} else { +var n = cljs.core.bit_count(self__.bitmap); +var new_arr = (new Array((((n < (0)))?(4):((2) * (n + (1)))))); +cljs.core.array_copy(self__.arr,(0),new_arr,(0),((2) * n)); + +return (new cljs.core.BitmapIndexedNode(e,self__.bitmap,new_arr)); +} +}); + +cljs.core.BitmapIndexedNode.prototype.inode_without_BANG_ = (function (edit__$1,shift,hash,key,removed_leaf_QMARK_){ +var self__ = this; +var inode = this; +var bit = (1 << ((hash >>> shift) & 0x01f)); +if(((self__.bitmap & bit) === (0))){ +return inode; +} else { +var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap,bit); +var key_or_nil = (self__.arr[((2) * idx)]); +var val_or_node = (self__.arr[(((2) * idx) + (1))]); +if((key_or_nil == null)){ +var n = val_or_node.inode_without_BANG_(edit__$1,(shift + (5)),hash,key,removed_leaf_QMARK_); +if((n === val_or_node)){ +return inode; +} else { +if(!((n == null))){ +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,(((2) * idx) + (1)),n); +} else { +if((self__.bitmap === bit)){ +return null; +} else { +return inode.edit_and_remove_pair(edit__$1,bit,idx); + +} +} +} +} else { +if(cljs.core.key_test(key,key_or_nil)){ +removed_leaf_QMARK_.val = true; + +return inode.edit_and_remove_pair(edit__$1,bit,idx); +} else { +return inode; + +} +} +} +}); + +cljs.core.BitmapIndexedNode.prototype.edit_and_remove_pair = (function (e,bit,i){ +var self__ = this; +var inode = this; +if((self__.bitmap === bit)){ +return null; +} else { +var editable = inode.ensure_editable(e); +var earr = editable.arr; +var len = earr.length; +editable.bitmap = (bit ^ editable.bitmap); + +cljs.core.array_copy(earr,((2) * (i + (1))),earr,((2) * i),(len - ((2) * (i + (1))))); + +(earr[(len - (2))] = null); + +(earr[(len - (1))] = null); + +return editable; +} +}); + +cljs.core.BitmapIndexedNode.prototype.inode_seq = (function (){ +var self__ = this; +var inode = this; +return (cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1(self__.arr) : cljs.core.create_inode_seq.call(null,self__.arr)); +}); + +cljs.core.BitmapIndexedNode.prototype.kv_reduce = (function (f,init){ +var self__ = this; +var inode = this; +return cljs.core.inode_kv_reduce(self__.arr,f,init); +}); + +cljs.core.BitmapIndexedNode.prototype.inode_lookup = (function (shift,hash,key,not_found){ +var self__ = this; +var inode = this; +var bit = (1 << ((hash >>> shift) & 0x01f)); +if(((self__.bitmap & bit) === (0))){ +return not_found; +} else { +var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap,bit); +var key_or_nil = (self__.arr[((2) * idx)]); +var val_or_node = (self__.arr[(((2) * idx) + (1))]); +if((key_or_nil == null)){ +return val_or_node.inode_lookup((shift + (5)),hash,key,not_found); +} else { +if(cljs.core.key_test(key,key_or_nil)){ +return val_or_node; +} else { +return not_found; + +} +} +} +}); + +cljs.core.BitmapIndexedNode.prototype.inode_assoc_BANG_ = (function (edit__$1,shift,hash,key,val,added_leaf_QMARK_){ +var self__ = this; +var inode = this; +var bit = (1 << ((hash >>> shift) & 0x01f)); +var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap,bit); +if(((self__.bitmap & bit) === (0))){ +var n = cljs.core.bit_count(self__.bitmap); +if((((2) * n) < self__.arr.length)){ +var editable = inode.ensure_editable(edit__$1); +var earr = editable.arr; +added_leaf_QMARK_.val = true; + +cljs.core.array_copy_downward(earr,((2) * idx),earr,((2) * (idx + (1))),((2) * (n - idx))); + +(earr[((2) * idx)] = key); + +(earr[(((2) * idx) + (1))] = val); + +editable.bitmap = (editable.bitmap | bit); + +return editable; +} else { +if((n >= (16))){ +var nodes = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +var jdx = ((hash >>> shift) & 0x01f); +(nodes[jdx] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1,(shift + (5)),hash,key,val,added_leaf_QMARK_)); + +var i_13083 = (0); +var j_13084 = (0); +while(true){ +if((i_13083 < (32))){ +if((((self__.bitmap >>> i_13083) & (1)) === (0))){ +var G__13085 = (i_13083 + (1)); +var G__13086 = j_13084; +i_13083 = G__13085; +j_13084 = G__13086; +continue; +} else { +(nodes[i_13083] = ((!(((self__.arr[j_13084]) == null)))?cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1,(shift + (5)),cljs.core.hash((self__.arr[j_13084])),(self__.arr[j_13084]),(self__.arr[(j_13084 + (1))]),added_leaf_QMARK_):(self__.arr[(j_13084 + (1))]))); + +var G__13087 = (i_13083 + (1)); +var G__13088 = (j_13084 + (2)); +i_13083 = G__13087; +j_13084 = G__13088; +continue; +} +} else { +} +break; +} + +return (new cljs.core.ArrayNode(edit__$1,(n + (1)),nodes)); +} else { +var new_arr = (new Array(((2) * (n + (4))))); +cljs.core.array_copy(self__.arr,(0),new_arr,(0),((2) * idx)); + +(new_arr[((2) * idx)] = key); + +(new_arr[(((2) * idx) + (1))] = val); + +cljs.core.array_copy(self__.arr,((2) * idx),new_arr,((2) * (idx + (1))),((2) * (n - idx))); + +added_leaf_QMARK_.val = true; + +var editable = inode.ensure_editable(edit__$1); +editable.arr = new_arr; + +editable.bitmap = (editable.bitmap | bit); + +return editable; + +} +} +} else { +var key_or_nil = (self__.arr[((2) * idx)]); +var val_or_node = (self__.arr[(((2) * idx) + (1))]); +if((key_or_nil == null)){ +var n = val_or_node.inode_assoc_BANG_(edit__$1,(shift + (5)),hash,key,val,added_leaf_QMARK_); +if((n === val_or_node)){ +return inode; +} else { +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,(((2) * idx) + (1)),n); +} +} else { +if(cljs.core.key_test(key,key_or_nil)){ +if((val === val_or_node)){ +return inode; +} else { +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,(((2) * idx) + (1)),val); +} +} else { +added_leaf_QMARK_.val = true; + +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6(inode,edit__$1,((2) * idx),null,(((2) * idx) + (1)),(function (){var G__13070 = edit__$1; +var G__13071 = (shift + (5)); +var G__13072 = key_or_nil; +var G__13073 = val_or_node; +var G__13074 = hash; +var G__13075 = key; +var G__13076 = val; +return (cljs.core.create_node.cljs$core$IFn$_invoke$arity$7 ? cljs.core.create_node.cljs$core$IFn$_invoke$arity$7(G__13070,G__13071,G__13072,G__13073,G__13074,G__13075,G__13076) : cljs.core.create_node.call(null,G__13070,G__13071,G__13072,G__13073,G__13074,G__13075,G__13076)); +})()); + +} +} +} +}); + +cljs.core.BitmapIndexedNode.prototype.inode_assoc = (function (shift,hash,key,val,added_leaf_QMARK_){ +var self__ = this; +var inode = this; +var bit = (1 << ((hash >>> shift) & 0x01f)); +var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap,bit); +if(((self__.bitmap & bit) === (0))){ +var n = cljs.core.bit_count(self__.bitmap); +if((n >= (16))){ +var nodes = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +var jdx = ((hash >>> shift) & 0x01f); +(nodes[jdx] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc((shift + (5)),hash,key,val,added_leaf_QMARK_)); + +var i_13089 = (0); +var j_13090 = (0); +while(true){ +if((i_13089 < (32))){ +if((((self__.bitmap >>> i_13089) & (1)) === (0))){ +var G__13091 = (i_13089 + (1)); +var G__13092 = j_13090; +i_13089 = G__13091; +j_13090 = G__13092; +continue; +} else { +(nodes[i_13089] = ((!(((self__.arr[j_13090]) == null)))?cljs.core.BitmapIndexedNode.EMPTY.inode_assoc((shift + (5)),cljs.core.hash((self__.arr[j_13090])),(self__.arr[j_13090]),(self__.arr[(j_13090 + (1))]),added_leaf_QMARK_):(self__.arr[(j_13090 + (1))]))); + +var G__13093 = (i_13089 + (1)); +var G__13094 = (j_13090 + (2)); +i_13089 = G__13093; +j_13090 = G__13094; +continue; +} +} else { +} +break; +} + +return (new cljs.core.ArrayNode(null,(n + (1)),nodes)); +} else { +var new_arr = (new Array(((2) * (n + (1))))); +cljs.core.array_copy(self__.arr,(0),new_arr,(0),((2) * idx)); + +(new_arr[((2) * idx)] = key); + +(new_arr[(((2) * idx) + (1))] = val); + +cljs.core.array_copy(self__.arr,((2) * idx),new_arr,((2) * (idx + (1))),((2) * (n - idx))); + +added_leaf_QMARK_.val = true; + +return (new cljs.core.BitmapIndexedNode(null,(self__.bitmap | bit),new_arr)); +} +} else { +var key_or_nil = (self__.arr[((2) * idx)]); +var val_or_node = (self__.arr[(((2) * idx) + (1))]); +if((key_or_nil == null)){ +var n = val_or_node.inode_assoc((shift + (5)),hash,key,val,added_leaf_QMARK_); +if((n === val_or_node)){ +return inode; +} else { +return (new cljs.core.BitmapIndexedNode(null,self__.bitmap,cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,(((2) * idx) + (1)),n))); +} +} else { +if(cljs.core.key_test(key,key_or_nil)){ +if((val === val_or_node)){ +return inode; +} else { +return (new cljs.core.BitmapIndexedNode(null,self__.bitmap,cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,(((2) * idx) + (1)),val))); +} +} else { +added_leaf_QMARK_.val = true; + +return (new cljs.core.BitmapIndexedNode(null,self__.bitmap,cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$5(self__.arr,((2) * idx),null,(((2) * idx) + (1)),(function (){var G__13077 = (shift + (5)); +var G__13078 = key_or_nil; +var G__13079 = val_or_node; +var G__13080 = hash; +var G__13081 = key; +var G__13082 = val; +return (cljs.core.create_node.cljs$core$IFn$_invoke$arity$6 ? cljs.core.create_node.cljs$core$IFn$_invoke$arity$6(G__13077,G__13078,G__13079,G__13080,G__13081,G__13082) : cljs.core.create_node.call(null,G__13077,G__13078,G__13079,G__13080,G__13081,G__13082)); +})()))); + +} +} +} +}); + +cljs.core.BitmapIndexedNode.prototype.inode_find = (function (shift,hash,key,not_found){ +var self__ = this; +var inode = this; +var bit = (1 << ((hash >>> shift) & 0x01f)); +if(((self__.bitmap & bit) === (0))){ +return not_found; +} else { +var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap,bit); +var key_or_nil = (self__.arr[((2) * idx)]); +var val_or_node = (self__.arr[(((2) * idx) + (1))]); +if((key_or_nil == null)){ +return val_or_node.inode_find((shift + (5)),hash,key,not_found); +} else { +if(cljs.core.key_test(key,key_or_nil)){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [key_or_nil,val_or_node], null); +} else { +return not_found; + +} +} +} +}); + +cljs.core.BitmapIndexedNode.prototype.inode_without = (function (shift,hash,key){ +var self__ = this; +var inode = this; +var bit = (1 << ((hash >>> shift) & 0x01f)); +if(((self__.bitmap & bit) === (0))){ +return inode; +} else { +var idx = cljs.core.bitmap_indexed_node_index(self__.bitmap,bit); +var key_or_nil = (self__.arr[((2) * idx)]); +var val_or_node = (self__.arr[(((2) * idx) + (1))]); +if((key_or_nil == null)){ +var n = val_or_node.inode_without((shift + (5)),hash,key); +if((n === val_or_node)){ +return inode; +} else { +if(!((n == null))){ +return (new cljs.core.BitmapIndexedNode(null,self__.bitmap,cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,(((2) * idx) + (1)),n))); +} else { +if((self__.bitmap === bit)){ +return null; +} else { +return (new cljs.core.BitmapIndexedNode(null,(self__.bitmap ^ bit),cljs.core.remove_pair(self__.arr,idx))); + +} +} +} +} else { +if(cljs.core.key_test(key,key_or_nil)){ +return (new cljs.core.BitmapIndexedNode(null,(self__.bitmap ^ bit),cljs.core.remove_pair(self__.arr,idx))); +} else { +return inode; + +} +} +} +}); + +cljs.core.BitmapIndexedNode.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.BitmapIndexedNode.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.NodeIterator(self__.arr,(0),null,null)); +}); + +cljs.core.BitmapIndexedNode.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$edit,cljs.core.with_meta(cljs.core.cst$sym$bitmap,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$arr,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.BitmapIndexedNode.cljs$lang$type = true; + +cljs.core.BitmapIndexedNode.cljs$lang$ctorStr = "cljs.core/BitmapIndexedNode"; + +cljs.core.BitmapIndexedNode.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/BitmapIndexedNode"); +}); + +cljs.core.__GT_BitmapIndexedNode = (function cljs$core$__GT_BitmapIndexedNode(edit,bitmap,arr){ +return (new cljs.core.BitmapIndexedNode(edit,bitmap,arr)); +}); + +cljs.core.BitmapIndexedNode.EMPTY = (new cljs.core.BitmapIndexedNode(null,(0),[])); +cljs.core.pack_array_node = (function cljs$core$pack_array_node(array_node,edit,idx){ +var arr = array_node.arr; +var len = arr.length; +var new_arr = (new Array(((2) * (array_node.cnt - (1))))); +var i = (0); +var j = (1); +var bitmap = (0); +while(true){ +if((i < len)){ +if((!((i === idx))) && (!(((arr[i]) == null)))){ +(new_arr[j] = (arr[i])); + +var G__13095 = (i + (1)); +var G__13096 = (j + (2)); +var G__13097 = (bitmap | ((1) << i)); +i = G__13095; +j = G__13096; +bitmap = G__13097; +continue; +} else { +var G__13098 = (i + (1)); +var G__13099 = j; +var G__13100 = bitmap; +i = G__13098; +j = G__13099; +bitmap = G__13100; +continue; +} +} else { +return (new cljs.core.BitmapIndexedNode(edit,bitmap,new_arr)); +} +break; +} +}); + +/** +* @constructor +*/ +cljs.core.ArrayNodeIterator = (function (arr,i,next_iter){ +this.arr = arr; +this.i = i; +this.next_iter = next_iter; +}) +cljs.core.ArrayNodeIterator.prototype.hasNext = (function (){ +var self__ = this; +var this$ = this; +var len = self__.arr.length; +while(true){ +if(!((!((self__.next_iter == null))) && (self__.next_iter.hasNext()))){ +if((self__.i < len)){ +var node = (self__.arr[self__.i]); +self__.i = (self__.i + (1)); + +if(!((node == null))){ +self__.next_iter = cljs.core._iterator(node); +} else { +} + +continue; +} else { +return false; +} +} else { +return true; +} +break; +} +}); + +cljs.core.ArrayNodeIterator.prototype.next = (function (){ +var self__ = this; +var this$ = this; +if(this$.hasNext()){ +return self__.next_iter.next(); +} else { +throw (new Error("No such element")); +} +}); + +cljs.core.ArrayNodeIterator.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.ArrayNodeIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$arr,cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$next_DASH_iter,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ArrayNodeIterator.cljs$lang$type = true; + +cljs.core.ArrayNodeIterator.cljs$lang$ctorStr = "cljs.core/ArrayNodeIterator"; + +cljs.core.ArrayNodeIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ArrayNodeIterator"); +}); + +cljs.core.__GT_ArrayNodeIterator = (function cljs$core$__GT_ArrayNodeIterator(arr,i,next_iter){ +return (new cljs.core.ArrayNodeIterator(arr,i,next_iter)); +}); + + +/** +* @constructor + * @implements {cljs.core.IIterable} +*/ +cljs.core.ArrayNode = (function (edit,cnt,arr){ +this.edit = edit; +this.cnt = cnt; +this.arr = arr; +}) +cljs.core.ArrayNode.prototype.ensure_editable = (function (e){ +var self__ = this; +var inode = this; +if((e === self__.edit)){ +return inode; +} else { +return (new cljs.core.ArrayNode(e,self__.cnt,cljs.core.aclone(self__.arr))); +} +}); + +cljs.core.ArrayNode.prototype.inode_without_BANG_ = (function (edit__$1,shift,hash,key,removed_leaf_QMARK_){ +var self__ = this; +var inode = this; +var idx = ((hash >>> shift) & 0x01f); +var node = (self__.arr[idx]); +if((node == null)){ +return inode; +} else { +var n = node.inode_without_BANG_(edit__$1,(shift + (5)),hash,key,removed_leaf_QMARK_); +if((n === node)){ +return inode; +} else { +if((n == null)){ +if((self__.cnt <= (8))){ +return cljs.core.pack_array_node(inode,edit__$1,idx); +} else { +var editable = cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,idx,n); +editable.cnt = (editable.cnt - (1)); + +return editable; +} +} else { +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,idx,n); + +} +} +} +}); + +cljs.core.ArrayNode.prototype.inode_seq = (function (){ +var self__ = this; +var inode = this; +return (cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1(self__.arr) : cljs.core.create_array_node_seq.call(null,self__.arr)); +}); + +cljs.core.ArrayNode.prototype.kv_reduce = (function (f,init){ +var self__ = this; +var inode = this; +var len = self__.arr.length; +var i = (0); +var init__$1 = init; +while(true){ +if((i < len)){ +var node = (self__.arr[i]); +if(!((node == null))){ +var init__$2 = node.kv_reduce(f,init__$1); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var G__13101 = (i + (1)); +var G__13102 = init__$2; +i = G__13101; +init__$1 = G__13102; +continue; +} +} else { +var G__13103 = (i + (1)); +var G__13104 = init__$1; +i = G__13103; +init__$1 = G__13104; +continue; +} +} else { +return init__$1; +} +break; +} +}); + +cljs.core.ArrayNode.prototype.inode_lookup = (function (shift,hash,key,not_found){ +var self__ = this; +var inode = this; +var idx = ((hash >>> shift) & 0x01f); +var node = (self__.arr[idx]); +if(!((node == null))){ +return node.inode_lookup((shift + (5)),hash,key,not_found); +} else { +return not_found; +} +}); + +cljs.core.ArrayNode.prototype.inode_assoc_BANG_ = (function (edit__$1,shift,hash,key,val,added_leaf_QMARK_){ +var self__ = this; +var inode = this; +var idx = ((hash >>> shift) & 0x01f); +var node = (self__.arr[idx]); +if((node == null)){ +var editable = cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,idx,cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit__$1,(shift + (5)),hash,key,val,added_leaf_QMARK_)); +editable.cnt = (editable.cnt + (1)); + +return editable; +} else { +var n = node.inode_assoc_BANG_(edit__$1,(shift + (5)),hash,key,val,added_leaf_QMARK_); +if((n === node)){ +return inode; +} else { +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,idx,n); +} +} +}); + +cljs.core.ArrayNode.prototype.inode_assoc = (function (shift,hash,key,val,added_leaf_QMARK_){ +var self__ = this; +var inode = this; +var idx = ((hash >>> shift) & 0x01f); +var node = (self__.arr[idx]); +if((node == null)){ +return (new cljs.core.ArrayNode(null,(self__.cnt + (1)),cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,idx,cljs.core.BitmapIndexedNode.EMPTY.inode_assoc((shift + (5)),hash,key,val,added_leaf_QMARK_)))); +} else { +var n = node.inode_assoc((shift + (5)),hash,key,val,added_leaf_QMARK_); +if((n === node)){ +return inode; +} else { +return (new cljs.core.ArrayNode(null,self__.cnt,cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,idx,n))); +} +} +}); + +cljs.core.ArrayNode.prototype.inode_find = (function (shift,hash,key,not_found){ +var self__ = this; +var inode = this; +var idx = ((hash >>> shift) & 0x01f); +var node = (self__.arr[idx]); +if(!((node == null))){ +return node.inode_find((shift + (5)),hash,key,not_found); +} else { +return not_found; +} +}); + +cljs.core.ArrayNode.prototype.inode_without = (function (shift,hash,key){ +var self__ = this; +var inode = this; +var idx = ((hash >>> shift) & 0x01f); +var node = (self__.arr[idx]); +if(!((node == null))){ +var n = node.inode_without((shift + (5)),hash,key); +if((n === node)){ +return inode; +} else { +if((n == null)){ +if((self__.cnt <= (8))){ +return cljs.core.pack_array_node(inode,null,idx); +} else { +return (new cljs.core.ArrayNode(null,(self__.cnt - (1)),cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,idx,n))); +} +} else { +return (new cljs.core.ArrayNode(null,self__.cnt,cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,idx,n))); + +} +} +} else { +return inode; +} +}); + +cljs.core.ArrayNode.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ArrayNode.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.ArrayNodeIterator(self__.arr,(0),null)); +}); + +cljs.core.ArrayNode.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$edit,cljs.core.with_meta(cljs.core.cst$sym$cnt,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$arr,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ArrayNode.cljs$lang$type = true; + +cljs.core.ArrayNode.cljs$lang$ctorStr = "cljs.core/ArrayNode"; + +cljs.core.ArrayNode.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ArrayNode"); +}); + +cljs.core.__GT_ArrayNode = (function cljs$core$__GT_ArrayNode(edit,cnt,arr){ +return (new cljs.core.ArrayNode(edit,cnt,arr)); +}); + +cljs.core.hash_collision_node_find_index = (function cljs$core$hash_collision_node_find_index(arr,cnt,key){ +var lim = ((2) * cnt); +var i = (0); +while(true){ +if((i < lim)){ +if(cljs.core.key_test(key,(arr[i]))){ +return i; +} else { +var G__13105 = (i + (2)); +i = G__13105; +continue; +} +} else { +return (-1); +} +break; +} +}); + +/** +* @constructor + * @implements {cljs.core.IIterable} +*/ +cljs.core.HashCollisionNode = (function (edit,collision_hash,cnt,arr){ +this.edit = edit; +this.collision_hash = collision_hash; +this.cnt = cnt; +this.arr = arr; +}) +cljs.core.HashCollisionNode.prototype.ensure_editable = (function (e){ +var self__ = this; +var inode = this; +if((e === self__.edit)){ +return inode; +} else { +var new_arr = (new Array(((2) * (self__.cnt + (1))))); +cljs.core.array_copy(self__.arr,(0),new_arr,(0),((2) * self__.cnt)); + +return (new cljs.core.HashCollisionNode(e,self__.collision_hash,self__.cnt,new_arr)); +} +}); + +cljs.core.HashCollisionNode.prototype.inode_without_BANG_ = (function (edit__$1,shift,hash,key,removed_leaf_QMARK_){ +var self__ = this; +var inode = this; +var idx = cljs.core.hash_collision_node_find_index(self__.arr,self__.cnt,key); +if((idx === (-1))){ +return inode; +} else { +removed_leaf_QMARK_.val = true; + +if((self__.cnt === (1))){ +return null; +} else { +var editable = inode.ensure_editable(edit__$1); +var earr = editable.arr; +(earr[idx] = (earr[(((2) * self__.cnt) - (2))])); + +(earr[(idx + (1))] = (earr[(((2) * self__.cnt) - (1))])); + +(earr[(((2) * self__.cnt) - (1))] = null); + +(earr[(((2) * self__.cnt) - (2))] = null); + +editable.cnt = (editable.cnt - (1)); + +return editable; +} +} +}); + +cljs.core.HashCollisionNode.prototype.inode_seq = (function (){ +var self__ = this; +var inode = this; +return (cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1(self__.arr) : cljs.core.create_inode_seq.call(null,self__.arr)); +}); + +cljs.core.HashCollisionNode.prototype.kv_reduce = (function (f,init){ +var self__ = this; +var inode = this; +return cljs.core.inode_kv_reduce(self__.arr,f,init); +}); + +cljs.core.HashCollisionNode.prototype.inode_lookup = (function (shift,hash,key,not_found){ +var self__ = this; +var inode = this; +var idx = cljs.core.hash_collision_node_find_index(self__.arr,self__.cnt,key); +if((idx < (0))){ +return not_found; +} else { +if(cljs.core.key_test(key,(self__.arr[idx]))){ +return (self__.arr[(idx + (1))]); +} else { +return not_found; + +} +} +}); + +cljs.core.HashCollisionNode.prototype.inode_assoc_BANG_ = (function (edit__$1,shift,hash,key,val,added_leaf_QMARK_){ +var self__ = this; +var inode = this; +if((hash === self__.collision_hash)){ +var idx = cljs.core.hash_collision_node_find_index(self__.arr,self__.cnt,key); +if((idx === (-1))){ +if((self__.arr.length > ((2) * self__.cnt))){ +var editable = cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$6(inode,edit__$1,((2) * self__.cnt),key,(((2) * self__.cnt) + (1)),val); +added_leaf_QMARK_.val = true; + +editable.cnt = (editable.cnt + (1)); + +return editable; +} else { +var len = self__.arr.length; +var new_arr = (new Array((len + (2)))); +cljs.core.array_copy(self__.arr,(0),new_arr,(0),len); + +(new_arr[len] = key); + +(new_arr[(len + (1))] = val); + +added_leaf_QMARK_.val = true; + +return inode.ensure_editable_array(edit__$1,(self__.cnt + (1)),new_arr); +} +} else { +if(((self__.arr[(idx + (1))]) === val)){ +return inode; +} else { +return cljs.core.edit_and_set.cljs$core$IFn$_invoke$arity$4(inode,edit__$1,(idx + (1)),val); +} +} +} else { +return (new cljs.core.BitmapIndexedNode(edit__$1,(1 << ((self__.collision_hash >>> shift) & 0x01f)),[null,inode,null,null])).inode_assoc_BANG_(edit__$1,shift,hash,key,val,added_leaf_QMARK_); +} +}); + +cljs.core.HashCollisionNode.prototype.inode_assoc = (function (shift,hash,key,val,added_leaf_QMARK_){ +var self__ = this; +var inode = this; +if((hash === self__.collision_hash)){ +var idx = cljs.core.hash_collision_node_find_index(self__.arr,self__.cnt,key); +if((idx === (-1))){ +var len = ((2) * self__.cnt); +var new_arr = (new Array((len + (2)))); +cljs.core.array_copy(self__.arr,(0),new_arr,(0),len); + +(new_arr[len] = key); + +(new_arr[(len + (1))] = val); + +added_leaf_QMARK_.val = true; + +return (new cljs.core.HashCollisionNode(null,self__.collision_hash,(self__.cnt + (1)),new_arr)); +} else { +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((self__.arr[(idx + (1))]),val)){ +return inode; +} else { +return (new cljs.core.HashCollisionNode(null,self__.collision_hash,self__.cnt,cljs.core.clone_and_set.cljs$core$IFn$_invoke$arity$3(self__.arr,(idx + (1)),val))); +} +} +} else { +return (new cljs.core.BitmapIndexedNode(null,(1 << ((self__.collision_hash >>> shift) & 0x01f)),[null,inode])).inode_assoc(shift,hash,key,val,added_leaf_QMARK_); +} +}); + +cljs.core.HashCollisionNode.prototype.ensure_editable_array = (function (e,count,array){ +var self__ = this; +var inode = this; +if((e === self__.edit)){ +self__.arr = array; + +self__.cnt = count; + +return inode; +} else { +return (new cljs.core.HashCollisionNode(self__.edit,self__.collision_hash,count,array)); +} +}); + +cljs.core.HashCollisionNode.prototype.inode_find = (function (shift,hash,key,not_found){ +var self__ = this; +var inode = this; +var idx = cljs.core.hash_collision_node_find_index(self__.arr,self__.cnt,key); +if((idx < (0))){ +return not_found; +} else { +if(cljs.core.key_test(key,(self__.arr[idx]))){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(self__.arr[idx]),(self__.arr[(idx + (1))])], null); +} else { +return not_found; + +} +} +}); + +cljs.core.HashCollisionNode.prototype.inode_without = (function (shift,hash,key){ +var self__ = this; +var inode = this; +var idx = cljs.core.hash_collision_node_find_index(self__.arr,self__.cnt,key); +if((idx === (-1))){ +return inode; +} else { +if((self__.cnt === (1))){ +return null; +} else { +return (new cljs.core.HashCollisionNode(null,self__.collision_hash,(self__.cnt - (1)),cljs.core.remove_pair(self__.arr,cljs.core.quot(idx,(2))))); + +} +} +}); + +cljs.core.HashCollisionNode.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.HashCollisionNode.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.NodeIterator(self__.arr,(0),null,null)); +}); + +cljs.core.HashCollisionNode.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$edit,cljs.core.with_meta(cljs.core.cst$sym$collision_DASH_hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$cnt,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$arr,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.HashCollisionNode.cljs$lang$type = true; + +cljs.core.HashCollisionNode.cljs$lang$ctorStr = "cljs.core/HashCollisionNode"; + +cljs.core.HashCollisionNode.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/HashCollisionNode"); +}); + +cljs.core.__GT_HashCollisionNode = (function cljs$core$__GT_HashCollisionNode(edit,collision_hash,cnt,arr){ +return (new cljs.core.HashCollisionNode(edit,collision_hash,cnt,arr)); +}); + +cljs.core.create_node = (function cljs$core$create_node(var_args){ +var args13106 = []; +var len__9181__auto___13109 = arguments.length; +var i__9182__auto___13110 = (0); +while(true){ +if((i__9182__auto___13110 < len__9181__auto___13109)){ +args13106.push((arguments[i__9182__auto___13110])); + +var G__13111 = (i__9182__auto___13110 + (1)); +i__9182__auto___13110 = G__13111; +continue; +} else { +} +break; +} + +var G__13108 = args13106.length; +switch (G__13108) { +case 6: +return cljs.core.create_node.cljs$core$IFn$_invoke$arity$6((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)])); + +break; +case 7: +return cljs.core.create_node.cljs$core$IFn$_invoke$arity$7((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)]),(arguments[(6)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13106.length)].join(''))); + +} +}); + +cljs.core.create_node.cljs$core$IFn$_invoke$arity$6 = (function (shift,key1,val1,key2hash,key2,val2){ +var key1hash = cljs.core.hash(key1); +if((key1hash === key2hash)){ +return (new cljs.core.HashCollisionNode(null,key1hash,(2),[key1,val1,key2,val2])); +} else { +var added_leaf_QMARK_ = (new cljs.core.Box(false)); +return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(shift,key1hash,key1,val1,added_leaf_QMARK_).inode_assoc(shift,key2hash,key2,val2,added_leaf_QMARK_); +} +}); + +cljs.core.create_node.cljs$core$IFn$_invoke$arity$7 = (function (edit,shift,key1,val1,key2hash,key2,val2){ +var key1hash = cljs.core.hash(key1); +if((key1hash === key2hash)){ +return (new cljs.core.HashCollisionNode(null,key1hash,(2),[key1,val1,key2,val2])); +} else { +var added_leaf_QMARK_ = (new cljs.core.Box(false)); +return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(edit,shift,key1hash,key1,val1,added_leaf_QMARK_).inode_assoc_BANG_(edit,shift,key2hash,key2,val2,added_leaf_QMARK_); +} +}); + +cljs.core.create_node.cljs$lang$maxFixedArity = 7; + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.NodeSeq = (function (meta,nodes,i,s,__hash){ +this.meta = meta; +this.nodes = nodes; +this.i = i; +this.s = s; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32374860; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.NodeSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.NodeSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.NodeSeq.prototype.indexOf = (function() { +var G__13119 = null; +var G__13119__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13119__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13119 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13119__1.call(this,x); +case 2: +return G__13119__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13119.cljs$core$IFn$_invoke$arity$1 = G__13119__1; +G__13119.cljs$core$IFn$_invoke$arity$2 = G__13119__2; +return G__13119; +})() +; + +cljs.core.NodeSeq.prototype.lastIndexOf = (function() { +var G__13120 = null; +var G__13120__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13120__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13120 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13120__1.call(this,x); +case 2: +return G__13120__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13120.cljs$core$IFn$_invoke$arity$1 = G__13120__1; +G__13120.cljs$core$IFn$_invoke$arity$2 = G__13120__2; +return G__13120; +})() +; + +cljs.core.NodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.NodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.NodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.NodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.NodeSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.NodeSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.NodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.s == null)){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(self__.nodes[self__.i]),(self__.nodes[(self__.i + (1))])], null); +} else { +return cljs.core.first(self__.s); +} +}); + +cljs.core.NodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var ret = (((self__.s == null))?(function (){var G__13113 = self__.nodes; +var G__13114 = (self__.i + (2)); +var G__13115 = null; +return (cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3(G__13113,G__13114,G__13115) : cljs.core.create_inode_seq.call(null,G__13113,G__13114,G__13115)); +})():(function (){var G__13116 = self__.nodes; +var G__13117 = self__.i; +var G__13118 = cljs.core.next(self__.s); +return (cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3 ? cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3(G__13116,G__13117,G__13118) : cljs.core.create_inode_seq.call(null,G__13116,G__13117,G__13118)); +})()); +if(!((ret == null))){ +return ret; +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.NodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return this$__$1; +}); + +cljs.core.NodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.NodeSeq(meta__$1,self__.nodes,self__.i,self__.s,self__.__hash)); +}); + +cljs.core.NodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.NodeSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$nodes,cljs.core.cst$sym$i,cljs.core.cst$sym$s,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.NodeSeq.cljs$lang$type = true; + +cljs.core.NodeSeq.cljs$lang$ctorStr = "cljs.core/NodeSeq"; + +cljs.core.NodeSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/NodeSeq"); +}); + +cljs.core.__GT_NodeSeq = (function cljs$core$__GT_NodeSeq(meta,nodes,i,s,__hash){ +return (new cljs.core.NodeSeq(meta,nodes,i,s,__hash)); +}); + +(cljs.core.NodeSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.create_inode_seq = (function cljs$core$create_inode_seq(var_args){ +var args13121 = []; +var len__9181__auto___13124 = arguments.length; +var i__9182__auto___13125 = (0); +while(true){ +if((i__9182__auto___13125 < len__9181__auto___13124)){ +args13121.push((arguments[i__9182__auto___13125])); + +var G__13126 = (i__9182__auto___13125 + (1)); +i__9182__auto___13125 = G__13126; +continue; +} else { +} +break; +} + +var G__13123 = args13121.length; +switch (G__13123) { +case 1: +return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 3: +return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13121.length)].join(''))); + +} +}); + +cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$1 = (function (nodes){ +return cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3(nodes,(0),null); +}); + +cljs.core.create_inode_seq.cljs$core$IFn$_invoke$arity$3 = (function (nodes,i,s){ +if((s == null)){ +var len = nodes.length; +var j = i; +while(true){ +if((j < len)){ +if(!(((nodes[j]) == null))){ +return (new cljs.core.NodeSeq(null,nodes,j,null,null)); +} else { +var temp__5276__auto__ = (nodes[(j + (1))]); +if(cljs.core.truth_(temp__5276__auto__)){ +var node = temp__5276__auto__; +var temp__5276__auto____$1 = node.inode_seq(); +if(cljs.core.truth_(temp__5276__auto____$1)){ +var node_seq = temp__5276__auto____$1; +return (new cljs.core.NodeSeq(null,nodes,(j + (2)),node_seq,null)); +} else { +var G__13128 = (j + (2)); +j = G__13128; +continue; +} +} else { +var G__13129 = (j + (2)); +j = G__13129; +continue; +} +} +} else { +return null; +} +break; +} +} else { +return (new cljs.core.NodeSeq(null,nodes,i,s,null)); +} +}); + +cljs.core.create_inode_seq.cljs$lang$maxFixedArity = 3; + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.ArrayNodeSeq = (function (meta,nodes,i,s,__hash){ +this.meta = meta; +this.nodes = nodes; +this.i = i; +this.s = s; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32374860; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.ArrayNodeSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.ArrayNodeSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.ArrayNodeSeq.prototype.indexOf = (function() { +var G__13134 = null; +var G__13134__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13134__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13134 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13134__1.call(this,x); +case 2: +return G__13134__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13134.cljs$core$IFn$_invoke$arity$1 = G__13134__1; +G__13134.cljs$core$IFn$_invoke$arity$2 = G__13134__2; +return G__13134; +})() +; + +cljs.core.ArrayNodeSeq.prototype.lastIndexOf = (function() { +var G__13135 = null; +var G__13135__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13135__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13135 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13135__1.call(this,x); +case 2: +return G__13135__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13135.cljs$core$IFn$_invoke$arity$1 = G__13135__1; +G__13135.cljs$core$IFn$_invoke$arity$2 = G__13135__2; +return G__13135; +})() +; + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.first(self__.s); +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var ret = (function (){var G__13130 = null; +var G__13131 = self__.nodes; +var G__13132 = self__.i; +var G__13133 = cljs.core.next(self__.s); +return (cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4 ? cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4(G__13130,G__13131,G__13132,G__13133) : cljs.core.create_array_node_seq.call(null,G__13130,G__13131,G__13132,G__13133)); +})(); +if(!((ret == null))){ +return ret; +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return this$__$1; +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.ArrayNodeSeq(meta__$1,self__.nodes,self__.i,self__.s,self__.__hash)); +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.ArrayNodeSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$nodes,cljs.core.cst$sym$i,cljs.core.cst$sym$s,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ArrayNodeSeq.cljs$lang$type = true; + +cljs.core.ArrayNodeSeq.cljs$lang$ctorStr = "cljs.core/ArrayNodeSeq"; + +cljs.core.ArrayNodeSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ArrayNodeSeq"); +}); + +cljs.core.__GT_ArrayNodeSeq = (function cljs$core$__GT_ArrayNodeSeq(meta,nodes,i,s,__hash){ +return (new cljs.core.ArrayNodeSeq(meta,nodes,i,s,__hash)); +}); + +(cljs.core.ArrayNodeSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.create_array_node_seq = (function cljs$core$create_array_node_seq(var_args){ +var args13136 = []; +var len__9181__auto___13139 = arguments.length; +var i__9182__auto___13140 = (0); +while(true){ +if((i__9182__auto___13140 < len__9181__auto___13139)){ +args13136.push((arguments[i__9182__auto___13140])); + +var G__13141 = (i__9182__auto___13140 + (1)); +i__9182__auto___13140 = G__13141; +continue; +} else { +} +break; +} + +var G__13138 = args13136.length; +switch (G__13138) { +case 1: +return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 4: +return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13136.length)].join(''))); + +} +}); + +cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$1 = (function (nodes){ +return cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4(null,nodes,(0),null); +}); + +cljs.core.create_array_node_seq.cljs$core$IFn$_invoke$arity$4 = (function (meta,nodes,i,s){ +if((s == null)){ +var len = nodes.length; +var j = i; +while(true){ +if((j < len)){ +var temp__5276__auto__ = (nodes[j]); +if(cljs.core.truth_(temp__5276__auto__)){ +var nj = temp__5276__auto__; +var temp__5276__auto____$1 = nj.inode_seq(); +if(cljs.core.truth_(temp__5276__auto____$1)){ +var ns = temp__5276__auto____$1; +return (new cljs.core.ArrayNodeSeq(meta,nodes,(j + (1)),ns,null)); +} else { +var G__13143 = (j + (1)); +j = G__13143; +continue; +} +} else { +var G__13144 = (j + (1)); +j = G__13144; +continue; +} +} else { +return null; +} +break; +} +} else { +return (new cljs.core.ArrayNodeSeq(meta,nodes,i,s,null)); +} +}); + +cljs.core.create_array_node_seq.cljs$lang$maxFixedArity = 4; + + +/** +* @constructor +*/ +cljs.core.HashMapIter = (function (nil_val,root_iter,seen){ +this.nil_val = nil_val; +this.root_iter = root_iter; +this.seen = seen; +}) +cljs.core.HashMapIter.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +return (!(self__.seen)) || (self__.root_iter.hasNext()); +}); + +cljs.core.HashMapIter.prototype.next = (function (){ +var self__ = this; +var _ = this; +if(!(self__.seen)){ +self__.seen = true; + +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,self__.nil_val], null); +} else { +return self__.root_iter.next(); +} +}); + +cljs.core.HashMapIter.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.HashMapIter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$nil_DASH_val,cljs.core.cst$sym$root_DASH_iter,cljs.core.with_meta(cljs.core.cst$sym$seen,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.HashMapIter.cljs$lang$type = true; + +cljs.core.HashMapIter.cljs$lang$ctorStr = "cljs.core/HashMapIter"; + +cljs.core.HashMapIter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/HashMapIter"); +}); + +cljs.core.__GT_HashMapIter = (function cljs$core$__GT_HashMapIter(nil_val,root_iter,seen){ +return (new cljs.core.HashMapIter(nil_val,root_iter,seen)); +}); + + +/** +* @constructor + * @implements {cljs.core.IKVReduce} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEditableCollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.IMap} + * @implements {cljs.core.ILookup} +*/ +cljs.core.PersistentHashMap = (function (meta,cnt,root,has_nil_QMARK_,nil_val,__hash){ +this.meta = meta; +this.cnt = cnt; +this.root = root; +this.has_nil_QMARK_ = has_nil_QMARK_; +this.nil_val = nil_val; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 16123663; +this.cljs$lang$protocol_mask$partition1$ = 8196; +}) +cljs.core.PersistentHashMap.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentHashMap.prototype.cljs$core$IFind$_find$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +if(self__.has_nil_QMARK_){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,self__.nil_val], null); +} else { +return self__.root.inode_find((0),cljs.core.hash(k),k,null); +} +}); + +cljs.core.PersistentHashMap.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentHashMap.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentHashMap.prototype.keys = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator((cljs.core.keys.cljs$core$IFn$_invoke$arity$1 ? cljs.core.keys.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.keys.call(null,coll))); +}); + +cljs.core.PersistentHashMap.prototype.entries = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_entries_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentHashMap.prototype.values = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator((cljs.core.vals.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vals.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.vals.call(null,coll))); +}); + +cljs.core.PersistentHashMap.prototype.has = (function (k){ +var self__ = this; +var coll = this; +return cljs.core.contains_QMARK_(coll,k); +}); + +cljs.core.PersistentHashMap.prototype.get = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentHashMap.prototype.forEach = (function (f){ +var self__ = this; +var coll = this; +var seq__13146 = cljs.core.seq(coll); +var chunk__13147 = null; +var count__13148 = (0); +var i__13149 = (0); +while(true){ +if((i__13149 < count__13148)){ +var vec__13150 = chunk__13147.cljs$core$IIndexed$_nth$arity$2(null,i__13149); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13150,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13150,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13158 = seq__13146; +var G__13159 = chunk__13147; +var G__13160 = count__13148; +var G__13161 = (i__13149 + (1)); +seq__13146 = G__13158; +chunk__13147 = G__13159; +count__13148 = G__13160; +i__13149 = G__13161; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__13146); +if(temp__5278__auto__){ +var seq__13146__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__13146__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__13146__$1); +var G__13162 = cljs.core.chunk_rest(seq__13146__$1); +var G__13163 = c__8871__auto__; +var G__13164 = cljs.core.count(c__8871__auto__); +var G__13165 = (0); +seq__13146 = G__13162; +chunk__13147 = G__13163; +count__13148 = G__13164; +i__13149 = G__13165; +continue; +} else { +var vec__13153 = cljs.core.first(seq__13146__$1); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13153,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13153,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13166 = cljs.core.next(seq__13146__$1); +var G__13167 = null; +var G__13168 = (0); +var G__13169 = (0); +seq__13146 = G__13166; +chunk__13147 = G__13167; +count__13148 = G__13168; +i__13149 = G__13169; +continue; +} +} else { +return null; +} +} +break; +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,k,not_found){ +var self__ = this; +var coll__$1 = this; +if((k == null)){ +if(self__.has_nil_QMARK_){ +return self__.nil_val; +} else { +return not_found; +} +} else { +if((self__.root == null)){ +return not_found; +} else { +return self__.root.inode_lookup((0),cljs.core.hash(k),k,not_found); + +} +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (coll,f,init){ +var self__ = this; +var coll__$1 = this; +var init__$1 = ((self__.has_nil_QMARK_)?(f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(init,null,self__.nil_val) : f.call(null,init,null,self__.nil_val)):init); +if(cljs.core.reduced_QMARK_(init__$1)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$1) : cljs.core.deref.call(null,init__$1)); +} else { +if(!((self__.root == null))){ +return self__.root.kv_reduce(f,init__$1); +} else { +return init__$1; + +} +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentHashMap.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var root_iter = ((self__.root)?cljs.core._iterator(self__.root):cljs.core.nil_iter()); +if(self__.has_nil_QMARK_){ +return (new cljs.core.HashMapIter(self__.nil_val,root_iter,false)); +} else { +return root_iter; +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.PersistentHashMap(self__.meta,self__.cnt,self__.root,self__.has_nil_QMARK_,self__.nil_val,self__.__hash)); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.cnt; +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_unordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_map(coll__$1,other); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.TransientHashMap({},self__.root,self__.cnt,self__.has_nil_QMARK_,self__.nil_val)); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.PersistentHashMap.EMPTY,self__.meta); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +if((k == null)){ +if(self__.has_nil_QMARK_){ +return (new cljs.core.PersistentHashMap(self__.meta,(self__.cnt - (1)),self__.root,false,null,null)); +} else { +return coll__$1; +} +} else { +if((self__.root == null)){ +return coll__$1; +} else { +var new_root = self__.root.inode_without((0),cljs.core.hash(k),k); +if((new_root === self__.root)){ +return coll__$1; +} else { +return (new cljs.core.PersistentHashMap(self__.meta,(self__.cnt - (1)),new_root,self__.has_nil_QMARK_,self__.nil_val,null)); +} + +} +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (coll,k,v){ +var self__ = this; +var coll__$1 = this; +if((k == null)){ +if((self__.has_nil_QMARK_) && ((v === self__.nil_val))){ +return coll__$1; +} else { +return (new cljs.core.PersistentHashMap(self__.meta,((self__.has_nil_QMARK_)?self__.cnt:(self__.cnt + (1))),self__.root,true,v,null)); +} +} else { +var added_leaf_QMARK_ = (new cljs.core.Box(false)); +var new_root = (((self__.root == null))?cljs.core.BitmapIndexedNode.EMPTY:self__.root).inode_assoc((0),cljs.core.hash(k),k,v,added_leaf_QMARK_); +if((new_root === self__.root)){ +return coll__$1; +} else { +return (new cljs.core.PersistentHashMap(self__.meta,((added_leaf_QMARK_.val)?(self__.cnt + (1)):self__.cnt),new_root,self__.has_nil_QMARK_,self__.nil_val,null)); +} +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +if((k == null)){ +return self__.has_nil_QMARK_; +} else { +if((self__.root == null)){ +return false; +} else { +return !((self__.root.inode_lookup((0),cljs.core.hash(k),k,cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)); + +} +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt > (0))){ +var s = ((!((self__.root == null)))?self__.root.inode_seq():null); +if(self__.has_nil_QMARK_){ +return cljs.core.cons(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null,self__.nil_val], null),s); +} else { +return s; +} +} else { +return null; +} +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentHashMap(meta__$1,self__.cnt,self__.root,self__.has_nil_QMARK_,self__.nil_val,self__.__hash)); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,entry){ +var self__ = this; +var coll__$1 = this; +if(cljs.core.vector_QMARK_(entry)){ +return coll__$1.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(1))); +} else { +var ret = coll__$1; +var es = cljs.core.seq(entry); +while(true){ +if((es == null)){ +return ret; +} else { +var e = cljs.core.first(es); +if(cljs.core.vector_QMARK_(e)){ +var G__13170 = ret.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e,(1))); +var G__13171 = cljs.core.next(es); +ret = G__13170; +es = G__13171; +continue; +} else { +throw (new Error("conj on a map takes map entries or seqables of map entries")); +} +} +break; +} +} +}); + +cljs.core.PersistentHashMap.prototype.call = (function() { +var G__13172 = null; +var G__13172__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); +var G__13172__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); +G__13172 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13172__2.call(this,self__,k); +case 3: +return G__13172__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13172.cljs$core$IFn$_invoke$arity$2 = G__13172__2; +G__13172.cljs$core$IFn$_invoke$arity$3 = G__13172__3; +return G__13172; +})() +; + +cljs.core.PersistentHashMap.prototype.apply = (function (self__,args13145){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args13145))); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentHashMap.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$cnt,cljs.core.cst$sym$root,cljs.core.with_meta(cljs.core.cst$sym$has_DASH_nil_QMARK_,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean], null)),cljs.core.cst$sym$nil_DASH_val,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentHashMap.cljs$lang$type = true; + +cljs.core.PersistentHashMap.cljs$lang$ctorStr = "cljs.core/PersistentHashMap"; + +cljs.core.PersistentHashMap.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentHashMap"); +}); + +cljs.core.__GT_PersistentHashMap = (function cljs$core$__GT_PersistentHashMap(meta,cnt,root,has_nil_QMARK_,nil_val,__hash){ +return (new cljs.core.PersistentHashMap(meta,cnt,root,has_nil_QMARK_,nil_val,__hash)); +}); + +cljs.core.PersistentHashMap.EMPTY = (new cljs.core.PersistentHashMap(null,(0),null,false,null,cljs.core.empty_unordered_hash)); +cljs.core.PersistentHashMap.fromArray = (function (arr,no_clone){ +var arr__$1 = ((no_clone)?arr:cljs.core.aclone(arr)); +var len = arr__$1.length; +var i = (0); +var ret = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY); +while(true){ +if((i < len)){ +var G__13173 = (i + (2)); +var G__13174 = cljs.core._assoc_BANG_(ret,(arr__$1[i]),(arr__$1[(i + (1))])); +i = G__13173; +ret = G__13174; +continue; +} else { +return cljs.core._persistent_BANG_(ret); +} +break; +} +}); +cljs.core.PersistentHashMap.fromArrays = (function (ks,vs){ +var len = ks.length; +var i = (0); +var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY); +while(true){ +if((i < len)){ +var G__13175 = (i + (1)); +var G__13176 = out.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(null,(ks[i]),(vs[i])); +i = G__13175; +out = G__13176; +continue; +} else { +return cljs.core.persistent_BANG_(out); +} +break; +} +}); +cljs.core.PersistentHashMap.createWithCheck = (function (arr){ +var len = arr.length; +var ret = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY); +var i_13177 = (0); +while(true){ +if((i_13177 < len)){ +cljs.core._assoc_BANG_(ret,(arr[i_13177]),(arr[(i_13177 + (1))])); + +if(cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core._count(ret),((i_13177 / (2)) + (1)))){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Duplicate key: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1((arr[i_13177]))].join(''))); +} else { +var G__13178 = (i_13177 + (2)); +i_13177 = G__13178; +continue; +} +} else { +} +break; +} + +return cljs.core._persistent_BANG_(ret); +}); +(cljs.core.PersistentHashMap.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.ITransientMap} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ITransientCollection} + * @implements {cljs.core.ITransientAssociative} + * @implements {cljs.core.ILookup} +*/ +cljs.core.TransientHashMap = (function (edit,root,count,has_nil_QMARK_,nil_val){ +this.edit = edit; +this.root = root; +this.count = count; +this.has_nil_QMARK_ = has_nil_QMARK_; +this.nil_val = nil_val; +this.cljs$lang$protocol_mask$partition0$ = 258; +this.cljs$lang$protocol_mask$partition1$ = 56; +}) +cljs.core.TransientHashMap.prototype.conj_BANG_ = (function (o){ +var self__ = this; +var tcoll = this; +if(self__.edit){ +if(((!((o == null)))?((((o.cljs$lang$protocol_mask$partition0$ & (2048))) || ((cljs.core.PROTOCOL_SENTINEL === o.cljs$core$IMapEntry$)))?true:(((!o.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry,o):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IMapEntry,o))){ +return tcoll.assoc_BANG_((cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.key.call(null,o)),(cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(o) : cljs.core.val.call(null,o))); +} else { +var es = cljs.core.seq(o); +var tcoll__$1 = tcoll; +while(true){ +var temp__5276__auto__ = cljs.core.first(es); +if(cljs.core.truth_(temp__5276__auto__)){ +var e = temp__5276__auto__; +var G__13180 = cljs.core.next(es); +var G__13181 = tcoll__$1.assoc_BANG_((cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.key.call(null,e)),(cljs.core.val.cljs$core$IFn$_invoke$arity$1 ? cljs.core.val.cljs$core$IFn$_invoke$arity$1(e) : cljs.core.val.call(null,e))); +es = G__13180; +tcoll__$1 = G__13181; +continue; +} else { +return tcoll__$1; +} +break; +} +} +} else { +throw (new Error("conj! after persistent")); +} +}); + +cljs.core.TransientHashMap.prototype.assoc_BANG_ = (function (k,v){ +var self__ = this; +var tcoll = this; +if(self__.edit){ +if((k == null)){ +if((self__.nil_val === v)){ +} else { +self__.nil_val = v; +} + +if(self__.has_nil_QMARK_){ +} else { +self__.count = (self__.count + (1)); + +self__.has_nil_QMARK_ = true; +} + +return tcoll; +} else { +var added_leaf_QMARK_ = (new cljs.core.Box(false)); +var node = (((self__.root == null))?cljs.core.BitmapIndexedNode.EMPTY:self__.root).inode_assoc_BANG_(self__.edit,(0),cljs.core.hash(k),k,v,added_leaf_QMARK_); +if((node === self__.root)){ +} else { +self__.root = node; +} + +if(added_leaf_QMARK_.val){ +self__.count = (self__.count + (1)); +} else { +} + +return tcoll; +} +} else { +throw (new Error("assoc! after persistent!")); +} +}); + +cljs.core.TransientHashMap.prototype.without_BANG_ = (function (k){ +var self__ = this; +var tcoll = this; +if(self__.edit){ +if((k == null)){ +if(self__.has_nil_QMARK_){ +self__.has_nil_QMARK_ = false; + +self__.nil_val = null; + +self__.count = (self__.count - (1)); + +return tcoll; +} else { +return tcoll; +} +} else { +if((self__.root == null)){ +return tcoll; +} else { +var removed_leaf_QMARK_ = (new cljs.core.Box(false)); +var node = self__.root.inode_without_BANG_(self__.edit,(0),cljs.core.hash(k),k,removed_leaf_QMARK_); +if((node === self__.root)){ +} else { +self__.root = node; +} + +if(removed_leaf_QMARK_.val){ +self__.count = (self__.count - (1)); +} else { +} + +return tcoll; +} +} +} else { +throw (new Error("dissoc! after persistent!")); +} +}); + +cljs.core.TransientHashMap.prototype.persistent_BANG_ = (function (){ +var self__ = this; +var tcoll = this; +if(self__.edit){ +self__.edit = null; + +return (new cljs.core.PersistentHashMap(null,self__.count,self__.root,self__.has_nil_QMARK_,self__.nil_val,null)); +} else { +throw (new Error("persistent! called twice")); +} +}); + +cljs.core.TransientHashMap.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if(self__.edit){ +return self__.count; +} else { +throw (new Error("count after persistent!")); +} +}); + +cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (tcoll,k){ +var self__ = this; +var tcoll__$1 = this; +if((k == null)){ +if(self__.has_nil_QMARK_){ +return self__.nil_val; +} else { +return null; +} +} else { +if((self__.root == null)){ +return null; +} else { +return self__.root.inode_lookup((0),cljs.core.hash(k),k); +} +} +}); + +cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (tcoll,k,not_found){ +var self__ = this; +var tcoll__$1 = this; +if((k == null)){ +if(self__.has_nil_QMARK_){ +return self__.nil_val; +} else { +return not_found; +} +} else { +if((self__.root == null)){ +return not_found; +} else { +return self__.root.inode_lookup((0),cljs.core.hash(k),k,not_found); +} +} +}); + +cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = (function (tcoll,val){ +var self__ = this; +var tcoll__$1 = this; +return tcoll__$1.conj_BANG_(val); +}); + +cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = (function (tcoll){ +var self__ = this; +var tcoll__$1 = this; +return tcoll__$1.persistent_BANG_(); +}); + +cljs.core.TransientHashMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = (function (tcoll,key,val){ +var self__ = this; +var tcoll__$1 = this; +return tcoll__$1.assoc_BANG_(key,val); +}); + +cljs.core.TransientHashMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = (function (tcoll,key){ +var self__ = this; +var tcoll__$1 = this; +return tcoll__$1.without_BANG_(key); +}); + +cljs.core.TransientHashMap.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$edit,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean,cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$root,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$count,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$has_DASH_nil_QMARK_,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean,cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$nil_DASH_val,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.TransientHashMap.cljs$lang$type = true; + +cljs.core.TransientHashMap.cljs$lang$ctorStr = "cljs.core/TransientHashMap"; + +cljs.core.TransientHashMap.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/TransientHashMap"); +}); + +cljs.core.__GT_TransientHashMap = (function cljs$core$__GT_TransientHashMap(edit,root,count,has_nil_QMARK_,nil_val){ +return (new cljs.core.TransientHashMap(edit,root,count,has_nil_QMARK_,nil_val)); +}); + +cljs.core.tree_map_seq_push = (function cljs$core$tree_map_seq_push(node,stack,ascending_QMARK_){ +var t = node; +var stack__$1 = stack; +while(true){ +if(!((t == null))){ +var G__13182 = ((ascending_QMARK_)?t.left:t.right); +var G__13183 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack__$1,t); +t = G__13182; +stack__$1 = G__13183; +continue; +} else { +return stack__$1; +} +break; +} +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.PersistentTreeMapSeq = (function (meta,stack,ascending_QMARK_,cnt,__hash){ +this.meta = meta; +this.stack = stack; +this.ascending_QMARK_ = ascending_QMARK_; +this.cnt = cnt; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32374862; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.PersistentTreeMapSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentTreeMapSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentTreeMapSeq.prototype.indexOf = (function() { +var G__13184 = null; +var G__13184__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13184__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13184 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13184__1.call(this,x); +case 2: +return G__13184__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13184.cljs$core$IFn$_invoke$arity$1 = G__13184__1; +G__13184.cljs$core$IFn$_invoke$arity$2 = G__13184__2; +return G__13184; +})() +; + +cljs.core.PersistentTreeMapSeq.prototype.lastIndexOf = (function() { +var G__13185 = null; +var G__13185__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13185__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13185 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13185__1.call(this,x); +case 2: +return G__13185__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13185.cljs$core$IFn$_invoke$arity$1 = G__13185__1; +G__13185.cljs$core$IFn$_invoke$arity$2 = G__13185__2; +return G__13185; +})() +; + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt < (0))){ +return (cljs.core.count(cljs.core.next(coll__$1)) + (1)); +} else { +return self__.cnt; +} +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return cljs.core.peek(self__.stack); +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +var t = cljs.core.first(self__.stack); +var next_stack = cljs.core.tree_map_seq_push(((self__.ascending_QMARK_)?t.right:t.left),cljs.core.next(self__.stack),self__.ascending_QMARK_); +if(!((next_stack == null))){ +return (new cljs.core.PersistentTreeMapSeq(null,next_stack,self__.ascending_QMARK_,(self__.cnt - (1)),null)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return this$__$1; +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentTreeMapSeq(meta__$1,self__.stack,self__.ascending_QMARK_,self__.cnt,self__.__hash)); +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.PersistentTreeMapSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$stack,cljs.core.with_meta(cljs.core.cst$sym$ascending_QMARK_,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean], null)),cljs.core.cst$sym$cnt,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentTreeMapSeq.cljs$lang$type = true; + +cljs.core.PersistentTreeMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentTreeMapSeq"; + +cljs.core.PersistentTreeMapSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentTreeMapSeq"); +}); + +cljs.core.__GT_PersistentTreeMapSeq = (function cljs$core$__GT_PersistentTreeMapSeq(meta,stack,ascending_QMARK_,cnt,__hash){ +return (new cljs.core.PersistentTreeMapSeq(meta,stack,ascending_QMARK_,cnt,__hash)); +}); + +(cljs.core.PersistentTreeMapSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.create_tree_map_seq = (function cljs$core$create_tree_map_seq(tree,ascending_QMARK_,cnt){ +return (new cljs.core.PersistentTreeMapSeq(null,cljs.core.tree_map_seq_push(tree,null,ascending_QMARK_),ascending_QMARK_,cnt,null)); +}); + +cljs.core.balance_left = (function cljs$core$balance_left(key,val,ins,right){ +if((ins instanceof cljs.core.RedNode)){ +if((ins.left instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(ins.key,ins.val,ins.left.blacken(),(new cljs.core.BlackNode(key,val,ins.right,right,null)),null)); +} else { +if((ins.right instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(ins.right.key,ins.right.val,(new cljs.core.BlackNode(ins.key,ins.val,ins.left,ins.right.left,null)),(new cljs.core.BlackNode(key,val,ins.right.right,right,null)),null)); +} else { +return (new cljs.core.BlackNode(key,val,ins,right,null)); + +} +} +} else { +return (new cljs.core.BlackNode(key,val,ins,right,null)); +} +}); +cljs.core.balance_right = (function cljs$core$balance_right(key,val,left,ins){ +if((ins instanceof cljs.core.RedNode)){ +if((ins.right instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(ins.key,ins.val,(new cljs.core.BlackNode(key,val,left,ins.left,null)),ins.right.blacken(),null)); +} else { +if((ins.left instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(ins.left.key,ins.left.val,(new cljs.core.BlackNode(key,val,left,ins.left.left,null)),(new cljs.core.BlackNode(ins.key,ins.val,ins.left.right,ins.right,null)),null)); +} else { +return (new cljs.core.BlackNode(key,val,left,ins,null)); + +} +} +} else { +return (new cljs.core.BlackNode(key,val,left,ins,null)); +} +}); +cljs.core.balance_left_del = (function cljs$core$balance_left_del(key,val,del,right){ +if((del instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(key,val,del.blacken(),right,null)); +} else { +if((right instanceof cljs.core.BlackNode)){ +return cljs.core.balance_right(key,val,del,right.redden()); +} else { +if(((right instanceof cljs.core.RedNode)) && ((right.left instanceof cljs.core.BlackNode))){ +return (new cljs.core.RedNode(right.left.key,right.left.val,(new cljs.core.BlackNode(key,val,del,right.left.left,null)),cljs.core.balance_right(right.key,right.val,right.left.right,right.right.redden()),null)); +} else { +throw (new Error("red-black tree invariant violation")); + +} +} +} +}); +cljs.core.balance_right_del = (function cljs$core$balance_right_del(key,val,left,del){ +if((del instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(key,val,left,del.blacken(),null)); +} else { +if((left instanceof cljs.core.BlackNode)){ +return cljs.core.balance_left(key,val,left.redden(),del); +} else { +if(((left instanceof cljs.core.RedNode)) && ((left.right instanceof cljs.core.BlackNode))){ +return (new cljs.core.RedNode(left.right.key,left.right.val,cljs.core.balance_left(left.key,left.val,left.left.redden(),left.right.left),(new cljs.core.BlackNode(key,val,left.right.right,del,null)),null)); +} else { +throw (new Error("red-black tree invariant violation")); + +} +} +} +}); +cljs.core.tree_map_kv_reduce = (function cljs$core$tree_map_kv_reduce(node,f,init){ +var init__$1 = ((!((node.left == null)))?(function (){var G__13195 = node.left; +var G__13196 = f; +var G__13197 = init; +return (cljs.core.tree_map_kv_reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.tree_map_kv_reduce.cljs$core$IFn$_invoke$arity$3(G__13195,G__13196,G__13197) : cljs.core.tree_map_kv_reduce.call(null,G__13195,G__13196,G__13197)); +})():init); +if(cljs.core.reduced_QMARK_(init__$1)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$1) : cljs.core.deref.call(null,init__$1)); +} else { +var init__$2 = (function (){var G__13198 = init__$1; +var G__13199 = node.key; +var G__13200 = node.val; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__13198,G__13199,G__13200) : f.call(null,G__13198,G__13199,G__13200)); +})(); +if(cljs.core.reduced_QMARK_(init__$2)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$2) : cljs.core.deref.call(null,init__$2)); +} else { +var init__$3 = ((!((node.right == null)))?(function (){var G__13201 = node.right; +var G__13202 = f; +var G__13203 = init__$2; +return (cljs.core.tree_map_kv_reduce.cljs$core$IFn$_invoke$arity$3 ? cljs.core.tree_map_kv_reduce.cljs$core$IFn$_invoke$arity$3(G__13201,G__13202,G__13203) : cljs.core.tree_map_kv_reduce.call(null,G__13201,G__13202,G__13203)); +})():init__$2); +if(cljs.core.reduced_QMARK_(init__$3)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init__$3) : cljs.core.deref.call(null,init__$3)); +} else { +return init__$3; +} +} +} +}); + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IVector} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IStack} + * @implements {cljs.core.IMapEntry} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.ILookup} + * @implements {cljs.core.IReduce} +*/ +cljs.core.BlackNode = (function (key,val,left,right,__hash){ +this.key = key; +this.val = val; +this.left = left; +this.right = right; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32402207; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.BlackNode.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.BlackNode.prototype.cljs$core$IFind$_find$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +if((k === (0))){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(0),self__.key], null); +} else { +if((k === (1))){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(1),self__.val], null); +} else { +return null; + +} +} +}); + +cljs.core.BlackNode.prototype.lastIndexOf = (function() { +var G__13205 = null; +var G__13205__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13205__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13205 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13205__1.call(this,x); +case 2: +return G__13205__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13205.cljs$core$IFn$_invoke$arity$1 = G__13205__1; +G__13205.cljs$core$IFn$_invoke$arity$2 = G__13205__2; +return G__13205; +})() +; + +cljs.core.BlackNode.prototype.indexOf = (function() { +var G__13206 = null; +var G__13206__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13206__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13206 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13206__1.call(this,x); +case 2: +return G__13206__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13206.cljs$core$IFn$_invoke$arity$1 = G__13206__1; +G__13206.cljs$core$IFn$_invoke$arity$2 = G__13206__2; +return G__13206; +})() +; + +cljs.core.BlackNode.prototype.add_right = (function (ins){ +var self__ = this; +var node = this; +return ins.balance_right(node); +}); + +cljs.core.BlackNode.prototype.redden = (function (){ +var self__ = this; +var node = this; +return (new cljs.core.RedNode(self__.key,self__.val,self__.left,self__.right,null)); +}); + +cljs.core.BlackNode.prototype.blacken = (function (){ +var self__ = this; +var node = this; +return node; +}); + +cljs.core.BlackNode.prototype.add_left = (function (ins){ +var self__ = this; +var node = this; +return ins.balance_left(node); +}); + +cljs.core.BlackNode.prototype.replace = (function (key__$1,val__$1,left__$1,right__$1){ +var self__ = this; +var node = this; +return (new cljs.core.BlackNode(key__$1,val__$1,left__$1,right__$1,null)); +}); + +cljs.core.BlackNode.prototype.balance_left = (function (parent){ +var self__ = this; +var node = this; +return (new cljs.core.BlackNode(parent.key,parent.val,node,parent.right,null)); +}); + +cljs.core.BlackNode.prototype.balance_right = (function (parent){ +var self__ = this; +var node = this; +return (new cljs.core.BlackNode(parent.key,parent.val,parent.left,node,null)); +}); + +cljs.core.BlackNode.prototype.remove_left = (function (del){ +var self__ = this; +var node = this; +return cljs.core.balance_left_del(self__.key,self__.val,del,self__.right); +}); + +cljs.core.BlackNode.prototype.kv_reduce = (function (f,init){ +var self__ = this; +var node = this; +return cljs.core.tree_map_kv_reduce(node,f,init); +}); + +cljs.core.BlackNode.prototype.remove_right = (function (del){ +var self__ = this; +var node = this; +return cljs.core.balance_right_del(self__.key,self__.val,self__.left,del); +}); + +cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +return node__$1.cljs$core$IIndexed$_nth$arity$3(null,k,null); +}); + +cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (node,k,not_found){ +var self__ = this; +var node__$1 = this; +return node__$1.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (node,n){ +var self__ = this; +var node__$1 = this; +if((n === (0))){ +return self__.key; +} else { +if((n === (1))){ +return self__.val; +} else { +throw (new Error("Index out of bounds")); + +} +} +}); + +cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (node,n,not_found){ +var self__ = this; +var node__$1 = this; +if((n === (0))){ +return self__.key; +} else { +if((n === (1))){ +return self__.val; +} else { +return not_found; + +} +} +}); + +cljs.core.BlackNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = (function (node,n,v){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null).cljs$core$IVector$_assoc_n$arity$3(null,n,v); +}); + +cljs.core.BlackNode.prototype.cljs$core$IMeta$_meta$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return null; +}); + +cljs.core.BlackNode.prototype.cljs$core$ICounted$_count$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return (2); +}); + +cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_key$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.key; +}); + +cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_val$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.val; +}); + +cljs.core.BlackNode.prototype.cljs$core$IStack$_peek$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.val; +}); + +cljs.core.BlackNode.prototype.cljs$core$IStack$_pop$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key], null); +}); + +cljs.core.BlackNode.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.BlackNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.BlackNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return cljs.core.PersistentVector.EMPTY; +}); + +cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (node,f){ +var self__ = this; +var node__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(node__$1,f); +}); + +cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (node,f,start){ +var self__ = this; +var node__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(node__$1,f,start); +}); + +cljs.core.BlackNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (node,k,v){ +var self__ = this; +var node__$1 = this; +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null),k,v); +}); + +cljs.core.BlackNode.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +return ((k === (0))) || ((k === (1))); +}); + +cljs.core.BlackNode.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +var x__8894__auto__ = self__.key; +return cljs.core._conj((function (){var x__8894__auto____$1 = self__.val; +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto____$1); +})(),x__8894__auto__); +}); + +cljs.core.BlackNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (node,meta){ +var self__ = this; +var node__$1 = this; +return cljs.core._with_meta(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null),meta); +}); + +cljs.core.BlackNode.prototype.cljs$core$ICollection$_conj$arity$2 = (function (node,o){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val,o], null); +}); + +cljs.core.BlackNode.prototype.call = (function() { +var G__13207 = null; +var G__13207__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var node = self____$1; +return node.cljs$core$IIndexed$_nth$arity$2(null,k); +}); +var G__13207__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var node = self____$1; +return node.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); +G__13207 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13207__2.call(this,self__,k); +case 3: +return G__13207__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13207.cljs$core$IFn$_invoke$arity$2 = G__13207__2; +G__13207.cljs$core$IFn$_invoke$arity$3 = G__13207__3; +return G__13207; +})() +; + +cljs.core.BlackNode.prototype.apply = (function (self__,args13204){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args13204))); +}); + +cljs.core.BlackNode.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var node = this; +return node.cljs$core$IIndexed$_nth$arity$2(null,k); +}); + +cljs.core.BlackNode.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var node = this; +return node.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.BlackNode.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$key,cljs.core.cst$sym$val,cljs.core.cst$sym$left,cljs.core.cst$sym$right,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.BlackNode.cljs$lang$type = true; + +cljs.core.BlackNode.cljs$lang$ctorStr = "cljs.core/BlackNode"; + +cljs.core.BlackNode.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/BlackNode"); +}); + +cljs.core.__GT_BlackNode = (function cljs$core$__GT_BlackNode(key,val,left,right,__hash){ +return (new cljs.core.BlackNode(key,val,left,right,__hash)); +}); + +(cljs.core.BlackNode.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IVector} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IStack} + * @implements {cljs.core.IMapEntry} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.ILookup} + * @implements {cljs.core.IReduce} +*/ +cljs.core.RedNode = (function (key,val,left,right,__hash){ +this.key = key; +this.val = val; +this.left = left; +this.right = right; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32402207; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.RedNode.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.RedNode.prototype.cljs$core$IFind$_find$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +if((k === (0))){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(0),self__.key], null); +} else { +if((k === (1))){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(1),self__.val], null); +} else { +return null; + +} +} +}); + +cljs.core.RedNode.prototype.lastIndexOf = (function() { +var G__13209 = null; +var G__13209__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13209__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13209 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13209__1.call(this,x); +case 2: +return G__13209__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13209.cljs$core$IFn$_invoke$arity$1 = G__13209__1; +G__13209.cljs$core$IFn$_invoke$arity$2 = G__13209__2; +return G__13209; +})() +; + +cljs.core.RedNode.prototype.indexOf = (function() { +var G__13210 = null; +var G__13210__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13210__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13210 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13210__1.call(this,x); +case 2: +return G__13210__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13210.cljs$core$IFn$_invoke$arity$1 = G__13210__1; +G__13210.cljs$core$IFn$_invoke$arity$2 = G__13210__2; +return G__13210; +})() +; + +cljs.core.RedNode.prototype.add_right = (function (ins){ +var self__ = this; +var node = this; +return (new cljs.core.RedNode(self__.key,self__.val,self__.left,ins,null)); +}); + +cljs.core.RedNode.prototype.redden = (function (){ +var self__ = this; +var node = this; +throw (new Error("red-black tree invariant violation")); +}); + +cljs.core.RedNode.prototype.blacken = (function (){ +var self__ = this; +var node = this; +return (new cljs.core.BlackNode(self__.key,self__.val,self__.left,self__.right,null)); +}); + +cljs.core.RedNode.prototype.add_left = (function (ins){ +var self__ = this; +var node = this; +return (new cljs.core.RedNode(self__.key,self__.val,ins,self__.right,null)); +}); + +cljs.core.RedNode.prototype.replace = (function (key__$1,val__$1,left__$1,right__$1){ +var self__ = this; +var node = this; +return (new cljs.core.RedNode(key__$1,val__$1,left__$1,right__$1,null)); +}); + +cljs.core.RedNode.prototype.balance_left = (function (parent){ +var self__ = this; +var node = this; +if((self__.left instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(self__.key,self__.val,self__.left.blacken(),(new cljs.core.BlackNode(parent.key,parent.val,self__.right,parent.right,null)),null)); +} else { +if((self__.right instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(self__.right.key,self__.right.val,(new cljs.core.BlackNode(self__.key,self__.val,self__.left,self__.right.left,null)),(new cljs.core.BlackNode(parent.key,parent.val,self__.right.right,parent.right,null)),null)); +} else { +return (new cljs.core.BlackNode(parent.key,parent.val,node,parent.right,null)); + +} +} +}); + +cljs.core.RedNode.prototype.balance_right = (function (parent){ +var self__ = this; +var node = this; +if((self__.right instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(self__.key,self__.val,(new cljs.core.BlackNode(parent.key,parent.val,parent.left,self__.left,null)),self__.right.blacken(),null)); +} else { +if((self__.left instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(self__.left.key,self__.left.val,(new cljs.core.BlackNode(parent.key,parent.val,parent.left,self__.left.left,null)),(new cljs.core.BlackNode(self__.key,self__.val,self__.left.right,self__.right,null)),null)); +} else { +return (new cljs.core.BlackNode(parent.key,parent.val,parent.left,node,null)); + +} +} +}); + +cljs.core.RedNode.prototype.remove_left = (function (del){ +var self__ = this; +var node = this; +return (new cljs.core.RedNode(self__.key,self__.val,del,self__.right,null)); +}); + +cljs.core.RedNode.prototype.kv_reduce = (function (f,init){ +var self__ = this; +var node = this; +return cljs.core.tree_map_kv_reduce(node,f,init); +}); + +cljs.core.RedNode.prototype.remove_right = (function (del){ +var self__ = this; +var node = this; +return (new cljs.core.RedNode(self__.key,self__.val,self__.left,del,null)); +}); + +cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +return node__$1.cljs$core$IIndexed$_nth$arity$3(null,k,null); +}); + +cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (node,k,not_found){ +var self__ = this; +var node__$1 = this; +return node__$1.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (node,n){ +var self__ = this; +var node__$1 = this; +if((n === (0))){ +return self__.key; +} else { +if((n === (1))){ +return self__.val; +} else { +throw (new Error("Index out of bounds")); + +} +} +}); + +cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (node,n,not_found){ +var self__ = this; +var node__$1 = this; +if((n === (0))){ +return self__.key; +} else { +if((n === (1))){ +return self__.val; +} else { +return not_found; + +} +} +}); + +cljs.core.RedNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = (function (node,n,v){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null).cljs$core$IVector$_assoc_n$arity$3(null,n,v); +}); + +cljs.core.RedNode.prototype.cljs$core$IMeta$_meta$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return null; +}); + +cljs.core.RedNode.prototype.cljs$core$ICounted$_count$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return (2); +}); + +cljs.core.RedNode.prototype.cljs$core$IMapEntry$_key$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.key; +}); + +cljs.core.RedNode.prototype.cljs$core$IMapEntry$_val$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.val; +}); + +cljs.core.RedNode.prototype.cljs$core$IStack$_peek$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return self__.val; +}); + +cljs.core.RedNode.prototype.cljs$core$IStack$_pop$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key], null); +}); + +cljs.core.RedNode.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.RedNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.RedNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +return cljs.core.PersistentVector.EMPTY; +}); + +cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (node,f){ +var self__ = this; +var node__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(node__$1,f); +}); + +cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (node,f,start){ +var self__ = this; +var node__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$3(node__$1,f,start); +}); + +cljs.core.RedNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (node,k,v){ +var self__ = this; +var node__$1 = this; +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null),k,v); +}); + +cljs.core.RedNode.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (node,k){ +var self__ = this; +var node__$1 = this; +return ((k === (0))) || ((k === (1))); +}); + +cljs.core.RedNode.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (node){ +var self__ = this; +var node__$1 = this; +var x__8894__auto__ = self__.key; +return cljs.core._conj((function (){var x__8894__auto____$1 = self__.val; +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto____$1); +})(),x__8894__auto__); +}); + +cljs.core.RedNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (node,meta){ +var self__ = this; +var node__$1 = this; +return cljs.core._with_meta(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val], null),meta); +}); + +cljs.core.RedNode.prototype.cljs$core$ICollection$_conj$arity$2 = (function (node,o){ +var self__ = this; +var node__$1 = this; +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.key,self__.val,o], null); +}); + +cljs.core.RedNode.prototype.call = (function() { +var G__13211 = null; +var G__13211__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var node = self____$1; +return node.cljs$core$IIndexed$_nth$arity$2(null,k); +}); +var G__13211__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var node = self____$1; +return node.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); +G__13211 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13211__2.call(this,self__,k); +case 3: +return G__13211__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13211.cljs$core$IFn$_invoke$arity$2 = G__13211__2; +G__13211.cljs$core$IFn$_invoke$arity$3 = G__13211__3; +return G__13211; +})() +; + +cljs.core.RedNode.prototype.apply = (function (self__,args13208){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args13208))); +}); + +cljs.core.RedNode.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var node = this; +return node.cljs$core$IIndexed$_nth$arity$2(null,k); +}); + +cljs.core.RedNode.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var node = this; +return node.cljs$core$IIndexed$_nth$arity$3(null,k,not_found); +}); + +cljs.core.RedNode.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$key,cljs.core.cst$sym$val,cljs.core.cst$sym$left,cljs.core.cst$sym$right,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.RedNode.cljs$lang$type = true; + +cljs.core.RedNode.cljs$lang$ctorStr = "cljs.core/RedNode"; + +cljs.core.RedNode.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/RedNode"); +}); + +cljs.core.__GT_RedNode = (function cljs$core$__GT_RedNode(key,val,left,right,__hash){ +return (new cljs.core.RedNode(key,val,left,right,__hash)); +}); + +(cljs.core.RedNode.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.tree_map_add = (function cljs$core$tree_map_add(comp,tree,k,v,found){ +if((tree == null)){ +return (new cljs.core.RedNode(k,v,null,null,null)); +} else { +var c = (function (){var G__13224 = k; +var G__13225 = tree.key; +return (comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__13224,G__13225) : comp.call(null,G__13224,G__13225)); +})(); +if((c === (0))){ +(found[(0)] = tree); + +return null; +} else { +if((c < (0))){ +var ins = (function (){var G__13226 = comp; +var G__13227 = tree.left; +var G__13228 = k; +var G__13229 = v; +var G__13230 = found; +return (cljs.core.tree_map_add.cljs$core$IFn$_invoke$arity$5 ? cljs.core.tree_map_add.cljs$core$IFn$_invoke$arity$5(G__13226,G__13227,G__13228,G__13229,G__13230) : cljs.core.tree_map_add.call(null,G__13226,G__13227,G__13228,G__13229,G__13230)); +})(); +if(!((ins == null))){ +return tree.add_left(ins); +} else { +return null; +} +} else { +var ins = (function (){var G__13231 = comp; +var G__13232 = tree.right; +var G__13233 = k; +var G__13234 = v; +var G__13235 = found; +return (cljs.core.tree_map_add.cljs$core$IFn$_invoke$arity$5 ? cljs.core.tree_map_add.cljs$core$IFn$_invoke$arity$5(G__13231,G__13232,G__13233,G__13234,G__13235) : cljs.core.tree_map_add.call(null,G__13231,G__13232,G__13233,G__13234,G__13235)); +})(); +if(!((ins == null))){ +return tree.add_right(ins); +} else { +return null; +} + +} +} +} +}); +cljs.core.tree_map_append = (function cljs$core$tree_map_append(left,right){ +if((left == null)){ +return right; +} else { +if((right == null)){ +return left; +} else { +if((left instanceof cljs.core.RedNode)){ +if((right instanceof cljs.core.RedNode)){ +var app = (function (){var G__13244 = left.right; +var G__13245 = right.left; +return (cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2 ? cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2(G__13244,G__13245) : cljs.core.tree_map_append.call(null,G__13244,G__13245)); +})(); +if((app instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(app.key,app.val,(new cljs.core.RedNode(left.key,left.val,left.left,app.left,null)),(new cljs.core.RedNode(right.key,right.val,app.right,right.right,null)),null)); +} else { +return (new cljs.core.RedNode(left.key,left.val,left.left,(new cljs.core.RedNode(right.key,right.val,app,right.right,null)),null)); +} +} else { +return (new cljs.core.RedNode(left.key,left.val,left.left,(function (){var G__13246 = left.right; +var G__13247 = right; +return (cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2 ? cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2(G__13246,G__13247) : cljs.core.tree_map_append.call(null,G__13246,G__13247)); +})(),null)); +} +} else { +if((right instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(right.key,right.val,(function (){var G__13248 = left; +var G__13249 = right.left; +return (cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2 ? cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2(G__13248,G__13249) : cljs.core.tree_map_append.call(null,G__13248,G__13249)); +})(),right.right,null)); +} else { +var app = (function (){var G__13250 = left.right; +var G__13251 = right.left; +return (cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2 ? cljs.core.tree_map_append.cljs$core$IFn$_invoke$arity$2(G__13250,G__13251) : cljs.core.tree_map_append.call(null,G__13250,G__13251)); +})(); +if((app instanceof cljs.core.RedNode)){ +return (new cljs.core.RedNode(app.key,app.val,(new cljs.core.BlackNode(left.key,left.val,left.left,app.left,null)),(new cljs.core.BlackNode(right.key,right.val,app.right,right.right,null)),null)); +} else { +return cljs.core.balance_left_del(left.key,left.val,left.left,(new cljs.core.BlackNode(right.key,right.val,app,right.right,null))); +} + +} +} +} +} +}); +cljs.core.tree_map_remove = (function cljs$core$tree_map_remove(comp,tree,k,found){ +if(!((tree == null))){ +var c = (function (){var G__13262 = k; +var G__13263 = tree.key; +return (comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__13262,G__13263) : comp.call(null,G__13262,G__13263)); +})(); +if((c === (0))){ +(found[(0)] = tree); + +return cljs.core.tree_map_append(tree.left,tree.right); +} else { +if((c < (0))){ +var del = (function (){var G__13264 = comp; +var G__13265 = tree.left; +var G__13266 = k; +var G__13267 = found; +return (cljs.core.tree_map_remove.cljs$core$IFn$_invoke$arity$4 ? cljs.core.tree_map_remove.cljs$core$IFn$_invoke$arity$4(G__13264,G__13265,G__13266,G__13267) : cljs.core.tree_map_remove.call(null,G__13264,G__13265,G__13266,G__13267)); +})(); +if((!((del == null))) || (!(((found[(0)]) == null)))){ +if((tree.left instanceof cljs.core.BlackNode)){ +return cljs.core.balance_left_del(tree.key,tree.val,del,tree.right); +} else { +return (new cljs.core.RedNode(tree.key,tree.val,del,tree.right,null)); +} +} else { +return null; +} +} else { +var del = (function (){var G__13268 = comp; +var G__13269 = tree.right; +var G__13270 = k; +var G__13271 = found; +return (cljs.core.tree_map_remove.cljs$core$IFn$_invoke$arity$4 ? cljs.core.tree_map_remove.cljs$core$IFn$_invoke$arity$4(G__13268,G__13269,G__13270,G__13271) : cljs.core.tree_map_remove.call(null,G__13268,G__13269,G__13270,G__13271)); +})(); +if((!((del == null))) || (!(((found[(0)]) == null)))){ +if((tree.right instanceof cljs.core.BlackNode)){ +return cljs.core.balance_right_del(tree.key,tree.val,tree.left,del); +} else { +return (new cljs.core.RedNode(tree.key,tree.val,tree.left,del,null)); +} +} else { +return null; +} + +} +} +} else { +return null; +} +}); +cljs.core.tree_map_replace = (function cljs$core$tree_map_replace(comp,tree,k,v){ +var tk = tree.key; +var c = (comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(k,tk) : comp.call(null,k,tk)); +if((c === (0))){ +return tree.replace(tk,v,tree.left,tree.right); +} else { +if((c < (0))){ +return tree.replace(tk,tree.val,(function (){var G__13280 = comp; +var G__13281 = tree.left; +var G__13282 = k; +var G__13283 = v; +return (cljs.core.tree_map_replace.cljs$core$IFn$_invoke$arity$4 ? cljs.core.tree_map_replace.cljs$core$IFn$_invoke$arity$4(G__13280,G__13281,G__13282,G__13283) : cljs.core.tree_map_replace.call(null,G__13280,G__13281,G__13282,G__13283)); +})(),tree.right); +} else { +return tree.replace(tk,tree.val,tree.left,(function (){var G__13284 = comp; +var G__13285 = tree.right; +var G__13286 = k; +var G__13287 = v; +return (cljs.core.tree_map_replace.cljs$core$IFn$_invoke$arity$4 ? cljs.core.tree_map_replace.cljs$core$IFn$_invoke$arity$4(G__13284,G__13285,G__13286,G__13287) : cljs.core.tree_map_replace.call(null,G__13284,G__13285,G__13286,G__13287)); +})()); + +} +} +}); + +/** +* @constructor + * @implements {cljs.core.IReversible} + * @implements {cljs.core.IKVReduce} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IFind} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISorted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.IMap} + * @implements {cljs.core.ILookup} +*/ +cljs.core.PersistentTreeMap = (function (comp,tree,cnt,meta,__hash){ +this.comp = comp; +this.tree = tree; +this.cnt = cnt; +this.meta = meta; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 418776847; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.PersistentTreeMap.prototype.cljs$core$IFind$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentTreeMap.prototype.cljs$core$IFind$_find$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.entry_at(k); +}); + +cljs.core.PersistentTreeMap.prototype.forEach = (function (f){ +var self__ = this; +var coll = this; +var seq__13289 = cljs.core.seq(coll); +var chunk__13290 = null; +var count__13291 = (0); +var i__13292 = (0); +while(true){ +if((i__13292 < count__13291)){ +var vec__13293 = chunk__13290.cljs$core$IIndexed$_nth$arity$2(null,i__13292); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13293,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13293,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13303 = seq__13289; +var G__13304 = chunk__13290; +var G__13305 = count__13291; +var G__13306 = (i__13292 + (1)); +seq__13289 = G__13303; +chunk__13290 = G__13304; +count__13291 = G__13305; +i__13292 = G__13306; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__13289); +if(temp__5278__auto__){ +var seq__13289__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__13289__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__13289__$1); +var G__13307 = cljs.core.chunk_rest(seq__13289__$1); +var G__13308 = c__8871__auto__; +var G__13309 = cljs.core.count(c__8871__auto__); +var G__13310 = (0); +seq__13289 = G__13307; +chunk__13290 = G__13308; +count__13291 = G__13309; +i__13292 = G__13310; +continue; +} else { +var vec__13296 = cljs.core.first(seq__13289__$1); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13296,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13296,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13311 = cljs.core.next(seq__13289__$1); +var G__13312 = null; +var G__13313 = (0); +var G__13314 = (0); +seq__13289 = G__13311; +chunk__13290 = G__13312; +count__13291 = G__13313; +i__13292 = G__13314; +continue; +} +} else { +return null; +} +} +break; +} +}); + +cljs.core.PersistentTreeMap.prototype.get = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentTreeMap.prototype.entries = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_entries_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentTreeMap.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentTreeMap.prototype.keys = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator((cljs.core.keys.cljs$core$IFn$_invoke$arity$1 ? cljs.core.keys.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.keys.call(null,coll))); +}); + +cljs.core.PersistentTreeMap.prototype.values = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator((cljs.core.vals.cljs$core$IFn$_invoke$arity$1 ? cljs.core.vals.cljs$core$IFn$_invoke$arity$1(coll) : cljs.core.vals.call(null,coll))); +}); + +cljs.core.PersistentTreeMap.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentTreeMap.prototype.entry_at = (function (k){ +var self__ = this; +var coll = this; +var t = self__.tree; +while(true){ +if(!((t == null))){ +var c = (function (){var G__13299 = k; +var G__13300 = t.key; +return (self__.comp.cljs$core$IFn$_invoke$arity$2 ? self__.comp.cljs$core$IFn$_invoke$arity$2(G__13299,G__13300) : self__.comp.call(null,G__13299,G__13300)); +})(); +if((c === (0))){ +return t; +} else { +if((c < (0))){ +var G__13315 = t.left; +t = G__13315; +continue; +} else { +var G__13316 = t.right; +t = G__13316; +continue; + +} +} +} else { +return null; +} +break; +} +}); + +cljs.core.PersistentTreeMap.prototype.has = (function (k){ +var self__ = this; +var coll = this; +return cljs.core.contains_QMARK_(coll,k); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,k,null); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,k,not_found){ +var self__ = this; +var coll__$1 = this; +var n = coll__$1.entry_at(k); +if(!((n == null))){ +return n.val; +} else { +return not_found; +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = (function (coll,f,init){ +var self__ = this; +var coll__$1 = this; +if(!((self__.tree == null))){ +return cljs.core.tree_map_kv_reduce(self__.tree,f,init); +} else { +return init; +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.PersistentTreeMap(self__.comp,self__.tree,self__.cnt,self__.meta,self__.__hash)); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.cnt; +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IReversible$_rseq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt > (0))){ +return cljs.core.create_tree_map_seq(self__.tree,false,self__.cnt); +} else { +return null; +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_unordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_map(coll__$1,other); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentTreeMap(self__.comp,null,(0),self__.meta,(0))); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +var found = [null]; +var t = cljs.core.tree_map_remove(self__.comp,self__.tree,k,found); +if((t == null)){ +if((cljs.core.nth.cljs$core$IFn$_invoke$arity$2(found,(0)) == null)){ +return coll__$1; +} else { +return (new cljs.core.PersistentTreeMap(self__.comp,null,(0),self__.meta,null)); +} +} else { +return (new cljs.core.PersistentTreeMap(self__.comp,t.blacken(),(self__.cnt - (1)),self__.meta,null)); +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (coll,k,v){ +var self__ = this; +var coll__$1 = this; +var found = [null]; +var t = cljs.core.tree_map_add(self__.comp,self__.tree,k,v,found); +if((t == null)){ +var found_node = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(found,(0)); +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(v,found_node.val)){ +return coll__$1; +} else { +return (new cljs.core.PersistentTreeMap(self__.comp,cljs.core.tree_map_replace(self__.comp,self__.tree,k,v),self__.cnt,self__.meta,null)); +} +} else { +return (new cljs.core.PersistentTreeMap(self__.comp,t.blacken(),(self__.cnt + (1)),self__.meta,null)); +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = (function (coll,k){ +var self__ = this; +var coll__$1 = this; +return !((coll__$1.entry_at(k) == null)); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt > (0))){ +return cljs.core.create_tree_map_seq(self__.tree,true,self__.cnt); +} else { +return null; +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentTreeMap(self__.comp,self__.tree,self__.cnt,meta__$1,self__.__hash)); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,entry){ +var self__ = this; +var coll__$1 = this; +if(cljs.core.vector_QMARK_(entry)){ +return coll__$1.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry,(1))); +} else { +var ret = coll__$1; +var es = cljs.core.seq(entry); +while(true){ +if((es == null)){ +return ret; +} else { +var e = cljs.core.first(es); +if(cljs.core.vector_QMARK_(e)){ +var G__13317 = ret.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(e,(1))); +var G__13318 = cljs.core.next(es); +ret = G__13317; +es = G__13318; +continue; +} else { +throw (new Error("conj on a map takes map entries or seqables of map entries")); +} +} +break; +} +} +}); + +cljs.core.PersistentTreeMap.prototype.call = (function() { +var G__13319 = null; +var G__13319__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); +var G__13319__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); +G__13319 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13319__2.call(this,self__,k); +case 3: +return G__13319__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13319.cljs$core$IFn$_invoke$arity$2 = G__13319__2; +G__13319.cljs$core$IFn$_invoke$arity$3 = G__13319__3; +return G__13319; +})() +; + +cljs.core.PersistentTreeMap.prototype.apply = (function (self__,args13288){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args13288))); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = (function (coll,ascending_QMARK_){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt > (0))){ +return cljs.core.create_tree_map_seq(self__.tree,ascending_QMARK_,self__.cnt); +} else { +return null; +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = (function (coll,k,ascending_QMARK_){ +var self__ = this; +var coll__$1 = this; +if((self__.cnt > (0))){ +var stack = null; +var t = self__.tree; +while(true){ +if(!((t == null))){ +var c = (function (){var G__13301 = k; +var G__13302 = t.key; +return (self__.comp.cljs$core$IFn$_invoke$arity$2 ? self__.comp.cljs$core$IFn$_invoke$arity$2(G__13301,G__13302) : self__.comp.call(null,G__13301,G__13302)); +})(); +if((c === (0))){ +return (new cljs.core.PersistentTreeMapSeq(null,cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack,t),ascending_QMARK_,(-1),null)); +} else { +if(cljs.core.truth_(ascending_QMARK_)){ +if((c < (0))){ +var G__13320 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack,t); +var G__13321 = t.left; +stack = G__13320; +t = G__13321; +continue; +} else { +var G__13322 = stack; +var G__13323 = t.right; +stack = G__13322; +t = G__13323; +continue; +} +} else { +if((c > (0))){ +var G__13324 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(stack,t); +var G__13325 = t.right; +stack = G__13324; +t = G__13325; +continue; +} else { +var G__13326 = stack; +var G__13327 = t.left; +stack = G__13326; +t = G__13327; +continue; +} + +} +} +} else { +if((stack == null)){ +return null; +} else { +return (new cljs.core.PersistentTreeMapSeq(null,stack,ascending_QMARK_,(-1),null)); +} +} +break; +} +} else { +return null; +} +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_entry_key$arity$2 = (function (coll,entry){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.key.cljs$core$IFn$_invoke$arity$1 ? cljs.core.key.cljs$core$IFn$_invoke$arity$1(entry) : cljs.core.key.call(null,entry)); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_comparator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.comp; +}); + +cljs.core.PersistentTreeMap.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$comp,cljs.core.cst$sym$tree,cljs.core.cst$sym$cnt,cljs.core.cst$sym$meta,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentTreeMap.cljs$lang$type = true; + +cljs.core.PersistentTreeMap.cljs$lang$ctorStr = "cljs.core/PersistentTreeMap"; + +cljs.core.PersistentTreeMap.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentTreeMap"); +}); + +cljs.core.__GT_PersistentTreeMap = (function cljs$core$__GT_PersistentTreeMap(comp,tree,cnt,meta,__hash){ +return (new cljs.core.PersistentTreeMap(comp,tree,cnt,meta,__hash)); +}); + +cljs.core.PersistentTreeMap.EMPTY = (new cljs.core.PersistentTreeMap(cljs.core.compare,null,(0),null,cljs.core.empty_unordered_hash)); +(cljs.core.PersistentTreeMap.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * keyval => key val + * Returns a new hash map with supplied mappings. + */ +cljs.core.hash_map = (function cljs$core$hash_map(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13329 = arguments.length; +var i__9182__auto___13330 = (0); +while(true){ +if((i__9182__auto___13330 < len__9181__auto___13329)){ +args__9188__auto__.push((arguments[i__9182__auto___13330])); + +var G__13331 = (i__9182__auto___13330 + (1)); +i__9182__auto___13330 = G__13331; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic = (function (keyvals){ +var in$ = cljs.core.seq(keyvals); +var out = cljs.core.transient$(cljs.core.PersistentHashMap.EMPTY); +while(true){ +if(in$){ +var G__13332 = cljs.core.nnext(in$); +var G__13333 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(out,cljs.core.first(in$),cljs.core.second(in$)); +in$ = G__13332; +out = G__13333; +continue; +} else { +return cljs.core.persistent_BANG_(out); +} +break; +} +}); + +cljs.core.hash_map.cljs$lang$maxFixedArity = (0); + +cljs.core.hash_map.cljs$lang$applyTo = (function (seq13328){ +return cljs.core.hash_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13328)); +}); + +/** + * keyval => key val + * Returns a new array map with supplied mappings. + */ +cljs.core.array_map = (function cljs$core$array_map(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13335 = arguments.length; +var i__9182__auto___13336 = (0); +while(true){ +if((i__9182__auto___13336 < len__9181__auto___13335)){ +args__9188__auto__.push((arguments[i__9182__auto___13336])); + +var G__13337 = (i__9182__auto___13336 + (1)); +i__9182__auto___13336 = G__13337; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic = (function (keyvals){ +var arr = ((((keyvals instanceof cljs.core.IndexedSeq)) && ((keyvals.i === (0))))?keyvals.arr:cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(keyvals)); +return cljs.core.PersistentArrayMap.createAsIfByAssoc(arr); +}); + +cljs.core.array_map.cljs$lang$maxFixedArity = (0); + +cljs.core.array_map.cljs$lang$applyTo = (function (seq13334){ +return cljs.core.array_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13334)); +}); + +/** + * keyval => key val + * Returns a new object map with supplied mappings. + */ +cljs.core.obj_map = (function cljs$core$obj_map(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13341 = arguments.length; +var i__9182__auto___13342 = (0); +while(true){ +if((i__9182__auto___13342 < len__9181__auto___13341)){ +args__9188__auto__.push((arguments[i__9182__auto___13342])); + +var G__13343 = (i__9182__auto___13342 + (1)); +i__9182__auto___13342 = G__13343; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic = (function (keyvals){ +var ks = []; +var obj = {}; +var kvs = cljs.core.seq(keyvals); +while(true){ +if(kvs){ +ks.push(cljs.core.first(kvs)); + +(obj[cljs.core.first(kvs)] = cljs.core.second(kvs)); + +var G__13344 = cljs.core.nnext(kvs); +kvs = G__13344; +continue; +} else { +return cljs.core.ObjMap.fromObject(ks,obj); +} +break; +} +}); + +cljs.core.obj_map.cljs$lang$maxFixedArity = (0); + +cljs.core.obj_map.cljs$lang$applyTo = (function (seq13338){ +return cljs.core.obj_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13338)); +}); + +/** + * keyval => key val + * Returns a new sorted map with supplied mappings. + */ +cljs.core.sorted_map = (function cljs$core$sorted_map(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13346 = arguments.length; +var i__9182__auto___13347 = (0); +while(true){ +if((i__9182__auto___13347 < len__9181__auto___13346)){ +args__9188__auto__.push((arguments[i__9182__auto___13347])); + +var G__13348 = (i__9182__auto___13347 + (1)); +i__9182__auto___13347 = G__13348; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic = (function (keyvals){ +var in$ = cljs.core.seq(keyvals); +var out = cljs.core.PersistentTreeMap.EMPTY; +while(true){ +if(in$){ +var G__13349 = cljs.core.nnext(in$); +var G__13350 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(out,cljs.core.first(in$),cljs.core.second(in$)); +in$ = G__13349; +out = G__13350; +continue; +} else { +return out; +} +break; +} +}); + +cljs.core.sorted_map.cljs$lang$maxFixedArity = (0); + +cljs.core.sorted_map.cljs$lang$applyTo = (function (seq13345){ +return cljs.core.sorted_map.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13345)); +}); + +/** + * keyval => key val + * Returns a new sorted map with supplied mappings, using the supplied comparator. + */ +cljs.core.sorted_map_by = (function cljs$core$sorted_map_by(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13353 = arguments.length; +var i__9182__auto___13354 = (0); +while(true){ +if((i__9182__auto___13354 < len__9181__auto___13353)){ +args__9188__auto__.push((arguments[i__9182__auto___13354])); + +var G__13355 = (i__9182__auto___13354 + (1)); +i__9182__auto___13354 = G__13355; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic = (function (comparator,keyvals){ +var in$ = cljs.core.seq(keyvals); +var out = (new cljs.core.PersistentTreeMap(cljs.core.fn__GT_comparator(comparator),null,(0),null,(0))); +while(true){ +if(in$){ +var G__13356 = cljs.core.nnext(in$); +var G__13357 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(out,cljs.core.first(in$),cljs.core.second(in$)); +in$ = G__13356; +out = G__13357; +continue; +} else { +return out; +} +break; +} +}); + +cljs.core.sorted_map_by.cljs$lang$maxFixedArity = (1); + +cljs.core.sorted_map_by.cljs$lang$applyTo = (function (seq13351){ +var G__13352 = cljs.core.first(seq13351); +var seq13351__$1 = cljs.core.next(seq13351); +return cljs.core.sorted_map_by.cljs$core$IFn$_invoke$arity$variadic(G__13352,seq13351__$1); +}); + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.KeySeq = (function (mseq,_meta){ +this.mseq = mseq; +this._meta = _meta; +this.cljs$lang$protocol_mask$partition0$ = 32374988; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.KeySeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.KeySeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.KeySeq.prototype.indexOf = (function() { +var G__13360 = null; +var G__13360__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13360__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13360 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13360__1.call(this,x); +case 2: +return G__13360__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13360.cljs$core$IFn$_invoke$arity$1 = G__13360__1; +G__13360.cljs$core$IFn$_invoke$arity$2 = G__13360__2; +return G__13360; +})() +; + +cljs.core.KeySeq.prototype.lastIndexOf = (function() { +var G__13361 = null; +var G__13361__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13361__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13361 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13361__1.call(this,x); +case 2: +return G__13361__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13361.cljs$core$IFn$_invoke$arity$1 = G__13361__1; +G__13361.cljs$core$IFn$_invoke$arity$2 = G__13361__2; +return G__13361; +})() +; + +cljs.core.KeySeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__._meta; +}); + +cljs.core.KeySeq.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var nseq = ((((!((self__.mseq == null)))?((((self__.mseq.cljs$lang$protocol_mask$partition0$ & (128))) || ((cljs.core.PROTOCOL_SENTINEL === self__.mseq.cljs$core$INext$)))?true:(((!self__.mseq.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq):false)):cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq)))?self__.mseq.cljs$core$INext$_next$arity$1(null):cljs.core.next(self__.mseq)); +if((nseq == null)){ +return null; +} else { +return (new cljs.core.KeySeq(nseq,self__._meta)); +} +}); + +cljs.core.KeySeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.hash_ordered_coll(coll__$1); +}); + +cljs.core.KeySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.KeySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__._meta); +}); + +cljs.core.KeySeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.KeySeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.KeySeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var me = self__.mseq.cljs$core$ISeq$_first$arity$1(null); +return me.cljs$core$IMapEntry$_key$arity$1(null); +}); + +cljs.core.KeySeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var nseq = ((((!((self__.mseq == null)))?((((self__.mseq.cljs$lang$protocol_mask$partition0$ & (128))) || ((cljs.core.PROTOCOL_SENTINEL === self__.mseq.cljs$core$INext$)))?true:(((!self__.mseq.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq):false)):cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq)))?self__.mseq.cljs$core$INext$_next$arity$1(null):cljs.core.next(self__.mseq)); +if(!((nseq == null))){ +return (new cljs.core.KeySeq(nseq,self__._meta)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.KeySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.KeySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,new_meta){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.KeySeq(self__.mseq,new_meta)); +}); + +cljs.core.KeySeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.KeySeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$mseq,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$not_DASH_native], null)),cljs.core.cst$sym$_meta], null); +}); + +cljs.core.KeySeq.cljs$lang$type = true; + +cljs.core.KeySeq.cljs$lang$ctorStr = "cljs.core/KeySeq"; + +cljs.core.KeySeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/KeySeq"); +}); + +cljs.core.__GT_KeySeq = (function cljs$core$__GT_KeySeq(mseq,_meta){ +return (new cljs.core.KeySeq(mseq,_meta)); +}); + +(cljs.core.KeySeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Returns a sequence of the map's keys. + */ +cljs.core.keys = (function cljs$core$keys(hash_map){ +var temp__5278__auto__ = cljs.core.seq(hash_map); +if(temp__5278__auto__){ +var mseq = temp__5278__auto__; +return (new cljs.core.KeySeq(mseq,null)); +} else { +return null; +} +}); +/** + * Returns the key of the map entry. + */ +cljs.core.key = (function cljs$core$key(map_entry){ +return cljs.core._key(map_entry); +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.ValSeq = (function (mseq,_meta){ +this.mseq = mseq; +this._meta = _meta; +this.cljs$lang$protocol_mask$partition0$ = 32374988; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.ValSeq.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.ValSeq.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.ValSeq.prototype.indexOf = (function() { +var G__13364 = null; +var G__13364__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13364__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13364 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13364__1.call(this,x); +case 2: +return G__13364__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13364.cljs$core$IFn$_invoke$arity$1 = G__13364__1; +G__13364.cljs$core$IFn$_invoke$arity$2 = G__13364__2; +return G__13364; +})() +; + +cljs.core.ValSeq.prototype.lastIndexOf = (function() { +var G__13365 = null; +var G__13365__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13365__2 = (function (x,start){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start); +}); +G__13365 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13365__1.call(this,x); +case 2: +return G__13365__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13365.cljs$core$IFn$_invoke$arity$1 = G__13365__1; +G__13365.cljs$core$IFn$_invoke$arity$2 = G__13365__2; +return G__13365; +})() +; + +cljs.core.ValSeq.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__._meta; +}); + +cljs.core.ValSeq.prototype.cljs$core$INext$_next$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var nseq = ((((!((self__.mseq == null)))?((((self__.mseq.cljs$lang$protocol_mask$partition0$ & (128))) || ((cljs.core.PROTOCOL_SENTINEL === self__.mseq.cljs$core$INext$)))?true:(((!self__.mseq.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq):false)):cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq)))?self__.mseq.cljs$core$INext$_next$arity$1(null):cljs.core.next(self__.mseq)); +if((nseq == null)){ +return null; +} else { +return (new cljs.core.ValSeq(nseq,self__._meta)); +} +}); + +cljs.core.ValSeq.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.hash_ordered_coll(coll__$1); +}); + +cljs.core.ValSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return cljs.core.equiv_sequential(coll__$1,other); +}); + +cljs.core.ValSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__._meta); +}); + +cljs.core.ValSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (coll,f){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$2(f,coll__$1); +}); + +cljs.core.ValSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (coll,f,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core.seq_reduce.cljs$core$IFn$_invoke$arity$3(f,start,coll__$1); +}); + +cljs.core.ValSeq.prototype.cljs$core$ISeq$_first$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var me = self__.mseq.cljs$core$ISeq$_first$arity$1(null); +return me.cljs$core$IMapEntry$_val$arity$1(null); +}); + +cljs.core.ValSeq.prototype.cljs$core$ISeq$_rest$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var nseq = ((((!((self__.mseq == null)))?((((self__.mseq.cljs$lang$protocol_mask$partition0$ & (128))) || ((cljs.core.PROTOCOL_SENTINEL === self__.mseq.cljs$core$INext$)))?true:(((!self__.mseq.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq):false)):cljs.core.native_satisfies_QMARK_(cljs.core.INext,self__.mseq)))?self__.mseq.cljs$core$INext$_next$arity$1(null):cljs.core.next(self__.mseq)); +if(!((nseq == null))){ +return (new cljs.core.ValSeq(nseq,self__._meta)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.ValSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return coll__$1; +}); + +cljs.core.ValSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,new_meta){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.ValSeq(self__.mseq,new_meta)); +}); + +cljs.core.ValSeq.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return cljs.core.cons(o,coll__$1); +}); + +cljs.core.ValSeq.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$mseq,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$not_DASH_native], null)),cljs.core.cst$sym$_meta], null); +}); + +cljs.core.ValSeq.cljs$lang$type = true; + +cljs.core.ValSeq.cljs$lang$ctorStr = "cljs.core/ValSeq"; + +cljs.core.ValSeq.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ValSeq"); +}); + +cljs.core.__GT_ValSeq = (function cljs$core$__GT_ValSeq(mseq,_meta){ +return (new cljs.core.ValSeq(mseq,_meta)); +}); + +(cljs.core.ValSeq.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Returns a sequence of the map's values. + */ +cljs.core.vals = (function cljs$core$vals(hash_map){ +var temp__5278__auto__ = cljs.core.seq(hash_map); +if(temp__5278__auto__){ +var mseq = temp__5278__auto__; +return (new cljs.core.ValSeq(mseq,null)); +} else { +return null; +} +}); +/** + * Returns the value in the map entry. + */ +cljs.core.val = (function cljs$core$val(map_entry){ +return cljs.core._val(map_entry); +}); +/** + * Returns a map that consists of the rest of the maps conj-ed onto + * the first. If a key occurs in more than one map, the mapping from + * the latter (left-to-right) will be the mapping in the result. + */ +cljs.core.merge = (function cljs$core$merge(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13369 = arguments.length; +var i__9182__auto___13370 = (0); +while(true){ +if((i__9182__auto___13370 < len__9181__auto___13369)){ +args__9188__auto__.push((arguments[i__9182__auto___13370])); + +var G__13371 = (i__9182__auto___13370 + (1)); +i__9182__auto___13370 = G__13371; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic = (function (maps){ +if(cljs.core.truth_(cljs.core.some(cljs.core.identity,maps))){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$2((function (p1__13366_SHARP_,p2__13367_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2((function (){var or__7960__auto__ = p1__13366_SHARP_; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.PersistentArrayMap.EMPTY; +} +})(),p2__13367_SHARP_); +}),maps); +} else { +return null; +} +}); + +cljs.core.merge.cljs$lang$maxFixedArity = (0); + +cljs.core.merge.cljs$lang$applyTo = (function (seq13368){ +return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13368)); +}); + +/** + * Returns a map that consists of the rest of the maps conj-ed onto + * the first. If a key occurs in more than one map, the mapping(s) + * from the latter (left-to-right) will be combined with the mapping in + * the result by calling (f val-in-result val-in-latter). + */ +cljs.core.merge_with = (function cljs$core$merge_with(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13376 = arguments.length; +var i__9182__auto___13377 = (0); +while(true){ +if((i__9182__auto___13377 < len__9181__auto___13376)){ +args__9188__auto__.push((arguments[i__9182__auto___13377])); + +var G__13378 = (i__9182__auto___13377 + (1)); +i__9182__auto___13377 = G__13378; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic = (function (f,maps){ +if(cljs.core.truth_(cljs.core.some(cljs.core.identity,maps))){ +var merge_entry = (function (m,e){ +var k = cljs.core.first(e); +var v = cljs.core.second(e); +if(cljs.core.contains_QMARK_(m,k)){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,(function (){var G__13374 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(m,k); +var G__13375 = v; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__13374,G__13375) : f.call(null,G__13374,G__13375)); +})()); +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,v); +} +}); +var merge2 = ((function (merge_entry){ +return (function (m1,m2){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(merge_entry,(function (){var or__7960__auto__ = m1; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.PersistentArrayMap.EMPTY; +} +})(),cljs.core.seq(m2)); +});})(merge_entry)) +; +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$2(merge2,maps); +} else { +return null; +} +}); + +cljs.core.merge_with.cljs$lang$maxFixedArity = (1); + +cljs.core.merge_with.cljs$lang$applyTo = (function (seq13372){ +var G__13373 = cljs.core.first(seq13372); +var seq13372__$1 = cljs.core.next(seq13372); +return cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic(G__13373,seq13372__$1); +}); + +/** + * Returns a map containing only those entries in map whose key is in keys + */ +cljs.core.select_keys = (function cljs$core$select_keys(map,keyseq){ +var ret = cljs.core.PersistentArrayMap.EMPTY; +var keys = cljs.core.seq(keyseq); +while(true){ +if(keys){ +var key = cljs.core.first(keys); +var entry = cljs.core.get.cljs$core$IFn$_invoke$arity$3(map,key,cljs.core.cst$kw$cljs$core_SLASH_not_DASH_found); +var G__13379 = ((cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(entry,cljs.core.cst$kw$cljs$core_SLASH_not_DASH_found))?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(ret,key,entry):ret); +var G__13380 = cljs.core.next(keys); +ret = G__13379; +keys = G__13380; +continue; +} else { +return cljs.core._with_meta(ret,cljs.core.meta(map)); +} +break; +} +}); + +/** +* @constructor +*/ +cljs.core.HashSetIter = (function (iter){ +this.iter = iter; +}) +cljs.core.HashSetIter.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +return self__.iter.hasNext(); +}); + +cljs.core.HashSetIter.prototype.next = (function (){ +var self__ = this; +var _ = this; +if(self__.iter.hasNext()){ +return (self__.iter.next().tail[(0)]); +} else { +throw (new Error("No such element")); +} +}); + +cljs.core.HashSetIter.prototype.remove = (function (){ +var self__ = this; +var _ = this; +return (new Error("Unsupported operation")); +}); + +cljs.core.HashSetIter.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$iter], null); +}); + +cljs.core.HashSetIter.cljs$lang$type = true; + +cljs.core.HashSetIter.cljs$lang$ctorStr = "cljs.core/HashSetIter"; + +cljs.core.HashSetIter.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/HashSetIter"); +}); + +cljs.core.__GT_HashSetIter = (function cljs$core$__GT_HashSetIter(iter){ +return (new cljs.core.HashSetIter(iter)); +}); + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEditableCollection} + * @implements {cljs.core.ISet} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.ILookup} +*/ +cljs.core.PersistentHashSet = (function (meta,hash_map,__hash){ +this.meta = meta; +this.hash_map = hash_map; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 15077647; +this.cljs$lang$protocol_mask$partition1$ = 8196; +}) +cljs.core.PersistentHashSet.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentHashSet.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentHashSet.prototype.keys = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentHashSet.prototype.entries = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_set_entries_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentHashSet.prototype.values = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentHashSet.prototype.has = (function (k){ +var self__ = this; +var coll = this; +return cljs.core.contains_QMARK_(coll,k); +}); + +cljs.core.PersistentHashSet.prototype.forEach = (function (f){ +var self__ = this; +var coll = this; +var seq__13383 = cljs.core.seq(coll); +var chunk__13384 = null; +var count__13385 = (0); +var i__13386 = (0); +while(true){ +if((i__13386 < count__13385)){ +var vec__13387 = chunk__13384.cljs$core$IIndexed$_nth$arity$2(null,i__13386); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13387,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13387,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13393 = seq__13383; +var G__13394 = chunk__13384; +var G__13395 = count__13385; +var G__13396 = (i__13386 + (1)); +seq__13383 = G__13393; +chunk__13384 = G__13394; +count__13385 = G__13395; +i__13386 = G__13396; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__13383); +if(temp__5278__auto__){ +var seq__13383__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__13383__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__13383__$1); +var G__13397 = cljs.core.chunk_rest(seq__13383__$1); +var G__13398 = c__8871__auto__; +var G__13399 = cljs.core.count(c__8871__auto__); +var G__13400 = (0); +seq__13383 = G__13397; +chunk__13384 = G__13398; +count__13385 = G__13399; +i__13386 = G__13400; +continue; +} else { +var vec__13390 = cljs.core.first(seq__13383__$1); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13390,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13390,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13401 = cljs.core.next(seq__13383__$1); +var G__13402 = null; +var G__13403 = (0); +var G__13404 = (0); +seq__13383 = G__13401; +chunk__13384 = G__13402; +count__13385 = G__13403; +i__13386 = G__13404; +continue; +} +} else { +return null; +} +} +break; +} +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,v){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,v,null); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,v,not_found){ +var self__ = this; +var coll__$1 = this; +if(cljs.core._contains_key_QMARK_(self__.hash_map,v)){ +return v; +} else { +return not_found; +} +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentHashSet.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.HashSetIter(cljs.core._iterator(self__.hash_map))); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.PersistentHashSet(self__.meta,self__.hash_map,self__.__hash)); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._count(self__.hash_map); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_unordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.set_QMARK_(other)) && ((cljs.core.count(coll__$1) === cljs.core.count(other))) && (cljs.core.every_QMARK_(((function (coll__$1){ +return (function (p1__13381_SHARP_){ +return cljs.core.contains_QMARK_(coll__$1,p1__13381_SHARP_); +});})(coll__$1)) +,other)); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.TransientHashSet(cljs.core._as_transient(self__.hash_map))); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._with_meta(cljs.core.PersistentHashSet.EMPTY,self__.meta); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$ISet$_disjoin$arity$2 = (function (coll,v){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentHashSet(self__.meta,cljs.core._dissoc(self__.hash_map,v),null)); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.keys(self__.hash_map); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentHashSet(meta__$1,self__.hash_map,self__.__hash)); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentHashSet(self__.meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.hash_map,o,null),null)); +}); + +cljs.core.PersistentHashSet.prototype.call = (function() { +var G__13405 = null; +var G__13405__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); +var G__13405__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); +G__13405 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13405__2.call(this,self__,k); +case 3: +return G__13405__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13405.cljs$core$IFn$_invoke$arity$2 = G__13405__2; +G__13405.cljs$core$IFn$_invoke$arity$3 = G__13405__3; +return G__13405; +})() +; + +cljs.core.PersistentHashSet.prototype.apply = (function (self__,args13382){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args13382))); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentHashSet.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$hash_DASH_map,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentHashSet.cljs$lang$type = true; + +cljs.core.PersistentHashSet.cljs$lang$ctorStr = "cljs.core/PersistentHashSet"; + +cljs.core.PersistentHashSet.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentHashSet"); +}); + +cljs.core.__GT_PersistentHashSet = (function cljs$core$__GT_PersistentHashSet(meta,hash_map,__hash){ +return (new cljs.core.PersistentHashSet(meta,hash_map,__hash)); +}); + +cljs.core.PersistentHashSet.EMPTY = (new cljs.core.PersistentHashSet(null,cljs.core.PersistentArrayMap.EMPTY,cljs.core.empty_unordered_hash)); +cljs.core.PersistentHashSet.fromArray = (function (items,no_clone){ +var len = items.length; +if((len <= cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD)){ +var arr = ((no_clone)?items:cljs.core.aclone(items)); +var i = (0); +var out = cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY); +while(true){ +if((i < len)){ +var G__13406 = (i + (1)); +var G__13407 = cljs.core._assoc_BANG_(out,(items[i]),null); +i = G__13406; +out = G__13407; +continue; +} else { +return (new cljs.core.PersistentHashSet(null,cljs.core._persistent_BANG_(out),null)); +} +break; +} +} else { +var i = (0); +var out = cljs.core.transient$(cljs.core.PersistentHashSet.EMPTY); +while(true){ +if((i < len)){ +var G__13408 = (i + (1)); +var G__13409 = cljs.core._conj_BANG_(out,(items[i])); +i = G__13408; +out = G__13409; +continue; +} else { +return cljs.core._persistent_BANG_(out); +} +break; +} +} +}); +cljs.core.PersistentHashSet.createWithCheck = (function (items){ +var len = items.length; +var t = cljs.core._as_transient(cljs.core.PersistentHashSet.EMPTY); +var n__8981__auto___13410 = len; +var i_13411 = (0); +while(true){ +if((i_13411 < n__8981__auto___13410)){ +cljs.core._conj_BANG_(t,(items[i_13411])); + +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.count(t),(i_13411 + (1)))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Duplicate key: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1((items[i_13411]))].join(''))); +} + +var G__13412 = (i_13411 + (1)); +i_13411 = G__13412; +continue; +} else { +} +break; +} + +return cljs.core._persistent_BANG_(t); +}); +cljs.core.PersistentHashSet.createAsIfByAssoc = (function (items){ +var len = items.length; +var t = cljs.core._as_transient(cljs.core.PersistentHashSet.EMPTY); +var n__8981__auto___13413 = len; +var i_13414 = (0); +while(true){ +if((i_13414 < n__8981__auto___13413)){ +cljs.core._conj_BANG_(t,(items[i_13414])); + +var G__13415 = (i_13414 + (1)); +i_13414 = G__13415; +continue; +} else { +} +break; +} + +return cljs.core._persistent_BANG_(t); +}); +(cljs.core.PersistentHashSet.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); + +/** +* @constructor + * @implements {cljs.core.ITransientSet} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ITransientCollection} + * @implements {cljs.core.ILookup} +*/ +cljs.core.TransientHashSet = (function (transient_map){ +this.transient_map = transient_map; +this.cljs$lang$protocol_mask$partition1$ = 136; +this.cljs$lang$protocol_mask$partition0$ = 259; +}) +cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = (function (tcoll,o){ +var self__ = this; +var tcoll__$1 = this; +self__.transient_map = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(self__.transient_map,o,null); + +return tcoll__$1; +}); + +cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = (function (tcoll){ +var self__ = this; +var tcoll__$1 = this; +return (new cljs.core.PersistentHashSet(null,cljs.core.persistent_BANG_(self__.transient_map),null)); +}); + +cljs.core.TransientHashSet.prototype.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 = (function (tcoll,v){ +var self__ = this; +var tcoll__$1 = this; +self__.transient_map = cljs.core.dissoc_BANG_.cljs$core$IFn$_invoke$arity$2(self__.transient_map,v); + +return tcoll__$1; +}); + +cljs.core.TransientHashSet.prototype.cljs$core$ICounted$_count$arity$1 = (function (tcoll){ +var self__ = this; +var tcoll__$1 = this; +return cljs.core.count(self__.transient_map); +}); + +cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (tcoll,v){ +var self__ = this; +var tcoll__$1 = this; +return tcoll__$1.cljs$core$ILookup$_lookup$arity$3(null,v,null); +}); + +cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (tcoll,v,not_found){ +var self__ = this; +var tcoll__$1 = this; +if((cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map,v,cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)){ +return not_found; +} else { +return v; +} +}); + +cljs.core.TransientHashSet.prototype.call = (function() { +var G__13417 = null; +var G__13417__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var tcoll = self____$1; +if((cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map,k,cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)){ +return null; +} else { +return k; +} +}); +var G__13417__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var tcoll = self____$1; +if((cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map,k,cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)){ +return not_found; +} else { +return k; +} +}); +G__13417 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13417__2.call(this,self__,k); +case 3: +return G__13417__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13417.cljs$core$IFn$_invoke$arity$2 = G__13417__2; +G__13417.cljs$core$IFn$_invoke$arity$3 = G__13417__3; +return G__13417; +})() +; + +cljs.core.TransientHashSet.prototype.apply = (function (self__,args13416){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args13416))); +}); + +cljs.core.TransientHashSet.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var tcoll = this; +if((cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map,k,cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)){ +return null; +} else { +return k; +} +}); + +cljs.core.TransientHashSet.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var tcoll = this; +if((cljs.core._lookup.cljs$core$IFn$_invoke$arity$3(self__.transient_map,k,cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel)){ +return not_found; +} else { +return k; +} +}); + +cljs.core.TransientHashSet.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$transient_DASH_map,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.TransientHashSet.cljs$lang$type = true; + +cljs.core.TransientHashSet.cljs$lang$ctorStr = "cljs.core/TransientHashSet"; + +cljs.core.TransientHashSet.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/TransientHashSet"); +}); + +cljs.core.__GT_TransientHashSet = (function cljs$core$__GT_TransientHashSet(transient_map){ +return (new cljs.core.TransientHashSet(transient_map)); +}); + + +/** +* @constructor + * @implements {cljs.core.IReversible} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.ISet} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISorted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.ILookup} +*/ +cljs.core.PersistentTreeSet = (function (meta,tree_map,__hash){ +this.meta = meta; +this.tree_map = tree_map; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 417730831; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.PersistentTreeSet.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.PersistentTreeSet.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.PersistentTreeSet.prototype.keys = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentTreeSet.prototype.entries = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_set_entries_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentTreeSet.prototype.values = (function (){ +var self__ = this; +var coll = this; +return cljs.core.es6_iterator(cljs.core.seq(coll)); +}); + +cljs.core.PersistentTreeSet.prototype.has = (function (k){ +var self__ = this; +var coll = this; +return cljs.core.contains_QMARK_(coll,k); +}); + +cljs.core.PersistentTreeSet.prototype.forEach = (function (f){ +var self__ = this; +var coll = this; +var seq__13420 = cljs.core.seq(coll); +var chunk__13421 = null; +var count__13422 = (0); +var i__13423 = (0); +while(true){ +if((i__13423 < count__13422)){ +var vec__13424 = chunk__13421.cljs$core$IIndexed$_nth$arity$2(null,i__13423); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13424,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13424,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13430 = seq__13420; +var G__13431 = chunk__13421; +var G__13432 = count__13422; +var G__13433 = (i__13423 + (1)); +seq__13420 = G__13430; +chunk__13421 = G__13431; +count__13422 = G__13432; +i__13423 = G__13433; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__13420); +if(temp__5278__auto__){ +var seq__13420__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__13420__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__13420__$1); +var G__13434 = cljs.core.chunk_rest(seq__13420__$1); +var G__13435 = c__8871__auto__; +var G__13436 = cljs.core.count(c__8871__auto__); +var G__13437 = (0); +seq__13420 = G__13434; +chunk__13421 = G__13435; +count__13422 = G__13436; +i__13423 = G__13437; +continue; +} else { +var vec__13427 = cljs.core.first(seq__13420__$1); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13427,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13427,(1),null); +(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(v,k) : f.call(null,v,k)); + +var G__13438 = cljs.core.next(seq__13420__$1); +var G__13439 = null; +var G__13440 = (0); +var G__13441 = (0); +seq__13420 = G__13438; +chunk__13421 = G__13439; +count__13422 = G__13440; +i__13423 = G__13441; +continue; +} +} else { +return null; +} +} +break; +} +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (coll,v){ +var self__ = this; +var coll__$1 = this; +return coll__$1.cljs$core$ILookup$_lookup$arity$3(null,v,null); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (coll,v,not_found){ +var self__ = this; +var coll__$1 = this; +var n = self__.tree_map.entry_at(v); +if(!((n == null))){ +return n.key; +} else { +return not_found; +} +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IMeta$_meta$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return self__.meta; +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.PersistentTreeSet(self__.meta,self__.tree_map,self__.__hash)); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ICounted$_count$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.count(self__.tree_map); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IReversible$_rseq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +if((cljs.core.count(self__.tree_map) > (0))){ +return cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.key,cljs.core.rseq(self__.tree_map)); +} else { +return null; +} +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IHash$_hash$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_unordered_coll(coll__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (coll,other){ +var self__ = this; +var coll__$1 = this; +return (cljs.core.set_QMARK_(other)) && ((cljs.core.count(coll__$1) === cljs.core.count(other))) && (cljs.core.every_QMARK_(((function (coll__$1){ +return (function (p1__13418_SHARP_){ +return cljs.core.contains_QMARK_(coll__$1,p1__13418_SHARP_); +});})(coll__$1)) +,other)); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentTreeSet(self__.meta,cljs.core._empty(self__.tree_map),(0))); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ISet$_disjoin$arity$2 = (function (coll,v){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentTreeSet(self__.meta,cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.tree_map,v),null)); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core.keys(self__.tree_map); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (coll,meta__$1){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentTreeSet(meta__$1,self__.tree_map,self__.__hash)); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ICollection$_conj$arity$2 = (function (coll,o){ +var self__ = this; +var coll__$1 = this; +return (new cljs.core.PersistentTreeSet(self__.meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.tree_map,o,null),null)); +}); + +cljs.core.PersistentTreeSet.prototype.call = (function() { +var G__13442 = null; +var G__13442__2 = (function (self__,k){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); +var G__13442__3 = (function (self__,k,not_found){ +var self__ = this; +var self____$1 = this; +var coll = self____$1; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); +G__13442 = function(self__,k,not_found){ +switch(arguments.length){ +case 2: +return G__13442__2.call(this,self__,k); +case 3: +return G__13442__3.call(this,self__,k,not_found); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13442.cljs$core$IFn$_invoke$arity$2 = G__13442__2; +G__13442.cljs$core$IFn$_invoke$arity$3 = G__13442__3; +return G__13442; +})() +; + +cljs.core.PersistentTreeSet.prototype.apply = (function (self__,args13419){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args13419))); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IFn$_invoke$arity$1 = (function (k){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$2(null,k); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IFn$_invoke$arity$2 = (function (k,not_found){ +var self__ = this; +var coll = this; +return coll.cljs$core$ILookup$_lookup$arity$3(null,k,not_found); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = (function (coll,ascending_QMARK_){ +var self__ = this; +var coll__$1 = this; +return cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.key,cljs.core._sorted_seq(self__.tree_map,ascending_QMARK_)); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = (function (coll,k,ascending_QMARK_){ +var self__ = this; +var coll__$1 = this; +return cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.key,cljs.core._sorted_seq_from(self__.tree_map,k,ascending_QMARK_)); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_entry_key$arity$2 = (function (coll,entry){ +var self__ = this; +var coll__$1 = this; +return entry; +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_comparator$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +return cljs.core._comparator(self__.tree_map); +}); + +cljs.core.PersistentTreeSet.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$tree_DASH_map,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.PersistentTreeSet.cljs$lang$type = true; + +cljs.core.PersistentTreeSet.cljs$lang$ctorStr = "cljs.core/PersistentTreeSet"; + +cljs.core.PersistentTreeSet.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/PersistentTreeSet"); +}); + +cljs.core.__GT_PersistentTreeSet = (function cljs$core$__GT_PersistentTreeSet(meta,tree_map,__hash){ +return (new cljs.core.PersistentTreeSet(meta,tree_map,__hash)); +}); + +cljs.core.PersistentTreeSet.EMPTY = (new cljs.core.PersistentTreeSet(null,cljs.core.PersistentTreeMap.EMPTY,cljs.core.empty_unordered_hash)); +(cljs.core.PersistentTreeSet.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +cljs.core.set_from_indexed_seq = (function cljs$core$set_from_indexed_seq(iseq){ +var arr = iseq.arr; +var ret = (function (){var a__8975__auto__ = arr; +var i = (0); +var res = cljs.core._as_transient(cljs.core.PersistentHashSet.EMPTY); +while(true){ +if((i < a__8975__auto__.length)){ +var G__13443 = (i + (1)); +var G__13444 = res.cljs$core$ITransientCollection$_conj_BANG_$arity$2(null,(arr[i])); +i = G__13443; +res = G__13444; +continue; +} else { +return res; +} +break; +} +})(); +return ret.cljs$core$ITransientCollection$_persistent_BANG_$arity$1(null); +}); +/** + * Returns a set of the distinct elements of coll. + */ +cljs.core.set = (function cljs$core$set(coll){ +var in$ = cljs.core.seq(coll); +if((in$ == null)){ +return cljs.core.PersistentHashSet.EMPTY; +} else { +if(((in$ instanceof cljs.core.IndexedSeq)) && ((in$.i === (0)))){ +return cljs.core.PersistentHashSet.createAsIfByAssoc(in$.arr); +} else { +var in$__$1 = in$; +var out = cljs.core._as_transient(cljs.core.PersistentHashSet.EMPTY); +while(true){ +if(!((in$__$1 == null))){ +var G__13445 = cljs.core.next(in$__$1); +var G__13446 = out.cljs$core$ITransientCollection$_conj_BANG_$arity$2(null,in$__$1.cljs$core$ISeq$_first$arity$1(null)); +in$__$1 = G__13445; +out = G__13446; +continue; +} else { +return cljs.core.persistent_BANG_(out); +} +break; +} + +} +} +}); +/** + * Returns a new hash set with supplied keys. Any equal keys are + * handled as if by repeated uses of conj. + */ +cljs.core.hash_set = (function cljs$core$hash_set(var_args){ +var args13447 = []; +var len__9181__auto___13451 = arguments.length; +var i__9182__auto___13452 = (0); +while(true){ +if((i__9182__auto___13452 < len__9181__auto___13451)){ +args13447.push((arguments[i__9182__auto___13452])); + +var G__13453 = (i__9182__auto___13452 + (1)); +i__9182__auto___13452 = G__13453; +continue; +} else { +} +break; +} + +var G__13450 = args13447.length; +switch (G__13450) { +case 0: +return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$0(); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args13447.slice((0)),(0),null)); +return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic(argseq__9204__auto__); + +} +}); + +cljs.core.hash_set.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.PersistentHashSet.EMPTY; +}); + +cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic = (function (keys){ +return cljs.core.set(keys); +}); + +cljs.core.hash_set.cljs$lang$applyTo = (function (seq13448){ +return cljs.core.hash_set.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13448)); +}); + +cljs.core.hash_set.cljs$lang$maxFixedArity = (0); + +/** + * Returns a new sorted set with supplied keys. + */ +cljs.core.sorted_set = (function cljs$core$sorted_set(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13456 = arguments.length; +var i__9182__auto___13457 = (0); +while(true){ +if((i__9182__auto___13457 < len__9181__auto___13456)){ +args__9188__auto__.push((arguments[i__9182__auto___13457])); + +var G__13458 = (i__9182__auto___13457 + (1)); +i__9182__auto___13457 = G__13458; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic = (function (keys){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,cljs.core.PersistentTreeSet.EMPTY,keys); +}); + +cljs.core.sorted_set.cljs$lang$maxFixedArity = (0); + +cljs.core.sorted_set.cljs$lang$applyTo = (function (seq13455){ +return cljs.core.sorted_set.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13455)); +}); + +/** + * Returns a new sorted set with supplied keys, using the supplied comparator. + */ +cljs.core.sorted_set_by = (function cljs$core$sorted_set_by(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13461 = arguments.length; +var i__9182__auto___13462 = (0); +while(true){ +if((i__9182__auto___13462 < len__9181__auto___13461)){ +args__9188__auto__.push((arguments[i__9182__auto___13462])); + +var G__13463 = (i__9182__auto___13462 + (1)); +i__9182__auto___13462 = G__13463; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic = (function (comparator,keys){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,(new cljs.core.PersistentTreeSet(null,cljs.core.sorted_map_by(comparator),(0))),keys); +}); + +cljs.core.sorted_set_by.cljs$lang$maxFixedArity = (1); + +cljs.core.sorted_set_by.cljs$lang$applyTo = (function (seq13459){ +var G__13460 = cljs.core.first(seq13459); +var seq13459__$1 = cljs.core.next(seq13459); +return cljs.core.sorted_set_by.cljs$core$IFn$_invoke$arity$variadic(G__13460,seq13459__$1); +}); + +/** + * Given a map of replacement pairs and a vector/collection, returns a + * vector/seq with any elements = a key in smap replaced with the + * corresponding val in smap. Returns a transducer when no collection + * is provided. + */ +cljs.core.replace = (function cljs$core$replace(var_args){ +var args13466 = []; +var len__9181__auto___13469 = arguments.length; +var i__9182__auto___13470 = (0); +while(true){ +if((i__9182__auto___13470 < len__9181__auto___13469)){ +args13466.push((arguments[i__9182__auto___13470])); + +var G__13471 = (i__9182__auto___13470 + (1)); +i__9182__auto___13470 = G__13471; +continue; +} else { +} +break; +} + +var G__13468 = args13466.length; +switch (G__13468) { +case 1: +return cljs.core.replace.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.replace.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13466.length)].join(''))); + +} +}); + +cljs.core.replace.cljs$core$IFn$_invoke$arity$1 = (function (smap){ +return cljs.core.map.cljs$core$IFn$_invoke$arity$1((function (p1__13464_SHARP_){ +var temp__5276__auto__ = cljs.core.find(smap,p1__13464_SHARP_); +if(cljs.core.truth_(temp__5276__auto__)){ +var e = temp__5276__auto__; +return cljs.core.val(e); +} else { +return p1__13464_SHARP_; +} +})); +}); + +cljs.core.replace.cljs$core$IFn$_invoke$arity$2 = (function (smap,coll){ +if(cljs.core.vector_QMARK_(coll)){ +var n = cljs.core.count(coll); +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (n){ +return (function (v,i){ +var temp__5276__auto__ = cljs.core.find(smap,cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,i)); +if(cljs.core.truth_(temp__5276__auto__)){ +var e = temp__5276__auto__; +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(v,i,cljs.core.second(e)); +} else { +return v; +} +});})(n)) +,coll,cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,cljs.core.iterate(cljs.core.inc,(0)))); +} else { +return cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__13465_SHARP_){ +var temp__5276__auto__ = cljs.core.find(smap,p1__13465_SHARP_); +if(cljs.core.truth_(temp__5276__auto__)){ +var e = temp__5276__auto__; +return cljs.core.second(e); +} else { +return p1__13465_SHARP_; +} +}),coll); +} +}); + +cljs.core.replace.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy sequence of the elements of coll with duplicates removed. + * Returns a stateful transducer when no collection is provided. + */ +cljs.core.distinct = (function cljs$core$distinct(var_args){ +var args13473 = []; +var len__9181__auto___13486 = arguments.length; +var i__9182__auto___13487 = (0); +while(true){ +if((i__9182__auto___13487 < len__9181__auto___13486)){ +args13473.push((arguments[i__9182__auto___13487])); + +var G__13488 = (i__9182__auto___13487 + (1)); +i__9182__auto___13487 = G__13488; +continue; +} else { +} +break; +} + +var G__13475 = args13473.length; +switch (G__13475) { +case 0: +return cljs.core.distinct.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.distinct.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13473.length)].join(''))); + +} +}); + +cljs.core.distinct.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (function (rf){ +var seen = cljs.core.volatile_BANG_(cljs.core.PersistentHashSet.EMPTY); +return ((function (seen){ +return (function() { +var G__13490 = null; +var G__13490__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13490__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__13490__2 = (function (result,input){ +if(cljs.core.contains_QMARK_((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(seen) : cljs.core.deref.call(null,seen)),input)){ +return result; +} else { +cljs.core._vreset_BANG_(seen,cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core._deref(seen),input)); + +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} +}); +G__13490 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13490__0.call(this); +case 1: +return G__13490__1.call(this,result); +case 2: +return G__13490__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13490.cljs$core$IFn$_invoke$arity$0 = G__13490__0; +G__13490.cljs$core$IFn$_invoke$arity$1 = G__13490__1; +G__13490.cljs$core$IFn$_invoke$arity$2 = G__13490__2; +return G__13490; +})() +;})(seen)) +}); +}); + +cljs.core.distinct.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +var step = (function cljs$core$step(xs,seen){ +return (new cljs.core.LazySeq(null,(function (){ +return (function (p__13482,seen__$1){ +while(true){ +var vec__13483 = p__13482; +var f = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13483,(0),null); +var xs__$1 = vec__13483; +var temp__5278__auto__ = cljs.core.seq(xs__$1); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +if(cljs.core.contains_QMARK_(seen__$1,f)){ +var G__13491 = cljs.core.rest(s); +var G__13492 = seen__$1; +p__13482 = G__13491; +seen__$1 = G__13492; +continue; +} else { +return cljs.core.cons(f,cljs$core$step(cljs.core.rest(s),cljs.core.conj.cljs$core$IFn$_invoke$arity$2(seen__$1,f))); +} +} else { +return null; +} +break; +} +}).call(null,xs,seen); +}),null,null)); +}); +return step(coll,cljs.core.PersistentHashSet.EMPTY); +}); + +cljs.core.distinct.cljs$lang$maxFixedArity = 1; + +/** + * Return a seq of all but the last item in coll, in linear time + */ +cljs.core.butlast = (function cljs$core$butlast(s){ +var ret = cljs.core.PersistentVector.EMPTY; +var s__$1 = s; +while(true){ +if(cljs.core.next(s__$1)){ +var G__13493 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(ret,cljs.core.first(s__$1)); +var G__13494 = cljs.core.next(s__$1); +ret = G__13493; +s__$1 = G__13494; +continue; +} else { +return cljs.core.seq(ret); +} +break; +} +}); +/** + * Returns the name String of a string, symbol or keyword. + */ +cljs.core.name = (function cljs$core$name(x){ +if(((!((x == null)))?((((x.cljs$lang$protocol_mask$partition1$ & (4096))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$INamed$)))?true:false):false)){ +return x.cljs$core$INamed$_name$arity$1(null); +} else { +if(typeof x === 'string'){ +return x; +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Doesn't support name: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x)].join(''))); +} +} +}); +/** + * Returns a map with the keys mapped to the corresponding vals. + */ +cljs.core.zipmap = (function cljs$core$zipmap(keys,vals){ +var map = cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY); +var ks = cljs.core.seq(keys); +var vs = cljs.core.seq(vals); +while(true){ +if((ks) && (vs)){ +var G__13497 = cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(map,cljs.core.first(ks),cljs.core.first(vs)); +var G__13498 = cljs.core.next(ks); +var G__13499 = cljs.core.next(vs); +map = G__13497; +ks = G__13498; +vs = G__13499; +continue; +} else { +return cljs.core.persistent_BANG_(map); +} +break; +} +}); +/** + * Returns the x for which (k x), a number, is greatest. + */ +cljs.core.max_key = (function cljs$core$max_key(var_args){ +var args13502 = []; +var len__9181__auto___13509 = arguments.length; +var i__9182__auto___13510 = (0); +while(true){ +if((i__9182__auto___13510 < len__9181__auto___13509)){ +args13502.push((arguments[i__9182__auto___13510])); + +var G__13511 = (i__9182__auto___13510 + (1)); +i__9182__auto___13510 = G__13511; +continue; +} else { +} +break; +} + +var G__13508 = args13502.length; +switch (G__13508) { +case 2: +return cljs.core.max_key.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.max_key.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args13502.slice((3)),(0),null)); +return cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.max_key.cljs$core$IFn$_invoke$arity$2 = (function (k,x){ +return x; +}); + +cljs.core.max_key.cljs$core$IFn$_invoke$arity$3 = (function (k,x,y){ +if(((k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(x) : k.call(null,x)) > (k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(y) : k.call(null,y)))){ +return x; +} else { +return y; +} +}); + +cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic = (function (k,x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (p1__13500_SHARP_,p2__13501_SHARP_){ +return cljs.core.max_key.cljs$core$IFn$_invoke$arity$3(k,p1__13500_SHARP_,p2__13501_SHARP_); +}),cljs.core.max_key.cljs$core$IFn$_invoke$arity$3(k,x,y),more); +}); + +cljs.core.max_key.cljs$lang$applyTo = (function (seq13503){ +var G__13504 = cljs.core.first(seq13503); +var seq13503__$1 = cljs.core.next(seq13503); +var G__13505 = cljs.core.first(seq13503__$1); +var seq13503__$2 = cljs.core.next(seq13503__$1); +var G__13506 = cljs.core.first(seq13503__$2); +var seq13503__$3 = cljs.core.next(seq13503__$2); +return cljs.core.max_key.cljs$core$IFn$_invoke$arity$variadic(G__13504,G__13505,G__13506,seq13503__$3); +}); + +cljs.core.max_key.cljs$lang$maxFixedArity = (3); + +/** + * Returns the x for which (k x), a number, is least. + */ +cljs.core.min_key = (function cljs$core$min_key(var_args){ +var args13515 = []; +var len__9181__auto___13522 = arguments.length; +var i__9182__auto___13523 = (0); +while(true){ +if((i__9182__auto___13523 < len__9181__auto___13522)){ +args13515.push((arguments[i__9182__auto___13523])); + +var G__13524 = (i__9182__auto___13523 + (1)); +i__9182__auto___13523 = G__13524; +continue; +} else { +} +break; +} + +var G__13521 = args13515.length; +switch (G__13521) { +case 2: +return cljs.core.min_key.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.min_key.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args13515.slice((3)),(0),null)); +return cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.min_key.cljs$core$IFn$_invoke$arity$2 = (function (k,x){ +return x; +}); + +cljs.core.min_key.cljs$core$IFn$_invoke$arity$3 = (function (k,x,y){ +if(((k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(x) : k.call(null,x)) < (k.cljs$core$IFn$_invoke$arity$1 ? k.cljs$core$IFn$_invoke$arity$1(y) : k.call(null,y)))){ +return x; +} else { +return y; +} +}); + +cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic = (function (k,x,y,more){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (p1__13513_SHARP_,p2__13514_SHARP_){ +return cljs.core.min_key.cljs$core$IFn$_invoke$arity$3(k,p1__13513_SHARP_,p2__13514_SHARP_); +}),cljs.core.min_key.cljs$core$IFn$_invoke$arity$3(k,x,y),more); +}); + +cljs.core.min_key.cljs$lang$applyTo = (function (seq13516){ +var G__13517 = cljs.core.first(seq13516); +var seq13516__$1 = cljs.core.next(seq13516); +var G__13518 = cljs.core.first(seq13516__$1); +var seq13516__$2 = cljs.core.next(seq13516__$1); +var G__13519 = cljs.core.first(seq13516__$2); +var seq13516__$3 = cljs.core.next(seq13516__$2); +return cljs.core.min_key.cljs$core$IFn$_invoke$arity$variadic(G__13517,G__13518,G__13519,seq13516__$3); +}); + +cljs.core.min_key.cljs$lang$maxFixedArity = (3); + + +/** +* @constructor +*/ +cljs.core.ArrayList = (function (arr){ +this.arr = arr; +}) +cljs.core.ArrayList.prototype.add = (function (x){ +var self__ = this; +var _ = this; +return self__.arr.push(x); +}); + +cljs.core.ArrayList.prototype.size = (function (){ +var self__ = this; +var _ = this; +return self__.arr.length; +}); + +cljs.core.ArrayList.prototype.clear = (function (){ +var self__ = this; +var _ = this; +return self__.arr = []; +}); + +cljs.core.ArrayList.prototype.isEmpty = (function (){ +var self__ = this; +var _ = this; +return (self__.arr.length === (0)); +}); + +cljs.core.ArrayList.prototype.toArray = (function (){ +var self__ = this; +var _ = this; +return self__.arr; +}); + +cljs.core.ArrayList.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$arr,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.ArrayList.cljs$lang$type = true; + +cljs.core.ArrayList.cljs$lang$ctorStr = "cljs.core/ArrayList"; + +cljs.core.ArrayList.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/ArrayList"); +}); + +cljs.core.__GT_ArrayList = (function cljs$core$__GT_ArrayList(arr){ +return (new cljs.core.ArrayList(arr)); +}); + +cljs.core.array_list = (function cljs$core$array_list(){ +return (new cljs.core.ArrayList([])); +}); +/** + * Returns a lazy sequence of lists like partition, but may include + * partitions with fewer than n items at the end. Returns a stateful + * transducer when no collection is provided. + */ +cljs.core.partition_all = (function cljs$core$partition_all(var_args){ +var args13526 = []; +var len__9181__auto___13529 = arguments.length; +var i__9182__auto___13530 = (0); +while(true){ +if((i__9182__auto___13530 < len__9181__auto___13529)){ +args13526.push((arguments[i__9182__auto___13530])); + +var G__13531 = (i__9182__auto___13530 + (1)); +i__9182__auto___13530 = G__13531; +continue; +} else { +} +break; +} + +var G__13528 = args13526.length; +switch (G__13528) { +case 1: +return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13526.length)].join(''))); + +} +}); + +cljs.core.partition_all.cljs$core$IFn$_invoke$arity$1 = (function (n){ +return (function (rf){ +var a = cljs.core.array_list(); +return ((function (a){ +return (function() { +var G__13533 = null; +var G__13533__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13533__1 = (function (result){ +var result__$1 = (cljs.core.truth_(a.isEmpty())?result:(function (){var v = cljs.core.vec(a.toArray()); +a.clear(); + +return cljs.core.unreduced((rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,v) : rf.call(null,result,v))); +})()); +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result__$1) : rf.call(null,result__$1)); +}); +var G__13533__2 = (function (result,input){ +a.add(input); + +if((n === a.size())){ +var v = cljs.core.vec(a.toArray()); +a.clear(); + +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,v) : rf.call(null,result,v)); +} else { +return result; +} +}); +G__13533 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13533__0.call(this); +case 1: +return G__13533__1.call(this,result); +case 2: +return G__13533__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13533.cljs$core$IFn$_invoke$arity$0 = G__13533__0; +G__13533.cljs$core$IFn$_invoke$arity$1 = G__13533__1; +G__13533.cljs$core$IFn$_invoke$arity$2 = G__13533__2; +return G__13533; +})() +;})(a)) +}); +}); + +cljs.core.partition_all.cljs$core$IFn$_invoke$arity$2 = (function (n,coll){ +return cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3(n,n,coll); +}); + +cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3 = (function (n,step,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +return cljs.core.cons(cljs.core.take.cljs$core$IFn$_invoke$arity$2(n,s),cljs.core.partition_all.cljs$core$IFn$_invoke$arity$3(n,step,cljs.core.drop.cljs$core$IFn$_invoke$arity$2(step,s))); +} else { +return null; +} +}),null,null)); +}); + +cljs.core.partition_all.cljs$lang$maxFixedArity = 3; + +/** + * Returns a lazy sequence of successive items from coll while + * (pred item) returns true. pred must be free of side-effects. + * Returns a transducer when no collection is provided. + */ +cljs.core.take_while = (function cljs$core$take_while(var_args){ +var args13534 = []; +var len__9181__auto___13538 = arguments.length; +var i__9182__auto___13539 = (0); +while(true){ +if((i__9182__auto___13539 < len__9181__auto___13538)){ +args13534.push((arguments[i__9182__auto___13539])); + +var G__13540 = (i__9182__auto___13539 + (1)); +i__9182__auto___13539 = G__13540; +continue; +} else { +} +break; +} + +var G__13536 = args13534.length; +switch (G__13536) { +case 1: +return cljs.core.take_while.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13534.length)].join(''))); + +} +}); + +cljs.core.take_while.cljs$core$IFn$_invoke$arity$1 = (function (pred){ +return (function (rf){ +return (function() { +var G__13542 = null; +var G__13542__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13542__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__13542__2 = (function (result,input){ +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null,input)))){ +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} else { +return cljs.core.reduced(result); +} +}); +G__13542 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13542__0.call(this); +case 1: +return G__13542__1.call(this,result); +case 2: +return G__13542__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13542.cljs$core$IFn$_invoke$arity$0 = G__13542__0; +G__13542.cljs$core$IFn$_invoke$arity$1 = G__13542__1; +G__13542.cljs$core$IFn$_invoke$arity$2 = G__13542__2; +return G__13542; +})() +}); +}); + +cljs.core.take_while.cljs$core$IFn$_invoke$arity$2 = (function (pred,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +if(cljs.core.truth_((function (){var G__13537 = cljs.core.first(s); +return (pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(G__13537) : pred.call(null,G__13537)); +})())){ +return cljs.core.cons(cljs.core.first(s),cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(pred,cljs.core.rest(s))); +} else { +return null; +} +} else { +return null; +} +}),null,null)); +}); + +cljs.core.take_while.cljs$lang$maxFixedArity = 2; + +cljs.core.mk_bound_fn = (function cljs$core$mk_bound_fn(sc,test,key){ +return (function (e){ +var comp = cljs.core._comparator(sc); +var G__13547 = (function (){var G__13549 = cljs.core._entry_key(sc,e); +var G__13550 = key; +return (comp.cljs$core$IFn$_invoke$arity$2 ? comp.cljs$core$IFn$_invoke$arity$2(G__13549,G__13550) : comp.call(null,G__13549,G__13550)); +})(); +var G__13548 = (0); +return (test.cljs$core$IFn$_invoke$arity$2 ? test.cljs$core$IFn$_invoke$arity$2(G__13547,G__13548) : test.call(null,G__13547,G__13548)); +}); +}); +/** + * sc must be a sorted collection, test(s) one of <, <=, > or + * >=. Returns a seq of those entries with keys ek for + * which (test (.. sc comparator (compare ek key)) 0) is true + */ +cljs.core.subseq = (function cljs$core$subseq(var_args){ +var args13551 = []; +var len__9181__auto___13560 = arguments.length; +var i__9182__auto___13561 = (0); +while(true){ +if((i__9182__auto___13561 < len__9181__auto___13560)){ +args13551.push((arguments[i__9182__auto___13561])); + +var G__13562 = (i__9182__auto___13561 + (1)); +i__9182__auto___13561 = G__13562; +continue; +} else { +} +break; +} + +var G__13553 = args13551.length; +switch (G__13553) { +case 3: +return cljs.core.subseq.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 5: +return cljs.core.subseq.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13551.length)].join(''))); + +} +}); + +cljs.core.subseq.cljs$core$IFn$_invoke$arity$3 = (function (sc,test,key){ +var include = cljs.core.mk_bound_fn(sc,test,key); +if(cljs.core.truth_(cljs.core.PersistentHashSet.createAsIfByAssoc([cljs.core._GT_,cljs.core._GT__EQ_]).call(null,test))){ +var temp__5278__auto__ = cljs.core._sorted_seq_from(sc,key,true); +if(cljs.core.truth_(temp__5278__auto__)){ +var vec__13554 = temp__5278__auto__; +var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13554,(0),null); +var s = vec__13554; +if(cljs.core.truth_((include.cljs$core$IFn$_invoke$arity$1 ? include.cljs$core$IFn$_invoke$arity$1(e) : include.call(null,e)))){ +return s; +} else { +return cljs.core.next(s); +} +} else { +return null; +} +} else { +return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(include,cljs.core._sorted_seq(sc,true)); +} +}); + +cljs.core.subseq.cljs$core$IFn$_invoke$arity$5 = (function (sc,start_test,start_key,end_test,end_key){ +var temp__5278__auto__ = cljs.core._sorted_seq_from(sc,start_key,true); +if(cljs.core.truth_(temp__5278__auto__)){ +var vec__13557 = temp__5278__auto__; +var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13557,(0),null); +var s = vec__13557; +return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(cljs.core.mk_bound_fn(sc,end_test,end_key),(cljs.core.truth_(cljs.core.mk_bound_fn(sc,start_test,start_key).call(null,e))?s:cljs.core.next(s))); +} else { +return null; +} +}); + +cljs.core.subseq.cljs$lang$maxFixedArity = 5; + +/** + * sc must be a sorted collection, test(s) one of <, <=, > or + * >=. Returns a reverse seq of those entries with keys ek for + * which (test (.. sc comparator (compare ek key)) 0) is true + */ +cljs.core.rsubseq = (function cljs$core$rsubseq(var_args){ +var args13564 = []; +var len__9181__auto___13573 = arguments.length; +var i__9182__auto___13574 = (0); +while(true){ +if((i__9182__auto___13574 < len__9181__auto___13573)){ +args13564.push((arguments[i__9182__auto___13574])); + +var G__13575 = (i__9182__auto___13574 + (1)); +i__9182__auto___13574 = G__13575; +continue; +} else { +} +break; +} + +var G__13566 = args13564.length; +switch (G__13566) { +case 3: +return cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 5: +return cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13564.length)].join(''))); + +} +}); + +cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$3 = (function (sc,test,key){ +var include = cljs.core.mk_bound_fn(sc,test,key); +if(cljs.core.truth_(cljs.core.PersistentHashSet.createAsIfByAssoc([cljs.core._LT_,cljs.core._LT__EQ_]).call(null,test))){ +var temp__5278__auto__ = cljs.core._sorted_seq_from(sc,key,false); +if(cljs.core.truth_(temp__5278__auto__)){ +var vec__13567 = temp__5278__auto__; +var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13567,(0),null); +var s = vec__13567; +if(cljs.core.truth_((include.cljs$core$IFn$_invoke$arity$1 ? include.cljs$core$IFn$_invoke$arity$1(e) : include.call(null,e)))){ +return s; +} else { +return cljs.core.next(s); +} +} else { +return null; +} +} else { +return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(include,cljs.core._sorted_seq(sc,false)); +} +}); + +cljs.core.rsubseq.cljs$core$IFn$_invoke$arity$5 = (function (sc,start_test,start_key,end_test,end_key){ +var temp__5278__auto__ = cljs.core._sorted_seq_from(sc,end_key,false); +if(cljs.core.truth_(temp__5278__auto__)){ +var vec__13570 = temp__5278__auto__; +var e = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13570,(0),null); +var s = vec__13570; +return cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(cljs.core.mk_bound_fn(sc,start_test,start_key),(cljs.core.truth_(cljs.core.mk_bound_fn(sc,end_test,end_key).call(null,e))?s:cljs.core.next(s))); +} else { +return null; +} +}); + +cljs.core.rsubseq.cljs$lang$maxFixedArity = 5; + + +/** +* @constructor +*/ +cljs.core.RangeIterator = (function (i,end,step){ +this.i = i; +this.end = end; +this.step = step; +}) +cljs.core.RangeIterator.prototype.hasNext = (function (){ +var self__ = this; +var _ = this; +if((self__.step > (0))){ +return (self__.i < self__.end); +} else { +return (self__.i > self__.end); +} +}); + +cljs.core.RangeIterator.prototype.next = (function (){ +var self__ = this; +var _ = this; +var ret = self__.i; +self__.i = (self__.i + self__.step); + +return ret; +}); + +cljs.core.RangeIterator.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$i,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$end,cljs.core.cst$sym$step], null); +}); + +cljs.core.RangeIterator.cljs$lang$type = true; + +cljs.core.RangeIterator.cljs$lang$ctorStr = "cljs.core/RangeIterator"; + +cljs.core.RangeIterator.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/RangeIterator"); +}); + +cljs.core.__GT_RangeIterator = (function cljs$core$__GT_RangeIterator(i,end,step){ +return (new cljs.core.RangeIterator(i,end,step)); +}); + + +/** +* @constructor + * @implements {cljs.core.IIndexed} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.IEmptyableCollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeq} + * @implements {cljs.core.INext} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IReduce} +*/ +cljs.core.Range = (function (meta,start,end,step,__hash){ +this.meta = meta; +this.start = start; +this.end = end; +this.step = step; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 32375006; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.Range.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.Range.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.Range.prototype.indexOf = (function() { +var G__13578 = null; +var G__13578__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,(0)); +}); +var G__13578__2 = (function (x,start__$1){ +var self__ = this; +var coll = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start__$1); +}); +G__13578 = function(x,start__$1){ +switch(arguments.length){ +case 1: +return G__13578__1.call(this,x); +case 2: +return G__13578__2.call(this,x,start__$1); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13578.cljs$core$IFn$_invoke$arity$1 = G__13578__1; +G__13578.cljs$core$IFn$_invoke$arity$2 = G__13578__2; +return G__13578; +})() +; + +cljs.core.Range.prototype.lastIndexOf = (function() { +var G__13579 = null; +var G__13579__1 = (function (x){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,cljs.core.count(coll)); +}); +var G__13579__2 = (function (x,start__$1){ +var self__ = this; +var coll = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll,x,start__$1); +}); +G__13579 = function(x,start__$1){ +switch(arguments.length){ +case 1: +return G__13579__1.call(this,x); +case 2: +return G__13579__2.call(this,x,start__$1); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13579.cljs$core$IFn$_invoke$arity$1 = G__13579__1; +G__13579.cljs$core$IFn$_invoke$arity$2 = G__13579__2; +return G__13579; +})() +; + +cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$2 = (function (rng,n){ +var self__ = this; +var rng__$1 = this; +if((n < rng__$1.cljs$core$ICounted$_count$arity$1(null))){ +return (self__.start + (n * self__.step)); +} else { +if(((self__.start > self__.end)) && ((self__.step === (0)))){ +return self__.start; +} else { +throw (new Error("Index out of bounds")); +} +} +}); + +cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$3 = (function (rng,n,not_found){ +var self__ = this; +var rng__$1 = this; +if((n < rng__$1.cljs$core$ICounted$_count$arity$1(null))){ +return (self__.start + (n * self__.step)); +} else { +if(((self__.start > self__.end)) && ((self__.step === (0)))){ +return self__.start; +} else { +return not_found; +} +} +}); + +cljs.core.Range.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Range.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.RangeIterator(self__.start,self__.end,self__.step)); +}); + +cljs.core.Range.prototype.cljs$core$IMeta$_meta$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +return self__.meta; +}); + +cljs.core.Range.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return (new cljs.core.Range(self__.meta,self__.start,self__.end,self__.step,self__.__hash)); +}); + +cljs.core.Range.prototype.cljs$core$INext$_next$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +if((self__.step > (0))){ +if(((self__.start + self__.step) < self__.end)){ +return (new cljs.core.Range(self__.meta,(self__.start + self__.step),self__.end,self__.step,null)); +} else { +return null; +} +} else { +if(((self__.start + self__.step) > self__.end)){ +return (new cljs.core.Range(self__.meta,(self__.start + self__.step),self__.end,self__.step,null)); +} else { +return null; +} +} +}); + +cljs.core.Range.prototype.cljs$core$ICounted$_count$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +if(cljs.core.not(rng__$1.cljs$core$ISeqable$_seq$arity$1(null))){ +return (0); +} else { +var G__13577 = ((self__.end - self__.start) / self__.step); +return Math.ceil(G__13577); +} +}); + +cljs.core.Range.prototype.cljs$core$IHash$_hash$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_ordered_coll(rng__$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.Range.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (rng,other){ +var self__ = this; +var rng__$1 = this; +return cljs.core.equiv_sequential(rng__$1,other); +}); + +cljs.core.Range.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +return cljs.core._with_meta(cljs.core.List.EMPTY,self__.meta); +}); + +cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (rng,f){ +var self__ = this; +var rng__$1 = this; +return cljs.core.ci_reduce.cljs$core$IFn$_invoke$arity$2(rng__$1,f); +}); + +cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (rng,f,init){ +var self__ = this; +var rng__$1 = this; +var i = self__.start; +var ret = init; +while(true){ +if((((self__.step > (0)))?(i < self__.end):(i > self__.end))){ +var ret__$1 = (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(ret,i) : f.call(null,ret,i)); +if(cljs.core.reduced_QMARK_(ret__$1)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(ret__$1) : cljs.core.deref.call(null,ret__$1)); +} else { +var G__13580 = (i + self__.step); +var G__13581 = ret__$1; +i = G__13580; +ret = G__13581; +continue; +} +} else { +return ret; +} +break; +} +}); + +cljs.core.Range.prototype.cljs$core$ISeq$_first$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +if((rng__$1.cljs$core$ISeqable$_seq$arity$1(null) == null)){ +return null; +} else { +return self__.start; +} +}); + +cljs.core.Range.prototype.cljs$core$ISeq$_rest$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +if(!((rng__$1.cljs$core$ISeqable$_seq$arity$1(null) == null))){ +return (new cljs.core.Range(self__.meta,(self__.start + self__.step),self__.end,self__.step,null)); +} else { +return cljs.core.List.EMPTY; +} +}); + +cljs.core.Range.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (rng){ +var self__ = this; +var rng__$1 = this; +if((self__.step > (0))){ +if((self__.start < self__.end)){ +return rng__$1; +} else { +return null; +} +} else { +if((self__.step < (0))){ +if((self__.start > self__.end)){ +return rng__$1; +} else { +return null; +} +} else { +if((self__.start === self__.end)){ +return null; +} else { +return rng__$1; +} + +} +} +}); + +cljs.core.Range.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (rng,meta__$1){ +var self__ = this; +var rng__$1 = this; +return (new cljs.core.Range(meta__$1,self__.start,self__.end,self__.step,self__.__hash)); +}); + +cljs.core.Range.prototype.cljs$core$ICollection$_conj$arity$2 = (function (rng,o){ +var self__ = this; +var rng__$1 = this; +return cljs.core.cons(o,rng__$1); +}); + +cljs.core.Range.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$meta,cljs.core.cst$sym$start,cljs.core.cst$sym$end,cljs.core.cst$sym$step,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Range.cljs$lang$type = true; + +cljs.core.Range.cljs$lang$ctorStr = "cljs.core/Range"; + +cljs.core.Range.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Range"); +}); + +cljs.core.__GT_Range = (function cljs$core$__GT_Range(meta,start,end,step,__hash){ +return (new cljs.core.Range(meta,start,end,step,__hash)); +}); + +(cljs.core.Range.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Returns a lazy seq of nums from start (inclusive) to end + * (exclusive), by step, where start defaults to 0, step to 1, + * and end to infinity. + */ +cljs.core.range = (function cljs$core$range(var_args){ +var args13582 = []; +var len__9181__auto___13585 = arguments.length; +var i__9182__auto___13586 = (0); +while(true){ +if((i__9182__auto___13586 < len__9181__auto___13585)){ +args13582.push((arguments[i__9182__auto___13586])); + +var G__13587 = (i__9182__auto___13586 + (1)); +i__9182__auto___13586 = G__13587; +continue; +} else { +} +break; +} + +var G__13584 = args13582.length; +switch (G__13584) { +case 0: +return cljs.core.range.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.range.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.range.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.range.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13582.length)].join(''))); + +} +}); + +cljs.core.range.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.range.cljs$core$IFn$_invoke$arity$3((0),Number.MAX_VALUE,(1)); +}); + +cljs.core.range.cljs$core$IFn$_invoke$arity$1 = (function (end){ +return cljs.core.range.cljs$core$IFn$_invoke$arity$3((0),end,(1)); +}); + +cljs.core.range.cljs$core$IFn$_invoke$arity$2 = (function (start,end){ +return cljs.core.range.cljs$core$IFn$_invoke$arity$3(start,end,(1)); +}); + +cljs.core.range.cljs$core$IFn$_invoke$arity$3 = (function (start,end,step){ +return (new cljs.core.Range(null,start,end,step,null)); +}); + +cljs.core.range.cljs$lang$maxFixedArity = 3; + +/** + * Returns a lazy seq of every nth item in coll. Returns a stateful + * transducer when no collection is provided. + */ +cljs.core.take_nth = (function cljs$core$take_nth(var_args){ +var args13589 = []; +var len__9181__auto___13592 = arguments.length; +var i__9182__auto___13593 = (0); +while(true){ +if((i__9182__auto___13593 < len__9181__auto___13592)){ +args13589.push((arguments[i__9182__auto___13593])); + +var G__13594 = (i__9182__auto___13593 + (1)); +i__9182__auto___13593 = G__13594; +continue; +} else { +} +break; +} + +var G__13591 = args13589.length; +switch (G__13591) { +case 1: +return cljs.core.take_nth.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.take_nth.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13589.length)].join(''))); + +} +}); + +cljs.core.take_nth.cljs$core$IFn$_invoke$arity$1 = (function (n){ +if(typeof n === 'number'){ +} else { +throw (new Error("Assert failed: (number? n)")); +} + +return (function (rf){ +var ia = cljs.core.volatile_BANG_((-1)); +return ((function (ia){ +return (function() { +var G__13596 = null; +var G__13596__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13596__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__13596__2 = (function (result,input){ +var i = cljs.core._vreset_BANG_(ia,(cljs.core._deref(ia) + (1))); +if((cljs.core.rem(i,n) === (0))){ +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} else { +return result; +} +}); +G__13596 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13596__0.call(this); +case 1: +return G__13596__1.call(this,result); +case 2: +return G__13596__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13596.cljs$core$IFn$_invoke$arity$0 = G__13596__0; +G__13596.cljs$core$IFn$_invoke$arity$1 = G__13596__1; +G__13596.cljs$core$IFn$_invoke$arity$2 = G__13596__2; +return G__13596; +})() +;})(ia)) +}); +}); + +cljs.core.take_nth.cljs$core$IFn$_invoke$arity$2 = (function (n,coll){ +if(typeof n === 'number'){ +} else { +throw (new Error("Assert failed: (number? n)")); +} + +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +return cljs.core.cons(cljs.core.first(s),cljs.core.take_nth.cljs$core$IFn$_invoke$arity$2(n,cljs.core.drop.cljs$core$IFn$_invoke$arity$2(n,s))); +} else { +return null; +} +}),null,null)); +}); + +cljs.core.take_nth.cljs$lang$maxFixedArity = 2; + +/** + * Returns a vector of [(take-while pred coll) (drop-while pred coll)] + */ +cljs.core.split_with = (function cljs$core$split_with(pred,coll){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(pred,coll),cljs.core.drop_while.cljs$core$IFn$_invoke$arity$2(pred,coll)], null); +}); +/** + * Applies f to each value in coll, splitting it each time f returns a + * new value. Returns a lazy seq of partitions. Returns a stateful + * transducer when no collection is provided. + */ +cljs.core.partition_by = (function cljs$core$partition_by(var_args){ +var args13598 = []; +var len__9181__auto___13601 = arguments.length; +var i__9182__auto___13602 = (0); +while(true){ +if((i__9182__auto___13602 < len__9181__auto___13601)){ +args13598.push((arguments[i__9182__auto___13602])); + +var G__13603 = (i__9182__auto___13602 + (1)); +i__9182__auto___13602 = G__13603; +continue; +} else { +} +break; +} + +var G__13600 = args13598.length; +switch (G__13600) { +case 1: +return cljs.core.partition_by.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.partition_by.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13598.length)].join(''))); + +} +}); + +cljs.core.partition_by.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return (function (rf){ +var a = cljs.core.array_list(); +var pa = cljs.core.volatile_BANG_(cljs.core.cst$kw$cljs$core_SLASH_none); +return ((function (a,pa){ +return (function() { +var G__13605 = null; +var G__13605__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13605__1 = (function (result){ +var result__$1 = (cljs.core.truth_(a.isEmpty())?result:(function (){var v = cljs.core.vec(a.toArray()); +a.clear(); + +return cljs.core.unreduced((rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,v) : rf.call(null,result,v))); +})()); +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result__$1) : rf.call(null,result__$1)); +}); +var G__13605__2 = (function (result,input){ +var pval = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(pa) : cljs.core.deref.call(null,pa)); +var val = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(input) : f.call(null,input)); +cljs.core.vreset_BANG_(pa,val); + +if((cljs.core.keyword_identical_QMARK_(pval,cljs.core.cst$kw$cljs$core_SLASH_none)) || (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(val,pval))){ +a.add(input); + +return result; +} else { +var v = cljs.core.vec(a.toArray()); +a.clear(); + +var ret = (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,v) : rf.call(null,result,v)); +if(cljs.core.reduced_QMARK_(ret)){ +} else { +a.add(input); +} + +return ret; +} +}); +G__13605 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13605__0.call(this); +case 1: +return G__13605__1.call(this,result); +case 2: +return G__13605__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13605.cljs$core$IFn$_invoke$arity$0 = G__13605__0; +G__13605.cljs$core$IFn$_invoke$arity$1 = G__13605__1; +G__13605.cljs$core$IFn$_invoke$arity$2 = G__13605__2; +return G__13605; +})() +;})(a,pa)) +}); +}); + +cljs.core.partition_by.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +var fst = cljs.core.first(s); +var fv = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(fst) : f.call(null,fst)); +var run = cljs.core.cons(fst,cljs.core.take_while.cljs$core$IFn$_invoke$arity$2(((function (fst,fv,s,temp__5278__auto__){ +return (function (p1__13597_SHARP_){ +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(fv,(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(p1__13597_SHARP_) : f.call(null,p1__13597_SHARP_))); +});})(fst,fv,s,temp__5278__auto__)) +,cljs.core.next(s))); +return cljs.core.cons(run,cljs.core.partition_by.cljs$core$IFn$_invoke$arity$2(f,cljs.core.seq(cljs.core.drop.cljs$core$IFn$_invoke$arity$2(cljs.core.count(run),s)))); +} else { +return null; +} +}),null,null)); +}); + +cljs.core.partition_by.cljs$lang$maxFixedArity = 2; + +/** + * Returns a map from distinct items in coll to the number of times + * they appear. + */ +cljs.core.frequencies = (function cljs$core$frequencies(coll){ +return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (counts,x){ +return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(counts,x,(cljs.core.get.cljs$core$IFn$_invoke$arity$3(counts,x,(0)) + (1))); +}),cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY),coll)); +}); +/** + * Returns a lazy seq of the intermediate values of the reduction (as + * per reduce) of coll by f, starting with init. + */ +cljs.core.reductions = (function cljs$core$reductions(var_args){ +var args13606 = []; +var len__9181__auto___13611 = arguments.length; +var i__9182__auto___13612 = (0); +while(true){ +if((i__9182__auto___13612 < len__9181__auto___13611)){ +args13606.push((arguments[i__9182__auto___13612])); + +var G__13613 = (i__9182__auto___13612 + (1)); +i__9182__auto___13612 = G__13613; +continue; +} else { +} +break; +} + +var G__13608 = args13606.length; +switch (G__13608) { +case 2: +return cljs.core.reductions.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.reductions.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13606.length)].join(''))); + +} +}); + +cljs.core.reductions.cljs$core$IFn$_invoke$arity$2 = (function (f,coll){ +return (new cljs.core.LazySeq(null,(function (){ +var temp__5276__auto__ = cljs.core.seq(coll); +if(temp__5276__auto__){ +var s = temp__5276__auto__; +return cljs.core.reductions.cljs$core$IFn$_invoke$arity$3(f,cljs.core.first(s),cljs.core.rest(s)); +} else { +var x__8894__auto__ = (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto__); +} +}),null,null)); +}); + +cljs.core.reductions.cljs$core$IFn$_invoke$arity$3 = (function (f,init,coll){ +if(cljs.core.reduced_QMARK_(init)){ +var x__8894__auto__ = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(init) : cljs.core.deref.call(null,init)); +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto__); +} else { +return cljs.core.cons(init,(new cljs.core.LazySeq(null,(function (){ +var temp__5278__auto__ = cljs.core.seq(coll); +if(temp__5278__auto__){ +var s = temp__5278__auto__; +return cljs.core.reductions.cljs$core$IFn$_invoke$arity$3(f,(function (){var G__13609 = init; +var G__13610 = cljs.core.first(s); +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__13609,G__13610) : f.call(null,G__13609,G__13610)); +})(),cljs.core.rest(s)); +} else { +return null; +} +}),null,null))); +} +}); + +cljs.core.reductions.cljs$lang$maxFixedArity = 3; + +/** + * Takes a set of functions and returns a fn that is the juxtaposition + * of those fns. The returned fn takes a variable number of args, and + * returns a vector containing the result of applying each fn to the + * args (left-to-right). + * ((juxt a b c) x) => [(a x) (b x) (c x)] + */ +cljs.core.juxt = (function cljs$core$juxt(var_args){ +var args13625 = []; +var len__9181__auto___13632 = arguments.length; +var i__9182__auto___13633 = (0); +while(true){ +if((i__9182__auto___13633 < len__9181__auto___13632)){ +args13625.push((arguments[i__9182__auto___13633])); + +var G__13634 = (i__9182__auto___13633 + (1)); +i__9182__auto___13633 = G__13634; +continue; +} else { +} +break; +} + +var G__13631 = args13625.length; +switch (G__13631) { +case 1: +return cljs.core.juxt.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.juxt.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.juxt.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args13625.slice((3)),(0),null)); +return cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +cljs.core.juxt.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return (function() { +var G__13636 = null; +var G__13636__0 = (function (){ +return (new cljs.core.PersistentVector(null,1,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null))],null)); +}); +var G__13636__1 = (function (x){ +return (new cljs.core.PersistentVector(null,1,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null,x))],null)); +}); +var G__13636__2 = (function (x,y){ +return (new cljs.core.PersistentVector(null,1,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x,y) : f.call(null,x,y))],null)); +}); +var G__13636__3 = (function (x,y,z){ +return (new cljs.core.PersistentVector(null,1,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(x,y,z) : f.call(null,x,y,z))],null)); +}); +var G__13636__4 = (function() { +var G__13637__delegate = function (x,y,z,args){ +return (new cljs.core.PersistentVector(null,1,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,x,y,z,args)],null)); +}; +var G__13637 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__13638__i = 0, G__13638__a = new Array(arguments.length - 3); +while (G__13638__i < G__13638__a.length) {G__13638__a[G__13638__i] = arguments[G__13638__i + 3]; ++G__13638__i;} + args = new cljs.core.IndexedSeq(G__13638__a,0,null); +} +return G__13637__delegate.call(this,x,y,z,args);}; +G__13637.cljs$lang$maxFixedArity = 3; +G__13637.cljs$lang$applyTo = (function (arglist__13639){ +var x = cljs.core.first(arglist__13639); +arglist__13639 = cljs.core.next(arglist__13639); +var y = cljs.core.first(arglist__13639); +arglist__13639 = cljs.core.next(arglist__13639); +var z = cljs.core.first(arglist__13639); +var args = cljs.core.rest(arglist__13639); +return G__13637__delegate(x,y,z,args); +}); +G__13637.cljs$core$IFn$_invoke$arity$variadic = G__13637__delegate; +return G__13637; +})() +; +G__13636 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__13636__0.call(this); +case 1: +return G__13636__1.call(this,x); +case 2: +return G__13636__2.call(this,x,y); +case 3: +return G__13636__3.call(this,x,y,z); +default: +var G__13640 = null; +if (arguments.length > 3) { +var G__13641__i = 0, G__13641__a = new Array(arguments.length - 3); +while (G__13641__i < G__13641__a.length) {G__13641__a[G__13641__i] = arguments[G__13641__i + 3]; ++G__13641__i;} +G__13640 = new cljs.core.IndexedSeq(G__13641__a,0,null); +} +return G__13636__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__13640); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13636.cljs$lang$maxFixedArity = 3; +G__13636.cljs$lang$applyTo = G__13636__4.cljs$lang$applyTo; +G__13636.cljs$core$IFn$_invoke$arity$0 = G__13636__0; +G__13636.cljs$core$IFn$_invoke$arity$1 = G__13636__1; +G__13636.cljs$core$IFn$_invoke$arity$2 = G__13636__2; +G__13636.cljs$core$IFn$_invoke$arity$3 = G__13636__3; +G__13636.cljs$core$IFn$_invoke$arity$variadic = G__13636__4.cljs$core$IFn$_invoke$arity$variadic; +return G__13636; +})() +}); + +cljs.core.juxt.cljs$core$IFn$_invoke$arity$2 = (function (f,g){ +return (function() { +var G__13642 = null; +var G__13642__0 = (function (){ +return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)),(g.cljs$core$IFn$_invoke$arity$0 ? g.cljs$core$IFn$_invoke$arity$0() : g.call(null))],null)); +}); +var G__13642__1 = (function (x){ +return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null,x)),(g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(x) : g.call(null,x))],null)); +}); +var G__13642__2 = (function (x,y){ +return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x,y) : f.call(null,x,y)),(g.cljs$core$IFn$_invoke$arity$2 ? g.cljs$core$IFn$_invoke$arity$2(x,y) : g.call(null,x,y))],null)); +}); +var G__13642__3 = (function (x,y,z){ +return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(x,y,z) : f.call(null,x,y,z)),(g.cljs$core$IFn$_invoke$arity$3 ? g.cljs$core$IFn$_invoke$arity$3(x,y,z) : g.call(null,x,y,z))],null)); +}); +var G__13642__4 = (function() { +var G__13643__delegate = function (x,y,z,args){ +return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,x,y,z,args),cljs.core.apply.cljs$core$IFn$_invoke$arity$5(g,x,y,z,args)],null)); +}; +var G__13643 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__13644__i = 0, G__13644__a = new Array(arguments.length - 3); +while (G__13644__i < G__13644__a.length) {G__13644__a[G__13644__i] = arguments[G__13644__i + 3]; ++G__13644__i;} + args = new cljs.core.IndexedSeq(G__13644__a,0,null); +} +return G__13643__delegate.call(this,x,y,z,args);}; +G__13643.cljs$lang$maxFixedArity = 3; +G__13643.cljs$lang$applyTo = (function (arglist__13645){ +var x = cljs.core.first(arglist__13645); +arglist__13645 = cljs.core.next(arglist__13645); +var y = cljs.core.first(arglist__13645); +arglist__13645 = cljs.core.next(arglist__13645); +var z = cljs.core.first(arglist__13645); +var args = cljs.core.rest(arglist__13645); +return G__13643__delegate(x,y,z,args); +}); +G__13643.cljs$core$IFn$_invoke$arity$variadic = G__13643__delegate; +return G__13643; +})() +; +G__13642 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__13642__0.call(this); +case 1: +return G__13642__1.call(this,x); +case 2: +return G__13642__2.call(this,x,y); +case 3: +return G__13642__3.call(this,x,y,z); +default: +var G__13646 = null; +if (arguments.length > 3) { +var G__13647__i = 0, G__13647__a = new Array(arguments.length - 3); +while (G__13647__i < G__13647__a.length) {G__13647__a[G__13647__i] = arguments[G__13647__i + 3]; ++G__13647__i;} +G__13646 = new cljs.core.IndexedSeq(G__13647__a,0,null); +} +return G__13642__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__13646); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13642.cljs$lang$maxFixedArity = 3; +G__13642.cljs$lang$applyTo = G__13642__4.cljs$lang$applyTo; +G__13642.cljs$core$IFn$_invoke$arity$0 = G__13642__0; +G__13642.cljs$core$IFn$_invoke$arity$1 = G__13642__1; +G__13642.cljs$core$IFn$_invoke$arity$2 = G__13642__2; +G__13642.cljs$core$IFn$_invoke$arity$3 = G__13642__3; +G__13642.cljs$core$IFn$_invoke$arity$variadic = G__13642__4.cljs$core$IFn$_invoke$arity$variadic; +return G__13642; +})() +}); + +cljs.core.juxt.cljs$core$IFn$_invoke$arity$3 = (function (f,g,h){ +return (function() { +var G__13648 = null; +var G__13648__0 = (function (){ +return (new cljs.core.PersistentVector(null,3,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)),(g.cljs$core$IFn$_invoke$arity$0 ? g.cljs$core$IFn$_invoke$arity$0() : g.call(null)),(h.cljs$core$IFn$_invoke$arity$0 ? h.cljs$core$IFn$_invoke$arity$0() : h.call(null))],null)); +}); +var G__13648__1 = (function (x){ +return (new cljs.core.PersistentVector(null,3,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null,x)),(g.cljs$core$IFn$_invoke$arity$1 ? g.cljs$core$IFn$_invoke$arity$1(x) : g.call(null,x)),(h.cljs$core$IFn$_invoke$arity$1 ? h.cljs$core$IFn$_invoke$arity$1(x) : h.call(null,x))],null)); +}); +var G__13648__2 = (function (x,y){ +return (new cljs.core.PersistentVector(null,3,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(x,y) : f.call(null,x,y)),(g.cljs$core$IFn$_invoke$arity$2 ? g.cljs$core$IFn$_invoke$arity$2(x,y) : g.call(null,x,y)),(h.cljs$core$IFn$_invoke$arity$2 ? h.cljs$core$IFn$_invoke$arity$2(x,y) : h.call(null,x,y))],null)); +}); +var G__13648__3 = (function (x,y,z){ +return (new cljs.core.PersistentVector(null,3,(5),cljs.core.PersistentVector.EMPTY_NODE,[(f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(x,y,z) : f.call(null,x,y,z)),(g.cljs$core$IFn$_invoke$arity$3 ? g.cljs$core$IFn$_invoke$arity$3(x,y,z) : g.call(null,x,y,z)),(h.cljs$core$IFn$_invoke$arity$3 ? h.cljs$core$IFn$_invoke$arity$3(x,y,z) : h.call(null,x,y,z))],null)); +}); +var G__13648__4 = (function() { +var G__13649__delegate = function (x,y,z,args){ +return (new cljs.core.PersistentVector(null,3,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,x,y,z,args),cljs.core.apply.cljs$core$IFn$_invoke$arity$5(g,x,y,z,args),cljs.core.apply.cljs$core$IFn$_invoke$arity$5(h,x,y,z,args)],null)); +}; +var G__13649 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__13650__i = 0, G__13650__a = new Array(arguments.length - 3); +while (G__13650__i < G__13650__a.length) {G__13650__a[G__13650__i] = arguments[G__13650__i + 3]; ++G__13650__i;} + args = new cljs.core.IndexedSeq(G__13650__a,0,null); +} +return G__13649__delegate.call(this,x,y,z,args);}; +G__13649.cljs$lang$maxFixedArity = 3; +G__13649.cljs$lang$applyTo = (function (arglist__13651){ +var x = cljs.core.first(arglist__13651); +arglist__13651 = cljs.core.next(arglist__13651); +var y = cljs.core.first(arglist__13651); +arglist__13651 = cljs.core.next(arglist__13651); +var z = cljs.core.first(arglist__13651); +var args = cljs.core.rest(arglist__13651); +return G__13649__delegate(x,y,z,args); +}); +G__13649.cljs$core$IFn$_invoke$arity$variadic = G__13649__delegate; +return G__13649; +})() +; +G__13648 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__13648__0.call(this); +case 1: +return G__13648__1.call(this,x); +case 2: +return G__13648__2.call(this,x,y); +case 3: +return G__13648__3.call(this,x,y,z); +default: +var G__13652 = null; +if (arguments.length > 3) { +var G__13653__i = 0, G__13653__a = new Array(arguments.length - 3); +while (G__13653__i < G__13653__a.length) {G__13653__a[G__13653__i] = arguments[G__13653__i + 3]; ++G__13653__i;} +G__13652 = new cljs.core.IndexedSeq(G__13653__a,0,null); +} +return G__13648__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__13652); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13648.cljs$lang$maxFixedArity = 3; +G__13648.cljs$lang$applyTo = G__13648__4.cljs$lang$applyTo; +G__13648.cljs$core$IFn$_invoke$arity$0 = G__13648__0; +G__13648.cljs$core$IFn$_invoke$arity$1 = G__13648__1; +G__13648.cljs$core$IFn$_invoke$arity$2 = G__13648__2; +G__13648.cljs$core$IFn$_invoke$arity$3 = G__13648__3; +G__13648.cljs$core$IFn$_invoke$arity$variadic = G__13648__4.cljs$core$IFn$_invoke$arity$variadic; +return G__13648; +})() +}); + +cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic = (function (f,g,h,fs){ +var fs__$1 = cljs.core.list_STAR_.cljs$core$IFn$_invoke$arity$4(f,g,h,fs); +return ((function (fs__$1){ +return (function() { +var G__13654 = null; +var G__13654__0 = (function (){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (fs__$1){ +return (function (p1__13615_SHARP_,p2__13616_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__13615_SHARP_,(p2__13616_SHARP_.cljs$core$IFn$_invoke$arity$0 ? p2__13616_SHARP_.cljs$core$IFn$_invoke$arity$0() : p2__13616_SHARP_.call(null))); +});})(fs__$1)) +,cljs.core.PersistentVector.EMPTY,fs__$1); +}); +var G__13654__1 = (function (x){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (fs__$1){ +return (function (p1__13617_SHARP_,p2__13618_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__13617_SHARP_,(p2__13618_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p2__13618_SHARP_.cljs$core$IFn$_invoke$arity$1(x) : p2__13618_SHARP_.call(null,x))); +});})(fs__$1)) +,cljs.core.PersistentVector.EMPTY,fs__$1); +}); +var G__13654__2 = (function (x,y){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (fs__$1){ +return (function (p1__13619_SHARP_,p2__13620_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__13619_SHARP_,(p2__13620_SHARP_.cljs$core$IFn$_invoke$arity$2 ? p2__13620_SHARP_.cljs$core$IFn$_invoke$arity$2(x,y) : p2__13620_SHARP_.call(null,x,y))); +});})(fs__$1)) +,cljs.core.PersistentVector.EMPTY,fs__$1); +}); +var G__13654__3 = (function (x,y,z){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (fs__$1){ +return (function (p1__13621_SHARP_,p2__13622_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__13621_SHARP_,(p2__13622_SHARP_.cljs$core$IFn$_invoke$arity$3 ? p2__13622_SHARP_.cljs$core$IFn$_invoke$arity$3(x,y,z) : p2__13622_SHARP_.call(null,x,y,z))); +});})(fs__$1)) +,cljs.core.PersistentVector.EMPTY,fs__$1); +}); +var G__13654__4 = (function() { +var G__13655__delegate = function (x,y,z,args){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (fs__$1){ +return (function (p1__13623_SHARP_,p2__13624_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__13623_SHARP_,cljs.core.apply.cljs$core$IFn$_invoke$arity$5(p2__13624_SHARP_,x,y,z,args)); +});})(fs__$1)) +,cljs.core.PersistentVector.EMPTY,fs__$1); +}; +var G__13655 = function (x,y,z,var_args){ +var args = null; +if (arguments.length > 3) { +var G__13656__i = 0, G__13656__a = new Array(arguments.length - 3); +while (G__13656__i < G__13656__a.length) {G__13656__a[G__13656__i] = arguments[G__13656__i + 3]; ++G__13656__i;} + args = new cljs.core.IndexedSeq(G__13656__a,0,null); +} +return G__13655__delegate.call(this,x,y,z,args);}; +G__13655.cljs$lang$maxFixedArity = 3; +G__13655.cljs$lang$applyTo = (function (arglist__13657){ +var x = cljs.core.first(arglist__13657); +arglist__13657 = cljs.core.next(arglist__13657); +var y = cljs.core.first(arglist__13657); +arglist__13657 = cljs.core.next(arglist__13657); +var z = cljs.core.first(arglist__13657); +var args = cljs.core.rest(arglist__13657); +return G__13655__delegate(x,y,z,args); +}); +G__13655.cljs$core$IFn$_invoke$arity$variadic = G__13655__delegate; +return G__13655; +})() +; +G__13654 = function(x,y,z,var_args){ +var args = var_args; +switch(arguments.length){ +case 0: +return G__13654__0.call(this); +case 1: +return G__13654__1.call(this,x); +case 2: +return G__13654__2.call(this,x,y); +case 3: +return G__13654__3.call(this,x,y,z); +default: +var G__13658 = null; +if (arguments.length > 3) { +var G__13659__i = 0, G__13659__a = new Array(arguments.length - 3); +while (G__13659__i < G__13659__a.length) {G__13659__a[G__13659__i] = arguments[G__13659__i + 3]; ++G__13659__i;} +G__13658 = new cljs.core.IndexedSeq(G__13659__a,0,null); +} +return G__13654__4.cljs$core$IFn$_invoke$arity$variadic(x,y,z, G__13658); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13654.cljs$lang$maxFixedArity = 3; +G__13654.cljs$lang$applyTo = G__13654__4.cljs$lang$applyTo; +G__13654.cljs$core$IFn$_invoke$arity$0 = G__13654__0; +G__13654.cljs$core$IFn$_invoke$arity$1 = G__13654__1; +G__13654.cljs$core$IFn$_invoke$arity$2 = G__13654__2; +G__13654.cljs$core$IFn$_invoke$arity$3 = G__13654__3; +G__13654.cljs$core$IFn$_invoke$arity$variadic = G__13654__4.cljs$core$IFn$_invoke$arity$variadic; +return G__13654; +})() +;})(fs__$1)) +}); + +cljs.core.juxt.cljs$lang$applyTo = (function (seq13626){ +var G__13627 = cljs.core.first(seq13626); +var seq13626__$1 = cljs.core.next(seq13626); +var G__13628 = cljs.core.first(seq13626__$1); +var seq13626__$2 = cljs.core.next(seq13626__$1); +var G__13629 = cljs.core.first(seq13626__$2); +var seq13626__$3 = cljs.core.next(seq13626__$2); +return cljs.core.juxt.cljs$core$IFn$_invoke$arity$variadic(G__13627,G__13628,G__13629,seq13626__$3); +}); + +cljs.core.juxt.cljs$lang$maxFixedArity = (3); + +/** + * When lazy sequences are produced via functions that have side + * effects, any effects other than those needed to produce the first + * element in the seq do not occur until the seq is consumed. dorun can + * be used to force any effects. Walks through the successive nexts of + * the seq, does not retain the head and returns nil. + */ +cljs.core.dorun = (function cljs$core$dorun(var_args){ +var args13660 = []; +var len__9181__auto___13663 = arguments.length; +var i__9182__auto___13664 = (0); +while(true){ +if((i__9182__auto___13664 < len__9181__auto___13663)){ +args13660.push((arguments[i__9182__auto___13664])); + +var G__13665 = (i__9182__auto___13664 + (1)); +i__9182__auto___13664 = G__13665; +continue; +} else { +} +break; +} + +var G__13662 = args13660.length; +switch (G__13662) { +case 1: +return cljs.core.dorun.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.dorun.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13660.length)].join(''))); + +} +}); + +cljs.core.dorun.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +while(true){ +if(cljs.core.seq(coll)){ +var G__13667 = cljs.core.next(coll); +coll = G__13667; +continue; +} else { +return null; +} +break; +} +}); + +cljs.core.dorun.cljs$core$IFn$_invoke$arity$2 = (function (n,coll){ +while(true){ +if((cljs.core.seq(coll)) && ((n > (0)))){ +var G__13668 = (n - (1)); +var G__13669 = cljs.core.next(coll); +n = G__13668; +coll = G__13669; +continue; +} else { +return null; +} +break; +} +}); + +cljs.core.dorun.cljs$lang$maxFixedArity = 2; + +/** + * When lazy sequences are produced via functions that have side + * effects, any effects other than those needed to produce the first + * element in the seq do not occur until the seq is consumed. doall can + * be used to force any effects. Walks through the successive nexts of + * the seq, retains the head and returns it, thus causing the entire + * seq to reside in memory at one time. + */ +cljs.core.doall = (function cljs$core$doall(var_args){ +var args13670 = []; +var len__9181__auto___13673 = arguments.length; +var i__9182__auto___13674 = (0); +while(true){ +if((i__9182__auto___13674 < len__9181__auto___13673)){ +args13670.push((arguments[i__9182__auto___13674])); + +var G__13675 = (i__9182__auto___13674 + (1)); +i__9182__auto___13674 = G__13675; +continue; +} else { +} +break; +} + +var G__13672 = args13670.length; +switch (G__13672) { +case 1: +return cljs.core.doall.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.doall.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13670.length)].join(''))); + +} +}); + +cljs.core.doall.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +cljs.core.dorun.cljs$core$IFn$_invoke$arity$1(coll); + +return coll; +}); + +cljs.core.doall.cljs$core$IFn$_invoke$arity$2 = (function (n,coll){ +cljs.core.dorun.cljs$core$IFn$_invoke$arity$2(n,coll); + +return coll; +}); + +cljs.core.doall.cljs$lang$maxFixedArity = 2; + +/** + * Returns true if x is a JavaScript RegExp instance. + */ +cljs.core.regexp_QMARK_ = (function cljs$core$regexp_QMARK_(x){ +return (x instanceof RegExp); +}); +/** + * Returns the result of (re-find re s) if re fully matches s. + */ +cljs.core.re_matches = (function cljs$core$re_matches(re,s){ +if(typeof s === 'string'){ +var matches = re.exec(s); +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.first(matches),s)){ +if((cljs.core.count(matches) === (1))){ +return cljs.core.first(matches); +} else { +return cljs.core.vec(matches); +} +} else { +return null; +} +} else { +throw (new TypeError("re-matches must match against a string.")); +} +}); +/** + * Returns the first regex match, if any, of s to re, using + * re.exec(s). Returns a vector, containing first the matching + * substring, then any capturing groups if the regular expression contains + * capturing groups. + */ +cljs.core.re_find = (function cljs$core$re_find(re,s){ +if(typeof s === 'string'){ +var matches = re.exec(s); +if((matches == null)){ +return null; +} else { +if((cljs.core.count(matches) === (1))){ +return cljs.core.first(matches); +} else { +return cljs.core.vec(matches); +} +} +} else { +throw (new TypeError("re-find must match against a string.")); +} +}); +/** + * Returns a lazy sequence of successive matches of re in s. + */ +cljs.core.re_seq = (function cljs$core$re_seq(re,s){ +var match_data = cljs.core.re_find(re,s); +var match_idx = s.search(re); +var match_str = ((cljs.core.coll_QMARK_(match_data))?cljs.core.first(match_data):match_data); +var post_match = cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s,(match_idx + cljs.core.count(match_str))); +if(cljs.core.truth_(match_data)){ +return (new cljs.core.LazySeq(null,((function (match_data,match_idx,match_str,post_match){ +return (function (){ +return cljs.core.cons(match_data,((cljs.core.seq(post_match))?(cljs.core.re_seq.cljs$core$IFn$_invoke$arity$2 ? cljs.core.re_seq.cljs$core$IFn$_invoke$arity$2(re,post_match) : cljs.core.re_seq.call(null,re,post_match)):null)); +});})(match_data,match_idx,match_str,post_match)) +,null,null)); +} else { +return null; +} +}); +/** + * Returns an instance of RegExp which has compiled the provided string. + */ +cljs.core.re_pattern = (function cljs$core$re_pattern(s){ +if((s instanceof RegExp)){ +return s; +} else { +var vec__13680 = cljs.core.re_find(/^\(\?([idmsux]*)\)/,s); +var prefix = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13680,(0),null); +var flags = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13680,(1),null); +var pattern = cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s,cljs.core.count(prefix)); +return (new RegExp(pattern,(function (){var or__7960__auto__ = flags; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return ""; +} +})())); +} +}); +cljs.core.pr_sequential_writer = (function cljs$core$pr_sequential_writer(writer,print_one,begin,sep,end,opts,coll){ +var _STAR_print_level_STAR_13690 = cljs.core._STAR_print_level_STAR_; +cljs.core._STAR_print_level_STAR_ = (((cljs.core._STAR_print_level_STAR_ == null))?null:(cljs.core._STAR_print_level_STAR_ - (1))); + +try{if((!((cljs.core._STAR_print_level_STAR_ == null))) && ((cljs.core._STAR_print_level_STAR_ < (0)))){ +return cljs.core._write(writer,"#"); +} else { +cljs.core._write(writer,begin); + +if((cljs.core.cst$kw$print_DASH_length.cljs$core$IFn$_invoke$arity$1(opts) === (0))){ +if(cljs.core.seq(coll)){ +cljs.core._write(writer,(function (){var or__7960__auto__ = cljs.core.cst$kw$more_DASH_marker.cljs$core$IFn$_invoke$arity$1(opts); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return "..."; +} +})()); +} else { +} +} else { +if(cljs.core.seq(coll)){ +var G__13691_13697 = cljs.core.first(coll); +var G__13692_13698 = writer; +var G__13693_13699 = opts; +(print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__13691_13697,G__13692_13698,G__13693_13699) : print_one.call(null,G__13691_13697,G__13692_13698,G__13693_13699)); +} else { +} + +var coll_13700__$1 = cljs.core.next(coll); +var n_13701 = (cljs.core.cst$kw$print_DASH_length.cljs$core$IFn$_invoke$arity$1(opts) - (1)); +while(true){ +if((coll_13700__$1) && (((n_13701 == null)) || (!((n_13701 === (0)))))){ +cljs.core._write(writer,sep); + +var G__13694_13702 = cljs.core.first(coll_13700__$1); +var G__13695_13703 = writer; +var G__13696_13704 = opts; +(print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__13694_13702,G__13695_13703,G__13696_13704) : print_one.call(null,G__13694_13702,G__13695_13703,G__13696_13704)); + +var G__13705 = cljs.core.next(coll_13700__$1); +var G__13706 = (n_13701 - (1)); +coll_13700__$1 = G__13705; +n_13701 = G__13706; +continue; +} else { +if((cljs.core.seq(coll_13700__$1)) && ((n_13701 === (0)))){ +cljs.core._write(writer,sep); + +cljs.core._write(writer,(function (){var or__7960__auto__ = cljs.core.cst$kw$more_DASH_marker.cljs$core$IFn$_invoke$arity$1(opts); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return "..."; +} +})()); +} else { +} +} +break; +} +} + +return cljs.core._write(writer,end); +} +}finally {cljs.core._STAR_print_level_STAR_ = _STAR_print_level_STAR_13690; +}}); +cljs.core.write_all = (function cljs$core$write_all(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13713 = arguments.length; +var i__9182__auto___13714 = (0); +while(true){ +if((i__9182__auto___13714 < len__9181__auto___13713)){ +args__9188__auto__.push((arguments[i__9182__auto___13714])); + +var G__13715 = (i__9182__auto___13714 + (1)); +i__9182__auto___13714 = G__13715; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic = (function (writer,ss){ +var seq__13709 = cljs.core.seq(ss); +var chunk__13710 = null; +var count__13711 = (0); +var i__13712 = (0); +while(true){ +if((i__13712 < count__13711)){ +var s = chunk__13710.cljs$core$IIndexed$_nth$arity$2(null,i__13712); +cljs.core._write(writer,s); + +var G__13716 = seq__13709; +var G__13717 = chunk__13710; +var G__13718 = count__13711; +var G__13719 = (i__13712 + (1)); +seq__13709 = G__13716; +chunk__13710 = G__13717; +count__13711 = G__13718; +i__13712 = G__13719; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__13709); +if(temp__5278__auto__){ +var seq__13709__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__13709__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__13709__$1); +var G__13720 = cljs.core.chunk_rest(seq__13709__$1); +var G__13721 = c__8871__auto__; +var G__13722 = cljs.core.count(c__8871__auto__); +var G__13723 = (0); +seq__13709 = G__13720; +chunk__13710 = G__13721; +count__13711 = G__13722; +i__13712 = G__13723; +continue; +} else { +var s = cljs.core.first(seq__13709__$1); +cljs.core._write(writer,s); + +var G__13724 = cljs.core.next(seq__13709__$1); +var G__13725 = null; +var G__13726 = (0); +var G__13727 = (0); +seq__13709 = G__13724; +chunk__13710 = G__13725; +count__13711 = G__13726; +i__13712 = G__13727; +continue; +} +} else { +return null; +} +} +break; +} +}); + +cljs.core.write_all.cljs$lang$maxFixedArity = (1); + +cljs.core.write_all.cljs$lang$applyTo = (function (seq13707){ +var G__13708 = cljs.core.first(seq13707); +var seq13707__$1 = cljs.core.next(seq13707); +return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(G__13708,seq13707__$1); +}); + +cljs.core.string_print = (function cljs$core$string_print(x){ +(cljs.core._STAR_print_fn_STAR_.cljs$core$IFn$_invoke$arity$1 ? cljs.core._STAR_print_fn_STAR_.cljs$core$IFn$_invoke$arity$1(x) : cljs.core._STAR_print_fn_STAR_.call(null,x)); + +return null; +}); +cljs.core.flush = (function cljs$core$flush(){ +return null; +}); +cljs.core.char_escapes = (function (){var obj13729 = {"\"":"\\\"","\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t"}; +return obj13729; +})(); +cljs.core.quote_string = (function cljs$core$quote_string(s){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("\""),cljs.core.str.cljs$core$IFn$_invoke$arity$1(s.replace(RegExp("[\\\\\"\b\f\n\r\t]","g"),(function (match){ +return (cljs.core.char_escapes[match]); +}))),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\"")].join(''); +}); +cljs.core.print_meta_QMARK_ = (function cljs$core$print_meta_QMARK_(opts,obj){ +var and__7948__auto__ = cljs.core.boolean$(cljs.core.get.cljs$core$IFn$_invoke$arity$2(opts,cljs.core.cst$kw$meta)); +if(and__7948__auto__){ +var and__7948__auto____$1 = ((!((obj == null)))?((((obj.cljs$lang$protocol_mask$partition0$ & (131072))) || ((cljs.core.PROTOCOL_SENTINEL === obj.cljs$core$IMeta$)))?true:false):false); +if(and__7948__auto____$1){ +return !((cljs.core.meta(obj) == null)); +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +}); +cljs.core.pr_writer_impl = (function cljs$core$pr_writer_impl(obj,writer,opts){ +if((obj == null)){ +return cljs.core._write(writer,"nil"); +} else { +if(cljs.core.print_meta_QMARK_(opts,obj)){ +cljs.core._write(writer,"^"); + +var G__13744_13752 = cljs.core.meta(obj); +var G__13745_13753 = writer; +var G__13746_13754 = opts; +(cljs.core.pr_writer.cljs$core$IFn$_invoke$arity$3 ? cljs.core.pr_writer.cljs$core$IFn$_invoke$arity$3(G__13744_13752,G__13745_13753,G__13746_13754) : cljs.core.pr_writer.call(null,G__13744_13752,G__13745_13753,G__13746_13754)); + +cljs.core._write(writer," "); +} else { +} + +if(obj.cljs$lang$type){ +return obj.cljs$lang$ctorPrWriter(obj,writer,opts); +} else { +if(((!((obj == null)))?((((obj.cljs$lang$protocol_mask$partition0$ & (2147483648))) || ((cljs.core.PROTOCOL_SENTINEL === obj.cljs$core$IPrintWithWriter$)))?true:false):false)){ +return obj.cljs$core$IPrintWithWriter$_pr_writer$arity$3(null,writer,opts); +} else { +if((obj === true) || (obj === false) || (typeof obj === 'number')){ +return cljs.core._write(writer,[cljs.core.str.cljs$core$IFn$_invoke$arity$1(obj)].join('')); +} else { +if(cljs.core.object_QMARK_(obj)){ +cljs.core._write(writer,"#js "); + +var G__13748 = cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (k){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(k),(obj[k])], null); +}),cljs.core.js_keys(obj)); +var G__13749 = cljs.core.pr_writer; +var G__13750 = writer; +var G__13751 = opts; +return (cljs.core.print_map.cljs$core$IFn$_invoke$arity$4 ? cljs.core.print_map.cljs$core$IFn$_invoke$arity$4(G__13748,G__13749,G__13750,G__13751) : cljs.core.print_map.call(null,G__13748,G__13749,G__13750,G__13751)); +} else { +if(cljs.core.array_QMARK_(obj)){ +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"#js ["," ","]",opts,obj); +} else { +if(goog.isString(obj)){ +if(cljs.core.truth_(cljs.core.cst$kw$readably.cljs$core$IFn$_invoke$arity$1(opts))){ +return cljs.core._write(writer,cljs.core.quote_string(obj)); +} else { +return cljs.core._write(writer,obj); +} +} else { +if(goog.isFunction(obj)){ +var name = obj.name; +var name__$1 = (cljs.core.truth_((function (){var or__7960__auto__ = (name == null); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return goog.string.isEmpty(name); +} +})())?"Function":name); +return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer,cljs.core.array_seq(["#object[",name__$1," \"",[cljs.core.str.cljs$core$IFn$_invoke$arity$1(obj)].join(''),"\"]"], 0)); +} else { +if((obj instanceof Date)){ +var normalize = (function (n,len){ +var ns = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(n)].join(''); +while(true){ +if((cljs.core.count(ns) < len)){ +var G__13755 = [cljs.core.str.cljs$core$IFn$_invoke$arity$1("0"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns)].join(''); +ns = G__13755; +continue; +} else { +return ns; +} +break; +} +}); +return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer,cljs.core.array_seq(["#inst \"",[cljs.core.str.cljs$core$IFn$_invoke$arity$1(obj.getUTCFullYear())].join(''),"-",normalize((obj.getUTCMonth() + (1)),(2)),"-",normalize(obj.getUTCDate(),(2)),"T",normalize(obj.getUTCHours(),(2)),":",normalize(obj.getUTCMinutes(),(2)),":",normalize(obj.getUTCSeconds(),(2)),".",normalize(obj.getUTCMilliseconds(),(3)),"-","00:00\""], 0)); +} else { +if(cljs.core.regexp_QMARK_(obj)){ +return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer,cljs.core.array_seq(["#\"",obj.source,"\""], 0)); +} else { +if(cljs.core.truth_(obj.constructor.cljs$lang$ctorStr)){ +return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer,cljs.core.array_seq(["#object[",obj.constructor.cljs$lang$ctorStr.replace((new RegExp("/","g")),"."),"]"], 0)); +} else { +var name = obj.constructor.name; +var name__$1 = (cljs.core.truth_((function (){var or__7960__auto__ = (name == null); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return goog.string.isEmpty(name); +} +})())?"Object":name); +return cljs.core.write_all.cljs$core$IFn$_invoke$arity$variadic(writer,cljs.core.array_seq(["#object[",name__$1," ",[cljs.core.str.cljs$core$IFn$_invoke$arity$1(obj)].join(''),"]"], 0)); +} + +} +} +} +} +} +} +} +} +} + +} +}); +/** + * Prefer this to pr-seq, because it makes the printing function + * configurable, allowing efficient implementations such as appending + * to a StringBuffer. + */ +cljs.core.pr_writer = (function cljs$core$pr_writer(obj,writer,opts){ +var temp__5276__auto__ = cljs.core.cst$kw$alt_DASH_impl.cljs$core$IFn$_invoke$arity$1(opts); +if(cljs.core.truth_(temp__5276__auto__)){ +var alt_impl = temp__5276__auto__; +var G__13759 = obj; +var G__13760 = writer; +var G__13761 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(opts,cljs.core.cst$kw$fallback_DASH_impl,cljs.core.pr_writer_impl); +return (alt_impl.cljs$core$IFn$_invoke$arity$3 ? alt_impl.cljs$core$IFn$_invoke$arity$3(G__13759,G__13760,G__13761) : alt_impl.call(null,G__13759,G__13760,G__13761)); +} else { +return cljs.core.pr_writer_impl(obj,writer,opts); +} +}); +cljs.core.pr_seq_writer = (function cljs$core$pr_seq_writer(objs,writer,opts){ +cljs.core.pr_writer(cljs.core.first(objs),writer,opts); + +var seq__13766 = cljs.core.seq(cljs.core.next(objs)); +var chunk__13767 = null; +var count__13768 = (0); +var i__13769 = (0); +while(true){ +if((i__13769 < count__13768)){ +var obj = chunk__13767.cljs$core$IIndexed$_nth$arity$2(null,i__13769); +cljs.core._write(writer," "); + +cljs.core.pr_writer(obj,writer,opts); + +var G__13770 = seq__13766; +var G__13771 = chunk__13767; +var G__13772 = count__13768; +var G__13773 = (i__13769 + (1)); +seq__13766 = G__13770; +chunk__13767 = G__13771; +count__13768 = G__13772; +i__13769 = G__13773; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__13766); +if(temp__5278__auto__){ +var seq__13766__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__13766__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__13766__$1); +var G__13774 = cljs.core.chunk_rest(seq__13766__$1); +var G__13775 = c__8871__auto__; +var G__13776 = cljs.core.count(c__8871__auto__); +var G__13777 = (0); +seq__13766 = G__13774; +chunk__13767 = G__13775; +count__13768 = G__13776; +i__13769 = G__13777; +continue; +} else { +var obj = cljs.core.first(seq__13766__$1); +cljs.core._write(writer," "); + +cljs.core.pr_writer(obj,writer,opts); + +var G__13778 = cljs.core.next(seq__13766__$1); +var G__13779 = null; +var G__13780 = (0); +var G__13781 = (0); +seq__13766 = G__13778; +chunk__13767 = G__13779; +count__13768 = G__13780; +i__13769 = G__13781; +continue; +} +} else { +return null; +} +} +break; +} +}); +cljs.core.pr_sb_with_opts = (function cljs$core$pr_sb_with_opts(objs,opts){ +var sb = (new goog.string.StringBuffer()); +var writer = (new cljs.core.StringBufferWriter(sb)); +cljs.core.pr_seq_writer(objs,writer,opts); + +writer.cljs$core$IWriter$_flush$arity$1(null); + +return sb; +}); +/** + * Prints a sequence of objects to a string, observing all the + * options given in opts + */ +cljs.core.pr_str_with_opts = (function cljs$core$pr_str_with_opts(objs,opts){ +if(cljs.core.empty_QMARK_(objs)){ +return ""; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_sb_with_opts(objs,opts))].join(''); +} +}); +/** + * Same as pr-str-with-opts followed by (newline) + */ +cljs.core.prn_str_with_opts = (function cljs$core$prn_str_with_opts(objs,opts){ +if(cljs.core.empty_QMARK_(objs)){ +return "\n"; +} else { +var sb = cljs.core.pr_sb_with_opts(objs,opts); +sb.append("\n"); + +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(sb)].join(''); +} +}); +/** + * Prints a sequence of objects using string-print, observing all + * the options given in opts + */ +cljs.core.pr_with_opts = (function cljs$core$pr_with_opts(objs,opts){ +return cljs.core.string_print(cljs.core.pr_str_with_opts(objs,opts)); +}); +/** + * Prints a newline using *print-fn* + */ +cljs.core.newline = (function cljs$core$newline(var_args){ +var args13782 = []; +var len__9181__auto___13785 = arguments.length; +var i__9182__auto___13786 = (0); +while(true){ +if((i__9182__auto___13786 < len__9181__auto___13785)){ +args13782.push((arguments[i__9182__auto___13786])); + +var G__13787 = (i__9182__auto___13786 + (1)); +i__9182__auto___13786 = G__13787; +continue; +} else { +} +break; +} + +var G__13784 = args13782.length; +switch (G__13784) { +case 0: +return cljs.core.newline.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.newline.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13782.length)].join(''))); + +} +}); + +cljs.core.newline.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.newline.cljs$core$IFn$_invoke$arity$1(null); +}); + +cljs.core.newline.cljs$core$IFn$_invoke$arity$1 = (function (opts){ +cljs.core.string_print("\n"); + +if(cljs.core.truth_(cljs.core.get.cljs$core$IFn$_invoke$arity$2(opts,cljs.core.cst$kw$flush_DASH_on_DASH_newline))){ +return cljs.core.flush(); +} else { +return null; +} +}); + +cljs.core.newline.cljs$lang$maxFixedArity = 1; + +/** + * pr to a string, returning it. Fundamental entrypoint to IPrintWithWriter. + */ +cljs.core.pr_str = (function cljs$core$pr_str(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13790 = arguments.length; +var i__9182__auto___13791 = (0); +while(true){ +if((i__9182__auto___13791 < len__9181__auto___13790)){ +args__9188__auto__.push((arguments[i__9182__auto___13791])); + +var G__13792 = (i__9182__auto___13791 + (1)); +i__9182__auto___13791 = G__13792; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic = (function (objs){ +return cljs.core.pr_str_with_opts(objs,cljs.core.pr_opts()); +}); + +cljs.core.pr_str.cljs$lang$maxFixedArity = (0); + +cljs.core.pr_str.cljs$lang$applyTo = (function (seq13789){ +return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13789)); +}); + +/** + * Same as pr-str followed by (newline) + */ +cljs.core.prn_str = (function cljs$core$prn_str(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13794 = arguments.length; +var i__9182__auto___13795 = (0); +while(true){ +if((i__9182__auto___13795 < len__9181__auto___13794)){ +args__9188__auto__.push((arguments[i__9182__auto___13795])); + +var G__13796 = (i__9182__auto___13795 + (1)); +i__9182__auto___13795 = G__13796; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic = (function (objs){ +return cljs.core.prn_str_with_opts(objs,cljs.core.pr_opts()); +}); + +cljs.core.prn_str.cljs$lang$maxFixedArity = (0); + +cljs.core.prn_str.cljs$lang$applyTo = (function (seq13793){ +return cljs.core.prn_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13793)); +}); + +/** + * Prints the object(s) using string-print. Prints the + * object(s), separated by spaces if there is more than one. + * By default, pr and prn print in a way that objects can be + * read by the reader + */ +cljs.core.pr = (function cljs$core$pr(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13798 = arguments.length; +var i__9182__auto___13799 = (0); +while(true){ +if((i__9182__auto___13799 < len__9181__auto___13798)){ +args__9188__auto__.push((arguments[i__9182__auto___13799])); + +var G__13800 = (i__9182__auto___13799 + (1)); +i__9182__auto___13799 = G__13800; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic = (function (objs){ +return cljs.core.pr_with_opts(objs,cljs.core.pr_opts()); +}); + +cljs.core.pr.cljs$lang$maxFixedArity = (0); + +cljs.core.pr.cljs$lang$applyTo = (function (seq13797){ +return cljs.core.pr.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13797)); +}); + +/** + * Prints the object(s) using string-print. + * print and println produce output for human consumption. + * @param {...*} var_args + */ +cljs.core.print = (function() { +var cljs$core$cljs_core_print__delegate = function (objs){ +return cljs.core.pr_with_opts(objs,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(),cljs.core.cst$kw$readably,false)); +}; +var cljs$core$cljs_core_print = function (var_args){ +var objs = null; +if (arguments.length > 0) { +var G__13801__i = 0, G__13801__a = new Array(arguments.length - 0); +while (G__13801__i < G__13801__a.length) {G__13801__a[G__13801__i] = arguments[G__13801__i + 0]; ++G__13801__i;} + objs = new cljs.core.IndexedSeq(G__13801__a,0,null); +} +return cljs$core$cljs_core_print__delegate.call(this,objs);}; +cljs$core$cljs_core_print.cljs$lang$maxFixedArity = 0; +cljs$core$cljs_core_print.cljs$lang$applyTo = (function (arglist__13802){ +var objs = cljs.core.seq(arglist__13802); +return cljs$core$cljs_core_print__delegate(objs); +}); +cljs$core$cljs_core_print.cljs$core$IFn$_invoke$arity$variadic = cljs$core$cljs_core_print__delegate; +return cljs$core$cljs_core_print; +})() +; +/** + * print to a string, returning it + */ +cljs.core.print_str = (function cljs$core$print_str(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13804 = arguments.length; +var i__9182__auto___13805 = (0); +while(true){ +if((i__9182__auto___13805 < len__9181__auto___13804)){ +args__9188__auto__.push((arguments[i__9182__auto___13805])); + +var G__13806 = (i__9182__auto___13805 + (1)); +i__9182__auto___13805 = G__13806; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic = (function (objs){ +return cljs.core.pr_str_with_opts(objs,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(),cljs.core.cst$kw$readably,false)); +}); + +cljs.core.print_str.cljs$lang$maxFixedArity = (0); + +cljs.core.print_str.cljs$lang$applyTo = (function (seq13803){ +return cljs.core.print_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13803)); +}); + +/** + * Same as print followed by (newline) + */ +cljs.core.println = (function cljs$core$println(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13808 = arguments.length; +var i__9182__auto___13809 = (0); +while(true){ +if((i__9182__auto___13809 < len__9181__auto___13808)){ +args__9188__auto__.push((arguments[i__9182__auto___13809])); + +var G__13810 = (i__9182__auto___13809 + (1)); +i__9182__auto___13809 = G__13810; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.println.cljs$core$IFn$_invoke$arity$variadic = (function (objs){ +cljs.core.pr_with_opts(objs,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(),cljs.core.cst$kw$readably,false)); + +if(cljs.core._STAR_print_newline_STAR_){ +return cljs.core.newline.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_opts()); +} else { +return null; +} +}); + +cljs.core.println.cljs$lang$maxFixedArity = (0); + +cljs.core.println.cljs$lang$applyTo = (function (seq13807){ +return cljs.core.println.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13807)); +}); + +/** + * println to a string, returning it + */ +cljs.core.println_str = (function cljs$core$println_str(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13812 = arguments.length; +var i__9182__auto___13813 = (0); +while(true){ +if((i__9182__auto___13813 < len__9181__auto___13812)){ +args__9188__auto__.push((arguments[i__9182__auto___13813])); + +var G__13814 = (i__9182__auto___13813 + (1)); +i__9182__auto___13813 = G__13814; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic = (function (objs){ +return cljs.core.prn_str_with_opts(objs,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.pr_opts(),cljs.core.cst$kw$readably,false)); +}); + +cljs.core.println_str.cljs$lang$maxFixedArity = (0); + +cljs.core.println_str.cljs$lang$applyTo = (function (seq13811){ +return cljs.core.println_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13811)); +}); + +/** + * Same as pr followed by (newline). + */ +cljs.core.prn = (function cljs$core$prn(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13816 = arguments.length; +var i__9182__auto___13817 = (0); +while(true){ +if((i__9182__auto___13817 < len__9181__auto___13816)){ +args__9188__auto__.push((arguments[i__9182__auto___13817])); + +var G__13818 = (i__9182__auto___13817 + (1)); +i__9182__auto___13817 = G__13818; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic = (function (objs){ +cljs.core.pr_with_opts(objs,cljs.core.pr_opts()); + +if(cljs.core._STAR_print_newline_STAR_){ +return cljs.core.newline.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_opts()); +} else { +return null; +} +}); + +cljs.core.prn.cljs$lang$maxFixedArity = (0); + +cljs.core.prn.cljs$lang$applyTo = (function (seq13815){ +return cljs.core.prn.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13815)); +}); + +cljs.core.strip_ns = (function cljs$core$strip_ns(named){ +if((named instanceof cljs.core.Symbol)){ +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$2(null,cljs.core.name(named)); +} else { +return cljs.core.keyword.cljs$core$IFn$_invoke$arity$2(null,cljs.core.name(named)); +} +}); +/** + * Returns [lifted-ns lifted-map] or nil if m can't be lifted. + */ +cljs.core.lift_ns = (function cljs$core$lift_ns(m){ +if(cljs.core._STAR_print_namespace_maps_STAR_){ +var ns = null; +var G__13844 = cljs.core.seq(m); +var vec__13845 = G__13844; +var seq__13846 = cljs.core.seq(vec__13845); +var first__13847 = cljs.core.first(seq__13846); +var seq__13846__$1 = cljs.core.next(seq__13846); +var vec__13848 = first__13847; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13848,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13848,(1),null); +var entry = vec__13848; +var entries = seq__13846__$1; +var lm = cljs.core.empty(m); +var ns__$1 = ns; +var G__13844__$1 = G__13844; +var lm__$1 = lm; +while(true){ +var ns__$2 = ns__$1; +var vec__13851 = G__13844__$1; +var seq__13852 = cljs.core.seq(vec__13851); +var first__13853 = cljs.core.first(seq__13852); +var seq__13852__$1 = cljs.core.next(seq__13852); +var vec__13854 = first__13853; +var k__$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13854,(0),null); +var v__$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13854,(1),null); +var entry__$1 = vec__13854; +var entries__$1 = seq__13852__$1; +var lm__$2 = lm__$1; +if(cljs.core.truth_(entry__$1)){ +if(((k__$1 instanceof cljs.core.Keyword)) || ((k__$1 instanceof cljs.core.Symbol))){ +if(cljs.core.truth_(ns__$2)){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(ns__$2,cljs.core.namespace(k__$1))){ +var G__13857 = ns__$2; +var G__13858 = entries__$1; +var G__13859 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(lm__$2,cljs.core.strip_ns(k__$1),v__$1); +ns__$1 = G__13857; +G__13844__$1 = G__13858; +lm__$1 = G__13859; +continue; +} else { +return null; +} +} else { +var temp__5278__auto__ = cljs.core.namespace(k__$1); +if(cljs.core.truth_(temp__5278__auto__)){ +var new_ns = temp__5278__auto__; +var G__13860 = new_ns; +var G__13861 = entries__$1; +var G__13862 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(lm__$2,cljs.core.strip_ns(k__$1),v__$1); +ns__$1 = G__13860; +G__13844__$1 = G__13861; +lm__$1 = G__13862; +continue; +} else { +return null; +} +} +} else { +return null; +} +} else { +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [ns__$2,lm__$2], null); +} +break; +} +} else { +return null; +} +}); +cljs.core.print_prefix_map = (function cljs$core$print_prefix_map(prefix,m,print_one,writer,opts){ +return cljs.core.pr_sequential_writer(writer,(function (e,w,opts__$1){ +var G__13869_13875 = cljs.core.key(e); +var G__13870_13876 = w; +var G__13871_13877 = opts__$1; +(print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__13869_13875,G__13870_13876,G__13871_13877) : print_one.call(null,G__13869_13875,G__13870_13876,G__13871_13877)); + +cljs.core._write(w," "); + +var G__13872 = cljs.core.val(e); +var G__13873 = w; +var G__13874 = opts__$1; +return (print_one.cljs$core$IFn$_invoke$arity$3 ? print_one.cljs$core$IFn$_invoke$arity$3(G__13872,G__13873,G__13874) : print_one.call(null,G__13872,G__13873,G__13874)); +}),[cljs.core.str.cljs$core$IFn$_invoke$arity$1(prefix),cljs.core.str.cljs$core$IFn$_invoke$arity$1("{")].join(''),", ","}",opts,cljs.core.seq(m)); +}); +cljs.core.print_map = (function cljs$core$print_map(m,print_one,writer,opts){ +var vec__13881 = cljs.core.lift_ns(m); +var ns = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13881,(0),null); +var lift_map = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13881,(1),null); +if(cljs.core.truth_(ns)){ +return cljs.core.print_prefix_map([cljs.core.str.cljs$core$IFn$_invoke$arity$1("#:"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns)].join(''),lift_map,print_one,writer,opts); +} else { +return cljs.core.print_prefix_map(null,m,print_one,writer,opts); +} +}); +cljs.core.Volatile.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Volatile.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,writer,opts){ +var a__$1 = this; +cljs.core._write(writer,"#object [cljs.core.Volatile "); + +cljs.core.pr_writer(new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$val,a__$1.state], null),writer,opts); + +return cljs.core._write(writer,"]"); +}); + +cljs.core.Var.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Var.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,writer,opts){ +var a__$1 = this; +cljs.core._write(writer,"#'"); + +return cljs.core.pr_writer(a__$1.sym,writer,opts); +}); + +cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"["," ","]",opts,coll__$1); +}); + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.ES6IteratorSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ES6IteratorSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"#{"," ","}",opts,coll__$1); +}); + +cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.print_map(coll__$1,cljs.core.pr_writer,writer,opts); +}); + +cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.print_map(coll__$1,cljs.core.pr_writer,writer,opts); +}); + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"["," ","]",opts,coll__$1); +}); + +cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.print_map(coll__$1,cljs.core.pr_writer,writer,opts); +}); + +cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"#{"," ","}",opts,coll__$1); +}); + +cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.Atom.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Atom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,writer,opts){ +var a__$1 = this; +cljs.core._write(writer,"#object [cljs.core.Atom "); + +cljs.core.pr_writer(new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$val,a__$1.state], null),writer,opts); + +return cljs.core._write(writer,"]"); +}); + +cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"["," ","]",opts,coll__$1); +}); + +cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"["," ","]",opts,coll__$1); +}); + +cljs.core.PersistentQueueSeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentQueueSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core._write(writer,"()"); +}); + +cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"#queue ["," ","]",opts,cljs.core.seq(coll__$1)); +}); + +cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.print_map(coll__$1,cljs.core.pr_writer,writer,opts); +}); + +cljs.core.Range.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Range.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.TransformerIterator.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.TransformerIterator.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); + +cljs.core.List.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.List.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$1); +}); +cljs.core.Symbol.prototype.cljs$core$IComparable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Symbol.prototype.cljs$core$IComparable$_compare$arity$2 = (function (x,y){ +var x__$1 = this; +if((y instanceof cljs.core.Symbol)){ +return cljs.core.compare_symbols(x__$1,y); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot compare "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(y)].join(''))); +} +}); + +cljs.core.Keyword.prototype.cljs$core$IComparable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Keyword.prototype.cljs$core$IComparable$_compare$arity$2 = (function (x,y){ +var x__$1 = this; +if((y instanceof cljs.core.Keyword)){ +return cljs.core.compare_keywords(x__$1,y); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot compare "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(y)].join(''))); +} +}); + +cljs.core.Subvec.prototype.cljs$core$IComparable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Subvec.prototype.cljs$core$IComparable$_compare$arity$2 = (function (x,y){ +var x__$1 = this; +if(cljs.core.vector_QMARK_(y)){ +return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2(x__$1,y); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot compare "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(y)].join(''))); +} +}); + +cljs.core.PersistentVector.prototype.cljs$core$IComparable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentVector.prototype.cljs$core$IComparable$_compare$arity$2 = (function (x,y){ +var x__$1 = this; +if(cljs.core.vector_QMARK_(y)){ +return cljs.core.compare_indexed.cljs$core$IFn$_invoke$arity$2(x__$1,y); +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cannot compare "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(x__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(y)].join(''))); +} +}); +/** + * Atomically sets the metadata for a namespace/var/ref/agent/atom to be: + * + * (apply f its-current-meta args) + * + * f must be free of side-effects + */ +cljs.core.alter_meta_BANG_ = (function cljs$core$alter_meta_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13887 = arguments.length; +var i__9182__auto___13888 = (0); +while(true){ +if((i__9182__auto___13888 < len__9181__auto___13887)){ +args__9188__auto__.push((arguments[i__9182__auto___13888])); + +var G__13889 = (i__9182__auto___13888 + (1)); +i__9182__auto___13888 = G__13889; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((2) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((2)),(0),null)):null); +return cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9189__auto__); +}); + +cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (iref,f,args){ +return iref.meta = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,iref.meta,args); +}); + +cljs.core.alter_meta_BANG_.cljs$lang$maxFixedArity = (2); + +cljs.core.alter_meta_BANG_.cljs$lang$applyTo = (function (seq13884){ +var G__13885 = cljs.core.first(seq13884); +var seq13884__$1 = cljs.core.next(seq13884); +var G__13886 = cljs.core.first(seq13884__$1); +var seq13884__$2 = cljs.core.next(seq13884__$1); +return cljs.core.alter_meta_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__13885,G__13886,seq13884__$2); +}); + +/** + * Atomically resets the metadata for an atom + */ +cljs.core.reset_meta_BANG_ = (function cljs$core$reset_meta_BANG_(iref,m){ +return iref.meta = m; +}); +/** + * Adds a watch function to an atom reference. The watch fn must be a + * fn of 4 args: a key, the reference, its old-state, its + * new-state. Whenever the reference's state might have been changed, + * any registered watches will have their functions called. The watch + * fn will be called synchronously. Note that an atom's state + * may have changed again prior to the fn call, so use old/new-state + * rather than derefing the reference. Keys must be unique per + * reference, and can be used to remove the watch with remove-watch, + * but are otherwise considered opaque by the watch mechanism. Bear in + * mind that regardless of the result or action of the watch fns the + * atom's value will change. Example: + * + * (def a (atom 0)) + * (add-watch a :inc (fn [k r o n] (assert (== 0 n)))) + * (swap! a inc) + * ;; Assertion Error + * (deref a) + * ;=> 1 + */ +cljs.core.add_watch = (function cljs$core$add_watch(iref,key,f){ +cljs.core._add_watch(iref,key,f); + +return iref; +}); +/** + * Removes a watch (set by add-watch) from a reference + */ +cljs.core.remove_watch = (function cljs$core$remove_watch(iref,key){ +cljs.core._remove_watch(iref,key); + +return iref; +}); +/** + * @type {*} + */ +cljs.core.gensym_counter = null; +/** + * Returns a new symbol with a unique name. If a prefix string is + * supplied, the name is prefix# where # is some unique number. If + * prefix is not supplied, the prefix is 'G__'. + */ +cljs.core.gensym = (function cljs$core$gensym(var_args){ +var args13890 = []; +var len__9181__auto___13893 = arguments.length; +var i__9182__auto___13894 = (0); +while(true){ +if((i__9182__auto___13894 < len__9181__auto___13893)){ +args13890.push((arguments[i__9182__auto___13894])); + +var G__13895 = (i__9182__auto___13894 + (1)); +i__9182__auto___13894 = G__13895; +continue; +} else { +} +break; +} + +var G__13892 = args13890.length; +switch (G__13892) { +case 0: +return cljs.core.gensym.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.gensym.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13890.length)].join(''))); + +} +}); + +cljs.core.gensym.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.gensym.cljs$core$IFn$_invoke$arity$1("G__"); +}); + +cljs.core.gensym.cljs$core$IFn$_invoke$arity$1 = (function (prefix_string){ +if((cljs.core.gensym_counter == null)){ +cljs.core.gensym_counter = (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1((0)) : cljs.core.atom.call(null,(0))); +} else { +} + +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1(prefix_string),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(cljs.core.gensym_counter,cljs.core.inc))].join('')); +}); + +cljs.core.gensym.cljs$lang$maxFixedArity = 1; + +cljs.core.fixture1 = (1); +cljs.core.fixture2 = (2); + +/** +* @constructor + * @implements {cljs.core.IPending} + * @implements {cljs.core.IDeref} +*/ +cljs.core.Delay = (function (f,value){ +this.f = f; +this.value = value; +this.cljs$lang$protocol_mask$partition0$ = 32768; +this.cljs$lang$protocol_mask$partition1$ = 1; +}) +cljs.core.Delay.prototype.cljs$core$IDeref$_deref$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +if(cljs.core.truth_(self__.f)){ +self__.value = (self__.f.cljs$core$IFn$_invoke$arity$0 ? self__.f.cljs$core$IFn$_invoke$arity$0() : self__.f.call(null)); + +self__.f = null; +} else { +} + +return self__.value; +}); + +cljs.core.Delay.prototype.cljs$core$IPending$_realized_QMARK_$arity$1 = (function (x){ +var self__ = this; +var x__$1 = this; +return cljs.core.not(self__.f); +}); + +cljs.core.Delay.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$f,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$value,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.Delay.cljs$lang$type = true; + +cljs.core.Delay.cljs$lang$ctorStr = "cljs.core/Delay"; + +cljs.core.Delay.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Delay"); +}); + +cljs.core.__GT_Delay = (function cljs$core$__GT_Delay(f,value){ +return (new cljs.core.Delay(f,value)); +}); + +/** + * returns true if x is a Delay created with delay + */ +cljs.core.delay_QMARK_ = (function cljs$core$delay_QMARK_(x){ +return (x instanceof cljs.core.Delay); +}); +/** + * If x is a Delay, returns the (possibly cached) value of its expression, else returns x + */ +cljs.core.force = (function cljs$core$force(x){ +if(cljs.core.delay_QMARK_(x)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(x) : cljs.core.deref.call(null,x)); +} else { +return x; +} +}); +/** + * Returns true if a value has been produced for a delay or lazy sequence. + */ +cljs.core.realized_QMARK_ = (function cljs$core$realized_QMARK_(x){ +return cljs.core._realized_QMARK_(x); +}); +cljs.core.preserving_reduced = (function cljs$core$preserving_reduced(rf){ +return (function (p1__13897_SHARP_,p2__13898_SHARP_){ +var ret = (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(p1__13897_SHARP_,p2__13898_SHARP_) : rf.call(null,p1__13897_SHARP_,p2__13898_SHARP_)); +if(cljs.core.reduced_QMARK_(ret)){ +return cljs.core.reduced(ret); +} else { +return ret; +} +}); +}); +/** + * A transducer which concatenates the contents of each input, which must be a + * collection, into the reduction. + */ +cljs.core.cat = (function cljs$core$cat(rf){ +var rf1 = cljs.core.preserving_reduced(rf); +return ((function (rf1){ +return (function() { +var G__13899 = null; +var G__13899__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13899__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__13899__2 = (function (result,input){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(rf1,result,input); +}); +G__13899 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13899__0.call(this); +case 1: +return G__13899__1.call(this,result); +case 2: +return G__13899__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13899.cljs$core$IFn$_invoke$arity$0 = G__13899__0; +G__13899.cljs$core$IFn$_invoke$arity$1 = G__13899__1; +G__13899.cljs$core$IFn$_invoke$arity$2 = G__13899__2; +return G__13899; +})() +;})(rf1)) +}); +/** + * Returns a transducer that ends transduction when pred returns true + * for an input. When retf is supplied it must be a fn of 2 arguments - + * it will be passed the (completed) result so far and the input that + * triggered the predicate, and its return value (if it does not throw + * an exception) will be the return value of the transducer. If retf + * is not supplied, the input that triggered the predicate will be + * returned. If the predicate never returns true the transduction is + * unaffected. + */ +cljs.core.halt_when = (function cljs$core$halt_when(var_args){ +var args13900 = []; +var len__9181__auto___13905 = arguments.length; +var i__9182__auto___13906 = (0); +while(true){ +if((i__9182__auto___13906 < len__9181__auto___13905)){ +args13900.push((arguments[i__9182__auto___13906])); + +var G__13907 = (i__9182__auto___13906 + (1)); +i__9182__auto___13906 = G__13907; +continue; +} else { +} +break; +} + +var G__13902 = args13900.length; +switch (G__13902) { +case 1: +return cljs.core.halt_when.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.halt_when.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13900.length)].join(''))); + +} +}); + +cljs.core.halt_when.cljs$core$IFn$_invoke$arity$1 = (function (pred){ +return cljs.core.halt_when.cljs$core$IFn$_invoke$arity$2(pred,null); +}); + +cljs.core.halt_when.cljs$core$IFn$_invoke$arity$2 = (function (pred,retf){ +return (function (rf){ +return (function() { +var G__13909 = null; +var G__13909__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13909__1 = (function (result){ +if((cljs.core.map_QMARK_(result)) && (cljs.core.contains_QMARK_(result,cljs.core.cst$kw$cljs$core_SLASH_halt))){ +return cljs.core.cst$kw$cljs$core_SLASH_halt.cljs$core$IFn$_invoke$arity$1(result); +} else { +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +} +}); +var G__13909__2 = (function (result,input){ +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(input) : pred.call(null,input)))){ +return cljs.core.reduced(new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$cljs$core_SLASH_halt,(cljs.core.truth_(retf)?(function (){var G__13903 = (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +var G__13904 = input; +return (retf.cljs$core$IFn$_invoke$arity$2 ? retf.cljs$core$IFn$_invoke$arity$2(G__13903,G__13904) : retf.call(null,G__13903,G__13904)); +})():input)], null)); +} else { +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} +}); +G__13909 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13909__0.call(this); +case 1: +return G__13909__1.call(this,result); +case 2: +return G__13909__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13909.cljs$core$IFn$_invoke$arity$0 = G__13909__0; +G__13909.cljs$core$IFn$_invoke$arity$1 = G__13909__1; +G__13909.cljs$core$IFn$_invoke$arity$2 = G__13909__2; +return G__13909; +})() +}); +}); + +cljs.core.halt_when.cljs$lang$maxFixedArity = 2; + +/** + * Returns a lazy sequence removing consecutive duplicates in coll. + * Returns a transducer when no collection is provided. + */ +cljs.core.dedupe = (function cljs$core$dedupe(var_args){ +var args13910 = []; +var len__9181__auto___13913 = arguments.length; +var i__9182__auto___13914 = (0); +while(true){ +if((i__9182__auto___13914 < len__9181__auto___13913)){ +args13910.push((arguments[i__9182__auto___13914])); + +var G__13915 = (i__9182__auto___13914 + (1)); +i__9182__auto___13914 = G__13915; +continue; +} else { +} +break; +} + +var G__13912 = args13910.length; +switch (G__13912) { +case 0: +return cljs.core.dedupe.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.dedupe.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13910.length)].join(''))); + +} +}); + +cljs.core.dedupe.cljs$core$IFn$_invoke$arity$0 = (function (){ +return (function (rf){ +var pa = cljs.core.volatile_BANG_(cljs.core.cst$kw$cljs$core_SLASH_none); +return ((function (pa){ +return (function() { +var G__13917 = null; +var G__13917__0 = (function (){ +return (rf.cljs$core$IFn$_invoke$arity$0 ? rf.cljs$core$IFn$_invoke$arity$0() : rf.call(null)); +}); +var G__13917__1 = (function (result){ +return (rf.cljs$core$IFn$_invoke$arity$1 ? rf.cljs$core$IFn$_invoke$arity$1(result) : rf.call(null,result)); +}); +var G__13917__2 = (function (result,input){ +var prior = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(pa) : cljs.core.deref.call(null,pa)); +cljs.core.vreset_BANG_(pa,input); + +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(prior,input)){ +return result; +} else { +return (rf.cljs$core$IFn$_invoke$arity$2 ? rf.cljs$core$IFn$_invoke$arity$2(result,input) : rf.call(null,result,input)); +} +}); +G__13917 = function(result,input){ +switch(arguments.length){ +case 0: +return G__13917__0.call(this); +case 1: +return G__13917__1.call(this,result); +case 2: +return G__13917__2.call(this,result,input); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13917.cljs$core$IFn$_invoke$arity$0 = G__13917__0; +G__13917.cljs$core$IFn$_invoke$arity$1 = G__13917__1; +G__13917.cljs$core$IFn$_invoke$arity$2 = G__13917__2; +return G__13917; +})() +;})(pa)) +}); +}); + +cljs.core.dedupe.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +return cljs.core.sequence.cljs$core$IFn$_invoke$arity$2(cljs.core.dedupe.cljs$core$IFn$_invoke$arity$0(),coll); +}); + +cljs.core.dedupe.cljs$lang$maxFixedArity = 1; + +/** + * Returns items from coll with random probability of prob (0.0 - + * 1.0). Returns a transducer when no collection is provided. + */ +cljs.core.random_sample = (function cljs$core$random_sample(var_args){ +var args13918 = []; +var len__9181__auto___13921 = arguments.length; +var i__9182__auto___13922 = (0); +while(true){ +if((i__9182__auto___13922 < len__9181__auto___13921)){ +args13918.push((arguments[i__9182__auto___13922])); + +var G__13923 = (i__9182__auto___13922 + (1)); +i__9182__auto___13922 = G__13923; +continue; +} else { +} +break; +} + +var G__13920 = args13918.length; +switch (G__13920) { +case 1: +return cljs.core.random_sample.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.random_sample.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args13918.length)].join(''))); + +} +}); + +cljs.core.random_sample.cljs$core$IFn$_invoke$arity$1 = (function (prob){ +return cljs.core.filter.cljs$core$IFn$_invoke$arity$1((function (_){ +return ((cljs.core.rand.cljs$core$IFn$_invoke$arity$0 ? cljs.core.rand.cljs$core$IFn$_invoke$arity$0() : cljs.core.rand.call(null)) < prob); +})); +}); + +cljs.core.random_sample.cljs$core$IFn$_invoke$arity$2 = (function (prob,coll){ +return cljs.core.filter.cljs$core$IFn$_invoke$arity$2((function (_){ +return ((cljs.core.rand.cljs$core$IFn$_invoke$arity$0 ? cljs.core.rand.cljs$core$IFn$_invoke$arity$0() : cljs.core.rand.call(null)) < prob); +}),coll); +}); + +cljs.core.random_sample.cljs$lang$maxFixedArity = 2; + + +/** +* @constructor + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IPrintWithWriter} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.ISequential} + * @implements {cljs.core.IReduce} +*/ +cljs.core.Eduction = (function (xform,coll){ +this.xform = xform; +this.coll = coll; +this.cljs$lang$protocol_mask$partition0$ = 2173173760; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.Eduction.prototype.indexOf = (function() { +var G__13925 = null; +var G__13925__1 = (function (x){ +var self__ = this; +var coll__$1 = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll__$1,x,(0)); +}); +var G__13925__2 = (function (x,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core._indexOf.cljs$core$IFn$_invoke$arity$3(coll__$1,x,start); +}); +G__13925 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13925__1.call(this,x); +case 2: +return G__13925__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13925.cljs$core$IFn$_invoke$arity$1 = G__13925__1; +G__13925.cljs$core$IFn$_invoke$arity$2 = G__13925__2; +return G__13925; +})() +; + +cljs.core.Eduction.prototype.lastIndexOf = (function() { +var G__13926 = null; +var G__13926__1 = (function (x){ +var self__ = this; +var coll__$1 = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll__$1,x,cljs.core.count(coll__$1)); +}); +var G__13926__2 = (function (x,start){ +var self__ = this; +var coll__$1 = this; +return cljs.core._lastIndexOf.cljs$core$IFn$_invoke$arity$3(coll__$1,x,start); +}); +G__13926 = function(x,start){ +switch(arguments.length){ +case 1: +return G__13926__1.call(this,x); +case 2: +return G__13926__2.call(this,x,start); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__13926.cljs$core$IFn$_invoke$arity$1 = G__13926__1; +G__13926.cljs$core$IFn$_invoke$arity$2 = G__13926__2; +return G__13926; +})() +; + +cljs.core.Eduction.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.Eduction.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (coll__$1){ +var self__ = this; +var coll__$2 = this; +return cljs.core.TransformerIterator.create(self__.xform,coll__$2); +}); + +cljs.core.Eduction.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.seq(cljs.core.sequence.cljs$core$IFn$_invoke$arity$2(self__.xform,self__.coll)); +}); + +cljs.core.Eduction.prototype.cljs$core$IReduce$_reduce$arity$2 = (function (_,f){ +var self__ = this; +var ___$1 = this; +return cljs.core.transduce.cljs$core$IFn$_invoke$arity$3(self__.xform,cljs.core.completing.cljs$core$IFn$_invoke$arity$1(f),self__.coll); +}); + +cljs.core.Eduction.prototype.cljs$core$IReduce$_reduce$arity$3 = (function (_,f,init){ +var self__ = this; +var ___$1 = this; +return cljs.core.transduce.cljs$core$IFn$_invoke$arity$4(self__.xform,cljs.core.completing.cljs$core$IFn$_invoke$arity$1(f),init,self__.coll); +}); + +cljs.core.Eduction.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll__$1,writer,opts){ +var self__ = this; +var coll__$2 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"("," ",")",opts,coll__$2); +}); + +cljs.core.Eduction.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$xform,cljs.core.cst$sym$coll], null); +}); + +cljs.core.Eduction.cljs$lang$type = true; + +cljs.core.Eduction.cljs$lang$ctorStr = "cljs.core/Eduction"; + +cljs.core.Eduction.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Eduction"); +}); + +cljs.core.__GT_Eduction = (function cljs$core$__GT_Eduction(xform,coll){ +return (new cljs.core.Eduction(xform,coll)); +}); + +(cljs.core.Eduction.prototype[cljs.core.ITER_SYMBOL] = (function (){ +var this__9072__auto__ = this; +return cljs.core.es6_iterator(this__9072__auto__); +})); +/** + * Returns a reducible/iterable application of the transducers + * to the items in coll. Transducers are applied in order as if + * combined with comp. Note that these applications will be + * performed every time reduce/iterator is called. + */ +cljs.core.eduction = (function cljs$core$eduction(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___13928 = arguments.length; +var i__9182__auto___13929 = (0); +while(true){ +if((i__9182__auto___13929 < len__9181__auto___13928)){ +args__9188__auto__.push((arguments[i__9182__auto___13929])); + +var G__13930 = (i__9182__auto___13929 + (1)); +i__9182__auto___13929 = G__13930; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((0) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((0)),(0),null)):null); +return cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic(argseq__9189__auto__); +}); + +cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic = (function (xforms){ +return (new cljs.core.Eduction(cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.comp,cljs.core.butlast(xforms)),cljs.core.last(xforms))); +}); + +cljs.core.eduction.cljs$lang$maxFixedArity = (0); + +cljs.core.eduction.cljs$lang$applyTo = (function (seq13927){ +return cljs.core.eduction.cljs$core$IFn$_invoke$arity$variadic(cljs.core.seq(seq13927)); +}); + +/** + * Runs the supplied procedure (via reduce), for purposes of side + * effects, on successive items in the collection. Returns nil + */ +cljs.core.run_BANG_ = (function cljs$core$run_BANG_(proc,coll){ +cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (p1__13932_SHARP_,p2__13931_SHARP_){ +return (proc.cljs$core$IFn$_invoke$arity$1 ? proc.cljs$core$IFn$_invoke$arity$1(p2__13931_SHARP_) : proc.call(null,p2__13931_SHARP_)); +}),null,coll); + +return null; +}); + +/** + * @interface + */ +cljs.core.IEncodeJS = function(){}; + +/** + * Recursively transforms clj values to JavaScript + */ +cljs.core._clj__GT_js = (function cljs$core$_clj__GT_js(x){ +if((!((x == null))) && (!((x.cljs$core$IEncodeJS$_clj__GT_js$arity$1 == null)))){ +return x.cljs$core$IEncodeJS$_clj__GT_js$arity$1(x); +} else { +var x__8678__auto__ = (((x == null))?null:x); +var m__8679__auto__ = (cljs.core._clj__GT_js[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto__.call(null,x)); +} else { +var m__8679__auto____$1 = (cljs.core._clj__GT_js["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto____$1.call(null,x)); +} else { +throw cljs.core.missing_protocol("IEncodeJS.-clj->js",x); +} +} +} +}); + +/** + * Transforms map keys to valid JavaScript keys. Arbitrary keys are + * encoded to their string representation via (pr-str x) + */ +cljs.core._key__GT_js = (function cljs$core$_key__GT_js(x){ +if((!((x == null))) && (!((x.cljs$core$IEncodeJS$_key__GT_js$arity$1 == null)))){ +return x.cljs$core$IEncodeJS$_key__GT_js$arity$1(x); +} else { +var x__8678__auto__ = (((x == null))?null:x); +var m__8679__auto__ = (cljs.core._key__GT_js[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto__.call(null,x)); +} else { +var m__8679__auto____$1 = (cljs.core._key__GT_js["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(x) : m__8679__auto____$1.call(null,x)); +} else { +throw cljs.core.missing_protocol("IEncodeJS.-key->js",x); +} +} +} +}); + +cljs.core.key__GT_js = (function cljs$core$key__GT_js(k){ +if(((!((k == null)))?(((false) || ((cljs.core.PROTOCOL_SENTINEL === k.cljs$core$IEncodeJS$)))?true:(((!k.cljs$lang$protocol_mask$partition$))?cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS,k):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS,k))){ +return cljs.core._clj__GT_js(k); +} else { +if((typeof k === 'string') || (typeof k === 'number') || ((k instanceof cljs.core.Keyword)) || ((k instanceof cljs.core.Symbol))){ +return (cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1 ? cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1(k) : cljs.core.clj__GT_js.call(null,k)); +} else { +return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([k], 0)); +} +} +}); +/** + * Recursively transforms ClojureScript values to JavaScript. + * sets/vectors/lists become Arrays, Keywords and Symbol become Strings, + * Maps become Objects. Arbitrary keys are encoded to by key->js. + */ +cljs.core.clj__GT_js = (function cljs$core$clj__GT_js(x){ +if((x == null)){ +return null; +} else { +if(((!((x == null)))?(((false) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IEncodeJS$)))?true:(((!x.cljs$lang$protocol_mask$partition$))?cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS,x):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeJS,x))){ +return cljs.core._clj__GT_js(x); +} else { +if((x instanceof cljs.core.Keyword)){ +return cljs.core.name(x); +} else { +if((x instanceof cljs.core.Symbol)){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(x)].join(''); +} else { +if(cljs.core.map_QMARK_(x)){ +var m = {}; +var seq__13955_13969 = cljs.core.seq(x); +var chunk__13956_13970 = null; +var count__13957_13971 = (0); +var i__13958_13972 = (0); +while(true){ +if((i__13958_13972 < count__13957_13971)){ +var vec__13959_13973 = chunk__13956_13970.cljs$core$IIndexed$_nth$arity$2(null,i__13958_13972); +var k_13974 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13959_13973,(0),null); +var v_13975 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13959_13973,(1),null); +(m[cljs.core.key__GT_js(k_13974)] = (cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1 ? cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1(v_13975) : cljs.core.clj__GT_js.call(null,v_13975))); + +var G__13976 = seq__13955_13969; +var G__13977 = chunk__13956_13970; +var G__13978 = count__13957_13971; +var G__13979 = (i__13958_13972 + (1)); +seq__13955_13969 = G__13976; +chunk__13956_13970 = G__13977; +count__13957_13971 = G__13978; +i__13958_13972 = G__13979; +continue; +} else { +var temp__5278__auto___13980 = cljs.core.seq(seq__13955_13969); +if(temp__5278__auto___13980){ +var seq__13955_13981__$1 = temp__5278__auto___13980; +if(cljs.core.chunked_seq_QMARK_(seq__13955_13981__$1)){ +var c__8871__auto___13982 = cljs.core.chunk_first(seq__13955_13981__$1); +var G__13983 = cljs.core.chunk_rest(seq__13955_13981__$1); +var G__13984 = c__8871__auto___13982; +var G__13985 = cljs.core.count(c__8871__auto___13982); +var G__13986 = (0); +seq__13955_13969 = G__13983; +chunk__13956_13970 = G__13984; +count__13957_13971 = G__13985; +i__13958_13972 = G__13986; +continue; +} else { +var vec__13962_13987 = cljs.core.first(seq__13955_13981__$1); +var k_13988 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13962_13987,(0),null); +var v_13989 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__13962_13987,(1),null); +(m[cljs.core.key__GT_js(k_13988)] = (cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1 ? cljs.core.clj__GT_js.cljs$core$IFn$_invoke$arity$1(v_13989) : cljs.core.clj__GT_js.call(null,v_13989))); + +var G__13990 = cljs.core.next(seq__13955_13981__$1); +var G__13991 = null; +var G__13992 = (0); +var G__13993 = (0); +seq__13955_13969 = G__13990; +chunk__13956_13970 = G__13991; +count__13957_13971 = G__13992; +i__13958_13972 = G__13993; +continue; +} +} else { +} +} +break; +} + +return m; +} else { +if(cljs.core.coll_QMARK_(x)){ +var arr = []; +var seq__13965_13994 = cljs.core.seq(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.clj__GT_js,x)); +var chunk__13966_13995 = null; +var count__13967_13996 = (0); +var i__13968_13997 = (0); +while(true){ +if((i__13968_13997 < count__13967_13996)){ +var x_13998__$1 = chunk__13966_13995.cljs$core$IIndexed$_nth$arity$2(null,i__13968_13997); +arr.push(x_13998__$1); + +var G__13999 = seq__13965_13994; +var G__14000 = chunk__13966_13995; +var G__14001 = count__13967_13996; +var G__14002 = (i__13968_13997 + (1)); +seq__13965_13994 = G__13999; +chunk__13966_13995 = G__14000; +count__13967_13996 = G__14001; +i__13968_13997 = G__14002; +continue; +} else { +var temp__5278__auto___14003 = cljs.core.seq(seq__13965_13994); +if(temp__5278__auto___14003){ +var seq__13965_14004__$1 = temp__5278__auto___14003; +if(cljs.core.chunked_seq_QMARK_(seq__13965_14004__$1)){ +var c__8871__auto___14005 = cljs.core.chunk_first(seq__13965_14004__$1); +var G__14006 = cljs.core.chunk_rest(seq__13965_14004__$1); +var G__14007 = c__8871__auto___14005; +var G__14008 = cljs.core.count(c__8871__auto___14005); +var G__14009 = (0); +seq__13965_13994 = G__14006; +chunk__13966_13995 = G__14007; +count__13967_13996 = G__14008; +i__13968_13997 = G__14009; +continue; +} else { +var x_14010__$1 = cljs.core.first(seq__13965_14004__$1); +arr.push(x_14010__$1); + +var G__14011 = cljs.core.next(seq__13965_14004__$1); +var G__14012 = null; +var G__14013 = (0); +var G__14014 = (0); +seq__13965_13994 = G__14011; +chunk__13966_13995 = G__14012; +count__13967_13996 = G__14013; +i__13968_13997 = G__14014; +continue; +} +} else { +} +} +break; +} + +return arr; +} else { +return x; + +} +} +} +} +} +} +}); + +/** + * @interface + */ +cljs.core.IEncodeClojure = function(){}; + +/** + * Transforms JavaScript values to Clojure + */ +cljs.core._js__GT_clj = (function cljs$core$_js__GT_clj(x,options){ +if((!((x == null))) && (!((x.cljs$core$IEncodeClojure$_js__GT_clj$arity$2 == null)))){ +return x.cljs$core$IEncodeClojure$_js__GT_clj$arity$2(x,options); +} else { +var x__8678__auto__ = (((x == null))?null:x); +var m__8679__auto__ = (cljs.core._js__GT_clj[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(x,options) : m__8679__auto__.call(null,x,options)); +} else { +var m__8679__auto____$1 = (cljs.core._js__GT_clj["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(x,options) : m__8679__auto____$1.call(null,x,options)); +} else { +throw cljs.core.missing_protocol("IEncodeClojure.-js->clj",x); +} +} +} +}); + +/** + * Recursively transforms JavaScript arrays into ClojureScript + * vectors, and JavaScript objects into ClojureScript maps. With + * option ':keywordize-keys true' will convert object fields from + * strings to keywords. + */ +cljs.core.js__GT_clj = (function cljs$core$js__GT_clj(var_args){ +var args14015 = []; +var len__9181__auto___14040 = arguments.length; +var i__9182__auto___14041 = (0); +while(true){ +if((i__9182__auto___14041 < len__9181__auto___14040)){ +args14015.push((arguments[i__9182__auto___14041])); + +var G__14042 = (i__9182__auto___14041 + (1)); +i__9182__auto___14041 = G__14042; +continue; +} else { +} +break; +} + +var G__14019 = args14015.length; +switch (G__14019) { +case 1: +return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14015.slice((1)),(0),null)); +return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9204__auto__); + +} +}); + +cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic(x,cljs.core.array_seq([cljs.core.cst$kw$keywordize_DASH_keys,false], 0)); +}); + +cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic = (function (x,opts){ +var map__14020 = opts; +var map__14020__$1 = ((((!((map__14020 == null)))?((((map__14020.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__14020.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__14020):map__14020); +var keywordize_keys = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14020__$1,cljs.core.cst$kw$keywordize_DASH_keys); +var keyfn = (cljs.core.truth_(keywordize_keys)?cljs.core.keyword:cljs.core.str); +var f = ((function (map__14020,map__14020__$1,keywordize_keys,keyfn){ +return (function cljs$core$thisfn(x__$1){ +if(((!((x__$1 == null)))?(((false) || ((cljs.core.PROTOCOL_SENTINEL === x__$1.cljs$core$IEncodeClojure$)))?true:(((!x__$1.cljs$lang$protocol_mask$partition$))?cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeClojure,x__$1):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IEncodeClojure,x__$1))){ +return cljs.core._js__GT_clj(x__$1,cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.array_map,opts)); +} else { +if(cljs.core.seq_QMARK_(x__$1)){ +return cljs.core.doall.cljs$core$IFn$_invoke$arity$1(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$thisfn,x__$1)); +} else { +if(cljs.core.coll_QMARK_(x__$1)){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.empty(x__$1),cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$thisfn,x__$1)); +} else { +if(cljs.core.array_QMARK_(x__$1)){ +return cljs.core.vec(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs$core$thisfn,x__$1)); +} else { +if((cljs.core.type(x__$1) === Object)){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,(function (){var iter__8822__auto__ = ((function (map__14020,map__14020__$1,keywordize_keys,keyfn){ +return (function cljs$core$thisfn_$_iter__14034(s__14035){ +return (new cljs.core.LazySeq(null,((function (map__14020,map__14020__$1,keywordize_keys,keyfn){ +return (function (){ +var s__14035__$1 = s__14035; +while(true){ +var temp__5278__auto__ = cljs.core.seq(s__14035__$1); +if(temp__5278__auto__){ +var s__14035__$2 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(s__14035__$2)){ +var c__8820__auto__ = cljs.core.chunk_first(s__14035__$2); +var size__8821__auto__ = cljs.core.count(c__8820__auto__); +var b__14037 = cljs.core.chunk_buffer(size__8821__auto__); +if((function (){var i__14036 = (0); +while(true){ +if((i__14036 < size__8821__auto__)){ +var k = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(c__8820__auto__,i__14036); +cljs.core.chunk_append(b__14037,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(k) : keyfn.call(null,k)),cljs$core$thisfn((x__$1[k]))], null)); + +var G__14044 = (i__14036 + (1)); +i__14036 = G__14044; +continue; +} else { +return true; +} +break; +} +})()){ +return cljs.core.chunk_cons(cljs.core.chunk(b__14037),cljs$core$thisfn_$_iter__14034(cljs.core.chunk_rest(s__14035__$2))); +} else { +return cljs.core.chunk_cons(cljs.core.chunk(b__14037),null); +} +} else { +var k = cljs.core.first(s__14035__$2); +return cljs.core.cons(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(keyfn.cljs$core$IFn$_invoke$arity$1 ? keyfn.cljs$core$IFn$_invoke$arity$1(k) : keyfn.call(null,k)),cljs$core$thisfn((x__$1[k]))], null),cljs$core$thisfn_$_iter__14034(cljs.core.rest(s__14035__$2))); +} +} else { +return null; +} +break; +} +});})(map__14020,map__14020__$1,keywordize_keys,keyfn)) +,null,null)); +});})(map__14020,map__14020__$1,keywordize_keys,keyfn)) +; +return iter__8822__auto__(cljs.core.js_keys(x__$1)); +})()); +} else { +return x__$1; + +} +} +} +} +} +});})(map__14020,map__14020__$1,keywordize_keys,keyfn)) +; +return f(x); +}); + +cljs.core.js__GT_clj.cljs$lang$applyTo = (function (seq14016){ +var G__14017 = cljs.core.first(seq14016); +var seq14016__$1 = cljs.core.next(seq14016); +return cljs.core.js__GT_clj.cljs$core$IFn$_invoke$arity$variadic(G__14017,seq14016__$1); +}); + +cljs.core.js__GT_clj.cljs$lang$maxFixedArity = (1); + +/** + * Returns a memoized version of a referentially transparent function. The + * memoized version of the function keeps a cache of the mapping from arguments + * to results and, when calls with the same arguments are repeated often, has + * higher performance at the expense of higher memory use. + */ +cljs.core.memoize = (function cljs$core$memoize(f){ +var mem = (function (){var G__14046 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__14046) : cljs.core.atom.call(null,G__14046)); +})(); +return ((function (mem){ +return (function() { +var G__14047__delegate = function (args){ +var v = cljs.core.get.cljs$core$IFn$_invoke$arity$3((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(mem) : cljs.core.deref.call(null,mem)),args,cljs.core.lookup_sentinel); +if((v === cljs.core.lookup_sentinel)){ +var ret = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f,args); +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(mem,cljs.core.assoc,args,ret); + +return ret; +} else { +return v; +} +}; +var G__14047 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__14048__i = 0, G__14048__a = new Array(arguments.length - 0); +while (G__14048__i < G__14048__a.length) {G__14048__a[G__14048__i] = arguments[G__14048__i + 0]; ++G__14048__i;} + args = new cljs.core.IndexedSeq(G__14048__a,0,null); +} +return G__14047__delegate.call(this,args);}; +G__14047.cljs$lang$maxFixedArity = 0; +G__14047.cljs$lang$applyTo = (function (arglist__14049){ +var args = cljs.core.seq(arglist__14049); +return G__14047__delegate(args); +}); +G__14047.cljs$core$IFn$_invoke$arity$variadic = G__14047__delegate; +return G__14047; +})() +; +;})(mem)) +}); +/** + * trampoline can be used to convert algorithms requiring mutual + * recursion without stack consumption. Calls f with supplied args, if + * any. If f returns a fn, calls that fn with no arguments, and + * continues to repeat, until the return value is not a fn, then + * returns that non-fn value. Note that if you want to return a fn as a + * final value, you must wrap it in some data structure and unpack it + * after trampoline returns. + */ +cljs.core.trampoline = (function cljs$core$trampoline(var_args){ +var args14050 = []; +var len__9181__auto___14055 = arguments.length; +var i__9182__auto___14056 = (0); +while(true){ +if((i__9182__auto___14056 < len__9181__auto___14055)){ +args14050.push((arguments[i__9182__auto___14056])); + +var G__14057 = (i__9182__auto___14056 + (1)); +i__9182__auto___14056 = G__14057; +continue; +} else { +} +break; +} + +var G__14054 = args14050.length; +switch (G__14054) { +case 1: +return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14050.slice((1)),(0),null)); +return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9204__auto__); + +} +}); + +cljs.core.trampoline.cljs$core$IFn$_invoke$arity$1 = (function (f){ +while(true){ +var ret = (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +if(cljs.core.fn_QMARK_(ret)){ +var G__14059 = ret; +f = G__14059; +continue; +} else { +return ret; +} +break; +} +}); + +cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$1((function (){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f,args); +})); +}); + +cljs.core.trampoline.cljs$lang$applyTo = (function (seq14051){ +var G__14052 = cljs.core.first(seq14051); +var seq14051__$1 = cljs.core.next(seq14051); +return cljs.core.trampoline.cljs$core$IFn$_invoke$arity$variadic(G__14052,seq14051__$1); +}); + +cljs.core.trampoline.cljs$lang$maxFixedArity = (1); + +/** + * Returns a random floating point number between 0 (inclusive) and + * n (default 1) (exclusive). + */ +cljs.core.rand = (function cljs$core$rand(var_args){ +var args14060 = []; +var len__9181__auto___14063 = arguments.length; +var i__9182__auto___14064 = (0); +while(true){ +if((i__9182__auto___14064 < len__9181__auto___14063)){ +args14060.push((arguments[i__9182__auto___14064])); + +var G__14065 = (i__9182__auto___14064 + (1)); +i__9182__auto___14064 = G__14065; +continue; +} else { +} +break; +} + +var G__14062 = args14060.length; +switch (G__14062) { +case 0: +return cljs.core.rand.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.rand.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14060.length)].join(''))); + +} +}); + +cljs.core.rand.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.rand.cljs$core$IFn$_invoke$arity$1((1)); +}); + +cljs.core.rand.cljs$core$IFn$_invoke$arity$1 = (function (n){ +return (Math.random() * n); +}); + +cljs.core.rand.cljs$lang$maxFixedArity = 1; + +/** + * Returns a random integer between 0 (inclusive) and n (exclusive). + */ +cljs.core.rand_int = (function cljs$core$rand_int(n){ +var G__14068 = (Math.random() * n); +return Math.floor(G__14068); +}); +/** + * Return a random element of the (sequential) collection. Will have + * the same performance characteristics as nth for the given + * collection. + */ +cljs.core.rand_nth = (function cljs$core$rand_nth(coll){ +return cljs.core.nth.cljs$core$IFn$_invoke$arity$2(coll,cljs.core.rand_int(cljs.core.count(coll))); +}); +/** + * Returns a map of the elements of coll keyed by the result of + * f on each element. The value at each key will be a vector of the + * corresponding elements, in the order they appeared in coll. + */ +cljs.core.group_by = (function cljs$core$group_by(f,coll){ +return cljs.core.persistent_BANG_(cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (ret,x){ +var k = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(x) : f.call(null,x)); +return cljs.core.assoc_BANG_.cljs$core$IFn$_invoke$arity$3(ret,k,cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(ret,k,cljs.core.PersistentVector.EMPTY),x)); +}),cljs.core.transient$(cljs.core.PersistentArrayMap.EMPTY),coll)); +}); +/** + * Creates a hierarchy object for use with derive, isa? etc. + */ +cljs.core.make_hierarchy = (function cljs$core$make_hierarchy(){ +return new cljs.core.PersistentArrayMap(null, 3, [cljs.core.cst$kw$parents,cljs.core.PersistentArrayMap.EMPTY,cljs.core.cst$kw$descendants,cljs.core.PersistentArrayMap.EMPTY,cljs.core.cst$kw$ancestors,cljs.core.PersistentArrayMap.EMPTY], null); +}); +/** + * @type {*} + */ +cljs.core._global_hierarchy = null; +cljs.core.get_global_hierarchy = (function cljs$core$get_global_hierarchy(){ +if((cljs.core._global_hierarchy == null)){ +cljs.core._global_hierarchy = (function (){var G__14070 = cljs.core.make_hierarchy(); +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__14070) : cljs.core.atom.call(null,G__14070)); +})(); +} else { +} + +return cljs.core._global_hierarchy; +}); +cljs.core.swap_global_hierarchy_BANG_ = (function cljs$core$swap_global_hierarchy_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14073 = arguments.length; +var i__9182__auto___14074 = (0); +while(true){ +if((i__9182__auto___14074 < len__9181__auto___14073)){ +args__9188__auto__.push((arguments[i__9182__auto___14074])); + +var G__14075 = (i__9182__auto___14074 + (1)); +i__9182__auto___14074 = G__14075; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$4(cljs.core.swap_BANG_,cljs.core.get_global_hierarchy(),f,args); +}); + +cljs.core.swap_global_hierarchy_BANG_.cljs$lang$maxFixedArity = (1); + +cljs.core.swap_global_hierarchy_BANG_.cljs$lang$applyTo = (function (seq14071){ +var G__14072 = cljs.core.first(seq14071); +var seq14071__$1 = cljs.core.next(seq14071); +return cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__14072,seq14071__$1); +}); + +/** + * Returns true if (= child parent), or child is directly or indirectly derived from + * parent, either via a JavaScript type inheritance relationship or a + * relationship established via derive. h must be a hierarchy obtained + * from make-hierarchy, if not supplied defaults to the global + * hierarchy + */ +cljs.core.isa_QMARK_ = (function cljs$core$isa_QMARK_(var_args){ +var args14076 = []; +var len__9181__auto___14080 = arguments.length; +var i__9182__auto___14081 = (0); +while(true){ +if((i__9182__auto___14081 < len__9181__auto___14080)){ +args14076.push((arguments[i__9182__auto___14081])); + +var G__14082 = (i__9182__auto___14081 + (1)); +i__9182__auto___14081 = G__14082; +continue; +} else { +} +break; +} + +var G__14078 = args14076.length; +switch (G__14078) { +case 2: +return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14076.length)].join(''))); + +} +}); + +cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$2 = (function (child,parent){ +return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3((function (){var G__14079 = cljs.core.get_global_hierarchy(); +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__14079) : cljs.core.deref.call(null,G__14079)); +})(),child,parent); +}); + +cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3 = (function (h,child,parent){ +var or__7960__auto__ = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(child,parent); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = cljs.core.contains_QMARK_(cljs.core.cst$kw$ancestors.cljs$core$IFn$_invoke$arity$1(h).call(null,child),parent); +if(or__7960__auto____$1){ +return or__7960__auto____$1; +} else { +var and__7948__auto__ = cljs.core.vector_QMARK_(parent); +if(and__7948__auto__){ +var and__7948__auto____$1 = cljs.core.vector_QMARK_(child); +if(and__7948__auto____$1){ +var and__7948__auto____$2 = (cljs.core.count(parent) === cljs.core.count(child)); +if(and__7948__auto____$2){ +var ret = true; +var i = (0); +while(true){ +if((!(ret)) || ((i === cljs.core.count(parent)))){ +return ret; +} else { +var G__14084 = cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3(h,(child.cljs$core$IFn$_invoke$arity$1 ? child.cljs$core$IFn$_invoke$arity$1(i) : child.call(null,i)),(parent.cljs$core$IFn$_invoke$arity$1 ? parent.cljs$core$IFn$_invoke$arity$1(i) : parent.call(null,i))); +var G__14085 = (i + (1)); +ret = G__14084; +i = G__14085; +continue; +} +break; +} +} else { +return and__7948__auto____$2; +} +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +} +} +}); + +cljs.core.isa_QMARK_.cljs$lang$maxFixedArity = 3; + +/** + * Returns the immediate parents of tag, either via a JavaScript type + * inheritance relationship or a relationship established via derive. h + * must be a hierarchy obtained from make-hierarchy, if not supplied + * defaults to the global hierarchy + */ +cljs.core.parents = (function cljs$core$parents(var_args){ +var args14086 = []; +var len__9181__auto___14090 = arguments.length; +var i__9182__auto___14091 = (0); +while(true){ +if((i__9182__auto___14091 < len__9181__auto___14090)){ +args14086.push((arguments[i__9182__auto___14091])); + +var G__14092 = (i__9182__auto___14091 + (1)); +i__9182__auto___14091 = G__14092; +continue; +} else { +} +break; +} + +var G__14088 = args14086.length; +switch (G__14088) { +case 1: +return cljs.core.parents.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.parents.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14086.length)].join(''))); + +} +}); + +cljs.core.parents.cljs$core$IFn$_invoke$arity$1 = (function (tag){ +return cljs.core.parents.cljs$core$IFn$_invoke$arity$2((function (){var G__14089 = cljs.core.get_global_hierarchy(); +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__14089) : cljs.core.deref.call(null,G__14089)); +})(),tag); +}); + +cljs.core.parents.cljs$core$IFn$_invoke$arity$2 = (function (h,tag){ +return cljs.core.not_empty(cljs.core.get.cljs$core$IFn$_invoke$arity$2(cljs.core.cst$kw$parents.cljs$core$IFn$_invoke$arity$1(h),tag)); +}); + +cljs.core.parents.cljs$lang$maxFixedArity = 2; + +/** + * Returns the immediate and indirect parents of tag, either via a JavaScript type + * inheritance relationship or a relationship established via derive. h + * must be a hierarchy obtained from make-hierarchy, if not supplied + * defaults to the global hierarchy + */ +cljs.core.ancestors = (function cljs$core$ancestors(var_args){ +var args14094 = []; +var len__9181__auto___14098 = arguments.length; +var i__9182__auto___14099 = (0); +while(true){ +if((i__9182__auto___14099 < len__9181__auto___14098)){ +args14094.push((arguments[i__9182__auto___14099])); + +var G__14100 = (i__9182__auto___14099 + (1)); +i__9182__auto___14099 = G__14100; +continue; +} else { +} +break; +} + +var G__14096 = args14094.length; +switch (G__14096) { +case 1: +return cljs.core.ancestors.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.ancestors.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14094.length)].join(''))); + +} +}); + +cljs.core.ancestors.cljs$core$IFn$_invoke$arity$1 = (function (tag){ +return cljs.core.ancestors.cljs$core$IFn$_invoke$arity$2((function (){var G__14097 = cljs.core.get_global_hierarchy(); +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__14097) : cljs.core.deref.call(null,G__14097)); +})(),tag); +}); + +cljs.core.ancestors.cljs$core$IFn$_invoke$arity$2 = (function (h,tag){ +return cljs.core.not_empty(cljs.core.get.cljs$core$IFn$_invoke$arity$2(cljs.core.cst$kw$ancestors.cljs$core$IFn$_invoke$arity$1(h),tag)); +}); + +cljs.core.ancestors.cljs$lang$maxFixedArity = 2; + +/** + * Returns the immediate and indirect children of tag, through a + * relationship established via derive. h must be a hierarchy obtained + * from make-hierarchy, if not supplied defaults to the global + * hierarchy. Note: does not work on JavaScript type inheritance + * relationships. + */ +cljs.core.descendants = (function cljs$core$descendants(var_args){ +var args14102 = []; +var len__9181__auto___14106 = arguments.length; +var i__9182__auto___14107 = (0); +while(true){ +if((i__9182__auto___14107 < len__9181__auto___14106)){ +args14102.push((arguments[i__9182__auto___14107])); + +var G__14108 = (i__9182__auto___14107 + (1)); +i__9182__auto___14107 = G__14108; +continue; +} else { +} +break; +} + +var G__14104 = args14102.length; +switch (G__14104) { +case 1: +return cljs.core.descendants.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.descendants.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14102.length)].join(''))); + +} +}); + +cljs.core.descendants.cljs$core$IFn$_invoke$arity$1 = (function (tag){ +return cljs.core.descendants.cljs$core$IFn$_invoke$arity$2((function (){var G__14105 = cljs.core.get_global_hierarchy(); +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__14105) : cljs.core.deref.call(null,G__14105)); +})(),tag); +}); + +cljs.core.descendants.cljs$core$IFn$_invoke$arity$2 = (function (h,tag){ +return cljs.core.not_empty(cljs.core.get.cljs$core$IFn$_invoke$arity$2(cljs.core.cst$kw$descendants.cljs$core$IFn$_invoke$arity$1(h),tag)); +}); + +cljs.core.descendants.cljs$lang$maxFixedArity = 2; + +/** + * Establishes a parent/child relationship between parent and + * tag. Parent must be a namespace-qualified symbol or keyword and + * child can be either a namespace-qualified symbol or keyword or a + * class. h must be a hierarchy obtained from make-hierarchy, if not + * supplied defaults to, and modifies, the global hierarchy. + */ +cljs.core.derive = (function cljs$core$derive(var_args){ +var args14110 = []; +var len__9181__auto___14113 = arguments.length; +var i__9182__auto___14114 = (0); +while(true){ +if((i__9182__auto___14114 < len__9181__auto___14113)){ +args14110.push((arguments[i__9182__auto___14114])); + +var G__14115 = (i__9182__auto___14114 + (1)); +i__9182__auto___14114 = G__14115; +continue; +} else { +} +break; +} + +var G__14112 = args14110.length; +switch (G__14112) { +case 2: +return cljs.core.derive.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.derive.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14110.length)].join(''))); + +} +}); + +cljs.core.derive.cljs$core$IFn$_invoke$arity$2 = (function (tag,parent){ +if(cljs.core.truth_(cljs.core.namespace(parent))){ +} else { +throw (new Error("Assert failed: (namespace parent)")); +} + +cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(cljs.core.derive,cljs.core.array_seq([tag,parent], 0)); + +return null; +}); + +cljs.core.derive.cljs$core$IFn$_invoke$arity$3 = (function (h,tag,parent){ +if(cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(tag,parent)){ +} else { +throw (new Error("Assert failed: (not= tag parent)")); +} + +var tp = cljs.core.cst$kw$parents.cljs$core$IFn$_invoke$arity$1(h); +var td = cljs.core.cst$kw$descendants.cljs$core$IFn$_invoke$arity$1(h); +var ta = cljs.core.cst$kw$ancestors.cljs$core$IFn$_invoke$arity$1(h); +var tf = ((function (tp,td,ta){ +return (function (m,source,sources,target,targets){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (tp,td,ta){ +return (function (ret,k){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(ret,k,cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj,cljs.core.get.cljs$core$IFn$_invoke$arity$3(targets,k,cljs.core.PersistentHashSet.EMPTY),cljs.core.cons(target,(targets.cljs$core$IFn$_invoke$arity$1 ? targets.cljs$core$IFn$_invoke$arity$1(target) : targets.call(null,target))))); +});})(tp,td,ta)) +,m,cljs.core.cons(source,(sources.cljs$core$IFn$_invoke$arity$1 ? sources.cljs$core$IFn$_invoke$arity$1(source) : sources.call(null,source)))); +});})(tp,td,ta)) +; +var or__7960__auto__ = ((cljs.core.contains_QMARK_((tp.cljs$core$IFn$_invoke$arity$1 ? tp.cljs$core$IFn$_invoke$arity$1(tag) : tp.call(null,tag)),parent))?null:(function (){ +if(cljs.core.contains_QMARK_((ta.cljs$core$IFn$_invoke$arity$1 ? ta.cljs$core$IFn$_invoke$arity$1(tag) : ta.call(null,tag)),parent)){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1(tag),cljs.core.str.cljs$core$IFn$_invoke$arity$1("already has"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(parent),cljs.core.str.cljs$core$IFn$_invoke$arity$1("as ancestor")].join(''))); +} else { +} + +if(cljs.core.contains_QMARK_((ta.cljs$core$IFn$_invoke$arity$1 ? ta.cljs$core$IFn$_invoke$arity$1(parent) : ta.call(null,parent)),tag)){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cyclic derivation:"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(parent),cljs.core.str.cljs$core$IFn$_invoke$arity$1("has"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(tag),cljs.core.str.cljs$core$IFn$_invoke$arity$1("as ancestor")].join(''))); +} else { +} + +return new cljs.core.PersistentArrayMap(null, 3, [cljs.core.cst$kw$parents,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(cljs.core.cst$kw$parents.cljs$core$IFn$_invoke$arity$1(h),tag,cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(tp,tag,cljs.core.PersistentHashSet.EMPTY),parent)),cljs.core.cst$kw$ancestors,tf(cljs.core.cst$kw$ancestors.cljs$core$IFn$_invoke$arity$1(h),tag,td,parent,ta),cljs.core.cst$kw$descendants,tf(cljs.core.cst$kw$descendants.cljs$core$IFn$_invoke$arity$1(h),parent,ta,tag,td)], null); +})() +); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return h; +} +}); + +cljs.core.derive.cljs$lang$maxFixedArity = 3; + +/** + * Removes a parent/child relationship between parent and + * tag. h must be a hierarchy obtained from make-hierarchy, if not + * supplied defaults to, and modifies, the global hierarchy. + */ +cljs.core.underive = (function cljs$core$underive(var_args){ +var args14120 = []; +var len__9181__auto___14123 = arguments.length; +var i__9182__auto___14124 = (0); +while(true){ +if((i__9182__auto___14124 < len__9181__auto___14123)){ +args14120.push((arguments[i__9182__auto___14124])); + +var G__14125 = (i__9182__auto___14124 + (1)); +i__9182__auto___14124 = G__14125; +continue; +} else { +} +break; +} + +var G__14122 = args14120.length; +switch (G__14122) { +case 2: +return cljs.core.underive.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.underive.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14120.length)].join(''))); + +} +}); + +cljs.core.underive.cljs$core$IFn$_invoke$arity$2 = (function (tag,parent){ +cljs.core.swap_global_hierarchy_BANG_.cljs$core$IFn$_invoke$arity$variadic(cljs.core.underive,cljs.core.array_seq([tag,parent], 0)); + +return null; +}); + +cljs.core.underive.cljs$core$IFn$_invoke$arity$3 = (function (h,tag,parent){ +var parentMap = cljs.core.cst$kw$parents.cljs$core$IFn$_invoke$arity$1(h); +var childsParents = (cljs.core.truth_((parentMap.cljs$core$IFn$_invoke$arity$1 ? parentMap.cljs$core$IFn$_invoke$arity$1(tag) : parentMap.call(null,tag)))?cljs.core.disj.cljs$core$IFn$_invoke$arity$2((parentMap.cljs$core$IFn$_invoke$arity$1 ? parentMap.cljs$core$IFn$_invoke$arity$1(tag) : parentMap.call(null,tag)),parent):cljs.core.PersistentHashSet.EMPTY); +var newParents = (cljs.core.truth_(cljs.core.not_empty(childsParents))?cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(parentMap,tag,childsParents):cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(parentMap,tag)); +var deriv_seq = cljs.core.flatten(cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (parentMap,childsParents,newParents){ +return (function (p1__14117_SHARP_){ +return cljs.core.cons(cljs.core.first(p1__14117_SHARP_),cljs.core.interpose.cljs$core$IFn$_invoke$arity$2(cljs.core.first(p1__14117_SHARP_),cljs.core.second(p1__14117_SHARP_))); +});})(parentMap,childsParents,newParents)) +,cljs.core.seq(newParents))); +if(cljs.core.contains_QMARK_((parentMap.cljs$core$IFn$_invoke$arity$1 ? parentMap.cljs$core$IFn$_invoke$arity$1(tag) : parentMap.call(null,tag)),parent)){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (parentMap,childsParents,newParents,deriv_seq){ +return (function (p1__14118_SHARP_,p2__14119_SHARP_){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.derive,p1__14118_SHARP_,p2__14119_SHARP_); +});})(parentMap,childsParents,newParents,deriv_seq)) +,cljs.core.make_hierarchy(),cljs.core.partition.cljs$core$IFn$_invoke$arity$2((2),deriv_seq)); +} else { +return h; +} +}); + +cljs.core.underive.cljs$lang$maxFixedArity = 3; + +cljs.core.reset_cache = (function cljs$core$reset_cache(method_cache,method_table,cached_hierarchy,hierarchy){ +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(method_cache,(function (_){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(method_table) : cljs.core.deref.call(null,method_table)); +})); + +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(cached_hierarchy,(function (_){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null,hierarchy)); +})); +}); +cljs.core.prefers_STAR_ = (function cljs$core$prefers_STAR_(x,y,prefer_table){ +var xprefs = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(prefer_table) : cljs.core.deref.call(null,prefer_table)).call(null,x); +var or__7960__auto__ = (cljs.core.truth_((function (){var and__7948__auto__ = xprefs; +if(cljs.core.truth_(and__7948__auto__)){ +return (xprefs.cljs$core$IFn$_invoke$arity$1 ? xprefs.cljs$core$IFn$_invoke$arity$1(y) : xprefs.call(null,y)); +} else { +return and__7948__auto__; +} +})())?true:null); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (function (){var ps = cljs.core.parents.cljs$core$IFn$_invoke$arity$1(y); +while(true){ +if((cljs.core.count(ps) > (0))){ +if(cljs.core.truth_((function (){var G__14142 = x; +var G__14143 = cljs.core.first(ps); +var G__14144 = prefer_table; +return (cljs.core.prefers_STAR_.cljs$core$IFn$_invoke$arity$3 ? cljs.core.prefers_STAR_.cljs$core$IFn$_invoke$arity$3(G__14142,G__14143,G__14144) : cljs.core.prefers_STAR_.call(null,G__14142,G__14143,G__14144)); +})())){ +} else { +} + +var G__14151 = cljs.core.rest(ps); +ps = G__14151; +continue; +} else { +return null; +} +break; +} +})(); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = (function (){var ps = cljs.core.parents.cljs$core$IFn$_invoke$arity$1(x); +while(true){ +if((cljs.core.count(ps) > (0))){ +if(cljs.core.truth_((function (){var G__14148 = cljs.core.first(ps); +var G__14149 = y; +var G__14150 = prefer_table; +return (cljs.core.prefers_STAR_.cljs$core$IFn$_invoke$arity$3 ? cljs.core.prefers_STAR_.cljs$core$IFn$_invoke$arity$3(G__14148,G__14149,G__14150) : cljs.core.prefers_STAR_.call(null,G__14148,G__14149,G__14150)); +})())){ +} else { +} + +var G__14152 = cljs.core.rest(ps); +ps = G__14152; +continue; +} else { +return null; +} +break; +} +})(); +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +return false; +} +} +} +}); +cljs.core.dominates = (function cljs$core$dominates(x,y,prefer_table,hierarchy){ +var or__7960__auto__ = cljs.core.prefers_STAR_(x,y,prefer_table); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3(hierarchy,x,y); +} +}); +cljs.core.find_and_cache_best_method = (function cljs$core$find_and_cache_best_method(name,dispatch_val,hierarchy,method_table,prefer_table,method_cache,cached_hierarchy,default_dispatch_val){ +var best_entry = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (be,p__14157){ +var vec__14158 = p__14157; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14158,(0),null); +var _ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14158,(1),null); +var e = vec__14158; +if(cljs.core.isa_QMARK_.cljs$core$IFn$_invoke$arity$3((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null,hierarchy)),dispatch_val,k)){ +var be2 = (cljs.core.truth_((function (){var or__7960__auto__ = (be == null); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return cljs.core.dominates(k,cljs.core.first(be),prefer_table,(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null,hierarchy))); +} +})())?e:be); +if(cljs.core.truth_(cljs.core.dominates(cljs.core.first(be2),k,prefer_table,(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null,hierarchy))))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Multiple methods in multimethod '"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(name),cljs.core.str.cljs$core$IFn$_invoke$arity$1("' match dispatch value: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(dispatch_val),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" -> "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(k),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" and "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.first(be2)),cljs.core.str.cljs$core$IFn$_invoke$arity$1(", and neither is preferred")].join(''))); +} + +return be2; +} else { +return be; +} +}),null,(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(method_table) : cljs.core.deref.call(null,method_table))); +var best_entry__$1 = (function (){var temp__5276__auto__ = (function (){var and__7948__auto__ = (best_entry == null); +if(and__7948__auto__){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(method_table) : cljs.core.deref.call(null,method_table)).call(null,default_dispatch_val); +} else { +return and__7948__auto__; +} +})(); +if(cljs.core.truth_(temp__5276__auto__)){ +var entry = temp__5276__auto__; +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [default_dispatch_val,entry], null); +} else { +return best_entry; +} +})(); +if(cljs.core.truth_(best_entry__$1)){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cached_hierarchy) : cljs.core.deref.call(null,cached_hierarchy)),(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(hierarchy) : cljs.core.deref.call(null,hierarchy)))){ +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(method_cache,cljs.core.assoc,dispatch_val,cljs.core.second(best_entry__$1)); + +return cljs.core.second(best_entry__$1); +} else { +cljs.core.reset_cache(method_cache,method_table,cached_hierarchy,hierarchy); + +return (cljs.core.find_and_cache_best_method.cljs$core$IFn$_invoke$arity$8 ? cljs.core.find_and_cache_best_method.cljs$core$IFn$_invoke$arity$8(name,dispatch_val,hierarchy,method_table,prefer_table,method_cache,cached_hierarchy,default_dispatch_val) : cljs.core.find_and_cache_best_method.call(null,name,dispatch_val,hierarchy,method_table,prefer_table,method_cache,cached_hierarchy,default_dispatch_val)); +} +} else { +return null; +} +}); + +/** + * @interface + */ +cljs.core.IMultiFn = function(){}; + +cljs.core._reset = (function cljs$core$_reset(mf){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_reset$arity$1 == null)))){ +return mf.cljs$core$IMultiFn$_reset$arity$1(mf); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._reset[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto__.call(null,mf)); +} else { +var m__8679__auto____$1 = (cljs.core._reset["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto____$1.call(null,mf)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-reset",mf); +} +} +} +}); + +cljs.core._add_method = (function cljs$core$_add_method(mf,dispatch_val,method){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_add_method$arity$3 == null)))){ +return mf.cljs$core$IMultiFn$_add_method$arity$3(mf,dispatch_val,method); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._add_method[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(mf,dispatch_val,method) : m__8679__auto__.call(null,mf,dispatch_val,method)); +} else { +var m__8679__auto____$1 = (cljs.core._add_method["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(mf,dispatch_val,method) : m__8679__auto____$1.call(null,mf,dispatch_val,method)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-add-method",mf); +} +} +} +}); + +cljs.core._remove_method = (function cljs$core$_remove_method(mf,dispatch_val){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_remove_method$arity$2 == null)))){ +return mf.cljs$core$IMultiFn$_remove_method$arity$2(mf,dispatch_val); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._remove_method[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(mf,dispatch_val) : m__8679__auto__.call(null,mf,dispatch_val)); +} else { +var m__8679__auto____$1 = (cljs.core._remove_method["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(mf,dispatch_val) : m__8679__auto____$1.call(null,mf,dispatch_val)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-remove-method",mf); +} +} +} +}); + +cljs.core._prefer_method = (function cljs$core$_prefer_method(mf,dispatch_val,dispatch_val_y){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_prefer_method$arity$3 == null)))){ +return mf.cljs$core$IMultiFn$_prefer_method$arity$3(mf,dispatch_val,dispatch_val_y); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._prefer_method[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(mf,dispatch_val,dispatch_val_y) : m__8679__auto__.call(null,mf,dispatch_val,dispatch_val_y)); +} else { +var m__8679__auto____$1 = (cljs.core._prefer_method["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(mf,dispatch_val,dispatch_val_y) : m__8679__auto____$1.call(null,mf,dispatch_val,dispatch_val_y)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-prefer-method",mf); +} +} +} +}); + +cljs.core._get_method = (function cljs$core$_get_method(mf,dispatch_val){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_get_method$arity$2 == null)))){ +return mf.cljs$core$IMultiFn$_get_method$arity$2(mf,dispatch_val); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._get_method[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(mf,dispatch_val) : m__8679__auto__.call(null,mf,dispatch_val)); +} else { +var m__8679__auto____$1 = (cljs.core._get_method["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(mf,dispatch_val) : m__8679__auto____$1.call(null,mf,dispatch_val)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-get-method",mf); +} +} +} +}); + +cljs.core._methods = (function cljs$core$_methods(mf){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_methods$arity$1 == null)))){ +return mf.cljs$core$IMultiFn$_methods$arity$1(mf); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._methods[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto__.call(null,mf)); +} else { +var m__8679__auto____$1 = (cljs.core._methods["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto____$1.call(null,mf)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-methods",mf); +} +} +} +}); + +cljs.core._prefers = (function cljs$core$_prefers(mf){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_prefers$arity$1 == null)))){ +return mf.cljs$core$IMultiFn$_prefers$arity$1(mf); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._prefers[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto__.call(null,mf)); +} else { +var m__8679__auto____$1 = (cljs.core._prefers["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto____$1.call(null,mf)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-prefers",mf); +} +} +} +}); + +cljs.core._default_dispatch_val = (function cljs$core$_default_dispatch_val(mf){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_default_dispatch_val$arity$1 == null)))){ +return mf.cljs$core$IMultiFn$_default_dispatch_val$arity$1(mf); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._default_dispatch_val[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto__.call(null,mf)); +} else { +var m__8679__auto____$1 = (cljs.core._default_dispatch_val["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto____$1.call(null,mf)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-default-dispatch-val",mf); +} +} +} +}); + +cljs.core._dispatch_fn = (function cljs$core$_dispatch_fn(mf){ +if((!((mf == null))) && (!((mf.cljs$core$IMultiFn$_dispatch_fn$arity$1 == null)))){ +return mf.cljs$core$IMultiFn$_dispatch_fn$arity$1(mf); +} else { +var x__8678__auto__ = (((mf == null))?null:mf); +var m__8679__auto__ = (cljs.core._dispatch_fn[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto__.call(null,mf)); +} else { +var m__8679__auto____$1 = (cljs.core._dispatch_fn["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(mf) : m__8679__auto____$1.call(null,mf)); +} else { +throw cljs.core.missing_protocol("IMultiFn.-dispatch-fn",mf); +} +} +} +}); + +cljs.core.throw_no_method_error = (function cljs$core$throw_no_method_error(name,dispatch_val){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No method in multimethod '"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(name),cljs.core.str.cljs$core$IFn$_invoke$arity$1("' for dispatch value: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(dispatch_val)].join(''))); +}); + +/** +* @constructor + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} + * @implements {cljs.core.IMultiFn} + * @implements {cljs.core.INamed} +*/ +cljs.core.MultiFn = (function (name,dispatch_fn,default_dispatch_val,hierarchy,method_table,prefer_table,method_cache,cached_hierarchy){ +this.name = name; +this.dispatch_fn = dispatch_fn; +this.default_dispatch_val = default_dispatch_val; +this.hierarchy = hierarchy; +this.method_table = method_table; +this.prefer_table = prefer_table; +this.method_cache = method_cache; +this.cached_hierarchy = cached_hierarchy; +this.cljs$lang$protocol_mask$partition0$ = 4194305; +this.cljs$lang$protocol_mask$partition1$ = 4352; +}) +cljs.core.MultiFn.prototype.call = (function() { +var G__14162 = null; +var G__14162__1 = (function (self__){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0() : self__.dispatch_fn.call(null)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$0 ? target_fn.cljs$core$IFn$_invoke$arity$0() : target_fn.call(null)); +}); +var G__14162__2 = (function (self__,a){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1(a) : self__.dispatch_fn.call(null,a)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$1 ? target_fn.cljs$core$IFn$_invoke$arity$1(a) : target_fn.call(null,a)); +}); +var G__14162__3 = (function (self__,a,b){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2(a,b) : self__.dispatch_fn.call(null,a,b)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$2 ? target_fn.cljs$core$IFn$_invoke$arity$2(a,b) : target_fn.call(null,a,b)); +}); +var G__14162__4 = (function (self__,a,b,c){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3(a,b,c) : self__.dispatch_fn.call(null,a,b,c)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$3 ? target_fn.cljs$core$IFn$_invoke$arity$3(a,b,c) : target_fn.call(null,a,b,c)); +}); +var G__14162__5 = (function (self__,a,b,c,d){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4(a,b,c,d) : self__.dispatch_fn.call(null,a,b,c,d)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$4 ? target_fn.cljs$core$IFn$_invoke$arity$4(a,b,c,d) : target_fn.call(null,a,b,c,d)); +}); +var G__14162__6 = (function (self__,a,b,c,d,e){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5(a,b,c,d,e) : self__.dispatch_fn.call(null,a,b,c,d,e)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$5 ? target_fn.cljs$core$IFn$_invoke$arity$5(a,b,c,d,e) : target_fn.call(null,a,b,c,d,e)); +}); +var G__14162__7 = (function (self__,a,b,c,d,e,f){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6(a,b,c,d,e,f) : self__.dispatch_fn.call(null,a,b,c,d,e,f)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$6 ? target_fn.cljs$core$IFn$_invoke$arity$6(a,b,c,d,e,f) : target_fn.call(null,a,b,c,d,e,f)); +}); +var G__14162__8 = (function (self__,a,b,c,d,e,f,g){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7(a,b,c,d,e,f,g) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$7 ? target_fn.cljs$core$IFn$_invoke$arity$7(a,b,c,d,e,f,g) : target_fn.call(null,a,b,c,d,e,f,g)); +}); +var G__14162__9 = (function (self__,a,b,c,d,e,f,g,h){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8(a,b,c,d,e,f,g,h) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$8 ? target_fn.cljs$core$IFn$_invoke$arity$8(a,b,c,d,e,f,g,h) : target_fn.call(null,a,b,c,d,e,f,g,h)); +}); +var G__14162__10 = (function (self__,a,b,c,d,e,f,g,h,i){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9(a,b,c,d,e,f,g,h,i) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$9 ? target_fn.cljs$core$IFn$_invoke$arity$9(a,b,c,d,e,f,g,h,i) : target_fn.call(null,a,b,c,d,e,f,g,h,i)); +}); +var G__14162__11 = (function (self__,a,b,c,d,e,f,g,h,i,j){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10(a,b,c,d,e,f,g,h,i,j) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$10 ? target_fn.cljs$core$IFn$_invoke$arity$10(a,b,c,d,e,f,g,h,i,j) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j)); +}); +var G__14162__12 = (function (self__,a,b,c,d,e,f,g,h,i,j,k){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11(a,b,c,d,e,f,g,h,i,j,k) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$11 ? target_fn.cljs$core$IFn$_invoke$arity$11(a,b,c,d,e,f,g,h,i,j,k) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k)); +}); +var G__14162__13 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12(a,b,c,d,e,f,g,h,i,j,k,l) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$12 ? target_fn.cljs$core$IFn$_invoke$arity$12(a,b,c,d,e,f,g,h,i,j,k,l) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l)); +}); +var G__14162__14 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13(a,b,c,d,e,f,g,h,i,j,k,l,m) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$13 ? target_fn.cljs$core$IFn$_invoke$arity$13(a,b,c,d,e,f,g,h,i,j,k,l,m) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m)); +}); +var G__14162__15 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$14 ? target_fn.cljs$core$IFn$_invoke$arity$14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +}); +var G__14162__16 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$15 ? target_fn.cljs$core$IFn$_invoke$arity$15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +}); +var G__14162__17 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$16 ? target_fn.cljs$core$IFn$_invoke$arity$16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +}); +var G__14162__18 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$17 ? target_fn.cljs$core$IFn$_invoke$arity$17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +}); +var G__14162__19 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$18 ? target_fn.cljs$core$IFn$_invoke$arity$18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +}); +var G__14162__20 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$19 ? target_fn.cljs$core$IFn$_invoke$arity$19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +}); +var G__14162__21 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$20 ? target_fn.cljs$core$IFn$_invoke$arity$20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +}); +var G__14162__22 = (function (self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +var self__ = this; +var self____$1 = this; +var mf = self____$1; +var dispatch_val = cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(self__.dispatch_fn,a,b,c,d,cljs.core.array_seq([e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest], 0)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(target_fn,a,b,c,d,cljs.core.array_seq([e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest], 0)); +}); +G__14162 = function(self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +switch(arguments.length){ +case 1: +return G__14162__1.call(this,self__); +case 2: +return G__14162__2.call(this,self__,a); +case 3: +return G__14162__3.call(this,self__,a,b); +case 4: +return G__14162__4.call(this,self__,a,b,c); +case 5: +return G__14162__5.call(this,self__,a,b,c,d); +case 6: +return G__14162__6.call(this,self__,a,b,c,d,e); +case 7: +return G__14162__7.call(this,self__,a,b,c,d,e,f); +case 8: +return G__14162__8.call(this,self__,a,b,c,d,e,f,g); +case 9: +return G__14162__9.call(this,self__,a,b,c,d,e,f,g,h); +case 10: +return G__14162__10.call(this,self__,a,b,c,d,e,f,g,h,i); +case 11: +return G__14162__11.call(this,self__,a,b,c,d,e,f,g,h,i,j); +case 12: +return G__14162__12.call(this,self__,a,b,c,d,e,f,g,h,i,j,k); +case 13: +return G__14162__13.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l); +case 14: +return G__14162__14.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m); +case 15: +return G__14162__15.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n); +case 16: +return G__14162__16.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o); +case 17: +return G__14162__17.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p); +case 18: +return G__14162__18.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q); +case 19: +return G__14162__19.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r); +case 20: +return G__14162__20.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s); +case 21: +return G__14162__21.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t); +case 22: +return G__14162__22.call(this,self__,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__14162.cljs$core$IFn$_invoke$arity$1 = G__14162__1; +G__14162.cljs$core$IFn$_invoke$arity$2 = G__14162__2; +G__14162.cljs$core$IFn$_invoke$arity$3 = G__14162__3; +G__14162.cljs$core$IFn$_invoke$arity$4 = G__14162__4; +G__14162.cljs$core$IFn$_invoke$arity$5 = G__14162__5; +G__14162.cljs$core$IFn$_invoke$arity$6 = G__14162__6; +G__14162.cljs$core$IFn$_invoke$arity$7 = G__14162__7; +G__14162.cljs$core$IFn$_invoke$arity$8 = G__14162__8; +G__14162.cljs$core$IFn$_invoke$arity$9 = G__14162__9; +G__14162.cljs$core$IFn$_invoke$arity$10 = G__14162__10; +G__14162.cljs$core$IFn$_invoke$arity$11 = G__14162__11; +G__14162.cljs$core$IFn$_invoke$arity$12 = G__14162__12; +G__14162.cljs$core$IFn$_invoke$arity$13 = G__14162__13; +G__14162.cljs$core$IFn$_invoke$arity$14 = G__14162__14; +G__14162.cljs$core$IFn$_invoke$arity$15 = G__14162__15; +G__14162.cljs$core$IFn$_invoke$arity$16 = G__14162__16; +G__14162.cljs$core$IFn$_invoke$arity$17 = G__14162__17; +G__14162.cljs$core$IFn$_invoke$arity$18 = G__14162__18; +G__14162.cljs$core$IFn$_invoke$arity$19 = G__14162__19; +G__14162.cljs$core$IFn$_invoke$arity$20 = G__14162__20; +G__14162.cljs$core$IFn$_invoke$arity$21 = G__14162__21; +G__14162.cljs$core$IFn$_invoke$arity$22 = G__14162__22; +return G__14162; +})() +; + +cljs.core.MultiFn.prototype.apply = (function (self__,args14161){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args14161))); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$0 = (function (){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$0() : self__.dispatch_fn.call(null)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$0 ? target_fn.cljs$core$IFn$_invoke$arity$0() : target_fn.call(null)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$1 = (function (a){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$1(a) : self__.dispatch_fn.call(null,a)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$1 ? target_fn.cljs$core$IFn$_invoke$arity$1(a) : target_fn.call(null,a)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$2 = (function (a,b){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$2(a,b) : self__.dispatch_fn.call(null,a,b)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$2 ? target_fn.cljs$core$IFn$_invoke$arity$2(a,b) : target_fn.call(null,a,b)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$3 = (function (a,b,c){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$3(a,b,c) : self__.dispatch_fn.call(null,a,b,c)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$3 ? target_fn.cljs$core$IFn$_invoke$arity$3(a,b,c) : target_fn.call(null,a,b,c)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$4 = (function (a,b,c,d){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$4(a,b,c,d) : self__.dispatch_fn.call(null,a,b,c,d)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$4 ? target_fn.cljs$core$IFn$_invoke$arity$4(a,b,c,d) : target_fn.call(null,a,b,c,d)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$5 = (function (a,b,c,d,e){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$5(a,b,c,d,e) : self__.dispatch_fn.call(null,a,b,c,d,e)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$5 ? target_fn.cljs$core$IFn$_invoke$arity$5(a,b,c,d,e) : target_fn.call(null,a,b,c,d,e)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$6 = (function (a,b,c,d,e,f){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$6(a,b,c,d,e,f) : self__.dispatch_fn.call(null,a,b,c,d,e,f)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$6 ? target_fn.cljs$core$IFn$_invoke$arity$6(a,b,c,d,e,f) : target_fn.call(null,a,b,c,d,e,f)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$7 = (function (a,b,c,d,e,f,g){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$7(a,b,c,d,e,f,g) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$7 ? target_fn.cljs$core$IFn$_invoke$arity$7(a,b,c,d,e,f,g) : target_fn.call(null,a,b,c,d,e,f,g)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$8 = (function (a,b,c,d,e,f,g,h){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$8(a,b,c,d,e,f,g,h) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$8 ? target_fn.cljs$core$IFn$_invoke$arity$8(a,b,c,d,e,f,g,h) : target_fn.call(null,a,b,c,d,e,f,g,h)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$9 = (function (a,b,c,d,e,f,g,h,i){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$9(a,b,c,d,e,f,g,h,i) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$9 ? target_fn.cljs$core$IFn$_invoke$arity$9(a,b,c,d,e,f,g,h,i) : target_fn.call(null,a,b,c,d,e,f,g,h,i)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$10 = (function (a,b,c,d,e,f,g,h,i,j){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$10(a,b,c,d,e,f,g,h,i,j) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$10 ? target_fn.cljs$core$IFn$_invoke$arity$10(a,b,c,d,e,f,g,h,i,j) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$11 = (function (a,b,c,d,e,f,g,h,i,j,k){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$11(a,b,c,d,e,f,g,h,i,j,k) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$11 ? target_fn.cljs$core$IFn$_invoke$arity$11(a,b,c,d,e,f,g,h,i,j,k) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$12 = (function (a,b,c,d,e,f,g,h,i,j,k,l){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$12(a,b,c,d,e,f,g,h,i,j,k,l) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$12 ? target_fn.cljs$core$IFn$_invoke$arity$12(a,b,c,d,e,f,g,h,i,j,k,l) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$13 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$13(a,b,c,d,e,f,g,h,i,j,k,l,m) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$13 ? target_fn.cljs$core$IFn$_invoke$arity$13(a,b,c,d,e,f,g,h,i,j,k,l,m) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$14 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$14 ? target_fn.cljs$core$IFn$_invoke$arity$14(a,b,c,d,e,f,g,h,i,j,k,l,m,n) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$15 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$15 ? target_fn.cljs$core$IFn$_invoke$arity$15(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$16 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$16 ? target_fn.cljs$core$IFn$_invoke$arity$16(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$17 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$17 ? target_fn.cljs$core$IFn$_invoke$arity$17(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$18 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$18 ? target_fn.cljs$core$IFn$_invoke$arity$18(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$19 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$19 ? target_fn.cljs$core$IFn$_invoke$arity$19(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$20 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t){ +var self__ = this; +var mf = this; +var dispatch_val = (self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20 ? self__.dispatch_fn.cljs$core$IFn$_invoke$arity$20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : self__.dispatch_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return (target_fn.cljs$core$IFn$_invoke$arity$20 ? target_fn.cljs$core$IFn$_invoke$arity$20(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t) : target_fn.call(null,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IFn$_invoke$arity$21 = (function (a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest){ +var self__ = this; +var mf = this; +var dispatch_val = cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(self__.dispatch_fn,a,b,c,d,cljs.core.array_seq([e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest], 0)); +var target_fn = mf.cljs$core$IMultiFn$_get_method$arity$2(null,dispatch_val); +if(cljs.core.truth_(target_fn)){ +} else { +cljs.core.throw_no_method_error(self__.name,dispatch_val); +} + +return cljs.core.apply.cljs$core$IFn$_invoke$arity$variadic(target_fn,a,b,c,d,cljs.core.array_seq([e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,rest], 0)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefer_method$arity$3 = (function (mf,dispatch_val_x,dispatch_val_y){ +var self__ = this; +var mf__$1 = this; +if(cljs.core.truth_(cljs.core.prefers_STAR_(dispatch_val_x,dispatch_val_y,self__.prefer_table))){ +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Preference conflict in multimethod '"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.name),cljs.core.str.cljs$core$IFn$_invoke$arity$1("': "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(dispatch_val_y),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" is already preferred to "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(dispatch_val_x)].join(''))); +} else { +} + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.prefer_table,((function (mf__$1){ +return (function (old){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(old,dispatch_val_x,cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(old,dispatch_val_x,cljs.core.PersistentHashSet.EMPTY),dispatch_val_y)); +});})(mf__$1)) +); + +return cljs.core.reset_cache(self__.method_cache,self__.method_table,self__.cached_hierarchy,self__.hierarchy); +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_default_dispatch_val$arity$1 = (function (mf){ +var self__ = this; +var mf__$1 = this; +return self__.default_dispatch_val; +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_remove_method$arity$2 = (function (mf,dispatch_val){ +var self__ = this; +var mf__$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(self__.method_table,cljs.core.dissoc,dispatch_val); + +cljs.core.reset_cache(self__.method_cache,self__.method_table,self__.cached_hierarchy,self__.hierarchy); + +return mf__$1; +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_methods$arity$1 = (function (mf){ +var self__ = this; +var mf__$1 = this; +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.method_table) : cljs.core.deref.call(null,self__.method_table)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefers$arity$1 = (function (mf){ +var self__ = this; +var mf__$1 = this; +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.prefer_table) : cljs.core.deref.call(null,self__.prefer_table)); +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_dispatch_fn$arity$1 = (function (mf){ +var self__ = this; +var mf__$1 = this; +return self__.dispatch_fn; +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_add_method$arity$3 = (function (mf,dispatch_val,method){ +var self__ = this; +var mf__$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(self__.method_table,cljs.core.assoc,dispatch_val,method); + +cljs.core.reset_cache(self__.method_cache,self__.method_table,self__.cached_hierarchy,self__.hierarchy); + +return mf__$1; +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_reset$arity$1 = (function (mf){ +var self__ = this; +var mf__$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.method_table,((function (mf__$1){ +return (function (mf__$2){ +return cljs.core.PersistentArrayMap.EMPTY; +});})(mf__$1)) +); + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.method_cache,((function (mf__$1){ +return (function (mf__$2){ +return cljs.core.PersistentArrayMap.EMPTY; +});})(mf__$1)) +); + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.prefer_table,((function (mf__$1){ +return (function (mf__$2){ +return cljs.core.PersistentArrayMap.EMPTY; +});})(mf__$1)) +); + +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(self__.cached_hierarchy,((function (mf__$1){ +return (function (mf__$2){ +return null; +});})(mf__$1)) +); + +return mf__$1; +}); + +cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_get_method$arity$2 = (function (mf,dispatch_val){ +var self__ = this; +var mf__$1 = this; +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.cached_hierarchy) : cljs.core.deref.call(null,self__.cached_hierarchy)),(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.hierarchy) : cljs.core.deref.call(null,self__.hierarchy)))){ +} else { +cljs.core.reset_cache(self__.method_cache,self__.method_table,self__.cached_hierarchy,self__.hierarchy); +} + +var temp__5276__auto__ = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.method_cache) : cljs.core.deref.call(null,self__.method_cache)).call(null,dispatch_val); +if(cljs.core.truth_(temp__5276__auto__)){ +var target_fn = temp__5276__auto__; +return target_fn; +} else { +return cljs.core.find_and_cache_best_method(self__.name,dispatch_val,self__.hierarchy,self__.method_table,self__.prefer_table,self__.method_cache,self__.cached_hierarchy,self__.default_dispatch_val); +} +}); + +cljs.core.MultiFn.prototype.cljs$core$INamed$_name$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return cljs.core._name(self__.name); +}); + +cljs.core.MultiFn.prototype.cljs$core$INamed$_namespace$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return cljs.core._namespace(self__.name); +}); + +cljs.core.MultiFn.prototype.cljs$core$IHash$_hash$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return goog.getUid(this$__$1); +}); + +cljs.core.MultiFn.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$name,cljs.core.cst$sym$dispatch_DASH_fn,cljs.core.cst$sym$default_DASH_dispatch_DASH_val,cljs.core.cst$sym$hierarchy,cljs.core.cst$sym$method_DASH_table,cljs.core.cst$sym$prefer_DASH_table,cljs.core.cst$sym$method_DASH_cache,cljs.core.cst$sym$cached_DASH_hierarchy], null); +}); + +cljs.core.MultiFn.cljs$lang$type = true; + +cljs.core.MultiFn.cljs$lang$ctorStr = "cljs.core/MultiFn"; + +cljs.core.MultiFn.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/MultiFn"); +}); + +cljs.core.__GT_MultiFn = (function cljs$core$__GT_MultiFn(name,dispatch_fn,default_dispatch_val,hierarchy,method_table,prefer_table,method_cache,cached_hierarchy){ +return (new cljs.core.MultiFn(name,dispatch_fn,default_dispatch_val,hierarchy,method_table,prefer_table,method_cache,cached_hierarchy)); +}); + +/** + * Removes all of the methods of multimethod. + */ +cljs.core.remove_all_methods = (function cljs$core$remove_all_methods(multifn){ +return cljs.core._reset(multifn); +}); +/** + * Removes the method of multimethod associated with dispatch-value. + */ +cljs.core.remove_method = (function cljs$core$remove_method(multifn,dispatch_val){ +return cljs.core._remove_method(multifn,dispatch_val); +}); +/** + * Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y + * when there is a conflict + */ +cljs.core.prefer_method = (function cljs$core$prefer_method(multifn,dispatch_val_x,dispatch_val_y){ +return cljs.core._prefer_method(multifn,dispatch_val_x,dispatch_val_y); +}); +/** + * Given a multimethod, returns a map of dispatch values -> dispatch fns + */ +cljs.core.methods$ = (function cljs$core$methods(multifn){ +return cljs.core._methods(multifn); +}); +/** + * Given a multimethod and a dispatch value, returns the dispatch fn + * that would apply to that value, or nil if none apply and no default + */ +cljs.core.get_method = (function cljs$core$get_method(multifn,dispatch_val){ +return cljs.core._get_method(multifn,dispatch_val); +}); +/** + * Given a multimethod, returns a map of preferred value -> set of other values + */ +cljs.core.prefers = (function cljs$core$prefers(multifn){ +return cljs.core._prefers(multifn); +}); +/** + * Given a multimethod, return it's default-dispatch-val. + */ +cljs.core.default_dispatch_val = (function cljs$core$default_dispatch_val(multifn){ +return cljs.core._default_dispatch_val(multifn); +}); +/** + * Given a multimethod, return it's dispatch-fn. + */ +cljs.core.dispatch_fn = (function cljs$core$dispatch_fn(multifn){ +return cljs.core._dispatch_fn(multifn); +}); + +/** + * A marker protocol for UUIDs + * @interface + */ +cljs.core.IUUID = function(){}; + + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IPrintWithWriter} + * @implements {cljs.core.IComparable} + * @implements {cljs.core.IUUID} +*/ +cljs.core.UUID = (function (uuid,__hash){ +this.uuid = uuid; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 2153775104; +this.cljs$lang$protocol_mask$partition1$ = 2048; +}) +cljs.core.UUID.prototype.cljs$core$IUUID$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.UUID.prototype.toString = (function (){ +var self__ = this; +var _ = this; +return self__.uuid; +}); + +cljs.core.UUID.prototype.equiv = (function (other){ +var self__ = this; +var this$ = this; +return this$.cljs$core$IEquiv$_equiv$arity$2(null,other); +}); + +cljs.core.UUID.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +return ((other instanceof cljs.core.UUID)) && ((self__.uuid === other.uuid)); +}); + +cljs.core.UUID.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (_,writer,___$1){ +var self__ = this; +var ___$2 = this; +return cljs.core._write(writer,[cljs.core.str.cljs$core$IFn$_invoke$arity$1("#uuid \""),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.uuid),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\"")].join('')); +}); + +cljs.core.UUID.prototype.cljs$core$IHash$_hash$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +if((self__.__hash == null)){ +self__.__hash = cljs.core.hash(self__.uuid); +} else { +} + +return self__.__hash; +}); + +cljs.core.UUID.prototype.cljs$core$IComparable$_compare$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +var G__14163 = self__.uuid; +var G__14164 = other.uuid; +return goog.array.defaultCompare(G__14163,G__14164); +}); + +cljs.core.UUID.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$uuid,cljs.core.with_meta(cljs.core.cst$sym$__hash,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.UUID.cljs$lang$type = true; + +cljs.core.UUID.cljs$lang$ctorStr = "cljs.core/UUID"; + +cljs.core.UUID.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/UUID"); +}); + +cljs.core.__GT_UUID = (function cljs$core$__GT_UUID(uuid,__hash){ +return (new cljs.core.UUID(uuid,__hash)); +}); + +cljs.core.uuid = (function cljs$core$uuid(s){ +return (new cljs.core.UUID(s,null)); +}); +cljs.core.random_uuid = (function cljs$core$random_uuid(){ +var hex = (function cljs$core$random_uuid_$_hex(){ +return cljs.core.rand_int((16)).toString((16)); +}); +var rhex = ((8) | ((3) & cljs.core.rand_int((16)))).toString((16)); +return cljs.core.uuid([cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1("-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1("-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("4"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1("-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(rhex),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1("-"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hex())].join('')); +}); +cljs.core.uuid_QMARK_ = (function cljs$core$uuid_QMARK_(x){ +if(!((x == null))){ +if((false) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IUUID$))){ +return true; +} else { +return false; +} +} else { +return false; +} +}); +cljs.core.pr_writer_ex_info = (function cljs$core$pr_writer_ex_info(obj,writer,opts){ +cljs.core._write(writer,"#error {:message "); + +cljs.core.pr_writer(obj.message,writer,opts); + +if(cljs.core.truth_(obj.data)){ +cljs.core._write(writer,", :data "); + +cljs.core.pr_writer(obj.data,writer,opts); +} else { +} + +if(cljs.core.truth_(obj.cause)){ +cljs.core._write(writer,", :cause "); + +cljs.core.pr_writer(obj.cause,writer,opts); +} else { +} + +return cljs.core._write(writer,"}"); +}); +/** + * @constructor + */ +cljs.core.ExceptionInfo = (function cljs$core$ExceptionInfo(message,data,cause){ +var e = (new Error(message)); +var this$ = this; +this$.message = message; + +this$.data = data; + +this$.cause = cause; + +this$.name = e.name; + +this$.description = e.description; + +this$.number = e.number; + +this$.fileName = e.fileName; + +this$.lineNumber = e.lineNumber; + +this$.columnNumber = e.columnNumber; + +this$.stack = e.stack; + +return this$; +}); +cljs.core.ExceptionInfo.prototype.__proto__ = Error.prototype; +cljs.core.ExceptionInfo.prototype.cljs$core$IPrintWithWriter$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.ExceptionInfo.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (obj,writer,opts){ +var obj__$1 = this; +return cljs.core.pr_writer_ex_info(obj__$1,writer,opts); +}); +cljs.core.ExceptionInfo.prototype.toString = (function (){ +var this$ = this; +return cljs.core.pr_str_STAR_(this$); +}); +/** + * Create an instance of ExceptionInfo, an Error type that carries a + * map of additional data. + */ +cljs.core.ex_info = (function cljs$core$ex_info(var_args){ +var args14167 = []; +var len__9181__auto___14170 = arguments.length; +var i__9182__auto___14171 = (0); +while(true){ +if((i__9182__auto___14171 < len__9181__auto___14170)){ +args14167.push((arguments[i__9182__auto___14171])); + +var G__14172 = (i__9182__auto___14171 + (1)); +i__9182__auto___14171 = G__14172; +continue; +} else { +} +break; +} + +var G__14169 = args14167.length; +switch (G__14169) { +case 2: +return cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14167.length)].join(''))); + +} +}); + +cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2 = (function (msg,data){ +return cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3(msg,data,null); +}); + +cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 = (function (msg,data,cause){ +return (new cljs.core.ExceptionInfo(msg,data,cause)); +}); + +cljs.core.ex_info.cljs$lang$maxFixedArity = 3; + +/** + * Returns exception data (a map) if ex is an ExceptionInfo. + * Otherwise returns nil. + */ +cljs.core.ex_data = (function cljs$core$ex_data(ex){ +if((ex instanceof cljs.core.ExceptionInfo)){ +return ex.data; +} else { +return null; +} +}); +/** + * Returns the message attached to the given Error / ExceptionInfo object. + * For non-Errors returns nil. + */ +cljs.core.ex_message = (function cljs$core$ex_message(ex){ +if((ex instanceof Error)){ +return ex.message; +} else { +return null; +} +}); +/** + * Returns exception cause (an Error / ExceptionInfo) if ex is an + * ExceptionInfo. + * Otherwise returns nil. + */ +cljs.core.ex_cause = (function cljs$core$ex_cause(ex){ +if((ex instanceof cljs.core.ExceptionInfo)){ +return ex.cause; +} else { +return null; +} +}); +/** + * Returns an JavaScript compatible comparator based upon pred. + */ +cljs.core.comparator = (function cljs$core$comparator(pred){ +return (function (x,y){ +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$2 ? pred.cljs$core$IFn$_invoke$arity$2(x,y) : pred.call(null,x,y)))){ +return (-1); +} else { +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$2 ? pred.cljs$core$IFn$_invoke$arity$2(y,x) : pred.call(null,y,x)))){ +return (1); +} else { +return (0); + +} +} +}); +}); +/** + * Returns true if x names a special form + */ +cljs.core.special_symbol_QMARK_ = (function cljs$core$special_symbol_QMARK_(x){ +return cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 23, [cljs.core.cst$sym$_AMPERSAND_,null,cljs.core.cst$sym$defrecord_STAR_,null,cljs.core.cst$sym$try,null,cljs.core.cst$sym$ns_STAR_,null,cljs.core.cst$sym$finally,null,cljs.core.cst$sym$loop_STAR_,null,cljs.core.cst$sym$do,null,cljs.core.cst$sym$letfn_STAR_,null,cljs.core.cst$sym$if,null,cljs.core.cst$sym$new,null,cljs.core.cst$sym$ns,null,cljs.core.cst$sym$deftype_STAR_,null,cljs.core.cst$sym$let_STAR_,null,cljs.core.cst$sym$js_STAR_,null,cljs.core.cst$sym$fn_STAR_,null,cljs.core.cst$sym$recur,null,cljs.core.cst$sym$set_BANG_,null,cljs.core.cst$sym$_DOT_,null,cljs.core.cst$sym$var,null,cljs.core.cst$sym$quote,null,cljs.core.cst$sym$catch,null,cljs.core.cst$sym$throw,null,cljs.core.cst$sym$def,null], null), null),x); +}); +/** + * test [v] finds fn at key :test in var metadata and calls it, + * presuming failure will throw exception + */ +cljs.core.test = (function cljs$core$test(v){ +var f = v.cljs$lang$test; +if(cljs.core.truth_(f)){ +(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); + +return cljs.core.cst$kw$ok; +} else { +return cljs.core.cst$kw$no_DASH_test; +} +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IPrintWithWriter} + * @implements {cljs.core.ILookup} +*/ +cljs.core.TaggedLiteral = (function (tag,form){ +this.tag = tag; +this.form = form; +this.cljs$lang$protocol_mask$partition0$ = 2153775360; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.TaggedLiteral.prototype.toString = (function (){ +var self__ = this; +var coll = this; +return cljs.core.pr_str_STAR_(coll); +}); + +cljs.core.TaggedLiteral.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this$,other){ +var self__ = this; +var this$__$1 = this; +return ((other instanceof cljs.core.TaggedLiteral)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.tag,other.tag)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.form,other.form)); +}); + +cljs.core.TaggedLiteral.prototype.cljs$core$IHash$_hash$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return (((31) * cljs.core.hash(self__.tag)) + cljs.core.hash(self__.form)); +}); + +cljs.core.TaggedLiteral.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this$,v){ +var self__ = this; +var this$__$1 = this; +return this$__$1.cljs$core$ILookup$_lookup$arity$3(null,v,null); +}); + +cljs.core.TaggedLiteral.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this$,v,not_found){ +var self__ = this; +var this$__$1 = this; +var G__14174 = v; +var G__14174__$1 = (((G__14174 instanceof cljs.core.Keyword))?G__14174.fqn:null); +switch (G__14174__$1) { +case "tag": +return self__.tag; + +break; +case "form": +return self__.form; + +break; +default: +return not_found; + +} +}); + +cljs.core.TaggedLiteral.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (o,writer,opts){ +var self__ = this; +var o__$1 = this; +cljs.core._write(writer,[cljs.core.str.cljs$core$IFn$_invoke$arity$1("#"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.tag),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" ")].join('')); + +return cljs.core.pr_writer(self__.form,writer,opts); +}); + +cljs.core.TaggedLiteral.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$tag,cljs.core.cst$sym$form], null); +}); + +cljs.core.TaggedLiteral.cljs$lang$type = true; + +cljs.core.TaggedLiteral.cljs$lang$ctorStr = "cljs.core/TaggedLiteral"; + +cljs.core.TaggedLiteral.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/TaggedLiteral"); +}); + +cljs.core.__GT_TaggedLiteral = (function cljs$core$__GT_TaggedLiteral(tag,form){ +return (new cljs.core.TaggedLiteral(tag,form)); +}); + +/** + * Return true if the value is the data representation of a tagged literal + */ +cljs.core.tagged_literal_QMARK_ = (function cljs$core$tagged_literal_QMARK_(value){ +return (value instanceof cljs.core.TaggedLiteral); +}); +/** + * Construct a data representation of a tagged literal from a + * tag symbol and a form. + */ +cljs.core.tagged_literal = (function cljs$core$tagged_literal(tag,form){ +if((tag instanceof cljs.core.Symbol)){ +} else { +throw (new Error("Assert failed: (symbol? tag)")); +} + +return (new cljs.core.TaggedLiteral(tag,form)); +}); +/** + * @type {*} + */ +cljs.core.js_reserved_arr = ["arguments","abstract","await","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","let","long","native","new","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","try","typeof","var","void","volatile","while","with","yield","methods","null","constructor"]; +/** + * @type {null|Object} + */ +cljs.core.js_reserved = null; +cljs.core.js_reserved_QMARK_ = (function cljs$core$js_reserved_QMARK_(x){ +if((cljs.core.js_reserved == null)){ +cljs.core.js_reserved = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (p1__14176_SHARP_,p2__14177_SHARP_){ +goog.object.set(p1__14176_SHARP_,p2__14177_SHARP_,true); + +return p1__14176_SHARP_; +}),({}),cljs.core.js_reserved_arr); +} else { +} + +return cljs.core.js_reserved.hasOwnProperty(x); +}); +cljs.core.demunge_pattern = (function cljs$core$demunge_pattern(){ +if(cljs.core.truth_(cljs.core.DEMUNGE_PATTERN)){ +} else { +cljs.core.DEMUNGE_PATTERN = (function (){var ks = cljs.core.sort.cljs$core$IFn$_invoke$arity$2((function (a,b){ +return (b.length - a.length); +}),cljs.core.js_keys(cljs.core.DEMUNGE_MAP)); +var ks__$1 = ks; +var ret = ""; +while(true){ +if(cljs.core.seq(ks__$1)){ +var G__14180 = cljs.core.next(ks__$1); +var G__14181 = [cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var G__14179 = ret; +if(!((ret === ""))){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__14179),cljs.core.str.cljs$core$IFn$_invoke$arity$1("|")].join(''); +} else { +return G__14179; +} +})()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.first(ks__$1))].join(''); +ks__$1 = G__14180; +ret = G__14181; +continue; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(ret),cljs.core.str.cljs$core$IFn$_invoke$arity$1("|\\$")].join(''); +} +break; +} +})(); +} + +return cljs.core.DEMUNGE_PATTERN; +}); +cljs.core.munge_str = (function cljs$core$munge_str(name){ +var sb = (new goog.string.StringBuffer()); +var i_14182 = (0); +while(true){ +if((i_14182 < name.length)){ +var c_14183 = name.charAt(i_14182); +var sub_14184 = goog.object.get(cljs.core.CHAR_MAP,c_14183); +if(!((sub_14184 == null))){ +sb.append(sub_14184); +} else { +sb.append(c_14183); +} + +var G__14185 = (i_14182 + (1)); +i_14182 = G__14185; +continue; +} else { +} +break; +} + +return sb.toString(); +}); +cljs.core.munge = (function cljs$core$munge(name){ +var name_SINGLEQUOTE_ = cljs.core.munge_str([cljs.core.str.cljs$core$IFn$_invoke$arity$1(name)].join('')); +var name_SINGLEQUOTE___$1 = (((name_SINGLEQUOTE_ === ".."))?"_DOT__DOT_":(cljs.core.truth_(cljs.core.js_reserved_QMARK_(name_SINGLEQUOTE_))?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(name_SINGLEQUOTE_),cljs.core.str.cljs$core$IFn$_invoke$arity$1("$")].join(''):name_SINGLEQUOTE_ +)); +if((name instanceof cljs.core.Symbol)){ +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$1(name_SINGLEQUOTE___$1); +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(name_SINGLEQUOTE___$1)].join(''); +} +}); +cljs.core.demunge_str = (function cljs$core$demunge_str(munged_name){ +var r = (new RegExp(cljs.core.demunge_pattern(),"g")); +var munged_name__$1 = (cljs.core.truth_(goog.string.endsWith(munged_name,"$"))?munged_name.substring((0),(munged_name.length - (1))):munged_name); +var ret = ""; +var last_match_end = (0); +while(true){ +var temp__5276__auto__ = r.exec(munged_name__$1); +if(cljs.core.truth_(temp__5276__auto__)){ +var match = temp__5276__auto__; +var vec__14189 = match; +var x = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14189,(0),null); +var G__14192 = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(ret),cljs.core.str.cljs$core$IFn$_invoke$arity$1(munged_name__$1.substring(last_match_end,(r.lastIndex - x.length))),cljs.core.str.cljs$core$IFn$_invoke$arity$1((((x === "$"))?"/":goog.object.get(cljs.core.DEMUNGE_MAP,x)))].join(''); +var G__14193 = r.lastIndex; +ret = G__14192; +last_match_end = G__14193; +continue; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(ret),cljs.core.str.cljs$core$IFn$_invoke$arity$1(munged_name__$1.substring(last_match_end,munged_name__$1.length))].join(''); +} +break; +} +}); +cljs.core.demunge = (function cljs$core$demunge(name){ +return (((name instanceof cljs.core.Symbol))?cljs.core.symbol:cljs.core.str).call(null,(function (){var name_SINGLEQUOTE_ = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(name)].join(''); +if((name_SINGLEQUOTE_ === "_DOT__DOT_")){ +return ".."; +} else { +return cljs.core.demunge_str([cljs.core.str.cljs$core$IFn$_invoke$arity$1(name)].join('')); +} +})()); +}); +/** + * Bootstrap only. + */ +cljs.core.ns_lookup = (function cljs$core$ns_lookup(ns_obj,k){ +return (function (){ +return goog.object.get(ns_obj,k); +}); +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} +*/ +cljs.core.Namespace = (function (obj,name){ +this.obj = obj; +this.name = name; +this.cljs$lang$protocol_mask$partition0$ = 6291456; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.Namespace.prototype.findInternedVar = (function (sym){ +var self__ = this; +var this$ = this; +var k = cljs.core.munge([cljs.core.str.cljs$core$IFn$_invoke$arity$1(sym)].join('')); +if(goog.object.containsKey(self__.obj,k)){ +var var_sym = cljs.core.symbol.cljs$core$IFn$_invoke$arity$2([cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.name)].join(''),[cljs.core.str.cljs$core$IFn$_invoke$arity$1(sym)].join('')); +var var_meta = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$ns,this$], null); +return (new cljs.core.Var(cljs.core.ns_lookup(self__.obj,k),var_sym,var_meta)); +} else { +return null; +} +}); + +cljs.core.Namespace.prototype.getName = (function (){ +var self__ = this; +var _ = this; +return self__.name; +}); + +cljs.core.Namespace.prototype.toString = (function (){ +var self__ = this; +var _ = this; +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.name)].join(''); +}); + +cljs.core.Namespace.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +if((other instanceof cljs.core.Namespace)){ +return cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.name,other.name); +} else { +return false; +} +}); + +cljs.core.Namespace.prototype.cljs$core$IHash$_hash$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.hash(self__.name); +}); + +cljs.core.Namespace.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$obj,cljs.core.cst$sym$name], null); +}); + +cljs.core.Namespace.cljs$lang$type = true; + +cljs.core.Namespace.cljs$lang$ctorStr = "cljs.core/Namespace"; + +cljs.core.Namespace.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core/Namespace"); +}); + +cljs.core.__GT_Namespace = (function cljs$core$__GT_Namespace(obj,name){ +return (new cljs.core.Namespace(obj,name)); +}); + +/** + * Bootstrap only. + * @type {*} + */ +cljs.core.NS_CACHE = null; +/** + * Bootstrap only. + */ +cljs.core.find_ns_obj_STAR_ = (function cljs$core$find_ns_obj_STAR_(ctxt,xs){ +while(true){ +if((ctxt == null)){ +return null; +} else { +if((xs == null)){ +return ctxt; +} else { +var G__14198 = (function (){var G__14196 = ctxt; +var G__14197 = cljs.core.first(xs); +return goog.object.get(G__14196,G__14197); +})(); +var G__14199 = cljs.core.next(xs); +ctxt = G__14198; +xs = G__14199; +continue; + +} +} +break; +} +}); +/** + * Bootstrap only. + */ +cljs.core.find_ns_obj = (function cljs$core$find_ns_obj(ns){ +var munged_ns = cljs.core.munge([cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns)].join('')); +var segs = munged_ns.split("."); +var G__14203 = cljs.core._STAR_target_STAR_; +switch (G__14203) { +case "nodejs": +if(COMPILED){ +return cljs.core.find_ns_obj_STAR_((function (){try{var ctxt = (function (){var G__14205 = cljs.core.first(segs); +return eval(G__14205); +})(); +if(cljs.core.truth_((function (){var and__7948__auto__ = ctxt; +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.object_QMARK_(ctxt); +} else { +return and__7948__auto__; +} +})())){ +return ctxt; +} else { +return null; +} +}catch (e14204){if((e14204 instanceof ReferenceError)){ +var e = e14204; +return null; +} else { +throw e14204; + +} +}})(),cljs.core.next(segs)); +} else { +return cljs.core.find_ns_obj_STAR_(global,segs); +} + +break; +case "default": +return cljs.core.find_ns_obj_STAR_(goog.global,segs); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("find-ns-obj not supported for target "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core._STAR_target_STAR_)].join(''))); + +} +}); +/** + * Bootstrap only. + */ +cljs.core.ns_interns_STAR_ = (function cljs$core$ns_interns_STAR_(sym){ +var ns_obj = cljs.core.find_ns_obj(sym); +var ns = (new cljs.core.Namespace(ns_obj,sym)); +var step = ((function (ns_obj,ns){ +return (function cljs$core$ns_interns_STAR__$_step(ret,k){ +var var_sym = cljs.core.symbol.cljs$core$IFn$_invoke$arity$1(cljs.core.demunge(k)); +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(ret,var_sym,(new cljs.core.Var(((function (var_sym,ns_obj,ns){ +return (function (){ +return goog.object.get(ns_obj,k); +});})(var_sym,ns_obj,ns)) +,cljs.core.symbol.cljs$core$IFn$_invoke$arity$2([cljs.core.str.cljs$core$IFn$_invoke$arity$1(sym)].join(''),[cljs.core.str.cljs$core$IFn$_invoke$arity$1(var_sym)].join('')),new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$ns,ns], null)))); +});})(ns_obj,ns)) +; +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(step,cljs.core.PersistentArrayMap.EMPTY,cljs.core.js_keys(ns_obj)); +}); +/** + * Bootstrap only. + */ +cljs.core.create_ns = (function cljs$core$create_ns(var_args){ +var args14207 = []; +var len__9181__auto___14210 = arguments.length; +var i__9182__auto___14211 = (0); +while(true){ +if((i__9182__auto___14211 < len__9181__auto___14210)){ +args14207.push((arguments[i__9182__auto___14211])); + +var G__14212 = (i__9182__auto___14211 + (1)); +i__9182__auto___14211 = G__14212; +continue; +} else { +} +break; +} + +var G__14209 = args14207.length; +switch (G__14209) { +case 1: +return cljs.core.create_ns.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14207.length)].join(''))); + +} +}); + +cljs.core.create_ns.cljs$core$IFn$_invoke$arity$1 = (function (sym){ +return cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2(sym,cljs.core.find_ns_obj(sym)); +}); + +cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2 = (function (sym,ns_obj){ +return (new cljs.core.Namespace(ns_obj,sym)); +}); + +cljs.core.create_ns.cljs$lang$maxFixedArity = 2; + +/** + * Bootstrap only. + */ +cljs.core.find_ns = (function cljs$core$find_ns(ns){ +if((cljs.core.NS_CACHE == null)){ +cljs.core.NS_CACHE = (function (){var G__14215 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__14215) : cljs.core.atom.call(null,G__14215)); +})(); +} else { +} + +var the_ns = cljs.core.get.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cljs.core.NS_CACHE) : cljs.core.deref.call(null,cljs.core.NS_CACHE)),ns); +if(!((the_ns == null))){ +return the_ns; +} else { +var ns_obj = cljs.core.find_ns_obj(ns); +if((ns_obj == null)){ +return null; +} else { +var new_ns = cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2(ns,ns_obj); +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(cljs.core.NS_CACHE,cljs.core.assoc,ns,new_ns); + +return new_ns; +} +} +}); +/** + * Bootstrap only. + */ +cljs.core.find_macros_ns = (function cljs$core$find_macros_ns(ns){ +if((cljs.core.NS_CACHE == null)){ +cljs.core.NS_CACHE = (function (){var G__14217 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__14217) : cljs.core.atom.call(null,G__14217)); +})(); +} else { +} + +var the_ns = cljs.core.get.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cljs.core.NS_CACHE) : cljs.core.deref.call(null,cljs.core.NS_CACHE)),ns); +if(!((the_ns == null))){ +return the_ns; +} else { +var ns_str = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns)].join(''); +var ns__$1 = ((!(goog.string.contains(ns_str,"$macros")))?cljs.core.symbol.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1(ns_str),cljs.core.str.cljs$core$IFn$_invoke$arity$1("$macros")].join('')):ns); +var ns_obj = cljs.core.find_ns_obj(ns__$1); +if((ns_obj == null)){ +return null; +} else { +var new_ns = cljs.core.create_ns.cljs$core$IFn$_invoke$arity$2(ns__$1,ns_obj); +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(cljs.core.NS_CACHE,cljs.core.assoc,ns__$1,new_ns); + +return new_ns; +} +} +}); +/** + * Bootstrap only. + */ +cljs.core.ns_name = (function cljs$core$ns_name(ns_obj){ +return ns_obj.name; +}); diff --git a/public/js/rel/cljs/core/async.cljs b/public/js/rel/cljs/core/async.cljs new file mode 100644 index 0000000..9cf8510 --- /dev/null +++ b/public/js/rel/cljs/core/async.cljs @@ -0,0 +1,929 @@ +(ns cljs.core.async + (:refer-clojure :exclude [reduce transduce into merge map take partition partition-by]) + (:require [cljs.core.async.impl.protocols :as impl] + [cljs.core.async.impl.channels :as channels] + [cljs.core.async.impl.buffers :as buffers] + [cljs.core.async.impl.timers :as timers] + [cljs.core.async.impl.dispatch :as dispatch] + [cljs.core.async.impl.ioc-helpers :as helpers]) + (:require-macros [cljs.core.async.impl.ioc-macros :as ioc] + [cljs.core.async.macros :refer [go go-loop]])) + +(defn- fn-handler + ([f] (fn-handler f true)) + ([f blockable] + (reify + impl/Handler + (active? [_] true) + (blockable? [_] blockable) + (commit [_] f)))) + +(defn buffer + "Returns a fixed buffer of size n. When full, puts will block/park." + [n] + (buffers/fixed-buffer n)) + +(defn dropping-buffer + "Returns a buffer of size n. When full, puts will complete but + val will be dropped (no transfer)." + [n] + (buffers/dropping-buffer n)) + +(defn sliding-buffer + "Returns a buffer of size n. When full, puts will complete, and be + buffered, but oldest elements in buffer will be dropped (not + transferred)." + [n] + (buffers/sliding-buffer n)) + +(defn unblocking-buffer? + "Returns true if a channel created with buff will never block. That is to say, + puts into this buffer will never cause the buffer to be full. " + [buff] + (satisfies? impl/UnblockingBuffer buff)) + +(defn chan + "Creates a channel with an optional buffer, an optional transducer (like (map f), + (filter p) etc or a composition thereof), and an optional exception handler. + If buf-or-n is a number, will create and use a fixed buffer of that size. If a + transducer is supplied a buffer must be specified. ex-handler must be a + fn of one argument - if an exception occurs during transformation it will be called + with the thrown value as an argument, and any non-nil return value will be placed + in the channel." + ([] (chan nil)) + ([buf-or-n] (chan buf-or-n nil nil)) + ([buf-or-n xform] (chan buf-or-n xform nil)) + ([buf-or-n xform ex-handler] + (let [buf-or-n (if (= buf-or-n 0) + nil + buf-or-n)] + (when xform (assert buf-or-n "buffer must be supplied when transducer is")) + (channels/chan (if (number? buf-or-n) + (buffer buf-or-n) + buf-or-n) + xform + ex-handler)))) + +(defn promise-chan + "Creates a promise channel with an optional transducer, and an optional + exception-handler. A promise channel can take exactly one value that consumers + will receive. Once full, puts complete but val is dropped (no transfer). + Consumers will block until either a value is placed in the channel or the + channel is closed. See chan for the semantics of xform and ex-handler." + ([] (promise-chan nil)) + ([xform] (promise-chan xform nil)) + ([xform ex-handler] + (chan (buffers/promise-buffer) xform ex-handler))) + +(defn timeout + "Returns a channel that will close after msecs" + [msecs] + (timers/timeout msecs)) + +(defn ! + "puts a val into port. nil values are not allowed. Must be called + inside a (go ...) block. Will park if no buffer space is available. + Returns true unless port is already closed." + [port val] + (throw (js/Error. ">! used not in (go ...) block"))) + +(defn put! + "Asynchronously puts a val into port, calling fn0 (if supplied) when + complete. nil values are not allowed. Will throw if closed. If + on-caller? (default true) is true, and the put is immediately + accepted, will call fn0 on calling thread. Returns nil." + ([port val] + (if-let [ret (impl/put! port val fhnop)] + @ret + true)) + ([port val fn1] (put! port val fn1 true)) + ([port val fn1 on-caller?] + (if-let [retb (impl/put! port val (fn-handler fn1))] + (let [ret @retb] + (if on-caller? + (fn1 ret) + (dispatch/run #(fn1 ret))) + ret) + true))) + +(defn close! + ([port] + (impl/close! port))) + + +(defn- random-array + [n] + (let [a (make-array n)] + (dotimes [x n] + (aset a x 0)) + (loop [i 1] + (if (= i n) + a + (do + (let [j (rand-int i)] + (aset a i (aget a j)) + (aset a j i) + (recur (inc i)))))))) + +(defn- alt-flag [] + (let [flag (atom true)] + (reify + impl/Handler + (active? [_] @flag) + (blockable? [_] true) + (commit [_] + (reset! flag nil) + true)))) + +(defn- alt-handler [flag cb] + (reify + impl/Handler + (active? [_] (impl/active? flag)) + (blockable? [_] true) + (commit [_] + (impl/commit flag) + cb))) + +(defn do-alts + "returns derefable [val port] if immediate, nil if enqueued" + [fret ports opts] + (let [flag (alt-flag) + n (count ports) + idxs (random-array n) + priority (:priority opts) + ret + (loop [i 0] + (when (< i n) + (let [idx (if priority i (aget idxs i)) + port (nth ports idx) + wport (when (vector? port) (port 0)) + vbox (if wport + (let [val (port 1)] + (impl/put! wport val (alt-handler flag #(fret [% wport])))) + (impl/take! port (alt-handler flag #(fret [% port]))))] + (if vbox + (channels/box [@vbox (or wport port)]) + (recur (inc i))))))] + (or + ret + (when (contains? opts :default) + (when-let [got (and (impl/active? flag) (impl/commit flag))] + (channels/box [(:default opts) :default])))))) + +(defn alts! + "Completes at most one of several channel operations. Must be called + inside a (go ...) block. ports is a vector of channel endpoints, + which can be either a channel to take from or a vector of + [channel-to-put-to val-to-put], in any combination. Takes will be + made as if by !. Unless + the :priority option is true, if more than one port operation is + ready a non-deterministic choice will be made. If no operation is + ready and a :default value is supplied, [default-val :default] will + be returned, otherwise alts! will park until the first operation to + become ready completes. Returns [val port] of the completed + operation, where val is the value taken for takes, and a + boolean (true unless already closed, as per put!) for puts. + + opts are passed as :key val ... Supported options: + + :default val - the value to use if none of the operations are immediately ready + :priority true - (default nil) when true, the operations will be tried in order. + + Note: there is no guarantee that the port exps or val exprs will be + used, nor in what order should they be, so they should not be + depended upon for side effects." + + [ports & {:as opts}] + (throw (js/Error. "alts! used not in (go ...) block"))) + +(defn offer! + "Puts a val into port if it's possible to do so immediately. + nil values are not allowed. Never blocks. Returns true if offer succeeds." + [port val] + (let [ret (impl/put! port val (fn-handler nop false))] + (when ret @ret))) + +(defn poll! + "Takes a val from port if it's possible to do so immediately. + Never blocks. Returns value if successful, nil otherwise." + [port] + (let [ret (impl/take! port (fn-handler nop false))] + (when ret @ret))) + +;;;;;;; channel ops + +(defn pipe + "Takes elements from the from channel and supplies them to the to + channel. By default, the to channel will be closed when the from + channel closes, but can be determined by the close? parameter. Will + stop consuming the from channel if the to channel closes" + + ([from to] (pipe from to true)) + ([from to close?] + (go-loop [] + (let [v (! to v) + (recur))))) + to)) + +(defn- pipeline* + ([n to xf from close? ex-handler type] + (assert (pos? n)) + (let [jobs (chan n) + results (chan n) + process (fn [[v p :as job]] + (if (nil? job) + (do (close! results) nil) + (let [res (chan 1 xf ex-handler)] + (go + (>! res v) + (close! res)) + (put! p res) + true))) + async (fn [[v p :as job]] + (if (nil? job) + (do (close! results) nil) + (let [res (chan 1)] + (xf v res) + (put! p res) + true)))] + (dotimes [_ n] + (case type + :compute (go-loop [] + (let [job (! jobs [v p]) + (>! results p) + (recur))))) + (go-loop [] + (let [p (! to v)) + (recur)))) + (recur)))))))) + +(defn pipeline-async + "Takes elements from the from channel and supplies them to the to + channel, subject to the async function af, with parallelism n. af + must be a function of two arguments, the first an input value and + the second a channel on which to place the result(s). af must close! + the channel before returning. The presumption is that af will + return immediately, having launched some asynchronous operation + whose completion/callback will manipulate the result channel. Outputs + will be returned in order relative to the inputs. By default, the to + channel will be closed when the from channel closes, but can be + determined by the close? parameter. Will stop consuming the from + channel if the to channel closes." + ([n to af from] (pipeline-async n to af from true)) + ([n to af from close?] (pipeline* n to af from close? nil :async))) + +(defn pipeline + "Takes elements from the from channel and supplies them to the to + channel, subject to the transducer xf, with parallelism n. Because + it is parallel, the transducer will be applied independently to each + element, not across elements, and may produce zero or more outputs + per input. Outputs will be returned in order relative to the + inputs. By default, the to channel will be closed when the from + channel closes, but can be determined by the close? parameter. Will + stop consuming the from channel if the to channel closes. + + Note this is supplied for API compatibility with the Clojure version. + Values of N > 1 will not result in actual concurrency in a + single-threaded runtime." + ([n to xf from] (pipeline n to xf from true)) + ([n to xf from close?] (pipeline n to xf from close? nil)) + ([n to xf from close? ex-handler] (pipeline* n to xf from close? ex-handler :compute))) + +(defn split + "Takes a predicate and a source channel and returns a vector of two + channels, the first of which will contain the values for which the + predicate returned true, the second those for which it returned + false. + + The out channels will be unbuffered by default, or two buf-or-ns can + be supplied. The channels will close after the source channel has + closed." + ([p ch] (split p ch nil nil)) + ([p ch t-buf-or-n f-buf-or-n] + (let [tc (chan t-buf-or-n) + fc (chan f-buf-or-n)] + (go-loop [] + (let [v (! (if (p v) tc fc) v) + (recur))))) + [tc fc]))) + +(defn reduce + "f should be a function of 2 arguments. Returns a channel containing + the single result of applying f to init and the first item from the + channel, then applying f to that result and the 2nd item, etc. If + the channel closes without yielding items, returns init and f is not + called. ch must close before reduce produces a result." + [f init ch] + (go-loop [ret init] + (let [v (! ch (first vs))) + (recur (next vs)) + (when close? + (close! ch)))))) + + +(defn to-chan + "Creates and returns a channel which contains the contents of coll, + closing when exhausted." + [coll] + (let [ch (chan (bounded-count 100 coll))] + (onto-chan ch coll) + ch)) + + +(defprotocol Mux + (muxch* [_])) + +(defprotocol Mult + (tap* [m ch close?]) + (untap* [m ch]) + (untap-all* [m])) + +(defn mult + "Creates and returns a mult(iple) of the supplied channel. Channels + containing copies of the channel can be created with 'tap', and + detached with 'untap'. + + Each item is distributed to all taps in parallel and synchronously, + i.e. each tap must accept before the next item is distributed. Use + buffering/windowing to prevent slow taps from holding up the mult. + + Items received when there are no taps get dropped. + + If a tap puts to a closed channel, it will be removed from the mult." + [ch] + (let [cs (atom {}) ;;ch->close? + m (reify + Mux + (muxch* [_] ch) + + Mult + (tap* [_ ch close?] (swap! cs assoc ch close?) nil) + (untap* [_ ch] (swap! cs dissoc ch) nil) + (untap-all* [_] (reset! cs {}) nil)) + dchan (chan 1) + dctr (atom nil) + done (fn [_] (when (zero? (swap! dctr dec)) + (put! dchan true)))] + (go-loop [] + (let [val (attrs-map + solo-modes #{:mute :pause} + attrs (conj solo-modes :solo) + solo-mode (atom :mute) + change (chan) + changed #(put! change true) + pick (fn [attr chs] + (reduce-kv + (fn [ret c v] + (if (attr v) + (conj ret c) + ret)) + #{} chs)) + calc-state (fn [] + (let [chs @cs + mode @solo-mode + solos (pick :solo chs) + pauses (pick :pause chs)] + {:solos solos + :mutes (pick :mute chs) + :reads (conj + (if (and (= mode :pause) (not (empty? solos))) + (vec solos) + (vec (remove pauses (keys chs)))) + change)})) + m (reify + Mux + (muxch* [_] out) + Mix + (admix* [_ ch] (swap! cs assoc ch {}) (changed)) + (unmix* [_ ch] (swap! cs dissoc ch) (changed)) + (unmix-all* [_] (reset! cs {}) (changed)) + (toggle* [_ state-map] (swap! cs (partial merge-with cljs.core/merge) state-map) (changed)) + (solo-mode* [_ mode] + (assert (solo-modes mode) (str "mode must be one of: " solo-modes)) + (reset! solo-mode mode) + (changed)))] + (go-loop [{:keys [solos mutes reads] :as state} (calc-state)] + (let [[v c] (alts! reads)] + (if (or (nil? v) (= c change)) + (do (when (nil? v) + (swap! cs dissoc c)) + (recur (calc-state))) + (if (or (solos c) + (and (empty? solos) (not (mutes c)))) + (when (>! out v) + (recur state)) + (recur state))))) + m)) + +(defn admix + "Adds ch as an input to the mix" + [mix ch] + (admix* mix ch)) + +(defn unmix + "Removes ch as an input to the mix" + [mix ch] + (unmix* mix ch)) + +(defn unmix-all + "removes all inputs from the mix" + [mix] + (unmix-all* mix)) + +(defn toggle + "Atomically sets the state(s) of one or more channels in a mix. The + state map is a map of channels -> channel-state-map. A + channel-state-map is a map of attrs -> boolean, where attr is one or + more of :mute, :pause or :solo. Any states supplied are merged with + the current state. + + Note that channels can be added to a mix via toggle, which can be + used to add channels in a particular (e.g. paused) state." + [mix state-map] + (toggle* mix state-map)) + +(defn solo-mode + "Sets the solo mode of the mix. mode must be one of :mute or :pause" + [mix mode] + (solo-mode* mix mode)) + + +(defprotocol Pub + (sub* [p v ch close?]) + (unsub* [p v ch]) + (unsub-all* [p] [p v])) + +(defn pub + "Creates and returns a pub(lication) of the supplied channel, + partitioned into topics by the topic-fn. topic-fn will be applied to + each value on the channel and the result will determine the 'topic' + on which that value will be put. Channels can be subscribed to + receive copies of topics using 'sub', and unsubscribed using + 'unsub'. Each topic will be handled by an internal mult on a + dedicated channel. By default these internal channels are + unbuffered, but a buf-fn can be supplied which, given a topic, + creates a buffer with desired properties. + + Each item is distributed to all subs in parallel and synchronously, + i.e. each sub must accept before the next item is distributed. Use + buffering/windowing to prevent slow subs from holding up the pub. + + Items received when there are no matching subs get dropped. + + Note that if buf-fns are used then each topic is handled + asynchronously, i.e. if a channel is subscribed to more than one + topic it should not expect them to be interleaved identically with + the source." + ([ch topic-fn] (pub ch topic-fn (constantly nil))) + ([ch topic-fn buf-fn] + (let [mults (atom {}) ;;topic->mult + ensure-mult (fn [topic] + (or (get @mults topic) + (get (swap! mults + #(if (% topic) % (assoc % topic (mult (chan (buf-fn topic)))))) + topic))) + p (reify + Mux + (muxch* [_] ch) + + Pub + (sub* [p topic ch close?] + (let [m (ensure-mult topic)] + (tap m ch close?))) + (unsub* [p topic ch] + (when-let [m (get @mults topic)] + (untap m ch))) + (unsub-all* [_] (reset! mults {})) + (unsub-all* [_ topic] (swap! mults dissoc topic)))] + (go-loop [] + (let [val (! (muxch* m) val) + (swap! mults dissoc topic))) + (recur))))) + p))) + +(defn sub + "Subscribes a channel to a topic of a pub. + + By default the channel will be closed when the source closes, + but can be determined by the close? parameter." + ([p topic ch] (sub p topic ch true)) + ([p topic ch close?] (sub* p topic ch close?))) + +(defn unsub + "Unsubscribes a channel from a topic of a pub" + [p topic ch] + (unsub* p topic ch)) + +(defn unsub-all + "Unsubscribes all channels from a pub, or a topic of a pub" + ([p] (unsub-all* p)) + ([p topic] (unsub-all* p topic))) + + +;;;; + +(defn map + "Takes a function and a collection of source channels, and returns a + channel which contains the values produced by applying f to the set + of first items taken from each source channel, followed by applying + f to the set of second items from each channel, until any one of the + channels is closed, at which point the output channel will be + closed. The returned channel will be unbuffered by default, or a + buf-or-n can be supplied" + ([f chs] (map f chs nil)) + ([f chs buf-or-n] + (let [chs (vec chs) + out (chan buf-or-n) + cnt (count chs) + rets (object-array cnt) + dchan (chan 1) + dctr (atom nil) + done (mapv (fn [i] + (fn [ret] + (aset rets i ret) + (when (zero? (swap! dctr dec)) + (put! dchan (.slice rets 0))))) + (range cnt))] + (go-loop [] + (reset! dctr cnt) + (dotimes [i cnt] + (try + (take! (chs i) (done i)) + (catch js/Object e + (swap! dctr dec)))) + (let [rets (! out (apply f rets)) + (recur))))) + out))) + +(defn merge + "Takes a collection of source channels and returns a channel which + contains all values taken from them. The returned channel will be + unbuffered by default, or a buf-or-n can be supplied. The channel + will close after all the source channels have closed." + ([chs] (merge chs nil)) + ([chs buf-or-n] + (let [out (chan buf-or-n)] + (go-loop [cs (vec chs)] + (if (pos? (count cs)) + (let [[v c] (alts! cs)] + (if (nil? v) + (recur (filterv #(not= c %) cs)) + (do (>! out v) + (recur cs)))) + (close! out))) + out))) + +(defn into + "Returns a channel containing the single (collection) result of the + items taken from the channel conjoined to the supplied + collection. ch must close before into produces a result." + [coll ch] + (reduce conj coll ch)) + +(defn take + "Returns a channel that will return, at most, n items from ch. After n items + have been returned, or ch has been closed, the return chanel will close. + + The output channel is unbuffered by default, unless buf-or-n is given." + ([n ch] + (take n ch nil)) + ([n ch buf-or-n] + (let [out (chan buf-or-n)] + (go (loop [x 0] + (when (< x n) + (let [v (! out v) + (recur (inc x)))))) + (close! out)) + out))) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; deprecated - do not use ;;;;;;;;;;;;;;;;;;;;;;;;; + +(defn map< + "Deprecated - this function will be removed. Use transducer instead" + [f ch] + (reify + impl/Channel + (close! [_] (impl/close! ch)) + (closed? [_] (impl/closed? ch)) + + impl/ReadPort + (take! [_ fn1] + (let [ret + (impl/take! ch + (reify + impl/Handler + (active? [_] (impl/active? fn1)) + (blockable? [_] true) + #_(lock-id [_] (impl/lock-id fn1)) + (commit [_] + (let [f1 (impl/commit fn1)] + #(f1 (if (nil? %) nil (f %)))))))] + (if (and ret (not (nil? @ret))) + (channels/box (f @ret)) + ret))) + + impl/WritePort + (put! [_ val fn1] (impl/put! ch val fn1)))) + +(defn map> + "Deprecated - this function will be removed. Use transducer instead" + [f ch] + (reify + impl/Channel + (close! [_] (impl/close! ch)) + + impl/ReadPort + (take! [_ fn1] (impl/take! ch fn1)) + + impl/WritePort + (put! [_ val fn1] + (impl/put! ch (f val) fn1)))) + +(defn filter> + "Deprecated - this function will be removed. Use transducer instead" + [p ch] + (reify + impl/Channel + (close! [_] (impl/close! ch)) + (closed? [_] (impl/closed? ch)) + + impl/ReadPort + (take! [_ fn1] (impl/take! ch fn1)) + + impl/WritePort + (put! [_ val fn1] + (if (p val) + (impl/put! ch val fn1) + (channels/box (not (impl/closed? ch))))))) + +(defn remove> + "Deprecated - this function will be removed. Use transducer instead" + [p ch] + (filter> (complement p) ch)) + +(defn filter< + "Deprecated - this function will be removed. Use transducer instead" + ([p ch] (filter< p ch nil)) + ([p ch buf-or-n] + (let [out (chan buf-or-n)] + (go-loop [] + (let [val (! out val)) + (recur))))) + out))) + +(defn remove< + "Deprecated - this function will be removed. Use transducer instead" + ([p ch] (remove< p ch nil)) + ([p ch buf-or-n] (filter< (complement p) ch buf-or-n))) + +(defn- mapcat* [f in out] + (go-loop [] + (let [val (! out v)) + (when-not (impl/closed? out) + (recur))))))) + +(defn mapcat< + "Deprecated - this function will be removed. Use transducer instead" + ([f in] (mapcat< f in nil)) + ([f in buf-or-n] + (let [out (chan buf-or-n)] + (mapcat* f in out) + out))) + +(defn mapcat> + "Deprecated - this function will be removed. Use transducer instead" + ([f out] (mapcat> f out nil)) + ([f out buf-or-n] + (let [in (chan buf-or-n)] + (mapcat* f in out) + in))) + +(defn unique + "Deprecated - this function will be removed. Use transducer instead" + ([ch] + (unique ch nil)) + ([ch buf-or-n] + (let [out (chan buf-or-n)] + (go (loop [last nil] + (let [v (! out v) + (recur v)))))) + (close! out)) + out))) + +(defn partition + "Deprecated - this function will be removed. Use transducer instead" + ([n ch] + (partition n ch nil)) + ([n ch buf-or-n] + (let [out (chan buf-or-n)] + (go (loop [arr (make-array n) + idx 0] + (let [v (! out (vec arr)) + (recur (make-array n) 0))))) + (do (when (> idx 0) + (>! out (vec arr))) + (close! out)))))) + out))) + + +(defn partition-by + "Deprecated - this function will be removed. Use transducer instead" + ([f ch] + (partition-by f ch nil)) + ([f ch buf-or-n] + (let [out (chan buf-or-n)] + (go (loop [lst (make-array 0) + last ::nothing] + (let [v (! out (vec lst)) + (let [new-lst (make-array 0)] + (.push new-lst v) + (recur new-lst new-itm))))) + (do (when (> (alength lst) 0) + (>! out (vec lst))) + (close! out)))))) + out))) diff --git a/public/js/rel/cljs/core/async.js b/public/js/rel/cljs/core/async.js new file mode 100644 index 0000000..807a1ec --- /dev/null +++ b/public/js/rel/cljs/core/async.js @@ -0,0 +1,9409 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core.async'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('cljs.core.async.impl.protocols'); +goog.require('cljs.core.async.impl.channels'); +goog.require('cljs.core.async.impl.buffers'); +goog.require('cljs.core.async.impl.timers'); +goog.require('cljs.core.async.impl.dispatch'); +goog.require('cljs.core.async.impl.ioc_helpers'); +cljs.core.async.fn_handler = (function cljs$core$async$fn_handler(var_args){ +var args17134 = []; +var len__9181__auto___17140 = arguments.length; +var i__9182__auto___17141 = (0); +while(true){ +if((i__9182__auto___17141 < len__9181__auto___17140)){ +args17134.push((arguments[i__9182__auto___17141])); + +var G__17142 = (i__9182__auto___17141 + (1)); +i__9182__auto___17141 = G__17142; +continue; +} else { +} +break; +} + +var G__17136 = args17134.length; +switch (G__17136) { +case 1: +return cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17134.length)].join(''))); + +} +}); + +cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$1 = (function (f){ +return cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$2(f,true); +}); + +cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$2 = (function (f,blockable){ +if(typeof cljs.core.async.t_cljs$core$async17137 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Handler} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async17137 = (function (f,blockable,meta17138){ +this.f = f; +this.blockable = blockable; +this.meta17138 = meta17138; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async17137.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_17139,meta17138__$1){ +var self__ = this; +var _17139__$1 = this; +return (new cljs.core.async.t_cljs$core$async17137(self__.f,self__.blockable,meta17138__$1)); +}); + +cljs.core.async.t_cljs$core$async17137.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_17139){ +var self__ = this; +var _17139__$1 = this; +return self__.meta17138; +}); + +cljs.core.async.t_cljs$core$async17137.prototype.cljs$core$async$impl$protocols$Handler$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async17137.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return true; +}); + +cljs.core.async.t_cljs$core$async17137.prototype.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.blockable; +}); + +cljs.core.async.t_cljs$core$async17137.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.f; +}); + +cljs.core.async.t_cljs$core$async17137.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.cst$sym$blockable,cljs.core.cst$sym$meta17138], null); +}); + +cljs.core.async.t_cljs$core$async17137.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async17137.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async17137"; + +cljs.core.async.t_cljs$core$async17137.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async17137"); +}); + +cljs.core.async.__GT_t_cljs$core$async17137 = (function cljs$core$async$__GT_t_cljs$core$async17137(f__$1,blockable__$1,meta17138){ +return (new cljs.core.async.t_cljs$core$async17137(f__$1,blockable__$1,meta17138)); +}); + +} + +return (new cljs.core.async.t_cljs$core$async17137(f,blockable,cljs.core.PersistentArrayMap.EMPTY)); +}); + +cljs.core.async.fn_handler.cljs$lang$maxFixedArity = 2; + +/** + * Returns a fixed buffer of size n. When full, puts will block/park. + */ +cljs.core.async.buffer = (function cljs$core$async$buffer(n){ +return cljs.core.async.impl.buffers.fixed_buffer(n); +}); +/** + * Returns a buffer of size n. When full, puts will complete but + * val will be dropped (no transfer). + */ +cljs.core.async.dropping_buffer = (function cljs$core$async$dropping_buffer(n){ +return cljs.core.async.impl.buffers.dropping_buffer(n); +}); +/** + * Returns a buffer of size n. When full, puts will complete, and be + * buffered, but oldest elements in buffer will be dropped (not + * transferred). + */ +cljs.core.async.sliding_buffer = (function cljs$core$async$sliding_buffer(n){ +return cljs.core.async.impl.buffers.sliding_buffer(n); +}); +/** + * Returns true if a channel created with buff will never block. That is to say, + * puts into this buffer will never cause the buffer to be full. + */ +cljs.core.async.unblocking_buffer_QMARK_ = (function cljs$core$async$unblocking_buffer_QMARK_(buff){ +if(!((buff == null))){ +if((false) || ((cljs.core.PROTOCOL_SENTINEL === buff.cljs$core$async$impl$protocols$UnblockingBuffer$))){ +return true; +} else { +if((!buff.cljs$lang$protocol_mask$partition$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.async.impl.protocols.UnblockingBuffer,buff); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.async.impl.protocols.UnblockingBuffer,buff); +} +}); +/** + * Creates a channel with an optional buffer, an optional transducer (like (map f), + * (filter p) etc or a composition thereof), and an optional exception handler. + * If buf-or-n is a number, will create and use a fixed buffer of that size. If a + * transducer is supplied a buffer must be specified. ex-handler must be a + * fn of one argument - if an exception occurs during transformation it will be called + * with the thrown value as an argument, and any non-nil return value will be placed + * in the channel. + */ +cljs.core.async.chan = (function cljs$core$async$chan(var_args){ +var args17146 = []; +var len__9181__auto___17149 = arguments.length; +var i__9182__auto___17150 = (0); +while(true){ +if((i__9182__auto___17150 < len__9181__auto___17149)){ +args17146.push((arguments[i__9182__auto___17150])); + +var G__17151 = (i__9182__auto___17150 + (1)); +i__9182__auto___17150 = G__17151; +continue; +} else { +} +break; +} + +var G__17148 = args17146.length; +switch (G__17148) { +case 0: +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17146.length)].join(''))); + +} +}); + +cljs.core.async.chan.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(null); +}); + +cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1 = (function (buf_or_n){ +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$3(buf_or_n,null,null); +}); + +cljs.core.async.chan.cljs$core$IFn$_invoke$arity$2 = (function (buf_or_n,xform){ +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$3(buf_or_n,xform,null); +}); + +cljs.core.async.chan.cljs$core$IFn$_invoke$arity$3 = (function (buf_or_n,xform,ex_handler){ +var buf_or_n__$1 = ((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(buf_or_n,(0)))?null:buf_or_n); +if(cljs.core.truth_(xform)){ +if(cljs.core.truth_(buf_or_n__$1)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("buffer must be supplied when transducer is"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("buf-or-n")].join(''))); +} +} else { +} + +return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3(((typeof buf_or_n__$1 === 'number')?cljs.core.async.buffer(buf_or_n__$1):buf_or_n__$1),xform,ex_handler); +}); + +cljs.core.async.chan.cljs$lang$maxFixedArity = 3; + +/** + * Creates a promise channel with an optional transducer, and an optional + * exception-handler. A promise channel can take exactly one value that consumers + * will receive. Once full, puts complete but val is dropped (no transfer). + * Consumers will block until either a value is placed in the channel or the + * channel is closed. See chan for the semantics of xform and ex-handler. + */ +cljs.core.async.promise_chan = (function cljs$core$async$promise_chan(var_args){ +var args17153 = []; +var len__9181__auto___17156 = arguments.length; +var i__9182__auto___17157 = (0); +while(true){ +if((i__9182__auto___17157 < len__9181__auto___17156)){ +args17153.push((arguments[i__9182__auto___17157])); + +var G__17158 = (i__9182__auto___17157 + (1)); +i__9182__auto___17157 = G__17158; +continue; +} else { +} +break; +} + +var G__17155 = args17153.length; +switch (G__17155) { +case 0: +return cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17153.length)].join(''))); + +} +}); + +cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$1(null); +}); + +cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$1 = (function (xform){ +return cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$2(xform,null); +}); + +cljs.core.async.promise_chan.cljs$core$IFn$_invoke$arity$2 = (function (xform,ex_handler){ +return cljs.core.async.chan.cljs$core$IFn$_invoke$arity$3(cljs.core.async.impl.buffers.promise_buffer(),xform,ex_handler); +}); + +cljs.core.async.promise_chan.cljs$lang$maxFixedArity = 2; + +/** + * Returns a channel that will close after msecs + */ +cljs.core.async.timeout = (function cljs$core$async$timeout(msecs){ +return cljs.core.async.impl.timers.timeout(msecs); +}); +/** + * takes a val from port. Must be called inside a (go ...) block. Will + * return nil if closed. Will park if nothing is available. + * Returns true unless port is already closed + */ +cljs.core.async._LT__BANG_ = (function cljs$core$async$_LT__BANG_(port){ +throw (new Error("! used not in (go ...) block")); +}); +/** + * Asynchronously puts a val into port, calling fn0 (if supplied) when + * complete. nil values are not allowed. Will throw if closed. If + * on-caller? (default true) is true, and the put is immediately + * accepted, will call fn0 on calling thread. Returns nil. + */ +cljs.core.async.put_BANG_ = (function cljs$core$async$put_BANG_(var_args){ +var args17168 = []; +var len__9181__auto___17171 = arguments.length; +var i__9182__auto___17172 = (0); +while(true){ +if((i__9182__auto___17172 < len__9181__auto___17171)){ +args17168.push((arguments[i__9182__auto___17172])); + +var G__17173 = (i__9182__auto___17172 + (1)); +i__9182__auto___17172 = G__17173; +continue; +} else { +} +break; +} + +var G__17170 = args17168.length; +switch (G__17170) { +case 2: +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17168.length)].join(''))); + +} +}); + +cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (port,val){ +var temp__5276__auto__ = cljs.core.async.impl.protocols.put_BANG_(port,val,cljs.core.async.fhnop); +if(cljs.core.truth_(temp__5276__auto__)){ +var ret = temp__5276__auto__; +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(ret) : cljs.core.deref.call(null,ret)); +} else { +return true; +} +}); + +cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$3 = (function (port,val,fn1){ +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$4(port,val,fn1,true); +}); + +cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$4 = (function (port,val,fn1,on_caller_QMARK_){ +var temp__5276__auto__ = cljs.core.async.impl.protocols.put_BANG_(port,val,cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$1(fn1)); +if(cljs.core.truth_(temp__5276__auto__)){ +var retb = temp__5276__auto__; +var ret = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(retb) : cljs.core.deref.call(null,retb)); +if(cljs.core.truth_(on_caller_QMARK_)){ +(fn1.cljs$core$IFn$_invoke$arity$1 ? fn1.cljs$core$IFn$_invoke$arity$1(ret) : fn1.call(null,ret)); +} else { +cljs.core.async.impl.dispatch.run(((function (ret,retb,temp__5276__auto__){ +return (function (){ +return (fn1.cljs$core$IFn$_invoke$arity$1 ? fn1.cljs$core$IFn$_invoke$arity$1(ret) : fn1.call(null,ret)); +});})(ret,retb,temp__5276__auto__)) +); +} + +return ret; +} else { +return true; +} +}); + +cljs.core.async.put_BANG_.cljs$lang$maxFixedArity = 4; + +cljs.core.async.close_BANG_ = (function cljs$core$async$close_BANG_(port){ +return cljs.core.async.impl.protocols.close_BANG_(port); +}); +cljs.core.async.random_array = (function cljs$core$async$random_array(n){ +var a = (new Array(n)); +var n__8981__auto___17175 = n; +var x_17176 = (0); +while(true){ +if((x_17176 < n__8981__auto___17175)){ +(a[x_17176] = (0)); + +var G__17177 = (x_17176 + (1)); +x_17176 = G__17177; +continue; +} else { +} +break; +} + +var i = (1); +while(true){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(i,n)){ +return a; +} else { +var j = cljs.core.rand_int(i); +(a[i] = (a[j])); + +(a[j] = i); + +var G__17178 = (i + (1)); +i = G__17178; +continue; +} +break; +} +}); +cljs.core.async.alt_flag = (function cljs$core$async$alt_flag(){ +var flag = (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(true) : cljs.core.atom.call(null,true)); +if(typeof cljs.core.async.t_cljs$core$async17182 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Handler} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async17182 = (function (flag,meta17183){ +this.flag = flag; +this.meta17183 = meta17183; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async17182.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = ((function (flag){ +return (function (_17184,meta17183__$1){ +var self__ = this; +var _17184__$1 = this; +return (new cljs.core.async.t_cljs$core$async17182(self__.flag,meta17183__$1)); +});})(flag)) +; + +cljs.core.async.t_cljs$core$async17182.prototype.cljs$core$IMeta$_meta$arity$1 = ((function (flag){ +return (function (_17184){ +var self__ = this; +var _17184__$1 = this; +return self__.meta17183; +});})(flag)) +; + +cljs.core.async.t_cljs$core$async17182.prototype.cljs$core$async$impl$protocols$Handler$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async17182.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = ((function (flag){ +return (function (_){ +var self__ = this; +var ___$1 = this; +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.flag) : cljs.core.deref.call(null,self__.flag)); +});})(flag)) +; + +cljs.core.async.t_cljs$core$async17182.prototype.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 = ((function (flag){ +return (function (_){ +var self__ = this; +var ___$1 = this; +return true; +});})(flag)) +; + +cljs.core.async.t_cljs$core$async17182.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = ((function (flag){ +return (function (_){ +var self__ = this; +var ___$1 = this; +(cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(self__.flag,null) : cljs.core.reset_BANG_.call(null,self__.flag,null)); + +return true; +});})(flag)) +; + +cljs.core.async.t_cljs$core$async17182.getBasis = ((function (flag){ +return (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$flag,cljs.core.cst$sym$meta17183], null); +});})(flag)) +; + +cljs.core.async.t_cljs$core$async17182.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async17182.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async17182"; + +cljs.core.async.t_cljs$core$async17182.cljs$lang$ctorPrWriter = ((function (flag){ +return (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async17182"); +});})(flag)) +; + +cljs.core.async.__GT_t_cljs$core$async17182 = ((function (flag){ +return (function cljs$core$async$alt_flag_$___GT_t_cljs$core$async17182(flag__$1,meta17183){ +return (new cljs.core.async.t_cljs$core$async17182(flag__$1,meta17183)); +});})(flag)) +; + +} + +return (new cljs.core.async.t_cljs$core$async17182(flag,cljs.core.PersistentArrayMap.EMPTY)); +}); +cljs.core.async.alt_handler = (function cljs$core$async$alt_handler(flag,cb){ +if(typeof cljs.core.async.t_cljs$core$async17188 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Handler} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async17188 = (function (flag,cb,meta17189){ +this.flag = flag; +this.cb = cb; +this.meta17189 = meta17189; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async17188.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_17190,meta17189__$1){ +var self__ = this; +var _17190__$1 = this; +return (new cljs.core.async.t_cljs$core$async17188(self__.flag,self__.cb,meta17189__$1)); +}); + +cljs.core.async.t_cljs$core$async17188.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_17190){ +var self__ = this; +var _17190__$1 = this; +return self__.meta17189; +}); + +cljs.core.async.t_cljs$core$async17188.prototype.cljs$core$async$impl$protocols$Handler$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async17188.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.active_QMARK_(self__.flag); +}); + +cljs.core.async.t_cljs$core$async17188.prototype.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return true; +}); + +cljs.core.async.t_cljs$core$async17188.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +cljs.core.async.impl.protocols.commit(self__.flag); + +return self__.cb; +}); + +cljs.core.async.t_cljs$core$async17188.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$flag,cljs.core.cst$sym$cb,cljs.core.cst$sym$meta17189], null); +}); + +cljs.core.async.t_cljs$core$async17188.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async17188.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async17188"; + +cljs.core.async.t_cljs$core$async17188.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async17188"); +}); + +cljs.core.async.__GT_t_cljs$core$async17188 = (function cljs$core$async$alt_handler_$___GT_t_cljs$core$async17188(flag__$1,cb__$1,meta17189){ +return (new cljs.core.async.t_cljs$core$async17188(flag__$1,cb__$1,meta17189)); +}); + +} + +return (new cljs.core.async.t_cljs$core$async17188(flag,cb,cljs.core.PersistentArrayMap.EMPTY)); +}); +/** + * returns derefable [val port] if immediate, nil if enqueued + */ +cljs.core.async.do_alts = (function cljs$core$async$do_alts(fret,ports,opts){ +var flag = cljs.core.async.alt_flag(); +var n = cljs.core.count(ports); +var idxs = cljs.core.async.random_array(n); +var priority = cljs.core.cst$kw$priority.cljs$core$IFn$_invoke$arity$1(opts); +var ret = (function (){var i = (0); +while(true){ +if((i < n)){ +var idx = (cljs.core.truth_(priority)?i:(idxs[i])); +var port = cljs.core.nth.cljs$core$IFn$_invoke$arity$2(ports,idx); +var wport = ((cljs.core.vector_QMARK_(port))?(port.cljs$core$IFn$_invoke$arity$1 ? port.cljs$core$IFn$_invoke$arity$1((0)) : port.call(null,(0))):null); +var vbox = (cljs.core.truth_(wport)?(function (){var val = (port.cljs$core$IFn$_invoke$arity$1 ? port.cljs$core$IFn$_invoke$arity$1((1)) : port.call(null,(1))); +return cljs.core.async.impl.protocols.put_BANG_(wport,val,cljs.core.async.alt_handler(flag,((function (i,val,idx,port,wport,flag,n,idxs,priority){ +return (function (p1__17191_SHARP_){ +var G__17195 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__17191_SHARP_,wport], null); +return (fret.cljs$core$IFn$_invoke$arity$1 ? fret.cljs$core$IFn$_invoke$arity$1(G__17195) : fret.call(null,G__17195)); +});})(i,val,idx,port,wport,flag,n,idxs,priority)) +)); +})():cljs.core.async.impl.protocols.take_BANG_(port,cljs.core.async.alt_handler(flag,((function (i,idx,port,wport,flag,n,idxs,priority){ +return (function (p1__17192_SHARP_){ +var G__17196 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [p1__17192_SHARP_,port], null); +return (fret.cljs$core$IFn$_invoke$arity$1 ? fret.cljs$core$IFn$_invoke$arity$1(G__17196) : fret.call(null,G__17196)); +});})(i,idx,port,wport,flag,n,idxs,priority)) +))); +if(cljs.core.truth_(vbox)){ +return cljs.core.async.impl.channels.box(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(vbox) : cljs.core.deref.call(null,vbox)),(function (){var or__7960__auto__ = wport; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return port; +} +})()], null)); +} else { +var G__17197 = (i + (1)); +i = G__17197; +continue; +} +} else { +return null; +} +break; +} +})(); +var or__7960__auto__ = ret; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +if(cljs.core.contains_QMARK_(opts,cljs.core.cst$kw$default)){ +var temp__5278__auto__ = (function (){var and__7948__auto__ = cljs.core.async.impl.protocols.active_QMARK_(flag); +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.async.impl.protocols.commit(flag); +} else { +return and__7948__auto__; +} +})(); +if(cljs.core.truth_(temp__5278__auto__)){ +var got = temp__5278__auto__; +return cljs.core.async.impl.channels.box(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$default.cljs$core$IFn$_invoke$arity$1(opts),cljs.core.cst$kw$default], null)); +} else { +return null; +} +} else { +return null; +} +} +}); +/** + * Completes at most one of several channel operations. Must be called + * inside a (go ...) block. ports is a vector of channel endpoints, + * which can be either a channel to take from or a vector of + * [channel-to-put-to val-to-put], in any combination. Takes will be + * made as if by !. Unless + * the :priority option is true, if more than one port operation is + * ready a non-deterministic choice will be made. If no operation is + * ready and a :default value is supplied, [default-val :default] will + * be returned, otherwise alts! will park until the first operation to + * become ready completes. Returns [val port] of the completed + * operation, where val is the value taken for takes, and a + * boolean (true unless already closed, as per put!) for puts. + * + * opts are passed as :key val ... Supported options: + * + * :default val - the value to use if none of the operations are immediately ready + * :priority true - (default nil) when true, the operations will be tried in order. + * + * Note: there is no guarantee that the port exps or val exprs will be + * used, nor in what order should they be, so they should not be + * depended upon for side effects. + */ +cljs.core.async.alts_BANG_ = (function cljs$core$async$alts_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___17203 = arguments.length; +var i__9182__auto___17204 = (0); +while(true){ +if((i__9182__auto___17204 < len__9181__auto___17203)){ +args__9188__auto__.push((arguments[i__9182__auto___17204])); + +var G__17205 = (i__9182__auto___17204 + (1)); +i__9182__auto___17204 = G__17205; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return cljs.core.async.alts_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +cljs.core.async.alts_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (ports,p__17200){ +var map__17201 = p__17200; +var map__17201__$1 = ((((!((map__17201 == null)))?((((map__17201.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__17201.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__17201):map__17201); +var opts = map__17201__$1; +throw (new Error("alts! used not in (go ...) block")); +}); + +cljs.core.async.alts_BANG_.cljs$lang$maxFixedArity = (1); + +cljs.core.async.alts_BANG_.cljs$lang$applyTo = (function (seq17198){ +var G__17199 = cljs.core.first(seq17198); +var seq17198__$1 = cljs.core.next(seq17198); +return cljs.core.async.alts_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__17199,seq17198__$1); +}); + +/** + * Puts a val into port if it's possible to do so immediately. + * nil values are not allowed. Never blocks. Returns true if offer succeeds. + */ +cljs.core.async.offer_BANG_ = (function cljs$core$async$offer_BANG_(port,val){ +var ret = cljs.core.async.impl.protocols.put_BANG_(port,val,cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$2(cljs.core.async.nop,false)); +if(cljs.core.truth_(ret)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(ret) : cljs.core.deref.call(null,ret)); +} else { +return null; +} +}); +/** + * Takes a val from port if it's possible to do so immediately. + * Never blocks. Returns value if successful, nil otherwise. + */ +cljs.core.async.poll_BANG_ = (function cljs$core$async$poll_BANG_(port){ +var ret = cljs.core.async.impl.protocols.take_BANG_(port,cljs.core.async.fn_handler.cljs$core$IFn$_invoke$arity$2(cljs.core.async.nop,false)); +if(cljs.core.truth_(ret)){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(ret) : cljs.core.deref.call(null,ret)); +} else { +return null; +} +}); +/** + * Takes elements from the from channel and supplies them to the to + * channel. By default, the to channel will be closed when the from + * channel closes, but can be determined by the close? parameter. Will + * stop consuming the from channel if the to channel closes + */ +cljs.core.async.pipe = (function cljs$core$async$pipe(var_args){ +var args17206 = []; +var len__9181__auto___17256 = arguments.length; +var i__9182__auto___17257 = (0); +while(true){ +if((i__9182__auto___17257 < len__9181__auto___17256)){ +args17206.push((arguments[i__9182__auto___17257])); + +var G__17258 = (i__9182__auto___17257 + (1)); +i__9182__auto___17257 = G__17258; +continue; +} else { +} +break; +} + +var G__17208 = args17206.length; +switch (G__17208) { +case 2: +return cljs.core.async.pipe.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.pipe.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17206.length)].join(''))); + +} +}); + +cljs.core.async.pipe.cljs$core$IFn$_invoke$arity$2 = (function (from,to){ +return cljs.core.async.pipe.cljs$core$IFn$_invoke$arity$3(from,to,true); +}); + +cljs.core.async.pipe.cljs$core$IFn$_invoke$arity$3 = (function (from,to,close_QMARK_){ +var c__17075__auto___17260 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___17260){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___17260){ +return (function (state_17232){ +var state_val_17233 = (state_17232[(1)]); +if((state_val_17233 === (7))){ +var inst_17228 = (state_17232[(2)]); +var state_17232__$1 = state_17232; +var statearr_17234_17261 = state_17232__$1; +(statearr_17234_17261[(2)] = inst_17228); + +(statearr_17234_17261[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (1))){ +var state_17232__$1 = state_17232; +var statearr_17235_17262 = state_17232__$1; +(statearr_17235_17262[(2)] = null); + +(statearr_17235_17262[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (4))){ +var inst_17211 = (state_17232[(7)]); +var inst_17211__$1 = (state_17232[(2)]); +var inst_17212 = (inst_17211__$1 == null); +var state_17232__$1 = (function (){var statearr_17236 = state_17232; +(statearr_17236[(7)] = inst_17211__$1); + +return statearr_17236; +})(); +if(cljs.core.truth_(inst_17212)){ +var statearr_17237_17263 = state_17232__$1; +(statearr_17237_17263[(1)] = (5)); + +} else { +var statearr_17238_17264 = state_17232__$1; +(statearr_17238_17264[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (13))){ +var state_17232__$1 = state_17232; +var statearr_17239_17265 = state_17232__$1; +(statearr_17239_17265[(2)] = null); + +(statearr_17239_17265[(1)] = (14)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (6))){ +var inst_17211 = (state_17232[(7)]); +var state_17232__$1 = state_17232; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_17232__$1,(11),to,inst_17211); +} else { +if((state_val_17233 === (3))){ +var inst_17230 = (state_17232[(2)]); +var state_17232__$1 = state_17232; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17232__$1,inst_17230); +} else { +if((state_val_17233 === (12))){ +var state_17232__$1 = state_17232; +var statearr_17240_17266 = state_17232__$1; +(statearr_17240_17266[(2)] = null); + +(statearr_17240_17266[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (2))){ +var state_17232__$1 = state_17232; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17232__$1,(4),from); +} else { +if((state_val_17233 === (11))){ +var inst_17221 = (state_17232[(2)]); +var state_17232__$1 = state_17232; +if(cljs.core.truth_(inst_17221)){ +var statearr_17241_17267 = state_17232__$1; +(statearr_17241_17267[(1)] = (12)); + +} else { +var statearr_17242_17268 = state_17232__$1; +(statearr_17242_17268[(1)] = (13)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (9))){ +var state_17232__$1 = state_17232; +var statearr_17243_17269 = state_17232__$1; +(statearr_17243_17269[(2)] = null); + +(statearr_17243_17269[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (5))){ +var state_17232__$1 = state_17232; +if(cljs.core.truth_(close_QMARK_)){ +var statearr_17244_17270 = state_17232__$1; +(statearr_17244_17270[(1)] = (8)); + +} else { +var statearr_17245_17271 = state_17232__$1; +(statearr_17245_17271[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (14))){ +var inst_17226 = (state_17232[(2)]); +var state_17232__$1 = state_17232; +var statearr_17246_17272 = state_17232__$1; +(statearr_17246_17272[(2)] = inst_17226); + +(statearr_17246_17272[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (10))){ +var inst_17218 = (state_17232[(2)]); +var state_17232__$1 = state_17232; +var statearr_17247_17273 = state_17232__$1; +(statearr_17247_17273[(2)] = inst_17218); + +(statearr_17247_17273[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17233 === (8))){ +var inst_17215 = cljs.core.async.close_BANG_(to); +var state_17232__$1 = state_17232; +var statearr_17248_17274 = state_17232__$1; +(statearr_17248_17274[(2)] = inst_17215); + +(statearr_17248_17274[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___17260)) +; +return ((function (switch__16949__auto__,c__17075__auto___17260){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_17252 = [null,null,null,null,null,null,null,null]; +(statearr_17252[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_17252[(1)] = (1)); + +return statearr_17252; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_17232){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17232); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17253){if((e17253 instanceof Object)){ +var ex__16953__auto__ = e17253; +var statearr_17254_17275 = state_17232; +(statearr_17254_17275[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17232); + +return cljs.core.cst$kw$recur; +} else { +throw e17253; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17276 = state_17232; +state_17232 = G__17276; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_17232){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_17232); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___17260)) +})(); +var state__17077__auto__ = (function (){var statearr_17255 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17255[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___17260); + +return statearr_17255; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___17260)) +); + + +return to; +}); + +cljs.core.async.pipe.cljs$lang$maxFixedArity = 3; + +cljs.core.async.pipeline_STAR_ = (function cljs$core$async$pipeline_STAR_(n,to,xf,from,close_QMARK_,ex_handler,type){ +if((n > (0))){ +} else { +throw (new Error("Assert failed: (pos? n)")); +} + +var jobs = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(n); +var results = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(n); +var process = ((function (jobs,results){ +return (function (p__17464){ +var vec__17465 = p__17464; +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__17465,(0),null); +var p = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__17465,(1),null); +var job = vec__17465; +if((job == null)){ +cljs.core.async.close_BANG_(results); + +return null; +} else { +var res = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$3((1),xf,ex_handler); +var c__17075__auto___17651 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___17651,res,vec__17465,v,p,job,jobs,results){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___17651,res,vec__17465,v,p,job,jobs,results){ +return (function (state_17472){ +var state_val_17473 = (state_17472[(1)]); +if((state_val_17473 === (1))){ +var state_17472__$1 = state_17472; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_17472__$1,(2),res,v); +} else { +if((state_val_17473 === (2))){ +var inst_17469 = (state_17472[(2)]); +var inst_17470 = cljs.core.async.close_BANG_(res); +var state_17472__$1 = (function (){var statearr_17474 = state_17472; +(statearr_17474[(7)] = inst_17469); + +return statearr_17474; +})(); +return cljs.core.async.impl.ioc_helpers.return_chan(state_17472__$1,inst_17470); +} else { +return null; +} +} +});})(c__17075__auto___17651,res,vec__17465,v,p,job,jobs,results)) +; +return ((function (switch__16949__auto__,c__17075__auto___17651,res,vec__17465,v,p,job,jobs,results){ +return (function() { +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = null; +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0 = (function (){ +var statearr_17478 = [null,null,null,null,null,null,null,null]; +(statearr_17478[(0)] = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__); + +(statearr_17478[(1)] = (1)); + +return statearr_17478; +}); +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1 = (function (state_17472){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17472); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17479){if((e17479 instanceof Object)){ +var ex__16953__auto__ = e17479; +var statearr_17480_17652 = state_17472; +(statearr_17480_17652[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17472); + +return cljs.core.cst$kw$recur; +} else { +throw e17479; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17653 = state_17472; +state_17472 = G__17653; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = function(state_17472){ +switch(arguments.length){ +case 0: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1.call(this,state_17472); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1; +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___17651,res,vec__17465,v,p,job,jobs,results)) +})(); +var state__17077__auto__ = (function (){var statearr_17481 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17481[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___17651); + +return statearr_17481; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___17651,res,vec__17465,v,p,job,jobs,results)) +); + + +cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2(p,res); + +return true; +} +});})(jobs,results)) +; +var async = ((function (jobs,results,process){ +return (function (p__17482){ +var vec__17483 = p__17482; +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__17483,(0),null); +var p = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__17483,(1),null); +var job = vec__17483; +if((job == null)){ +cljs.core.async.close_BANG_(results); + +return null; +} else { +var res = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +(xf.cljs$core$IFn$_invoke$arity$2 ? xf.cljs$core$IFn$_invoke$arity$2(v,res) : xf.call(null,v,res)); + +cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2(p,res); + +return true; +} +});})(jobs,results,process)) +; +var n__8981__auto___17654 = n; +var __17655 = (0); +while(true){ +if((__17655 < n__8981__auto___17654)){ +var G__17486_17656 = type; +var G__17486_17657__$1 = (((G__17486_17656 instanceof cljs.core.Keyword))?G__17486_17656.fqn:null); +switch (G__17486_17657__$1) { +case "compute": +var c__17075__auto___17659 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (__17655,c__17075__auto___17659,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (__17655,c__17075__auto___17659,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async){ +return (function (state_17499){ +var state_val_17500 = (state_17499[(1)]); +if((state_val_17500 === (1))){ +var state_17499__$1 = state_17499; +var statearr_17501_17660 = state_17499__$1; +(statearr_17501_17660[(2)] = null); + +(statearr_17501_17660[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17500 === (2))){ +var state_17499__$1 = state_17499; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17499__$1,(4),jobs); +} else { +if((state_val_17500 === (3))){ +var inst_17497 = (state_17499[(2)]); +var state_17499__$1 = state_17499; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17499__$1,inst_17497); +} else { +if((state_val_17500 === (4))){ +var inst_17489 = (state_17499[(2)]); +var inst_17490 = process(inst_17489); +var state_17499__$1 = state_17499; +if(cljs.core.truth_(inst_17490)){ +var statearr_17502_17661 = state_17499__$1; +(statearr_17502_17661[(1)] = (5)); + +} else { +var statearr_17503_17662 = state_17499__$1; +(statearr_17503_17662[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17500 === (5))){ +var state_17499__$1 = state_17499; +var statearr_17504_17663 = state_17499__$1; +(statearr_17504_17663[(2)] = null); + +(statearr_17504_17663[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17500 === (6))){ +var state_17499__$1 = state_17499; +var statearr_17505_17664 = state_17499__$1; +(statearr_17505_17664[(2)] = null); + +(statearr_17505_17664[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17500 === (7))){ +var inst_17495 = (state_17499[(2)]); +var state_17499__$1 = state_17499; +var statearr_17506_17665 = state_17499__$1; +(statearr_17506_17665[(2)] = inst_17495); + +(statearr_17506_17665[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +});})(__17655,c__17075__auto___17659,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async)) +; +return ((function (__17655,switch__16949__auto__,c__17075__auto___17659,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async){ +return (function() { +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = null; +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0 = (function (){ +var statearr_17510 = [null,null,null,null,null,null,null]; +(statearr_17510[(0)] = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__); + +(statearr_17510[(1)] = (1)); + +return statearr_17510; +}); +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1 = (function (state_17499){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17499); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17511){if((e17511 instanceof Object)){ +var ex__16953__auto__ = e17511; +var statearr_17512_17666 = state_17499; +(statearr_17512_17666[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17499); + +return cljs.core.cst$kw$recur; +} else { +throw e17511; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17667 = state_17499; +state_17499 = G__17667; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = function(state_17499){ +switch(arguments.length){ +case 0: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1.call(this,state_17499); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1; +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__; +})() +;})(__17655,switch__16949__auto__,c__17075__auto___17659,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async)) +})(); +var state__17077__auto__ = (function (){var statearr_17513 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17513[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___17659); + +return statearr_17513; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(__17655,c__17075__auto___17659,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async)) +); + + +break; +case "async": +var c__17075__auto___17668 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (__17655,c__17075__auto___17668,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (__17655,c__17075__auto___17668,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async){ +return (function (state_17526){ +var state_val_17527 = (state_17526[(1)]); +if((state_val_17527 === (1))){ +var state_17526__$1 = state_17526; +var statearr_17528_17669 = state_17526__$1; +(statearr_17528_17669[(2)] = null); + +(statearr_17528_17669[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17527 === (2))){ +var state_17526__$1 = state_17526; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17526__$1,(4),jobs); +} else { +if((state_val_17527 === (3))){ +var inst_17524 = (state_17526[(2)]); +var state_17526__$1 = state_17526; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17526__$1,inst_17524); +} else { +if((state_val_17527 === (4))){ +var inst_17516 = (state_17526[(2)]); +var inst_17517 = async(inst_17516); +var state_17526__$1 = state_17526; +if(cljs.core.truth_(inst_17517)){ +var statearr_17529_17670 = state_17526__$1; +(statearr_17529_17670[(1)] = (5)); + +} else { +var statearr_17530_17671 = state_17526__$1; +(statearr_17530_17671[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17527 === (5))){ +var state_17526__$1 = state_17526; +var statearr_17531_17672 = state_17526__$1; +(statearr_17531_17672[(2)] = null); + +(statearr_17531_17672[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17527 === (6))){ +var state_17526__$1 = state_17526; +var statearr_17532_17673 = state_17526__$1; +(statearr_17532_17673[(2)] = null); + +(statearr_17532_17673[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17527 === (7))){ +var inst_17522 = (state_17526[(2)]); +var state_17526__$1 = state_17526; +var statearr_17533_17674 = state_17526__$1; +(statearr_17533_17674[(2)] = inst_17522); + +(statearr_17533_17674[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +});})(__17655,c__17075__auto___17668,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async)) +; +return ((function (__17655,switch__16949__auto__,c__17075__auto___17668,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async){ +return (function() { +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = null; +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0 = (function (){ +var statearr_17537 = [null,null,null,null,null,null,null]; +(statearr_17537[(0)] = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__); + +(statearr_17537[(1)] = (1)); + +return statearr_17537; +}); +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1 = (function (state_17526){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17526); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17538){if((e17538 instanceof Object)){ +var ex__16953__auto__ = e17538; +var statearr_17539_17675 = state_17526; +(statearr_17539_17675[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17526); + +return cljs.core.cst$kw$recur; +} else { +throw e17538; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17676 = state_17526; +state_17526 = G__17676; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = function(state_17526){ +switch(arguments.length){ +case 0: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1.call(this,state_17526); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1; +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__; +})() +;})(__17655,switch__16949__auto__,c__17075__auto___17668,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async)) +})(); +var state__17077__auto__ = (function (){var statearr_17540 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17540[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___17668); + +return statearr_17540; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(__17655,c__17075__auto___17668,G__17486_17656,G__17486_17657__$1,n__8981__auto___17654,jobs,results,process,async)) +); + + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No matching clause: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__17486_17657__$1)].join(''))); + +} + +var G__17677 = (__17655 + (1)); +__17655 = G__17677; +continue; +} else { +} +break; +} + +var c__17075__auto___17678 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___17678,jobs,results,process,async){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___17678,jobs,results,process,async){ +return (function (state_17562){ +var state_val_17563 = (state_17562[(1)]); +if((state_val_17563 === (1))){ +var state_17562__$1 = state_17562; +var statearr_17564_17679 = state_17562__$1; +(statearr_17564_17679[(2)] = null); + +(statearr_17564_17679[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17563 === (2))){ +var state_17562__$1 = state_17562; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17562__$1,(4),from); +} else { +if((state_val_17563 === (3))){ +var inst_17560 = (state_17562[(2)]); +var state_17562__$1 = state_17562; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17562__$1,inst_17560); +} else { +if((state_val_17563 === (4))){ +var inst_17543 = (state_17562[(7)]); +var inst_17543__$1 = (state_17562[(2)]); +var inst_17544 = (inst_17543__$1 == null); +var state_17562__$1 = (function (){var statearr_17565 = state_17562; +(statearr_17565[(7)] = inst_17543__$1); + +return statearr_17565; +})(); +if(cljs.core.truth_(inst_17544)){ +var statearr_17566_17680 = state_17562__$1; +(statearr_17566_17680[(1)] = (5)); + +} else { +var statearr_17567_17681 = state_17562__$1; +(statearr_17567_17681[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17563 === (5))){ +var inst_17546 = cljs.core.async.close_BANG_(jobs); +var state_17562__$1 = state_17562; +var statearr_17568_17682 = state_17562__$1; +(statearr_17568_17682[(2)] = inst_17546); + +(statearr_17568_17682[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17563 === (6))){ +var inst_17543 = (state_17562[(7)]); +var inst_17548 = (state_17562[(8)]); +var inst_17548__$1 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +var inst_17549 = cljs.core.PersistentVector.EMPTY_NODE; +var inst_17550 = [inst_17543,inst_17548__$1]; +var inst_17551 = (new cljs.core.PersistentVector(null,2,(5),inst_17549,inst_17550,null)); +var state_17562__$1 = (function (){var statearr_17569 = state_17562; +(statearr_17569[(8)] = inst_17548__$1); + +return statearr_17569; +})(); +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_17562__$1,(8),jobs,inst_17551); +} else { +if((state_val_17563 === (7))){ +var inst_17558 = (state_17562[(2)]); +var state_17562__$1 = state_17562; +var statearr_17570_17683 = state_17562__$1; +(statearr_17570_17683[(2)] = inst_17558); + +(statearr_17570_17683[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17563 === (8))){ +var inst_17548 = (state_17562[(8)]); +var inst_17553 = (state_17562[(2)]); +var state_17562__$1 = (function (){var statearr_17571 = state_17562; +(statearr_17571[(9)] = inst_17553); + +return statearr_17571; +})(); +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_17562__$1,(9),results,inst_17548); +} else { +if((state_val_17563 === (9))){ +var inst_17555 = (state_17562[(2)]); +var state_17562__$1 = (function (){var statearr_17572 = state_17562; +(statearr_17572[(10)] = inst_17555); + +return statearr_17572; +})(); +var statearr_17573_17684 = state_17562__$1; +(statearr_17573_17684[(2)] = null); + +(statearr_17573_17684[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___17678,jobs,results,process,async)) +; +return ((function (switch__16949__auto__,c__17075__auto___17678,jobs,results,process,async){ +return (function() { +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = null; +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0 = (function (){ +var statearr_17577 = [null,null,null,null,null,null,null,null,null,null,null]; +(statearr_17577[(0)] = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__); + +(statearr_17577[(1)] = (1)); + +return statearr_17577; +}); +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1 = (function (state_17562){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17562); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17578){if((e17578 instanceof Object)){ +var ex__16953__auto__ = e17578; +var statearr_17579_17685 = state_17562; +(statearr_17579_17685[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17562); + +return cljs.core.cst$kw$recur; +} else { +throw e17578; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17686 = state_17562; +state_17562 = G__17686; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = function(state_17562){ +switch(arguments.length){ +case 0: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1.call(this,state_17562); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1; +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___17678,jobs,results,process,async)) +})(); +var state__17077__auto__ = (function (){var statearr_17580 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17580[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___17678); + +return statearr_17580; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___17678,jobs,results,process,async)) +); + + +var c__17075__auto__ = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto__,jobs,results,process,async){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto__,jobs,results,process,async){ +return (function (state_17618){ +var state_val_17619 = (state_17618[(1)]); +if((state_val_17619 === (7))){ +var inst_17614 = (state_17618[(2)]); +var state_17618__$1 = state_17618; +var statearr_17620_17687 = state_17618__$1; +(statearr_17620_17687[(2)] = inst_17614); + +(statearr_17620_17687[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (20))){ +var state_17618__$1 = state_17618; +var statearr_17621_17688 = state_17618__$1; +(statearr_17621_17688[(2)] = null); + +(statearr_17621_17688[(1)] = (21)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (1))){ +var state_17618__$1 = state_17618; +var statearr_17622_17689 = state_17618__$1; +(statearr_17622_17689[(2)] = null); + +(statearr_17622_17689[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (4))){ +var inst_17583 = (state_17618[(7)]); +var inst_17583__$1 = (state_17618[(2)]); +var inst_17584 = (inst_17583__$1 == null); +var state_17618__$1 = (function (){var statearr_17623 = state_17618; +(statearr_17623[(7)] = inst_17583__$1); + +return statearr_17623; +})(); +if(cljs.core.truth_(inst_17584)){ +var statearr_17624_17690 = state_17618__$1; +(statearr_17624_17690[(1)] = (5)); + +} else { +var statearr_17625_17691 = state_17618__$1; +(statearr_17625_17691[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (15))){ +var inst_17596 = (state_17618[(8)]); +var state_17618__$1 = state_17618; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_17618__$1,(18),to,inst_17596); +} else { +if((state_val_17619 === (21))){ +var inst_17609 = (state_17618[(2)]); +var state_17618__$1 = state_17618; +var statearr_17626_17692 = state_17618__$1; +(statearr_17626_17692[(2)] = inst_17609); + +(statearr_17626_17692[(1)] = (13)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (13))){ +var inst_17611 = (state_17618[(2)]); +var state_17618__$1 = (function (){var statearr_17627 = state_17618; +(statearr_17627[(9)] = inst_17611); + +return statearr_17627; +})(); +var statearr_17628_17693 = state_17618__$1; +(statearr_17628_17693[(2)] = null); + +(statearr_17628_17693[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (6))){ +var inst_17583 = (state_17618[(7)]); +var state_17618__$1 = state_17618; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17618__$1,(11),inst_17583); +} else { +if((state_val_17619 === (17))){ +var inst_17604 = (state_17618[(2)]); +var state_17618__$1 = state_17618; +if(cljs.core.truth_(inst_17604)){ +var statearr_17629_17694 = state_17618__$1; +(statearr_17629_17694[(1)] = (19)); + +} else { +var statearr_17630_17695 = state_17618__$1; +(statearr_17630_17695[(1)] = (20)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (3))){ +var inst_17616 = (state_17618[(2)]); +var state_17618__$1 = state_17618; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17618__$1,inst_17616); +} else { +if((state_val_17619 === (12))){ +var inst_17593 = (state_17618[(10)]); +var state_17618__$1 = state_17618; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17618__$1,(14),inst_17593); +} else { +if((state_val_17619 === (2))){ +var state_17618__$1 = state_17618; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17618__$1,(4),results); +} else { +if((state_val_17619 === (19))){ +var state_17618__$1 = state_17618; +var statearr_17631_17696 = state_17618__$1; +(statearr_17631_17696[(2)] = null); + +(statearr_17631_17696[(1)] = (12)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (11))){ +var inst_17593 = (state_17618[(2)]); +var state_17618__$1 = (function (){var statearr_17632 = state_17618; +(statearr_17632[(10)] = inst_17593); + +return statearr_17632; +})(); +var statearr_17633_17697 = state_17618__$1; +(statearr_17633_17697[(2)] = null); + +(statearr_17633_17697[(1)] = (12)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (9))){ +var state_17618__$1 = state_17618; +var statearr_17634_17698 = state_17618__$1; +(statearr_17634_17698[(2)] = null); + +(statearr_17634_17698[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (5))){ +var state_17618__$1 = state_17618; +if(cljs.core.truth_(close_QMARK_)){ +var statearr_17635_17699 = state_17618__$1; +(statearr_17635_17699[(1)] = (8)); + +} else { +var statearr_17636_17700 = state_17618__$1; +(statearr_17636_17700[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (14))){ +var inst_17596 = (state_17618[(8)]); +var inst_17598 = (state_17618[(11)]); +var inst_17596__$1 = (state_17618[(2)]); +var inst_17597 = (inst_17596__$1 == null); +var inst_17598__$1 = cljs.core.not(inst_17597); +var state_17618__$1 = (function (){var statearr_17637 = state_17618; +(statearr_17637[(8)] = inst_17596__$1); + +(statearr_17637[(11)] = inst_17598__$1); + +return statearr_17637; +})(); +if(inst_17598__$1){ +var statearr_17638_17701 = state_17618__$1; +(statearr_17638_17701[(1)] = (15)); + +} else { +var statearr_17639_17702 = state_17618__$1; +(statearr_17639_17702[(1)] = (16)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (16))){ +var inst_17598 = (state_17618[(11)]); +var state_17618__$1 = state_17618; +var statearr_17640_17703 = state_17618__$1; +(statearr_17640_17703[(2)] = inst_17598); + +(statearr_17640_17703[(1)] = (17)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (10))){ +var inst_17590 = (state_17618[(2)]); +var state_17618__$1 = state_17618; +var statearr_17641_17704 = state_17618__$1; +(statearr_17641_17704[(2)] = inst_17590); + +(statearr_17641_17704[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (18))){ +var inst_17601 = (state_17618[(2)]); +var state_17618__$1 = state_17618; +var statearr_17642_17705 = state_17618__$1; +(statearr_17642_17705[(2)] = inst_17601); + +(statearr_17642_17705[(1)] = (17)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17619 === (8))){ +var inst_17587 = cljs.core.async.close_BANG_(to); +var state_17618__$1 = state_17618; +var statearr_17643_17706 = state_17618__$1; +(statearr_17643_17706[(2)] = inst_17587); + +(statearr_17643_17706[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto__,jobs,results,process,async)) +; +return ((function (switch__16949__auto__,c__17075__auto__,jobs,results,process,async){ +return (function() { +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = null; +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0 = (function (){ +var statearr_17647 = [null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_17647[(0)] = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__); + +(statearr_17647[(1)] = (1)); + +return statearr_17647; +}); +var cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1 = (function (state_17618){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17618); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17648){if((e17648 instanceof Object)){ +var ex__16953__auto__ = e17648; +var statearr_17649_17707 = state_17618; +(statearr_17649_17707[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17618); + +return cljs.core.cst$kw$recur; +} else { +throw e17648; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17708 = state_17618; +state_17618 = G__17708; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__ = function(state_17618){ +switch(arguments.length){ +case 0: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1.call(this,state_17618); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____0; +cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$pipeline_STAR__$_state_machine__16950__auto____1; +return cljs$core$async$pipeline_STAR__$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto__,jobs,results,process,async)) +})(); +var state__17077__auto__ = (function (){var statearr_17650 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17650[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto__); + +return statearr_17650; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto__,jobs,results,process,async)) +); + +return c__17075__auto__; +}); +/** + * Takes elements from the from channel and supplies them to the to + * channel, subject to the async function af, with parallelism n. af + * must be a function of two arguments, the first an input value and + * the second a channel on which to place the result(s). af must close! + * the channel before returning. The presumption is that af will + * return immediately, having launched some asynchronous operation + * whose completion/callback will manipulate the result channel. Outputs + * will be returned in order relative to the inputs. By default, the to + * channel will be closed when the from channel closes, but can be + * determined by the close? parameter. Will stop consuming the from + * channel if the to channel closes. + */ +cljs.core.async.pipeline_async = (function cljs$core$async$pipeline_async(var_args){ +var args17709 = []; +var len__9181__auto___17712 = arguments.length; +var i__9182__auto___17713 = (0); +while(true){ +if((i__9182__auto___17713 < len__9181__auto___17712)){ +args17709.push((arguments[i__9182__auto___17713])); + +var G__17714 = (i__9182__auto___17713 + (1)); +i__9182__auto___17713 = G__17714; +continue; +} else { +} +break; +} + +var G__17711 = args17709.length; +switch (G__17711) { +case 4: +return cljs.core.async.pipeline_async.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core.async.pipeline_async.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17709.length)].join(''))); + +} +}); + +cljs.core.async.pipeline_async.cljs$core$IFn$_invoke$arity$4 = (function (n,to,af,from){ +return cljs.core.async.pipeline_async.cljs$core$IFn$_invoke$arity$5(n,to,af,from,true); +}); + +cljs.core.async.pipeline_async.cljs$core$IFn$_invoke$arity$5 = (function (n,to,af,from,close_QMARK_){ +return cljs.core.async.pipeline_STAR_(n,to,af,from,close_QMARK_,null,cljs.core.cst$kw$async); +}); + +cljs.core.async.pipeline_async.cljs$lang$maxFixedArity = 5; + +/** + * Takes elements from the from channel and supplies them to the to + * channel, subject to the transducer xf, with parallelism n. Because + * it is parallel, the transducer will be applied independently to each + * element, not across elements, and may produce zero or more outputs + * per input. Outputs will be returned in order relative to the + * inputs. By default, the to channel will be closed when the from + * channel closes, but can be determined by the close? parameter. Will + * stop consuming the from channel if the to channel closes. + * + * Note this is supplied for API compatibility with the Clojure version. + * Values of N > 1 will not result in actual concurrency in a + * single-threaded runtime. + */ +cljs.core.async.pipeline = (function cljs$core$async$pipeline(var_args){ +var args17716 = []; +var len__9181__auto___17719 = arguments.length; +var i__9182__auto___17720 = (0); +while(true){ +if((i__9182__auto___17720 < len__9181__auto___17719)){ +args17716.push((arguments[i__9182__auto___17720])); + +var G__17721 = (i__9182__auto___17720 + (1)); +i__9182__auto___17720 = G__17721; +continue; +} else { +} +break; +} + +var G__17718 = args17716.length; +switch (G__17718) { +case 4: +return cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +case 5: +return cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$5((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)])); + +break; +case 6: +return cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$6((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)]),(arguments[(4)]),(arguments[(5)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17716.length)].join(''))); + +} +}); + +cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$4 = (function (n,to,xf,from){ +return cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$5(n,to,xf,from,true); +}); + +cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$5 = (function (n,to,xf,from,close_QMARK_){ +return cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$6(n,to,xf,from,close_QMARK_,null); +}); + +cljs.core.async.pipeline.cljs$core$IFn$_invoke$arity$6 = (function (n,to,xf,from,close_QMARK_,ex_handler){ +return cljs.core.async.pipeline_STAR_(n,to,xf,from,close_QMARK_,ex_handler,cljs.core.cst$kw$compute); +}); + +cljs.core.async.pipeline.cljs$lang$maxFixedArity = 6; + +/** + * Takes a predicate and a source channel and returns a vector of two + * channels, the first of which will contain the values for which the + * predicate returned true, the second those for which it returned + * false. + * + * The out channels will be unbuffered by default, or two buf-or-ns can + * be supplied. The channels will close after the source channel has + * closed. + */ +cljs.core.async.split = (function cljs$core$async$split(var_args){ +var args17723 = []; +var len__9181__auto___17776 = arguments.length; +var i__9182__auto___17777 = (0); +while(true){ +if((i__9182__auto___17777 < len__9181__auto___17776)){ +args17723.push((arguments[i__9182__auto___17777])); + +var G__17778 = (i__9182__auto___17777 + (1)); +i__9182__auto___17777 = G__17778; +continue; +} else { +} +break; +} + +var G__17725 = args17723.length; +switch (G__17725) { +case 2: +return cljs.core.async.split.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 4: +return cljs.core.async.split.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17723.length)].join(''))); + +} +}); + +cljs.core.async.split.cljs$core$IFn$_invoke$arity$2 = (function (p,ch){ +return cljs.core.async.split.cljs$core$IFn$_invoke$arity$4(p,ch,null,null); +}); + +cljs.core.async.split.cljs$core$IFn$_invoke$arity$4 = (function (p,ch,t_buf_or_n,f_buf_or_n){ +var tc = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(t_buf_or_n); +var fc = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(f_buf_or_n); +var c__17075__auto___17780 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___17780,tc,fc){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___17780,tc,fc){ +return (function (state_17751){ +var state_val_17752 = (state_17751[(1)]); +if((state_val_17752 === (7))){ +var inst_17747 = (state_17751[(2)]); +var state_17751__$1 = state_17751; +var statearr_17753_17781 = state_17751__$1; +(statearr_17753_17781[(2)] = inst_17747); + +(statearr_17753_17781[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (1))){ +var state_17751__$1 = state_17751; +var statearr_17754_17782 = state_17751__$1; +(statearr_17754_17782[(2)] = null); + +(statearr_17754_17782[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (4))){ +var inst_17728 = (state_17751[(7)]); +var inst_17728__$1 = (state_17751[(2)]); +var inst_17729 = (inst_17728__$1 == null); +var state_17751__$1 = (function (){var statearr_17755 = state_17751; +(statearr_17755[(7)] = inst_17728__$1); + +return statearr_17755; +})(); +if(cljs.core.truth_(inst_17729)){ +var statearr_17756_17783 = state_17751__$1; +(statearr_17756_17783[(1)] = (5)); + +} else { +var statearr_17757_17784 = state_17751__$1; +(statearr_17757_17784[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (13))){ +var state_17751__$1 = state_17751; +var statearr_17758_17785 = state_17751__$1; +(statearr_17758_17785[(2)] = null); + +(statearr_17758_17785[(1)] = (14)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (6))){ +var inst_17728 = (state_17751[(7)]); +var inst_17734 = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(inst_17728) : p.call(null,inst_17728)); +var state_17751__$1 = state_17751; +if(cljs.core.truth_(inst_17734)){ +var statearr_17759_17786 = state_17751__$1; +(statearr_17759_17786[(1)] = (9)); + +} else { +var statearr_17760_17787 = state_17751__$1; +(statearr_17760_17787[(1)] = (10)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (3))){ +var inst_17749 = (state_17751[(2)]); +var state_17751__$1 = state_17751; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17751__$1,inst_17749); +} else { +if((state_val_17752 === (12))){ +var state_17751__$1 = state_17751; +var statearr_17761_17788 = state_17751__$1; +(statearr_17761_17788[(2)] = null); + +(statearr_17761_17788[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (2))){ +var state_17751__$1 = state_17751; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17751__$1,(4),ch); +} else { +if((state_val_17752 === (11))){ +var inst_17728 = (state_17751[(7)]); +var inst_17738 = (state_17751[(2)]); +var state_17751__$1 = state_17751; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_17751__$1,(8),inst_17738,inst_17728); +} else { +if((state_val_17752 === (9))){ +var state_17751__$1 = state_17751; +var statearr_17762_17789 = state_17751__$1; +(statearr_17762_17789[(2)] = tc); + +(statearr_17762_17789[(1)] = (11)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (5))){ +var inst_17731 = cljs.core.async.close_BANG_(tc); +var inst_17732 = cljs.core.async.close_BANG_(fc); +var state_17751__$1 = (function (){var statearr_17763 = state_17751; +(statearr_17763[(8)] = inst_17731); + +return statearr_17763; +})(); +var statearr_17764_17790 = state_17751__$1; +(statearr_17764_17790[(2)] = inst_17732); + +(statearr_17764_17790[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (14))){ +var inst_17745 = (state_17751[(2)]); +var state_17751__$1 = state_17751; +var statearr_17765_17791 = state_17751__$1; +(statearr_17765_17791[(2)] = inst_17745); + +(statearr_17765_17791[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (10))){ +var state_17751__$1 = state_17751; +var statearr_17766_17792 = state_17751__$1; +(statearr_17766_17792[(2)] = fc); + +(statearr_17766_17792[(1)] = (11)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17752 === (8))){ +var inst_17740 = (state_17751[(2)]); +var state_17751__$1 = state_17751; +if(cljs.core.truth_(inst_17740)){ +var statearr_17767_17793 = state_17751__$1; +(statearr_17767_17793[(1)] = (12)); + +} else { +var statearr_17768_17794 = state_17751__$1; +(statearr_17768_17794[(1)] = (13)); + +} + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___17780,tc,fc)) +; +return ((function (switch__16949__auto__,c__17075__auto___17780,tc,fc){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_17772 = [null,null,null,null,null,null,null,null,null]; +(statearr_17772[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_17772[(1)] = (1)); + +return statearr_17772; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_17751){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17751); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17773){if((e17773 instanceof Object)){ +var ex__16953__auto__ = e17773; +var statearr_17774_17795 = state_17751; +(statearr_17774_17795[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17751); + +return cljs.core.cst$kw$recur; +} else { +throw e17773; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17796 = state_17751; +state_17751 = G__17796; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_17751){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_17751); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___17780,tc,fc)) +})(); +var state__17077__auto__ = (function (){var statearr_17775 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17775[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___17780); + +return statearr_17775; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___17780,tc,fc)) +); + + +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [tc,fc], null); +}); + +cljs.core.async.split.cljs$lang$maxFixedArity = 4; + +/** + * f should be a function of 2 arguments. Returns a channel containing + * the single result of applying f to init and the first item from the + * channel, then applying f to that result and the 2nd item, etc. If + * the channel closes without yielding items, returns init and f is not + * called. ch must close before reduce produces a result. + */ +cljs.core.async.reduce = (function cljs$core$async$reduce(f,init,ch){ +var c__17075__auto__ = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto__){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto__){ +return (function (state_17860){ +var state_val_17861 = (state_17860[(1)]); +if((state_val_17861 === (7))){ +var inst_17856 = (state_17860[(2)]); +var state_17860__$1 = state_17860; +var statearr_17862_17883 = state_17860__$1; +(statearr_17862_17883[(2)] = inst_17856); + +(statearr_17862_17883[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17861 === (1))){ +var inst_17840 = init; +var state_17860__$1 = (function (){var statearr_17863 = state_17860; +(statearr_17863[(7)] = inst_17840); + +return statearr_17863; +})(); +var statearr_17864_17884 = state_17860__$1; +(statearr_17864_17884[(2)] = null); + +(statearr_17864_17884[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17861 === (4))){ +var inst_17843 = (state_17860[(8)]); +var inst_17843__$1 = (state_17860[(2)]); +var inst_17844 = (inst_17843__$1 == null); +var state_17860__$1 = (function (){var statearr_17865 = state_17860; +(statearr_17865[(8)] = inst_17843__$1); + +return statearr_17865; +})(); +if(cljs.core.truth_(inst_17844)){ +var statearr_17866_17885 = state_17860__$1; +(statearr_17866_17885[(1)] = (5)); + +} else { +var statearr_17867_17886 = state_17860__$1; +(statearr_17867_17886[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17861 === (6))){ +var inst_17847 = (state_17860[(9)]); +var inst_17840 = (state_17860[(7)]); +var inst_17843 = (state_17860[(8)]); +var inst_17847__$1 = (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(inst_17840,inst_17843) : f.call(null,inst_17840,inst_17843)); +var inst_17848 = cljs.core.reduced_QMARK_(inst_17847__$1); +var state_17860__$1 = (function (){var statearr_17868 = state_17860; +(statearr_17868[(9)] = inst_17847__$1); + +return statearr_17868; +})(); +if(inst_17848){ +var statearr_17869_17887 = state_17860__$1; +(statearr_17869_17887[(1)] = (8)); + +} else { +var statearr_17870_17888 = state_17860__$1; +(statearr_17870_17888[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17861 === (3))){ +var inst_17858 = (state_17860[(2)]); +var state_17860__$1 = state_17860; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17860__$1,inst_17858); +} else { +if((state_val_17861 === (2))){ +var state_17860__$1 = state_17860; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17860__$1,(4),ch); +} else { +if((state_val_17861 === (9))){ +var inst_17847 = (state_17860[(9)]); +var inst_17840 = inst_17847; +var state_17860__$1 = (function (){var statearr_17871 = state_17860; +(statearr_17871[(7)] = inst_17840); + +return statearr_17871; +})(); +var statearr_17872_17889 = state_17860__$1; +(statearr_17872_17889[(2)] = null); + +(statearr_17872_17889[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17861 === (5))){ +var inst_17840 = (state_17860[(7)]); +var state_17860__$1 = state_17860; +var statearr_17873_17890 = state_17860__$1; +(statearr_17873_17890[(2)] = inst_17840); + +(statearr_17873_17890[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17861 === (10))){ +var inst_17854 = (state_17860[(2)]); +var state_17860__$1 = state_17860; +var statearr_17874_17891 = state_17860__$1; +(statearr_17874_17891[(2)] = inst_17854); + +(statearr_17874_17891[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17861 === (8))){ +var inst_17847 = (state_17860[(9)]); +var inst_17850 = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(inst_17847) : cljs.core.deref.call(null,inst_17847)); +var state_17860__$1 = state_17860; +var statearr_17875_17892 = state_17860__$1; +(statearr_17875_17892[(2)] = inst_17850); + +(statearr_17875_17892[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto__)) +; +return ((function (switch__16949__auto__,c__17075__auto__){ +return (function() { +var cljs$core$async$reduce_$_state_machine__16950__auto__ = null; +var cljs$core$async$reduce_$_state_machine__16950__auto____0 = (function (){ +var statearr_17879 = [null,null,null,null,null,null,null,null,null,null]; +(statearr_17879[(0)] = cljs$core$async$reduce_$_state_machine__16950__auto__); + +(statearr_17879[(1)] = (1)); + +return statearr_17879; +}); +var cljs$core$async$reduce_$_state_machine__16950__auto____1 = (function (state_17860){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17860); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17880){if((e17880 instanceof Object)){ +var ex__16953__auto__ = e17880; +var statearr_17881_17893 = state_17860; +(statearr_17881_17893[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17860); + +return cljs.core.cst$kw$recur; +} else { +throw e17880; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17894 = state_17860; +state_17860 = G__17894; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$reduce_$_state_machine__16950__auto__ = function(state_17860){ +switch(arguments.length){ +case 0: +return cljs$core$async$reduce_$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$reduce_$_state_machine__16950__auto____1.call(this,state_17860); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$reduce_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$reduce_$_state_machine__16950__auto____0; +cljs$core$async$reduce_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$reduce_$_state_machine__16950__auto____1; +return cljs$core$async$reduce_$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto__)) +})(); +var state__17077__auto__ = (function (){var statearr_17882 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17882[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto__); + +return statearr_17882; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto__)) +); + +return c__17075__auto__; +}); +/** + * async/reduces a channel with a transformation (xform f). + * Returns a channel containing the result. ch must close before + * transduce produces a result. + */ +cljs.core.async.transduce = (function cljs$core$async$transduce(xform,f,init,ch){ +var f__$1 = (xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(f) : xform.call(null,f)); +var c__17075__auto__ = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto__,f__$1){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto__,f__$1){ +return (function (state_17914){ +var state_val_17915 = (state_17914[(1)]); +if((state_val_17915 === (1))){ +var inst_17909 = cljs.core.async.reduce(f__$1,init,ch); +var state_17914__$1 = state_17914; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_17914__$1,(2),inst_17909); +} else { +if((state_val_17915 === (2))){ +var inst_17911 = (state_17914[(2)]); +var inst_17912 = (f__$1.cljs$core$IFn$_invoke$arity$1 ? f__$1.cljs$core$IFn$_invoke$arity$1(inst_17911) : f__$1.call(null,inst_17911)); +var state_17914__$1 = state_17914; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17914__$1,inst_17912); +} else { +return null; +} +} +});})(c__17075__auto__,f__$1)) +; +return ((function (switch__16949__auto__,c__17075__auto__,f__$1){ +return (function() { +var cljs$core$async$transduce_$_state_machine__16950__auto__ = null; +var cljs$core$async$transduce_$_state_machine__16950__auto____0 = (function (){ +var statearr_17919 = [null,null,null,null,null,null,null]; +(statearr_17919[(0)] = cljs$core$async$transduce_$_state_machine__16950__auto__); + +(statearr_17919[(1)] = (1)); + +return statearr_17919; +}); +var cljs$core$async$transduce_$_state_machine__16950__auto____1 = (function (state_17914){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17914); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17920){if((e17920 instanceof Object)){ +var ex__16953__auto__ = e17920; +var statearr_17921_17923 = state_17914; +(statearr_17921_17923[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17914); + +return cljs.core.cst$kw$recur; +} else { +throw e17920; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17924 = state_17914; +state_17914 = G__17924; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$transduce_$_state_machine__16950__auto__ = function(state_17914){ +switch(arguments.length){ +case 0: +return cljs$core$async$transduce_$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$transduce_$_state_machine__16950__auto____1.call(this,state_17914); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$transduce_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$transduce_$_state_machine__16950__auto____0; +cljs$core$async$transduce_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$transduce_$_state_machine__16950__auto____1; +return cljs$core$async$transduce_$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto__,f__$1)) +})(); +var state__17077__auto__ = (function (){var statearr_17922 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17922[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto__); + +return statearr_17922; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto__,f__$1)) +); + +return c__17075__auto__; +}); +/** + * Puts the contents of coll into the supplied channel. + * + * By default the channel will be closed after the items are copied, + * but can be determined by the close? parameter. + * + * Returns a channel which will close after the items are copied. + */ +cljs.core.async.onto_chan = (function cljs$core$async$onto_chan(var_args){ +var args17925 = []; +var len__9181__auto___17977 = arguments.length; +var i__9182__auto___17978 = (0); +while(true){ +if((i__9182__auto___17978 < len__9181__auto___17977)){ +args17925.push((arguments[i__9182__auto___17978])); + +var G__17979 = (i__9182__auto___17978 + (1)); +i__9182__auto___17978 = G__17979; +continue; +} else { +} +break; +} + +var G__17927 = args17925.length; +switch (G__17927) { +case 2: +return cljs.core.async.onto_chan.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.onto_chan.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17925.length)].join(''))); + +} +}); + +cljs.core.async.onto_chan.cljs$core$IFn$_invoke$arity$2 = (function (ch,coll){ +return cljs.core.async.onto_chan.cljs$core$IFn$_invoke$arity$3(ch,coll,true); +}); + +cljs.core.async.onto_chan.cljs$core$IFn$_invoke$arity$3 = (function (ch,coll,close_QMARK_){ +var c__17075__auto__ = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto__){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto__){ +return (function (state_17952){ +var state_val_17953 = (state_17952[(1)]); +if((state_val_17953 === (7))){ +var inst_17934 = (state_17952[(2)]); +var state_17952__$1 = state_17952; +var statearr_17954_17981 = state_17952__$1; +(statearr_17954_17981[(2)] = inst_17934); + +(statearr_17954_17981[(1)] = (6)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (1))){ +var inst_17928 = cljs.core.seq(coll); +var inst_17929 = inst_17928; +var state_17952__$1 = (function (){var statearr_17955 = state_17952; +(statearr_17955[(7)] = inst_17929); + +return statearr_17955; +})(); +var statearr_17956_17982 = state_17952__$1; +(statearr_17956_17982[(2)] = null); + +(statearr_17956_17982[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (4))){ +var inst_17929 = (state_17952[(7)]); +var inst_17932 = cljs.core.first(inst_17929); +var state_17952__$1 = state_17952; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_17952__$1,(7),ch,inst_17932); +} else { +if((state_val_17953 === (13))){ +var inst_17946 = (state_17952[(2)]); +var state_17952__$1 = state_17952; +var statearr_17957_17983 = state_17952__$1; +(statearr_17957_17983[(2)] = inst_17946); + +(statearr_17957_17983[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (6))){ +var inst_17937 = (state_17952[(2)]); +var state_17952__$1 = state_17952; +if(cljs.core.truth_(inst_17937)){ +var statearr_17958_17984 = state_17952__$1; +(statearr_17958_17984[(1)] = (8)); + +} else { +var statearr_17959_17985 = state_17952__$1; +(statearr_17959_17985[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (3))){ +var inst_17950 = (state_17952[(2)]); +var state_17952__$1 = state_17952; +return cljs.core.async.impl.ioc_helpers.return_chan(state_17952__$1,inst_17950); +} else { +if((state_val_17953 === (12))){ +var state_17952__$1 = state_17952; +var statearr_17960_17986 = state_17952__$1; +(statearr_17960_17986[(2)] = null); + +(statearr_17960_17986[(1)] = (13)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (2))){ +var inst_17929 = (state_17952[(7)]); +var state_17952__$1 = state_17952; +if(cljs.core.truth_(inst_17929)){ +var statearr_17961_17987 = state_17952__$1; +(statearr_17961_17987[(1)] = (4)); + +} else { +var statearr_17962_17988 = state_17952__$1; +(statearr_17962_17988[(1)] = (5)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (11))){ +var inst_17943 = cljs.core.async.close_BANG_(ch); +var state_17952__$1 = state_17952; +var statearr_17963_17989 = state_17952__$1; +(statearr_17963_17989[(2)] = inst_17943); + +(statearr_17963_17989[(1)] = (13)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (9))){ +var state_17952__$1 = state_17952; +if(cljs.core.truth_(close_QMARK_)){ +var statearr_17964_17990 = state_17952__$1; +(statearr_17964_17990[(1)] = (11)); + +} else { +var statearr_17965_17991 = state_17952__$1; +(statearr_17965_17991[(1)] = (12)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (5))){ +var inst_17929 = (state_17952[(7)]); +var state_17952__$1 = state_17952; +var statearr_17966_17992 = state_17952__$1; +(statearr_17966_17992[(2)] = inst_17929); + +(statearr_17966_17992[(1)] = (6)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (10))){ +var inst_17948 = (state_17952[(2)]); +var state_17952__$1 = state_17952; +var statearr_17967_17993 = state_17952__$1; +(statearr_17967_17993[(2)] = inst_17948); + +(statearr_17967_17993[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_17953 === (8))){ +var inst_17929 = (state_17952[(7)]); +var inst_17939 = cljs.core.next(inst_17929); +var inst_17929__$1 = inst_17939; +var state_17952__$1 = (function (){var statearr_17968 = state_17952; +(statearr_17968[(7)] = inst_17929__$1); + +return statearr_17968; +})(); +var statearr_17969_17994 = state_17952__$1; +(statearr_17969_17994[(2)] = null); + +(statearr_17969_17994[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto__)) +; +return ((function (switch__16949__auto__,c__17075__auto__){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_17973 = [null,null,null,null,null,null,null,null]; +(statearr_17973[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_17973[(1)] = (1)); + +return statearr_17973; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_17952){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_17952); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e17974){if((e17974 instanceof Object)){ +var ex__16953__auto__ = e17974; +var statearr_17975_17995 = state_17952; +(statearr_17975_17995[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_17952); + +return cljs.core.cst$kw$recur; +} else { +throw e17974; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__17996 = state_17952; +state_17952 = G__17996; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_17952){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_17952); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto__)) +})(); +var state__17077__auto__ = (function (){var statearr_17976 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_17976[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto__); + +return statearr_17976; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto__)) +); + +return c__17075__auto__; +}); + +cljs.core.async.onto_chan.cljs$lang$maxFixedArity = 3; + +/** + * Creates and returns a channel which contains the contents of coll, + * closing when exhausted. + */ +cljs.core.async.to_chan = (function cljs$core$async$to_chan(coll){ +var ch = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(cljs.core.bounded_count((100),coll)); +cljs.core.async.onto_chan.cljs$core$IFn$_invoke$arity$2(ch,coll); + +return ch; +}); + +/** + * @interface + */ +cljs.core.async.Mux = function(){}; + +cljs.core.async.muxch_STAR_ = (function cljs$core$async$muxch_STAR_(_){ +if((!((_ == null))) && (!((_.cljs$core$async$Mux$muxch_STAR_$arity$1 == null)))){ +return _.cljs$core$async$Mux$muxch_STAR_$arity$1(_); +} else { +var x__8678__auto__ = (((_ == null))?null:_); +var m__8679__auto__ = (cljs.core.async.muxch_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(_) : m__8679__auto__.call(null,_)); +} else { +var m__8679__auto____$1 = (cljs.core.async.muxch_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(_) : m__8679__auto____$1.call(null,_)); +} else { +throw cljs.core.missing_protocol("Mux.muxch*",_); +} +} +} +}); + + +/** + * @interface + */ +cljs.core.async.Mult = function(){}; + +cljs.core.async.tap_STAR_ = (function cljs$core$async$tap_STAR_(m,ch,close_QMARK_){ +if((!((m == null))) && (!((m.cljs$core$async$Mult$tap_STAR_$arity$3 == null)))){ +return m.cljs$core$async$Mult$tap_STAR_$arity$3(m,ch,close_QMARK_); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.tap_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(m,ch,close_QMARK_) : m__8679__auto__.call(null,m,ch,close_QMARK_)); +} else { +var m__8679__auto____$1 = (cljs.core.async.tap_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(m,ch,close_QMARK_) : m__8679__auto____$1.call(null,m,ch,close_QMARK_)); +} else { +throw cljs.core.missing_protocol("Mult.tap*",m); +} +} +} +}); + +cljs.core.async.untap_STAR_ = (function cljs$core$async$untap_STAR_(m,ch){ +if((!((m == null))) && (!((m.cljs$core$async$Mult$untap_STAR_$arity$2 == null)))){ +return m.cljs$core$async$Mult$untap_STAR_$arity$2(m,ch); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.untap_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(m,ch) : m__8679__auto__.call(null,m,ch)); +} else { +var m__8679__auto____$1 = (cljs.core.async.untap_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(m,ch) : m__8679__auto____$1.call(null,m,ch)); +} else { +throw cljs.core.missing_protocol("Mult.untap*",m); +} +} +} +}); + +cljs.core.async.untap_all_STAR_ = (function cljs$core$async$untap_all_STAR_(m){ +if((!((m == null))) && (!((m.cljs$core$async$Mult$untap_all_STAR_$arity$1 == null)))){ +return m.cljs$core$async$Mult$untap_all_STAR_$arity$1(m); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.untap_all_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(m) : m__8679__auto__.call(null,m)); +} else { +var m__8679__auto____$1 = (cljs.core.async.untap_all_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(m) : m__8679__auto____$1.call(null,m)); +} else { +throw cljs.core.missing_protocol("Mult.untap-all*",m); +} +} +} +}); + +/** + * Creates and returns a mult(iple) of the supplied channel. Channels + * containing copies of the channel can be created with 'tap', and + * detached with 'untap'. + * + * Each item is distributed to all taps in parallel and synchronously, + * i.e. each tap must accept before the next item is distributed. Use + * buffering/windowing to prevent slow taps from holding up the mult. + * + * Items received when there are no taps get dropped. + * + * If a tap puts to a closed channel, it will be removed from the mult. + */ +cljs.core.async.mult = (function cljs$core$async$mult(ch){ +var cs = (function (){var G__18225 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__18225) : cljs.core.atom.call(null,G__18225)); +})(); +var m = (function (){ +if(typeof cljs.core.async.t_cljs$core$async18226 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.Mult} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.async.Mux} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async18226 = (function (ch,cs,meta18227){ +this.ch = ch; +this.cs = cs; +this.meta18227 = meta18227; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = ((function (cs){ +return (function (_18228,meta18227__$1){ +var self__ = this; +var _18228__$1 = this; +return (new cljs.core.async.t_cljs$core$async18226(self__.ch,self__.cs,meta18227__$1)); +});})(cs)) +; + +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$IMeta$_meta$arity$1 = ((function (cs){ +return (function (_18228){ +var self__ = this; +var _18228__$1 = this; +return self__.meta18227; +});})(cs)) +; + +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$async$Mux$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$async$Mux$muxch_STAR_$arity$1 = ((function (cs){ +return (function (_){ +var self__ = this; +var ___$1 = this; +return self__.ch; +});})(cs)) +; + +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$async$Mult$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$async$Mult$tap_STAR_$arity$3 = ((function (cs){ +return (function (_,ch__$1,close_QMARK_){ +var self__ = this; +var ___$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(self__.cs,cljs.core.assoc,ch__$1,close_QMARK_); + +return null; +});})(cs)) +; + +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$async$Mult$untap_STAR_$arity$2 = ((function (cs){ +return (function (_,ch__$1){ +var self__ = this; +var ___$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(self__.cs,cljs.core.dissoc,ch__$1); + +return null; +});})(cs)) +; + +cljs.core.async.t_cljs$core$async18226.prototype.cljs$core$async$Mult$untap_all_STAR_$arity$1 = ((function (cs){ +return (function (_){ +var self__ = this; +var ___$1 = this; +var G__18229_18453 = self__.cs; +var G__18230_18454 = cljs.core.PersistentArrayMap.EMPTY; +(cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(G__18229_18453,G__18230_18454) : cljs.core.reset_BANG_.call(null,G__18229_18453,G__18230_18454)); + +return null; +});})(cs)) +; + +cljs.core.async.t_cljs$core$async18226.getBasis = ((function (cs){ +return (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$ch,cljs.core.cst$sym$cs,cljs.core.cst$sym$meta18227], null); +});})(cs)) +; + +cljs.core.async.t_cljs$core$async18226.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async18226.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async18226"; + +cljs.core.async.t_cljs$core$async18226.cljs$lang$ctorPrWriter = ((function (cs){ +return (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async18226"); +});})(cs)) +; + +cljs.core.async.__GT_t_cljs$core$async18226 = ((function (cs){ +return (function cljs$core$async$mult_$___GT_t_cljs$core$async18226(ch__$1,cs__$1,meta18227){ +return (new cljs.core.async.t_cljs$core$async18226(ch__$1,cs__$1,meta18227)); +});})(cs)) +; + +} + +return (new cljs.core.async.t_cljs$core$async18226(ch,cs,cljs.core.PersistentArrayMap.EMPTY)); +})() +; +var dchan = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +var dctr = (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(null) : cljs.core.atom.call(null,null)); +var done = ((function (cs,m,dchan,dctr){ +return (function (_){ +if((cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(dctr,cljs.core.dec) === (0))){ +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2(dchan,true); +} else { +return null; +} +});})(cs,m,dchan,dctr)) +; +var c__17075__auto___18455 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___18455,cs,m,dchan,dctr,done){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___18455,cs,m,dchan,dctr,done){ +return (function (state_18365){ +var state_val_18366 = (state_18365[(1)]); +if((state_val_18366 === (7))){ +var inst_18361 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18367_18456 = state_18365__$1; +(statearr_18367_18456[(2)] = inst_18361); + +(statearr_18367_18456[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (20))){ +var inst_18264 = (state_18365[(7)]); +var inst_18276 = cljs.core.first(inst_18264); +var inst_18277 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_18276,(0),null); +var inst_18278 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_18276,(1),null); +var state_18365__$1 = (function (){var statearr_18368 = state_18365; +(statearr_18368[(8)] = inst_18277); + +return statearr_18368; +})(); +if(cljs.core.truth_(inst_18278)){ +var statearr_18369_18457 = state_18365__$1; +(statearr_18369_18457[(1)] = (22)); + +} else { +var statearr_18370_18458 = state_18365__$1; +(statearr_18370_18458[(1)] = (23)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (27))){ +var inst_18306 = (state_18365[(9)]); +var inst_18308 = (state_18365[(10)]); +var inst_18233 = (state_18365[(11)]); +var inst_18313 = (state_18365[(12)]); +var inst_18313__$1 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(inst_18306,inst_18308); +var inst_18314 = cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$3(inst_18313__$1,inst_18233,done); +var state_18365__$1 = (function (){var statearr_18371 = state_18365; +(statearr_18371[(12)] = inst_18313__$1); + +return statearr_18371; +})(); +if(cljs.core.truth_(inst_18314)){ +var statearr_18372_18459 = state_18365__$1; +(statearr_18372_18459[(1)] = (30)); + +} else { +var statearr_18373_18460 = state_18365__$1; +(statearr_18373_18460[(1)] = (31)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (1))){ +var state_18365__$1 = state_18365; +var statearr_18374_18461 = state_18365__$1; +(statearr_18374_18461[(2)] = null); + +(statearr_18374_18461[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (24))){ +var inst_18264 = (state_18365[(7)]); +var inst_18283 = (state_18365[(2)]); +var inst_18284 = cljs.core.next(inst_18264); +var inst_18242 = inst_18284; +var inst_18243 = null; +var inst_18244 = (0); +var inst_18245 = (0); +var state_18365__$1 = (function (){var statearr_18375 = state_18365; +(statearr_18375[(13)] = inst_18283); + +(statearr_18375[(14)] = inst_18243); + +(statearr_18375[(15)] = inst_18242); + +(statearr_18375[(16)] = inst_18244); + +(statearr_18375[(17)] = inst_18245); + +return statearr_18375; +})(); +var statearr_18376_18462 = state_18365__$1; +(statearr_18376_18462[(2)] = null); + +(statearr_18376_18462[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (39))){ +var state_18365__$1 = state_18365; +var statearr_18380_18463 = state_18365__$1; +(statearr_18380_18463[(2)] = null); + +(statearr_18380_18463[(1)] = (41)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (4))){ +var inst_18233 = (state_18365[(11)]); +var inst_18233__$1 = (state_18365[(2)]); +var inst_18234 = (inst_18233__$1 == null); +var state_18365__$1 = (function (){var statearr_18381 = state_18365; +(statearr_18381[(11)] = inst_18233__$1); + +return statearr_18381; +})(); +if(cljs.core.truth_(inst_18234)){ +var statearr_18382_18464 = state_18365__$1; +(statearr_18382_18464[(1)] = (5)); + +} else { +var statearr_18383_18465 = state_18365__$1; +(statearr_18383_18465[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (15))){ +var inst_18243 = (state_18365[(14)]); +var inst_18242 = (state_18365[(15)]); +var inst_18244 = (state_18365[(16)]); +var inst_18245 = (state_18365[(17)]); +var inst_18260 = (state_18365[(2)]); +var inst_18261 = (inst_18245 + (1)); +var tmp18377 = inst_18243; +var tmp18378 = inst_18242; +var tmp18379 = inst_18244; +var inst_18242__$1 = tmp18378; +var inst_18243__$1 = tmp18377; +var inst_18244__$1 = tmp18379; +var inst_18245__$1 = inst_18261; +var state_18365__$1 = (function (){var statearr_18384 = state_18365; +(statearr_18384[(14)] = inst_18243__$1); + +(statearr_18384[(15)] = inst_18242__$1); + +(statearr_18384[(18)] = inst_18260); + +(statearr_18384[(16)] = inst_18244__$1); + +(statearr_18384[(17)] = inst_18245__$1); + +return statearr_18384; +})(); +var statearr_18385_18466 = state_18365__$1; +(statearr_18385_18466[(2)] = null); + +(statearr_18385_18466[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (21))){ +var inst_18287 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18389_18467 = state_18365__$1; +(statearr_18389_18467[(2)] = inst_18287); + +(statearr_18389_18467[(1)] = (18)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (31))){ +var inst_18313 = (state_18365[(12)]); +var inst_18317 = done(null); +var inst_18318 = m.cljs$core$async$Mult$untap_STAR_$arity$2(null,inst_18313); +var state_18365__$1 = (function (){var statearr_18390 = state_18365; +(statearr_18390[(19)] = inst_18317); + +return statearr_18390; +})(); +var statearr_18391_18468 = state_18365__$1; +(statearr_18391_18468[(2)] = inst_18318); + +(statearr_18391_18468[(1)] = (32)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (32))){ +var inst_18306 = (state_18365[(9)]); +var inst_18305 = (state_18365[(20)]); +var inst_18308 = (state_18365[(10)]); +var inst_18307 = (state_18365[(21)]); +var inst_18320 = (state_18365[(2)]); +var inst_18321 = (inst_18308 + (1)); +var tmp18386 = inst_18306; +var tmp18387 = inst_18305; +var tmp18388 = inst_18307; +var inst_18305__$1 = tmp18387; +var inst_18306__$1 = tmp18386; +var inst_18307__$1 = tmp18388; +var inst_18308__$1 = inst_18321; +var state_18365__$1 = (function (){var statearr_18392 = state_18365; +(statearr_18392[(9)] = inst_18306__$1); + +(statearr_18392[(20)] = inst_18305__$1); + +(statearr_18392[(10)] = inst_18308__$1); + +(statearr_18392[(22)] = inst_18320); + +(statearr_18392[(21)] = inst_18307__$1); + +return statearr_18392; +})(); +var statearr_18393_18469 = state_18365__$1; +(statearr_18393_18469[(2)] = null); + +(statearr_18393_18469[(1)] = (25)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (40))){ +var inst_18333 = (state_18365[(23)]); +var inst_18337 = done(null); +var inst_18338 = m.cljs$core$async$Mult$untap_STAR_$arity$2(null,inst_18333); +var state_18365__$1 = (function (){var statearr_18394 = state_18365; +(statearr_18394[(24)] = inst_18337); + +return statearr_18394; +})(); +var statearr_18395_18470 = state_18365__$1; +(statearr_18395_18470[(2)] = inst_18338); + +(statearr_18395_18470[(1)] = (41)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (33))){ +var inst_18324 = (state_18365[(25)]); +var inst_18326 = cljs.core.chunked_seq_QMARK_(inst_18324); +var state_18365__$1 = state_18365; +if(inst_18326){ +var statearr_18396_18471 = state_18365__$1; +(statearr_18396_18471[(1)] = (36)); + +} else { +var statearr_18397_18472 = state_18365__$1; +(statearr_18397_18472[(1)] = (37)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (13))){ +var inst_18254 = (state_18365[(26)]); +var inst_18257 = cljs.core.async.close_BANG_(inst_18254); +var state_18365__$1 = state_18365; +var statearr_18398_18473 = state_18365__$1; +(statearr_18398_18473[(2)] = inst_18257); + +(statearr_18398_18473[(1)] = (15)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (22))){ +var inst_18277 = (state_18365[(8)]); +var inst_18280 = cljs.core.async.close_BANG_(inst_18277); +var state_18365__$1 = state_18365; +var statearr_18399_18474 = state_18365__$1; +(statearr_18399_18474[(2)] = inst_18280); + +(statearr_18399_18474[(1)] = (24)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (36))){ +var inst_18324 = (state_18365[(25)]); +var inst_18328 = cljs.core.chunk_first(inst_18324); +var inst_18329 = cljs.core.chunk_rest(inst_18324); +var inst_18330 = cljs.core.count(inst_18328); +var inst_18305 = inst_18329; +var inst_18306 = inst_18328; +var inst_18307 = inst_18330; +var inst_18308 = (0); +var state_18365__$1 = (function (){var statearr_18400 = state_18365; +(statearr_18400[(9)] = inst_18306); + +(statearr_18400[(20)] = inst_18305); + +(statearr_18400[(10)] = inst_18308); + +(statearr_18400[(21)] = inst_18307); + +return statearr_18400; +})(); +var statearr_18401_18475 = state_18365__$1; +(statearr_18401_18475[(2)] = null); + +(statearr_18401_18475[(1)] = (25)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (41))){ +var inst_18324 = (state_18365[(25)]); +var inst_18340 = (state_18365[(2)]); +var inst_18341 = cljs.core.next(inst_18324); +var inst_18305 = inst_18341; +var inst_18306 = null; +var inst_18307 = (0); +var inst_18308 = (0); +var state_18365__$1 = (function (){var statearr_18402 = state_18365; +(statearr_18402[(9)] = inst_18306); + +(statearr_18402[(20)] = inst_18305); + +(statearr_18402[(10)] = inst_18308); + +(statearr_18402[(27)] = inst_18340); + +(statearr_18402[(21)] = inst_18307); + +return statearr_18402; +})(); +var statearr_18403_18476 = state_18365__$1; +(statearr_18403_18476[(2)] = null); + +(statearr_18403_18476[(1)] = (25)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (43))){ +var state_18365__$1 = state_18365; +var statearr_18404_18477 = state_18365__$1; +(statearr_18404_18477[(2)] = null); + +(statearr_18404_18477[(1)] = (44)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (29))){ +var inst_18349 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18405_18478 = state_18365__$1; +(statearr_18405_18478[(2)] = inst_18349); + +(statearr_18405_18478[(1)] = (26)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (44))){ +var inst_18358 = (state_18365[(2)]); +var state_18365__$1 = (function (){var statearr_18406 = state_18365; +(statearr_18406[(28)] = inst_18358); + +return statearr_18406; +})(); +var statearr_18407_18479 = state_18365__$1; +(statearr_18407_18479[(2)] = null); + +(statearr_18407_18479[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (6))){ +var inst_18297 = (state_18365[(29)]); +var inst_18296 = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cs) : cljs.core.deref.call(null,cs)); +var inst_18297__$1 = cljs.core.keys(inst_18296); +var inst_18298 = cljs.core.count(inst_18297__$1); +var inst_18299 = (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(dctr,inst_18298) : cljs.core.reset_BANG_.call(null,dctr,inst_18298)); +var inst_18304 = cljs.core.seq(inst_18297__$1); +var inst_18305 = inst_18304; +var inst_18306 = null; +var inst_18307 = (0); +var inst_18308 = (0); +var state_18365__$1 = (function (){var statearr_18408 = state_18365; +(statearr_18408[(9)] = inst_18306); + +(statearr_18408[(20)] = inst_18305); + +(statearr_18408[(10)] = inst_18308); + +(statearr_18408[(30)] = inst_18299); + +(statearr_18408[(29)] = inst_18297__$1); + +(statearr_18408[(21)] = inst_18307); + +return statearr_18408; +})(); +var statearr_18409_18480 = state_18365__$1; +(statearr_18409_18480[(2)] = null); + +(statearr_18409_18480[(1)] = (25)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (28))){ +var inst_18305 = (state_18365[(20)]); +var inst_18324 = (state_18365[(25)]); +var inst_18324__$1 = cljs.core.seq(inst_18305); +var state_18365__$1 = (function (){var statearr_18410 = state_18365; +(statearr_18410[(25)] = inst_18324__$1); + +return statearr_18410; +})(); +if(inst_18324__$1){ +var statearr_18411_18481 = state_18365__$1; +(statearr_18411_18481[(1)] = (33)); + +} else { +var statearr_18412_18482 = state_18365__$1; +(statearr_18412_18482[(1)] = (34)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (25))){ +var inst_18308 = (state_18365[(10)]); +var inst_18307 = (state_18365[(21)]); +var inst_18310 = (inst_18308 < inst_18307); +var inst_18311 = inst_18310; +var state_18365__$1 = state_18365; +if(cljs.core.truth_(inst_18311)){ +var statearr_18413_18483 = state_18365__$1; +(statearr_18413_18483[(1)] = (27)); + +} else { +var statearr_18414_18484 = state_18365__$1; +(statearr_18414_18484[(1)] = (28)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (34))){ +var state_18365__$1 = state_18365; +var statearr_18415_18485 = state_18365__$1; +(statearr_18415_18485[(2)] = null); + +(statearr_18415_18485[(1)] = (35)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (17))){ +var state_18365__$1 = state_18365; +var statearr_18416_18486 = state_18365__$1; +(statearr_18416_18486[(2)] = null); + +(statearr_18416_18486[(1)] = (18)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (3))){ +var inst_18363 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +return cljs.core.async.impl.ioc_helpers.return_chan(state_18365__$1,inst_18363); +} else { +if((state_val_18366 === (12))){ +var inst_18292 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18417_18487 = state_18365__$1; +(statearr_18417_18487[(2)] = inst_18292); + +(statearr_18417_18487[(1)] = (9)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (2))){ +var state_18365__$1 = state_18365; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_18365__$1,(4),ch); +} else { +if((state_val_18366 === (23))){ +var state_18365__$1 = state_18365; +var statearr_18418_18488 = state_18365__$1; +(statearr_18418_18488[(2)] = null); + +(statearr_18418_18488[(1)] = (24)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (35))){ +var inst_18347 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18419_18489 = state_18365__$1; +(statearr_18419_18489[(2)] = inst_18347); + +(statearr_18419_18489[(1)] = (29)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (19))){ +var inst_18264 = (state_18365[(7)]); +var inst_18268 = cljs.core.chunk_first(inst_18264); +var inst_18269 = cljs.core.chunk_rest(inst_18264); +var inst_18270 = cljs.core.count(inst_18268); +var inst_18242 = inst_18269; +var inst_18243 = inst_18268; +var inst_18244 = inst_18270; +var inst_18245 = (0); +var state_18365__$1 = (function (){var statearr_18420 = state_18365; +(statearr_18420[(14)] = inst_18243); + +(statearr_18420[(15)] = inst_18242); + +(statearr_18420[(16)] = inst_18244); + +(statearr_18420[(17)] = inst_18245); + +return statearr_18420; +})(); +var statearr_18421_18490 = state_18365__$1; +(statearr_18421_18490[(2)] = null); + +(statearr_18421_18490[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (11))){ +var inst_18264 = (state_18365[(7)]); +var inst_18242 = (state_18365[(15)]); +var inst_18264__$1 = cljs.core.seq(inst_18242); +var state_18365__$1 = (function (){var statearr_18422 = state_18365; +(statearr_18422[(7)] = inst_18264__$1); + +return statearr_18422; +})(); +if(inst_18264__$1){ +var statearr_18423_18491 = state_18365__$1; +(statearr_18423_18491[(1)] = (16)); + +} else { +var statearr_18424_18492 = state_18365__$1; +(statearr_18424_18492[(1)] = (17)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (9))){ +var inst_18294 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18425_18493 = state_18365__$1; +(statearr_18425_18493[(2)] = inst_18294); + +(statearr_18425_18493[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (5))){ +var inst_18240 = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cs) : cljs.core.deref.call(null,cs)); +var inst_18241 = cljs.core.seq(inst_18240); +var inst_18242 = inst_18241; +var inst_18243 = null; +var inst_18244 = (0); +var inst_18245 = (0); +var state_18365__$1 = (function (){var statearr_18426 = state_18365; +(statearr_18426[(14)] = inst_18243); + +(statearr_18426[(15)] = inst_18242); + +(statearr_18426[(16)] = inst_18244); + +(statearr_18426[(17)] = inst_18245); + +return statearr_18426; +})(); +var statearr_18427_18494 = state_18365__$1; +(statearr_18427_18494[(2)] = null); + +(statearr_18427_18494[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (14))){ +var state_18365__$1 = state_18365; +var statearr_18428_18495 = state_18365__$1; +(statearr_18428_18495[(2)] = null); + +(statearr_18428_18495[(1)] = (15)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (45))){ +var inst_18355 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18429_18496 = state_18365__$1; +(statearr_18429_18496[(2)] = inst_18355); + +(statearr_18429_18496[(1)] = (44)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (26))){ +var inst_18297 = (state_18365[(29)]); +var inst_18351 = (state_18365[(2)]); +var inst_18352 = cljs.core.seq(inst_18297); +var state_18365__$1 = (function (){var statearr_18430 = state_18365; +(statearr_18430[(31)] = inst_18351); + +return statearr_18430; +})(); +if(inst_18352){ +var statearr_18431_18497 = state_18365__$1; +(statearr_18431_18497[(1)] = (42)); + +} else { +var statearr_18432_18498 = state_18365__$1; +(statearr_18432_18498[(1)] = (43)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (16))){ +var inst_18264 = (state_18365[(7)]); +var inst_18266 = cljs.core.chunked_seq_QMARK_(inst_18264); +var state_18365__$1 = state_18365; +if(inst_18266){ +var statearr_18433_18499 = state_18365__$1; +(statearr_18433_18499[(1)] = (19)); + +} else { +var statearr_18434_18500 = state_18365__$1; +(statearr_18434_18500[(1)] = (20)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (38))){ +var inst_18344 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18435_18501 = state_18365__$1; +(statearr_18435_18501[(2)] = inst_18344); + +(statearr_18435_18501[(1)] = (35)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (30))){ +var state_18365__$1 = state_18365; +var statearr_18436_18502 = state_18365__$1; +(statearr_18436_18502[(2)] = null); + +(statearr_18436_18502[(1)] = (32)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (10))){ +var inst_18243 = (state_18365[(14)]); +var inst_18245 = (state_18365[(17)]); +var inst_18253 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(inst_18243,inst_18245); +var inst_18254 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_18253,(0),null); +var inst_18255 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_18253,(1),null); +var state_18365__$1 = (function (){var statearr_18437 = state_18365; +(statearr_18437[(26)] = inst_18254); + +return statearr_18437; +})(); +if(cljs.core.truth_(inst_18255)){ +var statearr_18438_18503 = state_18365__$1; +(statearr_18438_18503[(1)] = (13)); + +} else { +var statearr_18439_18504 = state_18365__$1; +(statearr_18439_18504[(1)] = (14)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (18))){ +var inst_18290 = (state_18365[(2)]); +var state_18365__$1 = state_18365; +var statearr_18440_18505 = state_18365__$1; +(statearr_18440_18505[(2)] = inst_18290); + +(statearr_18440_18505[(1)] = (12)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (42))){ +var state_18365__$1 = state_18365; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_18365__$1,(45),dchan); +} else { +if((state_val_18366 === (37))){ +var inst_18324 = (state_18365[(25)]); +var inst_18333 = (state_18365[(23)]); +var inst_18233 = (state_18365[(11)]); +var inst_18333__$1 = cljs.core.first(inst_18324); +var inst_18334 = cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$3(inst_18333__$1,inst_18233,done); +var state_18365__$1 = (function (){var statearr_18441 = state_18365; +(statearr_18441[(23)] = inst_18333__$1); + +return statearr_18441; +})(); +if(cljs.core.truth_(inst_18334)){ +var statearr_18442_18506 = state_18365__$1; +(statearr_18442_18506[(1)] = (39)); + +} else { +var statearr_18443_18507 = state_18365__$1; +(statearr_18443_18507[(1)] = (40)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18366 === (8))){ +var inst_18244 = (state_18365[(16)]); +var inst_18245 = (state_18365[(17)]); +var inst_18247 = (inst_18245 < inst_18244); +var inst_18248 = inst_18247; +var state_18365__$1 = state_18365; +if(cljs.core.truth_(inst_18248)){ +var statearr_18444_18508 = state_18365__$1; +(statearr_18444_18508[(1)] = (10)); + +} else { +var statearr_18445_18509 = state_18365__$1; +(statearr_18445_18509[(1)] = (11)); + +} + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___18455,cs,m,dchan,dctr,done)) +; +return ((function (switch__16949__auto__,c__17075__auto___18455,cs,m,dchan,dctr,done){ +return (function() { +var cljs$core$async$mult_$_state_machine__16950__auto__ = null; +var cljs$core$async$mult_$_state_machine__16950__auto____0 = (function (){ +var statearr_18449 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_18449[(0)] = cljs$core$async$mult_$_state_machine__16950__auto__); + +(statearr_18449[(1)] = (1)); + +return statearr_18449; +}); +var cljs$core$async$mult_$_state_machine__16950__auto____1 = (function (state_18365){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_18365); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e18450){if((e18450 instanceof Object)){ +var ex__16953__auto__ = e18450; +var statearr_18451_18510 = state_18365; +(statearr_18451_18510[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_18365); + +return cljs.core.cst$kw$recur; +} else { +throw e18450; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__18511 = state_18365; +state_18365 = G__18511; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$mult_$_state_machine__16950__auto__ = function(state_18365){ +switch(arguments.length){ +case 0: +return cljs$core$async$mult_$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$mult_$_state_machine__16950__auto____1.call(this,state_18365); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$mult_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$mult_$_state_machine__16950__auto____0; +cljs$core$async$mult_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$mult_$_state_machine__16950__auto____1; +return cljs$core$async$mult_$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___18455,cs,m,dchan,dctr,done)) +})(); +var state__17077__auto__ = (function (){var statearr_18452 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_18452[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___18455); + +return statearr_18452; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___18455,cs,m,dchan,dctr,done)) +); + + +return m; +}); +/** + * Copies the mult source onto the supplied channel. + * + * By default the channel will be closed when the source closes, + * but can be determined by the close? parameter. + */ +cljs.core.async.tap = (function cljs$core$async$tap(var_args){ +var args18512 = []; +var len__9181__auto___18515 = arguments.length; +var i__9182__auto___18516 = (0); +while(true){ +if((i__9182__auto___18516 < len__9181__auto___18515)){ +args18512.push((arguments[i__9182__auto___18516])); + +var G__18517 = (i__9182__auto___18516 + (1)); +i__9182__auto___18516 = G__18517; +continue; +} else { +} +break; +} + +var G__18514 = args18512.length; +switch (G__18514) { +case 2: +return cljs.core.async.tap.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.tap.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args18512.length)].join(''))); + +} +}); + +cljs.core.async.tap.cljs$core$IFn$_invoke$arity$2 = (function (mult,ch){ +return cljs.core.async.tap.cljs$core$IFn$_invoke$arity$3(mult,ch,true); +}); + +cljs.core.async.tap.cljs$core$IFn$_invoke$arity$3 = (function (mult,ch,close_QMARK_){ +cljs.core.async.tap_STAR_(mult,ch,close_QMARK_); + +return ch; +}); + +cljs.core.async.tap.cljs$lang$maxFixedArity = 3; + +/** + * Disconnects a target channel from a mult + */ +cljs.core.async.untap = (function cljs$core$async$untap(mult,ch){ +return cljs.core.async.untap_STAR_(mult,ch); +}); +/** + * Disconnects all target channels from a mult + */ +cljs.core.async.untap_all = (function cljs$core$async$untap_all(mult){ +return cljs.core.async.untap_all_STAR_(mult); +}); + +/** + * @interface + */ +cljs.core.async.Mix = function(){}; + +cljs.core.async.admix_STAR_ = (function cljs$core$async$admix_STAR_(m,ch){ +if((!((m == null))) && (!((m.cljs$core$async$Mix$admix_STAR_$arity$2 == null)))){ +return m.cljs$core$async$Mix$admix_STAR_$arity$2(m,ch); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.admix_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(m,ch) : m__8679__auto__.call(null,m,ch)); +} else { +var m__8679__auto____$1 = (cljs.core.async.admix_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(m,ch) : m__8679__auto____$1.call(null,m,ch)); +} else { +throw cljs.core.missing_protocol("Mix.admix*",m); +} +} +} +}); + +cljs.core.async.unmix_STAR_ = (function cljs$core$async$unmix_STAR_(m,ch){ +if((!((m == null))) && (!((m.cljs$core$async$Mix$unmix_STAR_$arity$2 == null)))){ +return m.cljs$core$async$Mix$unmix_STAR_$arity$2(m,ch); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.unmix_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(m,ch) : m__8679__auto__.call(null,m,ch)); +} else { +var m__8679__auto____$1 = (cljs.core.async.unmix_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(m,ch) : m__8679__auto____$1.call(null,m,ch)); +} else { +throw cljs.core.missing_protocol("Mix.unmix*",m); +} +} +} +}); + +cljs.core.async.unmix_all_STAR_ = (function cljs$core$async$unmix_all_STAR_(m){ +if((!((m == null))) && (!((m.cljs$core$async$Mix$unmix_all_STAR_$arity$1 == null)))){ +return m.cljs$core$async$Mix$unmix_all_STAR_$arity$1(m); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.unmix_all_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(m) : m__8679__auto__.call(null,m)); +} else { +var m__8679__auto____$1 = (cljs.core.async.unmix_all_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(m) : m__8679__auto____$1.call(null,m)); +} else { +throw cljs.core.missing_protocol("Mix.unmix-all*",m); +} +} +} +}); + +cljs.core.async.toggle_STAR_ = (function cljs$core$async$toggle_STAR_(m,state_map){ +if((!((m == null))) && (!((m.cljs$core$async$Mix$toggle_STAR_$arity$2 == null)))){ +return m.cljs$core$async$Mix$toggle_STAR_$arity$2(m,state_map); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.toggle_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(m,state_map) : m__8679__auto__.call(null,m,state_map)); +} else { +var m__8679__auto____$1 = (cljs.core.async.toggle_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(m,state_map) : m__8679__auto____$1.call(null,m,state_map)); +} else { +throw cljs.core.missing_protocol("Mix.toggle*",m); +} +} +} +}); + +cljs.core.async.solo_mode_STAR_ = (function cljs$core$async$solo_mode_STAR_(m,mode){ +if((!((m == null))) && (!((m.cljs$core$async$Mix$solo_mode_STAR_$arity$2 == null)))){ +return m.cljs$core$async$Mix$solo_mode_STAR_$arity$2(m,mode); +} else { +var x__8678__auto__ = (((m == null))?null:m); +var m__8679__auto__ = (cljs.core.async.solo_mode_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(m,mode) : m__8679__auto__.call(null,m,mode)); +} else { +var m__8679__auto____$1 = (cljs.core.async.solo_mode_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(m,mode) : m__8679__auto____$1.call(null,m,mode)); +} else { +throw cljs.core.missing_protocol("Mix.solo-mode*",m); +} +} +} +}); + +cljs.core.async.ioc_alts_BANG_ = (function cljs$core$async$ioc_alts_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___18529 = arguments.length; +var i__9182__auto___18530 = (0); +while(true){ +if((i__9182__auto___18530 < len__9181__auto___18529)){ +args__9188__auto__.push((arguments[i__9182__auto___18530])); + +var G__18531 = (i__9182__auto___18530 + (1)); +i__9182__auto___18530 = G__18531; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((3) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((3)),(0),null)):null); +return cljs.core.async.ioc_alts_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9189__auto__); +}); + +cljs.core.async.ioc_alts_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (state,cont_block,ports,p__18523){ +var map__18524 = p__18523; +var map__18524__$1 = ((((!((map__18524 == null)))?((((map__18524.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__18524.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__18524):map__18524); +var opts = map__18524__$1; +var statearr_18526_18532 = state; +(statearr_18526_18532[cljs.core.async.impl.ioc_helpers.STATE_IDX] = cont_block); + + +var temp__5278__auto__ = cljs.core.async.do_alts(((function (map__18524,map__18524__$1,opts){ +return (function (val){ +var statearr_18527_18533 = state; +(statearr_18527_18533[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = val); + + +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state); +});})(map__18524,map__18524__$1,opts)) +,ports,opts); +if(cljs.core.truth_(temp__5278__auto__)){ +var cb = temp__5278__auto__; +var statearr_18528_18534 = state; +(statearr_18528_18534[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cb) : cljs.core.deref.call(null,cb))); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +}); + +cljs.core.async.ioc_alts_BANG_.cljs$lang$maxFixedArity = (3); + +cljs.core.async.ioc_alts_BANG_.cljs$lang$applyTo = (function (seq18519){ +var G__18520 = cljs.core.first(seq18519); +var seq18519__$1 = cljs.core.next(seq18519); +var G__18521 = cljs.core.first(seq18519__$1); +var seq18519__$2 = cljs.core.next(seq18519__$1); +var G__18522 = cljs.core.first(seq18519__$2); +var seq18519__$3 = cljs.core.next(seq18519__$2); +return cljs.core.async.ioc_alts_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__18520,G__18521,G__18522,seq18519__$3); +}); + +/** + * Creates and returns a mix of one or more input channels which will + * be put on the supplied out channel. Input sources can be added to + * the mix with 'admix', and removed with 'unmix'. A mix supports + * soloing, muting and pausing multiple inputs atomically using + * 'toggle', and can solo using either muting or pausing as determined + * by 'solo-mode'. + * + * Each channel can have zero or more boolean modes set via 'toggle': + * + * :solo - when true, only this (ond other soloed) channel(s) will appear + * in the mix output channel. :mute and :pause states of soloed + * channels are ignored. If solo-mode is :mute, non-soloed + * channels are muted, if :pause, non-soloed channels are + * paused. + * + * :mute - muted channels will have their contents consumed but not included in the mix + * :pause - paused channels will not have their contents consumed (and thus also not included in the mix) + */ +cljs.core.async.mix = (function cljs$core$async$mix(out){ +var cs = (function (){var G__18706 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__18706) : cljs.core.atom.call(null,G__18706)); +})(); +var solo_modes = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$pause,null,cljs.core.cst$kw$mute,null], null), null); +var attrs = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(solo_modes,cljs.core.cst$kw$solo); +var solo_mode = (function (){var G__18707 = cljs.core.cst$kw$mute; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__18707) : cljs.core.atom.call(null,G__18707)); +})(); +var change = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$0(); +var changed = ((function (cs,solo_modes,attrs,solo_mode,change){ +return (function (){ +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2(change,true); +});})(cs,solo_modes,attrs,solo_mode,change)) +; +var pick = ((function (cs,solo_modes,attrs,solo_mode,change,changed){ +return (function (attr,chs){ +return cljs.core.reduce_kv(((function (cs,solo_modes,attrs,solo_mode,change,changed){ +return (function (ret,c,v){ +if(cljs.core.truth_((attr.cljs$core$IFn$_invoke$arity$1 ? attr.cljs$core$IFn$_invoke$arity$1(v) : attr.call(null,v)))){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(ret,c); +} else { +return ret; +} +});})(cs,solo_modes,attrs,solo_mode,change,changed)) +,cljs.core.PersistentHashSet.EMPTY,chs); +});})(cs,solo_modes,attrs,solo_mode,change,changed)) +; +var calc_state = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick){ +return (function (){ +var chs = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cs) : cljs.core.deref.call(null,cs)); +var mode = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(solo_mode) : cljs.core.deref.call(null,solo_mode)); +var solos = pick(cljs.core.cst$kw$solo,chs); +var pauses = pick(cljs.core.cst$kw$pause,chs); +return new cljs.core.PersistentArrayMap(null, 3, [cljs.core.cst$kw$solos,solos,cljs.core.cst$kw$mutes,pick(cljs.core.cst$kw$mute,chs),cljs.core.cst$kw$reads,cljs.core.conj.cljs$core$IFn$_invoke$arity$2((((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(mode,cljs.core.cst$kw$pause)) && (!(cljs.core.empty_QMARK_(solos))))?cljs.core.vec(solos):cljs.core.vec(cljs.core.remove.cljs$core$IFn$_invoke$arity$2(pauses,cljs.core.keys(chs)))),change)], null); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick)) +; +var m = (function (){ +if(typeof cljs.core.async.t_cljs$core$async18708 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.IMeta} + * @implements {cljs.core.async.Mix} + * @implements {cljs.core.async.Mux} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async18708 = (function (out,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,meta18709){ +this.out = out; +this.cs = cs; +this.solo_modes = solo_modes; +this.attrs = attrs; +this.solo_mode = solo_mode; +this.change = change; +this.changed = changed; +this.pick = pick; +this.calc_state = calc_state; +this.meta18709 = meta18709; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_18710,meta18709__$1){ +var self__ = this; +var _18710__$1 = this; +return (new cljs.core.async.t_cljs$core$async18708(self__.out,self__.cs,self__.solo_modes,self__.attrs,self__.solo_mode,self__.change,self__.changed,self__.pick,self__.calc_state,meta18709__$1)); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$IMeta$_meta$arity$1 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_18710){ +var self__ = this; +var _18710__$1 = this; +return self__.meta18709; +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mux$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mux$muxch_STAR_$arity$1 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_){ +var self__ = this; +var ___$1 = this; +return self__.out; +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mix$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mix$admix_STAR_$arity$2 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_,ch){ +var self__ = this; +var ___$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(self__.cs,cljs.core.assoc,ch,cljs.core.PersistentArrayMap.EMPTY); + +return (self__.changed.cljs$core$IFn$_invoke$arity$0 ? self__.changed.cljs$core$IFn$_invoke$arity$0() : self__.changed.call(null)); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mix$unmix_STAR_$arity$2 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_,ch){ +var self__ = this; +var ___$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(self__.cs,cljs.core.dissoc,ch); + +return (self__.changed.cljs$core$IFn$_invoke$arity$0 ? self__.changed.cljs$core$IFn$_invoke$arity$0() : self__.changed.call(null)); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mix$unmix_all_STAR_$arity$1 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_){ +var self__ = this; +var ___$1 = this; +var G__18711_18877 = self__.cs; +var G__18712_18878 = cljs.core.PersistentArrayMap.EMPTY; +(cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(G__18711_18877,G__18712_18878) : cljs.core.reset_BANG_.call(null,G__18711_18877,G__18712_18878)); + +return (self__.changed.cljs$core$IFn$_invoke$arity$0 ? self__.changed.cljs$core$IFn$_invoke$arity$0() : self__.changed.call(null)); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mix$toggle_STAR_$arity$2 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_,state_map){ +var self__ = this; +var ___$1 = this; +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(self__.cs,cljs.core.partial.cljs$core$IFn$_invoke$arity$2(cljs.core.merge_with,cljs.core.merge),state_map); + +return (self__.changed.cljs$core$IFn$_invoke$arity$0 ? self__.changed.cljs$core$IFn$_invoke$arity$0() : self__.changed.call(null)); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.prototype.cljs$core$async$Mix$solo_mode_STAR_$arity$2 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (_,mode){ +var self__ = this; +var ___$1 = this; +if(cljs.core.truth_((self__.solo_modes.cljs$core$IFn$_invoke$arity$1 ? self__.solo_modes.cljs$core$IFn$_invoke$arity$1(mode) : self__.solo_modes.call(null,mode)))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("mode must be one of: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.solo_modes)].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(solo-modes mode)")].join(''))); +} + +(cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(self__.solo_mode,mode) : cljs.core.reset_BANG_.call(null,self__.solo_mode,mode)); + +return (self__.changed.cljs$core$IFn$_invoke$arity$0 ? self__.changed.cljs$core$IFn$_invoke$arity$0() : self__.changed.call(null)); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.getBasis = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (){ +return new cljs.core.PersistentVector(null, 10, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$out,cljs.core.cst$sym$cs,cljs.core.cst$sym$solo_DASH_modes,cljs.core.cst$sym$attrs,cljs.core.cst$sym$solo_DASH_mode,cljs.core.cst$sym$change,cljs.core.cst$sym$changed,cljs.core.cst$sym$pick,cljs.core.cst$sym$calc_DASH_state,cljs.core.cst$sym$meta18709], null); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.t_cljs$core$async18708.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async18708.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async18708"; + +cljs.core.async.t_cljs$core$async18708.cljs$lang$ctorPrWriter = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async18708"); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +cljs.core.async.__GT_t_cljs$core$async18708 = ((function (cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state){ +return (function cljs$core$async$mix_$___GT_t_cljs$core$async18708(out__$1,cs__$1,solo_modes__$1,attrs__$1,solo_mode__$1,change__$1,changed__$1,pick__$1,calc_state__$1,meta18709){ +return (new cljs.core.async.t_cljs$core$async18708(out__$1,cs__$1,solo_modes__$1,attrs__$1,solo_mode__$1,change__$1,changed__$1,pick__$1,calc_state__$1,meta18709)); +});})(cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state)) +; + +} + +return (new cljs.core.async.t_cljs$core$async18708(out,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,cljs.core.PersistentArrayMap.EMPTY)); +})() +; +var c__17075__auto___18879 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___18879,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,m){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___18879,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,m){ +return (function (state_18814){ +var state_val_18815 = (state_18814[(1)]); +if((state_val_18815 === (7))){ +var inst_18729 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +var statearr_18816_18880 = state_18814__$1; +(statearr_18816_18880[(2)] = inst_18729); + +(statearr_18816_18880[(1)] = (4)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (20))){ +var inst_18741 = (state_18814[(7)]); +var state_18814__$1 = state_18814; +var statearr_18817_18881 = state_18814__$1; +(statearr_18817_18881[(2)] = inst_18741); + +(statearr_18817_18881[(1)] = (21)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (27))){ +var state_18814__$1 = state_18814; +var statearr_18818_18882 = state_18814__$1; +(statearr_18818_18882[(2)] = null); + +(statearr_18818_18882[(1)] = (28)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (1))){ +var inst_18716 = (state_18814[(8)]); +var inst_18716__$1 = calc_state(); +var inst_18718 = (inst_18716__$1 == null); +var inst_18719 = cljs.core.not(inst_18718); +var state_18814__$1 = (function (){var statearr_18819 = state_18814; +(statearr_18819[(8)] = inst_18716__$1); + +return statearr_18819; +})(); +if(inst_18719){ +var statearr_18820_18883 = state_18814__$1; +(statearr_18820_18883[(1)] = (2)); + +} else { +var statearr_18821_18884 = state_18814__$1; +(statearr_18821_18884[(1)] = (3)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (24))){ +var inst_18774 = (state_18814[(9)]); +var inst_18788 = (state_18814[(10)]); +var inst_18765 = (state_18814[(11)]); +var inst_18788__$1 = (inst_18765.cljs$core$IFn$_invoke$arity$1 ? inst_18765.cljs$core$IFn$_invoke$arity$1(inst_18774) : inst_18765.call(null,inst_18774)); +var state_18814__$1 = (function (){var statearr_18822 = state_18814; +(statearr_18822[(10)] = inst_18788__$1); + +return statearr_18822; +})(); +if(cljs.core.truth_(inst_18788__$1)){ +var statearr_18823_18885 = state_18814__$1; +(statearr_18823_18885[(1)] = (29)); + +} else { +var statearr_18824_18886 = state_18814__$1; +(statearr_18824_18886[(1)] = (30)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (4))){ +var inst_18732 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +if(cljs.core.truth_(inst_18732)){ +var statearr_18825_18887 = state_18814__$1; +(statearr_18825_18887[(1)] = (8)); + +} else { +var statearr_18826_18888 = state_18814__$1; +(statearr_18826_18888[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (15))){ +var inst_18759 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +if(cljs.core.truth_(inst_18759)){ +var statearr_18827_18889 = state_18814__$1; +(statearr_18827_18889[(1)] = (19)); + +} else { +var statearr_18828_18890 = state_18814__$1; +(statearr_18828_18890[(1)] = (20)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (21))){ +var inst_18764 = (state_18814[(12)]); +var inst_18764__$1 = (state_18814[(2)]); +var inst_18765 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(inst_18764__$1,cljs.core.cst$kw$solos); +var inst_18766 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(inst_18764__$1,cljs.core.cst$kw$mutes); +var inst_18767 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(inst_18764__$1,cljs.core.cst$kw$reads); +var state_18814__$1 = (function (){var statearr_18829 = state_18814; +(statearr_18829[(12)] = inst_18764__$1); + +(statearr_18829[(11)] = inst_18765); + +(statearr_18829[(13)] = inst_18766); + +return statearr_18829; +})(); +return cljs.core.async.ioc_alts_BANG_(state_18814__$1,(22),inst_18767); +} else { +if((state_val_18815 === (31))){ +var inst_18796 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +if(cljs.core.truth_(inst_18796)){ +var statearr_18830_18891 = state_18814__$1; +(statearr_18830_18891[(1)] = (32)); + +} else { +var statearr_18831_18892 = state_18814__$1; +(statearr_18831_18892[(1)] = (33)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (32))){ +var inst_18773 = (state_18814[(14)]); +var state_18814__$1 = state_18814; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_18814__$1,(35),out,inst_18773); +} else { +if((state_val_18815 === (33))){ +var inst_18764 = (state_18814[(12)]); +var inst_18741 = inst_18764; +var state_18814__$1 = (function (){var statearr_18832 = state_18814; +(statearr_18832[(7)] = inst_18741); + +return statearr_18832; +})(); +var statearr_18833_18893 = state_18814__$1; +(statearr_18833_18893[(2)] = null); + +(statearr_18833_18893[(1)] = (11)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (13))){ +var inst_18741 = (state_18814[(7)]); +var inst_18748 = inst_18741.cljs$lang$protocol_mask$partition0$; +var inst_18749 = (inst_18748 & (64)); +var inst_18750 = inst_18741.cljs$core$ISeq$; +var inst_18751 = (cljs.core.PROTOCOL_SENTINEL === inst_18750); +var inst_18752 = (inst_18749) || (inst_18751); +var state_18814__$1 = state_18814; +if(cljs.core.truth_(inst_18752)){ +var statearr_18834_18894 = state_18814__$1; +(statearr_18834_18894[(1)] = (16)); + +} else { +var statearr_18835_18895 = state_18814__$1; +(statearr_18835_18895[(1)] = (17)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (22))){ +var inst_18774 = (state_18814[(9)]); +var inst_18773 = (state_18814[(14)]); +var inst_18772 = (state_18814[(2)]); +var inst_18773__$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_18772,(0),null); +var inst_18774__$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_18772,(1),null); +var inst_18775 = (inst_18773__$1 == null); +var inst_18776 = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(inst_18774__$1,change); +var inst_18777 = (inst_18775) || (inst_18776); +var state_18814__$1 = (function (){var statearr_18836 = state_18814; +(statearr_18836[(9)] = inst_18774__$1); + +(statearr_18836[(14)] = inst_18773__$1); + +return statearr_18836; +})(); +if(cljs.core.truth_(inst_18777)){ +var statearr_18837_18896 = state_18814__$1; +(statearr_18837_18896[(1)] = (23)); + +} else { +var statearr_18838_18897 = state_18814__$1; +(statearr_18838_18897[(1)] = (24)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (36))){ +var inst_18764 = (state_18814[(12)]); +var inst_18741 = inst_18764; +var state_18814__$1 = (function (){var statearr_18839 = state_18814; +(statearr_18839[(7)] = inst_18741); + +return statearr_18839; +})(); +var statearr_18840_18898 = state_18814__$1; +(statearr_18840_18898[(2)] = null); + +(statearr_18840_18898[(1)] = (11)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (29))){ +var inst_18788 = (state_18814[(10)]); +var state_18814__$1 = state_18814; +var statearr_18841_18899 = state_18814__$1; +(statearr_18841_18899[(2)] = inst_18788); + +(statearr_18841_18899[(1)] = (31)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (6))){ +var state_18814__$1 = state_18814; +var statearr_18842_18900 = state_18814__$1; +(statearr_18842_18900[(2)] = false); + +(statearr_18842_18900[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (28))){ +var inst_18784 = (state_18814[(2)]); +var inst_18785 = calc_state(); +var inst_18741 = inst_18785; +var state_18814__$1 = (function (){var statearr_18843 = state_18814; +(statearr_18843[(7)] = inst_18741); + +(statearr_18843[(15)] = inst_18784); + +return statearr_18843; +})(); +var statearr_18844_18901 = state_18814__$1; +(statearr_18844_18901[(2)] = null); + +(statearr_18844_18901[(1)] = (11)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (25))){ +var inst_18810 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +var statearr_18845_18902 = state_18814__$1; +(statearr_18845_18902[(2)] = inst_18810); + +(statearr_18845_18902[(1)] = (12)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (34))){ +var inst_18808 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +var statearr_18846_18903 = state_18814__$1; +(statearr_18846_18903[(2)] = inst_18808); + +(statearr_18846_18903[(1)] = (25)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (17))){ +var state_18814__$1 = state_18814; +var statearr_18847_18904 = state_18814__$1; +(statearr_18847_18904[(2)] = false); + +(statearr_18847_18904[(1)] = (18)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (3))){ +var state_18814__$1 = state_18814; +var statearr_18848_18905 = state_18814__$1; +(statearr_18848_18905[(2)] = false); + +(statearr_18848_18905[(1)] = (4)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (12))){ +var inst_18812 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +return cljs.core.async.impl.ioc_helpers.return_chan(state_18814__$1,inst_18812); +} else { +if((state_val_18815 === (2))){ +var inst_18716 = (state_18814[(8)]); +var inst_18721 = inst_18716.cljs$lang$protocol_mask$partition0$; +var inst_18722 = (inst_18721 & (64)); +var inst_18723 = inst_18716.cljs$core$ISeq$; +var inst_18724 = (cljs.core.PROTOCOL_SENTINEL === inst_18723); +var inst_18725 = (inst_18722) || (inst_18724); +var state_18814__$1 = state_18814; +if(cljs.core.truth_(inst_18725)){ +var statearr_18849_18906 = state_18814__$1; +(statearr_18849_18906[(1)] = (5)); + +} else { +var statearr_18850_18907 = state_18814__$1; +(statearr_18850_18907[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (23))){ +var inst_18773 = (state_18814[(14)]); +var inst_18779 = (inst_18773 == null); +var state_18814__$1 = state_18814; +if(cljs.core.truth_(inst_18779)){ +var statearr_18851_18908 = state_18814__$1; +(statearr_18851_18908[(1)] = (26)); + +} else { +var statearr_18852_18909 = state_18814__$1; +(statearr_18852_18909[(1)] = (27)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (35))){ +var inst_18799 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +if(cljs.core.truth_(inst_18799)){ +var statearr_18853_18910 = state_18814__$1; +(statearr_18853_18910[(1)] = (36)); + +} else { +var statearr_18854_18911 = state_18814__$1; +(statearr_18854_18911[(1)] = (37)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (19))){ +var inst_18741 = (state_18814[(7)]); +var inst_18761 = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,inst_18741); +var state_18814__$1 = state_18814; +var statearr_18855_18912 = state_18814__$1; +(statearr_18855_18912[(2)] = inst_18761); + +(statearr_18855_18912[(1)] = (21)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (11))){ +var inst_18741 = (state_18814[(7)]); +var inst_18745 = (inst_18741 == null); +var inst_18746 = cljs.core.not(inst_18745); +var state_18814__$1 = state_18814; +if(inst_18746){ +var statearr_18856_18913 = state_18814__$1; +(statearr_18856_18913[(1)] = (13)); + +} else { +var statearr_18857_18914 = state_18814__$1; +(statearr_18857_18914[(1)] = (14)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (9))){ +var inst_18716 = (state_18814[(8)]); +var state_18814__$1 = state_18814; +var statearr_18858_18915 = state_18814__$1; +(statearr_18858_18915[(2)] = inst_18716); + +(statearr_18858_18915[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (5))){ +var state_18814__$1 = state_18814; +var statearr_18859_18916 = state_18814__$1; +(statearr_18859_18916[(2)] = true); + +(statearr_18859_18916[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (14))){ +var state_18814__$1 = state_18814; +var statearr_18860_18917 = state_18814__$1; +(statearr_18860_18917[(2)] = false); + +(statearr_18860_18917[(1)] = (15)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (26))){ +var inst_18774 = (state_18814[(9)]); +var inst_18781 = cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(cs,cljs.core.dissoc,inst_18774); +var state_18814__$1 = state_18814; +var statearr_18861_18918 = state_18814__$1; +(statearr_18861_18918[(2)] = inst_18781); + +(statearr_18861_18918[(1)] = (28)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (16))){ +var state_18814__$1 = state_18814; +var statearr_18862_18919 = state_18814__$1; +(statearr_18862_18919[(2)] = true); + +(statearr_18862_18919[(1)] = (18)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (38))){ +var inst_18804 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +var statearr_18863_18920 = state_18814__$1; +(statearr_18863_18920[(2)] = inst_18804); + +(statearr_18863_18920[(1)] = (34)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (30))){ +var inst_18774 = (state_18814[(9)]); +var inst_18765 = (state_18814[(11)]); +var inst_18766 = (state_18814[(13)]); +var inst_18791 = cljs.core.empty_QMARK_(inst_18765); +var inst_18792 = (inst_18766.cljs$core$IFn$_invoke$arity$1 ? inst_18766.cljs$core$IFn$_invoke$arity$1(inst_18774) : inst_18766.call(null,inst_18774)); +var inst_18793 = cljs.core.not(inst_18792); +var inst_18794 = (inst_18791) && (inst_18793); +var state_18814__$1 = state_18814; +var statearr_18864_18921 = state_18814__$1; +(statearr_18864_18921[(2)] = inst_18794); + +(statearr_18864_18921[(1)] = (31)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (10))){ +var inst_18716 = (state_18814[(8)]); +var inst_18737 = (state_18814[(2)]); +var inst_18738 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(inst_18737,cljs.core.cst$kw$solos); +var inst_18739 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(inst_18737,cljs.core.cst$kw$mutes); +var inst_18740 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(inst_18737,cljs.core.cst$kw$reads); +var inst_18741 = inst_18716; +var state_18814__$1 = (function (){var statearr_18865 = state_18814; +(statearr_18865[(16)] = inst_18739); + +(statearr_18865[(17)] = inst_18738); + +(statearr_18865[(7)] = inst_18741); + +(statearr_18865[(18)] = inst_18740); + +return statearr_18865; +})(); +var statearr_18866_18922 = state_18814__$1; +(statearr_18866_18922[(2)] = null); + +(statearr_18866_18922[(1)] = (11)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (18))){ +var inst_18756 = (state_18814[(2)]); +var state_18814__$1 = state_18814; +var statearr_18867_18923 = state_18814__$1; +(statearr_18867_18923[(2)] = inst_18756); + +(statearr_18867_18923[(1)] = (15)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (37))){ +var state_18814__$1 = state_18814; +var statearr_18868_18924 = state_18814__$1; +(statearr_18868_18924[(2)] = null); + +(statearr_18868_18924[(1)] = (38)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_18815 === (8))){ +var inst_18716 = (state_18814[(8)]); +var inst_18734 = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,inst_18716); +var state_18814__$1 = state_18814; +var statearr_18869_18925 = state_18814__$1; +(statearr_18869_18925[(2)] = inst_18734); + +(statearr_18869_18925[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___18879,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,m)) +; +return ((function (switch__16949__auto__,c__17075__auto___18879,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,m){ +return (function() { +var cljs$core$async$mix_$_state_machine__16950__auto__ = null; +var cljs$core$async$mix_$_state_machine__16950__auto____0 = (function (){ +var statearr_18873 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_18873[(0)] = cljs$core$async$mix_$_state_machine__16950__auto__); + +(statearr_18873[(1)] = (1)); + +return statearr_18873; +}); +var cljs$core$async$mix_$_state_machine__16950__auto____1 = (function (state_18814){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_18814); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e18874){if((e18874 instanceof Object)){ +var ex__16953__auto__ = e18874; +var statearr_18875_18926 = state_18814; +(statearr_18875_18926[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_18814); + +return cljs.core.cst$kw$recur; +} else { +throw e18874; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__18927 = state_18814; +state_18814 = G__18927; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$mix_$_state_machine__16950__auto__ = function(state_18814){ +switch(arguments.length){ +case 0: +return cljs$core$async$mix_$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$mix_$_state_machine__16950__auto____1.call(this,state_18814); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$mix_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$mix_$_state_machine__16950__auto____0; +cljs$core$async$mix_$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$mix_$_state_machine__16950__auto____1; +return cljs$core$async$mix_$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___18879,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,m)) +})(); +var state__17077__auto__ = (function (){var statearr_18876 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_18876[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___18879); + +return statearr_18876; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___18879,cs,solo_modes,attrs,solo_mode,change,changed,pick,calc_state,m)) +); + + +return m; +}); +/** + * Adds ch as an input to the mix + */ +cljs.core.async.admix = (function cljs$core$async$admix(mix,ch){ +return cljs.core.async.admix_STAR_(mix,ch); +}); +/** + * Removes ch as an input to the mix + */ +cljs.core.async.unmix = (function cljs$core$async$unmix(mix,ch){ +return cljs.core.async.unmix_STAR_(mix,ch); +}); +/** + * removes all inputs from the mix + */ +cljs.core.async.unmix_all = (function cljs$core$async$unmix_all(mix){ +return cljs.core.async.unmix_all_STAR_(mix); +}); +/** + * Atomically sets the state(s) of one or more channels in a mix. The + * state map is a map of channels -> channel-state-map. A + * channel-state-map is a map of attrs -> boolean, where attr is one or + * more of :mute, :pause or :solo. Any states supplied are merged with + * the current state. + * + * Note that channels can be added to a mix via toggle, which can be + * used to add channels in a particular (e.g. paused) state. + */ +cljs.core.async.toggle = (function cljs$core$async$toggle(mix,state_map){ +return cljs.core.async.toggle_STAR_(mix,state_map); +}); +/** + * Sets the solo mode of the mix. mode must be one of :mute or :pause + */ +cljs.core.async.solo_mode = (function cljs$core$async$solo_mode(mix,mode){ +return cljs.core.async.solo_mode_STAR_(mix,mode); +}); + +/** + * @interface + */ +cljs.core.async.Pub = function(){}; + +cljs.core.async.sub_STAR_ = (function cljs$core$async$sub_STAR_(p,v,ch,close_QMARK_){ +if((!((p == null))) && (!((p.cljs$core$async$Pub$sub_STAR_$arity$4 == null)))){ +return p.cljs$core$async$Pub$sub_STAR_$arity$4(p,v,ch,close_QMARK_); +} else { +var x__8678__auto__ = (((p == null))?null:p); +var m__8679__auto__ = (cljs.core.async.sub_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$4 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$4(p,v,ch,close_QMARK_) : m__8679__auto__.call(null,p,v,ch,close_QMARK_)); +} else { +var m__8679__auto____$1 = (cljs.core.async.sub_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$4 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$4(p,v,ch,close_QMARK_) : m__8679__auto____$1.call(null,p,v,ch,close_QMARK_)); +} else { +throw cljs.core.missing_protocol("Pub.sub*",p); +} +} +} +}); + +cljs.core.async.unsub_STAR_ = (function cljs$core$async$unsub_STAR_(p,v,ch){ +if((!((p == null))) && (!((p.cljs$core$async$Pub$unsub_STAR_$arity$3 == null)))){ +return p.cljs$core$async$Pub$unsub_STAR_$arity$3(p,v,ch); +} else { +var x__8678__auto__ = (((p == null))?null:p); +var m__8679__auto__ = (cljs.core.async.unsub_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(p,v,ch) : m__8679__auto__.call(null,p,v,ch)); +} else { +var m__8679__auto____$1 = (cljs.core.async.unsub_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(p,v,ch) : m__8679__auto____$1.call(null,p,v,ch)); +} else { +throw cljs.core.missing_protocol("Pub.unsub*",p); +} +} +} +}); + +cljs.core.async.unsub_all_STAR_ = (function cljs$core$async$unsub_all_STAR_(var_args){ +var args18928 = []; +var len__9181__auto___18931 = arguments.length; +var i__9182__auto___18932 = (0); +while(true){ +if((i__9182__auto___18932 < len__9181__auto___18931)){ +args18928.push((arguments[i__9182__auto___18932])); + +var G__18933 = (i__9182__auto___18932 + (1)); +i__9182__auto___18932 = G__18933; +continue; +} else { +} +break; +} + +var G__18930 = args18928.length; +switch (G__18930) { +case 1: +return cljs.core.async.unsub_all_STAR_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.unsub_all_STAR_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args18928.length)].join(''))); + +} +}); + +cljs.core.async.unsub_all_STAR_.cljs$core$IFn$_invoke$arity$1 = (function (p){ +if((!((p == null))) && (!((p.cljs$core$async$Pub$unsub_all_STAR_$arity$1 == null)))){ +return p.cljs$core$async$Pub$unsub_all_STAR_$arity$1(p); +} else { +var x__8678__auto__ = (((p == null))?null:p); +var m__8679__auto__ = (cljs.core.async.unsub_all_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(p) : m__8679__auto__.call(null,p)); +} else { +var m__8679__auto____$1 = (cljs.core.async.unsub_all_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(p) : m__8679__auto____$1.call(null,p)); +} else { +throw cljs.core.missing_protocol("Pub.unsub-all*",p); +} +} +} +}); + +cljs.core.async.unsub_all_STAR_.cljs$core$IFn$_invoke$arity$2 = (function (p,v){ +if((!((p == null))) && (!((p.cljs$core$async$Pub$unsub_all_STAR_$arity$2 == null)))){ +return p.cljs$core$async$Pub$unsub_all_STAR_$arity$2(p,v); +} else { +var x__8678__auto__ = (((p == null))?null:p); +var m__8679__auto__ = (cljs.core.async.unsub_all_STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(p,v) : m__8679__auto__.call(null,p,v)); +} else { +var m__8679__auto____$1 = (cljs.core.async.unsub_all_STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(p,v) : m__8679__auto____$1.call(null,p,v)); +} else { +throw cljs.core.missing_protocol("Pub.unsub-all*",p); +} +} +} +}); + +cljs.core.async.unsub_all_STAR_.cljs$lang$maxFixedArity = 2; + + +/** + * Creates and returns a pub(lication) of the supplied channel, + * partitioned into topics by the topic-fn. topic-fn will be applied to + * each value on the channel and the result will determine the 'topic' + * on which that value will be put. Channels can be subscribed to + * receive copies of topics using 'sub', and unsubscribed using + * 'unsub'. Each topic will be handled by an internal mult on a + * dedicated channel. By default these internal channels are + * unbuffered, but a buf-fn can be supplied which, given a topic, + * creates a buffer with desired properties. + * + * Each item is distributed to all subs in parallel and synchronously, + * i.e. each sub must accept before the next item is distributed. Use + * buffering/windowing to prevent slow subs from holding up the pub. + * + * Items received when there are no matching subs get dropped. + * + * Note that if buf-fns are used then each topic is handled + * asynchronously, i.e. if a channel is subscribed to more than one + * topic it should not expect them to be interleaved identically with + * the source. + */ +cljs.core.async.pub = (function cljs$core$async$pub(var_args){ +var args18936 = []; +var len__9181__auto___19064 = arguments.length; +var i__9182__auto___19065 = (0); +while(true){ +if((i__9182__auto___19065 < len__9181__auto___19064)){ +args18936.push((arguments[i__9182__auto___19065])); + +var G__19066 = (i__9182__auto___19065 + (1)); +i__9182__auto___19065 = G__19066; +continue; +} else { +} +break; +} + +var G__18938 = args18936.length; +switch (G__18938) { +case 2: +return cljs.core.async.pub.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.pub.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args18936.length)].join(''))); + +} +}); + +cljs.core.async.pub.cljs$core$IFn$_invoke$arity$2 = (function (ch,topic_fn){ +return cljs.core.async.pub.cljs$core$IFn$_invoke$arity$3(ch,topic_fn,cljs.core.constantly(null)); +}); + +cljs.core.async.pub.cljs$core$IFn$_invoke$arity$3 = (function (ch,topic_fn,buf_fn){ +var mults = (function (){var G__18939 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__18939) : cljs.core.atom.call(null,G__18939)); +})(); +var ensure_mult = ((function (mults){ +return (function (topic){ +var or__7960__auto__ = cljs.core.get.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(mults) : cljs.core.deref.call(null,mults)),topic); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.get.cljs$core$IFn$_invoke$arity$2(cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(mults,((function (or__7960__auto__,mults){ +return (function (p1__18935_SHARP_){ +if(cljs.core.truth_((p1__18935_SHARP_.cljs$core$IFn$_invoke$arity$1 ? p1__18935_SHARP_.cljs$core$IFn$_invoke$arity$1(topic) : p1__18935_SHARP_.call(null,topic)))){ +return p1__18935_SHARP_; +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(p1__18935_SHARP_,topic,cljs.core.async.mult(cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((buf_fn.cljs$core$IFn$_invoke$arity$1 ? buf_fn.cljs$core$IFn$_invoke$arity$1(topic) : buf_fn.call(null,topic))))); +} +});})(or__7960__auto__,mults)) +),topic); +} +});})(mults)) +; +var p = (function (){ +if(typeof cljs.core.async.t_cljs$core$async18940 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.Pub} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.async.Mux} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async18940 = (function (ch,topic_fn,buf_fn,mults,ensure_mult,meta18941){ +this.ch = ch; +this.topic_fn = topic_fn; +this.buf_fn = buf_fn; +this.mults = mults; +this.ensure_mult = ensure_mult; +this.meta18941 = meta18941; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = ((function (mults,ensure_mult){ +return (function (_18942,meta18941__$1){ +var self__ = this; +var _18942__$1 = this; +return (new cljs.core.async.t_cljs$core$async18940(self__.ch,self__.topic_fn,self__.buf_fn,self__.mults,self__.ensure_mult,meta18941__$1)); +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$IMeta$_meta$arity$1 = ((function (mults,ensure_mult){ +return (function (_18942){ +var self__ = this; +var _18942__$1 = this; +return self__.meta18941; +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$async$Mux$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$async$Mux$muxch_STAR_$arity$1 = ((function (mults,ensure_mult){ +return (function (_){ +var self__ = this; +var ___$1 = this; +return self__.ch; +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$async$Pub$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$async$Pub$sub_STAR_$arity$4 = ((function (mults,ensure_mult){ +return (function (p,topic,ch__$1,close_QMARK_){ +var self__ = this; +var p__$1 = this; +var m = (self__.ensure_mult.cljs$core$IFn$_invoke$arity$1 ? self__.ensure_mult.cljs$core$IFn$_invoke$arity$1(topic) : self__.ensure_mult.call(null,topic)); +return cljs.core.async.tap.cljs$core$IFn$_invoke$arity$3(m,ch__$1,close_QMARK_); +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$async$Pub$unsub_STAR_$arity$3 = ((function (mults,ensure_mult){ +return (function (p,topic,ch__$1){ +var self__ = this; +var p__$1 = this; +var temp__5278__auto__ = cljs.core.get.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.mults) : cljs.core.deref.call(null,self__.mults)),topic); +if(cljs.core.truth_(temp__5278__auto__)){ +var m = temp__5278__auto__; +return cljs.core.async.untap(m,ch__$1); +} else { +return null; +} +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$async$Pub$unsub_all_STAR_$arity$1 = ((function (mults,ensure_mult){ +return (function (_){ +var self__ = this; +var ___$1 = this; +var G__18943 = self__.mults; +var G__18944 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(G__18943,G__18944) : cljs.core.reset_BANG_.call(null,G__18943,G__18944)); +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.prototype.cljs$core$async$Pub$unsub_all_STAR_$arity$2 = ((function (mults,ensure_mult){ +return (function (_,topic){ +var self__ = this; +var ___$1 = this; +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(self__.mults,cljs.core.dissoc,topic); +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.getBasis = ((function (mults,ensure_mult){ +return (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$ch,cljs.core.cst$sym$topic_DASH_fn,cljs.core.cst$sym$buf_DASH_fn,cljs.core.cst$sym$mults,cljs.core.cst$sym$ensure_DASH_mult,cljs.core.cst$sym$meta18941], null); +});})(mults,ensure_mult)) +; + +cljs.core.async.t_cljs$core$async18940.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async18940.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async18940"; + +cljs.core.async.t_cljs$core$async18940.cljs$lang$ctorPrWriter = ((function (mults,ensure_mult){ +return (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async18940"); +});})(mults,ensure_mult)) +; + +cljs.core.async.__GT_t_cljs$core$async18940 = ((function (mults,ensure_mult){ +return (function cljs$core$async$__GT_t_cljs$core$async18940(ch__$1,topic_fn__$1,buf_fn__$1,mults__$1,ensure_mult__$1,meta18941){ +return (new cljs.core.async.t_cljs$core$async18940(ch__$1,topic_fn__$1,buf_fn__$1,mults__$1,ensure_mult__$1,meta18941)); +});})(mults,ensure_mult)) +; + +} + +return (new cljs.core.async.t_cljs$core$async18940(ch,topic_fn,buf_fn,mults,ensure_mult,cljs.core.PersistentArrayMap.EMPTY)); +})() +; +var c__17075__auto___19068 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19068,mults,ensure_mult,p){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19068,mults,ensure_mult,p){ +return (function (state_19016){ +var state_val_19017 = (state_19016[(1)]); +if((state_val_19017 === (7))){ +var inst_19012 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +var statearr_19018_19069 = state_19016__$1; +(statearr_19018_19069[(2)] = inst_19012); + +(statearr_19018_19069[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (20))){ +var state_19016__$1 = state_19016; +var statearr_19019_19070 = state_19016__$1; +(statearr_19019_19070[(2)] = null); + +(statearr_19019_19070[(1)] = (21)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (1))){ +var state_19016__$1 = state_19016; +var statearr_19020_19071 = state_19016__$1; +(statearr_19020_19071[(2)] = null); + +(statearr_19020_19071[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (24))){ +var inst_18995 = (state_19016[(7)]); +var inst_19004 = cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(mults,cljs.core.dissoc,inst_18995); +var state_19016__$1 = state_19016; +var statearr_19021_19072 = state_19016__$1; +(statearr_19021_19072[(2)] = inst_19004); + +(statearr_19021_19072[(1)] = (25)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (4))){ +var inst_18947 = (state_19016[(8)]); +var inst_18947__$1 = (state_19016[(2)]); +var inst_18948 = (inst_18947__$1 == null); +var state_19016__$1 = (function (){var statearr_19022 = state_19016; +(statearr_19022[(8)] = inst_18947__$1); + +return statearr_19022; +})(); +if(cljs.core.truth_(inst_18948)){ +var statearr_19023_19073 = state_19016__$1; +(statearr_19023_19073[(1)] = (5)); + +} else { +var statearr_19024_19074 = state_19016__$1; +(statearr_19024_19074[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (15))){ +var inst_18989 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +var statearr_19025_19075 = state_19016__$1; +(statearr_19025_19075[(2)] = inst_18989); + +(statearr_19025_19075[(1)] = (12)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (21))){ +var inst_19009 = (state_19016[(2)]); +var state_19016__$1 = (function (){var statearr_19026 = state_19016; +(statearr_19026[(9)] = inst_19009); + +return statearr_19026; +})(); +var statearr_19027_19076 = state_19016__$1; +(statearr_19027_19076[(2)] = null); + +(statearr_19027_19076[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (13))){ +var inst_18971 = (state_19016[(10)]); +var inst_18973 = cljs.core.chunked_seq_QMARK_(inst_18971); +var state_19016__$1 = state_19016; +if(inst_18973){ +var statearr_19028_19077 = state_19016__$1; +(statearr_19028_19077[(1)] = (16)); + +} else { +var statearr_19029_19078 = state_19016__$1; +(statearr_19029_19078[(1)] = (17)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (22))){ +var inst_19001 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +if(cljs.core.truth_(inst_19001)){ +var statearr_19030_19079 = state_19016__$1; +(statearr_19030_19079[(1)] = (23)); + +} else { +var statearr_19031_19080 = state_19016__$1; +(statearr_19031_19080[(1)] = (24)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (6))){ +var inst_18995 = (state_19016[(7)]); +var inst_18947 = (state_19016[(8)]); +var inst_18997 = (state_19016[(11)]); +var inst_18995__$1 = (topic_fn.cljs$core$IFn$_invoke$arity$1 ? topic_fn.cljs$core$IFn$_invoke$arity$1(inst_18947) : topic_fn.call(null,inst_18947)); +var inst_18996 = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(mults) : cljs.core.deref.call(null,mults)); +var inst_18997__$1 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(inst_18996,inst_18995__$1); +var state_19016__$1 = (function (){var statearr_19032 = state_19016; +(statearr_19032[(7)] = inst_18995__$1); + +(statearr_19032[(11)] = inst_18997__$1); + +return statearr_19032; +})(); +if(cljs.core.truth_(inst_18997__$1)){ +var statearr_19033_19081 = state_19016__$1; +(statearr_19033_19081[(1)] = (19)); + +} else { +var statearr_19034_19082 = state_19016__$1; +(statearr_19034_19082[(1)] = (20)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (25))){ +var inst_19006 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +var statearr_19035_19083 = state_19016__$1; +(statearr_19035_19083[(2)] = inst_19006); + +(statearr_19035_19083[(1)] = (21)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (17))){ +var inst_18971 = (state_19016[(10)]); +var inst_18980 = cljs.core.first(inst_18971); +var inst_18981 = cljs.core.async.muxch_STAR_(inst_18980); +var inst_18982 = cljs.core.async.close_BANG_(inst_18981); +var inst_18983 = cljs.core.next(inst_18971); +var inst_18957 = inst_18983; +var inst_18958 = null; +var inst_18959 = (0); +var inst_18960 = (0); +var state_19016__$1 = (function (){var statearr_19036 = state_19016; +(statearr_19036[(12)] = inst_18958); + +(statearr_19036[(13)] = inst_18957); + +(statearr_19036[(14)] = inst_18959); + +(statearr_19036[(15)] = inst_18960); + +(statearr_19036[(16)] = inst_18982); + +return statearr_19036; +})(); +var statearr_19037_19084 = state_19016__$1; +(statearr_19037_19084[(2)] = null); + +(statearr_19037_19084[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (3))){ +var inst_19014 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +return cljs.core.async.impl.ioc_helpers.return_chan(state_19016__$1,inst_19014); +} else { +if((state_val_19017 === (12))){ +var inst_18991 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +var statearr_19038_19085 = state_19016__$1; +(statearr_19038_19085[(2)] = inst_18991); + +(statearr_19038_19085[(1)] = (9)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (2))){ +var state_19016__$1 = state_19016; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19016__$1,(4),ch); +} else { +if((state_val_19017 === (23))){ +var state_19016__$1 = state_19016; +var statearr_19039_19086 = state_19016__$1; +(statearr_19039_19086[(2)] = null); + +(statearr_19039_19086[(1)] = (25)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (19))){ +var inst_18947 = (state_19016[(8)]); +var inst_18997 = (state_19016[(11)]); +var inst_18999 = cljs.core.async.muxch_STAR_(inst_18997); +var state_19016__$1 = state_19016; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19016__$1,(22),inst_18999,inst_18947); +} else { +if((state_val_19017 === (11))){ +var inst_18957 = (state_19016[(13)]); +var inst_18971 = (state_19016[(10)]); +var inst_18971__$1 = cljs.core.seq(inst_18957); +var state_19016__$1 = (function (){var statearr_19040 = state_19016; +(statearr_19040[(10)] = inst_18971__$1); + +return statearr_19040; +})(); +if(inst_18971__$1){ +var statearr_19041_19087 = state_19016__$1; +(statearr_19041_19087[(1)] = (13)); + +} else { +var statearr_19042_19088 = state_19016__$1; +(statearr_19042_19088[(1)] = (14)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (9))){ +var inst_18993 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +var statearr_19043_19089 = state_19016__$1; +(statearr_19043_19089[(2)] = inst_18993); + +(statearr_19043_19089[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (5))){ +var inst_18954 = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(mults) : cljs.core.deref.call(null,mults)); +var inst_18955 = cljs.core.vals(inst_18954); +var inst_18956 = cljs.core.seq(inst_18955); +var inst_18957 = inst_18956; +var inst_18958 = null; +var inst_18959 = (0); +var inst_18960 = (0); +var state_19016__$1 = (function (){var statearr_19044 = state_19016; +(statearr_19044[(12)] = inst_18958); + +(statearr_19044[(13)] = inst_18957); + +(statearr_19044[(14)] = inst_18959); + +(statearr_19044[(15)] = inst_18960); + +return statearr_19044; +})(); +var statearr_19045_19090 = state_19016__$1; +(statearr_19045_19090[(2)] = null); + +(statearr_19045_19090[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (14))){ +var state_19016__$1 = state_19016; +var statearr_19049_19091 = state_19016__$1; +(statearr_19049_19091[(2)] = null); + +(statearr_19049_19091[(1)] = (15)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (16))){ +var inst_18971 = (state_19016[(10)]); +var inst_18975 = cljs.core.chunk_first(inst_18971); +var inst_18976 = cljs.core.chunk_rest(inst_18971); +var inst_18977 = cljs.core.count(inst_18975); +var inst_18957 = inst_18976; +var inst_18958 = inst_18975; +var inst_18959 = inst_18977; +var inst_18960 = (0); +var state_19016__$1 = (function (){var statearr_19050 = state_19016; +(statearr_19050[(12)] = inst_18958); + +(statearr_19050[(13)] = inst_18957); + +(statearr_19050[(14)] = inst_18959); + +(statearr_19050[(15)] = inst_18960); + +return statearr_19050; +})(); +var statearr_19051_19092 = state_19016__$1; +(statearr_19051_19092[(2)] = null); + +(statearr_19051_19092[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (10))){ +var inst_18958 = (state_19016[(12)]); +var inst_18957 = (state_19016[(13)]); +var inst_18959 = (state_19016[(14)]); +var inst_18960 = (state_19016[(15)]); +var inst_18965 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(inst_18958,inst_18960); +var inst_18966 = cljs.core.async.muxch_STAR_(inst_18965); +var inst_18967 = cljs.core.async.close_BANG_(inst_18966); +var inst_18968 = (inst_18960 + (1)); +var tmp19046 = inst_18958; +var tmp19047 = inst_18957; +var tmp19048 = inst_18959; +var inst_18957__$1 = tmp19047; +var inst_18958__$1 = tmp19046; +var inst_18959__$1 = tmp19048; +var inst_18960__$1 = inst_18968; +var state_19016__$1 = (function (){var statearr_19052 = state_19016; +(statearr_19052[(12)] = inst_18958__$1); + +(statearr_19052[(13)] = inst_18957__$1); + +(statearr_19052[(14)] = inst_18959__$1); + +(statearr_19052[(15)] = inst_18960__$1); + +(statearr_19052[(17)] = inst_18967); + +return statearr_19052; +})(); +var statearr_19053_19093 = state_19016__$1; +(statearr_19053_19093[(2)] = null); + +(statearr_19053_19093[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (18))){ +var inst_18986 = (state_19016[(2)]); +var state_19016__$1 = state_19016; +var statearr_19054_19094 = state_19016__$1; +(statearr_19054_19094[(2)] = inst_18986); + +(statearr_19054_19094[(1)] = (15)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19017 === (8))){ +var inst_18959 = (state_19016[(14)]); +var inst_18960 = (state_19016[(15)]); +var inst_18962 = (inst_18960 < inst_18959); +var inst_18963 = inst_18962; +var state_19016__$1 = state_19016; +if(cljs.core.truth_(inst_18963)){ +var statearr_19055_19095 = state_19016__$1; +(statearr_19055_19095[(1)] = (10)); + +} else { +var statearr_19056_19096 = state_19016__$1; +(statearr_19056_19096[(1)] = (11)); + +} + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19068,mults,ensure_mult,p)) +; +return ((function (switch__16949__auto__,c__17075__auto___19068,mults,ensure_mult,p){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19060 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19060[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19060[(1)] = (1)); + +return statearr_19060; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19016){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19016); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19061){if((e19061 instanceof Object)){ +var ex__16953__auto__ = e19061; +var statearr_19062_19097 = state_19016; +(statearr_19062_19097[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19016); + +return cljs.core.cst$kw$recur; +} else { +throw e19061; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19098 = state_19016; +state_19016 = G__19098; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19016){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19016); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19068,mults,ensure_mult,p)) +})(); +var state__17077__auto__ = (function (){var statearr_19063 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19063[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19068); + +return statearr_19063; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19068,mults,ensure_mult,p)) +); + + +return p; +}); + +cljs.core.async.pub.cljs$lang$maxFixedArity = 3; + +/** + * Subscribes a channel to a topic of a pub. + * + * By default the channel will be closed when the source closes, + * but can be determined by the close? parameter. + */ +cljs.core.async.sub = (function cljs$core$async$sub(var_args){ +var args19099 = []; +var len__9181__auto___19102 = arguments.length; +var i__9182__auto___19103 = (0); +while(true){ +if((i__9182__auto___19103 < len__9181__auto___19102)){ +args19099.push((arguments[i__9182__auto___19103])); + +var G__19104 = (i__9182__auto___19103 + (1)); +i__9182__auto___19103 = G__19104; +continue; +} else { +} +break; +} + +var G__19101 = args19099.length; +switch (G__19101) { +case 3: +return cljs.core.async.sub.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.async.sub.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19099.length)].join(''))); + +} +}); + +cljs.core.async.sub.cljs$core$IFn$_invoke$arity$3 = (function (p,topic,ch){ +return cljs.core.async.sub.cljs$core$IFn$_invoke$arity$4(p,topic,ch,true); +}); + +cljs.core.async.sub.cljs$core$IFn$_invoke$arity$4 = (function (p,topic,ch,close_QMARK_){ +return cljs.core.async.sub_STAR_(p,topic,ch,close_QMARK_); +}); + +cljs.core.async.sub.cljs$lang$maxFixedArity = 4; + +/** + * Unsubscribes a channel from a topic of a pub + */ +cljs.core.async.unsub = (function cljs$core$async$unsub(p,topic,ch){ +return cljs.core.async.unsub_STAR_(p,topic,ch); +}); +/** + * Unsubscribes all channels from a pub, or a topic of a pub + */ +cljs.core.async.unsub_all = (function cljs$core$async$unsub_all(var_args){ +var args19106 = []; +var len__9181__auto___19109 = arguments.length; +var i__9182__auto___19110 = (0); +while(true){ +if((i__9182__auto___19110 < len__9181__auto___19109)){ +args19106.push((arguments[i__9182__auto___19110])); + +var G__19111 = (i__9182__auto___19110 + (1)); +i__9182__auto___19110 = G__19111; +continue; +} else { +} +break; +} + +var G__19108 = args19106.length; +switch (G__19108) { +case 1: +return cljs.core.async.unsub_all.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.unsub_all.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19106.length)].join(''))); + +} +}); + +cljs.core.async.unsub_all.cljs$core$IFn$_invoke$arity$1 = (function (p){ +return cljs.core.async.unsub_all_STAR_.cljs$core$IFn$_invoke$arity$1(p); +}); + +cljs.core.async.unsub_all.cljs$core$IFn$_invoke$arity$2 = (function (p,topic){ +return cljs.core.async.unsub_all_STAR_.cljs$core$IFn$_invoke$arity$2(p,topic); +}); + +cljs.core.async.unsub_all.cljs$lang$maxFixedArity = 2; + +/** + * Takes a function and a collection of source channels, and returns a + * channel which contains the values produced by applying f to the set + * of first items taken from each source channel, followed by applying + * f to the set of second items from each channel, until any one of the + * channels is closed, at which point the output channel will be + * closed. The returned channel will be unbuffered by default, or a + * buf-or-n can be supplied + */ +cljs.core.async.map = (function cljs$core$async$map(var_args){ +var args19113 = []; +var len__9181__auto___19184 = arguments.length; +var i__9182__auto___19185 = (0); +while(true){ +if((i__9182__auto___19185 < len__9181__auto___19184)){ +args19113.push((arguments[i__9182__auto___19185])); + +var G__19186 = (i__9182__auto___19185 + (1)); +i__9182__auto___19185 = G__19186; +continue; +} else { +} +break; +} + +var G__19115 = args19113.length; +switch (G__19115) { +case 2: +return cljs.core.async.map.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.map.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19113.length)].join(''))); + +} +}); + +cljs.core.async.map.cljs$core$IFn$_invoke$arity$2 = (function (f,chs){ +return cljs.core.async.map.cljs$core$IFn$_invoke$arity$3(f,chs,null); +}); + +cljs.core.async.map.cljs$core$IFn$_invoke$arity$3 = (function (f,chs,buf_or_n){ +var chs__$1 = cljs.core.vec(chs); +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +var cnt = cljs.core.count(chs__$1); +var rets = cljs.core.object_array.cljs$core$IFn$_invoke$arity$1(cnt); +var dchan = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +var dctr = (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(null) : cljs.core.atom.call(null,null)); +var done = cljs.core.mapv.cljs$core$IFn$_invoke$arity$2(((function (chs__$1,out,cnt,rets,dchan,dctr){ +return (function (i){ +return ((function (chs__$1,out,cnt,rets,dchan,dctr){ +return (function (ret){ +(rets[i] = ret); + +if((cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(dctr,cljs.core.dec) === (0))){ +return cljs.core.async.put_BANG_.cljs$core$IFn$_invoke$arity$2(dchan,rets.slice((0))); +} else { +return null; +} +}); +;})(chs__$1,out,cnt,rets,dchan,dctr)) +});})(chs__$1,out,cnt,rets,dchan,dctr)) +,cljs.core.range.cljs$core$IFn$_invoke$arity$1(cnt)); +var c__17075__auto___19188 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19188,chs__$1,out,cnt,rets,dchan,dctr,done){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19188,chs__$1,out,cnt,rets,dchan,dctr,done){ +return (function (state_19154){ +var state_val_19155 = (state_19154[(1)]); +if((state_val_19155 === (7))){ +var state_19154__$1 = state_19154; +var statearr_19156_19189 = state_19154__$1; +(statearr_19156_19189[(2)] = null); + +(statearr_19156_19189[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (1))){ +var state_19154__$1 = state_19154; +var statearr_19157_19190 = state_19154__$1; +(statearr_19157_19190[(2)] = null); + +(statearr_19157_19190[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (4))){ +var inst_19118 = (state_19154[(7)]); +var inst_19120 = (inst_19118 < cnt); +var state_19154__$1 = state_19154; +if(cljs.core.truth_(inst_19120)){ +var statearr_19158_19191 = state_19154__$1; +(statearr_19158_19191[(1)] = (6)); + +} else { +var statearr_19159_19192 = state_19154__$1; +(statearr_19159_19192[(1)] = (7)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (15))){ +var inst_19150 = (state_19154[(2)]); +var state_19154__$1 = state_19154; +var statearr_19160_19193 = state_19154__$1; +(statearr_19160_19193[(2)] = inst_19150); + +(statearr_19160_19193[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (13))){ +var inst_19143 = cljs.core.async.close_BANG_(out); +var state_19154__$1 = state_19154; +var statearr_19161_19194 = state_19154__$1; +(statearr_19161_19194[(2)] = inst_19143); + +(statearr_19161_19194[(1)] = (15)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (6))){ +var state_19154__$1 = state_19154; +var statearr_19162_19195 = state_19154__$1; +(statearr_19162_19195[(2)] = null); + +(statearr_19162_19195[(1)] = (11)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (3))){ +var inst_19152 = (state_19154[(2)]); +var state_19154__$1 = state_19154; +return cljs.core.async.impl.ioc_helpers.return_chan(state_19154__$1,inst_19152); +} else { +if((state_val_19155 === (12))){ +var inst_19140 = (state_19154[(8)]); +var inst_19140__$1 = (state_19154[(2)]); +var inst_19141 = cljs.core.some(cljs.core.nil_QMARK_,inst_19140__$1); +var state_19154__$1 = (function (){var statearr_19163 = state_19154; +(statearr_19163[(8)] = inst_19140__$1); + +return statearr_19163; +})(); +if(cljs.core.truth_(inst_19141)){ +var statearr_19164_19196 = state_19154__$1; +(statearr_19164_19196[(1)] = (13)); + +} else { +var statearr_19165_19197 = state_19154__$1; +(statearr_19165_19197[(1)] = (14)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (2))){ +var inst_19117 = (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(dctr,cnt) : cljs.core.reset_BANG_.call(null,dctr,cnt)); +var inst_19118 = (0); +var state_19154__$1 = (function (){var statearr_19166 = state_19154; +(statearr_19166[(7)] = inst_19118); + +(statearr_19166[(9)] = inst_19117); + +return statearr_19166; +})(); +var statearr_19167_19198 = state_19154__$1; +(statearr_19167_19198[(2)] = null); + +(statearr_19167_19198[(1)] = (4)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (11))){ +var inst_19118 = (state_19154[(7)]); +var _ = cljs.core.async.impl.ioc_helpers.add_exception_frame(state_19154,(10),Object,null,(9)); +var inst_19127 = (chs__$1.cljs$core$IFn$_invoke$arity$1 ? chs__$1.cljs$core$IFn$_invoke$arity$1(inst_19118) : chs__$1.call(null,inst_19118)); +var inst_19128 = (done.cljs$core$IFn$_invoke$arity$1 ? done.cljs$core$IFn$_invoke$arity$1(inst_19118) : done.call(null,inst_19118)); +var inst_19129 = cljs.core.async.take_BANG_.cljs$core$IFn$_invoke$arity$2(inst_19127,inst_19128); +var state_19154__$1 = state_19154; +var statearr_19168_19199 = state_19154__$1; +(statearr_19168_19199[(2)] = inst_19129); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19154__$1); + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (9))){ +var inst_19118 = (state_19154[(7)]); +var inst_19131 = (state_19154[(2)]); +var inst_19132 = (inst_19118 + (1)); +var inst_19118__$1 = inst_19132; +var state_19154__$1 = (function (){var statearr_19169 = state_19154; +(statearr_19169[(7)] = inst_19118__$1); + +(statearr_19169[(10)] = inst_19131); + +return statearr_19169; +})(); +var statearr_19170_19200 = state_19154__$1; +(statearr_19170_19200[(2)] = null); + +(statearr_19170_19200[(1)] = (4)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (5))){ +var inst_19138 = (state_19154[(2)]); +var state_19154__$1 = (function (){var statearr_19171 = state_19154; +(statearr_19171[(11)] = inst_19138); + +return statearr_19171; +})(); +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19154__$1,(12),dchan); +} else { +if((state_val_19155 === (14))){ +var inst_19140 = (state_19154[(8)]); +var inst_19145 = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(f,inst_19140); +var state_19154__$1 = state_19154; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19154__$1,(16),out,inst_19145); +} else { +if((state_val_19155 === (16))){ +var inst_19147 = (state_19154[(2)]); +var state_19154__$1 = (function (){var statearr_19172 = state_19154; +(statearr_19172[(12)] = inst_19147); + +return statearr_19172; +})(); +var statearr_19173_19201 = state_19154__$1; +(statearr_19173_19201[(2)] = null); + +(statearr_19173_19201[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (10))){ +var inst_19122 = (state_19154[(2)]); +var inst_19123 = cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(dctr,cljs.core.dec); +var state_19154__$1 = (function (){var statearr_19174 = state_19154; +(statearr_19174[(13)] = inst_19122); + +return statearr_19174; +})(); +var statearr_19175_19202 = state_19154__$1; +(statearr_19175_19202[(2)] = inst_19123); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19154__$1); + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19155 === (8))){ +var inst_19136 = (state_19154[(2)]); +var state_19154__$1 = state_19154; +var statearr_19176_19203 = state_19154__$1; +(statearr_19176_19203[(2)] = inst_19136); + +(statearr_19176_19203[(1)] = (5)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19188,chs__$1,out,cnt,rets,dchan,dctr,done)) +; +return ((function (switch__16949__auto__,c__17075__auto___19188,chs__$1,out,cnt,rets,dchan,dctr,done){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19180 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19180[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19180[(1)] = (1)); + +return statearr_19180; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19154){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19154); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19181){if((e19181 instanceof Object)){ +var ex__16953__auto__ = e19181; +var statearr_19182_19204 = state_19154; +(statearr_19182_19204[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19154); + +return cljs.core.cst$kw$recur; +} else { +throw e19181; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19205 = state_19154; +state_19154 = G__19205; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19154){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19154); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19188,chs__$1,out,cnt,rets,dchan,dctr,done)) +})(); +var state__17077__auto__ = (function (){var statearr_19183 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19183[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19188); + +return statearr_19183; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19188,chs__$1,out,cnt,rets,dchan,dctr,done)) +); + + +return out; +}); + +cljs.core.async.map.cljs$lang$maxFixedArity = 3; + +/** + * Takes a collection of source channels and returns a channel which + * contains all values taken from them. The returned channel will be + * unbuffered by default, or a buf-or-n can be supplied. The channel + * will close after all the source channels have closed. + */ +cljs.core.async.merge = (function cljs$core$async$merge(var_args){ +var args19207 = []; +var len__9181__auto___19265 = arguments.length; +var i__9182__auto___19266 = (0); +while(true){ +if((i__9182__auto___19266 < len__9181__auto___19265)){ +args19207.push((arguments[i__9182__auto___19266])); + +var G__19267 = (i__9182__auto___19266 + (1)); +i__9182__auto___19266 = G__19267; +continue; +} else { +} +break; +} + +var G__19209 = args19207.length; +switch (G__19209) { +case 1: +return cljs.core.async.merge.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.merge.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19207.length)].join(''))); + +} +}); + +cljs.core.async.merge.cljs$core$IFn$_invoke$arity$1 = (function (chs){ +return cljs.core.async.merge.cljs$core$IFn$_invoke$arity$2(chs,null); +}); + +cljs.core.async.merge.cljs$core$IFn$_invoke$arity$2 = (function (chs,buf_or_n){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +var c__17075__auto___19269 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19269,out){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19269,out){ +return (function (state_19241){ +var state_val_19242 = (state_19241[(1)]); +if((state_val_19242 === (7))){ +var inst_19221 = (state_19241[(7)]); +var inst_19220 = (state_19241[(8)]); +var inst_19220__$1 = (state_19241[(2)]); +var inst_19221__$1 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_19220__$1,(0),null); +var inst_19222 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(inst_19220__$1,(1),null); +var inst_19223 = (inst_19221__$1 == null); +var state_19241__$1 = (function (){var statearr_19243 = state_19241; +(statearr_19243[(7)] = inst_19221__$1); + +(statearr_19243[(9)] = inst_19222); + +(statearr_19243[(8)] = inst_19220__$1); + +return statearr_19243; +})(); +if(cljs.core.truth_(inst_19223)){ +var statearr_19244_19270 = state_19241__$1; +(statearr_19244_19270[(1)] = (8)); + +} else { +var statearr_19245_19271 = state_19241__$1; +(statearr_19245_19271[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19242 === (1))){ +var inst_19210 = cljs.core.vec(chs); +var inst_19211 = inst_19210; +var state_19241__$1 = (function (){var statearr_19246 = state_19241; +(statearr_19246[(10)] = inst_19211); + +return statearr_19246; +})(); +var statearr_19247_19272 = state_19241__$1; +(statearr_19247_19272[(2)] = null); + +(statearr_19247_19272[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19242 === (4))){ +var inst_19211 = (state_19241[(10)]); +var state_19241__$1 = state_19241; +return cljs.core.async.ioc_alts_BANG_(state_19241__$1,(7),inst_19211); +} else { +if((state_val_19242 === (6))){ +var inst_19237 = (state_19241[(2)]); +var state_19241__$1 = state_19241; +var statearr_19248_19273 = state_19241__$1; +(statearr_19248_19273[(2)] = inst_19237); + +(statearr_19248_19273[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19242 === (3))){ +var inst_19239 = (state_19241[(2)]); +var state_19241__$1 = state_19241; +return cljs.core.async.impl.ioc_helpers.return_chan(state_19241__$1,inst_19239); +} else { +if((state_val_19242 === (2))){ +var inst_19211 = (state_19241[(10)]); +var inst_19213 = cljs.core.count(inst_19211); +var inst_19214 = (inst_19213 > (0)); +var state_19241__$1 = state_19241; +if(cljs.core.truth_(inst_19214)){ +var statearr_19250_19274 = state_19241__$1; +(statearr_19250_19274[(1)] = (4)); + +} else { +var statearr_19251_19275 = state_19241__$1; +(statearr_19251_19275[(1)] = (5)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19242 === (11))){ +var inst_19211 = (state_19241[(10)]); +var inst_19230 = (state_19241[(2)]); +var tmp19249 = inst_19211; +var inst_19211__$1 = tmp19249; +var state_19241__$1 = (function (){var statearr_19252 = state_19241; +(statearr_19252[(11)] = inst_19230); + +(statearr_19252[(10)] = inst_19211__$1); + +return statearr_19252; +})(); +var statearr_19253_19276 = state_19241__$1; +(statearr_19253_19276[(2)] = null); + +(statearr_19253_19276[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19242 === (9))){ +var inst_19221 = (state_19241[(7)]); +var state_19241__$1 = state_19241; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19241__$1,(11),out,inst_19221); +} else { +if((state_val_19242 === (5))){ +var inst_19235 = cljs.core.async.close_BANG_(out); +var state_19241__$1 = state_19241; +var statearr_19254_19277 = state_19241__$1; +(statearr_19254_19277[(2)] = inst_19235); + +(statearr_19254_19277[(1)] = (6)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19242 === (10))){ +var inst_19233 = (state_19241[(2)]); +var state_19241__$1 = state_19241; +var statearr_19255_19278 = state_19241__$1; +(statearr_19255_19278[(2)] = inst_19233); + +(statearr_19255_19278[(1)] = (6)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19242 === (8))){ +var inst_19221 = (state_19241[(7)]); +var inst_19211 = (state_19241[(10)]); +var inst_19222 = (state_19241[(9)]); +var inst_19220 = (state_19241[(8)]); +var inst_19225 = (function (){var cs = inst_19211; +var vec__19216 = inst_19220; +var v = inst_19221; +var c = inst_19222; +return ((function (cs,vec__19216,v,c,inst_19221,inst_19211,inst_19222,inst_19220,state_val_19242,c__17075__auto___19269,out){ +return (function (p1__19206_SHARP_){ +return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(c,p1__19206_SHARP_); +}); +;})(cs,vec__19216,v,c,inst_19221,inst_19211,inst_19222,inst_19220,state_val_19242,c__17075__auto___19269,out)) +})(); +var inst_19226 = cljs.core.filterv(inst_19225,inst_19211); +var inst_19211__$1 = inst_19226; +var state_19241__$1 = (function (){var statearr_19256 = state_19241; +(statearr_19256[(10)] = inst_19211__$1); + +return statearr_19256; +})(); +var statearr_19257_19279 = state_19241__$1; +(statearr_19257_19279[(2)] = null); + +(statearr_19257_19279[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19269,out)) +; +return ((function (switch__16949__auto__,c__17075__auto___19269,out){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19261 = [null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19261[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19261[(1)] = (1)); + +return statearr_19261; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19241){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19241); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19262){if((e19262 instanceof Object)){ +var ex__16953__auto__ = e19262; +var statearr_19263_19280 = state_19241; +(statearr_19263_19280[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19241); + +return cljs.core.cst$kw$recur; +} else { +throw e19262; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19281 = state_19241; +state_19241 = G__19281; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19241){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19241); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19269,out)) +})(); +var state__17077__auto__ = (function (){var statearr_19264 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19264[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19269); + +return statearr_19264; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19269,out)) +); + + +return out; +}); + +cljs.core.async.merge.cljs$lang$maxFixedArity = 2; + +/** + * Returns a channel containing the single (collection) result of the + * items taken from the channel conjoined to the supplied + * collection. ch must close before into produces a result. + */ +cljs.core.async.into = (function cljs$core$async$into(coll,ch){ +return cljs.core.async.reduce(cljs.core.conj,coll,ch); +}); +/** + * Returns a channel that will return, at most, n items from ch. After n items + * have been returned, or ch has been closed, the return chanel will close. + * + * The output channel is unbuffered by default, unless buf-or-n is given. + */ +cljs.core.async.take = (function cljs$core$async$take(var_args){ +var args19282 = []; +var len__9181__auto___19331 = arguments.length; +var i__9182__auto___19332 = (0); +while(true){ +if((i__9182__auto___19332 < len__9181__auto___19331)){ +args19282.push((arguments[i__9182__auto___19332])); + +var G__19333 = (i__9182__auto___19332 + (1)); +i__9182__auto___19332 = G__19333; +continue; +} else { +} +break; +} + +var G__19284 = args19282.length; +switch (G__19284) { +case 2: +return cljs.core.async.take.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.take.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19282.length)].join(''))); + +} +}); + +cljs.core.async.take.cljs$core$IFn$_invoke$arity$2 = (function (n,ch){ +return cljs.core.async.take.cljs$core$IFn$_invoke$arity$3(n,ch,null); +}); + +cljs.core.async.take.cljs$core$IFn$_invoke$arity$3 = (function (n,ch,buf_or_n){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +var c__17075__auto___19335 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19335,out){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19335,out){ +return (function (state_19308){ +var state_val_19309 = (state_19308[(1)]); +if((state_val_19309 === (7))){ +var inst_19290 = (state_19308[(7)]); +var inst_19290__$1 = (state_19308[(2)]); +var inst_19291 = (inst_19290__$1 == null); +var inst_19292 = cljs.core.not(inst_19291); +var state_19308__$1 = (function (){var statearr_19310 = state_19308; +(statearr_19310[(7)] = inst_19290__$1); + +return statearr_19310; +})(); +if(inst_19292){ +var statearr_19311_19336 = state_19308__$1; +(statearr_19311_19336[(1)] = (8)); + +} else { +var statearr_19312_19337 = state_19308__$1; +(statearr_19312_19337[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (1))){ +var inst_19285 = (0); +var state_19308__$1 = (function (){var statearr_19313 = state_19308; +(statearr_19313[(8)] = inst_19285); + +return statearr_19313; +})(); +var statearr_19314_19338 = state_19308__$1; +(statearr_19314_19338[(2)] = null); + +(statearr_19314_19338[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (4))){ +var state_19308__$1 = state_19308; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19308__$1,(7),ch); +} else { +if((state_val_19309 === (6))){ +var inst_19303 = (state_19308[(2)]); +var state_19308__$1 = state_19308; +var statearr_19315_19339 = state_19308__$1; +(statearr_19315_19339[(2)] = inst_19303); + +(statearr_19315_19339[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (3))){ +var inst_19305 = (state_19308[(2)]); +var inst_19306 = cljs.core.async.close_BANG_(out); +var state_19308__$1 = (function (){var statearr_19316 = state_19308; +(statearr_19316[(9)] = inst_19305); + +return statearr_19316; +})(); +return cljs.core.async.impl.ioc_helpers.return_chan(state_19308__$1,inst_19306); +} else { +if((state_val_19309 === (2))){ +var inst_19285 = (state_19308[(8)]); +var inst_19287 = (inst_19285 < n); +var state_19308__$1 = state_19308; +if(cljs.core.truth_(inst_19287)){ +var statearr_19317_19340 = state_19308__$1; +(statearr_19317_19340[(1)] = (4)); + +} else { +var statearr_19318_19341 = state_19308__$1; +(statearr_19318_19341[(1)] = (5)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (11))){ +var inst_19285 = (state_19308[(8)]); +var inst_19295 = (state_19308[(2)]); +var inst_19296 = (inst_19285 + (1)); +var inst_19285__$1 = inst_19296; +var state_19308__$1 = (function (){var statearr_19319 = state_19308; +(statearr_19319[(10)] = inst_19295); + +(statearr_19319[(8)] = inst_19285__$1); + +return statearr_19319; +})(); +var statearr_19320_19342 = state_19308__$1; +(statearr_19320_19342[(2)] = null); + +(statearr_19320_19342[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (9))){ +var state_19308__$1 = state_19308; +var statearr_19321_19343 = state_19308__$1; +(statearr_19321_19343[(2)] = null); + +(statearr_19321_19343[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (5))){ +var state_19308__$1 = state_19308; +var statearr_19322_19344 = state_19308__$1; +(statearr_19322_19344[(2)] = null); + +(statearr_19322_19344[(1)] = (6)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (10))){ +var inst_19300 = (state_19308[(2)]); +var state_19308__$1 = state_19308; +var statearr_19323_19345 = state_19308__$1; +(statearr_19323_19345[(2)] = inst_19300); + +(statearr_19323_19345[(1)] = (6)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19309 === (8))){ +var inst_19290 = (state_19308[(7)]); +var state_19308__$1 = state_19308; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19308__$1,(11),out,inst_19290); +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19335,out)) +; +return ((function (switch__16949__auto__,c__17075__auto___19335,out){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19327 = [null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19327[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19327[(1)] = (1)); + +return statearr_19327; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19308){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19308); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19328){if((e19328 instanceof Object)){ +var ex__16953__auto__ = e19328; +var statearr_19329_19346 = state_19308; +(statearr_19329_19346[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19308); + +return cljs.core.cst$kw$recur; +} else { +throw e19328; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19347 = state_19308; +state_19308 = G__19347; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19308){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19308); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19335,out)) +})(); +var state__17077__auto__ = (function (){var statearr_19330 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19330[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19335); + +return statearr_19330; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19335,out)) +); + + +return out; +}); + +cljs.core.async.take.cljs$lang$maxFixedArity = 3; + +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.map_LT_ = (function cljs$core$async$map_LT_(f,ch){ +if(typeof cljs.core.async.t_cljs$core$async19357 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Channel} + * @implements {cljs.core.async.impl.protocols.WritePort} + * @implements {cljs.core.async.impl.protocols.ReadPort} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async19357 = (function (f,ch,meta19358){ +this.f = f; +this.ch = ch; +this.meta19358 = meta19358; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_19359,meta19358__$1){ +var self__ = this; +var _19359__$1 = this; +return (new cljs.core.async.t_cljs$core$async19357(self__.f,self__.ch,meta19358__$1)); +}); + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_19359){ +var self__ = this; +var _19359__$1 = this; +return self__.meta19358; +}); + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$async$impl$protocols$Channel$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.close_BANG_(self__.ch); +}); + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.closed_QMARK_(self__.ch); +}); + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$async$impl$protocols$ReadPort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 = (function (_,fn1){ +var self__ = this; +var ___$1 = this; +var ret = cljs.core.async.impl.protocols.take_BANG_(self__.ch,(function (){ +if(typeof cljs.core.async.t_cljs$core$async19360 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Handler} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async19360 = (function (f,ch,meta19358,_,fn1,meta19361){ +this.f = f; +this.ch = ch; +this.meta19358 = meta19358; +this._ = _; +this.fn1 = fn1; +this.meta19361 = meta19361; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async19360.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = ((function (___$1){ +return (function (_19362,meta19361__$1){ +var self__ = this; +var _19362__$1 = this; +return (new cljs.core.async.t_cljs$core$async19360(self__.f,self__.ch,self__.meta19358,self__._,self__.fn1,meta19361__$1)); +});})(___$1)) +; + +cljs.core.async.t_cljs$core$async19360.prototype.cljs$core$IMeta$_meta$arity$1 = ((function (___$1){ +return (function (_19362){ +var self__ = this; +var _19362__$1 = this; +return self__.meta19361; +});})(___$1)) +; + +cljs.core.async.t_cljs$core$async19360.prototype.cljs$core$async$impl$protocols$Handler$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19360.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = ((function (___$1){ +return (function (___$1){ +var self__ = this; +var ___$2 = this; +return cljs.core.async.impl.protocols.active_QMARK_(self__.fn1); +});})(___$1)) +; + +cljs.core.async.t_cljs$core$async19360.prototype.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 = ((function (___$1){ +return (function (___$1){ +var self__ = this; +var ___$2 = this; +return true; +});})(___$1)) +; + +cljs.core.async.t_cljs$core$async19360.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = ((function (___$1){ +return (function (___$1){ +var self__ = this; +var ___$2 = this; +var f1 = cljs.core.async.impl.protocols.commit(self__.fn1); +return ((function (f1,___$2,___$1){ +return (function (p1__19348_SHARP_){ +var G__19363 = (((p1__19348_SHARP_ == null))?null:(self__.f.cljs$core$IFn$_invoke$arity$1 ? self__.f.cljs$core$IFn$_invoke$arity$1(p1__19348_SHARP_) : self__.f.call(null,p1__19348_SHARP_))); +return (f1.cljs$core$IFn$_invoke$arity$1 ? f1.cljs$core$IFn$_invoke$arity$1(G__19363) : f1.call(null,G__19363)); +}); +;})(f1,___$2,___$1)) +});})(___$1)) +; + +cljs.core.async.t_cljs$core$async19360.getBasis = ((function (___$1){ +return (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.cst$sym$ch,cljs.core.cst$sym$meta19358,cljs.core.with_meta(cljs.core.cst$sym$_,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$cljs$core$async_SLASH_t_cljs$core$async19357], null)),cljs.core.cst$sym$fn1,cljs.core.cst$sym$meta19361], null); +});})(___$1)) +; + +cljs.core.async.t_cljs$core$async19360.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async19360.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async19360"; + +cljs.core.async.t_cljs$core$async19360.cljs$lang$ctorPrWriter = ((function (___$1){ +return (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async19360"); +});})(___$1)) +; + +cljs.core.async.__GT_t_cljs$core$async19360 = ((function (___$1){ +return (function cljs$core$async$map_LT__$___GT_t_cljs$core$async19360(f__$1,ch__$1,meta19358__$1,___$2,fn1__$1,meta19361){ +return (new cljs.core.async.t_cljs$core$async19360(f__$1,ch__$1,meta19358__$1,___$2,fn1__$1,meta19361)); +});})(___$1)) +; + +} + +return (new cljs.core.async.t_cljs$core$async19360(self__.f,self__.ch,self__.meta19358,___$1,fn1,cljs.core.PersistentArrayMap.EMPTY)); +})() +); +if(cljs.core.truth_((function (){var and__7948__auto__ = ret; +if(cljs.core.truth_(and__7948__auto__)){ +return !(((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(ret) : cljs.core.deref.call(null,ret)) == null)); +} else { +return and__7948__auto__; +} +})())){ +return cljs.core.async.impl.channels.box((function (){var G__19364 = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(ret) : cljs.core.deref.call(null,ret)); +return (self__.f.cljs$core$IFn$_invoke$arity$1 ? self__.f.cljs$core$IFn$_invoke$arity$1(G__19364) : self__.f.call(null,G__19364)); +})()); +} else { +return ret; +} +}); + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$async$impl$protocols$WritePort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19357.prototype.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 = (function (_,val,fn1){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.put_BANG_(self__.ch,val,fn1); +}); + +cljs.core.async.t_cljs$core$async19357.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.cst$sym$ch,cljs.core.cst$sym$meta19358], null); +}); + +cljs.core.async.t_cljs$core$async19357.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async19357.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async19357"; + +cljs.core.async.t_cljs$core$async19357.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async19357"); +}); + +cljs.core.async.__GT_t_cljs$core$async19357 = (function cljs$core$async$map_LT__$___GT_t_cljs$core$async19357(f__$1,ch__$1,meta19358){ +return (new cljs.core.async.t_cljs$core$async19357(f__$1,ch__$1,meta19358)); +}); + +} + +return (new cljs.core.async.t_cljs$core$async19357(f,ch,cljs.core.PersistentArrayMap.EMPTY)); +}); +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.map_GT_ = (function cljs$core$async$map_GT_(f,ch){ +if(typeof cljs.core.async.t_cljs$core$async19368 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Channel} + * @implements {cljs.core.async.impl.protocols.WritePort} + * @implements {cljs.core.async.impl.protocols.ReadPort} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async19368 = (function (f,ch,meta19369){ +this.f = f; +this.ch = ch; +this.meta19369 = meta19369; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_19370,meta19369__$1){ +var self__ = this; +var _19370__$1 = this; +return (new cljs.core.async.t_cljs$core$async19368(self__.f,self__.ch,meta19369__$1)); +}); + +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_19370){ +var self__ = this; +var _19370__$1 = this; +return self__.meta19369; +}); + +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$async$impl$protocols$Channel$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.close_BANG_(self__.ch); +}); + +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$async$impl$protocols$ReadPort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 = (function (_,fn1){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.take_BANG_(self__.ch,fn1); +}); + +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$async$impl$protocols$WritePort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19368.prototype.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 = (function (_,val,fn1){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.put_BANG_(self__.ch,(self__.f.cljs$core$IFn$_invoke$arity$1 ? self__.f.cljs$core$IFn$_invoke$arity$1(val) : self__.f.call(null,val)),fn1); +}); + +cljs.core.async.t_cljs$core$async19368.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.cst$sym$ch,cljs.core.cst$sym$meta19369], null); +}); + +cljs.core.async.t_cljs$core$async19368.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async19368.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async19368"; + +cljs.core.async.t_cljs$core$async19368.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async19368"); +}); + +cljs.core.async.__GT_t_cljs$core$async19368 = (function cljs$core$async$map_GT__$___GT_t_cljs$core$async19368(f__$1,ch__$1,meta19369){ +return (new cljs.core.async.t_cljs$core$async19368(f__$1,ch__$1,meta19369)); +}); + +} + +return (new cljs.core.async.t_cljs$core$async19368(f,ch,cljs.core.PersistentArrayMap.EMPTY)); +}); +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.filter_GT_ = (function cljs$core$async$filter_GT_(p,ch){ +if(typeof cljs.core.async.t_cljs$core$async19374 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Channel} + * @implements {cljs.core.async.impl.protocols.WritePort} + * @implements {cljs.core.async.impl.protocols.ReadPort} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.t_cljs$core$async19374 = (function (p,ch,meta19375){ +this.p = p; +this.ch = ch; +this.meta19375 = meta19375; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_19376,meta19375__$1){ +var self__ = this; +var _19376__$1 = this; +return (new cljs.core.async.t_cljs$core$async19374(self__.p,self__.ch,meta19375__$1)); +}); + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_19376){ +var self__ = this; +var _19376__$1 = this; +return self__.meta19375; +}); + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$async$impl$protocols$Channel$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.close_BANG_(self__.ch); +}); + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.closed_QMARK_(self__.ch); +}); + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$async$impl$protocols$ReadPort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 = (function (_,fn1){ +var self__ = this; +var ___$1 = this; +return cljs.core.async.impl.protocols.take_BANG_(self__.ch,fn1); +}); + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$async$impl$protocols$WritePort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.t_cljs$core$async19374.prototype.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 = (function (_,val,fn1){ +var self__ = this; +var ___$1 = this; +if(cljs.core.truth_((self__.p.cljs$core$IFn$_invoke$arity$1 ? self__.p.cljs$core$IFn$_invoke$arity$1(val) : self__.p.call(null,val)))){ +return cljs.core.async.impl.protocols.put_BANG_(self__.ch,val,fn1); +} else { +return cljs.core.async.impl.channels.box(cljs.core.not(cljs.core.async.impl.protocols.closed_QMARK_(self__.ch))); +} +}); + +cljs.core.async.t_cljs$core$async19374.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$p,cljs.core.cst$sym$ch,cljs.core.cst$sym$meta19375], null); +}); + +cljs.core.async.t_cljs$core$async19374.cljs$lang$type = true; + +cljs.core.async.t_cljs$core$async19374.cljs$lang$ctorStr = "cljs.core.async/t_cljs$core$async19374"; + +cljs.core.async.t_cljs$core$async19374.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async/t_cljs$core$async19374"); +}); + +cljs.core.async.__GT_t_cljs$core$async19374 = (function cljs$core$async$filter_GT__$___GT_t_cljs$core$async19374(p__$1,ch__$1,meta19375){ +return (new cljs.core.async.t_cljs$core$async19374(p__$1,ch__$1,meta19375)); +}); + +} + +return (new cljs.core.async.t_cljs$core$async19374(p,ch,cljs.core.PersistentArrayMap.EMPTY)); +}); +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.remove_GT_ = (function cljs$core$async$remove_GT_(p,ch){ +return cljs.core.async.filter_GT_(cljs.core.complement(p),ch); +}); +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.filter_LT_ = (function cljs$core$async$filter_LT_(var_args){ +var args19377 = []; +var len__9181__auto___19421 = arguments.length; +var i__9182__auto___19422 = (0); +while(true){ +if((i__9182__auto___19422 < len__9181__auto___19421)){ +args19377.push((arguments[i__9182__auto___19422])); + +var G__19423 = (i__9182__auto___19422 + (1)); +i__9182__auto___19422 = G__19423; +continue; +} else { +} +break; +} + +var G__19379 = args19377.length; +switch (G__19379) { +case 2: +return cljs.core.async.filter_LT_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.filter_LT_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19377.length)].join(''))); + +} +}); + +cljs.core.async.filter_LT_.cljs$core$IFn$_invoke$arity$2 = (function (p,ch){ +return cljs.core.async.filter_LT_.cljs$core$IFn$_invoke$arity$3(p,ch,null); +}); + +cljs.core.async.filter_LT_.cljs$core$IFn$_invoke$arity$3 = (function (p,ch,buf_or_n){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +var c__17075__auto___19425 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19425,out){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19425,out){ +return (function (state_19400){ +var state_val_19401 = (state_19400[(1)]); +if((state_val_19401 === (7))){ +var inst_19396 = (state_19400[(2)]); +var state_19400__$1 = state_19400; +var statearr_19402_19426 = state_19400__$1; +(statearr_19402_19426[(2)] = inst_19396); + +(statearr_19402_19426[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (1))){ +var state_19400__$1 = state_19400; +var statearr_19403_19427 = state_19400__$1; +(statearr_19403_19427[(2)] = null); + +(statearr_19403_19427[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (4))){ +var inst_19382 = (state_19400[(7)]); +var inst_19382__$1 = (state_19400[(2)]); +var inst_19383 = (inst_19382__$1 == null); +var state_19400__$1 = (function (){var statearr_19404 = state_19400; +(statearr_19404[(7)] = inst_19382__$1); + +return statearr_19404; +})(); +if(cljs.core.truth_(inst_19383)){ +var statearr_19405_19428 = state_19400__$1; +(statearr_19405_19428[(1)] = (5)); + +} else { +var statearr_19406_19429 = state_19400__$1; +(statearr_19406_19429[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (6))){ +var inst_19382 = (state_19400[(7)]); +var inst_19387 = (p.cljs$core$IFn$_invoke$arity$1 ? p.cljs$core$IFn$_invoke$arity$1(inst_19382) : p.call(null,inst_19382)); +var state_19400__$1 = state_19400; +if(cljs.core.truth_(inst_19387)){ +var statearr_19407_19430 = state_19400__$1; +(statearr_19407_19430[(1)] = (8)); + +} else { +var statearr_19408_19431 = state_19400__$1; +(statearr_19408_19431[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (3))){ +var inst_19398 = (state_19400[(2)]); +var state_19400__$1 = state_19400; +return cljs.core.async.impl.ioc_helpers.return_chan(state_19400__$1,inst_19398); +} else { +if((state_val_19401 === (2))){ +var state_19400__$1 = state_19400; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19400__$1,(4),ch); +} else { +if((state_val_19401 === (11))){ +var inst_19390 = (state_19400[(2)]); +var state_19400__$1 = state_19400; +var statearr_19409_19432 = state_19400__$1; +(statearr_19409_19432[(2)] = inst_19390); + +(statearr_19409_19432[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (9))){ +var state_19400__$1 = state_19400; +var statearr_19410_19433 = state_19400__$1; +(statearr_19410_19433[(2)] = null); + +(statearr_19410_19433[(1)] = (10)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (5))){ +var inst_19385 = cljs.core.async.close_BANG_(out); +var state_19400__$1 = state_19400; +var statearr_19411_19434 = state_19400__$1; +(statearr_19411_19434[(2)] = inst_19385); + +(statearr_19411_19434[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (10))){ +var inst_19393 = (state_19400[(2)]); +var state_19400__$1 = (function (){var statearr_19412 = state_19400; +(statearr_19412[(8)] = inst_19393); + +return statearr_19412; +})(); +var statearr_19413_19435 = state_19400__$1; +(statearr_19413_19435[(2)] = null); + +(statearr_19413_19435[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19401 === (8))){ +var inst_19382 = (state_19400[(7)]); +var state_19400__$1 = state_19400; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19400__$1,(11),out,inst_19382); +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19425,out)) +; +return ((function (switch__16949__auto__,c__17075__auto___19425,out){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19417 = [null,null,null,null,null,null,null,null,null]; +(statearr_19417[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19417[(1)] = (1)); + +return statearr_19417; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19400){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19400); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19418){if((e19418 instanceof Object)){ +var ex__16953__auto__ = e19418; +var statearr_19419_19436 = state_19400; +(statearr_19419_19436[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19400); + +return cljs.core.cst$kw$recur; +} else { +throw e19418; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19437 = state_19400; +state_19400 = G__19437; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19400){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19400); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19425,out)) +})(); +var state__17077__auto__ = (function (){var statearr_19420 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19420[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19425); + +return statearr_19420; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19425,out)) +); + + +return out; +}); + +cljs.core.async.filter_LT_.cljs$lang$maxFixedArity = 3; + +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.remove_LT_ = (function cljs$core$async$remove_LT_(var_args){ +var args19438 = []; +var len__9181__auto___19441 = arguments.length; +var i__9182__auto___19442 = (0); +while(true){ +if((i__9182__auto___19442 < len__9181__auto___19441)){ +args19438.push((arguments[i__9182__auto___19442])); + +var G__19443 = (i__9182__auto___19442 + (1)); +i__9182__auto___19442 = G__19443; +continue; +} else { +} +break; +} + +var G__19440 = args19438.length; +switch (G__19440) { +case 2: +return cljs.core.async.remove_LT_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.remove_LT_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19438.length)].join(''))); + +} +}); + +cljs.core.async.remove_LT_.cljs$core$IFn$_invoke$arity$2 = (function (p,ch){ +return cljs.core.async.remove_LT_.cljs$core$IFn$_invoke$arity$3(p,ch,null); +}); + +cljs.core.async.remove_LT_.cljs$core$IFn$_invoke$arity$3 = (function (p,ch,buf_or_n){ +return cljs.core.async.filter_LT_.cljs$core$IFn$_invoke$arity$3(cljs.core.complement(p),ch,buf_or_n); +}); + +cljs.core.async.remove_LT_.cljs$lang$maxFixedArity = 3; + +cljs.core.async.mapcat_STAR_ = (function cljs$core$async$mapcat_STAR_(f,in$,out){ +var c__17075__auto__ = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto__){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto__){ +return (function (state_19610){ +var state_val_19611 = (state_19610[(1)]); +if((state_val_19611 === (7))){ +var inst_19606 = (state_19610[(2)]); +var state_19610__$1 = state_19610; +var statearr_19612_19653 = state_19610__$1; +(statearr_19612_19653[(2)] = inst_19606); + +(statearr_19612_19653[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (20))){ +var inst_19576 = (state_19610[(7)]); +var inst_19587 = (state_19610[(2)]); +var inst_19588 = cljs.core.next(inst_19576); +var inst_19562 = inst_19588; +var inst_19563 = null; +var inst_19564 = (0); +var inst_19565 = (0); +var state_19610__$1 = (function (){var statearr_19613 = state_19610; +(statearr_19613[(8)] = inst_19565); + +(statearr_19613[(9)] = inst_19564); + +(statearr_19613[(10)] = inst_19563); + +(statearr_19613[(11)] = inst_19587); + +(statearr_19613[(12)] = inst_19562); + +return statearr_19613; +})(); +var statearr_19614_19654 = state_19610__$1; +(statearr_19614_19654[(2)] = null); + +(statearr_19614_19654[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (1))){ +var state_19610__$1 = state_19610; +var statearr_19615_19655 = state_19610__$1; +(statearr_19615_19655[(2)] = null); + +(statearr_19615_19655[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (4))){ +var inst_19551 = (state_19610[(13)]); +var inst_19551__$1 = (state_19610[(2)]); +var inst_19552 = (inst_19551__$1 == null); +var state_19610__$1 = (function (){var statearr_19616 = state_19610; +(statearr_19616[(13)] = inst_19551__$1); + +return statearr_19616; +})(); +if(cljs.core.truth_(inst_19552)){ +var statearr_19617_19656 = state_19610__$1; +(statearr_19617_19656[(1)] = (5)); + +} else { +var statearr_19618_19657 = state_19610__$1; +(statearr_19618_19657[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (15))){ +var state_19610__$1 = state_19610; +var statearr_19622_19658 = state_19610__$1; +(statearr_19622_19658[(2)] = null); + +(statearr_19622_19658[(1)] = (16)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (21))){ +var state_19610__$1 = state_19610; +var statearr_19623_19659 = state_19610__$1; +(statearr_19623_19659[(2)] = null); + +(statearr_19623_19659[(1)] = (23)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (13))){ +var inst_19565 = (state_19610[(8)]); +var inst_19564 = (state_19610[(9)]); +var inst_19563 = (state_19610[(10)]); +var inst_19562 = (state_19610[(12)]); +var inst_19572 = (state_19610[(2)]); +var inst_19573 = (inst_19565 + (1)); +var tmp19619 = inst_19564; +var tmp19620 = inst_19563; +var tmp19621 = inst_19562; +var inst_19562__$1 = tmp19621; +var inst_19563__$1 = tmp19620; +var inst_19564__$1 = tmp19619; +var inst_19565__$1 = inst_19573; +var state_19610__$1 = (function (){var statearr_19624 = state_19610; +(statearr_19624[(8)] = inst_19565__$1); + +(statearr_19624[(9)] = inst_19564__$1); + +(statearr_19624[(10)] = inst_19563__$1); + +(statearr_19624[(14)] = inst_19572); + +(statearr_19624[(12)] = inst_19562__$1); + +return statearr_19624; +})(); +var statearr_19625_19660 = state_19610__$1; +(statearr_19625_19660[(2)] = null); + +(statearr_19625_19660[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (22))){ +var state_19610__$1 = state_19610; +var statearr_19626_19661 = state_19610__$1; +(statearr_19626_19661[(2)] = null); + +(statearr_19626_19661[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (6))){ +var inst_19551 = (state_19610[(13)]); +var inst_19560 = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(inst_19551) : f.call(null,inst_19551)); +var inst_19561 = cljs.core.seq(inst_19560); +var inst_19562 = inst_19561; +var inst_19563 = null; +var inst_19564 = (0); +var inst_19565 = (0); +var state_19610__$1 = (function (){var statearr_19627 = state_19610; +(statearr_19627[(8)] = inst_19565); + +(statearr_19627[(9)] = inst_19564); + +(statearr_19627[(10)] = inst_19563); + +(statearr_19627[(12)] = inst_19562); + +return statearr_19627; +})(); +var statearr_19628_19662 = state_19610__$1; +(statearr_19628_19662[(2)] = null); + +(statearr_19628_19662[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (17))){ +var inst_19576 = (state_19610[(7)]); +var inst_19580 = cljs.core.chunk_first(inst_19576); +var inst_19581 = cljs.core.chunk_rest(inst_19576); +var inst_19582 = cljs.core.count(inst_19580); +var inst_19562 = inst_19581; +var inst_19563 = inst_19580; +var inst_19564 = inst_19582; +var inst_19565 = (0); +var state_19610__$1 = (function (){var statearr_19629 = state_19610; +(statearr_19629[(8)] = inst_19565); + +(statearr_19629[(9)] = inst_19564); + +(statearr_19629[(10)] = inst_19563); + +(statearr_19629[(12)] = inst_19562); + +return statearr_19629; +})(); +var statearr_19630_19663 = state_19610__$1; +(statearr_19630_19663[(2)] = null); + +(statearr_19630_19663[(1)] = (8)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (3))){ +var inst_19608 = (state_19610[(2)]); +var state_19610__$1 = state_19610; +return cljs.core.async.impl.ioc_helpers.return_chan(state_19610__$1,inst_19608); +} else { +if((state_val_19611 === (12))){ +var inst_19596 = (state_19610[(2)]); +var state_19610__$1 = state_19610; +var statearr_19631_19664 = state_19610__$1; +(statearr_19631_19664[(2)] = inst_19596); + +(statearr_19631_19664[(1)] = (9)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (2))){ +var state_19610__$1 = state_19610; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19610__$1,(4),in$); +} else { +if((state_val_19611 === (23))){ +var inst_19604 = (state_19610[(2)]); +var state_19610__$1 = state_19610; +var statearr_19632_19665 = state_19610__$1; +(statearr_19632_19665[(2)] = inst_19604); + +(statearr_19632_19665[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (19))){ +var inst_19591 = (state_19610[(2)]); +var state_19610__$1 = state_19610; +var statearr_19633_19666 = state_19610__$1; +(statearr_19633_19666[(2)] = inst_19591); + +(statearr_19633_19666[(1)] = (16)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (11))){ +var inst_19562 = (state_19610[(12)]); +var inst_19576 = (state_19610[(7)]); +var inst_19576__$1 = cljs.core.seq(inst_19562); +var state_19610__$1 = (function (){var statearr_19634 = state_19610; +(statearr_19634[(7)] = inst_19576__$1); + +return statearr_19634; +})(); +if(inst_19576__$1){ +var statearr_19635_19667 = state_19610__$1; +(statearr_19635_19667[(1)] = (14)); + +} else { +var statearr_19636_19668 = state_19610__$1; +(statearr_19636_19668[(1)] = (15)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (9))){ +var inst_19598 = (state_19610[(2)]); +var inst_19599 = cljs.core.async.impl.protocols.closed_QMARK_(out); +var state_19610__$1 = (function (){var statearr_19637 = state_19610; +(statearr_19637[(15)] = inst_19598); + +return statearr_19637; +})(); +if(cljs.core.truth_(inst_19599)){ +var statearr_19638_19669 = state_19610__$1; +(statearr_19638_19669[(1)] = (21)); + +} else { +var statearr_19639_19670 = state_19610__$1; +(statearr_19639_19670[(1)] = (22)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (5))){ +var inst_19554 = cljs.core.async.close_BANG_(out); +var state_19610__$1 = state_19610; +var statearr_19640_19671 = state_19610__$1; +(statearr_19640_19671[(2)] = inst_19554); + +(statearr_19640_19671[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (14))){ +var inst_19576 = (state_19610[(7)]); +var inst_19578 = cljs.core.chunked_seq_QMARK_(inst_19576); +var state_19610__$1 = state_19610; +if(inst_19578){ +var statearr_19641_19672 = state_19610__$1; +(statearr_19641_19672[(1)] = (17)); + +} else { +var statearr_19642_19673 = state_19610__$1; +(statearr_19642_19673[(1)] = (18)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (16))){ +var inst_19594 = (state_19610[(2)]); +var state_19610__$1 = state_19610; +var statearr_19643_19674 = state_19610__$1; +(statearr_19643_19674[(2)] = inst_19594); + +(statearr_19643_19674[(1)] = (12)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19611 === (10))){ +var inst_19565 = (state_19610[(8)]); +var inst_19563 = (state_19610[(10)]); +var inst_19570 = cljs.core._nth.cljs$core$IFn$_invoke$arity$2(inst_19563,inst_19565); +var state_19610__$1 = state_19610; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19610__$1,(13),out,inst_19570); +} else { +if((state_val_19611 === (18))){ +var inst_19576 = (state_19610[(7)]); +var inst_19585 = cljs.core.first(inst_19576); +var state_19610__$1 = state_19610; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19610__$1,(20),out,inst_19585); +} else { +if((state_val_19611 === (8))){ +var inst_19565 = (state_19610[(8)]); +var inst_19564 = (state_19610[(9)]); +var inst_19567 = (inst_19565 < inst_19564); +var inst_19568 = inst_19567; +var state_19610__$1 = state_19610; +if(cljs.core.truth_(inst_19568)){ +var statearr_19644_19675 = state_19610__$1; +(statearr_19644_19675[(1)] = (10)); + +} else { +var statearr_19645_19676 = state_19610__$1; +(statearr_19645_19676[(1)] = (11)); + +} + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto__)) +; +return ((function (switch__16949__auto__,c__17075__auto__){ +return (function() { +var cljs$core$async$mapcat_STAR__$_state_machine__16950__auto__ = null; +var cljs$core$async$mapcat_STAR__$_state_machine__16950__auto____0 = (function (){ +var statearr_19649 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19649[(0)] = cljs$core$async$mapcat_STAR__$_state_machine__16950__auto__); + +(statearr_19649[(1)] = (1)); + +return statearr_19649; +}); +var cljs$core$async$mapcat_STAR__$_state_machine__16950__auto____1 = (function (state_19610){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19610); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19650){if((e19650 instanceof Object)){ +var ex__16953__auto__ = e19650; +var statearr_19651_19677 = state_19610; +(statearr_19651_19677[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19610); + +return cljs.core.cst$kw$recur; +} else { +throw e19650; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19678 = state_19610; +state_19610 = G__19678; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$mapcat_STAR__$_state_machine__16950__auto__ = function(state_19610){ +switch(arguments.length){ +case 0: +return cljs$core$async$mapcat_STAR__$_state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$mapcat_STAR__$_state_machine__16950__auto____1.call(this,state_19610); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$mapcat_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$mapcat_STAR__$_state_machine__16950__auto____0; +cljs$core$async$mapcat_STAR__$_state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$mapcat_STAR__$_state_machine__16950__auto____1; +return cljs$core$async$mapcat_STAR__$_state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto__)) +})(); +var state__17077__auto__ = (function (){var statearr_19652 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19652[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto__); + +return statearr_19652; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto__)) +); + +return c__17075__auto__; +}); +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.mapcat_LT_ = (function cljs$core$async$mapcat_LT_(var_args){ +var args19679 = []; +var len__9181__auto___19682 = arguments.length; +var i__9182__auto___19683 = (0); +while(true){ +if((i__9182__auto___19683 < len__9181__auto___19682)){ +args19679.push((arguments[i__9182__auto___19683])); + +var G__19684 = (i__9182__auto___19683 + (1)); +i__9182__auto___19683 = G__19684; +continue; +} else { +} +break; +} + +var G__19681 = args19679.length; +switch (G__19681) { +case 2: +return cljs.core.async.mapcat_LT_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.mapcat_LT_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19679.length)].join(''))); + +} +}); + +cljs.core.async.mapcat_LT_.cljs$core$IFn$_invoke$arity$2 = (function (f,in$){ +return cljs.core.async.mapcat_LT_.cljs$core$IFn$_invoke$arity$3(f,in$,null); +}); + +cljs.core.async.mapcat_LT_.cljs$core$IFn$_invoke$arity$3 = (function (f,in$,buf_or_n){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +cljs.core.async.mapcat_STAR_(f,in$,out); + +return out; +}); + +cljs.core.async.mapcat_LT_.cljs$lang$maxFixedArity = 3; + +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.mapcat_GT_ = (function cljs$core$async$mapcat_GT_(var_args){ +var args19686 = []; +var len__9181__auto___19689 = arguments.length; +var i__9182__auto___19690 = (0); +while(true){ +if((i__9182__auto___19690 < len__9181__auto___19689)){ +args19686.push((arguments[i__9182__auto___19690])); + +var G__19691 = (i__9182__auto___19690 + (1)); +i__9182__auto___19690 = G__19691; +continue; +} else { +} +break; +} + +var G__19688 = args19686.length; +switch (G__19688) { +case 2: +return cljs.core.async.mapcat_GT_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.mapcat_GT_.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19686.length)].join(''))); + +} +}); + +cljs.core.async.mapcat_GT_.cljs$core$IFn$_invoke$arity$2 = (function (f,out){ +return cljs.core.async.mapcat_GT_.cljs$core$IFn$_invoke$arity$3(f,out,null); +}); + +cljs.core.async.mapcat_GT_.cljs$core$IFn$_invoke$arity$3 = (function (f,out,buf_or_n){ +var in$ = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +cljs.core.async.mapcat_STAR_(f,in$,out); + +return in$; +}); + +cljs.core.async.mapcat_GT_.cljs$lang$maxFixedArity = 3; + +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.unique = (function cljs$core$async$unique(var_args){ +var args19693 = []; +var len__9181__auto___19744 = arguments.length; +var i__9182__auto___19745 = (0); +while(true){ +if((i__9182__auto___19745 < len__9181__auto___19744)){ +args19693.push((arguments[i__9182__auto___19745])); + +var G__19746 = (i__9182__auto___19745 + (1)); +i__9182__auto___19745 = G__19746; +continue; +} else { +} +break; +} + +var G__19695 = args19693.length; +switch (G__19695) { +case 1: +return cljs.core.async.unique.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.unique.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19693.length)].join(''))); + +} +}); + +cljs.core.async.unique.cljs$core$IFn$_invoke$arity$1 = (function (ch){ +return cljs.core.async.unique.cljs$core$IFn$_invoke$arity$2(ch,null); +}); + +cljs.core.async.unique.cljs$core$IFn$_invoke$arity$2 = (function (ch,buf_or_n){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +var c__17075__auto___19748 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19748,out){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19748,out){ +return (function (state_19719){ +var state_val_19720 = (state_19719[(1)]); +if((state_val_19720 === (7))){ +var inst_19714 = (state_19719[(2)]); +var state_19719__$1 = state_19719; +var statearr_19721_19749 = state_19719__$1; +(statearr_19721_19749[(2)] = inst_19714); + +(statearr_19721_19749[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19720 === (1))){ +var inst_19696 = null; +var state_19719__$1 = (function (){var statearr_19722 = state_19719; +(statearr_19722[(7)] = inst_19696); + +return statearr_19722; +})(); +var statearr_19723_19750 = state_19719__$1; +(statearr_19723_19750[(2)] = null); + +(statearr_19723_19750[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19720 === (4))){ +var inst_19699 = (state_19719[(8)]); +var inst_19699__$1 = (state_19719[(2)]); +var inst_19700 = (inst_19699__$1 == null); +var inst_19701 = cljs.core.not(inst_19700); +var state_19719__$1 = (function (){var statearr_19724 = state_19719; +(statearr_19724[(8)] = inst_19699__$1); + +return statearr_19724; +})(); +if(inst_19701){ +var statearr_19725_19751 = state_19719__$1; +(statearr_19725_19751[(1)] = (5)); + +} else { +var statearr_19726_19752 = state_19719__$1; +(statearr_19726_19752[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19720 === (6))){ +var state_19719__$1 = state_19719; +var statearr_19727_19753 = state_19719__$1; +(statearr_19727_19753[(2)] = null); + +(statearr_19727_19753[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19720 === (3))){ +var inst_19716 = (state_19719[(2)]); +var inst_19717 = cljs.core.async.close_BANG_(out); +var state_19719__$1 = (function (){var statearr_19728 = state_19719; +(statearr_19728[(9)] = inst_19716); + +return statearr_19728; +})(); +return cljs.core.async.impl.ioc_helpers.return_chan(state_19719__$1,inst_19717); +} else { +if((state_val_19720 === (2))){ +var state_19719__$1 = state_19719; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19719__$1,(4),ch); +} else { +if((state_val_19720 === (11))){ +var inst_19699 = (state_19719[(8)]); +var inst_19708 = (state_19719[(2)]); +var inst_19696 = inst_19699; +var state_19719__$1 = (function (){var statearr_19729 = state_19719; +(statearr_19729[(7)] = inst_19696); + +(statearr_19729[(10)] = inst_19708); + +return statearr_19729; +})(); +var statearr_19730_19754 = state_19719__$1; +(statearr_19730_19754[(2)] = null); + +(statearr_19730_19754[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19720 === (9))){ +var inst_19699 = (state_19719[(8)]); +var state_19719__$1 = state_19719; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19719__$1,(11),out,inst_19699); +} else { +if((state_val_19720 === (5))){ +var inst_19699 = (state_19719[(8)]); +var inst_19696 = (state_19719[(7)]); +var inst_19703 = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(inst_19699,inst_19696); +var state_19719__$1 = state_19719; +if(inst_19703){ +var statearr_19732_19755 = state_19719__$1; +(statearr_19732_19755[(1)] = (8)); + +} else { +var statearr_19733_19756 = state_19719__$1; +(statearr_19733_19756[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19720 === (10))){ +var inst_19711 = (state_19719[(2)]); +var state_19719__$1 = state_19719; +var statearr_19734_19757 = state_19719__$1; +(statearr_19734_19757[(2)] = inst_19711); + +(statearr_19734_19757[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19720 === (8))){ +var inst_19696 = (state_19719[(7)]); +var tmp19731 = inst_19696; +var inst_19696__$1 = tmp19731; +var state_19719__$1 = (function (){var statearr_19735 = state_19719; +(statearr_19735[(7)] = inst_19696__$1); + +return statearr_19735; +})(); +var statearr_19736_19758 = state_19719__$1; +(statearr_19736_19758[(2)] = null); + +(statearr_19736_19758[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19748,out)) +; +return ((function (switch__16949__auto__,c__17075__auto___19748,out){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19740 = [null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19740[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19740[(1)] = (1)); + +return statearr_19740; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19719){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19719); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19741){if((e19741 instanceof Object)){ +var ex__16953__auto__ = e19741; +var statearr_19742_19759 = state_19719; +(statearr_19742_19759[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19719); + +return cljs.core.cst$kw$recur; +} else { +throw e19741; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19760 = state_19719; +state_19719 = G__19760; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19719){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19719); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19748,out)) +})(); +var state__17077__auto__ = (function (){var statearr_19743 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19743[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19748); + +return statearr_19743; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19748,out)) +); + + +return out; +}); + +cljs.core.async.unique.cljs$lang$maxFixedArity = 2; + +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.partition = (function cljs$core$async$partition(var_args){ +var args19761 = []; +var len__9181__auto___19831 = arguments.length; +var i__9182__auto___19832 = (0); +while(true){ +if((i__9182__auto___19832 < len__9181__auto___19831)){ +args19761.push((arguments[i__9182__auto___19832])); + +var G__19833 = (i__9182__auto___19832 + (1)); +i__9182__auto___19832 = G__19833; +continue; +} else { +} +break; +} + +var G__19763 = args19761.length; +switch (G__19763) { +case 2: +return cljs.core.async.partition.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.partition.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19761.length)].join(''))); + +} +}); + +cljs.core.async.partition.cljs$core$IFn$_invoke$arity$2 = (function (n,ch){ +return cljs.core.async.partition.cljs$core$IFn$_invoke$arity$3(n,ch,null); +}); + +cljs.core.async.partition.cljs$core$IFn$_invoke$arity$3 = (function (n,ch,buf_or_n){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +var c__17075__auto___19835 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19835,out){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19835,out){ +return (function (state_19801){ +var state_val_19802 = (state_19801[(1)]); +if((state_val_19802 === (7))){ +var inst_19797 = (state_19801[(2)]); +var state_19801__$1 = state_19801; +var statearr_19803_19836 = state_19801__$1; +(statearr_19803_19836[(2)] = inst_19797); + +(statearr_19803_19836[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (1))){ +var inst_19764 = (new Array(n)); +var inst_19765 = inst_19764; +var inst_19766 = (0); +var state_19801__$1 = (function (){var statearr_19804 = state_19801; +(statearr_19804[(7)] = inst_19766); + +(statearr_19804[(8)] = inst_19765); + +return statearr_19804; +})(); +var statearr_19805_19837 = state_19801__$1; +(statearr_19805_19837[(2)] = null); + +(statearr_19805_19837[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (4))){ +var inst_19769 = (state_19801[(9)]); +var inst_19769__$1 = (state_19801[(2)]); +var inst_19770 = (inst_19769__$1 == null); +var inst_19771 = cljs.core.not(inst_19770); +var state_19801__$1 = (function (){var statearr_19806 = state_19801; +(statearr_19806[(9)] = inst_19769__$1); + +return statearr_19806; +})(); +if(inst_19771){ +var statearr_19807_19838 = state_19801__$1; +(statearr_19807_19838[(1)] = (5)); + +} else { +var statearr_19808_19839 = state_19801__$1; +(statearr_19808_19839[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (15))){ +var inst_19791 = (state_19801[(2)]); +var state_19801__$1 = state_19801; +var statearr_19809_19840 = state_19801__$1; +(statearr_19809_19840[(2)] = inst_19791); + +(statearr_19809_19840[(1)] = (14)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (13))){ +var state_19801__$1 = state_19801; +var statearr_19810_19841 = state_19801__$1; +(statearr_19810_19841[(2)] = null); + +(statearr_19810_19841[(1)] = (14)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (6))){ +var inst_19766 = (state_19801[(7)]); +var inst_19787 = (inst_19766 > (0)); +var state_19801__$1 = state_19801; +if(cljs.core.truth_(inst_19787)){ +var statearr_19811_19842 = state_19801__$1; +(statearr_19811_19842[(1)] = (12)); + +} else { +var statearr_19812_19843 = state_19801__$1; +(statearr_19812_19843[(1)] = (13)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (3))){ +var inst_19799 = (state_19801[(2)]); +var state_19801__$1 = state_19801; +return cljs.core.async.impl.ioc_helpers.return_chan(state_19801__$1,inst_19799); +} else { +if((state_val_19802 === (12))){ +var inst_19765 = (state_19801[(8)]); +var inst_19789 = cljs.core.vec(inst_19765); +var state_19801__$1 = state_19801; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19801__$1,(15),out,inst_19789); +} else { +if((state_val_19802 === (2))){ +var state_19801__$1 = state_19801; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19801__$1,(4),ch); +} else { +if((state_val_19802 === (11))){ +var inst_19781 = (state_19801[(2)]); +var inst_19782 = (new Array(n)); +var inst_19765 = inst_19782; +var inst_19766 = (0); +var state_19801__$1 = (function (){var statearr_19813 = state_19801; +(statearr_19813[(7)] = inst_19766); + +(statearr_19813[(8)] = inst_19765); + +(statearr_19813[(10)] = inst_19781); + +return statearr_19813; +})(); +var statearr_19814_19844 = state_19801__$1; +(statearr_19814_19844[(2)] = null); + +(statearr_19814_19844[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (9))){ +var inst_19765 = (state_19801[(8)]); +var inst_19779 = cljs.core.vec(inst_19765); +var state_19801__$1 = state_19801; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19801__$1,(11),out,inst_19779); +} else { +if((state_val_19802 === (5))){ +var inst_19766 = (state_19801[(7)]); +var inst_19765 = (state_19801[(8)]); +var inst_19774 = (state_19801[(11)]); +var inst_19769 = (state_19801[(9)]); +var inst_19773 = (inst_19765[inst_19766] = inst_19769); +var inst_19774__$1 = (inst_19766 + (1)); +var inst_19775 = (inst_19774__$1 < n); +var state_19801__$1 = (function (){var statearr_19815 = state_19801; +(statearr_19815[(12)] = inst_19773); + +(statearr_19815[(11)] = inst_19774__$1); + +return statearr_19815; +})(); +if(cljs.core.truth_(inst_19775)){ +var statearr_19816_19845 = state_19801__$1; +(statearr_19816_19845[(1)] = (8)); + +} else { +var statearr_19817_19846 = state_19801__$1; +(statearr_19817_19846[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (14))){ +var inst_19794 = (state_19801[(2)]); +var inst_19795 = cljs.core.async.close_BANG_(out); +var state_19801__$1 = (function (){var statearr_19819 = state_19801; +(statearr_19819[(13)] = inst_19794); + +return statearr_19819; +})(); +var statearr_19820_19847 = state_19801__$1; +(statearr_19820_19847[(2)] = inst_19795); + +(statearr_19820_19847[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (10))){ +var inst_19785 = (state_19801[(2)]); +var state_19801__$1 = state_19801; +var statearr_19821_19848 = state_19801__$1; +(statearr_19821_19848[(2)] = inst_19785); + +(statearr_19821_19848[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19802 === (8))){ +var inst_19765 = (state_19801[(8)]); +var inst_19774 = (state_19801[(11)]); +var tmp19818 = inst_19765; +var inst_19765__$1 = tmp19818; +var inst_19766 = inst_19774; +var state_19801__$1 = (function (){var statearr_19822 = state_19801; +(statearr_19822[(7)] = inst_19766); + +(statearr_19822[(8)] = inst_19765__$1); + +return statearr_19822; +})(); +var statearr_19823_19849 = state_19801__$1; +(statearr_19823_19849[(2)] = null); + +(statearr_19823_19849[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19835,out)) +; +return ((function (switch__16949__auto__,c__17075__auto___19835,out){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19827 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19827[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19827[(1)] = (1)); + +return statearr_19827; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19801){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19801); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19828){if((e19828 instanceof Object)){ +var ex__16953__auto__ = e19828; +var statearr_19829_19850 = state_19801; +(statearr_19829_19850[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19801); + +return cljs.core.cst$kw$recur; +} else { +throw e19828; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19851 = state_19801; +state_19801 = G__19851; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19801){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19801); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19835,out)) +})(); +var state__17077__auto__ = (function (){var statearr_19830 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19830[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19835); + +return statearr_19830; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19835,out)) +); + + +return out; +}); + +cljs.core.async.partition.cljs$lang$maxFixedArity = 3; + +/** + * Deprecated - this function will be removed. Use transducer instead + */ +cljs.core.async.partition_by = (function cljs$core$async$partition_by(var_args){ +var args19852 = []; +var len__9181__auto___19926 = arguments.length; +var i__9182__auto___19927 = (0); +while(true){ +if((i__9182__auto___19927 < len__9181__auto___19926)){ +args19852.push((arguments[i__9182__auto___19927])); + +var G__19928 = (i__9182__auto___19927 + (1)); +i__9182__auto___19927 = G__19928; +continue; +} else { +} +break; +} + +var G__19854 = args19852.length; +switch (G__19854) { +case 2: +return cljs.core.async.partition_by.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.partition_by.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args19852.length)].join(''))); + +} +}); + +cljs.core.async.partition_by.cljs$core$IFn$_invoke$arity$2 = (function (f,ch){ +return cljs.core.async.partition_by.cljs$core$IFn$_invoke$arity$3(f,ch,null); +}); + +cljs.core.async.partition_by.cljs$core$IFn$_invoke$arity$3 = (function (f,ch,buf_or_n){ +var out = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1(buf_or_n); +var c__17075__auto___19930 = cljs.core.async.chan.cljs$core$IFn$_invoke$arity$1((1)); +cljs.core.async.impl.dispatch.run(((function (c__17075__auto___19930,out){ +return (function (){ +var f__17076__auto__ = (function (){var switch__16949__auto__ = ((function (c__17075__auto___19930,out){ +return (function (state_19896){ +var state_val_19897 = (state_19896[(1)]); +if((state_val_19897 === (7))){ +var inst_19892 = (state_19896[(2)]); +var state_19896__$1 = state_19896; +var statearr_19898_19931 = state_19896__$1; +(statearr_19898_19931[(2)] = inst_19892); + +(statearr_19898_19931[(1)] = (3)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (1))){ +var inst_19855 = []; +var inst_19856 = inst_19855; +var inst_19857 = cljs.core.cst$kw$cljs$core$async_SLASH_nothing; +var state_19896__$1 = (function (){var statearr_19899 = state_19896; +(statearr_19899[(7)] = inst_19857); + +(statearr_19899[(8)] = inst_19856); + +return statearr_19899; +})(); +var statearr_19900_19932 = state_19896__$1; +(statearr_19900_19932[(2)] = null); + +(statearr_19900_19932[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (4))){ +var inst_19860 = (state_19896[(9)]); +var inst_19860__$1 = (state_19896[(2)]); +var inst_19861 = (inst_19860__$1 == null); +var inst_19862 = cljs.core.not(inst_19861); +var state_19896__$1 = (function (){var statearr_19901 = state_19896; +(statearr_19901[(9)] = inst_19860__$1); + +return statearr_19901; +})(); +if(inst_19862){ +var statearr_19902_19933 = state_19896__$1; +(statearr_19902_19933[(1)] = (5)); + +} else { +var statearr_19903_19934 = state_19896__$1; +(statearr_19903_19934[(1)] = (6)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (15))){ +var inst_19886 = (state_19896[(2)]); +var state_19896__$1 = state_19896; +var statearr_19904_19935 = state_19896__$1; +(statearr_19904_19935[(2)] = inst_19886); + +(statearr_19904_19935[(1)] = (14)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (13))){ +var state_19896__$1 = state_19896; +var statearr_19905_19936 = state_19896__$1; +(statearr_19905_19936[(2)] = null); + +(statearr_19905_19936[(1)] = (14)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (6))){ +var inst_19856 = (state_19896[(8)]); +var inst_19881 = inst_19856.length; +var inst_19882 = (inst_19881 > (0)); +var state_19896__$1 = state_19896; +if(cljs.core.truth_(inst_19882)){ +var statearr_19906_19937 = state_19896__$1; +(statearr_19906_19937[(1)] = (12)); + +} else { +var statearr_19907_19938 = state_19896__$1; +(statearr_19907_19938[(1)] = (13)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (3))){ +var inst_19894 = (state_19896[(2)]); +var state_19896__$1 = state_19896; +return cljs.core.async.impl.ioc_helpers.return_chan(state_19896__$1,inst_19894); +} else { +if((state_val_19897 === (12))){ +var inst_19856 = (state_19896[(8)]); +var inst_19884 = cljs.core.vec(inst_19856); +var state_19896__$1 = state_19896; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19896__$1,(15),out,inst_19884); +} else { +if((state_val_19897 === (2))){ +var state_19896__$1 = state_19896; +return cljs.core.async.impl.ioc_helpers.take_BANG_(state_19896__$1,(4),ch); +} else { +if((state_val_19897 === (11))){ +var inst_19860 = (state_19896[(9)]); +var inst_19864 = (state_19896[(10)]); +var inst_19874 = (state_19896[(2)]); +var inst_19875 = []; +var inst_19876 = inst_19875.push(inst_19860); +var inst_19856 = inst_19875; +var inst_19857 = inst_19864; +var state_19896__$1 = (function (){var statearr_19908 = state_19896; +(statearr_19908[(7)] = inst_19857); + +(statearr_19908[(11)] = inst_19876); + +(statearr_19908[(8)] = inst_19856); + +(statearr_19908[(12)] = inst_19874); + +return statearr_19908; +})(); +var statearr_19909_19939 = state_19896__$1; +(statearr_19909_19939[(2)] = null); + +(statearr_19909_19939[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (9))){ +var inst_19856 = (state_19896[(8)]); +var inst_19872 = cljs.core.vec(inst_19856); +var state_19896__$1 = state_19896; +return cljs.core.async.impl.ioc_helpers.put_BANG_(state_19896__$1,(11),out,inst_19872); +} else { +if((state_val_19897 === (5))){ +var inst_19860 = (state_19896[(9)]); +var inst_19857 = (state_19896[(7)]); +var inst_19864 = (state_19896[(10)]); +var inst_19864__$1 = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(inst_19860) : f.call(null,inst_19860)); +var inst_19865 = cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(inst_19864__$1,inst_19857); +var inst_19866 = cljs.core.keyword_identical_QMARK_(inst_19857,cljs.core.cst$kw$cljs$core$async_SLASH_nothing); +var inst_19867 = (inst_19865) || (inst_19866); +var state_19896__$1 = (function (){var statearr_19910 = state_19896; +(statearr_19910[(10)] = inst_19864__$1); + +return statearr_19910; +})(); +if(cljs.core.truth_(inst_19867)){ +var statearr_19911_19940 = state_19896__$1; +(statearr_19911_19940[(1)] = (8)); + +} else { +var statearr_19912_19941 = state_19896__$1; +(statearr_19912_19941[(1)] = (9)); + +} + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (14))){ +var inst_19889 = (state_19896[(2)]); +var inst_19890 = cljs.core.async.close_BANG_(out); +var state_19896__$1 = (function (){var statearr_19914 = state_19896; +(statearr_19914[(13)] = inst_19889); + +return statearr_19914; +})(); +var statearr_19915_19942 = state_19896__$1; +(statearr_19915_19942[(2)] = inst_19890); + +(statearr_19915_19942[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (10))){ +var inst_19879 = (state_19896[(2)]); +var state_19896__$1 = state_19896; +var statearr_19916_19943 = state_19896__$1; +(statearr_19916_19943[(2)] = inst_19879); + +(statearr_19916_19943[(1)] = (7)); + + +return cljs.core.cst$kw$recur; +} else { +if((state_val_19897 === (8))){ +var inst_19860 = (state_19896[(9)]); +var inst_19856 = (state_19896[(8)]); +var inst_19864 = (state_19896[(10)]); +var inst_19869 = inst_19856.push(inst_19860); +var tmp19913 = inst_19856; +var inst_19856__$1 = tmp19913; +var inst_19857 = inst_19864; +var state_19896__$1 = (function (){var statearr_19917 = state_19896; +(statearr_19917[(7)] = inst_19857); + +(statearr_19917[(14)] = inst_19869); + +(statearr_19917[(8)] = inst_19856__$1); + +return statearr_19917; +})(); +var statearr_19918_19944 = state_19896__$1; +(statearr_19918_19944[(2)] = null); + +(statearr_19918_19944[(1)] = (2)); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +} +} +} +} +} +} +} +} +} +} +} +} +} +} +});})(c__17075__auto___19930,out)) +; +return ((function (switch__16949__auto__,c__17075__auto___19930,out){ +return (function() { +var cljs$core$async$state_machine__16950__auto__ = null; +var cljs$core$async$state_machine__16950__auto____0 = (function (){ +var statearr_19922 = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]; +(statearr_19922[(0)] = cljs$core$async$state_machine__16950__auto__); + +(statearr_19922[(1)] = (1)); + +return statearr_19922; +}); +var cljs$core$async$state_machine__16950__auto____1 = (function (state_19896){ +while(true){ +var ret_value__16951__auto__ = (function (){try{while(true){ +var result__16952__auto__ = switch__16949__auto__(state_19896); +if(cljs.core.keyword_identical_QMARK_(result__16952__auto__,cljs.core.cst$kw$recur)){ +continue; +} else { +return result__16952__auto__; +} +break; +} +}catch (e19923){if((e19923 instanceof Object)){ +var ex__16953__auto__ = e19923; +var statearr_19924_19945 = state_19896; +(statearr_19924_19945[(5)] = ex__16953__auto__); + + +cljs.core.async.impl.ioc_helpers.process_exception(state_19896); + +return cljs.core.cst$kw$recur; +} else { +throw e19923; + +} +}})(); +if(cljs.core.keyword_identical_QMARK_(ret_value__16951__auto__,cljs.core.cst$kw$recur)){ +var G__19946 = state_19896; +state_19896 = G__19946; +continue; +} else { +return ret_value__16951__auto__; +} +break; +} +}); +cljs$core$async$state_machine__16950__auto__ = function(state_19896){ +switch(arguments.length){ +case 0: +return cljs$core$async$state_machine__16950__auto____0.call(this); +case 1: +return cljs$core$async$state_machine__16950__auto____1.call(this,state_19896); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$0 = cljs$core$async$state_machine__16950__auto____0; +cljs$core$async$state_machine__16950__auto__.cljs$core$IFn$_invoke$arity$1 = cljs$core$async$state_machine__16950__auto____1; +return cljs$core$async$state_machine__16950__auto__; +})() +;})(switch__16949__auto__,c__17075__auto___19930,out)) +})(); +var state__17077__auto__ = (function (){var statearr_19925 = (f__17076__auto__.cljs$core$IFn$_invoke$arity$0 ? f__17076__auto__.cljs$core$IFn$_invoke$arity$0() : f__17076__auto__.call(null)); +(statearr_19925[cljs.core.async.impl.ioc_helpers.USER_START_IDX] = c__17075__auto___19930); + +return statearr_19925; +})(); +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state__17077__auto__); +});})(c__17075__auto___19930,out)) +); + + +return out; +}); + +cljs.core.async.partition_by.cljs$lang$maxFixedArity = 3; + diff --git a/public/js/rel/cljs/core/async/impl/buffers.cljs b/public/js/rel/cljs/core/async/impl/buffers.cljs new file mode 100644 index 0000000..b981819 --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/buffers.cljs @@ -0,0 +1,159 @@ +;; Copyright (c) Rich Hickey and contributors. All rights reserved. +;; The use and distribution terms for this software are covered by the +;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +;; which can be found in the file epl-v10.html at the root of this distribution. +;; By using this software in any fashion, you are agreeing to be bound by +;; the terms of this license. +;; You must not remove this notice, or any other, from this software. + +(ns cljs.core.async.impl.buffers + (:require [cljs.core.async.impl.protocols :as impl])) + +;; ----------------------------------------------------------------------------- +;; DO NOT USE, this is internal buffer representation + +(defn acopy [src src-start dest dest-start len] + (loop [cnt 0] + (when (< cnt len) + (aset dest + (+ dest-start cnt) + (aget src (+ src-start cnt))) + (recur (inc cnt))))) + +(deftype RingBuffer [^:mutable head ^:mutable tail ^:mutable length ^:mutable arr] + Object + (pop [_] + (when-not (zero? length) + (let [x (aget arr tail)] + (aset arr tail nil) + (set! tail (js-mod (inc tail) (alength arr))) + (set! length (dec length)) + x))) + + (unshift [_ x] + (aset arr head x) + (set! head (js-mod (inc head) (alength arr))) + (set! length (inc length)) + nil) + + (unbounded-unshift [this x] + (if (== (inc length) (alength arr)) + (.resize this)) + (.unshift this x)) + + ;; Doubles the size of the buffer while retaining all the existing values + (resize + [_] + (let [new-arr-size (* (alength arr) 2) + new-arr (make-array new-arr-size)] + (cond + (< tail head) + (do (acopy arr tail new-arr 0 length) + (set! tail 0) + (set! head length) + (set! arr new-arr)) + + (> tail head) + (do (acopy arr tail new-arr 0 (- (alength arr) tail)) + (acopy arr 0 new-arr (- (alength arr) tail) head) + (set! tail 0) + (set! head length) + (set! arr new-arr)) + + (== tail head) + (do (set! tail 0) + (set! head 0) + (set! arr new-arr))))) + + (cleanup [this keep?] + (dotimes [x length] + (let [v (.pop this)] + (when ^boolean (keep? v) + (.unshift this v)))))) + +(defn ring-buffer [n] + (assert (> n 0) "Can't create a ring buffer of size 0") + (RingBuffer. 0 0 0 (make-array n))) + +;; ----------------------------------------------------------------------------- + +(deftype FixedBuffer [buf n] + impl/Buffer + (full? [this] + (== (.-length buf) n)) + (remove! [this] + (.pop buf)) + (add!* [this itm] + (.unbounded-unshift buf itm) + this) + (close-buf! [this]) + cljs.core/ICounted + (-count [this] + (.-length buf))) + +(defn fixed-buffer [n] + (FixedBuffer. (ring-buffer n) n)) + +(deftype DroppingBuffer [buf n] + impl/UnblockingBuffer + impl/Buffer + (full? [this] + false) + (remove! [this] + (.pop buf)) + (add!* [this itm] + (when-not (== (.-length buf) n) + (.unshift buf itm)) + this) + (close-buf! [this]) + cljs.core/ICounted + (-count [this] + (.-length buf))) + +(defn dropping-buffer [n] + (DroppingBuffer. (ring-buffer n) n)) + +(deftype SlidingBuffer [buf n] + impl/UnblockingBuffer + impl/Buffer + (full? [this] + false) + (remove! [this] + (.pop buf)) + (add!* [this itm] + (when (== (.-length buf) n) + (impl/remove! this)) + (.unshift buf itm) + this) + (close-buf! [this]) + cljs.core/ICounted + (-count [this] + (.-length buf))) + +(defn sliding-buffer [n] + (SlidingBuffer. (ring-buffer n) n)) + +(defonce ^:private NO-VAL (js/Object.)) +(defn- undelivered? [val] + (identical? NO-VAL val)) + +(deftype PromiseBuffer [^:mutable val] + impl/UnblockingBuffer + impl/Buffer + (full? [_] + false) + (remove! [_] + val) + (add!* [this itm] + (when (undelivered? val) + (set! val itm)) + this) + (close-buf! [_] + (when (undelivered? val) + (set! val nil))) + cljs.core/ICounted + (-count [_] + (if (undelivered? val) 0 1))) + +(defn promise-buffer [] + (PromiseBuffer. NO-VAL)) diff --git a/public/js/rel/cljs/core/async/impl/buffers.js b/public/js/rel/cljs/core/async/impl/buffers.js new file mode 100644 index 0000000..a31c37e --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/buffers.js @@ -0,0 +1,450 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core.async.impl.buffers'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('cljs.core.async.impl.protocols'); +cljs.core.async.impl.buffers.acopy = (function cljs$core$async$impl$buffers$acopy(src,src_start,dest,dest_start,len){ +var cnt = (0); +while(true){ +if((cnt < len)){ +(dest[(dest_start + cnt)] = (src[(src_start + cnt)])); + +var G__15277 = (cnt + (1)); +cnt = G__15277; +continue; +} else { +return null; +} +break; +} +}); + +/** +* @constructor + * @implements {cljs.core.async.impl.buffers.Object} +*/ +cljs.core.async.impl.buffers.RingBuffer = (function (head,tail,length,arr){ +this.head = head; +this.tail = tail; +this.length = length; +this.arr = arr; +}) +cljs.core.async.impl.buffers.RingBuffer.prototype.pop = (function (){ +var self__ = this; +var _ = this; +if((self__.length === (0))){ +return null; +} else { +var x = (self__.arr[self__.tail]); +(self__.arr[self__.tail] = null); + +self__.tail = ((self__.tail + (1)) % self__.arr.length); + +self__.length = (self__.length - (1)); + +return x; +} +}); + +cljs.core.async.impl.buffers.RingBuffer.prototype.unshift = (function (x){ +var self__ = this; +var _ = this; +(self__.arr[self__.head] = x); + +self__.head = ((self__.head + (1)) % self__.arr.length); + +self__.length = (self__.length + (1)); + +return null; +}); + +cljs.core.async.impl.buffers.RingBuffer.prototype.unbounded_unshift = (function (x){ +var self__ = this; +var this$ = this; +if(((self__.length + (1)) === self__.arr.length)){ +this$.resize(); +} else { +} + +return this$.unshift(x); +}); + +cljs.core.async.impl.buffers.RingBuffer.prototype.resize = (function (){ +var self__ = this; +var _ = this; +var new_arr_size = (self__.arr.length * (2)); +var new_arr = (new Array(new_arr_size)); +if((self__.tail < self__.head)){ +cljs.core.async.impl.buffers.acopy(self__.arr,self__.tail,new_arr,(0),self__.length); + +self__.tail = (0); + +self__.head = self__.length; + +return self__.arr = new_arr; +} else { +if((self__.tail > self__.head)){ +cljs.core.async.impl.buffers.acopy(self__.arr,self__.tail,new_arr,(0),(self__.arr.length - self__.tail)); + +cljs.core.async.impl.buffers.acopy(self__.arr,(0),new_arr,(self__.arr.length - self__.tail),self__.head); + +self__.tail = (0); + +self__.head = self__.length; + +return self__.arr = new_arr; +} else { +if((self__.tail === self__.head)){ +self__.tail = (0); + +self__.head = (0); + +return self__.arr = new_arr; +} else { +return null; +} +} +} +}); + +cljs.core.async.impl.buffers.RingBuffer.prototype.cleanup = (function (keep_QMARK_){ +var self__ = this; +var this$ = this; +var n__8981__auto__ = self__.length; +var x = (0); +while(true){ +if((x < n__8981__auto__)){ +var v_15278 = this$.pop(); +if((keep_QMARK_.cljs$core$IFn$_invoke$arity$1 ? keep_QMARK_.cljs$core$IFn$_invoke$arity$1(v_15278) : keep_QMARK_.call(null,v_15278))){ +this$.unshift(v_15278); +} else { +} + +var G__15279 = (x + (1)); +x = G__15279; +continue; +} else { +return null; +} +break; +} +}); + +cljs.core.async.impl.buffers.RingBuffer.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$head,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$tail,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$length,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$arr,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.async.impl.buffers.RingBuffer.cljs$lang$type = true; + +cljs.core.async.impl.buffers.RingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/RingBuffer"; + +cljs.core.async.impl.buffers.RingBuffer.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.buffers/RingBuffer"); +}); + +cljs.core.async.impl.buffers.__GT_RingBuffer = (function cljs$core$async$impl$buffers$__GT_RingBuffer(head,tail,length,arr){ +return (new cljs.core.async.impl.buffers.RingBuffer(head,tail,length,arr)); +}); + +cljs.core.async.impl.buffers.ring_buffer = (function cljs$core$async$impl$buffers$ring_buffer(n){ +if((n > (0))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("Can't create a ring buffer of size 0"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(> n 0)")].join(''))); +} + +return (new cljs.core.async.impl.buffers.RingBuffer((0),(0),(0),(new Array(n)))); +}); + +/** +* @constructor + * @implements {cljs.core.ICounted} + * @implements {cljs.core.async.impl.protocols.Buffer} +*/ +cljs.core.async.impl.buffers.FixedBuffer = (function (buf,n){ +this.buf = buf; +this.n = n; +this.cljs$lang$protocol_mask$partition0$ = 2; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return (self__.buf.length === self__.n); +}); + +cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return self__.buf.pop(); +}); + +cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){ +var self__ = this; +var this$__$1 = this; +self__.buf.unbounded_unshift(itm); + +return this$__$1; +}); + +cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return null; +}); + +cljs.core.async.impl.buffers.FixedBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return self__.buf.length; +}); + +cljs.core.async.impl.buffers.FixedBuffer.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$buf,cljs.core.cst$sym$n], null); +}); + +cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$type = true; + +cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/FixedBuffer"; + +cljs.core.async.impl.buffers.FixedBuffer.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.buffers/FixedBuffer"); +}); + +cljs.core.async.impl.buffers.__GT_FixedBuffer = (function cljs$core$async$impl$buffers$__GT_FixedBuffer(buf,n){ +return (new cljs.core.async.impl.buffers.FixedBuffer(buf,n)); +}); + +cljs.core.async.impl.buffers.fixed_buffer = (function cljs$core$async$impl$buffers$fixed_buffer(n){ +return (new cljs.core.async.impl.buffers.FixedBuffer(cljs.core.async.impl.buffers.ring_buffer(n),n)); +}); + +/** +* @constructor + * @implements {cljs.core.ICounted} + * @implements {cljs.core.async.impl.protocols.UnblockingBuffer} + * @implements {cljs.core.async.impl.protocols.Buffer} +*/ +cljs.core.async.impl.buffers.DroppingBuffer = (function (buf,n){ +this.buf = buf; +this.n = n; +this.cljs$lang$protocol_mask$partition0$ = 2; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$UnblockingBuffer$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return false; +}); + +cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return self__.buf.pop(); +}); + +cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){ +var self__ = this; +var this$__$1 = this; +if((self__.buf.length === self__.n)){ +} else { +self__.buf.unshift(itm); +} + +return this$__$1; +}); + +cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return null; +}); + +cljs.core.async.impl.buffers.DroppingBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return self__.buf.length; +}); + +cljs.core.async.impl.buffers.DroppingBuffer.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$buf,cljs.core.cst$sym$n], null); +}); + +cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$type = true; + +cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/DroppingBuffer"; + +cljs.core.async.impl.buffers.DroppingBuffer.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.buffers/DroppingBuffer"); +}); + +cljs.core.async.impl.buffers.__GT_DroppingBuffer = (function cljs$core$async$impl$buffers$__GT_DroppingBuffer(buf,n){ +return (new cljs.core.async.impl.buffers.DroppingBuffer(buf,n)); +}); + +cljs.core.async.impl.buffers.dropping_buffer = (function cljs$core$async$impl$buffers$dropping_buffer(n){ +return (new cljs.core.async.impl.buffers.DroppingBuffer(cljs.core.async.impl.buffers.ring_buffer(n),n)); +}); + +/** +* @constructor + * @implements {cljs.core.ICounted} + * @implements {cljs.core.async.impl.protocols.UnblockingBuffer} + * @implements {cljs.core.async.impl.protocols.Buffer} +*/ +cljs.core.async.impl.buffers.SlidingBuffer = (function (buf,n){ +this.buf = buf; +this.n = n; +this.cljs$lang$protocol_mask$partition0$ = 2; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$UnblockingBuffer$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return false; +}); + +cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return self__.buf.pop(); +}); + +cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){ +var self__ = this; +var this$__$1 = this; +if((self__.buf.length === self__.n)){ +this$__$1.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null); +} else { +} + +self__.buf.unshift(itm); + +return this$__$1; +}); + +cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return null; +}); + +cljs.core.async.impl.buffers.SlidingBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return self__.buf.length; +}); + +cljs.core.async.impl.buffers.SlidingBuffer.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$buf,cljs.core.cst$sym$n], null); +}); + +cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$type = true; + +cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/SlidingBuffer"; + +cljs.core.async.impl.buffers.SlidingBuffer.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.buffers/SlidingBuffer"); +}); + +cljs.core.async.impl.buffers.__GT_SlidingBuffer = (function cljs$core$async$impl$buffers$__GT_SlidingBuffer(buf,n){ +return (new cljs.core.async.impl.buffers.SlidingBuffer(buf,n)); +}); + +cljs.core.async.impl.buffers.sliding_buffer = (function cljs$core$async$impl$buffers$sliding_buffer(n){ +return (new cljs.core.async.impl.buffers.SlidingBuffer(cljs.core.async.impl.buffers.ring_buffer(n),n)); +}); +if(typeof cljs.core.async.impl.buffers.NO_VAL !== 'undefined'){ +} else { +cljs.core.async.impl.buffers.NO_VAL = (new Object()); +} +cljs.core.async.impl.buffers.undelivered_QMARK_ = (function cljs$core$async$impl$buffers$undelivered_QMARK_(val){ +return (cljs.core.async.impl.buffers.NO_VAL === val); +}); + +/** +* @constructor + * @implements {cljs.core.ICounted} + * @implements {cljs.core.async.impl.protocols.UnblockingBuffer} + * @implements {cljs.core.async.impl.protocols.Buffer} +*/ +cljs.core.async.impl.buffers.PromiseBuffer = (function (val){ +this.val = val; +this.cljs$lang$protocol_mask$partition0$ = 2; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$UnblockingBuffer$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return false; +}); + +cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.val; +}); + +cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 = (function (this$,itm){ +var self__ = this; +var this$__$1 = this; +if(cljs.core.truth_(cljs.core.async.impl.buffers.undelivered_QMARK_(self__.val))){ +self__.val = itm; +} else { +} + +return this$__$1; +}); + +cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +if(cljs.core.truth_(cljs.core.async.impl.buffers.undelivered_QMARK_(self__.val))){ +return self__.val = null; +} else { +return null; +} +}); + +cljs.core.async.impl.buffers.PromiseBuffer.prototype.cljs$core$ICounted$_count$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +if(cljs.core.truth_(cljs.core.async.impl.buffers.undelivered_QMARK_(self__.val))){ +return (0); +} else { +return (1); +} +}); + +cljs.core.async.impl.buffers.PromiseBuffer.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$val,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.async.impl.buffers.PromiseBuffer.cljs$lang$type = true; + +cljs.core.async.impl.buffers.PromiseBuffer.cljs$lang$ctorStr = "cljs.core.async.impl.buffers/PromiseBuffer"; + +cljs.core.async.impl.buffers.PromiseBuffer.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.buffers/PromiseBuffer"); +}); + +cljs.core.async.impl.buffers.__GT_PromiseBuffer = (function cljs$core$async$impl$buffers$__GT_PromiseBuffer(val){ +return (new cljs.core.async.impl.buffers.PromiseBuffer(val)); +}); + +cljs.core.async.impl.buffers.promise_buffer = (function cljs$core$async$impl$buffers$promise_buffer(){ +return (new cljs.core.async.impl.buffers.PromiseBuffer(cljs.core.async.impl.buffers.NO_VAL)); +}); diff --git a/public/js/rel/cljs/core/async/impl/channels.cljs b/public/js/rel/cljs/core/async/impl/channels.cljs new file mode 100644 index 0000000..ce9b2fd --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/channels.cljs @@ -0,0 +1,192 @@ +;; Copyright (c) Rich Hickey and contributors. All rights reserved. +;; The use and distribution terms for this software are covered by the +;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +;; which can be found in the file epl-v10.html at the root of this distribution. +;; By using this software in any fashion, you are agreeing to be bound by +;; the terms of this license. +;; You must not remove this notice, or any other, from this software. + +(ns cljs.core.async.impl.channels + (:require [cljs.core.async.impl.protocols :as impl] + [cljs.core.async.impl.dispatch :as dispatch] + [cljs.core.async.impl.buffers :as buffers])) + + + +(defn box [val] + (reify cljs.core/IDeref + (-deref [_] val))) + +(deftype PutBox [handler val]) + +(defn put-active? [box] + (impl/active? (.-handler box))) + +(def ^:const MAX_DIRTY 64) + +(defprotocol MMC + (abort [this])) + +(deftype ManyToManyChannel [takes ^:mutable dirty-takes puts ^:mutable dirty-puts ^not-native buf ^:mutable closed add!] + MMC + (abort [this] + (loop [] + (let [putter (.pop puts)] + (when-not (nil? putter) + (let [^not-native put-handler (.-handler putter) + val (.-val putter)] + (if ^boolean (impl/active? put-handler) + (let [put-cb (impl/commit put-handler)] + (dispatch/run #(put-cb true))) + (recur)))))) + (.cleanup puts (constantly false)) + (impl/close! this)) + impl/WritePort + (put! [this val ^not-native handler] + (assert (not (nil? val)) "Can't put nil in on a channel") + ;; bug in CLJS compiler boolean inference - David + (let [^boolean closed closed] + (if (or closed (not ^boolean (impl/active? handler))) + (box (not closed)) + (if (and buf (not (impl/full? buf))) + (do + (impl/commit handler) + (let [done? (reduced? (add! buf val)) + take-cbs (loop [takers []] + (if (and (pos? (.-length takes)) (pos? (count buf))) + (let [^not-native taker (.pop takes)] + (if ^boolean (impl/active? taker) + (let [ret (impl/commit taker) + val (impl/remove! buf)] + (recur (conj takers (fn [] (ret val))))) + (recur takers))) + takers))] + (when done? (abort this)) + (when (seq take-cbs) + (doseq [f take-cbs] + (dispatch/run f))) + (box true))) + (let [taker (loop [] + (let [^not-native taker (.pop takes)] + (when taker + (if (impl/active? taker) + taker + (recur)))))] + (if taker + (let [take-cb (impl/commit taker)] + (impl/commit handler) + (dispatch/run (fn [] (take-cb val))) + (box true)) + (do + (if (> dirty-puts MAX_DIRTY) + (do (set! dirty-puts 0) + (.cleanup puts put-active?)) + (set! dirty-puts (inc dirty-puts))) + (when (impl/blockable? handler) + (assert (< (.-length puts) impl/MAX-QUEUE-SIZE) + (str "No more than " impl/MAX-QUEUE-SIZE + " pending puts are allowed on a single channel." + " Consider using a windowed buffer.")) + (.unbounded-unshift puts (PutBox. handler val))) + nil))))))) + impl/ReadPort + (take! [this ^not-native handler] + (if (not ^boolean (impl/active? handler)) + nil + (if (and (not (nil? buf)) (pos? (count buf))) + (do + (if-let [take-cb (impl/commit handler)] + (let [val (impl/remove! buf) + [done? cbs] (when (pos? (.-length puts)) + (loop [cbs []] + (let [putter (.pop puts) + ^not-native put-handler (.-handler putter) + val (.-val putter) + cb (and ^boolean (impl/active? put-handler) (impl/commit put-handler)) + cbs (if cb (conj cbs cb) cbs) + done? (when cb (reduced? (add! buf val)))] + (if (and (not done?) (not (impl/full? buf)) (pos? (.-length puts))) + (recur cbs) + [done? cbs]))))] + (when done? + (abort this)) + (doseq [cb cbs] + (dispatch/run #(cb true))) + (box val)))) + (let [putter (loop [] + (let [putter (.pop puts)] + (when putter + (if ^boolean (impl/active? (.-handler putter)) + putter + (recur)))))] + (if putter + (let [put-cb (impl/commit (.-handler putter))] + (impl/commit handler) + (dispatch/run #(put-cb true)) + (box (.-val putter))) + (if closed + (do + (when buf (add! buf)) + (if (and (impl/active? handler) (impl/commit handler)) + (let [has-val (and buf (pos? (count buf)))] + (let [val (when has-val (impl/remove! buf))] + (box val))) + nil)) + (do + (if (> dirty-takes MAX_DIRTY) + (do (set! dirty-takes 0) + (.cleanup takes impl/active?)) + (set! dirty-takes (inc dirty-takes))) + (when (impl/blockable? handler) + (assert (< (.-length takes) impl/MAX-QUEUE-SIZE) + (str "No more than " impl/MAX-QUEUE-SIZE + " pending takes are allowed on a single channel.")) + (.unbounded-unshift takes handler)) + nil))))))) + impl/Channel + (closed? [_] closed) + (close! [this] + (if ^boolean closed + nil + (do (set! closed true) + (when (and buf (zero? (.-length puts))) + (add! buf)) + (loop [] + (let [^not-native taker (.pop takes)] + (when-not (nil? taker) + (when ^boolean (impl/active? taker) + (let [take-cb (impl/commit taker) + val (when (and buf (pos? (count buf))) (impl/remove! buf))] + (dispatch/run (fn [] (take-cb val))))) + (recur)))) + (when buf (impl/close-buf! buf)) + nil)))) + +(defn- ex-handler [ex] + (.log js/console ex) + nil) + +(defn- handle [buf exh t] + (let [else ((or exh ex-handler) t)] + (if (nil? else) + buf + (impl/add! buf else)))) + +(defn chan + ([buf] (chan buf nil)) + ([buf xform] (chan buf xform nil)) + ([buf xform exh] + (ManyToManyChannel. (buffers/ring-buffer 32) 0 (buffers/ring-buffer 32) + 0 buf false + (let [add! (if xform (xform impl/add!) impl/add!)] + (fn + ([buf] + (try + (add! buf) + (catch :default t + (handle buf exh t)))) + ([buf val] + (try + (add! buf val) + (catch :default t + (handle buf exh t))))))))) diff --git a/public/js/rel/cljs/core/async/impl/channels.js b/public/js/rel/cljs/core/async/impl/channels.js new file mode 100644 index 0000000..3a20108 --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/channels.js @@ -0,0 +1,686 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core.async.impl.channels'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('cljs.core.async.impl.protocols'); +goog.require('cljs.core.async.impl.dispatch'); +goog.require('cljs.core.async.impl.buffers'); +cljs.core.async.impl.channels.box = (function cljs$core$async$impl$channels$box(val){ +if(typeof cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IDeref} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290 = (function (val,meta15291){ +this.val = val; +this.meta15291 = meta15291; +this.cljs$lang$protocol_mask$partition0$ = 425984; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_15292,meta15291__$1){ +var self__ = this; +var _15292__$1 = this; +return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290(self__.val,meta15291__$1)); +}); + +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_15292){ +var self__ = this; +var _15292__$1 = this; +return self__.meta15291; +}); + +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290.prototype.cljs$core$IDeref$_deref$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.val; +}); + +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$val,cljs.core.cst$sym$meta15291], null); +}); + +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290.cljs$lang$type = true; + +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290.cljs$lang$ctorStr = "cljs.core.async.impl.channels/t_cljs$core$async$impl$channels15290"; + +cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.channels/t_cljs$core$async$impl$channels15290"); +}); + +cljs.core.async.impl.channels.__GT_t_cljs$core$async$impl$channels15290 = (function cljs$core$async$impl$channels$box_$___GT_t_cljs$core$async$impl$channels15290(val__$1,meta15291){ +return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290(val__$1,meta15291)); +}); + +} + +return (new cljs.core.async.impl.channels.t_cljs$core$async$impl$channels15290(val,cljs.core.PersistentArrayMap.EMPTY)); +}); + +/** +* @constructor +*/ +cljs.core.async.impl.channels.PutBox = (function (handler,val){ +this.handler = handler; +this.val = val; +}) + +cljs.core.async.impl.channels.PutBox.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$handler,cljs.core.cst$sym$val], null); +}); + +cljs.core.async.impl.channels.PutBox.cljs$lang$type = true; + +cljs.core.async.impl.channels.PutBox.cljs$lang$ctorStr = "cljs.core.async.impl.channels/PutBox"; + +cljs.core.async.impl.channels.PutBox.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.channels/PutBox"); +}); + +cljs.core.async.impl.channels.__GT_PutBox = (function cljs$core$async$impl$channels$__GT_PutBox(handler,val){ +return (new cljs.core.async.impl.channels.PutBox(handler,val)); +}); + +cljs.core.async.impl.channels.put_active_QMARK_ = (function cljs$core$async$impl$channels$put_active_QMARK_(box){ +return cljs.core.async.impl.protocols.active_QMARK_(box.handler); +}); +cljs.core.async.impl.channels.MAX_DIRTY = (64); + +/** + * @interface + */ +cljs.core.async.impl.channels.MMC = function(){}; + +cljs.core.async.impl.channels.abort = (function cljs$core$async$impl$channels$abort(this$){ +if((!((this$ == null))) && (!((this$.cljs$core$async$impl$channels$MMC$abort$arity$1 == null)))){ +return this$.cljs$core$async$impl$channels$MMC$abort$arity$1(this$); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (cljs.core.async.impl.channels.abort[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto__.call(null,this$)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.channels.abort["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto____$1.call(null,this$)); +} else { +throw cljs.core.missing_protocol("MMC.abort",this$); +} +} +} +}); + + +/** +* @constructor + * @implements {cljs.core.async.impl.channels.MMC} + * @implements {cljs.core.async.impl.protocols.Channel} + * @implements {cljs.core.async.impl.protocols.WritePort} + * @implements {cljs.core.async.impl.protocols.ReadPort} +*/ +cljs.core.async.impl.channels.ManyToManyChannel = (function (takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_){ +this.takes = takes; +this.dirty_takes = dirty_takes; +this.puts = puts; +this.dirty_puts = dirty_puts; +this.buf = buf; +this.closed = closed; +this.add_BANG_ = add_BANG_; +}) +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$channels$MMC$abort$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +while(true){ +var putter_15304 = self__.puts.pop(); +if((putter_15304 == null)){ +} else { +var put_handler_15305 = putter_15304.handler; +var val_15306 = putter_15304.val; +if(put_handler_15305.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null)){ +var put_cb_15307 = put_handler_15305.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); +cljs.core.async.impl.dispatch.run(((function (put_cb_15307,put_handler_15305,val_15306,putter_15304,this$__$1){ +return (function (){ +return (put_cb_15307.cljs$core$IFn$_invoke$arity$1 ? put_cb_15307.cljs$core$IFn$_invoke$arity$1(true) : put_cb_15307.call(null,true)); +});})(put_cb_15307,put_handler_15305,val_15306,putter_15304,this$__$1)) +); +} else { +continue; +} +} +break; +} + +self__.puts.cleanup(cljs.core.constantly(false)); + +return this$__$1.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(null); +}); + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 = (function (this$,val,handler){ +var self__ = this; +var this$__$1 = this; +if(!((val == null))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("Can't put nil in on a channel"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(not (nil? val))")].join(''))); +} + +var closed__$1 = self__.closed; +if((closed__$1) || (!(handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null)))){ +return cljs.core.async.impl.channels.box(!(closed__$1)); +} else { +if(cljs.core.truth_((function (){var and__7948__auto__ = self__.buf; +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.not(self__.buf.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(null)); +} else { +return and__7948__auto__; +} +})())){ +handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); + +var done_QMARK_ = cljs.core.reduced_QMARK_((self__.add_BANG_.cljs$core$IFn$_invoke$arity$2 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$2(self__.buf,val) : self__.add_BANG_.call(null,self__.buf,val))); +var take_cbs = (function (){var takers = cljs.core.PersistentVector.EMPTY; +while(true){ +if(((self__.takes.length > (0))) && ((cljs.core.count(self__.buf) > (0)))){ +var taker = self__.takes.pop(); +if(taker.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null)){ +var ret = taker.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); +var val__$1 = self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null); +var G__15308 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(takers,((function (takers,ret,val__$1,taker,done_QMARK_,closed__$1,this$__$1){ +return (function (){ +return (ret.cljs$core$IFn$_invoke$arity$1 ? ret.cljs$core$IFn$_invoke$arity$1(val__$1) : ret.call(null,val__$1)); +});})(takers,ret,val__$1,taker,done_QMARK_,closed__$1,this$__$1)) +); +takers = G__15308; +continue; +} else { +var G__15309 = takers; +takers = G__15309; +continue; +} +} else { +return takers; +} +break; +} +})(); +if(done_QMARK_){ +this$__$1.cljs$core$async$impl$channels$MMC$abort$arity$1(null); +} else { +} + +if(cljs.core.seq(take_cbs)){ +var seq__15293_15310 = cljs.core.seq(take_cbs); +var chunk__15294_15311 = null; +var count__15295_15312 = (0); +var i__15296_15313 = (0); +while(true){ +if((i__15296_15313 < count__15295_15312)){ +var f_15314 = chunk__15294_15311.cljs$core$IIndexed$_nth$arity$2(null,i__15296_15313); +cljs.core.async.impl.dispatch.run(f_15314); + +var G__15315 = seq__15293_15310; +var G__15316 = chunk__15294_15311; +var G__15317 = count__15295_15312; +var G__15318 = (i__15296_15313 + (1)); +seq__15293_15310 = G__15315; +chunk__15294_15311 = G__15316; +count__15295_15312 = G__15317; +i__15296_15313 = G__15318; +continue; +} else { +var temp__5278__auto___15319 = cljs.core.seq(seq__15293_15310); +if(temp__5278__auto___15319){ +var seq__15293_15320__$1 = temp__5278__auto___15319; +if(cljs.core.chunked_seq_QMARK_(seq__15293_15320__$1)){ +var c__8871__auto___15321 = cljs.core.chunk_first(seq__15293_15320__$1); +var G__15322 = cljs.core.chunk_rest(seq__15293_15320__$1); +var G__15323 = c__8871__auto___15321; +var G__15324 = cljs.core.count(c__8871__auto___15321); +var G__15325 = (0); +seq__15293_15310 = G__15322; +chunk__15294_15311 = G__15323; +count__15295_15312 = G__15324; +i__15296_15313 = G__15325; +continue; +} else { +var f_15326 = cljs.core.first(seq__15293_15320__$1); +cljs.core.async.impl.dispatch.run(f_15326); + +var G__15327 = cljs.core.next(seq__15293_15320__$1); +var G__15328 = null; +var G__15329 = (0); +var G__15330 = (0); +seq__15293_15310 = G__15327; +chunk__15294_15311 = G__15328; +count__15295_15312 = G__15329; +i__15296_15313 = G__15330; +continue; +} +} else { +} +} +break; +} +} else { +} + +return cljs.core.async.impl.channels.box(true); +} else { +var taker = (function (){while(true){ +var taker = self__.takes.pop(); +if(cljs.core.truth_(taker)){ +if(cljs.core.truth_(taker.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null))){ +return taker; +} else { +continue; +} +} else { +return null; +} +break; +} +})(); +if(cljs.core.truth_(taker)){ +var take_cb = cljs.core.async.impl.protocols.commit(taker); +handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); + +cljs.core.async.impl.dispatch.run(((function (take_cb,taker,closed__$1,this$__$1){ +return (function (){ +return (take_cb.cljs$core$IFn$_invoke$arity$1 ? take_cb.cljs$core$IFn$_invoke$arity$1(val) : take_cb.call(null,val)); +});})(take_cb,taker,closed__$1,this$__$1)) +); + +return cljs.core.async.impl.channels.box(true); +} else { +if((self__.dirty_puts > cljs.core.async.impl.channels.MAX_DIRTY)){ +self__.dirty_puts = (0); + +self__.puts.cleanup(cljs.core.async.impl.channels.put_active_QMARK_); +} else { +self__.dirty_puts = (self__.dirty_puts + (1)); +} + +if(cljs.core.truth_(handler.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1(null))){ +if((self__.puts.length < cljs.core.async.impl.protocols.MAX_QUEUE_SIZE)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No more than "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.async.impl.protocols.MAX_QUEUE_SIZE),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" pending puts are allowed on a single channel."),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" Consider using a windowed buffer.")].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(< (.-length puts) impl/MAX-QUEUE-SIZE)")].join(''))); +} + +self__.puts.unbounded_unshift((new cljs.core.async.impl.channels.PutBox(handler,val))); +} else { +} + +return null; +} +} +} +}); + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 = (function (this$,handler){ +var self__ = this; +var this$__$1 = this; +if(!(handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null))){ +return null; +} else { +if((!((self__.buf == null))) && ((cljs.core.count(self__.buf) > (0)))){ +var temp__5276__auto__ = handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); +if(cljs.core.truth_(temp__5276__auto__)){ +var take_cb = temp__5276__auto__; +var val = self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null); +var vec__15297 = (((self__.puts.length > (0)))?(function (){var cbs = cljs.core.PersistentVector.EMPTY; +while(true){ +var putter = self__.puts.pop(); +var put_handler = putter.handler; +var val__$1 = putter.val; +var cb = (function (){var and__7948__auto__ = put_handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null); +if(and__7948__auto__){ +return put_handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); +} else { +return and__7948__auto__; +} +})(); +var cbs__$1 = (cljs.core.truth_(cb)?cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cbs,cb):cbs); +var done_QMARK_ = (cljs.core.truth_(cb)?cljs.core.reduced_QMARK_((self__.add_BANG_.cljs$core$IFn$_invoke$arity$2 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$2(self__.buf,val__$1) : self__.add_BANG_.call(null,self__.buf,val__$1))):null); +if((cljs.core.not(done_QMARK_)) && (cljs.core.not(self__.buf.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(null))) && ((self__.puts.length > (0)))){ +var G__15331 = cbs__$1; +cbs = G__15331; +continue; +} else { +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [done_QMARK_,cbs__$1], null); +} +break; +} +})():null); +var done_QMARK_ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15297,(0),null); +var cbs = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15297,(1),null); +if(cljs.core.truth_(done_QMARK_)){ +this$__$1.cljs$core$async$impl$channels$MMC$abort$arity$1(null); +} else { +} + +var seq__15300_15332 = cljs.core.seq(cbs); +var chunk__15301_15333 = null; +var count__15302_15334 = (0); +var i__15303_15335 = (0); +while(true){ +if((i__15303_15335 < count__15302_15334)){ +var cb_15336 = chunk__15301_15333.cljs$core$IIndexed$_nth$arity$2(null,i__15303_15335); +cljs.core.async.impl.dispatch.run(((function (seq__15300_15332,chunk__15301_15333,count__15302_15334,i__15303_15335,cb_15336,val,vec__15297,done_QMARK_,cbs,take_cb,temp__5276__auto__,this$__$1){ +return (function (){ +return (cb_15336.cljs$core$IFn$_invoke$arity$1 ? cb_15336.cljs$core$IFn$_invoke$arity$1(true) : cb_15336.call(null,true)); +});})(seq__15300_15332,chunk__15301_15333,count__15302_15334,i__15303_15335,cb_15336,val,vec__15297,done_QMARK_,cbs,take_cb,temp__5276__auto__,this$__$1)) +); + +var G__15337 = seq__15300_15332; +var G__15338 = chunk__15301_15333; +var G__15339 = count__15302_15334; +var G__15340 = (i__15303_15335 + (1)); +seq__15300_15332 = G__15337; +chunk__15301_15333 = G__15338; +count__15302_15334 = G__15339; +i__15303_15335 = G__15340; +continue; +} else { +var temp__5278__auto___15341 = cljs.core.seq(seq__15300_15332); +if(temp__5278__auto___15341){ +var seq__15300_15342__$1 = temp__5278__auto___15341; +if(cljs.core.chunked_seq_QMARK_(seq__15300_15342__$1)){ +var c__8871__auto___15343 = cljs.core.chunk_first(seq__15300_15342__$1); +var G__15344 = cljs.core.chunk_rest(seq__15300_15342__$1); +var G__15345 = c__8871__auto___15343; +var G__15346 = cljs.core.count(c__8871__auto___15343); +var G__15347 = (0); +seq__15300_15332 = G__15344; +chunk__15301_15333 = G__15345; +count__15302_15334 = G__15346; +i__15303_15335 = G__15347; +continue; +} else { +var cb_15348 = cljs.core.first(seq__15300_15342__$1); +cljs.core.async.impl.dispatch.run(((function (seq__15300_15332,chunk__15301_15333,count__15302_15334,i__15303_15335,cb_15348,seq__15300_15342__$1,temp__5278__auto___15341,val,vec__15297,done_QMARK_,cbs,take_cb,temp__5276__auto__,this$__$1){ +return (function (){ +return (cb_15348.cljs$core$IFn$_invoke$arity$1 ? cb_15348.cljs$core$IFn$_invoke$arity$1(true) : cb_15348.call(null,true)); +});})(seq__15300_15332,chunk__15301_15333,count__15302_15334,i__15303_15335,cb_15348,seq__15300_15342__$1,temp__5278__auto___15341,val,vec__15297,done_QMARK_,cbs,take_cb,temp__5276__auto__,this$__$1)) +); + +var G__15349 = cljs.core.next(seq__15300_15342__$1); +var G__15350 = null; +var G__15351 = (0); +var G__15352 = (0); +seq__15300_15332 = G__15349; +chunk__15301_15333 = G__15350; +count__15302_15334 = G__15351; +i__15303_15335 = G__15352; +continue; +} +} else { +} +} +break; +} + +return cljs.core.async.impl.channels.box(val); +} else { +return null; +} +} else { +var putter = (function (){while(true){ +var putter = self__.puts.pop(); +if(cljs.core.truth_(putter)){ +if(cljs.core.async.impl.protocols.active_QMARK_(putter.handler)){ +return putter; +} else { +continue; +} +} else { +return null; +} +break; +} +})(); +if(cljs.core.truth_(putter)){ +var put_cb = cljs.core.async.impl.protocols.commit(putter.handler); +handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); + +cljs.core.async.impl.dispatch.run(((function (put_cb,putter,this$__$1){ +return (function (){ +return (put_cb.cljs$core$IFn$_invoke$arity$1 ? put_cb.cljs$core$IFn$_invoke$arity$1(true) : put_cb.call(null,true)); +});})(put_cb,putter,this$__$1)) +); + +return cljs.core.async.impl.channels.box(putter.val); +} else { +if(cljs.core.truth_(self__.closed)){ +if(cljs.core.truth_(self__.buf)){ +(self__.add_BANG_.cljs$core$IFn$_invoke$arity$1 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$1(self__.buf) : self__.add_BANG_.call(null,self__.buf)); +} else { +} + +if(cljs.core.truth_((function (){var and__7948__auto__ = handler.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null); +if(cljs.core.truth_(and__7948__auto__)){ +return handler.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); +} else { +return and__7948__auto__; +} +})())){ +var has_val = (function (){var and__7948__auto__ = self__.buf; +if(cljs.core.truth_(and__7948__auto__)){ +return (cljs.core.count(self__.buf) > (0)); +} else { +return and__7948__auto__; +} +})(); +var val = (cljs.core.truth_(has_val)?self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null):null); +return cljs.core.async.impl.channels.box(val); +} else { +return null; +} +} else { +if((self__.dirty_takes > cljs.core.async.impl.channels.MAX_DIRTY)){ +self__.dirty_takes = (0); + +self__.takes.cleanup(cljs.core.async.impl.protocols.active_QMARK_); +} else { +self__.dirty_takes = (self__.dirty_takes + (1)); +} + +if(cljs.core.truth_(handler.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1(null))){ +if((self__.takes.length < cljs.core.async.impl.protocols.MAX_QUEUE_SIZE)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("No more than "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.async.impl.protocols.MAX_QUEUE_SIZE),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" pending takes are allowed on a single channel.")].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(< (.-length takes) impl/MAX-QUEUE-SIZE)")].join(''))); +} + +self__.takes.unbounded_unshift(handler); +} else { +} + +return null; +} +} +} +} +}); + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.closed; +}); + +cljs.core.async.impl.channels.ManyToManyChannel.prototype.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +if(self__.closed){ +return null; +} else { +self__.closed = true; + +if(cljs.core.truth_((function (){var and__7948__auto__ = self__.buf; +if(cljs.core.truth_(and__7948__auto__)){ +return (self__.puts.length === (0)); +} else { +return and__7948__auto__; +} +})())){ +(self__.add_BANG_.cljs$core$IFn$_invoke$arity$1 ? self__.add_BANG_.cljs$core$IFn$_invoke$arity$1(self__.buf) : self__.add_BANG_.call(null,self__.buf)); +} else { +} + +while(true){ +var taker_15353 = self__.takes.pop(); +if((taker_15353 == null)){ +} else { +if(taker_15353.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(null)){ +var take_cb_15354 = taker_15353.cljs$core$async$impl$protocols$Handler$commit$arity$1(null); +var val_15355 = (cljs.core.truth_((function (){var and__7948__auto__ = self__.buf; +if(cljs.core.truth_(and__7948__auto__)){ +return (cljs.core.count(self__.buf) > (0)); +} else { +return and__7948__auto__; +} +})())?self__.buf.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(null):null); +cljs.core.async.impl.dispatch.run(((function (take_cb_15354,val_15355,taker_15353,this$__$1){ +return (function (){ +return (take_cb_15354.cljs$core$IFn$_invoke$arity$1 ? take_cb_15354.cljs$core$IFn$_invoke$arity$1(val_15355) : take_cb_15354.call(null,val_15355)); +});})(take_cb_15354,val_15355,taker_15353,this$__$1)) +); +} else { +} + +continue; +} +break; +} + +if(cljs.core.truth_(self__.buf)){ +self__.buf.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1(null); +} else { +} + +return null; +} +}); + +cljs.core.async.impl.channels.ManyToManyChannel.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$takes,cljs.core.with_meta(cljs.core.cst$sym$dirty_DASH_takes,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$puts,cljs.core.with_meta(cljs.core.cst$sym$dirty_DASH_puts,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$buf,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$not_DASH_native], null)),cljs.core.with_meta(cljs.core.cst$sym$closed,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$add_BANG_], null); +}); + +cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$type = true; + +cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorStr = "cljs.core.async.impl.channels/ManyToManyChannel"; + +cljs.core.async.impl.channels.ManyToManyChannel.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.channels/ManyToManyChannel"); +}); + +cljs.core.async.impl.channels.__GT_ManyToManyChannel = (function cljs$core$async$impl$channels$__GT_ManyToManyChannel(takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_){ +return (new cljs.core.async.impl.channels.ManyToManyChannel(takes,dirty_takes,puts,dirty_puts,buf,closed,add_BANG_)); +}); + +cljs.core.async.impl.channels.ex_handler = (function cljs$core$async$impl$channels$ex_handler(ex){ +console.log(ex); + +return null; +}); +cljs.core.async.impl.channels.handle = (function cljs$core$async$impl$channels$handle(buf,exh,t){ +var else$ = (function (){var or__7960__auto__ = exh; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.async.impl.channels.ex_handler; +} +})().call(null,t); +if((else$ == null)){ +return buf; +} else { +return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2(buf,else$); +} +}); +cljs.core.async.impl.channels.chan = (function cljs$core$async$impl$channels$chan(var_args){ +var args15356 = []; +var len__9181__auto___15361 = arguments.length; +var i__9182__auto___15362 = (0); +while(true){ +if((i__9182__auto___15362 < len__9181__auto___15361)){ +args15356.push((arguments[i__9182__auto___15362])); + +var G__15363 = (i__9182__auto___15362 + (1)); +i__9182__auto___15362 = G__15363; +continue; +} else { +} +break; +} + +var G__15358 = args15356.length; +switch (G__15358) { +case 1: +return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args15356.length)].join(''))); + +} +}); + +cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$1 = (function (buf){ +return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2(buf,null); +}); + +cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$2 = (function (buf,xform){ +return cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3(buf,xform,null); +}); + +cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$3 = (function (buf,xform,exh){ +return (new cljs.core.async.impl.channels.ManyToManyChannel(cljs.core.async.impl.buffers.ring_buffer((32)),(0),cljs.core.async.impl.buffers.ring_buffer((32)),(0),buf,false,(function (){var add_BANG_ = (cljs.core.truth_(xform)?(xform.cljs$core$IFn$_invoke$arity$1 ? xform.cljs$core$IFn$_invoke$arity$1(cljs.core.async.impl.protocols.add_BANG_) : xform.call(null,cljs.core.async.impl.protocols.add_BANG_)):cljs.core.async.impl.protocols.add_BANG_); +return ((function (add_BANG_){ +return (function() { +var G__15365 = null; +var G__15365__1 = (function (buf__$1){ +try{return (add_BANG_.cljs$core$IFn$_invoke$arity$1 ? add_BANG_.cljs$core$IFn$_invoke$arity$1(buf__$1) : add_BANG_.call(null,buf__$1)); +}catch (e15359){var t = e15359; +return cljs.core.async.impl.channels.handle(buf__$1,exh,t); +}}); +var G__15365__2 = (function (buf__$1,val){ +try{return (add_BANG_.cljs$core$IFn$_invoke$arity$2 ? add_BANG_.cljs$core$IFn$_invoke$arity$2(buf__$1,val) : add_BANG_.call(null,buf__$1,val)); +}catch (e15360){var t = e15360; +return cljs.core.async.impl.channels.handle(buf__$1,exh,t); +}}); +G__15365 = function(buf__$1,val){ +switch(arguments.length){ +case 1: +return G__15365__1.call(this,buf__$1); +case 2: +return G__15365__2.call(this,buf__$1,val); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__15365.cljs$core$IFn$_invoke$arity$1 = G__15365__1; +G__15365.cljs$core$IFn$_invoke$arity$2 = G__15365__2; +return G__15365; +})() +;})(add_BANG_)) +})())); +}); + +cljs.core.async.impl.channels.chan.cljs$lang$maxFixedArity = 3; + diff --git a/public/js/rel/cljs/core/async/impl/dispatch.cljs b/public/js/rel/cljs/core/async/impl/dispatch.cljs new file mode 100644 index 0000000..468bbdf --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/dispatch.cljs @@ -0,0 +1,37 @@ +(ns cljs.core.async.impl.dispatch + (:require [cljs.core.async.impl.buffers :as buffers] + [goog.async.nextTick])) + +(def tasks (buffers/ring-buffer 32)) +(def running? false) +(def queued? false) + +(def TASK_BATCH_SIZE 1024) + +(declare queue-dispatcher) + +(defn process-messages [] + (set! running? true) + (set! queued? false) + (loop [count 0] + (let [m (.pop tasks)] + (when-not (nil? m) + (m) + (when (< count TASK_BATCH_SIZE) + (recur (inc count)))))) + (set! running? false) + (when (> (.-length tasks) 0) + (queue-dispatcher))) + +(defn queue-dispatcher [] + (when-not (and queued? running?) + (set! queued? true) + (goog.async.nextTick process-messages))) + +(defn run [f] + (.unbounded-unshift tasks f) + (queue-dispatcher)) + +(defn queue-delay [f delay] + (js/setTimeout f delay)) + diff --git a/public/js/rel/cljs/core/async/impl/dispatch.js b/public/js/rel/cljs/core/async/impl/dispatch.js new file mode 100644 index 0000000..b5f649e --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/dispatch.js @@ -0,0 +1,57 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core.async.impl.dispatch'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('cljs.core.async.impl.buffers'); +goog.require('goog.async.nextTick'); +cljs.core.async.impl.dispatch.tasks = cljs.core.async.impl.buffers.ring_buffer((32)); +cljs.core.async.impl.dispatch.running_QMARK_ = false; +cljs.core.async.impl.dispatch.queued_QMARK_ = false; +cljs.core.async.impl.dispatch.TASK_BATCH_SIZE = (1024); +cljs.core.async.impl.dispatch.process_messages = (function cljs$core$async$impl$dispatch$process_messages(){ +cljs.core.async.impl.dispatch.running_QMARK_ = true; + +cljs.core.async.impl.dispatch.queued_QMARK_ = false; + +var count_15282 = (0); +while(true){ +var m_15283 = cljs.core.async.impl.dispatch.tasks.pop(); +if((m_15283 == null)){ +} else { +(m_15283.cljs$core$IFn$_invoke$arity$0 ? m_15283.cljs$core$IFn$_invoke$arity$0() : m_15283.call(null)); + +if((count_15282 < cljs.core.async.impl.dispatch.TASK_BATCH_SIZE)){ +var G__15284 = (count_15282 + (1)); +count_15282 = G__15284; +continue; +} else { +} +} +break; +} + +cljs.core.async.impl.dispatch.running_QMARK_ = false; + +if((cljs.core.async.impl.dispatch.tasks.length > (0))){ +return (cljs.core.async.impl.dispatch.queue_dispatcher.cljs$core$IFn$_invoke$arity$0 ? cljs.core.async.impl.dispatch.queue_dispatcher.cljs$core$IFn$_invoke$arity$0() : cljs.core.async.impl.dispatch.queue_dispatcher.call(null)); +} else { +return null; +} +}); +cljs.core.async.impl.dispatch.queue_dispatcher = (function cljs$core$async$impl$dispatch$queue_dispatcher(){ +if((cljs.core.async.impl.dispatch.queued_QMARK_) && (cljs.core.async.impl.dispatch.running_QMARK_)){ +return null; +} else { +cljs.core.async.impl.dispatch.queued_QMARK_ = true; + +return goog.async.nextTick(cljs.core.async.impl.dispatch.process_messages); +} +}); +cljs.core.async.impl.dispatch.run = (function cljs$core$async$impl$dispatch$run(f){ +cljs.core.async.impl.dispatch.tasks.unbounded_unshift(f); + +return cljs.core.async.impl.dispatch.queue_dispatcher(); +}); +cljs.core.async.impl.dispatch.queue_delay = (function cljs$core$async$impl$dispatch$queue_delay(f,delay){ +return setTimeout(f,delay); +}); diff --git a/public/js/rel/cljs/core/async/impl/ioc_helpers.cljs b/public/js/rel/cljs/core/async/impl/ioc_helpers.cljs new file mode 100644 index 0000000..c849acc --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/ioc_helpers.cljs @@ -0,0 +1,146 @@ +(ns cljs.core.async.impl.ioc-helpers + (:require [cljs.core.async.impl.protocols :as impl]) + (:require-macros [cljs.core.async.impl.ioc-macros :as ioc])) + +(def ^:const FN-IDX 0) +(def ^:const STATE-IDX 1) +(def ^:const VALUE-IDX 2) +(def ^:const BINDINGS-IDX 3) +(def ^:const EXCEPTION-FRAMES 4) +(def ^:const CURRENT-EXCEPTION 5) +(def ^:const USER-START-IDX 6) + +(defn aset-object [arr idx o] + (aget arr idx o)) + +(defn aget-object [arr idx] + (aget arr idx)) + + +(defn finished? + "Returns true if the machine is in a finished state" + [state-array] + (keyword-identical? (aget state-array STATE-IDX) :finished)) + +(defn- fn-handler + [f] + (reify + impl/Handler + (active? [_] true) + (blockable? [_] true) + (commit [_] f))) + + +(defn run-state-machine [state] + ((aget-object state FN-IDX) state)) + +(defn run-state-machine-wrapped [state] + (try + (run-state-machine state) + (catch js/Object ex + (impl/close! ^not-native (aget-object state USER-START-IDX)) + (throw ex)))) + +(defn take! [state blk ^not-native c] + (if-let [cb (impl/take! c (fn-handler + (fn [x] + (ioc/aset-all! state VALUE-IDX x STATE-IDX blk) + (run-state-machine-wrapped state))))] + (do (ioc/aset-all! state VALUE-IDX @cb STATE-IDX blk) + :recur) + nil)) + +(defn put! [state blk ^not-native c val] + (if-let [cb (impl/put! c val (fn-handler (fn [ret-val] + (ioc/aset-all! state VALUE-IDX ret-val STATE-IDX blk) + (run-state-machine-wrapped state))))] + (do (ioc/aset-all! state VALUE-IDX @cb STATE-IDX blk) + :recur) + nil)) + +(defn return-chan [state value] + (let [^not-native c (aget state USER-START-IDX)] + (when-not (nil? value) + (impl/put! c value (fn-handler (fn [] nil)))) + (impl/close! c) + c)) + +(defrecord ExceptionFrame [catch-block + ^Class catch-exception + finally-block + continue-block + prev]) + +(defn add-exception-frame [state catch-block catch-exception finally-block continue-block] + (ioc/aset-all! state + EXCEPTION-FRAMES + (->ExceptionFrame catch-block + catch-exception + finally-block + continue-block + (aget-object state EXCEPTION-FRAMES)))) + +(defn process-exception [state] + (let [exception-frame (aget-object state EXCEPTION-FRAMES) + catch-block (:catch-block exception-frame) + catch-exception (:catch-exception exception-frame) + exception (aget-object state CURRENT-EXCEPTION)] + (cond + (and exception + (not exception-frame)) + (throw exception) + + (and exception + catch-block + (or (= :default catch-exception) + (instance? catch-exception exception))) + (ioc/aset-all! state + STATE-IDX + catch-block + VALUE-IDX + exception + CURRENT-EXCEPTION + nil + EXCEPTION-FRAMES + (assoc exception-frame + :catch-block nil + :catch-exception nil)) + + + (and exception + (not catch-block) + (not (:finally-block exception-frame))) + + (do (ioc/aset-all! state + EXCEPTION-FRAMES + (:prev exception-frame)) + (recur state)) + + (and exception + (not catch-block) + (:finally-block exception-frame)) + (ioc/aset-all! state + STATE-IDX + (:finally-block exception-frame) + EXCEPTION-FRAMES + (assoc exception-frame + :finally-block nil)) + + (and (not exception) + (:finally-block exception-frame)) + (do (ioc/aset-all! state + STATE-IDX + (:finally-block exception-frame) + EXCEPTION-FRAMES + (assoc exception-frame + :finally-block nil))) + + (and (not exception) + (not (:finally-block exception-frame))) + (do (ioc/aset-all! state + STATE-IDX + (:continue-block exception-frame) + EXCEPTION-FRAMES + (:prev exception-frame))) + + :else (throw (js/Error. "No matching clause"))))) diff --git a/public/js/rel/cljs/core/async/impl/ioc_helpers.js b/public/js/rel/cljs/core/async/impl/ioc_helpers.js new file mode 100644 index 0000000..4a98f32 --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/ioc_helpers.js @@ -0,0 +1,511 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core.async.impl.ioc_helpers'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('cljs.core.async.impl.protocols'); +cljs.core.async.impl.ioc_helpers.FN_IDX = (0); +cljs.core.async.impl.ioc_helpers.STATE_IDX = (1); +cljs.core.async.impl.ioc_helpers.VALUE_IDX = (2); +cljs.core.async.impl.ioc_helpers.BINDINGS_IDX = (3); +cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES = (4); +cljs.core.async.impl.ioc_helpers.CURRENT_EXCEPTION = (5); +cljs.core.async.impl.ioc_helpers.USER_START_IDX = (6); +cljs.core.async.impl.ioc_helpers.aset_object = (function cljs$core$async$impl$ioc_helpers$aset_object(arr,idx,o){ +return (arr[idx][o]); +}); +cljs.core.async.impl.ioc_helpers.aget_object = (function cljs$core$async$impl$ioc_helpers$aget_object(arr,idx){ +return (arr[idx]); +}); +/** + * Returns true if the machine is in a finished state + */ +cljs.core.async.impl.ioc_helpers.finished_QMARK_ = (function cljs$core$async$impl$ioc_helpers$finished_QMARK_(state_array){ +return cljs.core.keyword_identical_QMARK_((state_array[cljs.core.async.impl.ioc_helpers.STATE_IDX]),cljs.core.cst$kw$finished); +}); +cljs.core.async.impl.ioc_helpers.fn_handler = (function cljs$core$async$impl$ioc_helpers$fn_handler(f){ +if(typeof cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {cljs.core.async.impl.protocols.Handler} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} +*/ +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967 = (function (f,meta16968){ +this.f = f; +this.meta16968 = meta16968; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (_16969,meta16968__$1){ +var self__ = this; +var _16969__$1 = this; +return (new cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967(self__.f,meta16968__$1)); +}); + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_16969){ +var self__ = this; +var _16969__$1 = this; +return self__.meta16968; +}); + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.prototype.cljs$core$async$impl$protocols$Handler$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.prototype.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return true; +}); + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.prototype.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return true; +}); + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.prototype.cljs$core$async$impl$protocols$Handler$commit$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.f; +}); + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.cst$sym$meta16968], null); +}); + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.cljs$lang$type = true; + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.cljs$lang$ctorStr = "cljs.core.async.impl.ioc-helpers/t_cljs$core$async$impl$ioc_helpers16967"; + +cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.ioc-helpers/t_cljs$core$async$impl$ioc_helpers16967"); +}); + +cljs.core.async.impl.ioc_helpers.__GT_t_cljs$core$async$impl$ioc_helpers16967 = (function cljs$core$async$impl$ioc_helpers$fn_handler_$___GT_t_cljs$core$async$impl$ioc_helpers16967(f__$1,meta16968){ +return (new cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967(f__$1,meta16968)); +}); + +} + +return (new cljs.core.async.impl.ioc_helpers.t_cljs$core$async$impl$ioc_helpers16967(f,cljs.core.PersistentArrayMap.EMPTY)); +}); +cljs.core.async.impl.ioc_helpers.run_state_machine = (function cljs$core$async$impl$ioc_helpers$run_state_machine(state){ +return cljs.core.async.impl.ioc_helpers.aget_object(state,cljs.core.async.impl.ioc_helpers.FN_IDX).call(null,state); +}); +cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped = (function cljs$core$async$impl$ioc_helpers$run_state_machine_wrapped(state){ +try{return cljs.core.async.impl.ioc_helpers.run_state_machine(state); +}catch (e16971){if((e16971 instanceof Object)){ +var ex = e16971; +cljs.core.async.impl.ioc_helpers.aget_object(state,cljs.core.async.impl.ioc_helpers.USER_START_IDX).cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(null); + +throw ex; +} else { +throw e16971; + +} +}}); +cljs.core.async.impl.ioc_helpers.take_BANG_ = (function cljs$core$async$impl$ioc_helpers$take_BANG_(state,blk,c){ +var temp__5276__auto__ = c.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2(null,cljs.core.async.impl.ioc_helpers.fn_handler((function (x){ +var statearr_16974_16976 = state; +(statearr_16974_16976[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = x); + +(statearr_16974_16976[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk); + + +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state); +}))); +if(cljs.core.truth_(temp__5276__auto__)){ +var cb = temp__5276__auto__; +var statearr_16975_16977 = state; +(statearr_16975_16977[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cb) : cljs.core.deref.call(null,cb))); + +(statearr_16975_16977[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +}); +cljs.core.async.impl.ioc_helpers.put_BANG_ = (function cljs$core$async$impl$ioc_helpers$put_BANG_(state,blk,c,val){ +var temp__5276__auto__ = c.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3(null,val,cljs.core.async.impl.ioc_helpers.fn_handler((function (ret_val){ +var statearr_16980_16982 = state; +(statearr_16980_16982[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = ret_val); + +(statearr_16980_16982[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk); + + +return cljs.core.async.impl.ioc_helpers.run_state_machine_wrapped(state); +}))); +if(cljs.core.truth_(temp__5276__auto__)){ +var cb = temp__5276__auto__; +var statearr_16981_16983 = state; +(statearr_16981_16983[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(cb) : cljs.core.deref.call(null,cb))); + +(statearr_16981_16983[cljs.core.async.impl.ioc_helpers.STATE_IDX] = blk); + + +return cljs.core.cst$kw$recur; +} else { +return null; +} +}); +cljs.core.async.impl.ioc_helpers.return_chan = (function cljs$core$async$impl$ioc_helpers$return_chan(state,value){ +var c = (state[cljs.core.async.impl.ioc_helpers.USER_START_IDX]); +if((value == null)){ +} else { +c.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3(null,value,cljs.core.async.impl.ioc_helpers.fn_handler(((function (c){ +return (function (){ +return null; +});})(c)) +)); +} + +c.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(null); + +return c; +}); + +/** +* @constructor + * @implements {cljs.core.IRecord} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.ICollection} + * @implements {cljs.core.ICounted} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.ICloneable} + * @implements {cljs.core.IPrintWithWriter} + * @implements {cljs.core.IIterable} + * @implements {cljs.core.IWithMeta} + * @implements {cljs.core.IAssociative} + * @implements {cljs.core.IMap} + * @implements {cljs.core.ILookup} +*/ +cljs.core.async.impl.ioc_helpers.ExceptionFrame = (function (catch_block,catch_exception,finally_block,continue_block,prev,__meta,__extmap,__hash){ +this.catch_block = catch_block; +this.catch_exception = catch_exception; +this.finally_block = finally_block; +this.continue_block = continue_block; +this.prev = prev; +this.__meta = __meta; +this.__extmap = __extmap; +this.__hash = __hash; +this.cljs$lang$protocol_mask$partition0$ = 2229667594; +this.cljs$lang$protocol_mask$partition1$ = 8192; +}) +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ILookup$_lookup$arity$2 = (function (this__8635__auto__,k__8636__auto__){ +var self__ = this; +var this__8635__auto____$1 = this; +return this__8635__auto____$1.cljs$core$ILookup$_lookup$arity$3(null,k__8636__auto__,null); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ILookup$_lookup$arity$3 = (function (this__8637__auto__,k16985,else__8638__auto__){ +var self__ = this; +var this__8637__auto____$1 = this; +var G__16987 = k16985; +var G__16987__$1 = (((G__16987 instanceof cljs.core.Keyword))?G__16987.fqn:null); +switch (G__16987__$1) { +case "catch-block": +return self__.catch_block; + +break; +case "catch-exception": +return self__.catch_exception; + +break; +case "finally-block": +return self__.finally_block; + +break; +case "continue-block": +return self__.continue_block; + +break; +case "prev": +return self__.prev; + +break; +default: +return cljs.core.get.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k16985,else__8638__auto__); + +} +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (this__8649__auto__,writer__8650__auto__,opts__8651__auto__){ +var self__ = this; +var this__8649__auto____$1 = this; +var pr_pair__8652__auto__ = ((function (this__8649__auto____$1){ +return (function (keyval__8653__auto__){ +return cljs.core.pr_sequential_writer(writer__8650__auto__,cljs.core.pr_writer,""," ","",opts__8651__auto__,keyval__8653__auto__); +});})(this__8649__auto____$1)) +; +return cljs.core.pr_sequential_writer(writer__8650__auto__,pr_pair__8652__auto__,"#cljs.core.async.impl.ioc-helpers.ExceptionFrame{",", ","}",opts__8651__auto__,cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$catch_DASH_block,self__.catch_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$catch_DASH_exception,self__.catch_exception],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$finally_DASH_block,self__.finally_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$continue_DASH_block,self__.continue_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$prev,self__.prev],null))], null),self__.__extmap)); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IIterable$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IIterable$_iterator$arity$1 = (function (G__16984){ +var self__ = this; +var G__16984__$1 = this; +return (new cljs.core.RecordIter((0),G__16984__$1,5,new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$catch_DASH_block,cljs.core.cst$kw$catch_DASH_exception,cljs.core.cst$kw$finally_DASH_block,cljs.core.cst$kw$continue_DASH_block,cljs.core.cst$kw$prev], null),(cljs.core.truth_(self__.__extmap)?cljs.core._iterator(self__.__extmap):cljs.core.nil_iter()))); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IMeta$_meta$arity$1 = (function (this__8633__auto__){ +var self__ = this; +var this__8633__auto____$1 = this; +return self__.__meta; +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ICloneable$_clone$arity$1 = (function (this__8629__auto__){ +var self__ = this; +var this__8629__auto____$1 = this; +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,self__.__hash)); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ICounted$_count$arity$1 = (function (this__8639__auto__){ +var self__ = this; +var this__8639__auto____$1 = this; +return (5 + cljs.core.count(self__.__extmap)); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IHash$_hash$arity$1 = (function (this__8630__auto__){ +var self__ = this; +var this__8630__auto____$1 = this; +var h__8402__auto__ = self__.__hash; +if(!((h__8402__auto__ == null))){ +return h__8402__auto__; +} else { +var h__8402__auto____$1 = cljs.core.hash_imap(this__8630__auto____$1); +self__.__hash = h__8402__auto____$1; + +return h__8402__auto____$1; +} +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (this__8631__auto__,other__8632__auto__){ +var self__ = this; +var this__8631__auto____$1 = this; +if(cljs.core.truth_((function (){var and__7948__auto__ = other__8632__auto__; +if(cljs.core.truth_(and__7948__auto__)){ +return ((this__8631__auto____$1.constructor === other__8632__auto__.constructor)) && (cljs.core.equiv_map(this__8631__auto____$1,other__8632__auto__)); +} else { +return and__7948__auto__; +} +})())){ +return true; +} else { +return false; +} +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IMap$_dissoc$arity$2 = (function (this__8644__auto__,k__8645__auto__){ +var self__ = this; +var this__8644__auto____$1 = this; +if(cljs.core.contains_QMARK_(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 5, [cljs.core.cst$kw$finally_DASH_block,null,cljs.core.cst$kw$catch_DASH_block,null,cljs.core.cst$kw$catch_DASH_exception,null,cljs.core.cst$kw$prev,null,cljs.core.cst$kw$continue_DASH_block,null], null), null),k__8645__auto__)){ +return cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(cljs.core._with_meta(cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,this__8644__auto____$1),self__.__meta),k__8645__auto__); +} else { +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,cljs.core.not_empty(cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(self__.__extmap,k__8645__auto__)),null)); +} +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IAssociative$_assoc$arity$3 = (function (this__8642__auto__,k__8643__auto__,G__16984){ +var self__ = this; +var this__8642__auto____$1 = this; +var pred__16988 = cljs.core.keyword_identical_QMARK_; +var expr__16989 = k__8643__auto__; +if(cljs.core.truth_((function (){var G__16991 = cljs.core.cst$kw$catch_DASH_block; +var G__16992 = expr__16989; +return (pred__16988.cljs$core$IFn$_invoke$arity$2 ? pred__16988.cljs$core$IFn$_invoke$arity$2(G__16991,G__16992) : pred__16988.call(null,G__16991,G__16992)); +})())){ +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(G__16984,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,null)); +} else { +if(cljs.core.truth_((function (){var G__16993 = cljs.core.cst$kw$catch_DASH_exception; +var G__16994 = expr__16989; +return (pred__16988.cljs$core$IFn$_invoke$arity$2 ? pred__16988.cljs$core$IFn$_invoke$arity$2(G__16993,G__16994) : pred__16988.call(null,G__16993,G__16994)); +})())){ +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,G__16984,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,null)); +} else { +if(cljs.core.truth_((function (){var G__16995 = cljs.core.cst$kw$finally_DASH_block; +var G__16996 = expr__16989; +return (pred__16988.cljs$core$IFn$_invoke$arity$2 ? pred__16988.cljs$core$IFn$_invoke$arity$2(G__16995,G__16996) : pred__16988.call(null,G__16995,G__16996)); +})())){ +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,G__16984,self__.continue_block,self__.prev,self__.__meta,self__.__extmap,null)); +} else { +if(cljs.core.truth_((function (){var G__16997 = cljs.core.cst$kw$continue_DASH_block; +var G__16998 = expr__16989; +return (pred__16988.cljs$core$IFn$_invoke$arity$2 ? pred__16988.cljs$core$IFn$_invoke$arity$2(G__16997,G__16998) : pred__16988.call(null,G__16997,G__16998)); +})())){ +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,G__16984,self__.prev,self__.__meta,self__.__extmap,null)); +} else { +if(cljs.core.truth_((function (){var G__16999 = cljs.core.cst$kw$prev; +var G__17000 = expr__16989; +return (pred__16988.cljs$core$IFn$_invoke$arity$2 ? pred__16988.cljs$core$IFn$_invoke$arity$2(G__16999,G__17000) : pred__16988.call(null,G__16999,G__17000)); +})())){ +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,G__16984,self__.__meta,self__.__extmap,null)); +} else { +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,self__.__meta,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(self__.__extmap,k__8643__auto__,G__16984),null)); +} +} +} +} +} +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (this__8647__auto__){ +var self__ = this; +var this__8647__auto____$1 = this; +return cljs.core.seq(cljs.core.concat.cljs$core$IFn$_invoke$arity$2(new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$catch_DASH_block,self__.catch_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$catch_DASH_exception,self__.catch_exception],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$finally_DASH_block,self__.finally_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$continue_DASH_block,self__.continue_block],null)),(new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,[cljs.core.cst$kw$prev,self__.prev],null))], null),self__.__extmap)); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = (function (this__8634__auto__,G__16984){ +var self__ = this; +var this__8634__auto____$1 = this; +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(self__.catch_block,self__.catch_exception,self__.finally_block,self__.continue_block,self__.prev,G__16984,self__.__extmap,self__.__hash)); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.prototype.cljs$core$ICollection$_conj$arity$2 = (function (this__8640__auto__,entry__8641__auto__){ +var self__ = this; +var this__8640__auto____$1 = this; +if(cljs.core.vector_QMARK_(entry__8641__auto__)){ +return this__8640__auto____$1.cljs$core$IAssociative$_assoc$arity$3(null,cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry__8641__auto__,(0)),cljs.core._nth.cljs$core$IFn$_invoke$arity$2(entry__8641__auto__,(1))); +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core._conj,this__8640__auto____$1,entry__8641__auto__); +} +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$catch_DASH_block,cljs.core.with_meta(cljs.core.cst$sym$catch_DASH_exception,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$Class], null)),cljs.core.cst$sym$finally_DASH_block,cljs.core.cst$sym$continue_DASH_block,cljs.core.cst$sym$prev], null); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.cljs$lang$type = true; + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.cljs$lang$ctorPrSeq = (function (this__8671__auto__){ +return cljs.core._conj(cljs.core.List.EMPTY,"cljs.core.async.impl.ioc-helpers/ExceptionFrame"); +}); + +cljs.core.async.impl.ioc_helpers.ExceptionFrame.cljs$lang$ctorPrWriter = (function (this__8671__auto__,writer__8672__auto__){ +return cljs.core._write(writer__8672__auto__,"cljs.core.async.impl.ioc-helpers/ExceptionFrame"); +}); + +cljs.core.async.impl.ioc_helpers.__GT_ExceptionFrame = (function cljs$core$async$impl$ioc_helpers$__GT_ExceptionFrame(catch_block,catch_exception,finally_block,continue_block,prev){ +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(catch_block,catch_exception,finally_block,continue_block,prev,null,null,null)); +}); + +cljs.core.async.impl.ioc_helpers.map__GT_ExceptionFrame = (function cljs$core$async$impl$ioc_helpers$map__GT_ExceptionFrame(G__16986){ +return (new cljs.core.async.impl.ioc_helpers.ExceptionFrame(cljs.core.cst$kw$catch_DASH_block.cljs$core$IFn$_invoke$arity$1(G__16986),cljs.core.cst$kw$catch_DASH_exception.cljs$core$IFn$_invoke$arity$1(G__16986),cljs.core.cst$kw$finally_DASH_block.cljs$core$IFn$_invoke$arity$1(G__16986),cljs.core.cst$kw$continue_DASH_block.cljs$core$IFn$_invoke$arity$1(G__16986),cljs.core.cst$kw$prev.cljs$core$IFn$_invoke$arity$1(G__16986),null,cljs.core.dissoc.cljs$core$IFn$_invoke$arity$variadic(G__16986,cljs.core.cst$kw$catch_DASH_block,cljs.core.array_seq([cljs.core.cst$kw$catch_DASH_exception,cljs.core.cst$kw$finally_DASH_block,cljs.core.cst$kw$continue_DASH_block,cljs.core.cst$kw$prev], 0)),null)); +}); + +cljs.core.async.impl.ioc_helpers.add_exception_frame = (function cljs$core$async$impl$ioc_helpers$add_exception_frame(state,catch_block,catch_exception,finally_block,continue_block){ +var statearr_17003 = state; +(statearr_17003[cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES] = cljs.core.async.impl.ioc_helpers.__GT_ExceptionFrame(catch_block,catch_exception,finally_block,continue_block,cljs.core.async.impl.ioc_helpers.aget_object(state,cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES))); + +return statearr_17003; +}); +cljs.core.async.impl.ioc_helpers.process_exception = (function cljs$core$async$impl$ioc_helpers$process_exception(state){ +while(true){ +var exception_frame = cljs.core.async.impl.ioc_helpers.aget_object(state,cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES); +var catch_block = cljs.core.cst$kw$catch_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame); +var catch_exception = cljs.core.cst$kw$catch_DASH_exception.cljs$core$IFn$_invoke$arity$1(exception_frame); +var exception = cljs.core.async.impl.ioc_helpers.aget_object(state,cljs.core.async.impl.ioc_helpers.CURRENT_EXCEPTION); +if(cljs.core.truth_((function (){var and__7948__auto__ = exception; +if(cljs.core.truth_(and__7948__auto__)){ +return cljs.core.not(exception_frame); +} else { +return and__7948__auto__; +} +})())){ +throw exception; +} else { +if(cljs.core.truth_((function (){var and__7948__auto__ = exception; +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = catch_block; +if(cljs.core.truth_(and__7948__auto____$1)){ +return (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.cst$kw$default,catch_exception)) || ((exception instanceof catch_exception)); +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})())){ +var statearr_17009 = state; +(statearr_17009[cljs.core.async.impl.ioc_helpers.STATE_IDX] = catch_block); + +(statearr_17009[cljs.core.async.impl.ioc_helpers.VALUE_IDX] = exception); + +(statearr_17009[cljs.core.async.impl.ioc_helpers.CURRENT_EXCEPTION] = null); + +(statearr_17009[cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES] = cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(exception_frame,cljs.core.cst$kw$catch_DASH_block,null,cljs.core.array_seq([cljs.core.cst$kw$catch_DASH_exception,null], 0))); + +return statearr_17009; +} else { +if(cljs.core.truth_((function (){var and__7948__auto__ = exception; +if(cljs.core.truth_(and__7948__auto__)){ +return (cljs.core.not(catch_block)) && (cljs.core.not(cljs.core.cst$kw$finally_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame))); +} else { +return and__7948__auto__; +} +})())){ +var statearr_17010_17014 = state; +(statearr_17010_17014[cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES] = cljs.core.cst$kw$prev.cljs$core$IFn$_invoke$arity$1(exception_frame)); + + +var G__17015 = state; +state = G__17015; +continue; +} else { +if(cljs.core.truth_((function (){var and__7948__auto__ = exception; +if(cljs.core.truth_(and__7948__auto__)){ +var and__7948__auto____$1 = cljs.core.not(catch_block); +if(and__7948__auto____$1){ +return cljs.core.cst$kw$finally_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame); +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})())){ +var statearr_17011 = state; +(statearr_17011[cljs.core.async.impl.ioc_helpers.STATE_IDX] = cljs.core.cst$kw$finally_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame)); + +(statearr_17011[cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES] = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(exception_frame,cljs.core.cst$kw$finally_DASH_block,null)); + +return statearr_17011; +} else { +if(cljs.core.truth_((function (){var and__7948__auto__ = cljs.core.not(exception); +if(and__7948__auto__){ +return cljs.core.cst$kw$finally_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame); +} else { +return and__7948__auto__; +} +})())){ +var statearr_17012 = state; +(statearr_17012[cljs.core.async.impl.ioc_helpers.STATE_IDX] = cljs.core.cst$kw$finally_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame)); + +(statearr_17012[cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES] = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(exception_frame,cljs.core.cst$kw$finally_DASH_block,null)); + +return statearr_17012; +} else { +if((cljs.core.not(exception)) && (cljs.core.not(cljs.core.cst$kw$finally_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame)))){ +var statearr_17013 = state; +(statearr_17013[cljs.core.async.impl.ioc_helpers.STATE_IDX] = cljs.core.cst$kw$continue_DASH_block.cljs$core$IFn$_invoke$arity$1(exception_frame)); + +(statearr_17013[cljs.core.async.impl.ioc_helpers.EXCEPTION_FRAMES] = cljs.core.cst$kw$prev.cljs$core$IFn$_invoke$arity$1(exception_frame)); + +return statearr_17013; +} else { +throw (new Error("No matching clause")); + +} +} +} +} +} +} +break; +} +}); diff --git a/public/js/rel/cljs/core/async/impl/protocols.cljs b/public/js/rel/cljs/core/async/impl/protocols.cljs new file mode 100644 index 0000000..793a3f1 --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/protocols.cljs @@ -0,0 +1,43 @@ +;; Copyright (c) Rich Hickey and contributors. All rights reserved. +;; The use and distribution terms for this software are covered by the +;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +;; which can be found in the file epl-v10.html at the root of this distribution. +;; By using this software in any fashion, you are agreeing to be bound by +;; the terms of this license. +;; You must not remove this notice, or any other, from this software. + +(ns cljs.core.async.impl.protocols) + +(def ^:const MAX-QUEUE-SIZE 1024) + +(defprotocol ReadPort + (take! [port fn1-handler] "derefable val if taken, nil if take was enqueued")) + +(defprotocol WritePort + (put! [port val fn1-handler] "derefable boolean (false if already closed) if handled, nil if put was enqueued. + Must throw on nil val.")) + +(defprotocol Channel + (close! [chan]) + (closed? [chan])) + +(defprotocol Handler + (active? [h] "returns true if has callback. Must work w/o lock") + (blockable? [h] "returns true if this handler may be blocked, otherwise it must not block") + #_(lock-id [h] "a unique id for lock acquisition order, 0 if no lock") + (commit [h] "commit to fulfilling its end of the transfer, returns cb. Must be called within lock")) + +(defprotocol Buffer + (full? [b] "returns true if buffer cannot accept put") + (remove! [b] "remove and return next item from buffer, called under chan mutex") + (add!* [b itm] "if room, add item to the buffer, returns b, called under chan mutex") + (close-buf! [b] "called on chan closed under chan mutex, return ignored")) + +(defn add! + ([b] b) + ([b itm] + (assert (not (nil? itm))) + (add!* b itm))) + +;; Defines a buffer that will never block (return true to full?) +(defprotocol UnblockingBuffer) diff --git a/public/js/rel/cljs/core/async/impl/protocols.js b/public/js/rel/cljs/core/async/impl/protocols.js new file mode 100644 index 0000000..9ec8148 --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/protocols.js @@ -0,0 +1,325 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core.async.impl.protocols'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +cljs.core.async.impl.protocols.MAX_QUEUE_SIZE = (1024); + +/** + * @interface + */ +cljs.core.async.impl.protocols.ReadPort = function(){}; + +/** + * derefable val if taken, nil if take was enqueued + */ +cljs.core.async.impl.protocols.take_BANG_ = (function cljs$core$async$impl$protocols$take_BANG_(port,fn1_handler){ +if((!((port == null))) && (!((port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2 == null)))){ +return port.cljs$core$async$impl$protocols$ReadPort$take_BANG_$arity$2(port,fn1_handler); +} else { +var x__8678__auto__ = (((port == null))?null:port); +var m__8679__auto__ = (cljs.core.async.impl.protocols.take_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(port,fn1_handler) : m__8679__auto__.call(null,port,fn1_handler)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.take_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(port,fn1_handler) : m__8679__auto____$1.call(null,port,fn1_handler)); +} else { +throw cljs.core.missing_protocol("ReadPort.take!",port); +} +} +} +}); + + +/** + * @interface + */ +cljs.core.async.impl.protocols.WritePort = function(){}; + +/** + * derefable boolean (false if already closed) if handled, nil if put was enqueued. + * Must throw on nil val. + */ +cljs.core.async.impl.protocols.put_BANG_ = (function cljs$core$async$impl$protocols$put_BANG_(port,val,fn1_handler){ +if((!((port == null))) && (!((port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3 == null)))){ +return port.cljs$core$async$impl$protocols$WritePort$put_BANG_$arity$3(port,val,fn1_handler); +} else { +var x__8678__auto__ = (((port == null))?null:port); +var m__8679__auto__ = (cljs.core.async.impl.protocols.put_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$3(port,val,fn1_handler) : m__8679__auto__.call(null,port,val,fn1_handler)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.put_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$3(port,val,fn1_handler) : m__8679__auto____$1.call(null,port,val,fn1_handler)); +} else { +throw cljs.core.missing_protocol("WritePort.put!",port); +} +} +} +}); + + +/** + * @interface + */ +cljs.core.async.impl.protocols.Channel = function(){}; + +cljs.core.async.impl.protocols.close_BANG_ = (function cljs$core$async$impl$protocols$close_BANG_(chan){ +if((!((chan == null))) && (!((chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1 == null)))){ +return chan.cljs$core$async$impl$protocols$Channel$close_BANG_$arity$1(chan); +} else { +var x__8678__auto__ = (((chan == null))?null:chan); +var m__8679__auto__ = (cljs.core.async.impl.protocols.close_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(chan) : m__8679__auto__.call(null,chan)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.close_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(chan) : m__8679__auto____$1.call(null,chan)); +} else { +throw cljs.core.missing_protocol("Channel.close!",chan); +} +} +} +}); + +cljs.core.async.impl.protocols.closed_QMARK_ = (function cljs$core$async$impl$protocols$closed_QMARK_(chan){ +if((!((chan == null))) && (!((chan.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1 == null)))){ +return chan.cljs$core$async$impl$protocols$Channel$closed_QMARK_$arity$1(chan); +} else { +var x__8678__auto__ = (((chan == null))?null:chan); +var m__8679__auto__ = (cljs.core.async.impl.protocols.closed_QMARK_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(chan) : m__8679__auto__.call(null,chan)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.closed_QMARK_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(chan) : m__8679__auto____$1.call(null,chan)); +} else { +throw cljs.core.missing_protocol("Channel.closed?",chan); +} +} +} +}); + + +/** + * @interface + */ +cljs.core.async.impl.protocols.Handler = function(){}; + +/** + * returns true if has callback. Must work w/o lock + */ +cljs.core.async.impl.protocols.active_QMARK_ = (function cljs$core$async$impl$protocols$active_QMARK_(h){ +if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1 == null)))){ +return h.cljs$core$async$impl$protocols$Handler$active_QMARK_$arity$1(h); +} else { +var x__8678__auto__ = (((h == null))?null:h); +var m__8679__auto__ = (cljs.core.async.impl.protocols.active_QMARK_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(h) : m__8679__auto__.call(null,h)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.active_QMARK_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(h) : m__8679__auto____$1.call(null,h)); +} else { +throw cljs.core.missing_protocol("Handler.active?",h); +} +} +} +}); + +/** + * returns true if this handler may be blocked, otherwise it must not block + */ +cljs.core.async.impl.protocols.blockable_QMARK_ = (function cljs$core$async$impl$protocols$blockable_QMARK_(h){ +if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1 == null)))){ +return h.cljs$core$async$impl$protocols$Handler$blockable_QMARK_$arity$1(h); +} else { +var x__8678__auto__ = (((h == null))?null:h); +var m__8679__auto__ = (cljs.core.async.impl.protocols.blockable_QMARK_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(h) : m__8679__auto__.call(null,h)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.blockable_QMARK_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(h) : m__8679__auto____$1.call(null,h)); +} else { +throw cljs.core.missing_protocol("Handler.blockable?",h); +} +} +} +}); + +/** + * commit to fulfilling its end of the transfer, returns cb. Must be called within lock + */ +cljs.core.async.impl.protocols.commit = (function cljs$core$async$impl$protocols$commit(h){ +if((!((h == null))) && (!((h.cljs$core$async$impl$protocols$Handler$commit$arity$1 == null)))){ +return h.cljs$core$async$impl$protocols$Handler$commit$arity$1(h); +} else { +var x__8678__auto__ = (((h == null))?null:h); +var m__8679__auto__ = (cljs.core.async.impl.protocols.commit[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(h) : m__8679__auto__.call(null,h)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.commit["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(h) : m__8679__auto____$1.call(null,h)); +} else { +throw cljs.core.missing_protocol("Handler.commit",h); +} +} +} +}); + + +/** + * @interface + */ +cljs.core.async.impl.protocols.Buffer = function(){}; + +/** + * returns true if buffer cannot accept put + */ +cljs.core.async.impl.protocols.full_QMARK_ = (function cljs$core$async$impl$protocols$full_QMARK_(b){ +if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1 == null)))){ +return b.cljs$core$async$impl$protocols$Buffer$full_QMARK_$arity$1(b); +} else { +var x__8678__auto__ = (((b == null))?null:b); +var m__8679__auto__ = (cljs.core.async.impl.protocols.full_QMARK_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(b) : m__8679__auto__.call(null,b)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.full_QMARK_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(b) : m__8679__auto____$1.call(null,b)); +} else { +throw cljs.core.missing_protocol("Buffer.full?",b); +} +} +} +}); + +/** + * remove and return next item from buffer, called under chan mutex + */ +cljs.core.async.impl.protocols.remove_BANG_ = (function cljs$core$async$impl$protocols$remove_BANG_(b){ +if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1 == null)))){ +return b.cljs$core$async$impl$protocols$Buffer$remove_BANG_$arity$1(b); +} else { +var x__8678__auto__ = (((b == null))?null:b); +var m__8679__auto__ = (cljs.core.async.impl.protocols.remove_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(b) : m__8679__auto__.call(null,b)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.remove_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(b) : m__8679__auto____$1.call(null,b)); +} else { +throw cljs.core.missing_protocol("Buffer.remove!",b); +} +} +} +}); + +/** + * if room, add item to the buffer, returns b, called under chan mutex + */ +cljs.core.async.impl.protocols.add_BANG__STAR_ = (function cljs$core$async$impl$protocols$add_BANG__STAR_(b,itm){ +if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2 == null)))){ +return b.cljs$core$async$impl$protocols$Buffer$add_BANG__STAR_$arity$2(b,itm); +} else { +var x__8678__auto__ = (((b == null))?null:b); +var m__8679__auto__ = (cljs.core.async.impl.protocols.add_BANG__STAR_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(b,itm) : m__8679__auto__.call(null,b,itm)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.add_BANG__STAR_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(b,itm) : m__8679__auto____$1.call(null,b,itm)); +} else { +throw cljs.core.missing_protocol("Buffer.add!*",b); +} +} +} +}); + +/** + * called on chan closed under chan mutex, return ignored + */ +cljs.core.async.impl.protocols.close_buf_BANG_ = (function cljs$core$async$impl$protocols$close_buf_BANG_(b){ +if((!((b == null))) && (!((b.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1 == null)))){ +return b.cljs$core$async$impl$protocols$Buffer$close_buf_BANG_$arity$1(b); +} else { +var x__8678__auto__ = (((b == null))?null:b); +var m__8679__auto__ = (cljs.core.async.impl.protocols.close_buf_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(b) : m__8679__auto__.call(null,b)); +} else { +var m__8679__auto____$1 = (cljs.core.async.impl.protocols.close_buf_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(b) : m__8679__auto____$1.call(null,b)); +} else { +throw cljs.core.missing_protocol("Buffer.close-buf!",b); +} +} +} +}); + +cljs.core.async.impl.protocols.add_BANG_ = (function cljs$core$async$impl$protocols$add_BANG_(var_args){ +var args15268 = []; +var len__9181__auto___15271 = arguments.length; +var i__9182__auto___15272 = (0); +while(true){ +if((i__9182__auto___15272 < len__9181__auto___15271)){ +args15268.push((arguments[i__9182__auto___15272])); + +var G__15273 = (i__9182__auto___15272 + (1)); +i__9182__auto___15272 = G__15273; +continue; +} else { +} +break; +} + +var G__15270 = args15268.length; +switch (G__15270) { +case 1: +return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args15268.length)].join(''))); + +} +}); + +cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$1 = (function (b){ +return b; +}); + +cljs.core.async.impl.protocols.add_BANG_.cljs$core$IFn$_invoke$arity$2 = (function (b,itm){ +if(!((itm == null))){ +} else { +throw (new Error("Assert failed: (not (nil? itm))")); +} + +return cljs.core.async.impl.protocols.add_BANG__STAR_(b,itm); +}); + +cljs.core.async.impl.protocols.add_BANG_.cljs$lang$maxFixedArity = 2; + + +/** + * @interface + */ +cljs.core.async.impl.protocols.UnblockingBuffer = function(){}; + diff --git a/public/js/rel/cljs/core/async/impl/timers.cljs b/public/js/rel/cljs/core/async/impl/timers.cljs new file mode 100644 index 0000000..591e206 --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/timers.cljs @@ -0,0 +1,167 @@ +;; Copyright (c) Rich Hickey and contributors. All rights reserved. +;; The use and distribution terms for this software are covered by the +;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +;; which can be found in the file epl-v10.html at the root of this distribution. +;; By using this software in any fashion, you are agreeing to be bound by +;; the terms of this license. +;; You must not remove this notice, or any other, from this software. + +(ns cljs.core.async.impl.timers + (:require [cljs.core.async.impl.protocols :as impl] + [cljs.core.async.impl.channels :as channels] + [cljs.core.async.impl.dispatch :as dispatch])) + +(def MAX_LEVEL 15) ;; 16 levels +(def P (/ 1 2)) + +(defn random-level + ([] (random-level 0)) + ([level] + (if (and (< (.random js/Math) P) + (< level MAX_LEVEL)) + (recur (inc level)) + level))) + +(deftype SkipListNode [key ^:mutable val forward] + ISeqable + (-seq [coll] + (list key val)) + + IPrintWithWriter + (-pr-writer [coll writer opts] + (pr-sequential-writer writer pr-writer "[" " " "]" opts coll))) + +(defn skip-list-node + ([level] (skip-list-node nil nil level)) + ([k v level] + (let [arr (make-array (inc level))] + (loop [i 0] + (when (< i (alength arr)) + (aset arr i nil) + (recur (inc i)))) + (SkipListNode. k v arr)))) + +(defn least-greater-node + ([x k level] (least-greater-node x k level nil)) + ([x k level update] + (if-not (neg? level) + (let [x (loop [x x] + (if-let [x' (aget (.-forward x) level)] + (if (< (.-key x') k) + (recur x') + x) + x))] + (when-not (nil? update) + (aset update level x)) + (recur x k (dec level) update)) + x))) + +(deftype SkipList [header ^:mutable level] + Object + (put [coll k v] + (let [update (make-array MAX_LEVEL) + x (least-greater-node header k level update) + x (aget (.-forward x) 0)] + (if (and (not (nil? x)) (== (.-key x) k)) + (set! (.-val x) v) + (let [new-level (random-level)] + (when (> new-level level) + (loop [i (inc level)] + (when (<= i (inc new-level)) + (aset update i header) + (recur (inc i)))) + (set! level new-level)) + (let [x (skip-list-node k v (make-array new-level))] + (loop [i 0] + (when (<= i level) + (let [links (.-forward (aget update i))] + (aset (.-forward x) i (aget links i)) + (aset links i x))))))))) + + (remove [coll k] + (let [update (make-array MAX_LEVEL) + x (least-greater-node header k level update) + x (aget (.-forward x) 0)] + (when (and (not (nil? x)) (== (.-key x) k)) + (loop [i 0] + (when (<= i level) + (let [links (.-forward (aget update i))] + (if (identical? (aget links i) x) + (do + (aset links i (aget (.-forward x) i)) + (recur (inc i))) + (recur (inc i)))))) + (while (and (> level 0) + (nil? (aget (.-forward header) level))) + (set! level (dec level)))))) + + (ceilingEntry [coll k] + (loop [x header level level] + (if-not (neg? level) + (let [nx (loop [x x] + (let [x' (aget (.-forward x) level)] + (when-not (nil? x') + (if (>= (.-key x') k) + x' + (recur x')))))] + (if-not (nil? nx) + (recur nx (dec level)) + (recur x (dec level)))) + (when-not (identical? x header) + x)))) + + (floorEntry [coll k] + (loop [x header level level] + (if-not (neg? level) + (let [nx (loop [x x] + (let [x' (aget (.-forward x) level)] + (if-not (nil? x') + (if (> (.-key x') k) + x + (recur x')) + (when (zero? level) + x))))] + (if nx + (recur nx (dec level)) + (recur x (dec level)))) + (when-not (identical? x header) + x)))) + + ISeqable + (-seq [coll] + (letfn [(iter [node] + (lazy-seq + (when-not (nil? node) + (cons [(.-key node) (.-val node)] + (iter (aget (.-forward node) 0))))))] + (iter (aget (.-forward header) 0)))) + + IPrintWithWriter + (-pr-writer [coll writer opts] + (let [pr-pair (fn [keyval] + (pr-sequential-writer writer pr-writer "" " " "" opts keyval))] + (pr-sequential-writer writer pr-pair "{" ", " "}" opts coll)))) + +(defn skip-list [] + (SkipList. (skip-list-node 0) 0)) + +(def timeouts-map (skip-list)) + +(def TIMEOUT_RESOLUTION_MS 10) + +(defn timeout + "returns a channel that will close after msecs" + [msecs] + (let [timeout (+ (.valueOf (js/Date.)) msecs) + me (.ceilingEntry timeouts-map timeout)] + (or (when (and me (< (.-key me) (+ timeout TIMEOUT_RESOLUTION_MS))) + (.-val me)) + (let [timeout-channel (channels/chan nil)] + (.put timeouts-map timeout timeout-channel) + (dispatch/queue-delay + (fn [] + (.remove timeouts-map timeout) + (impl/close! timeout-channel)) + msecs) + timeout-channel)))) + diff --git a/public/js/rel/cljs/core/async/impl/timers.js b/public/js/rel/cljs/core/async/impl/timers.js new file mode 100644 index 0000000..1efeb6f --- /dev/null +++ b/public/js/rel/cljs/core/async/impl/timers.js @@ -0,0 +1,520 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('cljs.core.async.impl.timers'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('cljs.core.async.impl.protocols'); +goog.require('cljs.core.async.impl.channels'); +goog.require('cljs.core.async.impl.dispatch'); +cljs.core.async.impl.timers.MAX_LEVEL = (15); +cljs.core.async.impl.timers.P = ((1) / (2)); +cljs.core.async.impl.timers.random_level = (function cljs$core$async$impl$timers$random_level(var_args){ +var args17018 = []; +var len__9181__auto___17021 = arguments.length; +var i__9182__auto___17022 = (0); +while(true){ +if((i__9182__auto___17022 < len__9181__auto___17021)){ +args17018.push((arguments[i__9182__auto___17022])); + +var G__17023 = (i__9182__auto___17022 + (1)); +i__9182__auto___17022 = G__17023; +continue; +} else { +} +break; +} + +var G__17020 = args17018.length; +switch (G__17020) { +case 0: +return cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17018.length)].join(''))); + +} +}); + +cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$1((0)); +}); + +cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$1 = (function (level){ +while(true){ +if(((Math.random() < cljs.core.async.impl.timers.P)) && ((level < cljs.core.async.impl.timers.MAX_LEVEL))){ +var G__17025 = (level + (1)); +level = G__17025; +continue; +} else { +return level; +} +break; +} +}); + +cljs.core.async.impl.timers.random_level.cljs$lang$maxFixedArity = 1; + + +/** +* @constructor + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IPrintWithWriter} +*/ +cljs.core.async.impl.timers.SkipListNode = (function (key,val,forward){ +this.key = key; +this.val = val; +this.forward = forward; +this.cljs$lang$protocol_mask$partition0$ = 2155872256; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.timers.SkipListNode.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var x__8894__auto__ = self__.key; +return cljs.core._conj((function (){var x__8894__auto____$1 = self__.val; +return cljs.core._conj(cljs.core.List.EMPTY,x__8894__auto____$1); +})(),x__8894__auto__); +}); + +cljs.core.async.impl.timers.SkipListNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var self__ = this; +var coll__$1 = this; +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,"["," ","]",opts,coll__$1); +}); + +cljs.core.async.impl.timers.SkipListNode.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$key,cljs.core.with_meta(cljs.core.cst$sym$val,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$forward], null); +}); + +cljs.core.async.impl.timers.SkipListNode.cljs$lang$type = true; + +cljs.core.async.impl.timers.SkipListNode.cljs$lang$ctorStr = "cljs.core.async.impl.timers/SkipListNode"; + +cljs.core.async.impl.timers.SkipListNode.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.timers/SkipListNode"); +}); + +cljs.core.async.impl.timers.__GT_SkipListNode = (function cljs$core$async$impl$timers$__GT_SkipListNode(key,val,forward){ +return (new cljs.core.async.impl.timers.SkipListNode(key,val,forward)); +}); + +cljs.core.async.impl.timers.skip_list_node = (function cljs$core$async$impl$timers$skip_list_node(var_args){ +var args17026 = []; +var len__9181__auto___17029 = arguments.length; +var i__9182__auto___17030 = (0); +while(true){ +if((i__9182__auto___17030 < len__9181__auto___17029)){ +args17026.push((arguments[i__9182__auto___17030])); + +var G__17031 = (i__9182__auto___17030 + (1)); +i__9182__auto___17030 = G__17031; +continue; +} else { +} +break; +} + +var G__17028 = args17026.length; +switch (G__17028) { +case 1: +return cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 3: +return cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17026.length)].join(''))); + +} +}); + +cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$1 = (function (level){ +return cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$3(null,null,level); +}); + +cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$3 = (function (k,v,level){ +var arr = (new Array((level + (1)))); +var i_17033 = (0); +while(true){ +if((i_17033 < arr.length)){ +(arr[i_17033] = null); + +var G__17034 = (i_17033 + (1)); +i_17033 = G__17034; +continue; +} else { +} +break; +} + +return (new cljs.core.async.impl.timers.SkipListNode(k,v,arr)); +}); + +cljs.core.async.impl.timers.skip_list_node.cljs$lang$maxFixedArity = 3; + +cljs.core.async.impl.timers.least_greater_node = (function cljs$core$async$impl$timers$least_greater_node(var_args){ +var args17035 = []; +var len__9181__auto___17038 = arguments.length; +var i__9182__auto___17039 = (0); +while(true){ +if((i__9182__auto___17039 < len__9181__auto___17038)){ +args17035.push((arguments[i__9182__auto___17039])); + +var G__17040 = (i__9182__auto___17039 + (1)); +i__9182__auto___17039 = G__17040; +continue; +} else { +} +break; +} + +var G__17037 = args17035.length; +switch (G__17037) { +case 3: +return cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +case 4: +return cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$4((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),(arguments[(3)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args17035.length)].join(''))); + +} +}); + +cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$3 = (function (x,k,level){ +return cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$4(x,k,level,null); +}); + +cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$4 = (function (x,k,level,update){ +while(true){ +if(!((level < (0)))){ +var x__$1 = (function (){var x__$1 = x; +while(true){ +var temp__5276__auto__ = (x__$1.forward[level]); +if(cljs.core.truth_(temp__5276__auto__)){ +var x_SINGLEQUOTE_ = temp__5276__auto__; +if((x_SINGLEQUOTE_.key < k)){ +var G__17042 = x_SINGLEQUOTE_; +x__$1 = G__17042; +continue; +} else { +return x__$1; +} +} else { +return x__$1; +} +break; +} +})(); +if((update == null)){ +} else { +(update[level] = x__$1); +} + +var G__17043 = x__$1; +var G__17044 = k; +var G__17045 = (level - (1)); +var G__17046 = update; +x = G__17043; +k = G__17044; +level = G__17045; +update = G__17046; +continue; +} else { +return x; +} +break; +} +}); + +cljs.core.async.impl.timers.least_greater_node.cljs$lang$maxFixedArity = 4; + + +/** +* @constructor + * @implements {cljs.core.async.impl.timers.Object} + * @implements {cljs.core.ISeqable} + * @implements {cljs.core.IPrintWithWriter} +*/ +cljs.core.async.impl.timers.SkipList = (function (header,level){ +this.header = header; +this.level = level; +this.cljs$lang$protocol_mask$partition0$ = 2155872256; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +cljs.core.async.impl.timers.SkipList.prototype.put = (function (k,v){ +var self__ = this; +var coll = this; +var update = (new Array(cljs.core.async.impl.timers.MAX_LEVEL)); +var x = cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$4(self__.header,k,self__.level,update); +var x__$1 = (x.forward[(0)]); +if((!((x__$1 == null))) && ((x__$1.key === k))){ +return x__$1.val = v; +} else { +var new_level = cljs.core.async.impl.timers.random_level.cljs$core$IFn$_invoke$arity$0(); +if((new_level > self__.level)){ +var i_17049 = (self__.level + (1)); +while(true){ +if((i_17049 <= (new_level + (1)))){ +(update[i_17049] = self__.header); + +var G__17050 = (i_17049 + (1)); +i_17049 = G__17050; +continue; +} else { +} +break; +} + +self__.level = new_level; +} else { +} + +var x__$2 = cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$3(k,v,(new Array(new_level))); +var i = (0); +while(true){ +if((i <= self__.level)){ +var links = (update[i]).forward; +(x__$2.forward[i] = (links[i])); + +return (links[i] = x__$2); +} else { +return null; +} +break; +} +} +}); + +cljs.core.async.impl.timers.SkipList.prototype.remove = (function (k){ +var self__ = this; +var coll = this; +var update = (new Array(cljs.core.async.impl.timers.MAX_LEVEL)); +var x = cljs.core.async.impl.timers.least_greater_node.cljs$core$IFn$_invoke$arity$4(self__.header,k,self__.level,update); +var x__$1 = (x.forward[(0)]); +if((!((x__$1 == null))) && ((x__$1.key === k))){ +var i_17051 = (0); +while(true){ +if((i_17051 <= self__.level)){ +var links_17052 = (update[i_17051]).forward; +if(((links_17052[i_17051]) === x__$1)){ +(links_17052[i_17051] = (x__$1.forward[i_17051])); + +var G__17053 = (i_17051 + (1)); +i_17051 = G__17053; +continue; +} else { +var G__17054 = (i_17051 + (1)); +i_17051 = G__17054; +continue; +} +} else { +} +break; +} + +while(true){ +if(((self__.level > (0))) && (((self__.header.forward[self__.level]) == null))){ +self__.level = (self__.level - (1)); + +continue; +} else { +return null; +} +break; +} +} else { +return null; +} +}); + +cljs.core.async.impl.timers.SkipList.prototype.ceilingEntry = (function (k){ +var self__ = this; +var coll = this; +var x = self__.header; +var level__$1 = self__.level; +while(true){ +if(!((level__$1 < (0)))){ +var nx = (function (){var x__$1 = x; +while(true){ +var x_SINGLEQUOTE_ = (x__$1.forward[level__$1]); +if((x_SINGLEQUOTE_ == null)){ +return null; +} else { +if((x_SINGLEQUOTE_.key >= k)){ +return x_SINGLEQUOTE_; +} else { +var G__17055 = x_SINGLEQUOTE_; +x__$1 = G__17055; +continue; +} +} +break; +} +})(); +if(!((nx == null))){ +var G__17056 = nx; +var G__17057 = (level__$1 - (1)); +x = G__17056; +level__$1 = G__17057; +continue; +} else { +var G__17058 = x; +var G__17059 = (level__$1 - (1)); +x = G__17058; +level__$1 = G__17059; +continue; +} +} else { +if((x === self__.header)){ +return null; +} else { +return x; +} +} +break; +} +}); + +cljs.core.async.impl.timers.SkipList.prototype.floorEntry = (function (k){ +var self__ = this; +var coll = this; +var x = self__.header; +var level__$1 = self__.level; +while(true){ +if(!((level__$1 < (0)))){ +var nx = (function (){var x__$1 = x; +while(true){ +var x_SINGLEQUOTE_ = (x__$1.forward[level__$1]); +if(!((x_SINGLEQUOTE_ == null))){ +if((x_SINGLEQUOTE_.key > k)){ +return x__$1; +} else { +var G__17060 = x_SINGLEQUOTE_; +x__$1 = G__17060; +continue; +} +} else { +if((level__$1 === (0))){ +return x__$1; +} else { +return null; +} +} +break; +} +})(); +if(cljs.core.truth_(nx)){ +var G__17061 = nx; +var G__17062 = (level__$1 - (1)); +x = G__17061; +level__$1 = G__17062; +continue; +} else { +var G__17063 = x; +var G__17064 = (level__$1 - (1)); +x = G__17063; +level__$1 = G__17064; +continue; +} +} else { +if((x === self__.header)){ +return null; +} else { +return x; +} +} +break; +} +}); + +cljs.core.async.impl.timers.SkipList.prototype.cljs$core$ISeqable$_seq$arity$1 = (function (coll){ +var self__ = this; +var coll__$1 = this; +var iter = ((function (coll__$1){ +return (function cljs$core$async$impl$timers$iter(node){ +return (new cljs.core.LazySeq(null,((function (coll__$1){ +return (function (){ +if((node == null)){ +return null; +} else { +return cljs.core.cons(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [node.key,node.val], null),cljs$core$async$impl$timers$iter((node.forward[(0)]))); +} +});})(coll__$1)) +,null,null)); +});})(coll__$1)) +; +return iter((self__.header.forward[(0)])); +}); + +cljs.core.async.impl.timers.SkipList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (coll,writer,opts){ +var self__ = this; +var coll__$1 = this; +var pr_pair = ((function (coll__$1){ +return (function (keyval){ +return cljs.core.pr_sequential_writer(writer,cljs.core.pr_writer,""," ","",opts,keyval); +});})(coll__$1)) +; +return cljs.core.pr_sequential_writer(writer,pr_pair,"{",", ","}",opts,coll__$1); +}); + +cljs.core.async.impl.timers.SkipList.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$header,cljs.core.with_meta(cljs.core.cst$sym$level,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +cljs.core.async.impl.timers.SkipList.cljs$lang$type = true; + +cljs.core.async.impl.timers.SkipList.cljs$lang$ctorStr = "cljs.core.async.impl.timers/SkipList"; + +cljs.core.async.impl.timers.SkipList.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"cljs.core.async.impl.timers/SkipList"); +}); + +cljs.core.async.impl.timers.__GT_SkipList = (function cljs$core$async$impl$timers$__GT_SkipList(header,level){ +return (new cljs.core.async.impl.timers.SkipList(header,level)); +}); + +cljs.core.async.impl.timers.skip_list = (function cljs$core$async$impl$timers$skip_list(){ +return (new cljs.core.async.impl.timers.SkipList(cljs.core.async.impl.timers.skip_list_node.cljs$core$IFn$_invoke$arity$1((0)),(0))); +}); +cljs.core.async.impl.timers.timeouts_map = cljs.core.async.impl.timers.skip_list(); +cljs.core.async.impl.timers.TIMEOUT_RESOLUTION_MS = (10); +/** + * returns a channel that will close after msecs + */ +cljs.core.async.impl.timers.timeout = (function cljs$core$async$impl$timers$timeout(msecs){ +var timeout = ((new Date()).valueOf() + msecs); +var me = cljs.core.async.impl.timers.timeouts_map.ceilingEntry(timeout); +var or__7960__auto__ = (cljs.core.truth_((function (){var and__7948__auto__ = me; +if(cljs.core.truth_(and__7948__auto__)){ +return (me.key < (timeout + cljs.core.async.impl.timers.TIMEOUT_RESOLUTION_MS)); +} else { +return and__7948__auto__; +} +})())?me.val:null); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var timeout_channel = cljs.core.async.impl.channels.chan.cljs$core$IFn$_invoke$arity$1(null); +cljs.core.async.impl.timers.timeouts_map.put(timeout,timeout_channel); + +cljs.core.async.impl.dispatch.queue_delay(((function (timeout_channel,or__7960__auto__,timeout,me){ +return (function (){ +cljs.core.async.impl.timers.timeouts_map.remove(timeout); + +return cljs.core.async.impl.protocols.close_BANG_(timeout_channel); +});})(timeout_channel,or__7960__auto__,timeout,me)) +,msecs); + +return timeout_channel; +} +}); diff --git a/public/js/rel/cljs/core/constants.js b/public/js/rel/cljs/core/constants.js new file mode 100644 index 0000000..513b3ce --- /dev/null +++ b/public/js/rel/cljs/core/constants.js @@ -0,0 +1,400 @@ +goog.provide('cljs.core.constants'); +goog.require('cljs.core'); +cljs.core.cst$sym$form = new cljs.core.Symbol(null,"form","form",16469056,null); +cljs.core.cst$sym$meta17186 = new cljs.core.Symbol(null,"meta17186","meta17186",811476096,null); +cljs.core.cst$sym$tag = new cljs.core.Symbol(null,"tag","tag",350170304,null); +cljs.core.cst$sym$_AMPERSAND_ = new cljs.core.Symbol(null,"&","&",-2144855648,null); +cljs.core.cst$sym$vec__15156 = new cljs.core.Symbol(null,"vec__15156","vec__15156",-16234080,null); +cljs.core.cst$kw$section$seven$wide$column = new cljs.core.Keyword(null,"section.seven.wide.column","section.seven.wide.column",1765995968); +cljs.core.cst$sym$uuid = new cljs.core.Symbol(null,"uuid","uuid",-504564192,null); +cljs.core.cst$kw$footer$alchemy$footer = new cljs.core.Keyword(null,"footer.alchemy.footer","footer.alchemy.footer",969010976); +cljs.core.cst$sym$clauses = new cljs.core.Symbol(null,"clauses","clauses",-1199594528,null); +cljs.core.cst$sym$meta12115 = new cljs.core.Symbol(null,"meta12115","meta12115",-2102749087,null); +cljs.core.cst$kw$data_DASH_scroll_DASH_header = new cljs.core.Keyword(null,"data-scroll-header","data-scroll-header",1364020321); +cljs.core.cst$kw$async = new cljs.core.Keyword(null,"async","async",1050769601); +cljs.core.cst$sym$end = new cljs.core.Symbol(null,"end","end",1372345569,null); +cljs.core.cst$kw$main$alchemy$content = new cljs.core.Keyword(null,"main.alchemy.content","main.alchemy.content",-1268489951); +cljs.core.cst$sym$meta17183 = new cljs.core.Symbol(null,"meta17183","meta17183",237516161,null); +cljs.core.cst$sym$defrecord_STAR_ = new cljs.core.Symbol(null,"defrecord*","defrecord*",-1936366207,null); +cljs.core.cst$sym$base = new cljs.core.Symbol(null,"base","base",1825810849,null); +cljs.core.cst$sym$obj = new cljs.core.Symbol(null,"obj","obj",-1672671807,null); +cljs.core.cst$kw$h4$ui$grey$header = new cljs.core.Keyword(null,"h4.ui.grey.header","h4.ui.grey.header",1889430049); +cljs.core.cst$sym$fqn = new cljs.core.Symbol(null,"fqn","fqn",-1749334463,null); +cljs.core.cst$sym$Class = new cljs.core.Symbol(null,"Class","Class",2064526977,null); +cljs.core.cst$kw$h1$ui$header$wow$fadeInDown = new cljs.core.Keyword(null,"h1.ui.header.wow.fadeInDown","h1.ui.header.wow.fadeInDown",510843553); +cljs.core.cst$sym$first = new cljs.core.Symbol(null,"first","first",996428481,null); +cljs.core.cst$kw$div$ui$divider = new cljs.core.Keyword(null,"div.ui.divider","div.ui.divider",-230362335); +cljs.core.cst$sym$try = new cljs.core.Symbol(null,"try","try",-1273693247,null); +cljs.core.cst$sym$change = new cljs.core.Symbol(null,"change","change",477485025,null); +cljs.core.cst$sym$has_DASH_nil_QMARK_ = new cljs.core.Symbol(null,"has-nil?","has-nil?",825886722,null); +cljs.core.cst$kw$path_DASH_exists_QMARK_ = new cljs.core.Keyword(null,"path-exists?","path-exists?",1473384514); +cljs.core.cst$kw$on_DASH_set = new cljs.core.Keyword(null,"on-set","on-set",-140953470); +cljs.core.cst$sym$puts = new cljs.core.Symbol(null,"puts","puts",-1883877054,null); +cljs.core.cst$sym$caught = new cljs.core.Symbol(null,"caught","caught",2084008322,null); +cljs.core.cst$kw$div_SHARP_terms$ui$container = new cljs.core.Keyword(null,"div#terms.ui.container","div#terms.ui.container",2081652162); +cljs.core.cst$kw$h3$ui$header = new cljs.core.Keyword(null,"h3.ui.header","h3.ui.header",-375183742); +cljs.core.cst$sym$rear = new cljs.core.Symbol(null,"rear","rear",-900164830,null); +cljs.core.cst$kw$div$sub$header = new cljs.core.Keyword(null,"div.sub.header","div.sub.header",697234210); +cljs.core.cst$kw$div$column$wow$fadeInRight = new cljs.core.Keyword(null,"div.column.wow.fadeInRight","div.column.wow.fadeInRight",-979314878); +cljs.core.cst$sym$hierarchy = new cljs.core.Symbol(null,"hierarchy","hierarchy",587061186,null); +cljs.core.cst$sym$iter = new cljs.core.Symbol(null,"iter","iter",-1346195486,null); +cljs.core.cst$kw$_STAR_ = new cljs.core.Keyword(null,"*","*",-1294732318); +cljs.core.cst$sym$watching = new cljs.core.Symbol(null,"watching","watching",1947648227,null); +cljs.core.cst$sym$handler = new cljs.core.Symbol(null,"handler","handler",1444934915,null); +cljs.core.cst$sym$meta19350 = new cljs.core.Symbol(null,"meta19350","meta19350",1274974531,null); +cljs.core.cst$kw$cljsLegacyRender = new cljs.core.Keyword(null,"cljsLegacyRender","cljsLegacyRender",-1527295613); +cljs.core.cst$sym$step = new cljs.core.Symbol(null,"step","step",-1365547645,null); +cljs.core.cst$kw$div$ui$section$divider = new cljs.core.Keyword(null,"div.ui.section.divider","div.ui.section.divider",-11065949); +cljs.core.cst$sym$meta17180 = new cljs.core.Symbol(null,"meta17180","meta17180",600404387,null); +cljs.core.cst$kw$div_SHARP_privacy$ui$container = new cljs.core.Keyword(null,"div#privacy.ui.container","div#privacy.ui.container",2041989603); +cljs.core.cst$sym$boolean = new cljs.core.Symbol(null,"boolean","boolean",-278886877,null); +cljs.core.cst$sym$update_DASH_count = new cljs.core.Symbol(null,"update-count","update-count",-411982269,null); +cljs.core.cst$sym$reaction = new cljs.core.Symbol(null,"reaction","reaction",2131401315,null); +cljs.core.cst$kw$section$ui$container = new cljs.core.Keyword(null,"section.ui.container","section.ui.container",-728223133); +cljs.core.cst$sym$method_DASH_table = new cljs.core.Symbol(null,"method-table","method-table",-1878263165,null); +cljs.core.cst$sym$meta9849 = new cljs.core.Symbol(null,"meta9849","meta9849",-1420141821,null); +cljs.core.cst$sym$chunk = new cljs.core.Symbol(null,"chunk","chunk",449371907,null); +cljs.core.cst$kw$div$column$wow$fadeInLeft = new cljs.core.Keyword(null,"div.column.wow.fadeInLeft","div.column.wow.fadeInLeft",775630659); +cljs.core.cst$kw$div_SHARP_feature2 = new cljs.core.Keyword(null,"div#feature2","div#feature2",1046178659); +cljs.core.cst$sym$callback = new cljs.core.Symbol(null,"callback","callback",935395299,null); +cljs.core.cst$sym$meta15288 = new cljs.core.Symbol(null,"meta15288","meta15288",-248377180,null); +cljs.core.cst$kw$a$header$item = new cljs.core.Keyword(null,"a.header.item","a.header.item",1569981636); +cljs.core.cst$sym$i = new cljs.core.Symbol(null,"i","i",253690212,null); +cljs.core.cst$sym$alchemy$views = new cljs.core.Symbol(null,"alchemy.views","alchemy.views",1363715428,null); +cljs.core.cst$sym$rest = new cljs.core.Symbol(null,"rest","rest",398835108,null); +cljs.core.cst$kw$meta = new cljs.core.Keyword(null,"meta","meta",1499536964); +cljs.core.cst$kw$i$mail$icon = new cljs.core.Keyword(null,"i.mail.icon","i.mail.icon",-462992764); +cljs.core.cst$sym$p = new cljs.core.Symbol(null,"p","p",1791580836,null); +cljs.core.cst$kw$div_SHARP_feature3 = new cljs.core.Keyword(null,"div#feature3","div#feature3",-284373212); +cljs.core.cst$kw$div_SHARP_particles_DASH_js = new cljs.core.Keyword(null,"div#particles-js","div#particles-js",438105060); +cljs.core.cst$kw$ul = new cljs.core.Keyword(null,"ul","ul",-1349521403); +cljs.core.cst$kw$mutes = new cljs.core.Keyword(null,"mutes","mutes",1068806309); +cljs.core.cst$sym$blockable = new cljs.core.Symbol(null,"blockable","blockable",-28395259,null); +cljs.core.cst$kw$dup = new cljs.core.Keyword(null,"dup","dup",556298533); +cljs.core.cst$kw$solo = new cljs.core.Keyword(null,"solo","solo",-316350075); +cljs.core.cst$kw$div$ui$grid = new cljs.core.Keyword(null,"div.ui.grid","div.ui.grid",271546981); +cljs.core.cst$kw$key = new cljs.core.Keyword(null,"key","key",-1516042587); +cljs.core.cst$sym$comp = new cljs.core.Symbol(null,"comp","comp",-1462482139,null); +cljs.core.cst$sym$dispatch_DASH_fn = new cljs.core.Symbol(null,"dispatch-fn","dispatch-fn",-1401088155,null); +cljs.core.cst$sym$buffer = new cljs.core.Symbol(null,"buffer","buffer",-2037140571,null); +cljs.core.cst$kw$div$column_GT_h4$ui$header = new cljs.core.Keyword(null,"div.column>h4.ui.header","div.column>h4.ui.header",255998917); +cljs.core.cst$kw$a$ui$inverted$large$basic$button = new cljs.core.Keyword(null,"a.ui.inverted.large.basic.button","a.ui.inverted.large.basic.button",1798259653); +cljs.core.cst$kw$cljs$core$async_SLASH_nothing = new cljs.core.Keyword("cljs.core.async","nothing","cljs.core.async/nothing",-69252123); +cljs.core.cst$kw$div_SHARP_about = new cljs.core.Keyword(null,"div#about","div#about",-1867980794); +cljs.core.cst$kw$else = new cljs.core.Keyword(null,"else","else",-1508377146); +cljs.core.cst$kw$alt = new cljs.core.Keyword(null,"alt","alt",-3214426); +cljs.core.cst$sym$left = new cljs.core.Symbol(null,"left","left",1241415590,null); +cljs.core.cst$sym$ns_STAR_ = new cljs.core.Symbol(null,"ns*","ns*",1840949383,null); +cljs.core.cst$sym$path = new cljs.core.Symbol(null,"path","path",1452340359,null); +cljs.core.cst$kw$cljs$core_SLASH_none = new cljs.core.Keyword("cljs.core","none","cljs.core/none",926646439); +cljs.core.cst$kw$div$wow$fadeInDown = new cljs.core.Keyword(null,"div.wow.fadeInDown","div.wow.fadeInDown",1545708711); +cljs.core.cst$sym$shift = new cljs.core.Symbol(null,"shift","shift",-1657295705,null); +cljs.core.cst$sym$iters = new cljs.core.Symbol(null,"iters","iters",719353031,null); +cljs.core.cst$kw$nav$ui$borderless$large$top$fixed$menu = new cljs.core.Keyword(null,"nav.ui.borderless.large.top.fixed.menu","nav.ui.borderless.large.top.fixed.menu",538352935); +cljs.core.cst$sym$cljs$core$async_SLASH_t_cljs$core$async19357 = new cljs.core.Symbol("cljs.core.async","t_cljs$core$async19357","cljs.core.async/t_cljs$core$async19357",2014958951,null); +cljs.core.cst$kw$div$ui$container$wow$fadeInUp = new cljs.core.Keyword(null,"div.ui.container.wow.fadeInUp","div.ui.container.wow.fadeInUp",-84584025); +cljs.core.cst$kw$h1$ui$header = new cljs.core.Keyword(null,"h1.ui.header","h1.ui.header",-1333270009); +cljs.core.cst$sym$meta15160 = new cljs.core.Symbol(null,"meta15160","meta15160",682467975,null); +cljs.core.cst$kw$div$content = new cljs.core.Keyword(null,"div.content","div.content",-298042649); +cljs.core.cst$kw$displayName = new cljs.core.Keyword(null,"displayName","displayName",-809144601); +cljs.core.cst$sym$args = new cljs.core.Symbol(null,"args","args",-1338879193,null); +cljs.core.cst$sym$xform = new cljs.core.Symbol(null,"xform","xform",-85179481,null); +cljs.core.cst$kw$validator = new cljs.core.Keyword(null,"validator","validator",-1966190681); +cljs.core.cst$sym$finally = new cljs.core.Symbol(null,"finally","finally",-1065347064,null); +cljs.core.cst$kw$data_DASH_scroll = new cljs.core.Keyword(null,"data-scroll","data-scroll",1428522088); +cljs.core.cst$sym$closed = new cljs.core.Symbol(null,"closed","closed",720856168,null); +cljs.core.cst$kw$default = new cljs.core.Keyword(null,"default","default",-1987822328); +cljs.core.cst$kw$finally_DASH_block = new cljs.core.Keyword(null,"finally-block","finally-block",832982472); +cljs.core.cst$sym$prefer_DASH_table = new cljs.core.Symbol(null,"prefer-table","prefer-table",462168584,null); +cljs.core.cst$sym$cb = new cljs.core.Symbol(null,"cb","cb",-2064487928,null); +cljs.core.cst$kw$img$logo = new cljs.core.Keyword(null,"img.logo","img.logo",-1845330328); +cljs.core.cst$sym$loop_STAR_ = new cljs.core.Symbol(null,"loop*","loop*",615029416,null); +cljs.core.cst$sym$watches = new cljs.core.Symbol(null,"watches","watches",1367433992,null); +cljs.core.cst$kw$ns = new cljs.core.Keyword(null,"ns","ns",441598760); +cljs.core.cst$kw$warn = new cljs.core.Keyword(null,"warn","warn",-436710552); +cljs.core.cst$sym$buf_DASH_fn = new cljs.core.Symbol(null,"buf-fn","buf-fn",-1200281591,null); +cljs.core.cst$kw$name = new cljs.core.Keyword(null,"name","name",1843675177); +cljs.core.cst$kw$div$wow$fadeInUp = new cljs.core.Keyword(null,"div.wow.fadeInUp","div.wow.fadeInUp",672322857); +cljs.core.cst$kw$li = new cljs.core.Keyword(null,"li","li",723558921); +cljs.core.cst$sym$bitmap = new cljs.core.Symbol(null,"bitmap","bitmap",501334601,null); +cljs.core.cst$sym$_seq = new cljs.core.Symbol(null,"_seq","_seq",-449557847,null); +cljs.core.cst$sym$nil_DASH_val = new cljs.core.Symbol(null,"nil-val","nil-val",-513933559,null); +cljs.core.cst$sym$home_DASH_page = new cljs.core.Symbol(null,"home-page","home-page",-850279575,null); +cljs.core.cst$kw$div$ui$link$list = new cljs.core.Keyword(null,"div.ui.link.list","div.ui.link.list",1347387369); +cljs.core.cst$sym$alchemy$views_SLASH_home_DASH_page = new cljs.core.Symbol("alchemy.views","home-page","alchemy.views/home-page",1301351466,null); +cljs.core.cst$sym$solo_DASH_mode = new cljs.core.Symbol(null,"solo-mode","solo-mode",2031788074,null); +cljs.core.cst$kw$section = new cljs.core.Keyword(null,"section","section",-300141526); +cljs.core.cst$sym$meta15291 = new cljs.core.Symbol(null,"meta15291","meta15291",-1881806710,null); +cljs.core.cst$kw$h4$ui$header = new cljs.core.Keyword(null,"h4.ui.header","h4.ui.header",-1493369590); +cljs.core.cst$kw$nav$ui$horizontal$list = new cljs.core.Keyword(null,"nav.ui.horizontal.list","nav.ui.horizontal.list",1242541450); +cljs.core.cst$kw$component_DASH_did_DASH_mount = new cljs.core.Keyword(null,"component-did-mount","component-did-mount",-1126910518); +cljs.core.cst$kw$file = new cljs.core.Keyword(null,"file","file",-1269645878); +cljs.core.cst$sym$v = new cljs.core.Symbol(null,"v","v",1661996586,null); +cljs.core.cst$kw$compute = new cljs.core.Keyword(null,"compute","compute",1555393130); +cljs.core.cst$sym$meta18538 = new cljs.core.Symbol(null,"meta18538","meta18538",222244522,null); +cljs.core.cst$kw$header$alchemy$header = new cljs.core.Keyword(null,"header.alchemy.header","header.alchemy.header",-2085518486); +cljs.core.cst$kw$secretary$core_SLASH_map = new cljs.core.Keyword("secretary.core","map","secretary.core/map",-31086646); +cljs.core.cst$kw$end_DASH_column = new cljs.core.Keyword(null,"end-column","end-column",1425389514); +cljs.core.cst$sym$riter = new cljs.core.Symbol(null,"riter","riter",-237834262,null); +cljs.core.cst$sym$__hash = new cljs.core.Symbol(null,"__hash","__hash",-1328796629,null); +cljs.core.cst$sym$meta = new cljs.core.Symbol(null,"meta","meta",-1154898805,null); +cljs.core.cst$sym$_meta = new cljs.core.Symbol(null,"_meta","_meta",-1716892533,null); +cljs.core.cst$sym$afn = new cljs.core.Symbol(null,"afn","afn",216963467,null); +cljs.core.cst$kw$section$ui$stackable$divided$equal$height$grid = new cljs.core.Keyword(null,"section.ui.stackable.divided.equal.height.grid","section.ui.stackable.divided.equal.height.grid",-131235349); +cljs.core.cst$kw$params = new cljs.core.Keyword(null,"params","params",710516235); +cljs.core.cst$sym$tree = new cljs.core.Symbol(null,"tree","tree",1444219499,null); +cljs.core.cst$sym$fn = new cljs.core.Symbol(null,"fn","fn",465265323,null); +cljs.core.cst$kw$div$two$column$row = new cljs.core.Keyword(null,"div.two.column.row","div.two.column.row",1808515883); +cljs.core.cst$sym$front = new cljs.core.Symbol(null,"front","front",117022539,null); +cljs.core.cst$sym$buf = new cljs.core.Symbol(null,"buf","buf",1426618187,null); +cljs.core.cst$sym$mults = new cljs.core.Symbol(null,"mults","mults",-461114485,null); +cljs.core.cst$kw$h5$ui$grey$header = new cljs.core.Keyword(null,"h5.ui.grey.header","h5.ui.grey.header",-1623258165); +cljs.core.cst$kw$component_DASH_did_DASH_update = new cljs.core.Keyword(null,"component-did-update","component-did-update",-1468549173); +cljs.core.cst$sym$next_DASH_entry = new cljs.core.Symbol(null,"next-entry","next-entry",1091342476,null); +cljs.core.cst$kw$i$line$chart$icon = new cljs.core.Keyword(null,"i.line.chart.icon","i.line.chart.icon",-289476468); +cljs.core.cst$kw$val = new cljs.core.Keyword(null,"val","val",128701612); +cljs.core.cst$sym$key = new cljs.core.Symbol(null,"key","key",124488940,null); +cljs.core.cst$sym$_next = new cljs.core.Symbol(null,"_next","_next",101877036,null); +cljs.core.cst$sym$fn1 = new cljs.core.Symbol(null,"fn1","fn1",895834444,null); +cljs.core.cst$kw$recur = new cljs.core.Keyword(null,"recur","recur",-437573268); +cljs.core.cst$kw$catch_DASH_block = new cljs.core.Keyword(null,"catch-block","catch-block",1175212748); +cljs.core.cst$sym$root_DASH_iter = new cljs.core.Symbol(null,"root-iter","root-iter",1974672108,null); +cljs.core.cst$sym$do = new cljs.core.Symbol(null,"do","do",1686842252,null); +cljs.core.cst$sym$vec = new cljs.core.Symbol(null,"vec","vec",982683596,null); +cljs.core.cst$kw$src = new cljs.core.Keyword(null,"src","src",-1651076051); +cljs.core.cst$kw$img$ui$centered$large$image = new cljs.core.Keyword(null,"img.ui.centered.large.image","img.ui.centered.large.image",-1206726419); +cljs.core.cst$sym$add_BANG_ = new cljs.core.Symbol(null,"add!","add!",2046056845,null); +cljs.core.cst$kw$fallback_DASH_impl = new cljs.core.Keyword(null,"fallback-impl","fallback-impl",-1501286995); +cljs.core.cst$kw$route = new cljs.core.Keyword(null,"route","route",329891309); +cljs.core.cst$sym$meta18941 = new cljs.core.Symbol(null,"meta18941","meta18941",-1741485523,null); +cljs.core.cst$sym$meta19369 = new cljs.core.Symbol(null,"meta19369","meta19369",-1641844083,null); +cljs.core.cst$sym$meta15169 = new cljs.core.Symbol(null,"meta15169","meta15169",-1452776723,null); +cljs.core.cst$kw$flush_DASH_on_DASH_newline = new cljs.core.Keyword(null,"flush-on-newline","flush-on-newline",-151457939); +cljs.core.cst$kw$div$ui$three$column$grid = new cljs.core.Keyword(null,"div.ui.three.column.grid","div.ui.three.column.grid",1528022989); +cljs.core.cst$kw$finished = new cljs.core.Keyword(null,"finished","finished",-1018867731); +cljs.core.cst$sym$default_DASH_dispatch_DASH_val = new cljs.core.Symbol(null,"default-dispatch-val","default-dispatch-val",-1231201266,null); +cljs.core.cst$kw$componentWillUnmount = new cljs.core.Keyword(null,"componentWillUnmount","componentWillUnmount",1573788814); +cljs.core.cst$kw$no_DASH_test = new cljs.core.Keyword(null,"no-test","no-test",-1679482642); +cljs.core.cst$sym$_ = new cljs.core.Symbol(null,"_","_",-1201019570,null); +cljs.core.cst$kw$div$three$column$row = new cljs.core.Keyword(null,"div.three.column.row","div.three.column.row",-411874930); +cljs.core.cst$sym$validator = new cljs.core.Symbol(null,"validator","validator",-325659154,null); +cljs.core.cst$sym$letfn_STAR_ = new cljs.core.Symbol(null,"letfn*","letfn*",-110097810,null); +cljs.core.cst$sym$if = new cljs.core.Symbol(null,"if","if",1181717262,null); +cljs.core.cst$kw$i$calendar$icon = new cljs.core.Keyword(null,"i.calendar.icon","i.calendar.icon",1045340142); +cljs.core.cst$sym$finally_DASH_block = new cljs.core.Symbol(null,"finally-block","finally-block",-1821453297,null); +cljs.core.cst$sym$arr = new cljs.core.Symbol(null,"arr","arr",2115492975,null); +cljs.core.cst$sym$new = new cljs.core.Symbol(null,"new","new",-444906321,null); +cljs.core.cst$kw$descendants = new cljs.core.Keyword(null,"descendants","descendants",1824886031); +cljs.core.cst$sym$ns = new cljs.core.Symbol(null,"ns","ns",2082130287,null); +cljs.core.cst$kw$i$user$icon = new cljs.core.Keyword(null,"i.user.icon","i.user.icon",1558437295); +cljs.core.cst$kw$prefix = new cljs.core.Keyword(null,"prefix","prefix",-265908465); +cljs.core.cst$kw$column = new cljs.core.Keyword(null,"column","column",2078222095); +cljs.core.cst$sym$pick = new cljs.core.Symbol(null,"pick","pick",1300068175,null); +cljs.core.cst$sym$completed = new cljs.core.Symbol(null,"completed","completed",1154475024,null); +cljs.core.cst$sym$forward = new cljs.core.Symbol(null,"forward","forward",1083186224,null); +cljs.core.cst$kw$shouldComponentUpdate = new cljs.core.Keyword(null,"shouldComponentUpdate","shouldComponentUpdate",1795750960); +cljs.core.cst$sym$vec__15165 = new cljs.core.Symbol(null,"vec__15165","vec__15165",-406600560,null); +cljs.core.cst$kw$ancestors = new cljs.core.Keyword(null,"ancestors","ancestors",-776045424); +cljs.core.cst$sym$flag = new cljs.core.Symbol(null,"flag","flag",-1565787888,null); +cljs.core.cst$kw$style = new cljs.core.Keyword(null,"style","style",-496642736); +cljs.core.cst$sym$ensure_DASH_mult = new cljs.core.Symbol(null,"ensure-mult","ensure-mult",1796584816,null); +cljs.core.cst$sym$value = new cljs.core.Symbol(null,"value","value",1946509744,null); +cljs.core.cst$sym$name = new cljs.core.Symbol(null,"name","name",-810760592,null); +cljs.core.cst$sym$n = new cljs.core.Symbol(null,"n","n",-2092305744,null); +cljs.core.cst$kw$div = new cljs.core.Keyword(null,"div","div",1057191632); +cljs.core.cst$kw$readably = new cljs.core.Keyword(null,"readably","readably",1129599760); +cljs.core.cst$kw$more_DASH_marker = new cljs.core.Keyword(null,"more-marker","more-marker",-14717935); +cljs.core.cst$kw$div$ui$grid$wow$fadeInUp = new cljs.core.Keyword(null,"div.ui.grid.wow.fadeInUp","div.ui.grid.wow.fadeInUp",-1701628815); +cljs.core.cst$sym$fields = new cljs.core.Symbol(null,"fields","fields",-291534703,null); +cljs.core.cst$sym$re = new cljs.core.Symbol(null,"re","re",1869207729,null); +cljs.core.cst$sym$scheduled_QMARK_ = new cljs.core.Symbol(null,"scheduled?","scheduled?",579986609,null); +cljs.core.cst$sym$meta17138 = new cljs.core.Symbol(null,"meta17138","meta17138",1067803857,null); +cljs.core.cst$sym$meta18709 = new cljs.core.Symbol(null,"meta18709","meta18709",-913901359,null); +cljs.core.cst$sym$method_DASH_cache = new cljs.core.Symbol(null,"method-cache","method-cache",1230193905,null); +cljs.core.cst$kw$img$ui$image = new cljs.core.Keyword(null,"img.ui.image","img.ui.image",-1079503599); +cljs.core.cst$sym$cs = new cljs.core.Symbol(null,"cs","cs",-117024463,null); +cljs.core.cst$kw$div$ui$basic$segment = new cljs.core.Keyword(null,"div.ui.basic.segment","div.ui.basic.segment",1403481393); +cljs.core.cst$sym$dirty_QMARK_ = new cljs.core.Symbol(null,"dirty?","dirty?",-419314319,null); +cljs.core.cst$sym$orig_DASH_route = new cljs.core.Symbol(null,"orig-route","orig-route",899103121,null); +cljs.core.cst$kw$reagentRender = new cljs.core.Keyword(null,"reagentRender","reagentRender",-358306383); +cljs.core.cst$sym$meta17999 = new cljs.core.Symbol(null,"meta17999","meta17999",-397132335,null); +cljs.core.cst$sym$edit = new cljs.core.Symbol(null,"edit","edit",-1302639,null); +cljs.core.cst$sym$params = new cljs.core.Symbol(null,"params","params",-1943919534,null); +cljs.core.cst$sym$editable_QMARK_ = new cljs.core.Symbol(null,"editable?","editable?",-164945806,null); +cljs.core.cst$kw$a$ui$violet$large$basic$button = new cljs.core.Keyword(null,"a.ui.violet.large.basic.button","a.ui.violet.large.basic.button",473288818); +cljs.core.cst$sym$base_DASH_count = new cljs.core.Symbol(null,"base-count","base-count",-1180647182,null); +cljs.core.cst$kw$no_DASH_cache = new cljs.core.Keyword(null,"no-cache","no-cache",1588056370); +cljs.core.cst$kw$render = new cljs.core.Keyword(null,"render","render",-1408033454); +cljs.core.cst$kw$div_SHARP_home = new cljs.core.Keyword(null,"div#home","div#home",-1268728494); +cljs.core.cst$kw$i$medium$icon = new cljs.core.Keyword(null,"i.medium.icon","i.medium.icon",930460018); +cljs.core.cst$kw$div$column = new cljs.core.Keyword(null,"div.column","div.column",-1380853326); +cljs.core.cst$sym$collision_DASH_hash = new cljs.core.Symbol(null,"collision-hash","collision-hash",-35831342,null); +cljs.core.cst$sym$deftype_STAR_ = new cljs.core.Symbol(null,"deftype*","deftype*",962659890,null); +cljs.core.cst$sym$let_STAR_ = new cljs.core.Symbol(null,"let*","let*",1920721458,null); +cljs.core.cst$sym$meta19375 = new cljs.core.Symbol(null,"meta19375","meta19375",-1007482254,null); +cljs.core.cst$sym$start = new cljs.core.Symbol(null,"start","start",1285322546,null); +cljs.core.cst$kw$div$item = new cljs.core.Keyword(null,"div.item","div.item",517680018); +cljs.core.cst$sym$sourceIter = new cljs.core.Symbol(null,"sourceIter","sourceIter",1068220306,null); +cljs.core.cst$sym$coll = new cljs.core.Symbol(null,"coll","coll",-1006698606,null); +cljs.core.cst$sym$not_DASH_native = new cljs.core.Symbol(null,"not-native","not-native",-236392494,null); +cljs.core.cst$sym$js_STAR_ = new cljs.core.Symbol(null,"js*","js*",-1134233646,null); +cljs.core.cst$kw$reagent_DASH_render = new cljs.core.Keyword(null,"reagent-render","reagent-render",-985383853); +cljs.core.cst$kw$div$ui$stackable$two$column$grid = new cljs.core.Keyword(null,"div.ui.stackable.two.column.grid","div.ui.stackable.two.column.grid",49176723); +cljs.core.cst$sym$strobj = new cljs.core.Symbol(null,"strobj","strobj",1088091283,null); +cljs.core.cst$sym$catch_DASH_block = new cljs.core.Symbol(null,"catch-block","catch-block",-1479223021,null); +cljs.core.cst$kw$div_SHARP_feature1 = new cljs.core.Keyword(null,"div#feature1","div#feature1",1925927219); +cljs.core.cst$kw$line = new cljs.core.Keyword(null,"line","line",212345235); +cljs.core.cst$kw$div$row = new cljs.core.Keyword(null,"div.row","div.row",133678515); +cljs.core.cst$kw$a$item = new cljs.core.Keyword(null,"a.item","a.item",725358035); +cljs.core.cst$kw$priority = new cljs.core.Keyword(null,"priority","priority",1431093715); +cljs.core.cst$kw$solos = new cljs.core.Keyword(null,"solos","solos",1441458643); +cljs.core.cst$sym$_rest = new cljs.core.Symbol(null,"_rest","_rest",-2100466189,null); +cljs.core.cst$sym$fn_STAR_ = new cljs.core.Symbol(null,"fn*","fn*",-752876845,null); +cljs.core.cst$sym$val = new cljs.core.Symbol(null,"val","val",1769233139,null); +cljs.core.cst$sym$ascending_QMARK_ = new cljs.core.Symbol(null,"ascending?","ascending?",-1938452653,null); +cljs.core.cst$sym$recur = new cljs.core.Symbol(null,"recur","recur",1202958259,null); +cljs.core.cst$sym$xf = new cljs.core.Symbol(null,"xf","xf",2042434515,null); +cljs.core.cst$sym$ci = new cljs.core.Symbol(null,"ci","ci",2049808339,null); +cljs.core.cst$sym$meta18227 = new cljs.core.Symbol(null,"meta18227","meta18227",-101448717,null); +cljs.core.cst$kw$print_DASH_length = new cljs.core.Keyword(null,"print-length","print-length",1931866356); +cljs.core.cst$kw$div_SHARP_enterprise = new cljs.core.Keyword(null,"div#enterprise","div#enterprise",673334580); +cljs.core.cst$sym$alchemy$views_SLASH_terms_DASH_page = new cljs.core.Symbol("alchemy.views","terms-page","alchemy.views/terms-page",567338292,null); +cljs.core.cst$kw$i$facebook$f$icon = new cljs.core.Keyword(null,"i.facebook.f.icon","i.facebook.f.icon",-560178828); +cljs.core.cst$sym$ratom = new cljs.core.Symbol(null,"ratom","ratom",1514010260,null); +cljs.core.cst$kw$class = new cljs.core.Keyword(null,"class","class",-2030961996); +cljs.core.cst$sym$state = new cljs.core.Symbol(null,"state","state",-348086572,null); +cljs.core.cst$kw$ok = new cljs.core.Keyword(null,"ok","ok",967785236); +cljs.core.cst$sym$vals = new cljs.core.Symbol(null,"vals","vals",-1886377036,null); +cljs.core.cst$kw$catch_DASH_exception = new cljs.core.Keyword(null,"catch-exception","catch-exception",-1997306795); +cljs.core.cst$kw$cljs$core_SLASH_halt = new cljs.core.Keyword("cljs.core","halt","cljs.core/halt",-1049036715); +cljs.core.cst$sym$cached_DASH_hierarchy = new cljs.core.Symbol(null,"cached-hierarchy","cached-hierarchy",-1085460203,null); +cljs.core.cst$sym$meta19372 = new cljs.core.Symbol(null,"meta19372","meta19372",1543529749,null); +cljs.core.cst$sym$header = new cljs.core.Symbol(null,"header","header",1759972661,null); +cljs.core.cst$kw$div_SHARP_meet_DASH_sophia = new cljs.core.Keyword(null,"div#meet-sophia","div#meet-sophia",-1091900107); +cljs.core.cst$kw$auto_DASH_run = new cljs.core.Keyword(null,"auto-run","auto-run",1958400437); +cljs.core.cst$sym$terms_DASH_page = new cljs.core.Symbol(null,"terms-page","terms-page",-1576000011,null); +cljs.core.cst$sym$s = new cljs.core.Symbol(null,"s","s",-948495851,null); +cljs.core.cst$kw$parents = new cljs.core.Keyword(null,"parents","parents",-2027538891); +cljs.core.cst$sym$cnt = new cljs.core.Symbol(null,"cnt","cnt",1924510325,null); +cljs.core.cst$sym$node = new cljs.core.Symbol(null,"node","node",-2073234571,null); +cljs.core.cst$kw$component_DASH_will_DASH_unmount = new cljs.core.Keyword(null,"component-will-unmount","component-will-unmount",-2058314698); +cljs.core.cst$kw$prev = new cljs.core.Keyword(null,"prev","prev",-1597069226); +cljs.core.cst$sym$sym = new cljs.core.Symbol(null,"sym","sym",195671222,null); +cljs.core.cst$sym$sb = new cljs.core.Symbol(null,"sb","sb",-1249746442,null); +cljs.core.cst$sym$meta19366 = new cljs.core.Symbol(null,"meta19366","meta19366",376507926,null); +cljs.core.cst$kw$continue_DASH_block = new cljs.core.Keyword(null,"continue-block","continue-block",-1852047850); +cljs.core.cst$kw$query_DASH_params = new cljs.core.Keyword(null,"query-params","query-params",900640534); +cljs.core.cst$kw$b = new cljs.core.Keyword(null,"b","b",1482224470); +cljs.core.cst$sym$ch = new cljs.core.Symbol(null,"ch","ch",1085813622,null); +cljs.core.cst$kw$div_SHARP_consumers = new cljs.core.Keyword(null,"div#consumers","div#consumers",291753878); +cljs.core.cst$sym$level = new cljs.core.Symbol(null,"level","level",-1363938217,null); +cljs.core.cst$kw$end_DASH_line = new cljs.core.Keyword(null,"end-line","end-line",1837326455); +cljs.core.cst$kw$nav$ui$link$list = new cljs.core.Keyword(null,"nav.ui.link.list","nav.ui.link.list",2095005911); +cljs.core.cst$kw$display_DASH_name = new cljs.core.Keyword(null,"display-name","display-name",694513143); +cljs.core.cst$sym$meta19358 = new cljs.core.Symbol(null,"meta19358","meta19358",19275415,null); +cljs.core.cst$sym$meta19361 = new cljs.core.Symbol(null,"meta19361","meta19361",-682329225,null); +cljs.core.cst$sym$_hash = new cljs.core.Symbol(null,"_hash","_hash",-2130838312,null); +cljs.core.cst$kw$on_DASH_dispose = new cljs.core.Keyword(null,"on-dispose","on-dispose",2105306360); +cljs.core.cst$kw$a$swap = new cljs.core.Keyword(null,"a.swap","a.swap",888377656); +cljs.core.cst$kw$div$one$column$row = new cljs.core.Keyword(null,"div.one.column.row","div.one.column.row",-480366280); +cljs.core.cst$kw$action = new cljs.core.Keyword(null,"action","action",-811238024); +cljs.core.cst$sym$calc_DASH_state = new cljs.core.Symbol(null,"calc-state","calc-state",-349968968,null); +cljs.core.cst$kw$pause = new cljs.core.Keyword(null,"pause","pause",-2095325672); +cljs.core.cst$kw$div_SHARP_investors = new cljs.core.Keyword(null,"div#investors","div#investors",-1182985672); +cljs.core.cst$kw$error = new cljs.core.Keyword(null,"error","error",-978969032); +cljs.core.cst$kw$br = new cljs.core.Keyword(null,"br","br",934104792); +cljs.core.cst$kw$nav$ui$right$floated$horizontal$link$list = new cljs.core.Keyword(null,"nav.ui.right.floated.horizontal.link.list","nav.ui.right.floated.horizontal.link.list",-988343432); +cljs.core.cst$kw$componentFunction = new cljs.core.Keyword(null,"componentFunction","componentFunction",825866104); +cljs.core.cst$sym$topic_DASH_fn = new cljs.core.Symbol(null,"topic-fn","topic-fn",-862449736,null); +cljs.core.cst$sym$head = new cljs.core.Symbol(null,"head","head",869147608,null); +cljs.core.cst$kw$div_SHARP_get_DASH_identity = new cljs.core.Keyword(null,"div#get-identity","div#get-identity",-1006096392); +cljs.core.cst$sym$keys = new cljs.core.Symbol(null,"keys","keys",-1586012071,null); +cljs.core.cst$kw$div$alchemy$root = new cljs.core.Keyword(null,"div.alchemy.root","div.alchemy.root",-1475880775); +cljs.core.cst$sym$set_BANG_ = new cljs.core.Symbol(null,"set!","set!",250714521,null); +cljs.core.cst$kw$img$ui$centered$image = new cljs.core.Keyword(null,"img.ui.centered.image","img.ui.centered.image",-475153959); +cljs.core.cst$kw$tag = new cljs.core.Keyword(null,"tag","tag",-1290361223); +cljs.core.cst$sym$tree_DASH_map = new cljs.core.Symbol(null,"tree-map","tree-map",1373073049,null); +cljs.core.cst$sym$meta9846 = new cljs.core.Symbol(null,"meta9846","meta9846",1251299065,null); +cljs.core.cst$kw$i$linkedin$icon = new cljs.core.Keyword(null,"i.linkedin.icon","i.linkedin.icon",624736089); +cljs.core.cst$kw$secretary$core_SLASH_sequential = new cljs.core.Keyword("secretary.core","sequential","secretary.core/sequential",-347187207); +cljs.core.cst$kw$div$ui$justified$container = new cljs.core.Keyword(null,"div.ui.justified.container","div.ui.justified.container",-1195894758); +cljs.core.cst$kw$div$copyright$item = new cljs.core.Keyword(null,"div.copyright.item","div.copyright.item",-294609862); +cljs.core.cst$sym$alchemy$views_SLASH_privacy_DASH_page = new cljs.core.Symbol("alchemy.views","privacy-page","alchemy.views/privacy-page",-1750157254,null); +cljs.core.cst$sym$_DOT_ = new cljs.core.Symbol(null,".",".",1975675962,null); +cljs.core.cst$kw$div_SHARP_feature4 = new cljs.core.Keyword(null,"div#feature4","div#feature4",2009244826); +cljs.core.cst$kw$section$ui$container$basic$segment = new cljs.core.Keyword(null,"section.ui.container.basic.segment","section.ui.container.basic.segment",619238554); +cljs.core.cst$sym$var = new cljs.core.Symbol(null,"var","var",870848730,null); +cljs.core.cst$kw$mutable = new cljs.core.Keyword(null,"mutable","mutable",875778266); +cljs.core.cst$sym$quote = new cljs.core.Symbol(null,"quote","quote",1377916282,null); +cljs.core.cst$sym$root = new cljs.core.Symbol(null,"root","root",1191874074,null); +cljs.core.cst$sym$dirty_DASH_takes = new cljs.core.Symbol(null,"dirty-takes","dirty-takes",575642138,null); +cljs.core.cst$sym$multi = new cljs.core.Symbol(null,"multi","multi",1450238522,null); +cljs.core.cst$sym$meta12112 = new cljs.core.Symbol(null,"meta12112","meta12112",-150629766,null); +cljs.core.cst$sym$str = new cljs.core.Symbol(null,"str","str",-1564826950,null); +cljs.core.cst$sym$meta17189 = new cljs.core.Symbol(null,"meta17189","meta17189",-1315461350,null); +cljs.core.cst$kw$i$map$icon = new cljs.core.Keyword(null,"i.map.icon","i.map.icon",1045938970); +cljs.core.cst$kw$div_SHARP_topup = new cljs.core.Keyword(null,"div#topup","div#topup",1189738266); +cljs.core.cst$sym$nodes = new cljs.core.Symbol(null,"nodes","nodes",-459054278,null); +cljs.core.cst$sym$seen = new cljs.core.Symbol(null,"seen","seen",1121531738,null); +cljs.core.cst$sym$hash_DASH_map = new cljs.core.Symbol(null,"hash-map","hash-map",-439030950,null); +cljs.core.cst$kw$arglists = new cljs.core.Keyword(null,"arglists","arglists",1661989754); +cljs.core.cst$sym$out = new cljs.core.Symbol(null,"out","out",729986010,null); +cljs.core.cst$kw$autobind = new cljs.core.Keyword(null,"autobind","autobind",-570650245); +cljs.core.cst$kw$hierarchy = new cljs.core.Keyword(null,"hierarchy","hierarchy",-1053470341); +cljs.core.cst$sym$privacy_DASH_page = new cljs.core.Symbol(null,"privacy-page","privacy-page",349305211,null); +cljs.core.cst$sym$catch = new cljs.core.Symbol(null,"catch","catch",-1616370245,null); +cljs.core.cst$kw$h2$ui$center$aligned$header = new cljs.core.Keyword(null,"h2.ui.center.aligned.header","h2.ui.center.aligned.header",797219579); +cljs.core.cst$kw$alt_DASH_impl = new cljs.core.Keyword(null,"alt-impl","alt-impl",670969595); +cljs.core.cst$sym$ext_DASH_map_DASH_iter = new cljs.core.Symbol(null,"ext-map-iter","ext-map-iter",-1215982757,null); +cljs.core.cst$sym$tail = new cljs.core.Symbol(null,"tail","tail",494507963,null); +cljs.core.cst$kw$doc = new cljs.core.Keyword(null,"doc","doc",1913296891); +cljs.core.cst$kw$section$ui$basic$container$segment = new cljs.core.Keyword(null,"section.ui.basic.container.segment","section.ui.basic.container.segment",-39457797); +cljs.core.cst$sym$record = new cljs.core.Symbol(null,"record","record",861424668,null); +cljs.core.cst$sym$changed = new cljs.core.Symbol(null,"changed","changed",-2083710852,null); +cljs.core.cst$sym$mseq = new cljs.core.Symbol(null,"mseq","mseq",1602647196,null); +cljs.core.cst$sym$count = new cljs.core.Symbol(null,"count","count",-514511684,null); +cljs.core.cst$sym$dirty_DASH_puts = new cljs.core.Symbol(null,"dirty-puts","dirty-puts",57041148,null); +cljs.core.cst$sym$solo_DASH_modes = new cljs.core.Symbol(null,"solo-modes","solo-modes",882180540,null); +cljs.core.cst$kw$div$column$wow$fadeInUp = new cljs.core.Keyword(null,"div.column.wow.fadeInUp","div.column.wow.fadeInUp",-1384023556); +cljs.core.cst$sym$catch_DASH_exception = new cljs.core.Symbol(null,"catch-exception","catch-exception",-356775268,null); +cljs.core.cst$kw$div_SHARP_feature5 = new cljs.core.Keyword(null,"div#feature5","div#feature5",1012564700); +cljs.core.cst$sym$meta16968 = new cljs.core.Symbol(null,"meta16968","meta16968",-1301425412,null); +cljs.core.cst$kw$keywordize_DASH_keys = new cljs.core.Keyword(null,"keywordize-keys","keywordize-keys",1310784252); +cljs.core.cst$sym$takes = new cljs.core.Symbol(null,"takes","takes",298247964,null); +cljs.core.cst$kw$nav_DASH_handler = new cljs.core.Keyword(null,"nav-handler","nav-handler",2039495484); +cljs.core.cst$sym$off = new cljs.core.Symbol(null,"off","off",-2047994980,null); +cljs.core.cst$kw$current_DASH_page = new cljs.core.Keyword(null,"current-page","current-page",-101294180); +cljs.core.cst$sym$auto_DASH_run = new cljs.core.Symbol(null,"auto-run","auto-run",-696035332,null); +cljs.core.cst$sym$length = new cljs.core.Symbol(null,"length","length",-2065447907,null); +cljs.core.cst$sym$continue_DASH_block = new cljs.core.Symbol(null,"continue-block","continue-block",-211516323,null); +cljs.core.cst$sym$stack = new cljs.core.Symbol(null,"stack","stack",847125597,null); +cljs.core.cst$kw$p = new cljs.core.Keyword(null,"p","p",151049309); +cljs.core.cst$kw$div$right$menu = new cljs.core.Keyword(null,"div.right.menu","div.right.menu",-1602439043); +cljs.core.cst$sym$transient_DASH_map = new cljs.core.Symbol(null,"transient-map","transient-map",351764893,null); +cljs.core.cst$sym$prev = new cljs.core.Symbol(null,"prev","prev",43462301,null); +cljs.core.cst$sym$len = new cljs.core.Symbol(null,"len","len",-1230778691,null); +cljs.core.cst$kw$componentWillMount = new cljs.core.Keyword(null,"componentWillMount","componentWillMount",-285327619); +cljs.core.cst$kw$test = new cljs.core.Keyword(null,"test","test",577538877); +cljs.core.cst$sym$cljs$core$async_SLASH_t_cljs$core$async19349 = new cljs.core.Symbol("cljs.core.async","t_cljs$core$async19349","cljs.core.async/t_cljs$core$async19349",-1162755010,null); +cljs.core.cst$sym$right = new cljs.core.Symbol(null,"right","right",1187949694,null); +cljs.core.cst$kw$href = new cljs.core.Keyword(null,"href","href",-793805698); +cljs.core.cst$sym$throw = new cljs.core.Symbol(null,"throw","throw",595905694,null); +cljs.core.cst$kw$div$ui$container = new cljs.core.Keyword(null,"div.ui.container","div.ui.container",-613874402); +cljs.core.cst$sym$meta16965 = new cljs.core.Symbol(null,"meta16965","meta16965",2010927422,null); +cljs.core.cst$kw$div$ui$horizontal$list = new cljs.core.Keyword(null,"div.ui.horizontal.list","div.ui.horizontal.list",115744158); +cljs.core.cst$kw$h2$ui$header = new cljs.core.Keyword(null,"h2.ui.header","h2.ui.header",1785259486); +cljs.core.cst$sym$fseq = new cljs.core.Symbol(null,"fseq","fseq",-1466412450,null); +cljs.core.cst$sym$nocache_QMARK_ = new cljs.core.Symbol(null,"nocache?","nocache?",-1065670978,null); +cljs.core.cst$kw$a = new cljs.core.Keyword(null,"a","a",-2123407586); +cljs.core.cst$kw$mute = new cljs.core.Keyword(null,"mute","mute",1151223646); +cljs.core.cst$sym$attrs = new cljs.core.Symbol(null,"attrs","attrs",-450137186,null); +cljs.core.cst$kw$a$ui$inverted$fluid$massive$basic$button = new cljs.core.Keyword(null,"a.ui.inverted.fluid.massive.basic.button","a.ui.inverted.fluid.massive.basic.button",-72634402); +cljs.core.cst$kw$div$ui$two$column$grid = new cljs.core.Keyword(null,"div.ui.two.column.grid","div.ui.two.column.grid",19473599); +cljs.core.cst$kw$section$three$wide$column = new cljs.core.Keyword(null,"section.three.wide.column","section.three.wide.column",1109745887); +cljs.core.cst$kw$cljs$core_SLASH_not_DASH_found = new cljs.core.Keyword("cljs.core","not-found","cljs.core/not-found",-1572889185); +cljs.core.cst$sym$more = new cljs.core.Symbol(null,"more","more",-418290273,null); +cljs.core.cst$sym$def = new cljs.core.Symbol(null,"def","def",597100991,null); +cljs.core.cst$kw$reads = new cljs.core.Keyword(null,"reads","reads",-1215067361); +cljs.core.cst$sym$meta19353 = new cljs.core.Symbol(null,"meta19353","meta19353",-1506237569,null); +cljs.core.cst$sym$f = new cljs.core.Symbol(null,"f","f",43394975,null); +cljs.core.cst$sym$next_DASH_iter = new cljs.core.Symbol(null,"next-iter","next-iter",1526626239,null); diff --git a/public/js/rel/clojure/set.cljs b/public/js/rel/clojure/set.cljs new file mode 100644 index 0000000..b9ba41f --- /dev/null +++ b/public/js/rel/clojure/set.cljs @@ -0,0 +1,161 @@ +; Copyright (c) Rich Hickey. All rights reserved. +; The use and distribution terms for this software are covered by the +; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +; which can be found in the file epl-v10.html at the root of this distribution. +; By using this software in any fashion, you are agreeing to be bound by +; the terms of this license. +; You must not remove this notice, or any other, from this software. + +(ns ^{:doc "Set operations such as union/intersection." + :author "Rich Hickey"} + clojure.set) + +(defn- bubble-max-key [k coll] + "Move a maximal element of coll according to fn k (which returns a number) + to the front of coll." + (let [max (apply max-key k coll)] + (cons max (remove #(identical? max %) coll)))) + +(defn union + "Return a set that is the union of the input sets" + ([] #{}) + ([s1] s1) + ([s1 s2] + (if (< (count s1) (count s2)) + (reduce conj s2 s1) + (reduce conj s1 s2))) + ([s1 s2 & sets] + (let [bubbled-sets (bubble-max-key count (conj sets s2 s1))] + (reduce into (first bubbled-sets) (rest bubbled-sets))))) + +(defn intersection + "Return a set that is the intersection of the input sets" + ([s1] s1) + ([s1 s2] + (if (< (count s2) (count s1)) + (recur s2 s1) + (reduce (fn [result item] + (if (contains? s2 item) + result + (disj result item))) + s1 s1))) + ([s1 s2 & sets] + (let [bubbled-sets (bubble-max-key #(- (count %)) (conj sets s2 s1))] + (reduce intersection (first bubbled-sets) (rest bubbled-sets))))) + +(defn difference + "Return a set that is the first set without elements of the remaining sets" + ([s1] s1) + ([s1 s2] + (if (< (count s1) (count s2)) + (reduce (fn [result item] + (if (contains? s2 item) + (disj result item) + result)) + s1 s1) + (reduce disj s1 s2))) + ([s1 s2 & sets] + (reduce difference s1 (conj sets s2)))) + + +(defn select + "Returns a set of the elements for which pred is true" + [pred xset] + (reduce (fn [s k] (if (pred k) s (disj s k))) + xset xset)) + +(defn project + "Returns a rel of the elements of xrel with only the keys in ks" + [xrel ks] + (set (map #(select-keys % ks) xrel))) + +(defn rename-keys + "Returns the map with the keys in kmap renamed to the vals in kmap" + [map kmap] + (reduce + (fn [m [old new]] + (if (contains? map old) + (assoc m new (get map old)) + m)) + (apply dissoc map (keys kmap)) kmap)) + +(defn rename + "Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap" + [xrel kmap] + (set (map #(rename-keys % kmap) xrel))) + +(defn index + "Returns a map of the distinct values of ks in the xrel mapped to a + set of the maps in xrel with the corresponding values of ks." + [xrel ks] + (reduce + (fn [m x] + (let [ik (select-keys x ks)] + (assoc m ik (conj (get m ik #{}) x)))) + {} xrel)) + +(defn map-invert + "Returns the map with the vals mapped to the keys." + [m] (reduce (fn [m [k v]] (assoc m v k)) {} m)) + +(defn join + "When passed 2 rels, returns the rel corresponding to the natural + join. When passed an additional keymap, joins on the corresponding + keys." + ([xrel yrel] ;natural join + (if (and (seq xrel) (seq yrel)) + (let [ks (intersection (set (keys (first xrel))) (set (keys (first yrel)))) + [r s] (if (<= (count xrel) (count yrel)) + [xrel yrel] + [yrel xrel]) + idx (index r ks)] + (reduce (fn [ret x] + (let [found (idx (select-keys x ks))] + (if found + (reduce #(conj %1 (merge %2 x)) ret found) + ret))) + #{} s)) + #{})) + ([xrel yrel km] ;arbitrary key mapping + (let [[r s k] (if (<= (count xrel) (count yrel)) + [xrel yrel (map-invert km)] + [yrel xrel km]) + idx (index r (vals k))] + (reduce (fn [ret x] + (let [found (idx (rename-keys (select-keys x (keys k)) k))] + (if found + (reduce #(conj %1 (merge %2 x)) ret found) + ret))) + #{} s)))) + +(defn subset? + "Is set1 a subset of set2?" + [set1 set2] + (and (<= (count set1) (count set2)) + (every? #(contains? set2 %) set1))) + +(defn superset? + "Is set1 a superset of set2?" + [set1 set2] + (and (>= (count set1) (count set2)) + (every? #(contains? set1 %) set2))) + +(comment +(refer 'set) +(def xs #{{:a 11 :b 1 :c 1 :d 4} + {:a 2 :b 12 :c 2 :d 6} + {:a 3 :b 3 :c 3 :d 8 :f 42}}) + +(def ys #{{:a 11 :b 11 :c 11 :e 5} + {:a 12 :b 11 :c 12 :e 3} + {:a 3 :b 3 :c 3 :e 7 }}) + +(join xs ys) +(join xs (rename ys {:b :yb :c :yc}) {:a :a}) + +(union #{:a :b :c} #{:c :d :e }) +(difference #{:a :b :c} #{:c :d :e}) +(intersection #{:a :b :c} #{:c :d :e}) + +(index ys [:b])) + diff --git a/public/js/rel/clojure/set.js b/public/js/rel/clojure/set.js new file mode 100644 index 0000000..832783a --- /dev/null +++ b/public/js/rel/clojure/set.js @@ -0,0 +1,403 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('clojure.set'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +clojure.set.bubble_max_key = (function clojure$set$bubble_max_key(k,coll){ + +var max = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.max_key,k,coll); +return cljs.core.cons(max,cljs.core.remove.cljs$core$IFn$_invoke$arity$2(((function (max){ +return (function (p1__14425_SHARP_){ +return (max === p1__14425_SHARP_); +});})(max)) +,coll)); +}); +/** + * Return a set that is the union of the input sets + */ +clojure.set.union = (function clojure$set$union(var_args){ +var args14426 = []; +var len__9181__auto___14432 = arguments.length; +var i__9182__auto___14433 = (0); +while(true){ +if((i__9182__auto___14433 < len__9181__auto___14432)){ +args14426.push((arguments[i__9182__auto___14433])); + +var G__14434 = (i__9182__auto___14433 + (1)); +i__9182__auto___14433 = G__14434; +continue; +} else { +} +break; +} + +var G__14431 = args14426.length; +switch (G__14431) { +case 0: +return clojure.set.union.cljs$core$IFn$_invoke$arity$0(); + +break; +case 1: +return clojure.set.union.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return clojure.set.union.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14426.slice((2)),(0),null)); +return clojure.set.union.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +clojure.set.union.cljs$core$IFn$_invoke$arity$0 = (function (){ +return cljs.core.PersistentHashSet.EMPTY; +}); + +clojure.set.union.cljs$core$IFn$_invoke$arity$1 = (function (s1){ +return s1; +}); + +clojure.set.union.cljs$core$IFn$_invoke$arity$2 = (function (s1,s2){ +if((cljs.core.count(s1) < cljs.core.count(s2))){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj,s2,s1); +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj,s1,s2); +} +}); + +clojure.set.union.cljs$core$IFn$_invoke$arity$variadic = (function (s1,s2,sets){ +var bubbled_sets = clojure.set.bubble_max_key(cljs.core.count,cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(sets,s2,cljs.core.array_seq([s1], 0))); +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.into,cljs.core.first(bubbled_sets),cljs.core.rest(bubbled_sets)); +}); + +clojure.set.union.cljs$lang$applyTo = (function (seq14427){ +var G__14428 = cljs.core.first(seq14427); +var seq14427__$1 = cljs.core.next(seq14427); +var G__14429 = cljs.core.first(seq14427__$1); +var seq14427__$2 = cljs.core.next(seq14427__$1); +return clojure.set.union.cljs$core$IFn$_invoke$arity$variadic(G__14428,G__14429,seq14427__$2); +}); + +clojure.set.union.cljs$lang$maxFixedArity = (2); + +/** + * Return a set that is the intersection of the input sets + */ +clojure.set.intersection = (function clojure$set$intersection(var_args){ +var args14437 = []; +var len__9181__auto___14443 = arguments.length; +var i__9182__auto___14444 = (0); +while(true){ +if((i__9182__auto___14444 < len__9181__auto___14443)){ +args14437.push((arguments[i__9182__auto___14444])); + +var G__14445 = (i__9182__auto___14444 + (1)); +i__9182__auto___14444 = G__14445; +continue; +} else { +} +break; +} + +var G__14442 = args14437.length; +switch (G__14442) { +case 1: +return clojure.set.intersection.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return clojure.set.intersection.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14437.slice((2)),(0),null)); +return clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +clojure.set.intersection.cljs$core$IFn$_invoke$arity$1 = (function (s1){ +return s1; +}); + +clojure.set.intersection.cljs$core$IFn$_invoke$arity$2 = (function (s1,s2){ +while(true){ +if((cljs.core.count(s2) < cljs.core.count(s1))){ +var G__14447 = s2; +var G__14448 = s1; +s1 = G__14447; +s2 = G__14448; +continue; +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (s1,s2){ +return (function (result,item){ +if(cljs.core.contains_QMARK_(s2,item)){ +return result; +} else { +return cljs.core.disj.cljs$core$IFn$_invoke$arity$2(result,item); +} +});})(s1,s2)) +,s1,s1); +} +break; +} +}); + +clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic = (function (s1,s2,sets){ +var bubbled_sets = clojure.set.bubble_max_key((function (p1__14436_SHARP_){ +return (- cljs.core.count(p1__14436_SHARP_)); +}),cljs.core.conj.cljs$core$IFn$_invoke$arity$variadic(sets,s2,cljs.core.array_seq([s1], 0))); +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(clojure.set.intersection,cljs.core.first(bubbled_sets),cljs.core.rest(bubbled_sets)); +}); + +clojure.set.intersection.cljs$lang$applyTo = (function (seq14438){ +var G__14439 = cljs.core.first(seq14438); +var seq14438__$1 = cljs.core.next(seq14438); +var G__14440 = cljs.core.first(seq14438__$1); +var seq14438__$2 = cljs.core.next(seq14438__$1); +return clojure.set.intersection.cljs$core$IFn$_invoke$arity$variadic(G__14439,G__14440,seq14438__$2); +}); + +clojure.set.intersection.cljs$lang$maxFixedArity = (2); + +/** + * Return a set that is the first set without elements of the remaining sets + */ +clojure.set.difference = (function clojure$set$difference(var_args){ +var args14449 = []; +var len__9181__auto___14455 = arguments.length; +var i__9182__auto___14456 = (0); +while(true){ +if((i__9182__auto___14456 < len__9181__auto___14455)){ +args14449.push((arguments[i__9182__auto___14456])); + +var G__14457 = (i__9182__auto___14456 + (1)); +i__9182__auto___14456 = G__14457; +continue; +} else { +} +break; +} + +var G__14454 = args14449.length; +switch (G__14454) { +case 1: +return clojure.set.difference.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return clojure.set.difference.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14449.slice((2)),(0),null)); +return clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9204__auto__); + +} +}); + +clojure.set.difference.cljs$core$IFn$_invoke$arity$1 = (function (s1){ +return s1; +}); + +clojure.set.difference.cljs$core$IFn$_invoke$arity$2 = (function (s1,s2){ +if((cljs.core.count(s1) < cljs.core.count(s2))){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (result,item){ +if(cljs.core.contains_QMARK_(s2,item)){ +return cljs.core.disj.cljs$core$IFn$_invoke$arity$2(result,item); +} else { +return result; +} +}),s1,s1); +} else { +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.disj,s1,s2); +} +}); + +clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic = (function (s1,s2,sets){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(clojure.set.difference,s1,cljs.core.conj.cljs$core$IFn$_invoke$arity$2(sets,s2)); +}); + +clojure.set.difference.cljs$lang$applyTo = (function (seq14450){ +var G__14451 = cljs.core.first(seq14450); +var seq14450__$1 = cljs.core.next(seq14450); +var G__14452 = cljs.core.first(seq14450__$1); +var seq14450__$2 = cljs.core.next(seq14450__$1); +return clojure.set.difference.cljs$core$IFn$_invoke$arity$variadic(G__14451,G__14452,seq14450__$2); +}); + +clojure.set.difference.cljs$lang$maxFixedArity = (2); + +/** + * Returns a set of the elements for which pred is true + */ +clojure.set.select = (function clojure$set$select(pred,xset){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (s,k){ +if(cljs.core.truth_((pred.cljs$core$IFn$_invoke$arity$1 ? pred.cljs$core$IFn$_invoke$arity$1(k) : pred.call(null,k)))){ +return s; +} else { +return cljs.core.disj.cljs$core$IFn$_invoke$arity$2(s,k); +} +}),xset,xset); +}); +/** + * Returns a rel of the elements of xrel with only the keys in ks + */ +clojure.set.project = (function clojure$set$project(xrel,ks){ +return cljs.core.set(cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__14459_SHARP_){ +return cljs.core.select_keys(p1__14459_SHARP_,ks); +}),xrel)); +}); +/** + * Returns the map with the keys in kmap renamed to the vals in kmap + */ +clojure.set.rename_keys = (function clojure$set$rename_keys(map,kmap){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m,p__14464){ +var vec__14465 = p__14464; +var old = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14465,(0),null); +var new$ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14465,(1),null); +if(cljs.core.contains_QMARK_(map,old)){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,new$,cljs.core.get.cljs$core$IFn$_invoke$arity$2(map,old)); +} else { +return m; +} +}),cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.dissoc,map,cljs.core.keys(kmap)),kmap); +}); +/** + * Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap + */ +clojure.set.rename = (function clojure$set$rename(xrel,kmap){ +return cljs.core.set(cljs.core.map.cljs$core$IFn$_invoke$arity$2((function (p1__14468_SHARP_){ +return clojure.set.rename_keys(p1__14468_SHARP_,kmap); +}),xrel)); +}); +/** + * Returns a map of the distinct values of ks in the xrel mapped to a + * set of the maps in xrel with the corresponding values of ks. + */ +clojure.set.index = (function clojure$set$index(xrel,ks){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m,x){ +var ik = cljs.core.select_keys(x,ks); +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,ik,cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.get.cljs$core$IFn$_invoke$arity$3(m,ik,cljs.core.PersistentHashSet.EMPTY),x)); +}),cljs.core.PersistentArrayMap.EMPTY,xrel); +}); +/** + * Returns the map with the vals mapped to the keys. + */ +clojure.set.map_invert = (function clojure$set$map_invert(m){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m__$1,p__14473){ +var vec__14474 = p__14473; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14474,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14474,(1),null); +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m__$1,v,k); +}),cljs.core.PersistentArrayMap.EMPTY,m); +}); +/** + * When passed 2 rels, returns the rel corresponding to the natural + * join. When passed an additional keymap, joins on the corresponding + * keys. + */ +clojure.set.join = (function clojure$set$join(var_args){ +var args14481 = []; +var len__9181__auto___14492 = arguments.length; +var i__9182__auto___14493 = (0); +while(true){ +if((i__9182__auto___14493 < len__9181__auto___14492)){ +args14481.push((arguments[i__9182__auto___14493])); + +var G__14494 = (i__9182__auto___14493 + (1)); +i__9182__auto___14493 = G__14494; +continue; +} else { +} +break; +} + +var G__14483 = args14481.length; +switch (G__14483) { +case 2: +return clojure.set.join.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return clojure.set.join.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14481.length)].join(''))); + +} +}); + +clojure.set.join.cljs$core$IFn$_invoke$arity$2 = (function (xrel,yrel){ +if((cljs.core.seq(xrel)) && (cljs.core.seq(yrel))){ +var ks = clojure.set.intersection.cljs$core$IFn$_invoke$arity$2(cljs.core.set(cljs.core.keys(cljs.core.first(xrel))),cljs.core.set(cljs.core.keys(cljs.core.first(yrel)))); +var vec__14484 = (((cljs.core.count(xrel) <= cljs.core.count(yrel)))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [xrel,yrel], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [yrel,xrel], null)); +var r = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14484,(0),null); +var s = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14484,(1),null); +var idx = clojure.set.index(r,ks); +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (ks,vec__14484,r,s,idx){ +return (function (ret,x){ +var found = (function (){var G__14487 = cljs.core.select_keys(x,ks); +return (idx.cljs$core$IFn$_invoke$arity$1 ? idx.cljs$core$IFn$_invoke$arity$1(G__14487) : idx.call(null,G__14487)); +})(); +if(cljs.core.truth_(found)){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (found,ks,vec__14484,r,s,idx){ +return (function (p1__14477_SHARP_,p2__14478_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__14477_SHARP_,cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([p2__14478_SHARP_,x], 0))); +});})(found,ks,vec__14484,r,s,idx)) +,ret,found); +} else { +return ret; +} +});})(ks,vec__14484,r,s,idx)) +,cljs.core.PersistentHashSet.EMPTY,s); +} else { +return cljs.core.PersistentHashSet.EMPTY; +} +}); + +clojure.set.join.cljs$core$IFn$_invoke$arity$3 = (function (xrel,yrel,km){ +var vec__14488 = (((cljs.core.count(xrel) <= cljs.core.count(yrel)))?new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [xrel,yrel,clojure.set.map_invert(km)], null):new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [yrel,xrel,km], null)); +var r = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14488,(0),null); +var s = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14488,(1),null); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14488,(2),null); +var idx = clojure.set.index(r,cljs.core.vals(k)); +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (vec__14488,r,s,k,idx){ +return (function (ret,x){ +var found = (function (){var G__14491 = clojure.set.rename_keys(cljs.core.select_keys(x,cljs.core.keys(k)),k); +return (idx.cljs$core$IFn$_invoke$arity$1 ? idx.cljs$core$IFn$_invoke$arity$1(G__14491) : idx.call(null,G__14491)); +})(); +if(cljs.core.truth_(found)){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (found,vec__14488,r,s,k,idx){ +return (function (p1__14479_SHARP_,p2__14480_SHARP_){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(p1__14479_SHARP_,cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([p2__14480_SHARP_,x], 0))); +});})(found,vec__14488,r,s,k,idx)) +,ret,found); +} else { +return ret; +} +});})(vec__14488,r,s,k,idx)) +,cljs.core.PersistentHashSet.EMPTY,s); +}); + +clojure.set.join.cljs$lang$maxFixedArity = 3; + +/** + * Is set1 a subset of set2? + */ +clojure.set.subset_QMARK_ = (function clojure$set$subset_QMARK_(set1,set2){ +return ((cljs.core.count(set1) <= cljs.core.count(set2))) && (cljs.core.every_QMARK_((function (p1__14496_SHARP_){ +return cljs.core.contains_QMARK_(set2,p1__14496_SHARP_); +}),set1)); +}); +/** + * Is set1 a superset of set2? + */ +clojure.set.superset_QMARK_ = (function clojure$set$superset_QMARK_(set1,set2){ +return ((cljs.core.count(set1) >= cljs.core.count(set2))) && (cljs.core.every_QMARK_((function (p1__14497_SHARP_){ +return cljs.core.contains_QMARK_(set1,p1__14497_SHARP_); +}),set2)); +}); diff --git a/public/js/rel/clojure/string.cljs b/public/js/rel/clojure/string.cljs new file mode 100644 index 0000000..a2433e0 --- /dev/null +++ b/public/js/rel/clojure/string.cljs @@ -0,0 +1,263 @@ +; Copyright (c) Rich Hickey. All rights reserved. +; The use and distribution terms for this software are covered by the +; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +; which can be found in the file epl-v10.html at the root of this distribution. +; By using this software in any fashion, you are agreeing to be bound by +; the terms of this license. +; You must not remove this notice, or any other, from this software. + +(ns clojure.string + (:refer-clojure :exclude [replace reverse]) + (:require [goog.string :as gstring]) + (:import [goog.string StringBuffer])) + +(defn- seq-reverse + [coll] + (reduce conj () coll)) + +(def ^:private re-surrogate-pair + (js/RegExp. "([\\uD800-\\uDBFF])([\\uDC00-\\uDFFF])" "g")) + +(defn reverse + "Returns s with its characters reversed." + [s] + (-> (.replace s re-surrogate-pair "$2$1") + (.. (split "") (reverse) (join "")))) + +(defn- replace-all + [s re replacement] + (let [r (js/RegExp. (.-source re) + (cond-> "g" + (.-ignoreCase re) (str "i") + (.-multiline re) (str "m") + (.-unicode re) (str "u")))] + (.replace s r replacement))) + +(defn- replace-with + [f] + (fn [& args] + (let [matches (drop-last 2 args)] + (if (= (count matches) 1) + (f (first matches)) + (f (vec matches)))))) + +(defn replace + "Replaces all instance of match with replacement in s. + match/replacement can be: + + string / string + pattern / (string or function of match)." + [s match replacement] + (cond + (string? match) + (.replace s (js/RegExp. (gstring/regExpEscape match) "g") replacement) + + (instance? js/RegExp match) + (if (string? replacement) + (replace-all s match replacement) + (replace-all s match (replace-with replacement))) + + :else (throw (str "Invalid match arg: " match)))) + +(defn replace-first + "Replaces the first instance of match with replacement in s. + match/replacement can be: + + string / string + pattern / (string or function of match)." + [s match replacement] + (.replace s match replacement)) + +(defn join + "Returns a string of all elements in coll, as returned by (seq coll), + separated by an optional separator." + ([coll] + (loop [sb (StringBuffer.) coll (seq coll)] + (if-not (nil? coll) + (recur (. sb (append (str (first coll)))) (next coll)) + (.toString sb)))) + ([separator coll] + (loop [sb (StringBuffer.) coll (seq coll)] + (if-not (nil? coll) + (do + (. sb (append (str (first coll)))) + (let [coll (next coll)] + (when-not (nil? coll) + (. sb (append separator))) + (recur sb coll))) + (.toString sb))))) + +(defn upper-case + "Converts string to all upper-case." + [s] + (.toUpperCase s)) + +(defn lower-case + "Converts string to all lower-case." + [s] + (.toLowerCase s)) + +(defn capitalize + "Converts first character of the string to upper-case, all other + characters to lower-case." + [s] + (if (< (count s) 2) + (upper-case s) + (str (upper-case (subs s 0 1)) + (lower-case (subs s 1))))) + +;; The JavaScript split function takes a limit argument but the return +;; value is not the same as the Java split function. +;; +;; Java: (.split "a-b-c" #"-" 2) => ["a" "b-c"] +;; JavaScript: (.split "a-b-c" #"-" 2) => ["a" "b"] +;; +;; For consistency, the three arg version has been implemented to +;; mimic Java's behavior. + +(defn- pop-last-while-empty + [v] + (loop [v v] + (if (identical? "" (peek v)) + (recur (pop v)) + v))) + +(defn- discard-trailing-if-needed + [limit v] + (if (and (== 0 limit) (< 1 (count v))) + (pop-last-while-empty v) + v)) + +(defn- split-with-empty-regex + [s limit] + (if (or (<= limit 0) (>= limit (+ 2 (count s)))) + (conj (vec (cons "" (map str (seq s)))) "") + (condp == limit + 1 (vector s) + 2 (vector "" s) + (let [c (- limit 2)] + (conj (vec (cons "" (subvec (vec (map str (seq s))) 0 c))) (subs s c)))))) + +(defn split + "Splits string on a regular expression. Optional argument limit is + the maximum number of splits. Not lazy. Returns vector of the splits." + ([s re] + (split s re 0)) + ([s re limit] + (discard-trailing-if-needed limit + (if (identical? "/(?:)/" (str re)) + (split-with-empty-regex s limit) + (if (< limit 1) + (vec (.split (str s) re)) + (loop [s s + limit limit + parts []] + (if (== 1 limit) + (conj parts s) + (let [m (re-find re s)] + (if-not (nil? m) + (let [index (.indexOf s m)] + (recur (.substring s (+ index (count m))) + (dec limit) + (conj parts (.substring s 0 index)))) + (conj parts s)))))))))) + +(defn split-lines + "Splits s on \n or \r\n." + [s] + (split s #"\n|\r\n")) + +(defn trim + "Removes whitespace from both ends of string." + [s] + (gstring/trim s)) + +(defn triml + "Removes whitespace from the left side of string." + [s] + (gstring/trimLeft s)) + +(defn trimr + "Removes whitespace from the right side of string." + [s] + (gstring/trimRight s)) + +(defn trim-newline + "Removes all trailing newline \\n or return \\r characters from + string. Similar to Perl's chomp." + [s] + (loop [index (.-length s)] + (if (zero? index) + "" + (let [ch (get s (dec index))] + (if (or (identical? \newline ch) + (identical? \return ch)) + (recur (dec index)) + (.substring s 0 index)))))) + +(defn ^boolean blank? + "True is s is nil, empty, or contains only whitespace." + [s] + (gstring/isEmptySafe s)) + +(defn escape + "Return a new string, using cmap to escape each character ch + from s as follows: + + If (cmap ch) is nil, append ch to the new string. + If (cmap ch) is non-nil, append (str (cmap ch)) instead." + [s cmap] + (let [buffer (StringBuffer.) + length (.-length s)] + (loop [index 0] + (if (== length index) + (. buffer (toString)) + (let [ch (.charAt s index) + replacement (get cmap ch)] + (if-not (nil? replacement) + (.append buffer (str replacement)) + (.append buffer ch)) + (recur (inc index))))))) + +(defn index-of + "Return index of value (string or char) in s, optionally searching + forward from from-index or nil if not found." + ([s value] + (let [result (.indexOf s value)] + (if (neg? result) + nil + result))) + ([s value from-index] + (let [result (.indexOf s value from-index)] + (if (neg? result) + nil + result)))) + +(defn last-index-of + "Return last index of value (string or char) in s, optionally + searching backward from from-index or nil if not found." + ([s value] + (let [result (.lastIndexOf s value)] + (if (neg? result) + nil + result))) + ([s value from-index] + (let [result (.lastIndexOf s value from-index)] + (if (neg? result) + nil + result)))) + +(defn ^boolean starts-with? + "True if s starts with substr." + [s substr] + (gstring/startsWith s substr)) + +(defn ^boolean ends-with? + "True if s ends with substr." + [s substr] + (gstring/endsWith s substr)) + +(defn ^boolean includes? + "True if s includes substr." + [s substr] + (gstring/contains s substr)) diff --git a/public/js/rel/clojure/string.js b/public/js/rel/clojure/string.js new file mode 100644 index 0000000..2c50b7f --- /dev/null +++ b/public/js/rel/clojure/string.js @@ -0,0 +1,515 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('clojure.string'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('goog.string'); +goog.require('goog.string.StringBuffer'); +clojure.string.seq_reverse = (function clojure$string$seq_reverse(coll){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(cljs.core.conj,cljs.core.List.EMPTY,coll); +}); +clojure.string.re_surrogate_pair = (new RegExp("([\\uD800-\\uDBFF])([\\uDC00-\\uDFFF])","g")); +/** + * Returns s with its characters reversed. + */ +clojure.string.reverse = (function clojure$string$reverse(s){ +return s.replace(clojure.string.re_surrogate_pair,"$2$1").split("").reverse().join(""); +}); +clojure.string.replace_all = (function clojure$string$replace_all(s,re,replacement){ +var r = (new RegExp(re.source,(function (){var G__14334 = "g"; +var G__14334__$1 = (cljs.core.truth_(re.ignoreCase)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__14334),cljs.core.str.cljs$core$IFn$_invoke$arity$1("i")].join(''):G__14334); +var G__14334__$2 = (cljs.core.truth_(re.multiline)?[cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__14334__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1("m")].join(''):G__14334__$1); +if(cljs.core.truth_(re.unicode)){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__14334__$2),cljs.core.str.cljs$core$IFn$_invoke$arity$1("u")].join(''); +} else { +return G__14334__$2; +} +})())); +return s.replace(r,replacement); +}); +clojure.string.replace_with = (function clojure$string$replace_with(f){ +return (function() { +var G__14339__delegate = function (args){ +var matches = cljs.core.drop_last.cljs$core$IFn$_invoke$arity$2((2),args); +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(cljs.core.count(matches),(1))){ +var G__14337 = cljs.core.first(matches); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__14337) : f.call(null,G__14337)); +} else { +var G__14338 = cljs.core.vec(matches); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__14338) : f.call(null,G__14338)); +} +}; +var G__14339 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__14340__i = 0, G__14340__a = new Array(arguments.length - 0); +while (G__14340__i < G__14340__a.length) {G__14340__a[G__14340__i] = arguments[G__14340__i + 0]; ++G__14340__i;} + args = new cljs.core.IndexedSeq(G__14340__a,0,null); +} +return G__14339__delegate.call(this,args);}; +G__14339.cljs$lang$maxFixedArity = 0; +G__14339.cljs$lang$applyTo = (function (arglist__14341){ +var args = cljs.core.seq(arglist__14341); +return G__14339__delegate(args); +}); +G__14339.cljs$core$IFn$_invoke$arity$variadic = G__14339__delegate; +return G__14339; +})() +; +}); +/** + * Replaces all instance of match with replacement in s. + * match/replacement can be: + * + * string / string + * pattern / (string or function of match). + */ +clojure.string.replace = (function clojure$string$replace(s,match,replacement){ +if(typeof match === 'string'){ +return s.replace((new RegExp(goog.string.regExpEscape(match),"g")),replacement); +} else { +if((match instanceof RegExp)){ +if(typeof replacement === 'string'){ +return clojure.string.replace_all(s,match,replacement); +} else { +return clojure.string.replace_all(s,match,clojure.string.replace_with(replacement)); +} +} else { +throw [cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid match arg: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(match)].join(''); + +} +} +}); +/** + * Replaces the first instance of match with replacement in s. + * match/replacement can be: + * + * string / string + * pattern / (string or function of match). + */ +clojure.string.replace_first = (function clojure$string$replace_first(s,match,replacement){ +return s.replace(match,replacement); +}); +/** + * Returns a string of all elements in coll, as returned by (seq coll), + * separated by an optional separator. + */ +clojure.string.join = (function clojure$string$join(var_args){ +var args14342 = []; +var len__9181__auto___14345 = arguments.length; +var i__9182__auto___14346 = (0); +while(true){ +if((i__9182__auto___14346 < len__9181__auto___14345)){ +args14342.push((arguments[i__9182__auto___14346])); + +var G__14347 = (i__9182__auto___14346 + (1)); +i__9182__auto___14346 = G__14347; +continue; +} else { +} +break; +} + +var G__14344 = args14342.length; +switch (G__14344) { +case 1: +return clojure.string.join.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return clojure.string.join.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14342.length)].join(''))); + +} +}); + +clojure.string.join.cljs$core$IFn$_invoke$arity$1 = (function (coll){ +var sb = (new goog.string.StringBuffer()); +var coll__$1 = cljs.core.seq(coll); +while(true){ +if(!((coll__$1 == null))){ +var G__14349 = sb.append([cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.first(coll__$1))].join('')); +var G__14350 = cljs.core.next(coll__$1); +sb = G__14349; +coll__$1 = G__14350; +continue; +} else { +return sb.toString(); +} +break; +} +}); + +clojure.string.join.cljs$core$IFn$_invoke$arity$2 = (function (separator,coll){ +var sb = (new goog.string.StringBuffer()); +var coll__$1 = cljs.core.seq(coll); +while(true){ +if(!((coll__$1 == null))){ +sb.append([cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.first(coll__$1))].join('')); + +var coll__$2 = cljs.core.next(coll__$1); +if((coll__$2 == null)){ +} else { +sb.append(separator); +} + +var G__14351 = sb; +var G__14352 = coll__$2; +sb = G__14351; +coll__$1 = G__14352; +continue; +} else { +return sb.toString(); +} +break; +} +}); + +clojure.string.join.cljs$lang$maxFixedArity = 2; + +/** + * Converts string to all upper-case. + */ +clojure.string.upper_case = (function clojure$string$upper_case(s){ +return s.toUpperCase(); +}); +/** + * Converts string to all lower-case. + */ +clojure.string.lower_case = (function clojure$string$lower_case(s){ +return s.toLowerCase(); +}); +/** + * Converts first character of the string to upper-case, all other + * characters to lower-case. + */ +clojure.string.capitalize = (function clojure$string$capitalize(s){ +if((cljs.core.count(s) < (2))){ +return clojure.string.upper_case(s); +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(clojure.string.upper_case(cljs.core.subs.cljs$core$IFn$_invoke$arity$3(s,(0),(1)))),cljs.core.str.cljs$core$IFn$_invoke$arity$1(clojure.string.lower_case(cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s,(1))))].join(''); +} +}); +clojure.string.pop_last_while_empty = (function clojure$string$pop_last_while_empty(v){ +var v__$1 = v; +while(true){ +if(("" === cljs.core.peek(v__$1))){ +var G__14353 = cljs.core.pop(v__$1); +v__$1 = G__14353; +continue; +} else { +return v__$1; +} +break; +} +}); +clojure.string.discard_trailing_if_needed = (function clojure$string$discard_trailing_if_needed(limit,v){ +if((((0) === limit)) && (((1) < cljs.core.count(v)))){ +return clojure.string.pop_last_while_empty(v); +} else { +return v; +} +}); +clojure.string.split_with_empty_regex = (function clojure$string$split_with_empty_regex(s,limit){ +if(((limit <= (0))) || ((limit >= ((2) + cljs.core.count(s))))){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.vec(cljs.core.cons("",cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.str,cljs.core.seq(s)))),""); +} else { +var pred__14357 = cljs.core._EQ__EQ_; +var expr__14358 = limit; +if(cljs.core.truth_((pred__14357.cljs$core$IFn$_invoke$arity$2 ? pred__14357.cljs$core$IFn$_invoke$arity$2((1),expr__14358) : pred__14357.call(null,(1),expr__14358)))){ +return (new cljs.core.PersistentVector(null,1,(5),cljs.core.PersistentVector.EMPTY_NODE,[s],null)); +} else { +if(cljs.core.truth_((pred__14357.cljs$core$IFn$_invoke$arity$2 ? pred__14357.cljs$core$IFn$_invoke$arity$2((2),expr__14358) : pred__14357.call(null,(2),expr__14358)))){ +return (new cljs.core.PersistentVector(null,2,(5),cljs.core.PersistentVector.EMPTY_NODE,["",s],null)); +} else { +var c = (limit - (2)); +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(cljs.core.vec(cljs.core.cons("",cljs.core.subvec.cljs$core$IFn$_invoke$arity$3(cljs.core.vec(cljs.core.map.cljs$core$IFn$_invoke$arity$2(cljs.core.str,cljs.core.seq(s))),(0),c))),cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s,c)); +} +} +} +}); +/** + * Splits string on a regular expression. Optional argument limit is + * the maximum number of splits. Not lazy. Returns vector of the splits. + */ +clojure.string.split = (function clojure$string$split(var_args){ +var args14360 = []; +var len__9181__auto___14363 = arguments.length; +var i__9182__auto___14364 = (0); +while(true){ +if((i__9182__auto___14364 < len__9181__auto___14363)){ +args14360.push((arguments[i__9182__auto___14364])); + +var G__14365 = (i__9182__auto___14364 + (1)); +i__9182__auto___14364 = G__14365; +continue; +} else { +} +break; +} + +var G__14362 = args14360.length; +switch (G__14362) { +case 2: +return clojure.string.split.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return clojure.string.split.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14360.length)].join(''))); + +} +}); + +clojure.string.split.cljs$core$IFn$_invoke$arity$2 = (function (s,re){ +return clojure.string.split.cljs$core$IFn$_invoke$arity$3(s,re,(0)); +}); + +clojure.string.split.cljs$core$IFn$_invoke$arity$3 = (function (s,re,limit){ +return clojure.string.discard_trailing_if_needed(limit,((("/(?:)/" === [cljs.core.str.cljs$core$IFn$_invoke$arity$1(re)].join('')))?clojure.string.split_with_empty_regex(s,limit):(((limit < (1)))?cljs.core.vec([cljs.core.str.cljs$core$IFn$_invoke$arity$1(s)].join('').split(re)):(function (){var s__$1 = s; +var limit__$1 = limit; +var parts = cljs.core.PersistentVector.EMPTY; +while(true){ +if(((1) === limit__$1)){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(parts,s__$1); +} else { +var m = cljs.core.re_find(re,s__$1); +if(!((m == null))){ +var index = s__$1.indexOf(m); +var G__14367 = s__$1.substring((index + cljs.core.count(m))); +var G__14368 = (limit__$1 - (1)); +var G__14369 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(parts,s__$1.substring((0),index)); +s__$1 = G__14367; +limit__$1 = G__14368; +parts = G__14369; +continue; +} else { +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(parts,s__$1); +} +} +break; +} +})()))); +}); + +clojure.string.split.cljs$lang$maxFixedArity = 3; + +/** + * Splits s on + * or + * . + */ +clojure.string.split_lines = (function clojure$string$split_lines(s){ +return clojure.string.split.cljs$core$IFn$_invoke$arity$2(s,/\n|\r\n/); +}); +/** + * Removes whitespace from both ends of string. + */ +clojure.string.trim = (function clojure$string$trim(s){ +return goog.string.trim(s); +}); +/** + * Removes whitespace from the left side of string. + */ +clojure.string.triml = (function clojure$string$triml(s){ +return goog.string.trimLeft(s); +}); +/** + * Removes whitespace from the right side of string. + */ +clojure.string.trimr = (function clojure$string$trimr(s){ +return goog.string.trimRight(s); +}); +/** + * Removes all trailing newline \n or return \r characters from + * string. Similar to Perl's chomp. + */ +clojure.string.trim_newline = (function clojure$string$trim_newline(s){ +var index = s.length; +while(true){ +if((index === (0))){ +return ""; +} else { +var ch = cljs.core.get.cljs$core$IFn$_invoke$arity$2(s,(index - (1))); +if((("\n" === ch)) || (("\r" === ch))){ +var G__14370 = (index - (1)); +index = G__14370; +continue; +} else { +return s.substring((0),index); +} +} +break; +} +}); +/** + * True is s is nil, empty, or contains only whitespace. + */ +clojure.string.blank_QMARK_ = (function clojure$string$blank_QMARK_(s){ +return goog.string.isEmptySafe(s); +}); +/** + * Return a new string, using cmap to escape each character ch + * from s as follows: + * + * If (cmap ch) is nil, append ch to the new string. + * If (cmap ch) is non-nil, append (str (cmap ch)) instead. + */ +clojure.string.escape = (function clojure$string$escape(s,cmap){ +var buffer = (new goog.string.StringBuffer()); +var length = s.length; +var index = (0); +while(true){ +if((length === index)){ +return buffer.toString(); +} else { +var ch = s.charAt(index); +var replacement = cljs.core.get.cljs$core$IFn$_invoke$arity$2(cmap,ch); +if(!((replacement == null))){ +buffer.append([cljs.core.str.cljs$core$IFn$_invoke$arity$1(replacement)].join('')); +} else { +buffer.append(ch); +} + +var G__14371 = (index + (1)); +index = G__14371; +continue; +} +break; +} +}); +/** + * Return index of value (string or char) in s, optionally searching + * forward from from-index or nil if not found. + */ +clojure.string.index_of = (function clojure$string$index_of(var_args){ +var args14372 = []; +var len__9181__auto___14375 = arguments.length; +var i__9182__auto___14376 = (0); +while(true){ +if((i__9182__auto___14376 < len__9181__auto___14375)){ +args14372.push((arguments[i__9182__auto___14376])); + +var G__14377 = (i__9182__auto___14376 + (1)); +i__9182__auto___14376 = G__14377; +continue; +} else { +} +break; +} + +var G__14374 = args14372.length; +switch (G__14374) { +case 2: +return clojure.string.index_of.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return clojure.string.index_of.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14372.length)].join(''))); + +} +}); + +clojure.string.index_of.cljs$core$IFn$_invoke$arity$2 = (function (s,value){ +var result = s.indexOf(value); +if((result < (0))){ +return null; +} else { +return result; +} +}); + +clojure.string.index_of.cljs$core$IFn$_invoke$arity$3 = (function (s,value,from_index){ +var result = s.indexOf(value,from_index); +if((result < (0))){ +return null; +} else { +return result; +} +}); + +clojure.string.index_of.cljs$lang$maxFixedArity = 3; + +/** + * Return last index of value (string or char) in s, optionally + * searching backward from from-index or nil if not found. + */ +clojure.string.last_index_of = (function clojure$string$last_index_of(var_args){ +var args14379 = []; +var len__9181__auto___14382 = arguments.length; +var i__9182__auto___14383 = (0); +while(true){ +if((i__9182__auto___14383 < len__9181__auto___14382)){ +args14379.push((arguments[i__9182__auto___14383])); + +var G__14384 = (i__9182__auto___14383 + (1)); +i__9182__auto___14383 = G__14384; +continue; +} else { +} +break; +} + +var G__14381 = args14379.length; +switch (G__14381) { +case 2: +return clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14379.length)].join(''))); + +} +}); + +clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$2 = (function (s,value){ +var result = s.lastIndexOf(value); +if((result < (0))){ +return null; +} else { +return result; +} +}); + +clojure.string.last_index_of.cljs$core$IFn$_invoke$arity$3 = (function (s,value,from_index){ +var result = s.lastIndexOf(value,from_index); +if((result < (0))){ +return null; +} else { +return result; +} +}); + +clojure.string.last_index_of.cljs$lang$maxFixedArity = 3; + +/** + * True if s starts with substr. + */ +clojure.string.starts_with_QMARK_ = (function clojure$string$starts_with_QMARK_(s,substr){ +return goog.string.startsWith(s,substr); +}); +/** + * True if s ends with substr. + */ +clojure.string.ends_with_QMARK_ = (function clojure$string$ends_with_QMARK_(s,substr){ +return goog.string.endsWith(s,substr); +}); +/** + * True if s includes substr. + */ +clojure.string.includes_QMARK_ = (function clojure$string$includes_QMARK_(s,substr){ +return goog.string.contains(s,substr); +}); diff --git a/public/js/rel/clojure/walk.cljs b/public/js/rel/clojure/walk.cljs new file mode 100644 index 0000000..62a9d3a --- /dev/null +++ b/public/js/rel/clojure/walk.cljs @@ -0,0 +1,96 @@ +; Copyright (c) Rich Hickey. All rights reserved. +; The use and distribution terms for this software are covered by the +; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php) +; which can be found in the file epl-v10.html at the root of this distribution. +; By using this software in any fashion, you are agreeing to be bound by +; the terms of this license. +; You must not remove this notice, or any other, from this software. + +;;; walk.cljs - generic tree walker with replacement + +;; by Stuart Sierra +;; Jul5 17, 2011 + +;; CHANGE LOG: +;; +;; * July 17, 2011: Port to ClojureScript +;; +;; * December 15, 2008: replaced 'walk' with 'prewalk' & 'postwalk' +;; +;; * December 9, 2008: first version + + +(ns + ^{:author "Stuart Sierra", + :doc "This file defines a generic tree walker for Clojure data +structures. It takes any data structure (list, vector, map, set, +seq), calls a function on every element, and uses the return value +of the function in place of the original. This makes it fairly +easy to write recursive search-and-replace functions, as shown in +the examples. + +Note: \"walk\" supports all Clojure data structures EXCEPT maps +created with sorted-map-by. There is no (obvious) way to retrieve +the sorting function."} + clojure.walk) + +(defn walk + "Traverses form, an arbitrary data structure. inner and outer are + functions. Applies inner to each element of form, building up a + data structure of the same type, then applies outer to the result. + Recognizes all Clojure data structures. Consumes seqs as with doall." + + {:added "1.1"} + [inner outer form] + (cond + (list? form) (outer (apply list (map inner form))) + (seq? form) (outer (doall (map inner form))) + (record? form) (outer (reduce (fn [r x] (conj r (inner x))) form form)) + (coll? form) (outer (into (empty form) (map inner form))) + :else (outer form))) + +(defn postwalk + "Performs a depth-first, post-order traversal of form. Calls f on + each sub-form, uses f's return value in place of the original. + Recognizes all Clojure data structures. Consumes seqs as with doall." + {:added "1.1"} + [f form] + (walk (partial postwalk f) f form)) + +(defn prewalk + "Like postwalk, but does pre-order traversal." + {:added "1.1"} + [f form] + (walk (partial prewalk f) identity (f form))) + +(defn keywordize-keys + "Recursively transforms all map keys from strings to keywords." + {:added "1.1"} + [m] + (let [f (fn [[k v]] (if (string? k) [(keyword k) v] [k v]))] + ;; only apply to maps + (postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m))) + +(defn stringify-keys + "Recursively transforms all map keys from keywords to strings." + {:added "1.1"} + [m] + (let [f (fn [[k v]] (if (keyword? k) [(name k) v] [k v]))] + ;; only apply to maps + (postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m))) + +(defn prewalk-replace + "Recursively transforms form by replacing keys in smap with their + values. Like clojure/replace but works on any data structure. Does + replacement at the root of the tree first." + {:added "1.1"} + [smap form] + (prewalk (fn [x] (if (contains? smap x) (smap x) x)) form)) + +(defn postwalk-replace + "Recursively transforms form by replacing keys in smap with their + values. Like clojure/replace but works on any data structure. Does + replacement at the leaves of the tree first." + {:added "1.1"} + [smap form] + (postwalk (fn [x] (if (contains? smap x) (smap x) x)) form)) diff --git a/public/js/rel/clojure/walk.js b/public/js/rel/clojure/walk.js new file mode 100644 index 0000000..2d06ced --- /dev/null +++ b/public/js/rel/clojure/walk.js @@ -0,0 +1,126 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('clojure.walk'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +/** + * Traverses form, an arbitrary data structure. inner and outer are + * functions. Applies inner to each element of form, building up a + * data structure of the same type, then applies outer to the result. + * Recognizes all Clojure data structures. Consumes seqs as with doall. + */ +clojure.walk.walk = (function clojure$walk$walk(inner,outer,form){ +if(cljs.core.list_QMARK_(form)){ +var G__14758 = cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.list,cljs.core.map.cljs$core$IFn$_invoke$arity$2(inner,form)); +return (outer.cljs$core$IFn$_invoke$arity$1 ? outer.cljs$core$IFn$_invoke$arity$1(G__14758) : outer.call(null,G__14758)); +} else { +if(cljs.core.seq_QMARK_(form)){ +var G__14759 = cljs.core.doall.cljs$core$IFn$_invoke$arity$1(cljs.core.map.cljs$core$IFn$_invoke$arity$2(inner,form)); +return (outer.cljs$core$IFn$_invoke$arity$1 ? outer.cljs$core$IFn$_invoke$arity$1(G__14759) : outer.call(null,G__14759)); +} else { +if(cljs.core.record_QMARK_(form)){ +var G__14760 = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (r,x){ +return cljs.core.conj.cljs$core$IFn$_invoke$arity$2(r,(inner.cljs$core$IFn$_invoke$arity$1 ? inner.cljs$core$IFn$_invoke$arity$1(x) : inner.call(null,x))); +}),form,form); +return (outer.cljs$core$IFn$_invoke$arity$1 ? outer.cljs$core$IFn$_invoke$arity$1(G__14760) : outer.call(null,G__14760)); +} else { +if(cljs.core.coll_QMARK_(form)){ +var G__14761 = cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.empty(form),cljs.core.map.cljs$core$IFn$_invoke$arity$2(inner,form)); +return (outer.cljs$core$IFn$_invoke$arity$1 ? outer.cljs$core$IFn$_invoke$arity$1(G__14761) : outer.call(null,G__14761)); +} else { +return (outer.cljs$core$IFn$_invoke$arity$1 ? outer.cljs$core$IFn$_invoke$arity$1(form) : outer.call(null,form)); + +} +} +} +} +}); +/** + * Performs a depth-first, post-order traversal of form. Calls f on + * each sub-form, uses f's return value in place of the original. + * Recognizes all Clojure data structures. Consumes seqs as with doall. + */ +clojure.walk.postwalk = (function clojure$walk$postwalk(f,form){ +return clojure.walk.walk(cljs.core.partial.cljs$core$IFn$_invoke$arity$2(clojure.walk.postwalk,f),f,form); +}); +/** + * Like postwalk, but does pre-order traversal. + */ +clojure.walk.prewalk = (function clojure$walk$prewalk(f,form){ +return clojure.walk.walk(cljs.core.partial.cljs$core$IFn$_invoke$arity$2(clojure.walk.prewalk,f),cljs.core.identity,(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(form) : f.call(null,form))); +}); +/** + * Recursively transforms all map keys from strings to keywords. + */ +clojure.walk.keywordize_keys = (function clojure$walk$keywordize_keys(m){ +var f = (function (p__14766){ +var vec__14767 = p__14766; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14767,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14767,(1),null); +if(typeof k === 'string'){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(k),v], null); +} else { +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k,v], null); +} +}); +return clojure.walk.postwalk(((function (f){ +return (function (x){ +if(cljs.core.map_QMARK_(x)){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,cljs.core.map.cljs$core$IFn$_invoke$arity$2(f,x)); +} else { +return x; +} +});})(f)) +,m); +}); +/** + * Recursively transforms all map keys from keywords to strings. + */ +clojure.walk.stringify_keys = (function clojure$walk$stringify_keys(m){ +var f = (function (p__14774){ +var vec__14775 = p__14774; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14775,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14775,(1),null); +if((k instanceof cljs.core.Keyword)){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.name(k),v], null); +} else { +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k,v], null); +} +}); +return clojure.walk.postwalk(((function (f){ +return (function (x){ +if(cljs.core.map_QMARK_(x)){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentArrayMap.EMPTY,cljs.core.map.cljs$core$IFn$_invoke$arity$2(f,x)); +} else { +return x; +} +});})(f)) +,m); +}); +/** + * Recursively transforms form by replacing keys in smap with their + * values. Like clojure/replace but works on any data structure. Does + * replacement at the root of the tree first. + */ +clojure.walk.prewalk_replace = (function clojure$walk$prewalk_replace(smap,form){ +return clojure.walk.prewalk((function (x){ +if(cljs.core.contains_QMARK_(smap,x)){ +return (smap.cljs$core$IFn$_invoke$arity$1 ? smap.cljs$core$IFn$_invoke$arity$1(x) : smap.call(null,x)); +} else { +return x; +} +}),form); +}); +/** + * Recursively transforms form by replacing keys in smap with their + * values. Like clojure/replace but works on any data structure. Does + * replacement at the leaves of the tree first. + */ +clojure.walk.postwalk_replace = (function clojure$walk$postwalk_replace(smap,form){ +return clojure.walk.postwalk((function (x){ +if(cljs.core.contains_QMARK_(smap,x)){ +return (smap.cljs$core$IFn$_invoke$arity$1 ? smap.cljs$core$IFn$_invoke$arity$1(x) : smap.call(null,x)); +} else { +return x; +} +}),form); +}); diff --git a/public/js/rel/reagent/core.cljs b/public/js/rel/reagent/core.cljs new file mode 100644 index 0000000..f3aaec9 --- /dev/null +++ b/public/js/rel/reagent/core.cljs @@ -0,0 +1,347 @@ +(ns reagent.core + (:require-macros [reagent.core]) + (:refer-clojure :exclude [partial atom flush]) + (:require [reagent.impl.template :as tmpl] + [reagent.impl.component :as comp] + [reagent.impl.util :as util] + [reagent.impl.batching :as batch] + [reagent.ratom :as ratom] + [reagent.debug :as deb :refer-macros [dbg prn]] + [reagent.interop :refer-macros [$ $!]] + [reagent.dom :as dom])) + +(def is-client util/is-client) + +(def react util/react) + +(defn create-element + "Create a native React element, by calling React.createElement directly. + + That means the second argument must be a javascript object (or nil), and + that any Reagent hiccup forms must be processed with as-element. For example + like this: + + (r/create-element \"div\" #js{:className \"foo\"} + \"Hi \" (r/as-element [:strong \"world!\"]) + + which is equivalent to + + [:div.foo \"Hi\" [:strong \"world!\"]]" + ([type] + (create-element type nil)) + ([type props] + (assert (not (map? props))) + ($ react createElement type props)) + ([type props child] + (assert (not (map? props))) + ($ react createElement type props child)) + ([type props child & children] + (assert (not (map? props))) + (apply ($ react :createElement) type props child children))) + +(defn as-element + "Turns a vector of Hiccup syntax into a React element. Returns form + unchanged if it is not a vector." + [form] + (tmpl/as-element form)) + +(defn adapt-react-class + "Returns an adapter for a native React class, that may be used + just like a Reagent component function or class in Hiccup forms." + [c] + (assert c) + (tmpl/adapt-react-class c)) + +(defn reactify-component + "Returns an adapter for a Reagent component, that may be used from + React, for example in JSX. A single argument, props, is passed to + the component, converted to a map." + [c] + (assert c) + (comp/reactify-component c)) + +(defn render + "Render a Reagent component into the DOM. The first argument may be + either a vector (using Reagent's Hiccup syntax), or a React element. + The second argument should be a DOM node. + + Optionally takes a callback that is called when the component is in place. + + Returns the mounted component instance." + ([comp container] + (dom/render comp container)) + ([comp container callback] + (dom/render comp container callback))) + +(defn unmount-component-at-node + "Remove a component from the given DOM node." + [container] + (dom/unmount-component-at-node container)) + +;; For backward compatibility +(def as-component as-element) +(def render-component render) + +(defn ^:export force-update-all + "Force re-rendering of all mounted Reagent components. This is + probably only useful in a development environment, when you want to + update components in response to some dynamic changes to code. + + Note that force-update-all may not update root components. This + happens if a component 'foo' is mounted with `(render [foo])` (since + functions are passed by value, and not by reference, in + ClojureScript). To get around this you'll have to introduce a layer + of indirection, for example by using `(render [#'foo])` instead." + [] + (ratom/flush!) + (dom/force-update-all) + (batch/flush-after-render)) + +(defn create-class + "Create a component, React style. Should be called with a map, + looking like this: + + {:get-initial-state (fn [this]) + :component-will-receive-props (fn [this new-argv]) + :should-component-update (fn [this old-argv new-argv]) + :component-will-mount (fn [this]) + :component-did-mount (fn [this]) + :component-will-update (fn [this new-argv]) + :component-did-update (fn [this old-argv]) + :component-will-unmount (fn [this]) + :reagent-render (fn [args....])} ;; or :render (fn [this]) + + Everything is optional, except either :reagent-render or :render." + [spec] + (comp/create-class spec)) + + +(defn current-component + "Returns the current React component (a.k.a this) in a component + function." + [] + comp/*current-component*) + +(defn state-atom + "Returns an atom containing a components state." + [this] + (assert (comp/reagent-component? this)) + (comp/state-atom this)) + +(defn state + "Returns the state of a component, as set with replace-state or set-state. + Equivalent to (deref (r/state-atom this))" + [this] + (assert (comp/reagent-component? this)) + (deref (state-atom this))) + +(defn replace-state + "Set state of a component. + Equivalent to (reset! (state-atom this) new-state)" + [this new-state] + (assert (comp/reagent-component? this)) + (assert (or (nil? new-state) (map? new-state))) + (reset! (state-atom this) new-state)) + +(defn set-state + "Merge component state with new-state. + Equivalent to (swap! (state-atom this) merge new-state)" + [this new-state] + (assert (comp/reagent-component? this)) + (assert (or (nil? new-state) (map? new-state))) + (swap! (state-atom this) merge new-state)) + +(defn force-update + "Force a component to re-render immediately. + + If the second argument is true, child components will also be + re-rendered, even is their arguments have not changed." + ([this] + (force-update this false)) + ([this deep] + (ratom/flush!) + (util/force-update this deep) + (batch/flush-after-render))) + +(defn props + "Returns the props passed to a component." + [this] + (assert (comp/reagent-component? this)) + (comp/get-props this)) + +(defn children + "Returns the children passed to a component." + [this] + (assert (comp/reagent-component? this)) + (comp/get-children this)) + +(defn argv + "Returns the entire Hiccup form passed to the component." + [this] + (assert (comp/reagent-component? this)) + (comp/get-argv this)) + +(defn dom-node + "Returns the root DOM node of a mounted component." + [this] + (dom/dom-node this)) + +(defn merge-props + "Utility function that merges two maps, handling :class and :style + specially, like React's transferPropsTo." + [defaults props] + (util/merge-props defaults props)) + +(defn flush + "Render dirty components immediately to the DOM. + + Note that this may not work in event handlers, since React.js does + batching of updates there." + [] + (batch/flush)) + + + +;; Ratom + +(defn atom + "Like clojure.core/atom, except that it keeps track of derefs. + Reagent components that derefs one of these are automatically + re-rendered." + ([x] (ratom/atom x)) + ([x & rest] (apply ratom/atom x rest))) + +(defn track + "Takes a function and optional arguments, and returns a derefable + containing the output of that function. If the function derefs + Reagent atoms (or track, etc), the value will be updated whenever + the atom changes. + + In other words, @(track foo bar) will produce the same result + as (foo bar), but foo will only be called again when the atoms it + depends on changes, and will only trigger updates of components when + its result changes. + + track is lazy, i.e the function is only evaluated on deref." + [f & args] + {:pre [(ifn? f)]} + (ratom/make-track f args)) + +(defn track! + "An eager version of track. The function passed is called + immediately, and continues to be called when needed, until stopped + with dispose!." + [f & args] + {:pre [(ifn? f)]} + (ratom/make-track! f args)) + +(defn dispose! + "Stop the result of track! from updating." + [x] + (ratom/dispose! x)) + +(defn wrap + "Provide a combination of value and callback, that looks like an atom. + + The first argument can be any value, that will be returned when the + result is deref'ed. + + The second argument should be a function, that is called with the + optional extra arguments provided to wrap, and the new value of the + resulting 'atom'. + + Use for example like this: + + (wrap (:foo @state) + swap! state assoc :foo) + + Probably useful only for passing to child components." + [value reset-fn & args] + (assert (ifn? reset-fn)) + (ratom/make-wrapper value reset-fn args)) + + +;; RCursor + +(defn cursor + "Provide a cursor into a Reagent atom. + + Behaves like a Reagent atom but focuses updates and derefs to + the specified path within the wrapped Reagent atom. e.g., + (let [c (cursor ra [:nested :content])] + ... @c ;; equivalent to (get-in @ra [:nested :content]) + ... (reset! c 42) ;; equivalent to (swap! ra assoc-in [:nested :content] 42) + ... (swap! c inc) ;; equivalence to (swap! ra update-in [:nested :content] inc) + ) + + The first parameter can also be a function, that should look + something like this: + + (defn set-get + ([k] (get-in @state k)) + ([k v] (swap! state assoc-in k v))) + + The function will be called with one argument – the path passed to + cursor – when the cursor is deref'ed, and two arguments (path and + new value) when the cursor is modified. + + Given that set-get function, (and that state is a Reagent atom, or + another cursor) these cursors are equivalent: + (cursor state [:foo]) and (cursor set-get [:foo]). + + Note that a cursor is lazy: its value will not change until it is + used. This may be noticed with add-watch." + ([src path] + (ratom/cursor src path))) + + +;; Utilities + +(defn rswap! + "Swaps the value of a to be (apply f current-value-of-atom args). + + rswap! works like swap!, except that recursive calls to rswap! on + the same atom are allowed – and it always returns nil." + [a f & args] + {:pre [(satisfies? IAtom a) + (ifn? f)]} + (if a.rswapping + (-> (or a.rswapfs (set! a.rswapfs (array))) + (.push #(apply f % args))) + (do (set! a.rswapping true) + (try (swap! a (fn [state] + (loop [s (apply f state args)] + (if-some [sf (some-> a.rswapfs .shift)] + (recur (sf s)) + s)))) + (finally + (set! a.rswapping false))))) + nil) + +(defn next-tick + "Run f using requestAnimationFrame or equivalent. + + f will be called just before components are rendered." + [f] + (batch/do-before-flush f)) + +(defn after-render + "Run f using requestAnimationFrame or equivalent. + + f will be called just after any queued renders in the next animation + frame (and even if no renders actually occur)." + [f] + (batch/do-after-render f)) + +(defn partial + "Works just like clojure.core/partial, except that it is an IFn, and + the result can be compared with =" + [f & args] + (util/partial-ifn. f args nil)) + +(defn component-path + ;; Try to return the path of component c as a string. + ;; Maybe useful for debugging and error reporting, but may break + ;; with future versions of React (and return nil). + [c] + (comp/component-path c)) diff --git a/public/js/rel/reagent/core.js b/public/js/rel/reagent/core.js new file mode 100644 index 0000000..e373e32 --- /dev/null +++ b/public/js/rel/reagent/core.js @@ -0,0 +1,790 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.core'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.impl.template'); +goog.require('reagent.impl.component'); +goog.require('reagent.impl.util'); +goog.require('reagent.impl.batching'); +goog.require('reagent.ratom'); +goog.require('reagent.debug'); +goog.require('reagent.interop'); +goog.require('reagent.dom'); +reagent.core.is_client = reagent.impl.util.is_client; +reagent.core.react = reagent.impl.util.react; +/** + * Create a native React element, by calling React.createElement directly. + * + * That means the second argument must be a javascript object (or nil), and + * that any Reagent hiccup forms must be processed with as-element. For example + * like this: + * + * (r/create-element "div" #js{:className "foo"} + * "Hi " (r/as-element [:strong "world!"]) + * + * which is equivalent to + * + * [:div.foo "Hi" [:strong "world!"]] + */ +reagent.core.create_element = (function reagent$core$create_element(var_args){ +var args14897 = []; +var len__9181__auto___14904 = arguments.length; +var i__9182__auto___14905 = (0); +while(true){ +if((i__9182__auto___14905 < len__9181__auto___14904)){ +args14897.push((arguments[i__9182__auto___14905])); + +var G__14906 = (i__9182__auto___14905 + (1)); +i__9182__auto___14905 = G__14906; +continue; +} else { +} +break; +} + +var G__14903 = args14897.length; +switch (G__14903) { +case 1: +return reagent.core.create_element.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return reagent.core.create_element.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return reagent.core.create_element.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14897.slice((3)),(0),null)); +return reagent.core.create_element.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),(arguments[(2)]),argseq__9204__auto__); + +} +}); + +reagent.core.create_element.cljs$core$IFn$_invoke$arity$1 = (function (type){ +return reagent.core.create_element.cljs$core$IFn$_invoke$arity$2(type,null); +}); + +reagent.core.create_element.cljs$core$IFn$_invoke$arity$2 = (function (type,props){ +if(!(cljs.core.map_QMARK_(props))){ +} else { +throw (new Error("Assert failed: (not (map? props))")); +} + +return (reagent.core.react["createElement"])(type,props); +}); + +reagent.core.create_element.cljs$core$IFn$_invoke$arity$3 = (function (type,props,child){ +if(!(cljs.core.map_QMARK_(props))){ +} else { +throw (new Error("Assert failed: (not (map? props))")); +} + +return (reagent.core.react["createElement"])(type,props,child); +}); + +reagent.core.create_element.cljs$core$IFn$_invoke$arity$variadic = (function (type,props,child,children){ +if(!(cljs.core.map_QMARK_(props))){ +} else { +throw (new Error("Assert failed: (not (map? props))")); +} + +return cljs.core.apply.cljs$core$IFn$_invoke$arity$5((reagent.core.react["createElement"]),type,props,child,children); +}); + +reagent.core.create_element.cljs$lang$applyTo = (function (seq14898){ +var G__14899 = cljs.core.first(seq14898); +var seq14898__$1 = cljs.core.next(seq14898); +var G__14900 = cljs.core.first(seq14898__$1); +var seq14898__$2 = cljs.core.next(seq14898__$1); +var G__14901 = cljs.core.first(seq14898__$2); +var seq14898__$3 = cljs.core.next(seq14898__$2); +return reagent.core.create_element.cljs$core$IFn$_invoke$arity$variadic(G__14899,G__14900,G__14901,seq14898__$3); +}); + +reagent.core.create_element.cljs$lang$maxFixedArity = (3); + +/** + * Turns a vector of Hiccup syntax into a React element. Returns form + * unchanged if it is not a vector. + */ +reagent.core.as_element = (function reagent$core$as_element(form){ +return reagent.impl.template.as_element(form); +}); +/** + * Returns an adapter for a native React class, that may be used + * just like a Reagent component function or class in Hiccup forms. + */ +reagent.core.adapt_react_class = (function reagent$core$adapt_react_class(c){ +if(cljs.core.truth_(c)){ +} else { +throw (new Error("Assert failed: c")); +} + +return reagent.impl.template.adapt_react_class(c); +}); +/** + * Returns an adapter for a Reagent component, that may be used from + * React, for example in JSX. A single argument, props, is passed to + * the component, converted to a map. + */ +reagent.core.reactify_component = (function reagent$core$reactify_component(c){ +if(cljs.core.truth_(c)){ +} else { +throw (new Error("Assert failed: c")); +} + +return reagent.impl.component.reactify_component(c); +}); +/** + * Render a Reagent component into the DOM. The first argument may be + * either a vector (using Reagent's Hiccup syntax), or a React element. + * The second argument should be a DOM node. + * + * Optionally takes a callback that is called when the component is in place. + * + * Returns the mounted component instance. + */ +reagent.core.render = (function reagent$core$render(var_args){ +var args14908 = []; +var len__9181__auto___14911 = arguments.length; +var i__9182__auto___14912 = (0); +while(true){ +if((i__9182__auto___14912 < len__9181__auto___14911)){ +args14908.push((arguments[i__9182__auto___14912])); + +var G__14913 = (i__9182__auto___14912 + (1)); +i__9182__auto___14912 = G__14913; +continue; +} else { +} +break; +} + +var G__14910 = args14908.length; +switch (G__14910) { +case 2: +return reagent.core.render.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return reagent.core.render.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14908.length)].join(''))); + +} +}); + +reagent.core.render.cljs$core$IFn$_invoke$arity$2 = (function (comp,container){ +return reagent.dom.render.cljs$core$IFn$_invoke$arity$2(comp,container); +}); + +reagent.core.render.cljs$core$IFn$_invoke$arity$3 = (function (comp,container,callback){ +return reagent.dom.render.cljs$core$IFn$_invoke$arity$3(comp,container,callback); +}); + +reagent.core.render.cljs$lang$maxFixedArity = 3; + +/** + * Remove a component from the given DOM node. + */ +reagent.core.unmount_component_at_node = (function reagent$core$unmount_component_at_node(container){ +return reagent.dom.unmount_component_at_node(container); +}); +reagent.core.as_component = reagent.core.as_element; +reagent.core.render_component = reagent.core.render; +/** + * Force re-rendering of all mounted Reagent components. This is + * probably only useful in a development environment, when you want to + * update components in response to some dynamic changes to code. + * + * Note that force-update-all may not update root components. This + * happens if a component 'foo' is mounted with `(render [foo])` (since + * functions are passed by value, and not by reference, in + * ClojureScript). To get around this you'll have to introduce a layer + * of indirection, for example by using `(render [#'foo])` instead. + */ +reagent.core.force_update_all = (function reagent$core$force_update_all(){ +reagent.ratom.flush_BANG_(); + +reagent.dom.force_update_all(); + +return reagent.impl.batching.flush_after_render(); +}); +goog.exportSymbol('reagent.core.force_update_all', reagent.core.force_update_all); +/** + * Create a component, React style. Should be called with a map, + * looking like this: + * + * {:get-initial-state (fn [this]) + * :component-will-receive-props (fn [this new-argv]) + * :should-component-update (fn [this old-argv new-argv]) + * :component-will-mount (fn [this]) + * :component-did-mount (fn [this]) + * :component-will-update (fn [this new-argv]) + * :component-did-update (fn [this old-argv]) + * :component-will-unmount (fn [this]) + * :reagent-render (fn [args....])} ;; or :render (fn [this]) + * + * Everything is optional, except either :reagent-render or :render. + */ +reagent.core.create_class = (function reagent$core$create_class(spec){ +return reagent.impl.component.create_class(spec); +}); +/** + * Returns the current React component (a.k.a this) in a component + * function. + */ +reagent.core.current_component = (function reagent$core$current_component(){ +return reagent.impl.component._STAR_current_component_STAR_; +}); +/** + * Returns an atom containing a components state. + */ +reagent.core.state_atom = (function reagent$core$state_atom(this$){ +if(reagent.impl.component.reagent_component_QMARK_(this$)){ +} else { +throw (new Error("Assert failed: (comp/reagent-component? this)")); +} + +return reagent.impl.component.state_atom(this$); +}); +/** + * Returns the state of a component, as set with replace-state or set-state. + * Equivalent to (deref (r/state-atom this)) + */ +reagent.core.state = (function reagent$core$state(this$){ +if(reagent.impl.component.reagent_component_QMARK_(this$)){ +} else { +throw (new Error("Assert failed: (comp/reagent-component? this)")); +} + +var G__14916 = reagent.core.state_atom(this$); +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__14916) : cljs.core.deref.call(null,G__14916)); +}); +/** + * Set state of a component. + * Equivalent to (reset! (state-atom this) new-state) + */ +reagent.core.replace_state = (function reagent$core$replace_state(this$,new_state){ +if(reagent.impl.component.reagent_component_QMARK_(this$)){ +} else { +throw (new Error("Assert failed: (comp/reagent-component? this)")); +} + +if(((new_state == null)) || (cljs.core.map_QMARK_(new_state))){ +} else { +throw (new Error("Assert failed: (or (nil? new-state) (map? new-state))")); +} + +var G__14919 = reagent.core.state_atom(this$); +var G__14920 = new_state; +return (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(G__14919,G__14920) : cljs.core.reset_BANG_.call(null,G__14919,G__14920)); +}); +/** + * Merge component state with new-state. + * Equivalent to (swap! (state-atom this) merge new-state) + */ +reagent.core.set_state = (function reagent$core$set_state(this$,new_state){ +if(reagent.impl.component.reagent_component_QMARK_(this$)){ +} else { +throw (new Error("Assert failed: (comp/reagent-component? this)")); +} + +if(((new_state == null)) || (cljs.core.map_QMARK_(new_state))){ +} else { +throw (new Error("Assert failed: (or (nil? new-state) (map? new-state))")); +} + +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(reagent.core.state_atom(this$),cljs.core.merge,new_state); +}); +/** + * Force a component to re-render immediately. + * + * If the second argument is true, child components will also be + * re-rendered, even is their arguments have not changed. + */ +reagent.core.force_update = (function reagent$core$force_update(var_args){ +var args14921 = []; +var len__9181__auto___14924 = arguments.length; +var i__9182__auto___14925 = (0); +while(true){ +if((i__9182__auto___14925 < len__9181__auto___14924)){ +args14921.push((arguments[i__9182__auto___14925])); + +var G__14926 = (i__9182__auto___14925 + (1)); +i__9182__auto___14925 = G__14926; +continue; +} else { +} +break; +} + +var G__14923 = args14921.length; +switch (G__14923) { +case 1: +return reagent.core.force_update.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return reagent.core.force_update.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14921.length)].join(''))); + +} +}); + +reagent.core.force_update.cljs$core$IFn$_invoke$arity$1 = (function (this$){ +return reagent.core.force_update.cljs$core$IFn$_invoke$arity$2(this$,false); +}); + +reagent.core.force_update.cljs$core$IFn$_invoke$arity$2 = (function (this$,deep){ +reagent.ratom.flush_BANG_(); + +reagent.impl.util.force_update(this$,deep); + +return reagent.impl.batching.flush_after_render(); +}); + +reagent.core.force_update.cljs$lang$maxFixedArity = 2; + +/** + * Returns the props passed to a component. + */ +reagent.core.props = (function reagent$core$props(this$){ +if(reagent.impl.component.reagent_component_QMARK_(this$)){ +} else { +throw (new Error("Assert failed: (comp/reagent-component? this)")); +} + +return reagent.impl.component.get_props(this$); +}); +/** + * Returns the children passed to a component. + */ +reagent.core.children = (function reagent$core$children(this$){ +if(reagent.impl.component.reagent_component_QMARK_(this$)){ +} else { +throw (new Error("Assert failed: (comp/reagent-component? this)")); +} + +return reagent.impl.component.get_children(this$); +}); +/** + * Returns the entire Hiccup form passed to the component. + */ +reagent.core.argv = (function reagent$core$argv(this$){ +if(reagent.impl.component.reagent_component_QMARK_(this$)){ +} else { +throw (new Error("Assert failed: (comp/reagent-component? this)")); +} + +return reagent.impl.component.get_argv(this$); +}); +/** + * Returns the root DOM node of a mounted component. + */ +reagent.core.dom_node = (function reagent$core$dom_node(this$){ +return reagent.dom.dom_node(this$); +}); +/** + * Utility function that merges two maps, handling :class and :style + * specially, like React's transferPropsTo. + */ +reagent.core.merge_props = (function reagent$core$merge_props(defaults,props){ +return reagent.impl.util.merge_props(defaults,props); +}); +/** + * Render dirty components immediately to the DOM. + * + * Note that this may not work in event handlers, since React.js does + * batching of updates there. + */ +reagent.core.flush = (function reagent$core$flush(){ +return reagent.impl.batching.flush(); +}); +/** + * Like clojure.core/atom, except that it keeps track of derefs. + * Reagent components that derefs one of these are automatically + * re-rendered. + */ +reagent.core.atom = (function reagent$core$atom(var_args){ +var args14928 = []; +var len__9181__auto___14933 = arguments.length; +var i__9182__auto___14934 = (0); +while(true){ +if((i__9182__auto___14934 < len__9181__auto___14933)){ +args14928.push((arguments[i__9182__auto___14934])); + +var G__14935 = (i__9182__auto___14934 + (1)); +i__9182__auto___14934 = G__14935; +continue; +} else { +} +break; +} + +var G__14932 = args14928.length; +switch (G__14932) { +case 1: +return reagent.core.atom.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14928.slice((1)),(0),null)); +return reagent.core.atom.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9204__auto__); + +} +}); + +reagent.core.atom.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return reagent.ratom.atom.cljs$core$IFn$_invoke$arity$1(x); +}); + +reagent.core.atom.cljs$core$IFn$_invoke$arity$variadic = (function (x,rest){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(reagent.ratom.atom,x,rest); +}); + +reagent.core.atom.cljs$lang$applyTo = (function (seq14929){ +var G__14930 = cljs.core.first(seq14929); +var seq14929__$1 = cljs.core.next(seq14929); +return reagent.core.atom.cljs$core$IFn$_invoke$arity$variadic(G__14930,seq14929__$1); +}); + +reagent.core.atom.cljs$lang$maxFixedArity = (1); + +/** + * Takes a function and optional arguments, and returns a derefable + * containing the output of that function. If the function derefs + * Reagent atoms (or track, etc), the value will be updated whenever + * the atom changes. + * + * In other words, @(track foo bar) will produce the same result + * as (foo bar), but foo will only be called again when the atoms it + * depends on changes, and will only trigger updates of components when + * its result changes. + * + * track is lazy, i.e the function is only evaluated on deref. + */ +reagent.core.track = (function reagent$core$track(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14939 = arguments.length; +var i__9182__auto___14940 = (0); +while(true){ +if((i__9182__auto___14940 < len__9181__auto___14939)){ +args__9188__auto__.push((arguments[i__9182__auto___14940])); + +var G__14941 = (i__9182__auto___14940 + (1)); +i__9182__auto___14940 = G__14941; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.core.track.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.core.track.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +if(cljs.core.ifn_QMARK_(f)){ +} else { +throw (new Error("Assert failed: (ifn? f)")); +} + +return reagent.ratom.make_track(f,args); +}); + +reagent.core.track.cljs$lang$maxFixedArity = (1); + +reagent.core.track.cljs$lang$applyTo = (function (seq14937){ +var G__14938 = cljs.core.first(seq14937); +var seq14937__$1 = cljs.core.next(seq14937); +return reagent.core.track.cljs$core$IFn$_invoke$arity$variadic(G__14938,seq14937__$1); +}); + +/** + * An eager version of track. The function passed is called + * immediately, and continues to be called when needed, until stopped + * with dispose!. + */ +reagent.core.track_BANG_ = (function reagent$core$track_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14944 = arguments.length; +var i__9182__auto___14945 = (0); +while(true){ +if((i__9182__auto___14945 < len__9181__auto___14944)){ +args__9188__auto__.push((arguments[i__9182__auto___14945])); + +var G__14946 = (i__9182__auto___14945 + (1)); +i__9182__auto___14945 = G__14946; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.core.track_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.core.track_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +if(cljs.core.ifn_QMARK_(f)){ +} else { +throw (new Error("Assert failed: (ifn? f)")); +} + +return reagent.ratom.make_track_BANG_(f,args); +}); + +reagent.core.track_BANG_.cljs$lang$maxFixedArity = (1); + +reagent.core.track_BANG_.cljs$lang$applyTo = (function (seq14942){ +var G__14943 = cljs.core.first(seq14942); +var seq14942__$1 = cljs.core.next(seq14942); +return reagent.core.track_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__14943,seq14942__$1); +}); + +/** + * Stop the result of track! from updating. + */ +reagent.core.dispose_BANG_ = (function reagent$core$dispose_BANG_(x){ +return reagent.ratom.dispose_BANG_(x); +}); +/** + * Provide a combination of value and callback, that looks like an atom. + * + * The first argument can be any value, that will be returned when the + * result is deref'ed. + * + * The second argument should be a function, that is called with the + * optional extra arguments provided to wrap, and the new value of the + * resulting 'atom'. + * + * Use for example like this: + * + * (wrap (:foo @state) + * swap! state assoc :foo) + * + * Probably useful only for passing to child components. + */ +reagent.core.wrap = (function reagent$core$wrap(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14950 = arguments.length; +var i__9182__auto___14951 = (0); +while(true){ +if((i__9182__auto___14951 < len__9181__auto___14950)){ +args__9188__auto__.push((arguments[i__9182__auto___14951])); + +var G__14952 = (i__9182__auto___14951 + (1)); +i__9182__auto___14951 = G__14952; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((2) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((2)),(0),null)):null); +return reagent.core.wrap.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9189__auto__); +}); + +reagent.core.wrap.cljs$core$IFn$_invoke$arity$variadic = (function (value,reset_fn,args){ +if(cljs.core.ifn_QMARK_(reset_fn)){ +} else { +throw (new Error("Assert failed: (ifn? reset-fn)")); +} + +return reagent.ratom.make_wrapper(value,reset_fn,args); +}); + +reagent.core.wrap.cljs$lang$maxFixedArity = (2); + +reagent.core.wrap.cljs$lang$applyTo = (function (seq14947){ +var G__14948 = cljs.core.first(seq14947); +var seq14947__$1 = cljs.core.next(seq14947); +var G__14949 = cljs.core.first(seq14947__$1); +var seq14947__$2 = cljs.core.next(seq14947__$1); +return reagent.core.wrap.cljs$core$IFn$_invoke$arity$variadic(G__14948,G__14949,seq14947__$2); +}); + +/** + * Provide a cursor into a Reagent atom. + * + * Behaves like a Reagent atom but focuses updates and derefs to + * the specified path within the wrapped Reagent atom. e.g., + * (let [c (cursor ra [:nested :content])] + * ... @c ;; equivalent to (get-in @ra [:nested :content]) + * ... (reset! c 42) ;; equivalent to (swap! ra assoc-in [:nested :content] 42) + * ... (swap! c inc) ;; equivalence to (swap! ra update-in [:nested :content] inc) + * ) + * + * The first parameter can also be a function, that should look + * something like this: + * + * (defn set-get + * ([k] (get-in @state k)) + * ([k v] (swap! state assoc-in k v))) + * + * The function will be called with one argument – the path passed to + * cursor – when the cursor is deref'ed, and two arguments (path and + * new value) when the cursor is modified. + * + * Given that set-get function, (and that state is a Reagent atom, or + * another cursor) these cursors are equivalent: + * (cursor state [:foo]) and (cursor set-get [:foo]). + * + * Note that a cursor is lazy: its value will not change until it is + * used. This may be noticed with add-watch. + */ +reagent.core.cursor = (function reagent$core$cursor(src,path){ +return reagent.ratom.cursor(src,path); +}); +/** + * Swaps the value of a to be (apply f current-value-of-atom args). + * + * rswap! works like swap!, except that recursive calls to rswap! on + * the same atom are allowed – and it always returns nil. + */ +reagent.core.rswap_BANG_ = (function reagent$core$rswap_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14959 = arguments.length; +var i__9182__auto___14960 = (0); +while(true){ +if((i__9182__auto___14960 < len__9181__auto___14959)){ +args__9188__auto__.push((arguments[i__9182__auto___14960])); + +var G__14961 = (i__9182__auto___14960 + (1)); +i__9182__auto___14960 = G__14961; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((2) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((2)),(0),null)):null); +return reagent.core.rswap_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9189__auto__); +}); + +reagent.core.rswap_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (a,f,args){ +if(((!((a == null)))?((((a.cljs$lang$protocol_mask$partition1$ & (16384))) || ((cljs.core.PROTOCOL_SENTINEL === a.cljs$core$IAtom$)))?true:(((!a.cljs$lang$protocol_mask$partition1$))?cljs.core.native_satisfies_QMARK_(cljs.core.IAtom,a):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IAtom,a))){ +} else { +throw (new Error("Assert failed: (satisfies? IAtom a)")); +} + +if(cljs.core.ifn_QMARK_(f)){ +} else { +throw (new Error("Assert failed: (ifn? f)")); +} + +if(cljs.core.truth_(a.rswapping)){ +(function (){var or__7960__auto__ = a.rswapfs; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return a.rswapfs = []; +} +})().push((function (p1__14953_SHARP_){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,p1__14953_SHARP_,args); +})); +} else { +a.rswapping = true; + +try{cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(a,(function (state){ +var s = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(f,state,args); +while(true){ +var temp__5280__auto__ = (function (){var G__14958 = a.rswapfs; +if((G__14958 == null)){ +return null; +} else { +return G__14958.shift(); +} +})(); +if((temp__5280__auto__ == null)){ +return s; +} else { +var sf = temp__5280__auto__; +var G__14962 = (sf.cljs$core$IFn$_invoke$arity$1 ? sf.cljs$core$IFn$_invoke$arity$1(s) : sf.call(null,s)); +s = G__14962; +continue; +} +break; +} +})); +}finally {a.rswapping = false; +}} + +return null; +}); + +reagent.core.rswap_BANG_.cljs$lang$maxFixedArity = (2); + +reagent.core.rswap_BANG_.cljs$lang$applyTo = (function (seq14954){ +var G__14955 = cljs.core.first(seq14954); +var seq14954__$1 = cljs.core.next(seq14954); +var G__14956 = cljs.core.first(seq14954__$1); +var seq14954__$2 = cljs.core.next(seq14954__$1); +return reagent.core.rswap_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__14955,G__14956,seq14954__$2); +}); + +/** + * Run f using requestAnimationFrame or equivalent. + * + * f will be called just before components are rendered. + */ +reagent.core.next_tick = (function reagent$core$next_tick(f){ +return reagent.impl.batching.do_before_flush(f); +}); +/** + * Run f using requestAnimationFrame or equivalent. + * + * f will be called just after any queued renders in the next animation + * frame (and even if no renders actually occur). + */ +reagent.core.after_render = (function reagent$core$after_render(f){ +return reagent.impl.batching.do_after_render(f); +}); +/** + * Works just like clojure.core/partial, except that it is an IFn, and + * the result can be compared with = + */ +reagent.core.partial = (function reagent$core$partial(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14965 = arguments.length; +var i__9182__auto___14966 = (0); +while(true){ +if((i__9182__auto___14966 < len__9181__auto___14965)){ +args__9188__auto__.push((arguments[i__9182__auto___14966])); + +var G__14967 = (i__9182__auto___14966 + (1)); +i__9182__auto___14966 = G__14967; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.core.partial.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.core.partial.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +return (new reagent.impl.util.partial_ifn(f,args,null)); +}); + +reagent.core.partial.cljs$lang$maxFixedArity = (1); + +reagent.core.partial.cljs$lang$applyTo = (function (seq14963){ +var G__14964 = cljs.core.first(seq14963); +var seq14963__$1 = cljs.core.next(seq14963); +return reagent.core.partial.cljs$core$IFn$_invoke$arity$variadic(G__14964,seq14963__$1); +}); + +reagent.core.component_path = (function reagent$core$component_path(c){ +return reagent.impl.component.component_path(c); +}); diff --git a/public/js/rel/reagent/debug.cljs b/public/js/rel/reagent/debug.cljs new file mode 100644 index 0000000..2a272bb --- /dev/null +++ b/public/js/rel/reagent/debug.cljs @@ -0,0 +1,27 @@ +(ns reagent.debug + (:require-macros [reagent.debug])) + +(def ^:const has-console (exists? js/console)) + +(def ^boolean tracking false) + +(defonce warnings (atom nil)) + +(defonce track-console + (let [o #js{}] + (set! (.-warn o) + (fn [& args] + (swap! warnings update-in [:warn] conj (apply str args)))) + (set! (.-error o) + (fn [& args] + (swap! warnings update-in [:error] conj (apply str args)))) + o)) + +(defn track-warnings [f] + (set! tracking true) + (reset! warnings nil) + (f) + (let [warns @warnings] + (reset! warnings nil) + (set! tracking false) + warns)) diff --git a/public/js/rel/reagent/debug.js b/public/js/rel/reagent/debug.js new file mode 100644 index 0000000..f1344c4 --- /dev/null +++ b/public/js/rel/reagent/debug.js @@ -0,0 +1,78 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.debug'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +reagent.debug.has_console = typeof console !== 'undefined'; +reagent.debug.tracking = false; +if(typeof reagent.debug.warnings !== 'undefined'){ +} else { +reagent.debug.warnings = (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(null) : cljs.core.atom.call(null,null)); +} +if(typeof reagent.debug.track_console !== 'undefined'){ +} else { +reagent.debug.track_console = (function (){var o = ({}); +o.warn = ((function (o){ +return (function() { +var G__14325__delegate = function (args){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(reagent.debug.warnings,cljs.core.update_in,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$warn], null),cljs.core.conj,cljs.core.array_seq([cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.str,args)], 0)); +}; +var G__14325 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__14326__i = 0, G__14326__a = new Array(arguments.length - 0); +while (G__14326__i < G__14326__a.length) {G__14326__a[G__14326__i] = arguments[G__14326__i + 0]; ++G__14326__i;} + args = new cljs.core.IndexedSeq(G__14326__a,0,null); +} +return G__14325__delegate.call(this,args);}; +G__14325.cljs$lang$maxFixedArity = 0; +G__14325.cljs$lang$applyTo = (function (arglist__14327){ +var args = cljs.core.seq(arglist__14327); +return G__14325__delegate(args); +}); +G__14325.cljs$core$IFn$_invoke$arity$variadic = G__14325__delegate; +return G__14325; +})() +;})(o)) +; + +o.error = ((function (o){ +return (function() { +var G__14328__delegate = function (args){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(reagent.debug.warnings,cljs.core.update_in,new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$error], null),cljs.core.conj,cljs.core.array_seq([cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.str,args)], 0)); +}; +var G__14328 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__14329__i = 0, G__14329__a = new Array(arguments.length - 0); +while (G__14329__i < G__14329__a.length) {G__14329__a[G__14329__i] = arguments[G__14329__i + 0]; ++G__14329__i;} + args = new cljs.core.IndexedSeq(G__14329__a,0,null); +} +return G__14328__delegate.call(this,args);}; +G__14328.cljs$lang$maxFixedArity = 0; +G__14328.cljs$lang$applyTo = (function (arglist__14330){ +var args = cljs.core.seq(arglist__14330); +return G__14328__delegate(args); +}); +G__14328.cljs$core$IFn$_invoke$arity$variadic = G__14328__delegate; +return G__14328; +})() +;})(o)) +; + +return o; +})(); +} +reagent.debug.track_warnings = (function reagent$debug$track_warnings(f){ +reagent.debug.tracking = true; + +(cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(reagent.debug.warnings,null) : cljs.core.reset_BANG_.call(null,reagent.debug.warnings,null)); + +(f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); + +var warns = (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(reagent.debug.warnings) : cljs.core.deref.call(null,reagent.debug.warnings)); +(cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(reagent.debug.warnings,null) : cljs.core.reset_BANG_.call(null,reagent.debug.warnings,null)); + +reagent.debug.tracking = false; + +return warns; +}); diff --git a/public/js/rel/reagent/dom.cljs b/public/js/rel/reagent/dom.cljs new file mode 100644 index 0000000..129b859 --- /dev/null +++ b/public/js/rel/reagent/dom.cljs @@ -0,0 +1,80 @@ +(ns reagent.dom + (:require [cljsjs.react.dom] + [reagent.impl.util :as util] + [reagent.impl.template :as tmpl] + [reagent.impl.batching :as batch] + [reagent.ratom :as ratom] + [reagent.debug :refer-macros [dbg]] + [reagent.interop :refer-macros [$ $!]])) + +(defonce ^:private imported nil) + +(defn module [] + (cond + (some? imported) imported + (exists? js/ReactDOM) (set! imported js/ReactDOM) + (exists? js/require) (or (set! imported (js/require "react-dom")) + (throw (js/Error. "require('react-dom') failed"))) + :else + (throw (js/Error. "js/ReactDOM is missing")))) + + +(defonce ^:private roots (atom {})) + +(defn- unmount-comp [container] + (swap! roots dissoc container) + ($ (module) unmountComponentAtNode container)) + +(defn- render-comp [comp container callback] + (binding [util/*always-update* true] + (->> ($ (module) render (comp) container + (fn [] + (binding [util/*always-update* false] + (swap! roots assoc container [comp container]) + (batch/flush-after-render) + (if (some? callback) + (callback)))))))) + +(defn- re-render-component [comp container] + (render-comp comp container nil)) + +(defn render + "Render a Reagent component into the DOM. The first argument may be + either a vector (using Reagent's Hiccup syntax), or a React element. The second argument should be a DOM node. + + Optionally takes a callback that is called when the component is in place. + + Returns the mounted component instance." + ([comp container] + (render comp container nil)) + ([comp container callback] + (ratom/flush!) + (let [f (fn [] + (tmpl/as-element (if (fn? comp) (comp) comp)))] + (render-comp f container callback)))) + +(defn unmount-component-at-node [container] + (unmount-comp container)) + +(defn dom-node + "Returns the root DOM node of a mounted component." + [this] + ($ (module) findDOMNode this)) + +(set! tmpl/find-dom-node dom-node) + +(defn force-update-all + "Force re-rendering of all mounted Reagent components. This is + probably only useful in a development environment, when you want to + update components in response to some dynamic changes to code. + + Note that force-update-all may not update root components. This + happens if a component 'foo' is mounted with `(render [foo])` (since + functions are passed by value, and not by reference, in + ClojureScript). To get around this you'll have to introduce a layer + of indirection, for example by using `(render [#'foo])` instead." + [] + (ratom/flush!) + (doseq [v (vals @roots)] + (apply re-render-component v)) + "Updated") diff --git a/public/js/rel/reagent/dom.js b/public/js/rel/reagent/dom.js new file mode 100644 index 0000000..ec98efd --- /dev/null +++ b/public/js/rel/reagent/dom.js @@ -0,0 +1,206 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.dom'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.impl.util'); +goog.require('reagent.impl.template'); +goog.require('reagent.impl.batching'); +goog.require('reagent.ratom'); +goog.require('reagent.debug'); +goog.require('reagent.interop'); +if(typeof reagent.dom.imported !== 'undefined'){ +} else { +reagent.dom.imported = null; +} +reagent.dom.module = (function reagent$dom$module(){ +if(!((reagent.dom.imported == null))){ +return reagent.dom.imported; +} else { +if(typeof ReactDOM !== 'undefined'){ +return reagent.dom.imported = ReactDOM; +} else { +if(typeof require !== 'undefined'){ +var or__7960__auto__ = reagent.dom.imported = require("react-dom"); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +throw (new Error("require('react-dom') failed")); +} +} else { +throw (new Error("js/ReactDOM is missing")); + +} +} +} +}); +if(typeof reagent.dom.roots !== 'undefined'){ +} else { +reagent.dom.roots = (function (){var G__14839 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__14839) : cljs.core.atom.call(null,G__14839)); +})(); +} +reagent.dom.unmount_comp = (function reagent$dom$unmount_comp(container){ +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(reagent.dom.roots,cljs.core.dissoc,container); + +return (reagent.dom.module()["unmountComponentAtNode"])(container); +}); +reagent.dom.render_comp = (function reagent$dom$render_comp(comp,container,callback){ +var _STAR_always_update_STAR_14842 = reagent.impl.util._STAR_always_update_STAR_; +reagent.impl.util._STAR_always_update_STAR_ = true; + +try{return (reagent.dom.module()["render"])((comp.cljs$core$IFn$_invoke$arity$0 ? comp.cljs$core$IFn$_invoke$arity$0() : comp.call(null)),container,((function (_STAR_always_update_STAR_14842){ +return (function (){ +var _STAR_always_update_STAR_14843 = reagent.impl.util._STAR_always_update_STAR_; +reagent.impl.util._STAR_always_update_STAR_ = false; + +try{cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(reagent.dom.roots,cljs.core.assoc,container,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [comp,container], null)); + +reagent.impl.batching.flush_after_render(); + +if(!((callback == null))){ +return (callback.cljs$core$IFn$_invoke$arity$0 ? callback.cljs$core$IFn$_invoke$arity$0() : callback.call(null)); +} else { +return null; +} +}finally {reagent.impl.util._STAR_always_update_STAR_ = _STAR_always_update_STAR_14843; +}});})(_STAR_always_update_STAR_14842)) +); +}finally {reagent.impl.util._STAR_always_update_STAR_ = _STAR_always_update_STAR_14842; +}}); +reagent.dom.re_render_component = (function reagent$dom$re_render_component(comp,container){ +return reagent.dom.render_comp(comp,container,null); +}); +/** + * Render a Reagent component into the DOM. The first argument may be + * either a vector (using Reagent's Hiccup syntax), or a React element. The second argument should be a DOM node. + * + * Optionally takes a callback that is called when the component is in place. + * + * Returns the mounted component instance. + */ +reagent.dom.render = (function reagent$dom$render(var_args){ +var args14844 = []; +var len__9181__auto___14847 = arguments.length; +var i__9182__auto___14848 = (0); +while(true){ +if((i__9182__auto___14848 < len__9181__auto___14847)){ +args14844.push((arguments[i__9182__auto___14848])); + +var G__14849 = (i__9182__auto___14848 + (1)); +i__9182__auto___14848 = G__14849; +continue; +} else { +} +break; +} + +var G__14846 = args14844.length; +switch (G__14846) { +case 2: +return reagent.dom.render.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +case 3: +return reagent.dom.render.cljs$core$IFn$_invoke$arity$3((arguments[(0)]),(arguments[(1)]),(arguments[(2)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args14844.length)].join(''))); + +} +}); + +reagent.dom.render.cljs$core$IFn$_invoke$arity$2 = (function (comp,container){ +return reagent.dom.render.cljs$core$IFn$_invoke$arity$3(comp,container,null); +}); + +reagent.dom.render.cljs$core$IFn$_invoke$arity$3 = (function (comp,container,callback){ +reagent.ratom.flush_BANG_(); + +var f = (function (){ +return reagent.impl.template.as_element(((cljs.core.fn_QMARK_(comp))?(comp.cljs$core$IFn$_invoke$arity$0 ? comp.cljs$core$IFn$_invoke$arity$0() : comp.call(null)):comp)); +}); +return reagent.dom.render_comp(f,container,callback); +}); + +reagent.dom.render.cljs$lang$maxFixedArity = 3; + +reagent.dom.unmount_component_at_node = (function reagent$dom$unmount_component_at_node(container){ +return reagent.dom.unmount_comp(container); +}); +/** + * Returns the root DOM node of a mounted component. + */ +reagent.dom.dom_node = (function reagent$dom$dom_node(this$){ +return (reagent.dom.module()["findDOMNode"])(this$); +}); +reagent.impl.template.find_dom_node = reagent.dom.dom_node; +/** + * Force re-rendering of all mounted Reagent components. This is + * probably only useful in a development environment, when you want to + * update components in response to some dynamic changes to code. + * + * Note that force-update-all may not update root components. This + * happens if a component 'foo' is mounted with `(render [foo])` (since + * functions are passed by value, and not by reference, in + * ClojureScript). To get around this you'll have to introduce a layer + * of indirection, for example by using `(render [#'foo])` instead. + */ +reagent.dom.force_update_all = (function reagent$dom$force_update_all(){ +reagent.ratom.flush_BANG_(); + +var seq__14855_14859 = cljs.core.seq(cljs.core.vals((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(reagent.dom.roots) : cljs.core.deref.call(null,reagent.dom.roots)))); +var chunk__14856_14860 = null; +var count__14857_14861 = (0); +var i__14858_14862 = (0); +while(true){ +if((i__14858_14862 < count__14857_14861)){ +var v_14863 = chunk__14856_14860.cljs$core$IIndexed$_nth$arity$2(null,i__14858_14862); +cljs.core.apply.cljs$core$IFn$_invoke$arity$2(reagent.dom.re_render_component,v_14863); + +var G__14864 = seq__14855_14859; +var G__14865 = chunk__14856_14860; +var G__14866 = count__14857_14861; +var G__14867 = (i__14858_14862 + (1)); +seq__14855_14859 = G__14864; +chunk__14856_14860 = G__14865; +count__14857_14861 = G__14866; +i__14858_14862 = G__14867; +continue; +} else { +var temp__5278__auto___14868 = cljs.core.seq(seq__14855_14859); +if(temp__5278__auto___14868){ +var seq__14855_14869__$1 = temp__5278__auto___14868; +if(cljs.core.chunked_seq_QMARK_(seq__14855_14869__$1)){ +var c__8871__auto___14870 = cljs.core.chunk_first(seq__14855_14869__$1); +var G__14871 = cljs.core.chunk_rest(seq__14855_14869__$1); +var G__14872 = c__8871__auto___14870; +var G__14873 = cljs.core.count(c__8871__auto___14870); +var G__14874 = (0); +seq__14855_14859 = G__14871; +chunk__14856_14860 = G__14872; +count__14857_14861 = G__14873; +i__14858_14862 = G__14874; +continue; +} else { +var v_14875 = cljs.core.first(seq__14855_14869__$1); +cljs.core.apply.cljs$core$IFn$_invoke$arity$2(reagent.dom.re_render_component,v_14875); + +var G__14876 = cljs.core.next(seq__14855_14869__$1); +var G__14877 = null; +var G__14878 = (0); +var G__14879 = (0); +seq__14855_14859 = G__14876; +chunk__14856_14860 = G__14877; +count__14857_14861 = G__14878; +i__14858_14862 = G__14879; +continue; +} +} else { +} +} +break; +} + +return "Updated"; +}); diff --git a/public/js/rel/reagent/impl/batching.cljs b/public/js/rel/reagent/impl/batching.cljs new file mode 100644 index 0000000..3249049 --- /dev/null +++ b/public/js/rel/reagent/impl/batching.cljs @@ -0,0 +1,113 @@ +(ns reagent.impl.batching + (:refer-clojure :exclude [flush]) + (:require [reagent.debug :refer-macros [dbg]] + [reagent.interop :refer-macros [$ $!]] + [reagent.impl.util :refer [is-client]] + [clojure.string :as string])) + +;;; Update batching + +(defonce mount-count 0) + +(defn next-mount-count [] + (set! mount-count (inc mount-count))) + +(defn fake-raf [f] + (js/setTimeout f 16)) + +(def next-tick + (if-not is-client + fake-raf + (let [w js/window] + (or ($ w :requestAnimationFrame) + ($ w :webkitRequestAnimationFrame) + ($ w :mozRequestAnimationFrame) + ($ w :msRequestAnimationFrame) + fake-raf)))) + +(defn compare-mount-order [c1 c2] + (- ($ c1 :cljsMountOrder) + ($ c2 :cljsMountOrder))) + +(defn run-queue [a] + ;; sort components by mount order, to make sure parents + ;; are rendered before children + (.sort a compare-mount-order) + (dotimes [i (alength a)] + (let [c (aget a i)] + (when (true? ($ c :cljsIsDirty)) + ($ c forceUpdate))))) + + +;; Set from ratom.cljs +(defonce ratom-flush (fn [])) + +(deftype RenderQueue [^:mutable ^boolean scheduled?] + Object + (enqueue [this k f] + (assert (some? f)) + (when (nil? (aget this k)) + (aset this k (array))) + (.push (aget this k) f) + (.schedule this)) + + (run-funs [this k] + (when-some [fs (aget this k)] + (aset this k nil) + (dotimes [i (alength fs)] + ((aget fs i))))) + + (schedule [this] + (when-not scheduled? + (set! scheduled? true) + (next-tick #(.run-queues this)))) + + (queue-render [this c] + (.enqueue this "componentQueue" c)) + + (add-before-flush [this f] + (.enqueue this "beforeFlush" f)) + + (add-after-render [this f] + (.enqueue this "afterRender" f)) + + (run-queues [this] + (set! scheduled? false) + (.flush-queues this)) + + (flush-after-render [this] + (.run-funs this "afterRender")) + + (flush-queues [this] + (.run-funs this "beforeFlush") + (ratom-flush) + (when-some [cs (aget this "componentQueue")] + (aset this "componentQueue" nil) + (run-queue cs)) + (.flush-after-render this))) + +(defonce render-queue (->RenderQueue false)) + +(defn flush [] + (.flush-queues render-queue)) + +(defn flush-after-render [] + (.flush-after-render render-queue)) + +(defn queue-render [c] + (when-not ($ c :cljsIsDirty) + ($! c :cljsIsDirty true) + (.queue-render render-queue c))) + +(defn mark-rendered [c] + ($! c :cljsIsDirty false)) + +(defn do-before-flush [f] + (.add-before-flush render-queue f)) + +(defn do-after-render [f] + (.add-after-render render-queue f)) + +(defn schedule [] + (when (false? (.-scheduled? render-queue)) + (.schedule render-queue))) diff --git a/public/js/rel/reagent/impl/batching.js b/public/js/rel/reagent/impl/batching.js new file mode 100644 index 0000000..db6855d --- /dev/null +++ b/public/js/rel/reagent/impl/batching.js @@ -0,0 +1,244 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.impl.batching'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.debug'); +goog.require('reagent.interop'); +goog.require('reagent.impl.util'); +goog.require('clojure.string'); +if(typeof reagent.impl.batching.mount_count !== 'undefined'){ +} else { +reagent.impl.batching.mount_count = (0); +} +reagent.impl.batching.next_mount_count = (function reagent$impl$batching$next_mount_count(){ +return reagent.impl.batching.mount_count = (reagent.impl.batching.mount_count + (1)); +}); +reagent.impl.batching.fake_raf = (function reagent$impl$batching$fake_raf(f){ +return setTimeout(f,(16)); +}); +reagent.impl.batching.next_tick = ((!(reagent.impl.util.is_client))?reagent.impl.batching.fake_raf:(function (){var w = window; +var or__7960__auto__ = (w["requestAnimationFrame"]); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (w["webkitRequestAnimationFrame"]); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var or__7960__auto____$2 = (w["mozRequestAnimationFrame"]); +if(cljs.core.truth_(or__7960__auto____$2)){ +return or__7960__auto____$2; +} else { +var or__7960__auto____$3 = (w["msRequestAnimationFrame"]); +if(cljs.core.truth_(or__7960__auto____$3)){ +return or__7960__auto____$3; +} else { +return reagent.impl.batching.fake_raf; +} +} +} +} +})()); +reagent.impl.batching.compare_mount_order = (function reagent$impl$batching$compare_mount_order(c1,c2){ +return ((c1["cljsMountOrder"]) - (c2["cljsMountOrder"])); +}); +reagent.impl.batching.run_queue = (function reagent$impl$batching$run_queue(a){ +a.sort(reagent.impl.batching.compare_mount_order); + +var n__8981__auto__ = a.length; +var i = (0); +while(true){ +if((i < n__8981__auto__)){ +var c_14417 = (a[i]); +if((c_14417["cljsIsDirty"]) === true){ +(c_14417["forceUpdate"])(); +} else { +} + +var G__14418 = (i + (1)); +i = G__14418; +continue; +} else { +return null; +} +break; +} +}); +if(typeof reagent.impl.batching.ratom_flush !== 'undefined'){ +} else { +reagent.impl.batching.ratom_flush = (function reagent$impl$batching$ratom_flush(){ +return null; +}); +} + +/** +* @constructor + * @implements {reagent.impl.batching.Object} +*/ +reagent.impl.batching.RenderQueue = (function (scheduled_QMARK_){ +this.scheduled_QMARK_ = scheduled_QMARK_; +}) +reagent.impl.batching.RenderQueue.prototype.run_funs = (function (k){ +var self__ = this; +var this$ = this; +var temp__5282__auto__ = (this$[k]); +if((temp__5282__auto__ == null)){ +return null; +} else { +var fs = temp__5282__auto__; +(this$[k] = null); + +var n__8981__auto__ = fs.length; +var i = (0); +while(true){ +if((i < n__8981__auto__)){ +(fs[i]).call(null); + +var G__14420 = (i + (1)); +i = G__14420; +continue; +} else { +return null; +} +break; +} +} +}); + +reagent.impl.batching.RenderQueue.prototype.flush_after_render = (function (){ +var self__ = this; +var this$ = this; +return this$.run_funs("afterRender"); +}); + +reagent.impl.batching.RenderQueue.prototype.queue_render = (function (c){ +var self__ = this; +var this$ = this; +return this$.enqueue("componentQueue",c); +}); + +reagent.impl.batching.RenderQueue.prototype.schedule = (function (){ +var self__ = this; +var this$ = this; +if(self__.scheduled_QMARK_){ +return null; +} else { +self__.scheduled_QMARK_ = true; + +var G__14419 = ((function (this$){ +return (function (){ +return this$.run_queues(); +});})(this$)) +; +return (reagent.impl.batching.next_tick.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.batching.next_tick.cljs$core$IFn$_invoke$arity$1(G__14419) : reagent.impl.batching.next_tick.call(null,G__14419)); +} +}); + +reagent.impl.batching.RenderQueue.prototype.flush_queues = (function (){ +var self__ = this; +var this$ = this; +this$.run_funs("beforeFlush"); + +reagent.impl.batching.ratom_flush(); + +var temp__5282__auto___14421 = (this$["componentQueue"]); +if((temp__5282__auto___14421 == null)){ +} else { +var cs_14422 = temp__5282__auto___14421; +(this$["componentQueue"] = null); + +reagent.impl.batching.run_queue(cs_14422); +} + +return this$.flush_after_render(); +}); + +reagent.impl.batching.RenderQueue.prototype.run_queues = (function (){ +var self__ = this; +var this$ = this; +self__.scheduled_QMARK_ = false; + +return this$.flush_queues(); +}); + +reagent.impl.batching.RenderQueue.prototype.enqueue = (function (k,f){ +var self__ = this; +var this$ = this; +if(!((f == null))){ +} else { +throw (new Error("Assert failed: (some? f)")); +} + +if(((this$[k]) == null)){ +(this$[k] = []); +} else { +} + +(this$[k]).push(f); + +return this$.schedule(); +}); + +reagent.impl.batching.RenderQueue.prototype.add_before_flush = (function (f){ +var self__ = this; +var this$ = this; +return this$.enqueue("beforeFlush",f); +}); + +reagent.impl.batching.RenderQueue.prototype.add_after_render = (function (f){ +var self__ = this; +var this$ = this; +return this$.enqueue("afterRender",f); +}); + +reagent.impl.batching.RenderQueue.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$scheduled_QMARK_,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean,cljs.core.cst$kw$mutable,true], null))], null); +}); + +reagent.impl.batching.RenderQueue.cljs$lang$type = true; + +reagent.impl.batching.RenderQueue.cljs$lang$ctorStr = "reagent.impl.batching/RenderQueue"; + +reagent.impl.batching.RenderQueue.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.impl.batching/RenderQueue"); +}); + +reagent.impl.batching.__GT_RenderQueue = (function reagent$impl$batching$__GT_RenderQueue(scheduled_QMARK_){ +return (new reagent.impl.batching.RenderQueue(scheduled_QMARK_)); +}); + +if(typeof reagent.impl.batching.render_queue !== 'undefined'){ +} else { +reagent.impl.batching.render_queue = reagent.impl.batching.__GT_RenderQueue(false); +} +reagent.impl.batching.flush = (function reagent$impl$batching$flush(){ +return reagent.impl.batching.render_queue.flush_queues(); +}); +reagent.impl.batching.flush_after_render = (function reagent$impl$batching$flush_after_render(){ +return reagent.impl.batching.render_queue.flush_after_render(); +}); +reagent.impl.batching.queue_render = (function reagent$impl$batching$queue_render(c){ +if(cljs.core.truth_((c["cljsIsDirty"]))){ +return null; +} else { +(c["cljsIsDirty"] = true); + +return reagent.impl.batching.render_queue.queue_render(c); +} +}); +reagent.impl.batching.mark_rendered = (function reagent$impl$batching$mark_rendered(c){ +return (c["cljsIsDirty"] = false); +}); +reagent.impl.batching.do_before_flush = (function reagent$impl$batching$do_before_flush(f){ +return reagent.impl.batching.render_queue.add_before_flush(f); +}); +reagent.impl.batching.do_after_render = (function reagent$impl$batching$do_after_render(f){ +return reagent.impl.batching.render_queue.add_after_render(f); +}); +reagent.impl.batching.schedule = (function reagent$impl$batching$schedule(){ +if(reagent.impl.batching.render_queue.scheduled_QMARK_ === false){ +return reagent.impl.batching.render_queue.schedule(); +} else { +return null; +} +}); diff --git a/public/js/rel/reagent/impl/component.cljs b/public/js/rel/reagent/impl/component.cljs new file mode 100644 index 0000000..f81f953 --- /dev/null +++ b/public/js/rel/reagent/impl/component.cljs @@ -0,0 +1,317 @@ +(ns reagent.impl.component + (:require [reagent.impl.util :as util] + [reagent.impl.batching :as batch] + [reagent.ratom :as ratom] + [reagent.interop :refer-macros [$ $!]] + [reagent.debug :refer-macros [dbg prn dev? warn error warn-unless]])) + +(declare ^:dynamic *current-component*) + + +;;; Argv access + +(defn shallow-obj-to-map [o] + (let [ks (js-keys o) + len (alength ks)] + (loop [m {} i 0] + (if (< i len) + (let [k (aget ks i)] + (recur (assoc m (keyword k) (aget o k)) (inc i))) + m)))) + +(defn extract-props [v] + (let [p (nth v 1 nil)] + (if (map? p) p))) + +(defn extract-children [v] + (let [p (nth v 1 nil) + first-child (if (or (nil? p) (map? p)) 2 1)] + (if (> (count v) first-child) + (subvec v first-child)))) + +(defn props-argv [c p] + (if-some [a ($ p :argv)] + a + [(.-constructor c) (shallow-obj-to-map p)])) + +(defn get-argv [c] + (props-argv c ($ c :props))) + +(defn get-props [c] + (let [p ($ c :props)] + (if-some [v ($ p :argv)] + (extract-props v) + (shallow-obj-to-map p)))) + +(defn get-children [c] + (let [p ($ c :props)] + (if-some [v ($ p :argv)] + (extract-children v) + (->> ($ p :children) + ($ util/react Children.toArray) + (into []))))) + +(defn ^boolean reagent-class? [c] + (and (fn? c) + (some? (some-> c .-prototype ($ :reagentRender))))) + +(defn ^boolean react-class? [c] + (and (fn? c) + (some? (some-> c .-prototype ($ :render))))) + +(defn ^boolean reagent-component? [c] + (some? ($ c :reagentRender))) + +(defn cached-react-class [c] + ($ c :cljsReactClass)) + +(defn cache-react-class [c constructor] + ($! c :cljsReactClass constructor)) + + +;;; State + +(defn state-atom [this] + (let [sa ($ this :cljsState)] + (if-not (nil? sa) + sa + ($! this :cljsState (ratom/atom nil))))) + +;; avoid circular dependency: this gets set from template.cljs +(defonce as-element nil) + + +;;; Rendering + +(defn wrap-render [c] + (let [f ($ c :reagentRender) + _ (assert (ifn? f)) + res (if (true? ($ c :cljsLegacyRender)) + (.call f c c) + (let [v (get-argv c) + n (count v)] + (case n + 1 (.call f c) + 2 (.call f c (nth v 1)) + 3 (.call f c (nth v 1) (nth v 2)) + 4 (.call f c (nth v 1) (nth v 2) (nth v 3)) + 5 (.call f c (nth v 1) (nth v 2) (nth v 3) (nth v 4)) + (.apply f c (.slice (into-array v) 1)))))] + (cond + (vector? res) (as-element res) + (ifn? res) (let [f (if (reagent-class? res) + (fn [& args] + (as-element (apply vector res args))) + res)] + ($! c :reagentRender f) + (recur c)) + :else res))) + +(declare comp-name) + +(defn do-render [c] + (binding [*current-component* c] + (if (dev?) + ;; Log errors, without using try/catch (and mess up call stack) + (let [ok (array false)] + (try + (let [res (wrap-render c)] + (aset ok 0 true) + res) + (finally + (when-not (aget ok 0) + (error (str "Error rendering component" + (comp-name))))))) + (wrap-render c)))) + + +;;; Method wrapping + +(def rat-opts {:no-cache true}) + +(def static-fns + {:render + (fn render [] + (this-as c (if util/*non-reactive* + (do-render c) + (let [rat ($ c :cljsRatom)] + (batch/mark-rendered c) + (if (nil? rat) + (ratom/run-in-reaction #(do-render c) c "cljsRatom" + batch/queue-render rat-opts) + (._run rat false))))))}) + +(defn custom-wrapper [key f] + (case key + :getDefaultProps + (throw (js/Error. "getDefaultProps not supported")) + + :getInitialState + (fn getInitialState [] + (this-as c (reset! (state-atom c) (.call f c c)))) + + :componentWillReceiveProps + (fn componentWillReceiveProps [nextprops] + (this-as c (.call f c c (props-argv c nextprops)))) + + :shouldComponentUpdate + (fn shouldComponentUpdate [nextprops nextstate] + (or util/*always-update* + (this-as c + ;; Don't care about nextstate here, we use forceUpdate + ;; when only when state has changed anyway. + (let [old-argv ($ c :props.argv) + new-argv ($ nextprops :argv) + noargv (or (nil? old-argv) (nil? new-argv))] + (cond + (nil? f) (or noargv (not= old-argv new-argv)) + noargv (.call f c c (get-argv c) (props-argv c nextprops)) + :else (.call f c c old-argv new-argv)))))) + + :componentWillUpdate + (fn componentWillUpdate [nextprops] + (this-as c (.call f c c (props-argv c nextprops)))) + + :componentDidUpdate + (fn componentDidUpdate [oldprops] + (this-as c (.call f c c (props-argv c oldprops)))) + + :componentWillMount + (fn componentWillMount [] + (this-as c + ($! c :cljsMountOrder (batch/next-mount-count)) + (when-not (nil? f) + (.call f c c)))) + + :componentDidMount + (fn componentDidMount [] + (this-as c (.call f c c))) + + :componentWillUnmount + (fn componentWillUnmount [] + (this-as c + (some-> ($ c :cljsRatom) + ratom/dispose!) + (batch/mark-rendered c) + (when-not (nil? f) + (.call f c c)))) + + nil)) + +(defn get-wrapper [key f name] + (let [wrap (custom-wrapper key f)] + (when (and wrap f) + (assert (ifn? f) + (str "Expected function in " name key " but got " f))) + (or wrap f))) + +(def obligatory {:shouldComponentUpdate nil + :componentWillMount nil + :componentWillUnmount nil}) + +(def dash-to-camel (util/memoize-1 util/dash-to-camel)) + +(defn camelify-map-keys [fun-map] + (reduce-kv (fn [m k v] + (assoc m (-> k dash-to-camel keyword) v)) + {} fun-map)) + +(defn add-obligatory [fun-map] + (merge obligatory fun-map)) + +(defn wrap-funs [fmap] + (when (dev?) + (let [renders (select-keys fmap [:render :reagentRender :componentFunction]) + render-fun (-> renders vals first)] + (assert (pos? (count renders)) "Missing reagent-render") + (assert (== 1 (count renders)) "Too many render functions supplied") + (assert (ifn? render-fun) (str "Render must be a function, not " + (pr-str render-fun))))) + (let [render-fun (or (:reagentRender fmap) + (:componentFunction fmap)) + legacy-render (nil? render-fun) + render-fun (or render-fun + (:render fmap)) + name (str (or (:displayName fmap) + (util/fun-name render-fun))) + name (case name + "" (str (gensym "reagent")) + name) + fmap (reduce-kv (fn [m k v] + (assoc m k (get-wrapper k v name))) + {} fmap)] + (assoc fmap + :displayName name + :autobind false + :cljsLegacyRender legacy-render + :reagentRender render-fun + :render (:render static-fns)))) + +(defn map-to-js [m] + (reduce-kv (fn [o k v] + (doto o + (aset (name k) v))) + #js{} m)) + +(defn cljsify [body] + (-> body + camelify-map-keys + add-obligatory + wrap-funs + map-to-js)) + +(defn create-class [body] + {:pre [(map? body)]} + (->> body + cljsify + ($ util/react createClass))) + +(defn component-path [c] + (let [elem (some-> (or (some-> c ($ :_reactInternalInstance)) + c) + ($ :_currentElement)) + name (some-> elem + ($ :type) + ($ :displayName)) + path (some-> elem + ($ :_owner) + component-path + (str " > ")) + res (str path name)] + (when-not (empty? res) res))) + +(defn comp-name [] + (if (dev?) + (let [c *current-component* + n (or (component-path c) + (some-> c .-constructor util/fun-name))] + (if-not (empty? n) + (str " (in " n ")") + "")) + "")) + +(defn fn-to-class [f] + (assert (ifn? f) (str "Expected a function, not " (pr-str f))) + (warn-unless (not (and (react-class? f) + (not (reagent-class? f)))) + "Using native React classes directly in Hiccup forms " + "is not supported. Use create-element or " + "adapt-react-class instead: " (let [n (util/fun-name f)] + (if (empty? n) f n)) + (comp-name)) + (if (reagent-class? f) + (cache-react-class f f) + (let [spec (meta f) + withrender (assoc spec :reagent-render f) + res (create-class withrender)] + (cache-react-class f res)))) + +(defn as-class [tag] + (if-some [cached-class (cached-react-class tag)] + cached-class + (fn-to-class tag))) + +(defn reactify-component [comp] + (if (react-class? comp) + comp + (as-class comp))) diff --git a/public/js/rel/reagent/impl/component.js b/public/js/rel/reagent/impl/component.js new file mode 100644 index 0000000..b141a42 --- /dev/null +++ b/public/js/rel/reagent/impl/component.js @@ -0,0 +1,575 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.impl.component'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.impl.util'); +goog.require('reagent.impl.batching'); +goog.require('reagent.ratom'); +goog.require('reagent.interop'); +goog.require('reagent.debug'); +reagent.impl.component.shallow_obj_to_map = (function reagent$impl$component$shallow_obj_to_map(o){ +var ks = cljs.core.js_keys(o); +var len = ks.length; +var m = cljs.core.PersistentArrayMap.EMPTY; +var i = (0); +while(true){ +if((i < len)){ +var k = (ks[i]); +var G__14696 = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(k),(o[k])); +var G__14697 = (i + (1)); +m = G__14696; +i = G__14697; +continue; +} else { +return m; +} +break; +} +}); +reagent.impl.component.extract_props = (function reagent$impl$component$extract_props(v){ +var p = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(v,(1),null); +if(cljs.core.map_QMARK_(p)){ +return p; +} else { +return null; +} +}); +reagent.impl.component.extract_children = (function reagent$impl$component$extract_children(v){ +var p = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(v,(1),null); +var first_child = ((((p == null)) || (cljs.core.map_QMARK_(p)))?(2):(1)); +if((cljs.core.count(v) > first_child)){ +return cljs.core.subvec.cljs$core$IFn$_invoke$arity$2(v,first_child); +} else { +return null; +} +}); +reagent.impl.component.props_argv = (function reagent$impl$component$props_argv(c,p){ +var temp__5280__auto__ = (p["argv"]); +if((temp__5280__auto__ == null)){ +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c.constructor,reagent.impl.component.shallow_obj_to_map(p)], null); +} else { +var a = temp__5280__auto__; +return a; +} +}); +reagent.impl.component.get_argv = (function reagent$impl$component$get_argv(c){ +return reagent.impl.component.props_argv(c,(c["props"])); +}); +reagent.impl.component.get_props = (function reagent$impl$component$get_props(c){ +var p = (c["props"]); +var temp__5280__auto__ = (p["argv"]); +if((temp__5280__auto__ == null)){ +return reagent.impl.component.shallow_obj_to_map(p); +} else { +var v = temp__5280__auto__; +return reagent.impl.component.extract_props(v); +} +}); +reagent.impl.component.get_children = (function reagent$impl$component$get_children(c){ +var p = (c["props"]); +var temp__5280__auto__ = (p["argv"]); +if((temp__5280__auto__ == null)){ +return cljs.core.into.cljs$core$IFn$_invoke$arity$2(cljs.core.PersistentVector.EMPTY,(reagent.impl.util.react["Children"]["toArray"])((p["children"]))); +} else { +var v = temp__5280__auto__; +return reagent.impl.component.extract_children(v); +} +}); +reagent.impl.component.reagent_class_QMARK_ = (function reagent$impl$component$reagent_class_QMARK_(c){ +return (cljs.core.fn_QMARK_(c)) && (!(((function (){var G__14701 = c; +var G__14701__$1 = (((G__14701 == null))?null:G__14701.prototype); +if((G__14701__$1 == null)){ +return null; +} else { +return (G__14701__$1["reagentRender"]); +} +})() == null))); +}); +reagent.impl.component.react_class_QMARK_ = (function reagent$impl$component$react_class_QMARK_(c){ +return (cljs.core.fn_QMARK_(c)) && (!(((function (){var G__14705 = c; +var G__14705__$1 = (((G__14705 == null))?null:G__14705.prototype); +if((G__14705__$1 == null)){ +return null; +} else { +return (G__14705__$1["render"]); +} +})() == null))); +}); +reagent.impl.component.reagent_component_QMARK_ = (function reagent$impl$component$reagent_component_QMARK_(c){ +return !(((c["reagentRender"]) == null)); +}); +reagent.impl.component.cached_react_class = (function reagent$impl$component$cached_react_class(c){ +return (c["cljsReactClass"]); +}); +reagent.impl.component.cache_react_class = (function reagent$impl$component$cache_react_class(c,constructor$){ +return (c["cljsReactClass"] = constructor$); +}); +reagent.impl.component.state_atom = (function reagent$impl$component$state_atom(this$){ +var sa = (this$["cljsState"]); +if(!((sa == null))){ +return sa; +} else { +return (this$["cljsState"] = reagent.ratom.atom.cljs$core$IFn$_invoke$arity$1(null)); +} +}); +if(typeof reagent.impl.component.as_element !== 'undefined'){ +} else { +reagent.impl.component.as_element = null; +} +reagent.impl.component.wrap_render = (function reagent$impl$component$wrap_render(c){ +while(true){ +var f = (c["reagentRender"]); +var _ = ((cljs.core.ifn_QMARK_(f))?null:(function(){throw (new Error("Assert failed: (ifn? f)"))})()); +var res = (((c["cljsLegacyRender"]) === true)?f.call(c,c):(function (){var v = reagent.impl.component.get_argv(c); +var n = cljs.core.count(v); +var G__14708 = n; +switch (G__14708) { +case (1): +return f.call(c); + +break; +case (2): +return f.call(c,cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1))); + +break; +case (3): +return f.call(c,cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(2))); + +break; +case (4): +return f.call(c,cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(2)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(3))); + +break; +case (5): +return f.call(c,cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(1)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(2)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(3)),cljs.core.nth.cljs$core$IFn$_invoke$arity$2(v,(4))); + +break; +default: +return f.apply(c,cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(v).slice((1))); + +} +})()); +if(cljs.core.vector_QMARK_(res)){ +return (reagent.impl.component.as_element.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.component.as_element.cljs$core$IFn$_invoke$arity$1(res) : reagent.impl.component.as_element.call(null,res)); +} else { +if(cljs.core.ifn_QMARK_(res)){ +var f__$1 = ((reagent.impl.component.reagent_class_QMARK_(res))?((function (c,f,_,res){ +return (function() { +var G__14711__delegate = function (args){ +var G__14709 = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.vector,res,args); +return (reagent.impl.component.as_element.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.component.as_element.cljs$core$IFn$_invoke$arity$1(G__14709) : reagent.impl.component.as_element.call(null,G__14709)); +}; +var G__14711 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__14712__i = 0, G__14712__a = new Array(arguments.length - 0); +while (G__14712__i < G__14712__a.length) {G__14712__a[G__14712__i] = arguments[G__14712__i + 0]; ++G__14712__i;} + args = new cljs.core.IndexedSeq(G__14712__a,0,null); +} +return G__14711__delegate.call(this,args);}; +G__14711.cljs$lang$maxFixedArity = 0; +G__14711.cljs$lang$applyTo = (function (arglist__14713){ +var args = cljs.core.seq(arglist__14713); +return G__14711__delegate(args); +}); +G__14711.cljs$core$IFn$_invoke$arity$variadic = G__14711__delegate; +return G__14711; +})() +;})(c,f,_,res)) +:res); +(c["reagentRender"] = f__$1); + +var G__14714 = c; +c = G__14714; +continue; +} else { +return res; + +} +} +break; +} +}); +reagent.impl.component.do_render = (function reagent$impl$component$do_render(c){ +var _STAR_current_component_STAR_14716 = reagent.impl.component._STAR_current_component_STAR_; +reagent.impl.component._STAR_current_component_STAR_ = c; + +try{var ok = [false]; +try{var res = reagent.impl.component.wrap_render(c); +(ok[(0)] = true); + +return res; +}finally {if(cljs.core.truth_((ok[(0)]))){ +} else { +if(cljs.core.truth_(reagent.debug.has_console)){ +(cljs.core.truth_(reagent.debug.tracking)?reagent.debug.track_console:console).error([cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Error rendering component"),cljs.core.str.cljs$core$IFn$_invoke$arity$1((reagent.impl.component.comp_name.cljs$core$IFn$_invoke$arity$0 ? reagent.impl.component.comp_name.cljs$core$IFn$_invoke$arity$0() : reagent.impl.component.comp_name.call(null)))].join(''))].join('')); +} else { +} +} +} +}finally {reagent.impl.component._STAR_current_component_STAR_ = _STAR_current_component_STAR_14716; +}}); +reagent.impl.component.rat_opts = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$no_DASH_cache,true], null); +reagent.impl.component.static_fns = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$render,(function reagent$impl$component$render(){ +var c = this; +if(reagent.impl.util._STAR_non_reactive_STAR_){ +return reagent.impl.component.do_render(c); +} else { +var rat = (c["cljsRatom"]); +reagent.impl.batching.mark_rendered(c); + +if((rat == null)){ +return reagent.ratom.run_in_reaction(((function (rat,c){ +return (function (){ +return reagent.impl.component.do_render(c); +});})(rat,c)) +,c,"cljsRatom",reagent.impl.batching.queue_render,reagent.impl.component.rat_opts); +} else { +return rat._run(false); +} +} +})], null); +reagent.impl.component.custom_wrapper = (function reagent$impl$component$custom_wrapper(key,f){ +var G__14724 = key; +var G__14724__$1 = (((G__14724 instanceof cljs.core.Keyword))?G__14724.fqn:null); +switch (G__14724__$1) { +case "getDefaultProps": +throw (new Error("getDefaultProps not supported")); + +break; +case "getInitialState": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_getInitialState(){ +var c = this; +var G__14727 = reagent.impl.component.state_atom(c); +var G__14728 = f.call(c,c); +return (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(G__14727,G__14728) : cljs.core.reset_BANG_.call(null,G__14727,G__14728)); +}); +;})(G__14724,G__14724__$1)) + +break; +case "componentWillReceiveProps": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_componentWillReceiveProps(nextprops){ +var c = this; +return f.call(c,c,reagent.impl.component.props_argv(c,nextprops)); +}); +;})(G__14724,G__14724__$1)) + +break; +case "shouldComponentUpdate": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_shouldComponentUpdate(nextprops,nextstate){ +var or__7960__auto__ = reagent.impl.util._STAR_always_update_STAR_; +if(or__7960__auto__){ +return or__7960__auto__; +} else { +var c = this; +var old_argv = (c["props"]["argv"]); +var new_argv = (nextprops["argv"]); +var noargv = ((old_argv == null)) || ((new_argv == null)); +if((f == null)){ +return (noargv) || (cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(old_argv,new_argv)); +} else { +if(noargv){ +return f.call(c,c,reagent.impl.component.get_argv(c),reagent.impl.component.props_argv(c,nextprops)); +} else { +return f.call(c,c,old_argv,new_argv); + +} +} +} +}); +;})(G__14724,G__14724__$1)) + +break; +case "componentWillUpdate": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_componentWillUpdate(nextprops){ +var c = this; +return f.call(c,c,reagent.impl.component.props_argv(c,nextprops)); +}); +;})(G__14724,G__14724__$1)) + +break; +case "componentDidUpdate": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_componentDidUpdate(oldprops){ +var c = this; +return f.call(c,c,reagent.impl.component.props_argv(c,oldprops)); +}); +;})(G__14724,G__14724__$1)) + +break; +case "componentWillMount": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_componentWillMount(){ +var c = this; +(c["cljsMountOrder"] = reagent.impl.batching.next_mount_count()); + +if((f == null)){ +return null; +} else { +return f.call(c,c); +} +}); +;})(G__14724,G__14724__$1)) + +break; +case "componentDidMount": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_componentDidMount(){ +var c = this; +return f.call(c,c); +}); +;})(G__14724,G__14724__$1)) + +break; +case "componentWillUnmount": +return ((function (G__14724,G__14724__$1){ +return (function reagent$impl$component$custom_wrapper_$_componentWillUnmount(){ +var c = this; +var G__14730_14732 = (c["cljsRatom"]); +if((G__14730_14732 == null)){ +} else { +reagent.ratom.dispose_BANG_(G__14730_14732); +} + +reagent.impl.batching.mark_rendered(c); + +if((f == null)){ +return null; +} else { +return f.call(c,c); +} +}); +;})(G__14724,G__14724__$1)) + +break; +default: +return null; + +} +}); +reagent.impl.component.get_wrapper = (function reagent$impl$component$get_wrapper(key,f,name){ +var wrap = reagent.impl.component.custom_wrapper(key,f); +if(cljs.core.truth_((function (){var and__7948__auto__ = wrap; +if(cljs.core.truth_(and__7948__auto__)){ +return f; +} else { +return and__7948__auto__; +} +})())){ +if(cljs.core.ifn_QMARK_(f)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Expected function in "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(name),cljs.core.str.cljs$core$IFn$_invoke$arity$1(key),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" but got "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(f)].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(ifn? f)")].join(''))); +} +} else { +} + +var or__7960__auto__ = wrap; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return f; +} +}); +reagent.impl.component.obligatory = new cljs.core.PersistentArrayMap(null, 3, [cljs.core.cst$kw$shouldComponentUpdate,null,cljs.core.cst$kw$componentWillMount,null,cljs.core.cst$kw$componentWillUnmount,null], null); +reagent.impl.component.dash_to_camel = reagent.impl.util.memoize_1(reagent.impl.util.dash_to_camel); +reagent.impl.component.camelify_map_keys = (function reagent$impl$component$camelify_map_keys(fun_map){ +return cljs.core.reduce_kv((function (m,k,v){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,cljs.core.keyword.cljs$core$IFn$_invoke$arity$1((reagent.impl.component.dash_to_camel.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.component.dash_to_camel.cljs$core$IFn$_invoke$arity$1(k) : reagent.impl.component.dash_to_camel.call(null,k))),v); +}),cljs.core.PersistentArrayMap.EMPTY,fun_map); +}); +reagent.impl.component.add_obligatory = (function reagent$impl$component$add_obligatory(fun_map){ +return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([reagent.impl.component.obligatory,fun_map], 0)); +}); +reagent.impl.component.wrap_funs = (function reagent$impl$component$wrap_funs(fmap){ +var renders_14735 = cljs.core.select_keys(fmap,new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$render,cljs.core.cst$kw$reagentRender,cljs.core.cst$kw$componentFunction], null)); +var render_fun_14736 = cljs.core.first(cljs.core.vals(renders_14735)); +if((cljs.core.count(renders_14735) > (0))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("Missing reagent-render"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(pos? (count renders))")].join(''))); +} + +if(((1) === cljs.core.count(renders_14735))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("Too many render functions supplied"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(== 1 (count renders))")].join(''))); +} + +if(cljs.core.ifn_QMARK_(render_fun_14736)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Render must be a function, not "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([render_fun_14736], 0)))].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(ifn? render-fun)")].join(''))); +} + + +var render_fun = (function (){var or__7960__auto__ = cljs.core.cst$kw$reagentRender.cljs$core$IFn$_invoke$arity$1(fmap); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.cst$kw$componentFunction.cljs$core$IFn$_invoke$arity$1(fmap); +} +})(); +var legacy_render = (render_fun == null); +var render_fun__$1 = (function (){var or__7960__auto__ = render_fun; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.cst$kw$render.cljs$core$IFn$_invoke$arity$1(fmap); +} +})(); +var name = [cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var or__7960__auto__ = cljs.core.cst$kw$displayName.cljs$core$IFn$_invoke$arity$1(fmap); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return reagent.impl.util.fun_name(render_fun__$1); +} +})())].join(''); +var name__$1 = (function (){var G__14734 = name; +switch (G__14734) { +case "": +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.gensym.cljs$core$IFn$_invoke$arity$1("reagent"))].join(''); + +break; +default: +return name; + +} +})(); +var fmap__$1 = cljs.core.reduce_kv(((function (render_fun,legacy_render,render_fun__$1,name,name__$1){ +return (function (m,k,v){ +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,k,reagent.impl.component.get_wrapper(k,v,name__$1)); +});})(render_fun,legacy_render,render_fun__$1,name,name__$1)) +,cljs.core.PersistentArrayMap.EMPTY,fmap); +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$variadic(fmap__$1,cljs.core.cst$kw$displayName,name__$1,cljs.core.array_seq([cljs.core.cst$kw$autobind,false,cljs.core.cst$kw$cljsLegacyRender,legacy_render,cljs.core.cst$kw$reagentRender,render_fun__$1,cljs.core.cst$kw$render,cljs.core.cst$kw$render.cljs$core$IFn$_invoke$arity$1(reagent.impl.component.static_fns)], 0)); +}); +reagent.impl.component.map_to_js = (function reagent$impl$component$map_to_js(m){ +return cljs.core.reduce_kv((function (o,k,v){ +var G__14739 = o; +(G__14739[cljs.core.name(k)] = v); + +return G__14739; +}),({}),m); +}); +reagent.impl.component.cljsify = (function reagent$impl$component$cljsify(body){ +return reagent.impl.component.map_to_js(reagent.impl.component.wrap_funs(reagent.impl.component.add_obligatory(reagent.impl.component.camelify_map_keys(body)))); +}); +reagent.impl.component.create_class = (function reagent$impl$component$create_class(body){ +if(cljs.core.map_QMARK_(body)){ +} else { +throw (new Error("Assert failed: (map? body)")); +} + +return (reagent.impl.util.react["createClass"])(reagent.impl.component.cljsify(body)); +}); +reagent.impl.component.component_path = (function reagent$impl$component$component_path(c){ +var elem = (function (){var G__14745 = (function (){var or__7960__auto__ = (function (){var G__14747 = c; +if((G__14747 == null)){ +return null; +} else { +return (G__14747["_reactInternalInstance"]); +} +})(); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return c; +} +})(); +if((G__14745 == null)){ +return null; +} else { +return (G__14745["_currentElement"]); +} +})(); +var name = (function (){var G__14748 = elem; +var G__14748__$1 = (((G__14748 == null))?null:(G__14748["type"])); +if((G__14748__$1 == null)){ +return null; +} else { +return (G__14748__$1["displayName"]); +} +})(); +var path = (function (){var G__14749 = elem; +var G__14749__$1 = (((G__14749 == null))?null:(G__14749["_owner"])); +var G__14749__$2 = (((G__14749__$1 == null))?null:(reagent.impl.component.component_path.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.component.component_path.cljs$core$IFn$_invoke$arity$1(G__14749__$1) : reagent.impl.component.component_path.call(null,G__14749__$1))); +if((G__14749__$2 == null)){ +return null; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(G__14749__$2),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" > ")].join(''); +} +})(); +var res = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(path),cljs.core.str.cljs$core$IFn$_invoke$arity$1(name)].join(''); +if(cljs.core.empty_QMARK_(res)){ +return null; +} else { +return res; +} +}); +reagent.impl.component.comp_name = (function reagent$impl$component$comp_name(){ +var c = reagent.impl.component._STAR_current_component_STAR_; +var n = (function (){var or__7960__auto__ = reagent.impl.component.component_path(c); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var G__14751 = c; +var G__14751__$1 = (((G__14751 == null))?null:G__14751.constructor); +if((G__14751__$1 == null)){ +return null; +} else { +return reagent.impl.util.fun_name(G__14751__$1); +} +} +})(); +if(!(cljs.core.empty_QMARK_(n))){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(" (in "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(n),cljs.core.str.cljs$core$IFn$_invoke$arity$1(")")].join(''); +} else { +return ""; +} + +}); +reagent.impl.component.fn_to_class = (function reagent$impl$component$fn_to_class(f){ +if(cljs.core.ifn_QMARK_(f)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Expected a function, not "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([f], 0)))].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(ifn? f)")].join(''))); +} + +if(!(!((reagent.impl.component.react_class_QMARK_(f)) && (!(reagent.impl.component.reagent_class_QMARK_(f)))))){ +if(cljs.core.truth_(reagent.debug.has_console)){ +(cljs.core.truth_(reagent.debug.tracking)?reagent.debug.track_console:console).warn([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Warning: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("Using native React classes directly in Hiccup forms "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("is not supported. Use create-element or "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("adapt-react-class instead: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var n = reagent.impl.util.fun_name(f); +if(cljs.core.empty_QMARK_(n)){ +return f; +} else { +return n; +} +})()),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.component.comp_name())].join('')); +} else { +} +} else { +} + +if(reagent.impl.component.reagent_class_QMARK_(f)){ +return reagent.impl.component.cache_react_class(f,f); +} else { +var spec = cljs.core.meta(f); +var withrender = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(spec,cljs.core.cst$kw$reagent_DASH_render,f); +var res = reagent.impl.component.create_class(withrender); +return reagent.impl.component.cache_react_class(f,res); +} +}); +reagent.impl.component.as_class = (function reagent$impl$component$as_class(tag){ +var temp__5280__auto__ = reagent.impl.component.cached_react_class(tag); +if((temp__5280__auto__ == null)){ +return reagent.impl.component.fn_to_class(tag); +} else { +var cached_class = temp__5280__auto__; +return cached_class; +} +}); +reagent.impl.component.reactify_component = (function reagent$impl$component$reactify_component(comp){ +if(reagent.impl.component.react_class_QMARK_(comp)){ +return comp; +} else { +return reagent.impl.component.as_class(comp); +} +}); diff --git a/public/js/rel/reagent/impl/template.cljs b/public/js/rel/reagent/impl/template.cljs new file mode 100644 index 0000000..34d8bc5 --- /dev/null +++ b/public/js/rel/reagent/impl/template.cljs @@ -0,0 +1,405 @@ +(ns reagent.impl.template + (:require [clojure.string :as string] + [clojure.walk :refer [prewalk]] + [reagent.impl.util :as util :refer [is-client]] + [reagent.impl.component :as comp] + [reagent.impl.batching :as batch] + [reagent.ratom :as ratom] + [reagent.interop :refer-macros [$ $!]] + [reagent.debug :refer-macros [dbg prn println log dev? + warn warn-unless]])) + +;; From Weavejester's Hiccup, via pump: +(def ^{:doc "Regular expression that parses a CSS-style id and class + from a tag name."} + re-tag #"([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?") + +(deftype NativeWrapper []) + + +;;; Common utilities + +(defn ^boolean named? [x] + (or (keyword? x) + (symbol? x))) + +(defn ^boolean hiccup-tag? [x] + (or (named? x) + (string? x))) + +(defn ^boolean valid-tag? [x] + (or (hiccup-tag? x) + (ifn? x) + (instance? NativeWrapper x))) + + +;;; Props conversion + +(def prop-name-cache #js{:class "className" + :for "htmlFor" + :charset "charSet"}) + +(defn cache-get [o k] + (when ^boolean (.hasOwnProperty o k) + (aget o k))) + +(defn cached-prop-name [k] + (if (named? k) + (if-some [k' (cache-get prop-name-cache (name k))] + k' + (aset prop-name-cache (name k) + (util/dash-to-camel k))) + k)) + +(defn ^boolean js-val? [x] + (not (identical? "object" (goog/typeOf x)))) + +(declare convert-prop-value) + +(defn kv-conv [o k v] + (doto o + (aset (cached-prop-name k) + (convert-prop-value v)))) + +(defn convert-prop-value [x] + (cond (js-val? x) x + (named? x) (name x) + (map? x) (reduce-kv kv-conv #js{} x) + (coll? x) (clj->js x) + (ifn? x) (fn [& args] + (apply x args)) + :else (clj->js x))) + +(defn oset [o k v] + (doto (if (nil? o) #js{} o) + (aset k v))) + +(defn oget [o k] + (if (nil? o) nil (aget o k))) + +(defn set-id-class [p id-class] + (let [id ($ id-class :id) + p (if (and (some? id) + (nil? (oget p "id"))) + (oset p "id" id) + p)] + (if-some [class ($ id-class :className)] + (let [old (oget p "className")] + (oset p "className" (if (nil? old) + class + (str class " " old)))) + p))) + +(defn convert-props [props id-class] + (-> props + convert-prop-value + (set-id-class id-class))) + + +;;; Specialization for input components + +;; This gets set from reagent.dom +(defonce find-dom-node nil) + +;; +;; The properites 'selectionStart' and 'selectionEnd' only exist on some inputs +;; See: https://html.spec.whatwg.org/multipage/forms.html#do-not-apply +(def these-inputs-have-selection-api #{"text" "textarea" "password" "search" + "tel" "url"}) + +(defn ^boolean has-selection-api? + [input-type] + (contains? these-inputs-have-selection-api input-type)) + +(defn input-set-value [this] + (when ($ this :cljsInputLive) + ($! this :cljsInputDirty false) + (let [rendered-value ($ this :cljsRenderedValue) + dom-value ($ this :cljsDOMValue) + node (find-dom-node this)] + (when (not= rendered-value dom-value) + (if-not (and (identical? node ($ js/document :activeElement)) + (has-selection-api? ($ node :type)) + (string? rendered-value) + (string? dom-value)) + ;; just set the value, no need to worry about a cursor + (do + ($! this :cljsDOMValue rendered-value) + ($! node :value rendered-value)) + + ;; Setting "value" (below) moves the cursor position to the + ;; end which gives the user a jarring experience. + ;; + ;; But repositioning the cursor within the text, turns out to + ;; be quite a challenge because changes in the text can be + ;; triggered by various events like: + ;; - a validation function rejecting a user inputted char + ;; - the user enters a lower case char, but is transformed to + ;; upper. + ;; - the user selects multiple chars and deletes text + ;; - the user pastes in multiple chars, and some of them are + ;; rejected by a validator. + ;; - the user selects multiple chars and then types in a + ;; single new char to repalce them all. + ;; Coming up with a sane cursor repositioning strategy hasn't + ;; been easy ALTHOUGH in the end, it kinda fell out nicely, + ;; and it appears to sanely handle all the cases we could + ;; think of. + ;; So this is just a warning. The code below is simple + ;; enough, but if you are tempted to change it, be aware of + ;; all the scenarios you have handle. + (let [node-value ($ node :value)] + (if (not= node-value dom-value) + ;; IE has not notified us of the change yet, so check again later + (batch/do-after-render #(input-set-value this)) + (let [existing-offset-from-end (- (count node-value) + ($ node :selectionStart)) + new-cursor-offset (- (count rendered-value) + existing-offset-from-end)] + ($! this :cljsDOMValue rendered-value) + ($! node :value rendered-value) + ($! node :selectionStart new-cursor-offset) + ($! node :selectionEnd new-cursor-offset))))))))) + +(defn input-handle-change [this on-change e] + ($! this :cljsDOMValue (-> e .-target .-value)) + ;; Make sure the input is re-rendered, in case on-change + ;; wants to keep the value unchanged + (when-not ($ this :cljsInputDirty) + ($! this :cljsInputDirty true) + (batch/do-after-render #(input-set-value this))) + (on-change e)) + +(defn input-render-setup [this jsprops] + ;; Don't rely on React for updating "controlled inputs", since it + ;; doesn't play well with async rendering (misses keystrokes). + (when (and (some? jsprops) + (.hasOwnProperty jsprops "onChange") + (.hasOwnProperty jsprops "value")) + (assert find-dom-node + "reagent.dom needs to be loaded for controlled input to work") + (let [v ($ jsprops :value) + value (if (nil? v) "" v) + on-change ($ jsprops :onChange)] + (when-not ($ this :cljsInputLive) + ;; set initial value + ($! this :cljsInputLive true) + ($! this :cljsDOMValue value)) + ($! this :cljsRenderedValue value) + (js-delete jsprops "value") + (doto jsprops + ($! :defaultValue value) + ($! :onChange #(input-handle-change this on-change %)))))) + +(defn input-unmount [this] + ($! this :cljsInputLive nil)) + +(defn ^boolean input-component? [x] + (case x + ("input" "textarea") true + false)) + +(def reagent-input-class nil) + +(declare make-element) + +(def input-spec + {:display-name "ReagentInput" + :component-did-update input-set-value + :component-will-unmount input-unmount + :reagent-render + (fn [argv comp jsprops first-child] + (let [this comp/*current-component*] + (input-render-setup this jsprops) + (make-element argv comp jsprops first-child)))}) + +(defn reagent-input [] + (when (nil? reagent-input-class) + (set! reagent-input-class (comp/create-class input-spec))) + reagent-input-class) + + +;;; Conversion from Hiccup forms + +(defn parse-tag [hiccup-tag] + (let [[tag id class] (->> hiccup-tag name (re-matches re-tag) next) + class (when-not (nil? class) + (string/replace class #"\." " "))] + (assert tag (str "Invalid tag: '" hiccup-tag "'" + (comp/comp-name))) + #js{:name tag + :id id + :className class})) + +(defn try-get-key [x] + ;; try catch to avoid clojurescript peculiarity with + ;; sorted-maps with keys that are numbers + (try (get x :key) + (catch :default e))) + +(defn get-key [x] + (when (map? x) + (try-get-key x))) + +(defn key-from-vec [v] + (if-some [k (-> (meta v) get-key)] + k + (-> v (nth 1 nil) get-key))) + +(defn reag-element [tag v] + (let [c (comp/as-class tag) + jsprops #js{:argv v}] + (when-some [key (key-from-vec v)] + ($! jsprops :key key)) + ($ util/react createElement c jsprops))) + +(defn adapt-react-class [c] + (doto (->NativeWrapper) + ($! :name c) + ($! :id nil) + ($! :class nil))) + +(def tag-name-cache #js{}) + +(defn cached-parse [x] + (if-some [s (cache-get tag-name-cache x)] + s + (aset tag-name-cache x (parse-tag x)))) + +(declare as-element) + +(defn native-element [parsed argv first] + (let [comp ($ parsed :name)] + (let [props (nth argv first nil) + hasprops (or (nil? props) (map? props)) + jsprops (convert-props (if hasprops props) parsed) + first-child (+ first (if hasprops 1 0))] + (if (input-component? comp) + (-> [(reagent-input) argv comp jsprops first-child] + (with-meta (meta argv)) + as-element) + (let [key (-> (meta argv) get-key) + p (if (nil? key) + jsprops + (oset jsprops "key" key))] + (make-element argv comp p first-child)))))) + +(defn str-coll [coll] + (if (dev?) + (str (prewalk (fn [x] + (if (fn? x) + (let [n (util/fun-name x)] + (case n "" x (symbol n))) + x)) coll)) + (str coll))) + +(defn hiccup-err [v & msg] + (str (apply str msg) ": " (str-coll v) "\n" (comp/comp-name))) + +(defn vec-to-elem [v] + (assert (pos? (count v)) (hiccup-err v "Hiccup form should not be empty")) + (let [tag (nth v 0 nil)] + (assert (valid-tag? tag) (hiccup-err v "Invalid Hiccup form")) + (cond + (hiccup-tag? tag) + (let [n (name tag) + pos (.indexOf n ">")] + (case pos + -1 (native-element (cached-parse n) v 1) + 0 (let [comp (nth v 1 nil)] + ;; Support [:> comp ...] + (assert (= ">" n) (hiccup-err v "Invalid Hiccup tag")) + (assert (or (string? comp) (fn? comp)) + (hiccup-err v "Expected React component in")) + (native-element #js{:name comp} v 2)) + ;; Support extended hiccup syntax, i.e :div.bar>a.foo + (recur [(subs n 0 pos) + (assoc v 0 (subs n (inc pos)))]))) + + (instance? NativeWrapper tag) + (native-element tag v 1) + + :else (reag-element tag v)))) + +(declare expand-seq) +(declare expand-seq-check) + +(defn as-element [x] + (cond (js-val? x) x + (vector? x) (vec-to-elem x) + (seq? x) (if (dev?) + (expand-seq-check x) + (expand-seq x)) + (named? x) (name x) + (satisfies? IPrintWithWriter x) (pr-str x) + :else x)) + +(set! comp/as-element as-element) + +(defn expand-seq [s] + (let [a (into-array s)] + (dotimes [i (alength a)] + (aset a i (as-element (aget a i)))) + a)) + +(defn expand-seq-dev [s o] + (let [a (into-array s)] + (dotimes [i (alength a)] + (let [val (aget a i)] + (when (and (vector? val) + (nil? (key-from-vec val))) + ($! o :no-key true)) + (aset a i (as-element val)))) + a)) + +(defn expand-seq-check [x] + (let [ctx #js{} + [res derefed] (ratom/check-derefs #(expand-seq-dev x ctx))] + (when derefed + (warn (hiccup-err x "Reactive deref not supported in lazy seq, " + "it should be wrapped in doall"))) + (when ($ ctx :no-key) + (warn (hiccup-err x "Every element in a seq should have a unique :key"))) + res)) + +;; From https://github.com/babel/babel/commit/1d0e68f5a19d721fe8799b1ea331041d8bf9120e +;; (def react-element-type (or (and (exists? js/Symbol) +;; ($ js/Symbol :for) +;; ($ js/Symbol for "react.element")) +;; 60103)) + +;; (defn make-element-fast [argv comp jsprops first-child] +;; (let [key (some-> jsprops ($ :key)) +;; ref (some-> jsprops ($ :ref)) +;; props (if (nil? jsprops) (js-obj) jsprops)] +;; ($! props :children +;; (case (- (count argv) first-child) +;; 0 nil +;; 1 (as-element (nth argv first-child)) +;; (reduce-kv (fn [a k v] +;; (when (>= k first-child) +;; (.push a (as-element v))) +;; a) +;; #js[] argv))) +;; (js-obj "key" key +;; "ref" ref +;; "props" props +;; "$$typeof" react-element-type +;; "type" comp +;; ;; "_store" (js-obj) +;; ))) + +(defn make-element [argv comp jsprops first-child] + (case (- (count argv) first-child) + ;; Optimize cases of zero or one child + 0 ($ util/react createElement comp jsprops) + + 1 ($ util/react createElement comp jsprops + (as-element (nth argv first-child nil))) + + (.apply ($ util/react :createElement) nil + (reduce-kv (fn [a k v] + (when (>= k first-child) + (.push a (as-element v))) + a) + #js[comp jsprops] argv)))) diff --git a/public/js/rel/reagent/impl/template.js b/public/js/rel/reagent/impl/template.js new file mode 100644 index 0000000..3f9fa53 --- /dev/null +++ b/public/js/rel/reagent/impl/template.js @@ -0,0 +1,596 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.impl.template'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('clojure.string'); +goog.require('clojure.walk'); +goog.require('reagent.impl.util'); +goog.require('reagent.impl.component'); +goog.require('reagent.impl.batching'); +goog.require('reagent.ratom'); +goog.require('reagent.interop'); +goog.require('reagent.debug'); +/** + * Regular expression that parses a CSS-style id and class + * from a tag name. + */ +reagent.impl.template.re_tag = /([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?/; + +/** +* @constructor +*/ +reagent.impl.template.NativeWrapper = (function (){ +}) + +reagent.impl.template.NativeWrapper.getBasis = (function (){ +return cljs.core.PersistentVector.EMPTY; +}); + +reagent.impl.template.NativeWrapper.cljs$lang$type = true; + +reagent.impl.template.NativeWrapper.cljs$lang$ctorStr = "reagent.impl.template/NativeWrapper"; + +reagent.impl.template.NativeWrapper.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.impl.template/NativeWrapper"); +}); + +reagent.impl.template.__GT_NativeWrapper = (function reagent$impl$template$__GT_NativeWrapper(){ +return (new reagent.impl.template.NativeWrapper()); +}); + +reagent.impl.template.named_QMARK_ = (function reagent$impl$template$named_QMARK_(x){ +return ((x instanceof cljs.core.Keyword)) || ((x instanceof cljs.core.Symbol)); +}); +reagent.impl.template.hiccup_tag_QMARK_ = (function reagent$impl$template$hiccup_tag_QMARK_(x){ +return (reagent.impl.template.named_QMARK_(x)) || (typeof x === 'string'); +}); +reagent.impl.template.valid_tag_QMARK_ = (function reagent$impl$template$valid_tag_QMARK_(x){ +return (reagent.impl.template.hiccup_tag_QMARK_(x)) || (cljs.core.ifn_QMARK_(x)) || ((x instanceof reagent.impl.template.NativeWrapper)); +}); +reagent.impl.template.prop_name_cache = ({"class": "className", "for": "htmlFor", "charset": "charSet"}); +reagent.impl.template.cache_get = (function reagent$impl$template$cache_get(o,k){ +if(o.hasOwnProperty(k)){ +return (o[k]); +} else { +return null; +} +}); +reagent.impl.template.cached_prop_name = (function reagent$impl$template$cached_prop_name(k){ +if(reagent.impl.template.named_QMARK_(k)){ +var temp__5280__auto__ = reagent.impl.template.cache_get(reagent.impl.template.prop_name_cache,cljs.core.name(k)); +if((temp__5280__auto__ == null)){ +return (reagent.impl.template.prop_name_cache[cljs.core.name(k)] = reagent.impl.util.dash_to_camel(k)); +} else { +var k_SINGLEQUOTE_ = temp__5280__auto__; +return k_SINGLEQUOTE_; +} +} else { +return k; +} +}); +reagent.impl.template.js_val_QMARK_ = (function reagent$impl$template$js_val_QMARK_(x){ +return !(("object" === goog.typeOf(x))); +}); +reagent.impl.template.kv_conv = (function reagent$impl$template$kv_conv(o,k,v){ +var G__14781 = o; +(G__14781[reagent.impl.template.cached_prop_name(k)] = (reagent.impl.template.convert_prop_value.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.template.convert_prop_value.cljs$core$IFn$_invoke$arity$1(v) : reagent.impl.template.convert_prop_value.call(null,v))); + +return G__14781; +}); +reagent.impl.template.convert_prop_value = (function reagent$impl$template$convert_prop_value(x){ +if(reagent.impl.template.js_val_QMARK_(x)){ +return x; +} else { +if(reagent.impl.template.named_QMARK_(x)){ +return cljs.core.name(x); +} else { +if(cljs.core.map_QMARK_(x)){ +return cljs.core.reduce_kv(reagent.impl.template.kv_conv,({}),x); +} else { +if(cljs.core.coll_QMARK_(x)){ +return cljs.core.clj__GT_js(x); +} else { +if(cljs.core.ifn_QMARK_(x)){ +return (function() { +var G__14782__delegate = function (args){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(x,args); +}; +var G__14782 = function (var_args){ +var args = null; +if (arguments.length > 0) { +var G__14783__i = 0, G__14783__a = new Array(arguments.length - 0); +while (G__14783__i < G__14783__a.length) {G__14783__a[G__14783__i] = arguments[G__14783__i + 0]; ++G__14783__i;} + args = new cljs.core.IndexedSeq(G__14783__a,0,null); +} +return G__14782__delegate.call(this,args);}; +G__14782.cljs$lang$maxFixedArity = 0; +G__14782.cljs$lang$applyTo = (function (arglist__14784){ +var args = cljs.core.seq(arglist__14784); +return G__14782__delegate(args); +}); +G__14782.cljs$core$IFn$_invoke$arity$variadic = G__14782__delegate; +return G__14782; +})() +; +} else { +return cljs.core.clj__GT_js(x); + +} +} +} +} +} +}); +reagent.impl.template.oset = (function reagent$impl$template$oset(o,k,v){ +var G__14786 = (((o == null))?({}):o); +(G__14786[k] = v); + +return G__14786; +}); +reagent.impl.template.oget = (function reagent$impl$template$oget(o,k){ +if((o == null)){ +return null; +} else { +return (o[k]); +} +}); +reagent.impl.template.set_id_class = (function reagent$impl$template$set_id_class(p,id_class){ +var id = (id_class["id"]); +var p__$1 = (((!((id == null))) && ((reagent.impl.template.oget(p,"id") == null)))?reagent.impl.template.oset(p,"id",id):p); +var temp__5280__auto__ = (id_class["className"]); +if((temp__5280__auto__ == null)){ +return p__$1; +} else { +var class$ = temp__5280__auto__; +var old = reagent.impl.template.oget(p__$1,"className"); +return reagent.impl.template.oset(p__$1,"className",(((old == null))?class$:[cljs.core.str.cljs$core$IFn$_invoke$arity$1(class$),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(old)].join(''))); +} +}); +reagent.impl.template.convert_props = (function reagent$impl$template$convert_props(props,id_class){ +return reagent.impl.template.set_id_class(reagent.impl.template.convert_prop_value(props),id_class); +}); +if(typeof reagent.impl.template.find_dom_node !== 'undefined'){ +} else { +reagent.impl.template.find_dom_node = null; +} +reagent.impl.template.these_inputs_have_selection_api = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 6, ["url",null,"tel",null,"text",null,"textarea",null,"password",null,"search",null], null), null); +reagent.impl.template.has_selection_api_QMARK_ = (function reagent$impl$template$has_selection_api_QMARK_(input_type){ +return cljs.core.contains_QMARK_(reagent.impl.template.these_inputs_have_selection_api,input_type); +}); +reagent.impl.template.input_set_value = (function reagent$impl$template$input_set_value(this$){ +if(cljs.core.truth_((this$["cljsInputLive"]))){ +(this$["cljsInputDirty"] = false); + +var rendered_value = (this$["cljsRenderedValue"]); +var dom_value = (this$["cljsDOMValue"]); +var node = (reagent.impl.template.find_dom_node.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.template.find_dom_node.cljs$core$IFn$_invoke$arity$1(this$) : reagent.impl.template.find_dom_node.call(null,this$)); +if(cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(rendered_value,dom_value)){ +if(!(((node === (document["activeElement"]))) && (reagent.impl.template.has_selection_api_QMARK_((node["type"]))) && (typeof rendered_value === 'string') && (typeof dom_value === 'string'))){ +(this$["cljsDOMValue"] = rendered_value); + +return (node["value"] = rendered_value); +} else { +var node_value = (node["value"]); +if(cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(node_value,dom_value)){ +return reagent.impl.batching.do_after_render(((function (node_value,rendered_value,dom_value,node){ +return (function (){ +return (reagent.impl.template.input_set_value.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.template.input_set_value.cljs$core$IFn$_invoke$arity$1(this$) : reagent.impl.template.input_set_value.call(null,this$)); +});})(node_value,rendered_value,dom_value,node)) +); +} else { +var existing_offset_from_end = (cljs.core.count(node_value) - (node["selectionStart"])); +var new_cursor_offset = (cljs.core.count(rendered_value) - existing_offset_from_end); +(this$["cljsDOMValue"] = rendered_value); + +(node["value"] = rendered_value); + +(node["selectionStart"] = new_cursor_offset); + +return (node["selectionEnd"] = new_cursor_offset); +} +} +} else { +return null; +} +} else { +return null; +} +}); +reagent.impl.template.input_handle_change = (function reagent$impl$template$input_handle_change(this$,on_change,e){ +(this$["cljsDOMValue"] = e.target.value); + +if(cljs.core.truth_((this$["cljsInputDirty"]))){ +} else { +(this$["cljsInputDirty"] = true); + +reagent.impl.batching.do_after_render((function (){ +return reagent.impl.template.input_set_value(this$); +})); +} + +return (on_change.cljs$core$IFn$_invoke$arity$1 ? on_change.cljs$core$IFn$_invoke$arity$1(e) : on_change.call(null,e)); +}); +reagent.impl.template.input_render_setup = (function reagent$impl$template$input_render_setup(this$,jsprops){ +if(cljs.core.truth_((function (){var and__7948__auto__ = !((jsprops == null)); +if(and__7948__auto__){ +var and__7948__auto____$1 = jsprops.hasOwnProperty("onChange"); +if(cljs.core.truth_(and__7948__auto____$1)){ +return jsprops.hasOwnProperty("value"); +} else { +return and__7948__auto____$1; +} +} else { +return and__7948__auto__; +} +})())){ +if(cljs.core.truth_(reagent.impl.template.find_dom_node)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("reagent.dom needs to be loaded for controlled input to work"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("find-dom-node")].join(''))); +} + +var v = (jsprops["value"]); +var value = (((v == null))?"":v); +var on_change = (jsprops["onChange"]); +if(cljs.core.truth_((this$["cljsInputLive"]))){ +} else { +(this$["cljsInputLive"] = true); + +(this$["cljsDOMValue"] = value); +} + +(this$["cljsRenderedValue"] = value); + +delete jsprops["value"]; + +var G__14789 = jsprops; +(G__14789["defaultValue"] = value); + +(G__14789["onChange"] = ((function (G__14789,v,value,on_change){ +return (function (p1__14787_SHARP_){ +return reagent.impl.template.input_handle_change(this$,on_change,p1__14787_SHARP_); +});})(G__14789,v,value,on_change)) +); + +return G__14789; +} else { +return null; +} +}); +reagent.impl.template.input_unmount = (function reagent$impl$template$input_unmount(this$){ +return (this$["cljsInputLive"] = null); +}); +reagent.impl.template.input_component_QMARK_ = (function reagent$impl$template$input_component_QMARK_(x){ +var G__14791 = x; +switch (G__14791) { +case "input": +case "textarea": +return true; + +break; +default: +return false; + +} +}); +reagent.impl.template.reagent_input_class = null; +reagent.impl.template.input_spec = new cljs.core.PersistentArrayMap(null, 4, [cljs.core.cst$kw$display_DASH_name,"ReagentInput",cljs.core.cst$kw$component_DASH_did_DASH_update,reagent.impl.template.input_set_value,cljs.core.cst$kw$component_DASH_will_DASH_unmount,reagent.impl.template.input_unmount,cljs.core.cst$kw$reagent_DASH_render,(function (argv,comp,jsprops,first_child){ +var this$ = reagent.impl.component._STAR_current_component_STAR_; +reagent.impl.template.input_render_setup(this$,jsprops); + +return (reagent.impl.template.make_element.cljs$core$IFn$_invoke$arity$4 ? reagent.impl.template.make_element.cljs$core$IFn$_invoke$arity$4(argv,comp,jsprops,first_child) : reagent.impl.template.make_element.call(null,argv,comp,jsprops,first_child)); +})], null); +reagent.impl.template.reagent_input = (function reagent$impl$template$reagent_input(){ +if((reagent.impl.template.reagent_input_class == null)){ +reagent.impl.template.reagent_input_class = reagent.impl.component.create_class(reagent.impl.template.input_spec); +} else { +} + +return reagent.impl.template.reagent_input_class; +}); +reagent.impl.template.parse_tag = (function reagent$impl$template$parse_tag(hiccup_tag){ +var vec__14796 = cljs.core.next(cljs.core.re_matches(reagent.impl.template.re_tag,cljs.core.name(hiccup_tag))); +var tag = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14796,(0),null); +var id = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14796,(1),null); +var class$ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14796,(2),null); +var class$__$1 = (((class$ == null))?null:clojure.string.replace(class$,/\./," ")); +if(cljs.core.truth_(tag)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid tag: '"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(hiccup_tag),cljs.core.str.cljs$core$IFn$_invoke$arity$1("'"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.component.comp_name())].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("tag")].join(''))); +} + +return ({"name": tag, "id": id, "className": class$__$1}); +}); +reagent.impl.template.try_get_key = (function reagent$impl$template$try_get_key(x){ +try{return cljs.core.get.cljs$core$IFn$_invoke$arity$2(x,cljs.core.cst$kw$key); +}catch (e14800){var e = e14800; +return null; +}}); +reagent.impl.template.get_key = (function reagent$impl$template$get_key(x){ +if(cljs.core.map_QMARK_(x)){ +return reagent.impl.template.try_get_key(x); +} else { +return null; +} +}); +reagent.impl.template.key_from_vec = (function reagent$impl$template$key_from_vec(v){ +var temp__5280__auto__ = reagent.impl.template.get_key(cljs.core.meta(v)); +if((temp__5280__auto__ == null)){ +return reagent.impl.template.get_key(cljs.core.nth.cljs$core$IFn$_invoke$arity$3(v,(1),null)); +} else { +var k = temp__5280__auto__; +return k; +} +}); +reagent.impl.template.reag_element = (function reagent$impl$template$reag_element(tag,v){ +var c = reagent.impl.component.as_class(tag); +var jsprops = ({"argv": v}); +var temp__5282__auto___14801 = reagent.impl.template.key_from_vec(v); +if((temp__5282__auto___14801 == null)){ +} else { +var key_14802 = temp__5282__auto___14801; +(jsprops["key"] = key_14802); +} + +return (reagent.impl.util.react["createElement"])(c,jsprops); +}); +reagent.impl.template.adapt_react_class = (function reagent$impl$template$adapt_react_class(c){ +var G__14804 = reagent.impl.template.__GT_NativeWrapper(); +(G__14804["name"] = c); + +(G__14804["id"] = null); + +(G__14804["class"] = null); + +return G__14804; +}); +reagent.impl.template.tag_name_cache = ({}); +reagent.impl.template.cached_parse = (function reagent$impl$template$cached_parse(x){ +var temp__5280__auto__ = reagent.impl.template.cache_get(reagent.impl.template.tag_name_cache,x); +if((temp__5280__auto__ == null)){ +return (reagent.impl.template.tag_name_cache[x] = reagent.impl.template.parse_tag(x)); +} else { +var s = temp__5280__auto__; +return s; +} +}); +reagent.impl.template.native_element = (function reagent$impl$template$native_element(parsed,argv,first){ +var comp = (parsed["name"]); +var props = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(argv,first,null); +var hasprops = ((props == null)) || (cljs.core.map_QMARK_(props)); +var jsprops = reagent.impl.template.convert_props(((hasprops)?props:null),parsed); +var first_child = (first + ((hasprops)?(1):(0))); +if(reagent.impl.template.input_component_QMARK_(comp)){ +var G__14806 = cljs.core.with_meta(new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [reagent.impl.template.reagent_input(),argv,comp,jsprops,first_child], null),cljs.core.meta(argv)); +return (reagent.impl.template.as_element.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.template.as_element.cljs$core$IFn$_invoke$arity$1(G__14806) : reagent.impl.template.as_element.call(null,G__14806)); +} else { +var key = reagent.impl.template.get_key(cljs.core.meta(argv)); +var p = (((key == null))?jsprops:reagent.impl.template.oset(jsprops,"key",key)); +return (reagent.impl.template.make_element.cljs$core$IFn$_invoke$arity$4 ? reagent.impl.template.make_element.cljs$core$IFn$_invoke$arity$4(argv,comp,p,first_child) : reagent.impl.template.make_element.call(null,argv,comp,p,first_child)); +} +}); +reagent.impl.template.str_coll = (function reagent$impl$template$str_coll(coll){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(clojure.walk.prewalk((function (x){ +if(cljs.core.fn_QMARK_(x)){ +var n = reagent.impl.util.fun_name(x); +var G__14808 = n; +switch (G__14808) { +case "": +return x; + +break; +default: +return cljs.core.symbol.cljs$core$IFn$_invoke$arity$1(n); + +} +} else { +return x; +} +}),coll))].join(''); + +}); +reagent.impl.template.hiccup_err = (function reagent$impl$template$hiccup_err(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14812 = arguments.length; +var i__9182__auto___14813 = (0); +while(true){ +if((i__9182__auto___14813 < len__9181__auto___14812)){ +args__9188__auto__.push((arguments[i__9182__auto___14813])); + +var G__14814 = (i__9182__auto___14813 + (1)); +i__9182__auto___14813 = G__14814; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic = (function (v,msg){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.str,msg)),cljs.core.str.cljs$core$IFn$_invoke$arity$1(": "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.template.str_coll(v)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.component.comp_name())].join(''); +}); + +reagent.impl.template.hiccup_err.cljs$lang$maxFixedArity = (1); + +reagent.impl.template.hiccup_err.cljs$lang$applyTo = (function (seq14810){ +var G__14811 = cljs.core.first(seq14810); +var seq14810__$1 = cljs.core.next(seq14810); +return reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic(G__14811,seq14810__$1); +}); + +reagent.impl.template.vec_to_elem = (function reagent$impl$template$vec_to_elem(v){ +while(true){ +if((cljs.core.count(v) > (0))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic(v,cljs.core.array_seq(["Hiccup form should not be empty"], 0))),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(pos? (count v))")].join(''))); +} + +var tag = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(v,(0),null); +if(reagent.impl.template.valid_tag_QMARK_(tag)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic(v,cljs.core.array_seq(["Invalid Hiccup form"], 0))),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(valid-tag? tag)")].join(''))); +} + +if(reagent.impl.template.hiccup_tag_QMARK_(tag)){ +var n = cljs.core.name(tag); +var pos = n.indexOf(">"); +var G__14816 = pos; +switch (G__14816) { +case (-1): +return reagent.impl.template.native_element(reagent.impl.template.cached_parse(n),v,(1)); + +break; +case (0): +var comp = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(v,(1),null); +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(">",n)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic(v,cljs.core.array_seq(["Invalid Hiccup tag"], 0))),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(= \">\" n)")].join(''))); +} + +if((typeof comp === 'string') || (cljs.core.fn_QMARK_(comp))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic(v,cljs.core.array_seq(["Expected React component in"], 0))),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(or (string? comp) (fn? comp))")].join(''))); +} + +return reagent.impl.template.native_element(({"name": comp}),v,(2)); + +break; +default: +var G__14818 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.subs.cljs$core$IFn$_invoke$arity$3(n,(0),pos),cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(v,(0),cljs.core.subs.cljs$core$IFn$_invoke$arity$2(n,(pos + (1))))], null); +v = G__14818; +continue; + +} +} else { +if((tag instanceof reagent.impl.template.NativeWrapper)){ +return reagent.impl.template.native_element(tag,v,(1)); +} else { +return reagent.impl.template.reag_element(tag,v); + +} +} +break; +} +}); +reagent.impl.template.as_element = (function reagent$impl$template$as_element(x){ +if(reagent.impl.template.js_val_QMARK_(x)){ +return x; +} else { +if(cljs.core.vector_QMARK_(x)){ +return reagent.impl.template.vec_to_elem(x); +} else { +if(cljs.core.seq_QMARK_(x)){ +return (reagent.impl.template.expand_seq_check.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.template.expand_seq_check.cljs$core$IFn$_invoke$arity$1(x) : reagent.impl.template.expand_seq_check.call(null,x)); + +} else { +if(reagent.impl.template.named_QMARK_(x)){ +return cljs.core.name(x); +} else { +if(((!((x == null)))?((((x.cljs$lang$protocol_mask$partition0$ & (2147483648))) || ((cljs.core.PROTOCOL_SENTINEL === x.cljs$core$IPrintWithWriter$)))?true:(((!x.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.IPrintWithWriter,x):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IPrintWithWriter,x))){ +return cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([x], 0)); +} else { +return x; + +} +} +} +} +} +}); +reagent.impl.component.as_element = reagent.impl.template.as_element; +reagent.impl.template.expand_seq = (function reagent$impl$template$expand_seq(s){ +var a = cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(s); +var n__8981__auto___14821 = a.length; +var i_14822 = (0); +while(true){ +if((i_14822 < n__8981__auto___14821)){ +(a[i_14822] = reagent.impl.template.as_element((a[i_14822]))); + +var G__14823 = (i_14822 + (1)); +i_14822 = G__14823; +continue; +} else { +} +break; +} + +return a; +}); +reagent.impl.template.expand_seq_dev = (function reagent$impl$template$expand_seq_dev(s,o){ +var a = cljs.core.into_array.cljs$core$IFn$_invoke$arity$1(s); +var n__8981__auto___14824 = a.length; +var i_14825 = (0); +while(true){ +if((i_14825 < n__8981__auto___14824)){ +var val_14826 = (a[i_14825]); +if((cljs.core.vector_QMARK_(val_14826)) && ((reagent.impl.template.key_from_vec(val_14826) == null))){ +(o["no-key"] = true); +} else { +} + +(a[i_14825] = reagent.impl.template.as_element(val_14826)); + +var G__14827 = (i_14825 + (1)); +i_14825 = G__14827; +continue; +} else { +} +break; +} + +return a; +}); +reagent.impl.template.expand_seq_check = (function reagent$impl$template$expand_seq_check(x){ +var ctx = ({}); +var vec__14831 = reagent.ratom.check_derefs(((function (ctx){ +return (function (){ +return reagent.impl.template.expand_seq_dev(x,ctx); +});})(ctx)) +); +var res = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14831,(0),null); +var derefed = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14831,(1),null); +if(cljs.core.truth_(derefed)){ +if(cljs.core.truth_(reagent.debug.has_console)){ +(cljs.core.truth_(reagent.debug.tracking)?reagent.debug.track_console:console).warn([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Warning: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic(x,cljs.core.array_seq(["Reactive deref not supported in lazy seq, ","it should be wrapped in doall"], 0)))].join('')); +} else { +} +} else { +} + +if(cljs.core.truth_((ctx["no-key"]))){ +if(cljs.core.truth_(reagent.debug.has_console)){ +(cljs.core.truth_(reagent.debug.tracking)?reagent.debug.track_console:console).warn([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Warning: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(reagent.impl.template.hiccup_err.cljs$core$IFn$_invoke$arity$variadic(x,cljs.core.array_seq(["Every element in a seq should have a unique :key"], 0)))].join('')); +} else { +} +} else { +} + +return res; +}); +reagent.impl.template.make_element = (function reagent$impl$template$make_element(argv,comp,jsprops,first_child){ +var G__14835 = (cljs.core.count(argv) - first_child); +switch (G__14835) { +case (0): +return (reagent.impl.util.react["createElement"])(comp,jsprops); + +break; +case (1): +return (reagent.impl.util.react["createElement"])(comp,jsprops,reagent.impl.template.as_element(cljs.core.nth.cljs$core$IFn$_invoke$arity$3(argv,first_child,null))); + +break; +default: +return (reagent.impl.util.react["createElement"]).apply(null,cljs.core.reduce_kv(((function (G__14835){ +return (function (a,k,v){ +if((k >= first_child)){ +a.push(reagent.impl.template.as_element(v)); +} else { +} + +return a; +});})(G__14835)) +,[comp,jsprops],argv)); + +} +}); diff --git a/public/js/rel/reagent/impl/util.cljs b/public/js/rel/reagent/impl/util.cljs new file mode 100644 index 0000000..0d9d4cc --- /dev/null +++ b/public/js/rel/reagent/impl/util.cljs @@ -0,0 +1,102 @@ +(ns reagent.impl.util + (:require [cljsjs.react] + [reagent.debug :refer-macros [dbg log warn]] + [reagent.interop :refer-macros [$ $!]] + [clojure.string :as string])) + +(defonce react + (cond (exists? js/React) js/React + (exists? js/require) (or (js/require "react") + (throw (js/Error. "require('react') failed"))) + :else (throw (js/Error. "js/React is missing")))) + +(def is-client (and (exists? js/window) + (-> js/window ($ :document) nil? not))) + +(def ^:dynamic ^boolean *non-reactive* false) + +;;; Props accessors + +;; Misc utilities + +(defn memoize-1 [f] + (let [mem (atom {})] + (fn [arg] + (let [v (get @mem arg)] + (if-not (nil? v) + v + (let [ret (f arg)] + (swap! mem assoc arg ret) + ret)))))) + +(def dont-camel-case #{"aria" "data"}) + +(defn capitalize [s] + (if (< (count s) 2) + (string/upper-case s) + (str (string/upper-case (subs s 0 1)) (subs s 1)))) + +(defn dash-to-camel [dashed] + (if (string? dashed) + dashed + (let [name-str (name dashed) + [start & parts] (string/split name-str #"-")] + (if (dont-camel-case start) + name-str + (apply str start (map capitalize parts)))))) + +(defn fun-name [f] + (let [n (or (and (fn? f) + (or ($ f :displayName) + ($ f :name))) + (and (implements? INamed f) + (name f)) + (let [m (meta f)] + (if (map? m) + (:name m))))] + (-> n + str + (clojure.string/replace "$" ".")))) + +(deftype partial-ifn [f args ^:mutable p] + IFn + (-invoke [_ & a] + (or p (set! p (apply clojure.core/partial f args))) + (apply p a)) + IEquiv + (-equiv [_ other] + (and (= f (.-f other)) (= args (.-args other)))) + IHash + (-hash [_] (hash [f args]))) + +(defn- merge-class [p1 p2] + (let [class (when-let [c1 (:class p1)] + (when-let [c2 (:class p2)] + (str c1 " " c2)))] + (if (nil? class) + p2 + (assoc p2 :class class)))) + +(defn- merge-style [p1 p2] + (let [style (when-let [s1 (:style p1)] + (when-let [s2 (:style p2)] + (merge s1 s2)))] + (if (nil? style) + p2 + (assoc p2 :style style)))) + +(defn merge-props [p1 p2] + (if (nil? p1) + p2 + (do + (assert (map? p1)) + (merge-style p1 (merge-class p1 (merge p1 p2)))))) + + +(def ^:dynamic *always-update* false) + +(defn force-update [comp deep] + (if deep + (binding [*always-update* true] + ($ comp forceUpdate)) + ($ comp forceUpdate))) diff --git a/public/js/rel/reagent/impl/util.js b/public/js/rel/reagent/impl/util.js new file mode 100644 index 0000000..b879b4d --- /dev/null +++ b/public/js/rel/reagent/impl/util.js @@ -0,0 +1,277 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.impl.util'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.debug'); +goog.require('reagent.interop'); +goog.require('clojure.string'); +if(typeof reagent.impl.util.react !== 'undefined'){ +} else { +reagent.impl.util.react = ((typeof React !== 'undefined')?React:((typeof require !== 'undefined')?(function (){var or__7960__auto__ = require("react"); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +throw (new Error("require('react') failed")); +} +})():(function(){throw (new Error("js/React is missing"))})() +)); +} +reagent.impl.util.is_client = (typeof window !== 'undefined') && (!(((window["document"]) == null))); +reagent.impl.util._STAR_non_reactive_STAR_ = false; +reagent.impl.util.memoize_1 = (function reagent$impl$util$memoize_1(f){ +var mem = (function (){var G__14389 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__14389) : cljs.core.atom.call(null,G__14389)); +})(); +return ((function (mem){ +return (function (arg){ +var v = cljs.core.get.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(mem) : cljs.core.deref.call(null,mem)),arg); +if(!((v == null))){ +return v; +} else { +var ret = (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(arg) : f.call(null,arg)); +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(mem,cljs.core.assoc,arg,ret); + +return ret; +} +}); +;})(mem)) +}); +reagent.impl.util.dont_camel_case = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["aria",null,"data",null], null), null); +reagent.impl.util.capitalize = (function reagent$impl$util$capitalize(s){ +if((cljs.core.count(s) < (2))){ +return clojure.string.upper_case(s); +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(clojure.string.upper_case(cljs.core.subs.cljs$core$IFn$_invoke$arity$3(s,(0),(1)))),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s,(1)))].join(''); +} +}); +reagent.impl.util.dash_to_camel = (function reagent$impl$util$dash_to_camel(dashed){ +if(typeof dashed === 'string'){ +return dashed; +} else { +var name_str = cljs.core.name(dashed); +var vec__14393 = clojure.string.split.cljs$core$IFn$_invoke$arity$2(name_str,/-/); +var seq__14394 = cljs.core.seq(vec__14393); +var first__14395 = cljs.core.first(seq__14394); +var seq__14394__$1 = cljs.core.next(seq__14394); +var start = first__14395; +var parts = seq__14394__$1; +if(cljs.core.truth_((reagent.impl.util.dont_camel_case.cljs$core$IFn$_invoke$arity$1 ? reagent.impl.util.dont_camel_case.cljs$core$IFn$_invoke$arity$1(start) : reagent.impl.util.dont_camel_case.call(null,start)))){ +return name_str; +} else { +return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.str,start,cljs.core.map.cljs$core$IFn$_invoke$arity$2(reagent.impl.util.capitalize,parts)); +} +} +}); +reagent.impl.util.fun_name = (function reagent$impl$util$fun_name(f){ +var n = (function (){var or__7960__auto__ = (function (){var and__7948__auto__ = cljs.core.fn_QMARK_(f); +if(and__7948__auto__){ +var or__7960__auto__ = (f["displayName"]); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return (f["name"]); +} +} else { +return and__7948__auto__; +} +})(); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +var or__7960__auto____$1 = (function (){var and__7948__auto__ = ((!((f == null)))?((((f.cljs$lang$protocol_mask$partition1$ & (4096))) || ((cljs.core.PROTOCOL_SENTINEL === f.cljs$core$INamed$)))?true:false):false); +if(and__7948__auto__){ +return cljs.core.name(f); +} else { +return and__7948__auto__; +} +})(); +if(cljs.core.truth_(or__7960__auto____$1)){ +return or__7960__auto____$1; +} else { +var m = cljs.core.meta(f); +if(cljs.core.map_QMARK_(m)){ +return cljs.core.cst$kw$name.cljs$core$IFn$_invoke$arity$1(m); +} else { +return null; +} +} +} +})(); +return clojure.string.replace([cljs.core.str.cljs$core$IFn$_invoke$arity$1(n)].join(''),"$","."); +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IFn} +*/ +reagent.impl.util.partial_ifn = (function (f,args,p){ +this.f = f; +this.args = args; +this.p = p; +this.cljs$lang$protocol_mask$partition0$ = 6291457; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +reagent.impl.util.partial_ifn.prototype.call = (function() { +var G__14405__delegate = function (self__,a){ +var self____$1 = this; +var _ = self____$1; +var or__7960__auto___14406 = self__.p; +if(cljs.core.truth_(or__7960__auto___14406)){ +} else { +self__.p = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.partial,self__.f,self__.args); +} + +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(self__.p,a); +}; +var G__14405 = function (self__,var_args){ +var self__ = this; +var a = null; +if (arguments.length > 1) { +var G__14407__i = 0, G__14407__a = new Array(arguments.length - 1); +while (G__14407__i < G__14407__a.length) {G__14407__a[G__14407__i] = arguments[G__14407__i + 1]; ++G__14407__i;} + a = new cljs.core.IndexedSeq(G__14407__a,0,null); +} +return G__14405__delegate.call(this,self__,a);}; +G__14405.cljs$lang$maxFixedArity = 1; +G__14405.cljs$lang$applyTo = (function (arglist__14408){ +var self__ = cljs.core.first(arglist__14408); +var a = cljs.core.rest(arglist__14408); +return G__14405__delegate(self__,a); +}); +G__14405.cljs$core$IFn$_invoke$arity$variadic = G__14405__delegate; +return G__14405; +})() +; + +reagent.impl.util.partial_ifn.prototype.apply = (function (self__,args14404){ +var self__ = this; +var self____$1 = this; +return self____$1.call.apply(self____$1,[self____$1].concat(cljs.core.aclone(args14404))); +}); + +reagent.impl.util.partial_ifn.prototype.cljs$core$IFn$_invoke$arity$2 = (function() { +var G__14409__delegate = function (a){ +var _ = this; +var or__7960__auto___14410 = self__.p; +if(cljs.core.truth_(or__7960__auto___14410)){ +} else { +self__.p = cljs.core.apply.cljs$core$IFn$_invoke$arity$3(cljs.core.partial,self__.f,self__.args); +} + +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(self__.p,a); +}; +var G__14409 = function (var_args){ +var self__ = this; +var a = null; +if (arguments.length > 0) { +var G__14411__i = 0, G__14411__a = new Array(arguments.length - 0); +while (G__14411__i < G__14411__a.length) {G__14411__a[G__14411__i] = arguments[G__14411__i + 0]; ++G__14411__i;} + a = new cljs.core.IndexedSeq(G__14411__a,0,null); +} +return G__14409__delegate.call(this,a);}; +G__14409.cljs$lang$maxFixedArity = 0; +G__14409.cljs$lang$applyTo = (function (arglist__14412){ +var a = cljs.core.seq(arglist__14412); +return G__14409__delegate(a); +}); +G__14409.cljs$core$IFn$_invoke$arity$variadic = G__14409__delegate; +return G__14409; +})() +; + +reagent.impl.util.partial_ifn.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +return (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.f,other.f)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.args,other.args)); +}); + +reagent.impl.util.partial_ifn.prototype.cljs$core$IHash$_hash$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.hash(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.f,self__.args], null)); +}); + +reagent.impl.util.partial_ifn.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.cst$sym$args,cljs.core.with_meta(cljs.core.cst$sym$p,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +reagent.impl.util.partial_ifn.cljs$lang$type = true; + +reagent.impl.util.partial_ifn.cljs$lang$ctorStr = "reagent.impl.util/partial-ifn"; + +reagent.impl.util.partial_ifn.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.impl.util/partial-ifn"); +}); + +reagent.impl.util.__GT_partial_ifn = (function reagent$impl$util$__GT_partial_ifn(f,args,p){ +return (new reagent.impl.util.partial_ifn(f,args,p)); +}); + +reagent.impl.util.merge_class = (function reagent$impl$util$merge_class(p1,p2){ +var class$ = (function (){var temp__5278__auto__ = cljs.core.cst$kw$class.cljs$core$IFn$_invoke$arity$1(p1); +if(cljs.core.truth_(temp__5278__auto__)){ +var c1 = temp__5278__auto__; +var temp__5278__auto____$1 = cljs.core.cst$kw$class.cljs$core$IFn$_invoke$arity$1(p2); +if(cljs.core.truth_(temp__5278__auto____$1)){ +var c2 = temp__5278__auto____$1; +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(c1),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(c2)].join(''); +} else { +return null; +} +} else { +return null; +} +})(); +if((class$ == null)){ +return p2; +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(p2,cljs.core.cst$kw$class,class$); +} +}); +reagent.impl.util.merge_style = (function reagent$impl$util$merge_style(p1,p2){ +var style = (function (){var temp__5278__auto__ = cljs.core.cst$kw$style.cljs$core$IFn$_invoke$arity$1(p1); +if(cljs.core.truth_(temp__5278__auto__)){ +var s1 = temp__5278__auto__; +var temp__5278__auto____$1 = cljs.core.cst$kw$style.cljs$core$IFn$_invoke$arity$1(p2); +if(cljs.core.truth_(temp__5278__auto____$1)){ +var s2 = temp__5278__auto____$1; +return cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([s1,s2], 0)); +} else { +return null; +} +} else { +return null; +} +})(); +if((style == null)){ +return p2; +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(p2,cljs.core.cst$kw$style,style); +} +}); +reagent.impl.util.merge_props = (function reagent$impl$util$merge_props(p1,p2){ +if((p1 == null)){ +return p2; +} else { +if(cljs.core.map_QMARK_(p1)){ +} else { +throw (new Error("Assert failed: (map? p1)")); +} + +return reagent.impl.util.merge_style(p1,reagent.impl.util.merge_class(p1,cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([p1,p2], 0)))); +} +}); +reagent.impl.util._STAR_always_update_STAR_ = false; +reagent.impl.util.force_update = (function reagent$impl$util$force_update(comp,deep){ +if(cljs.core.truth_(deep)){ +var _STAR_always_update_STAR_14414 = reagent.impl.util._STAR_always_update_STAR_; +reagent.impl.util._STAR_always_update_STAR_ = true; + +try{return (comp["forceUpdate"])(); +}finally {reagent.impl.util._STAR_always_update_STAR_ = _STAR_always_update_STAR_14414; +}} else { +return (comp["forceUpdate"])(); +} +}); diff --git a/public/js/rel/reagent/interop.cljs b/public/js/rel/reagent/interop.cljs new file mode 100644 index 0000000..078819c --- /dev/null +++ b/public/js/rel/reagent/interop.cljs @@ -0,0 +1,2 @@ +(ns reagent.interop + (:require-macros [reagent.interop])) diff --git a/public/js/rel/reagent/interop.js b/public/js/rel/reagent/interop.js new file mode 100644 index 0000000..8998968 --- /dev/null +++ b/public/js/rel/reagent/interop.js @@ -0,0 +1,4 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.interop'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); diff --git a/public/js/rel/reagent/ratom.cljs b/public/js/rel/reagent/ratom.cljs new file mode 100644 index 0000000..53e2f29 --- /dev/null +++ b/public/js/rel/reagent/ratom.cljs @@ -0,0 +1,592 @@ +(ns reagent.ratom + (:refer-clojure :exclude [atom]) + (:require-macros [reagent.ratom :refer [with-let]]) + (:require [reagent.impl.util :as util] + [reagent.debug :refer-macros [dbg log warn error dev? time]] + [reagent.impl.batching :as batch] + [clojure.set :as s])) + +(declare ^:dynamic *ratom-context*) +(defonce ^boolean debug false) +(defonce ^:private generation 0) +(defonce ^:private -running (clojure.core/atom 0)) + +(defn ^boolean reactive? [] + (some? *ratom-context*)) + + +;;; Utilities + +(defn running [] + (+ @-running)) + +(defn- ^number arr-len [x] + (if (nil? x) 0 (alength x))) + +(defn- ^boolean arr-eq [x y] + (let [len (arr-len x)] + (and (== len (arr-len y)) + (loop [i 0] + (or (== i len) + (if (identical? (aget x i) (aget y i)) + (recur (inc i)) + false)))))) + +(defn- in-context [obj f] + (binding [*ratom-context* obj] + (f))) + +(defn- deref-capture [f r] + (set! (.-captured r) nil) + (when (dev?) + (set! (.-ratomGeneration r) (set! generation (inc generation)))) + (let [res (in-context r f) + c (.-captured r)] + (set! (.-dirty? r) false) + ;; Optimize common case where derefs occur in same order + (when-not (arr-eq c (.-watching r)) + (._update-watching r c)) + res)) + +(defn- notify-deref-watcher! [derefed] + (when-some [r *ratom-context*] + (let [c (.-captured r)] + (if (nil? c) + (set! (.-captured r) (array derefed)) + (.push c derefed))))) + +(defn- check-watches [old new] + (when debug + (swap! -running + (- (count new) (count old)))) + new) + +(defn- add-w [this key f] + (let [w (.-watches this)] + (set! (.-watches this) (check-watches w (assoc w key f))) + (set! (.-watchesArr this) nil))) + +(defn- remove-w [this key] + (let [w (.-watches this)] + (set! (.-watches this) (check-watches w (dissoc w key))) + (set! (.-watchesArr this) nil))) + +(defn- notify-w [this old new] + (let [w (.-watchesArr this) + a (if (nil? w) + ;; Copy watches to array for speed + (->> (.-watches this) + (reduce-kv #(doto %1 (.push %2) (.push %3)) #js[]) + (set! (.-watchesArr this))) + w)] + (let [len (alength a)] + (loop [i 0] + (when (< i len) + (let [k (aget a i) + f (aget a (inc i))] + (f k this old new)) + (recur (+ 2 i))))))) + +(defn- pr-atom [a writer opts s] + (-write writer (str "#<" s " ")) + (pr-writer (binding [*ratom-context* nil] (-deref a)) writer opts) + (-write writer ">")) + + +;;; Queueing + +(defonce ^:private rea-queue nil) + +(defn- rea-enqueue [r] + (when (nil? rea-queue) + (set! rea-queue (array)) + (batch/schedule)) + (.push rea-queue r)) + +(defn flush! [] + (loop [] + (let [q rea-queue] + (when-not (nil? q) + (set! rea-queue nil) + (dotimes [i (alength q)] + (._queued-run (aget q i))) + (recur))))) + +(set! batch/ratom-flush flush!) + + +;;; Atom + +(defprotocol IReactiveAtom) + +(deftype RAtom [^:mutable state meta validator ^:mutable watches] + IAtom + IReactiveAtom + + IEquiv + (-equiv [o other] (identical? o other)) + + IDeref + (-deref [this] + (notify-deref-watcher! this) + state) + + IReset + (-reset! [a new-value] + (when-not (nil? validator) + (assert (validator new-value) "Validator rejected reference state")) + (let [old-value state] + (set! state new-value) + (when-not (nil? watches) + (notify-w a old-value new-value)) + new-value)) + + ISwap + (-swap! [a f] (-reset! a (f state))) + (-swap! [a f x] (-reset! a (f state x))) + (-swap! [a f x y] (-reset! a (f state x y))) + (-swap! [a f x y more] (-reset! a (apply f state x y more))) + + IMeta + (-meta [_] meta) + + IPrintWithWriter + (-pr-writer [a w opts] (pr-atom a w opts "Atom:")) + + IWatchable + (-notify-watches [this old new] (notify-w this old new)) + (-add-watch [this key f] (add-w this key f)) + (-remove-watch [this key] (remove-w this key)) + + IHash + (-hash [this] (goog/getUid this))) + +(defn atom + "Like clojure.core/atom, except that it keeps track of derefs." + ([x] (->RAtom x nil nil nil)) + ([x & {:keys [meta validator]}] (->RAtom x meta validator nil))) + + +;;; track + +(declare make-reaction) + +(def ^{:private true :const true} cache-key "reagReactionCache") + +(defn- cached-reaction [f o k obj destroy] + (let [m (aget o cache-key) + m (if (nil? m) {} m) + r (m k nil)] + (cond + (some? r) (-deref r) + (nil? *ratom-context*) (f) + :else (let [r (make-reaction + f :on-dispose (fn [x] + (when debug (swap! -running dec)) + (as-> (aget o cache-key) _ + (dissoc _ k) + (aset o cache-key _)) + (when (some? obj) + (set! (.-reaction obj) nil)) + (when (some? destroy) + (destroy x)))) + v (-deref r)] + (aset o cache-key (assoc m k r)) + (when debug (swap! -running inc)) + (when (some? obj) + (set! (.-reaction obj) r)) + v)))) + +(deftype Track [f args ^:mutable reaction] + IReactiveAtom + + IDeref + (-deref [this] + (if-some [r reaction] + (-deref r) + (cached-reaction #(apply f args) f args this nil))) + + IEquiv + (-equiv [_ other] + (and (instance? Track other) + (= f (.-f other)) + (= args (.-args other)))) + + IHash + (-hash [_] (hash [f args])) + + IPrintWithWriter + (-pr-writer [a w opts] (pr-atom a w opts "Track:"))) + +(defn make-track [f args] + (Track. f args nil)) + +(defn make-track! [f args] + (let [t (make-track f args) + r (make-reaction #(-deref t) + :auto-run true)] + @r + r)) + +(defn track [f & args] + {:pre [(ifn? f)]} + (make-track f args)) + +(defn track! [f & args] + {:pre [(ifn? f)]} + (make-track! f args)) + +;;; cursor + +(deftype RCursor [ratom path ^:mutable reaction + ^:mutable state ^:mutable watches] + IAtom + IReactiveAtom + + IEquiv + (-equiv [_ other] + (and (instance? RCursor other) + (= path (.-path other)) + (= ratom (.-ratom other)))) + + Object + (_peek [this] + (binding [*ratom-context* nil] + (-deref this))) + + (_set-state [this oldstate newstate] + (when-not (identical? oldstate newstate) + (set! state newstate) + (when (some? watches) + (notify-w this oldstate newstate)))) + + IDeref + (-deref [this] + (let [oldstate state + newstate (if-some [r reaction] + (-deref r) + (let [f (if (satisfies? IDeref ratom) + #(get-in @ratom path) + #(ratom path))] + (cached-reaction f ratom path this nil)))] + (._set-state this oldstate newstate) + newstate)) + + IReset + (-reset! [this new-value] + (let [oldstate state] + (._set-state this oldstate new-value) + (if (satisfies? IDeref ratom) + (if (= path []) + (reset! ratom new-value) + (swap! ratom assoc-in path new-value)) + (ratom path new-value)) + new-value)) + + ISwap + (-swap! [a f] (-reset! a (f (._peek a)))) + (-swap! [a f x] (-reset! a (f (._peek a) x))) + (-swap! [a f x y] (-reset! a (f (._peek a) x y))) + (-swap! [a f x y more] (-reset! a (apply f (._peek a) x y more))) + + IPrintWithWriter + (-pr-writer [a w opts] (pr-atom a w opts (str "Cursor: " path))) + + IWatchable + (-notify-watches [this old new] (notify-w this old new)) + (-add-watch [this key f] (add-w this key f)) + (-remove-watch [this key] (remove-w this key)) + + IHash + (-hash [_] (hash [ratom path]))) + +(defn cursor + [src path] + (assert (or (satisfies? IReactiveAtom src) + (and (ifn? src) + (not (vector? src)))) + (str "src must be a reactive atom or a function, not " + (pr-str src))) + (->RCursor src path nil nil nil)) + + +;;; with-let support + +(defn with-let-destroy [v] + (when-some [f (.-destroy v)] + (f))) + +(defn with-let-values [key] + (if-some [c *ratom-context*] + (cached-reaction array c key + nil with-let-destroy) + (array))) + + +;;;; reaction + +(defprotocol IDisposable + (dispose! [this]) + (add-on-dispose! [this f])) + +(defprotocol IRunnable + (run [this])) + +(defn- handle-reaction-change [this sender old new] + (._handle-change this sender old new)) + + +(deftype Reaction [f ^:mutable state ^:mutable ^boolean dirty? ^boolean nocache? + ^:mutable watching ^:mutable watches ^:mutable auto-run + ^:mutable caught] + IAtom + IReactiveAtom + + IWatchable + (-notify-watches [this old new] (notify-w this old new)) + (-add-watch [this key f] (add-w this key f)) + (-remove-watch [this key] + (let [was-empty (empty? watches)] + (remove-w this key) + (when (and (not was-empty) + (empty? watches) + (nil? auto-run)) + (dispose! this)))) + + IReset + (-reset! [a newval] + (assert (fn? (.-on-set a)) "Reaction is read only.") + (let [oldval state] + (set! state newval) + (.on-set a oldval newval) + (notify-w a oldval newval) + newval)) + + ISwap + (-swap! [a f] (-reset! a (f (._peek-at a)))) + (-swap! [a f x] (-reset! a (f (._peek-at a) x))) + (-swap! [a f x y] (-reset! a (f (._peek-at a) x y))) + (-swap! [a f x y more] (-reset! a (apply f (._peek-at a) x y more))) + + Object + (_peek-at [this] + (binding [*ratom-context* nil] + (-deref this))) + + (_handle-change [this sender oldval newval] + (when-not (or (identical? oldval newval) + dirty?) + (if (nil? auto-run) + (do + (set! dirty? true) + (rea-enqueue this)) + (if (true? auto-run) + (._run this false) + (auto-run this))))) + + (_update-watching [this derefed] + (let [new (set derefed) + old (set watching)] + (set! watching derefed) + (doseq [w (s/difference new old)] + (-add-watch w this handle-reaction-change)) + (doseq [w (s/difference old new)] + (-remove-watch w this)))) + + (_queued-run [this] + (when (and dirty? (some? watching)) + (._run this true))) + + (_try-capture [this f] + (try + (set! caught nil) + (deref-capture f this) + (catch :default e + (set! state e) + (set! caught e) + (set! dirty? false)))) + + (_run [this check] + (let [oldstate state + res (if check + (._try-capture this f) + (deref-capture f this))] + (when-not nocache? + (set! state res) + ;; Use = to determine equality from reactions, since + ;; they are likely to produce new data structures. + (when-not (or (nil? watches) + (= oldstate res)) + (notify-w this oldstate res))) + res)) + + (_set-opts [this {:keys [auto-run on-set on-dispose no-cache]}] + (when (some? auto-run) + (set! (.-auto-run this) auto-run)) + (when (some? on-set) + (set! (.-on-set this) on-set)) + (when (some? on-dispose) + (set! (.-on-dispose this) on-dispose)) + (when (some? no-cache) + (set! (.-nocache? this) no-cache))) + + IRunnable + (run [this] + (flush!) + (._run this false)) + + IDeref + (-deref [this] + (when-some [e caught] + (throw e)) + (let [non-reactive (nil? *ratom-context*)] + (when non-reactive + (flush!)) + (if (and non-reactive (nil? auto-run)) + (when dirty? + (let [oldstate state] + (set! state (f)) + (when-not (or (nil? watches) (= oldstate state)) + (notify-w this oldstate state)))) + (do + (notify-deref-watcher! this) + (when dirty? + (._run this false))))) + state) + + IDisposable + (dispose! [this] + (let [s state + wg watching] + (set! watching nil) + (set! state nil) + (set! auto-run nil) + (set! dirty? true) + (doseq [w (set wg)] + (-remove-watch w this)) + (when (some? (.-on-dispose this)) + (.on-dispose this s)) + (when-some [a (.-on-dispose-arr this)] + (dotimes [i (alength a)] + ((aget a i) this))))) + + (add-on-dispose! [this f] + ;; f is called with the reaction as argument when it is no longer active + (if-some [a (.-on-dispose-arr this)] + (.push a f) + (set! (.-on-dispose-arr this) (array f)))) + + IEquiv + (-equiv [o other] (identical? o other)) + + IPrintWithWriter + (-pr-writer [a w opts] (pr-atom a w opts (str "Reaction " (hash a) ":"))) + + IHash + (-hash [this] (goog/getUid this))) + + +(defn make-reaction [f & {:keys [auto-run on-set on-dispose]}] + (let [reaction (->Reaction f nil true false nil nil nil nil)] + (._set-opts reaction {:auto-run auto-run + :on-set on-set + :on-dispose on-dispose}) + reaction)) + + + +(def ^:private temp-reaction (make-reaction nil)) + +(defn run-in-reaction [f obj key run opts] + (let [r temp-reaction + res (deref-capture f r)] + (when-not (nil? (.-watching r)) + (set! temp-reaction (make-reaction nil)) + (._set-opts r opts) + (set! (.-f r) f) + (set! (.-auto-run r) #(run obj)) + (aset obj key r)) + res)) + +(defn check-derefs [f] + (let [ctx (js-obj) + res (in-context ctx f)] + [res (some? (.-captured ctx))])) + + +;;; wrap + +(deftype Wrapper [^:mutable state callback ^:mutable ^boolean changed + ^:mutable watches] + + IAtom + + IDeref + (-deref [this] + (when (dev?) + (when (and changed (some? *ratom-context*)) + (warn "derefing stale wrap: " + (pr-str this)))) + state) + + IReset + (-reset! [this newval] + (let [oldval state] + (set! changed true) + (set! state newval) + (when (some? watches) + (notify-w this oldval newval)) + (callback newval) + newval)) + + ISwap + (-swap! [a f] (-reset! a (f state))) + (-swap! [a f x] (-reset! a (f state x))) + (-swap! [a f x y] (-reset! a (f state x y))) + (-swap! [a f x y more] (-reset! a (apply f state x y more))) + + IEquiv + (-equiv [_ other] + (and (instance? Wrapper other) + ;; If either of the wrappers have changed, equality + ;; cannot be relied on. + (not changed) + (not (.-changed other)) + (= state (.-state other)) + (= callback (.-callback other)))) + + IWatchable + (-notify-watches [this old new] (notify-w this old new)) + (-add-watch [this key f] (add-w this key f)) + (-remove-watch [this key] (remove-w this key)) + + IPrintWithWriter + (-pr-writer [a w opts] (pr-atom a w opts "Wrap:"))) + +(defn make-wrapper [value callback-fn args] + (->Wrapper value + (util/->partial-ifn callback-fn args nil) + false nil)) + + + + +#_(do + (defn ratom-perf [] + (set! debug false) + (dotimes [_ 10] + (let [nite 100000 + a (atom 0) + f (fn [] + (quot @a 10)) + mid (make-reaction f) + res (track! (fn [] + ;; (with-let [x 1]) + ;; @(track f) + (inc @mid) + ))] + @res + (time (dotimes [x nite] + (swap! a inc) + (flush!))) + (dispose! res)))) + (ratom-perf)) diff --git a/public/js/rel/reagent/ratom.js b/public/js/rel/reagent/ratom.js new file mode 100644 index 0000000..35455de --- /dev/null +++ b/public/js/rel/reagent/ratom.js @@ -0,0 +1,1600 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.ratom'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.impl.util'); +goog.require('reagent.debug'); +goog.require('reagent.impl.batching'); +goog.require('clojure.set'); +if(typeof reagent.ratom.debug !== 'undefined'){ +} else { +reagent.ratom.debug = false; +} +if(typeof reagent.ratom.generation !== 'undefined'){ +} else { +reagent.ratom.generation = (0); +} +if(typeof reagent.ratom._running !== 'undefined'){ +} else { +reagent.ratom._running = (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1((0)) : cljs.core.atom.call(null,(0))); +} +reagent.ratom.reactive_QMARK_ = (function reagent$ratom$reactive_QMARK_(){ +return !((reagent.ratom._STAR_ratom_context_STAR_ == null)); +}); +reagent.ratom.running = (function reagent$ratom$running(){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(reagent.ratom._running) : cljs.core.deref.call(null,reagent.ratom._running)); +}); +reagent.ratom.arr_len = (function reagent$ratom$arr_len(x){ +if((x == null)){ +return (0); +} else { +return x.length; +} +}); +reagent.ratom.arr_eq = (function reagent$ratom$arr_eq(x,y){ +var len = reagent.ratom.arr_len(x); +var and__7948__auto__ = (len === reagent.ratom.arr_len(y)); +if(and__7948__auto__){ +var i = (0); +while(true){ +var or__7960__auto__ = (i === len); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +if(((x[i]) === (y[i]))){ +var G__14535 = (i + (1)); +i = G__14535; +continue; +} else { +return false; +} +} +break; +} +} else { +return and__7948__auto__; +} +}); +reagent.ratom.in_context = (function reagent$ratom$in_context(obj,f){ +var _STAR_ratom_context_STAR_14537 = reagent.ratom._STAR_ratom_context_STAR_; +reagent.ratom._STAR_ratom_context_STAR_ = obj; + +try{return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +}finally {reagent.ratom._STAR_ratom_context_STAR_ = _STAR_ratom_context_STAR_14537; +}}); +reagent.ratom.deref_capture = (function reagent$ratom$deref_capture(f,r){ +r.captured = null; + +r.ratomGeneration = reagent.ratom.generation = (reagent.ratom.generation + (1)); + + +var res = reagent.ratom.in_context(r,f); +var c = r.captured; +r.dirty_QMARK_ = false; + +if(reagent.ratom.arr_eq(c,r.watching)){ +} else { +r._update_watching(c); +} + +return res; +}); +reagent.ratom.notify_deref_watcher_BANG_ = (function reagent$ratom$notify_deref_watcher_BANG_(derefed){ +var temp__5282__auto__ = reagent.ratom._STAR_ratom_context_STAR_; +if((temp__5282__auto__ == null)){ +return null; +} else { +var r = temp__5282__auto__; +var c = r.captured; +if((c == null)){ +return r.captured = [derefed]; +} else { +return c.push(derefed); +} +} +}); +reagent.ratom.check_watches = (function reagent$ratom$check_watches(old,new$){ +if(reagent.ratom.debug){ +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(reagent.ratom._running,cljs.core._PLUS_,(cljs.core.count(new$) - cljs.core.count(old))); +} else { +} + +return new$; +}); +reagent.ratom.add_w = (function reagent$ratom$add_w(this$,key,f){ +var w = this$.watches; +this$.watches = reagent.ratom.check_watches(w,cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(w,key,f)); + +return this$.watchesArr = null; +}); +reagent.ratom.remove_w = (function reagent$ratom$remove_w(this$,key){ +var w = this$.watches; +this$.watches = reagent.ratom.check_watches(w,cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(w,key)); + +return this$.watchesArr = null; +}); +reagent.ratom.notify_w = (function reagent$ratom$notify_w(this$,old,new$){ +var w = this$.watchesArr; +var a = (((w == null))?this$.watchesArr = cljs.core.reduce_kv(((function (w){ +return (function (p1__14538_SHARP_,p2__14539_SHARP_,p3__14540_SHARP_){ +var G__14542 = p1__14538_SHARP_; +G__14542.push(p2__14539_SHARP_); + +G__14542.push(p3__14540_SHARP_); + +return G__14542; +});})(w)) +,[],this$.watches):w); +var len = a.length; +var i = (0); +while(true){ +if((i < len)){ +var k_14543 = (a[i]); +var f_14544 = (a[(i + (1))]); +(f_14544.cljs$core$IFn$_invoke$arity$4 ? f_14544.cljs$core$IFn$_invoke$arity$4(k_14543,this$,old,new$) : f_14544.call(null,k_14543,this$,old,new$)); + +var G__14545 = ((2) + i); +i = G__14545; +continue; +} else { +return null; +} +break; +} +}); +reagent.ratom.pr_atom = (function reagent$ratom$pr_atom(a,writer,opts,s){ +cljs.core._write(writer,[cljs.core.str.cljs$core$IFn$_invoke$arity$1("#<"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(s),cljs.core.str.cljs$core$IFn$_invoke$arity$1(" ")].join('')); + +cljs.core.pr_writer((function (){var _STAR_ratom_context_STAR_14547 = reagent.ratom._STAR_ratom_context_STAR_; +reagent.ratom._STAR_ratom_context_STAR_ = null; + +try{return cljs.core._deref(a); +}finally {reagent.ratom._STAR_ratom_context_STAR_ = _STAR_ratom_context_STAR_14547; +}})(),writer,opts); + +return cljs.core._write(writer,">"); +}); +if(typeof reagent.ratom.rea_queue !== 'undefined'){ +} else { +reagent.ratom.rea_queue = null; +} +reagent.ratom.rea_enqueue = (function reagent$ratom$rea_enqueue(r){ +if((reagent.ratom.rea_queue == null)){ +reagent.ratom.rea_queue = []; + +reagent.impl.batching.schedule(); +} else { +} + +return reagent.ratom.rea_queue.push(r); +}); +reagent.ratom.flush_BANG_ = (function reagent$ratom$flush_BANG_(){ +while(true){ +var q = reagent.ratom.rea_queue; +if((q == null)){ +return null; +} else { +reagent.ratom.rea_queue = null; + +var n__8981__auto___14548 = q.length; +var i_14549 = (0); +while(true){ +if((i_14549 < n__8981__auto___14548)){ +(q[i_14549])._queued_run(); + +var G__14550 = (i_14549 + (1)); +i_14549 = G__14550; +continue; +} else { +} +break; +} + +continue; +} +break; +} +}); +reagent.impl.batching.ratom_flush = reagent.ratom.flush_BANG_; + +/** + * @interface + */ +reagent.ratom.IReactiveAtom = function(){}; + + +/** +* @constructor + * @implements {cljs.core.IWatchable} + * @implements {cljs.core.IAtom} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IReset} + * @implements {cljs.core.ISwap} + * @implements {reagent.ratom.IReactiveAtom} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IDeref} + * @implements {cljs.core.IPrintWithWriter} +*/ +reagent.ratom.RAtom = (function (state,meta,validator,watches){ +this.state = state; +this.meta = meta; +this.validator = validator; +this.watches = watches; +this.cljs$lang$protocol_mask$partition0$ = 2153938944; +this.cljs$lang$protocol_mask$partition1$ = 114690; +}) +reagent.ratom.RAtom.prototype.reagent$ratom$IReactiveAtom$ = cljs.core.PROTOCOL_SENTINEL; + +reagent.ratom.RAtom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,w,opts){ +var self__ = this; +var a__$1 = this; +return reagent.ratom.pr_atom(a__$1,w,opts,"Atom:"); +}); + +reagent.ratom.RAtom.prototype.cljs$core$IMeta$_meta$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return self__.meta; +}); + +reagent.ratom.RAtom.prototype.cljs$core$IHash$_hash$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return goog.getUid(this$__$1); +}); + +reagent.ratom.RAtom.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (o,other){ +var self__ = this; +var o__$1 = this; +return (o__$1 === other); +}); + +reagent.ratom.RAtom.prototype.cljs$core$IReset$_reset_BANG_$arity$2 = (function (a,new_value){ +var self__ = this; +var a__$1 = this; +if((self__.validator == null)){ +} else { +if(cljs.core.truth_((self__.validator.cljs$core$IFn$_invoke$arity$1 ? self__.validator.cljs$core$IFn$_invoke$arity$1(new_value) : self__.validator.call(null,new_value)))){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("Validator rejected reference state"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(validator new-value)")].join(''))); +} +} + +var old_value = self__.state; +self__.state = new_value; + +if((self__.watches == null)){ +} else { +reagent.ratom.notify_w(a__$1,old_value,new_value); +} + +return new_value; +}); + +reagent.ratom.RAtom.prototype.cljs$core$ISwap$_swap_BANG_$arity$2 = (function (a,f){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(self__.state) : f.call(null,self__.state))); +}); + +reagent.ratom.RAtom.prototype.cljs$core$ISwap$_swap_BANG_$arity$3 = (function (a,f,x){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(self__.state,x) : f.call(null,self__.state,x))); +}); + +reagent.ratom.RAtom.prototype.cljs$core$ISwap$_swap_BANG_$arity$4 = (function (a,f,x,y){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(self__.state,x,y) : f.call(null,self__.state,x,y))); +}); + +reagent.ratom.RAtom.prototype.cljs$core$ISwap$_swap_BANG_$arity$5 = (function (a,f,x,y,more){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,self__.state,x,y,more)); +}); + +reagent.ratom.RAtom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = (function (this$,old,new$){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.notify_w(this$__$1,old,new$); +}); + +reagent.ratom.RAtom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = (function (this$,key,f){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.add_w(this$__$1,key,f); +}); + +reagent.ratom.RAtom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = (function (this$,key){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.remove_w(this$__$1,key); +}); + +reagent.ratom.RAtom.prototype.cljs$core$IDeref$_deref$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +reagent.ratom.notify_deref_watcher_BANG_(this$__$1); + +return self__.state; +}); + +reagent.ratom.RAtom.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$state,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$meta,cljs.core.cst$sym$validator,cljs.core.with_meta(cljs.core.cst$sym$watches,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +reagent.ratom.RAtom.cljs$lang$type = true; + +reagent.ratom.RAtom.cljs$lang$ctorStr = "reagent.ratom/RAtom"; + +reagent.ratom.RAtom.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.ratom/RAtom"); +}); + +reagent.ratom.__GT_RAtom = (function reagent$ratom$__GT_RAtom(state,meta,validator,watches){ +return (new reagent.ratom.RAtom(state,meta,validator,watches)); +}); + +/** + * Like clojure.core/atom, except that it keeps track of derefs. + */ +reagent.ratom.atom = (function reagent$ratom$atom(var_args){ +var args14551 = []; +var len__9181__auto___14559 = arguments.length; +var i__9182__auto___14560 = (0); +while(true){ +if((i__9182__auto___14560 < len__9181__auto___14559)){ +args14551.push((arguments[i__9182__auto___14560])); + +var G__14561 = (i__9182__auto___14560 + (1)); +i__9182__auto___14560 = G__14561; +continue; +} else { +} +break; +} + +var G__14555 = args14551.length; +switch (G__14555) { +case 1: +return reagent.ratom.atom.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +default: +var argseq__9204__auto__ = (new cljs.core.IndexedSeq(args14551.slice((1)),(0),null)); +return reagent.ratom.atom.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9204__auto__); + +} +}); + +reagent.ratom.atom.cljs$core$IFn$_invoke$arity$1 = (function (x){ +return reagent.ratom.__GT_RAtom(x,null,null,null); +}); + +reagent.ratom.atom.cljs$core$IFn$_invoke$arity$variadic = (function (x,p__14556){ +var map__14557 = p__14556; +var map__14557__$1 = ((((!((map__14557 == null)))?((((map__14557.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__14557.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__14557):map__14557); +var meta = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14557__$1,cljs.core.cst$kw$meta); +var validator = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14557__$1,cljs.core.cst$kw$validator); +return reagent.ratom.__GT_RAtom(x,meta,validator,null); +}); + +reagent.ratom.atom.cljs$lang$applyTo = (function (seq14552){ +var G__14553 = cljs.core.first(seq14552); +var seq14552__$1 = cljs.core.next(seq14552); +return reagent.ratom.atom.cljs$core$IFn$_invoke$arity$variadic(G__14553,seq14552__$1); +}); + +reagent.ratom.atom.cljs$lang$maxFixedArity = (1); + +reagent.ratom.cache_key = "reagReactionCache"; +reagent.ratom.cached_reaction = (function reagent$ratom$cached_reaction(f,o,k,obj,destroy){ +var m = (o[reagent.ratom.cache_key]); +var m__$1 = (((m == null))?cljs.core.PersistentArrayMap.EMPTY:m); +var r = (m__$1.cljs$core$IFn$_invoke$arity$2 ? m__$1.cljs$core$IFn$_invoke$arity$2(k,null) : m__$1.call(null,k,null)); +if(!((r == null))){ +return cljs.core._deref(r); +} else { +if((reagent.ratom._STAR_ratom_context_STAR_ == null)){ +return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +} else { +var r__$1 = (function (){var G__14566 = f; +var G__14567 = cljs.core.cst$kw$on_DASH_dispose; +var G__14568 = ((function (G__14566,G__14567,m,m__$1,r){ +return (function (x){ +if(reagent.ratom.debug){ +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(reagent.ratom._running,cljs.core.dec); +} else { +} + +var __14569 = (o[reagent.ratom.cache_key]); +var __14570__$1 = cljs.core.dissoc.cljs$core$IFn$_invoke$arity$2(__14569,k); +(o[reagent.ratom.cache_key] = __14570__$1); + +if(!((obj == null))){ +obj.reaction = null; +} else { +} + +if(!((destroy == null))){ +return (destroy.cljs$core$IFn$_invoke$arity$1 ? destroy.cljs$core$IFn$_invoke$arity$1(x) : destroy.call(null,x)); +} else { +return null; +} +});})(G__14566,G__14567,m,m__$1,r)) +; +return (reagent.ratom.make_reaction.cljs$core$IFn$_invoke$arity$3 ? reagent.ratom.make_reaction.cljs$core$IFn$_invoke$arity$3(G__14566,G__14567,G__14568) : reagent.ratom.make_reaction.call(null,G__14566,G__14567,G__14568)); +})(); +var v = cljs.core._deref(r__$1); +(o[reagent.ratom.cache_key] = cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m__$1,k,r__$1)); + +if(reagent.ratom.debug){ +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(reagent.ratom._running,cljs.core.inc); +} else { +} + +if(!((obj == null))){ +obj.reaction = r__$1; +} else { +} + +return v; + +} +} +}); + +/** +* @constructor + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {reagent.ratom.IReactiveAtom} + * @implements {cljs.core.IDeref} + * @implements {cljs.core.IPrintWithWriter} +*/ +reagent.ratom.Track = (function (f,args,reaction){ +this.f = f; +this.args = args; +this.reaction = reaction; +this.cljs$lang$protocol_mask$partition0$ = 2153807872; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +reagent.ratom.Track.prototype.reagent$ratom$IReactiveAtom$ = cljs.core.PROTOCOL_SENTINEL; + +reagent.ratom.Track.prototype.cljs$core$IDeref$_deref$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +var temp__5280__auto__ = self__.reaction; +if((temp__5280__auto__ == null)){ +return reagent.ratom.cached_reaction(((function (temp__5280__auto__,this$__$1){ +return (function (){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(self__.f,self__.args); +});})(temp__5280__auto__,this$__$1)) +,self__.f,self__.args,this$__$1,null); +} else { +var r = temp__5280__auto__; +return cljs.core._deref(r); +} +}); + +reagent.ratom.Track.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +return ((other instanceof reagent.ratom.Track)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.f,other.f)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.args,other.args)); +}); + +reagent.ratom.Track.prototype.cljs$core$IHash$_hash$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.hash(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.f,self__.args], null)); +}); + +reagent.ratom.Track.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,w,opts){ +var self__ = this; +var a__$1 = this; +return reagent.ratom.pr_atom(a__$1,w,opts,"Track:"); +}); + +reagent.ratom.Track.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.cst$sym$args,cljs.core.with_meta(cljs.core.cst$sym$reaction,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +reagent.ratom.Track.cljs$lang$type = true; + +reagent.ratom.Track.cljs$lang$ctorStr = "reagent.ratom/Track"; + +reagent.ratom.Track.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.ratom/Track"); +}); + +reagent.ratom.__GT_Track = (function reagent$ratom$__GT_Track(f,args,reaction){ +return (new reagent.ratom.Track(f,args,reaction)); +}); + +reagent.ratom.make_track = (function reagent$ratom$make_track(f,args){ +return (new reagent.ratom.Track(f,args,null)); +}); +reagent.ratom.make_track_BANG_ = (function reagent$ratom$make_track_BANG_(f,args){ +var t = reagent.ratom.make_track(f,args); +var r = (function (){var G__14574 = ((function (t){ +return (function (){ +return cljs.core._deref(t); +});})(t)) +; +var G__14575 = cljs.core.cst$kw$auto_DASH_run; +var G__14576 = true; +return (reagent.ratom.make_reaction.cljs$core$IFn$_invoke$arity$3 ? reagent.ratom.make_reaction.cljs$core$IFn$_invoke$arity$3(G__14574,G__14575,G__14576) : reagent.ratom.make_reaction.call(null,G__14574,G__14575,G__14576)); +})(); +(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(r) : cljs.core.deref.call(null,r)); + +return r; +}); +reagent.ratom.track = (function reagent$ratom$track(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14579 = arguments.length; +var i__9182__auto___14580 = (0); +while(true){ +if((i__9182__auto___14580 < len__9181__auto___14579)){ +args__9188__auto__.push((arguments[i__9182__auto___14580])); + +var G__14581 = (i__9182__auto___14580 + (1)); +i__9182__auto___14580 = G__14581; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.ratom.track.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.ratom.track.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +if(cljs.core.ifn_QMARK_(f)){ +} else { +throw (new Error("Assert failed: (ifn? f)")); +} + +return reagent.ratom.make_track(f,args); +}); + +reagent.ratom.track.cljs$lang$maxFixedArity = (1); + +reagent.ratom.track.cljs$lang$applyTo = (function (seq14577){ +var G__14578 = cljs.core.first(seq14577); +var seq14577__$1 = cljs.core.next(seq14577); +return reagent.ratom.track.cljs$core$IFn$_invoke$arity$variadic(G__14578,seq14577__$1); +}); + +reagent.ratom.track_BANG_ = (function reagent$ratom$track_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14584 = arguments.length; +var i__9182__auto___14585 = (0); +while(true){ +if((i__9182__auto___14585 < len__9181__auto___14584)){ +args__9188__auto__.push((arguments[i__9182__auto___14585])); + +var G__14586 = (i__9182__auto___14585 + (1)); +i__9182__auto___14585 = G__14586; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.ratom.track_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.ratom.track_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +if(cljs.core.ifn_QMARK_(f)){ +} else { +throw (new Error("Assert failed: (ifn? f)")); +} + +return reagent.ratom.make_track_BANG_(f,args); +}); + +reagent.ratom.track_BANG_.cljs$lang$maxFixedArity = (1); + +reagent.ratom.track_BANG_.cljs$lang$applyTo = (function (seq14582){ +var G__14583 = cljs.core.first(seq14582); +var seq14582__$1 = cljs.core.next(seq14582); +return reagent.ratom.track_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__14583,seq14582__$1); +}); + + +/** +* @constructor + * @implements {cljs.core.IWatchable} + * @implements {cljs.core.IAtom} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IReset} + * @implements {cljs.core.ISwap} + * @implements {reagent.ratom.IReactiveAtom} + * @implements {cljs.core.IDeref} + * @implements {cljs.core.IPrintWithWriter} + * @implements {reagent.ratom.Object} +*/ +reagent.ratom.RCursor = (function (ratom,path,reaction,state,watches){ +this.ratom = ratom; +this.path = path; +this.reaction = reaction; +this.state = state; +this.watches = watches; +this.cljs$lang$protocol_mask$partition0$ = 2153807872; +this.cljs$lang$protocol_mask$partition1$ = 114690; +}) +reagent.ratom.RCursor.prototype._peek = (function (){ +var self__ = this; +var this$ = this; +var _STAR_ratom_context_STAR_14587 = reagent.ratom._STAR_ratom_context_STAR_; +reagent.ratom._STAR_ratom_context_STAR_ = null; + +try{return this$.cljs$core$IDeref$_deref$arity$1(null); +}finally {reagent.ratom._STAR_ratom_context_STAR_ = _STAR_ratom_context_STAR_14587; +}}); + +reagent.ratom.RCursor.prototype._set_state = (function (oldstate,newstate){ +var self__ = this; +var this$ = this; +if((oldstate === newstate)){ +return null; +} else { +self__.state = newstate; + +if(!((self__.watches == null))){ +return reagent.ratom.notify_w(this$,oldstate,newstate); +} else { +return null; +} +} +}); + +reagent.ratom.RCursor.prototype.reagent$ratom$IReactiveAtom$ = cljs.core.PROTOCOL_SENTINEL; + +reagent.ratom.RCursor.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,w,opts){ +var self__ = this; +var a__$1 = this; +return reagent.ratom.pr_atom(a__$1,w,opts,[cljs.core.str.cljs$core$IFn$_invoke$arity$1("Cursor: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(self__.path)].join('')); +}); + +reagent.ratom.RCursor.prototype.cljs$core$IHash$_hash$arity$1 = (function (_){ +var self__ = this; +var ___$1 = this; +return cljs.core.hash(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [self__.ratom,self__.path], null)); +}); + +reagent.ratom.RCursor.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +return ((other instanceof reagent.ratom.RCursor)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.path,other.path)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.ratom,other.ratom)); +}); + +reagent.ratom.RCursor.prototype.cljs$core$IReset$_reset_BANG_$arity$2 = (function (this$,new_value){ +var self__ = this; +var this$__$1 = this; +var oldstate = self__.state; +this$__$1._set_state(oldstate,new_value); + +if(((!((self__.ratom == null)))?((((self__.ratom.cljs$lang$protocol_mask$partition0$ & (32768))) || ((cljs.core.PROTOCOL_SENTINEL === self__.ratom.cljs$core$IDeref$)))?true:(((!self__.ratom.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.IDeref,self__.ratom):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IDeref,self__.ratom))){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.path,cljs.core.PersistentVector.EMPTY)){ +(cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(self__.ratom,new_value) : cljs.core.reset_BANG_.call(null,self__.ratom,new_value)); +} else { +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(self__.ratom,cljs.core.assoc_in,self__.path,new_value); +} +} else { +(self__.ratom.cljs$core$IFn$_invoke$arity$2 ? self__.ratom.cljs$core$IFn$_invoke$arity$2(self__.path,new_value) : self__.ratom.call(null,self__.path,new_value)); +} + +return new_value; +}); + +reagent.ratom.RCursor.prototype.cljs$core$ISwap$_swap_BANG_$arity$2 = (function (a,f){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(function (){var G__14589 = a__$1._peek(); +return (f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(G__14589) : f.call(null,G__14589)); +})()); +}); + +reagent.ratom.RCursor.prototype.cljs$core$ISwap$_swap_BANG_$arity$3 = (function (a,f,x){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(function (){var G__14590 = a__$1._peek(); +var G__14591 = x; +return (f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(G__14590,G__14591) : f.call(null,G__14590,G__14591)); +})()); +}); + +reagent.ratom.RCursor.prototype.cljs$core$ISwap$_swap_BANG_$arity$4 = (function (a,f,x,y){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(function (){var G__14592 = a__$1._peek(); +var G__14593 = x; +var G__14594 = y; +return (f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(G__14592,G__14593,G__14594) : f.call(null,G__14592,G__14593,G__14594)); +})()); +}); + +reagent.ratom.RCursor.prototype.cljs$core$ISwap$_swap_BANG_$arity$5 = (function (a,f,x,y,more){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,a__$1._peek(),x,y,more)); +}); + +reagent.ratom.RCursor.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = (function (this$,old,new$){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.notify_w(this$__$1,old,new$); +}); + +reagent.ratom.RCursor.prototype.cljs$core$IWatchable$_add_watch$arity$3 = (function (this$,key,f){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.add_w(this$__$1,key,f); +}); + +reagent.ratom.RCursor.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = (function (this$,key){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.remove_w(this$__$1,key); +}); + +reagent.ratom.RCursor.prototype.cljs$core$IDeref$_deref$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +var oldstate = self__.state; +var newstate = (function (){var temp__5280__auto__ = self__.reaction; +if((temp__5280__auto__ == null)){ +var f = ((((!((self__.ratom == null)))?((((self__.ratom.cljs$lang$protocol_mask$partition0$ & (32768))) || ((cljs.core.PROTOCOL_SENTINEL === self__.ratom.cljs$core$IDeref$)))?true:(((!self__.ratom.cljs$lang$protocol_mask$partition0$))?cljs.core.native_satisfies_QMARK_(cljs.core.IDeref,self__.ratom):false)):cljs.core.native_satisfies_QMARK_(cljs.core.IDeref,self__.ratom)))?((function (temp__5280__auto__,oldstate,this$__$1){ +return (function (){ +return cljs.core.get_in.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(self__.ratom) : cljs.core.deref.call(null,self__.ratom)),self__.path); +});})(temp__5280__auto__,oldstate,this$__$1)) +:((function (temp__5280__auto__,oldstate,this$__$1){ +return (function (){ +return (self__.ratom.cljs$core$IFn$_invoke$arity$1 ? self__.ratom.cljs$core$IFn$_invoke$arity$1(self__.path) : self__.ratom.call(null,self__.path)); +});})(temp__5280__auto__,oldstate,this$__$1)) +); +return reagent.ratom.cached_reaction(f,self__.ratom,self__.path,this$__$1,null); +} else { +var r = temp__5280__auto__; +return cljs.core._deref(r); +} +})(); +this$__$1._set_state(oldstate,newstate); + +return newstate; +}); + +reagent.ratom.RCursor.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$ratom,cljs.core.cst$sym$path,cljs.core.with_meta(cljs.core.cst$sym$reaction,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$state,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$watches,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +reagent.ratom.RCursor.cljs$lang$type = true; + +reagent.ratom.RCursor.cljs$lang$ctorStr = "reagent.ratom/RCursor"; + +reagent.ratom.RCursor.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.ratom/RCursor"); +}); + +reagent.ratom.__GT_RCursor = (function reagent$ratom$__GT_RCursor(ratom,path,reaction,state,watches){ +return (new reagent.ratom.RCursor(ratom,path,reaction,state,watches)); +}); + +reagent.ratom.cursor = (function reagent$ratom$cursor(src,path){ +if((function (){var or__7960__auto__ = ((!((src == null)))?(((false) || ((cljs.core.PROTOCOL_SENTINEL === src.reagent$ratom$IReactiveAtom$)))?true:(((!src.cljs$lang$protocol_mask$partition$))?cljs.core.native_satisfies_QMARK_(reagent.ratom.IReactiveAtom,src):false)):cljs.core.native_satisfies_QMARK_(reagent.ratom.IReactiveAtom,src)); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +return (cljs.core.ifn_QMARK_(src)) && (!(cljs.core.vector_QMARK_(src))); +} +})()){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1([cljs.core.str.cljs$core$IFn$_invoke$arity$1("src must be a reactive atom or a function, not "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([src], 0)))].join('')),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(or (satisfies? IReactiveAtom src) (and (ifn? src) (not (vector? src))))")].join(''))); +} + +return reagent.ratom.__GT_RCursor(src,path,null,null,null); +}); +reagent.ratom.with_let_destroy = (function reagent$ratom$with_let_destroy(v){ +var temp__5282__auto__ = v.destroy; +if((temp__5282__auto__ == null)){ +return null; +} else { +var f = temp__5282__auto__; +return (f.cljs$core$IFn$_invoke$arity$0 ? f.cljs$core$IFn$_invoke$arity$0() : f.call(null)); +} +}); +reagent.ratom.with_let_values = (function reagent$ratom$with_let_values(key){ +var temp__5280__auto__ = reagent.ratom._STAR_ratom_context_STAR_; +if((temp__5280__auto__ == null)){ +return []; +} else { +var c = temp__5280__auto__; +return reagent.ratom.cached_reaction(cljs.core.array,c,key,null,reagent.ratom.with_let_destroy); +} +}); + +/** + * @interface + */ +reagent.ratom.IDisposable = function(){}; + +reagent.ratom.dispose_BANG_ = (function reagent$ratom$dispose_BANG_(this$){ +if((!((this$ == null))) && (!((this$.reagent$ratom$IDisposable$dispose_BANG_$arity$1 == null)))){ +return this$.reagent$ratom$IDisposable$dispose_BANG_$arity$1(this$); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (reagent.ratom.dispose_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto__.call(null,this$)); +} else { +var m__8679__auto____$1 = (reagent.ratom.dispose_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto____$1.call(null,this$)); +} else { +throw cljs.core.missing_protocol("IDisposable.dispose!",this$); +} +} +} +}); + +reagent.ratom.add_on_dispose_BANG_ = (function reagent$ratom$add_on_dispose_BANG_(this$,f){ +if((!((this$ == null))) && (!((this$.reagent$ratom$IDisposable$add_on_dispose_BANG_$arity$2 == null)))){ +return this$.reagent$ratom$IDisposable$add_on_dispose_BANG_$arity$2(this$,f); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (reagent.ratom.add_on_dispose_BANG_[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(this$,f) : m__8679__auto__.call(null,this$,f)); +} else { +var m__8679__auto____$1 = (reagent.ratom.add_on_dispose_BANG_["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(this$,f) : m__8679__auto____$1.call(null,this$,f)); +} else { +throw cljs.core.missing_protocol("IDisposable.add-on-dispose!",this$); +} +} +} +}); + + +/** + * @interface + */ +reagent.ratom.IRunnable = function(){}; + +reagent.ratom.run = (function reagent$ratom$run(this$){ +if((!((this$ == null))) && (!((this$.reagent$ratom$IRunnable$run$arity$1 == null)))){ +return this$.reagent$ratom$IRunnable$run$arity$1(this$); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (reagent.ratom.run[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto__.call(null,this$)); +} else { +var m__8679__auto____$1 = (reagent.ratom.run["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto____$1.call(null,this$)); +} else { +throw cljs.core.missing_protocol("IRunnable.run",this$); +} +} +} +}); + +reagent.ratom.handle_reaction_change = (function reagent$ratom$handle_reaction_change(this$,sender,old,new$){ +return this$._handle_change(sender,old,new$); +}); + +/** +* @constructor + * @implements {cljs.core.IWatchable} + * @implements {cljs.core.IAtom} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IHash} + * @implements {cljs.core.IReset} + * @implements {cljs.core.ISwap} + * @implements {reagent.ratom.IReactiveAtom} + * @implements {reagent.ratom.IRunnable} + * @implements {reagent.ratom.IDisposable} + * @implements {cljs.core.IDeref} + * @implements {cljs.core.IPrintWithWriter} + * @implements {reagent.ratom.Object} +*/ +reagent.ratom.Reaction = (function (f,state,dirty_QMARK_,nocache_QMARK_,watching,watches,auto_run,caught){ +this.f = f; +this.state = state; +this.dirty_QMARK_ = dirty_QMARK_; +this.nocache_QMARK_ = nocache_QMARK_; +this.watching = watching; +this.watches = watches; +this.auto_run = auto_run; +this.caught = caught; +this.cljs$lang$protocol_mask$partition0$ = 2153807872; +this.cljs$lang$protocol_mask$partition1$ = 114690; +}) +reagent.ratom.Reaction.prototype._peek_at = (function (){ +var self__ = this; +var this$ = this; +var _STAR_ratom_context_STAR_14600 = reagent.ratom._STAR_ratom_context_STAR_; +reagent.ratom._STAR_ratom_context_STAR_ = null; + +try{return this$.cljs$core$IDeref$_deref$arity$1(null); +}finally {reagent.ratom._STAR_ratom_context_STAR_ = _STAR_ratom_context_STAR_14600; +}}); + +reagent.ratom.Reaction.prototype._handle_change = (function (sender,oldval,newval){ +var self__ = this; +var this$ = this; +if(((oldval === newval)) || (self__.dirty_QMARK_)){ +return null; +} else { +if((self__.auto_run == null)){ +self__.dirty_QMARK_ = true; + +return reagent.ratom.rea_enqueue(this$); +} else { +if(self__.auto_run === true){ +return this$._run(false); +} else { +return (self__.auto_run.cljs$core$IFn$_invoke$arity$1 ? self__.auto_run.cljs$core$IFn$_invoke$arity$1(this$) : self__.auto_run.call(null,this$)); +} +} +} +}); + +reagent.ratom.Reaction.prototype._update_watching = (function (derefed){ +var self__ = this; +var this$ = this; +var new$ = cljs.core.set(derefed); +var old = cljs.core.set(self__.watching); +self__.watching = derefed; + +var seq__14601_14623 = cljs.core.seq(clojure.set.difference.cljs$core$IFn$_invoke$arity$2(new$,old)); +var chunk__14602_14624 = null; +var count__14603_14625 = (0); +var i__14604_14626 = (0); +while(true){ +if((i__14604_14626 < count__14603_14625)){ +var w_14627 = chunk__14602_14624.cljs$core$IIndexed$_nth$arity$2(null,i__14604_14626); +cljs.core._add_watch(w_14627,this$,reagent.ratom.handle_reaction_change); + +var G__14628 = seq__14601_14623; +var G__14629 = chunk__14602_14624; +var G__14630 = count__14603_14625; +var G__14631 = (i__14604_14626 + (1)); +seq__14601_14623 = G__14628; +chunk__14602_14624 = G__14629; +count__14603_14625 = G__14630; +i__14604_14626 = G__14631; +continue; +} else { +var temp__5278__auto___14632 = cljs.core.seq(seq__14601_14623); +if(temp__5278__auto___14632){ +var seq__14601_14633__$1 = temp__5278__auto___14632; +if(cljs.core.chunked_seq_QMARK_(seq__14601_14633__$1)){ +var c__8871__auto___14634 = cljs.core.chunk_first(seq__14601_14633__$1); +var G__14635 = cljs.core.chunk_rest(seq__14601_14633__$1); +var G__14636 = c__8871__auto___14634; +var G__14637 = cljs.core.count(c__8871__auto___14634); +var G__14638 = (0); +seq__14601_14623 = G__14635; +chunk__14602_14624 = G__14636; +count__14603_14625 = G__14637; +i__14604_14626 = G__14638; +continue; +} else { +var w_14639 = cljs.core.first(seq__14601_14633__$1); +cljs.core._add_watch(w_14639,this$,reagent.ratom.handle_reaction_change); + +var G__14640 = cljs.core.next(seq__14601_14633__$1); +var G__14641 = null; +var G__14642 = (0); +var G__14643 = (0); +seq__14601_14623 = G__14640; +chunk__14602_14624 = G__14641; +count__14603_14625 = G__14642; +i__14604_14626 = G__14643; +continue; +} +} else { +} +} +break; +} + +var seq__14605 = cljs.core.seq(clojure.set.difference.cljs$core$IFn$_invoke$arity$2(old,new$)); +var chunk__14606 = null; +var count__14607 = (0); +var i__14608 = (0); +while(true){ +if((i__14608 < count__14607)){ +var w = chunk__14606.cljs$core$IIndexed$_nth$arity$2(null,i__14608); +cljs.core._remove_watch(w,this$); + +var G__14644 = seq__14605; +var G__14645 = chunk__14606; +var G__14646 = count__14607; +var G__14647 = (i__14608 + (1)); +seq__14605 = G__14644; +chunk__14606 = G__14645; +count__14607 = G__14646; +i__14608 = G__14647; +continue; +} else { +var temp__5278__auto__ = cljs.core.seq(seq__14605); +if(temp__5278__auto__){ +var seq__14605__$1 = temp__5278__auto__; +if(cljs.core.chunked_seq_QMARK_(seq__14605__$1)){ +var c__8871__auto__ = cljs.core.chunk_first(seq__14605__$1); +var G__14648 = cljs.core.chunk_rest(seq__14605__$1); +var G__14649 = c__8871__auto__; +var G__14650 = cljs.core.count(c__8871__auto__); +var G__14651 = (0); +seq__14605 = G__14648; +chunk__14606 = G__14649; +count__14607 = G__14650; +i__14608 = G__14651; +continue; +} else { +var w = cljs.core.first(seq__14605__$1); +cljs.core._remove_watch(w,this$); + +var G__14652 = cljs.core.next(seq__14605__$1); +var G__14653 = null; +var G__14654 = (0); +var G__14655 = (0); +seq__14605 = G__14652; +chunk__14606 = G__14653; +count__14607 = G__14654; +i__14608 = G__14655; +continue; +} +} else { +return null; +} +} +break; +} +}); + +reagent.ratom.Reaction.prototype._queued_run = (function (){ +var self__ = this; +var this$ = this; +if((self__.dirty_QMARK_) && (!((self__.watching == null)))){ +return this$._run(true); +} else { +return null; +} +}); + +reagent.ratom.Reaction.prototype._try_capture = (function (f__$1){ +var self__ = this; +var this$ = this; +try{self__.caught = null; + +return reagent.ratom.deref_capture(f__$1,this$); +}catch (e14609){var e = e14609; +self__.state = e; + +self__.caught = e; + +return self__.dirty_QMARK_ = false; +}}); + +reagent.ratom.Reaction.prototype._run = (function (check){ +var self__ = this; +var this$ = this; +var oldstate = self__.state; +var res = (cljs.core.truth_(check)?this$._try_capture(self__.f):reagent.ratom.deref_capture(self__.f,this$)); +if(self__.nocache_QMARK_){ +} else { +self__.state = res; + +if(((self__.watches == null)) || (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(oldstate,res))){ +} else { +reagent.ratom.notify_w(this$,oldstate,res); +} +} + +return res; +}); + +reagent.ratom.Reaction.prototype._set_opts = (function (p__14610){ +var self__ = this; +var map__14611 = p__14610; +var map__14611__$1 = ((((!((map__14611 == null)))?((((map__14611.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__14611.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__14611):map__14611); +var auto_run__$1 = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14611__$1,cljs.core.cst$kw$auto_DASH_run); +var on_set = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14611__$1,cljs.core.cst$kw$on_DASH_set); +var on_dispose = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14611__$1,cljs.core.cst$kw$on_DASH_dispose); +var no_cache = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14611__$1,cljs.core.cst$kw$no_DASH_cache); +var this$ = this; +if(!((auto_run__$1 == null))){ +this$.auto_run = auto_run__$1; +} else { +} + +if(!((on_set == null))){ +this$.on_set = on_set; +} else { +} + +if(!((on_dispose == null))){ +this$.on_dispose = on_dispose; +} else { +} + +if(!((no_cache == null))){ +return this$.nocache_QMARK_ = no_cache; +} else { +return null; +} +}); + +reagent.ratom.Reaction.prototype.reagent$ratom$IReactiveAtom$ = cljs.core.PROTOCOL_SENTINEL; + +reagent.ratom.Reaction.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,w,opts){ +var self__ = this; +var a__$1 = this; +return reagent.ratom.pr_atom(a__$1,w,opts,[cljs.core.str.cljs$core$IFn$_invoke$arity$1("Reaction "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.hash(a__$1)),cljs.core.str.cljs$core$IFn$_invoke$arity$1(":")].join('')); +}); + +reagent.ratom.Reaction.prototype.cljs$core$IHash$_hash$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +return goog.getUid(this$__$1); +}); + +reagent.ratom.Reaction.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (o,other){ +var self__ = this; +var o__$1 = this; +return (o__$1 === other); +}); + +reagent.ratom.Reaction.prototype.reagent$ratom$IDisposable$ = cljs.core.PROTOCOL_SENTINEL; + +reagent.ratom.Reaction.prototype.reagent$ratom$IDisposable$dispose_BANG_$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +var s = self__.state; +var wg = self__.watching; +self__.watching = null; + +self__.state = null; + +self__.auto_run = null; + +self__.dirty_QMARK_ = true; + +var seq__14613_14656 = cljs.core.seq(cljs.core.set(wg)); +var chunk__14614_14657 = null; +var count__14615_14658 = (0); +var i__14616_14659 = (0); +while(true){ +if((i__14616_14659 < count__14615_14658)){ +var w_14660 = chunk__14614_14657.cljs$core$IIndexed$_nth$arity$2(null,i__14616_14659); +cljs.core._remove_watch(w_14660,this$__$1); + +var G__14661 = seq__14613_14656; +var G__14662 = chunk__14614_14657; +var G__14663 = count__14615_14658; +var G__14664 = (i__14616_14659 + (1)); +seq__14613_14656 = G__14661; +chunk__14614_14657 = G__14662; +count__14615_14658 = G__14663; +i__14616_14659 = G__14664; +continue; +} else { +var temp__5278__auto___14665 = cljs.core.seq(seq__14613_14656); +if(temp__5278__auto___14665){ +var seq__14613_14666__$1 = temp__5278__auto___14665; +if(cljs.core.chunked_seq_QMARK_(seq__14613_14666__$1)){ +var c__8871__auto___14667 = cljs.core.chunk_first(seq__14613_14666__$1); +var G__14668 = cljs.core.chunk_rest(seq__14613_14666__$1); +var G__14669 = c__8871__auto___14667; +var G__14670 = cljs.core.count(c__8871__auto___14667); +var G__14671 = (0); +seq__14613_14656 = G__14668; +chunk__14614_14657 = G__14669; +count__14615_14658 = G__14670; +i__14616_14659 = G__14671; +continue; +} else { +var w_14672 = cljs.core.first(seq__14613_14666__$1); +cljs.core._remove_watch(w_14672,this$__$1); + +var G__14673 = cljs.core.next(seq__14613_14666__$1); +var G__14674 = null; +var G__14675 = (0); +var G__14676 = (0); +seq__14613_14656 = G__14673; +chunk__14614_14657 = G__14674; +count__14615_14658 = G__14675; +i__14616_14659 = G__14676; +continue; +} +} else { +} +} +break; +} + +if(!((this$__$1.on_dispose == null))){ +this$__$1.on_dispose(s); +} else { +} + +var temp__5282__auto__ = this$__$1.on_dispose_arr; +if((temp__5282__auto__ == null)){ +return null; +} else { +var a = temp__5282__auto__; +var n__8981__auto__ = a.length; +var i = (0); +while(true){ +if((i < n__8981__auto__)){ +(a[i]).call(null,this$__$1); + +var G__14677 = (i + (1)); +i = G__14677; +continue; +} else { +return null; +} +break; +} +} +}); + +reagent.ratom.Reaction.prototype.reagent$ratom$IDisposable$add_on_dispose_BANG_$arity$2 = (function (this$,f__$1){ +var self__ = this; +var this$__$1 = this; +var temp__5280__auto__ = this$__$1.on_dispose_arr; +if((temp__5280__auto__ == null)){ +return this$__$1.on_dispose_arr = [f__$1]; +} else { +var a = temp__5280__auto__; +return a.push(f__$1); +} +}); + +reagent.ratom.Reaction.prototype.cljs$core$IReset$_reset_BANG_$arity$2 = (function (a,newval){ +var self__ = this; +var a__$1 = this; +if(cljs.core.fn_QMARK_(a__$1.on_set)){ +} else { +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Assert failed: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("Reaction is read only."),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\n"),cljs.core.str.cljs$core$IFn$_invoke$arity$1("(fn? (.-on-set a))")].join(''))); +} + +var oldval = self__.state; +self__.state = newval; + +a__$1.on_set(oldval,newval); + +reagent.ratom.notify_w(a__$1,oldval,newval); + +return newval; +}); + +reagent.ratom.Reaction.prototype.cljs$core$ISwap$_swap_BANG_$arity$2 = (function (a,f__$1){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(function (){var G__14617 = a__$1._peek_at(); +return (f__$1.cljs$core$IFn$_invoke$arity$1 ? f__$1.cljs$core$IFn$_invoke$arity$1(G__14617) : f__$1.call(null,G__14617)); +})()); +}); + +reagent.ratom.Reaction.prototype.cljs$core$ISwap$_swap_BANG_$arity$3 = (function (a,f__$1,x){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(function (){var G__14618 = a__$1._peek_at(); +var G__14619 = x; +return (f__$1.cljs$core$IFn$_invoke$arity$2 ? f__$1.cljs$core$IFn$_invoke$arity$2(G__14618,G__14619) : f__$1.call(null,G__14618,G__14619)); +})()); +}); + +reagent.ratom.Reaction.prototype.cljs$core$ISwap$_swap_BANG_$arity$4 = (function (a,f__$1,x,y){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(function (){var G__14620 = a__$1._peek_at(); +var G__14621 = x; +var G__14622 = y; +return (f__$1.cljs$core$IFn$_invoke$arity$3 ? f__$1.cljs$core$IFn$_invoke$arity$3(G__14620,G__14621,G__14622) : f__$1.call(null,G__14620,G__14621,G__14622)); +})()); +}); + +reagent.ratom.Reaction.prototype.cljs$core$ISwap$_swap_BANG_$arity$5 = (function (a,f__$1,x,y,more){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f__$1,a__$1._peek_at(),x,y,more)); +}); + +reagent.ratom.Reaction.prototype.reagent$ratom$IRunnable$ = cljs.core.PROTOCOL_SENTINEL; + +reagent.ratom.Reaction.prototype.reagent$ratom$IRunnable$run$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +reagent.ratom.flush_BANG_(); + +return this$__$1._run(false); +}); + +reagent.ratom.Reaction.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = (function (this$,old,new$){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.notify_w(this$__$1,old,new$); +}); + +reagent.ratom.Reaction.prototype.cljs$core$IWatchable$_add_watch$arity$3 = (function (this$,key,f__$1){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.add_w(this$__$1,key,f__$1); +}); + +reagent.ratom.Reaction.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = (function (this$,key){ +var self__ = this; +var this$__$1 = this; +var was_empty = cljs.core.empty_QMARK_(self__.watches); +reagent.ratom.remove_w(this$__$1,key); + +if((!(was_empty)) && (cljs.core.empty_QMARK_(self__.watches)) && ((self__.auto_run == null))){ +return this$__$1.reagent$ratom$IDisposable$dispose_BANG_$arity$1(null); +} else { +return null; +} +}); + +reagent.ratom.Reaction.prototype.cljs$core$IDeref$_deref$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +var temp__5282__auto___14678 = self__.caught; +if((temp__5282__auto___14678 == null)){ +} else { +var e_14679 = temp__5282__auto___14678; +throw e_14679; +} + +var non_reactive_14680 = (reagent.ratom._STAR_ratom_context_STAR_ == null); +if(non_reactive_14680){ +reagent.ratom.flush_BANG_(); +} else { +} + +if((non_reactive_14680) && ((self__.auto_run == null))){ +if(self__.dirty_QMARK_){ +var oldstate_14681 = self__.state; +self__.state = (self__.f.cljs$core$IFn$_invoke$arity$0 ? self__.f.cljs$core$IFn$_invoke$arity$0() : self__.f.call(null)); + +if(((self__.watches == null)) || (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(oldstate_14681,self__.state))){ +} else { +reagent.ratom.notify_w(this$__$1,oldstate_14681,self__.state); +} +} else { +} +} else { +reagent.ratom.notify_deref_watcher_BANG_(this$__$1); + +if(self__.dirty_QMARK_){ +this$__$1._run(false); +} else { +} +} + +return self__.state; +}); + +reagent.ratom.Reaction.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$f,cljs.core.with_meta(cljs.core.cst$sym$state,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$dirty_QMARK_,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean,cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$nocache_QMARK_,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean], null)),cljs.core.with_meta(cljs.core.cst$sym$watching,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$watches,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$auto_DASH_run,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$caught,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +reagent.ratom.Reaction.cljs$lang$type = true; + +reagent.ratom.Reaction.cljs$lang$ctorStr = "reagent.ratom/Reaction"; + +reagent.ratom.Reaction.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.ratom/Reaction"); +}); + +reagent.ratom.__GT_Reaction = (function reagent$ratom$__GT_Reaction(f,state,dirty_QMARK_,nocache_QMARK_,watching,watches,auto_run,caught){ +return (new reagent.ratom.Reaction(f,state,dirty_QMARK_,nocache_QMARK_,watching,watches,auto_run,caught)); +}); + +reagent.ratom.make_reaction = (function reagent$ratom$make_reaction(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14687 = arguments.length; +var i__9182__auto___14688 = (0); +while(true){ +if((i__9182__auto___14688 < len__9181__auto___14687)){ +args__9188__auto__.push((arguments[i__9182__auto___14688])); + +var G__14689 = (i__9182__auto___14688 + (1)); +i__9182__auto___14688 = G__14689; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.ratom.make_reaction.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.ratom.make_reaction.cljs$core$IFn$_invoke$arity$variadic = (function (f,p__14684){ +var map__14685 = p__14684; +var map__14685__$1 = ((((!((map__14685 == null)))?((((map__14685.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__14685.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__14685):map__14685); +var auto_run = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14685__$1,cljs.core.cst$kw$auto_DASH_run); +var on_set = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14685__$1,cljs.core.cst$kw$on_DASH_set); +var on_dispose = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__14685__$1,cljs.core.cst$kw$on_DASH_dispose); +var reaction = reagent.ratom.__GT_Reaction(f,null,true,false,null,null,null,null); +reaction._set_opts(new cljs.core.PersistentArrayMap(null, 3, [cljs.core.cst$kw$auto_DASH_run,auto_run,cljs.core.cst$kw$on_DASH_set,on_set,cljs.core.cst$kw$on_DASH_dispose,on_dispose], null)); + +return reaction; +}); + +reagent.ratom.make_reaction.cljs$lang$maxFixedArity = (1); + +reagent.ratom.make_reaction.cljs$lang$applyTo = (function (seq14682){ +var G__14683 = cljs.core.first(seq14682); +var seq14682__$1 = cljs.core.next(seq14682); +return reagent.ratom.make_reaction.cljs$core$IFn$_invoke$arity$variadic(G__14683,seq14682__$1); +}); + +reagent.ratom.temp_reaction = reagent.ratom.make_reaction(null); +reagent.ratom.run_in_reaction = (function reagent$ratom$run_in_reaction(f,obj,key,run,opts){ +var r = reagent.ratom.temp_reaction; +var res = reagent.ratom.deref_capture(f,r); +if((r.watching == null)){ +} else { +reagent.ratom.temp_reaction = reagent.ratom.make_reaction(null); + +r._set_opts(opts); + +r.f = f; + +r.auto_run = ((function (r,res){ +return (function (){ +return (run.cljs$core$IFn$_invoke$arity$1 ? run.cljs$core$IFn$_invoke$arity$1(obj) : run.call(null,obj)); +});})(r,res)) +; + +(obj[key] = r); +} + +return res; +}); +reagent.ratom.check_derefs = (function reagent$ratom$check_derefs(f){ +var ctx = {}; +var res = reagent.ratom.in_context(ctx,f); +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [res,!((ctx.captured == null))], null); +}); + +/** +* @constructor + * @implements {cljs.core.IWatchable} + * @implements {cljs.core.IAtom} + * @implements {cljs.core.IEquiv} + * @implements {cljs.core.IReset} + * @implements {cljs.core.ISwap} + * @implements {cljs.core.IDeref} + * @implements {cljs.core.IPrintWithWriter} +*/ +reagent.ratom.Wrapper = (function (state,callback,changed,watches){ +this.state = state; +this.callback = callback; +this.changed = changed; +this.watches = watches; +this.cljs$lang$protocol_mask$partition1$ = 114690; +this.cljs$lang$protocol_mask$partition0$ = 2149613568; +}) +reagent.ratom.Wrapper.prototype.cljs$core$IDeref$_deref$arity$1 = (function (this$){ +var self__ = this; +var this$__$1 = this; +if((self__.changed) && (!((reagent.ratom._STAR_ratom_context_STAR_ == null)))){ +if(cljs.core.truth_(reagent.debug.has_console)){ +(cljs.core.truth_(reagent.debug.tracking)?reagent.debug.track_console:console).warn([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Warning: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1("derefing stale wrap: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.pr_str.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([this$__$1], 0)))].join('')); +} else { +} +} else { +} + + +return self__.state; +}); + +reagent.ratom.Wrapper.prototype.cljs$core$IReset$_reset_BANG_$arity$2 = (function (this$,newval){ +var self__ = this; +var this$__$1 = this; +var oldval = self__.state; +self__.changed = true; + +self__.state = newval; + +if(!((self__.watches == null))){ +reagent.ratom.notify_w(this$__$1,oldval,newval); +} else { +} + +(self__.callback.cljs$core$IFn$_invoke$arity$1 ? self__.callback.cljs$core$IFn$_invoke$arity$1(newval) : self__.callback.call(null,newval)); + +return newval; +}); + +reagent.ratom.Wrapper.prototype.cljs$core$ISwap$_swap_BANG_$arity$2 = (function (a,f){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(f.cljs$core$IFn$_invoke$arity$1 ? f.cljs$core$IFn$_invoke$arity$1(self__.state) : f.call(null,self__.state))); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$ISwap$_swap_BANG_$arity$3 = (function (a,f,x){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(f.cljs$core$IFn$_invoke$arity$2 ? f.cljs$core$IFn$_invoke$arity$2(self__.state,x) : f.call(null,self__.state,x))); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$ISwap$_swap_BANG_$arity$4 = (function (a,f,x,y){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,(f.cljs$core$IFn$_invoke$arity$3 ? f.cljs$core$IFn$_invoke$arity$3(self__.state,x,y) : f.call(null,self__.state,x,y))); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$ISwap$_swap_BANG_$arity$5 = (function (a,f,x,y,more){ +var self__ = this; +var a__$1 = this; +return a__$1.cljs$core$IReset$_reset_BANG_$arity$2(null,cljs.core.apply.cljs$core$IFn$_invoke$arity$5(f,self__.state,x,y,more)); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$IEquiv$_equiv$arity$2 = (function (_,other){ +var self__ = this; +var ___$1 = this; +return ((other instanceof reagent.ratom.Wrapper)) && (!(self__.changed)) && (cljs.core.not(other.changed)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.state,other.state)) && (cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2(self__.callback,other.callback)); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = (function (this$,old,new$){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.notify_w(this$__$1,old,new$); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$IWatchable$_add_watch$arity$3 = (function (this$,key,f){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.add_w(this$__$1,key,f); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = (function (this$,key){ +var self__ = this; +var this$__$1 = this; +return reagent.ratom.remove_w(this$__$1,key); +}); + +reagent.ratom.Wrapper.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = (function (a,w,opts){ +var self__ = this; +var a__$1 = this; +return reagent.ratom.pr_atom(a__$1,w,opts,"Wrap:"); +}); + +reagent.ratom.Wrapper.getBasis = (function (){ +return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.with_meta(cljs.core.cst$sym$state,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null)),cljs.core.cst$sym$callback,cljs.core.with_meta(cljs.core.cst$sym$changed,new cljs.core.PersistentArrayMap(null, 2, [cljs.core.cst$kw$tag,cljs.core.cst$sym$boolean,cljs.core.cst$kw$mutable,true], null)),cljs.core.with_meta(cljs.core.cst$sym$watches,new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$mutable,true], null))], null); +}); + +reagent.ratom.Wrapper.cljs$lang$type = true; + +reagent.ratom.Wrapper.cljs$lang$ctorStr = "reagent.ratom/Wrapper"; + +reagent.ratom.Wrapper.cljs$lang$ctorPrWriter = (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"reagent.ratom/Wrapper"); +}); + +reagent.ratom.__GT_Wrapper = (function reagent$ratom$__GT_Wrapper(state,callback,changed,watches){ +return (new reagent.ratom.Wrapper(state,callback,changed,watches)); +}); + +reagent.ratom.make_wrapper = (function reagent$ratom$make_wrapper(value,callback_fn,args){ +return reagent.ratom.__GT_Wrapper(value,reagent.impl.util.__GT_partial_ifn(callback_fn,args,null),false,null); +}); diff --git a/public/js/rel/reagent/session.cljs b/public/js/rel/reagent/session.cljs new file mode 100644 index 0000000..1d3d85c --- /dev/null +++ b/public/js/rel/reagent/session.cljs @@ -0,0 +1,89 @@ +(ns reagent.session + (:refer-clojure :exclude [get get-in reset! swap!]) + (:require [reagent.core :as reagent :refer [atom]])) + +(def state (atom {})) + +(defn cursor + "Returns a cursor from the state atom." + [ks] + (reagent/cursor state ks)) + +(defn get + "Get the key's value from the session, returns nil if it doesn't exist." + [k & [default]] + (let [temp-a (cursor [k])] + (if-not (nil? @temp-a) + @temp-a default))) + +(defn put! [k v] + (clojure.core/swap! state assoc k v)) + +(defn get-in + "Gets the value at the path specified by the vector ks from the session, + returns nil if it doesn't exist." + [ks & [default]] + (or @(cursor ks) default)) + +(defn swap! + "Replace the current session's value with the result of executing f with + the current value and args." + [f & args] + (apply clojure.core/swap! state f args)) + +(defn clear! + "Remove all data from the session and start over cleanly." + [] + (clojure.core/reset! state {})) + +(defn reset! [m] + (clojure.core/reset! state m)) + +(defn remove! + "Remove a key from the session" + [k] + (clojure.core/swap! state dissoc k)) + +(defn assoc-in! + "Associates a value in the session, where ks is a + sequence of keys and v is the new value and returns + a new nested structure. If any levels do not exist, + hash-maps will be created." + [ks v] + (clojure.core/swap! state assoc-in ks v)) + +(defn get! + "Destructive get from the session. This returns the current value of the key + and then removes it from the session."[k & [default]] + (let [cur (get k default)] + (remove! k) + cur)) + +(defn get-in! + "Destructive get from the session. This returns the current value of the path + specified by the vector ks and then removes it from the session." + [ks & [default]] + (let [cur (get-in ks default)] + (assoc-in! ks nil) + cur)) + +(defn update! + "Updates a value in session where k is a key and f + is the function that takes the old value along with any + supplied args and return the new value. If key is not + present it will be added." + [k f & args] + (clojure.core/swap! + state + #(apply (partial update % k f) args))) + +(defn update-in! + "'Updates a value in the session, where ks is a + sequence of keys and f is a function that will + take the old value along with any supplied args and return + the new value. If any levels do not exist, hash-maps + will be created." + [ks f & args] + (clojure.core/swap! + state + #(apply (partial update-in % ks f) args))) diff --git a/public/js/rel/reagent/session.js b/public/js/rel/reagent/session.js new file mode 100644 index 0000000..bad4bdc --- /dev/null +++ b/public/js/rel/reagent/session.js @@ -0,0 +1,331 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('reagent.session'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('reagent.core'); +reagent.session.state = reagent.core.atom.cljs$core$IFn$_invoke$arity$1(cljs.core.PersistentArrayMap.EMPTY); +/** + * Returns a cursor from the state atom. + */ +reagent.session.cursor = (function reagent$session$cursor(ks){ +return reagent.core.cursor(reagent.session.state,ks); +}); +/** + * Get the key's value from the session, returns nil if it doesn't exist. + */ +reagent.session.get = (function reagent$session$get(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14986 = arguments.length; +var i__9182__auto___14987 = (0); +while(true){ +if((i__9182__auto___14987 < len__9181__auto___14986)){ +args__9188__auto__.push((arguments[i__9182__auto___14987])); + +var G__14988 = (i__9182__auto___14987 + (1)); +i__9182__auto___14987 = G__14988; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.session.get.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.session.get.cljs$core$IFn$_invoke$arity$variadic = (function (k,p__14982){ +var vec__14983 = p__14982; +var default$ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14983,(0),null); +var temp_a = reagent.session.cursor(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null)); +if(!(((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(temp_a) : cljs.core.deref.call(null,temp_a)) == null))){ +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(temp_a) : cljs.core.deref.call(null,temp_a)); +} else { +return default$; +} +}); + +reagent.session.get.cljs$lang$maxFixedArity = (1); + +reagent.session.get.cljs$lang$applyTo = (function (seq14980){ +var G__14981 = cljs.core.first(seq14980); +var seq14980__$1 = cljs.core.next(seq14980); +return reagent.session.get.cljs$core$IFn$_invoke$arity$variadic(G__14981,seq14980__$1); +}); + +reagent.session.put_BANG_ = (function reagent$session$put_BANG_(k,v){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(reagent.session.state,cljs.core.assoc,k,v); +}); +/** + * Gets the value at the path specified by the vector ks from the session, + * returns nil if it doesn't exist. + */ +reagent.session.get_in = (function reagent$session$get_in(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___14997 = arguments.length; +var i__9182__auto___14998 = (0); +while(true){ +if((i__9182__auto___14998 < len__9181__auto___14997)){ +args__9188__auto__.push((arguments[i__9182__auto___14998])); + +var G__14999 = (i__9182__auto___14998 + (1)); +i__9182__auto___14998 = G__14999; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.session.get_in.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.session.get_in.cljs$core$IFn$_invoke$arity$variadic = (function (ks,p__14991){ +var vec__14992 = p__14991; +var default$ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__14992,(0),null); +var or__7960__auto__ = (function (){var G__14996 = reagent.session.cursor(ks); +return (cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(G__14996) : cljs.core.deref.call(null,G__14996)); +})(); +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return default$; +} +}); + +reagent.session.get_in.cljs$lang$maxFixedArity = (1); + +reagent.session.get_in.cljs$lang$applyTo = (function (seq14989){ +var G__14990 = cljs.core.first(seq14989); +var seq14989__$1 = cljs.core.next(seq14989); +return reagent.session.get_in.cljs$core$IFn$_invoke$arity$variadic(G__14990,seq14989__$1); +}); + +/** + * Replace the current session's value with the result of executing f with + * the current value and args. + */ +reagent.session.swap_BANG_ = (function reagent$session$swap_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___15002 = arguments.length; +var i__9182__auto___15003 = (0); +while(true){ +if((i__9182__auto___15003 < len__9181__auto___15002)){ +args__9188__auto__.push((arguments[i__9182__auto___15003])); + +var G__15004 = (i__9182__auto___15003 + (1)); +i__9182__auto___15003 = G__15004; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.session.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.session.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (f,args){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$4(cljs.core.swap_BANG_,reagent.session.state,f,args); +}); + +reagent.session.swap_BANG_.cljs$lang$maxFixedArity = (1); + +reagent.session.swap_BANG_.cljs$lang$applyTo = (function (seq15000){ +var G__15001 = cljs.core.first(seq15000); +var seq15000__$1 = cljs.core.next(seq15000); +return reagent.session.swap_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__15001,seq15000__$1); +}); + +/** + * Remove all data from the session and start over cleanly. + */ +reagent.session.clear_BANG_ = (function reagent$session$clear_BANG_(){ +var G__15007 = reagent.session.state; +var G__15008 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(G__15007,G__15008) : cljs.core.reset_BANG_.call(null,G__15007,G__15008)); +}); +reagent.session.reset_BANG_ = (function reagent$session$reset_BANG_(m){ +return (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(reagent.session.state,m) : cljs.core.reset_BANG_.call(null,reagent.session.state,m)); +}); +/** + * Remove a key from the session + */ +reagent.session.remove_BANG_ = (function reagent$session$remove_BANG_(k){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(reagent.session.state,cljs.core.dissoc,k); +}); +/** + * Associates a value in the session, where ks is a + * sequence of keys and v is the new value and returns + * a new nested structure. If any levels do not exist, + * hash-maps will be created. + */ +reagent.session.assoc_in_BANG_ = (function reagent$session$assoc_in_BANG_(ks,v){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(reagent.session.state,cljs.core.assoc_in,ks,v); +}); +/** + * Destructive get from the session. This returns the current value of the key + * and then removes it from the session. + */ +reagent.session.get_BANG_ = (function reagent$session$get_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___15015 = arguments.length; +var i__9182__auto___15016 = (0); +while(true){ +if((i__9182__auto___15016 < len__9181__auto___15015)){ +args__9188__auto__.push((arguments[i__9182__auto___15016])); + +var G__15017 = (i__9182__auto___15016 + (1)); +i__9182__auto___15016 = G__15017; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.session.get_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.session.get_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (k,p__15011){ +var vec__15012 = p__15011; +var default$ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15012,(0),null); +var cur = reagent.session.get.cljs$core$IFn$_invoke$arity$variadic(k,cljs.core.array_seq([default$], 0)); +reagent.session.remove_BANG_(k); + +return cur; +}); + +reagent.session.get_BANG_.cljs$lang$maxFixedArity = (1); + +reagent.session.get_BANG_.cljs$lang$applyTo = (function (seq15009){ +var G__15010 = cljs.core.first(seq15009); +var seq15009__$1 = cljs.core.next(seq15009); +return reagent.session.get_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__15010,seq15009__$1); +}); + +/** + * Destructive get from the session. This returns the current value of the path + * specified by the vector ks and then removes it from the session. + */ +reagent.session.get_in_BANG_ = (function reagent$session$get_in_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___15024 = arguments.length; +var i__9182__auto___15025 = (0); +while(true){ +if((i__9182__auto___15025 < len__9181__auto___15024)){ +args__9188__auto__.push((arguments[i__9182__auto___15025])); + +var G__15026 = (i__9182__auto___15025 + (1)); +i__9182__auto___15025 = G__15026; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return reagent.session.get_in_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +reagent.session.get_in_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (ks,p__15020){ +var vec__15021 = p__15020; +var default$ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15021,(0),null); +var cur = reagent.session.get_in.cljs$core$IFn$_invoke$arity$variadic(ks,cljs.core.array_seq([default$], 0)); +reagent.session.assoc_in_BANG_(ks,null); + +return cur; +}); + +reagent.session.get_in_BANG_.cljs$lang$maxFixedArity = (1); + +reagent.session.get_in_BANG_.cljs$lang$applyTo = (function (seq15018){ +var G__15019 = cljs.core.first(seq15018); +var seq15018__$1 = cljs.core.next(seq15018); +return reagent.session.get_in_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__15019,seq15018__$1); +}); + +/** + * Updates a value in session where k is a key and f + * is the function that takes the old value along with any + * supplied args and return the new value. If key is not + * present it will be added. + */ +reagent.session.update_BANG_ = (function reagent$session$update_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___15031 = arguments.length; +var i__9182__auto___15032 = (0); +while(true){ +if((i__9182__auto___15032 < len__9181__auto___15031)){ +args__9188__auto__.push((arguments[i__9182__auto___15032])); + +var G__15033 = (i__9182__auto___15032 + (1)); +i__9182__auto___15032 = G__15033; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((2) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((2)),(0),null)):null); +return reagent.session.update_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9189__auto__); +}); + +reagent.session.update_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (k,f,args){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(reagent.session.state,(function (p1__15027_SHARP_){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.partial.cljs$core$IFn$_invoke$arity$4(cljs.core.update,p1__15027_SHARP_,k,f),args); +})); +}); + +reagent.session.update_BANG_.cljs$lang$maxFixedArity = (2); + +reagent.session.update_BANG_.cljs$lang$applyTo = (function (seq15028){ +var G__15029 = cljs.core.first(seq15028); +var seq15028__$1 = cljs.core.next(seq15028); +var G__15030 = cljs.core.first(seq15028__$1); +var seq15028__$2 = cljs.core.next(seq15028__$1); +return reagent.session.update_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__15029,G__15030,seq15028__$2); +}); + +/** + * 'Updates a value in the session, where ks is a + * sequence of keys and f is a function that will + * take the old value along with any supplied args and return + * the new value. If any levels do not exist, hash-maps + * will be created. + */ +reagent.session.update_in_BANG_ = (function reagent$session$update_in_BANG_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___15038 = arguments.length; +var i__9182__auto___15039 = (0); +while(true){ +if((i__9182__auto___15039 < len__9181__auto___15038)){ +args__9188__auto__.push((arguments[i__9182__auto___15039])); + +var G__15040 = (i__9182__auto___15039 + (1)); +i__9182__auto___15039 = G__15040; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((2) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((2)),(0),null)):null); +return reagent.session.update_in_BANG_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),(arguments[(1)]),argseq__9189__auto__); +}); + +reagent.session.update_in_BANG_.cljs$core$IFn$_invoke$arity$variadic = (function (ks,f,args){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(reagent.session.state,(function (p1__15034_SHARP_){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.partial.cljs$core$IFn$_invoke$arity$4(cljs.core.update_in,p1__15034_SHARP_,ks,f),args); +})); +}); + +reagent.session.update_in_BANG_.cljs$lang$maxFixedArity = (2); + +reagent.session.update_in_BANG_.cljs$lang$applyTo = (function (seq15035){ +var G__15036 = cljs.core.first(seq15035); +var seq15035__$1 = cljs.core.next(seq15035); +var G__15037 = cljs.core.first(seq15035__$1); +var seq15035__$2 = cljs.core.next(seq15035__$1); +return reagent.session.update_in_BANG_.cljs$core$IFn$_invoke$arity$variadic(G__15036,G__15037,seq15035__$2); +}); + diff --git a/public/js/rel/secretary/core.cljs b/public/js/rel/secretary/core.cljs new file mode 100644 index 0000000..753fd73 --- /dev/null +++ b/public/js/rel/secretary/core.cljs @@ -0,0 +1,402 @@ +(ns secretary.core + (:require [clojure.string :as string] + [clojure.walk :refer [keywordize-keys]]) + (:require-macros [secretary.core :refer [defroute]])) + +;;---------------------------------------------------------------------- +;; Protocols + +(defprotocol IRouteMatches + (route-matches [this route])) + +(defprotocol IRouteValue + (route-value [this])) + +(defprotocol IRenderRoute + (render-route + [this] + [this params])) + +;;---------------------------------------------------------------------- +;; Configuration + +(def ^:dynamic *config* + (atom {:prefix ""})) + +(defn get-config + "Gets a value for *config* at path." + [path] + (let [path (if (sequential? path) path [path])] + (get-in @*config* path))) + +(defn set-config! + "Associates a value val for *config* at path." + [path val] + (let [path (if (sequential? path) path [path])] + (swap! *config* assoc-in path val))) + +;;---------------------------------------------------------------------- +;; Parameter encoding + +(def encode js/encodeURIComponent) + +(defmulti + ^{:private true + :doc "Given a key and a value return and encoded key-value pair."} + encode-pair + (fn [[k v]] + (cond + (or (sequential? v) (set? v)) + ::sequential + (or (map? v) (satisfies? IRecord v)) + ::map))) + +(defn- key-index + ([k] (str (name k) "[]")) + ([k index] + (str (name k) "[" index "]"))) + +(defmethod encode-pair ::sequential [[k v]] + (let [encoded (map-indexed + (fn [i x] + (let [pair (if (coll? x) + [(key-index k i) x] + [(key-index k) x])] + (encode-pair pair))) + v)] + (string/join \& encoded))) + +(defmethod encode-pair ::map [[k v]] + (let [encoded (map + (fn [[ik iv]] + (encode-pair [(key-index k (name ik)) iv])) + v)] + (string/join \& encoded))) + +(defmethod encode-pair :default [[k v]] + (str (name k) \= (encode (str v)))) + +(defn encode-query-params + "Convert a map of query parameters into url encoded string." + [query-params] + (string/join \& (map encode-pair query-params))) + +(defn encode-uri + "Like js/encodeURIComponent excepts ignore slashes." + [uri] + (->> (string/split uri #"/") + (map encode) + (string/join "/"))) + +;;---------------------------------------------------------------------- +;; Parameter decoding + +(def decode js/decodeURIComponent) + +(defn- parse-path + "Parse a value from a serialized query-string key index. If the + index value is empty 0 is returned, if it's a digit it returns the + js/parseInt value, otherwise it returns the extracted index." + [path] + (let [index-re #"\[([^\]]*)\]*" ;; Capture the index value. + parts (re-seq index-re path)] + (map + (fn [[_ part]] + (cond + (empty? part) 0 + (re-matches #"\d+" part) (js/parseInt part) + :else part)) + parts))) + +(defn- key-parse + "Return a key path for a serialized query-string entry. + + Ex. + + (key-parse \"foo[][a][][b]\") + ;; => (\"foo\" 0 \"a\" 0 \"b\") + " + [k] + (let [re #"([^\[\]]+)((?:\[[^\]]*\])*)?" + [_ key path] (re-matches re k) + parsed-path (when path (parse-path path))] + (cons key parsed-path))) + +(defn- assoc-in-query-params + "Like assoc-in but numbers in path create vectors instead of maps. + + Ex. + + (assoc-in-query-params {} [\"foo\" 0] 1) + ;; => {\"foo\" [1]} + + (assoc-in-query-params {} [\"foo\" 0 \"a\"] 1) + ;; => {\"foo\" [{\"a\" 1}]} + " + [m path v] + (let [heads (fn [xs] + (map-indexed + (fn [i _] + (take (inc i) xs)) + xs)) + hs (heads path) + m (reduce + (fn [m h] + (if (and (or (number? (last h))) + (not (vector? (get-in m (butlast h))))) + (assoc-in m (butlast h) []) + m)) + m + hs)] + (if (zero? (last path)) + (update-in m (butlast path) conj v) + (assoc-in m path v)))) + +(defn decode-query-params + "Extract a map of query parameters from a query string." + [query-string] + (let [parts (string/split query-string #"&") + params (reduce + (fn [m part] + ;; We only want two parts since the part on the right hand side + ;; could potentially contain an =. + (let [[k v] (string/split part #"=" 2)] + (assoc-in-query-params m (key-parse k) (decode v)))) + {} + parts) + params (keywordize-keys params)] + params)) + +;;---------------------------------------------------------------------- +;; Route compilation + +;; The implementation for route compilation was inspired by Clout and +;; modified to suit JavaScript and Secretary. +;; SEE: https://github.com/weavejester/clout + +(defn- re-matches* + "Like re-matches but result is a always vector. If re does not + capture matches then it will return a vector of [m m] as if it had a + single capture. Other wise it maintains consistent behavior with + re-matches. " + [re s] + (let [ms (clojure.core/re-matches re s)] + (when ms + (if (sequential? ms) ms [ms ms])))) + +(def ^:private re-escape-chars + (set "\\.*+|?()[]{}$^")) + +(defn- re-escape [s] + (reduce + (fn [s c] + (if (re-escape-chars c) + (str s \\ c) + (str s c))) + "" + s)) + +(defn- lex* + "Attempt to lex a single token from s with clauses. Each clause is a + pair of [regexp action] where action is a function. regexp is + expected to begin with ^ and contain a single capture. If the + attempt is successful a vector of [s-without-token (action capture)] + is returned. Otherwise the result is nil." + [s clauses] + (some + (fn [[re action]] + (when-let [[m c] (re-find re s)] + [(subs s (count m)) (action c)])) + clauses)) + +(defn- lex-route + "Return a pair of [regex params]. regex is a compiled regular + expression for matching routes. params is a list of route param + names (:*, :id, etc.). " + [s clauses] + (loop [s s pattern "" params []] + (if (seq s) + (let [[s [r p]] (lex* s clauses)] + (recur s (str pattern r) (conj params p))) + [(re-pattern (str \^ pattern \$)) (remove nil? params)]))) + +(defn- compile-route + "Given a route return an instance of IRouteMatches." + [orig-route] + (let [clauses [[#"^\*([^\s.:*/]*)" ;; Splats, named splates + (fn [v] + (let [r "(.*?)" + p (if (seq v) + (keyword v) + :*)] + [r p]))] + [#"^\:([^\s.:*/]+)" ;; Params + (fn [v] + (let [r "([^,;?/]+)" + p (keyword v)] + [r p]))] + [#"^([^:*]+)" ;; Literals + (fn [v] + (let [r (re-escape v)] + [r]))]] + [re params] (lex-route orig-route clauses)] + (reify + IRouteValue + (route-value [this] orig-route) + + IRouteMatches + (route-matches [_ route] + (when-let [[_ & ms] (re-matches* re route)] + (->> (interleave params (map decode ms)) + (partition 2) + (merge-with vector {}))))))) + +;;---------------------------------------------------------------------- +;; Route rendering + +(defn ^:internal render-route* [obj & args] + (when (satisfies? IRenderRoute obj) + (apply render-route obj args))) + +;;---------------------------------------------------------------------- +;; Routes adding/removing + +(def ^:dynamic *routes* + (atom [])) + +(defn add-route! [obj action] + (let [obj (if (string? obj) + (compile-route obj) + obj)] + (swap! *routes* conj [obj action]))) + +(defn remove-route! [obj] + (swap! *routes* + (fn [rs] + (filterv + (fn [[x _]] + (not= x obj)) + rs)))) + +(defn reset-routes! [] + (reset! *routes* [])) + +;;---------------------------------------------------------------------- +;; Route lookup and dispatch + +(defn locate-route [route] + (some + (fn [[compiled-route action]] + (when-let [params (route-matches compiled-route route)] + {:action action :params params :route compiled-route})) + @*routes*)) + +(defn locate-route-value + "Returns original route value as set in defroute when passed a URI path." + [uri] + (-> uri locate-route :route route-value)) + +(defn- prefix + [] + (str (get-config [:prefix]))) + +(defn- uri-without-prefix + [uri] + (string/replace uri (re-pattern (str "^" (prefix))) "")) + +(defn- uri-with-leading-slash + "Ensures that the uri has a leading slash" + [uri] + (if (= "/" (first uri)) + uri + (str "/" uri))) + +(defn dispatch! + "Dispatch an action for a given route if it matches the URI path." + [uri] + (let [[uri-path query-string] (string/split (uri-without-prefix uri) #"\?") + uri-path (uri-with-leading-slash uri-path) + query-params (when query-string + {:query-params (decode-query-params query-string)}) + {:keys [action params]} (locate-route uri-path) + action (or action identity) + params (merge params query-params)] + (action params))) + +(defn invalid-params [params validations] + (reduce (fn [m [key validation]] + (let [value (get params key)] + (if (re-matches validation value) + m + (assoc m key [value validation])))) + {} (partition 2 validations))) + +(defn- params-valid? [params validations] + (empty? (invalid-params params validations))) + +;;---------------------------------------------------------------------- +;; Protocol implementations + +(extend-protocol IRouteMatches + string + (route-matches [this route] + (route-matches (compile-route this) route)) + + js/RegExp + (route-matches [this route] + (when-let [[_ & ms] (re-matches* this route)] + (vec ms))) + + cljs.core/PersistentVector + (route-matches [[route-string & validations] route] + (let [params (route-matches (compile-route route-string) route)] + (when (params-valid? params validations) + params)))) + +(extend-protocol IRouteValue + string + (route-value [this] + (route-value (compile-route this))) + + js/RegExp + (route-value [this] this) + + cljs.core/PersistentVector + (route-value [[route-string & validations]] + (vec (cons (route-value route-string) validations)))) + +(extend-protocol IRenderRoute + string + (render-route + ([this] + (render-route this {})) + ([this params] + (let [{:keys [query-params] :as m} params + a (atom m) + path (.replace this (js/RegExp. ":[^\\s.:*/]+|\\*[^\\s.:*/]*" "g") + (fn [$1] + (let [lookup (keyword (if (= $1 "*") + $1 + (subs $1 1))) + v (get @a lookup) + replacement (if (sequential? v) + (do + (swap! a assoc lookup (next v)) + (encode-uri (first v))) + (if v (encode-uri v) $1))] + replacement))) + path (str (get-config [:prefix]) path)] + (if-let [query-string (and query-params + (encode-query-params query-params))] + (str path "?" query-string) + path)))) + + cljs.core/PersistentVector + (render-route + ([this] + (render-route this {})) + ([[route-string & validations] params] + (let [invalid (invalid-params params validations)] + (if (empty? invalid) + (render-route route-string params) + (throw (ex-info "Could not build route: invalid params" invalid))))))) diff --git a/public/js/rel/secretary/core.js b/public/js/rel/secretary/core.js new file mode 100644 index 0000000..e25a878 --- /dev/null +++ b/public/js/rel/secretary/core.js @@ -0,0 +1,875 @@ +// Compiled by ClojureScript 1.9.562 {:static-fns true, :optimize-constants true} +goog.provide('secretary.core'); +goog.require('cljs.core'); +goog.require('cljs.core.constants'); +goog.require('clojure.string'); +goog.require('clojure.walk'); + +/** + * @interface + */ +secretary.core.IRouteMatches = function(){}; + +secretary.core.route_matches = (function secretary$core$route_matches(this$,route){ +if((!((this$ == null))) && (!((this$.secretary$core$IRouteMatches$route_matches$arity$2 == null)))){ +return this$.secretary$core$IRouteMatches$route_matches$arity$2(this$,route); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (secretary.core.route_matches[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(this$,route) : m__8679__auto__.call(null,this$,route)); +} else { +var m__8679__auto____$1 = (secretary.core.route_matches["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(this$,route) : m__8679__auto____$1.call(null,this$,route)); +} else { +throw cljs.core.missing_protocol("IRouteMatches.route-matches",this$); +} +} +} +}); + + +/** + * @interface + */ +secretary.core.IRouteValue = function(){}; + +secretary.core.route_value = (function secretary$core$route_value(this$){ +if((!((this$ == null))) && (!((this$.secretary$core$IRouteValue$route_value$arity$1 == null)))){ +return this$.secretary$core$IRouteValue$route_value$arity$1(this$); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (secretary.core.route_value[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto__.call(null,this$)); +} else { +var m__8679__auto____$1 = (secretary.core.route_value["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto____$1.call(null,this$)); +} else { +throw cljs.core.missing_protocol("IRouteValue.route-value",this$); +} +} +} +}); + + +/** + * @interface + */ +secretary.core.IRenderRoute = function(){}; + +secretary.core.render_route = (function secretary$core$render_route(var_args){ +var args15064 = []; +var len__9181__auto___15067 = arguments.length; +var i__9182__auto___15068 = (0); +while(true){ +if((i__9182__auto___15068 < len__9181__auto___15067)){ +args15064.push((arguments[i__9182__auto___15068])); + +var G__15069 = (i__9182__auto___15068 + (1)); +i__9182__auto___15068 = G__15069; +continue; +} else { +} +break; +} + +var G__15066 = args15064.length; +switch (G__15066) { +case 1: +return secretary.core.render_route.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return secretary.core.render_route.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args15064.length)].join(''))); + +} +}); + +secretary.core.render_route.cljs$core$IFn$_invoke$arity$1 = (function (this$){ +if((!((this$ == null))) && (!((this$.secretary$core$IRenderRoute$render_route$arity$1 == null)))){ +return this$.secretary$core$IRenderRoute$render_route$arity$1(this$); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (secretary.core.render_route[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto__.call(null,this$)); +} else { +var m__8679__auto____$1 = (secretary.core.render_route["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$1(this$) : m__8679__auto____$1.call(null,this$)); +} else { +throw cljs.core.missing_protocol("IRenderRoute.render-route",this$); +} +} +} +}); + +secretary.core.render_route.cljs$core$IFn$_invoke$arity$2 = (function (this$,params){ +if((!((this$ == null))) && (!((this$.secretary$core$IRenderRoute$render_route$arity$2 == null)))){ +return this$.secretary$core$IRenderRoute$render_route$arity$2(this$,params); +} else { +var x__8678__auto__ = (((this$ == null))?null:this$); +var m__8679__auto__ = (secretary.core.render_route[goog.typeOf(x__8678__auto__)]); +if(!((m__8679__auto__ == null))){ +return (m__8679__auto__.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto__.cljs$core$IFn$_invoke$arity$2(this$,params) : m__8679__auto__.call(null,this$,params)); +} else { +var m__8679__auto____$1 = (secretary.core.render_route["_"]); +if(!((m__8679__auto____$1 == null))){ +return (m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2 ? m__8679__auto____$1.cljs$core$IFn$_invoke$arity$2(this$,params) : m__8679__auto____$1.call(null,this$,params)); +} else { +throw cljs.core.missing_protocol("IRenderRoute.render-route",this$); +} +} +} +}); + +secretary.core.render_route.cljs$lang$maxFixedArity = 2; + + +secretary.core._STAR_config_STAR_ = (function (){var G__15071 = new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$prefix,""], null); +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__15071) : cljs.core.atom.call(null,G__15071)); +})(); +/** + * Gets a value for *config* at path. + */ +secretary.core.get_config = (function secretary$core$get_config(path){ +var path__$1 = ((cljs.core.sequential_QMARK_(path))?path:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [path], null)); +return cljs.core.get_in.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(secretary.core._STAR_config_STAR_) : cljs.core.deref.call(null,secretary.core._STAR_config_STAR_)),path__$1); +}); +/** + * Associates a value val for *config* at path. + */ +secretary.core.set_config_BANG_ = (function secretary$core$set_config_BANG_(path,val){ +var path__$1 = ((cljs.core.sequential_QMARK_(path))?path:new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [path], null)); +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(secretary.core._STAR_config_STAR_,cljs.core.assoc_in,path__$1,val); +}); +secretary.core.encode = encodeURIComponent; +if(typeof secretary.core.encode_pair !== 'undefined'){ +} else { +/** + * Given a key and a value return and encoded key-value pair. + */ +secretary.core.encode_pair = (function (){var method_table__8991__auto__ = (function (){var G__15072 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__15072) : cljs.core.atom.call(null,G__15072)); +})(); +var prefer_table__8992__auto__ = (function (){var G__15073 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__15073) : cljs.core.atom.call(null,G__15073)); +})(); +var method_cache__8993__auto__ = (function (){var G__15074 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__15074) : cljs.core.atom.call(null,G__15074)); +})(); +var cached_hierarchy__8994__auto__ = (function (){var G__15075 = cljs.core.PersistentArrayMap.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__15075) : cljs.core.atom.call(null,G__15075)); +})(); +var hierarchy__8995__auto__ = cljs.core.get.cljs$core$IFn$_invoke$arity$3(cljs.core.PersistentArrayMap.EMPTY,cljs.core.cst$kw$hierarchy,cljs.core.get_global_hierarchy()); +return (new cljs.core.MultiFn(cljs.core.symbol.cljs$core$IFn$_invoke$arity$2("secretary.core","encode-pair"),((function (method_table__8991__auto__,prefer_table__8992__auto__,method_cache__8993__auto__,cached_hierarchy__8994__auto__,hierarchy__8995__auto__){ +return (function (p__15076){ +var vec__15077 = p__15076; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15077,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15077,(1),null); +if((cljs.core.sequential_QMARK_(v)) || (cljs.core.set_QMARK_(v))){ +return cljs.core.cst$kw$secretary$core_SLASH_sequential; +} else { +if((function (){var or__7960__auto__ = cljs.core.map_QMARK_(v); +if(or__7960__auto__){ +return or__7960__auto__; +} else { +if(!((v == null))){ +if(((v.cljs$lang$protocol_mask$partition0$ & (67108864))) || ((cljs.core.PROTOCOL_SENTINEL === v.cljs$core$IRecord$))){ +return true; +} else { +if((!v.cljs$lang$protocol_mask$partition0$)){ +return cljs.core.native_satisfies_QMARK_(cljs.core.IRecord,v); +} else { +return false; +} +} +} else { +return cljs.core.native_satisfies_QMARK_(cljs.core.IRecord,v); +} +} +})()){ +return cljs.core.cst$kw$secretary$core_SLASH_map; +} else { +return null; +} +} +});})(method_table__8991__auto__,prefer_table__8992__auto__,method_cache__8993__auto__,cached_hierarchy__8994__auto__,hierarchy__8995__auto__)) +,cljs.core.cst$kw$default,hierarchy__8995__auto__,method_table__8991__auto__,prefer_table__8992__auto__,method_cache__8993__auto__,cached_hierarchy__8994__auto__)); +})(); +} +secretary.core.key_index = (function secretary$core$key_index(var_args){ +var args15082 = []; +var len__9181__auto___15085 = arguments.length; +var i__9182__auto___15086 = (0); +while(true){ +if((i__9182__auto___15086 < len__9181__auto___15085)){ +args15082.push((arguments[i__9182__auto___15086])); + +var G__15087 = (i__9182__auto___15086 + (1)); +i__9182__auto___15086 = G__15087; +continue; +} else { +} +break; +} + +var G__15084 = args15082.length; +switch (G__15084) { +case 1: +return secretary.core.key_index.cljs$core$IFn$_invoke$arity$1((arguments[(0)])); + +break; +case 2: +return secretary.core.key_index.cljs$core$IFn$_invoke$arity$2((arguments[(0)]),(arguments[(1)])); + +break; +default: +throw (new Error([cljs.core.str.cljs$core$IFn$_invoke$arity$1("Invalid arity: "),cljs.core.str.cljs$core$IFn$_invoke$arity$1(args15082.length)].join(''))); + +} +}); + +secretary.core.key_index.cljs$core$IFn$_invoke$arity$1 = (function (k){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.name(k)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("[]")].join(''); +}); + +secretary.core.key_index.cljs$core$IFn$_invoke$arity$2 = (function (k,index){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.name(k)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("["),cljs.core.str.cljs$core$IFn$_invoke$arity$1(index),cljs.core.str.cljs$core$IFn$_invoke$arity$1("]")].join(''); +}); + +secretary.core.key_index.cljs$lang$maxFixedArity = 2; + +secretary.core.encode_pair.cljs$core$IMultiFn$_add_method$arity$3(null,cljs.core.cst$kw$secretary$core_SLASH_sequential,(function (p__15089){ +var vec__15090 = p__15089; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15090,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15090,(1),null); +var encoded = cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$2(((function (vec__15090,k,v){ +return (function (i,x){ +var pair = ((cljs.core.coll_QMARK_(x))?new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [secretary.core.key_index.cljs$core$IFn$_invoke$arity$2(k,i),x], null):new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [secretary.core.key_index.cljs$core$IFn$_invoke$arity$1(k),x], null)); +return (secretary.core.encode_pair.cljs$core$IFn$_invoke$arity$1 ? secretary.core.encode_pair.cljs$core$IFn$_invoke$arity$1(pair) : secretary.core.encode_pair.call(null,pair)); +});})(vec__15090,k,v)) +,v); +return clojure.string.join.cljs$core$IFn$_invoke$arity$2("&",encoded); +})); +secretary.core.encode_pair.cljs$core$IMultiFn$_add_method$arity$3(null,cljs.core.cst$kw$secretary$core_SLASH_map,(function (p__15093){ +var vec__15094 = p__15093; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15094,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15094,(1),null); +var encoded = cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (vec__15094,k,v){ +return (function (p__15097){ +var vec__15098 = p__15097; +var ik = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15098,(0),null); +var iv = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15098,(1),null); +var G__15101 = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [secretary.core.key_index.cljs$core$IFn$_invoke$arity$2(k,cljs.core.name(ik)),iv], null); +return (secretary.core.encode_pair.cljs$core$IFn$_invoke$arity$1 ? secretary.core.encode_pair.cljs$core$IFn$_invoke$arity$1(G__15101) : secretary.core.encode_pair.call(null,G__15101)); +});})(vec__15094,k,v)) +,v); +return clojure.string.join.cljs$core$IFn$_invoke$arity$2("&",encoded); +})); +secretary.core.encode_pair.cljs$core$IMultiFn$_add_method$arity$3(null,cljs.core.cst$kw$default,(function (p__15102){ +var vec__15103 = p__15102; +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15103,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15103,(1),null); +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(cljs.core.name(k)),cljs.core.str.cljs$core$IFn$_invoke$arity$1("="),cljs.core.str.cljs$core$IFn$_invoke$arity$1((function (){var G__15106 = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(v)].join(''); +return (secretary.core.encode.cljs$core$IFn$_invoke$arity$1 ? secretary.core.encode.cljs$core$IFn$_invoke$arity$1(G__15106) : secretary.core.encode.call(null,G__15106)); +})())].join(''); +})); +/** + * Convert a map of query parameters into url encoded string. + */ +secretary.core.encode_query_params = (function secretary$core$encode_query_params(query_params){ +return clojure.string.join.cljs$core$IFn$_invoke$arity$2("&",cljs.core.map.cljs$core$IFn$_invoke$arity$2(secretary.core.encode_pair,query_params)); +}); +/** + * Like js/encodeURIComponent excepts ignore slashes. + */ +secretary.core.encode_uri = (function secretary$core$encode_uri(uri){ +return clojure.string.join.cljs$core$IFn$_invoke$arity$2("/",cljs.core.map.cljs$core$IFn$_invoke$arity$2(secretary.core.encode,clojure.string.split.cljs$core$IFn$_invoke$arity$2(uri,/\//))); +}); +secretary.core.decode = decodeURIComponent; +/** + * Parse a value from a serialized query-string key index. If the + * index value is empty 0 is returned, if it's a digit it returns the + * js/parseInt value, otherwise it returns the extracted index. + */ +secretary.core.parse_path = (function secretary$core$parse_path(path){ +var index_re = /\[([^\]]*)\]*/; +var parts = cljs.core.re_seq(index_re,path); +return cljs.core.map.cljs$core$IFn$_invoke$arity$2(((function (index_re,parts){ +return (function (p__15111){ +var vec__15112 = p__15111; +var _ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15112,(0),null); +var part = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15112,(1),null); +if(cljs.core.empty_QMARK_(part)){ +return (0); +} else { +if(cljs.core.truth_(cljs.core.re_matches(/\d+/,part))){ +return parseInt(part); +} else { +return part; + +} +} +});})(index_re,parts)) +,parts); +}); +/** + * Return a key path for a serialized query-string entry. + * + * Ex. + * + * (key-parse "foo[][a][][b]") + * ;; => ("foo" 0 "a" 0 "b") + * + */ +secretary.core.key_parse = (function secretary$core$key_parse(k){ +var re = /([^\[\]]+)((?:\[[^\]]*\])*)?/; +var vec__15118 = cljs.core.re_matches(re,k); +var _ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15118,(0),null); +var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15118,(1),null); +var path = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15118,(2),null); +var parsed_path = (cljs.core.truth_(path)?secretary.core.parse_path(path):null); +return cljs.core.cons(key,parsed_path); +}); +/** + * Like assoc-in but numbers in path create vectors instead of maps. + * + * Ex. + * + * (assoc-in-query-params {} ["foo" 0] 1) + * ;; => {"foo" [1]} + * + * (assoc-in-query-params {} ["foo" 0 "a"] 1) + * ;; => {"foo" [{"a" 1}]} + * + */ +secretary.core.assoc_in_query_params = (function secretary$core$assoc_in_query_params(m,path,v){ +var heads = (function (xs){ +return cljs.core.map_indexed.cljs$core$IFn$_invoke$arity$2((function (i,_){ +return cljs.core.take.cljs$core$IFn$_invoke$arity$2((i + (1)),xs); +}),xs); +}); +var hs = heads(path); +var m__$1 = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (heads,hs){ +return (function (m__$1,h){ +if((typeof cljs.core.last(h) === 'number') && (!(cljs.core.vector_QMARK_(cljs.core.get_in.cljs$core$IFn$_invoke$arity$2(m__$1,cljs.core.butlast(h)))))){ +return cljs.core.assoc_in(m__$1,cljs.core.butlast(h),cljs.core.PersistentVector.EMPTY); +} else { +return m__$1; +} +});})(heads,hs)) +,m,hs); +if((cljs.core.last(path) === (0))){ +return cljs.core.update_in.cljs$core$IFn$_invoke$arity$4(m__$1,cljs.core.butlast(path),cljs.core.conj,v); +} else { +return cljs.core.assoc_in(m__$1,path,v); +} +}); +/** + * Extract a map of query parameters from a query string. + */ +secretary.core.decode_query_params = (function secretary$core$decode_query_params(query_string){ +var parts = clojure.string.split.cljs$core$IFn$_invoke$arity$2(query_string,/&/); +var params = cljs.core.reduce.cljs$core$IFn$_invoke$arity$3(((function (parts){ +return (function (m,part){ +var vec__15124 = clojure.string.split.cljs$core$IFn$_invoke$arity$3(part,/=/,(2)); +var k = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15124,(0),null); +var v = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15124,(1),null); +return secretary.core.assoc_in_query_params(m,secretary.core.key_parse(k),(secretary.core.decode.cljs$core$IFn$_invoke$arity$1 ? secretary.core.decode.cljs$core$IFn$_invoke$arity$1(v) : secretary.core.decode.call(null,v))); +});})(parts)) +,cljs.core.PersistentArrayMap.EMPTY,parts); +var params__$1 = clojure.walk.keywordize_keys(params); +return params__$1; +}); +/** + * Like re-matches but result is a always vector. If re does not + * capture matches then it will return a vector of [m m] as if it had a + * single capture. Other wise it maintains consistent behavior with + * re-matches. + */ +secretary.core.re_matches_STAR_ = (function secretary$core$re_matches_STAR_(re,s){ +var ms = cljs.core.re_matches(re,s); +if(cljs.core.truth_(ms)){ +if(cljs.core.sequential_QMARK_(ms)){ +return ms; +} else { +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [ms,ms], null); +} +} else { +return null; +} +}); +secretary.core.re_escape_chars = cljs.core.set("\\.*+|?()[]{}$^"); +secretary.core.re_escape = (function secretary$core$re_escape(s){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (s__$1,c){ +if(cljs.core.truth_((secretary.core.re_escape_chars.cljs$core$IFn$_invoke$arity$1 ? secretary.core.re_escape_chars.cljs$core$IFn$_invoke$arity$1(c) : secretary.core.re_escape_chars.call(null,c)))){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(s__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1("\\"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(c)].join(''); +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(s__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1(c)].join(''); +} +}),"",s); +}); +/** + * Attempt to lex a single token from s with clauses. Each clause is a + * pair of [regexp action] where action is a function. regexp is + * expected to begin with ^ and contain a single capture. If the + * attempt is successful a vector of [s-without-token (action capture)] + * is returned. Otherwise the result is nil. + */ +secretary.core.lex_STAR_ = (function secretary$core$lex_STAR_(s,clauses){ +return cljs.core.some((function (p__15134){ +var vec__15135 = p__15134; +var re = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15135,(0),null); +var action = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15135,(1),null); +var temp__5278__auto__ = cljs.core.re_find(re,s); +if(cljs.core.truth_(temp__5278__auto__)){ +var vec__15138 = temp__5278__auto__; +var m = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15138,(0),null); +var c = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15138,(1),null); +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.subs.cljs$core$IFn$_invoke$arity$2(s,cljs.core.count(m)),(action.cljs$core$IFn$_invoke$arity$1 ? action.cljs$core$IFn$_invoke$arity$1(c) : action.call(null,c))], null); +} else { +return null; +} +}),clauses); +}); +/** + * Return a pair of [regex params]. regex is a compiled regular + * expression for matching routes. params is a list of route param + * names (:*, :id, etc.). + */ +secretary.core.lex_route = (function secretary$core$lex_route(s,clauses){ +var s__$1 = s; +var pattern = ""; +var params = cljs.core.PersistentVector.EMPTY; +while(true){ +if(cljs.core.seq(s__$1)){ +var vec__15147 = secretary.core.lex_STAR_(s__$1,clauses); +var s__$2 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15147,(0),null); +var vec__15150 = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15147,(1),null); +var r = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15150,(0),null); +var p = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15150,(1),null); +var G__15153 = s__$2; +var G__15154 = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(pattern),cljs.core.str.cljs$core$IFn$_invoke$arity$1(r)].join(''); +var G__15155 = cljs.core.conj.cljs$core$IFn$_invoke$arity$2(params,p); +s__$1 = G__15153; +pattern = G__15154; +params = G__15155; +continue; +} else { +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.re_pattern([cljs.core.str.cljs$core$IFn$_invoke$arity$1("^"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(pattern),cljs.core.str.cljs$core$IFn$_invoke$arity$1("$")].join('')),cljs.core.remove.cljs$core$IFn$_invoke$arity$2(cljs.core.nil_QMARK_,params)], null); +} +break; +} +}); +/** + * Given a route return an instance of IRouteMatches. + */ +secretary.core.compile_route = (function secretary$core$compile_route(orig_route){ +var clauses = new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [/^\*([^\s.:*\/]*)/,(function (v){ +var r = "(.*?)"; +var p = ((cljs.core.seq(v))?cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(v):cljs.core.cst$kw$_STAR_); +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [r,p], null); +})], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [/^\:([^\s.:*\/]+)/,(function (v){ +var r = "([^,;?/]+)"; +var p = cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(v); +return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [r,p], null); +})], null),new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [/^([^:*]+)/,(function (v){ +var r = secretary.core.re_escape(v); +return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [r], null); +})], null)], null); +var vec__15165 = secretary.core.lex_route(orig_route,clauses); +var re = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15165,(0),null); +var params = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15165,(1),null); +if(typeof secretary.core.t_secretary$core15168 !== 'undefined'){ +} else { + +/** +* @constructor + * @implements {secretary.core.IRouteValue} + * @implements {cljs.core.IMeta} + * @implements {cljs.core.IWithMeta} + * @implements {secretary.core.IRouteMatches} +*/ +secretary.core.t_secretary$core15168 = (function (orig_route,clauses,vec__15165,re,params,meta15169){ +this.orig_route = orig_route; +this.clauses = clauses; +this.vec__15165 = vec__15165; +this.re = re; +this.params = params; +this.meta15169 = meta15169; +this.cljs$lang$protocol_mask$partition0$ = 393216; +this.cljs$lang$protocol_mask$partition1$ = 0; +}) +secretary.core.t_secretary$core15168.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = ((function (clauses,vec__15165,re,params){ +return (function (_15170,meta15169__$1){ +var self__ = this; +var _15170__$1 = this; +return (new secretary.core.t_secretary$core15168(self__.orig_route,self__.clauses,self__.vec__15165,self__.re,self__.params,meta15169__$1)); +});})(clauses,vec__15165,re,params)) +; + +secretary.core.t_secretary$core15168.prototype.cljs$core$IMeta$_meta$arity$1 = ((function (clauses,vec__15165,re,params){ +return (function (_15170){ +var self__ = this; +var _15170__$1 = this; +return self__.meta15169; +});})(clauses,vec__15165,re,params)) +; + +secretary.core.t_secretary$core15168.prototype.secretary$core$IRouteValue$ = cljs.core.PROTOCOL_SENTINEL; + +secretary.core.t_secretary$core15168.prototype.secretary$core$IRouteValue$route_value$arity$1 = ((function (clauses,vec__15165,re,params){ +return (function (this$){ +var self__ = this; +var this$__$1 = this; +return self__.orig_route; +});})(clauses,vec__15165,re,params)) +; + +secretary.core.t_secretary$core15168.prototype.secretary$core$IRouteMatches$ = cljs.core.PROTOCOL_SENTINEL; + +secretary.core.t_secretary$core15168.prototype.secretary$core$IRouteMatches$route_matches$arity$2 = ((function (clauses,vec__15165,re,params){ +return (function (_,route){ +var self__ = this; +var ___$1 = this; +var temp__5278__auto__ = secretary.core.re_matches_STAR_(self__.re,route); +if(cljs.core.truth_(temp__5278__auto__)){ +var vec__15171 = temp__5278__auto__; +var seq__15172 = cljs.core.seq(vec__15171); +var first__15173 = cljs.core.first(seq__15172); +var seq__15172__$1 = cljs.core.next(seq__15172); +var ___$2 = first__15173; +var ms = seq__15172__$1; +return cljs.core.merge_with.cljs$core$IFn$_invoke$arity$variadic(cljs.core.vector,cljs.core.array_seq([cljs.core.PersistentArrayMap.EMPTY,cljs.core.partition.cljs$core$IFn$_invoke$arity$2((2),cljs.core.interleave.cljs$core$IFn$_invoke$arity$2(self__.params,cljs.core.map.cljs$core$IFn$_invoke$arity$2(secretary.core.decode,ms)))], 0)); +} else { +return null; +} +});})(clauses,vec__15165,re,params)) +; + +secretary.core.t_secretary$core15168.getBasis = ((function (clauses,vec__15165,re,params){ +return (function (){ +return new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$sym$orig_DASH_route,cljs.core.cst$sym$clauses,cljs.core.cst$sym$vec__15165,cljs.core.cst$sym$re,cljs.core.cst$sym$params,cljs.core.cst$sym$meta15169], null); +});})(clauses,vec__15165,re,params)) +; + +secretary.core.t_secretary$core15168.cljs$lang$type = true; + +secretary.core.t_secretary$core15168.cljs$lang$ctorStr = "secretary.core/t_secretary$core15168"; + +secretary.core.t_secretary$core15168.cljs$lang$ctorPrWriter = ((function (clauses,vec__15165,re,params){ +return (function (this__8617__auto__,writer__8618__auto__,opt__8619__auto__){ +return cljs.core._write(writer__8618__auto__,"secretary.core/t_secretary$core15168"); +});})(clauses,vec__15165,re,params)) +; + +secretary.core.__GT_t_secretary$core15168 = ((function (clauses,vec__15165,re,params){ +return (function secretary$core$compile_route_$___GT_t_secretary$core15168(orig_route__$1,clauses__$1,vec__15165__$1,re__$1,params__$1,meta15169){ +return (new secretary.core.t_secretary$core15168(orig_route__$1,clauses__$1,vec__15165__$1,re__$1,params__$1,meta15169)); +});})(clauses,vec__15165,re,params)) +; + +} + +return (new secretary.core.t_secretary$core15168(orig_route,clauses,vec__15165,re,params,cljs.core.PersistentArrayMap.EMPTY)); +}); +secretary.core.render_route_STAR_ = (function secretary$core$render_route_STAR_(var_args){ +var args__9188__auto__ = []; +var len__9181__auto___15177 = arguments.length; +var i__9182__auto___15178 = (0); +while(true){ +if((i__9182__auto___15178 < len__9181__auto___15177)){ +args__9188__auto__.push((arguments[i__9182__auto___15178])); + +var G__15179 = (i__9182__auto___15178 + (1)); +i__9182__auto___15178 = G__15179; +continue; +} else { +} +break; +} + +var argseq__9189__auto__ = ((((1) < args__9188__auto__.length))?(new cljs.core.IndexedSeq(args__9188__auto__.slice((1)),(0),null)):null); +return secretary.core.render_route_STAR_.cljs$core$IFn$_invoke$arity$variadic((arguments[(0)]),argseq__9189__auto__); +}); + +secretary.core.render_route_STAR_.cljs$core$IFn$_invoke$arity$variadic = (function (obj,args){ +if(((!((obj == null)))?(((false) || ((cljs.core.PROTOCOL_SENTINEL === obj.secretary$core$IRenderRoute$)))?true:(((!obj.cljs$lang$protocol_mask$partition$))?cljs.core.native_satisfies_QMARK_(secretary.core.IRenderRoute,obj):false)):cljs.core.native_satisfies_QMARK_(secretary.core.IRenderRoute,obj))){ +return cljs.core.apply.cljs$core$IFn$_invoke$arity$3(secretary.core.render_route,obj,args); +} else { +return null; +} +}); + +secretary.core.render_route_STAR_.cljs$lang$maxFixedArity = (1); + +secretary.core.render_route_STAR_.cljs$lang$applyTo = (function (seq15174){ +var G__15175 = cljs.core.first(seq15174); +var seq15174__$1 = cljs.core.next(seq15174); +return secretary.core.render_route_STAR_.cljs$core$IFn$_invoke$arity$variadic(G__15175,seq15174__$1); +}); + +secretary.core._STAR_routes_STAR_ = (function (){var G__15180 = cljs.core.PersistentVector.EMPTY; +return (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(G__15180) : cljs.core.atom.call(null,G__15180)); +})(); +secretary.core.add_route_BANG_ = (function secretary$core$add_route_BANG_(obj,action){ +var obj__$1 = ((typeof obj === 'string')?secretary.core.compile_route(obj):obj); +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$3(secretary.core._STAR_routes_STAR_,cljs.core.conj,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [obj__$1,action], null)); +}); +secretary.core.remove_route_BANG_ = (function secretary$core$remove_route_BANG_(obj){ +return cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$2(secretary.core._STAR_routes_STAR_,(function (rs){ +return cljs.core.filterv((function (p__15185){ +var vec__15186 = p__15185; +var x = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15186,(0),null); +var _ = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15186,(1),null); +return cljs.core.not_EQ_.cljs$core$IFn$_invoke$arity$2(x,obj); +}),rs); +})); +}); +secretary.core.reset_routes_BANG_ = (function secretary$core$reset_routes_BANG_(){ +var G__15191 = secretary.core._STAR_routes_STAR_; +var G__15192 = cljs.core.PersistentVector.EMPTY; +return (cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2 ? cljs.core.reset_BANG_.cljs$core$IFn$_invoke$arity$2(G__15191,G__15192) : cljs.core.reset_BANG_.call(null,G__15191,G__15192)); +}); +secretary.core.locate_route = (function secretary$core$locate_route(route){ +return cljs.core.some((function (p__15197){ +var vec__15198 = p__15197; +var compiled_route = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15198,(0),null); +var action = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15198,(1),null); +var temp__5278__auto__ = secretary.core.route_matches(compiled_route,route); +if(cljs.core.truth_(temp__5278__auto__)){ +var params = temp__5278__auto__; +return new cljs.core.PersistentArrayMap(null, 3, [cljs.core.cst$kw$action,action,cljs.core.cst$kw$params,params,cljs.core.cst$kw$route,compiled_route], null); +} else { +return null; +} +}),(cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(secretary.core._STAR_routes_STAR_) : cljs.core.deref.call(null,secretary.core._STAR_routes_STAR_))); +}); +/** + * Returns original route value as set in defroute when passed a URI path. + */ +secretary.core.locate_route_value = (function secretary$core$locate_route_value(uri){ +return secretary.core.route_value(cljs.core.cst$kw$route.cljs$core$IFn$_invoke$arity$1(secretary.core.locate_route(uri))); +}); +secretary.core.prefix = (function secretary$core$prefix(){ +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(secretary.core.get_config(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$prefix], null)))].join(''); +}); +secretary.core.uri_without_prefix = (function secretary$core$uri_without_prefix(uri){ +return clojure.string.replace(uri,cljs.core.re_pattern([cljs.core.str.cljs$core$IFn$_invoke$arity$1("^"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(secretary.core.prefix())].join('')),""); +}); +/** + * Ensures that the uri has a leading slash + */ +secretary.core.uri_with_leading_slash = (function secretary$core$uri_with_leading_slash(uri){ +if(cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2("/",cljs.core.first(uri))){ +return uri; +} else { +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1("/"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(uri)].join(''); +} +}); +/** + * Dispatch an action for a given route if it matches the URI path. + */ +secretary.core.dispatch_BANG_ = (function secretary$core$dispatch_BANG_(uri){ +var vec__15206 = clojure.string.split.cljs$core$IFn$_invoke$arity$2(secretary.core.uri_without_prefix(uri),/\?/); +var uri_path = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15206,(0),null); +var query_string = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15206,(1),null); +var uri_path__$1 = secretary.core.uri_with_leading_slash(uri_path); +var query_params = (cljs.core.truth_(query_string)?new cljs.core.PersistentArrayMap(null, 1, [cljs.core.cst$kw$query_DASH_params,secretary.core.decode_query_params(query_string)], null):null); +var map__15209 = secretary.core.locate_route(uri_path__$1); +var map__15209__$1 = ((((!((map__15209 == null)))?((((map__15209.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__15209.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__15209):map__15209); +var action = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__15209__$1,cljs.core.cst$kw$action); +var params = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__15209__$1,cljs.core.cst$kw$params); +var action__$1 = (function (){var or__7960__auto__ = action; +if(cljs.core.truth_(or__7960__auto__)){ +return or__7960__auto__; +} else { +return cljs.core.identity; +} +})(); +var params__$1 = cljs.core.merge.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq([params,query_params], 0)); +return (action__$1.cljs$core$IFn$_invoke$arity$1 ? action__$1.cljs$core$IFn$_invoke$arity$1(params__$1) : action__$1.call(null,params__$1)); +}); +secretary.core.invalid_params = (function secretary$core$invalid_params(params,validations){ +return cljs.core.reduce.cljs$core$IFn$_invoke$arity$3((function (m,p__15215){ +var vec__15216 = p__15215; +var key = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15216,(0),null); +var validation = cljs.core.nth.cljs$core$IFn$_invoke$arity$3(vec__15216,(1),null); +var value = cljs.core.get.cljs$core$IFn$_invoke$arity$2(params,key); +if(cljs.core.truth_(cljs.core.re_matches(validation,value))){ +return m; +} else { +return cljs.core.assoc.cljs$core$IFn$_invoke$arity$3(m,key,new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [value,validation], null)); +} +}),cljs.core.PersistentArrayMap.EMPTY,cljs.core.partition.cljs$core$IFn$_invoke$arity$2((2),validations)); +}); +secretary.core.params_valid_QMARK_ = (function secretary$core$params_valid_QMARK_(params,validations){ +return cljs.core.empty_QMARK_(secretary.core.invalid_params(params,validations)); +}); +(secretary.core.IRouteMatches["string"] = true); + +(secretary.core.route_matches["string"] = (function (this$,route){ +return secretary.core.route_matches(secretary.core.compile_route(this$),route); +})); + +RegExp.prototype.secretary$core$IRouteMatches$ = cljs.core.PROTOCOL_SENTINEL; + +RegExp.prototype.secretary$core$IRouteMatches$route_matches$arity$2 = (function (this$,route){ +var this$__$1 = this; +var temp__5278__auto__ = secretary.core.re_matches_STAR_(this$__$1,route); +if(cljs.core.truth_(temp__5278__auto__)){ +var vec__15219 = temp__5278__auto__; +var seq__15220 = cljs.core.seq(vec__15219); +var first__15221 = cljs.core.first(seq__15220); +var seq__15220__$1 = cljs.core.next(seq__15220); +var _ = first__15221; +var ms = seq__15220__$1; +return cljs.core.vec(ms); +} else { +return null; +} +}); + +cljs.core.PersistentVector.prototype.secretary$core$IRouteMatches$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentVector.prototype.secretary$core$IRouteMatches$route_matches$arity$2 = (function (p__15222,route){ +var vec__15223 = p__15222; +var seq__15224 = cljs.core.seq(vec__15223); +var first__15225 = cljs.core.first(seq__15224); +var seq__15224__$1 = cljs.core.next(seq__15224); +var route_string = first__15225; +var validations = seq__15224__$1; +var vec__15226 = this; +var seq__15227 = cljs.core.seq(vec__15226); +var first__15228 = cljs.core.first(seq__15227); +var seq__15227__$1 = cljs.core.next(seq__15227); +var route_string__$1 = first__15228; +var validations__$1 = seq__15227__$1; +var params = secretary.core.route_matches(secretary.core.compile_route(route_string__$1),route); +if(cljs.core.truth_(secretary.core.params_valid_QMARK_(params,validations__$1))){ +return params; +} else { +return null; +} +}); +(secretary.core.IRouteValue["string"] = true); + +(secretary.core.route_value["string"] = (function (this$){ +return secretary.core.route_value(secretary.core.compile_route(this$)); +})); + +RegExp.prototype.secretary$core$IRouteValue$ = cljs.core.PROTOCOL_SENTINEL; + +RegExp.prototype.secretary$core$IRouteValue$route_value$arity$1 = (function (this$){ +var this$__$1 = this; +return this$__$1; +}); + +cljs.core.PersistentVector.prototype.secretary$core$IRouteValue$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentVector.prototype.secretary$core$IRouteValue$route_value$arity$1 = (function (p__15229){ +var vec__15230 = p__15229; +var seq__15231 = cljs.core.seq(vec__15230); +var first__15232 = cljs.core.first(seq__15231); +var seq__15231__$1 = cljs.core.next(seq__15231); +var route_string = first__15232; +var validations = seq__15231__$1; +var vec__15233 = this; +var seq__15234 = cljs.core.seq(vec__15233); +var first__15235 = cljs.core.first(seq__15234); +var seq__15234__$1 = cljs.core.next(seq__15234); +var route_string__$1 = first__15235; +var validations__$1 = seq__15234__$1; +return cljs.core.vec(cljs.core.cons(secretary.core.route_value(route_string__$1),validations__$1)); +}); +(secretary.core.IRenderRoute["string"] = true); + +(secretary.core.render_route["string"] = (function() { +var G__15245 = null; +var G__15245__1 = (function (this$){ +return secretary.core.render_route.cljs$core$IFn$_invoke$arity$2(this$,cljs.core.PersistentArrayMap.EMPTY); +}); +var G__15245__2 = (function (this$,params){ +var map__15236 = params; +var map__15236__$1 = ((((!((map__15236 == null)))?((((map__15236.cljs$lang$protocol_mask$partition0$ & (64))) || ((cljs.core.PROTOCOL_SENTINEL === map__15236.cljs$core$ISeq$)))?true:false):false))?cljs.core.apply.cljs$core$IFn$_invoke$arity$2(cljs.core.hash_map,map__15236):map__15236); +var m = map__15236__$1; +var query_params = cljs.core.get.cljs$core$IFn$_invoke$arity$2(map__15236__$1,cljs.core.cst$kw$query_DASH_params); +var a = (cljs.core.atom.cljs$core$IFn$_invoke$arity$1 ? cljs.core.atom.cljs$core$IFn$_invoke$arity$1(m) : cljs.core.atom.call(null,m)); +var path = this$.replace((new RegExp(":[^\\s.:*/]+|\\*[^\\s.:*/]*","g")),((function (map__15236,map__15236__$1,m,query_params,a){ +return (function ($1){ +var lookup = cljs.core.keyword.cljs$core$IFn$_invoke$arity$1(((cljs.core._EQ_.cljs$core$IFn$_invoke$arity$2($1,"*"))?$1:cljs.core.subs.cljs$core$IFn$_invoke$arity$2($1,(1)))); +var v = cljs.core.get.cljs$core$IFn$_invoke$arity$2((cljs.core.deref.cljs$core$IFn$_invoke$arity$1 ? cljs.core.deref.cljs$core$IFn$_invoke$arity$1(a) : cljs.core.deref.call(null,a)),lookup); +var replacement = ((cljs.core.sequential_QMARK_(v))?(function (){ +cljs.core.swap_BANG_.cljs$core$IFn$_invoke$arity$4(a,cljs.core.assoc,lookup,cljs.core.next(v)); + +return secretary.core.encode_uri(cljs.core.first(v)); +})() +:(cljs.core.truth_(v)?secretary.core.encode_uri(v):$1)); +return replacement; +});})(map__15236,map__15236__$1,m,query_params,a)) +); +var path__$1 = [cljs.core.str.cljs$core$IFn$_invoke$arity$1(secretary.core.get_config(new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.cst$kw$prefix], null))),cljs.core.str.cljs$core$IFn$_invoke$arity$1(path)].join(''); +var temp__5276__auto__ = (function (){var and__7948__auto__ = query_params; +if(cljs.core.truth_(and__7948__auto__)){ +return secretary.core.encode_query_params(query_params); +} else { +return and__7948__auto__; +} +})(); +if(cljs.core.truth_(temp__5276__auto__)){ +var query_string = temp__5276__auto__; +return [cljs.core.str.cljs$core$IFn$_invoke$arity$1(path__$1),cljs.core.str.cljs$core$IFn$_invoke$arity$1("?"),cljs.core.str.cljs$core$IFn$_invoke$arity$1(query_string)].join(''); +} else { +return path__$1; +} +}); +G__15245 = function(this$,params){ +switch(arguments.length){ +case 1: +return G__15245__1.call(this,this$); +case 2: +return G__15245__2.call(this,this$,params); +} +throw(new Error('Invalid arity: ' + (arguments.length - 1))); +}; +G__15245.cljs$core$IFn$_invoke$arity$1 = G__15245__1; +G__15245.cljs$core$IFn$_invoke$arity$2 = G__15245__2; +return G__15245; +})() +); + +cljs.core.PersistentVector.prototype.secretary$core$IRenderRoute$ = cljs.core.PROTOCOL_SENTINEL; + +cljs.core.PersistentVector.prototype.secretary$core$IRenderRoute$render_route$arity$1 = (function (this$){ +var this$__$1 = this; +return secretary.core.render_route.cljs$core$IFn$_invoke$arity$2(this$__$1,cljs.core.PersistentArrayMap.EMPTY); +}); + +cljs.core.PersistentVector.prototype.secretary$core$IRenderRoute$render_route$arity$2 = (function (p__15238,params){ +var vec__15239 = p__15238; +var seq__15240 = cljs.core.seq(vec__15239); +var first__15241 = cljs.core.first(seq__15240); +var seq__15240__$1 = cljs.core.next(seq__15240); +var route_string = first__15241; +var validations = seq__15240__$1; +var vec__15242 = this; +var seq__15243 = cljs.core.seq(vec__15242); +var first__15244 = cljs.core.first(seq__15243); +var seq__15243__$1 = cljs.core.next(seq__15243); +var route_string__$1 = first__15244; +var validations__$1 = seq__15243__$1; +var invalid = secretary.core.invalid_params(params,validations__$1); +if(cljs.core.empty_QMARK_(invalid)){ +return secretary.core.render_route.cljs$core$IFn$_invoke$arity$2(route_string__$1,params); +} else { +throw cljs.core.ex_info.cljs$core$IFn$_invoke$arity$2("Could not build route: invalid params",invalid); +} +}); diff --git a/public/manifest.json b/public/manifest.json new file mode 100644 index 0000000..0cb94cd --- /dev/null +++ b/public/manifest.json @@ -0,0 +1,22 @@ +{ + "name": "Identity Hash", + "short_name": "Ident Hash", + "start_url": "/", + "theme_color": "#5764C6", + "background_color": "#5764C6", + "orientation": "portrait", + "display": "standalone", + "icons": [{ + "src": "/images/favicon.png", + "type": "image/png", + "sizes": "128x128" + }, { + "src": "/images/logo-id-144.png", + "type": "image/png", + "sizes": "144x144" + }, { + "src": "/images/logo-id-192.png", + "type": "image/png", + "sizes": "192x192" + }] +} diff --git a/public/og.html b/public/og.html new file mode 100644 index 0000000..fb30fbb --- /dev/null +++ b/public/og.html @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/public/others/pjs-config.json b/public/others/pjs-config.json new file mode 100644 index 0000000..12b3e12 --- /dev/null +++ b/public/others/pjs-config.json @@ -0,0 +1,110 @@ +{ + "particles": { + "number": { + "value": 60, + "density": { + "enable": true, + "value_area": 777 + } + }, + "color": { + "value": "#ffffff" + }, + "shape": { + "type": "circle", + "stroke": { + "width": 0, + "color": "#000000" + }, + "polygon": { + "nb_sides": 6 + }, + "image": { + "src": "img/github.svg", + "width": 100, + "height": 100 + } + }, + "opacity": { + "value": 0.4, + "random": false, + "anim": { + "enable": false, + "speed": 1, + "opacity_min": 0.1, + "sync": false + } + }, + "size": { + "value": 3, + "random": true, + "anim": { + "enable": false, + "speed": 40, + "size_min": 0.1, + "sync": false + } + }, + "line_linked": { + "enable": true, + "distance": 190, + "color": "#ffffff", + "opacity": 0.314, + "width": 1 + }, + "move": { + "enable": true, + "speed": 6, + "direction": "none", + "random": false, + "straight": false, + "out_mode": "out", + "bounce": false, + "attract": { + "enable": false, + "rotateX": 600, + "rotateY": 1200 + } + } + }, + "interactivity": { + "detect_on": "canvas", + "events": { + "onhover": { + "enable": false, + "mode": "repulse" + }, + "onclick": { + "enable": false, + "mode": "push" + }, + "resize": true + }, + "modes": { + "grab": { + "distance": 400, + "line_linked": { + "opacity": 1 + } + }, + "bubble": { + "distance": 400, + "size": 40, + "duration": 2, + "opacity": 8, + "speed": 3 + }, + "repulse": { + "distance": 200, + "duration": 0.4 + }, + "push": { + "particles_nb": 4 + }, + "remove": { + "particles_nb": 2 + } + } + }, + "retina_detect": true +} diff --git a/src/alchemy/components/home.cljs b/src/alchemy/components/home.cljs new file mode 100644 index 0000000..00170cf --- /dev/null +++ b/src/alchemy/components/home.cljs @@ -0,0 +1,189 @@ +(ns alchemy.components.home + (:require [reagent.core :as reagent] + [alchemy.partials :as partials])) + +(defn section-home [] + [:div#home + [:div#particles-js] + [:div.ui.container + [:div.wow.fadeInDown + [:h1.ui.header.wow.fadeInDown "Identity Hash" + [:div.sub.header + "Seamless identity verification and payment solutions." [:br] + "An identity for each individual + an e-wallet for the masses."]]] + [:div.wow.fadeInUp [:a.ui.inverted.large.basic.button {:data-scroll "" :href "/#get-identity"} "Get the app now"]]]]) + +(defn section-about [] + [:div#about + [:div.ui.container + [:div.ui.grid + [:div.two.column.row + [:div.column.wow.fadeInLeft + [:img.ui.centered.image {:alt "about" :src "/images/import/about.png"}]] + [:div.column.wow.fadeInRight + [:h2.ui.header "Platform for the Billions"] + [:p "Identity Hash is a platform where users from different walks of life get an equal identity. An identity that will give them a chance, a voice to be heard, be known, and be secured. We're connecting different channels like government, private institutions and some international consensus to simplify and automate the process of identity verification. By doing this we give voice to people that are not being listed, to be known and have an identity and for those under bank to have secure way of connecting to the future."]]] + [:div.three.column.row + [:div.column.wow.fadeInLeft + [:h2.ui.header "For Developers"] + [:p "A platform for developers made by developers. Developers can connect to the APIs to create their own platform that rely in secure identity verification platform. We love developers and open-source."]] + [:div.column.wow.fadeInUp + [:h2.ui.header "For Businesses"] + [:p " This is the right platform for identity verification and payment solution as we will help you scale up and keep your perimeter secure. Transaction privacy and automation will keep your services fast and secure."]] + [:div.column.wow.fadeInRight + [:h2.ui.header "For Everyone"] + [:p "It is built for everyone in regards of race, color, nationality, gender, and personal views. All data will be keep in a semi-decentralized cloud servers and will be kept in watch 24/7. We value your privacy."]]] + [:div.one.column.row + [:div.column]]]]]) + +(defn section-features [] + [:section + [:div#feature1 + [:div.ui.container + [:div.ui.two.column.grid + [:div.column.wow.fadeInLeft + [:h2.ui.header "Ease Identity Verification"] + [:p "User are given multiple options to verify their identity, one of it is through KYC (Know Your Customer) process."]] + [:div.column.wow.fadeInRight + [:img.ui.centered.image {:alt "feature_1" :src "/images/import/feature_1.png"}]]]]] + [:div#feature2 + [:div.ui.container + [:div.ui.two.column.grid + [:div.column.wow.fadeInLeft + [:img.ui.centered.image {:alt "feature_2" :src "/images/import/feature_2.png"}]] + [:div.column.wow.fadeInRight + [:h2.ui.header "Immutable Transactions"] + [:p "All transactions are stored on a decentralized immutable transaction ledger."]]]]] + [:div#feature3 + [:div.ui.container + [:div.ui.two.column.grid + [:div.column.wow.fadeInLeft + [:h2.ui.header "Scale Up"] + [:p "From small medium enterprise to large corporate retail establishments, can now receive payments and issue digital receipts without the need for cash registers."]] + [:div.column.wow.fadeInRight + [:img.ui.centered.image {:alt "feature_3" :src "/images/import/feature_3.png"}]]]]] + [:div#feature4 + [:div.ui.container + [:div.ui.two.column.grid + [:div.column.wow.fadeInLeft + [:img.ui.centered.image {:alt "feature_4" :src "/images/import/feature_4.png"}]] + [:div.column.wow.fadeInRight + [:h2.ui.header "Seamless Money Transfer"] + [:p "Sending and receiving money can now be done with a tap of your phone."]]]]] + [:div#feature5 + [:div.ui.container + [:div.ui.two.column.grid + [:div.column.wow.fadeInLeft + [:h2.ui.header "Track Spendings"] + [:p "Analyze and track your expenditure based on your transaction logs."]] + [:div.column.wow.fadeInRight + [:img.ui.centered.image {:alt "feature_5" :src "/images/import/feature_5.png"}]]]]]]) + +(defn section-enterprise [] + [:div#enterprise + [:div.ui.container + [:div.ui.grid.wow.fadeInUp + [:div.row + [:div.column [:h2.ui.header "We're Enterprise Ready!"]]] + [:div.two.column.row + [:div.column + [:img.ui.centered.image {:alt "automation" :src "/images/import/automation.png"}] + [:h2.ui.header "Automate & Streamline"] + [:p "Automate batch processing of transactions with a push of a button. Also, create reports base on generated analytics and streamline the long process of identity verification that may take several days to just minutes."]] + [:div.column + [:img.ui.centered.image {:alt "data_driven" :src "/images/import/data_driven.png"}] + [:h2.ui.header "Data Driven APIs"] + [:p "Connect to our APIs and create your own platform that rely in a secure identity verification platform. All transactions that will be created will be kept in a secure place for auditing and generating reports. We will assure the data you get is validated and secured."]]] + [:div.three.column.row + [:div.column] + [:div.column + [:a.ui.inverted.fluid.massive.basic.button {:data-scroll "" :href "https://calendly.com/identity-hash/product-demo"} + [:i.calendar.icon] + "Book a Demo"]] + [:div.column]]]]]) + +(defn section-topup [] + [:div#topup + [:div.ui.container.wow.fadeInUp + [:img.ui.centered.image {:alt "topup" :src "/images/import/topup.png"}]]]) + +(defn section-consumers [] + [:div#consumers + [:div.ui.container + [:div.ui.three.column.grid + [:div.three.column.row + [:div.column.wow.fadeInLeft + [:section + [:img.ui.centered.image {:alt "consumers_1" :src "/images/import/consumers_1.png"}] + [:h2.ui.header "Put The Power In Your Hands"] + [:p "Automate and track every transaction within the reach of your hands. Consumers can schedule payment transaction and create a freeze account that will limit transactions per day."]]] + [:div.column.wow.fadeInUp + [:img.ui.centered.image {:alt "iphone_mockup" :src "/images/import/iphone_mockup.png"}]] + [:div.column.wow.fadeInRight + [:section + [:img.ui.centered.image {:alt "consumers_2" :src "/images/import/consumers_2.png"}] + [:h2.ui.header "First Class Customer Support"] + [:p "We dedicate first class support on all our consumers. We value each customers privacy and security. All feedback and issue will be track and be valued."]]]]]] + [section-topup]]) + +(defn section-get-identity [] + [:div#get-identity + [:div.ui.container + [:div.ui.two.column.grid + [:div.column.wow.fadeInUp + [:h2.ui.header "Get Identity"] + [:p "Identity Hash is now available on both Google Play and App Store."] + [:nav.ui.horizontal.list + [:a.item [:img.ui.image {:alt "google_play_badge" :src "/images/google_play_badge.png"}]] + [:a.item [:img.ui.image {:alt "app_store_badge" :src "/images/app_store_badge.png"}]]]] + [:div.column.wow.fadeInRight + [:img.ui.centered.image {:alt "get-identity" :src "/images/import/get-identity.png"}]]]]]) + +(defn section-meet-sophia [] + [:div#meet-sophia + [:div.ui.container + [:div.ui.two.column.grid + [:div.column.wow.fadeInLeft + [:h2.ui.header "Meet Sophia"] + [:p "Use our integrated system to check your wallet balance using your favorite messaging app. Now, you can do transaction inside Facebook Messenger app."] + [:ul + [:li "Use Messenger Codes to verify a persons identity"] + [:li "Verify other persons identity"] + [:li "Check your wallet balance"] + [:li "Contact our support help desk"] + [:li "Submit feedback"]] + [:a.ui.violet.large.basic.button {:href "https://m.me/identity.hash"} "Start using Messenger now"]] + [:div.column.wow.fadeInRight + [:img.ui.centered.image {:alt "messenger_mock" :src "/images/messenger_mock.gif"}]]]]]) + +(defn section-investors [] + [:div#investors + [:div.ui.container.wow.fadeInUp + [:h2.ui.header "Partners & Investors"] + [:div.ui.container + [:a.swap {:href "/"} + [:img.ui.centered.large.image {:alt "logo-ovh-gray" :src "/images/logo-ovh-avec-gray.png"}] + [:img.ui.centered.large.image {:alt "logo-ovh-colored" :src "/images/logo-ovh-avec-colored.png"}]]]]]) + +(defn view-did-mount [] + (.load js/particlesJS "particles-js" "/others/pjs-config.json") + (.init (js/WOW.))) + +(defn view-render [] + [:div.alchemy.root + [partials/header-partial-view] + [:main.alchemy.content + [section-home] + [section-about] + [section-features] + [section-enterprise] + [section-consumers] + [section-get-identity] + [section-meet-sophia] + [section-investors]] + [partials/footer-partial-view]]) + +(defn view [] + (reagent/create-class + {:component-did-mount view-did-mount + :reagent-render view-render})) diff --git a/src/alchemy/components/privacy.cljs b/src/alchemy/components/privacy.cljs new file mode 100644 index 0000000..d59bc16 --- /dev/null +++ b/src/alchemy/components/privacy.cljs @@ -0,0 +1,144 @@ +(ns alchemy.components.privacy + (:require [reagent.core :as reagent] + [alchemy.partials :as partials])) + +(defn policy-summary [] + [:div.ui.basic.segment + [:h2.ui.center.aligned.header "POLICY SUMMARY"] + [:div.ui.section.divider] + [:h3.ui.header "Personal Data collected for the following purposes and using the following services:"] + [:div.ui.stackable.two.column.grid + [:div.column>h4.ui.header + [:i.user.icon] + [:div.content + "Access to third party accounts" + [:div.sub.header + [:h5.ui.grey.header "Facebook account access"] + "Permissions: About Me, Access Friend Lists, Birthday, Email and Publish App Activity"]]] + [:div.column>h4.ui.header + [:i.line.chart.icon] + [:div.content + "Analytics" + [:div.sub.header + [:h5.ui.grey.header "Analytics collected directly"] + "Personal Data: Cookies and Usage Data"]]] + [:div.column>h4.ui.header + [:i.mail.icon] + [:div.content + "Contacting the user" + [:div.sub.header + [:h5.ui.grey.header "Contact form"] + "Personal Data: city, country, email address, first name and last name"]]] + [:div.column>h4.ui.header + [:i.map.icon] + [:div.content + "Location-based interactions" + [:div.sub.header + [:h5.ui.grey.header "Geolocation"] + "Personal Data: geographic position"]]]]]) + +(defn policy-full [] + [:div.ui.basic.segment + [:h2.ui.center.aligned.header "FULL POLICY"] + [:div.ui.section.divider] + [:h3.ui.header "Data Controller and Owner"] + [:div.ui.basic.segment + [:h4.ui.header "Types of Data collected"] + [:div.ui.justified.container + "Among the types of Personal Data that this Application collects, by itself or through third parties, there are: Cookies, Usage Data, first name, last name, country, email address, city and geographic position."[:br][:br] + "Other Personal Data collected may be described in other sections of this privacy policy or by dedicated explanation text contextually with the Data collection."[:br] + "The Personal Data may be freely provided by the User, or collected automatically when using this Application."[:br][:br] + "Any use of Cookies - or of other tracking tools - by this Application or by the owners of third party services used by this Application, unless stated otherwise, serves to identify Users and remember their preferences, for the sole purpose of providing the service required by the User."[:br][:br] + "Failure to provide certain Personal Data may make it impossible for this Application to provide its services."[:br][:br] + "Users are responsible for any Personal Data of third parties obtained, published or shared through this Application and confirm that they have the third party's consent to provide the Data to the Owner."]] + [:div.ui.section.divider] + [:div.ui.basic.segment + [:h4.ui.header "Mode and place of processing the Data"] + [:div.ui.basic.segment + [:h5.ui.grey.header "Methods of processing"] + [:div.ui.justified.container + "The Data Controller processes the Data of Users in a proper manner and shall take appropriate security measures to prevent unauthorized access, disclosure, modification, or unauthorized destruction of the Data."[:br][:br] + "The Data processing is carried out using computers and/or IT enabled tools, following organizational procedures and modes strictly related to the purposes indicated. In addition to the Data Controller, in some cases, the Data may be accessible to certain types of persons in charge, involved with the operation of the site (administration, sales, marketing, legal, system administration) or external parties (such as third party technical service providers, mail carriers, hosting providers, IT companies, communications agencies) appointed, if necessary, as Data Processors by the Owner. The updated list of these parties may be requested from the Data Controller at any time."] + [:h5.ui.grey.header "Place"] + [:div.ui.justified.container + "The Data is processed at the Data Controller's operating offices and in any other places where the parties involved with the processing are located. For further information, please contact the Data Controller."] + [:h5.ui.grey.header "Retention time"] + [:div.ui.justified.container + "The Data is kept for the time necessary to provide the service requested by the User, or stated by the purposes outlined in this document, and the User can always request that the Data Controller suspend or remove the data."]]] + [:div.ui.section.divider] + [:div.ui.basic.segment + [:h4.ui.header "The use of the collected Data"] + [:div.ui.justified.container + "The Data concerning the User is collected to allow the Owner to provide its services, as well as for the following purposes: Access to third party accounts, Analytics, Contacting the User and Location-based interactions."[:br][:br] + "The Personal Data used for each purpose is outlined in the specific sections of this document."]] + [:div.ui.section.divider] + [:div.ui.basic.segment + [:h4.ui.header "Facebook permissions asked by this Application"] + [:div.ui.justified.container + "This Application may ask for some Facebook permissions allowing it to perform actions with the User's Facebook account and to retrieve information, including Personal Data, from it. For more information about the following permissions, refer to the Facebook permissions documentation and to the Facebook privacy policy."[:br] + "The permissions asked are the following:"] + [:div.ui.basic.segment + [:h5.ui.grey.header "Basic information"] + [:div.ui.justified.container + "By default, this includes certain User’s Data such as id, name, picture, gender, and their locale. Certain connections of the User, such as the Friends, are also available. If the User has made more of their Data public, more information will be available."] + [:h5.ui.grey.header "About Me"] + [:div.ui.justified.container + "Provides access to the 'About Me' section of the profile."] + [:h5.ui.grey.header "Access Friend Lists"] + [:div.ui.justified.container + "Provides access to any friend lists the User created."] + [:h5.ui.grey.header "Birthday"] + [:div.ui.justified.container + "Provides access to the birthday."] + [:h5.ui.grey.header "Email"] + [:div.ui.justified.container + "Provides access to the User's primary email address."] + [:h5.ui.grey.header "Publish App Activity"] + [:div.ui.justified.container + "Allows the app to publish to the Open Graph using Built-in Actions, Achievements, Scores, or Custom Actions. The app can also publish other activity which is detailed in the Facebook's Publishing Permissions document."]]] + [:div.ui.section.divider] + [:div.ui.basic.segment + [:h4.ui.header "Additional information about Data collection and processing"] + [:div.ui.basic.segment + [:h5.ui.grey.header "Legal action"] + [:div.ui.justified.container + "The User's Personal Data may be used for legal purposes by the Data Controller, in Court or in the stages leading to possible legal action arising from improper use of this Application or the related services."[:br] + "The User declares to be aware that the Data Controller may be required to reveal personal data upon request of public authorities."] + [:h5.ui.grey.header "Additional information about User's Personal Data"] + [:div.ui.justified.container + "In addition to the information contained in this privacy policy, this Application may provide the User with additional and contextual information concerning particular services or the collection and processing of Personal Data upon request."] + [:h5.ui.grey.header "System logs and maintenance"] + [:div.ui.justified.container + "For operation and maintenance purposes, this Application and any third party services may collect files that record interaction with this Application (System logs) or use for this purpose other Personal Data (such as IP Address)."] + [:h5.ui.grey.header "Information not contained in this policy"] + [:div.ui.justified.container + "More details concerning the collection or processing of Personal Data may be requested from the Data Controller at any time. Please see the contact information at the beginning of this document."] + [:h5.ui.grey.header "The rights of Users"] + [:div.ui.justified.container + "Users have the right, at any time, to know whether their Personal Data has been stored and can consult the Data Controller to learn about their contents and origin, to verify their accuracy or to ask for them to be supplemented, cancelled, updated or corrected, or for their transformation into anonymous format or to block any data held in violation of the law, as well as to oppose their treatment for any and all legitimate reasons. Requests should be sent to the Data Controller at the contact information set out above."[:br] + "This Application does not support “Do Not Track” requests."[:br] + "To determine whether any of the third party services it uses honor the “Do Not Track” requests, please read their privacy policies."] + [:h5.ui.grey.header "Changes to this privacy policy"] + [:div.ui.justified.container + "The Data Controller reserves the right to make changes to this privacy policy at any time by giving notice to its Users on this page. It is strongly recommended to check this page often, referring to the date of the last modification listed at the bottom. If a User objects to any of the changes to the Policy, the User must cease using this Application and can request that the Data Controller remove the Personal Data. Unless stated otherwise, the then-current privacy policy applies to all Personal Data the Data Controller has about Users."]]] + [:div.ui.section.divider] + [:div.ui.basic.segment + [:h4.ui.header "Contact us"] + "If there are any questions regarding this privacy policy, you may contact us using the information below. Series of May 5, 2017."]]) + +(defn view-render [] + [:div.alchemy.root + [partials/header-partial-view] + [:main.alchemy.content + [:div#privacy.ui.container + [:h1.ui.header "Privacy Policy"] + [:div.ui.divider] + [policy-summary] + [:div.ui.divider] + [policy-full] + [:div.ui.divider]]] + [partials/footer-partial-view]]) + +(defn view [] + (reagent/create-class + {:reagent-render view-render})) diff --git a/src/alchemy/components/terms.cljs b/src/alchemy/components/terms.cljs new file mode 100644 index 0000000..5dcb4da --- /dev/null +++ b/src/alchemy/components/terms.cljs @@ -0,0 +1,113 @@ +(ns alchemy.components.terms + (:require [reagent.core :as reagent] + [alchemy.partials :as partials])) + +(defn terms-of-use [] + [:section + [:h1.ui.header "Terms of Use"] + [:div.ui.divider] + [:div.ui.justified.container + "PLEASE READ THESE TERMS OF SERVICE CAREFULLY AS THEY CONTAIN IMPORTANT INFORMATION REGARDING YOUR LEGAL RIGHTS, REMEDIES AND OBLIGATIONS. THESE INCLUDE VARIOUS LIMITATIONS AND EXCLUSIONS, A CLAUSE THAT GOVERNS THE JURISDICTION AND VENUE OF DISPUTES, AND OBLIGATIONS TO COMPLY WITH APPLICABLE LAWS AND REGULATIONS."] + [:div.ui.divider] + [:div.ui.justified.container + "The following Terms of Use govern the access, viewing or use by you (hereinafter referred to as the 'User' or 'You') of Identity Hash's application services (hereinafter referred to as the 'Application' or 'Site') and Application Program Interface (hereinafter referred to as the 'API') and all its related features and functionalities (hereinafter referred to as the 'Service'). The Application and API are owned and operated by Identity Hash, LLC., a company with its registered office at Calle Estacion, Makati City, Philippines (hereinafter referred to as the 'Company')."[:br][:br] + "By accepting the terms herein, or by accessing, viewing or using the Application, you agree to be bound by these Terms of Use and they constitute your binding legal obligations towards the Company. These Terms of Use may be modified at any time by the Company by posting the changes on the website and you agree that it shall be your responsibility to ascertain the changes to the Terms of Use by visiting the Terms of Use from time to time. Any modified terms shall be applicable to your use of the Application without need for any further consent. If you do not agree to the Terms of Use, you should not access, view or use the Application."] + [:div.ui.basic.segment + [:h4.ui.grey.header "1. Key Terms"] + [:div [:b "Privacy policy"] " shall mean the " [:a {:href "/#/privacy"} "Privacy Policy"] "."] + [:div [:b "User"] " or " [:b "You"] " shall include any individual who is registered as a User in accordance with these Terms of Use."] + [:div [:b "User Information"] " shall mean any information provided by the User via the Application including but not limited to name, date of birth, identity proof, telephone number, email address, physical address, employment documents and other similar details."] + [:div [:b "Terms of Use"] " shall mean the terms of use contained herein."] + [:h4.ui.grey.header "2. API and Services Access"] + [:div + "Business partners may access their data via API. Any use of the API, including use of the API through a third-party product that accesses the Service, is bound by the terms of this agreement plus the following specific terms:" + [:ul + [:li "You expressly understand and agree that the Company shall not be liable for any damages or losses resulting from your use of the API or third-party products that access data via the API."] + [:li "Abuse or excessively frequent requests to the Service via the API may result in the temporary or permanent suspension of your account's access to the API. The Company, in its sole discretion, will determine abuse or excessive usage of the API. The Company will make a reasonable attempt via email to warn the account owner prior to suspension."]]] + [:h4.ui.grey.header "3. Application Access and User Registration"] + [:div.ui.justified.container + "You agree and understand that this application and the contents are intended for people who are of the age of 18 years or above. You hereby represent that you are 18 years of age or above and competent to contract or that you are represented by a parent or your legal guardian. You understand that this Application is intended for individual personal use only."[:br][:br] + "To the extent that you are required to provide information in order to use the Application, you understand and undertake that you will provide accurate information including User Information as part of the sign up and application process."[:br][:br] + "To the extent that you have provided information to use the Application, you represent that you have all rights required to provide the information that you have provided to the Application, including the User Information and represent that it is true and accurate."[:br][:br] + "All User Information will be used and processed in accordance with these Terms of Use and the Privacy Policy. You acknowledge and agree that you have been provided with unrestricted access to the Privacy Policy and that it is your responsibility to read and understand the Privacy Policy. In the event you disagree with anything set forth in the Privacy Policy, it is your responsibility to bring it to the Company's notice using the notification mechanism set out in the Privacy Policy."[:br][:br] + "You hereby grant the Company has the right to use the User Information for the furtherance of this Terms of Use and to store it and use it in a manner (either singularly or as an aggregate with information provided by other users on the Application) that improves features and functionalities of the Application or for undertaking any other analytics in relation to such information."[:br][:br] + "You will be solely responsible for your acts on the Application including those conducted under the username assigned to you."[:br] + "You understand and agree that the Company may, in its sole discretion, terminate your access to the Application without notice and you waive any right to claim access to the Application or any other claim that you may have. Any data of your usage may be retained or deleted at the Company's sole discretion."] + [:h4.ui.grey.header "4. Prohibited Use"] + [:div + "In relation to the use and access of the Application its content and features, you agree and undertake not to:" + [:ul + [:li "re-sell the usage or services of the Application;"] + [:li "upload, transmit or publish any information on behalf of a third party, including any User Information of any person other than you;"] + [:li "impersonate another person;"] + [:li "upload, transmit, email or publish any information or material which is harmful, threatening, abusive, libelous, obscene, derogatory (in any form), defamatory or libelous, discriminatory;"] + [:li "racially or ethnically objectionable or contains pornography or encourages money laundering or gambling;"] + [:li "violate the privacy of any person;"] + [:li "upload, transmit, email or publish any information or material which is harmful to minors;"] + [:li "upload, transmit, email or publish any information or material which threatens the unity, integrity, defence, security or sovereignty of the country in which you are resident or accessing the Application from, friendly relations with foreign countries, or public order or causes incitement to the commission of any cognizable offence or prevents investigation of any offence or is insulting any other nation;"] + [:li "upload, transmit or publish any viruses or other malware, to corrupt, interrupt, limit, destroy or otherwise impact the Application, the Company's computer systems, or the computer systems of other Users or third party systems;"] + [:li "upload transmit or publish anything which you do not have the rights to or any material which infringes the intellectual property rights (in whatever form) of any third party;"] + [:li "use the Application in any manner which is not permitted under these Terms of Use or in any manner which is illegal or unethical"] + [:li "access the Application in any unauthorized manner, including by hacking or using log in credentials of any other User or using bots"] + [:li "use the Application for any unauthorized marketing purposes or for sending any unsolicited materials or advertisements"] + [:li "use the Application for any purpose that is prohibited under applicable law, including the prohibitions set forth in the Information Technology (Intermediary Guidelines) Rules, 2011."]]] + [:h4.ui.grey.header "5. Intellectual Property"] + [:div + "You agree and understand that:" + [:ul + [:li "the contents of the Application including but not limited to the information, logos, designs, databases, arrangement of databases, user interfaces, response formats, software, audio, pictures, logos, icons, are the sole property of the Company or its licensors. All intellectual property in and to the Application and its contents and functionalities shall vest solely with the Company or its licensors."] + [:li "save for the limited right to access and use the Application in accordance with the Terms of Use, on a non-exclusive and non-transferable basis, there are no other rights being granted to you in the Application or any of the contents and functionalities."] + [:li "to the extent required, you grant to the Company a non-exclusive, royalty free, worldwide, transferrable, sub-licensable right to host, display, demonstrate, publicly perform, use, reproduce, format, and distribute any content, posts, emails, uploads, materials, trademarks, trade names and any of Your intellectual property which You have provided to the Company or on the Application."] + [:li "any content uploaded by you may be displayed and reproduced by the Company in any manner it deems fit."] + [:li "you have no right to make any copies of the whole or part of this Application or any of the content therein."] + [:li "you have no rights to remove, modify (including removing any copyright notices or proprietary markings) any part of the Application save for any User Information that belongs to you."] + [:li "you have no right to use any search mechanisms other than that provided on the Application and you will not use any web-crawler or any data harvesting tools to harvest data of any sort from the Application."]]] + [:h4.ui.grey.header "6. Disclaimers"] + [:div + "The Company provides no guarantee for validity and accurateness of any information published on the Application. Further, you understand and agree that it is at your own discretion and based on your judgment that you use the Application."[:br] + "The Company does not represent in any manner that:" + [:ul + [:li "the information, data or contents of the Application are accurate"] + [:li "the Application will be available at all times and will operate error free or that there will be uninterrupted access and service"] + [:li "the integrity of the information on the Application or information you upload will be maintained"] + [:li "the Application or any content is free from viruses or other malware."] + [:li "you agree and understand that the contents and services on the Application are available on an 'as is' basis."] + [:li "you expressly release the Company and its director, officers and representatives from any cost, damage, liability or other consequence of any Use of the Application by You or the actions of the Users of the Application."] + [:li "subject to applicable laws, the Company hereby disclaims all warranties, whether express or implied, in relation to the Application, its contents and functionalities, including but not limited to warranties of merchantability or fitness for a particular purpose. Where applicable laws do not permit the disclaimer of warranties to the extent detailed above, the said warranties are disclaimed to the maximum limit permitted by applicable law."]] + "The Company reserves the right to remove any content posted on the Application and assumes no liability that may arise to you or any third party for such conduct of the Company."[:br][:br] + "The Application may contain links to third party applications. The Company shall not be responsible in any manner for the contents of these third party applications and if you should choose to use the link to view the third party applications, you choose to do so at your own risk. The Company does not endorse the contents nor in any manner represent the accuracy or correctness of information on such third party applications."] + [:h4.ui.grey.header "7. Usage fee"] + [:div + "Certain fee shall be charged for the use of the Application per se."] + [:h4.ui.grey.header "8. Indemnity"] + [:div + "You agree to indemnify and hold harmless the Company, its directors, shareholders, officers, employees and agents, against any claims, losses, damages or costs arising from (i) your use of the Application and its contents, (ii) your breach of these Terms of Use or (iii) any acts or omission of yours in relation to the Application and its use thereof, including but not limited to postings."] + [:h4.ui.grey.header "9. Limitation of Liability"] + [:div + "In no event shall the Company be liable for any loss of profits (anticipated or real), loss of business, loss of reputation, loss of data, loss of goodwill, any business interruption or any direct, indirect, special, incidental, consequential, punitive, tort or other damages, however caused, whether or not it has been advised of the possibility of such damages."] + [:h4.ui.grey.header "10. Complaints"] + [:div.ui.justified.container + "The Company takes matters related to intellectual property rights and privacy very seriously. Should you have any complaints regarding the Application, including but not limited to abuse and misuse of the Application, copyright infringement and the like, or any issues related to data privacy please report the same to " [:b "support@identity-hash.online"]] + [:h4.ui.grey.header "11. General"] + [:div.ui.justified.container + [:b "Termination"] ": The Company reserves the rights to terminate your access to the Application at any time, in its sole discretion. If the Company determines that you have breached these Terms of Use, the Company shall be entitled to terminate your use and access of the Application with immediate effect. You acknowledge the Company's rights and waive any claim that you may have arising from such termination. Notwithstanding the termination of your access, all provisions which by their nature are intended to survive, shall survive termination and continue to be applicable."[:br][:br] + [:b "Force Majeure"] ": In no event shall the Company be liable for any acts beyond its control or for any acts of God."[:br][:br] + [:b "Access"] ": This Application is intended for viewing in the geographies of Philippines initially and later on in all the geographies of Southeast Asia. The Company does not make any claim that the Application and its contents may be lawfully viewed or accessed in the jurisdiction you are viewing it in. You are solely responsible for complying with laws applicable to you."[:br][:br] + [:b "Waiver"] ": No waiver of any provision of these Terms of Use shall be binding unless executed and notified by the Company in writing to you. No waiver of any of the provisions of these Terms of Use shall be deemed or shall constitute a waiver of any other provision and no waiver shall constitute a continuing waiver. You hereby waive any present or future claims you have against the Company arising from the your use of the Application or any other users' conduct."[:br][:br] + [:b "Entire Agreement"] ": These Terms of Use, the Privacy Policy and any other agreements you execute with the Company as relevant, shall constitute the entire agreement between you and the Company for the use of the Application. Any modification to these Terms of Use shall only be binding if posted on the Application by the Company."[:br][:br] + [:b "Severability"] ": If any provision of these Terms of Use is determined to be invalid or unenforceable, it will not affect the validity or enforceability of the other provisions of these Terms of Use, which shall remain in full force and effect."[:br][:br] + [:b "Governing Law"] ": These Terms of Use are governed by the laws of Philippines. You irrevocably consent to the exclusive jurisdiction and venue of the competent courts located in Philippines for all disputes arising out of or relating to these Terms of Use."]] + [:div.ui.divider] + [:div "Last updated: February 7, 2017"]]) + +(defn view-render [] + [:div.alchemy.root + [partials/header-partial-view] + [:main.alchemy.content + [:div#terms.ui.container + [terms-of-use]]] + [partials/footer-partial-view]]) + +(defn view [] + (reagent/create-class + {:reagent-render view-render})) diff --git a/src/alchemy/core.cljs b/src/alchemy/core.cljs new file mode 100644 index 0000000..f6b0806 --- /dev/null +++ b/src/alchemy/core.cljs @@ -0,0 +1,24 @@ +(ns alchemy.core + (:require [reagent.core :as reagent] + [reagent.session :as session] + [secretary.core :as secretary :include-macros true] + [accountant.core :as accountant] + [alchemy.routes :as routes])) + +;; ------------------------- +;; Initialize app + +(defn mount-root [] + (reagent/render [routes/current-page] (.getElementById js/document "app"))) + +(defn init! [] + (accountant/configure-navigation! + {:nav-handler + (fn [path] + (secretary/dispatch! path)) + :path-exists? + (fn [path] + (secretary/locate-route path))}) + (accountant/dispatch-current!) + (mount-root)) + diff --git a/src/alchemy/partials.cljs b/src/alchemy/partials.cljs new file mode 100644 index 0000000..8bb0e8b --- /dev/null +++ b/src/alchemy/partials.cljs @@ -0,0 +1,75 @@ +(ns alchemy.partials) + +;; ------------------------- +;; Partials + +(defn header-partial-view [] + (let [logo {:alt "Identity Hash" :src "/images/full-identity.png"} + home {:href "/"} + headline {:data-scroll "" :href "#home"} + about {:data-scroll "" :href "#about"} + enterprise {:data-scroll "" :href "#enterprise"} + consumers {:data-scroll "" :href "#consumers"} + get-identity {:data-scroll "" :href "#get-identity"}] + [:header.alchemy.header + [:nav.ui.borderless.large.top.fixed.menu {:data-scroll-header ""} + [:section.ui.container + [:a.header.item home [:img.logo logo]] + [:div.right.menu + [:a.item headline "HOME"] + [:a.item about "ABOUT"] + [:a.item enterprise "ENTERPRISE"] + [:a.item consumers "CONSUMERS"] + [:a.item get-identity "GET IDENTITY"]]]]])) + +(defn footer-partial-view [] + (let [about {:href "/about"} + blog {:href "https://medium.com/identity-hash"} + contact-us {:href "https://goo.gl/forms/e8G4XEIvAC7aw6mj2"} + terms {:href "/terms"} + privacy {:href "/privacy"} + facebook {:href "https://facebook.com/identity.hash"} + linkedin {:href "https://www.linkedin.com/company/identity-hash"} + medium {:href "https://medium.com/identity-hash"}] + [:footer.alchemy.footer + [:section.ui.container + [:section.ui.container.basic.segment + [:section.ui.stackable.divided.equal.height.grid + [:section.three.wide.column + [:h4.ui.header "Identity Hash"] + [:nav.ui.link.list + [:a.item blog "Blog"] + [:a.item contact-us "Contact us"]]] + [:section.three.wide.column + [:h4.ui.header "Digital Identity"] + [:nav.ui.link.list + [:a.item "Trust & Safety"] + [:a.item "Web of Trust"] + [:a.item "Referrals"]]] + [:section.three.wide.column + [:h4.ui.header "Electronic Wallet"] + [:nav.ui.link.list + [:a.item "Sending Payments"] + [:a.item "Send and Receive Money"] + [:a.item "Gather Rewards"] + [:a.item "Get Discounts"] + [:a.item "Responsible Payment"]]] + [:section.seven.wide.column + [:h4.ui.header "Identity Hash"] + [:div.ui.link.list + [:div.item "Seamless identity verification and payment solutions"] + [:br] + [:div.item "Calle Estacion, Brgy. Pio del Pilar, Makati City"] + [:div.item "Phone: +63 960-3159"] + [:div.item "Email: hello@identity-hash.online"]]]]] + [:div.ui.divider] + [:section.ui.basic.container.segment + [:div.ui.horizontal.list + [:div.copyright.item "© 2017 Identity Hash, LLC. All rights reserved and images from Icons8."]] + [:nav.ui.right.floated.horizontal.link.list + [:a.item terms "Terms & Conditions"] + [:a.item privacy "Privacy"] + [:a.item facebook [:i.facebook.f.icon]] + [:a.item linkedin [:i.linkedin.icon]] + [:a.item medium [:i.medium.icon]]]]]])) + diff --git a/src/alchemy/routes.cljs b/src/alchemy/routes.cljs new file mode 100644 index 0000000..9332652 --- /dev/null +++ b/src/alchemy/routes.cljs @@ -0,0 +1,19 @@ +(ns alchemy.routes + (:require [reagent.core :as reagent] + [reagent.session :as session] + [secretary.core :as secretary :include-macros true] + [alchemy.views :as views])) + +;; ------------------------- +;; Routes + +(secretary/defroute "/" [] + (session/put! :current-page #'views/home-page)) +(secretary/defroute "/privacy" [] + (session/put! :current-page #'views/privacy-page)) +(secretary/defroute "/terms" [] + (session/put! :current-page #'views/terms-page)) + +(defn current-page [] + [:div [(session/get :current-page)]]) + diff --git a/src/alchemy/views.cljs b/src/alchemy/views.cljs new file mode 100644 index 0000000..14800af --- /dev/null +++ b/src/alchemy/views.cljs @@ -0,0 +1,19 @@ +(ns alchemy.views + (:require [reagent.core :as reagent] + [alchemy.partials :as partials] + [alchemy.components.home :as home] + [alchemy.components.privacy :as privacy] + [alchemy.components.terms :as terms])) + +;; ------------------------- +;; Views + +(defn home-page [] [home/view]) +(defn privacy-page [] [privacy/view]) +(defn terms-page [] [terms/view]) +(defn not-found-page [] + [:div.alchemy.root + [partials/header-partial-view] + [:main.alchemy.content] + [partials/footer-partial-view]]) + diff --git a/yarn.lock b/yarn.lock new file mode 100644 index 0000000..b31f6d5 --- /dev/null +++ b/yarn.lock @@ -0,0 +1,2999 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +accepts@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca" + dependencies: + mime-types "~2.1.11" + negotiator "0.6.1" + +acorn@4.X: + version "4.0.11" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0" + +alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" + +amdefine@>=0.0.4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" + +ansi-regex@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" + +ansi-styles@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" + +any-promise@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-0.1.0.tgz#830b680aa7e56f33451d4b049f3bd8044498ee27" + +archive-type@^3.0.0, archive-type@^3.0.1: + version "3.2.0" + resolved "https://registry.yarnpkg.com/archive-type/-/archive-type-3.2.0.tgz#9cd9c006957ebe95fadad5bd6098942a813737f6" + dependencies: + file-type "^3.1.0" + +argparse@^1.0.7: + version "1.0.9" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.9.tgz#73d83bc263f86e97f8cc4f6bae1b0e90a7d22c86" + dependencies: + sprintf-js "~1.0.2" + +arr-diff@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" + dependencies: + arr-flatten "^1.0.1" + +arr-flatten@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1" + +array-differ@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031" + +array-find-index@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-find-index/-/array-find-index-1.0.2.tgz#df010aa1287e164bbda6f9723b0a96a1ec4187a1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + +array-union@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" + dependencies: + array-uniq "^1.0.1" + +array-uniq@^1.0.0, array-uniq@^1.0.1, array-uniq@^1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6" + +array-unique@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + +async-each-series@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/async-each-series/-/async-each-series-1.1.0.tgz#f42fd8155d38f21a5b8ea07c28e063ed1700b138" + +atob@~1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/atob/-/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773" + +autoprefixer@^6.3.1, autoprefixer@^6.7.7: + version "6.7.7" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014" + dependencies: + browserslist "^1.7.6" + caniuse-db "^1.0.30000634" + normalize-range "^0.1.2" + num2fraction "^1.2.2" + postcss "^5.2.16" + postcss-value-parser "^3.2.3" + +balanced-match@0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.1.0.tgz#b504bd05869b39259dd0c5efc35d843176dccc4a" + +balanced-match@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.2.1.tgz#7bc658b4bed61eee424ad74f75f5c3e2c4df3cc7" + +balanced-match@^0.4.1, balanced-match@^0.4.2: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + +beeper@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809" + +bin-build@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/bin-build/-/bin-build-2.2.0.tgz#11f8dd61f70ffcfa2bdcaa5b46f5e8fedd4221cc" + dependencies: + archive-type "^3.0.1" + decompress "^3.0.0" + download "^4.1.2" + exec-series "^1.0.0" + rimraf "^2.2.6" + tempfile "^1.0.0" + url-regex "^3.0.0" + +bin-check@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bin-check/-/bin-check-2.0.0.tgz#86f8e6f4253893df60dc316957f5af02acb05930" + dependencies: + executable "^1.0.0" + +bin-version-check@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/bin-version-check/-/bin-version-check-2.1.0.tgz#e4e5df290b9069f7d111324031efc13fdd11a5b0" + dependencies: + bin-version "^1.0.0" + minimist "^1.1.0" + semver "^4.0.3" + semver-truncate "^1.0.0" + +bin-version@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/bin-version/-/bin-version-1.0.4.tgz#9eb498ee6fd76f7ab9a7c160436f89579435d78e" + dependencies: + find-versions "^1.0.0" + +bin-wrapper@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/bin-wrapper/-/bin-wrapper-3.0.2.tgz#67d3306262e4b1a5f2f88ee23464f6a655677aeb" + dependencies: + bin-check "^2.0.0" + bin-version-check "^2.1.0" + download "^4.0.0" + each-async "^1.1.1" + lazy-req "^1.0.0" + os-filter-obj "^1.0.0" + +bl@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.1.tgz#cac328f7bee45730d404b692203fcb590e172d5e" + dependencies: + readable-stream "^2.0.5" + +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +braces@^1.8.2: + version "1.8.5" + resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" + dependencies: + expand-range "^1.8.1" + preserve "^0.2.0" + repeat-element "^1.1.2" + +browserslist@^1.0.1, browserslist@^1.5.2, browserslist@^1.7.6: + version "1.7.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9" + dependencies: + caniuse-db "^1.0.30000639" + electron-to-chromium "^1.2.7" + +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +buffer-to-vinyl@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/buffer-to-vinyl/-/buffer-to-vinyl-1.1.0.tgz#00f15faee3ab7a1dda2cde6d9121bffdd07b2262" + dependencies: + file-type "^3.1.0" + readable-stream "^2.0.2" + uuid "^2.0.1" + vinyl "^1.0.0" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +camelcase-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7" + dependencies: + camelcase "^2.0.0" + map-obj "^1.0.0" + +camelcase@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +caniuse-api@^1.5.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.5.3.tgz#5018e674b51c393e4d50614275dc017e27c4a2a2" + dependencies: + browserslist "^1.0.1" + caniuse-db "^1.0.30000346" + lodash.memoize "^4.1.0" + lodash.uniq "^4.3.0" + +caniuse-db@^1.0.30000346, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: + version "1.0.30000641" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000641.tgz#4810fc75fbb3f5b3bd75c2d6a94d894a7c709873" + +capture-stack-trace@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/capture-stack-trace/-/capture-stack-trace-1.0.0.tgz#4a6fa07399c26bba47f0b2496b4d0fb408c5550d" + +caw@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/caw/-/caw-1.2.0.tgz#ffb226fe7efc547288dc62ee3e97073c212d1034" + dependencies: + get-proxy "^1.0.1" + is-obj "^1.0.0" + object-assign "^3.0.0" + tunnel-agent "^0.4.0" + +chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" + dependencies: + ansi-styles "^2.2.1" + escape-string-regexp "^1.0.2" + has-ansi "^2.0.0" + strip-ansi "^3.0.0" + supports-color "^2.0.0" + +clap@^1.0.9: + version "1.1.3" + resolved "https://registry.yarnpkg.com/clap/-/clap-1.1.3.tgz#b3bd36e93dd4cbfb395a3c26896352445265c05b" + dependencies: + chalk "^1.1.3" + +clone-stats@^0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1" + +clone@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f" + +clone@^1.0.0, clone@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149" + +co@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/co/-/co-3.1.0.tgz#4ea54ea5a08938153185e15210c68d9092bc1b78" + +coa@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.1.tgz#7f959346cfc8719e3f7233cd6852854a7c67d8a3" + dependencies: + q "^1.1.2" + +color-convert@^1.3.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" + +color-name@^1.0.0, color-name@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" + +color-string@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" + dependencies: + color-name "^1.0.0" + +color@^0.11.0: + version "0.11.4" + resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764" + dependencies: + clone "^1.0.2" + color-convert "^1.3.0" + color-string "^0.3.0" + +colormin@^1.0.5: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133" + dependencies: + color "^0.11.0" + css-color-names "0.0.4" + has "^1.0.1" + +colors@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" + +commander@~2.8.1: + version "2.8.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4" + dependencies: + graceful-readlink ">= 1.0.0" + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@^1.4.6, concat-stream@^1.4.7: + version "1.6.0" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" + dependencies: + inherits "^2.0.3" + readable-stream "^2.2.2" + typedarray "^0.0.6" + +console-stream@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/console-stream/-/console-stream-0.1.1.tgz#a095fe07b20465955f2fafd28b5d72bccd949d44" + +content-disposition@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" + +content-type@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.2.tgz#b7d113aee7a8dd27bd21133c4dc2529df1721eed" + +convert-source-map@1.X, convert-source-map@^1.1.1: + version "1.4.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.4.0.tgz#e3dad195bf61bfe13a7a3c73e9876ec14a0268f3" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + +cookie@0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + +cosmiconfig@^2.1.0, cosmiconfig@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-2.1.1.tgz#817f2c2039347a1e9bf7d090c0923e53f749ca82" + dependencies: + js-yaml "^3.4.3" + minimist "^1.2.0" + object-assign "^4.1.0" + os-homedir "^1.0.1" + parse-json "^2.2.0" + require-from-string "^1.1.0" + +create-error-class@^3.0.1: + version "3.0.2" + resolved "https://registry.yarnpkg.com/create-error-class/-/create-error-class-3.0.2.tgz#06be7abef947a3f14a30fd610671d401bca8b7b6" + dependencies: + capture-stack-trace "^1.0.0" + +cross-spawn@^4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41" + dependencies: + lru-cache "^4.0.1" + which "^1.2.9" + +css-color-function@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/css-color-function/-/css-color-function-1.3.0.tgz#72c767baf978f01b8a8a94f42f17ba5d22a776fc" + dependencies: + balanced-match "0.1.0" + color "^0.11.0" + debug "~0.7.4" + rgb "~0.1.0" + +css-color-names@0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0" + +css@2.X: + version "2.2.1" + resolved "https://registry.yarnpkg.com/css/-/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc" + dependencies: + inherits "^2.0.1" + source-map "^0.1.38" + source-map-resolve "^0.3.0" + urix "^0.1.0" + +cssnano@^3.10.0: + version "3.10.0" + resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38" + dependencies: + autoprefixer "^6.3.1" + decamelize "^1.1.2" + defined "^1.0.0" + has "^1.0.1" + object-assign "^4.0.1" + postcss "^5.0.14" + postcss-calc "^5.2.0" + postcss-colormin "^2.1.8" + postcss-convert-values "^2.3.4" + postcss-discard-comments "^2.0.4" + postcss-discard-duplicates "^2.0.1" + postcss-discard-empty "^2.0.1" + postcss-discard-overridden "^0.1.1" + postcss-discard-unused "^2.2.1" + postcss-filter-plugins "^2.0.0" + postcss-merge-idents "^2.1.5" + postcss-merge-longhand "^2.0.1" + postcss-merge-rules "^2.0.3" + postcss-minify-font-values "^1.0.2" + postcss-minify-gradients "^1.0.1" + postcss-minify-params "^1.0.4" + postcss-minify-selectors "^2.0.4" + postcss-normalize-charset "^1.1.0" + postcss-normalize-url "^3.0.7" + postcss-ordered-values "^2.1.0" + postcss-reduce-idents "^2.2.2" + postcss-reduce-initial "^1.0.0" + postcss-reduce-transforms "^1.0.3" + postcss-svgo "^2.1.1" + postcss-unique-selectors "^2.0.2" + postcss-value-parser "^3.2.3" + postcss-zindex "^2.0.1" + +csso@~2.3.1: + version "2.3.2" + resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85" + dependencies: + clap "^1.0.9" + source-map "^0.5.3" + +currently-unhandled@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" + dependencies: + array-find-index "^1.0.1" + +dateformat@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17" + +debug-fabulous@0.0.X: + version "0.0.4" + resolved "https://registry.yarnpkg.com/debug-fabulous/-/debug-fabulous-0.0.4.tgz#fa071c5d87484685424807421ca4b16b0b1a0763" + dependencies: + debug "2.X" + lazy-debug-legacy "0.0.X" + object-assign "4.1.0" + +debug@2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" + dependencies: + ms "0.7.2" + +debug@2.6.3, debug@2.X: + version "2.6.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d" + dependencies: + ms "0.7.2" + +debug@~0.7.4: + version "0.7.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-0.7.4.tgz#06e1ea8082c2cb14e39806e22e2f6f757f92af39" + +decamelize@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +decompress-tar@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-tar/-/decompress-tar-3.1.0.tgz#217c789f9b94450efaadc5c5e537978fc333c466" + dependencies: + is-tar "^1.0.0" + object-assign "^2.0.0" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-tarbz2@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-tarbz2/-/decompress-tarbz2-3.1.0.tgz#8b23935681355f9f189d87256a0f8bdd96d9666d" + dependencies: + is-bzip2 "^1.0.0" + object-assign "^2.0.0" + seek-bzip "^1.0.3" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-targz@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/decompress-targz/-/decompress-targz-3.1.0.tgz#b2c13df98166268991b715d6447f642e9696f5a0" + dependencies: + is-gzip "^1.0.0" + object-assign "^2.0.0" + strip-dirs "^1.0.0" + tar-stream "^1.1.1" + through2 "^0.6.1" + vinyl "^0.4.3" + +decompress-unzip@^3.0.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/decompress-unzip/-/decompress-unzip-3.4.0.tgz#61475b4152066bbe3fee12f9d629d15fe6478eeb" + dependencies: + is-zip "^1.0.0" + read-all-stream "^3.0.0" + stat-mode "^0.2.0" + strip-dirs "^1.0.0" + through2 "^2.0.0" + vinyl "^1.0.0" + yauzl "^2.2.1" + +decompress@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/decompress/-/decompress-3.0.0.tgz#af1dd50d06e3bfc432461d37de11b38c0d991bed" + dependencies: + buffer-to-vinyl "^1.0.0" + concat-stream "^1.4.6" + decompress-tar "^3.0.0" + decompress-tarbz2 "^3.0.0" + decompress-targz "^3.0.0" + decompress-unzip "^3.0.0" + stream-combiner2 "^1.1.1" + vinyl-assign "^1.0.1" + vinyl-fs "^2.2.0" + +deep-extend@~0.4.0: + version "0.4.2" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.2.tgz#48b699c27e334bf89f10892be432f6e4c7d34a7f" + +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + +depd@1.1.0, depd@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.0.tgz#e1bd82c6aab6ced965b97b88b17ed3e528ca18c3" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + +detect-newline@2.X: + version "2.1.0" + resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2" + +download@^4.0.0, download@^4.1.2: + version "4.4.3" + resolved "https://registry.yarnpkg.com/download/-/download-4.4.3.tgz#aa55fdad392d95d4b68e8c2be03e0c2aa21ba9ac" + dependencies: + caw "^1.0.1" + concat-stream "^1.4.7" + each-async "^1.0.0" + filenamify "^1.0.1" + got "^5.0.0" + gulp-decompress "^1.2.0" + gulp-rename "^1.2.0" + is-url "^1.2.0" + object-assign "^4.0.1" + read-all-stream "^3.0.0" + readable-stream "^2.0.2" + stream-combiner2 "^1.1.1" + vinyl "^1.0.0" + vinyl-fs "^2.2.0" + ware "^1.2.0" + +duplexer2@0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db" + dependencies: + readable-stream "~1.1.9" + +duplexer2@^0.1.4, duplexer2@~0.1.0: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" + dependencies: + readable-stream "^2.0.2" + +duplexify@^3.2.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.5.0.tgz#1aa773002e1578457e9d9d4a50b0ccaaebcbd604" + dependencies: + end-of-stream "1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + +each-async@^1.0.0, each-async@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/each-async/-/each-async-1.1.1.tgz#dee5229bdf0ab6ba2012a395e1b869abf8813473" + dependencies: + onetime "^1.0.0" + set-immediate-shim "^1.0.0" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + +electron-to-chromium@^1.2.7: + version "1.2.8" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.2.8.tgz#22c2e6200d350da27d6050db7e3f6f85d18cf4ed" + +encodeurl@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.1.tgz#79e3d58655346909fe6f0f45a5de68103b294d20" + +end-of-stream@1.0.0, end-of-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.0.0.tgz#d4596e702734a93e40e9af864319eabd99ff2f0e" + dependencies: + once "~1.3.0" + +error-ex@^1.2.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.1.tgz#f855a86ce61adc4e8621c3cda21e7a7612c3a8dc" + dependencies: + is-arrayish "^0.2.1" + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + +escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + +esprima@^2.6.0: + version "2.7.3" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" + +etag@~1.8.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" + +exec-buffer@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/exec-buffer/-/exec-buffer-3.1.0.tgz#851b46d062fca9bcbc6ff8781693e28e8da80402" + dependencies: + execa "^0.5.0" + p-finally "^1.0.0" + pify "^2.3.0" + rimraf "^2.5.4" + tempfile "^1.0.0" + +exec-series@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/exec-series/-/exec-series-1.0.3.tgz#6d257a9beac482a872c7783bc8615839fc77143a" + dependencies: + async-each-series "^1.1.0" + object-assign "^4.1.0" + +execa@^0.5.0: + version "0.5.1" + resolved "https://registry.yarnpkg.com/execa/-/execa-0.5.1.tgz#de3fb85cb8d6e91c85bcbceb164581785cb57b36" + dependencies: + cross-spawn "^4.0.0" + get-stream "^2.2.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +executable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/executable/-/executable-1.1.0.tgz#877980e9112f3391066da37265de7ad8434ab4d9" + dependencies: + meow "^3.1.0" + +expand-brackets@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" + dependencies: + is-posix-bracket "^0.1.0" + +expand-range@^1.8.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/expand-range/-/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337" + dependencies: + fill-range "^2.1.0" + +express@^4.14.1: + version "4.15.2" + resolved "https://registry.yarnpkg.com/express/-/express-4.15.2.tgz#af107fc148504457f2dca9a6f2571d7129b97b35" + dependencies: + accepts "~1.3.3" + array-flatten "1.1.1" + content-disposition "0.5.2" + content-type "~1.0.2" + cookie "0.3.1" + cookie-signature "1.0.6" + debug "2.6.1" + depd "~1.1.0" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + finalhandler "~1.0.0" + fresh "0.5.0" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.1" + path-to-regexp "0.1.7" + proxy-addr "~1.1.3" + qs "6.4.0" + range-parser "~1.2.0" + send "0.15.1" + serve-static "1.12.1" + setprototypeof "1.0.3" + statuses "~1.3.1" + type-is "~1.6.14" + utils-merge "1.0.0" + vary "~1.1.0" + +extend-shallow@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" + dependencies: + is-extendable "^0.1.0" + +extend@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444" + +extglob@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" + dependencies: + is-extglob "^1.0.0" + +fancy-log@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948" + dependencies: + chalk "^1.1.1" + time-stamp "^1.0.0" + +fd-slicer@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" + dependencies: + pend "~1.2.0" + +figures@^1.3.5: + version "1.7.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" + dependencies: + escape-string-regexp "^1.0.5" + object-assign "^4.1.0" + +file-type@^3.1.0: + version "3.9.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9" + +file-type@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/file-type/-/file-type-4.3.0.tgz#b26f0a35e03f6857848d18b8a27238448caa79a5" + +filename-regex@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" + +filename-reserved-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/filename-reserved-regex/-/filename-reserved-regex-1.0.0.tgz#e61cf805f0de1c984567d0386dc5df50ee5af7e4" + +filenamify@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-1.2.1.tgz#a9f2ffd11c503bed300015029272378f1f1365a5" + dependencies: + filename-reserved-regex "^1.0.0" + strip-outer "^1.0.0" + trim-repeated "^1.0.0" + +fill-range@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723" + dependencies: + is-number "^2.1.0" + isobject "^2.0.0" + randomatic "^1.1.3" + repeat-element "^1.1.2" + repeat-string "^1.5.2" + +finalhandler@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.0.1.tgz#bcd15d1689c0e5ed729b6f7f541a6df984117db8" + dependencies: + debug "2.6.3" + encodeurl "~1.0.1" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.1" + statuses "~1.3.1" + unpipe "~1.0.0" + +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + +find-versions@^1.0.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-1.2.1.tgz#cbde9f12e38575a0af1be1b9a2c5d5fd8f186b62" + dependencies: + array-uniq "^1.0.0" + get-stdin "^4.0.1" + meow "^3.5.0" + semver-regex "^1.0.0" + +first-chunk-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e" + +flatten@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782" + +for-in@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" + +for-own@^0.1.4: + version "0.1.5" + resolved "https://registry.yarnpkg.com/for-own/-/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce" + dependencies: + for-in "^1.0.1" + +forwarded@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.0.tgz#19ef9874c4ae1c297bcf078fde63a09b66a84363" + +fresh@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.0.tgz#f474ca5e6a9246d6fd8e0953cfa9b9c805afa78e" + +fs-extra@^0.24.0: + version "0.24.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.24.0.tgz#d4e4342a96675cb7846633a6099249332b539952" + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-promise@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/fs-promise/-/fs-promise-0.3.1.tgz#bf34050368f24d6dc9dfc6688ab5cead8f86842a" + dependencies: + any-promise "~0.1.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +function-bind@^1.0.2: + version "1.1.0" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" + +get-proxy@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/get-proxy/-/get-proxy-1.1.0.tgz#894854491bc591b0f147d7ae570f5c678b7256eb" + dependencies: + rc "^1.1.2" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + +get-stream@^2.2.0: + version "2.3.1" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de" + dependencies: + object-assign "^4.0.1" + pinkie-promise "^2.0.0" + +gifsicle@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/gifsicle/-/gifsicle-3.0.4.tgz#f45cb5ed10165b665dc929e0e9328b6c821dfa3b" + dependencies: + bin-build "^2.0.0" + bin-wrapper "^3.0.0" + logalot "^2.0.0" + +glob-base@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/glob-base/-/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4" + dependencies: + glob-parent "^2.0.0" + is-glob "^2.0.0" + +glob-parent@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28" + dependencies: + is-glob "^2.0.0" + +glob-parent@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae" + dependencies: + is-glob "^3.1.0" + path-dirname "^1.0.0" + +glob-stream@^5.3.2: + version "5.3.5" + resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-5.3.5.tgz#a55665a9a8ccdc41915a87c701e32d4e016fad22" + dependencies: + extend "^3.0.0" + glob "^5.0.3" + glob-parent "^3.0.0" + micromatch "^2.3.7" + ordered-read-streams "^0.3.0" + through2 "^0.6.0" + to-absolute-glob "^0.1.1" + unique-stream "^2.0.2" + +glob@^5.0.3: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.3, glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +globby@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/globby/-/globby-3.0.1.tgz#2094af8421e19152150d5893eb6416b312d9a22f" + dependencies: + array-union "^1.0.1" + arrify "^1.0.0" + glob "^5.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^1.0.0" + +globby@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c" + dependencies: + array-union "^1.0.1" + glob "^7.0.3" + object-assign "^4.0.1" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +glogg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5" + dependencies: + sparkles "^1.0.0" + +got@^5.0.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/got/-/got-5.7.1.tgz#5f81635a61e4a6589f180569ea4e381680a51f35" + dependencies: + create-error-class "^3.0.1" + duplexer2 "^0.1.4" + is-redirect "^1.0.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + lowercase-keys "^1.0.0" + node-status-codes "^1.0.0" + object-assign "^4.0.1" + parse-json "^2.1.0" + pinkie-promise "^2.0.0" + read-all-stream "^3.0.0" + readable-stream "^2.0.5" + timed-out "^3.0.0" + unzip-response "^1.0.2" + url-parse-lax "^1.0.0" + +graceful-fs@4.X, graceful-fs@^4.0.0, graceful-fs@^4.1.2, graceful-fs@^4.1.6: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + +"graceful-readlink@>= 1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" + +gulp-decompress@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/gulp-decompress/-/gulp-decompress-1.2.0.tgz#8eeb65a5e015f8ed8532cafe28454960626f0dc7" + dependencies: + archive-type "^3.0.0" + decompress "^3.0.0" + gulp-util "^3.0.1" + readable-stream "^2.0.2" + +gulp-imagemin@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/gulp-imagemin/-/gulp-imagemin-3.2.0.tgz#26887ad65d2c51bb317c4b02b5604f4a78bf74a8" + dependencies: + chalk "^1.0.0" + gulp-util "^3.0.0" + imagemin "^5.0.0" + plur "^2.0.0" + pretty-bytes "^4.0.2" + through2-concurrent "^1.1.0" + optionalDependencies: + imagemin-gifsicle "^5.0.0" + imagemin-jpegtran "^5.0.0" + imagemin-optipng "^5.1.0" + imagemin-svgo "^5.1.0" + +gulp-plumber@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/gulp-plumber/-/gulp-plumber-1.1.0.tgz#f12176c2d0422f60306c242fff6a01a394faba09" + dependencies: + gulp-util "^3" + through2 "^2" + +gulp-postcss@^6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/gulp-postcss/-/gulp-postcss-6.4.0.tgz#78a32e3c87aa6cdcec5ae1c905e196d478e8c5d5" + dependencies: + gulp-util "^3.0.8" + postcss "^5.2.12" + postcss-load-config "^1.2.0" + vinyl-sourcemaps-apply "^0.2.1" + +gulp-rename@^1.2.0, gulp-rename@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.2.2.tgz#3ad4428763f05e2764dec1c67d868db275687817" + +gulp-sourcemaps@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-1.6.0.tgz#b86ff349d801ceb56e1d9e7dc7bbcb4b7dee600c" + dependencies: + convert-source-map "^1.1.1" + graceful-fs "^4.1.2" + strip-bom "^2.0.0" + through2 "^2.0.0" + vinyl "^1.0.0" + +gulp-sourcemaps@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/gulp-sourcemaps/-/gulp-sourcemaps-2.4.1.tgz#8f65dc5c0d07b2fd5c88bc60ec7f13e56716bf74" + dependencies: + acorn "4.X" + convert-source-map "1.X" + css "2.X" + debug-fabulous "0.0.X" + detect-newline "2.X" + graceful-fs "4.X" + source-map "0.X" + strip-bom "3.X" + through2 "2.X" + vinyl "1.X" + +gulp-util@^3, gulp-util@^3.0.0, gulp-util@^3.0.1, gulp-util@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f" + dependencies: + array-differ "^1.0.0" + array-uniq "^1.0.2" + beeper "^1.0.0" + chalk "^1.0.0" + dateformat "^2.0.0" + fancy-log "^1.1.0" + gulplog "^1.0.0" + has-gulplog "^0.1.0" + lodash._reescape "^3.0.0" + lodash._reevaluate "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.template "^3.0.0" + minimist "^1.1.0" + multipipe "^0.1.2" + object-assign "^3.0.0" + replace-ext "0.0.1" + through2 "^2.0.0" + vinyl "^0.5.0" + +gulplog@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5" + dependencies: + glogg "^1.0.0" + +has-ansi@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" + dependencies: + ansi-regex "^2.0.0" + +has-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" + +has-gulplog@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce" + dependencies: + sparkles "^1.0.0" + +has@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.1.tgz#8461733f538b0837c9361e39a9ab9e9704dc2f28" + dependencies: + function-bind "^1.0.2" + +hosted-git-info@^2.1.4: + version "2.4.2" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.4.2.tgz#0076b9f46a270506ddbaaea56496897460612a67" + +html-comment-regex@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e" + +http-errors@~1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.1.tgz#5f8b8ed98aca545656bf572997387f904a722257" + dependencies: + depd "1.1.0" + inherits "2.0.3" + setprototypeof "1.0.3" + statuses ">= 1.3.1 < 2" + +imagemin-gifsicle@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/imagemin-gifsicle/-/imagemin-gifsicle-5.1.0.tgz#2e4ddcda2a109b221cabaec498e1e2dd28ca768f" + dependencies: + exec-buffer "^3.0.0" + gifsicle "^3.0.0" + is-gif "^1.0.0" + +imagemin-jpegtran@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/imagemin-jpegtran/-/imagemin-jpegtran-5.0.2.tgz#e6882263b8f7916fddb800640cf75d2e970d2ad6" + dependencies: + exec-buffer "^3.0.0" + is-jpg "^1.0.0" + jpegtran-bin "^3.0.0" + +imagemin-optipng@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/imagemin-optipng/-/imagemin-optipng-5.2.1.tgz#d22da412c09f5ff00a4339960b98a88b1dbe8695" + dependencies: + exec-buffer "^3.0.0" + is-png "^1.0.0" + optipng-bin "^3.0.0" + +imagemin-svgo@^5.1.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/imagemin-svgo/-/imagemin-svgo-5.2.1.tgz#74d593ce4cbe1b87efdb3d06a4a56078f71a8147" + dependencies: + is-svg "^2.0.0" + svgo "^0.7.0" + +imagemin@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/imagemin/-/imagemin-5.3.1.tgz#f19c2eee1e71ba6c6558c515f9fc96680189a6d4" + dependencies: + file-type "^4.1.0" + globby "^6.1.0" + make-dir "^1.0.0" + p-pipe "^1.1.0" + pify "^2.3.0" + replace-ext "^1.0.0" + +indent-string@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80" + dependencies: + repeating "^2.0.0" + +indexes-of@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +ip-regex@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-1.0.3.tgz#dc589076f659f419c222039a33316f1c7387effd" + +ipaddr.js@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.3.0.tgz#1e03a52fdad83a8bbb2b25cbf4998b4cffcd3dec" + +irregular-plurals@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-1.2.0.tgz#38f299834ba8c00c30be9c554e137269752ff3ac" + +is-absolute-url@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6" + +is-absolute@^0.1.5: + version "0.1.7" + resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-0.1.7.tgz#847491119fccb5fb436217cc737f7faad50f603f" + dependencies: + is-relative "^0.1.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-buffer@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-bzip2@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-bzip2/-/is-bzip2-1.0.0.tgz#5ee58eaa5a2e9c80e21407bedf23ae5ac091b3fc" + +is-dotfile@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-dotfile/-/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d" + +is-equal-shallow@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534" + dependencies: + is-primitive "^2.0.0" + +is-extendable@^0.1.0, is-extendable@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" + +is-extglob@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0" + +is-extglob@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-gif@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-gif/-/is-gif-1.0.0.tgz#a6d2ae98893007bffa97a1d8c01d63205832097e" + +is-glob@^2.0.0, is-glob@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863" + dependencies: + is-extglob "^1.0.0" + +is-glob@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a" + dependencies: + is-extglob "^2.1.0" + +is-gzip@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-gzip/-/is-gzip-1.0.0.tgz#6ca8b07b99c77998025900e555ced8ed80879a83" + +is-jpg@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-jpg/-/is-jpg-1.0.0.tgz#2959c17e73430db38264da75b90dd54f2d86da1c" + +is-natural-number@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-2.1.1.tgz#7d4c5728377ef386c3e194a9911bf57c6dc335e7" + +is-number@^2.0.2, is-number@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f" + dependencies: + kind-of "^3.0.2" + +is-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" + +is-plain-obj@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + +is-png@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-png/-/is-png-1.1.0.tgz#d574b12bf275c0350455570b0e5b57ab062077ce" + +is-posix-bracket@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4" + +is-primitive@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" + +is-redirect@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-redirect/-/is-redirect-1.0.0.tgz#1d03dded53bd8db0f30c26e4f95d36fc7c87dc24" + +is-relative@^0.1.0: + version "0.1.3" + resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-0.1.3.tgz#905fee8ae86f45b3ec614bc3c15c869df0876e82" + +is-retry-allowed@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.1.0.tgz#11a060568b67339444033d0125a61a20d564fb34" + +is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + +is-svg@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9" + dependencies: + html-comment-regex "^1.1.0" + +is-tar@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-tar/-/is-tar-1.0.0.tgz#2f6b2e1792c1f5bb36519acaa9d65c0d26fe853d" + +is-url@^1.2.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.2.tgz#498905a593bf47cc2d9e7f738372bbf7696c7f26" + +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +is-valid-glob@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-0.3.0.tgz#d4b55c69f51886f9b65c70d6c2622d37e29f48fe" + +is-zip@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-zip/-/is-zip-1.0.0.tgz#47b0a8ff4d38a76431ccfd99a8e15a4c86ba2325" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@1.0.0, isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + +isobject@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" + dependencies: + isarray "1.0.0" + +jpegtran-bin@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/jpegtran-bin/-/jpegtran-bin-3.2.0.tgz#f60ecf4ae999c0bdad2e9fbcdf2b6f0981e7a29b" + dependencies: + bin-build "^2.0.0" + bin-wrapper "^3.0.0" + logalot "^2.0.0" + +js-base64@^2.1.9: + version "2.1.9" + resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.1.9.tgz#f0e80ae039a4bd654b5f281fc93f04a914a7fcce" + +js-yaml@^3.4.3, js-yaml@~3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" + dependencies: + argparse "^1.0.7" + esprima "^2.6.0" + +json-stable-stringify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" + dependencies: + jsonify "~0.0.0" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + optionalDependencies: + graceful-fs "^4.1.6" + +jsonify@~0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" + +kind-of@^3.0.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" + dependencies: + is-buffer "^1.1.5" + +lazy-debug-legacy@0.0.X: + version "0.0.1" + resolved "https://registry.yarnpkg.com/lazy-debug-legacy/-/lazy-debug-legacy-0.0.1.tgz#537716c0776e4cf79e3ed1b621f7658c2911b1b1" + +lazy-req@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/lazy-req/-/lazy-req-1.1.0.tgz#bdaebead30f8d824039ce0ce149d4daa07ba1fac" + +lazystream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" + dependencies: + readable-stream "^2.0.5" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +lodash._basecopy@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36" + +lodash._basetostring@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5" + +lodash._basevalues@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7" + +lodash._getnative@^3.0.0: + version "3.9.1" + resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5" + +lodash._isiterateecall@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c" + +lodash._reescape@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a" + +lodash._reevaluate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" + +lodash._reinterpolate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" + +lodash._root@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692" + +lodash.escape@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698" + dependencies: + lodash._root "^3.0.0" + +lodash.isarguments@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a" + +lodash.isarray@^3.0.0: + version "3.0.4" + resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55" + +lodash.isequal@^4.0.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0" + +lodash.keys@^3.0.0: + version "3.1.2" + resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a" + dependencies: + lodash._getnative "^3.0.0" + lodash.isarguments "^3.0.0" + lodash.isarray "^3.0.0" + +lodash.memoize@^4.1.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe" + +lodash.restparam@^3.0.0: + version "3.6.1" + resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" + +lodash.template@^3.0.0: + version "3.6.2" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f" + dependencies: + lodash._basecopy "^3.0.0" + lodash._basetostring "^3.0.0" + lodash._basevalues "^3.0.0" + lodash._isiterateecall "^3.0.0" + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + lodash.keys "^3.0.0" + lodash.restparam "^3.0.0" + lodash.templatesettings "^3.0.0" + +lodash.templatesettings@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5" + dependencies: + lodash._reinterpolate "^3.0.0" + lodash.escape "^3.0.0" + +lodash.uniq@^4.3.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" + +logalot@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/logalot/-/logalot-2.1.0.tgz#5f8e8c90d304edf12530951a5554abb8c5e3f552" + dependencies: + figures "^1.3.5" + squeak "^1.0.0" + +longest@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" + +lost@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/lost/-/lost-8.0.0.tgz#7ab03254f1106b6940abb2045c0e38f821a73475" + dependencies: + object-assign "^4.1.0" + postcss "^5.2.8" + +loud-rejection@^1.0.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f" + dependencies: + currently-unhandled "^0.4.1" + signal-exit "^3.0.0" + +lowercase-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.0.tgz#4e3366b39e7f5457e35f1324bdf6f88d0bfc7306" + +lpad-align@^1.0.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/lpad-align/-/lpad-align-1.1.2.tgz#21f600ac1c3095c3c6e497ee67271ee08481fe9e" + dependencies: + get-stdin "^4.0.1" + indent-string "^2.1.0" + longest "^1.0.0" + meow "^3.3.0" + +lru-cache@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.0.2.tgz#1d17679c069cda5d040991a09dbc2c0db377e55e" + dependencies: + pseudomap "^1.0.1" + yallist "^2.0.0" + +macaddress@^0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12" + +make-dir@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.0.0.tgz#97a011751e91dd87cfadef58832ebb04936de978" + dependencies: + pify "^2.3.0" + +map-obj@^1.0.0, map-obj@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +math-expression-evaluator@^1.2.14: + version "1.2.16" + resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.16.tgz#b357fa1ca9faefb8e48d10c14ef2bcb2d9f0a7c9" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + +meow@^3.1.0, meow@^3.3.0, meow@^3.5.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb" + dependencies: + camelcase-keys "^2.0.0" + decamelize "^1.1.2" + loud-rejection "^1.0.0" + map-obj "^1.0.1" + minimist "^1.1.3" + normalize-package-data "^2.3.4" + object-assign "^4.0.1" + read-pkg-up "^1.0.1" + redent "^1.0.0" + trim-newlines "^1.0.0" + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + +merge-stream@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1" + dependencies: + readable-stream "^2.0.1" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + +micromatch@^2.3.7: + version "2.3.11" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565" + dependencies: + arr-diff "^2.0.0" + array-unique "^0.2.1" + braces "^1.8.2" + expand-brackets "^0.1.4" + extglob "^0.3.1" + filename-regex "^2.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.1" + kind-of "^3.0.2" + normalize-path "^2.0.1" + object.omit "^2.0.0" + parse-glob "^3.0.4" + regex-cache "^0.4.2" + +mime-db@~1.27.0: + version "1.27.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.27.0.tgz#820f572296bbd20ec25ed55e5b5de869e5436eb1" + +mime-types@~2.1.11, mime-types@~2.1.13: + version "2.1.15" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed" + dependencies: + mime-db "~1.27.0" + +mime@1.3.4: + version "1.3.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" + +"minimatch@2 || 3", minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +mkdirp@^0.5.0, mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.2: + version "0.7.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" + +multipipe@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b" + dependencies: + duplexer2 "0.0.2" + +negotiator@0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" + +node-status-codes@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-status-codes/-/node-status-codes-1.0.0.tgz#5ae5541d024645d32a58fcddc9ceecea7ae3ac2f" + +normalize-package-data@^2.3.2, normalize-package-data@^2.3.4: + version "2.3.8" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.8.tgz#d819eda2a9dedbd1ffa563ea4071d936782295bb" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" + dependencies: + remove-trailing-separator "^1.0.1" + +normalize-range@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" + +normalize-url@^1.4.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c" + dependencies: + object-assign "^4.0.1" + prepend-http "^1.0.0" + query-string "^4.1.0" + sort-keys "^1.0.0" + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + dependencies: + path-key "^2.0.0" + +num2fraction@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + +object-assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0" + +object-assign@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-2.1.1.tgz#43c36e5d569ff8e4816c4efa8be02d26967c18aa" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +object.omit@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa" + dependencies: + for-own "^0.1.4" + is-extendable "^0.1.1" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + dependencies: + ee-first "1.1.1" + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + dependencies: + wrappy "1" + +once@~1.3.0: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +onetime@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" + +optipng-bin@^3.0.0: + version "3.1.4" + resolved "https://registry.yarnpkg.com/optipng-bin/-/optipng-bin-3.1.4.tgz#95d34f2c488704f6fd70606bfea0c659f1d95d84" + dependencies: + bin-build "^2.0.0" + bin-wrapper "^3.0.0" + logalot "^2.0.0" + +ordered-read-streams@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz#7137e69b3298bb342247a1bbee3881c80e2fd78b" + dependencies: + is-stream "^1.0.1" + readable-stream "^2.0.1" + +os-filter-obj@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/os-filter-obj/-/os-filter-obj-1.0.3.tgz#5915330d90eced557d2d938a31c6dd214d9c63ad" + +os-homedir@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" + +os-tmpdir@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + +p-pipe@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-pipe/-/p-pipe-1.1.0.tgz#2e9dc7cc57ce67d2ce2db348ca03f28731854075" + +parse-glob@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/parse-glob/-/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c" + dependencies: + glob-base "^0.3.0" + is-dotfile "^1.0.0" + is-extglob "^1.0.0" + is-glob "^2.0.0" + +parse-json@^2.1.0, parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +parseurl@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.1.tgz#c8ab8c9223ba34888aa64a297b28853bec18da56" + +path-dirname@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-key@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + +pify@^2.0.0, pify@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + +pinkie-promise@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-1.0.0.tgz#d1da67f5482563bb7cf57f286ae2822ecfbf3670" + dependencies: + pinkie "^1.0.0" + +pinkie-promise@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" + dependencies: + pinkie "^2.0.0" + +pinkie@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-1.0.0.tgz#5a47f28ba1015d0201bda7bf0f358e47bec8c7e4" + +pinkie@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" + +plur@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/plur/-/plur-2.1.2.tgz#7482452c1a0f508e3e344eaec312c91c29dc655a" + dependencies: + irregular-plurals "^1.0.0" + +postcss-advanced-variables@1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-advanced-variables/-/postcss-advanced-variables-1.2.2.tgz#90a6213262e66a050a368b4a9c5d4778d72dbd74" + dependencies: + postcss "^5.0.10" + +postcss-atroot@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/postcss-atroot/-/postcss-atroot-0.1.3.tgz#6752c0230c745140549345b2b0e30ebeda01a405" + dependencies: + postcss "^5.0.5" + +postcss-calc@^5.2.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e" + dependencies: + postcss "^5.0.2" + postcss-message-helpers "^2.0.0" + reduce-css-calc "^1.2.6" + +postcss-color-function@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/postcss-color-function/-/postcss-color-function-2.0.1.tgz#9ad226f550e8a7c7f8b8a77860545b6dd7f55241" + dependencies: + css-color-function "^1.2.0" + postcss "^5.0.4" + postcss-message-helpers "^2.0.0" + postcss-value-parser "^3.3.0" + +postcss-colormin@^2.1.8: + version "2.2.2" + resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b" + dependencies: + colormin "^1.0.5" + postcss "^5.0.13" + postcss-value-parser "^3.2.3" + +postcss-convert-values@^2.3.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d" + dependencies: + postcss "^5.0.11" + postcss-value-parser "^3.1.2" + +postcss-custom-media@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-5.0.1.tgz#138d25a184bf2eb54de12d55a6c01c30a9d8bd81" + dependencies: + postcss "^5.0.0" + +postcss-custom-properties@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-5.0.2.tgz#9719d78f2da9cf9f53810aebc23d4656130aceb1" + dependencies: + balanced-match "^0.4.2" + postcss "^5.0.0" + +postcss-custom-selectors@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-3.0.0.tgz#8f81249f5ed07a8d0917cf6a39fe5b056b7f96ac" + dependencies: + balanced-match "^0.2.0" + postcss "^5.0.0" + postcss-selector-matches "^2.0.0" + +postcss-discard-comments@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d" + dependencies: + postcss "^5.0.14" + +postcss-discard-duplicates@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932" + dependencies: + postcss "^5.0.4" + +postcss-discard-empty@^2.0.1: + version "2.1.0" + resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5" + dependencies: + postcss "^5.0.14" + +postcss-discard-overridden@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58" + dependencies: + postcss "^5.0.16" + +postcss-discard-unused@^2.2.1: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433" + dependencies: + postcss "^5.0.14" + uniqs "^2.0.0" + +postcss-extend@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-extend/-/postcss-extend-1.0.5.tgz#5ea98bf787ba3cacf4df4609743f80a833b1d0e7" + dependencies: + postcss "^5.0.4" + +postcss-filter-plugins@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c" + dependencies: + postcss "^5.0.4" + uniqid "^4.0.0" + +postcss-load-config@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-1.2.0.tgz#539e9afc9ddc8620121ebf9d8c3673e0ce50d28a" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + postcss-load-options "^1.2.0" + postcss-load-plugins "^2.3.0" + +postcss-load-options@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-load-options/-/postcss-load-options-1.2.0.tgz#b098b1559ddac2df04bc0bb375f99a5cfe2b6d8c" + dependencies: + cosmiconfig "^2.1.0" + object-assign "^4.1.0" + +postcss-load-plugins@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/postcss-load-plugins/-/postcss-load-plugins-2.3.0.tgz#745768116599aca2f009fad426b00175049d8d92" + dependencies: + cosmiconfig "^2.1.1" + object-assign "^4.1.0" + +postcss-media-minmax@^2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-media-minmax/-/postcss-media-minmax-2.1.2.tgz#444c5cf8926ab5e4fd8a2509e9297e751649cdf8" + dependencies: + postcss "^5.0.4" + +postcss-merge-idents@^2.1.5: + version "2.1.7" + resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270" + dependencies: + has "^1.0.1" + postcss "^5.0.10" + postcss-value-parser "^3.1.1" + +postcss-merge-longhand@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658" + dependencies: + postcss "^5.0.4" + +postcss-merge-rules@^2.0.3: + version "2.1.2" + resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721" + dependencies: + browserslist "^1.5.2" + caniuse-api "^1.5.2" + postcss "^5.0.4" + postcss-selector-parser "^2.2.2" + vendors "^1.0.0" + +postcss-message-helpers@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e" + +postcss-minify-font-values@^1.0.2: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-minify-gradients@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1" + dependencies: + postcss "^5.0.12" + postcss-value-parser "^3.3.0" + +postcss-minify-params@^1.0.4: + version "1.2.2" + resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.2" + postcss-value-parser "^3.0.2" + uniqs "^2.0.0" + +postcss-minify-selectors@^2.0.4: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf" + dependencies: + alphanum-sort "^1.0.2" + has "^1.0.1" + postcss "^5.0.14" + postcss-selector-parser "^2.0.0" + +postcss-mixins@^2.1.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/postcss-mixins/-/postcss-mixins-2.1.1.tgz#b141a0803efa8e2d744867f8d91596890cf9241b" + dependencies: + globby "^3.0.1" + postcss "^5.0.10" + postcss-simple-vars "^1.0.1" + +postcss-nested@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-1.0.0.tgz#d136bd4b576bd5632df142c12b2198a9ccf794df" + dependencies: + postcss "^5.0.2" + +postcss-nesting@^2.0.6: + version "2.3.1" + resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-2.3.1.tgz#94a6b6a4ef707fbec20a87fee5c957759b4e01cf" + dependencies: + postcss "^5.0.19" + +postcss-normalize-charset@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1" + dependencies: + postcss "^5.0.5" + +postcss-normalize-url@^3.0.7: + version "3.0.8" + resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222" + dependencies: + is-absolute-url "^2.0.0" + normalize-url "^1.4.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + +postcss-ordered-values@^2.1.0: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.1" + +postcss-partial-import@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/postcss-partial-import/-/postcss-partial-import-1.3.0.tgz#2f4b773a76c7b0a69b389dcf475c4d362d0d2576" + dependencies: + fs-extra "^0.24.0" + fs-promise "^0.3.1" + object-assign "^4.0.1" + postcss "^5.0.5" + string-hash "^1.1.0" + +postcss-property-lookup@^1.1.3: + version "1.2.1" + resolved "https://registry.yarnpkg.com/postcss-property-lookup/-/postcss-property-lookup-1.2.1.tgz#30450a1361b7aae758bbedd5201fbe057bb8270b" + dependencies: + object-assign "^4.0.1" + postcss "^5.0.4" + tcomb "^2.5.1" + +postcss-reduce-idents@^2.2.2: + version "2.4.0" + resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3" + dependencies: + postcss "^5.0.4" + postcss-value-parser "^3.0.2" + +postcss-reduce-initial@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea" + dependencies: + postcss "^5.0.4" + +postcss-reduce-transforms@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1" + dependencies: + has "^1.0.1" + postcss "^5.0.8" + postcss-value-parser "^3.0.1" + +postcss-selector-matches@^2.0.0: + version "2.0.5" + resolved "https://registry.yarnpkg.com/postcss-selector-matches/-/postcss-selector-matches-2.0.5.tgz#fa0f43be57b68e77aa4cd11807023492a131027f" + dependencies: + balanced-match "^0.4.2" + postcss "^5.0.0" + +postcss-selector-not@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-2.0.0.tgz#c73ad21a3f75234bee7fee269e154fd6a869798d" + dependencies: + balanced-match "^0.2.0" + postcss "^5.0.0" + +postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2: + version "2.2.3" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90" + dependencies: + flatten "^1.0.2" + indexes-of "^1.0.1" + uniq "^1.0.1" + +postcss-simple-vars@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postcss-simple-vars/-/postcss-simple-vars-1.2.0.tgz#2e6689921144b74114e765353275a3c32143f150" + dependencies: + postcss "^5.0.13" + +postcss-svgo@^2.1.1: + version "2.1.6" + resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d" + dependencies: + is-svg "^2.0.0" + postcss "^5.0.14" + postcss-value-parser "^3.2.3" + svgo "^0.7.0" + +postcss-unique-selectors@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d" + dependencies: + alphanum-sort "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15" + +postcss-zindex@^2.0.1: + version "2.2.0" + resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22" + dependencies: + has "^1.0.1" + postcss "^5.0.4" + uniqs "^2.0.0" + +postcss@^5.0.0, postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.19, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.8, postcss@^5.2.12, postcss@^5.2.16, postcss@^5.2.8: + version "5.2.16" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.16.tgz#732b3100000f9ff8379a48a53839ed097376ad57" + dependencies: + chalk "^1.1.3" + js-base64 "^2.1.9" + source-map "^0.5.6" + supports-color "^3.2.3" + +precss@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/precss/-/precss-1.4.0.tgz#8d7c3ae70f10a00a3955287f85a66e0f8b31cda3" + dependencies: + postcss "^5.0.10" + postcss-advanced-variables "1.2.2" + postcss-atroot "^0.1.2" + postcss-color-function "^2.0.0" + postcss-custom-media "^5.0.0" + postcss-custom-properties "^5.0.0" + postcss-custom-selectors "^3.0.0" + postcss-extend "^1.0.1" + postcss-media-minmax "^2.1.0" + postcss-mixins "^2.1.0" + postcss-nested "^1.0.0" + postcss-nesting "^2.0.6" + postcss-partial-import "^1.3.0" + postcss-property-lookup "^1.1.3" + postcss-selector-matches "^2.0.0" + postcss-selector-not "^2.0.0" + +prepend-http@^1.0.0, prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + +preserve@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" + +pretty-bytes@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9" + +process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +proxy-addr@~1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.4.tgz#27e545f6960a44a627d9b44467e35c1b6b4ce2f3" + dependencies: + forwarded "~0.1.0" + ipaddr.js "1.3.0" + +pseudomap@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + +q@^1.1.2: + version "1.5.0" + resolved "https://registry.yarnpkg.com/q/-/q-1.5.0.tgz#dd01bac9d06d30e6f219aecb8253ee9ebdc308f1" + +qs@6.4.0: + version "6.4.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233" + +query-string@^4.1.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.2.tgz#ec0fd765f58a50031a3968c2431386f8947a5cdd" + dependencies: + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +randomatic@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb" + dependencies: + is-number "^2.0.2" + kind-of "^3.0.2" + +range-parser@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" + +rc@^1.1.2: + version "1.2.1" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.1.tgz#2e03e8e42ee450b8cb3dce65be1bf8974e1dfd95" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~2.0.1" + +read-all-stream@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/read-all-stream/-/read-all-stream-3.1.0.tgz#35c3e177f2078ef789ee4bfafa4373074eaef4fa" + dependencies: + pinkie-promise "^2.0.0" + readable-stream "^2.0.0" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +"readable-stream@>=1.0.33-1 <1.1.0-0": + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.1.5, readable-stream@^2.2.2: + version "2.2.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.6.tgz#8b43aed76e71483938d12a8d46c6cf1a00b1f816" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +redent@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" + dependencies: + indent-string "^2.1.0" + strip-indent "^1.0.1" + +reduce-css-calc@^1.2.6: + version "1.3.0" + resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716" + dependencies: + balanced-match "^0.4.2" + math-expression-evaluator "^1.2.14" + reduce-function-call "^1.0.1" + +reduce-function-call@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99" + dependencies: + balanced-match "^0.4.2" + +regex-cache@^0.4.2: + version "0.4.3" + resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145" + dependencies: + is-equal-shallow "^0.1.3" + is-primitive "^2.0.0" + +remove-trailing-separator@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4" + +repeat-element@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + +repeat-string@^1.5.2: + version "1.6.1" + resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" + +repeating@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" + dependencies: + is-finite "^1.0.0" + +replace-ext@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924" + +replace-ext@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb" + +require-from-string@^1.1.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" + +resolve-url@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" + +rgb@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/rgb/-/rgb-0.1.0.tgz#be27b291e8feffeac1bd99729721bfa40fc037b5" + +rimraf@^2.2.6, rimraf@^2.2.8, rimraf@^2.5.4: + version "2.6.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.1.tgz#c2338ec643df7a1b7fe5c54fa86f57428a55f33d" + dependencies: + glob "^7.0.5" + +sax@~1.2.1: + version "1.2.2" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.2.tgz#fd8631a23bc7826bef5d871bdb87378c95647828" + +seek-bzip@^1.0.3: + version "1.0.5" + resolved "https://registry.yarnpkg.com/seek-bzip/-/seek-bzip-1.0.5.tgz#cfe917cb3d274bcffac792758af53173eb1fabdc" + dependencies: + commander "~2.8.1" + +semver-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/semver-regex/-/semver-regex-1.0.0.tgz#92a4969065f9c70c694753d55248fc68f8f652c9" + +semver-truncate@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/semver-truncate/-/semver-truncate-1.1.2.tgz#57f41de69707a62709a7e0104ba2117109ea47e8" + dependencies: + semver "^5.3.0" + +"semver@2 || 3 || 4 || 5", semver@^5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +semver@^4.0.3: + version "4.3.6" + resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da" + +send@0.15.1: + version "0.15.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.15.1.tgz#8a02354c26e6f5cca700065f5f0cdeba90ec7b5f" + dependencies: + debug "2.6.1" + depd "~1.1.0" + destroy "~1.0.4" + encodeurl "~1.0.1" + escape-html "~1.0.3" + etag "~1.8.0" + fresh "0.5.0" + http-errors "~1.6.1" + mime "1.3.4" + ms "0.7.2" + on-finished "~2.3.0" + range-parser "~1.2.0" + statuses "~1.3.1" + +serve-static@1.12.1, serve-static@^1.11.2: + version "1.12.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.12.1.tgz#7443a965e3ced647aceb5639fa06bf4d1bbe0039" + dependencies: + encodeurl "~1.0.1" + escape-html "~1.0.3" + parseurl "~1.3.1" + send "0.15.1" + +set-immediate-shim@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + +setprototypeof@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.0.3.tgz#66567e37043eeb4f04d91bd658c0cbefb55b8e04" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + +sort-keys@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad" + dependencies: + is-plain-obj "^1.0.0" + +source-map-resolve@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761" + dependencies: + atob "~1.1.0" + resolve-url "~0.2.1" + source-map-url "~0.3.0" + urix "~0.1.0" + +source-map-url@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9" + +source-map@0.X, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + +source-map@^0.1.38: + version "0.1.43" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346" + dependencies: + amdefine ">=0.0.4" + +sparkles@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3" + +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + +squeak@^1.0.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/squeak/-/squeak-1.3.0.tgz#33045037b64388b567674b84322a6521073916c3" + dependencies: + chalk "^1.0.0" + console-stream "^0.1.1" + lpad-align "^1.0.1" + +stat-mode@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/stat-mode/-/stat-mode-0.2.2.tgz#e6c80b623123d7d80cf132ce538f346289072502" + +"statuses@>= 1.3.1 < 2", statuses@~1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" + +stream-combiner2@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/stream-combiner2/-/stream-combiner2-1.1.1.tgz#fb4d8a1420ea362764e21ad4780397bebcb41cbe" + dependencies: + duplexer2 "~0.1.0" + readable-stream "^2.0.2" + +stream-shift@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952" + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + +string-hash@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + +strip-ansi@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" + dependencies: + ansi-regex "^2.0.0" + +strip-bom-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee" + dependencies: + first-chunk-stream "^1.0.0" + strip-bom "^2.0.0" + +strip-bom@3.X: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-dirs@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-1.1.1.tgz#960bbd1287844f3975a4558aa103a8255e2456a0" + dependencies: + chalk "^1.0.0" + get-stdin "^4.0.1" + is-absolute "^0.1.5" + is-natural-number "^2.0.0" + minimist "^1.1.0" + sum-up "^1.0.1" + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + +strip-indent@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-1.0.1.tgz#0c7962a6adefa7bbd4ac366460a638552ae1a0a2" + dependencies: + get-stdin "^4.0.1" + +strip-json-comments@~2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + +strip-outer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-outer/-/strip-outer-1.0.0.tgz#aac0ba60d2e90c5d4f275fd8869fd9a2d310ffb8" + dependencies: + escape-string-regexp "^1.0.2" + +sum-up@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sum-up/-/sum-up-1.0.3.tgz#1c661f667057f63bcb7875aa1438bc162525156e" + dependencies: + chalk "^1.0.0" + +supports-color@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" + +supports-color@^3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6" + dependencies: + has-flag "^1.0.0" + +svgo@^0.7.0: + version "0.7.2" + resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" + dependencies: + coa "~1.0.1" + colors "~1.1.2" + csso "~2.3.1" + js-yaml "~3.7.0" + mkdirp "~0.5.1" + sax "~1.2.1" + whet.extend "~0.9.9" + +tar-stream@^1.1.1: + version "1.5.4" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.5.4.tgz#36549cf04ed1aee9b2a30c0143252238daf94016" + dependencies: + bl "^1.0.0" + end-of-stream "^1.0.0" + readable-stream "^2.0.0" + xtend "^4.0.0" + +tcomb@^2.5.1: + version "2.7.0" + resolved "https://registry.yarnpkg.com/tcomb/-/tcomb-2.7.0.tgz#10d62958041669a5d53567b9a4ee8cde22b1c2b0" + +tempfile@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + +through2-concurrent@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/through2-concurrent/-/through2-concurrent-1.1.1.tgz#11cb4ea4c9e31bca6e4c1e6dba48d1c728c3524b" + dependencies: + through2 "^2.0.0" + +through2-filter@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/through2-filter/-/through2-filter-2.0.0.tgz#60bc55a0dacb76085db1f9dae99ab43f83d622ec" + dependencies: + through2 "~2.0.0" + xtend "~4.0.0" + +through2@2.X, through2@^2, through2@^2.0.0, through2@~2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be" + dependencies: + readable-stream "^2.1.5" + xtend "~4.0.1" + +through2@^0.6.0, through2@^0.6.1: + version "0.6.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48" + dependencies: + readable-stream ">=1.0.33-1 <1.1.0-0" + xtend ">=4.0.0 <4.1.0-0" + +time-stamp@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151" + +timed-out@^3.0.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-3.1.3.tgz#95860bfcc5c76c277f8f8326fd0f5b2e20eba217" + +to-absolute-glob@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f" + dependencies: + extend-shallow "^2.0.1" + +trim-newlines@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-1.0.0.tgz#5887966bb582a4503a41eb524f7d35011815a613" + +trim-repeated@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/trim-repeated/-/trim-repeated-1.0.0.tgz#e3646a2ea4e891312bf7eace6cfb05380bc01c21" + dependencies: + escape-string-regexp "^1.0.2" + +tunnel-agent@^0.4.0: + version "0.4.3" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.4.3.tgz#6373db76909fe570e08d73583365ed828a74eeeb" + +type-is@~1.6.14: + version "1.6.14" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.14.tgz#e219639c17ded1ca0789092dd54a03826b817cb2" + dependencies: + media-typer "0.3.0" + mime-types "~2.1.13" + +typedarray@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uniq@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" + +uniqid@^4.0.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1" + dependencies: + macaddress "^0.2.8" + +uniqs@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02" + +unique-stream@^2.0.2: + version "2.2.1" + resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369" + dependencies: + json-stable-stringify "^1.0.0" + through2-filter "^2.0.0" + +unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + +unzip-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unzip-response/-/unzip-response-1.0.2.tgz#b984f0877fc0a89c2c773cc1ef7b5b232b5b06fe" + +urix@^0.1.0, urix@~0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + dependencies: + prepend-http "^1.0.1" + +url-regex@^3.0.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/url-regex/-/url-regex-3.2.0.tgz#dbad1e0c9e29e105dd0b1f09f6862f7fdb482724" + dependencies: + ip-regex "^1.0.1" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + +utils-merge@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" + +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + +vali-date@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/vali-date/-/vali-date-1.0.0.tgz#1b904a59609fb328ef078138420934f6b86709a6" + +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + +vary@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.1.tgz#67535ebb694c1d52257457984665323f587e8d37" + +vendors@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22" + +vinyl-assign@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/vinyl-assign/-/vinyl-assign-1.2.1.tgz#4d198891b5515911d771a8cd9c5480a46a074a45" + dependencies: + object-assign "^4.0.1" + readable-stream "^2.0.0" + +vinyl-fs@^2.2.0: + version "2.4.4" + resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-2.4.4.tgz#be6ff3270cb55dfd7d3063640de81f25d7532239" + dependencies: + duplexify "^3.2.0" + glob-stream "^5.3.2" + graceful-fs "^4.0.0" + gulp-sourcemaps "1.6.0" + is-valid-glob "^0.3.0" + lazystream "^1.0.0" + lodash.isequal "^4.0.0" + merge-stream "^1.0.0" + mkdirp "^0.5.0" + object-assign "^4.0.0" + readable-stream "^2.0.4" + strip-bom "^2.0.0" + strip-bom-stream "^1.0.0" + through2 "^2.0.0" + through2-filter "^2.0.0" + vali-date "^1.0.0" + vinyl "^1.0.0" + +vinyl-sourcemaps-apply@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705" + dependencies: + source-map "^0.5.1" + +vinyl@1.X, vinyl@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +vinyl@^0.4.3: + version "0.4.6" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847" + dependencies: + clone "^0.2.0" + clone-stats "^0.0.1" + +vinyl@^0.5.0: + version "0.5.3" + resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde" + dependencies: + clone "^1.0.0" + clone-stats "^0.0.1" + replace-ext "0.0.1" + +ware@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/ware/-/ware-1.3.0.tgz#d1b14f39d2e2cb4ab8c4098f756fe4b164e473d4" + dependencies: + wrap-fn "^0.1.0" + +whet.extend@~0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" + +which@^1.2.9: + version "1.2.14" + resolved "https://registry.yarnpkg.com/which/-/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5" + dependencies: + isexe "^2.0.0" + +wrap-fn@^0.1.0: + version "0.1.5" + resolved "https://registry.yarnpkg.com/wrap-fn/-/wrap-fn-0.1.5.tgz#f21b6e41016ff4a7e31720dbc63a09016bdf9845" + dependencies: + co "3.1.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + +"xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +yallist@^2.0.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + +yauzl@^2.2.1: + version "2.8.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.8.0.tgz#79450aff22b2a9c5a41ef54e02db907ccfbf9ee2" + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.0.1"